{"version":3,"sources":["node_modules/@nevware21/ts-utils/dist/es5/mod/ts-utils.js","node_modules/@microsoft/dynamicproto-js/dist-es5/DynamicProto.js","node_modules/@microsoft/applicationinsights-shims/dist-es5/Constants.js","node_modules/@microsoft/applicationinsights-shims/dist-es5/TsLibShims.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK.Enums/EnumHelperFuncs.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK.Enums/InitActiveStatusEnum.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/AggregationError.js","node_modules/@nevware21/ts-async/dist/es5/mod/ts-async.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/InternalConstants.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/HelperFuncs.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/EnvUtils.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/RandomHelper.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/DataCacheHelper.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/ConfigDefaults.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/DynamicSupport.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/DynamicProperty.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/DynamicState.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/DynamicConfig.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/AsyncUtils.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/Constants.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/Config/ConfigDefaultHelpers.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/DbgExtensionUtils.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/DiagnosticLogger.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/CookieMgr.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/NotificationManager.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/PerfManager.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/CoreUtils.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/W3cTraceParent.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/TelemetryHelpers.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/ProcessTelemetryContext.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/UnloadHandlerContainer.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/UnloadHookContainer.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/BaseTelemetryPlugin.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/TelemetryInitializerPlugin.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/AppInsightsCore.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/ResponseHelpers.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/SenderPostManager.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/EventHelpers.js","node_modules/@microsoft/applicationinsights-core-js/dist-es5/JavaScriptSDK/InstrumentHooks.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Constants.js","node_modules/@microsoft/applicationinsights-common/dist-es5/RequestResponseHeaders.js","node_modules/@microsoft/applicationinsights-common/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Common/DataSanitizer.js","node_modules/@microsoft/applicationinsights-common/dist-es5/UrlHelperFuncs.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Util.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Enums.js","node_modules/@microsoft/applicationinsights-common/dist-es5/StorageHelperFuncs.js","node_modules/@microsoft/applicationinsights-common/dist-es5/ThrottleMgr.js","node_modules/@microsoft/applicationinsights-common/dist-es5/ConnectionStringParser.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Common/Envelope.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Event.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Exception.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Common/DataPoint.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Metric.js","node_modules/@microsoft/applicationinsights-common/dist-es5/HelperFuncs.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/PageView.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/RemoteDependencyData.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Trace.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/PageViewPerformance.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Telemetry/Common/Data.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Interfaces/Contracts/SeverityLevel.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Interfaces/Contracts/ContextTagKeys.js","node_modules/@microsoft/applicationinsights-common/dist-es5/TelemetryItemCreator.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Interfaces/PartAExtensions.js","node_modules/@microsoft/applicationinsights-common/dist-es5/DomHelperFuncs.js","node_modules/@microsoft/applicationinsights-common/dist-es5/Offline.js","node_modules/@microsoft/applicationinsights-common/dist-es5/applicationinsights-common.js","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/JavaScriptSDK/Telemetry/PageViewManager.js","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/JavaScriptSDK/Telemetry/PageViewPerformanceManager.js","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/JavaScriptSDK/Telemetry/PageVisitTimeManager.js","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/JavaScriptSDK/Timing.js","node_modules/@microsoft/applicationinsights-analytics-js/dist-es5/JavaScriptSDK/AnalyticsPlugin.js","node_modules/@microsoft/applicationinsights-cfgsync-js/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-cfgsync-js/dist-es5/CfgSyncHelperFuncs.js","node_modules/@microsoft/applicationinsights-cfgsync-js/dist-es5/CfgSyncPlugin.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/InternalConstants.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/EnvelopeCreator.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/SendBuffer.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/Serializer.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/TelemetryProcessors/Sample.js","node_modules/@microsoft/applicationinsights-channel-js/dist-es5/Sender.js","node_modules/@microsoft/applicationinsights-dependencies-js/dist-es5/InternalConstants.js","node_modules/@microsoft/applicationinsights-dependencies-js/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-dependencies-js/dist-es5/ajaxRecord.js","node_modules/@microsoft/applicationinsights-dependencies-js/dist-es5/ajax.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/Application.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/Device.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/Internal.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/Location.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/Session.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/TelemetryTrace.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/Context/User.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/TelemetryContext.js","node_modules/@microsoft/applicationinsights-properties-js/dist-es5/PropertiesPlugin.js","node_modules/@microsoft/applicationinsights-web/dist-es5/InternalConstants.js","node_modules/@microsoft/applicationinsights-web/dist-es5/__DynamicConstants.js","node_modules/@microsoft/applicationinsights-web/dist-es5/AISku.js","libs/shared/src/lib/telemetry/telemetry.service.ts","libs/shared/src/lib/telemetry/telemetry.module.ts"],"sourcesContent":["/*! https://github.com/nevware21/ts-utils v0.11.5 */\n/*\n * Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.\n * Licensed under the MIT license.\n */\n/*#__NO_SIDE_EFFECTS__*/\nfunction _pureAssign(func1, func2) {\n return func1 || func2;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _pureRef(value, name) {\n return value[name];\n}\nvar UNDEF_VALUE = undefined;\nvar NULL_VALUE = null;\nvar EMPTY = \"\";\nvar FUNCTION = \"function\";\nvar OBJECT = \"object\";\nvar PROTOTYPE = \"prototype\";\nvar __PROTO__ = \"__proto__\";\nvar UNDEFINED = \"undefined\";\nvar CONSTRUCTOR = \"constructor\";\nvar SYMBOL = \"Symbol\";\nvar POLYFILL_TAG = \"_polyfill\";\nvar LENGTH = \"length\";\nvar NAME = \"name\";\nvar CALL = \"call\";\nvar TO_STRING = \"toString\";\nvar ObjClass = /*#__PURE__*/_pureAssign(Object);\nvar ObjProto = /*#__PURE__*/_pureRef(ObjClass, PROTOTYPE);\nvar StrCls = /*#__PURE__*/_pureAssign(String);\nvar StrProto = /*#__PURE__*/_pureRef(StrCls, PROTOTYPE);\nvar MathCls = /*#__PURE__*/_pureAssign(Math);\nvar ArrCls = /*#__PURE__*/_pureAssign(Array);\nvar ArrProto = /*#__PURE__*/_pureRef(ArrCls, PROTOTYPE);\nvar ArrSlice = /*#__PURE__*/_pureRef(ArrProto, \"slice\");\nfunction safe(func, argArray) {\n try {\n return {\n v: func.apply(this, argArray)\n };\n } catch (e) {\n return {\n e: e\n };\n }\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction safeGet(cb, defValue) {\n var result = safe(cb);\n return result.e ? defValue : result.v;\n}\nvar _primitiveTypes;\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createIs(theType) {\n return function (value) {\n return typeof value === theType;\n };\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createObjIs(theName) {\n var theType = \"[object \" + theName + \"]\";\n return function (value) {\n return !!(value && objToString(value) === theType);\n };\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction objToString(value) {\n return ObjProto[TO_STRING].call(value);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction isTypeof(value, theType) {\n return typeof value === theType;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction isUndefined(value) {\n return typeof value === UNDEFINED || value === UNDEFINED;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction isStrictUndefined(arg) {\n return !isDefined(arg);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction isNullOrUndefined(value) {\n return value === NULL_VALUE || isUndefined(value);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction isStrictNullOrUndefined(value) {\n return value === NULL_VALUE || !isDefined(value);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction isDefined(arg) {\n return !!arg || arg !== UNDEF_VALUE;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction isPrimitive(value) {\n return value === NULL_VALUE || isPrimitiveType(typeof value);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction isPrimitiveType(theType) {\n !_primitiveTypes && (_primitiveTypes = [\"string\", \"number\", \"boolean\", UNDEFINED, \"symbol\", \"bigint\"]);\n return !!(theType !== OBJECT && _primitiveTypes.indexOf(theType) !== -1);\n}\nvar isString = /*#__PURE__*/_createIs(\"string\");\nvar isFunction = /*#__PURE__*/_createIs(FUNCTION);\n/*#__NO_SIDE_EFFECTS__*/\nfunction isObject(value) {\n if (!value && isNullOrUndefined(value)) {\n return false;\n }\n return !!value && typeof value === OBJECT;\n}\nvar isArray = /* #__PURE__*/_pureRef(ArrCls, \"isArray\");\nvar isDate = /*#__PURE__*/_createObjIs(\"Date\");\nvar isNumber = /*#__PURE__*/_createIs(\"number\");\nvar isBoolean = /*#__PURE__*/_createIs(\"boolean\");\nvar isRegExp = /*#__PURE__*/_createObjIs(\"RegExp\");\nvar isFile = /*#__PURE__*/_createObjIs(\"File\");\nvar isFormData = /*#__PURE__*/_createObjIs(\"FormData\");\nvar isBlob = /*#__PURE__*/_createObjIs(\"Blob\");\nvar isArrayBuffer = /*#__PURE__*/_createObjIs(\"ArrayBuffer\");\nvar isError = /*#__PURE__*/_createObjIs(\"Error\");\n/*#__NO_SIDE_EFFECTS__*/\nfunction isPromiseLike(value) {\n return !!(value && value.then && isFunction(value.then));\n}\nvar isThenable = isPromiseLike;\n/*#__NO_SIDE_EFFECTS__*/\nfunction isPromise(value) {\n return !!(value && value.then && value.catch && isFunction(value.then) && isFunction(value.catch));\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction isNotTruthy(value) {\n return !value || !isTruthy(value);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction isTruthy(value) {\n return !(!value || safeGet(function () {\n return !(value && 0 + value);\n }, !value));\n}\nvar objGetOwnPropertyDescriptor = /* #__PURE__ */_pureRef(ObjClass, \"getOwnPropertyDescriptor\");\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction objHasOwnProperty(obj, prop) {\n return !!obj && ObjProto.hasOwnProperty[CALL](obj, prop);\n}\nvar objHasOwn = /*#__PURE__*/_pureAssign(/* #__PURE__ */_pureRef(ObjClass, \"hasOwn\"), polyObjHasOwn);\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyObjHasOwn(obj, prop) {\n return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);\n}\nfunction objForEachKey(theObject, callbackfn, thisArg) {\n if (theObject && isObject(theObject)) {\n for (var prop in theObject) {\n if (objHasOwn(theObject, prop)) {\n if (callbackfn[CALL](thisArg || theObject, prop, theObject[prop]) === -1) {\n break;\n }\n }\n }\n }\n}\nvar propMap = {\n e: \"enumerable\",\n c: \"configurable\",\n v: \"value\",\n w: \"writable\",\n g: \"get\",\n s: \"set\"\n};\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createProp(value) {\n var prop = {};\n prop[propMap[\"c\"]] = true;\n prop[propMap[\"e\"]] = true;\n if (value.l) {\n prop.get = function () {\n return value.l.v;\n };\n var desc = objGetOwnPropertyDescriptor(value.l, \"v\");\n if (desc && desc.set) {\n prop.set = function (newValue) {\n value.l.v = newValue;\n };\n }\n }\n objForEachKey(value, function (key, value) {\n prop[propMap[key]] = isStrictUndefined(value) ? prop[propMap[key]] : value;\n });\n return prop;\n}\nvar objDefineProp = /*#__PURE__*/_pureRef(ObjClass, \"defineProperty\");\nvar objDefineProperties = /*#__PURE__*/_pureRef(ObjClass, \"defineProperties\");\nfunction objDefineGet(target, key, value, configurable, enumerable) {\n var _a;\n return objDefineProp(target, key, _createProp((_a = {\n e: enumerable,\n c: configurable\n }, _a[isFunction(value) ? \"g\" : \"v\"] = value, _a)));\n}\nfunction objDefineAccessors(target, prop, getProp, setProp, configurable, enumerable) {\n var desc = {\n e: enumerable,\n c: configurable\n };\n if (getProp) {\n desc.g = getProp;\n }\n if (setProp) {\n desc.s = setProp;\n }\n return objDefineProp(target, prop, _createProp(desc));\n}\nfunction objDefine(target, key, propDesc) {\n return objDefineProp(target, key, _createProp(propDesc));\n}\nfunction objDefineProps(target, propDescMap) {\n var props = {};\n objForEachKey(propDescMap, function (key, value) {\n props[key] = _createProp(value);\n });\n return objDefineProperties(target, props);\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createKeyValueMap(values, keyType, valueType, completeFn, writable) {\n var theMap = {};\n objForEachKey(values, function (key, value) {\n _assignMapValue(theMap, key, keyType ? value : key, writable);\n _assignMapValue(theMap, value, valueType ? value : key, writable);\n });\n return completeFn ? completeFn(theMap) : theMap;\n}\nfunction _assignMapValue(theMap, key, value, writable) {\n objDefineProp(theMap, key, {\n value: value,\n enumerable: true,\n writable: !!writable\n });\n}\nvar asString = /* #__PURE__ */_pureAssign(StrCls);\nvar ERROR_TYPE = \"[object Error]\";\n/*#__NO_SIDE_EFFECTS__*/\nfunction dumpObj(object, format) {\n var propertyValueDump = EMPTY;\n var objType = ObjProto[TO_STRING][CALL](object);\n if (objType === ERROR_TYPE) {\n object = {\n stack: asString(object.stack),\n message: asString(object.message),\n name: asString(object.name)\n };\n }\n try {\n propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? typeof format === \"number\" ? format : 4 : UNDEF_VALUE);\n propertyValueDump = (propertyValueDump ? propertyValueDump.replace(/\"(\\w+)\"\\s*:\\s{0,1}/g, \"$1: \") : NULL_VALUE) || asString(object);\n } catch (e) {\n propertyValueDump = \" - \" + dumpObj(e, format);\n }\n return objType + \": \" + propertyValueDump;\n}\nfunction throwError(message) {\n throw new Error(message);\n}\nfunction throwTypeError(message) {\n throw new TypeError(message);\n}\nfunction throwRangeError(message) {\n throw new RangeError(message);\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyObjKeys(obj) {\n if (!isObject(obj) || obj === NULL_VALUE) {\n throwTypeError(\"non-object \" + dumpObj(obj));\n }\n var result = [];\n for (var prop in obj) {\n if (objHasOwn(obj, prop)) {\n result.push(prop);\n }\n }\n return result;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyObjEntries(value) {\n var result = [];\n objForEachKey(value, function (key, value) {\n result.push([key, value]);\n });\n return result;\n}\nvar _objFreeze = /* #__PURE__ */_pureRef(ObjClass, \"freeze\");\nfunction _doNothing(value) {\n return value;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _getProto(value) {\n return value[__PROTO__] || NULL_VALUE;\n}\nvar objAssign = /*#__PURE__*/_pureRef(ObjClass, \"assign\");\nvar objKeys = /*#__PURE__*/_pureRef(ObjClass, \"keys\");\nfunction objDeepFreeze(value) {\n if (_objFreeze) {\n objForEachKey(value, function (key, value) {\n if (isArray(value) || isObject(value)) {\n objDeepFreeze(value);\n }\n });\n }\n return objFreeze(value);\n}\nvar objFreeze = /* #__PURE__*/_pureAssign(_objFreeze, _doNothing);\nvar objSeal = /* #__PURE__*/_pureAssign(/* #__PURE__*/_pureRef(ObjClass, \"seal\"), _doNothing);\nvar objGetPrototypeOf = /* #__PURE__*/_pureAssign(/* #__PURE__*/_pureRef(ObjClass, \"getPrototypeOf\"), _getProto);\nvar objEntries = /* #__PURE__*/_pureAssign(/* #__PURE__*/_pureRef(ObjClass, \"entries\"), polyObjEntries);\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction createEnum(values) {\n return _createKeyValueMap(values, 1, 0, objFreeze);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction createEnumKeyMap(values) {\n return _createKeyValueMap(values, 0, 0, objFreeze);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction createEnumValueMap(values) {\n return _createKeyValueMap(values, 1, 1, objFreeze);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction createSimpleMap(values) {\n var mapClass = {};\n objForEachKey(values, function (key, value) {\n _assignMapValue(mapClass, key, value[1]);\n _assignMapValue(mapClass, value[0], value[1]);\n });\n return objFreeze(mapClass);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction createTypeMap(values) {\n return createSimpleMap(values);\n}\nvar _wellKnownSymbolMap = /*#__PURE__*/createEnumKeyMap({\n asyncIterator: 0,\n hasInstance: 1,\n isConcatSpreadable: 2,\n iterator: 3,\n match: 4,\n matchAll: 5,\n replace: 6,\n search: 7,\n species: 8,\n split: 9,\n toPrimitive: 10,\n toStringTag: 11,\n unscopables: 12\n});\nvar GLOBAL_CONFIG_KEY = \"__tsUtils$gblCfg\";\nvar _globalCfg;\n/*#__NO_SIDE_EFFECTS__*/\nfunction _getGlobalValue() {\n var result;\n if (typeof globalThis !== UNDEFINED) {\n result = globalThis;\n }\n if (!result && typeof self !== UNDEFINED) {\n result = self;\n }\n if (!result && typeof window !== UNDEFINED) {\n result = window;\n }\n if (!result && typeof global !== UNDEFINED) {\n result = global;\n }\n return result;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _getGlobalConfig() {\n if (!_globalCfg) {\n var gbl = safe(_getGlobalValue).v || {};\n _globalCfg = gbl[GLOBAL_CONFIG_KEY] = gbl[GLOBAL_CONFIG_KEY] || {};\n }\n return _globalCfg;\n}\nvar _unwrapFunction = _unwrapFunctionWithPoly;\n/*#__NO_SIDE_EFFECTS__*/\nfunction _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {\n var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;\n return function (thisArg) {\n var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;\n if (theFunc || polyFunc) {\n var theArgs = arguments;\n return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);\n }\n throwTypeError(\"\\\"\" + asString(funcName) + \"\\\" not defined for \" + dumpObj(thisArg));\n };\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _unwrapProp(propName) {\n return function (thisArg) {\n return thisArg[propName];\n };\n}\nvar mathMin = /*#__PURE__*/_pureRef(MathCls, \"min\");\nvar mathMax = /*#__PURE__*/_pureRef(MathCls, \"max\");\nvar strSlice = /*#__PURE__*/_unwrapFunction(\"slice\", StrProto);\nvar strSubstring = /*#__PURE__*/_unwrapFunction(\"substring\", StrProto);\nvar strSubstr = /*#__PURE__*/_unwrapFunctionWithPoly(\"substr\", StrProto, polyStrSubstr);\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyStrSubstr(value, start, length) {\n if (isNullOrUndefined(value)) {\n throwTypeError(\"Invalid \" + dumpObj(value));\n }\n if (length < 0) {\n return EMPTY;\n }\n start = start || 0;\n if (start < 0) {\n start = mathMax(start + value[LENGTH], 0);\n }\n if (isUndefined(length)) {\n return strSlice(value, start);\n }\n return strSlice(value, start, start + length);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction strLeft(value, count) {\n return strSubstring(value, 0, count);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction strRight(value, count) {\n return count <= 0 ? EMPTY : value[LENGTH] > count ? strSlice(value, -count) : value;\n}\nvar UNIQUE_REGISTRY_ID = \"_urid\";\nvar _polySymbols;\n/*#__NO_SIDE_EFFECTS__*/\nfunction _globalSymbolRegistry() {\n if (!_polySymbols) {\n var gblCfg = _getGlobalConfig();\n _polySymbols = gblCfg.gblSym = gblCfg.gblSym || {\n k: {},\n s: {}\n };\n }\n return _polySymbols;\n}\nvar _wellKnownSymbolCache;\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyNewSymbol(description) {\n var theSymbol = {\n description: asString(description),\n toString: function () {\n return SYMBOL + \"(\" + description + \")\";\n }\n };\n theSymbol[POLYFILL_TAG] = true;\n return theSymbol;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction polySymbolFor(key) {\n var registry = _globalSymbolRegistry();\n if (!objHasOwn(registry.k, key)) {\n var newSymbol_1 = polyNewSymbol(key);\n var regId_1 = objKeys(registry.s).length;\n newSymbol_1[UNIQUE_REGISTRY_ID] = function () {\n return regId_1 + \"_\" + newSymbol_1[TO_STRING]();\n };\n registry.k[key] = newSymbol_1;\n registry.s[newSymbol_1[UNIQUE_REGISTRY_ID]()] = asString(key);\n }\n return registry.k[key];\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction polySymbolKeyFor(sym) {\n if (!sym || !sym[TO_STRING] || strSubstring(sym[TO_STRING](), 0, 6) != SYMBOL) {\n throwTypeError(sym + \" is not a symbol\");\n }\n var regId = sym[POLYFILL_TAG] && sym[UNIQUE_REGISTRY_ID] && sym[UNIQUE_REGISTRY_ID]();\n return regId ? _globalSymbolRegistry().s[regId] : undefined;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyGetKnownSymbol(name) {\n !_wellKnownSymbolCache && (_wellKnownSymbolCache = {});\n var result;\n var knownName = _wellKnownSymbolMap[name];\n if (knownName) {\n result = _wellKnownSymbolCache[knownName] = _wellKnownSymbolCache[knownName] || polyNewSymbol(SYMBOL + \".\" + knownName);\n }\n return result;\n}\nvar _globalLazyTestHooks;\nfunction _initTestHooks() {\n _globalLazyTestHooks = _getGlobalConfig();\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction getLazy(cb) {\n var lazyValue = {};\n !_globalLazyTestHooks && _initTestHooks();\n lazyValue.b = _globalLazyTestHooks.lzy;\n objDefineProp(lazyValue, \"v\", {\n configurable: true,\n get: function () {\n var result = cb();\n if (!_globalLazyTestHooks.lzy) {\n objDefineProp(lazyValue, \"v\", {\n value: result\n });\n }\n lazyValue.b = _globalLazyTestHooks.lzy;\n return result;\n }\n });\n return lazyValue;\n}\nfunction setBypassLazyCache(newValue) {\n !_globalLazyTestHooks && _initTestHooks();\n _globalLazyTestHooks.lzy = newValue;\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction createCachedValue(value) {\n return objDefineProp({\n toJSON: function () {\n return value;\n }\n }, \"v\", {\n value: value\n });\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction createDeferredCachedValue(cb) {\n var theValue = {\n toJSON: function () {\n return theValue.v;\n }\n };\n return objDefineProp(theValue, \"v\", {\n get: function () {\n var result = cb();\n cb = NULL_VALUE;\n objDefineProp(theValue, \"v\", {\n value: result\n });\n return result;\n },\n configurable: true\n });\n}\nvar WINDOW = \"window\";\nvar _cachedGlobal;\nfunction _getGlobalInstFn(getFn, theArgs) {\n var cachedValue;\n return function () {\n !_globalLazyTestHooks && _initTestHooks();\n if (!cachedValue || _globalLazyTestHooks.lzy) {\n cachedValue = createCachedValue(safe(getFn, theArgs).v);\n }\n return cachedValue.v;\n };\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction lazySafeGetInst(name) {\n return getLazy(function () {\n return safe(getInst, [name]).v || UNDEF_VALUE;\n });\n}\nfunction getGlobal(useCached) {\n !_globalLazyTestHooks && _initTestHooks();\n if (!_cachedGlobal || useCached === false || _globalLazyTestHooks.lzy) {\n _cachedGlobal = createCachedValue(safe(_getGlobalValue).v || NULL_VALUE);\n }\n return _cachedGlobal.v;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction getInst(name, useCached) {\n var gbl;\n if (!_cachedGlobal || useCached === false) {\n gbl = getGlobal(useCached);\n } else {\n gbl = _cachedGlobal.v;\n }\n if (gbl && gbl[name]) {\n return gbl[name];\n }\n if (name === WINDOW) {\n try {\n return window;\n } catch (e) {}\n }\n return NULL_VALUE;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction hasDocument() {\n return !!(/*#__PURE__*/getDocument());\n}\nvar getDocument = /*#__PURE__*/_getGlobalInstFn(getInst, [\"document\"]);\n/*#__NO_SIDE_EFFECTS__*/\nfunction hasWindow() {\n return !!(/*#__PURE__*/getWindow());\n}\nvar getWindow = /*#__PURE__*/_getGlobalInstFn(getInst, [WINDOW]);\n/*#__NO_SIDE_EFFECTS__*/\nfunction hasNavigator() {\n return !!(/*#__PURE__*/getNavigator());\n}\nvar getNavigator = /*#__PURE__*/_getGlobalInstFn(getInst, [\"navigator\"]);\n/*#__NO_SIDE_EFFECTS__*/\nfunction hasHistory() {\n return !!(/*#__PURE__*/getHistory());\n}\nvar getHistory = /*#__PURE__*/_getGlobalInstFn(getInst, [\"history\"]);\nvar isNode = /*#__PURE__*/_getGlobalInstFn(function () {\n return !!(/*#__PURE__*/safe(function () {\n return process && (process.versions || {}).node;\n }).v);\n});\nvar isWebWorker = /*#__PURE__*/_getGlobalInstFn(function () {\n return !!(/*#__PURE__*/safe(function () {\n return self && self instanceof WorkerGlobalScope;\n }).v);\n});\nvar _symbol;\nvar _symbolFor;\nvar _symbolKeyFor;\n/*#__NO_SIDE_EFFECTS__*/\nfunction _initSymbol() {\n _symbol = /*#__PURE__*/createCachedValue(safe(getInst, [SYMBOL]).v);\n return _symbol;\n}\nfunction _getSymbolKey(key) {\n var gblSym = (!_globalLazyTestHooks.lzy ? _symbol : 0) || _initSymbol();\n return gblSym.v ? gblSym.v[key] : UNDEF_VALUE;\n}\nvar isSymbol = /*#__PURE__*/_createIs(\"symbol\");\n/*#__NO_SIDE_EFFECTS__*/\nfunction hasSymbol() {\n return !!(/*#__PURE__*/getSymbol());\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction getSymbol() {\n !_globalLazyTestHooks && _initTestHooks();\n return ((!_globalLazyTestHooks.lzy ? _symbol : 0) || _initSymbol()).v;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction getKnownSymbol(name, noPoly) {\n var knownName = _wellKnownSymbolMap[name];\n !_globalLazyTestHooks && _initTestHooks();\n var sym = (!_globalLazyTestHooks.lzy ? _symbol : 0) || _initSymbol();\n return sym.v ? sym.v[knownName || name] : !noPoly ? polyGetKnownSymbol(name) : UNDEF_VALUE;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction newSymbol(description, noPoly) {\n !_globalLazyTestHooks && _initTestHooks();\n var sym = (!_globalLazyTestHooks.lzy ? _symbol : 0) || _initSymbol();\n return sym.v ? sym.v(description) : !noPoly ? polyNewSymbol(description) : NULL_VALUE;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction symbolFor(key) {\n !_globalLazyTestHooks && _initTestHooks();\n _symbolFor = (!_globalLazyTestHooks.lzy ? _symbolFor : 0) || (/*#__PURE__*/createCachedValue(safe(_getSymbolKey, [\"for\"]).v));\n return (_symbolFor.v || polySymbolFor)(key);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction symbolKeyFor(sym) {\n !_globalLazyTestHooks && _initTestHooks();\n _symbolKeyFor = (!_globalLazyTestHooks.lzy ? _symbolKeyFor : 0) || (/*#__PURE__*/createCachedValue(safe(_getSymbolKey, [\"keyFor\"]).v));\n return (_symbolKeyFor.v || polySymbolKeyFor)(sym);\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction isIterator(value) {\n return !!value && isFunction(value.next);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction isIterable(value) {\n return !isStrictNullOrUndefined(value) && isFunction(value[getKnownSymbol(3)]);\n}\nvar _iterSymbol$1;\nfunction iterForOf(iter, callbackfn, thisArg) {\n if (iter) {\n if (!isIterator(iter)) {\n !_iterSymbol$1 && (_iterSymbol$1 = createCachedValue(getKnownSymbol(3)));\n iter = iter[_iterSymbol$1.v] ? iter[_iterSymbol$1.v]() : NULL_VALUE;\n }\n if (isIterator(iter)) {\n var err = UNDEF_VALUE;\n var iterResult = UNDEF_VALUE;\n try {\n var count = 0;\n while (!(iterResult = iter.next()).done) {\n if (callbackfn[CALL](thisArg || iter, iterResult.value, count, iter) === -1) {\n break;\n }\n count++;\n }\n } catch (failed) {\n err = {\n e: failed\n };\n if (iter.throw) {\n iterResult = NULL_VALUE;\n iter.throw(err);\n }\n } finally {\n try {\n if (iterResult && !iterResult.done) {\n iter.return && iter.return(iterResult);\n }\n } finally {\n if (err) {\n // eslint-disable-next-line no-unsafe-finally\n throw err.e;\n }\n }\n }\n }\n }\n}\nfunction fnApply(fn, thisArg, argArray) {\n return fn.apply(thisArg, argArray);\n}\nfunction fnCall(fn, thisArg) {\n return fn.apply(thisArg, ArrSlice[CALL](arguments, 2));\n}\nfunction fnBind(fn, thisArg) {\n return fn.bind.apply(fn, ArrSlice[CALL](arguments, 1));\n}\nfunction arrAppend(target, elms) {\n if (!isUndefined(elms) && target) {\n if (isArray(elms)) {\n fnApply(target.push, target, elms);\n } else if (isIterator(elms) || isIterable(elms)) {\n iterForOf(elms, function (elm) {\n target.push(elm);\n });\n } else {\n target.push(elms);\n }\n }\n return target;\n}\nvar arrEvery = /*#__PURE__*/_unwrapFunction(\"every\", ArrProto);\nvar arrFilter = /*#__PURE__*/_unwrapFunction(\"filter\", ArrProto);\nfunction arrForEach(theArray, callbackfn, thisArg) {\n if (theArray) {\n var len = theArray[LENGTH] >>> 0;\n for (var idx = 0; idx < len; idx++) {\n if (idx in theArray) {\n if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {\n break;\n }\n }\n }\n }\n}\nvar arrIndexOf = /*#__PURE__*/_unwrapFunction(\"indexOf\", ArrProto);\nvar arrLastIndexOf = /*#__PURE__*/_unwrapFunction(\"lastIndexOf\", ArrProto);\nvar arrMap = /*#__PURE__*/_unwrapFunction(\"map\", ArrProto);\nfunction arrSlice(theArray, start, end) {\n return ((theArray ? theArray[\"slice\"] : NULL_VALUE) || ArrSlice).apply(theArray, ArrSlice[CALL](arguments, 1));\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyIsArray(value) {\n if (isNullOrUndefined(value)) {\n return false;\n }\n return objToString(value) === \"[object Array]\";\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyArrIncludes(theArray, searchElement, fromIndex) {\n return arrIndexOf(theArray, searchElement, fromIndex) !== -1;\n}\nfunction polyArrFind(theArray, callbackFn, thisArg) {\n var result;\n var idx = polyArrFindIndex(theArray, callbackFn, thisArg);\n return idx !== -1 ? theArray[idx] : result;\n}\nfunction polyArrFindIndex(theArray, callbackFn, thisArg) {\n var result = -1;\n arrForEach(theArray, function (value, index) {\n if (callbackFn[CALL](thisArg | theArray, value, index, theArray)) {\n result = index;\n return -1;\n }\n });\n return result;\n}\nfunction polyArrFindLast(theArray, callbackFn, thisArg) {\n var result;\n var idx = polyArrFindLastIndex(theArray, callbackFn, thisArg);\n return idx !== -1 ? theArray[idx] : result;\n}\nfunction polyArrFindLastIndex(theArray, callbackFn, thisArg) {\n var result = -1;\n var len = theArray[LENGTH] >>> 0;\n for (var idx = len - 1; idx >= 0; idx--) {\n if (idx in theArray && callbackFn[CALL](thisArg | theArray, theArray[idx], idx, theArray)) {\n result = idx;\n break;\n }\n }\n return result;\n}\nfunction polyArrFrom(theValue, mapFn, thisArg) {\n if (isArray(theValue)) {\n var result_1 = arrSlice(theValue);\n return mapFn ? arrMap(result_1, mapFn, thisArg) : result_1;\n }\n var result = [];\n iterForOf(theValue, function (value, cnt) {\n return result.push(mapFn ? mapFn[CALL](thisArg, value, cnt) : value);\n });\n return result;\n}\nvar arrFind = /*#__PURE__*/_unwrapFunctionWithPoly(\"find\", ArrProto, polyArrFind);\nvar arrFindIndex = /*#__PURE__*/_unwrapFunctionWithPoly(\"findIndex\", ArrProto, polyArrFindIndex);\nvar arrFindLast = /*#__PURE__*/_unwrapFunctionWithPoly(\"findLast\", ArrProto, polyArrFindLast);\nvar arrFindLastIndex = /*#__PURE__*/_unwrapFunctionWithPoly(\"findLastIndex\", ArrProto, polyArrFindLastIndex);\nvar arrFrom = /* #__PURE__*/_pureAssign(/* #__PURE__*/_pureRef(ArrCls, \"from\"), polyArrFrom);\nvar arrIncludes = /*#__PURE__*/_unwrapFunctionWithPoly(\"includes\", ArrProto, polyArrIncludes);\nvar arrContains = arrIncludes;\nvar arrReduce = /*#__PURE__*/_unwrapFunction(\"reduce\", ArrProto);\nvar arrSome = /*#__PURE__*/_unwrapFunction(\"some\", ArrProto);\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction createFnDeferredProxy(hostFn, funcName) {\n return function () {\n var theArgs = ArrSlice[CALL](arguments);\n var theHost = hostFn();\n return fnApply(theHost[funcName], theHost, theArgs);\n };\n}\nfunction createProxyFuncs(target, host, funcDefs) {\n if (target && host && isArray(funcDefs)) {\n var isDeferred_1 = isFunction(host);\n arrForEach(funcDefs, function (funcDef) {\n var targetName = funcDef.as || funcDef.n;\n if (funcDef.rp === false && target[targetName]) {\n return;\n }\n target[targetName] = isDeferred_1 ? createFnDeferredProxy(host, funcDef.n) : fnBind(host[funcDef.n], host);\n });\n }\n return target;\n}\nvar _iterSymbol;\n/*#__NO_SIDE_EFFECTS__*/\nfunction readArgs(theArgs, start, end) {\n if (!objHasOwn(theArgs, LENGTH)) {\n !_iterSymbol && (_iterSymbol = createCachedValue(hasSymbol() && getKnownSymbol(3)));\n var iterFn = void 0;\n if (_iterSymbol.v) {\n iterFn = theArgs[_iterSymbol.v];\n }\n if (iterFn) {\n var values_1 = [];\n var from_1 = start === UNDEF_VALUE || start < 0 ? 0 : start;\n var to_1 = end < 0 || start < 0 ? UNDEF_VALUE : end;\n iterForOf(iterFn[CALL](theArgs), function (value, cnt) {\n if (to_1 !== UNDEF_VALUE && cnt >= to_1) {\n return -1;\n }\n if (cnt >= from_1) {\n values_1.push(value);\n }\n });\n if ((start === UNDEF_VALUE || start >= 0) && (end === UNDEF_VALUE || end >= 0)) {\n return values_1;\n }\n theArgs = values_1;\n }\n }\n return arrSlice(theArgs, start, end);\n}\nvar objCreate = /* #__PURE__*/_pureAssign(/* #__PURE__*/_pureRef(ObjClass, \"create\"), polyObjCreate);\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyObjCreate(obj) {\n if (!obj) {\n return {};\n }\n var type = typeof obj;\n if (type !== OBJECT && type !== FUNCTION) {\n throwTypeError(\"Prototype must be an Object or function: \" + dumpObj(obj));\n }\n function tempFunc() {}\n tempFunc[PROTOTYPE] = obj;\n return new tempFunc();\n}\nvar _isProtoArray;\nfunction objSetPrototypeOf(obj, proto) {\n var fn = ObjClass[\"setPrototypeOf\"] || function (d, b) {\n var _a;\n !_isProtoArray && (_isProtoArray = createCachedValue((_a = {}, _a[__PROTO__] = [], _a) instanceof Array));\n _isProtoArray.v ? d[__PROTO__] = b : objForEachKey(b, function (key, value) {\n return d[key] = value;\n });\n };\n return fn(obj, proto);\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createCustomError(name, d, b) {\n safe(objDefine, [d, NAME, {\n v: name,\n c: true,\n e: false\n }]);\n d = objSetPrototypeOf(d, b);\n function __() {\n this[CONSTRUCTOR] = d;\n safe(objDefine, [this, NAME, {\n v: name,\n c: true,\n e: false\n }]);\n }\n d[PROTOTYPE] = b === NULL_VALUE ? objCreate(b) : (__[PROTOTYPE] = b[PROTOTYPE], new __());\n return d;\n}\nfunction _setName(baseClass, name) {\n name && (baseClass[NAME] = name);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction createCustomError(name, constructCb, errorBase) {\n var theBaseClass = errorBase || Error;\n var orgName = theBaseClass[PROTOTYPE][NAME];\n var captureFn = Error.captureStackTrace;\n return _createCustomError(name, function () {\n var _this = this;\n var theArgs = arguments;\n try {\n safe(_setName, [theBaseClass, name]);\n var _self = fnApply(theBaseClass, _this, ArrSlice[CALL](theArgs)) || _this;\n if (_self !== _this) {\n var orgProto = objGetPrototypeOf(_this);\n if (orgProto !== objGetPrototypeOf(_self)) {\n objSetPrototypeOf(_self, orgProto);\n }\n }\n captureFn && captureFn(_self, _this[CONSTRUCTOR]);\n constructCb && constructCb(_self, theArgs);\n return _self;\n } finally {\n safe(_setName, [theBaseClass, orgName]);\n }\n }, theBaseClass);\n}\nvar _unsupportedError;\nfunction throwUnsupported(message) {\n if (!_unsupportedError) {\n _unsupportedError = createCustomError(\"UnsupportedError\");\n }\n throw new _unsupportedError(message);\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction utcNow() {\n return (Date.now || polyUtcNow)();\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyUtcNow() {\n return new Date().getTime();\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createTrimFn(exp) {\n return function _doTrim(value) {\n if (isNullOrUndefined(value)) {\n throwTypeError(\"strTrim called [\" + dumpObj(value) + \"]\");\n }\n if (value && value.replace) {\n value = value.replace(exp, EMPTY);\n }\n return value;\n };\n}\nvar polyStrTrim = /*#__PURE__*/_createTrimFn(/^\\s+|(?=\\s)\\s+$/g);\nvar polyStrTrimStart = /*#__PURE__*/_createTrimFn(/^\\s+/g);\nvar polyStrTrimEnd = /*#__PURE__*/_createTrimFn(/(?=\\s)\\s+$/g);\nvar strTrim = /*#__PURE__*/_unwrapFunctionWithPoly(\"trim\", StrProto, polyStrTrim);\nvar strTrimStart = /*#__PURE__*/_unwrapFunctionWithPoly(\"trimStart\", StrProto, polyStrTrimStart);\nvar strTrimLeft = /*#__PURE__*/_pureAssign(strTrimStart);\nvar strTrimEnd = /*#__PURE__*/_unwrapFunctionWithPoly(\"trimEnd\", StrProto, polyStrTrimEnd);\nvar strTrimRight = /*#__PURE__*/_pureAssign(strTrimEnd);\nvar strUpper = /*#__PURE__*/_unwrapFunction(\"toUpperCase\", StrProto);\nvar strLower = /*#__PURE__*/_unwrapFunction(\"toLowerCase\", StrProto);\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction _convertCase(value, newPrefix, upperWord) {\n return strTrim(asString(value)).replace(/((_|\\W)+(\\w){0,1}|([a-z])([A-Z]))/g, function (_match, _g1, _g2, wordStart, upperPrefix, upperLetter) {\n var convertMatch = wordStart || upperLetter || EMPTY;\n if (upperWord) {\n convertMatch = strUpper(convertMatch);\n }\n return (upperPrefix || EMPTY) + newPrefix + convertMatch;\n });\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction strLetterCase(value) {\n return asString(value).replace(/(_|\\b)\\w/g, strUpper);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction strCamelCase(value, upperFirst) {\n var result = _convertCase(value, \"\", true);\n return result.replace(/^\\w/, upperFirst ? strUpper : strLower);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction strKebabCase(value, scream) {\n var result = _convertCase(value, \"-\");\n return (scream ? strUpper : strLower)(result);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction strSnakeCase(value, scream) {\n var result = _convertCase(value, \"_\");\n return (scream ? strUpper : strLower)(result);\n}\nvar mathFloor = /*#__PURE__*/_pureRef(MathCls, \"floor\");\nvar mathCeil = /*#__PURE__*/_pureRef(MathCls, \"ceil\");\nvar mathTrunc = /* #__PURE__*/_pureAssign(/* #__PURE__*/_pureRef(MathCls, \"trunc\"), polyMathTrunc);\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyMathTrunc(value) {\n var theValue = +value;\n return (theValue > 0 ? mathFloor : mathCeil)(theValue);\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction mathToInt(value, throwInfinity) {\n var result = +value;\n if (result == Infinity && throwInfinity) {\n throwRangeError(\"invalid value [\" + dumpObj(value) + \"]\");\n }\n return result !== result || result === 0 ? 0 : mathTrunc(result);\n}\nvar strRepeat = /*#__PURE__*/_unwrapFunctionWithPoly(\"repeat\", StrProto, polyStrRepeat);\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyStrRepeat(value, count) {\n if (isNullOrUndefined(value)) {\n throwTypeError(\"can't convert [\" + dumpObj(value) + \"]\");\n }\n count = mathToInt(count, true);\n if (count < 0) {\n throwRangeError(\"invalid count must be >= 0 && < Infinity\");\n }\n var pad = isString(value) ? value : asString(value);\n var result = EMPTY;\n for (; count > 0; (count >>>= 1) && (pad += pad)) {\n if (count & 1) {\n result += pad;\n }\n }\n return result;\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction _padValue(value, targetLength, padString) {\n var result = EMPTY;\n targetLength = mathToInt(targetLength, true);\n targetLength >>= 0;\n var len = value[LENGTH];\n if (len < targetLength) {\n result = isNullOrUndefined(padString) ? \" \" : asString(padString);\n targetLength = targetLength - len;\n if (targetLength > result[LENGTH]) {\n result = strRepeat(result, mathCeil(targetLength / result[LENGTH]));\n }\n if (result[LENGTH] > targetLength) {\n result = strSubstring(result, 0, targetLength);\n }\n }\n return result;\n}\nvar strPadStart = /*#__PURE__*/_unwrapFunctionWithPoly(\"padStart\", StrProto, polyStrPadStart);\nvar strPadEnd = /*#__PURE__*/_unwrapFunctionWithPoly(\"padEnd\", StrProto, polyStrPadEnd);\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyStrPadStart(value, targetLength, padString) {\n return _padValue(value, targetLength, padString) + value;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyStrPadEnd(value, targetLength, padString) {\n return value + _padValue(value, targetLength, padString);\n}\nvar DBL_QUOTE = \"\\\"\";\nvar INVALID_JS_NAME = /([^\\w\\d_$])/g;\nvar _htmlEntityCache;\n/*#__NO_SIDE_EFFECTS__*/\nfunction normalizeJsName(jsName, camelCase) {\n var result = asString(jsName).replace(INVALID_JS_NAME, \"_\");\n return !isUndefined(camelCase) ? strCamelCase(result, !camelCase) : result;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction encodeAsJson(value, format) {\n var result;\n if (isString(value)) {\n result = DBL_QUOTE + value.replace(/[^\\w .,\\-!@#$%\\^&*\\(\\)_+={}\\[\\]:;|<>?]/g, function (match) {\n if (match === DBL_QUOTE || match === \"\\\\\") {\n return \"\\\\\" + match;\n }\n var hex = match.charCodeAt(0)[TO_STRING](16);\n return \"\\\\u\" + strPadStart(strUpper(hex), 4, \"0\");\n }) + DBL_QUOTE;\n } else {\n try {\n result = JSON.stringify(value, NULL_VALUE, format ? isNumber(format) ? format : 4 : UNDEF_VALUE);\n } catch (e) {\n result = DBL_QUOTE + dumpObj(e) + DBL_QUOTE;\n }\n }\n return result;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction encodeAsHtml(value) {\n !_htmlEntityCache && (_htmlEntityCache = {\n \"&\": \"amp\",\n \"<\": \"lt\",\n \">\": \"gt\",\n \"\\\"\": \"quot\",\n \"'\": \"#39\"\n });\n return asString(value).replace(/[&<>\"']/g, function (match) {\n return \"&\" + _htmlEntityCache[match] + \";\";\n });\n}\nvar _fnToString;\nvar _objCtrFnString;\nvar _gblWindow;\n/*#__NO_SIDE_EFFECTS__*/\nfunction isPlainObject(value) {\n if (!value || typeof value !== OBJECT) {\n return false;\n }\n if (!_gblWindow) {\n _gblWindow = hasWindow() ? getWindow() : true;\n }\n var result = false;\n if (value !== _gblWindow) {\n if (!_objCtrFnString) {\n _fnToString = Function[PROTOTYPE][TO_STRING];\n _objCtrFnString = _fnToString[CALL](ObjClass);\n }\n try {\n var proto = objGetPrototypeOf(value);\n result = !proto;\n if (!result) {\n if (objHasOwnProperty(proto, CONSTRUCTOR)) {\n proto = proto[CONSTRUCTOR];\n }\n result = !!(proto && typeof proto === FUNCTION && _fnToString[CALL](proto) === _objCtrFnString);\n }\n } catch (ex) {}\n }\n return result;\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction _defaultDeepCopyHandler(details) {\n details.value && plainObjDeepCopyHandler(details);\n return true;\n}\nvar defaultDeepCopyHandlers = [arrayDeepCopyHandler, plainObjDeepCopyHandler, functionDeepCopyHandler, dateDeepCopyHandler];\n/*#__NO_SIDE_EFFECTS__*/\nfunction _getSetVisited(visitMap, source, newPath, cb) {\n var theEntry;\n arrForEach(visitMap, function (entry) {\n if (entry.k === source) {\n theEntry = entry;\n return -1;\n }\n });\n if (!theEntry) {\n theEntry = {\n k: source,\n v: source\n };\n visitMap.push(theEntry);\n cb(theEntry);\n }\n return theEntry.v;\n}\nfunction _deepCopy(visitMap, value, ctx, key) {\n var userHandler = ctx.handler;\n var newPath = ctx.path ? key ? ctx.path.concat(key) : ctx.path : [];\n var newCtx = {\n handler: ctx.handler,\n src: ctx.src,\n path: newPath\n };\n var theType = typeof value;\n var isPlain = false;\n var isPrim = value === NULL_VALUE;\n if (!isPrim) {\n if (value && theType === OBJECT) {\n isPlain = isPlainObject(value);\n } else {\n isPrim = isPrimitiveType(theType);\n }\n }\n var details = {\n type: theType,\n isPrim: isPrim,\n isPlain: isPlain,\n value: value,\n result: value,\n path: newPath,\n origin: ctx.src,\n copy: function (source, newKey) {\n return _deepCopy(visitMap, source, newKey ? newCtx : ctx, newKey);\n },\n copyTo: function (target, source) {\n return _copyProps(visitMap, target, source, newCtx);\n }\n };\n if (!details.isPrim) {\n return _getSetVisited(visitMap, value, newPath, function (newEntry) {\n objDefine(details, \"result\", {\n g: function () {\n return newEntry.v;\n },\n s: function (newValue) {\n newEntry.v = newValue;\n }\n });\n var idx = 0;\n var handler = userHandler;\n while (!(handler || (idx < defaultDeepCopyHandlers.length ? defaultDeepCopyHandlers[idx++] : _defaultDeepCopyHandler))[CALL](ctx, details)) {\n handler = NULL_VALUE;\n }\n });\n }\n if (userHandler && userHandler[CALL](ctx, details)) {\n return details.result;\n }\n return value;\n}\nfunction _copyProps(visitMap, target, source, ctx) {\n if (!isNullOrUndefined(source)) {\n for (var key in source) {\n target[key] = _deepCopy(visitMap, source[key], ctx, key);\n }\n }\n return target;\n}\nfunction objCopyProps(target, source, handler) {\n var ctx = {\n handler: handler,\n src: source,\n path: []\n };\n return _copyProps([], target, source, ctx);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction objDeepCopy(source, handler) {\n var ctx = {\n handler: handler,\n src: source\n };\n return _deepCopy([], source, ctx);\n}\nfunction arrayDeepCopyHandler(details) {\n var value = details.value;\n if (isArray(value)) {\n var target = details.result = [];\n target.length = value.length;\n details.copyTo(target, value);\n return true;\n }\n return false;\n}\nfunction dateDeepCopyHandler(details) {\n var value = details.value;\n if (isDate(value)) {\n details.result = new Date(value.getTime());\n return true;\n }\n return false;\n}\nfunction functionDeepCopyHandler(details) {\n if (details.type === FUNCTION) {\n return true;\n }\n return false;\n}\nfunction plainObjDeepCopyHandler(details) {\n var value = details.value;\n if (value && details.isPlain) {\n var target = details.result = {};\n details.copyTo(target, value);\n return true;\n }\n return false;\n}\nfunction _doExtend(target, theArgs) {\n arrForEach(theArgs, function (theArg) {\n objCopyProps(target, theArg);\n });\n return target;\n}\nfunction deepExtend(target, obj1, obj2, obj3, obj4, obj5, obj6) {\n return _doExtend(objDeepCopy(target) || {}, ArrSlice[CALL](arguments));\n}\nfunction objExtend(target, obj1, obj2, obj3, obj4, obj5, obj6) {\n return _doExtend(target || {}, ArrSlice[CALL](arguments));\n}\nvar getLength = /*#__PURE__*/_unwrapProp(LENGTH);\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction getIntValue(value, defValue) {\n if (!isNullOrUndefined(value)) {\n if (isNumber(value)) {\n return value;\n }\n var theValue = parseInt(value, 10);\n return isNaN(theValue) ? defValue : theValue;\n }\n return defValue;\n}\nvar _perf;\n/*#__NO_SIDE_EFFECTS__*/\nfunction hasPerformance() {\n return !!getPerformance();\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction getPerformance() {\n !_globalLazyTestHooks && _initTestHooks();\n if (!_perf || _globalLazyTestHooks.lzy) {\n _perf = createCachedValue(safe(getInst, [\"performance\"]).v);\n }\n return _perf.v;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction perfNow() {\n var perf = getPerformance();\n if (perf && perf.now) {\n return perf.now();\n }\n return utcNow();\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction elapsedTime(startTime) {\n return perfNow() - startTime;\n}\nvar MATCH_ANY = \"(.*)\";\nvar MATCH_SINGLE = \"(.)\";\nfunction _createRegExp(value, escapeRgx, replaceFn, ignoreCase, fullMatch) {\n // eslint-disable-next-line security/detect-non-literal-regexp\n return new RegExp((fullMatch ? \"^\" : EMPTY) + replaceFn(value.replace(escapeRgx, \"\\\\$1\")) + (fullMatch ? \"$\" : EMPTY), ignoreCase ? \"i\" : \"\");\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction createWildcardRegex(value, ignoreCase, fullMatch) {\n return _createRegExp(asString(value), /([-+|^$#.\\?{}()\\[\\]\\\\/\\\"\\'])/g, function (value) {\n return value.replace(/\\*/g, MATCH_ANY);\n }, !!ignoreCase, fullMatch);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction createFilenameRegex(value, ignoreCase, fullMatch) {\n return _createRegExp(asString(value), /([-+|^$#.{}()\\\\\\/\\[\\]\\\"\\'])/g, function (value) {\n return value.replace(/(\\\\\\\\|\\\\\\/|\\*|\\?)/g, function (_all, g1) {\n if (g1 == \"\\\\/\" || g1 == \"\\\\\\\\\") {\n return \"[\\\\\\\\\\\\/]{1}\";\n }\n return g1 == \"*\" ? MATCH_ANY : MATCH_SINGLE;\n });\n }, !!ignoreCase, fullMatch);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction makeGlobRegex(value, ignoreCase, fullMatch) {\n return _createRegExp(asString(value), /([-+|^$#.{}()\\\\\\/\\[\\]\\\"\\'])/g, function (value) {\n return value.replace(/(\\*\\*\\\\[\\\\\\/]|\\\\\\\\|\\\\\\/|\\*\\*|\\*|\\?)/g, function (_all, g1) {\n if (g1 == \"**\\\\/\" || g1 == \"**\\\\\\\\\") {\n return \"(.*[\\\\\\\\\\\\/])*\";\n }\n if (g1 === \"\\\\/\" || g1 == \"\\\\\\\\\") {\n return \"[\\\\\\\\\\\\/]{1}\";\n }\n if (g1 === \"**\") {\n return MATCH_ANY;\n }\n return g1 === \"*\" ? \"([^\\\\\\\\\\\\/]*)\" : \"([^\\\\\\\\\\\\/]{1})\";\n });\n }, !!ignoreCase, fullMatch);\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction safeGetLazy(cb, defValue) {\n return getLazy(function () {\n var result = safe(cb);\n return result.e ? defValue : result.v;\n });\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction _checkLength(value, props) {\n var result;\n arrForEach(props, function (prop) {\n if (prop in value) {\n var propValue = value[prop];\n result = (isFunction(propValue) ? propValue() : propValue) > 0;\n return -1;\n }\n });\n return result;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _hasValue(value, depth) {\n var result = value === false || value === 0;\n if (!result && !isNullOrUndefined(value)) {\n if (isArray(value)) {\n result = value[LENGTH] > 0;\n } else if (isDate(value)) {\n result = !isNaN(value.getTime());\n } else if (isBoolean(value)) {\n return true;\n } else if (isObject(value)) {\n try {\n var chkValue = _checkLength(value, [LENGTH, \"byteLength\", \"size\", \"count\"]);\n if (isBoolean(chkValue)) {\n return chkValue;\n }\n if (isFunction(value.valueOf) && depth < 5) {\n return _hasValue(value.valueOf(), ++depth);\n }\n } catch (e) {}\n return !!objKeys(value)[LENGTH];\n } else {\n result = isTruthy(value);\n }\n }\n return result;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction hasValue(value) {\n return _hasValue(value, 0);\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction createIterable(ctx) {\n return makeIterable({}, ctx);\n}\nfunction makeIterable(target, ctx) {\n var itSymbol = getKnownSymbol(3);\n function _createIterator() {\n return createIterator(ctx);\n }\n target[itSymbol] = _createIterator;\n return target;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction createIterator(ctx) {\n var isDone = false;\n function _value() {\n return ctx.v;\n }\n function _next() {\n if (!isDone) {\n isDone = ctx.n ? ctx.n(arguments) : true;\n }\n var result = {\n done: isDone\n };\n if (!isDone) {\n objDefine(result, \"value\", {\n g: _value\n });\n }\n return result;\n }\n function _return(value) {\n isDone = true;\n return {\n done: true,\n value: ctx.r && ctx.r(value)\n };\n }\n function _throw(e) {\n isDone = true;\n return {\n done: true,\n value: ctx.t && ctx.t(e)\n };\n }\n var theIterator = {\n next: _next\n };\n if (ctx.r) {\n theIterator.return = _return;\n }\n if (ctx.t) {\n theIterator.throw = _throw;\n }\n return theIterator;\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction createArrayIterator(values) {\n var idx = -1;\n var theValues = values ? values.slice() : [];\n var len = theValues[LENGTH];\n function _value() {\n if (idx >= 0 && idx < len) {\n return theValues[idx];\n }\n }\n function _getNext() {\n idx++;\n return idx >= len;\n }\n var ctx = {\n n: _getNext\n };\n objDefine(ctx, \"v\", {\n g: _value\n });\n return createIterator(ctx);\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction createRangeIterator(start, end, step) {\n var nextValue = start;\n var theValue = UNDEF_VALUE;\n if (isNullOrUndefined(end)) {\n end = start;\n }\n var theStep = step;\n if (!theStep) {\n theStep = start <= end ? 1 : -1;\n }\n function _value() {\n return theValue;\n }\n function _getNext() {\n var isDone = theStep > 0 ? nextValue > end : nextValue < end;\n if (!isDone) {\n theValue = nextValue;\n nextValue += theStep;\n }\n return isDone;\n }\n return createIterator(objDefine({\n n: _getNext\n }, \"v\", {\n g: _value\n }));\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyStrSymSplit(value, splitter, limit) {\n var splitFn = splitter ? splitter[getKnownSymbol(9)] : UNDEF_VALUE;\n return splitFn ? splitFn(value, limit) : [value];\n}\nvar strSplit = /*#__PURE__*/_unwrapFunction(\"split\", StrProto);\nvar strSymSplit = /*#__PURE__*/_unwrapFunctionWithPoly(\"split\", StrProto, !hasSymbol() ? polyStrSymSplit : NULL_VALUE);\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction getValueByKey(target, path, defValue) {\n if (!path || !target) {\n return defValue;\n }\n var parts = strSplit(path, \".\");\n var cnt = parts.length;\n for (var lp = 0; lp < cnt && !isNullOrUndefined(target); lp++) {\n target = target[parts[lp]];\n }\n return !isNullOrUndefined(target) ? target : defValue;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction getValueByIter(target, iter, defValue) {\n if (!iter || !target) {\n return defValue;\n }\n iterForOf(iter, function (value) {\n if (isNullOrUndefined(target)) {\n return -1;\n }\n target = target[value];\n });\n return !isNullOrUndefined(target) ? target : defValue;\n}\nfunction setValueByKey(target, path, value) {\n if (target && path) {\n var parts = strSplit(path, \".\");\n var lastKey = parts.pop();\n arrForEach(parts, function (key) {\n if (isNullOrUndefined(target[key])) {\n target[key] = {};\n }\n target = target[key];\n });\n target[lastKey] = value;\n }\n}\nfunction setValueByIter(target, iter, value) {\n if (target && iter) {\n var lastKey_1;\n iterForOf(iter, function (key) {\n if (lastKey_1) {\n if (isNullOrUndefined(target[lastKey_1])) {\n target[lastKey_1] = {};\n }\n target = target[lastKey_1];\n }\n lastKey_1 = key;\n });\n target[lastKey_1] = value;\n }\n}\nvar strEndsWith = /*#__PURE__*/_unwrapFunctionWithPoly(\"endsWith\", StrProto, polyStrEndsWith);\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyStrEndsWith(value, searchString, length) {\n if (!isString(value)) {\n throwTypeError(\"'\" + dumpObj(value) + \"' is not a string\");\n }\n var searchValue = isString(searchString) ? searchString : asString(searchString);\n var end = !isUndefined(length) && length < value[LENGTH] ? length : value[LENGTH];\n return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;\n}\nvar strIndexOf = /*#__PURE__*/_unwrapFunction(\"indexOf\", StrProto);\nvar strLastIndexOf = /*#__PURE__*/_unwrapFunction(\"lastIndexOf\", StrProto);\nvar strIncludes = /*#__PURE__*/_unwrapFunctionWithPoly(\"includes\", StrProto, polyStrIncludes);\nvar strContains = /*#__PURE__*/_pureAssign(strIncludes);\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyStrIncludes(value, searchString, position) {\n if (isRegExp(searchString)) {\n throwTypeError(\"'searchString' must not be a regular expression\" + dumpObj(searchString));\n }\n return strIndexOf(value, asString(searchString), position) !== -1;\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction strIsNullOrWhiteSpace(value) {\n if (isString(value)) {\n return value.replace(/[\\s\\t\\r\\n\\f]+/g, EMPTY) === EMPTY;\n }\n return isNullOrUndefined(value);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction strIsNullOrEmpty(value) {\n if (isString(value)) {\n return value === EMPTY;\n }\n return isNullOrUndefined(value);\n}\nvar strStartsWith = /*#__PURE__*/_unwrapFunctionWithPoly(\"startsWith\", StrProto, polyStrStartsWith);\n/*#__NO_SIDE_EFFECTS__*/\nfunction polyStrStartsWith(value, searchString, position) {\n if (!isString(value)) {\n throwTypeError(\"'\" + dumpObj(value) + \"' is not a string\");\n }\n var searchValue = isString(searchString) ? searchString : asString(searchString);\n var pos = position > 0 ? position : 0;\n return strSubstring(value, pos, pos + searchValue[LENGTH]) === searchValue;\n}\nvar REF = \"ref\";\nvar UNREF = \"unref\";\nvar HAS_REF = \"hasRef\";\nvar ENABLED = \"enabled\";\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createTimerHandler(startTimer, refreshFn, cancelFn) {\n var ref = true;\n var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;\n var theTimerHandler;\n function _unref() {\n ref = false;\n timerId && timerId[UNREF] && timerId[UNREF]();\n return theTimerHandler;\n }\n function _cancel() {\n timerId && cancelFn(timerId);\n timerId = NULL_VALUE;\n }\n function _refresh() {\n timerId = refreshFn(timerId);\n if (!ref) {\n _unref();\n }\n return theTimerHandler;\n }\n function _setEnabled(value) {\n !value && timerId && _cancel();\n value && !timerId && _refresh();\n }\n theTimerHandler = {\n cancel: _cancel,\n refresh: _refresh\n };\n theTimerHandler[HAS_REF] = function () {\n if (timerId && timerId[HAS_REF]) {\n return timerId[HAS_REF]();\n }\n return ref;\n };\n theTimerHandler[REF] = function () {\n ref = true;\n timerId && timerId[REF] && timerId[REF]();\n return theTimerHandler;\n };\n theTimerHandler[UNREF] = _unref;\n theTimerHandler = objDefineProp(theTimerHandler, ENABLED, {\n get: function () {\n return !!timerId;\n },\n set: _setEnabled\n });\n return {\n h: theTimerHandler,\n dn: function () {\n timerId = NULL_VALUE;\n }\n };\n}\nfunction _createTimeoutWith(startTimer, overrideFn, theArgs) {\n var isArr = isArray(overrideFn);\n var len = isArr ? overrideFn.length : 0;\n var setFn = (len > 0 ? overrideFn[0] : !isArr ? overrideFn : UNDEF_VALUE) || setTimeout;\n var clearFn = (len > 1 ? overrideFn[1] : UNDEF_VALUE) || clearTimeout;\n var timerFn = theArgs[0];\n theArgs[0] = function () {\n handler.dn();\n fnApply(timerFn, UNDEF_VALUE, ArrSlice[CALL](arguments));\n };\n var handler = _createTimerHandler(startTimer, function (timerId) {\n if (timerId) {\n if (timerId.refresh) {\n timerId.refresh();\n return timerId;\n }\n fnApply(clearFn, UNDEF_VALUE, [timerId]);\n }\n return fnApply(setFn, UNDEF_VALUE, theArgs);\n }, function (timerId) {\n fnApply(clearFn, UNDEF_VALUE, [timerId]);\n });\n return handler.h;\n}\nfunction scheduleTimeout(callback, timeout) {\n return _createTimeoutWith(true, UNDEF_VALUE, ArrSlice[CALL](arguments));\n}\nfunction scheduleTimeoutWith(overrideFn, callback, timeout) {\n return _createTimeoutWith(true, overrideFn, ArrSlice[CALL](arguments, 1));\n}\nfunction createTimeout(callback, timeout) {\n return _createTimeoutWith(false, UNDEF_VALUE, ArrSlice[CALL](arguments));\n}\nfunction createTimeoutWith(overrideFn, callback, timeout) {\n return _createTimeoutWith(false, overrideFn, ArrSlice[CALL](arguments, 1));\n}\nvar _defaultIdleTimeout = 100;\nvar _maxExecutionTime = 50;\n/*#__NO_SIDE_EFFECTS__*/\nfunction hasIdleCallback() {\n return !!(/*#__PURE__*/getIdleCallback());\n}\nvar getIdleCallback = /*#__PURE__*/_getGlobalInstFn(getInst, [\"requestIdleCallback\"]);\nvar getCancelIdleCallback = /*#__PURE__*/_getGlobalInstFn(getInst, [\"cancelIdleCallback\"]);\nfunction setDefaultIdleTimeout(timeout) {\n _defaultIdleTimeout = timeout;\n}\nfunction setDefaultMaxExecutionTime(maxTime) {\n _maxExecutionTime = maxTime;\n}\nfunction scheduleIdleCallback(callback, options) {\n function _createDeadline(timedOut) {\n var startTime = perfNow();\n return {\n didTimeout: timedOut,\n timeRemaining: function () {\n return _maxExecutionTime - elapsedTime(startTime);\n }\n };\n }\n if (hasIdleCallback()) {\n var handler_1 = _createTimerHandler(true, function (idleId) {\n idleId && getCancelIdleCallback()(idleId);\n return getIdleCallback()(function (deadline) {\n handler_1.dn();\n callback(deadline || _createDeadline(false));\n }, options);\n }, function (idleId) {\n getCancelIdleCallback()(idleId);\n });\n return handler_1.h;\n }\n var timeout = (options || {}).timeout;\n if (isUndefined(timeout)) {\n timeout = _defaultIdleTimeout;\n }\n return scheduleTimeout(function () {\n callback(_createDeadline(true));\n }, timeout);\n}\nfunction scheduleInterval(callback, timeout) {\n var theArguments = ArrSlice[CALL](arguments);\n var handler = _createTimerHandler(true, function (intervalId) {\n intervalId && clearInterval(intervalId);\n return fnApply(setInterval, UNDEF_VALUE, theArguments);\n }, function (intervalId) {\n fnApply(clearInterval, UNDEF_VALUE, [intervalId]);\n });\n return handler.h;\n}\nexport { arrAppend, arrContains, arrEvery, arrFilter, arrFind, arrFindIndex, arrFindLast, arrFindLastIndex, arrForEach, arrFrom, arrIncludes, arrIndexOf, arrLastIndexOf, arrMap, arrReduce, arrSlice, arrSome, arrayDeepCopyHandler, asString, createArrayIterator, createCachedValue, createCustomError, createDeferredCachedValue, createEnum, createEnumKeyMap, createEnumValueMap, createFilenameRegex, createFnDeferredProxy, createIterable, createIterator, createProxyFuncs, createRangeIterator, createSimpleMap, createTimeout, createTimeoutWith, createTypeMap, createWildcardRegex, dateDeepCopyHandler, deepExtend, dumpObj, elapsedTime, encodeAsHtml, encodeAsJson, fnApply, fnBind, fnCall, functionDeepCopyHandler, getCancelIdleCallback, getDocument, getGlobal, getHistory, getIdleCallback, getInst, getIntValue, getKnownSymbol, getLazy, getLength, getNavigator, getPerformance, getSymbol, getValueByIter, getValueByKey, getWindow, hasDocument, hasHistory, hasIdleCallback, hasNavigator, hasPerformance, hasSymbol, hasValue, hasWindow, isArray, isArrayBuffer, isBlob, isBoolean, isDate, isDefined, isError, isFile, isFormData, isFunction, isIterable, isIterator, isNode, isNotTruthy, isNullOrUndefined, isNumber, isObject, isPlainObject, isPrimitive, isPrimitiveType, isPromise, isPromiseLike, isRegExp, isStrictNullOrUndefined, isStrictUndefined, isString, isSymbol, isThenable, isTruthy, isTypeof, isUndefined, isWebWorker, iterForOf, lazySafeGetInst, makeGlobRegex, makeIterable, mathCeil, mathFloor, mathMax, mathMin, mathToInt, mathTrunc, newSymbol, normalizeJsName, objAssign, objCopyProps, objCreate, objDeepCopy, objDeepFreeze, objDefine, objDefineAccessors, objDefineGet, objDefineProp, objDefineProperties, objDefineProps, objEntries, objExtend, objForEachKey, objFreeze, objGetOwnPropertyDescriptor, objGetPrototypeOf, objHasOwn, objHasOwnProperty, objKeys, objSeal, objSetPrototypeOf, objToString, perfNow, plainObjDeepCopyHandler, polyArrFind, polyArrFindIndex, polyArrFindLast, polyArrFindLastIndex, polyArrFrom, polyArrIncludes, polyGetKnownSymbol, polyIsArray, polyNewSymbol, polyObjEntries, polyObjHasOwn, polyObjKeys, polyStrIncludes, polyStrSubstr, polyStrSymSplit, polyStrTrim, polyStrTrimEnd, polyStrTrimStart, polySymbolFor, polySymbolKeyFor, polyUtcNow, readArgs, safe, safeGet, safeGetLazy, scheduleIdleCallback, scheduleInterval, scheduleTimeout, scheduleTimeoutWith, setBypassLazyCache, setDefaultIdleTimeout, setDefaultMaxExecutionTime, setValueByIter, setValueByKey, strCamelCase, strContains, strEndsWith, strIncludes, strIndexOf, strIsNullOrEmpty, strIsNullOrWhiteSpace, strKebabCase, strLastIndexOf, strLeft, strLetterCase, strLower, strPadEnd, strPadStart, strRepeat, strRight, strSlice, strSnakeCase, strSplit, strStartsWith, strSubstr, strSubstring, strSymSplit, strTrim, strTrimEnd, strTrimLeft, strTrimRight, strTrimStart, strUpper, symbolFor, symbolKeyFor, throwError, throwRangeError, throwTypeError, throwUnsupported, utcNow };\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar _a;\nimport { getGlobal, objCreate, objHasOwnProperty, throwTypeError } from \"@nevware21/ts-utils\";\n;\nvar UNDEFINED = \"undefined\";\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\nvar Constructor = 'constructor';\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\nvar Prototype = 'prototype';\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\nvar strFunction = 'function';\n/**\r\n * Used to define the name of the instance function lookup table\r\n * @ignore\r\n */\nvar DynInstFuncTable = '_dynInstFuncs';\n/**\r\n * Name used to tag the dynamic prototype function\r\n * @ignore\r\n */\nvar DynProxyTag = '_isDynProxy';\n/**\r\n * Name added to a prototype to define the dynamic prototype \"class\" name used to lookup the function table\r\n * @ignore\r\n */\nvar DynClassName = '_dynClass';\n/**\r\n * Prefix added to the classname to avoid any name clashes with other instance level properties\r\n * @ignore\r\n */\nvar DynClassNamePrefix = '_dynCls$';\n/**\r\n * A tag which is used to check if we have already to attempted to set the instance function if one is not present\r\n * @ignore\r\n */\nvar DynInstChkTag = '_dynInstChk';\n/**\r\n * A tag which is used to check if we are allows to try and set an instance function is one is not present. Using the same\r\n * tag name as the function level but a different const name for readability only.\r\n */\nvar DynAllowInstChkTag = DynInstChkTag;\n/**\r\n * The global (imported) instances where the global performance options are stored\r\n */\nvar DynProtoDefaultOptions = '_dfOpts';\n/**\r\n * Value used as the name of a class when it cannot be determined\r\n * @ignore\r\n */\nvar UnknownValue = '_unknown_';\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\nvar str__Proto = \"__proto__\";\n/**\r\n * The polyfill version of __proto__ so that it doesn't cause issues for anyone not expecting it to exist\r\n */\nvar DynProtoBaseProto = \"_dyn\" + str__Proto;\n/**\r\n * Runtime Global holder for dynamicProto settings\r\n */\nvar DynProtoGlobalSettings = \"__dynProto$Gbl\";\n/**\r\n * Track the current prototype for IE8 as you can't look back to get the prototype\r\n */\nvar DynProtoCurrent = \"_dynInstProto\";\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\nvar strUseBaseInst = 'useBaseInst';\n/**\r\n * Constant string defined to support minimization\r\n * @ignore\r\n */\nvar strSetInstFuncs = 'setInstFuncs';\nvar Obj = Object;\n/**\r\n * Pre-lookup to check if we are running on a modern browser (i.e. not IE8)\r\n * @ignore\r\n */\nvar _objGetPrototypeOf = Obj[\"getPrototypeOf\"];\n/**\r\n * Pre-lookup to check for the existence of this function\r\n */\nvar _objGetOwnProps = Obj[\"getOwnPropertyNames\"];\n// Since 1.1.7 moving these to the runtime global to work around mixed version and module issues\n// See Issue https://github.com/microsoft/DynamicProto-JS/issues/57 for details\nvar _gbl = getGlobal();\nvar _gblInst = _gbl[DynProtoGlobalSettings] || (_gbl[DynProtoGlobalSettings] = {\n o: (_a = {}, _a[strSetInstFuncs] = true, _a[strUseBaseInst] = true, _a),\n n: 1000 // Start new global index @ 1000 so we \"fix\" some cases when mixed with 1.1.6 or earlier\n});\n/**\r\n * Helper used to check whether the target is an Object prototype or Array prototype\r\n * @ignore\r\n */\nfunction _isObjectOrArrayPrototype(target) {\n return target && (target === Obj[Prototype] || target === Array[Prototype]);\n}\n/**\r\n * Helper used to check whether the target is an Object prototype, Array prototype or Function prototype\r\n * @ignore\r\n */\nfunction _isObjectArrayOrFunctionPrototype(target) {\n return _isObjectOrArrayPrototype(target) || target === Function[Prototype];\n}\n/**\r\n * Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.\r\n * @ignore\r\n */\nfunction _getObjProto(target) {\n var newProto;\n if (target) {\n // This method doesn't exist in older browsers (e.g. IE8)\n if (_objGetPrototypeOf) {\n return _objGetPrototypeOf(target);\n }\n var curProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);\n // Using the pre-calculated value as IE8 doesn't support looking up the prototype of a prototype and thus fails for more than 1 base class\n newProto = target[DynProtoBaseProto] || curProto;\n if (!objHasOwnProperty(target, DynProtoBaseProto)) {\n // As this prototype doesn't have this property then this is from an inherited class so newProto is the base to return so save it\n // so we can look it up value (which for a multiple hierarchy dynamicProto will be the base class)\n delete target[DynProtoCurrent]; // Delete any current value allocated to this instance so we pick up the value from prototype hierarchy\n newProto = target[DynProtoBaseProto] = target[DynProtoCurrent] || target[DynProtoBaseProto];\n target[DynProtoCurrent] = curProto;\n }\n }\n return newProto;\n}\n/**\r\n * Helper to get the properties of an object, including none enumerable ones as functions on a prototype in ES6\r\n * are not enumerable.\r\n * @param target\r\n */\nfunction _forEachProp(target, func) {\n var props = [];\n if (_objGetOwnProps) {\n props = _objGetOwnProps(target);\n } else {\n for (var name_1 in target) {\n if (typeof name_1 === \"string\" && objHasOwnProperty(target, name_1)) {\n props.push(name_1);\n }\n }\n }\n if (props && props.length > 0) {\n for (var lp = 0; lp < props.length; lp++) {\n func(props[lp]);\n }\n }\n}\n/**\r\n * Helper function to check whether the provided function name is a potential candidate for dynamic\r\n * callback and prototype generation.\r\n * @param target The target object, may be a prototype or class object\r\n * @param funcName The function name\r\n * @param skipOwn Skips the check for own property\r\n * @ignore\r\n */\nfunction _isDynamicCandidate(target, funcName, skipOwn) {\n return funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || objHasOwnProperty(target, funcName)) && funcName !== str__Proto && funcName !== Prototype;\n}\n/**\r\n * Helper to throw a TypeError exception\r\n * @param message the message\r\n * @ignore\r\n */\nfunction _throwTypeError(message) {\n throwTypeError(\"DynamicProto: \" + message);\n}\n/**\r\n * Returns a collection of the instance functions that are defined directly on the thisTarget object, it does\r\n * not return any inherited functions\r\n * @param thisTarget The object to get the instance functions from\r\n * @ignore\r\n */\nfunction _getInstanceFuncs(thisTarget) {\n // Get the base proto\n var instFuncs = objCreate(null);\n // Save any existing instance functions\n _forEachProp(thisTarget, function (name) {\n // Don't include any dynamic prototype instances - as we only want the real functions\n if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {\n // Create an instance callback for passing the base function to the caller\n instFuncs[name] = thisTarget[name];\n }\n });\n return instFuncs;\n}\n/**\r\n * Returns whether the value is included in the array\r\n * @param values The array of values\r\n * @param value The value\r\n */\nfunction _hasVisited(values, value) {\n for (var lp = values.length - 1; lp >= 0; lp--) {\n if (values[lp] === value) {\n return true;\n }\n }\n return false;\n}\n/**\r\n * Returns an object that contains callback functions for all \"base/super\" functions, this is used to \"save\"\r\n * enabling calling super.xxx() functions without requiring that the base \"class\" has defined a prototype references\r\n * @param target The current instance\r\n * @ignore\r\n */\nfunction _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {\n function _instFuncProxy(target, funcHost, funcName) {\n var theFunc = funcHost[funcName];\n if (theFunc[DynProxyTag] && useBaseInst) {\n // grab and reuse the hosted looking function (if available) otherwise the original passed function\n var instFuncTable = target[DynInstFuncTable] || {};\n if (instFuncTable[DynAllowInstChkTag] !== false) {\n theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;\n }\n }\n return function () {\n // eslint-disable-next-line prefer-rest-params\n return theFunc.apply(target, arguments);\n };\n }\n // Start creating a new baseFuncs by creating proxies for the instance functions (as they may get replaced)\n var baseFuncs = objCreate(null);\n _forEachProp(instFuncs, function (name) {\n // Create an instance callback for passing the base function to the caller\n baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);\n });\n // Get the base prototype functions\n var baseProto = _getObjProto(classProto);\n var visited = [];\n // Don't include base object functions for Object, Array or Function\n while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {\n // look for prototype functions\n _forEachProp(baseProto, function (name) {\n // Don't include any dynamic prototype instances - as we only want the real functions\n // For IE 7/8 the prototype lookup doesn't provide the full chain so we need to bypass the \n // hasOwnProperty check we get all of the methods, main difference is that IE7/8 doesn't return\n // the Object prototype methods while bypassing the check\n if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {\n // Create an instance callback for passing the base function to the caller\n baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);\n }\n });\n // We need to find all possible functions that might be overloaded by walking the entire prototype chain\n // This avoids the caller from needing to check whether it's direct base class implements the function or not\n // by walking the entire chain it simplifies the usage and issues from upgrading any of the base classes.\n visited.push(baseProto);\n baseProto = _getObjProto(baseProto);\n }\n return baseFuncs;\n}\nfunction _getInstFunc(target, funcName, proto, currentDynProtoProxy) {\n var instFunc = null;\n // We need to check whether the class name is defined directly on this prototype otherwise\n // it will walk the proto chain and return any parent proto classname.\n if (target && objHasOwnProperty(proto, DynClassName)) {\n var instFuncTable = target[DynInstFuncTable] || objCreate(null);\n instFunc = (instFuncTable[proto[DynClassName]] || objCreate(null))[funcName];\n if (!instFunc) {\n // Avoid stack overflow from recursive calling the same function\n _throwTypeError(\"Missing [\" + funcName + \"] \" + strFunction);\n }\n // We have the instance function, lets check it we can speed up further calls\n // by adding the instance function back directly on the instance (avoiding the dynamic func lookup)\n if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {\n // If the instance already has an instance function we can't replace it\n var canAddInst = !objHasOwnProperty(target, funcName);\n // Get current prototype\n var objProto = _getObjProto(target);\n var visited = [];\n // Lookup the function starting at the top (instance level prototype) and traverse down, if the first matching function\n // if nothing is found or if the first hit is a dynamic proto instance then we can safely add an instance shortcut\n while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {\n var protoFunc = objProto[funcName];\n if (protoFunc) {\n canAddInst = protoFunc === currentDynProtoProxy;\n break;\n }\n // We need to find all possible initial functions to ensure that we don't bypass a valid override function\n visited.push(objProto);\n objProto = _getObjProto(objProto);\n }\n try {\n if (canAddInst) {\n // This instance doesn't have an instance func and the class hierarchy does have a higher level prototype version\n // so it's safe to directly assign for any subsequent calls (for better performance)\n target[funcName] = instFunc;\n }\n // Block further attempts to set the instance function for any\n instFunc[DynInstChkTag] = 1;\n } catch (e) {\n // Don't crash if the object is readonly or the runtime doesn't allow changing this\n // And set a flag so we don't try again for any function\n instFuncTable[DynAllowInstChkTag] = false;\n }\n }\n }\n return instFunc;\n}\nfunction _getProtoFunc(funcName, proto, currentDynProtoProxy) {\n var protoFunc = proto[funcName];\n // Check that the prototype function is not a self reference -- try to avoid stack overflow!\n if (protoFunc === currentDynProtoProxy) {\n // It is so lookup the base prototype\n protoFunc = _getObjProto(proto)[funcName];\n }\n if (typeof protoFunc !== strFunction) {\n _throwTypeError(\"[\" + funcName + \"] is not a \" + strFunction);\n }\n return protoFunc;\n}\n/**\r\n * Add the required dynamic prototype methods to the the class prototype\r\n * @param proto - The class prototype\r\n * @param className - The instance classname\r\n * @param target - The target instance\r\n * @param baseInstFuncs - The base instance functions\r\n * @param setInstanceFunc - Flag to allow prototype function to reset the instance function if one does not exist\r\n * @ignore\r\n */\nfunction _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {\n function _createDynamicPrototype(proto, funcName) {\n var dynProtoProxy = function () {\n // Use the instance or prototype function\n var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);\n // eslint-disable-next-line prefer-rest-params\n return instFunc.apply(this, arguments);\n };\n // Tag this function as a proxy to support replacing dynamic proxy elements (primary use case is for unit testing\n // via which can dynamically replace the prototype function reference)\n dynProtoProxy[DynProxyTag] = 1;\n return dynProtoProxy;\n }\n if (!_isObjectOrArrayPrototype(proto)) {\n var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || objCreate(null);\n if (!_isObjectOrArrayPrototype(instFuncTable)) {\n var instFuncs_1 = instFuncTable[className] = instFuncTable[className] || objCreate(null); // fetch and assign if as it may not exist yet\n // Set whether we are allow to lookup instances, if someone has set to false then do not re-enable\n if (instFuncTable[DynAllowInstChkTag] !== false) {\n instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;\n }\n if (!_isObjectOrArrayPrototype(instFuncs_1)) {\n _forEachProp(target, function (name) {\n // Only add overridden functions\n if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {\n // Save the instance Function to the lookup table and remove it from the instance as it's not a dynamic proto function\n instFuncs_1[name] = target[name];\n delete target[name];\n // Add a dynamic proto if one doesn't exist or if a prototype function exists and it's not a dynamic one\n if (!objHasOwnProperty(proto, name) || proto[name] && !proto[name][DynProxyTag]) {\n proto[name] = _createDynamicPrototype(proto, name);\n }\n }\n });\n }\n }\n }\n}\n/**\r\n * Checks whether the passed prototype object appears to be correct by walking the prototype hierarchy of the instance\r\n * @param classProto The class prototype instance\r\n * @param thisTarget The current instance that will be checked whether the passed prototype instance is in the hierarchy\r\n * @ignore\r\n */\nfunction _checkPrototype(classProto, thisTarget) {\n // This method doesn't existing in older browsers (e.g. IE8)\n if (_objGetPrototypeOf) {\n // As this is primarily a coding time check, don't bother checking if running in IE8 or lower\n var visited = [];\n var thisProto = _getObjProto(thisTarget);\n while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {\n if (thisProto === classProto) {\n return true;\n }\n // This avoids the caller from needing to check whether it's direct base class implements the function or not\n // by walking the entire chain it simplifies the usage and issues from upgrading any of the base classes.\n visited.push(thisProto);\n thisProto = _getObjProto(thisProto);\n }\n return false;\n }\n // If objGetPrototypeOf doesn't exist then just assume everything is ok.\n return true;\n}\n/**\r\n * Gets the current prototype name using the ES6 name if available otherwise falling back to a use unknown as the name.\r\n * It's not critical for this to return a name, it's used to decorate the generated unique name for easier debugging only.\r\n * @param target\r\n * @param unknownValue\r\n * @ignore\r\n */\nfunction _getObjName(target, unknownValue) {\n if (objHasOwnProperty(target, Prototype)) {\n // Look like a prototype\n return target.name || unknownValue || UnknownValue;\n }\n return ((target || {})[Constructor] || {}).name || unknownValue || UnknownValue;\n}\n/**\r\n * Helper function when creating dynamic (inline) functions for classes, this helper performs the following tasks :-\r\n * - Saves references to all defined base class functions\r\n * - Calls the delegateFunc with the current target (this) and a base object reference that can be used to call all \"super\" functions.\r\n * - Will populate the class prototype for all overridden functions to support class extension that call the prototype instance.\r\n * Callers should use this helper when declaring all function within the constructor of a class, as mentioned above the delegateFunc is\r\n * passed both the target \"this\" and an object that can be used to call any base (super) functions, using this based object in place of\r\n * super.XXX() (which gets expanded to _super.prototype.XXX()) provides a better minification outcome and also ensures the correct \"this\"\r\n * context is maintained as TypeScript creates incorrect references using super.XXXX() for dynamically defined functions i.e. Functions\r\n * defined in the constructor or some other function (rather than declared as complete typescript functions).\r\n * ### Usage\r\n * ```typescript\r\n * import dynamicProto from \"@microsoft/dynamicproto-js\";\r\n * class ExampleClass extends BaseClass {\r\n * constructor() {\r\n * dynamicProto(ExampleClass, this, (_self, base) => {\r\n * // This will define a function that will be converted to a prototype function\r\n * _self.newFunc = () => {\r\n * // Access any \"this\" instance property\r\n * if (_self.someProperty) {\r\n * ...\r\n * }\r\n * }\r\n * // This will define a function that will be converted to a prototype function\r\n * _self.myFunction = () => {\r\n * // Access any \"this\" instance property\r\n * if (_self.someProperty) {\r\n * // Call the base version of the function that we are overriding\r\n * base.myFunction();\r\n * }\r\n * ...\r\n * }\r\n * _self.initialize = () => {\r\n * ...\r\n * }\r\n * // Warnings: While the following will work as _self is simply a reference to\r\n * // this, if anyone overrides myFunction() the overridden will be called first\r\n * // as the normal JavaScript method resolution will occur and the defined\r\n * // _self.initialize() function is actually gets removed from the instance and\r\n * // a proxy prototype version is created to reference the created method.\r\n * _self.initialize();\r\n * });\r\n * }\r\n * }\r\n * ```\r\n * @typeparam DPType This is the generic type of the class, used to keep intellisense valid\r\n * @typeparam DPCls The type that contains the prototype of the current class\r\n * @param theClass - This is the current class instance which contains the prototype for the current class\r\n * @param target - The current \"this\" (target) reference, when the class has been extended this.prototype will not be the 'theClass' value.\r\n * @param delegateFunc - The callback function (closure) that will create the dynamic function\r\n * @param options - Additional options to configure how the dynamic prototype operates\r\n */\nexport default function dynamicProto(theClass, target, delegateFunc, options) {\n // Make sure that the passed theClass argument looks correct\n if (!objHasOwnProperty(theClass, Prototype)) {\n _throwTypeError(\"theClass is an invalid class definition.\");\n }\n // Quick check to make sure that the passed theClass argument looks correct (this is a common copy/paste error)\n var classProto = theClass[Prototype];\n if (!_checkPrototype(classProto, target)) {\n _throwTypeError(\"[\" + _getObjName(theClass) + \"] not in hierarchy of [\" + _getObjName(target) + \"]\");\n }\n var className = null;\n if (objHasOwnProperty(classProto, DynClassName)) {\n // Only grab the class name if it's defined on this prototype (i.e. don't walk the prototype chain)\n className = classProto[DynClassName];\n } else {\n // As not all browser support name on the prototype creating a unique dynamic one if we have not already\n // assigned one, so we can use a simple string as the lookup rather than an object for the dynamic instance\n // function table lookup.\n className = DynClassNamePrefix + _getObjName(theClass, \"_\") + \"$\" + _gblInst.n;\n _gblInst.n++;\n classProto[DynClassName] = className;\n }\n var perfOptions = dynamicProto[DynProtoDefaultOptions];\n var useBaseInst = !!perfOptions[strUseBaseInst];\n if (useBaseInst && options && options[strUseBaseInst] !== undefined) {\n useBaseInst = !!options[strUseBaseInst];\n }\n // Get the current instance functions\n var instFuncs = _getInstanceFuncs(target);\n // Get all of the functions for any base instance (before they are potentially overridden)\n var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);\n // Execute the delegate passing in both the current target \"this\" and \"base\" function references\n // Note casting the same type as we don't actually have the base class here and this will provide some intellisense support\n delegateFunc(target, baseFuncs);\n // Don't allow setting instance functions for older IE instances\n var setInstanceFunc = !!_objGetPrototypeOf && !!perfOptions[strSetInstFuncs];\n if (setInstanceFunc && options) {\n setInstanceFunc = !!options[strSetInstFuncs];\n }\n // Populate the Prototype for any overridden instance functions\n _populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);\n}\n/**\r\n * Exposes the default global options to allow global configuration, if the global values are disabled these will override\r\n * any passed values. This is primarily exposed to support unit-testing without the need for individual classes to expose\r\n * their internal usage of dynamic proto.\r\n */\ndynamicProto[DynProtoDefaultOptions] = _gblInst.o;\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nexport var strShimFunction = \"function\";\nexport var strShimObject = \"object\";\nexport var strShimUndefined = \"undefined\";\nexport var strShimPrototype = \"prototype\";\nexport var strDefault = \"default\";\nexport var ObjClass = Object;\nexport var ObjProto = ObjClass[strShimPrototype];\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { getGlobal, objAssign, objCreate, objDefineProp, objHasOwnProperty, throwTypeError } from \"@nevware21/ts-utils\";\nimport { ObjClass, ObjProto, strDefault, strShimFunction, strShimPrototype } from \"./Constants\";\n// Most of these functions have been directly shamelessly \"lifted\" from the https://github.com/@microsoft/tslib and\n// modified to be ES5 compatible and applying several minification and tree-shaking techniques so that Application Insights\n// can successfully use TypeScript \"importHelpers\" which imports tslib during compilation but it will use these at runtime\n// Which is also why all of the functions have not been included as Application Insights currently doesn't use or require\n// them.\nexport var SymbolObj = (getGlobal() || {})[\"Symbol\"];\nexport var ReflectObj = (getGlobal() || {})[\"Reflect\"];\nexport var __hasReflect = !!ReflectObj;\nvar strDecorate = \"decorate\";\nvar strMetadata = \"metadata\";\nvar strGetOwnPropertySymbols = \"getOwnPropertySymbols\";\nvar strIterator = \"iterator\";\nvar strHasOwnProperty = \"hasOwnProperty\";\nexport var __objAssignFnImpl = function (t) {\n // tslint:disable-next-line: ban-comma-operator\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) {\n if (ObjProto[strHasOwnProperty].call(s, p)) {\n t[p] = s[p];\n }\n }\n }\n return t;\n};\nexport var __assignFn = objAssign || __objAssignFnImpl;\n// tslint:disable-next-line: only-arrow-functions\nvar extendStaticsFn = function (d, b) {\n extendStaticsFn = ObjClass[\"setPrototypeOf\"] ||\n // tslint:disable-next-line: only-arrow-functions\n {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } ||\n // tslint:disable-next-line: only-arrow-functions\n function (d, b) {\n for (var p in b) {\n if (b[strHasOwnProperty](p)) {\n d[p] = b[p];\n }\n }\n };\n return extendStaticsFn(d, b);\n};\nexport function __extendsFn(d, b) {\n if (typeof b !== strShimFunction && b !== null) {\n throwTypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n }\n extendStaticsFn(d, b);\n function __() {\n this.constructor = d;\n }\n // tslint:disable-next-line: ban-comma-operator\n d[strShimPrototype] = b === null ? objCreate(b) : (__[strShimPrototype] = b[strShimPrototype], new __());\n}\nexport function __restFn(s, e) {\n var t = {};\n for (var k in s) {\n if (objHasOwnProperty(s, k) && e.indexOf(k) < 0) {\n t[k] = s[k];\n }\n }\n if (s != null && typeof ObjClass[strGetOwnPropertySymbols] === strShimFunction) {\n for (var i = 0, p = ObjClass[strGetOwnPropertySymbols](s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && ObjProto[\"propertyIsEnumerable\"].call(s, p[i])) {\n t[p[i]] = s[p[i]];\n }\n }\n }\n return t;\n}\nexport function __decorateFn(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = ObjClass[\"getOwnPropertyDescriptor\"](target, key) : desc,\n d;\n if (__hasReflect && typeof ReflectObj[strDecorate] === strShimFunction) {\n r = ReflectObj[strDecorate](decorators, target, key, desc);\n } else {\n for (var i = decorators.length - 1; i >= 0; i--) {\n // eslint-disable-next-line no-cond-assign\n if (d = decorators[i]) {\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n }\n }\n }\n // tslint:disable-next-line:ban-comma-operator\n return c > 3 && r && objDefineProp(target, key, r), r;\n}\nexport function __paramFn(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadataFn(metadataKey, metadataValue) {\n if (__hasReflect && ReflectObj[strMetadata] === strShimFunction) {\n return ReflectObj[strMetadata](metadataKey, metadataValue);\n }\n}\nexport function __exportStarFn(m, o) {\n for (var p in m) {\n if (p !== strDefault && !objHasOwnProperty(o, p)) {\n __createBindingFn(o, m, p);\n }\n }\n}\nexport function __createBindingFn(o, m, k, k2) {\n if (k2 === undefined) {\n k2 = k;\n }\n if (!!objDefineProp) {\n objDefineProp(o, k2, {\n enumerable: true,\n get: function () {\n return m[k];\n }\n });\n } else {\n o[k2] = m[k];\n }\n}\nexport function __valuesFn(o) {\n var s = typeof SymbolObj === strShimFunction && SymbolObj[strIterator],\n m = s && o[s],\n i = 0;\n if (m) {\n return m.call(o);\n }\n if (o && typeof o.length === \"number\") {\n return {\n next: function () {\n if (o && i >= o.length) {\n o = void 0;\n }\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n }\n throwTypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __readFn(o, n) {\n var m = typeof SymbolObj === strShimFunction && o[SymbolObj[strIterator]];\n if (!m) {\n return o;\n }\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n // tslint:disable-next-line:no-conditional-assignment\n if (r && !r.done && (m = i[\"return\"])) {\n m.call(i);\n }\n } finally {\n if (e) {\n // eslint-disable-next-line no-unsafe-finally\n throw e.error;\n }\n }\n }\n return ar;\n}\n/** @deprecated */\nexport function __spreadArraysFn() {\n var theArgs = arguments;\n // Calculate new total size\n for (var s = 0, i = 0, il = theArgs.length; i < il; i++) {\n s += theArgs[i].length;\n }\n // Create new full array\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = theArgs[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n return r;\n}\nexport function __spreadArrayFn(to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) {\n to[j] = from[i];\n }\n return to;\n}\nexport function __makeTemplateObjectFn(cooked, raw) {\n if (objDefineProp) {\n objDefineProp(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\nexport function __importStarFn(mod) {\n if (mod && mod.__esModule) {\n return mod;\n }\n var result = {};\n if (mod != null) {\n for (var k in mod) {\n if (k !== strDefault && Object.prototype.hasOwnProperty.call(mod, k)) {\n __createBindingFn(result, mod, k);\n }\n }\n }\n // Set default module\n if (!!objDefineProp) {\n objDefineProp(result, strDefault, {\n enumerable: true,\n value: mod\n });\n } else {\n result[strDefault] = mod;\n }\n return result;\n}\nexport function __importDefaultFn(mod) {\n return mod && mod.__esModule ? mod : {\n strDefault: mod\n };\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { createEnum, createTypeMap } from \"@nevware21/ts-utils\";\n/**\r\n * Create an enum style object which has both the key => value and value => key mappings\r\n * @param values - The values to populate on the new object\r\n * @returns\r\n */\nexport var createEnumStyle = createEnum;\n/**\r\n * Create a 2 index map that maps an enum's key and value to the defined map value, X[\"key\"] => mapValue and X[0] => mapValue.\r\n * Generic values\r\n * - E = the const enum type (typeof eRequestHeaders);\r\n * - V = Identifies the valid values for the keys, this should include both the enum numeric and string key of the type. The\r\n * resulting \"Value\" of each entry identifies the valid values withing the assignments.\r\n * @param values - The values to populate on the new object\r\n * @returns\r\n */\nexport var createValueMap = createTypeMap;\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { createEnumStyle } from \"./EnumHelperFuncs\";\nexport var ActiveStatus = createEnumStyle({\n NONE: 0 /* eActiveStatus.NONE */,\n PENDING: 3 /* eActiveStatus.PENDING */,\n INACTIVE: 1 /* eActiveStatus.INACTIVE */,\n ACTIVE: 2 /* eActiveStatus.ACTIVE */\n});\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nexport var _DYN_TO_LOWER_CASE = \"toLowerCase\"; // Count: 11\nexport var _DYN_BLK_VAL = \"blkVal\"; // Count: 5\nexport var _DYN_LENGTH = \"length\"; // Count: 55\nexport var _DYN_RD_ONLY = \"rdOnly\"; // Count: 4\nexport var _DYN_NOTIFY = \"notify\"; // Count: 4\nexport var _DYN_WARN_TO_CONSOLE = \"warnToConsole\"; // Count: 4\nexport var _DYN_THROW_INTERNAL = \"throwInternal\"; // Count: 5\nexport var _DYN_SET_DF = \"setDf\"; // Count: 6\nexport var _DYN_WATCH = \"watch\"; // Count: 8\nexport var _DYN_LOGGER = \"logger\"; // Count: 21\nexport var _DYN_APPLY = \"apply\"; // Count: 7\nexport var _DYN_PUSH = \"push\"; // Count: 35\nexport var _DYN_SPLICE = \"splice\"; // Count: 8\nexport var _DYN_HDLR = \"hdlr\"; // Count: 6\nexport var _DYN_CANCEL = \"cancel\"; // Count: 6\nexport var _DYN_INITIALIZE = \"initialize\"; // Count: 5\nexport var _DYN_IDENTIFIER = \"identifier\"; // Count: 8\nexport var _DYN_REMOVE_NOTIFICATION_0 = \"removeNotificationListener\"; // Count: 4\nexport var _DYN_ADD_NOTIFICATION_LIS1 = \"addNotificationListener\"; // Count: 4\nexport var _DYN_IS_INITIALIZED = \"isInitialized\"; // Count: 10\nexport var _DYN_INSTRUMENTATION_KEY = \"instrumentationKey\"; // Count: 2\nexport var _DYN__INACTIVE = \"INACTIVE\"; // Count: 3\nexport var _DYN_VALUE = \"value\"; // Count: 5\nexport var _DYN_GET_NOTIFY_MGR = \"getNotifyMgr\"; // Count: 5\nexport var _DYN_GET_PLUGIN = \"getPlugin\"; // Count: 6\nexport var _DYN_NAME = \"name\"; // Count: 12\nexport var _DYN_I_KEY = \"iKey\"; // Count: 5\nexport var _DYN_TIME = \"time\"; // Count: 6\nexport var _DYN_PROCESS_NEXT = \"processNext\"; // Count: 15\nexport var _DYN_GET_PROCESS_TEL_CONT2 = \"getProcessTelContext\"; // Count: 2\nexport var _DYN_POLL_INTERNAL_LOGS = \"pollInternalLogs\"; // Count: 2\nexport var _DYN_ENABLED = \"enabled\"; // Count: 6\nexport var _DYN_STOP_POLLING_INTERNA3 = \"stopPollingInternalLogs\"; // Count: 2\nexport var _DYN_UNLOAD = \"unload\"; // Count: 9\nexport var _DYN_ON_COMPLETE = \"onComplete\"; // Count: 5\nexport var _DYN_VERSION = \"version\"; // Count: 6\nexport var _DYN_LOGGING_LEVEL_CONSOL4 = \"loggingLevelConsole\"; // Count: 2\nexport var _DYN_CREATE_NEW = \"createNew\"; // Count: 7\nexport var _DYN_TEARDOWN = \"teardown\"; // Count: 9\nexport var _DYN_MESSAGE_ID = \"messageId\"; // Count: 4\nexport var _DYN_MESSAGE = \"message\"; // Count: 7\nexport var _DYN_IS_ASYNC = \"isAsync\"; // Count: 6\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 10\nexport var _DYN__DO_TEARDOWN = \"_doTeardown\"; // Count: 5\nexport var _DYN_UPDATE = \"update\"; // Count: 6\nexport var _DYN_GET_NEXT = \"getNext\"; // Count: 12\nexport var _DYN_SET_NEXT_PLUGIN = \"setNextPlugin\"; // Count: 5\nexport var _DYN_PROTOCOL = \"protocol\"; // Count: 3\nexport var _DYN_USER_AGENT = \"userAgent\"; // Count: 5\nexport var _DYN_SPLIT = \"split\"; // Count: 7\nexport var _DYN_NODE_TYPE = \"nodeType\"; // Count: 3\nexport var _DYN_REPLACE = \"replace\"; // Count: 9\nexport var _DYN_LOG_INTERNAL_MESSAGE = \"logInternalMessage\"; // Count: 2\nexport var _DYN_TYPE = \"type\"; // Count: 14\nexport var _DYN_HANDLER = \"handler\"; // Count: 5\nexport var _DYN_STATUS = \"status\"; // Count: 5\nexport var _DYN_GET_RESPONSE_HEADER = \"getResponseHeader\"; // Count: 2\nexport var _DYN_GET_ALL_RESPONSE_HEA5 = \"getAllResponseHeaders\"; // Count: 2\nexport var _DYN_IS_CHILD_EVT = \"isChildEvt\"; // Count: 3\nexport var _DYN_DATA = \"data\"; // Count: 7\nexport var _DYN_GET_CTX = \"getCtx\"; // Count: 6\nexport var _DYN_SET_CTX = \"setCtx\"; // Count: 10\nexport var _DYN_COMPLETE = \"complete\"; // Count: 3\nexport var _DYN_ITEMS_RECEIVED = \"itemsReceived\"; // Count: 3\nexport var _DYN_URL_STRING = \"urlString\"; // Count: 5\nexport var _DYN_SEND_POST = \"sendPOST\"; // Count: 3\nexport var _DYN_HEADERS = \"headers\"; // Count: 5\nexport var _DYN_TIMEOUT = \"timeout\"; // Count: 6\nexport var _DYN_SET_REQUEST_HEADER = \"setRequestHeader\"; // Count: 2\nexport var _DYN_TRACE_ID = \"traceId\"; // Count: 5\nexport var _DYN_SPAN_ID = \"spanId\"; // Count: 5\nexport var _DYN_TRACE_FLAGS = \"traceFlags\"; // Count: 6\nexport var _DYN_GET_ATTRIBUTE = \"getAttribute\"; // Count: 3\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { arrForEach, createCustomError, dumpObj } from \"@nevware21/ts-utils\";\nimport { _DYN_LENGTH } from \"../__DynamicConstants\";\nvar aggregationErrorType;\n/**\r\n * Throws an Aggregation Error which includes all of the errors that led to this error occurring\r\n * @param message - The message describing the aggregation error (the sourceError details are added to this)\r\n * @param sourceErrors - An array of the errors that caused this situation\r\n */\nexport function throwAggregationError(message, sourceErrors) {\n if (!aggregationErrorType) {\n aggregationErrorType = createCustomError(\"AggregationError\", function (self, args) {\n if (args[_DYN_LENGTH /* @min:%2elength */] > 1) {\n // Save the provided errors\n self.errors = args[1];\n }\n });\n }\n var theMessage = message || \"One or more errors occurred.\";\n arrForEach(sourceErrors, function (srcError, idx) {\n theMessage += \"\\n\".concat(idx, \" > \").concat(dumpObj(srcError));\n });\n throw new aggregationErrorType(theMessage, sourceErrors || []);\n}\n","/*!\n * NevWare21 Solutions LLC - ts-async, 0.5.3\n * https://github.com/nevware21/ts-async\n * Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.\n * Licensed under the MIT license.\n */\nimport { isPromiseLike, objDefineProperties, getDocument, createCachedValue, safe, getInst, dumpObj, arrSlice, objDefineProp, hasSymbol, getKnownSymbol, isFunction, throwTypeError, iterForOf, scheduleTimeout, isNode, getWindow, getGlobal, objDefine, objToString, isUndefined, isArray, arrForEach, isIterable, createCustomError, isNumber, scheduleIdleCallback, utcNow, getLength, isIterator, fnCall, arrIndexOf } from '@nevware21/ts-utils';\nvar STR_PROMISE = \"Promise\";\nvar DONE = \"done\";\nvar VALUE = \"value\";\nvar RETURN = \"return\";\nvar REJECTED = \"rejected\";\nfunction doAwaitResponse(value, cb) {\n return doAwait(value, function (value) {\n return cb ? cb({\n status: \"fulfilled\",\n rejected: false,\n value: value\n }) : value;\n }, function (reason) {\n return cb ? cb({\n status: REJECTED,\n rejected: true,\n reason: reason\n }) : reason;\n });\n}\nfunction doAwait(value, resolveFn, rejectFn, finallyFn) {\n var result = value;\n try {\n if (isPromiseLike(value)) {\n if (resolveFn || rejectFn) {\n result = value.then(resolveFn, rejectFn);\n }\n } else {\n try {\n if (resolveFn) {\n result = resolveFn(value);\n }\n } catch (err) {\n if (rejectFn) {\n result = rejectFn(err);\n } else {\n throw err;\n }\n }\n }\n } finally {\n if (finallyFn) {\n doFinally(result, finallyFn);\n }\n }\n return result;\n}\nfunction doFinally(value, finallyFn) {\n var result = value;\n if (finallyFn) {\n if (isPromiseLike(value)) {\n if (value.finally) {\n result = value.finally(finallyFn);\n } else {\n result = value.then(function (value) {\n finallyFn();\n return value;\n }, function (reason) {\n finallyFn();\n throw reason;\n });\n }\n } else {\n finallyFn();\n }\n }\n return result;\n}\nvar _debugState;\nvar _debugResult;\nvar _debugHandled;\nvar _promiseDebugEnabled = false;\nfunction _addDebugState$1(thePromise, stateFn, resultFn, handledFn) {\n _debugState = _debugState || {\n toString: function () {\n return \"[[PromiseState]]\";\n }\n };\n _debugResult = _debugResult || {\n toString: function () {\n return \"[[PromiseResult]]\";\n }\n };\n _debugHandled = _debugHandled || {\n toString: function () {\n return \"[[PromiseIsHandled]]\";\n }\n };\n var props = {};\n props[_debugState] = {\n get: stateFn\n };\n props[_debugResult] = {\n get: resultFn\n };\n props[_debugHandled] = {\n get: handledFn\n };\n objDefineProperties(thePromise, props);\n}\nfunction setPromiseDebugState(enabled, logger) {\n _promiseDebugEnabled = enabled;\n}\nvar STRING_STATES = [\"pending\", \"resolving\", \"resolved\", REJECTED];\nvar DISPATCH_EVENT = \"dispatchEvent\";\nvar _hasInitEvent;\nfunction _hasInitEventFn(doc) {\n var evt;\n if (doc && doc.createEvent) {\n evt = doc.createEvent(\"Event\");\n }\n return !!evt && evt.initEvent;\n}\nfunction emitEvent(target, evtName, populateEvent, useNewEvent) {\n var doc = getDocument();\n !_hasInitEvent && (_hasInitEvent = createCachedValue(!!safe(_hasInitEventFn, [doc]).v));\n var theEvt = _hasInitEvent.v ? doc.createEvent(\"Event\") : useNewEvent ? new Event(evtName) : {};\n populateEvent && populateEvent(theEvt);\n if (_hasInitEvent.v) {\n theEvt.initEvent(evtName, false, true);\n }\n if (theEvt && target[DISPATCH_EVENT]) {\n target[DISPATCH_EVENT](theEvt);\n } else {\n var handler = target[\"on\" + evtName];\n if (handler) {\n handler(theEvt);\n } else {\n var theConsole = getInst(\"console\");\n theConsole && (theConsole[\"error\"] || theConsole[\"log\"])(evtName, dumpObj(theEvt));\n }\n }\n}\nvar NODE_UNHANDLED_REJECTION = \"unhandledRejection\";\nvar UNHANDLED_REJECTION = NODE_UNHANDLED_REJECTION.toLowerCase();\nvar _currentPromiseId = [];\nvar _uniquePromiseId = 0;\nvar _unhandledRejectionTimeout = 10;\nvar _aggregationError;\nvar _hasPromiseRejectionEvent;\nfunction dumpFnObj(value) {\n if (isFunction(value)) {\n return value.toString();\n }\n return dumpObj(value);\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createAggregationError(values) {\n !_aggregationError && (_aggregationError = createCachedValue(safe(getInst, [\"AggregationError\"]).v || createCustomError(\"AggregationError\", function (self, args) {\n self.errors = args[0];\n })));\n return new _aggregationError.v(values);\n}\nfunction _createPromise(newPromise, processor, executor) {\n var additionalArgs = arrSlice(arguments, 3);\n var _state = 0;\n var _hasResolved = false;\n var _settledValue;\n var _queue = [];\n var _id = _uniquePromiseId++;\n var _parentId = _currentPromiseId.length > 0 ? _currentPromiseId[_currentPromiseId.length - 1] : undefined;\n var _handled = false;\n var _unHandledRejectionHandler = null;\n var _thePromise;\n function _then(onResolved, onRejected) {\n try {\n _currentPromiseId.push(_id);\n _handled = true;\n _unHandledRejectionHandler && _unHandledRejectionHandler.cancel();\n _unHandledRejectionHandler = null;\n var thenPromise = newPromise(function (resolve, reject) {\n _queue.push(function () {\n try {\n var handler = _state === 2 ? onResolved : onRejected;\n var value = isUndefined(handler) ? _settledValue : isFunction(handler) ? handler(_settledValue) : handler;\n if (isPromiseLike(value)) {\n value.then(resolve, reject);\n } else if (handler) {\n resolve(value);\n } else if (_state === 3) {\n reject(value);\n } else {\n resolve(value);\n }\n } catch (e) {\n reject(e);\n }\n });\n if (_hasResolved) {\n _processQueue();\n }\n }, additionalArgs);\n return thenPromise;\n } finally {\n _currentPromiseId.pop();\n }\n }\n function _catch(onRejected) {\n return _then(undefined, onRejected);\n }\n function _finally(onFinally) {\n var thenFinally = onFinally;\n var catchFinally = onFinally;\n if (isFunction(onFinally)) {\n thenFinally = function (value) {\n onFinally && onFinally();\n return value;\n };\n catchFinally = function (reason) {\n onFinally && onFinally();\n throw reason;\n };\n }\n return _then(thenFinally, catchFinally);\n }\n function _strState() {\n return STRING_STATES[_state];\n }\n function _processQueue() {\n if (_queue.length > 0) {\n var pending = _queue.slice();\n _queue = [];\n _handled = true;\n _unHandledRejectionHandler && _unHandledRejectionHandler.cancel();\n _unHandledRejectionHandler = null;\n processor(pending);\n }\n }\n function _createSettleIfFn(newState, allowState) {\n return function (theValue) {\n if (_state === allowState) {\n if (newState === 2 && isPromiseLike(theValue)) {\n _state = 1;\n theValue.then(_createSettleIfFn(2, 1), _createSettleIfFn(3, 1));\n return;\n }\n _state = newState;\n _hasResolved = true;\n _settledValue = theValue;\n _processQueue();\n if (!_handled && newState === 3 && !_unHandledRejectionHandler) {\n _unHandledRejectionHandler = scheduleTimeout(_notifyUnhandledRejection, _unhandledRejectionTimeout);\n }\n }\n };\n }\n function _notifyUnhandledRejection() {\n if (!_handled) {\n _handled = true;\n if (isNode()) {\n process.emit(NODE_UNHANDLED_REJECTION, _settledValue, _thePromise);\n } else {\n var gbl = getWindow() || getGlobal();\n !_hasPromiseRejectionEvent && (_hasPromiseRejectionEvent = createCachedValue(safe(getInst, [STR_PROMISE + \"RejectionEvent\"]).v));\n emitEvent(gbl, UNHANDLED_REJECTION, function (theEvt) {\n objDefine(theEvt, \"promise\", {\n g: function () {\n return _thePromise;\n }\n });\n theEvt.reason = _settledValue;\n return theEvt;\n }, !!_hasPromiseRejectionEvent.v);\n }\n }\n }\n _thePromise = {\n then: _then,\n \"catch\": _catch,\n finally: _finally\n };\n objDefineProp(_thePromise, \"state\", {\n get: _strState\n });\n if (_promiseDebugEnabled) {\n _addDebugState$1(_thePromise, _strState, function () {\n return objToString(_settledValue);\n }, function () {\n return _handled;\n });\n }\n if (hasSymbol()) {\n _thePromise[getKnownSymbol(11)] = \"IPromise\";\n }\n function _toString() {\n return \"IPromise\" + (_promiseDebugEnabled ? \"[\" + _id + (!isUndefined(_parentId) ? \":\" + _parentId : \"\") + \"]\" : \"\") + \" \" + _strState() + (_hasResolved ? \" - \" + dumpFnObj(_settledValue) : \"\") + \"\";\n }\n _thePromise.toString = _toString;\n (function _initialize() {\n if (!isFunction(executor)) {\n throwTypeError(STR_PROMISE + \": executor is not a function - \" + dumpFnObj(executor));\n }\n var _rejectFn = _createSettleIfFn(3, 0);\n try {\n executor.call(_thePromise, _createSettleIfFn(2, 0), _rejectFn);\n } catch (e) {\n _rejectFn(e);\n }\n })();\n return _thePromise;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createAllPromise(newPromise) {\n return function (input) {\n var additionalArgs = arrSlice(arguments, 1);\n return newPromise(function (resolve, reject) {\n try {\n var values_1 = [];\n var pending_1 = 1;\n iterForOf(input, function (item, idx) {\n if (item) {\n pending_1++;\n doAwait(item, function (value) {\n values_1[idx] = value;\n if (--pending_1 === 0) {\n resolve(values_1);\n }\n }, reject);\n }\n });\n pending_1--;\n if (pending_1 === 0) {\n resolve(values_1);\n }\n } catch (e) {\n reject(e);\n }\n }, additionalArgs);\n };\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createResolvedPromise(newPromise) {\n return function (value) {\n var additionalArgs = arrSlice(arguments, 1);\n if (isPromiseLike(value)) {\n return value;\n }\n return newPromise(function (resolve) {\n resolve(value);\n }, additionalArgs);\n };\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createRejectedPromise(newPromise) {\n return function (reason) {\n var additionalArgs = arrSlice(arguments, 1);\n return newPromise(function (_resolve, reject) {\n reject(reason);\n }, additionalArgs);\n };\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createAllSettledPromise(newPromise) {\n return createCachedValue(function (input) {\n var additionalArgs = arrSlice(arguments, 1);\n return newPromise(function (resolve, reject) {\n var values = [];\n var pending = 1;\n function processItem(item, idx) {\n pending++;\n doAwaitResponse(item, function (value) {\n if (value.rejected) {\n values[idx] = {\n status: REJECTED,\n reason: value.reason\n };\n } else {\n values[idx] = {\n status: \"fulfilled\",\n value: value.value\n };\n }\n if (--pending === 0) {\n resolve(values);\n }\n });\n }\n try {\n if (isArray(input)) {\n arrForEach(input, processItem);\n } else if (isIterable(input)) {\n iterForOf(input, processItem);\n } else {\n throwTypeError(\"Input is not an iterable\");\n }\n pending--;\n if (pending === 0) {\n resolve(values);\n }\n } catch (e) {\n reject(e);\n }\n }, additionalArgs);\n });\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createRacePromise(newPromise) {\n return createCachedValue(function (input) {\n var additionalArgs = arrSlice(arguments, 1);\n return newPromise(function (resolve, reject) {\n var isDone = false;\n function processItem(item) {\n doAwaitResponse(item, function (value) {\n if (!isDone) {\n isDone = true;\n if (value.rejected) {\n reject(value.reason);\n } else {\n resolve(value.value);\n }\n }\n });\n }\n try {\n if (isArray(input)) {\n arrForEach(input, processItem);\n } else if (isIterable(input)) {\n iterForOf(input, processItem);\n } else {\n throwTypeError(\"Input is not an iterable\");\n }\n } catch (e) {\n reject(e);\n }\n }, additionalArgs);\n });\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createAnyPromise(newPromise) {\n return createCachedValue(function (input) {\n var additionalArgs = arrSlice(arguments, 1);\n return newPromise(function (resolve, reject) {\n var theErros = [];\n var pending = 1;\n var isDone = false;\n function processItem(item, idx) {\n pending++;\n doAwaitResponse(item, function (value) {\n if (!value.rejected) {\n isDone = true;\n resolve(value.value);\n return;\n } else {\n theErros[idx] = value.reason;\n }\n if (--pending === 0 && !isDone) {\n reject(_createAggregationError(theErros));\n }\n });\n }\n try {\n if (isArray(input)) {\n arrForEach(input, processItem);\n } else if (isIterable(input)) {\n iterForOf(input, processItem);\n } else {\n throwTypeError(\"Input is not an iterable\");\n }\n pending--;\n if (pending === 0 && !isDone) {\n reject(_createAggregationError(theErros));\n }\n } catch (e) {\n reject(e);\n }\n }, additionalArgs);\n });\n}\nfunction syncItemProcessor(pending) {\n arrForEach(pending, function (fn) {\n try {\n fn();\n } catch (e) {}\n });\n}\nfunction timeoutItemProcessor(timeout) {\n var callbackTimeout = isNumber(timeout) ? timeout : 0;\n return function (pending) {\n scheduleTimeout(function () {\n syncItemProcessor(pending);\n }, callbackTimeout);\n };\n}\nfunction idleItemProcessor(timeout) {\n var options;\n if (timeout >= 0) {\n options = {\n timeout: +timeout\n };\n }\n return function (pending) {\n scheduleIdleCallback(function (deadline) {\n syncItemProcessor(pending);\n }, options);\n };\n}\nvar _allAsyncSettledCreator;\nvar _raceAsyncCreator;\nvar _anyAsyncCreator;\nfunction createAsyncPromise(executor, timeout) {\n return _createPromise(createAsyncPromise, timeoutItemProcessor(timeout), executor, timeout);\n}\nvar createAsyncAllPromise = /*#__PURE__*/_createAllPromise(createAsyncPromise);\nvar createAsyncResolvedPromise = /*#__PURE__*/_createResolvedPromise(createAsyncPromise);\nvar createAsyncRejectedPromise = /*#__PURE__*/_createRejectedPromise(createAsyncPromise);\nfunction createAsyncAllSettledPromise(input, timeout) {\n !_allAsyncSettledCreator && (_allAsyncSettledCreator = _createAllSettledPromise(createAsyncPromise));\n return _allAsyncSettledCreator.v(input, timeout);\n}\nfunction createAsyncRacePromise(values, timeout) {\n !_raceAsyncCreator && (_raceAsyncCreator = _createRacePromise(createAsyncPromise));\n return _raceAsyncCreator.v(values, timeout);\n}\nfunction createAsyncAnyPromise(values, timeout) {\n !_anyAsyncCreator && (_anyAsyncCreator = _createAnyPromise(createAsyncPromise));\n return _anyAsyncCreator.v(values, timeout);\n}\nvar _promiseCls;\nvar _allCreator;\nvar _allNativeSettledCreator;\nvar _raceNativeCreator;\nvar _anyNativeCreator;\n/*#__NO_SIDE_EFFECTS__*/\nfunction _createNativePromiseHelper(name, func) {\n !_promiseCls && (_promiseCls = createCachedValue(safe(getInst, [STR_PROMISE]).v || null));\n if (_promiseCls.v && _promiseCls.v[name]) {\n return createCachedValue(function (input, timeout) {\n return createNativePromise(function (resolve, reject) {\n _promiseCls.v[name](input).then(resolve, reject);\n });\n });\n }\n return func();\n}\nfunction createNativePromise(executor, timeout) {\n !_promiseCls && (_promiseCls = createCachedValue(safe(getInst, [STR_PROMISE]).v || null));\n var PrmCls = _promiseCls.v;\n if (!PrmCls) {\n return createAsyncPromise(executor);\n }\n if (!isFunction(executor)) {\n throwTypeError(STR_PROMISE + \": executor is not a function - \" + dumpObj(executor));\n }\n var _state = 0;\n function _strState() {\n return STRING_STATES[_state];\n }\n var thePromise = new PrmCls(function (resolve, reject) {\n function _resolve(value) {\n _state = 2;\n resolve(value);\n }\n function _reject(reason) {\n _state = 3;\n reject(reason);\n }\n executor(_resolve, _reject);\n });\n objDefineProp(thePromise, \"state\", {\n get: _strState\n });\n return thePromise;\n}\nfunction createNativeAllPromise(input, timeout) {\n !_allCreator && (_allCreator = _createNativePromiseHelper(\"all\", function () {\n return createCachedValue(_createAllPromise(createNativePromise));\n }));\n return _allCreator.v(input, timeout);\n}\nvar createNativeResolvedPromise = /*#__PURE__*/_createResolvedPromise(createNativePromise);\nvar createNativeRejectedPromise = /*#__PURE__*/_createRejectedPromise(createNativePromise);\nfunction createNativeAllSettledPromise(input, timeout) {\n !_allNativeSettledCreator && (_allNativeSettledCreator = _createNativePromiseHelper(\"allSettled\", function () {\n return _createAllSettledPromise(createNativePromise);\n }));\n return _allNativeSettledCreator.v(input, timeout);\n}\nfunction createNativeRacePromise(values, timeout) {\n !_raceNativeCreator && (_raceNativeCreator = _createNativePromiseHelper(\"race\", function () {\n return _createRacePromise(createNativePromise);\n }));\n return _raceNativeCreator.v(values, timeout);\n}\nfunction createNativeAnyPromise(values, timeout) {\n !_anyNativeCreator && (_anyNativeCreator = _createNativePromiseHelper(\"any\", function () {\n return _createAnyPromise(createNativePromise);\n }));\n return _anyNativeCreator.v(values, timeout);\n}\nvar _allSyncSettledCreator;\nvar _raceSyncCreator;\nvar _anySyncCreator;\nfunction createSyncPromise(executor) {\n return _createPromise(createSyncPromise, syncItemProcessor, executor);\n}\nvar createSyncAllPromise = /*#__PURE__*/_createAllPromise(createSyncPromise);\nvar createSyncResolvedPromise = /*#__PURE__*/_createResolvedPromise(createSyncPromise);\nvar createSyncRejectedPromise = /*#__PURE__*/_createRejectedPromise(createSyncPromise);\nfunction createSyncAllSettledPromise(input, timeout) {\n !_allSyncSettledCreator && (_allSyncSettledCreator = _createAllSettledPromise(createSyncPromise));\n return _allSyncSettledCreator.v(input, timeout);\n}\nfunction createSyncRacePromise(values, timeout) {\n !_raceSyncCreator && (_raceSyncCreator = _createRacePromise(createSyncPromise));\n return _raceSyncCreator.v(values, timeout);\n}\nfunction createSyncAnyPromise(values, timeout) {\n !_anySyncCreator && (_anySyncCreator = _createAnyPromise(createSyncPromise));\n return _anySyncCreator.v(values, timeout);\n}\nvar _defaultIdleTimeout;\nvar _allIdleSettledCreator;\nvar _raceIdleCreator;\nvar _anyIdleCreator;\nfunction setDefaultIdlePromiseTimeout(idleDeadline) {\n _defaultIdleTimeout = idleDeadline;\n}\nvar setDefaultIdleTimeout = setDefaultIdlePromiseTimeout;\nfunction createIdlePromise(executor, timeout) {\n var theTimeout = isUndefined(timeout) ? _defaultIdleTimeout : timeout;\n return _createPromise(createIdlePromise, idleItemProcessor(theTimeout), executor, theTimeout);\n}\nvar createIdleAllPromise = /*#__PURE__*/_createAllPromise(createIdlePromise);\nvar createIdleResolvedPromise = /*#__PURE__*/_createResolvedPromise(createIdlePromise);\nvar createIdleRejectedPromise = /*#__PURE__*/_createRejectedPromise(createIdlePromise);\nfunction createIdleAllSettledPromise(input, timeout) {\n !_allIdleSettledCreator && (_allIdleSettledCreator = _createAllSettledPromise(createIdlePromise));\n return _allIdleSettledCreator.v(input, timeout);\n}\nfunction createIdleRacePromise(values, timeout) {\n !_raceIdleCreator && (_raceIdleCreator = _createRacePromise(createIdlePromise));\n return _raceIdleCreator.v(values, timeout);\n}\nfunction createIdleAnyPromise(values, timeout) {\n !_anyIdleCreator && (_anyIdleCreator = _createAnyPromise(createIdlePromise));\n return _anyIdleCreator.v(values, timeout);\n}\nvar _promiseCreator;\nvar _allSettledCreator;\nvar _raceCreator;\nvar _anyCreator;\nfunction setCreatePromiseImpl(creator) {\n _promiseCreator = creator ? createCachedValue(creator) : null;\n}\nfunction createPromise(executor, timeout) {\n !_promiseCreator && (_promiseCreator = createCachedValue(createNativePromise));\n return _promiseCreator.v.call(this, executor, timeout);\n}\nvar createAllPromise = /*#__PURE__*/_createAllPromise(createPromise);\nvar createResolvedPromise = /*#__PURE__*/_createResolvedPromise(createPromise);\nvar createRejectedPromise = /*#__PURE__*/_createRejectedPromise(createPromise);\nfunction createAllSettledPromise(input, timeout) {\n !_allSettledCreator && (_allSettledCreator = _createAllSettledPromise(createPromise));\n return _allSettledCreator.v(input, timeout);\n}\nfunction createRacePromise(values, timeout) {\n !_raceCreator && (_raceCreator = _createRacePromise(createPromise));\n return _raceCreator.v(values, timeout);\n}\nfunction createAnyPromise(values, timeout) {\n !_anyCreator && (_anyCreator = _createAnyPromise(createPromise));\n return _anyCreator.v(values, timeout);\n}\nfunction createTimeoutPromise(timeout, resolveReject, message) {\n return createPromise(function (resolve, reject) {\n scheduleTimeout(function () {\n (resolveReject ? resolve : reject)(!isUndefined(message) ? message : \"Timeout of \" + timeout + \"ms exceeded\");\n }, timeout);\n });\n}\nfunction _doneChk(isDone, state, value, thisArg) {\n var result = isDone;\n state.res = value;\n if (!result) {\n if (state.isDone && isFunction(state.isDone)) {\n return doAwait(state.isDone.call(thisArg, state), function (done) {\n state.iter++;\n return !!done;\n });\n } else {\n result = !!state.isDone;\n }\n }\n state.iter++;\n return result;\n}\nfunction doWhileAsync(callbackFn, isDoneFn, thisArg) {\n var promise;\n var resolve;\n var reject = function (reason) {\n isDone = true;\n throw reason;\n };\n var isDone = false;\n var state = {\n st: utcNow(),\n iter: 0,\n isDone: isDoneFn || false\n };\n if (callbackFn) {\n var _createPromise_1 = function () {\n return createPromise(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n };\n var _handleAsyncDone_1 = function (done) {\n isDone = !!done;\n if (!isDone) {\n _processNext_1();\n } else {\n resolve(state.res);\n }\n };\n var _processNext_1 = function () {\n while (!isDone) {\n try {\n var cbResult = callbackFn.call(thisArg, state);\n if (isPromiseLike(cbResult)) {\n promise = promise || _createPromise_1();\n doAwait(cbResult, function (res) {\n try {\n doAwait(_doneChk(isDone, state, res, thisArg), _handleAsyncDone_1, reject);\n } catch (e) {\n reject(e);\n }\n }, reject);\n return promise;\n } else {\n var dnRes = _doneChk(isDone, state, cbResult, thisArg);\n if (isPromiseLike(dnRes)) {\n promise = promise || _createPromise_1();\n doAwait(dnRes, _handleAsyncDone_1, reject);\n return promise;\n } else {\n isDone = !!dnRes;\n }\n }\n } catch (e) {\n reject(e);\n return promise;\n }\n }\n if (isDone && resolve) {\n resolve(state.res);\n }\n return promise || state.res;\n };\n return _processNext_1();\n }\n}\nfunction arrForEachAsync(theArray, callbackFn, thisArg) {\n if (theArray) {\n var len_1 = getLength(theArray);\n if (len_1) {\n var isDone = function (state) {\n if (state.iter >= len_1 || state.res === -1) {\n return true;\n }\n };\n return doWhileAsync(function (state) {\n var idx = state.iter;\n if (idx in theArray) {\n return callbackFn.call(thisArg || theArray, theArray[idx], idx, theArray);\n }\n }, isDone);\n }\n }\n}\nvar _iterSymbol;\nvar _iterAsyncSymbol;\nfunction iterForOfAsync(iter, callbackFn, thisArg) {\n var err;\n var iterResult;\n var theIter = iter;\n function onFailed(failed) {\n err = {\n e: failed\n };\n if (theIter.throw) {\n iterResult = null;\n theIter.throw(err);\n }\n throw failed;\n }\n function onFinally() {\n try {\n if (iterResult && !iterResult[DONE]) {\n theIter[RETURN] && theIter[RETURN](iterResult);\n }\n } finally {\n if (err) {\n throw err.e;\n }\n }\n }\n if (iter) {\n if (!isIterator(iter)) {\n !_iterAsyncSymbol && (_iterAsyncSymbol = createCachedValue(getKnownSymbol(0)));\n theIter = iter[_iterAsyncSymbol.v] ? iter[_iterAsyncSymbol.v]() : null;\n if (!theIter) {\n !_iterSymbol && (_iterSymbol = createCachedValue(getKnownSymbol(3)));\n theIter = iter[_iterSymbol.v] ? iter[_iterSymbol.v]() : null;\n }\n }\n if (theIter && isIterator(theIter)) {\n var result = void 0;\n try {\n result = doWhileAsync(function (state) {\n return doAwait(theIter.next(), function (res) {\n iterResult = res;\n if (!res[DONE]) {\n return fnCall(callbackFn, thisArg || theIter, iterResult[VALUE], state.iter, theIter);\n }\n }, function (reason) {\n state.isDone = true;\n onFailed(reason);\n });\n }, function (state) {\n if (!iterResult || iterResult[DONE] || state.res === -1) {\n onFinally();\n return true;\n }\n }, thisArg || theIter);\n if (isPromiseLike(result)) {\n result = doFinally(result.catch(onFailed), onFinally);\n }\n return result;\n } catch (failed) {\n onFailed(failed);\n } finally {\n if (result && !isPromiseLike(result)) {\n onFinally();\n }\n }\n }\n }\n}\nvar REJECT = \"reject\";\nvar REJECTED_ERROR = \"Rejected\";\nvar _schedulerId = 0;\nvar _debugName;\nvar _debugIntState;\nvar _customErrors = {};\nfunction _rejectDone() {}\nfunction _createError(type, evt, message) {\n !_customErrors[type] && (_customErrors[type] = createCustomError(type));\n var now = utcNow();\n return new _customErrors[type](\"Task [\".concat(evt.id, \"] \").concat(message || \"\", \"- \").concat(evt.st ? \"Running\" : \"Waiting\", \": \").concat(_calcTime(now, evt.st || evt.cr)));\n}\nfunction _calcTime(now, start) {\n return (now - start || \"0\") + \" ms\";\n}\nfunction _abortStaleTasks(taskQueue, staleTimeoutPeriod) {\n var now = utcNow();\n var expired = now - staleTimeoutPeriod;\n arrForEach(taskQueue, function (evt) {\n if (evt && !evt.rj && evt.st && evt.st < expired || !evt.st && evt.cr && evt.cr < expired) {\n evt && evt[REJECT](evt.rj || _createError(\"Aborted\", evt, \"Stale \"));\n }\n });\n}\nfunction _removeTask(queue, taskDetail) {\n var idx = arrIndexOf(queue, taskDetail);\n if (idx !== -1) {\n queue.splice(idx, 1);\n }\n}\nfunction _addDebugState(theScheduler, nameFn, stateFn) {\n _debugName = _debugName || {\n toString: function () {\n return \"[[SchedulerName]]\";\n }\n };\n _debugIntState = _debugIntState || {\n toString: function () {\n return \"[[SchedulerState]]\";\n }\n };\n objDefineProp(theScheduler, _debugName, {\n get: nameFn\n });\n objDefineProp(theScheduler, _debugIntState, {\n get: stateFn\n });\n}\nfunction createTaskScheduler(newPromise, name) {\n var _theTask;\n var _running = [];\n var _waiting = [];\n var _staleTimeoutPeriod = 600000;\n var _staleTimeoutCheckPeriod = _staleTimeoutPeriod / 10;\n var _taskCount = 0;\n var _schedulerName = (name ? name + \".\" : \"\") + _schedulerId++;\n var _blockedTimer;\n newPromise = newPromise || createPromise;\n var _startBlockedTimer = function () {\n var hasTasks = getLength(_running) + getLength(_waiting) > 0;\n if (_staleTimeoutPeriod > 0) {\n if (!_blockedTimer) {\n _blockedTimer = scheduleTimeout(function () {\n _abortStaleTasks(_running, _staleTimeoutPeriod);\n _abortStaleTasks(_waiting, _staleTimeoutPeriod);\n _blockedTimer && (_blockedTimer.enabled = getLength(_running) + getLength(_waiting) > 0);\n }, _staleTimeoutCheckPeriod);\n _blockedTimer.unref();\n }\n _blockedTimer && (_blockedTimer.enabled = hasTasks);\n }\n };\n var _queueTask = function (startAction, taskName, timeout) {\n var _a;\n var taskId = _schedulerName + \".\" + _taskCount++;\n if (taskName) {\n taskId += \"-(\" + taskName + \")\";\n }\n var newTask = (_a = {\n id: taskId,\n cr: utcNow(),\n to: timeout\n }, _a[REJECT] = function (reason) {\n newTask.rj = reason || _createError(REJECTED_ERROR, newTask);\n newTask[REJECT] = _rejectDone;\n }, _a);\n if (!_theTask) {\n newTask.p = newPromise(_runTask(newTask, startAction));\n } else {\n newTask.p = _waitForPreviousTask(newTask, _theTask, startAction);\n }\n _theTask = newTask;\n return newTask.p;\n };\n var _runTask = function (taskDetail, startAction) {\n taskDetail.st = utcNow();\n _running.push(taskDetail);\n _startBlockedTimer();\n return function (onTaskResolve, onTaskReject) {\n var _promiseReject = function (reason) {\n taskDetail.rj = taskDetail.rj || reason || _createError(REJECTED_ERROR, taskDetail);\n taskDetail[REJECT] = _rejectDone;\n _doCleanup(taskDetail);\n onTaskResolve = null;\n onTaskReject && onTaskReject(reason);\n onTaskReject = null;\n };\n var taskId = taskDetail.id;\n if (taskDetail.rj) {\n _promiseReject(taskDetail.rj);\n } else {\n taskDetail[REJECT] = _promiseReject;\n try {\n var startResult = startAction(taskId);\n if (taskDetail.to && isPromiseLike(startResult)) {\n taskDetail.t = scheduleTimeout(function () {\n _promiseReject(_createError(\"Timeout\", taskDetail));\n }, taskDetail.to);\n }\n doAwait(startResult, function (theResult) {\n _doCleanup(taskDetail);\n try {\n onTaskResolve && onTaskResolve(theResult);\n } catch (e) {\n onTaskReject && onTaskReject(e);\n }\n onTaskReject = null;\n onTaskResolve = null;\n }, _promiseReject);\n } catch (e) {\n _promiseReject(e);\n }\n }\n };\n };\n var _waitForPreviousTask = function (taskDetail, prevTask, startAction) {\n _waiting.push(taskDetail);\n _startBlockedTimer();\n return newPromise(function (onWaitResolve, onWaitReject) {\n doAwaitResponse(prevTask.p, function () {\n _removeTask(_waiting, taskDetail);\n _runTask(taskDetail, startAction)(onWaitResolve, onWaitReject);\n });\n });\n };\n var _doCleanup = function (taskDetail) {\n _removeTask(_running, taskDetail);\n taskDetail.t && taskDetail.t.cancel();\n taskDetail.t = null;\n if (_theTask && _theTask === taskDetail) {\n _theTask = null;\n if (getLength(_running) + getLength(_waiting) === 0) {\n _blockedTimer && _blockedTimer.cancel();\n _blockedTimer = null;\n }\n }\n };\n var theScheduler = {\n idle: true,\n queue: _queueTask,\n setStaleTimeout: function (staleTimeout, staleCheckPeriod) {\n _blockedTimer && _blockedTimer.cancel();\n _blockedTimer = null;\n _staleTimeoutPeriod = staleTimeout;\n _staleTimeoutCheckPeriod = staleCheckPeriod || staleTimeout / 10;\n _startBlockedTimer();\n }\n };\n objDefine(theScheduler, \"idle\", {\n g: function () {\n return getLength(_running) + getLength(_waiting) === 0;\n }\n });\n _addDebugState(theScheduler, function () {\n return _schedulerName;\n }, function () {\n return {\n l: _theTask,\n r: _running,\n w: _waiting\n };\n });\n return theScheduler;\n}\nvar toStringTagSymbol = getKnownSymbol(11);\nvar PolyPromise = /*#__PURE__*/function () {\n function PolyPromiseImpl(executor) {\n this._$ = createAsyncPromise(executor);\n if (toStringTagSymbol) {\n this[toStringTagSymbol] = \"Promise\";\n }\n objDefineProp(this, \"state\", {\n get: function () {\n return this._$.state;\n }\n });\n }\n PolyPromiseImpl.all = createAsyncAllPromise;\n PolyPromiseImpl.race = createAsyncRacePromise;\n PolyPromiseImpl.any = createAsyncAnyPromise;\n PolyPromiseImpl.reject = createAsyncRejectedPromise;\n PolyPromiseImpl.resolve = createAsyncResolvedPromise;\n PolyPromiseImpl.allSettled = createAsyncAllSettledPromise;\n var theProto = PolyPromiseImpl.prototype;\n theProto.then = function (onResolved, onRejected) {\n return this._$.then(onResolved, onRejected);\n };\n theProto.catch = function (onRejected) {\n return this._$.catch(onRejected);\n };\n theProto.finally = function (onfinally) {\n return this._$.finally(onfinally);\n };\n return PolyPromiseImpl;\n}();\nexport { PolyPromise, arrForEachAsync, createAllPromise, createAllSettledPromise, createAnyPromise, createAsyncAllPromise, createAsyncAllSettledPromise, createAsyncAnyPromise, createAsyncPromise, createAsyncRacePromise, createAsyncRejectedPromise, createAsyncResolvedPromise, createIdleAllPromise, createIdleAllSettledPromise, createIdleAnyPromise, createIdlePromise, createIdleRacePromise, createIdleRejectedPromise, createIdleResolvedPromise, createNativeAllPromise, createNativeAllSettledPromise, createNativeAnyPromise, createNativePromise, createNativeRacePromise, createNativeRejectedPromise, createNativeResolvedPromise, createPromise, createRacePromise, createRejectedPromise, createResolvedPromise, createSyncAllPromise, createSyncAllSettledPromise, createSyncAnyPromise, createSyncPromise, createSyncRacePromise, createSyncRejectedPromise, createSyncResolvedPromise, createTaskScheduler, createTimeoutPromise, doAwait, doAwaitResponse, doFinally, doWhileAsync, iterForOfAsync, setCreatePromiseImpl, setDefaultIdlePromiseTimeout, setDefaultIdleTimeout, setPromiseDebugState };\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// ###################################################################################################################################################\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\n// ###################################################################################################################################################\nexport var UNDEFINED_VALUE = undefined;\nexport var STR_EMPTY = \"\";\nexport var STR_CHANNELS = \"channels\";\nexport var STR_CORE = \"core\";\nexport var STR_CREATE_PERF_MGR = \"createPerfMgr\";\nexport var STR_DISABLED = \"disabled\";\nexport var STR_EXTENSION_CONFIG = \"extensionConfig\";\nexport var STR_EXTENSIONS = \"extensions\";\nexport var STR_PROCESS_TELEMETRY = \"processTelemetry\";\nexport var STR_PRIORITY = \"priority\";\nexport var STR_EVENTS_SENT = \"eventsSent\";\nexport var STR_EVENTS_DISCARDED = \"eventsDiscarded\";\nexport var STR_EVENTS_SEND_REQUEST = \"eventsSendRequest\";\nexport var STR_PERF_EVENT = \"perfEvent\";\nexport var STR_OFFLINE_STORE = \"offlineEventsStored\";\nexport var STR_OFFLINE_SENT = \"offlineBatchSent\";\nexport var STR_OFFLINE_DROP = \"offlineBatchDrop\";\nexport var STR_GET_PERF_MGR = \"getPerfMgr\";\nexport var STR_DOMAIN = \"domain\";\nexport var STR_PATH = \"path\";\nexport var STR_NOT_DYNAMIC_ERROR = \"Not dynamic - \";\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { ObjAssign, ObjClass } from \"@microsoft/applicationinsights-shims\";\nimport { arrForEach, asString as asString21, isArray, isBoolean, isError, isFunction, isNullOrUndefined, isNumber, isObject, isPlainObject, isString, isUndefined, objDeepFreeze, objDefine, objForEachKey, objHasOwn, strIndexOf, strTrim } from \"@nevware21/ts-utils\";\nimport { _DYN_APPLY, _DYN_GET_ALL_RESPONSE_HEA5, _DYN_GET_RESPONSE_HEADER, _DYN_LENGTH, _DYN_NAME, _DYN_REPLACE, _DYN_SPLIT, _DYN_STATUS, _DYN_TO_LOWER_CASE } from \"../__DynamicConstants\";\nimport { STR_EMPTY } from \"./InternalConstants\";\n// RESTRICT and AVOID circular dependencies you should not import other contained modules or export the contents of this file directly\n// Added to help with minification\nvar strGetPrototypeOf = \"getPrototypeOf\";\nvar rCamelCase = /-([a-z])/g;\nvar rNormalizeInvalid = /([^\\w\\d_$])/g;\nvar rLeadingNumeric = /^(\\d+[\\w\\d_$])/;\nexport var _getObjProto = Object[strGetPrototypeOf];\nexport function isNotUndefined(value) {\n return !isUndefined(value);\n}\nexport function isNotNullOrUndefined(value) {\n return !isNullOrUndefined(value);\n}\n/**\r\n * Validates that the string name conforms to the JS IdentifierName specification and if not\r\n * normalizes the name so that it would. This method does not identify or change any keywords\r\n * meaning that if you pass in a known keyword the same value will be returned.\r\n * This is a simplified version\r\n * @param name - The name to validate\r\n */\nexport function normalizeJsName(name) {\n var value = name;\n if (value && isString(value)) {\n // CamelCase everything after the \"-\" and remove the dash\n value = value[_DYN_REPLACE /* @min:%2ereplace */](rCamelCase, function (_all, letter) {\n return letter.toUpperCase();\n });\n value = value[_DYN_REPLACE /* @min:%2ereplace */](rNormalizeInvalid, \"_\");\n value = value[_DYN_REPLACE /* @min:%2ereplace */](rLeadingNumeric, function (_all, match) {\n return \"_\" + match;\n });\n }\n return value;\n}\n/**\r\n * A simple wrapper (for minification support) to check if the value contains the search string.\r\n * @param value - The string value to check for the existence of the search value\r\n * @param search - The value search within the value\r\n */\nexport function strContains(value, search) {\n if (value && search) {\n return strIndexOf(value, search) !== -1;\n }\n return false;\n}\n/**\r\n * Convert a date to I.S.O. format in IE8\r\n */\nexport function toISOString(date) {\n return date && date.toISOString() || \"\";\n}\nexport var deepFreeze = objDeepFreeze;\n/**\r\n * Returns the name of object if it's an Error. Otherwise, returns empty string.\r\n */\nexport function getExceptionName(object) {\n if (isError(object)) {\n return object[_DYN_NAME /* @min:%2ename */];\n }\n return STR_EMPTY;\n}\n/**\r\n * Sets the provided value on the target instance using the field name when the provided chk function returns true, the chk\r\n * function will only be called if the new value is no equal to the original value.\r\n * @param target - The target object\r\n * @param field - The key of the target\r\n * @param value - The value to set\r\n * @param valChk - [Optional] Callback to check the value that if supplied will be called check if the new value can be set\r\n * @param srcChk - [Optional] Callback to check to original value that if supplied will be called if the new value should be set (if allowed)\r\n * @returns The existing or new value, depending what was set\r\n */\nexport function setValue(target, field, value, valChk, srcChk) {\n var theValue = value;\n if (target) {\n theValue = target[field];\n if (theValue !== value && (!srcChk || srcChk(theValue)) && (!valChk || valChk(value))) {\n theValue = value;\n target[field] = theValue;\n }\n }\n return theValue;\n}\n/**\r\n * Returns the current value from the target object if not null or undefined otherwise sets the new value and returns it\r\n * @param target - The target object to return or set the default value\r\n * @param field - The key for the field to set on the target\r\n * @param defValue - [Optional] The value to set if not already present, when not provided a empty object will be added\r\n */\nexport function getSetValue(target, field, defValue) {\n var theValue;\n if (target) {\n theValue = target[field];\n if (!theValue && isNullOrUndefined(theValue)) {\n // Supports having the default as null\n theValue = !isUndefined(defValue) ? defValue : {};\n target[field] = theValue;\n }\n } else {\n // Expanded for performance so we only check defValue if required\n theValue = !isUndefined(defValue) ? defValue : {};\n }\n return theValue;\n}\nfunction _createProxyFunction(source, funcName) {\n var srcFunc = null;\n var src = null;\n if (isFunction(source)) {\n srcFunc = source;\n } else {\n src = source;\n }\n return function () {\n // Capture the original arguments passed to the method\n var originalArguments = arguments;\n if (srcFunc) {\n src = srcFunc();\n }\n if (src) {\n return src[funcName][_DYN_APPLY /* @min:%2eapply */](src, originalArguments);\n }\n };\n}\n/**\r\n * Effectively assigns all enumerable properties (not just own properties) and functions (including inherited prototype) from\r\n * the source object to the target, it attempts to use proxy getters / setters (if possible) and proxy functions to avoid potential\r\n * implementation issues by assigning prototype functions as instance ones\r\n *\r\n * This method is the primary method used to \"update\" the snippet proxy with the ultimate implementations.\r\n *\r\n * Special ES3 Notes:\r\n * Updates (setting) of direct property values on the target or indirectly on the source object WILL NOT WORK PROPERLY, updates to the\r\n * properties of \"referenced\" object will work (target.context.newValue = 10 => will be reflected in the source.context as it's the\r\n * same object). ES3 Failures: assigning target.myProp = 3 -> Won't change source.myProp = 3, likewise the reverse would also fail.\r\n * @param target - The target object to be assigned with the source properties and functions\r\n * @param source - The source object which will be assigned / called by setting / calling the targets proxies\r\n * @param chkSet - An optional callback to determine whether a specific property/function should be proxied\r\n */\nexport function proxyAssign(target, source, chkSet) {\n if (target && source && isObject(target) && isObject(source)) {\n var _loop_1 = function (field) {\n if (isString(field)) {\n var value = source[field];\n if (isFunction(value)) {\n if (!chkSet || chkSet(field, true, source, target)) {\n // Create a proxy function rather than just copying the (possible) prototype to the new object as an instance function\n target[field] = _createProxyFunction(source, field);\n }\n } else if (!chkSet || chkSet(field, false, source, target)) {\n if (objHasOwn(target, field)) {\n // Remove any previous instance property\n delete target[field];\n }\n objDefine(target, field, {\n g: function () {\n return source[field];\n },\n s: function (theValue) {\n source[field] = theValue;\n }\n });\n }\n }\n };\n // effectively apply/proxy full source to the target instance\n for (var field in source) {\n _loop_1(field);\n }\n }\n return target;\n}\n/**\r\n * Creates a proxy function on the target which internally will call the source version with all arguments passed to the target method.\r\n *\r\n * @param target - The target object to be assigned with the source properties and functions\r\n * @param name - The function name that will be added on the target\r\n * @param source - The source object which will be assigned / called by setting / calling the targets proxies\r\n * @param theFunc - The function name on the source that will be proxied on the target\r\n * @param overwriteTarget - If `false` this will not replace any pre-existing name otherwise (the default) it will overwrite any existing name\r\n */\nexport function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {\n if (target && name && source) {\n if (overwriteTarget !== false || isUndefined(target[name])) {\n target[name] = _createProxyFunction(source, theFunc);\n }\n }\n}\n/**\r\n * Creates proxy functions on the target which internally will call the source version with all arguments passed to the target method.\r\n *\r\n * @param target - The target object to be assigned with the source properties and functions\r\n * @param source - The source object which will be assigned / called by setting / calling the targets proxies\r\n * @param functionsToProxy - An array of function names that will be proxied on the target\r\n * @param overwriteTarget - If false this will not replace any pre-existing name otherwise (the default) it will overwrite any existing name\r\n */\nexport function proxyFunctions(target, source, functionsToProxy, overwriteTarget) {\n if (target && source && isObject(target) && isArray(functionsToProxy)) {\n arrForEach(functionsToProxy, function (theFuncName) {\n if (isString(theFuncName)) {\n proxyFunctionAs(target, theFuncName, source, theFuncName, overwriteTarget);\n }\n });\n }\n return target;\n}\n/**\r\n * Simpler helper to create a dynamic class that implements the interface and populates the values with the defaults.\r\n * Only instance properties (hasOwnProperty) values are copied from the defaults to the new instance\r\n * @param defaults - Simple helper\r\n */\nexport function createClassFromInterface(defaults) {\n return /** @class */function () {\n function class_1() {\n var _this = this;\n if (defaults) {\n objForEachKey(defaults, function (field, value) {\n _this[field] = value;\n });\n }\n }\n return class_1;\n }();\n}\n/**\r\n * A helper function to assist with JIT performance for objects that have properties added / removed dynamically\r\n * this is primarily for chromium based browsers and has limited effects on Firefox and none of IE. Only call this\r\n * function after you have finished \"updating\" the object, calling this within loops reduces or defeats the benefits.\r\n * This helps when iterating using for..in, objKeys() and objForEach()\r\n * @param theObject - The object to be optimized if possible\r\n */\nexport function optimizeObject(theObject) {\n // V8 Optimization to cause the JIT compiler to create a new optimized object for looking up the own properties\n // primarily for object with <= 19 properties for >= 20 the effect is reduced or non-existent\n if (theObject && ObjAssign) {\n theObject = ObjClass(ObjAssign({}, theObject));\n }\n return theObject;\n}\nexport function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {\n // Variables\n var theArgs = arguments;\n var extended = theArgs[0] || {};\n var argLen = theArgs[_DYN_LENGTH /* @min:%2elength */];\n var deep = false;\n var idx = 1;\n // Check for \"Deep\" flag\n if (argLen > 0 && isBoolean(extended)) {\n deep = extended;\n extended = theArgs[idx] || {};\n idx++;\n }\n // Handle case when target is a string or something (possible in deep copy)\n if (!isObject(extended)) {\n extended = {};\n }\n // Loop through each remaining object and conduct a merge\n for (; idx < argLen; idx++) {\n var arg = theArgs[idx];\n var isArgArray = isArray(arg);\n var isArgObj = isObject(arg);\n for (var prop in arg) {\n var propOk = isArgArray && prop in arg || isArgObj && objHasOwn(arg, prop);\n if (!propOk) {\n continue;\n }\n var newValue = arg[prop];\n var isNewArray = void 0;\n // If deep merge and property is an object, merge properties\n if (deep && newValue && ((isNewArray = isArray(newValue)) || isPlainObject(newValue))) {\n // Grab the current value of the extended object\n var clone = extended[prop];\n if (isNewArray) {\n if (!isArray(clone)) {\n // We can't \"merge\" an array with a non-array so overwrite the original\n clone = [];\n }\n } else if (!isPlainObject(clone)) {\n // We can't \"merge\" an object with a non-object\n clone = {};\n }\n // Never move the original objects always clone them\n newValue = objExtend(deep, clone, newValue);\n }\n // Assign the new (or previous) value (unless undefined)\n if (newValue !== undefined) {\n extended[prop] = newValue;\n }\n }\n }\n return extended;\n}\nexport var asString = asString21;\nexport function isFeatureEnabled(feature, cfg) {\n var rlt = false;\n var ft = cfg && cfg.featureOptIn && cfg.featureOptIn[feature];\n if (feature && ft) {\n var mode = ft.mode;\n // NOTE: None will be considered as true\n rlt = mode == 3 /* FeatureOptInMode.enable */ || mode == 1 /* FeatureOptInMode.none */;\n }\n return rlt;\n}\nexport function getResponseText(xhr) {\n try {\n return xhr.responseText;\n } catch (e) {\n // Best effort, as XHR may throw while XDR wont so just ignore\n }\n return null;\n}\nexport function formatErrorMessageXdr(xdr, message) {\n if (xdr) {\n return \"XDomainRequest,Response:\" + getResponseText(xdr) || \"\";\n }\n return message;\n}\nexport function formatErrorMessageXhr(xhr, message) {\n if (xhr) {\n return \"XMLHttpRequest,Status:\" + xhr[_DYN_STATUS /* @min:%2estatus */] + \",Response:\" + getResponseText(xhr) || xhr.response || \"\";\n }\n return message;\n}\nexport function prependTransports(theTransports, newTransports) {\n if (newTransports) {\n if (isNumber(newTransports)) {\n theTransports = [newTransports].concat(theTransports);\n } else if (isArray(newTransports)) {\n theTransports = newTransports.concat(theTransports);\n }\n }\n return theTransports;\n}\nvar strDisabledPropertyName = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\nvar strWithCredentials = \"withCredentials\";\nvar strTimeout = \"timeout\";\n/**\r\n * Create and open an XMLHttpRequest object\r\n * @param method - The request method\r\n * @param urlString - The url\r\n * @param withCredentials - Option flag indicating that credentials should be sent\r\n * @param disabled - Optional flag indicating that the XHR object should be marked as disabled and not tracked (default is false)\r\n * @param isSync - Optional flag indicating if the instance should be a synchronous request (defaults to false)\r\n * @param timeout - Optional value identifying the timeout value that should be assigned to the XHR request\r\n * @returns A new opened XHR request\r\n */\nexport function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {\n if (disabled === void 0) {\n disabled = false;\n }\n if (isSync === void 0) {\n isSync = false;\n }\n function _wrapSetXhrProp(xhr, prop, value) {\n try {\n xhr[prop] = value;\n } catch (e) {\n // - Wrapping as depending on the environment setting the property may fail (non-terminally)\n }\n }\n var xhr = new XMLHttpRequest();\n if (disabled) {\n // Tag the instance so it's not tracked (trackDependency)\n // If the environment has locked down the XMLHttpRequest (preventExtensions and/or freeze), this would\n // cause the request to fail and we no telemetry would be sent\n _wrapSetXhrProp(xhr, strDisabledPropertyName, disabled);\n }\n if (withCredentials) {\n // Some libraries require that the withCredentials flag is set \"before\" open and\n // - Wrapping as IE 10 has started throwing when setting before open\n _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);\n }\n xhr.open(method, urlString, !isSync);\n if (withCredentials) {\n // withCredentials should be set AFTER open (https://xhr.spec.whatwg.org/#the-withcredentials-attribute)\n // And older firefox instances from 11+ will throw for sync events (current versions don't) which happens during unload processing\n _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);\n }\n // Only set the timeout for asynchronous requests as\n // \"Timeout shouldn't be used for synchronous XMLHttpRequests requests used in a document environment or it will throw an InvalidAccessError exception.\"\"\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout\n if (!isSync && timeout) {\n _wrapSetXhrProp(xhr, strTimeout, timeout);\n }\n return xhr;\n}\n/**\r\n* Converts the XHR getAllResponseHeaders to a map containing the header key and value.\r\n* @internal\r\n*/\n// tslint:disable-next-line: align\nexport function convertAllHeadersToMap(headersString) {\n var headers = {};\n if (isString(headersString)) {\n var headersArray = strTrim(headersString)[_DYN_SPLIT /* @min:%2esplit */](/[\\r\\n]+/);\n arrForEach(headersArray, function (headerEntry) {\n if (headerEntry) {\n var idx = headerEntry.indexOf(\": \");\n if (idx !== -1) {\n // The new spec has the headers returning all as lowercase -- but not all browsers do this yet\n var header = strTrim(headerEntry.substring(0, idx))[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\n var value = strTrim(headerEntry.substring(idx + 1));\n headers[header] = value;\n } else {\n headers[strTrim(headerEntry)] = 1;\n }\n }\n });\n }\n return headers;\n}\n/**\r\n* append the XHR headers.\r\n* @internal\r\n*/\nexport function _appendHeader(theHeaders, xhr, name) {\n if (!theHeaders[name] && xhr && xhr[_DYN_GET_RESPONSE_HEADER /* @min:%2egetResponseHeader */]) {\n var value = xhr[_DYN_GET_RESPONSE_HEADER /* @min:%2egetResponseHeader */](name);\n if (value) {\n theHeaders[name] = strTrim(value);\n }\n }\n return theHeaders;\n}\nvar STR_KILL_DURATION_HEADER = \"kill-duration\";\nvar STR_KILL_DURATION_SECONDS_HEADER = \"kill-duration-seconds\";\nvar STR_TIME_DELTA_HEADER = \"time-delta-millis\";\n/**\r\n* get the XHR getAllResponseHeaders.\r\n* @internal\r\n*/\nexport function _getAllResponseHeaders(xhr, isOneDs) {\n var theHeaders = {};\n if (!xhr[_DYN_GET_ALL_RESPONSE_HEA5 /* @min:%2egetAllResponseHeaders */]) {\n // Firefox 2-63 doesn't have getAllResponseHeaders function but it does have getResponseHeader\n // Only call these if getAllResponseHeaders doesn't exist, otherwise we can get invalid response errors\n // as collector is not currently returning the correct header to allow JS to access these headers\n if (!!isOneDs) {\n theHeaders = _appendHeader(theHeaders, xhr, STR_TIME_DELTA_HEADER);\n theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_HEADER);\n theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_SECONDS_HEADER);\n }\n } else {\n theHeaders = convertAllHeadersToMap(xhr[_DYN_GET_ALL_RESPONSE_HEA5 /* @min:%2egetAllResponseHeaders */]());\n }\n return theHeaders;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n\"use strict\";\n\nimport { getGlobal, strShimObject, strShimPrototype, strShimUndefined } from \"@microsoft/applicationinsights-shims\";\nimport { getDocument, getInst, getNavigator, getPerformance, hasNavigator, isFunction, isString, isUndefined, strIndexOf } from \"@nevware21/ts-utils\";\nimport { _DYN_LENGTH, _DYN_NAME, _DYN_SPLIT, _DYN_TO_LOWER_CASE, _DYN_USER_AGENT } from \"../__DynamicConstants\";\nimport { strContains } from \"./HelperFuncs\";\nimport { STR_EMPTY } from \"./InternalConstants\";\n/**\r\n * This file exists to hold environment utilities that are required to check and\r\n * validate the current operating environment. Unless otherwise required, please\r\n * only use defined methods (functions) in this class so that users of these\r\n * functions/properties only need to include those that are used within their own modules.\r\n */\nvar strDocumentMode = \"documentMode\";\nvar strLocation = \"location\";\nvar strConsole = \"console\";\nvar strJSON = \"JSON\";\nvar strCrypto = \"crypto\";\nvar strMsCrypto = \"msCrypto\";\nvar strReactNative = \"ReactNative\";\nvar strMsie = \"msie\";\nvar strTrident = \"trident/\";\nvar strXMLHttpRequest = \"XMLHttpRequest\";\nvar _isTrident = null;\nvar _navUserAgentCheck = null;\nvar _enableMocks = false;\nvar _useXDomainRequest = null;\nvar _beaconsSupported = null;\nfunction _hasProperty(theClass, property) {\n var supported = false;\n if (theClass) {\n try {\n supported = property in theClass;\n if (!supported) {\n var proto = theClass[strShimPrototype];\n if (proto) {\n supported = property in proto;\n }\n }\n } catch (e) {\n // Do Nothing\n }\n if (!supported) {\n try {\n var tmp = new theClass();\n supported = !isUndefined(tmp[property]);\n } catch (e) {\n // Do Nothing\n }\n }\n }\n return supported;\n}\n/**\r\n * Enable the lookup of test mock objects if requested\r\n * @param enabled\r\n */\nexport function setEnableEnvMocks(enabled) {\n _enableMocks = enabled;\n}\n/**\r\n * Returns the global location object if it is present otherwise null.\r\n * This helper is used to access the location object without causing an exception\r\n * \"Uncaught ReferenceError: location is not defined\"\r\n */\nexport function getLocation(checkForMock) {\n if (checkForMock && _enableMocks) {\n var mockLocation = getInst(\"__mockLocation\");\n if (mockLocation) {\n return mockLocation;\n }\n }\n if (typeof location === strShimObject && location) {\n return location;\n }\n return getInst(strLocation);\n}\n/**\r\n * Returns the global console object\r\n */\nexport function getConsole() {\n if (typeof console !== strShimUndefined) {\n return console;\n }\n return getInst(strConsole);\n}\n/**\r\n * Checks if JSON object is available, this is required as we support the API running without a\r\n * window /document (eg. Node server, electron webworkers) and if we attempt to assign a history\r\n * object to a local variable or pass as an argument an \"Uncaught ReferenceError: JSON is not defined\"\r\n * exception will be thrown.\r\n * Defined as a function to support lazy / late binding environments.\r\n */\nexport function hasJSON() {\n return Boolean(typeof JSON === strShimObject && JSON || getInst(strJSON) !== null);\n}\n/**\r\n * Returns the global JSON object if it is present otherwise null.\r\n * This helper is used to access the JSON object without causing an exception\r\n * \"Uncaught ReferenceError: JSON is not defined\"\r\n */\nexport function getJSON() {\n if (hasJSON()) {\n return JSON || getInst(strJSON);\n }\n return null;\n}\n/**\r\n * Returns the crypto object if it is present otherwise null.\r\n * This helper is used to access the crypto object from the current\r\n * global instance which could be window or globalThis for a web worker\r\n */\nexport function getCrypto() {\n return getInst(strCrypto);\n}\n/**\r\n * Returns the crypto object if it is present otherwise null.\r\n * This helper is used to access the crypto object from the current\r\n * global instance which could be window or globalThis for a web worker\r\n */\nexport function getMsCrypto() {\n return getInst(strMsCrypto);\n}\n/**\r\n * Returns whether the environment is reporting that we are running in a React Native Environment\r\n */\nexport function isReactNative() {\n // If running in React Native, navigator.product will be populated\n var nav = getNavigator();\n if (nav && nav.product) {\n return nav.product === strReactNative;\n }\n return false;\n}\n/**\r\n * Identifies whether the current environment appears to be IE\r\n */\nexport function isIE() {\n var nav = getNavigator();\n if (nav && (nav[_DYN_USER_AGENT /* @min:%2euserAgent */] !== _navUserAgentCheck || _isTrident === null)) {\n // Added to support test mocking of the user agent\n _navUserAgentCheck = nav[_DYN_USER_AGENT /* @min:%2euserAgent */];\n var userAgent = (_navUserAgentCheck || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\n _isTrident = strContains(userAgent, strMsie) || strContains(userAgent, strTrident);\n }\n return _isTrident;\n}\n/**\r\n * Gets IE version returning the document emulation mode if we are running on IE, or null otherwise\r\n */\nexport function getIEVersion(userAgentStr) {\n if (userAgentStr === void 0) {\n userAgentStr = null;\n }\n if (!userAgentStr) {\n var navigator_1 = getNavigator() || {};\n userAgentStr = navigator_1 ? (navigator_1.userAgent || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() : STR_EMPTY;\n }\n var ua = (userAgentStr || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\n // Also check for documentMode in case X-UA-Compatible meta tag was included in HTML.\n if (strContains(ua, strMsie)) {\n var doc = getDocument() || {};\n return Math.max(parseInt(ua[_DYN_SPLIT /* @min:%2esplit */](strMsie)[1]), doc[strDocumentMode] || 0);\n } else if (strContains(ua, strTrident)) {\n var tridentVer = parseInt(ua[_DYN_SPLIT /* @min:%2esplit */](strTrident)[1]);\n if (tridentVer) {\n return tridentVer + 4;\n }\n }\n return null;\n}\nexport function isSafari(userAgentStr) {\n if (!userAgentStr || !isString(userAgentStr)) {\n var navigator_2 = getNavigator() || {};\n userAgentStr = navigator_2 ? (navigator_2.userAgent || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() : STR_EMPTY;\n }\n var ua = (userAgentStr || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\n return strIndexOf(ua, \"safari\") >= 0;\n}\n/**\r\n * Checks if HTML5 Beacons are supported in the current environment.\r\n * @param useCached - [Optional] used for testing to bypass the cached lookup, when `true` this will\r\n * cause the cached global to be reset.\r\n * @returns True if supported, false otherwise.\r\n */\nexport function isBeaconsSupported(useCached) {\n if (_beaconsSupported === null || useCached === false) {\n _beaconsSupported = hasNavigator() && Boolean(getNavigator().sendBeacon);\n }\n return _beaconsSupported;\n}\n/**\r\n * Checks if the Fetch API is supported in the current environment.\r\n * @param withKeepAlive - [Optional] If True, check if fetch is available and it supports the keepalive feature, otherwise only check if fetch is supported\r\n * @returns True if supported, otherwise false\r\n */\nexport function isFetchSupported(withKeepAlive) {\n var isSupported = false;\n try {\n isSupported = !!getInst(\"fetch\");\n var request = getInst(\"Request\");\n if (isSupported && withKeepAlive && request) {\n isSupported = _hasProperty(request, \"keepalive\");\n }\n } catch (e) {\n // Just Swallow any failure during availability checks\n }\n return isSupported;\n}\nexport function useXDomainRequest() {\n if (_useXDomainRequest === null) {\n _useXDomainRequest = typeof XDomainRequest !== strShimUndefined;\n if (_useXDomainRequest && isXhrSupported()) {\n _useXDomainRequest = _useXDomainRequest && !_hasProperty(getInst(strXMLHttpRequest), \"withCredentials\");\n }\n }\n return _useXDomainRequest;\n}\n/**\r\n * Checks if XMLHttpRequest is supported\r\n * @returns True if supported, otherwise false\r\n */\nexport function isXhrSupported() {\n var isSupported = false;\n try {\n var xmlHttpRequest = getInst(strXMLHttpRequest);\n isSupported = !!xmlHttpRequest;\n } catch (e) {\n // Just Swallow any failure during availability checks\n }\n return isSupported;\n}\nfunction _getNamedValue(values, name) {\n if (values) {\n for (var i = 0; i < values[_DYN_LENGTH /* @min:%2elength */]; i++) {\n var value = values[i];\n if (value[_DYN_NAME /* @min:%2ename */]) {\n if (value[_DYN_NAME /* @min:%2ename */] === name) {\n return value;\n }\n }\n }\n }\n return {};\n}\n/**\r\n * Helper function to fetch the named meta-tag from the page.\r\n * @param name\r\n */\nexport function findMetaTag(name) {\n var doc = getDocument();\n if (doc && name) {\n // Look for a meta-tag\n return _getNamedValue(doc.querySelectorAll(\"meta\"), name).content;\n }\n return null;\n}\n/**\r\n * Helper function to fetch the named server timing value from the page response (first navigation event).\r\n * @param name\r\n */\nexport function findNamedServerTiming(name) {\n var value;\n var perf = getPerformance();\n if (perf) {\n // Try looking for a server-timing header\n var navPerf = perf.getEntriesByType(\"navigation\") || [];\n value = _getNamedValue((navPerf[_DYN_LENGTH /* @min:%2elength */] > 0 ? navPerf[0] : {}).serverTiming, name).description;\n }\n return value;\n}\n// TODO: should reuse this method for analytics plugin\nexport function dispatchEvent(target, evnt) {\n if (target && target.dispatchEvent && evnt) {\n target.dispatchEvent(evnt);\n return true;\n }\n return false;\n}\nexport function createCustomDomEvent(eventName, details) {\n var event = null;\n var detail = {\n detail: details || null\n };\n if (isFunction(CustomEvent)) {\n // Use CustomEvent constructor when available\n event = new CustomEvent(eventName, detail);\n } else {\n // CustomEvent has no constructor in IE\n var doc = getDocument();\n if (doc && doc.createEvent) {\n event = doc.createEvent(\"CustomEvent\");\n event.initCustomEvent(eventName, true, true, detail);\n }\n }\n return event;\n}\nexport function sendCustomEvent(evtName, cfg, customDetails) {\n var global = getGlobal();\n if (global && global.CustomEvent) {\n try {\n var details = {\n cfg: cfg || null,\n customDetails: customDetails || null\n };\n return dispatchEvent(global, createCustomDomEvent(evtName, details));\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n }\n return false;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { utcNow } from \"@nevware21/ts-utils\";\nimport { _DYN_LENGTH } from \"../__DynamicConstants\";\nimport { getCrypto, getMsCrypto, isIE } from \"./EnvUtils\";\nimport { STR_EMPTY } from \"./InternalConstants\";\nvar UInt32Mask = 0x100000000;\nvar MaxUInt32 = 0xffffffff;\nvar SEED1 = 123456789;\nvar SEED2 = 987654321;\n// MWC based Random generator (for IE)\nvar _mwcSeeded = false;\nvar _mwcW = SEED1;\nvar _mwcZ = SEED2;\n// Takes any integer\nfunction _mwcSeed(seedValue) {\n if (seedValue < 0) {\n // Make sure we end up with a positive number and not -ve one.\n seedValue >>>= 0;\n }\n _mwcW = SEED1 + seedValue & MaxUInt32;\n _mwcZ = SEED2 - seedValue & MaxUInt32;\n _mwcSeeded = true;\n}\nfunction _autoSeedMwc() {\n // Simple initialization using default Math.random() - So we inherit any entropy from the browser\n // and bitwise XOR with the current milliseconds\n try {\n var now = utcNow() & 0x7fffffff;\n _mwcSeed((Math.random() * UInt32Mask ^ now) + now);\n } catch (e) {\n // Don't crash if something goes wrong\n }\n}\n/**\r\n * Generate a random value between 0 and maxValue, max value should be limited to a 32-bit maximum.\r\n * So maxValue(16) will produce a number from 0..16 (range of 17)\r\n * @param maxValue\r\n */\nexport function randomValue(maxValue) {\n if (maxValue > 0) {\n return Math.floor(random32() / MaxUInt32 * (maxValue + 1)) >>> 0;\n }\n return 0;\n}\n/**\r\n * generate a random 32-bit number (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), defaults un-unsigned.\r\n * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)\r\n */\nexport function random32(signed) {\n var value = 0;\n var c = getCrypto() || getMsCrypto();\n if (c && c.getRandomValues) {\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\n value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;\n }\n if (value === 0 && isIE()) {\n // For IE 6, 7, 8 (especially on XP) Math.random is not very random\n if (!_mwcSeeded) {\n // Set the seed for the Mwc algorithm\n _autoSeedMwc();\n }\n // Don't use Math.random for IE\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\n value = mwcRandom32() & MaxUInt32;\n }\n if (value === 0) {\n // Make sure the number is converted into the specified range (-0x80000000..0x7FFFFFFF)\n value = Math.floor(UInt32Mask * Math.random() | 0);\n }\n if (!signed) {\n // Make sure we end up with a positive number and not -ve one.\n value >>>= 0;\n }\n return value;\n}\n/**\r\n * Seed the MWC random number generator with the specified seed or a random value\r\n * @param value - optional the number to used as the seed, if undefined, null or zero a random value will be chosen\r\n */\nexport function mwcRandomSeed(value) {\n if (!value) {\n _autoSeedMwc();\n } else {\n _mwcSeed(value);\n }\n}\n/**\r\n * Generate a random 32-bit number between (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), using MWC (Multiply with carry)\r\n * instead of Math.random() defaults to un-signed.\r\n * Used as a replacement random generator for IE to avoid issues with older IE instances.\r\n * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)\r\n */\nexport function mwcRandom32(signed) {\n _mwcZ = 36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16) & MaxUInt32;\n _mwcW = 18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16) & MaxUInt32;\n var value = (_mwcZ << 16) + (_mwcW & 0xFFFF) >>> 0 & MaxUInt32 | 0;\n if (!signed) {\n // Make sure we end up with a positive number and not -ve one.\n value >>>= 0;\n }\n return value;\n}\n/**\r\n * Generate random base64 id string.\r\n * The default length is 22 which is 132-bits so almost the same as a GUID but as base64 (the previous default was 5)\r\n * @param maxLength - Optional value to specify the length of the id to be generated, defaults to 22\r\n */\nexport function newId(maxLength) {\n if (maxLength === void 0) {\n maxLength = 22;\n }\n var base64chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n // Start with an initial random number, consuming the value in reverse byte order\n var number = random32() >>> 0; // Make sure it's a +ve number\n var chars = 0;\n var result = STR_EMPTY;\n while (result[_DYN_LENGTH /* @min:%2elength */] < maxLength) {\n chars++;\n result += base64chars.charAt(number & 0x3F);\n number >>>= 6; // Zero fill with right shift\n if (chars === 5) {\n // 5 base64 characters === 30 bits so we don't have enough bits for another base64 char\n // So add on another 30 bits and make sure it's +ve\n number = (random32() << 2 & 0xFFFFFFFF | number & 0x03) >>> 0;\n chars = 0; // We need to reset the number every 5 chars (30 bits)\n }\n }\n return result;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { objDefine } from \"@nevware21/ts-utils\";\nimport { _DYN_NODE_TYPE } from \"../__DynamicConstants\";\nimport { normalizeJsName } from \"./HelperFuncs\";\nimport { STR_EMPTY } from \"./InternalConstants\";\nimport { newId } from \"./RandomHelper\";\nvar version = '3.3.4';\nvar instanceName = \".\" + newId(6);\nvar _dataUid = 0;\n// Accepts only:\n// - Node\n// - Node.ELEMENT_NODE\n// - Node.DOCUMENT_NODE\n// - Object\n// - Any\nfunction _canAcceptData(target) {\n return target[_DYN_NODE_TYPE /* @min:%2enodeType */] === 1 || target[_DYN_NODE_TYPE /* @min:%2enodeType */] === 9 || !+target[_DYN_NODE_TYPE /* @min:%2enodeType */];\n}\nfunction _getCache(data, target) {\n var theCache = target[data.id];\n if (!theCache) {\n theCache = {};\n try {\n if (_canAcceptData(target)) {\n objDefine(target, data.id, {\n e: false,\n v: theCache\n });\n }\n } catch (e) {\n // Not all environments allow extending all objects, so just ignore the cache in those cases\n }\n }\n return theCache;\n}\nexport function createUniqueNamespace(name, includeVersion) {\n if (includeVersion === void 0) {\n includeVersion = false;\n }\n return normalizeJsName(name + _dataUid++ + (includeVersion ? \".\" + version : STR_EMPTY) + instanceName);\n}\nexport function createElmNodeData(name) {\n var data = {\n id: createUniqueNamespace(\"_aiData-\" + (name || STR_EMPTY) + \".\" + version),\n accept: function (target) {\n return _canAcceptData(target);\n },\n get: function (target, name, defValue, addDefault) {\n var theCache = target[data.id];\n if (!theCache) {\n if (addDefault) {\n // Side effect is adds the cache\n theCache = _getCache(data, target);\n theCache[normalizeJsName(name)] = defValue;\n }\n return defValue;\n }\n return theCache[normalizeJsName(name)];\n },\n kill: function (target, name) {\n if (target && target[name]) {\n try {\n delete target[name];\n } catch (e) {\n // Just cleaning up, so if this fails -- ignore\n }\n }\n }\n };\n return data;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { asString, isArray, isDefined, isNullOrUndefined, isObject, isPlainObject, isUndefined, objForEachKey, objHasOwn } from \"@nevware21/ts-utils\";\nimport { _DYN_BLK_VAL, _DYN_LENGTH, _DYN_RD_ONLY } from \"../__DynamicConstants\";\nfunction _isConfigDefaults(value) {\n return value && isObject(value) && (value.isVal || value.fb || objHasOwn(value, \"v\") || objHasOwn(value, \"mrg\") || objHasOwn(value, \"ref\") || value.set);\n}\nfunction _getDefault(dynamicHandler, theConfig, cfgDefaults) {\n var defValue;\n var isDefaultValid = cfgDefaults.dfVal || isDefined;\n // There is a fallback config key so try and grab that first\n if (theConfig && cfgDefaults.fb) {\n var fallbacks = cfgDefaults.fb;\n if (!isArray(fallbacks)) {\n fallbacks = [fallbacks];\n }\n for (var lp = 0; lp < fallbacks[_DYN_LENGTH /* @min:%2elength */]; lp++) {\n var fallback = fallbacks[lp];\n var fbValue = theConfig[fallback];\n if (isDefaultValid(fbValue)) {\n defValue = fbValue;\n } else if (dynamicHandler) {\n // Needed to ensure that the fallback value (and potentially) new field is also dynamic even if null/undefined\n fbValue = dynamicHandler.cfg[fallback];\n if (isDefaultValid(fbValue)) {\n defValue = fbValue;\n }\n // Needed to ensure that the fallback value (and potentially) new field is also dynamic even if null/undefined\n dynamicHandler.set(dynamicHandler.cfg, asString(fallback), fbValue);\n }\n if (isDefaultValid(defValue)) {\n // We have a valid default so break out of the look\n break;\n }\n }\n }\n // If the value is still not defined and we have a default value then use that\n if (!isDefaultValid(defValue) && isDefaultValid(cfgDefaults.v)) {\n defValue = cfgDefaults.v;\n }\n return defValue;\n}\n/**\r\n * Recursively resolve the default value\r\n * @param dynamicHandler\r\n * @param theConfig\r\n * @param cfgDefaults\r\n * @returns\r\n */\nfunction _resolveDefaultValue(dynamicHandler, theConfig, cfgDefaults) {\n var theValue = cfgDefaults;\n if (cfgDefaults && _isConfigDefaults(cfgDefaults)) {\n theValue = _getDefault(dynamicHandler, theConfig, cfgDefaults);\n }\n if (theValue) {\n if (_isConfigDefaults(theValue)) {\n theValue = _resolveDefaultValue(dynamicHandler, theConfig, theValue);\n }\n var newValue_1;\n if (isArray(theValue)) {\n newValue_1 = [];\n newValue_1[_DYN_LENGTH /* @min:%2elength */] = theValue[_DYN_LENGTH /* @min:%2elength */];\n } else if (isPlainObject(theValue)) {\n newValue_1 = {};\n }\n if (newValue_1) {\n objForEachKey(theValue, function (key, value) {\n if (value && _isConfigDefaults(value)) {\n value = _resolveDefaultValue(dynamicHandler, theConfig, value);\n }\n newValue_1[key] = value;\n });\n theValue = newValue_1;\n }\n }\n return theValue;\n}\n/**\r\n * Applies the default value on the config property and makes sure that it's dynamic\r\n * @param theConfig\r\n * @param name\r\n * @param defaultValue\r\n */\nexport function _applyDefaultValue(dynamicHandler, theConfig, name, defaultValue) {\n // Resolve the initial config value from the provided value or use the defined default\n var isValid;\n var setFn;\n var defValue;\n var cfgDefaults = defaultValue;\n var mergeDf;\n var reference;\n var readOnly;\n var blkDynamicValue;\n if (_isConfigDefaults(cfgDefaults)) {\n // looks like a IConfigDefault\n isValid = cfgDefaults.isVal;\n setFn = cfgDefaults.set;\n readOnly = cfgDefaults[_DYN_RD_ONLY /* @min:%2erdOnly */];\n blkDynamicValue = cfgDefaults[_DYN_BLK_VAL /* @min:%2eblkVal */];\n mergeDf = cfgDefaults.mrg;\n reference = cfgDefaults.ref;\n if (!reference && isUndefined(reference)) {\n reference = !!mergeDf;\n }\n defValue = _getDefault(dynamicHandler, theConfig, cfgDefaults);\n } else {\n defValue = defaultValue;\n }\n if (blkDynamicValue) {\n // Mark the property so that any value assigned will be blocked from conversion, we need to do this\n // before assigning or fetching the value to ensure it's not converted\n dynamicHandler[_DYN_BLK_VAL /* @min:%2eblkVal */](theConfig, name);\n }\n // Set the value to the default value;\n var theValue;\n var usingDefault = true;\n var cfgValue = theConfig[name];\n // try and get and user provided values\n if (cfgValue || !isNullOrUndefined(cfgValue)) {\n // Use the defined theConfig[name] value\n theValue = cfgValue;\n usingDefault = false;\n // The values are different and we have a special default value check, which is used to\n // override config values like empty strings to continue using the default\n if (isValid && theValue !== defValue && !isValid(theValue)) {\n theValue = defValue;\n usingDefault = true;\n }\n if (setFn) {\n theValue = setFn(theValue, defValue, theConfig);\n usingDefault = theValue === defValue;\n }\n }\n if (!usingDefault) {\n if (isPlainObject(theValue) || isArray(defValue)) {\n // we are using the user supplied value and it's an object\n if (mergeDf && defValue && (isPlainObject(defValue) || isArray(defValue))) {\n // Resolve/apply the defaults\n objForEachKey(defValue, function (dfName, dfValue) {\n // Sets the value and makes it dynamic (if it doesn't already exist)\n _applyDefaultValue(dynamicHandler, theValue, dfName, dfValue);\n });\n }\n }\n } else if (defValue) {\n // Just resolve the default\n theValue = _resolveDefaultValue(dynamicHandler, theConfig, defValue);\n } else {\n theValue = defValue;\n }\n // if (theValue && usingDefault && (isPlainObject(theValue) || isArray(theValue))) {\n // theValue = _cfgDeepCopy(theValue);\n // }\n // Needed to ensure that the (potentially) new field is dynamic even if null/undefined\n dynamicHandler.set(theConfig, name, theValue);\n if (reference) {\n dynamicHandler.ref(theConfig, name);\n }\n if (readOnly) {\n dynamicHandler[_DYN_RD_ONLY /* @min:%2erdOnly */](theConfig, name);\n }\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { isArray, isPlainObject, objForEachKey, symbolFor, throwTypeError } from \"@nevware21/ts-utils\";\nimport { _DYN_LENGTH } from \"../__DynamicConstants\";\n// Using Symbol.for so that if the same symbol was already created it would be returned\n// To handle multiple instances using potentially different versions we are not using\n// createUniqueNamespace()\nexport var CFG_HANDLER_LINK = symbolFor(\"[[ai_dynCfg_1]]\");\n/**\r\n * @internal\r\n * @ignore\r\n * The symbol to tag objects / arrays with if they should not be converted\r\n */\nvar BLOCK_DYNAMIC = symbolFor(\"[[ai_blkDynCfg_1]]\");\n/**\r\n * @internal\r\n * @ignore\r\n * The symbol to tag objects to indicate that when included into the configuration that\r\n * they should be converted into a trackable dynamic object.\r\n */\nvar FORCE_DYNAMIC = symbolFor(\"[[ai_frcDynCfg_1]]\");\nexport function _cfgDeepCopy(source) {\n if (source) {\n var target_1;\n if (isArray(source)) {\n target_1 = [];\n target_1[_DYN_LENGTH /* @min:%2elength */] = source[_DYN_LENGTH /* @min:%2elength */];\n } else if (isPlainObject(source)) {\n target_1 = {};\n }\n if (target_1) {\n // Copying index values by property name as the extensionConfig can be an array or object\n objForEachKey(source, function (key, value) {\n // Perform a deep copy of the object\n target_1[key] = _cfgDeepCopy(value);\n });\n return target_1;\n }\n }\n return source;\n}\n/**\r\n * @internal\r\n * Get the dynamic config handler if the value is already dynamic\r\n * @param value\r\n * @returns\r\n */\nexport function getDynamicConfigHandler(value) {\n if (value) {\n var handler = value[CFG_HANDLER_LINK] || value;\n if (handler.cfg && (handler.cfg === value || handler.cfg[CFG_HANDLER_LINK] === handler)) {\n return handler;\n }\n }\n return null;\n}\n/**\r\n * Mark the provided value so that if it's included into the configuration it will NOT have\r\n * its properties converted into a dynamic (reactive) object. If the object is not a plain object\r\n * or an array (ie. a class) this function has not affect as only Objects and Arrays are converted\r\n * into dynamic objects in the dynamic configuration.\r\n *\r\n * When you have tagged a value as both {@link forceDynamicConversion} and blocked force will take precedence.\r\n *\r\n * You should only need to use this function, if you are creating dynamic \"classes\" from objects\r\n * which confirm to the require interface. A common case for this is during unit testing where it's\r\n * easier to create mock extensions.\r\n *\r\n * If `value` is falsy (null / undefined / 0 / empty string etc) it will not be tagged and\r\n * if there is an exception adding the property to the value (because its frozen etc) the\r\n * exception will be swallowed\r\n *\r\n * @example\r\n * ```ts\r\n * // This is a valid \"extension\", but it is technically an object\r\n * // So when included in the config.extensions it WILL be cloned and then\r\n * // converted into a dynamic object, where all of its properties will become\r\n * // get/set object properties and will be tracked. While this WILL still\r\n * // function, when attempt to use a mocking framework on top of this the\r\n * // functions are now technically get accessors which return a function\r\n * // and this can cause some mocking frameworks to fail.\r\n * let mockChannel = {\r\n * pause: () => { },\r\n* resume: () => { },\r\n* teardown: () => { },\r\n* flush: (async: any, callBack: any) => { },\r\n* processTelemetry: (env: any) => { },\r\n* setNextPlugin: (next: any) => { },\r\n* initialize: (config: any, core: any, extensions: any) => { },\r\n* identifier: \"testChannel\",\r\n* priority: 1003\r\n* };\r\n * ```\r\n * @param value - The object that you want to block from being converted into a\r\n * trackable dynamic object\r\n * @returns The original value\r\n */\nexport function blockDynamicConversion(value) {\n if (value && (isPlainObject(value) || isArray(value))) {\n try {\n value[BLOCK_DYNAMIC] = true;\n } catch (e) {\n // Don't throw for this case as it's an ask only\n }\n }\n return value;\n}\n/**\r\n * This is the reverse case of {@link blockDynamicConversion} in that this will tag an\r\n * object to indicate that it should always be converted into a dynamic trackable object\r\n * even when not an object or array. So all properties of this object will become\r\n * get / set accessor functions.\r\n *\r\n * When you have tagged a value as both {@link forceDynamicConversion} and blocked force will take precedence.\r\n *\r\n * If `value` is falsy (null / undefined / 0 / empty string etc) it will not be tagged and\r\n * if there is an exception adding the property to the value (because its frozen etc) the\r\n * exception will be swallowed.\r\n * @param value - The object that should be tagged and converted if included into a dynamic\r\n * configuration.\r\n * @returns The original value\r\n */\nexport function forceDynamicConversion(value) {\n if (value) {\n try {\n value[FORCE_DYNAMIC] = true;\n } catch (e) {\n // Don't throw for this case as it's an ask only\n }\n }\n return value;\n}\n/**\r\n * @internal\r\n * @ignore\r\n * Helper function to check whether an object can or should be converted into a dynamic\r\n * object.\r\n * @param value - The object to check whether it should be converted\r\n * @returns `true` if the value should be converted otherwise `false`.\r\n */\nexport function _canMakeDynamic(getFunc, state, value) {\n var result = false;\n // Object must exist and be truthy\n if (value && !getFunc[state.blkVal]) {\n // Tagged as always convert\n result = value[FORCE_DYNAMIC];\n // Check that it's not explicitly tagged as blocked\n if (!result && !value[BLOCK_DYNAMIC]) {\n // Only convert plain objects or arrays by default\n result = isPlainObject(value) || isArray(value);\n }\n }\n return result;\n}\n/**\r\n * Throws an invalid access exception\r\n * @param message - The message to include in the exception\r\n */\nexport function throwInvalidAccess(message) {\n throwTypeError(\"InvalidAccess:\" + message);\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { arrForEach, arrIndexOf, dumpObj, isArray, objDefine, objDefineProp, objForEachKey, objGetOwnPropertyDescriptor } from \"@nevware21/ts-utils\";\nimport { UNDEFINED_VALUE } from \"../JavaScriptSDK/InternalConstants\";\nimport { _DYN_APPLY, _DYN_HDLR, _DYN_LOGGER, _DYN_PUSH, _DYN_SPLICE, _DYN_THROW_INTERNAL } from \"../__DynamicConstants\";\nimport { CFG_HANDLER_LINK, _canMakeDynamic, blockDynamicConversion, throwInvalidAccess } from \"./DynamicSupport\";\nvar arrayMethodsToPatch = [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"];\nexport var _throwDynamicError = function (logger, name, desc, e) {\n logger && logger[_DYN_THROW_INTERNAL /* @min:%2ethrowInternal */](3 /* eLoggingSeverity.DEBUG */, 108 /* _eInternalMessageId.DynamicConfigException */, \"\".concat(desc, \" [\").concat(name, \"] failed - \") + dumpObj(e));\n};\nfunction _patchArray(state, target, name) {\n if (isArray(target)) {\n // Monkey Patch the methods that might change the array\n arrForEach(arrayMethodsToPatch, function (method) {\n var orgMethod = target[method];\n target[method] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var result = orgMethod[_DYN_APPLY /* @min:%2eapply */](this, args);\n // items may be added, removed or moved so need to make some new dynamic properties\n _makeDynamicObject(state, target, name, \"Patching\");\n return result;\n };\n });\n }\n}\nfunction _getOwnPropGetter(target, name) {\n var propDesc = objGetOwnPropertyDescriptor(target, name);\n return propDesc && propDesc.get;\n}\nfunction _createDynamicProperty(state, theConfig, name, value) {\n // Does not appear to be dynamic so lets make it so\n var detail = {\n n: name,\n h: [],\n trk: function (handler) {\n if (handler && handler.fn) {\n if (arrIndexOf(detail.h, handler) === -1) {\n // Add this handler to the collection that should be notified when the value changes\n detail.h[_DYN_PUSH /* @min:%2epush */](handler);\n }\n state.trk(handler, detail);\n }\n },\n clr: function (handler) {\n var idx = arrIndexOf(detail.h, handler);\n if (idx !== -1) {\n detail.h[_DYN_SPLICE /* @min:%2esplice */](idx, 1);\n }\n }\n };\n // Flag to optimize lookup response time by avoiding additional function calls\n var checkDynamic = true;\n var isObjectOrArray = false;\n function _getProperty() {\n if (checkDynamic) {\n isObjectOrArray = isObjectOrArray || _canMakeDynamic(_getProperty, state, value);\n // Make sure that if it's an object that we make it dynamic\n if (value && !value[CFG_HANDLER_LINK] && isObjectOrArray) {\n // It doesn't look like it's already dynamic so lets make sure it's converted the object into a dynamic Config as well\n value = _makeDynamicObject(state, value, name, \"Converting\");\n }\n // If it needed to be converted it now has been\n checkDynamic = false;\n }\n // If there is an active handler then add it to the tracking set of handlers\n var activeHandler = state.act;\n if (activeHandler) {\n detail.trk(activeHandler);\n }\n return value;\n }\n // Tag this getter as our dynamic property and provide shortcut for notifying a change\n _getProperty[state.prop] = {\n chng: function () {\n state.add(detail);\n }\n };\n function _setProperty(newValue) {\n if (value !== newValue) {\n if (!!_getProperty[state.ro] && !state.upd) {\n // field is marked as readonly so return false\n throwInvalidAccess(\"[\" + name + \"] is read-only:\" + dumpObj(theConfig));\n }\n if (checkDynamic) {\n isObjectOrArray = isObjectOrArray || _canMakeDynamic(_getProperty, state, value);\n checkDynamic = false;\n }\n // The value must be a plain object or an array to enforce the reference (in-place updates)\n var isReferenced = isObjectOrArray && _getProperty[state.rf];\n if (isObjectOrArray) {\n // We are about to replace a plain object or an array\n if (isReferenced) {\n // Reassign the properties from the current value to the same properties from the newValue\n // This will set properties not in the newValue to undefined\n objForEachKey(value, function (key) {\n value[key] = newValue ? newValue[key] : UNDEFINED_VALUE;\n });\n // Now assign / re-assign value with all of the keys from newValue\n try {\n objForEachKey(newValue, function (key, theValue) {\n _setDynamicProperty(state, value, key, theValue);\n });\n // Now drop newValue so when we assign value later it keeps the existing reference\n newValue = value;\n } catch (e) {\n // Unable to convert to dynamic property so just leave as non-dynamic\n _throwDynamicError((state.hdlr || {})[_DYN_LOGGER /* @min:%2elogger */], name, \"Assigning\", e);\n // Mark as not an object or array so we don't try and do this again\n isObjectOrArray = false;\n }\n } else if (value && value[CFG_HANDLER_LINK]) {\n // As we are replacing the value, if it's already dynamic then we need to notify the listeners\n // for every property it has already\n objForEachKey(value, function (key) {\n // Check if the value is dynamic\n var getter = _getOwnPropGetter(value, key);\n if (getter) {\n // And if it is tell it's listeners that the value has changed\n var valueState = getter[state.prop];\n valueState && valueState.chng();\n }\n });\n }\n }\n if (newValue !== value) {\n var newIsObjectOrArray = newValue && _canMakeDynamic(_getProperty, state, newValue);\n if (!isReferenced && newIsObjectOrArray) {\n // As the newValue is an object/array lets preemptively make it dynamic\n newValue = _makeDynamicObject(state, newValue, name, \"Converting\");\n }\n // Now assign the internal \"value\" to the newValue\n value = newValue;\n isObjectOrArray = newIsObjectOrArray;\n }\n // Cause any listeners to be scheduled for notification\n state.add(detail);\n }\n }\n objDefine(theConfig, detail.n, {\n g: _getProperty,\n s: _setProperty\n });\n}\nexport function _setDynamicProperty(state, target, name, value) {\n if (target) {\n // To be a dynamic property it needs to have a get function\n var getter = _getOwnPropGetter(target, name);\n var isDynamic = getter && !!getter[state.prop];\n if (!isDynamic) {\n _createDynamicProperty(state, target, name, value);\n } else {\n // Looks like it's already dynamic just assign the new value\n target[name] = value;\n }\n }\n return target;\n}\nexport function _setDynamicPropertyState(state, target, name, flags) {\n if (target) {\n // To be a dynamic property it needs to have a get function\n var getter = _getOwnPropGetter(target, name);\n var isDynamic = getter && !!getter[state.prop];\n var inPlace = flags && flags[0 /* _eSetDynamicPropertyFlags.inPlace */];\n var rdOnly = flags && flags[1 /* _eSetDynamicPropertyFlags.readOnly */];\n var blkProp = flags && flags[2 /* _eSetDynamicPropertyFlags.blockDynamicProperty */];\n if (!isDynamic) {\n if (blkProp) {\n try {\n // Attempt to mark the target as blocked from conversion\n blockDynamicConversion(target);\n } catch (e) {\n _throwDynamicError((state.hdlr || {})[_DYN_LOGGER /* @min:%2elogger */], name, \"Blocking\", e);\n }\n }\n try {\n // Make sure it's dynamic so that we can tag the property as per the state\n _setDynamicProperty(state, target, name, target[name]);\n getter = _getOwnPropGetter(target, name);\n } catch (e) {\n // Unable to convert to dynamic property so just leave as non-dynamic\n _throwDynamicError((state.hdlr || {})[_DYN_LOGGER /* @min:%2elogger */], name, \"State\", e);\n }\n }\n // Assign the optional flags if true\n if (inPlace) {\n getter[state.rf] = inPlace;\n }\n if (rdOnly) {\n getter[state.ro] = rdOnly;\n }\n if (blkProp) {\n getter[state.blkVal] = true;\n }\n }\n return target;\n}\nexport function _makeDynamicObject(state, target, name, desc) {\n try {\n // Assign target with new value properties (converting into dynamic properties in the process)\n objForEachKey(target, function (key, value) {\n // Assign and/or make the property dynamic\n _setDynamicProperty(state, target, key, value);\n });\n if (!target[CFG_HANDLER_LINK]) {\n // Link the config back to the dynamic config details\n objDefineProp(target, CFG_HANDLER_LINK, {\n get: function () {\n return state[_DYN_HDLR /* @min:%2ehdlr */];\n }\n });\n _patchArray(state, target, name);\n }\n } catch (e) {\n // Unable to convert to dynamic property so just leave as non-dynamic\n _throwDynamicError((state.hdlr || {})[_DYN_LOGGER /* @min:%2elogger */], name, desc, e);\n }\n return target;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { arrForEach, arrIndexOf, dumpObj, newSymbol, scheduleTimeout } from \"@nevware21/ts-utils\";\nimport { throwAggregationError } from \"../JavaScriptSDK/AggregationError\";\nimport { _DYN_BLK_VAL, _DYN_CANCEL, _DYN_HDLR, _DYN_LENGTH, _DYN_LOGGER, _DYN_NOTIFY, _DYN_PUSH, _DYN_RD_ONLY, _DYN_SET_DF, _DYN_THROW_INTERNAL } from \"../__DynamicConstants\";\nvar symPrefix = \"[[ai_\";\nvar symPostfix = \"]]\";\nexport function _createState(cfgHandler) {\n var _a;\n var dynamicPropertySymbol = newSymbol(symPrefix + \"get\" + cfgHandler.uid + symPostfix);\n var dynamicPropertyReadOnly = newSymbol(symPrefix + \"ro\" + cfgHandler.uid + symPostfix);\n var dynamicPropertyReferenced = newSymbol(symPrefix + \"rf\" + cfgHandler.uid + symPostfix);\n var dynamicPropertyBlockValue = newSymbol(symPrefix + \"blkVal\" + cfgHandler.uid + symPostfix);\n var dynamicPropertyDetail = newSymbol(symPrefix + \"dtl\" + cfgHandler.uid + symPostfix);\n var _waitingHandlers = null;\n var _watcherTimer = null;\n var theState;\n function _useHandler(activeHandler, callback) {\n var prevWatcher = theState.act;\n try {\n theState.act = activeHandler;\n if (activeHandler && activeHandler[dynamicPropertyDetail]) {\n // Clear out the previously tracked details for this handler, so that access are re-evaluated\n arrForEach(activeHandler[dynamicPropertyDetail], function (detail) {\n detail.clr(activeHandler);\n });\n activeHandler[dynamicPropertyDetail] = [];\n }\n callback({\n cfg: cfgHandler.cfg,\n set: cfgHandler.set.bind(cfgHandler),\n setDf: cfgHandler[_DYN_SET_DF /* @min:%2esetDf */].bind(cfgHandler),\n ref: cfgHandler.ref.bind(cfgHandler),\n rdOnly: cfgHandler[_DYN_RD_ONLY /* @min:%2erdOnly */].bind(cfgHandler)\n });\n } catch (e) {\n var logger = cfgHandler[_DYN_LOGGER /* @min:%2elogger */];\n if (logger) {\n // Don't let one individual failure break everyone\n logger[_DYN_THROW_INTERNAL /* @min:%2ethrowInternal */](1 /* eLoggingSeverity.CRITICAL */, 107 /* _eInternalMessageId.ConfigWatcherException */, dumpObj(e));\n }\n // Re-throw the exception so that any true \"error\" is reported back to the called\n throw e;\n } finally {\n theState.act = prevWatcher || null;\n }\n }\n function _notifyWatchers() {\n if (_waitingHandlers) {\n var notifyHandlers = _waitingHandlers;\n _waitingHandlers = null;\n // Stop any timer as we are running them now anyway\n _watcherTimer && _watcherTimer[_DYN_CANCEL /* @min:%2ecancel */]();\n _watcherTimer = null;\n var watcherFailures_1 = [];\n // Now run the handlers\n arrForEach(notifyHandlers, function (handler) {\n if (handler) {\n if (handler[dynamicPropertyDetail]) {\n arrForEach(handler[dynamicPropertyDetail], function (detail) {\n // Clear out this handler from previously tracked details, so that access are re-evaluated\n detail.clr(handler);\n });\n handler[dynamicPropertyDetail] = null;\n }\n // The handler may have self removed as part of another handler so re-check\n if (handler.fn) {\n try {\n _useHandler(handler, handler.fn);\n } catch (e) {\n // Don't let a single failing watcher cause other watches to fail\n watcherFailures_1[_DYN_PUSH /* @min:%2epush */](e);\n }\n }\n }\n });\n // During notification we may have had additional updates -- so notify those updates as well\n if (_waitingHandlers) {\n try {\n _notifyWatchers();\n } catch (e) {\n watcherFailures_1[_DYN_PUSH /* @min:%2epush */](e);\n }\n }\n if (watcherFailures_1[_DYN_LENGTH /* @min:%2elength */] > 0) {\n throwAggregationError(\"Watcher error(s): \", watcherFailures_1);\n }\n }\n }\n function _addWatcher(detail) {\n if (detail && detail.h[_DYN_LENGTH /* @min:%2elength */] > 0) {\n if (!_waitingHandlers) {\n _waitingHandlers = [];\n }\n if (!_watcherTimer) {\n _watcherTimer = scheduleTimeout(function () {\n _watcherTimer = null;\n _notifyWatchers();\n }, 0);\n }\n // Add all of the handlers for this detail (if not already present) - using normal for-loop for performance\n for (var idx = 0; idx < detail.h[_DYN_LENGTH /* @min:%2elength */]; idx++) {\n var handler = detail.h[idx];\n // Add this handler to the collection of handlers to re-execute\n if (handler && arrIndexOf(_waitingHandlers, handler) === -1) {\n _waitingHandlers[_DYN_PUSH /* @min:%2epush */](handler);\n }\n }\n }\n }\n function _trackHandler(handler, detail) {\n if (handler) {\n var details = handler[dynamicPropertyDetail] = handler[dynamicPropertyDetail] || [];\n if (arrIndexOf(details, detail) === -1) {\n // If this detail is not already listed as tracked then add it so that we re-evaluate it's usage\n details[_DYN_PUSH /* @min:%2epush */](detail);\n }\n }\n }\n theState = (_a = {\n prop: dynamicPropertySymbol,\n ro: dynamicPropertyReadOnly,\n rf: dynamicPropertyReferenced\n }, _a[_DYN_BLK_VAL /* @min:blkVal */] = dynamicPropertyBlockValue, _a[_DYN_HDLR /* @min:hdlr */] = cfgHandler, _a.add = _addWatcher, _a[_DYN_NOTIFY /* @min:notify */] = _notifyWatchers, _a.use = _useHandler, _a.trk = _trackHandler, _a);\n return theState;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { dumpObj, isUndefined, objDefine, objForEachKey } from \"@nevware21/ts-utils\";\nimport { createUniqueNamespace } from \"../JavaScriptSDK/DataCacheHelper\";\nimport { STR_NOT_DYNAMIC_ERROR } from \"../JavaScriptSDK/InternalConstants\";\nimport { _DYN_BLK_VAL, _DYN_LOGGER, _DYN_NOTIFY, _DYN_RD_ONLY, _DYN_SET_DF, _DYN_THROW_INTERNAL, _DYN_WARN_TO_CONSOLE, _DYN_WATCH } from \"../__DynamicConstants\";\nimport { _applyDefaultValue } from \"./ConfigDefaults\";\nimport { _makeDynamicObject, _setDynamicProperty, _setDynamicPropertyState, _throwDynamicError } from \"./DynamicProperty\";\nimport { _createState } from \"./DynamicState\";\nimport { CFG_HANDLER_LINK, _cfgDeepCopy, getDynamicConfigHandler, throwInvalidAccess } from \"./DynamicSupport\";\n/**\r\n * Identifies a function which will be re-called whenever any of it's accessed configuration values\r\n * change.\r\n * @param configHandler - The callback that will be called for the initial request and then whenever any\r\n * accessed configuration changes are identified.\r\n */\nfunction _createAndUseHandler(state, configHandler) {\n var handler = {\n fn: configHandler,\n rm: function () {\n // Clear all references to the handler so it can be garbage collected\n // This will also cause this handler to never get called and eventually removed\n handler.fn = null;\n state = null;\n configHandler = null;\n }\n };\n objDefine(handler, \"toJSON\", {\n v: function () {\n return \"WatcherHandler\" + (handler.fn ? \"\" : \"[X]\");\n }\n });\n state.use(handler, configHandler);\n return handler;\n}\n/**\r\n * Creates the dynamic config handler and associates with the target config as the root object\r\n * @param target - The config that you want to be root of the dynamic config\r\n * @param inPlace - Should the passed config be converted in-place or a new proxy returned\r\n * @returns The existing dynamic handler or a new instance with the provided config values\r\n */\nfunction _createDynamicHandler(logger, target, inPlace) {\n var _a;\n var dynamicHandler = getDynamicConfigHandler(target);\n if (dynamicHandler) {\n // The passed config is already dynamic so return it's tracker\n return dynamicHandler;\n }\n var uid = createUniqueNamespace(\"dyncfg\", true);\n var newTarget = target && inPlace !== false ? target : _cfgDeepCopy(target);\n var theState;\n function _notifyWatchers() {\n theState[_DYN_NOTIFY /* @min:%2enotify */]();\n }\n function _setValue(target, name, value) {\n try {\n target = _setDynamicProperty(theState, target, name, value);\n } catch (e) {\n // Unable to convert to dynamic property so just leave as non-dynamic\n _throwDynamicError(logger, name, \"Setting value\", e);\n }\n return target[name];\n }\n function _watch(configHandler) {\n return _createAndUseHandler(theState, configHandler);\n }\n function _block(configHandler, allowUpdate) {\n theState.use(null, function (details) {\n var prevUpd = theState.upd;\n try {\n if (!isUndefined(allowUpdate)) {\n theState.upd = allowUpdate;\n }\n configHandler(details);\n } finally {\n theState.upd = prevUpd;\n }\n });\n }\n function _ref(target, name) {\n var _a;\n // Make sure it's dynamic and mark as referenced with it's current value\n return _setDynamicPropertyState(theState, target, name, (_a = {}, _a[0 /* _eSetDynamicPropertyFlags.inPlace */] = true, _a))[name];\n }\n function _rdOnly(target, name) {\n var _a;\n // Make sure it's dynamic and mark as readonly with it's current value\n return _setDynamicPropertyState(theState, target, name, (_a = {}, _a[1 /* _eSetDynamicPropertyFlags.readOnly */] = true, _a))[name];\n }\n function _blkPropValue(target, name) {\n var _a;\n // Make sure it's dynamic and mark as readonly with it's current value\n return _setDynamicPropertyState(theState, target, name, (_a = {}, _a[2 /* _eSetDynamicPropertyFlags.blockDynamicProperty */] = true, _a))[name];\n }\n function _applyDefaults(theConfig, defaultValues) {\n if (defaultValues) {\n // Resolve/apply the defaults\n objForEachKey(defaultValues, function (name, value) {\n // Sets the value and makes it dynamic (if it doesn't already exist)\n _applyDefaultValue(cfgHandler, theConfig, name, value);\n });\n }\n return theConfig;\n }\n var cfgHandler = (_a = {\n uid: null,\n cfg: newTarget\n }, _a[_DYN_LOGGER /* @min:logger */] = logger, _a[_DYN_NOTIFY /* @min:notify */] = _notifyWatchers, _a.set = _setValue, _a[_DYN_SET_DF /* @min:setDf */] = _applyDefaults, _a[_DYN_WATCH /* @min:watch */] = _watch, _a.ref = _ref, _a[_DYN_RD_ONLY /* @min:rdOnly */] = _rdOnly, _a[_DYN_BLK_VAL /* @min:blkVal */] = _blkPropValue, _a._block = _block, _a);\n objDefine(cfgHandler, \"uid\", {\n c: false,\n e: false,\n w: false,\n v: uid\n });\n theState = _createState(cfgHandler);\n // Setup tracking for all defined default keys\n _makeDynamicObject(theState, newTarget, \"config\", \"Creating\");\n return cfgHandler;\n}\n/**\r\n * Log an invalid access message to the console\r\n * @param message\r\n */\nfunction _logInvalidAccess(logger, message) {\n if (logger) {\n logger[_DYN_WARN_TO_CONSOLE /* @min:%2ewarnToConsole */](message);\n logger[_DYN_THROW_INTERNAL /* @min:%2ethrowInternal */](2 /* eLoggingSeverity.WARNING */, 108 /* _eInternalMessageId.DynamicConfigException */, message);\n } else {\n // We don't have a logger so just throw an exception\n throwInvalidAccess(message);\n }\n}\n/**\r\n * Create or return a dynamic version of the passed config, if it is not already dynamic\r\n * @param config - The config to be converted into a dynamic config\r\n * @param defaultConfig - The default values to apply on the config if the properties don't already exist\r\n * @param inPlace - Should the config be converted in-place into a dynamic config or a new instance returned, defaults to true\r\n * @returns The dynamic config handler for the config (whether new or existing)\r\n */\nexport function createDynamicConfig(config, defaultConfig, logger, inPlace) {\n var dynamicHandler = _createDynamicHandler(logger, config || {}, inPlace);\n if (defaultConfig) {\n dynamicHandler[_DYN_SET_DF /* @min:%2esetDf */](dynamicHandler.cfg, defaultConfig);\n }\n return dynamicHandler;\n}\n/**\r\n * Watch and track changes for accesses to the current config, the provided config MUST already be\r\n * a dynamic config or a child accessed via the dynamic config\r\n * @param config\r\n * @param configHandler\r\n * @param logger - The logger instance to use if there is no existing handler\r\n * @returns A watcher handler instance that can be used to remove itself when being unloaded\r\n * @throws TypeError if the provided config is not a dynamic config instance\r\n */\nexport function onConfigChange(config, configHandler, logger) {\n var handler = config[CFG_HANDLER_LINK] || config;\n if (handler.cfg && (handler.cfg === config || handler.cfg[CFG_HANDLER_LINK] === handler)) {\n return handler[_DYN_WATCH /* @min:%2ewatch */](configHandler);\n }\n _logInvalidAccess(logger, STR_NOT_DYNAMIC_ERROR + dumpObj(config));\n return createDynamicConfig(config, null, logger)[_DYN_WATCH /* @min:%2ewatch */](configHandler);\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { createPromise, doAwaitResponse } from \"@nevware21/ts-async\";\nimport { arrSlice, getLength } from \"@nevware21/ts-utils\";\nimport { _DYN_UNLOAD } from \"../__DynamicConstants\";\n/**\r\n * Run the unload function of the target object if it exists\r\n * @param target - The target object that contains the unload function\r\n * @param isAsync - The caller identifies whether it is expecting the operation to complete synchronously or asynchronously. Even\r\n * if the caller is not waiting the operation may still be performed asynchronously depending on the component and the reverse is\r\n * also true.\r\n * @returns The result of the target function\r\n */\nexport function runTargetUnload(target, isAsync) {\n if (target && target[_DYN_UNLOAD /* @min:%2eunload */]) {\n return target[_DYN_UNLOAD /* @min:%2eunload */](isAsync);\n }\n}\n/**\r\n * Call the unload function on all targets handling any returned [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * / Promise before calling the next targets unload\r\n * @param targets - An array of the targets to unload\r\n * @param isAsync - The caller identifies whether it is expecting the operations to complete synchronously or asynchronously. Even\r\n * if the caller is not waiting the operation may still be performed asynchronously depending on the component and the reverse is\r\n * also true.\r\n * @param done - Optional callback function to call once all of the unload functions have been called.\r\n */\nexport function doUnloadAll(targets, isAsync, done) {\n var result;\n if (!done) {\n result = createPromise(function (resolved) {\n done = resolved;\n });\n }\n if (targets && getLength(targets) > 0) {\n doAwaitResponse(runTargetUnload(targets[0], isAsync), function () {\n doUnloadAll(arrSlice(targets, 1), isAsync, done);\n });\n } else {\n done();\n }\n return result;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nexport var ChannelControllerPriority = 500;\nexport var DisabledPropertyName = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\n// export const SampleRate = \"sampleRate\";\n// export const ProcessLegacy = \"ProcessLegacy\";\n// export const HttpMethod = \"http.method\";\n// export const DEFAULT_BREEZE_ENDPOINT = \"https://dc.services.visualstudio.com\";\n// export const DEFAULT_BREEZE_PATH = \"/v2/track\";\n// export const strNotSpecified = \"not_specified\";\n// export const strIkey = \"iKey\";\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { asString, isBoolean, isFunction, isNullOrUndefined, isString } from \"@nevware21/ts-utils\";\nimport { STR_EMPTY } from \"../JavaScriptSDK/InternalConstants\";\nimport { _DYN_BLK_VAL, _DYN_TO_LOWER_CASE } from \"../__DynamicConstants\";\n/**\r\n * @internal\r\n * @ignore\r\n * @param str\r\n * @param defaultValue\r\n * @returns\r\n */\nfunction _stringToBoolOrDefault(theValue, defaultValue, theConfig) {\n if (!theValue && isNullOrUndefined(theValue)) {\n return defaultValue;\n }\n if (isBoolean(theValue)) {\n return theValue;\n }\n return asString(theValue)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() === \"true\";\n}\n/**\r\n * Helper which returns an IConfigDefaultCheck instance with the field defined as an object\r\n * that should be merged\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @returns a new IConfigDefaultCheck structure\r\n */\nexport function cfgDfMerge(defaultValue) {\n return {\n mrg: true,\n v: defaultValue\n };\n}\n/**\r\n * Helper which returns an IConfigDefaultCheck instance with the provided field set function\r\n * @param setter - The IConfigCheckFn function to validate the user provided value\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @returns a new IConfigDefaultCheck structure\r\n */\nexport function cfgDfSet(setter, defaultValue) {\n return {\n set: setter,\n v: defaultValue\n };\n}\n/**\r\n * Helper which returns an IConfigDefaultCheck instance with the provided field validator\r\n * @param validator - The IConfigCheckFn function to validate the user provided value\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @param fallBackName - The fallback configuration name if the current value is not available\r\n * @returns a new IConfigDefaultCheck structure\r\n */\nexport function cfgDfValidate(validator, defaultValue, fallBackName) {\n return {\n fb: fallBackName,\n isVal: validator,\n v: defaultValue\n };\n}\n/**\r\n * Helper which returns an IConfigDefaultCheck instance that will validate and convert the user\r\n * provided value to a boolean from a string or boolean value\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @param fallBackName - The fallback configuration name if the current value is not available\r\n * @returns a new IConfigDefaultCheck structure\r\n */\nexport function cfgDfBoolean(defaultValue, fallBackName) {\n return {\n fb: fallBackName,\n set: _stringToBoolOrDefault,\n v: !!defaultValue\n };\n}\n/**\r\n * Helper which returns an IConfigDefaultCheck instance that will validate that the user\r\n * provided value is a function.\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @returns a new IConfigDefaultCheck structure\r\n */\nexport function cfgDfFunc(defaultValue) {\n return {\n isVal: isFunction,\n v: defaultValue || null\n };\n}\n/**\r\n * Helper which returns an IConfigDefaultCheck instance that will validate that the user\r\n * provided value is a function.\r\n * @param defaultValue - The default string value to apply it not provided or it's not valid, defaults to an empty string\r\n * @returns a new IConfigDefaultCheck structure\r\n */\nexport function cfgDfString(defaultValue) {\n return {\n isVal: isString,\n v: asString(defaultValue || STR_EMPTY)\n };\n}\n/**\r\n * Helper which returns an IConfigDefaultCheck instance identifying that value associated with this property\r\n * should not have it's properties converted into a dynamic config properties.\r\n * @param defaultValue - The default value to apply it not provided or it's not valid\r\n * @returns a new IConfigDefaultCheck structure\r\n */\nexport function cfgDfBlockPropValue(defaultValue) {\n var _a;\n return _a = {}, _a[_DYN_BLK_VAL /* @min:blkVal */] = true, _a.v = defaultValue, _a;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { getInst } from \"@nevware21/ts-utils\";\nimport { _DYN_APPLY, _DYN_LENGTH } from \"../__DynamicConstants\";\nimport { STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_EVENTS_SENT, STR_PERF_EVENT } from \"./InternalConstants\";\nvar listenerFuncs = [STR_EVENTS_SENT, STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_PERF_EVENT];\nvar _aiNamespace = null;\nvar _debugListener;\nfunction _listenerProxyFunc(name, config) {\n return function () {\n var args = arguments;\n var dbgExt = getDebugExt(config);\n if (dbgExt) {\n var listener = dbgExt.listener;\n if (listener && listener[name]) {\n listener[name][_DYN_APPLY /* @min:%2eapply */](listener, args);\n }\n }\n };\n}\nfunction _getExtensionNamespace() {\n // Cache the lookup of the global namespace object\n var target = getInst(\"Microsoft\");\n if (target) {\n _aiNamespace = target[\"ApplicationInsights\"];\n }\n return _aiNamespace;\n}\nexport function getDebugExt(config) {\n var ns = _aiNamespace;\n if (!ns && config.disableDbgExt !== true) {\n ns = _aiNamespace || _getExtensionNamespace();\n }\n return ns ? ns[\"ChromeDbgExt\"] : null;\n}\nexport function getDebugListener(config) {\n if (!_debugListener) {\n _debugListener = {};\n for (var lp = 0; lp < listenerFuncs[_DYN_LENGTH /* @min:%2elength */]; lp++) {\n _debugListener[listenerFuncs[lp]] = _listenerProxyFunc(listenerFuncs[lp], config);\n }\n }\n return _debugListener;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n\"use strict\";\n\nvar _a;\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { dumpObj, isFunction, isUndefined } from \"@nevware21/ts-utils\";\nimport { createDynamicConfig, onConfigChange } from \"../Config/DynamicConfig\";\nimport { _DYN_DIAG_LOG, _DYN_LOGGER, _DYN_LOGGING_LEVEL_CONSOL4, _DYN_LOG_INTERNAL_MESSAGE, _DYN_MESSAGE, _DYN_MESSAGE_ID, _DYN_PUSH, _DYN_REPLACE, _DYN_THROW_INTERNAL, _DYN_UNLOAD, _DYN_WARN_TO_CONSOLE } from \"../__DynamicConstants\";\nimport { getDebugExt } from \"./DbgExtensionUtils\";\nimport { getConsole, getJSON, hasJSON } from \"./EnvUtils\";\nimport { STR_EMPTY } from \"./InternalConstants\";\nvar STR_WARN_TO_CONSOLE = \"warnToConsole\";\n/**\r\n * For user non actionable traces use AI Internal prefix.\r\n */\nvar AiNonUserActionablePrefix = \"AI (Internal): \";\n/**\r\n * Prefix of the traces in portal.\r\n */\nvar AiUserActionablePrefix = \"AI: \";\n/**\r\n * Session storage key for the prefix for the key indicating message type already logged\r\n */\nvar AIInternalMessagePrefix = \"AITR_\";\nvar defaultValues = {\n loggingLevelConsole: 0,\n loggingLevelTelemetry: 1,\n maxMessageLimit: 25,\n enableDebug: false\n};\nvar _logFuncs = (_a = {}, _a[0 /* eLoggingSeverity.DISABLED */] = null, _a[1 /* eLoggingSeverity.CRITICAL */] = \"errorToConsole\", _a[2 /* eLoggingSeverity.WARNING */] = STR_WARN_TO_CONSOLE, _a[3 /* eLoggingSeverity.DEBUG */] = \"debugToConsole\", _a);\nfunction _sanitizeDiagnosticText(text) {\n if (text) {\n return \"\\\"\" + text[_DYN_REPLACE /* @min:%2ereplace */](/\\\"/g, STR_EMPTY) + \"\\\"\";\n }\n return STR_EMPTY;\n}\nfunction _logToConsole(func, message) {\n var theConsole = getConsole();\n if (!!theConsole) {\n var logFunc = \"log\";\n if (theConsole[func]) {\n logFunc = func;\n }\n if (isFunction(theConsole[logFunc])) {\n theConsole[logFunc](message);\n }\n }\n}\nvar _InternalLogMessage = /** @class */function () {\n function _InternalLogMessage(msgId, msg, isUserAct, properties) {\n if (isUserAct === void 0) {\n isUserAct = false;\n }\n var _self = this;\n _self[_DYN_MESSAGE_ID /* @min:%2emessageId */] = msgId;\n _self[_DYN_MESSAGE /* @min:%2emessage */] = (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) + msgId;\n var strProps = STR_EMPTY;\n if (hasJSON()) {\n strProps = getJSON().stringify(properties);\n }\n var diagnosticText = (msg ? \" message:\" + _sanitizeDiagnosticText(msg) : STR_EMPTY) + (properties ? \" props:\" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);\n _self[_DYN_MESSAGE /* @min:%2emessage */] += diagnosticText;\n }\n _InternalLogMessage.dataType = \"MessageData\";\n return _InternalLogMessage;\n}();\nexport { _InternalLogMessage };\nexport function safeGetLogger(core, config) {\n return (core || {})[_DYN_LOGGER /* @min:%2elogger */] || new DiagnosticLogger(config);\n}\nvar DiagnosticLogger = /** @class */function () {\n function DiagnosticLogger(config) {\n this.identifier = \"DiagnosticLogger\";\n /**\r\n * The internal logging queue\r\n */\n this.queue = [];\n /**\r\n * Count of internal messages sent\r\n */\n var _messageCount = 0;\n /**\r\n * Holds information about what message types were already logged to console or sent to server.\r\n */\n var _messageLogged = {};\n var _loggingLevelConsole;\n var _loggingLevelTelemetry;\n var _maxInternalMessageLimit;\n var _enableDebug;\n var _unloadHandler;\n dynamicProto(DiagnosticLogger, this, function (_self) {\n _unloadHandler = _setDefaultsFromConfig(config || {});\n _self.consoleLoggingLevel = function () {\n return _loggingLevelConsole;\n };\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity - {LoggingSeverity} - The severity of the log message\r\n * @param message - {_InternalLogMessage} - The log message.\r\n */\n _self[_DYN_THROW_INTERNAL /* @min:%2ethrowInternal */] = function (severity, msgId, msg, properties, isUserAct) {\n if (isUserAct === void 0) {\n isUserAct = false;\n }\n var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);\n if (_enableDebug) {\n throw dumpObj(message);\n } else {\n // Get the logging function and fallback to warnToConsole of for some reason errorToConsole doesn't exist\n var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;\n if (!isUndefined(message[_DYN_MESSAGE /* @min:%2emessage */])) {\n if (isUserAct) {\n // check if this message type was already logged to console for this page view and if so, don't log it again\n var messageKey = +message[_DYN_MESSAGE_ID /* @min:%2emessageId */];\n if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {\n _self[logFunc](message[_DYN_MESSAGE /* @min:%2emessage */]);\n _messageLogged[messageKey] = true;\n }\n } else {\n // Only log traces if the console Logging Level is >= the throwInternal severity level\n if (_loggingLevelConsole >= severity) {\n _self[logFunc](message[_DYN_MESSAGE /* @min:%2emessage */]);\n }\n }\n _logInternalMessage(severity, message);\n } else {\n _debugExtMsg(\"throw\" + (severity === 1 /* eLoggingSeverity.CRITICAL */ ? \"Critical\" : \"Warning\"), message);\n }\n }\n };\n _self.debugToConsole = function (message) {\n _logToConsole(\"debug\", message);\n _debugExtMsg(\"warning\", message);\n };\n _self[_DYN_WARN_TO_CONSOLE /* @min:%2ewarnToConsole */] = function (message) {\n _logToConsole(\"warn\", message);\n _debugExtMsg(\"warning\", message);\n };\n _self.errorToConsole = function (message) {\n _logToConsole(\"error\", message);\n _debugExtMsg(\"error\", message);\n };\n _self.resetInternalMessageCount = function () {\n _messageCount = 0;\n _messageLogged = {};\n };\n _self[_DYN_LOG_INTERNAL_MESSAGE /* @min:%2elogInternalMessage */] = _logInternalMessage;\n _self[_DYN_UNLOAD /* @min:%2eunload */] = function (isAsync) {\n _unloadHandler && _unloadHandler.rm();\n _unloadHandler = null;\n };\n function _logInternalMessage(severity, message) {\n if (_areInternalMessagesThrottled()) {\n return;\n }\n // check if this message type was already logged for this session and if so, don't log it again\n var logMessage = true;\n var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID /* @min:%2emessageId */];\n // if the session storage is not available, limit to only one message type per page view\n if (_messageLogged[messageKey]) {\n logMessage = false;\n } else {\n _messageLogged[messageKey] = true;\n }\n if (logMessage) {\n // Push the event in the internal queue\n if (severity <= _loggingLevelTelemetry) {\n _self.queue[_DYN_PUSH /* @min:%2epush */](message);\n _messageCount++;\n _debugExtMsg(severity === 1 /* eLoggingSeverity.CRITICAL */ ? \"error\" : \"warn\", message);\n }\n // When throttle limit reached, send a special event\n if (_messageCount === _maxInternalMessageLimit) {\n var throttleLimitMessage = \"Internal events throttle limit per PageView reached for this app.\";\n var throttleMessage = new _InternalLogMessage(23 /* _eInternalMessageId.MessageLimitPerPVExceeded */, throttleLimitMessage, false);\n _self.queue[_DYN_PUSH /* @min:%2epush */](throttleMessage);\n if (severity === 1 /* eLoggingSeverity.CRITICAL */) {\n _self.errorToConsole(throttleLimitMessage);\n } else {\n _self[_DYN_WARN_TO_CONSOLE /* @min:%2ewarnToConsole */](throttleLimitMessage);\n }\n }\n }\n }\n function _setDefaultsFromConfig(config) {\n // make sure the config is dynamic\n return onConfigChange(createDynamicConfig(config, defaultValues, _self).cfg, function (details) {\n var config = details.cfg;\n _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 /* @min:%2eloggingLevelConsole */];\n _loggingLevelTelemetry = config.loggingLevelTelemetry;\n _maxInternalMessageLimit = config.maxMessageLimit;\n _enableDebug = config.enableDebug;\n });\n }\n function _areInternalMessagesThrottled() {\n return _messageCount >= _maxInternalMessageLimit;\n }\n function _debugExtMsg(name, data) {\n var dbgExt = getDebugExt(config || {});\n if (dbgExt && dbgExt[_DYN_DIAG_LOG /* @min:%2ediagLog */]) {\n dbgExt[_DYN_DIAG_LOG /* @min:%2ediagLog */](name, data);\n }\n }\n });\n }\n // Removed Stub for DiagnosticLogger.prototype.consoleLoggingLevel.\n // Removed Stub for DiagnosticLogger.prototype.throwInternal.\n // Removed Stub for DiagnosticLogger.prototype.debugToConsole.\n // Removed Stub for DiagnosticLogger.prototype.warnToConsole.\n // Removed Stub for DiagnosticLogger.prototype.errorToConsole.\n // Removed Stub for DiagnosticLogger.prototype.resetInternalMessageCount.\n // Removed Stub for DiagnosticLogger.prototype.logInternalMessage.\n // Removed Stub for DiagnosticLogger.prototype.unload.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n DiagnosticLogger.__ieDyn = 1;\n return DiagnosticLogger;\n}();\nexport { DiagnosticLogger };\nfunction _getLogger(logger) {\n return logger || new DiagnosticLogger();\n}\n/**\r\n * This is a helper method which will call throwInternal on the passed logger, will throw exceptions in\r\n * debug mode or attempt to log the error as a console warning. This helper is provided mostly to better\r\n * support minification as logger.throwInternal() will not compress the publish \"throwInternal\" used throughout\r\n * the code.\r\n * @param logger - The Diagnostic Logger instance to use.\r\n * @param severity - {LoggingSeverity} - The severity of the log message\r\n * @param message - {_InternalLogMessage} - The log message.\r\n */\nexport function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {\n if (isUserAct === void 0) {\n isUserAct = false;\n }\n _getLogger(logger)[_DYN_THROW_INTERNAL /* @min:%2ethrowInternal */](severity, msgId, msg, properties, isUserAct);\n}\n/**\r\n * This is a helper method which will call warnToConsole on the passed logger with the provided message.\r\n * @param logger - The Diagnostic Logger instance to use.\r\n * @param message - {_InternalLogMessage} - The log message.\r\n */\nexport function _warnToConsole(logger, message) {\n _getLogger(logger)[_DYN_WARN_TO_CONSOLE /* @min:%2ewarnToConsole */](message);\n}\n/**\r\n * Logs a message to the internal queue.\r\n * @param logger - The Diagnostic Logger instance to use.\r\n * @param severity - {LoggingSeverity} - The severity of the log message\r\n * @param message - {_InternalLogMessage} - The message to log.\r\n */\nexport function _logInternalMessage(logger, severity, message) {\n _getLogger(logger)[_DYN_LOG_INTERNAL_MESSAGE /* @min:%2elogInternalMessage */](severity, message);\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nvar _a, _b;\nimport { arrForEach, arrIndexOf, dumpObj, getDocument, getLazy, getNavigator, isArray, isFunction, isNullOrUndefined, isString, isTruthy, isUndefined, objForEachKey, strEndsWith, strIndexOf, strLeft, strSubstring, strTrim, utcNow } from \"@nevware21/ts-utils\";\nimport { cfgDfMerge } from \"../Config/ConfigDefaultHelpers\";\nimport { createDynamicConfig, onConfigChange } from \"../Config/DynamicConfig\";\nimport { _DYN_ENABLED, _DYN_LENGTH, _DYN_LOGGER, _DYN_PROTOCOL, _DYN_SET_DF, _DYN_SPLIT, _DYN_UNLOAD, _DYN_USER_AGENT } from \"../__DynamicConstants\";\nimport { _throwInternal } from \"./DiagnosticLogger\";\nimport { getLocation, isIE } from \"./EnvUtils\";\nimport { getExceptionName, isNotNullOrUndefined, setValue, strContains } from \"./HelperFuncs\";\nimport { STR_DOMAIN, STR_EMPTY, STR_PATH, UNDEFINED_VALUE } from \"./InternalConstants\";\nvar strToGMTString = \"toGMTString\";\nvar strToUTCString = \"toUTCString\";\nvar strCookie = \"cookie\";\nvar strExpires = \"expires\";\nvar strIsCookieUseDisabled = \"isCookieUseDisabled\";\nvar strDisableCookiesUsage = \"disableCookiesUsage\";\nvar strConfigCookieMgr = \"_ckMgr\";\nvar _supportsCookies = null;\nvar _allowUaSameSite = null;\nvar _parsedCookieValue = null;\nvar _doc;\nvar _cookieCache = {};\nvar _globalCookieConfig = {};\n// // `isCookieUseDisabled` is deprecated, so explicitly casting as a key of IConfiguration to avoid typing error\n// // when both isCookieUseDisabled and disableCookiesUsage are used disableCookiesUsage will take precedent, which is\n// // why its listed first\n/**\r\n * Set the supported dynamic config values as undefined (or an empty object) so that\r\n * any listeners will be informed of any changes.\r\n * Explicitly NOT including the deprecated `isCookieUseDisabled` as we don't want to support\r\n * the v1 deprecated field as dynamic for updates\r\n */\nvar rootDefaultConfig = (_a = {\n cookieCfg: cfgDfMerge((_b = {}, _b[STR_DOMAIN] = {\n fb: \"cookieDomain\",\n dfVal: isNotNullOrUndefined\n }, _b.path = {\n fb: \"cookiePath\",\n dfVal: isNotNullOrUndefined\n }, _b.enabled = UNDEFINED_VALUE, _b.ignoreCookies = UNDEFINED_VALUE, _b.blockedCookies = UNDEFINED_VALUE, _b)),\n cookieDomain: UNDEFINED_VALUE,\n cookiePath: UNDEFINED_VALUE\n}, _a[strDisableCookiesUsage] = UNDEFINED_VALUE, _a);\nfunction _getDoc() {\n !_doc && (_doc = getLazy(function () {\n return getDocument();\n }));\n}\n/**\r\n * @ignore\r\n * DO NOT USE or export from the module, this is exposed as public to support backward compatibility of previous static utility methods only.\r\n * If you want to manager cookies either use the ICookieMgr available from the core instance via getCookieMgr() or create\r\n * your own instance of the CookieMgr and use that.\r\n * Using this directly for enabling / disabling cookie handling will not only affect your usage but EVERY user of cookies.\r\n * Example, if you are using a shared component that is also using Application Insights you will affect their cookie handling.\r\n * @param logger - The DiagnosticLogger to use for reporting errors.\r\n */\nfunction _gblCookieMgr(config, logger) {\n // Stash the global instance against the BaseCookieMgr class\n var inst = createCookieMgr[strConfigCookieMgr] || _globalCookieConfig[strConfigCookieMgr];\n if (!inst) {\n // Note: not using the getSetValue() helper as that would require always creating a temporary cookieMgr\n // that ultimately is never used\n inst = createCookieMgr[strConfigCookieMgr] = createCookieMgr(config, logger);\n _globalCookieConfig[strConfigCookieMgr] = inst;\n }\n return inst;\n}\nfunction _isMgrEnabled(cookieMgr) {\n if (cookieMgr) {\n return cookieMgr.isEnabled();\n }\n return true;\n}\nfunction _isIgnoredCookie(cookieMgrCfg, name) {\n if (name && cookieMgrCfg && isArray(cookieMgrCfg.ignoreCookies)) {\n return arrIndexOf(cookieMgrCfg.ignoreCookies, name) !== -1;\n }\n return false;\n}\nfunction _isBlockedCookie(cookieMgrCfg, name) {\n if (name && cookieMgrCfg && isArray(cookieMgrCfg.blockedCookies)) {\n if (arrIndexOf(cookieMgrCfg.blockedCookies, name) !== -1) {\n return true;\n }\n }\n return _isIgnoredCookie(cookieMgrCfg, name);\n}\nfunction _isCfgEnabled(rootConfig, cookieMgrConfig) {\n var isCfgEnabled = cookieMgrConfig[_DYN_ENABLED /* @min:%2eenabled */];\n if (isNullOrUndefined(isCfgEnabled)) {\n // Set the enabled from the provided setting or the legacy root values\n var cookieEnabled = void 0;\n // This field is deprecated and dynamic updates will not be fully supported\n if (!isUndefined(rootConfig[strIsCookieUseDisabled])) {\n cookieEnabled = !rootConfig[strIsCookieUseDisabled];\n }\n // If this value is defined it takes precedent over the above\n if (!isUndefined(rootConfig[strDisableCookiesUsage])) {\n cookieEnabled = !rootConfig[strDisableCookiesUsage];\n }\n // Not setting the cookieMgrConfig.enabled as that will update (set) the global dynamic config\n // So future \"updates\" then may not be as expected\n isCfgEnabled = cookieEnabled;\n }\n return isCfgEnabled;\n}\n/**\r\n * Helper to return the ICookieMgr from the core (if not null/undefined) or a default implementation\r\n * associated with the configuration or a legacy default.\r\n * @param core\r\n * @param config\r\n * @returns\r\n */\nexport function safeGetCookieMgr(core, config) {\n var cookieMgr;\n if (core) {\n // Always returns an instance\n cookieMgr = core.getCookieMgr();\n } else if (config) {\n var cookieCfg = config.cookieCfg;\n if (cookieCfg && cookieCfg[strConfigCookieMgr]) {\n cookieMgr = cookieCfg[strConfigCookieMgr];\n } else {\n cookieMgr = createCookieMgr(config);\n }\n }\n if (!cookieMgr) {\n // Get or initialize the default global (legacy) cookie manager if we couldn't find one\n cookieMgr = _gblCookieMgr(config, (core || {})[_DYN_LOGGER /* @min:%2elogger */]);\n }\n return cookieMgr;\n}\nexport function createCookieMgr(rootConfig, logger) {\n var _a;\n var cookieMgrConfig;\n var _path;\n var _domain;\n var unloadHandler;\n // Explicitly checking against false, so that setting to undefined will === true\n var _enabled;\n var _getCookieFn;\n var _setCookieFn;\n var _delCookieFn;\n // Make sure the root config is dynamic as it may be the global config\n rootConfig = createDynamicConfig(rootConfig || _globalCookieConfig, null, logger).cfg;\n // Will get recalled if the referenced configuration is changed\n unloadHandler = onConfigChange(rootConfig, function (details) {\n // Make sure the root config has all of the the defaults to the root config to ensure they are dynamic\n details[_DYN_SET_DF /* @min:%2esetDf */](details.cfg, rootDefaultConfig);\n // Create and apply the defaults to the cookieCfg element\n cookieMgrConfig = details.ref(details.cfg, \"cookieCfg\"); // details.setDf(details.cfg.cookieCfg, defaultConfig);\n _path = cookieMgrConfig[STR_PATH /* @min:%2epath */] || \"/\";\n _domain = cookieMgrConfig[STR_DOMAIN /* @min:%2edomain */];\n // Explicitly checking against false, so that setting to undefined will === true\n _enabled = _isCfgEnabled(rootConfig, cookieMgrConfig) !== false;\n _getCookieFn = cookieMgrConfig.getCookie || _getCookieValue;\n _setCookieFn = cookieMgrConfig.setCookie || _setCookieValue;\n _delCookieFn = cookieMgrConfig.delCookie || _setCookieValue;\n }, logger);\n var cookieMgr = (_a = {\n isEnabled: function () {\n var enabled = _isCfgEnabled(rootConfig, cookieMgrConfig) !== false && _enabled && areCookiesSupported(logger);\n // Using an indirect lookup for any global cookie manager to support tree shaking for SDK's\n // that don't use the \"applicationinsights-core\" version of the default cookie function\n var gblManager = _globalCookieConfig[strConfigCookieMgr];\n if (enabled && gblManager && cookieMgr !== gblManager) {\n // Make sure the GlobalCookie Manager instance (if not this instance) is also enabled.\n // As the global (deprecated) functions may have been called (for backward compatibility)\n enabled = _isMgrEnabled(gblManager);\n }\n return enabled;\n },\n setEnabled: function (value) {\n // Explicitly checking against false, so that setting to undefined will === true\n _enabled = value !== false;\n cookieMgrConfig[_DYN_ENABLED /* @min:%2eenabled */] = value;\n },\n set: function (name, value, maxAgeSec, domain, path) {\n var result = false;\n if (_isMgrEnabled(cookieMgr) && !_isBlockedCookie(cookieMgrConfig, name)) {\n var values = {};\n var theValue = strTrim(value || STR_EMPTY);\n var idx = strIndexOf(theValue, \";\");\n if (idx !== -1) {\n theValue = strTrim(strLeft(value, idx));\n values = _extractParts(strSubstring(value, idx + 1));\n }\n // Only update domain if not already present (isUndefined) and the value is truthy (not null, undefined or empty string)\n setValue(values, STR_DOMAIN, domain || _domain, isTruthy, isUndefined);\n if (!isNullOrUndefined(maxAgeSec)) {\n var _isIE = isIE();\n if (isUndefined(values[strExpires])) {\n var nowMs = utcNow();\n // Only add expires if not already present\n var expireMs = nowMs + maxAgeSec * 1000;\n // Sanity check, if zero or -ve then ignore\n if (expireMs > 0) {\n var expiry = new Date();\n expiry.setTime(expireMs);\n setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || STR_EMPTY, isTruthy);\n }\n }\n if (!_isIE) {\n // Only replace if not already present\n setValue(values, \"max-age\", STR_EMPTY + maxAgeSec, null, isUndefined);\n }\n }\n var location_1 = getLocation();\n if (location_1 && location_1[_DYN_PROTOCOL /* @min:%2eprotocol */] === \"https:\") {\n setValue(values, \"secure\", null, null, isUndefined);\n // Only set same site if not also secure\n if (_allowUaSameSite === null) {\n _allowUaSameSite = !uaDisallowsSameSiteNone((getNavigator() || {})[_DYN_USER_AGENT /* @min:%2euserAgent */]);\n }\n if (_allowUaSameSite) {\n setValue(values, \"SameSite\", \"None\", null, isUndefined);\n }\n }\n setValue(values, STR_PATH, path || _path, null, isUndefined);\n //let setCookieFn = cookieMgrConfig.setCookie || _setCookieValue;\n _setCookieFn(name, _formatCookieValue(theValue, values));\n result = true;\n }\n return result;\n },\n get: function (name) {\n var value = STR_EMPTY;\n if (_isMgrEnabled(cookieMgr) && !_isIgnoredCookie(cookieMgrConfig, name)) {\n value = _getCookieFn(name);\n }\n return value;\n },\n del: function (name, path) {\n var result = false;\n if (_isMgrEnabled(cookieMgr)) {\n // Only remove the cookie if the manager and cookie support has not been disabled\n result = cookieMgr.purge(name, path);\n }\n return result;\n },\n purge: function (name, path) {\n var _a;\n var result = false;\n if (areCookiesSupported(logger)) {\n // Setting the expiration date in the past immediately removes the cookie\n var values = (_a = {}, _a[STR_PATH] = path ? path : \"/\", _a[strExpires] = \"Thu, 01 Jan 1970 00:00:01 GMT\", _a);\n if (!isIE()) {\n // Set max age to expire now\n values[\"max-age\"] = \"0\";\n }\n // let delCookie = cookieMgrConfig.delCookie || _setCookieValue;\n _delCookieFn(name, _formatCookieValue(STR_EMPTY, values));\n result = true;\n }\n return result;\n }\n }, _a[_DYN_UNLOAD /* @min:unload */] = function (isAsync) {\n unloadHandler && unloadHandler.rm();\n unloadHandler = null;\n }, _a);\n // Associated this cookie manager with the config\n cookieMgr[strConfigCookieMgr] = cookieMgr;\n return cookieMgr;\n}\n/*\r\n* Helper method to tell if document.cookie object is supported by the runtime\r\n*/\nexport function areCookiesSupported(logger) {\n if (_supportsCookies === null) {\n _supportsCookies = false;\n !_doc && _getDoc();\n try {\n var doc = _doc.v || {};\n _supportsCookies = doc[strCookie] !== undefined;\n } catch (e) {\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 68 /* _eInternalMessageId.CannotAccessCookie */, \"Cannot access document.cookie - \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n return _supportsCookies;\n}\nfunction _extractParts(theValue) {\n var values = {};\n if (theValue && theValue[_DYN_LENGTH /* @min:%2elength */]) {\n var parts = strTrim(theValue)[_DYN_SPLIT /* @min:%2esplit */](\";\");\n arrForEach(parts, function (thePart) {\n thePart = strTrim(thePart || STR_EMPTY);\n if (thePart) {\n var idx = strIndexOf(thePart, \"=\");\n if (idx === -1) {\n values[thePart] = null;\n } else {\n values[strTrim(strLeft(thePart, idx))] = strTrim(strSubstring(thePart, idx + 1));\n }\n }\n });\n }\n return values;\n}\nfunction _formatDate(theDate, func) {\n if (isFunction(theDate[func])) {\n return theDate[func]();\n }\n return null;\n}\nfunction _formatCookieValue(value, values) {\n var cookieValue = value || STR_EMPTY;\n objForEachKey(values, function (name, theValue) {\n cookieValue += \"; \" + name + (!isNullOrUndefined(theValue) ? \"=\" + theValue : STR_EMPTY);\n });\n return cookieValue;\n}\nfunction _getCookieValue(name) {\n var cookieValue = STR_EMPTY;\n !_doc && _getDoc();\n if (_doc.v) {\n var theCookie = _doc.v[strCookie] || STR_EMPTY;\n if (_parsedCookieValue !== theCookie) {\n _cookieCache = _extractParts(theCookie);\n _parsedCookieValue = theCookie;\n }\n cookieValue = strTrim(_cookieCache[name] || STR_EMPTY);\n }\n return cookieValue;\n}\nfunction _setCookieValue(name, cookieValue) {\n !_doc && _getDoc();\n if (_doc.v) {\n _doc.v[strCookie] = name + \"=\" + cookieValue;\n }\n}\nexport function uaDisallowsSameSiteNone(userAgent) {\n if (!isString(userAgent)) {\n return false;\n }\n // Cover all iOS based browsers here. This includes:\n // - Safari on iOS 12 for iPhone, iPod Touch, iPad\n // - WkWebview on iOS 12 for iPhone, iPod Touch, iPad\n // - Chrome on iOS 12 for iPhone, iPod Touch, iPad\n // All of which are broken by SameSite=None, because they use the iOS networking stack\n if (strContains(userAgent, \"CPU iPhone OS 12\") || strContains(userAgent, \"iPad; CPU OS 12\")) {\n return true;\n }\n // Cover Mac OS X based browsers that use the Mac OS networking stack. This includes:\n // - Safari on Mac OS X\n // This does not include:\n // - Internal browser on Mac OS X\n // - Chrome on Mac OS X\n // - Chromium on Mac OS X\n // Because they do not use the Mac OS networking stack.\n if (strContains(userAgent, \"Macintosh; Intel Mac OS X 10_14\") && strContains(userAgent, \"Version/\") && strContains(userAgent, \"Safari\")) {\n return true;\n }\n // Cover Mac OS X internal browsers that use the Mac OS networking stack. This includes:\n // - Internal browser on Mac OS X\n // This does not include:\n // - Safari on Mac OS X\n // - Chrome on Mac OS X\n // - Chromium on Mac OS X\n // Because they do not use the Mac OS networking stack.\n if (strContains(userAgent, \"Macintosh; Intel Mac OS X 10_14\") && strEndsWith(userAgent, \"AppleWebKit/605.1.15 (KHTML, like Gecko)\")) {\n return true;\n }\n // Cover Chrome 50-69, because some versions are broken by SameSite=None, and none in this range require it.\n // Note: this covers some pre-Chromium Edge versions, but pre-Chromim Edge does not require SameSite=None, so this is fine.\n // Note: this regex applies to Windows, Mac OS X, and Linux, deliberately.\n if (strContains(userAgent, \"Chrome/5\") || strContains(userAgent, \"Chrome/6\")) {\n return true;\n }\n // Unreal Engine runs Chromium 59, but does not advertise as Chrome until 4.23. Treat versions of Unreal\n // that don't specify their Chrome version as lacking support for SameSite=None.\n if (strContains(userAgent, \"UnrealEngine\") && !strContains(userAgent, \"Chrome\")) {\n return true;\n }\n // UCBrowser < 12.13.2 ignores Set-Cookie headers with SameSite=None\n // NB: this rule isn't complete - you need regex to make a complete rule.\n // See: https://www.chromium.org/updates/same-site/incompatible-clients\n if (strContains(userAgent, \"UCBrowser/12\") || strContains(userAgent, \"UCBrowser/11\")) {\n return true;\n }\n return false;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { createAllPromise, createPromise, doAwaitResponse } from \"@nevware21/ts-async\";\nimport { arrForEach, arrIndexOf, objDefine, safe, scheduleTimeout } from \"@nevware21/ts-utils\";\nimport { createDynamicConfig } from \"../Config/DynamicConfig\";\nimport { _DYN_ADD_NOTIFICATION_LIS1, _DYN_CANCEL, _DYN_DATA, _DYN_IS_ASYNC, _DYN_IS_CHILD_EVT, _DYN_LENGTH, _DYN_PUSH, _DYN_REMOVE_NOTIFICATION_0, _DYN_SPLICE, _DYN_UNLOAD, _DYN_WATCH } from \"../__DynamicConstants\";\nimport { STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_EVENTS_SENT, STR_OFFLINE_DROP, STR_OFFLINE_SENT, STR_OFFLINE_STORE, STR_PERF_EVENT } from \"./InternalConstants\";\nvar defaultValues = {\n perfEvtsSendAll: false\n};\nfunction _runScheduledListeners(asyncNotifications) {\n asyncNotifications.h = null;\n var callbacks = asyncNotifications.cb;\n asyncNotifications.cb = [];\n arrForEach(callbacks, function (cb) {\n // Run the listener in a try-catch to ensure that a single listener failing doesn't prevent the others from running\n safe(cb.fn, [cb.arg]);\n });\n}\n// This function is used to combine the logic of running the listeners and handling the async notifications so that they don't\n// create multiple timers if there are multiple async listeners.\nfunction _runListeners(listeners, name, asyncNotifications, callback) {\n arrForEach(listeners, function (listener) {\n if (listener && listener[name]) {\n if (asyncNotifications) {\n // Schedule the callback to be called after the current call stack has cleared.\n asyncNotifications.cb[_DYN_PUSH /* @min:%2epush */]({\n fn: callback,\n arg: listener\n });\n asyncNotifications.h = asyncNotifications.h || scheduleTimeout(_runScheduledListeners, 0, asyncNotifications);\n } else {\n // Run the listener in a try-catch to ensure that a single listener failing doesn't prevent the others from running\n safe(callback, [listener]);\n }\n }\n });\n}\n/**\r\n * Class to manage sending notifications to all the listeners.\r\n */\nvar NotificationManager = /** @class */function () {\n function NotificationManager(config) {\n this.listeners = [];\n var perfEvtsSendAll;\n var unloadHandler;\n var _listeners = [];\n var _asyncNotifications = {\n h: null,\n cb: []\n };\n var cfgHandler = createDynamicConfig(config, defaultValues);\n unloadHandler = cfgHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\n perfEvtsSendAll = !!details.cfg.perfEvtsSendAll;\n });\n dynamicProto(NotificationManager, this, function (_self) {\n objDefine(_self, \"listeners\", {\n g: function () {\n return _listeners;\n }\n });\n _self[_DYN_ADD_NOTIFICATION_LIS1 /* @min:%2eaddNotificationListener */] = function (listener) {\n _listeners[_DYN_PUSH /* @min:%2epush */](listener);\n };\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - AWTNotificationListener to remove.\r\n */\n _self[_DYN_REMOVE_NOTIFICATION_0 /* @min:%2eremoveNotificationListener */] = function (listener) {\n var index = arrIndexOf(_listeners, listener);\n while (index > -1) {\n _listeners[_DYN_SPLICE /* @min:%2esplice */](index, 1);\n index = arrIndexOf(_listeners, listener);\n }\n };\n /**\r\n * Notification for events sent.\r\n * @param events - The array of events that have been sent.\r\n */\n _self[STR_EVENTS_SENT /* @min:%2eeventsSent */] = function (events) {\n _runListeners(_listeners, STR_EVENTS_SENT, _asyncNotifications, function (listener) {\n listener[STR_EVENTS_SENT /* @min:%2eeventsSent */](events);\n });\n };\n /**\r\n * Notification for events being discarded.\r\n * @param events - The array of events that have been discarded by the SDK.\r\n * @param reason - The reason for which the SDK discarded the events. The EventsDiscardedReason\r\n * constant should be used to check the different values.\r\n */\n _self[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */] = function (events, reason) {\n _runListeners(_listeners, STR_EVENTS_DISCARDED, _asyncNotifications, function (listener) {\n listener[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */](events, reason);\n });\n };\n /**\r\n * [Optional] A function called when the events have been requested to be sent to the sever.\r\n * @param sendReason - The reason why the event batch is being sent.\r\n * @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.\r\n */\n _self[STR_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */] = function (sendReason, isAsync) {\n _runListeners(_listeners, STR_EVENTS_SEND_REQUEST, isAsync ? _asyncNotifications : null, function (listener) {\n listener[STR_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */](sendReason, isAsync);\n });\n };\n _self[STR_PERF_EVENT /* @min:%2eperfEvent */] = function (perfEvent) {\n if (perfEvent) {\n // Send all events or only parent events\n if (perfEvtsSendAll || !perfEvent[_DYN_IS_CHILD_EVT /* @min:%2eisChildEvt */]()) {\n _runListeners(_listeners, STR_PERF_EVENT, null, function (listener) {\n if (perfEvent[_DYN_IS_ASYNC /* @min:%2eisAsync */]) {\n scheduleTimeout(function () {\n return listener[STR_PERF_EVENT /* @min:%2eperfEvent */](perfEvent);\n }, 0);\n } else {\n listener[STR_PERF_EVENT /* @min:%2eperfEvent */](perfEvent);\n }\n });\n }\n }\n };\n _self[STR_OFFLINE_STORE /* @min:%2eofflineEventsStored */] = function (events) {\n if (events && events[_DYN_LENGTH /* @min:%2elength */]) {\n _runListeners(_listeners, STR_OFFLINE_STORE, _asyncNotifications, function (listener) {\n listener[STR_OFFLINE_STORE /* @min:%2eofflineEventsStored */](events);\n });\n }\n };\n _self[STR_OFFLINE_SENT /* @min:%2eofflineBatchSent */] = function (batch) {\n if (batch && batch[_DYN_DATA /* @min:%2edata */]) {\n _runListeners(_listeners, STR_OFFLINE_SENT, _asyncNotifications, function (listener) {\n listener[STR_OFFLINE_SENT /* @min:%2eofflineBatchSent */](batch);\n });\n }\n };\n _self[STR_OFFLINE_DROP /* @min:%2eofflineBatchDrop */] = function (cnt, reason) {\n if (cnt > 0) {\n var rn_1 = reason || 0; // default is unknown\n _runListeners(_listeners, STR_OFFLINE_DROP, _asyncNotifications, function (listener) {\n listener[STR_OFFLINE_DROP /* @min:%2eofflineBatchDrop */](cnt, rn_1);\n });\n }\n };\n _self[_DYN_UNLOAD /* @min:%2eunload */] = function (isAsync) {\n var _finishUnload = function () {\n unloadHandler && unloadHandler.rm();\n unloadHandler = null;\n _listeners = [];\n // Clear any async listener\n _asyncNotifications.h && _asyncNotifications.h[_DYN_CANCEL /* @min:%2ecancel */]();\n _asyncNotifications.h = null;\n _asyncNotifications.cb = [];\n };\n var waiting;\n _runListeners(_listeners, \"unload\", null, function (listener) {\n var asyncUnload = listener[_DYN_UNLOAD /* @min:%2eunload */](isAsync);\n if (asyncUnload) {\n if (!waiting) {\n waiting = [];\n }\n waiting[_DYN_PUSH /* @min:%2epush */](asyncUnload);\n }\n });\n if (waiting) {\n return createPromise(function (resolve) {\n return doAwaitResponse(createAllPromise(waiting), function () {\n _finishUnload();\n resolve();\n });\n });\n } else {\n _finishUnload();\n }\n };\n });\n }\n // Removed Stub for NotificationManager.prototype.addNotificationListener.\n // Removed Stub for NotificationManager.prototype.removeNotificationListener.\n // Removed Stub for NotificationManager.prototype.eventsSent.\n // Removed Stub for NotificationManager.prototype.eventsDiscarded.\n // Removed Stub for NotificationManager.prototype.eventsSendRequest.\n // Removed Stub for NotificationManager.prototype.perfEvent.\n // Removed Stub for NotificationManager.prototype.unload.\n // Removed Stub for NotificationManager.prototype.offlineEventsStored.\n // Removed Stub for NotificationManager.prototype.offlineBatchSent.\n // Removed Stub for NotificationManager.prototype.offlineBatchDrop.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n NotificationManager.__ieDyn = 1;\n return NotificationManager;\n}();\nexport { NotificationManager };\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { isArray, isFunction, objDefine, utcNow } from \"@nevware21/ts-utils\";\nimport { _DYN_COMPLETE, _DYN_GET_CTX, _DYN_IS_ASYNC, _DYN_IS_CHILD_EVT, _DYN_LENGTH, _DYN_NAME, _DYN_PUSH, _DYN_SET_CTX, _DYN_TIME } from \"../__DynamicConstants\";\nimport { STR_GET_PERF_MGR, STR_PERF_EVENT } from \"./InternalConstants\";\nvar strExecutionContextKey = \"ctx\";\nvar strParentContextKey = \"ParentContextKey\";\nvar strChildrenContextKey = \"ChildrenContextKey\";\nvar _defaultPerfManager = null;\nvar PerfEvent = /** @class */function () {\n function PerfEvent(name, payloadDetails, isAsync) {\n var _self = this;\n _self.start = utcNow();\n _self[_DYN_NAME /* @min:%2ename */] = name;\n _self[_DYN_IS_ASYNC /* @min:%2eisAsync */] = isAsync;\n _self[_DYN_IS_CHILD_EVT /* @min:%2eisChildEvt */] = function () {\n return false;\n };\n if (isFunction(payloadDetails)) {\n // Create an accessor to minimize the potential performance impact of executing the payloadDetails callback\n var theDetails_1;\n objDefine(_self, \"payload\", {\n g: function () {\n // Delay the execution of the payloadDetails until needed\n if (!theDetails_1 && isFunction(payloadDetails)) {\n theDetails_1 = payloadDetails();\n // clear it out now so the referenced objects can be garbage collected\n payloadDetails = null;\n }\n return theDetails_1;\n }\n });\n }\n _self[_DYN_GET_CTX /* @min:%2egetCtx */] = function (key) {\n if (key) {\n // The parent and child links are located directly on the object (for better viewing in the DebugPlugin)\n if (key === PerfEvent[strParentContextKey] || key === PerfEvent[strChildrenContextKey]) {\n return _self[key];\n }\n return (_self[strExecutionContextKey] || {})[key];\n }\n return null;\n };\n _self[_DYN_SET_CTX /* @min:%2esetCtx */] = function (key, value) {\n if (key) {\n // Put the parent and child links directly on the object (for better viewing in the DebugPlugin)\n if (key === PerfEvent[strParentContextKey]) {\n // Simple assumption, if we are setting a parent then we must be a child\n if (!_self[key]) {\n _self[_DYN_IS_CHILD_EVT /* @min:%2eisChildEvt */] = function () {\n return true;\n };\n }\n _self[key] = value;\n } else if (key === PerfEvent[strChildrenContextKey]) {\n _self[key] = value;\n } else {\n var ctx = _self[strExecutionContextKey] = _self[strExecutionContextKey] || {};\n ctx[key] = value;\n }\n }\n };\n _self[_DYN_COMPLETE /* @min:%2ecomplete */] = function () {\n var childTime = 0;\n var childEvts = _self[_DYN_GET_CTX /* @min:%2egetCtx */](PerfEvent[strChildrenContextKey]);\n if (isArray(childEvts)) {\n for (var lp = 0; lp < childEvts[_DYN_LENGTH /* @min:%2elength */]; lp++) {\n var childEvt = childEvts[lp];\n if (childEvt) {\n childTime += childEvt[_DYN_TIME /* @min:%2etime */];\n }\n }\n }\n _self[_DYN_TIME /* @min:%2etime */] = utcNow() - _self.start;\n _self.exTime = _self[_DYN_TIME /* @min:%2etime */] - childTime;\n _self[_DYN_COMPLETE /* @min:%2ecomplete */] = function () {};\n };\n }\n PerfEvent.ParentContextKey = \"parent\";\n PerfEvent.ChildrenContextKey = \"childEvts\";\n return PerfEvent;\n}();\nexport { PerfEvent };\nvar PerfManager = /** @class */function () {\n function PerfManager(manager) {\n /**\r\n * General bucket used for execution context set and retrieved via setCtx() and getCtx.\r\n * Defined as private so it can be visualized via the DebugPlugin\r\n */\n this.ctx = {};\n dynamicProto(PerfManager, this, function (_self) {\n _self.create = function (src, payloadDetails, isAsync) {\n // TODO (@MSNev): at some point we will want to add additional configuration to \"select\" which events to instrument\n // for now this is just a simple do everything.\n return new PerfEvent(src, payloadDetails, isAsync);\n };\n _self.fire = function (perfEvent) {\n if (perfEvent) {\n perfEvent[_DYN_COMPLETE /* @min:%2ecomplete */]();\n if (manager && isFunction(manager[STR_PERF_EVENT /* @min:%2eperfEvent */])) {\n manager[STR_PERF_EVENT /* @min:%2eperfEvent */](perfEvent);\n }\n }\n };\n _self[_DYN_SET_CTX /* @min:%2esetCtx */] = function (key, value) {\n if (key) {\n var ctx = _self[strExecutionContextKey] = _self[strExecutionContextKey] || {};\n ctx[key] = value;\n }\n };\n _self[_DYN_GET_CTX /* @min:%2egetCtx */] = function (key) {\n return (_self[strExecutionContextKey] || {})[key];\n };\n });\n }\n // Removed Stub for PerfManager.prototype.create.\n // Removed Stub for PerfManager.prototype.fire.\n // Removed Stub for PerfManager.prototype.setCtx.\n // Removed Stub for PerfManager.prototype.getCtx.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n PerfManager.__ieDyn = 1;\n return PerfManager;\n}();\nexport { PerfManager };\nvar doPerfActiveKey = \"CoreUtils.doPerf\";\n/**\r\n * Helper function to wrap a function with a perf event\r\n * @param mgrSource - The Performance Manager or a Performance provider source (may be null)\r\n * @param getSource - The callback to create the source name for the event (if perf monitoring is enabled)\r\n * @param func - The function to call and measure\r\n * @param details - A function to return the payload details\r\n * @param isAsync - Is the event / function being call asynchronously or synchronously\r\n */\nexport function doPerf(mgrSource, getSource, func, details, isAsync) {\n if (mgrSource) {\n var perfMgr = mgrSource;\n if (perfMgr[STR_GET_PERF_MGR]) {\n // Looks like a perf manager provider object\n perfMgr = perfMgr[STR_GET_PERF_MGR]();\n }\n if (perfMgr) {\n var perfEvt = void 0;\n var currentActive = perfMgr[_DYN_GET_CTX /* @min:%2egetCtx */](doPerfActiveKey);\n try {\n perfEvt = perfMgr.create(getSource(), details, isAsync);\n if (perfEvt) {\n if (currentActive && perfEvt[_DYN_SET_CTX /* @min:%2esetCtx */]) {\n perfEvt[_DYN_SET_CTX /* @min:%2esetCtx */](PerfEvent[strParentContextKey], currentActive);\n if (currentActive[_DYN_GET_CTX /* @min:%2egetCtx */] && currentActive[_DYN_SET_CTX /* @min:%2esetCtx */]) {\n var children = currentActive[_DYN_GET_CTX /* @min:%2egetCtx */](PerfEvent[strChildrenContextKey]);\n if (!children) {\n children = [];\n currentActive[_DYN_SET_CTX /* @min:%2esetCtx */](PerfEvent[strChildrenContextKey], children);\n }\n children[_DYN_PUSH /* @min:%2epush */](perfEvt);\n }\n }\n // Set this event as the active event now\n perfMgr[_DYN_SET_CTX /* @min:%2esetCtx */](doPerfActiveKey, perfEvt);\n return func(perfEvt);\n }\n } catch (ex) {\n if (perfEvt && perfEvt[_DYN_SET_CTX /* @min:%2esetCtx */]) {\n perfEvt[_DYN_SET_CTX /* @min:%2esetCtx */](\"exception\", ex);\n }\n } finally {\n // fire the perf event\n if (perfEvt) {\n perfMgr.fire(perfEvt);\n }\n // Reset the active event to the previous value\n perfMgr[_DYN_SET_CTX /* @min:%2esetCtx */](doPerfActiveKey, currentActive);\n }\n }\n }\n return func();\n}\n/**\r\n * Set the global performance manager to use when there is no core instance or it has not been initialized yet.\r\n * @param perfManager - The IPerfManager instance to use when no performance manager is supplied.\r\n */\nexport function setGblPerfMgr(perfManager) {\n _defaultPerfManager = perfManager;\n}\n/**\r\n * Get the current global performance manager that will be used with no performance manager is supplied.\r\n * @returns - The current default manager\r\n */\nexport function getGblPerfMgr() {\n return _defaultPerfManager;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n\"use strict\";\n\nimport { strShimUndefined } from \"@microsoft/applicationinsights-shims\";\nimport { strSubstr, strSubstring } from \"@nevware21/ts-utils\";\nimport { _DYN_LENGTH } from \"../__DynamicConstants\";\nimport { STR_EMPTY } from \"./InternalConstants\";\nimport { random32 } from \"./RandomHelper\";\n// Added to help with minfication\nexport var Undefined = strShimUndefined;\nexport function newGuid() {\n var uuid = generateW3CId();\n return strSubstring(uuid, 0, 8) + \"-\" + strSubstring(uuid, 8, 12) + \"-\" + strSubstring(uuid, 12, 16) + \"-\" + strSubstring(uuid, 16, 20) + \"-\" + strSubstring(uuid, 20);\n}\n/**\r\n * The strEndsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.\r\n * @param value - The value to check whether it ends with the search value.\r\n * @param search - The characters to be searched for at the end of the value.\r\n * @returns true if the given search value is found at the end of the string, otherwise false.\r\n */\nexport function strEndsWith(value, search) {\n if (value && search) {\n var len = value[_DYN_LENGTH /* @min:%2elength */];\n var start = len - search[_DYN_LENGTH /* @min:%2elength */];\n return strSubstring(value, start >= 0 ? start : 0, len) === search;\n }\n return false;\n}\n/**\r\n * generate W3C trace id\r\n */\nexport function generateW3CId() {\n var hexValues = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\n // rfc4122 version 4 UUID without dashes and with lowercase letters\n var oct = STR_EMPTY,\n tmp;\n for (var a = 0; a < 4; a++) {\n tmp = random32();\n oct += hexValues[tmp & 0xF] + hexValues[tmp >> 4 & 0xF] + hexValues[tmp >> 8 & 0xF] + hexValues[tmp >> 12 & 0xF] + hexValues[tmp >> 16 & 0xF] + hexValues[tmp >> 20 & 0xF] + hexValues[tmp >> 24 & 0xF] + hexValues[tmp >> 28 & 0xF];\n }\n // \"Set the two most significant bits (bits 6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively\"\n var clockSequenceHi = hexValues[8 + (random32() & 0x03) | 0];\n return strSubstr(oct, 0, 8) + strSubstr(oct, 9, 4) + \"4\" + strSubstr(oct, 13, 3) + clockSequenceHi + strSubstr(oct, 16, 3) + strSubstr(oct, 19, 12);\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { arrForEach, isArray, isString, strLeft, strTrim } from \"@nevware21/ts-utils\";\nimport { _DYN_GET_ATTRIBUTE, _DYN_LENGTH, _DYN_PUSH, _DYN_SPAN_ID, _DYN_SPLIT, _DYN_TO_LOWER_CASE, _DYN_TRACE_FLAGS, _DYN_TRACE_ID, _DYN_VERSION } from \"../__DynamicConstants\";\nimport { generateW3CId } from \"./CoreUtils\";\nimport { findMetaTag, findNamedServerTiming } from \"./EnvUtils\";\nimport { STR_EMPTY } from \"./InternalConstants\";\n// using {0,16} for leading and trailing whitespace just to constrain the possible runtime of a random string\nvar TRACE_PARENT_REGEX = /^([\\da-f]{2})-([\\da-f]{32})-([\\da-f]{16})-([\\da-f]{2})(-[^\\s]{1,64})?$/i;\nvar DEFAULT_VERSION = \"00\";\nvar INVALID_VERSION = \"ff\";\nvar INVALID_TRACE_ID = \"00000000000000000000000000000000\";\nvar INVALID_SPAN_ID = \"0000000000000000\";\nvar SAMPLED_FLAG = 0x01;\nfunction _isValid(value, len, invalidValue) {\n if (value && value[_DYN_LENGTH /* @min:%2elength */] === len && value !== invalidValue) {\n return !!value.match(/^[\\da-f]*$/i);\n }\n return false;\n}\nfunction _formatValue(value, len, defValue) {\n if (_isValid(value, len)) {\n return value;\n }\n return defValue;\n}\nfunction _formatFlags(value) {\n if (isNaN(value) || value < 0 || value > 255) {\n value = 0x01;\n }\n var result = value.toString(16);\n while (result[_DYN_LENGTH /* @min:%2elength */] < 2) {\n result = \"0\" + result;\n }\n return result;\n}\n/**\r\n * Create a new ITraceParent instance using the provided values.\r\n * @param traceId - The traceId to use, when invalid a new random W3C id will be generated.\r\n * @param spanId - The parent/span id to use, a new random value will be generated if it is invalid.\r\n * @param flags - The traceFlags to use, defaults to zero (0) if not supplied or invalid\r\n * @param version - The version to used, defaults to version \"01\" if not supplied or invalid.\r\n * @returns\r\n */\nexport function createTraceParent(traceId, spanId, flags, version) {\n var _a;\n return _a = {}, _a[_DYN_VERSION /* @min:version */] = _isValid(version, 2, INVALID_VERSION) ? version : DEFAULT_VERSION, _a[_DYN_TRACE_ID /* @min:traceId */] = isValidTraceId(traceId) ? traceId : generateW3CId(), _a[_DYN_SPAN_ID /* @min:spanId */] = isValidSpanId(spanId) ? spanId : strLeft(generateW3CId(), 16), _a.traceFlags = flags >= 0 && flags <= 0xFF ? flags : 1, _a;\n}\n/**\r\n * Attempt to parse the provided string as a W3C TraceParent header value (https://www.w3.org/TR/trace-context/#traceparent-header)\r\n *\r\n * @param value - The value to be parsed\r\n * @param selectIdx - If the found value is comma separated which is the preferred entry to select, defaults to the first\r\n * @returns\r\n */\nexport function parseTraceParent(value, selectIdx) {\n var _a;\n if (!value) {\n // Don't pass a null/undefined or empty string\n return null;\n }\n if (isArray(value)) {\n // The value may have been encoded on the page into an array so handle this automatically\n value = value[0] || \"\";\n }\n if (!value || !isString(value) || value[_DYN_LENGTH /* @min:%2elength */] > 8192) {\n // limit potential processing based on total length\n return null;\n }\n if (value.indexOf(\",\") !== -1) {\n var values = value[_DYN_SPLIT /* @min:%2esplit */](\",\");\n value = values[selectIdx > 0 && values[_DYN_LENGTH /* @min:%2elength */] > selectIdx ? selectIdx : 0];\n }\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n var match = TRACE_PARENT_REGEX.exec(strTrim(value));\n if (!match ||\n // No match\n match[1] === INVALID_VERSION ||\n // version ff is forbidden\n match[2] === INVALID_TRACE_ID ||\n // All zeros is considered to be invalid\n match[3] === INVALID_SPAN_ID) {\n // All zeros is considered to be invalid\n return null;\n }\n return _a = {\n version: (match[1] || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */](),\n traceId: (match[2] || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */](),\n spanId: (match[3] || STR_EMPTY)[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]()\n }, _a[_DYN_TRACE_FLAGS /* @min:traceFlags */] = parseInt(match[4], 16), _a;\n}\n/**\r\n * Is the provided W3c Trace Id a valid string representation, it must be a 32-character string\r\n * of lowercase hexadecimal characters for example, 4bf92f3577b34da6a3ce929d0e0e4736.\r\n * If all characters as zero (00000000000000000000000000000000) it will be considered an invalid value.\r\n * @param value - The W3c trace Id to be validated\r\n * @returns true if valid otherwise false\r\n */\nexport function isValidTraceId(value) {\n return _isValid(value, 32, INVALID_TRACE_ID);\n}\n/**\r\n * Is the provided W3c span id (aka. parent id) a valid string representation, it must be a 16-character\r\n * string of lowercase hexadecimal characters, for example, 00f067aa0ba902b7.\r\n * If all characters are zero (0000000000000000) this is considered an invalid value.\r\n * @param value - The W3c span id to be validated\r\n * @returns true if valid otherwise false\r\n */\nexport function isValidSpanId(value) {\n return _isValid(value, 16, INVALID_SPAN_ID);\n}\n/**\r\n * Validates that the provided ITraceParent instance conforms to the currently supported specifications\r\n * @param value\r\n * @returns\r\n */\nexport function isValidTraceParent(value) {\n if (!value || !_isValid(value[_DYN_VERSION /* @min:%2eversion */], 2, INVALID_VERSION) || !_isValid(value[_DYN_TRACE_ID /* @min:%2etraceId */], 32, INVALID_TRACE_ID) || !_isValid(value[_DYN_SPAN_ID /* @min:%2espanId */], 16, INVALID_SPAN_ID) || !_isValid(_formatFlags(value[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */]), 2)) {\n // Each known field must contain a valid value\n return false;\n }\n return true;\n}\n/**\r\n * Is the parsed traceParent indicating that the trace is currently sampled.\r\n * @param value - The parsed traceParent value\r\n * @returns\r\n */\nexport function isSampledFlag(value) {\n if (isValidTraceParent(value)) {\n return (value[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] & SAMPLED_FLAG) === SAMPLED_FLAG;\n }\n return false;\n}\n/**\r\n * Format the ITraceParent value as a string using the supported and know version formats.\r\n * So even if the passed traceParent is a later version the string value returned from this\r\n * function will convert it to only the known version formats.\r\n * This currently only supports version \"00\" and invalid \"ff\"\r\n * @param value - The parsed traceParent value\r\n * @returns\r\n */\nexport function formatTraceParent(value) {\n if (value) {\n // Special Note: This only supports formatting as version 00, future versions should encode any known supported version\n // So parsing a future version will populate the correct version value but reformatting will reduce it to version 00.\n var flags = _formatFlags(value[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */]);\n if (!_isValid(flags, 2)) {\n flags = \"01\";\n }\n var version = value[_DYN_VERSION /* @min:%2eversion */] || DEFAULT_VERSION;\n if (version !== \"00\" && version !== \"ff\") {\n // Reduce version to \"00\"\n version = DEFAULT_VERSION;\n }\n // Format as version 00\n return \"\".concat(version.toLowerCase(), \"-\").concat(_formatValue(value.traceId, 32, INVALID_TRACE_ID).toLowerCase(), \"-\").concat(_formatValue(value.spanId, 16, INVALID_SPAN_ID).toLowerCase(), \"-\").concat(flags.toLowerCase());\n }\n return \"\";\n}\n/**\r\n * Helper function to fetch the passed traceparent from the page, looking for it as a meta-tag or a Server-Timing header.\r\n * @param selectIdx - If the found value is comma separated which is the preferred entry to select, defaults to the first\r\n * @returns\r\n */\nexport function findW3cTraceParent(selectIdx) {\n var name = \"traceparent\";\n var traceParent = parseTraceParent(findMetaTag(name), selectIdx);\n if (!traceParent) {\n traceParent = parseTraceParent(findNamedServerTiming(name), selectIdx);\n }\n return traceParent;\n}\n/**\r\n * Find all script tags in the provided document and return the information about them.\r\n * @param doc\r\n * @returns\r\n */\nexport function findAllScripts(doc) {\n var scripts = doc.getElementsByTagName(\"script\");\n var result = [];\n arrForEach(scripts, function (script) {\n var src = script[_DYN_GET_ATTRIBUTE /* @min:%2egetAttribute */](\"src\");\n if (src) {\n var crossOrigin = script[_DYN_GET_ATTRIBUTE /* @min:%2egetAttribute */](\"crossorigin\");\n var async = script.hasAttribute(\"async\") === true;\n var defer = script.hasAttribute(\"defer\") === true;\n var referrerPolicy = script[_DYN_GET_ATTRIBUTE /* @min:%2egetAttribute */](\"referrerpolicy\");\n var info = {\n url: src\n };\n if (crossOrigin) {\n info.crossOrigin = crossOrigin;\n }\n if (async) {\n info.async = async;\n }\n if (defer) {\n info.defer = defer;\n }\n if (referrerPolicy) {\n info.referrerPolicy = referrerPolicy;\n }\n result[_DYN_PUSH /* @min:%2epush */](info);\n }\n });\n return result;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n\"use strict\";\n\nimport { arrForEach, isFunction } from \"@nevware21/ts-utils\";\nimport { _DYN_GET_NEXT, _DYN_GET_PLUGIN, _DYN_INITIALIZE, _DYN_IS_INITIALIZED, _DYN_LENGTH, _DYN_NAME, _DYN_PUSH, _DYN_SET_NEXT_PLUGIN, _DYN_SPAN_ID, _DYN_TEARDOWN, _DYN_TRACE_FLAGS, _DYN_TRACE_ID, _DYN__DO_TEARDOWN } from \"../__DynamicConstants\";\nimport { createElmNodeData } from \"./DataCacheHelper\";\nimport { STR_CORE, STR_PRIORITY, STR_PROCESS_TELEMETRY } from \"./InternalConstants\";\nimport { isValidSpanId, isValidTraceId } from \"./W3cTraceParent\";\nvar pluginStateData = createElmNodeData(\"plugin\");\nexport function _getPluginState(plugin) {\n return pluginStateData.get(plugin, \"state\", {}, true);\n}\n/**\r\n * Initialize the queue of plugins\r\n * @param plugins - The array of plugins to initialize and setting of the next plugin\r\n * @param config - The current config for the instance\r\n * @param core - THe current core instance\r\n * @param extensions - The extensions\r\n */\nexport function initializePlugins(processContext, extensions) {\n // Set the next plugin and identified the uninitialized plugins\n var initPlugins = [];\n var lastPlugin = null;\n var proxy = processContext[_DYN_GET_NEXT /* @min:%2egetNext */]();\n var pluginState;\n while (proxy) {\n var thePlugin = proxy[_DYN_GET_PLUGIN /* @min:%2egetPlugin */]();\n if (thePlugin) {\n if (lastPlugin && lastPlugin[_DYN_SET_NEXT_PLUGIN /* @min:%2esetNextPlugin */] && thePlugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */]) {\n // Set this plugin as the next for the previous one\n lastPlugin[_DYN_SET_NEXT_PLUGIN /* @min:%2esetNextPlugin */](thePlugin);\n }\n pluginState = _getPluginState(thePlugin);\n var isInitialized = !!pluginState[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */];\n if (thePlugin[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */]) {\n isInitialized = thePlugin[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */]();\n }\n if (!isInitialized) {\n initPlugins[_DYN_PUSH /* @min:%2epush */](thePlugin);\n }\n lastPlugin = thePlugin;\n proxy = proxy[_DYN_GET_NEXT /* @min:%2egetNext */]();\n }\n }\n // Now initialize the plugins\n arrForEach(initPlugins, function (thePlugin) {\n var core = processContext[STR_CORE /* @min:%2ecore */]();\n thePlugin[_DYN_INITIALIZE /* @min:%2einitialize */](processContext.getCfg(), core, extensions, processContext[_DYN_GET_NEXT /* @min:%2egetNext */]());\n pluginState = _getPluginState(thePlugin);\n // Only add the core to the state if the plugin didn't set it (doesn't extend from BaseTelemetryPlugin)\n if (!thePlugin[STR_CORE] && !pluginState[STR_CORE]) {\n pluginState[STR_CORE] = core;\n }\n pluginState[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */] = true;\n delete pluginState[_DYN_TEARDOWN /* @min:%2eteardown */];\n });\n}\nexport function sortPlugins(plugins) {\n // Sort by priority\n return plugins.sort(function (extA, extB) {\n var result = 0;\n if (extB) {\n var bHasProcess = extB[STR_PROCESS_TELEMETRY];\n if (extA[STR_PROCESS_TELEMETRY]) {\n result = bHasProcess ? extA[STR_PRIORITY] - extB[STR_PRIORITY] : 1;\n } else if (bHasProcess) {\n result = -1;\n }\n } else {\n result = extA ? 1 : -1;\n }\n return result;\n });\n // sort complete\n}\n/**\r\n * Teardown / Unload helper to perform teardown/unloading operations for the provided components synchronously or asynchronously, this will call any\r\n * _doTeardown() or _doUnload() functions on the provided components to allow them to finish removal.\r\n * @param components - The components you want to unload\r\n * @param unloadCtx - This is the context that should be used during unloading.\r\n * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.\r\n * @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.\r\n * @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.\r\n */\nexport function unloadComponents(components, unloadCtx, unloadState, asyncCallback) {\n var idx = 0;\n function _doUnload() {\n while (idx < components[_DYN_LENGTH /* @min:%2elength */]) {\n var component = components[idx++];\n if (component) {\n var func = component._doUnload || component[_DYN__DO_TEARDOWN /* @min:%2e_doTeardown */];\n if (isFunction(func)) {\n if (func.call(component, unloadCtx, unloadState, _doUnload) === true) {\n return true;\n }\n }\n }\n }\n }\n return _doUnload();\n}\n/**\r\n * Creates a IDistributedTraceContext which optionally also \"sets\" the value on a parent\r\n * @param parentCtx - An optional parent distributed trace instance\r\n * @returns A new IDistributedTraceContext instance that uses an internal temporary object\r\n */\nexport function createDistributedTraceContext(parentCtx) {\n var trace = {};\n return {\n getName: function () {\n return trace[_DYN_NAME /* @min:%2ename */];\n },\n setName: function (newValue) {\n parentCtx && parentCtx.setName(newValue);\n trace[_DYN_NAME /* @min:%2ename */] = newValue;\n },\n getTraceId: function () {\n return trace[_DYN_TRACE_ID /* @min:%2etraceId */];\n },\n setTraceId: function (newValue) {\n parentCtx && parentCtx.setTraceId(newValue);\n if (isValidTraceId(newValue)) {\n trace[_DYN_TRACE_ID /* @min:%2etraceId */] = newValue;\n }\n },\n getSpanId: function () {\n return trace[_DYN_SPAN_ID /* @min:%2espanId */];\n },\n setSpanId: function (newValue) {\n parentCtx && parentCtx.setSpanId(newValue);\n if (isValidSpanId(newValue)) {\n trace[_DYN_SPAN_ID /* @min:%2espanId */] = newValue;\n }\n },\n getTraceFlags: function () {\n return trace[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */];\n },\n setTraceFlags: function (newTraceFlags) {\n parentCtx && parentCtx.setTraceFlags(newTraceFlags);\n trace[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = newTraceFlags;\n }\n };\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n\"use strict\";\n\nimport { arrForEach, dumpObj, isArray, isFunction, isNullOrUndefined, isUndefined, objForEachKey, objFreeze, objKeys } from \"@nevware21/ts-utils\";\nimport { _applyDefaultValue } from \"../Config/ConfigDefaults\";\nimport { createDynamicConfig } from \"../Config/DynamicConfig\";\nimport { _DYN_CREATE_NEW, _DYN_DIAG_LOG, _DYN_GET_NEXT, _DYN_GET_PLUGIN, _DYN_IDENTIFIER, _DYN_IS_ASYNC, _DYN_IS_INITIALIZED, _DYN_LENGTH, _DYN_LOGGER, _DYN_PROCESS_NEXT, _DYN_PUSH, _DYN_SET_DF, _DYN_SET_NEXT_PLUGIN, _DYN_TEARDOWN, _DYN_UNLOAD, _DYN_UPDATE } from \"../__DynamicConstants\";\nimport { _throwInternal, safeGetLogger } from \"./DiagnosticLogger\";\nimport { proxyFunctions } from \"./HelperFuncs\";\nimport { STR_CORE, STR_DISABLED, STR_EMPTY, STR_EXTENSION_CONFIG, STR_PRIORITY, STR_PROCESS_TELEMETRY } from \"./InternalConstants\";\nimport { doPerf } from \"./PerfManager\";\nimport { _getPluginState } from \"./TelemetryHelpers\";\nvar strTelemetryPluginChain = \"TelemetryPluginChain\";\nvar strHasRunFlags = \"_hasRun\";\nvar strGetTelCtx = \"_getTelCtx\";\nvar _chainId = 0;\nfunction _getNextProxyStart(proxy, core, startAt) {\n while (proxy) {\n if (proxy[_DYN_GET_PLUGIN /* @min:%2egetPlugin */]() === startAt) {\n return proxy;\n }\n proxy = proxy[_DYN_GET_NEXT /* @min:%2egetNext */]();\n }\n // This wasn't found in the existing chain so create an isolated one with just this plugin\n return createTelemetryProxyChain([startAt], core.config || {}, core);\n}\n/**\r\n * @ignore\r\n * @param telemetryChain\r\n * @param dynamicHandler\r\n * @param core\r\n * @param startAt - Identifies the next plugin to execute, if null there is no \"next\" plugin and if undefined it should assume the start of the chain\r\n * @returns\r\n */\nfunction _createInternalContext(telemetryChain, dynamicHandler, core, startAt) {\n // We have a special case where we want to start execution from this specific plugin\n // or we simply reuse the existing telemetry plugin chain (normal execution case)\n var _nextProxy = null; // By Default set as no next plugin\n var _onComplete = [];\n if (!dynamicHandler) {\n dynamicHandler = createDynamicConfig({}, null, core[_DYN_LOGGER /* @min:%2elogger */]);\n }\n if (startAt !== null) {\n // There is no next element (null) vs not defined (undefined) so use the full chain\n _nextProxy = startAt ? _getNextProxyStart(telemetryChain, core, startAt) : telemetryChain;\n }\n var context = {\n _next: _moveNext,\n ctx: {\n core: function () {\n return core;\n },\n diagLog: function () {\n return safeGetLogger(core, dynamicHandler.cfg);\n },\n getCfg: function () {\n return dynamicHandler.cfg;\n },\n getExtCfg: _resolveExtCfg,\n getConfig: _getConfig,\n hasNext: function () {\n return !!_nextProxy;\n },\n getNext: function () {\n return _nextProxy;\n },\n setNext: function (nextPlugin) {\n _nextProxy = nextPlugin;\n },\n iterate: _iterateChain,\n onComplete: _addOnComplete\n }\n };\n function _addOnComplete(onComplete, that) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (onComplete) {\n _onComplete[_DYN_PUSH /* @min:%2epush */]({\n func: onComplete,\n self: !isUndefined(that) ? that : context.ctx,\n args: args\n });\n }\n }\n function _moveNext() {\n var nextProxy = _nextProxy;\n // Automatically move to the next plugin\n _nextProxy = nextProxy ? nextProxy[_DYN_GET_NEXT /* @min:%2egetNext */]() : null;\n if (!nextProxy) {\n var onComplete = _onComplete;\n if (onComplete && onComplete[_DYN_LENGTH /* @min:%2elength */] > 0) {\n arrForEach(onComplete, function (completeDetails) {\n try {\n completeDetails.func.call(completeDetails.self, completeDetails.args);\n } catch (e) {\n _throwInternal(core[_DYN_LOGGER /* @min:%2elogger */], 2 /* eLoggingSeverity.WARNING */, 73 /* _eInternalMessageId.PluginException */, \"Unexpected Exception during onComplete - \" + dumpObj(e));\n }\n });\n _onComplete = [];\n }\n }\n return nextProxy;\n }\n function _getExtCfg(identifier, createIfMissing) {\n var idCfg = null;\n var cfg = dynamicHandler.cfg;\n if (cfg && identifier) {\n var extCfg = cfg[STR_EXTENSION_CONFIG /* @min:%2eextensionConfig */];\n if (!extCfg && createIfMissing) {\n extCfg = {};\n }\n // Always set the value so that the property always exists\n cfg[STR_EXTENSION_CONFIG] = extCfg; // Note: it is valid for the \"value\" to be undefined\n // Calling `ref()` has a side effect of causing the referenced property to become dynamic (if not already)\n extCfg = dynamicHandler.ref(cfg, STR_EXTENSION_CONFIG);\n if (extCfg) {\n idCfg = extCfg[identifier];\n if (!idCfg && createIfMissing) {\n idCfg = {};\n }\n // Always set the value so that the property always exists\n extCfg[identifier] = idCfg; // Note: it is valid for the \"value\" to be undefined\n // Calling `ref()` has a side effect of causing the referenced property to become dynamic (if not already)\n idCfg = dynamicHandler.ref(extCfg, identifier);\n }\n }\n return idCfg;\n }\n function _resolveExtCfg(identifier, defaultValues) {\n var newConfig = _getExtCfg(identifier, true);\n if (defaultValues) {\n // Enumerate over the defaultValues and if not already populated attempt to\n // find a value from the root config or use the default value\n objForEachKey(defaultValues, function (field, defaultValue) {\n // for each unspecified field, set the default value\n if (isNullOrUndefined(newConfig[field])) {\n var cfgValue = dynamicHandler.cfg[field];\n if (cfgValue || !isNullOrUndefined(cfgValue)) {\n newConfig[field] = cfgValue;\n }\n }\n _applyDefaultValue(dynamicHandler, newConfig, field, defaultValue);\n });\n }\n return dynamicHandler[_DYN_SET_DF /* @min:%2esetDf */](newConfig, defaultValues);\n }\n function _getConfig(identifier, field, defaultValue) {\n if (defaultValue === void 0) {\n defaultValue = false;\n }\n var theValue;\n var extConfig = _getExtCfg(identifier, false);\n var rootConfig = dynamicHandler.cfg;\n if (extConfig && (extConfig[field] || !isNullOrUndefined(extConfig[field]))) {\n theValue = extConfig[field];\n } else if (rootConfig[field] || !isNullOrUndefined(rootConfig[field])) {\n theValue = rootConfig[field];\n }\n return theValue || !isNullOrUndefined(theValue) ? theValue : defaultValue;\n }\n function _iterateChain(cb) {\n // Keep processing until we reach the end of the chain\n var nextPlugin;\n while (!!(nextPlugin = context._next())) {\n var plugin = nextPlugin[_DYN_GET_PLUGIN /* @min:%2egetPlugin */]();\n if (plugin) {\n // callback with the current on\n cb(plugin);\n }\n }\n }\n return context;\n}\n/**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n * @param startAt - Identifies the next plugin to execute, if null there is no \"next\" plugin and if undefined it should assume the start of the chain\r\n */\nexport function createProcessTelemetryContext(telemetryChain, cfg, core, startAt) {\n var config = createDynamicConfig(cfg);\n var internalContext = _createInternalContext(telemetryChain, config, core, startAt);\n var context = internalContext.ctx;\n function _processNext(env) {\n var nextPlugin = internalContext._next();\n if (nextPlugin) {\n // Run the next plugin which will call \"processNext()\"\n nextPlugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */](env, context);\n }\n return !nextPlugin;\n }\n function _createNew(plugins, startAt) {\n if (plugins === void 0) {\n plugins = null;\n }\n if (isArray(plugins)) {\n plugins = createTelemetryProxyChain(plugins, config.cfg, core, startAt);\n }\n return createProcessTelemetryContext(plugins || context[_DYN_GET_NEXT /* @min:%2egetNext */](), config.cfg, core, startAt);\n }\n context[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */] = _processNext;\n context[_DYN_CREATE_NEW /* @min:%2ecreateNew */] = _createNew;\n return context;\n}\n/**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain for handling the unloading of the chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n * @param startAt - Identifies the next plugin to execute, if null there is no \"next\" plugin and if undefined it should assume the start of the chain\r\n */\nexport function createProcessTelemetryUnloadContext(telemetryChain, core, startAt) {\n var config = createDynamicConfig(core.config);\n var internalContext = _createInternalContext(telemetryChain, config, core, startAt);\n var context = internalContext.ctx;\n function _processNext(unloadState) {\n var nextPlugin = internalContext._next();\n nextPlugin && nextPlugin[_DYN_UNLOAD /* @min:%2eunload */](context, unloadState);\n return !nextPlugin;\n }\n function _createNew(plugins, startAt) {\n if (plugins === void 0) {\n plugins = null;\n }\n if (isArray(plugins)) {\n plugins = createTelemetryProxyChain(plugins, config.cfg, core, startAt);\n }\n return createProcessTelemetryUnloadContext(plugins || context[_DYN_GET_NEXT /* @min:%2egetNext */](), core, startAt);\n }\n context[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */] = _processNext;\n context[_DYN_CREATE_NEW /* @min:%2ecreateNew */] = _createNew;\n return context;\n}\n/**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain for updating the configuration\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n * @param startAt - Identifies the next plugin to execute, if null there is no \"next\" plugin and if undefined it should assume the start of the chain\r\n */\nexport function createProcessTelemetryUpdateContext(telemetryChain, core, startAt) {\n var config = createDynamicConfig(core.config);\n var internalContext = _createInternalContext(telemetryChain, config, core, startAt);\n var context = internalContext.ctx;\n function _processNext(updateState) {\n return context.iterate(function (plugin) {\n if (isFunction(plugin[_DYN_UPDATE /* @min:%2eupdate */])) {\n plugin[_DYN_UPDATE /* @min:%2eupdate */](context, updateState);\n }\n });\n }\n function _createNew(plugins, startAt) {\n if (plugins === void 0) {\n plugins = null;\n }\n if (isArray(plugins)) {\n plugins = createTelemetryProxyChain(plugins, config.cfg, core, startAt);\n }\n return createProcessTelemetryUpdateContext(plugins || context[_DYN_GET_NEXT /* @min:%2egetNext */](), core, startAt);\n }\n context[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */] = _processNext;\n context[_DYN_CREATE_NEW /* @min:%2ecreateNew */] = _createNew;\n return context;\n}\n/**\r\n * Creates an execution chain from the array of plugins\r\n * @param plugins - The array of plugins that will be executed in this order\r\n * @param defItemCtx - The default execution context to use when no telemetry context is passed to processTelemetry(), this\r\n * should be for legacy plugins only. Currently, only used for passing the current core instance and to provide better error\r\n * reporting (hasRun) when errors occur.\r\n */\nexport function createTelemetryProxyChain(plugins, config, core, startAt) {\n var firstProxy = null;\n var add = startAt ? false : true;\n if (isArray(plugins) && plugins[_DYN_LENGTH /* @min:%2elength */] > 0) {\n // Create the proxies and wire up the next plugin chain\n var lastProxy_1 = null;\n arrForEach(plugins, function (thePlugin) {\n if (!add && startAt === thePlugin) {\n add = true;\n }\n if (add && thePlugin && isFunction(thePlugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */])) {\n // Only add plugins that are processors\n var newProxy = createTelemetryPluginProxy(thePlugin, config, core);\n if (!firstProxy) {\n firstProxy = newProxy;\n }\n if (lastProxy_1) {\n // Set this new proxy as the next for the previous one\n lastProxy_1._setNext(newProxy);\n }\n lastProxy_1 = newProxy;\n }\n });\n }\n if (startAt && !firstProxy) {\n // Special case where the \"startAt\" was not in the original list of plugins\n return createTelemetryProxyChain([startAt], config, core);\n }\n return firstProxy;\n}\n/**\r\n * Create the processing telemetry proxy instance, the proxy is used to abstract the current plugin to allow monitoring and\r\n * execution plugins while passing around the dynamic execution state (IProcessTelemetryContext), the proxy instance no longer\r\n * contains any execution state and can be reused between requests (this was not the case for 2.7.2 and earlier with the\r\n * TelemetryPluginChain class).\r\n * @param plugin - The plugin instance to proxy\r\n * @param config - The default execution context to use when no telemetry context is passed to processTelemetry(), this\r\n * should be for legacy plugins only. Currently, only used for passing the current core instance and to provide better error\r\n * reporting (hasRun) when errors occur.\r\n * @returns\r\n */\nexport function createTelemetryPluginProxy(plugin, config, core) {\n var nextProxy = null;\n var hasProcessTelemetry = isFunction(plugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */]);\n var hasSetNext = isFunction(plugin[_DYN_SET_NEXT_PLUGIN /* @min:%2esetNextPlugin */]);\n var chainId;\n if (plugin) {\n chainId = plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */] + \"-\" + plugin[STR_PRIORITY /* @min:%2epriority */] + \"-\" + _chainId++;\n } else {\n chainId = \"Unknown-0-\" + _chainId++;\n }\n var proxyChain = {\n getPlugin: function () {\n return plugin;\n },\n getNext: function () {\n return nextProxy;\n },\n processTelemetry: _processTelemetry,\n unload: _unloadPlugin,\n update: _updatePlugin,\n _id: chainId,\n _setNext: function (nextPlugin) {\n nextProxy = nextPlugin;\n }\n };\n function _getTelCtx() {\n var itemCtx;\n // Looks like a plugin didn't pass the (optional) context, so create a new one\n if (plugin && isFunction(plugin[strGetTelCtx])) {\n // This plugin extends from the BaseTelemetryPlugin so lets use it\n itemCtx = plugin[strGetTelCtx]();\n }\n if (!itemCtx) {\n // Create a temporary one\n itemCtx = createProcessTelemetryContext(proxyChain, config, core);\n }\n return itemCtx;\n }\n function _processChain(itemCtx, processPluginFn, name, details, isAsync) {\n var hasRun = false;\n var identifier = plugin ? plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */] : strTelemetryPluginChain;\n var hasRunContext = itemCtx[strHasRunFlags];\n if (!hasRunContext) {\n // Assign and populate\n hasRunContext = itemCtx[strHasRunFlags] = {};\n }\n // Ensure that we keep the context in sync\n itemCtx.setNext(nextProxy);\n if (plugin) {\n doPerf(itemCtx[STR_CORE /* @min:%2ecore */](), function () {\n return identifier + \":\" + name;\n }, function () {\n // Mark this component as having run\n hasRunContext[chainId] = true;\n try {\n // Set a flag on the next plugin so we know if it was attempted to be executed\n var nextId = nextProxy ? nextProxy._id : STR_EMPTY;\n if (nextId) {\n hasRunContext[nextId] = false;\n }\n hasRun = processPluginFn(itemCtx);\n } catch (error) {\n var hasNextRun = nextProxy ? hasRunContext[nextProxy._id] : true;\n if (hasNextRun) {\n // The next plugin after us has already run so set this one as complete\n hasRun = true;\n }\n if (!nextProxy || !hasNextRun) {\n // Either we have no next plugin or the current one did not attempt to call the next plugin\n // Which means the current one is the root of the failure so log/report this failure\n _throwInternal(itemCtx[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 73 /* _eInternalMessageId.PluginException */, \"Plugin [\" + identifier + \"] failed during \" + name + \" - \" + dumpObj(error) + \", run flags: \" + dumpObj(hasRunContext));\n }\n }\n }, details, isAsync);\n }\n return hasRun;\n }\n function _processTelemetry(env, itemCtx) {\n itemCtx = itemCtx || _getTelCtx();\n function _callProcessTelemetry(itemCtx) {\n if (!plugin || !hasProcessTelemetry) {\n return false;\n }\n var pluginState = _getPluginState(plugin);\n if (pluginState[_DYN_TEARDOWN /* @min:%2eteardown */] || pluginState[STR_DISABLED]) {\n return false;\n }\n // Ensure that we keep the context in sync (for processNext()), just in case a plugin\n // doesn't calls processTelemetry() instead of itemContext.processNext() or some\n // other form of error occurred\n if (hasSetNext) {\n // Backward compatibility setting the next plugin on the instance\n plugin[_DYN_SET_NEXT_PLUGIN /* @min:%2esetNextPlugin */](nextProxy);\n }\n plugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */](env, itemCtx);\n // Process Telemetry is expected to call itemCtx.processNext() or nextPlugin.processTelemetry()\n return true;\n }\n if (!_processChain(itemCtx, _callProcessTelemetry, \"processTelemetry\", function () {\n return {\n item: env\n };\n }, !env.sync)) {\n // The underlying plugin is either not defined, not enabled or does not have a processTelemetry implementation\n // so we still want the next plugin to be executed.\n itemCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](env);\n }\n }\n function _unloadPlugin(unloadCtx, unloadState) {\n function _callTeardown() {\n // Setting default of hasRun as false so the proxyProcessFn() is called as teardown() doesn't have to exist or call unloadNext().\n var hasRun = false;\n if (plugin) {\n var pluginState = _getPluginState(plugin);\n var pluginCore = plugin[STR_CORE] || pluginState[STR_CORE /* @min:%2ecore */];\n // Only teardown the plugin if it was initialized by the current core (i.e. It's not a shared plugin)\n if (plugin && (!pluginCore || pluginCore === unloadCtx.core()) && !pluginState[_DYN_TEARDOWN /* @min:%2eteardown */]) {\n // Handle plugins that don't extend from the BaseTelemetryPlugin\n pluginState[STR_CORE /* @min:%2ecore */] = null;\n pluginState[_DYN_TEARDOWN /* @min:%2eteardown */] = true;\n pluginState[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */] = false;\n if (plugin[_DYN_TEARDOWN /* @min:%2eteardown */] && plugin[_DYN_TEARDOWN /* @min:%2eteardown */](unloadCtx, unloadState) === true) {\n // plugin told us that it was going to (or has) call unloadCtx.processNext()\n hasRun = true;\n }\n }\n }\n return hasRun;\n }\n if (!_processChain(unloadCtx, _callTeardown, \"unload\", function () {}, unloadState[_DYN_IS_ASYNC /* @min:%2eisAsync */])) {\n // Only called if we hasRun was not true\n unloadCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](unloadState);\n }\n }\n function _updatePlugin(updateCtx, updateState) {\n function _callUpdate() {\n // Setting default of hasRun as false so the proxyProcessFn() is called as teardown() doesn't have to exist or call unloadNext().\n var hasRun = false;\n if (plugin) {\n var pluginState = _getPluginState(plugin);\n var pluginCore = plugin[STR_CORE] || pluginState[STR_CORE /* @min:%2ecore */];\n // Only update the plugin if it was initialized by the current core (i.e. It's not a shared plugin)\n if (plugin && (!pluginCore || pluginCore === updateCtx.core()) && !pluginState[_DYN_TEARDOWN /* @min:%2eteardown */]) {\n if (plugin[_DYN_UPDATE /* @min:%2eupdate */] && plugin[_DYN_UPDATE /* @min:%2eupdate */](updateCtx, updateState) === true) {\n // plugin told us that it was going to (or has) call unloadCtx.processNext()\n hasRun = true;\n }\n }\n }\n return hasRun;\n }\n if (!_processChain(updateCtx, _callUpdate, \"update\", function () {}, false)) {\n // Only called if we hasRun was not true\n updateCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](updateState);\n }\n }\n return objFreeze(proxyChain);\n}\n/**\r\n * This class will be removed!\r\n * @deprecated use createProcessTelemetryContext() instead\r\n */\nvar ProcessTelemetryContext = /** @class */function () {\n /**\r\n * Creates a new Telemetry Item context with the current config, core and plugin execution chain\r\n * @param plugins - The plugin instances that will be executed\r\n * @param config - The current config\r\n * @param core - The current core instance\r\n */\n function ProcessTelemetryContext(pluginChain, config, core, startAt) {\n var _self = this;\n var context = createProcessTelemetryContext(pluginChain, config, core, startAt);\n // Proxy all functions of the context to this object\n proxyFunctions(_self, context, objKeys(context));\n }\n return ProcessTelemetryContext;\n}();\nexport { ProcessTelemetryContext };\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { arrForEach, dumpObj } from \"@nevware21/ts-utils\";\nimport { _DYN_DIAG_LOG, _DYN_PUSH } from \"../__DynamicConstants\";\nimport { _throwInternal } from \"./DiagnosticLogger\";\nexport function createUnloadHandlerContainer() {\n var handlers = [];\n function _addHandler(handler) {\n if (handler) {\n handlers[_DYN_PUSH /* @min:%2epush */](handler);\n }\n }\n function _runHandlers(unloadCtx, unloadState) {\n arrForEach(handlers, function (handler) {\n try {\n handler(unloadCtx, unloadState);\n } catch (e) {\n _throwInternal(unloadCtx[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 73 /* _eInternalMessageId.PluginException */, \"Unexpected error calling unload handler - \" + dumpObj(e));\n }\n });\n handlers = [];\n }\n return {\n add: _addHandler,\n run: _runHandlers\n };\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { arrAppend, arrForEach, dumpObj } from \"@nevware21/ts-utils\";\nimport { _DYN_LENGTH } from \"../__DynamicConstants\";\nimport { _throwInternal } from \"./DiagnosticLogger\";\nvar _maxHooks;\nvar _hookAddMonitor;\n/**\r\n * Test hook for setting the maximum number of unload hooks and calling a monitor function when the hooks are added or removed\r\n * This allows for automatic test failure when the maximum number of unload hooks is exceeded\r\n * @param maxHooks - The maximum number of unload hooks\r\n * @param addMonitor - The monitor function to call when hooks are added or removed\r\n */\nexport function _testHookMaxUnloadHooksCb(maxHooks, addMonitor) {\n _maxHooks = maxHooks;\n _hookAddMonitor = addMonitor;\n}\n/**\r\n * Create a IUnloadHookContainer which can be used to remember unload hook functions to be executed during the component unloading\r\n * process.\r\n * @returns A new IUnloadHookContainer instance\r\n */\nexport function createUnloadHookContainer() {\n var _hooks = [];\n function _doUnload(logger) {\n var oldHooks = _hooks;\n _hooks = [];\n // Remove all registered unload hooks\n arrForEach(oldHooks, function (fn) {\n // allow either rm or remove callback function\n try {\n (fn.rm || fn.remove).call(fn);\n } catch (e) {\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 73 /* _eInternalMessageId.PluginException */, \"Unloading:\" + dumpObj(e));\n }\n });\n if (_maxHooks && oldHooks[_DYN_LENGTH /* @min:%2elength */] > _maxHooks) {\n _hookAddMonitor ? _hookAddMonitor(\"doUnload\", oldHooks) : _throwInternal(null, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.MaxUnloadHookExceeded */, \"Max unload hooks exceeded. An excessive number of unload hooks has been detected.\");\n }\n }\n function _addHook(hooks) {\n if (hooks) {\n arrAppend(_hooks, hooks);\n if (_maxHooks && _hooks[_DYN_LENGTH /* @min:%2elength */] > _maxHooks) {\n _hookAddMonitor ? _hookAddMonitor(\"Add\", _hooks) : _throwInternal(null, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.MaxUnloadHookExceeded */, \"Max unload hooks exceeded. An excessive number of unload hooks has been detected.\");\n }\n }\n }\n return {\n run: _doUnload,\n add: _addHook\n };\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n\"use strict\";\n\nvar _a;\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { isFunction, objDefine } from \"@nevware21/ts-utils\";\nimport { createDynamicConfig } from \"../Config/DynamicConfig\";\nimport { _DYN_CREATE_NEW, _DYN_DIAG_LOG, _DYN_GET_NEXT, _DYN_GET_PROCESS_TEL_CONT2, _DYN_INITIALIZE, _DYN_IS_ASYNC, _DYN_IS_INITIALIZED, _DYN_PROCESS_NEXT, _DYN_SET_NEXT_PLUGIN, _DYN_TEARDOWN, _DYN_UPDATE, _DYN__DO_TEARDOWN } from \"../__DynamicConstants\";\nimport { safeGetLogger } from \"./DiagnosticLogger\";\nimport { isNotNullOrUndefined, proxyFunctionAs } from \"./HelperFuncs\";\nimport { STR_CORE, STR_EXTENSION_CONFIG, STR_PROCESS_TELEMETRY } from \"./InternalConstants\";\nimport { createProcessTelemetryContext, createProcessTelemetryUnloadContext, createProcessTelemetryUpdateContext } from \"./ProcessTelemetryContext\";\nimport { createUnloadHandlerContainer } from \"./UnloadHandlerContainer\";\nimport { createUnloadHookContainer } from \"./UnloadHookContainer\";\nvar strGetPlugin = \"getPlugin\";\nvar defaultValues = (_a = {}, _a[STR_EXTENSION_CONFIG] = {\n isVal: isNotNullOrUndefined,\n v: {}\n}, _a);\n/**\r\n * BaseTelemetryPlugin provides a basic implementation of the ITelemetryPlugin interface so that plugins\r\n * can avoid implementation the same set of boiler plate code as well as provide a base\r\n * implementation so that new default implementations can be added without breaking all plugins.\r\n */\nvar BaseTelemetryPlugin = /** @class */function () {\n function BaseTelemetryPlugin() {\n var _self = this; // Setting _self here as it's used outside of the dynamicProto as well\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\n var _isinitialized;\n var _rootCtx; // Used as the root context, holding the current config and initialized core\n var _nextPlugin; // Used for backward compatibility where plugins don't call the main pipeline\n var _unloadHandlerContainer;\n var _hookContainer;\n _initDefaults();\n dynamicProto(BaseTelemetryPlugin, _self, function (_self) {\n _self[_DYN_INITIALIZE /* @min:%2einitialize */] = function (config, core, extensions, pluginChain) {\n _setDefaults(config, core, pluginChain);\n _isinitialized = true;\n };\n _self[_DYN_TEARDOWN /* @min:%2eteardown */] = function (unloadCtx, unloadState) {\n var _a;\n // If this plugin has already been torn down (not operational) or is not initialized (core is not set)\n // or the core being used for unload was not the same core used for initialization.\n var core = _self[STR_CORE /* @min:%2ecore */];\n if (!core || unloadCtx && core !== unloadCtx[STR_CORE /* @min:%2ecore */]()) {\n // Do Nothing as either the plugin is not initialized or was not initialized by the current core\n return;\n }\n var result;\n var unloadDone = false;\n var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);\n var theUnloadState = unloadState || (_a = {\n reason: 0 /* TelemetryUnloadReason.ManualTeardown */\n }, _a[_DYN_IS_ASYNC /* @min:isAsync */] = false, _a);\n function _unloadCallback() {\n if (!unloadDone) {\n unloadDone = true;\n _unloadHandlerContainer.run(theUnloadCtx, unloadState);\n _hookContainer.run(theUnloadCtx[_DYN_DIAG_LOG /* @min:%2ediagLog */]());\n if (result === true) {\n theUnloadCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](theUnloadState);\n }\n _initDefaults();\n }\n }\n if (!_self[_DYN__DO_TEARDOWN /* @min:%2e_doTeardown */] || _self[_DYN__DO_TEARDOWN /* @min:%2e_doTeardown */](theUnloadCtx, theUnloadState, _unloadCallback) !== true) {\n _unloadCallback();\n } else {\n // Tell the caller that we will be calling processNext()\n result = true;\n }\n return result;\n };\n _self[_DYN_UPDATE /* @min:%2eupdate */] = function (updateCtx, updateState) {\n // If this plugin has already been torn down (not operational) or is not initialized (core is not set)\n // or the core being used for unload was not the same core used for initialization.\n var core = _self[STR_CORE /* @min:%2ecore */];\n if (!core || updateCtx && core !== updateCtx[STR_CORE /* @min:%2ecore */]()) {\n // Do Nothing\n return;\n }\n var result;\n var updateDone = false;\n var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);\n var theUpdateState = updateState || {\n reason: 0 /* TelemetryUpdateReason.Unknown */\n };\n function _updateCallback() {\n if (!updateDone) {\n updateDone = true;\n _setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx[_DYN_GET_NEXT /* @min:%2egetNext */]());\n }\n }\n if (!_self._doUpdate || _self._doUpdate(theUpdateCtx, theUpdateState, _updateCallback) !== true) {\n _updateCallback();\n } else {\n result = true;\n }\n return result;\n };\n proxyFunctionAs(_self, \"_addUnloadCb\", function () {\n return _unloadHandlerContainer;\n }, \"add\");\n proxyFunctionAs(_self, \"_addHook\", function () {\n return _hookContainer;\n }, \"add\");\n objDefine(_self, \"_unloadHooks\", {\n g: function () {\n return _hookContainer;\n }\n });\n });\n // These are added after the dynamicProto so that are not moved to the prototype\n _self[_DYN_DIAG_LOG /* @min:%2ediagLog */] = function (itemCtx) {\n return _getTelCtx(itemCtx)[_DYN_DIAG_LOG /* @min:%2ediagLog */]();\n };\n _self[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */] = function () {\n return _isinitialized;\n };\n _self.setInitialized = function (isInitialized) {\n _isinitialized = isInitialized;\n };\n // _self.getNextPlugin = () => DO NOT IMPLEMENT\n // Sub-classes of this base class *should* not be relying on this value and instead\n // should use processNext() function. If you require access to the plugin use the\n // IProcessTelemetryContext.getNext().getPlugin() while in the pipeline, Note getNext() may return null.\n _self[_DYN_SET_NEXT_PLUGIN /* @min:%2esetNextPlugin */] = function (next) {\n _nextPlugin = next;\n };\n _self[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */] = function (env, itemCtx) {\n if (itemCtx) {\n // Normal core execution sequence\n itemCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](env);\n } else if (_nextPlugin && isFunction(_nextPlugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */])) {\n // Looks like backward compatibility or out of band processing. And as it looks\n // like a ITelemetryPlugin or ITelemetryPluginChain, just call processTelemetry\n _nextPlugin[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */](env, null);\n }\n };\n _self._getTelCtx = _getTelCtx;\n function _getTelCtx(currentCtx) {\n if (currentCtx === void 0) {\n currentCtx = null;\n }\n var itemCtx = currentCtx;\n if (!itemCtx) {\n var rootCtx = _rootCtx || createProcessTelemetryContext(null, {}, _self[STR_CORE /* @min:%2ecore */]);\n // tslint:disable-next-line: prefer-conditional-expression\n if (_nextPlugin && _nextPlugin[strGetPlugin]) {\n // Looks like a chain object\n itemCtx = rootCtx[_DYN_CREATE_NEW /* @min:%2ecreateNew */](null, _nextPlugin[strGetPlugin]);\n } else {\n itemCtx = rootCtx[_DYN_CREATE_NEW /* @min:%2ecreateNew */](null, _nextPlugin);\n }\n }\n return itemCtx;\n }\n function _setDefaults(config, core, pluginChain) {\n // Make sure the extensionConfig exists and the config is dynamic\n createDynamicConfig(config, defaultValues, safeGetLogger(core));\n if (!pluginChain && core) {\n // Get the first plugin from the core\n pluginChain = core[_DYN_GET_PROCESS_TEL_CONT2 /* @min:%2egetProcessTelContext */]()[_DYN_GET_NEXT /* @min:%2egetNext */]();\n }\n var nextPlugin = _nextPlugin;\n if (_nextPlugin && _nextPlugin[strGetPlugin]) {\n // If it looks like a proxy/chain then get the plugin\n nextPlugin = _nextPlugin[strGetPlugin]();\n }\n // Support legacy plugins where core was defined as a property\n _self[STR_CORE /* @min:%2ecore */] = core;\n _rootCtx = createProcessTelemetryContext(pluginChain, config, core, nextPlugin);\n }\n function _initDefaults() {\n _isinitialized = false;\n _self[STR_CORE /* @min:%2ecore */] = null;\n _rootCtx = null;\n _nextPlugin = null;\n _hookContainer = createUnloadHookContainer();\n _unloadHandlerContainer = createUnloadHandlerContainer();\n }\n }\n // Removed Stub for BaseTelemetryPlugin.prototype.initialize.\n // Removed Stub for BaseTelemetryPlugin.prototype.teardown.\n // Removed Stub for BaseTelemetryPlugin.prototype.update.\n // Removed Stub for BaseTelemetryPlugin.prototype._addUnloadCb.\n // Removed Stub for BaseTelemetryPlugin.prototype._addHook.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n BaseTelemetryPlugin.__ieDyn = 1;\n return BaseTelemetryPlugin;\n}();\nexport { BaseTelemetryPlugin };\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n// \n// \nimport { __extendsFn as __extends } from \"@microsoft/applicationinsights-shims\";\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { arrAppend, arrForEach, dumpObj } from \"@nevware21/ts-utils\";\nimport { _DYN_APPLY, _DYN_DIAG_LOG, _DYN_LENGTH, _DYN_PROCESS_NEXT, _DYN_SPLICE, _DYN__DO_TEARDOWN } from \"../__DynamicConstants\";\nimport { BaseTelemetryPlugin } from \"./BaseTelemetryPlugin\";\nimport { _throwInternal } from \"./DiagnosticLogger\";\nimport { getExceptionName } from \"./HelperFuncs\";\nimport { STR_PROCESS_TELEMETRY } from \"./InternalConstants\";\nfunction _addInitializer(_initializers, id, telemetryInitializer) {\n var theInitializer = {\n id: id,\n fn: telemetryInitializer\n };\n arrAppend(_initializers, theInitializer);\n var handler = {\n remove: function () {\n arrForEach(_initializers, function (initializer, idx) {\n if (initializer.id === theInitializer.id) {\n _initializers[_DYN_SPLICE /* @min:%2esplice */](idx, 1);\n return -1;\n }\n });\n }\n };\n return handler;\n}\nfunction _runInitializers(_initializers, item, logger) {\n var doNotSendItem = false;\n var telemetryInitializersCount = _initializers[_DYN_LENGTH /* @min:%2elength */];\n for (var i = 0; i < telemetryInitializersCount; ++i) {\n var telemetryInitializer = _initializers[i];\n if (telemetryInitializer) {\n try {\n if (telemetryInitializer.fn[_DYN_APPLY /* @min:%2eapply */](null, [item]) === false) {\n doNotSendItem = true;\n break;\n }\n } catch (e) {\n // log error but dont stop executing rest of the telemetry initializers\n // doNotSendItem = true;\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 64 /* _eInternalMessageId.TelemetryInitializerFailed */, \"Telemetry initializer failed: \" + getExceptionName(e), {\n exception: dumpObj(e)\n }, true);\n }\n }\n }\n return !doNotSendItem;\n}\nvar TelemetryInitializerPlugin = /** @class */function (_super) {\n __extends(TelemetryInitializerPlugin, _super);\n function TelemetryInitializerPlugin() {\n var _this = _super.call(this) || this;\n _this.identifier = \"TelemetryInitializerPlugin\";\n _this.priority = 199;\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\n var _id;\n var _initializers;\n _initDefaults();\n dynamicProto(TelemetryInitializerPlugin, _this, function (_self, _base) {\n _self.addTelemetryInitializer = function (telemetryInitializer) {\n return _addInitializer(_initializers, _id++, telemetryInitializer);\n };\n _self[STR_PROCESS_TELEMETRY /* @min:%2eprocessTelemetry */] = function (item, itemCtx) {\n if (_runInitializers(_initializers, item, itemCtx ? itemCtx[_DYN_DIAG_LOG /* @min:%2ediagLog */]() : _self[_DYN_DIAG_LOG /* @min:%2ediagLog */]())) {\n _self[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](item, itemCtx);\n }\n };\n _self[_DYN__DO_TEARDOWN /* @min:%2e_doTeardown */] = function () {\n _initDefaults();\n };\n });\n function _initDefaults() {\n _id = 0;\n _initializers = [];\n }\n return _this;\n }\n // Removed Stub for TelemetryInitializerPlugin.prototype.addTelemetryInitializer.\n // Removed Stub for TelemetryInitializerPlugin.prototype.processTelemetry.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n TelemetryInitializerPlugin.__ieDyn = 1;\n return TelemetryInitializerPlugin;\n}(BaseTelemetryPlugin);\nexport { TelemetryInitializerPlugin };\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n\"use strict\";\n\nvar _a;\nimport { __spreadArrayFn as __spreadArray } from \"@microsoft/applicationinsights-shims\";\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { createPromise, createSyncAllSettledPromise, doAwaitResponse } from \"@nevware21/ts-async\";\nimport { arrAppend, arrForEach, arrIndexOf, createTimeout, deepExtend, hasDocument, isFunction, isNullOrUndefined, isPlainObject, isPromiseLike, objDeepFreeze, objDefine, objForEachKey, objFreeze, objHasOwn, scheduleTimeout, throwError } from \"@nevware21/ts-utils\";\nimport { createDynamicConfig, onConfigChange } from \"../Config/DynamicConfig\";\nimport { ActiveStatus } from \"../JavaScriptSDK.Enums/InitActiveStatusEnum\";\nimport { _DYN_ADD_NOTIFICATION_LIS1, _DYN_CANCEL, _DYN_CREATE_NEW, _DYN_ENABLED, _DYN_GET_NOTIFY_MGR, _DYN_GET_PLUGIN, _DYN_GET_PROCESS_TEL_CONT2, _DYN_IDENTIFIER, _DYN_INITIALIZE, _DYN_INSTRUMENTATION_KEY, _DYN_IS_ASYNC, _DYN_IS_INITIALIZED, _DYN_I_KEY, _DYN_LENGTH, _DYN_LOGGER, _DYN_LOGGING_LEVEL_CONSOL4, _DYN_MESSAGE, _DYN_MESSAGE_ID, _DYN_NAME, _DYN_NOTIFY, _DYN_ON_COMPLETE, _DYN_POLL_INTERNAL_LOGS, _DYN_PROCESS_NEXT, _DYN_PUSH, _DYN_REMOVE_NOTIFICATION_0, _DYN_SET_DF, _DYN_SPLICE, _DYN_STOP_POLLING_INTERNA3, _DYN_TEARDOWN, _DYN_TIME, _DYN_UNLOAD, _DYN_VALUE, _DYN_VERSION, _DYN_WATCH, _DYN__INACTIVE } from \"../__DynamicConstants\";\nimport { doUnloadAll, runTargetUnload } from \"./AsyncUtils\";\nimport { ChannelControllerPriority } from \"./Constants\";\nimport { createCookieMgr } from \"./CookieMgr\";\nimport { createUniqueNamespace } from \"./DataCacheHelper\";\nimport { getDebugListener } from \"./DbgExtensionUtils\";\nimport { DiagnosticLogger, _InternalLogMessage, _throwInternal, _warnToConsole } from \"./DiagnosticLogger\";\nimport { getSetValue, isNotNullOrUndefined, proxyFunctionAs, proxyFunctions, toISOString } from \"./HelperFuncs\";\nimport { STR_CHANNELS, STR_CORE, STR_CREATE_PERF_MGR, STR_DISABLED, STR_EMPTY, STR_EVENTS_DISCARDED, STR_EXTENSIONS, STR_EXTENSION_CONFIG, STR_GET_PERF_MGR, STR_PRIORITY, UNDEFINED_VALUE } from \"./InternalConstants\";\nimport { NotificationManager } from \"./NotificationManager\";\nimport { PerfManager, doPerf, getGblPerfMgr } from \"./PerfManager\";\nimport { createProcessTelemetryContext, createProcessTelemetryUnloadContext, createProcessTelemetryUpdateContext, createTelemetryProxyChain } from \"./ProcessTelemetryContext\";\nimport { _getPluginState, createDistributedTraceContext, initializePlugins, sortPlugins } from \"./TelemetryHelpers\";\nimport { TelemetryInitializerPlugin } from \"./TelemetryInitializerPlugin\";\nimport { createUnloadHandlerContainer } from \"./UnloadHandlerContainer\";\nimport { createUnloadHookContainer } from \"./UnloadHookContainer\";\nvar strValidationError = \"Plugins must provide initialize method\";\nvar strNotificationManager = \"_notificationManager\";\nvar strSdkUnloadingError = \"SDK is still unloading...\";\nvar strSdkNotInitialized = \"SDK is not initialized\";\nvar maxInitQueueSize = 100;\nvar maxInitTimeout = 50000;\n// const strPluginUnloadFailed = \"Failed to unload plugin\";\n/**\r\n * The default settings for the config.\r\n * WE MUST include all defaults here to ensure that the config is created with all of the properties\r\n * defined as dynamic.\r\n */\nvar defaultConfig = objDeepFreeze((_a = {\n cookieCfg: {}\n}, _a[STR_EXTENSIONS] = {\n rdOnly: true,\n ref: true,\n v: []\n}, _a[STR_CHANNELS] = {\n rdOnly: true,\n ref: true,\n v: []\n}, _a[STR_EXTENSION_CONFIG] = {\n ref: true,\n v: {}\n}, _a[STR_CREATE_PERF_MGR] = UNDEFINED_VALUE, _a.loggingLevelConsole = 0 /* eLoggingSeverity.DISABLED */, _a.diagnosticLogInterval = UNDEFINED_VALUE, _a));\n/**\r\n * Helper to create the default performance manager\r\n * @param core\r\n * @param notificationMgr\r\n */\nfunction _createPerfManager(core, notificationMgr) {\n return new PerfManager(notificationMgr);\n}\nfunction _validateExtensions(logger, channelPriority, allExtensions) {\n var _a;\n // Concat all available extensions\n var coreExtensions = [];\n var channels = [];\n // Check if any two extensions have the same priority, then warn to console\n // And extract the local extensions from the\n var extPriorities = {};\n // Extension validation\n arrForEach(allExtensions, function (ext) {\n // Check for ext.initialize\n if (isNullOrUndefined(ext) || isNullOrUndefined(ext[_DYN_INITIALIZE /* @min:%2einitialize */])) {\n throwError(strValidationError);\n }\n var extPriority = ext[STR_PRIORITY /* @min:%2epriority */];\n var identifier = ext[_DYN_IDENTIFIER /* @min:%2eidentifier */];\n if (ext && extPriority) {\n if (!isNullOrUndefined(extPriorities[extPriority])) {\n _warnToConsole(logger, \"Two extensions have same priority #\" + extPriority + \" - \" + extPriorities[extPriority] + \", \" + identifier);\n } else {\n // set a value\n extPriorities[extPriority] = identifier;\n }\n }\n // Split extensions to core and channels\n if (!extPriority || extPriority < channelPriority) {\n // Add to core extension that will be managed by AppInsightsCore\n coreExtensions[_DYN_PUSH /* @min:%2epush */](ext);\n } else {\n channels[_DYN_PUSH /* @min:%2epush */](ext);\n }\n });\n return _a = {}, _a[STR_CORE /* @min:core */] = coreExtensions, _a[STR_CHANNELS /* @min:channels */] = channels, _a;\n}\nfunction _isPluginPresent(thePlugin, plugins) {\n var exists = false;\n arrForEach(plugins, function (plugin) {\n if (plugin === thePlugin) {\n exists = true;\n return -1;\n }\n });\n return exists;\n}\nfunction _deepMergeConfig(details, target, newValues, merge) {\n // Lets assign the new values to the existing config\n if (newValues) {\n objForEachKey(newValues, function (key, value) {\n if (merge) {\n if (isPlainObject(value) && isPlainObject(target[key])) {\n // The target is an object and it has a value\n _deepMergeConfig(details, target[key], value, merge);\n }\n }\n if (merge && isPlainObject(value) && isPlainObject(target[key])) {\n // The target is an object and it has a value\n _deepMergeConfig(details, target[key], value, merge);\n } else {\n // Just Assign (replace) and/or make the property dynamic\n details.set(target, key, value);\n }\n });\n }\n}\nfunction _findWatcher(listeners, newWatcher) {\n var theListener = null;\n var idx = -1;\n arrForEach(listeners, function (listener, lp) {\n if (listener.w === newWatcher) {\n theListener = listener;\n idx = lp;\n return -1;\n }\n });\n return {\n i: idx,\n l: theListener\n };\n}\nfunction _addDelayedCfgListener(listeners, newWatcher) {\n var theListener = _findWatcher(listeners, newWatcher).l;\n if (!theListener) {\n theListener = {\n w: newWatcher,\n rm: function () {\n var fnd = _findWatcher(listeners, newWatcher);\n if (fnd.i !== -1) {\n listeners[_DYN_SPLICE /* @min:%2esplice */](fnd.i, 1);\n }\n }\n };\n listeners[_DYN_PUSH /* @min:%2epush */](theListener);\n }\n return theListener;\n}\nfunction _registerDelayedCfgListener(config, listeners, logger) {\n arrForEach(listeners, function (listener) {\n var unloadHdl = onConfigChange(config, listener.w, logger);\n delete listener.w; // Clear the listener reference so it will get garbage collected.\n // replace the remove function\n listener.rm = function () {\n unloadHdl.rm();\n };\n });\n}\n// Moved this outside of the closure to reduce the retained memory footprint\nfunction _initDebugListener(configHandler, unloadContainer, notificationManager, debugListener) {\n // Will get recalled if any referenced config values are changed\n unloadContainer.add(configHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\n var disableDbgExt = details.cfg.disableDbgExt;\n if (disableDbgExt === true && debugListener) {\n // Remove any previously loaded debug listener\n notificationManager[_DYN_REMOVE_NOTIFICATION_0 /* @min:%2eremoveNotificationListener */](debugListener);\n debugListener = null;\n }\n if (notificationManager && !debugListener && disableDbgExt !== true) {\n debugListener = getDebugListener(details.cfg);\n notificationManager[_DYN_ADD_NOTIFICATION_LIS1 /* @min:%2eaddNotificationListener */](debugListener);\n }\n }));\n return debugListener;\n}\n// Moved this outside of the closure to reduce the retained memory footprint\nfunction _createUnloadHook(unloadHook) {\n return objDefine({\n rm: function () {\n unloadHook.rm();\n }\n }, \"toJSON\", {\n v: function () {\n return \"aicore::onCfgChange<\" + JSON.stringify(unloadHook) + \">\";\n }\n });\n}\n/**\r\n * @group Classes\r\n * @group Entrypoint\r\n */\nvar AppInsightsCore = /** @class */function () {\n function AppInsightsCore() {\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\n var _configHandler;\n var _isInitialized;\n var _logger;\n var _eventQueue;\n var _notificationManager;\n var _perfManager;\n var _cfgPerfManager;\n var _cookieManager;\n var _pluginChain;\n var _configExtensions;\n var _channelConfig;\n var _channels;\n var _isUnloading;\n var _telemetryInitializerPlugin;\n var _internalLogsEventName;\n var _evtNamespace;\n var _unloadHandlers;\n var _hookContainer;\n var _debugListener;\n var _traceCtx;\n var _instrumentationKey;\n var _cfgListeners;\n var _extensions;\n var _pluginVersionStringArr;\n var _pluginVersionString;\n var _activeStatus; // to indicate if ikey or endpoint url promised is resolved or not\n var _endpoint;\n var _initInMemoMaxSize; // max event count limit during wait for init promises to be resolved\n var _isStatusSet; // track if active status is set in case of init timeout and init promises setting the status twice\n var _initTimer;\n /**\r\n * Internal log poller\r\n */\n var _internalLogPoller;\n var _internalLogPollerListening;\n var _forceStopInternalLogPoller;\n dynamicProto(AppInsightsCore, this, function (_self) {\n // Set the default values (also called during teardown)\n _initDefaults();\n // Special internal method to allow the unit tests and DebugPlugin to hook embedded objects\n _self[\"_getDbgPlgTargets\"] = function () {\n return [_extensions, _eventQueue];\n };\n _self[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */] = function () {\n return _isInitialized;\n };\n // since version 3.3.0\n _self.activeStatus = function () {\n return _activeStatus;\n };\n // since version 3.3.0\n // internal\n _self._setPendingStatus = function () {\n _activeStatus = 3 /* eActiveStatus.PENDING */;\n };\n // Creating the self.initialize = ()\n _self[_DYN_INITIALIZE /* @min:%2einitialize */] = function (config, extensions, logger, notificationManager) {\n if (_isUnloading) {\n throwError(strSdkUnloadingError);\n }\n // Make sure core is only initialized once\n if (_self[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */]()) {\n throwError(\"Core cannot be initialized more than once\");\n }\n _configHandler = createDynamicConfig(config, defaultConfig, logger || _self[_DYN_LOGGER /* @min:%2elogger */], false);\n // Re-assigning the local config property so we don't have any references to the passed value and it can be garbage collected\n config = _configHandler.cfg;\n // This will be \"re-run\" if the referenced config properties are changed\n _addUnloadHook(_configHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\n var rootCfg = details.cfg;\n var isPending = _activeStatus === 3 /* eActiveStatus.PENDING */;\n if (isPending) {\n // means waiting for previous promises to be resolved, won't apply new changes\n return;\n }\n _initInMemoMaxSize = rootCfg.initInMemoMaxSize || maxInitQueueSize;\n // app Insights core only handle ikey and endpointurl, aisku will handle cs\n var ikey = rootCfg[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */];\n var endpointUrl = rootCfg.endpointUrl; // do not need to validate endpoint url, if it is null, default one will be set by sender\n if (isNullOrUndefined(ikey)) {\n _instrumentationKey = null;\n // if new ikey is null, set status to be inactive, all new events will be saved in memory or dropped\n _activeStatus = ActiveStatus[_DYN__INACTIVE /* @min:%2eINACTIVE */];\n var msg = \"Please provide instrumentation key\";\n if (!_isInitialized) {\n // only throw error during initialization\n throwError(msg);\n } else {\n _throwInternal(_logger, 1 /* eLoggingSeverity.CRITICAL */, 100 /* _eInternalMessageId.InvalidInstrumentationKey */, msg);\n _releaseQueues();\n }\n return;\n }\n var promises = [];\n if (isPromiseLike(ikey)) {\n promises[_DYN_PUSH /* @min:%2epush */](ikey);\n _instrumentationKey = null; // reset current local ikey variable (otherwise it will always be the previous ikeys if timeout is called before promise cb)\n } else {\n // string\n _instrumentationKey = ikey;\n }\n if (isPromiseLike(endpointUrl)) {\n promises[_DYN_PUSH /* @min:%2epush */](endpointUrl);\n _endpoint = null; // reset current local endpoint variable (otherwise it will always be the previous urls if timeout is called before promise cb)\n } else {\n // string or null\n _endpoint = endpointUrl;\n }\n // at least have one promise\n if (promises[_DYN_LENGTH /* @min:%2elength */]) {\n // reset to false for new dynamic changes\n _isStatusSet = false;\n _activeStatus = 3 /* eActiveStatus.PENDING */;\n var initTimeout = isNotNullOrUndefined(rootCfg.initTimeOut) ? rootCfg.initTimeOut : maxInitTimeout; // rootCfg.initTimeOut could be 0\n var allPromises = createSyncAllSettledPromise(promises);\n _initTimer = scheduleTimeout(function () {\n // set _isStatusSet to true\n // set active status\n // release queues\n _initTimer = null;\n if (!_isStatusSet) {\n _setStatus();\n }\n }, initTimeout);\n doAwaitResponse(allPromises, function (response) {\n try {\n if (_isStatusSet) {\n // promises take too long to resolve, ignore them\n // active status should be set by timeout already\n return;\n }\n if (!response.rejected) {\n var values = response[_DYN_VALUE /* @min:%2evalue */];\n if (values && values[_DYN_LENGTH /* @min:%2elength */]) {\n // ikey\n var ikeyRes = values[0];\n _instrumentationKey = ikeyRes && ikeyRes[_DYN_VALUE /* @min:%2evalue */];\n // endpoint\n if (values[_DYN_LENGTH /* @min:%2elength */] > 1) {\n var endpointRes = values[1];\n _endpoint = endpointRes && endpointRes[_DYN_VALUE /* @min:%2evalue */];\n }\n }\n if (_instrumentationKey) {\n // if ikey is null, no need to trigger extra dynamic changes for extensions\n config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */] = _instrumentationKey; // set config.instrumentationKey for extensions to consume\n config.endpointUrl = _endpoint; // set config.endpointUrl for extensions to consume\n }\n }\n // set _isStatusSet to true\n // set active status\n // release queues\n _setStatus();\n } catch (e) {\n if (!_isStatusSet) {\n _setStatus();\n }\n }\n });\n } else {\n // means no promises\n _setStatus();\n }\n //_instrumentationKey = details.cfg.instrumentationKey;\n // Mark the extensionConfig and all first level keys as referenced\n // This is so that calls to getExtCfg() will always return the same object\n // Even when a user may \"re-assign\" the plugin properties (or it's unloaded/reloaded)\n var extCfg = details.ref(details.cfg, STR_EXTENSION_CONFIG);\n objForEachKey(extCfg, function (key) {\n details.ref(extCfg, key);\n });\n }));\n _notificationManager = notificationManager;\n // Initialize the debug listener outside of the closure to reduce the retained memory footprint\n _debugListener = _initDebugListener(_configHandler, _hookContainer, _notificationManager && _self[_DYN_GET_NOTIFY_MGR /* @min:%2egetNotifyMgr */](), _debugListener);\n _initPerfManager();\n _self[_DYN_LOGGER /* @min:%2elogger */] = logger;\n var cfgExtensions = config[STR_EXTENSIONS /* @min:%2eextensions */];\n // Extension validation\n _configExtensions = [];\n _configExtensions[_DYN_PUSH /* @min:%2epush */].apply(_configExtensions, __spreadArray(__spreadArray([], extensions, false), cfgExtensions, false));\n _channelConfig = config[STR_CHANNELS /* @min:%2echannels */];\n _initPluginChain(null);\n if (!_channels || _channels[_DYN_LENGTH /* @min:%2elength */] === 0) {\n throwError(\"No \" + STR_CHANNELS + \" available\");\n }\n if (_channelConfig && _channelConfig[_DYN_LENGTH /* @min:%2elength */] > 1) {\n var teeController = _self[_DYN_GET_PLUGIN /* @min:%2egetPlugin */](\"TeeChannelController\");\n if (!teeController || !teeController.plugin) {\n _throwInternal(_logger, 1 /* eLoggingSeverity.CRITICAL */, 28 /* _eInternalMessageId.SenderNotInitialized */, \"TeeChannel required\");\n }\n }\n _registerDelayedCfgListener(config, _cfgListeners, _logger);\n _cfgListeners = null;\n _isInitialized = true;\n if (_activeStatus === ActiveStatus.ACTIVE) {\n _releaseQueues();\n }\n };\n _self.getChannels = function () {\n var controls = [];\n if (_channels) {\n arrForEach(_channels, function (channel) {\n controls[_DYN_PUSH /* @min:%2epush */](channel);\n });\n }\n return objFreeze(controls);\n };\n _self.track = function (telemetryItem) {\n doPerf(_self[STR_GET_PERF_MGR /* @min:%2egetPerfMgr */](), function () {\n return \"AppInsightsCore:track\";\n }, function () {\n if (telemetryItem === null) {\n _notifyInvalidEvent(telemetryItem);\n // throw error\n throwError(\"Invalid telemetry item\");\n }\n // do basic validation before sending it through the pipeline\n if (!telemetryItem[_DYN_NAME /* @min:%2ename */] && isNullOrUndefined(telemetryItem[_DYN_NAME /* @min:%2ename */])) {\n _notifyInvalidEvent(telemetryItem);\n throwError(\"telemetry name required\");\n }\n // setup default iKey if not passed in\n telemetryItem[_DYN_I_KEY /* @min:%2eiKey */] = telemetryItem[_DYN_I_KEY /* @min:%2eiKey */] || _instrumentationKey;\n // add default timestamp if not passed in\n telemetryItem[_DYN_TIME /* @min:%2etime */] = telemetryItem[_DYN_TIME /* @min:%2etime */] || toISOString(new Date());\n // Common Schema 4.0\n telemetryItem.ver = telemetryItem.ver || \"4.0\";\n if (!_isUnloading && _self[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */]() && _activeStatus === ActiveStatus.ACTIVE) {\n // Process the telemetry plugin chain\n _createTelCtx()[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](telemetryItem);\n } else if (_activeStatus !== ActiveStatus[_DYN__INACTIVE /* @min:%2eINACTIVE */]) {\n // Queue events until all extensions are initialized\n if (_eventQueue[_DYN_LENGTH /* @min:%2elength */] <= _initInMemoMaxSize) {\n // set limit, if full, stop adding new events\n _eventQueue[_DYN_PUSH /* @min:%2epush */](telemetryItem);\n }\n }\n }, function () {\n return {\n item: telemetryItem\n };\n }, !telemetryItem.sync);\n };\n _self[_DYN_GET_PROCESS_TEL_CONT2 /* @min:%2egetProcessTelContext */] = _createTelCtx;\n _self[_DYN_GET_NOTIFY_MGR /* @min:%2egetNotifyMgr */] = function () {\n if (!_notificationManager) {\n _notificationManager = new NotificationManager(_configHandler.cfg);\n // For backward compatibility only\n _self[strNotificationManager] = _notificationManager;\n }\n return _notificationManager;\n };\n /**\r\n * Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.\r\n * The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be\r\n * called.\r\n * @param listener - An INotificationListener object.\r\n */\n _self[_DYN_ADD_NOTIFICATION_LIS1 /* @min:%2eaddNotificationListener */] = function (listener) {\n _self.getNotifyMgr()[_DYN_ADD_NOTIFICATION_LIS1 /* @min:%2eaddNotificationListener */](listener);\n };\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - INotificationListener to remove.\r\n */\n _self[_DYN_REMOVE_NOTIFICATION_0 /* @min:%2eremoveNotificationListener */] = function (listener) {\n if (_notificationManager) {\n _notificationManager[_DYN_REMOVE_NOTIFICATION_0 /* @min:%2eremoveNotificationListener */](listener);\n }\n };\n _self.getCookieMgr = function () {\n if (!_cookieManager) {\n _cookieManager = createCookieMgr(_configHandler.cfg, _self[_DYN_LOGGER /* @min:%2elogger */]);\n }\n return _cookieManager;\n };\n _self.setCookieMgr = function (cookieMgr) {\n if (_cookieManager !== cookieMgr) {\n runTargetUnload(_cookieManager, false);\n _cookieManager = cookieMgr;\n }\n };\n _self[STR_GET_PERF_MGR /* @min:%2egetPerfMgr */] = function () {\n return _perfManager || _cfgPerfManager || getGblPerfMgr();\n };\n _self.setPerfMgr = function (perfMgr) {\n _perfManager = perfMgr;\n };\n _self.eventCnt = function () {\n return _eventQueue[_DYN_LENGTH /* @min:%2elength */];\n };\n _self.releaseQueue = function () {\n if (_isInitialized && _eventQueue[_DYN_LENGTH /* @min:%2elength */] > 0) {\n var eventQueue = _eventQueue;\n _eventQueue = [];\n if (_activeStatus === 2 /* eActiveStatus.ACTIVE */) {\n arrForEach(eventQueue, function (event) {\n event[_DYN_I_KEY /* @min:%2eiKey */] = event[_DYN_I_KEY /* @min:%2eiKey */] || _instrumentationKey;\n _createTelCtx()[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](event);\n });\n } else {\n // new one for msg ikey\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 20 /* _eInternalMessageId.FailedToSendQueuedTelemetry */, \"core init status is not active\");\n }\n }\n };\n _self[_DYN_POLL_INTERNAL_LOGS /* @min:%2epollInternalLogs */] = function (eventName) {\n _internalLogsEventName = eventName || null;\n _forceStopInternalLogPoller = false;\n _internalLogPoller && _internalLogPoller[_DYN_CANCEL /* @min:%2ecancel */]();\n return _startLogPoller(true);\n };\n function _setStatus() {\n _isStatusSet = true;\n if (isNullOrUndefined(_instrumentationKey)) {\n _activeStatus = ActiveStatus[_DYN__INACTIVE /* @min:%2eINACTIVE */];\n _throwInternal(_logger, 1 /* eLoggingSeverity.CRITICAL */, 112 /* _eInternalMessageId.InitPromiseException */, \"ikey can't be resolved from promises\");\n } else {\n _activeStatus = ActiveStatus.ACTIVE;\n }\n _releaseQueues();\n }\n function _releaseQueues() {\n if (_isInitialized) {\n _self.releaseQueue();\n _self[_DYN_POLL_INTERNAL_LOGS /* @min:%2epollInternalLogs */]();\n }\n }\n function _startLogPoller(alwaysStart) {\n if ((!_internalLogPoller || !_internalLogPoller[_DYN_ENABLED /* @min:%2eenabled */]) && !_forceStopInternalLogPoller) {\n var shouldStart = alwaysStart || _logger && _logger.queue[_DYN_LENGTH /* @min:%2elength */] > 0;\n if (shouldStart) {\n if (!_internalLogPollerListening) {\n _internalLogPollerListening = true;\n // listen for any configuration changes so that changes to the\n // interval will cause the timer to be re-initialized\n _addUnloadHook(_configHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\n var interval = details.cfg.diagnosticLogInterval;\n if (!interval || !(interval > 0)) {\n interval = 10000;\n }\n var isRunning = false;\n if (_internalLogPoller) {\n // It was already created so remember it's running and cancel\n isRunning = _internalLogPoller[_DYN_ENABLED /* @min:%2eenabled */];\n _internalLogPoller[_DYN_CANCEL /* @min:%2ecancel */]();\n }\n // Create / reconfigure\n _internalLogPoller = createTimeout(_flushInternalLogs, interval);\n _internalLogPoller.unref();\n // Restart if previously running\n _internalLogPoller[_DYN_ENABLED /* @min:%2eenabled */] = isRunning;\n }));\n }\n _internalLogPoller[_DYN_ENABLED /* @min:%2eenabled */] = true;\n }\n }\n return _internalLogPoller;\n }\n _self[_DYN_STOP_POLLING_INTERNA3 /* @min:%2estopPollingInternalLogs */] = function () {\n _forceStopInternalLogPoller = true;\n _internalLogPoller && _internalLogPoller[_DYN_CANCEL /* @min:%2ecancel */]();\n _flushInternalLogs();\n };\n // Add addTelemetryInitializer\n proxyFunctions(_self, function () {\n return _telemetryInitializerPlugin;\n }, [\"addTelemetryInitializer\"]);\n _self[_DYN_UNLOAD /* @min:%2eunload */] = function (isAsync, unloadComplete, cbTimeout) {\n var _a;\n if (isAsync === void 0) {\n isAsync = true;\n }\n if (!_isInitialized) {\n // The SDK is not initialized\n throwError(strSdkNotInitialized);\n }\n // Check if the SDK still unloading so throw\n if (_isUnloading) {\n // The SDK is already unloading\n throwError(strSdkUnloadingError);\n }\n var unloadState = (_a = {\n reason: 50 /* TelemetryUnloadReason.SdkUnload */\n }, _a[_DYN_IS_ASYNC /* @min:isAsync */] = isAsync, _a.flushComplete = false, _a);\n var result;\n if (isAsync && !unloadComplete) {\n result = createPromise(function (resolve) {\n // Set the callback to the promise resolve callback\n unloadComplete = resolve;\n });\n }\n var processUnloadCtx = createProcessTelemetryUnloadContext(_getPluginChain(), _self);\n processUnloadCtx[_DYN_ON_COMPLETE /* @min:%2eonComplete */](function () {\n _hookContainer.run(_self[_DYN_LOGGER /* @min:%2elogger */]);\n // Run any \"unload\" functions for the _cookieManager, _notificationManager and _logger\n doUnloadAll([_cookieManager, _notificationManager, _logger], isAsync, function () {\n _initDefaults();\n unloadComplete && unloadComplete(unloadState);\n });\n }, _self);\n function _doUnload(flushComplete) {\n unloadState.flushComplete = flushComplete;\n _isUnloading = true;\n // Run all of the unload handlers first (before unloading the plugins)\n _unloadHandlers.run(processUnloadCtx, unloadState);\n // Stop polling the internal logs\n _self[_DYN_STOP_POLLING_INTERNA3 /* @min:%2estopPollingInternalLogs */]();\n // Start unloading the components, from this point onwards the SDK should be considered to be in an unstable state\n processUnloadCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](unloadState);\n }\n _flushInternalLogs();\n if (!_flushChannels(isAsync, _doUnload, 6 /* SendRequestReason.SdkUnload */, cbTimeout)) {\n _doUnload(false);\n }\n return result;\n };\n _self[_DYN_GET_PLUGIN /* @min:%2egetPlugin */] = _getPlugin;\n _self.addPlugin = function (plugin, replaceExisting, isAsync, addCb) {\n if (!plugin) {\n addCb && addCb(false);\n _logOrThrowError(strValidationError);\n return;\n }\n var existingPlugin = _getPlugin(plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */]);\n if (existingPlugin && !replaceExisting) {\n addCb && addCb(false);\n _logOrThrowError(\"Plugin [\" + plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */] + \"] is already loaded!\");\n return;\n }\n var updateState = {\n reason: 16 /* TelemetryUpdateReason.PluginAdded */\n };\n function _addPlugin(removed) {\n _configExtensions[_DYN_PUSH /* @min:%2epush */](plugin);\n updateState.added = [plugin];\n // Re-Initialize the plugin chain\n _initPluginChain(updateState);\n addCb && addCb(true);\n }\n if (existingPlugin) {\n var removedPlugins_1 = [existingPlugin.plugin];\n var unloadState = {\n reason: 2 /* TelemetryUnloadReason.PluginReplace */,\n isAsync: !!isAsync\n };\n _removePlugins(removedPlugins_1, unloadState, function (removed) {\n if (!removed) {\n // Previous plugin was successfully removed or was not installed\n addCb && addCb(false);\n } else {\n updateState.removed = removedPlugins_1;\n updateState.reason |= 32 /* TelemetryUpdateReason.PluginRemoved */;\n _addPlugin(true);\n }\n });\n } else {\n _addPlugin(false);\n }\n };\n _self.updateCfg = function (newConfig, mergeExisting) {\n if (mergeExisting === void 0) {\n mergeExisting = true;\n }\n var updateState;\n if (_self[_DYN_IS_INITIALIZED /* @min:%2eisInitialized */]()) {\n updateState = {\n reason: 1 /* TelemetryUpdateReason.ConfigurationChanged */,\n cfg: _configHandler.cfg,\n oldCfg: deepExtend({}, _configHandler.cfg),\n newConfig: deepExtend({}, newConfig),\n merge: mergeExisting\n };\n newConfig = updateState.newConfig;\n var cfg = _configHandler.cfg;\n // replace the immutable (if initialized) values\n // We don't currently allow updating the extensions and channels via the update config\n // So overwriting any user provided values to reuse the existing values\n newConfig[STR_EXTENSIONS /* @min:%2eextensions */] = cfg[STR_EXTENSIONS /* @min:%2eextensions */];\n newConfig[STR_CHANNELS /* @min:%2echannels */] = cfg[STR_CHANNELS /* @min:%2echannels */];\n }\n // Explicitly blocking any previous config watchers so that they don't get called because\n // of this bulk update (Probably not necessary)\n _configHandler._block(function (details) {\n // Lets assign the new values to the existing config either overwriting or re-assigning\n var theConfig = details.cfg;\n _deepMergeConfig(details, theConfig, newConfig, mergeExisting);\n if (!mergeExisting) {\n // Remove (unassign) the values \"missing\" from the newConfig and also not in the default config\n objForEachKey(theConfig, function (key) {\n if (!objHasOwn(newConfig, key)) {\n // Set the value to undefined\n details.set(theConfig, key, UNDEFINED_VALUE);\n }\n });\n }\n // Apply defaults to the new config\n details[_DYN_SET_DF /* @min:%2esetDf */](theConfig, defaultConfig);\n }, true);\n // Now execute all of the listeners (synchronously) so they update their values immediately\n _configHandler[_DYN_NOTIFY /* @min:%2enotify */]();\n if (updateState) {\n _doUpdate(updateState);\n }\n };\n _self.evtNamespace = function () {\n return _evtNamespace;\n };\n _self.flush = _flushChannels;\n _self.getTraceCtx = function (createNew) {\n if (!_traceCtx) {\n _traceCtx = createDistributedTraceContext();\n }\n return _traceCtx;\n };\n _self.setTraceCtx = function (traceCtx) {\n _traceCtx = traceCtx || null;\n };\n _self.addUnloadHook = _addUnloadHook;\n // Create the addUnloadCb\n proxyFunctionAs(_self, \"addUnloadCb\", function () {\n return _unloadHandlers;\n }, \"add\");\n _self.onCfgChange = function (handler) {\n var unloadHook;\n if (!_isInitialized) {\n unloadHook = _addDelayedCfgListener(_cfgListeners, handler);\n } else {\n unloadHook = onConfigChange(_configHandler.cfg, handler, _self[_DYN_LOGGER /* @min:%2elogger */]);\n }\n return _createUnloadHook(unloadHook);\n };\n _self.getWParam = function () {\n return hasDocument() || !!_configHandler.cfg.enableWParam ? 0 : -1;\n };\n function _setPluginVersions() {\n var thePlugins = {};\n _pluginVersionStringArr = [];\n var _addPluginVersions = function (plugins) {\n if (plugins) {\n arrForEach(plugins, function (plugin) {\n if (plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */] && plugin[_DYN_VERSION /* @min:%2eversion */] && !thePlugins[plugin.identifier]) {\n var ver = plugin[_DYN_IDENTIFIER /* @min:%2eidentifier */] + \"=\" + plugin[_DYN_VERSION /* @min:%2eversion */];\n _pluginVersionStringArr[_DYN_PUSH /* @min:%2epush */](ver);\n thePlugins[plugin.identifier] = plugin;\n }\n });\n }\n };\n _addPluginVersions(_channels);\n if (_channelConfig) {\n arrForEach(_channelConfig, function (channels) {\n _addPluginVersions(channels);\n });\n }\n _addPluginVersions(_configExtensions);\n }\n function _initDefaults() {\n _isInitialized = false;\n // Use a default logger so initialization errors are not dropped on the floor with full logging\n _configHandler = createDynamicConfig({}, defaultConfig, _self[_DYN_LOGGER /* @min:%2elogger */]);\n // Set the logging level to critical so that any critical initialization failures are displayed on the console\n _configHandler.cfg[_DYN_LOGGING_LEVEL_CONSOL4 /* @min:%2eloggingLevelConsole */] = 1 /* eLoggingSeverity.CRITICAL */;\n // Define _self.config\n objDefine(_self, \"config\", {\n g: function () {\n return _configHandler.cfg;\n },\n s: function (newValue) {\n _self.updateCfg(newValue, false);\n }\n });\n objDefine(_self, \"pluginVersionStringArr\", {\n g: function () {\n if (!_pluginVersionStringArr) {\n _setPluginVersions();\n }\n return _pluginVersionStringArr;\n }\n });\n objDefine(_self, \"pluginVersionString\", {\n g: function () {\n if (!_pluginVersionString) {\n if (!_pluginVersionStringArr) {\n _setPluginVersions();\n }\n _pluginVersionString = _pluginVersionStringArr.join(\";\");\n }\n return _pluginVersionString || STR_EMPTY;\n }\n });\n objDefine(_self, \"logger\", {\n g: function () {\n if (!_logger) {\n _logger = new DiagnosticLogger(_configHandler.cfg);\n _configHandler[_DYN_LOGGER /* @min:%2elogger */] = _logger;\n }\n return _logger;\n },\n s: function (newLogger) {\n _configHandler[_DYN_LOGGER /* @min:%2elogger */] = newLogger;\n if (_logger !== newLogger) {\n runTargetUnload(_logger, false);\n _logger = newLogger;\n }\n }\n });\n _self[_DYN_LOGGER /* @min:%2elogger */] = new DiagnosticLogger(_configHandler.cfg);\n _extensions = [];\n var cfgExtensions = _self.config[STR_EXTENSIONS /* @min:%2eextensions */] || [];\n cfgExtensions.splice(0, cfgExtensions[_DYN_LENGTH /* @min:%2elength */]);\n arrAppend(cfgExtensions, _extensions);\n _telemetryInitializerPlugin = new TelemetryInitializerPlugin();\n _eventQueue = [];\n runTargetUnload(_notificationManager, false);\n _notificationManager = null;\n _perfManager = null;\n _cfgPerfManager = null;\n runTargetUnload(_cookieManager, false);\n _cookieManager = null;\n _pluginChain = null;\n _configExtensions = [];\n _channelConfig = null;\n _channels = null;\n _isUnloading = false;\n _internalLogsEventName = null;\n _evtNamespace = createUniqueNamespace(\"AIBaseCore\", true);\n _unloadHandlers = createUnloadHandlerContainer();\n _traceCtx = null;\n _instrumentationKey = null;\n _hookContainer = createUnloadHookContainer();\n _cfgListeners = [];\n _pluginVersionString = null;\n _pluginVersionStringArr = null;\n _forceStopInternalLogPoller = false;\n _internalLogPoller = null;\n _internalLogPollerListening = false;\n _activeStatus = 0 /* eActiveStatus.NONE */; // default is None\n _endpoint = null;\n _initInMemoMaxSize = null;\n _isStatusSet = false;\n _initTimer = null;\n }\n function _createTelCtx() {\n var theCtx = createProcessTelemetryContext(_getPluginChain(), _configHandler.cfg, _self);\n theCtx[_DYN_ON_COMPLETE /* @min:%2eonComplete */](_startLogPoller);\n return theCtx;\n }\n // Initialize or Re-initialize the plugins\n function _initPluginChain(updateState) {\n // Extension validation\n var theExtensions = _validateExtensions(_self[_DYN_LOGGER /* @min:%2elogger */], ChannelControllerPriority, _configExtensions);\n _pluginChain = null;\n _pluginVersionString = null;\n _pluginVersionStringArr = null;\n // Get the primary channel queue and include as part of the normal extensions\n _channels = (_channelConfig || [])[0] || [];\n // Add any channels provided in the extensions and sort them\n _channels = sortPlugins(arrAppend(_channels, theExtensions[STR_CHANNELS /* @min:%2echannels */]));\n // Create an array of all extensions, including the _channels\n var allExtensions = arrAppend(sortPlugins(theExtensions[STR_CORE /* @min:%2ecore */]), _channels);\n // Required to allow plugins to call core.getPlugin() during their own initialization\n _extensions = objFreeze(allExtensions);\n // This has a side effect of adding the extensions passed during initialization\n // into the config.extensions, so you can see all of the extensions loaded.\n // This will also get updated by the addPlugin() and remove plugin code.\n var cfgExtensions = _self.config[STR_EXTENSIONS /* @min:%2eextensions */] || [];\n cfgExtensions.splice(0, cfgExtensions[_DYN_LENGTH /* @min:%2elength */]);\n arrAppend(cfgExtensions, _extensions);\n var rootCtx = _createTelCtx();\n // Initializing the channels first\n if (_channels && _channels[_DYN_LENGTH /* @min:%2elength */] > 0) {\n initializePlugins(rootCtx[_DYN_CREATE_NEW /* @min:%2ecreateNew */](_channels), allExtensions);\n }\n // Now initialize the normal extensions (explicitly not including the _channels as this can cause duplicate initialization)\n initializePlugins(rootCtx, allExtensions);\n if (updateState) {\n _doUpdate(updateState);\n }\n }\n function _getPlugin(pluginIdentifier) {\n var theExt = null;\n var thePlugin = null;\n var channelHosts = [];\n arrForEach(_extensions, function (ext) {\n if (ext[_DYN_IDENTIFIER /* @min:%2eidentifier */] === pluginIdentifier && ext !== _telemetryInitializerPlugin) {\n thePlugin = ext;\n return -1;\n }\n if (ext.getChannel) {\n channelHosts[_DYN_PUSH /* @min:%2epush */](ext);\n }\n });\n if (!thePlugin && channelHosts[_DYN_LENGTH /* @min:%2elength */] > 0) {\n arrForEach(channelHosts, function (host) {\n thePlugin = host.getChannel(pluginIdentifier);\n if (!thePlugin) {\n return -1;\n }\n });\n }\n if (thePlugin) {\n theExt = {\n plugin: thePlugin,\n setEnabled: function (enabled) {\n _getPluginState(thePlugin)[STR_DISABLED] = !enabled;\n },\n isEnabled: function () {\n var pluginState = _getPluginState(thePlugin);\n return !pluginState[_DYN_TEARDOWN /* @min:%2eteardown */] && !pluginState[STR_DISABLED];\n },\n remove: function (isAsync, removeCb) {\n var _a;\n if (isAsync === void 0) {\n isAsync = true;\n }\n var pluginsToRemove = [thePlugin];\n var unloadState = (_a = {\n reason: 1 /* TelemetryUnloadReason.PluginUnload */\n }, _a[_DYN_IS_ASYNC /* @min:isAsync */] = isAsync, _a);\n _removePlugins(pluginsToRemove, unloadState, function (removed) {\n if (removed) {\n // Re-Initialize the plugin chain\n _initPluginChain({\n reason: 32 /* TelemetryUpdateReason.PluginRemoved */,\n removed: pluginsToRemove\n });\n }\n removeCb && removeCb(removed);\n });\n }\n };\n }\n return theExt;\n }\n function _getPluginChain() {\n if (!_pluginChain) {\n // copy the collection of extensions\n var extensions = (_extensions || []).slice();\n // During add / remove this may get called again, so don't read if already present\n if (arrIndexOf(extensions, _telemetryInitializerPlugin) === -1) {\n extensions[_DYN_PUSH /* @min:%2epush */](_telemetryInitializerPlugin);\n }\n _pluginChain = createTelemetryProxyChain(sortPlugins(extensions), _configHandler.cfg, _self);\n }\n return _pluginChain;\n }\n function _removePlugins(thePlugins, unloadState, removeComplete) {\n if (thePlugins && thePlugins[_DYN_LENGTH /* @min:%2elength */] > 0) {\n var unloadChain = createTelemetryProxyChain(thePlugins, _configHandler.cfg, _self);\n var unloadCtx = createProcessTelemetryUnloadContext(unloadChain, _self);\n unloadCtx[_DYN_ON_COMPLETE /* @min:%2eonComplete */](function () {\n var removed = false;\n // Remove the listed config extensions\n var newConfigExtensions = [];\n arrForEach(_configExtensions, function (plugin, idx) {\n if (!_isPluginPresent(plugin, thePlugins)) {\n newConfigExtensions[_DYN_PUSH /* @min:%2epush */](plugin);\n } else {\n removed = true;\n }\n });\n _configExtensions = newConfigExtensions;\n _pluginVersionString = null;\n _pluginVersionStringArr = null;\n // Re-Create the channel config\n var newChannelConfig = [];\n if (_channelConfig) {\n arrForEach(_channelConfig, function (queue, idx) {\n var newQueue = [];\n arrForEach(queue, function (channel) {\n if (!_isPluginPresent(channel, thePlugins)) {\n newQueue[_DYN_PUSH /* @min:%2epush */](channel);\n } else {\n removed = true;\n }\n });\n newChannelConfig[_DYN_PUSH /* @min:%2epush */](newQueue);\n });\n _channelConfig = newChannelConfig;\n }\n removeComplete && removeComplete(removed);\n _startLogPoller();\n });\n unloadCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](unloadState);\n } else {\n removeComplete(false);\n }\n }\n function _flushInternalLogs() {\n if (_logger && _logger.queue) {\n var queue = _logger.queue.slice(0);\n _logger.queue[_DYN_LENGTH /* @min:%2elength */] = 0;\n arrForEach(queue, function (logMessage) {\n var _a;\n var item = (_a = {}, _a[_DYN_NAME /* @min:name */] = _internalLogsEventName ? _internalLogsEventName : \"InternalMessageId: \" + logMessage[_DYN_MESSAGE_ID /* @min:%2emessageId */], _a[_DYN_I_KEY /* @min:iKey */] = _instrumentationKey, _a[_DYN_TIME /* @min:time */] = toISOString(new Date()), _a.baseType = _InternalLogMessage.dataType, _a.baseData = {\n message: logMessage[_DYN_MESSAGE /* @min:%2emessage */]\n }, _a);\n _self.track(item);\n });\n }\n }\n function _flushChannels(isAsync, callBack, sendReason, cbTimeout) {\n // Setting waiting to one so that we don't call the callBack until we finish iterating\n var waiting = 1;\n var doneIterating = false;\n var cbTimer = null;\n cbTimeout = cbTimeout || 5000;\n function doCallback() {\n waiting--;\n if (doneIterating && waiting === 0) {\n cbTimer && cbTimer[_DYN_CANCEL /* @min:%2ecancel */]();\n cbTimer = null;\n callBack && callBack(doneIterating);\n callBack = null;\n }\n }\n if (_channels && _channels[_DYN_LENGTH /* @min:%2elength */] > 0) {\n var flushCtx = _createTelCtx()[_DYN_CREATE_NEW /* @min:%2ecreateNew */](_channels);\n flushCtx.iterate(function (plugin) {\n if (plugin.flush) {\n waiting++;\n var handled_1 = false;\n // Not all channels will call this callback for every scenario\n if (!plugin.flush(isAsync, function () {\n handled_1 = true;\n doCallback();\n }, sendReason)) {\n if (!handled_1) {\n // If any channel doesn't return true and it didn't call the callback, then we should assume that the callback\n // will never be called, so use a timeout to allow the channel(s) some time to \"finish\" before triggering any\n // followup function (such as unloading)\n if (isAsync && cbTimer == null) {\n cbTimer = scheduleTimeout(function () {\n cbTimer = null;\n doCallback();\n }, cbTimeout);\n } else {\n doCallback();\n }\n }\n }\n }\n });\n }\n doneIterating = true;\n doCallback();\n return true;\n }\n function _initPerfManager() {\n // Save the previous config based performance manager creator to avoid creating new perf manager instances if unchanged\n var prevCfgPerfMgr;\n // Will get recalled if any referenced config values are changed\n _addUnloadHook(_configHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\n var enablePerfMgr = details.cfg.enablePerfMgr;\n if (enablePerfMgr) {\n var createPerfMgr = details.cfg[STR_CREATE_PERF_MGR /* @min:%2ecreatePerfMgr */];\n // for preCfgPerfMgr = createPerfMgr = null\n // initial createPerfMgr function should be _createPerfManager\n if (prevCfgPerfMgr !== createPerfMgr || !prevCfgPerfMgr) {\n if (!createPerfMgr) {\n createPerfMgr = _createPerfManager;\n }\n // Set the performance manager creation function if not defined\n getSetValue(details.cfg, STR_CREATE_PERF_MGR, createPerfMgr);\n prevCfgPerfMgr = createPerfMgr;\n // Remove any existing config based performance manager\n _cfgPerfManager = null;\n }\n // Only create the performance manager if it's not already created or manually set\n if (!_perfManager && !_cfgPerfManager && isFunction(createPerfMgr)) {\n // Create a new config based performance manager\n _cfgPerfManager = createPerfMgr(_self, _self[_DYN_GET_NOTIFY_MGR /* @min:%2egetNotifyMgr */]());\n }\n } else {\n // Remove any existing config based performance manager\n _cfgPerfManager = null;\n // Clear the previous cached value so it can be GC'd\n prevCfgPerfMgr = null;\n }\n }));\n }\n function _doUpdate(updateState) {\n var updateCtx = createProcessTelemetryUpdateContext(_getPluginChain(), _self);\n updateCtx[_DYN_ON_COMPLETE /* @min:%2eonComplete */](_startLogPoller);\n if (!_self._updateHook || _self._updateHook(updateCtx, updateState) !== true) {\n updateCtx[_DYN_PROCESS_NEXT /* @min:%2eprocessNext */](updateState);\n }\n }\n function _logOrThrowError(message) {\n var logger = _self[_DYN_LOGGER /* @min:%2elogger */];\n if (logger) {\n // there should always be a logger\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 73 /* _eInternalMessageId.PluginException */, message);\n _startLogPoller();\n } else {\n throwError(message);\n }\n }\n function _notifyInvalidEvent(telemetryItem) {\n var manager = _self[_DYN_GET_NOTIFY_MGR /* @min:%2egetNotifyMgr */]();\n if (manager) {\n manager[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */]([telemetryItem], 2 /* eEventsDiscardedReason.InvalidEvent */);\n }\n }\n function _addUnloadHook(hooks) {\n _hookContainer.add(hooks);\n }\n });\n }\n // Removed Stub for AppInsightsCore.prototype.initialize.\n // Removed Stub for AppInsightsCore.prototype.getChannels.\n // Removed Stub for AppInsightsCore.prototype.track.\n // Removed Stub for AppInsightsCore.prototype.getProcessTelContext.\n // Removed Stub for AppInsightsCore.prototype.getNotifyMgr.\n // Removed Stub for AppInsightsCore.prototype.addNotificationListener.\n // Removed Stub for AppInsightsCore.prototype.removeNotificationListener.\n // Removed Stub for AppInsightsCore.prototype.getCookieMgr.\n // Removed Stub for AppInsightsCore.prototype.setCookieMgr.\n // Removed Stub for AppInsightsCore.prototype.getPerfMgr.\n // Removed Stub for AppInsightsCore.prototype.setPerfMgr.\n // Removed Stub for AppInsightsCore.prototype.eventCnt.\n // Removed Stub for AppInsightsCore.prototype.pollInternalLogs.\n // Removed Stub for AppInsightsCore.prototype.stopPollingInternalLogs.\n // Removed Stub for AppInsightsCore.prototype.addTelemetryInitializer.\n // Removed Stub for AppInsightsCore.prototype.unload.\n // Removed Stub for AppInsightsCore.prototype.getPlugin.\n // Removed Stub for AppInsightsCore.prototype.addPlugin.\n // Removed Stub for AppInsightsCore.prototype.updateCfg.\n // Removed Stub for AppInsightsCore.prototype.evtNamespace.\n // Removed Stub for AppInsightsCore.prototype.addUnloadCb.\n // Removed Stub for AppInsightsCore.prototype.flush.\n // Removed Stub for AppInsightsCore.prototype.getTraceCtx.\n // Removed Stub for AppInsightsCore.prototype.setTraceCtx.\n // Removed Stub for AppInsightsCore.prototype.addUnloadHook.\n // Removed Stub for AppInsightsCore.prototype.onCfgChange.\n // Removed Stub for AppInsightsCore.prototype.activeStatus.\n // Removed Stub for AppInsightsCore.prototype._setPendingStatus.\n // Removed Stub for AppInsightsCore.prototype.releaseQueue.\n // Removed Stub for AppInsightsCore.prototype._updateHook.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n AppInsightsCore.__ieDyn = 1;\n return AppInsightsCore;\n}();\nexport { AppInsightsCore };\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { dumpObj } from \"@nevware21/ts-utils\";\nimport { _DYN_ITEMS_RECEIVED, _DYN_LENGTH, _DYN_NAME } from \"../__DynamicConstants\";\nimport { _throwInternal } from \"./DiagnosticLogger\";\nimport { getJSON } from \"./EnvUtils\";\n/**\r\n * Parses the response from the backend.\r\n * @param response - XMLHttpRequest or XDomainRequest response\r\n */\nexport function parseResponse(response, diagLog) {\n try {\n if (response && response !== \"\") {\n var result = getJSON().parse(response);\n if (result && result[_DYN_ITEMS_RECEIVED /* @min:%2eitemsReceived */] && result[_DYN_ITEMS_RECEIVED /* @min:%2eitemsReceived */] >= result.itemsAccepted && result.itemsReceived - result.itemsAccepted === result.errors[_DYN_LENGTH /* @min:%2elength */]) {\n return result;\n }\n }\n } catch (e) {\n _throwInternal(diagLog, 1 /* eLoggingSeverity.CRITICAL */, 43 /* _eInternalMessageId.InvalidBackendResponse */, \"Cannot parse the response. \" + (e[_DYN_NAME /* @min:%2ename */] || dumpObj(e)), {\n response: response\n });\n }\n return null;\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { createPromise, doAwaitResponse } from \"@nevware21/ts-async\";\nimport { arrForEach, dumpObj, getNavigator, getWindow, isFunction, objKeys } from \"@nevware21/ts-utils\";\nimport { _DYN_DATA, _DYN_HEADERS, _DYN_INITIALIZE, _DYN_LENGTH, _DYN_MESSAGE, _DYN_PROTOCOL, _DYN_REPLACE, _DYN_SEND_POST, _DYN_SET_REQUEST_HEADER, _DYN_STATUS, _DYN_TIMEOUT, _DYN_TO_LOWER_CASE, _DYN_URL_STRING, _DYN_VALUE, _DYN__DO_TEARDOWN } from \"../__DynamicConstants\";\nimport { DisabledPropertyName } from \"./Constants\";\nimport { _throwInternal, _warnToConsole } from \"./DiagnosticLogger\";\nimport { getLocation, isBeaconsSupported, isFetchSupported, isXhrSupported, useXDomainRequest } from \"./EnvUtils\";\nimport { _getAllResponseHeaders, formatErrorMessageXdr, formatErrorMessageXhr, getResponseText, openXhr } from \"./HelperFuncs\";\nvar STR_EMPTY = \"\";\nvar STR_NO_RESPONSE_BODY = \"NoResponseBody\";\nvar _noResponseQs = \"&\" + STR_NO_RESPONSE_BODY + \"=true\";\nvar STR_POST_METHOD = \"POST\";\n/**\r\n * This Internal component\r\n * Manager SendPost functions\r\n * SendPostManger\r\n * @internal for internal use only\r\n */\nvar SenderPostManager = /** @class */function () {\n function SenderPostManager() {\n var _syncFetchPayload = 0; // Keep track of the outstanding sync fetch payload total (as sync fetch has limits)\n var _enableSendPromise;\n var _isInitialized;\n var _diagLog;\n var _isOneDs;\n var _onCompleteFuncs;\n var _disableCredentials;\n var _fetchCredentials;\n var _fallbackInst;\n var _disableXhr;\n var _disableBeacon;\n var _disableBeaconSync;\n var _disableFetchKeepAlive;\n var _addNoResponse;\n var _timeoutWrapper;\n dynamicProto(SenderPostManager, this, function (_self, _base) {\n var _sendCredentials = true; // for 1ds\n _initDefaults();\n _self[_DYN_INITIALIZE /* @min:%2einitialize */] = function (config, diagLog) {\n _diagLog = diagLog;\n if (_isInitialized) {\n _throwInternal(_diagLog, 1 /* eLoggingSeverity.CRITICAL */, 28 /* _eInternalMessageId.SenderNotInitialized */, \"Sender is already initialized\");\n }\n _self.SetConfig(config);\n _isInitialized = true;\n };\n _self[\"_getDbgPlgTargets\"] = function () {\n return [_isInitialized, _isOneDs, _disableCredentials, _enableSendPromise];\n };\n // This componet might get its config from sender, offline sender, 1ds post\n // so set this function to mock dynamic changes\n _self.SetConfig = function (config) {\n try {\n _onCompleteFuncs = config.senderOnCompleteCallBack || {};\n _disableCredentials = !!config.disableCredentials;\n _fetchCredentials = config.fetchCredentials;\n _isOneDs = !!config.isOneDs;\n _enableSendPromise = !!config.enableSendPromise;\n _disableXhr = !!config.disableXhr;\n _disableBeacon = !!config.disableBeacon;\n _disableBeaconSync = !!config.disableBeaconSync;\n _timeoutWrapper = config.timeWrapper;\n _addNoResponse = !!config.addNoResponse;\n _disableFetchKeepAlive = !!config.disableFetchKeepAlive;\n _fallbackInst = {\n sendPOST: _xhrSender\n };\n if (!_isOneDs) {\n _sendCredentials = false; // for appInsights, set it to false always\n }\n if (_disableCredentials) {\n var location_1 = getLocation();\n if (location_1 && location_1.protocol && location_1.protocol[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() === \"file:\") {\n // Special case where a local html file fails with a CORS error on Chromium browsers\n _sendCredentials = false;\n }\n }\n return true;\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return false;\n };\n _self.getSyncFetchPayload = function () {\n return _syncFetchPayload;\n };\n _self.getSenderInst = function (transports, sync) {\n if (transports && transports[_DYN_LENGTH /* @min:%2elength */]) {\n return _getSenderInterface(transports, sync);\n }\n return null;\n };\n _self.getFallbackInst = function () {\n return _fallbackInst;\n };\n _self[_DYN__DO_TEARDOWN /* @min:%2e_doTeardown */] = function (unloadCtx, unloadState) {\n _initDefaults();\n };\n /**\r\n * success handler\r\n */\n function _onSuccess(res, onComplete) {\n _doOnComplete(onComplete, 200, {}, res);\n }\n /**\r\n * error handler\r\n */\n function _onError(message, onComplete) {\n _throwInternal(_diagLog, 2 /* eLoggingSeverity.WARNING */, 26 /* _eInternalMessageId.OnError */, \"Failed to send telemetry.\", {\n message: message\n });\n _doOnComplete(onComplete, 400, {});\n }\n function _onNoPayloadUrl(onComplete) {\n _onError(\"No endpoint url is provided for the batch\", onComplete);\n }\n function _getSenderInterface(transports, syncSupport) {\n var _a;\n var transportType = 0 /* TransportType.NotSet */;\n var sendPostFunc = null;\n var lp = 0;\n while (sendPostFunc == null && lp < transports[_DYN_LENGTH /* @min:%2elength */]) {\n transportType = transports[lp];\n if (!_disableXhr && transportType === 1 /* TransportType.Xhr */) {\n if (useXDomainRequest()) {\n // IE 8 and 9\n sendPostFunc = _xdrSender;\n } else if (isXhrSupported()) {\n sendPostFunc = _xhrSender;\n }\n } else if (transportType === 2 /* TransportType.Fetch */ && isFetchSupported(syncSupport) && (!syncSupport || !_disableFetchKeepAlive)) {\n sendPostFunc = _doFetchSender;\n } else if (transportType === 3 /* TransportType.Beacon */ && isBeaconsSupported() && (syncSupport ? !_disableBeaconSync : !_disableBeacon)) {\n sendPostFunc = _beaconSender;\n }\n lp++;\n }\n if (sendPostFunc) {\n return _a = {\n _transport: transportType,\n _isSync: syncSupport\n }, _a[_DYN_SEND_POST /* @min:sendPOST */] = sendPostFunc, _a;\n }\n return null;\n }\n function _doOnComplete(oncomplete, status, headers, response) {\n try {\n oncomplete && oncomplete(status, headers, response);\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n }\n function _doBeaconSend(payload, oncomplete) {\n var nav = getNavigator();\n var url = payload[_DYN_URL_STRING /* @min:%2eurlString */];\n if (!url) {\n _onNoPayloadUrl(oncomplete);\n // return true here, because we don't want to retry it with fallback sender\n return true;\n }\n url = payload[_DYN_URL_STRING /* @min:%2eurlString */] + (_addNoResponse ? _noResponseQs : STR_EMPTY);\n var data = payload[_DYN_DATA /* @min:%2edata */];\n // Chrome only allows CORS-safelisted values for the sendBeacon data argument\n // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283\n // Chrome only allows CORS-safelisted values for the sendBeacon data argument\n // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283\n var plainTextBatch = _isOneDs ? data : new Blob([data], {\n type: \"text/plain;charset=UTF-8\"\n });\n // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\n var queued = nav.sendBeacon(url, plainTextBatch);\n return queued;\n }\n /**\r\n * Send Beacon API request\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param sync - {boolean} - not used\r\n * Note: Beacon API does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\n function _beaconSender(payload, oncomplete, sync) {\n var data = payload[_DYN_DATA /* @min:%2edata */];\n try {\n if (data) {\n // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\n if (!_doBeaconSend(payload, oncomplete)) {\n var onRetry = _onCompleteFuncs && _onCompleteFuncs.beaconOnRetry;\n if (onRetry && isFunction(onRetry)) {\n onRetry(payload, oncomplete, _doBeaconSend);\n } else {\n _fallbackInst && _fallbackInst[_DYN_SEND_POST /* @min:%2esendPOST */](payload, oncomplete, true);\n _throwInternal(_diagLog, 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". \" + \"Failed to send telemetry with Beacon API, retried with normal sender.\");\n }\n } else {\n // if can send\n _onSuccess(STR_EMPTY, oncomplete);\n }\n }\n } catch (e) {\n _isOneDs && _warnToConsole(_diagLog, \"Failed to send telemetry using sendBeacon API. Ex:\" + dumpObj(e));\n _doOnComplete(oncomplete, _isOneDs ? 0 : 400, {}, STR_EMPTY);\n }\n return;\n }\n /**\r\n * Send XMLHttpRequest\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param sync - {boolean} - Indicates if the request should be sent synchronously\r\n */\n function _xhrSender(payload, oncomplete, sync) {\n //let internalPayload = payload as IInternalPayloadData;\n var thePromise;\n var resolveFunc;\n var rejectFunc;\n var headers = payload[_DYN_HEADERS /* @min:%2eheaders */] || {};\n if (!sync && _enableSendPromise) {\n thePromise = createPromise(function (resolve, reject) {\n resolveFunc = resolve;\n rejectFunc = reject;\n });\n }\n if (_isOneDs && sync && payload.disableXhrSync) {\n sync = false;\n }\n //const xhr = new XMLHttpRequest();\n var endPointUrl = payload[_DYN_URL_STRING /* @min:%2eurlString */];\n if (!endPointUrl) {\n _onNoPayloadUrl(oncomplete);\n resolveFunc && resolveFunc(false);\n return;\n }\n var xhr = openXhr(STR_POST_METHOD, endPointUrl, _sendCredentials, true, sync, payload[_DYN_TIMEOUT /* @min:%2etimeout */]);\n if (!_isOneDs) {\n // application/json should NOT add to 1ds post by default\n xhr[_DYN_SET_REQUEST_HEADER /* @min:%2esetRequestHeader */](\"Content-type\", \"application/json\");\n }\n arrForEach(objKeys(headers), function (headerName) {\n xhr[_DYN_SET_REQUEST_HEADER /* @min:%2esetRequestHeader */](headerName, headers[headerName]);\n });\n xhr.onreadystatechange = function () {\n if (!_isOneDs) {\n _doOnReadyFunc(xhr);\n if (xhr.readyState === 4) {\n resolveFunc && resolveFunc(true);\n }\n }\n };\n xhr.onload = function () {\n if (_isOneDs) {\n _doOnReadyFunc(xhr);\n }\n };\n function _doOnReadyFunc(xhr) {\n var onReadyFunc = _onCompleteFuncs && _onCompleteFuncs.xhrOnComplete;\n var onReadyFuncExist = onReadyFunc && isFunction(onReadyFunc);\n if (onReadyFuncExist) {\n onReadyFunc(xhr, oncomplete, payload);\n } else {\n var response = getResponseText(xhr);\n _doOnComplete(oncomplete, xhr[_DYN_STATUS /* @min:%2estatus */], _getAllResponseHeaders(xhr, _isOneDs), response);\n }\n }\n xhr.onerror = function (event) {\n _doOnComplete(oncomplete, _isOneDs ? xhr[_DYN_STATUS /* @min:%2estatus */] : 400, _getAllResponseHeaders(xhr, _isOneDs), _isOneDs ? STR_EMPTY : formatErrorMessageXhr(xhr));\n rejectFunc && rejectFunc(event);\n };\n xhr.ontimeout = function () {\n _doOnComplete(oncomplete, _isOneDs ? xhr[_DYN_STATUS /* @min:%2estatus */] : 500, _getAllResponseHeaders(xhr, _isOneDs), _isOneDs ? STR_EMPTY : formatErrorMessageXhr(xhr));\n resolveFunc && resolveFunc(false);\n };\n xhr.send(payload[_DYN_DATA /* @min:%2edata */]);\n return thePromise;\n }\n /**\r\n * Send fetch API request\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param sync - {boolean} - For fetch this identifies whether we are \"unloading\" (false) or a normal request\r\n */\n function _doFetchSender(payload, oncomplete, sync) {\n var _a;\n var endPointUrl = payload[_DYN_URL_STRING /* @min:%2eurlString */];\n var batch = payload[_DYN_DATA /* @min:%2edata */];\n var plainTextBatch = _isOneDs ? batch : new Blob([batch], {\n type: \"application/json\"\n });\n var thePromise;\n var resolveFunc;\n var rejectFunc;\n var requestHeaders = new Headers();\n var batchLength = batch[_DYN_LENGTH /* @min:%2elength */];\n var ignoreResponse = false;\n var responseHandled = false;\n var headers = payload[_DYN_HEADERS /* @min:%2eheaders */] || {};\n //TODO: handle time out for 1ds\n var init = (_a = {\n method: STR_POST_METHOD,\n body: plainTextBatch\n }, _a[DisabledPropertyName] = true // Mark so we don't attempt to track this request\n , _a);\n // Only add headers if there are headers to add, due to issue with some polyfills\n if (payload.headers && objKeys(payload.headers)[_DYN_LENGTH /* @min:%2elength */] > 0) {\n arrForEach(objKeys(headers), function (headerName) {\n requestHeaders.append(headerName, headers[headerName]);\n });\n init[_DYN_HEADERS /* @min:%2eheaders */] = requestHeaders;\n }\n if (_fetchCredentials) {\n // if user passed in this value via post channel (1ds), then use it\n init.credentials = _fetchCredentials;\n } else if (_sendCredentials && _isOneDs) {\n // for 1ds, Don't send credentials when URL is file://\n init.credentials = \"include\";\n }\n if (sync) {\n init.keepalive = true;\n _syncFetchPayload += batchLength;\n if (_isOneDs) {\n if (payload[\"_sendReason\"] === 2 /* SendRequestReason.Unload */) {\n // As a sync request (during unload), it is unlikely that we will get a chance to process the response so\n // just like beacon send assume that the events have been accepted and processed\n ignoreResponse = true;\n if (_addNoResponse) {\n endPointUrl += _noResponseQs;\n }\n }\n } else {\n // for appinsights, set to true for all sync request\n ignoreResponse = true;\n }\n }\n var request = new Request(endPointUrl, init);\n try {\n // Also try and tag the request (just in case the value in init is not copied over)\n request[DisabledPropertyName] = true;\n } catch (e) {\n // If the environment has locked down the XMLHttpRequest (preventExtensions and/or freeze), this would\n // cause the request to fail and we no telemetry would be sent\n }\n if (!sync && _enableSendPromise) {\n thePromise = createPromise(function (resolve, reject) {\n resolveFunc = resolve;\n rejectFunc = reject;\n });\n }\n if (!endPointUrl) {\n _onNoPayloadUrl(oncomplete);\n resolveFunc && resolveFunc(false);\n return;\n }\n function _handleError(res) {\n // In case there is an error in the request. Set the status to 0 for 1ds and 400 for appInsights\n // so that the events can be retried later.\n _doOnComplete(oncomplete, _isOneDs ? 0 : 400, {}, _isOneDs ? STR_EMPTY : res);\n }\n function _onFetchComplete(response, payload, value) {\n var status = response[_DYN_STATUS /* @min:%2estatus */];\n var onCompleteFunc = _onCompleteFuncs.fetchOnComplete;\n if (onCompleteFunc && isFunction(onCompleteFunc)) {\n onCompleteFunc(response, oncomplete, value || STR_EMPTY, payload);\n } else {\n _doOnComplete(oncomplete, status, {}, value || STR_EMPTY);\n }\n }\n try {\n doAwaitResponse(fetch(_isOneDs ? endPointUrl : request, _isOneDs ? init : null), function (result) {\n if (sync) {\n _syncFetchPayload -= batchLength;\n batchLength = 0;\n }\n if (!responseHandled) {\n responseHandled = true;\n if (!result.rejected) {\n var response_1 = result[_DYN_VALUE /* @min:%2evalue */];\n try {\n /**\r\n * The Promise returned from fetch() won’t reject on HTTP error status even if the response is an HTTP 404 or 500.\r\n * Instead, it will resolve normally (with ok status set to false), and it will only reject on network failure\r\n * or if anything prevented the request from completing.\r\n */\n if (!_isOneDs && !response_1.ok) {\n // this is for appInsights only\n _handleError(response_1.statusText);\n resolveFunc && resolveFunc(false);\n } else {\n if (_isOneDs && !response_1.body) {\n _onFetchComplete(response_1, null, STR_EMPTY);\n resolveFunc && resolveFunc(true);\n } else {\n doAwaitResponse(response_1.text(), function (resp) {\n _onFetchComplete(response_1, payload, resp[_DYN_VALUE /* @min:%2evalue */]);\n resolveFunc && resolveFunc(true);\n });\n }\n }\n } catch (e) {\n _handleError(dumpObj(e));\n rejectFunc && rejectFunc(e);\n }\n } else {\n _handleError(result.reason && result.reason[_DYN_MESSAGE /* @min:%2emessage */]);\n rejectFunc && rejectFunc(result.reason);\n }\n }\n });\n } catch (e) {\n if (!responseHandled) {\n _handleError(dumpObj(e));\n rejectFunc && rejectFunc(e);\n }\n }\n if (ignoreResponse && !responseHandled) {\n // Assume success during unload processing as we most likely won't get the response\n responseHandled = true;\n _doOnComplete(oncomplete, 200, {});\n resolveFunc && resolveFunc(true);\n }\n if (_isOneDs && !responseHandled && payload[_DYN_TIMEOUT /* @min:%2etimeout */] > 0) {\n // Simulate timeout\n _timeoutWrapper && _timeoutWrapper.set(function () {\n if (!responseHandled) {\n // Assume a 500 response (which will cause a retry)\n responseHandled = true;\n _doOnComplete(oncomplete, 500, {});\n resolveFunc && resolveFunc(true);\n }\n }, payload[_DYN_TIMEOUT /* @min:%2etimeout */]);\n }\n return thePromise;\n }\n /**\r\n * Send XDomainRequest\r\n * @param payload - {string} - The data payload to be sent.\r\n * @param sync - {boolean} - Indicates if the request should be sent synchronously\r\n *\r\n * Note: XDomainRequest does not support sync requests. This 'isAsync' parameter is added\r\n * to maintain consistency with the xhrSender's contract\r\n * Note: XDomainRequest does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\n function _xdrSender(payload, oncomplete, sync) {\n // It doesn't support custom headers, so no action is taken with current requestHeaders\n var _window = getWindow();\n var xdr = new XDomainRequest();\n var data = payload[_DYN_DATA /* @min:%2edata */];\n xdr.onload = function () {\n var response = getResponseText(xdr);\n var onloadFunc = _onCompleteFuncs && _onCompleteFuncs.xdrOnComplete;\n if (onloadFunc && isFunction(onloadFunc)) {\n onloadFunc(xdr, oncomplete, payload);\n } else {\n _doOnComplete(oncomplete, 200, {}, response);\n }\n };\n xdr.onerror = function () {\n _doOnComplete(oncomplete, 400, {}, _isOneDs ? STR_EMPTY : formatErrorMessageXdr(xdr));\n };\n xdr.ontimeout = function () {\n _doOnComplete(oncomplete, 500, {});\n };\n xdr.onprogress = function () {};\n // XDomainRequest requires the same protocol as the hosting page.\n // If the protocol doesn't match, we can't send the telemetry :(.\n var hostingProtocol = _window && _window.location && _window.location[_DYN_PROTOCOL /* @min:%2eprotocol */] || \"\";\n var endpoint = payload[_DYN_URL_STRING /* @min:%2eurlString */];\n if (!endpoint) {\n _onNoPayloadUrl(oncomplete);\n return;\n }\n if (!_isOneDs && endpoint.lastIndexOf(hostingProtocol, 0) !== 0) {\n var msg = \"Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.\";\n _throwInternal(_diagLog, 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". \" + msg);\n _onError(msg, oncomplete);\n return;\n }\n var endpointUrl = _isOneDs ? endpoint : endpoint[_DYN_REPLACE /* @min:%2ereplace */](/^(https?:)/, \"\");\n xdr.open(STR_POST_METHOD, endpointUrl);\n if (payload[_DYN_TIMEOUT /* @min:%2etimeout */]) {\n xdr[_DYN_TIMEOUT /* @min:%2etimeout */] = payload[_DYN_TIMEOUT /* @min:%2etimeout */];\n }\n xdr.send(data);\n if (_isOneDs && sync) {\n _timeoutWrapper && _timeoutWrapper.set(function () {\n xdr.send(data);\n }, 0);\n } else {\n xdr.send(data);\n }\n }\n function _initDefaults() {\n _syncFetchPayload = 0;\n _isInitialized = false;\n _enableSendPromise = false;\n _diagLog = null;\n _isOneDs = null;\n _onCompleteFuncs = null;\n _disableCredentials = null;\n _fetchCredentials = null;\n _fallbackInst = null;\n _disableXhr = false;\n _disableBeacon = false;\n _disableBeaconSync = false;\n _disableFetchKeepAlive = false;\n _addNoResponse = false;\n _timeoutWrapper = null;\n }\n });\n }\n // Removed Stub for SenderPostManager.prototype.initialize.\n // Removed Stub for SenderPostManager.prototype.getSyncFetchPayload.\n // Removed Stub for SenderPostManager.prototype.SetConfig.\n // Removed Stub for SenderPostManager.prototype.getSenderInst.\n // Removed Stub for SenderPostManager.prototype.getFallbackInst.\n // Removed Stub for SenderPostManager.prototype._doTeardown.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n SenderPostManager.__ieDyn = 1;\n return SenderPostManager;\n}();\nexport { SenderPostManager };\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { arrForEach, arrIndexOf, getDocument, getWindow, isArray, objForEachKey, objKeys } from \"@nevware21/ts-utils\";\nimport { _DYN_HANDLER, _DYN_LENGTH, _DYN_NAME, _DYN_PUSH, _DYN_REPLACE, _DYN_SPLICE, _DYN_SPLIT, _DYN_TYPE } from \"../__DynamicConstants\";\nimport { createElmNodeData, createUniqueNamespace } from \"./DataCacheHelper\";\nimport { STR_EMPTY } from \"./InternalConstants\";\n// Added to help with minfication\nvar strOnPrefix = \"on\";\nvar strAttachEvent = \"attachEvent\";\nvar strAddEventHelper = \"addEventListener\";\nvar strDetachEvent = \"detachEvent\";\nvar strRemoveEventListener = \"removeEventListener\";\nvar strEvents = \"events\";\nvar strVisibilityChangeEvt = \"visibilitychange\";\nvar strPageHide = \"pagehide\";\nvar strPageShow = \"pageshow\";\nvar strUnload = \"unload\";\nvar strBeforeUnload = \"beforeunload\";\nvar strPageHideNamespace = createUniqueNamespace(\"aiEvtPageHide\");\nvar strPageShowNamespace = createUniqueNamespace(\"aiEvtPageShow\");\nvar rRemoveEmptyNs = /\\.[\\.]+/g;\nvar rRemoveTrailingEmptyNs = /[\\.]+$/;\nvar _guid = 1;\nvar elmNodeData = createElmNodeData(\"events\");\nvar eventNamespace = /^([^.]*)(?:\\.(.+)|)/;\nfunction _normalizeNamespace(name) {\n if (name && name[_DYN_REPLACE /* @min:%2ereplace */]) {\n return name[_DYN_REPLACE /* @min:%2ereplace */](/^[\\s\\.]+|(?=[\\s\\.])[\\.\\s]+$/g, STR_EMPTY);\n }\n return name;\n}\nfunction _getEvtNamespace(eventName, evtNamespace) {\n var _a;\n if (evtNamespace) {\n var theNamespace_1 = STR_EMPTY;\n if (isArray(evtNamespace)) {\n theNamespace_1 = STR_EMPTY;\n arrForEach(evtNamespace, function (name) {\n name = _normalizeNamespace(name);\n if (name) {\n if (name[0] !== \".\") {\n name = \".\" + name;\n }\n theNamespace_1 += name;\n }\n });\n } else {\n theNamespace_1 = _normalizeNamespace(evtNamespace);\n }\n if (theNamespace_1) {\n if (theNamespace_1[0] !== \".\") {\n theNamespace_1 = \".\" + theNamespace_1;\n }\n // We may only have the namespace and not an eventName\n eventName = (eventName || STR_EMPTY) + theNamespace_1;\n }\n }\n var parsedEvent = eventNamespace.exec(eventName || STR_EMPTY) || [];\n return _a = {}, _a[_DYN_TYPE /* @min:type */] = parsedEvent[1], _a.ns = (parsedEvent[2] || STR_EMPTY).replace(rRemoveEmptyNs, \".\").replace(rRemoveTrailingEmptyNs, STR_EMPTY)[_DYN_SPLIT /* @min:%2esplit */](\".\").sort().join(\".\"), _a;\n}\n/**\r\n * Get all of the registered events on the target object, this is primarily used for testing cleanup but may also be used by\r\n * applications to remove their own events\r\n * @param target - The EventTarget that has registered events\r\n * @param eventName - [Optional] The name of the event to return the registered handlers and full name (with namespaces)\r\n * @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,\r\n * if the eventName also includes a namespace the namespace(s) are merged into a single namespace\r\n */\nexport function __getRegisteredEvents(target, eventName, evtNamespace) {\n var theEvents = [];\n var eventCache = elmNodeData.get(target, strEvents, {}, false);\n var evtName = _getEvtNamespace(eventName, evtNamespace);\n objForEachKey(eventCache, function (evtType, registeredEvents) {\n arrForEach(registeredEvents, function (value) {\n var _a;\n if (!evtName[_DYN_TYPE /* @min:%2etype */] || evtName[_DYN_TYPE /* @min:%2etype */] === value.evtName[_DYN_TYPE /* @min:%2etype */]) {\n if (!evtName.ns || evtName.ns === evtName.ns) {\n theEvents[_DYN_PUSH /* @min:%2epush */]((_a = {}, _a[_DYN_NAME /* @min:name */] = value.evtName[_DYN_TYPE /* @min:%2etype */] + (value.evtName.ns ? \".\" + value.evtName.ns : STR_EMPTY), _a.handler = value[_DYN_HANDLER /* @min:%2ehandler */], _a));\n }\n }\n });\n });\n return theEvents;\n}\n// Exported for internal unit testing only\nfunction _getRegisteredEvents(target, evtName, addDefault) {\n if (addDefault === void 0) {\n addDefault = true;\n }\n var aiEvts = elmNodeData.get(target, strEvents, {}, addDefault);\n var registeredEvents = aiEvts[evtName];\n if (!registeredEvents) {\n registeredEvents = aiEvts[evtName] = [];\n }\n return registeredEvents;\n}\nfunction _doDetach(obj, evtName, handlerRef, useCapture) {\n if (obj && evtName && evtName[_DYN_TYPE /* @min:%2etype */]) {\n if (obj[strRemoveEventListener]) {\n obj[strRemoveEventListener](evtName[_DYN_TYPE /* @min:%2etype */], handlerRef, useCapture);\n } else if (obj[strDetachEvent]) {\n obj[strDetachEvent](strOnPrefix + evtName[_DYN_TYPE /* @min:%2etype */], handlerRef);\n }\n }\n}\nfunction _doAttach(obj, evtName, handlerRef, useCapture) {\n var result = false;\n if (obj && evtName && evtName[_DYN_TYPE /* @min:%2etype */] && handlerRef) {\n if (obj[strAddEventHelper]) {\n // all browsers except IE before version 9\n obj[strAddEventHelper](evtName[_DYN_TYPE /* @min:%2etype */], handlerRef, useCapture);\n result = true;\n } else if (obj[strAttachEvent]) {\n // IE before version 9\n obj[strAttachEvent](strOnPrefix + evtName[_DYN_TYPE /* @min:%2etype */], handlerRef);\n result = true;\n }\n }\n return result;\n}\nfunction _doUnregister(target, events, evtName, unRegFn) {\n var idx = events[_DYN_LENGTH /* @min:%2elength */];\n while (idx--) {\n var theEvent = events[idx];\n if (theEvent) {\n if (!evtName.ns || evtName.ns === theEvent.evtName.ns) {\n if (!unRegFn || unRegFn(theEvent)) {\n _doDetach(target, theEvent.evtName, theEvent[_DYN_HANDLER /* @min:%2ehandler */], theEvent.capture);\n // Remove the registered event\n events[_DYN_SPLICE /* @min:%2esplice */](idx, 1);\n }\n }\n }\n }\n}\nfunction _unregisterEvents(target, evtName, unRegFn) {\n if (evtName[_DYN_TYPE /* @min:%2etype */]) {\n _doUnregister(target, _getRegisteredEvents(target, evtName[_DYN_TYPE /* @min:%2etype */]), evtName, unRegFn);\n } else {\n var eventCache = elmNodeData.get(target, strEvents, {});\n objForEachKey(eventCache, function (evtType, events) {\n _doUnregister(target, events, evtName, unRegFn);\n });\n // Cleanup\n if (objKeys(eventCache)[_DYN_LENGTH /* @min:%2elength */] === 0) {\n elmNodeData.kill(target, strEvents);\n }\n }\n}\nexport function mergeEvtNamespace(theNamespace, namespaces) {\n var newNamespaces;\n if (namespaces) {\n if (isArray(namespaces)) {\n newNamespaces = [theNamespace].concat(namespaces);\n } else {\n newNamespaces = [theNamespace, namespaces];\n }\n // resort the namespaces so they are always in order\n newNamespaces = _getEvtNamespace(\"xx\", newNamespaces).ns[_DYN_SPLIT /* @min:%2esplit */](\".\");\n } else {\n newNamespaces = theNamespace;\n }\n return newNamespaces;\n}\n/**\r\n * Binds the specified function to an event, so that the function gets called whenever the event fires on the object\r\n * @param obj - Object to add the event too.\r\n * @param eventName - String that specifies any of the standard DHTML Events without \"on\" prefix, if may also include an optional (dot \".\" prefixed)\r\n * namespaces \"click\" \"click.mynamespace\" in addition to specific namespaces.\r\n * @param handlerRef - Pointer that specifies the function to call when event fires\r\n * @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,\r\n * if the eventName also includes a namespace the namespace(s) are merged into a single namespace\r\n * @param useCapture - [Optional] Defaults to false\r\n * @returns True if the function was bound successfully to the event, otherwise false\r\n */\nexport function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {\n var _a;\n if (useCapture === void 0) {\n useCapture = false;\n }\n var result = false;\n if (target) {\n try {\n var evtName = _getEvtNamespace(eventName, evtNamespace);\n result = _doAttach(target, evtName, handlerRef, useCapture);\n if (result && elmNodeData.accept(target)) {\n var registeredEvent = (_a = {\n guid: _guid++,\n evtName: evtName\n }, _a[_DYN_HANDLER /* @min:handler */] = handlerRef, _a.capture = useCapture, _a);\n _getRegisteredEvents(target, evtName.type)[_DYN_PUSH /* @min:%2epush */](registeredEvent);\n }\n } catch (e) {\n // Just Ignore any error so that we don't break any execution path\n }\n }\n return result;\n}\n/**\r\n * Removes an event handler for the specified event\r\n * @param Object - to remove the event from\r\n * @param eventName - {string} - The name of the event, with optional namespaces or just the namespaces,\r\n * such as \"click\", \"click.mynamespace\" or \".mynamespace\"\r\n * @param handlerRef - {any} - The callback function that needs to be removed from the given event, when using a\r\n * namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers\r\n * otherwise this will only remove events with this specific handler.\r\n * @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,\r\n * if the eventName also includes a namespace the namespace(s) are merged into a single namespace\r\n * @param useCapture - [Optional] Defaults to false\r\n */\nexport function eventOff(target, eventName, handlerRef, evtNamespace, useCapture) {\n if (useCapture === void 0) {\n useCapture = false;\n }\n if (target) {\n try {\n var evtName_1 = _getEvtNamespace(eventName, evtNamespace);\n var found_1 = false;\n _unregisterEvents(target, evtName_1, function (regEvent) {\n if (evtName_1.ns && !handlerRef || regEvent[_DYN_HANDLER /* @min:%2ehandler */] === handlerRef) {\n found_1 = true;\n return true;\n }\n return false;\n });\n if (!found_1) {\n // fallback to try and remove as requested\n _doDetach(target, evtName_1, handlerRef, useCapture);\n }\n } catch (e) {\n // Just Ignore any error so that we don't break any execution path\n }\n }\n}\n/**\r\n * Binds the specified function to an event, so that the function gets called whenever the event fires on the object\r\n * @param obj - Object to add the event too.\r\n * @param eventNameWithoutOn - String that specifies any of the standard DHTML Events without \"on\" prefix and optional (dot \".\" prefixed) namespaces \"click\" \"click.mynamespace\".\r\n * @param handlerRef - Pointer that specifies the function to call when event fires\r\n * @param useCapture - [Optional] Defaults to false\r\n * @returns True if the function was bound successfully to the event, otherwise false\r\n */\nexport function attachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {\n if (useCapture === void 0) {\n useCapture = false;\n }\n return eventOn(obj, eventNameWithoutOn, handlerRef, null, useCapture);\n}\n/**\r\n * Removes an event handler for the specified event\r\n * @param Object - to remove the event from\r\n * @param eventNameWithoutOn - {string} - The name of the event, with optional namespaces or just the namespaces,\r\n * such as \"click\", \"click.mynamespace\" or \".mynamespace\"\r\n * @param handlerRef - {any} - The callback function that needs to be removed from the given event, when using a\r\n * namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers\r\n * otherwise this will only remove events with this specific handler.\r\n * @param useCapture - [Optional] Defaults to false\r\n */\nexport function detachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {\n if (useCapture === void 0) {\n useCapture = false;\n }\n eventOff(obj, eventNameWithoutOn, handlerRef, null, useCapture);\n}\n/**\r\n * Trys to add an event handler for the specified event to the window, body and document\r\n * @param eventName - {string} - The name of the event\r\n * @param callback - {any} - The callback function that needs to be executed for the given event\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n * @return {boolean} - true if the handler was successfully added\r\n */\nexport function addEventHandler(eventName, callback, evtNamespace) {\n var result = false;\n var w = getWindow();\n if (w) {\n result = eventOn(w, eventName, callback, evtNamespace);\n result = eventOn(w[\"body\"], eventName, callback, evtNamespace) || result;\n }\n var doc = getDocument();\n if (doc) {\n result = eventOn(doc, eventName, callback, evtNamespace) || result;\n }\n return result;\n}\n/**\r\n * Trys to remove event handler(s) for the specified event/namespace to the window, body and document\r\n * @param eventName - {string} - The name of the event, with optional namespaces or just the namespaces,\r\n * such as \"click\", \"click.mynamespace\" or \".mynamespace\"\r\n * @param callback - {any} - - The callback function that needs to be removed from the given event, when using a\r\n * namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers\r\n * otherwise this will only remove events with this specific handler.\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n */\nexport function removeEventHandler(eventName, callback, evtNamespace) {\n var w = getWindow();\n if (w) {\n eventOff(w, eventName, callback, evtNamespace);\n eventOff(w[\"body\"], eventName, callback, evtNamespace);\n }\n var doc = getDocument();\n if (doc) {\n eventOff(doc, eventName, callback, evtNamespace);\n }\n}\n/**\r\n * Bind the listener to the array of events\r\n * @param events - An string array of event names to bind the listener to\r\n * @param listener - The event callback to call when the event is triggered\r\n * @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\nfunction _addEventListeners(events, listener, excludeEvents, evtNamespace) {\n var added = false;\n if (listener && events && events[_DYN_LENGTH /* @min:%2elength */] > 0) {\n arrForEach(events, function (name) {\n if (name) {\n if (!excludeEvents || arrIndexOf(excludeEvents, name) === -1) {\n added = addEventHandler(name, listener, evtNamespace) || added;\n }\n }\n });\n }\n return added;\n}\n/**\r\n * Bind the listener to the array of events\r\n * @param events - An string array of event names to bind the listener to\r\n * @param listener - The event callback to call when the event is triggered\r\n * @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\nexport function addEventListeners(events, listener, excludeEvents, evtNamespace) {\n var added = false;\n if (listener && events && isArray(events)) {\n added = _addEventListeners(events, listener, excludeEvents, evtNamespace);\n if (!added && excludeEvents && excludeEvents[_DYN_LENGTH /* @min:%2elength */] > 0) {\n // Failed to add any listeners and we excluded some, so just attempt to add the excluded events\n added = _addEventListeners(events, listener, null, evtNamespace);\n }\n }\n return added;\n}\n/**\r\n * Remove the listener from the array of events\r\n * @param events - An string array of event names to bind the listener to\r\n * @param listener - The event callback to call when the event is triggered\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n */\nexport function removeEventListeners(events, listener, evtNamespace) {\n if (events && isArray(events)) {\n arrForEach(events, function (name) {\n if (name) {\n removeEventHandler(name, listener, evtNamespace);\n }\n });\n }\n}\n/**\r\n * Listen to the 'beforeunload', 'unload' and 'pagehide' events which indicates a page unload is occurring,\r\n * this does NOT listen to the 'visibilitychange' event as while it does indicate that the page is being hidden\r\n * it does not *necessarily* mean that the page is being completely unloaded, it can mean that the user is\r\n * just navigating to a different Tab and may come back (without unloading the page). As such you may also\r\n * need to listen to the 'addPageHideEventListener' and 'addPageShowEventListener' events.\r\n * @param listener - The event callback to call when a page unload event is triggered\r\n * @param excludeEvents - [Optional] An array of events that should not be hooked, unless no other events can be.\r\n * @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\nexport function addPageUnloadEventListener(listener, excludeEvents, evtNamespace) {\n // Hook the unload event for the document, window and body to ensure that the client events are flushed to the server\n // As just hooking the window does not always fire (on chrome) for page navigation's.\n return addEventListeners([strBeforeUnload, strUnload, strPageHide], listener, excludeEvents, evtNamespace);\n}\n/**\r\n * Remove any matching 'beforeunload', 'unload' and 'pagehide' events that may have been added via addEventListener,\r\n * addEventListeners, addPageUnloadEventListener or addPageHideEventListener.\r\n * @param listener - The specific event callback to to be removed\r\n * @param evtNamespace - [Optional] Namespace(s) uniquely identified and removed based on this namespace.\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\nexport function removePageUnloadEventListener(listener, evtNamespace) {\n removeEventListeners([strBeforeUnload, strUnload, strPageHide], listener, evtNamespace);\n}\n/**\r\n * Listen to the pagehide and visibility changing to 'hidden' events, because the 'visibilitychange' uses\r\n * an internal proxy to detect the visibility state you SHOULD use a unique namespace when if you plan to call\r\n * removePageShowEventListener as the remove ignores the listener argument for the 'visibilitychange' event.\r\n * @param listener - The event callback to call when a page hide event is triggered\r\n * @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.\r\n * @param evtNamespace - [Optional] A Namespace to append to the event listeners so they can be uniquely identified and removed\r\n * based on this namespace. This call also adds an additional unique \"pageshow\" namespace to the events\r\n * so that only the matching \"removePageHideEventListener\" can remove these events.\r\n * Suggestion: pass as true if you are also calling addPageUnloadEventListener as that also hooks pagehide\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\nexport function addPageHideEventListener(listener, excludeEvents, evtNamespace) {\n function _handlePageVisibility(evt) {\n var doc = getDocument();\n if (listener && doc && doc.visibilityState === \"hidden\") {\n listener(evt);\n }\n }\n // add the unique page show namespace to any provided namespace so we can only remove the ones added by \"pagehide\"\n var newNamespaces = mergeEvtNamespace(strPageHideNamespace, evtNamespace);\n var pageUnloadAdded = _addEventListeners([strPageHide], listener, excludeEvents, newNamespaces);\n if (!excludeEvents || arrIndexOf(excludeEvents, strVisibilityChangeEvt) === -1) {\n pageUnloadAdded = _addEventListeners([strVisibilityChangeEvt], _handlePageVisibility, excludeEvents, newNamespaces) || pageUnloadAdded;\n }\n if (!pageUnloadAdded && excludeEvents) {\n // Failed to add any listeners and we where requested to exclude some, so just call again without excluding anything\n pageUnloadAdded = addPageHideEventListener(listener, null, evtNamespace);\n }\n return pageUnloadAdded;\n}\n/**\r\n * Removes the pageHide event listeners added by addPageHideEventListener, because the 'visibilitychange' uses\r\n * an internal proxy to detect the visibility state you SHOULD use a unique namespace when calling addPageHideEventListener\r\n * as the remove ignores the listener argument for the 'visibilitychange' event.\r\n * @param listener - The specific listener to remove for the 'pageshow' event only (ignored for 'visibilitychange')\r\n * @param evtNamespace - The unique namespace used when calling addPageShowEventListener\r\n */\nexport function removePageHideEventListener(listener, evtNamespace) {\n // add the unique page show namespace to any provided namespace so we only remove the ones added by \"pagehide\"\n var newNamespaces = mergeEvtNamespace(strPageHideNamespace, evtNamespace);\n removeEventListeners([strPageHide], listener, newNamespaces);\n removeEventListeners([strVisibilityChangeEvt], null, newNamespaces);\n}\n/**\r\n * Listen to the pageshow and visibility changing to 'visible' events, because the 'visibilitychange' uses\r\n * an internal proxy to detect the visibility state you SHOULD use a unique namespace when if you plan to call\r\n * removePageShowEventListener as the remove ignores the listener argument for the 'visibilitychange' event.\r\n * @param listener - The event callback to call when a page is show event is triggered\r\n * @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.\r\n * @param evtNamespace - [Optional/Recommended] A Namespace to append to the event listeners so they can be uniquely\r\n * identified and removed based on this namespace. This call also adds an additional unique \"pageshow\" namespace to the events\r\n * so that only the matching \"removePageShowEventListener\" can remove these events.\r\n * @returns true - when at least one of the events was registered otherwise false\r\n */\nexport function addPageShowEventListener(listener, excludeEvents, evtNamespace) {\n function _handlePageVisibility(evt) {\n var doc = getDocument();\n if (listener && doc && doc.visibilityState === \"visible\") {\n listener(evt);\n }\n }\n // add the unique page show namespace to any provided namespace so we can only remove the ones added by \"pageshow\"\n var newNamespaces = mergeEvtNamespace(strPageShowNamespace, evtNamespace);\n var pageShowAdded = _addEventListeners([strPageShow], listener, excludeEvents, newNamespaces);\n pageShowAdded = _addEventListeners([strVisibilityChangeEvt], _handlePageVisibility, excludeEvents, newNamespaces) || pageShowAdded;\n if (!pageShowAdded && excludeEvents) {\n // Failed to add any listeners and we where requested to exclude some, so just call again without excluding anything\n pageShowAdded = addPageShowEventListener(listener, null, evtNamespace);\n }\n return pageShowAdded;\n}\n/**\r\n * Removes the pageShow event listeners added by addPageShowEventListener, because the 'visibilitychange' uses\r\n * an internal proxy to detect the visibility state you SHOULD use a unique namespace when calling addPageShowEventListener\r\n * as the remove ignores the listener argument for the 'visibilitychange' event.\r\n * @param listener - The specific listener to remove for the 'pageshow' event only (ignored for 'visibilitychange')\r\n * @param evtNamespace - The unique namespace used when calling addPageShowEventListener\r\n */\nexport function removePageShowEventListener(listener, evtNamespace) {\n // add the unique page show namespace to any provided namespace so we only remove the ones added by \"pageshow\"\n var newNamespaces = mergeEvtNamespace(strPageShowNamespace, evtNamespace);\n removeEventListeners([strPageShow], listener, newNamespaces);\n removeEventListeners([strVisibilityChangeEvt], null, newNamespaces);\n}\n","/*\n * Application Insights JavaScript SDK - Core, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { strShimFunction, strShimPrototype } from \"@microsoft/applicationinsights-shims\";\nimport { getInst, objHasOwnProperty } from \"@nevware21/ts-utils\";\nimport { _DYN_APPLY, _DYN_LENGTH, _DYN_NAME, _DYN_PUSH, _DYN_SPLICE } from \"../__DynamicConstants\";\nimport { _getObjProto } from \"./HelperFuncs\";\nvar aiInstrumentHooks = \"_aiHooks\";\nvar cbNames = [\"req\", \"rsp\", \"hkErr\", \"fnErr\"];\n/** @ignore */\nfunction _arrLoop(arr, fn) {\n if (arr) {\n for (var lp = 0; lp < arr[_DYN_LENGTH /* @min:%2elength */]; lp++) {\n if (fn(arr[lp], lp)) {\n break;\n }\n }\n }\n}\n/** @ignore */\nfunction _doCallbacks(hooks, callDetails, cbArgs, hookCtx, type) {\n if (type >= 0 /* CallbackType.Request */ && type <= 2 /* CallbackType.HookError */) {\n _arrLoop(hooks, function (hook, idx) {\n var cbks = hook.cbks;\n var cb = cbks[cbNames[type]];\n if (cb) {\n // Set the specific hook context implementation using a lazy creation pattern\n callDetails.ctx = function () {\n var ctx = hookCtx[idx] = hookCtx[idx] || {};\n return ctx;\n };\n try {\n cb[_DYN_APPLY /* @min:%2eapply */](callDetails.inst, cbArgs);\n } catch (err) {\n var orgEx = callDetails.err;\n try {\n // Report Hook error via the callback\n var hookErrorCb = cbks[cbNames[2 /* CallbackType.HookError */]];\n if (hookErrorCb) {\n callDetails.err = err;\n hookErrorCb[_DYN_APPLY /* @min:%2eapply */](callDetails.inst, cbArgs);\n }\n } catch (e) {\n // Not much we can do here -- swallowing the exception to avoid crashing the hosting app\n } finally {\n // restore the original exception (if any)\n callDetails.err = orgEx;\n }\n }\n }\n });\n }\n}\n/** @ignore */\nfunction _createFunctionHook(aiHook) {\n // Define a temporary method that queues-up a the real method call\n return function () {\n var _a;\n var funcThis = this;\n // Capture the original arguments passed to the method\n var orgArgs = arguments;\n var hooks = aiHook.h;\n var funcArgs = (_a = {}, _a[_DYN_NAME /* @min:name */] = aiHook.n, _a.inst = funcThis, _a.ctx = null, _a.set = _replaceArg, _a);\n var hookCtx = [];\n var cbArgs = _createArgs([funcArgs], orgArgs);\n funcArgs.evt = getInst(\"event\");\n function _createArgs(target, theArgs) {\n _arrLoop(theArgs, function (arg) {\n target[_DYN_PUSH /* @min:%2epush */](arg);\n });\n return target;\n }\n function _replaceArg(idx, value) {\n orgArgs = _createArgs([], orgArgs);\n orgArgs[idx] = value;\n cbArgs = _createArgs([funcArgs], orgArgs);\n }\n // Call the pre-request hooks\n _doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 0 /* CallbackType.Request */);\n // Call the original function was called\n var theFunc = aiHook.f;\n if (theFunc) {\n try {\n funcArgs.rslt = theFunc[_DYN_APPLY /* @min:%2eapply */](funcThis, orgArgs);\n } catch (err) {\n // Report the request callback\n funcArgs.err = err;\n _doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 3 /* CallbackType.FunctionError */);\n // rethrow the original exception so anyone listening for it can catch the exception\n throw err;\n }\n }\n // Call the post-request hooks\n _doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 1 /* CallbackType.Response */);\n return funcArgs.rslt;\n };\n}\n/** @ignore */\nfunction _getOwner(target, name, checkPrototype, checkParentProto) {\n var owner = null;\n if (target) {\n if (objHasOwnProperty(target, name)) {\n owner = target;\n } else if (checkPrototype) {\n owner = _getOwner(_getObjProto(target), name, checkParentProto, false);\n }\n }\n return owner;\n}\n/**\r\n * Intercept the named prototype functions for the target class / object\r\n * @param target - The target object\r\n * @param funcName - The function name\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n */\nexport function InstrumentProto(target, funcName, callbacks) {\n if (target) {\n return InstrumentFunc(target[strShimPrototype], funcName, callbacks, false);\n }\n return null;\n}\n/**\r\n * Intercept the named prototype functions for the target class / object\r\n * @param target - The target object\r\n * @param funcNames - The function names to intercept and call\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n */\nexport function InstrumentProtos(target, funcNames, callbacks) {\n if (target) {\n return InstrumentFuncs(target[strShimPrototype], funcNames, callbacks, false);\n }\n return null;\n}\nfunction _createInstrumentHook(owner, funcName, fn, callbacks) {\n var aiHook = fn && fn[aiInstrumentHooks];\n if (!aiHook) {\n // Only hook the function once\n aiHook = {\n i: 0,\n n: funcName,\n f: fn,\n h: []\n };\n // Override (hook) the original function\n var newFunc = _createFunctionHook(aiHook);\n newFunc[aiInstrumentHooks] = aiHook; // Tag and store the function hooks\n owner[funcName] = newFunc;\n }\n var theHook = {\n // tslint:disable:object-literal-shorthand\n id: aiHook.i,\n cbks: callbacks,\n rm: function () {\n // DO NOT Use () => { shorthand for the function as the this gets replaced\n // with the outer this and not the this for theHook instance.\n var id = this.id;\n _arrLoop(aiHook.h, function (hook, idx) {\n if (hook.id === id) {\n aiHook.h[_DYN_SPLICE /* @min:%2esplice */](idx, 1);\n return 1;\n }\n });\n }\n // tslint:enable:object-literal-shorthand\n };\n aiHook.i++;\n aiHook.h[_DYN_PUSH /* @min:%2epush */](theHook);\n return theHook;\n}\n/**\r\n * Intercept the named prototype functions for the target class / object\r\n * @param target - The target object\r\n * @param funcName - The function name\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function\r\n * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype\r\n */\nexport function InstrumentFunc(target, funcName, callbacks, checkPrototype, checkParentProto) {\n if (checkPrototype === void 0) {\n checkPrototype = true;\n }\n if (target && funcName && callbacks) {\n var owner = _getOwner(target, funcName, checkPrototype, checkParentProto);\n if (owner) {\n var fn = owner[funcName];\n if (typeof fn === strShimFunction) {\n return _createInstrumentHook(owner, funcName, fn, callbacks);\n }\n }\n }\n return null;\n}\n/**\r\n * Intercept the named functions for the target class / object\r\n * @param target - The target object\r\n * @param funcNames - The function names to intercept and call\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function\r\n * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype\r\n */\nexport function InstrumentFuncs(target, funcNames, callbacks, checkPrototype, checkParentProto) {\n if (checkPrototype === void 0) {\n checkPrototype = true;\n }\n var hooks = null;\n _arrLoop(funcNames, function (funcName) {\n var hook = InstrumentFunc(target, funcName, callbacks, checkPrototype, checkParentProto);\n if (hook) {\n if (!hooks) {\n hooks = [];\n }\n hooks[_DYN_PUSH /* @min:%2epush */](hook);\n }\n });\n return hooks;\n}\n/**\r\n * Add an instrumentation hook to the provided named \"event\" for the target class / object, this doesn't check whether the\r\n * named \"event\" is in fact a function and just assigns the instrumentation hook to the target[evtName]\r\n * @param target - The target object\r\n * @param evtName - The name of the event\r\n * @param callbacks - The callbacks to configure and call whenever the function is called\r\n * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function\r\n * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype\r\n */\nexport function InstrumentEvent(target, evtName, callbacks, checkPrototype, checkParentProto) {\n if (target && evtName && callbacks) {\n var owner = _getOwner(target, evtName, checkPrototype, checkParentProto) || target;\n if (owner) {\n return _createInstrumentHook(owner, evtName, owner[evtName], callbacks);\n }\n }\n return null;\n}\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n/**\r\n * This is an internal property used to cause internal (reporting) requests to be ignored from reporting\r\n * additional telemetry, to handle polyfil implementations ALL urls used with a disabled request will\r\n * also be ignored for future requests even when this property is not provided.\r\n * Tagging as Ignore as this is an internal value and is not expected to be used outside of the SDK\r\n * @ignore\r\n */\nexport var DisabledPropertyName = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\nexport var SampleRate = \"sampleRate\";\nexport var ProcessLegacy = \"ProcessLegacy\";\nexport var HttpMethod = \"http.method\";\nexport var DEFAULT_BREEZE_ENDPOINT = \"https://dc.services.visualstudio.com\";\nexport var DEFAULT_BREEZE_PATH = \"/v2/track\";\nexport var strNotSpecified = \"not_specified\";\nexport var strIkey = \"iKey\";\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { createValueMap } from \"@microsoft/applicationinsights-core-js\";\nexport var RequestHeaders = createValueMap({\n requestContextHeader: [0 /* eRequestHeaders.requestContextHeader */, \"Request-Context\"],\n requestContextTargetKey: [1 /* eRequestHeaders.requestContextTargetKey */, \"appId\"],\n requestContextAppIdFormat: [2 /* eRequestHeaders.requestContextAppIdFormat */, \"appId=cid-v1:\"],\n requestIdHeader: [3 /* eRequestHeaders.requestIdHeader */, \"Request-Id\"],\n traceParentHeader: [4 /* eRequestHeaders.traceParentHeader */, \"traceparent\"],\n traceStateHeader: [5 /* eRequestHeaders.traceStateHeader */, \"tracestate\"],\n sdkContextHeader: [6 /* eRequestHeaders.sdkContextHeader */, \"Sdk-Context\"],\n sdkContextHeaderAppIdRequest: [7 /* eRequestHeaders.sdkContextHeaderAppIdRequest */, \"appId\"],\n requestContextHeaderLowerCase: [8 /* eRequestHeaders.requestContextHeaderLowerCase */, \"request-context\"]\n});\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nexport var _DYN_SPLIT = \"split\"; // Count: 6\nexport var _DYN_LENGTH = \"length\"; // Count: 41\nexport var _DYN_TO_LOWER_CASE = \"toLowerCase\"; // Count: 6\nexport var _DYN_INGESTIONENDPOINT = \"ingestionendpoint\"; // Count: 6\nexport var _DYN_TO_STRING = \"toString\"; // Count: 9\nexport var _DYN_PUSH = \"push\"; // Count: 5\nexport var _DYN_REMOVE_ITEM = \"removeItem\"; // Count: 3\nexport var _DYN_NAME = \"name\"; // Count: 11\nexport var _DYN_MESSAGE = \"message\"; // Count: 10\nexport var _DYN_COUNT = \"count\"; // Count: 8\nexport var _DYN_PRE_TRIGGER_DATE = \"preTriggerDate\"; // Count: 4\nexport var _DYN_DISABLED = \"disabled\"; // Count: 3\nexport var _DYN_INTERVAL = \"interval\"; // Count: 3\nexport var _DYN_DAYS_OF_MONTH = \"daysOfMonth\"; // Count: 3\nexport var _DYN_DATE = \"date\"; // Count: 5\nexport var _DYN_GET_UTCDATE = \"getUTCDate\"; // Count: 3\nexport var _DYN_STRINGIFY = \"stringify\"; // Count: 4\nexport var _DYN_PATHNAME = \"pathname\"; // Count: 4\nexport var _DYN_CORRELATION_HEADER_E0 = \"correlationHeaderExcludePatterns\"; // Count: 2\nexport var _DYN_EXTENSION_CONFIG = \"extensionConfig\"; // Count: 4\nexport var _DYN_EXCEPTIONS = \"exceptions\"; // Count: 6\nexport var _DYN_PARSED_STACK = \"parsedStack\"; // Count: 13\nexport var _DYN_PROPERTIES = \"properties\"; // Count: 9\nexport var _DYN_MEASUREMENTS = \"measurements\"; // Count: 9\nexport var _DYN_SIZE_IN_BYTES = \"sizeInBytes\"; // Count: 11\nexport var _DYN_TYPE_NAME = \"typeName\"; // Count: 11\nexport var _DYN_SEVERITY_LEVEL = \"severityLevel\"; // Count: 5\nexport var _DYN_PROBLEM_GROUP = \"problemGroup\"; // Count: 3\nexport var _DYN_IS_MANUAL = \"isManual\"; // Count: 3\nexport var _DYN__CREATE_FROM_INTERFA1 = \"CreateFromInterface\"; // Count: 2\nexport var _DYN_ASSEMBLY = \"assembly\"; // Count: 7\nexport var _DYN_FILE_NAME = \"fileName\"; // Count: 8\nexport var _DYN_HAS_FULL_STACK = \"hasFullStack\"; // Count: 6\nexport var _DYN_LEVEL = \"level\"; // Count: 5\nexport var _DYN_METHOD = \"method\"; // Count: 7\nexport var _DYN_LINE = \"line\"; // Count: 6\nexport var _DYN_DURATION = \"duration\"; // Count: 4\nexport var _DYN_RECEIVED_RESPONSE = \"receivedResponse\"; // Count: 2\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { _throwInternal, getJSON, hasJSON, isObject, objForEachKey, strTrim } from \"@microsoft/applicationinsights-core-js\";\nimport { asString, strSubstr, strSubstring } from \"@nevware21/ts-utils\";\nimport { _DYN_LENGTH, _DYN_STRINGIFY, _DYN_TO_STRING } from \"../../__DynamicConstants\";\nexport function dataSanitizeKeyAndAddUniqueness(logger, key, map) {\n var origLength = key[_DYN_LENGTH /* @min:%2elength */];\n var field = dataSanitizeKey(logger, key);\n // validation truncated the length. We need to add uniqueness\n if (field[_DYN_LENGTH /* @min:%2elength */] !== origLength) {\n var i = 0;\n var uniqueField = field;\n while (map[uniqueField] !== undefined) {\n i++;\n uniqueField = strSubstring(field, 0, 150 /* DataSanitizerValues.MAX_NAME_LENGTH */ - 3) + dsPadNumber(i);\n }\n field = uniqueField;\n }\n return field;\n}\nexport function dataSanitizeKey(logger, name) {\n var nameTrunc;\n if (name) {\n // Remove any leading or trailing whitespace\n name = strTrim(asString(name));\n // truncate the string to 150 chars\n if (name[_DYN_LENGTH /* @min:%2elength */] > 150 /* DataSanitizerValues.MAX_NAME_LENGTH */) {\n nameTrunc = strSubstring(name, 0, 150 /* DataSanitizerValues.MAX_NAME_LENGTH */);\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 57 /* _eInternalMessageId.NameTooLong */, \"name is too long. It has been truncated to \" + 150 /* DataSanitizerValues.MAX_NAME_LENGTH */ + \" characters.\", {\n name: name\n }, true);\n }\n }\n return nameTrunc || name;\n}\nexport function dataSanitizeString(logger, value, maxLength) {\n if (maxLength === void 0) {\n maxLength = 1024 /* DataSanitizerValues.MAX_STRING_LENGTH */;\n }\n var valueTrunc;\n if (value) {\n maxLength = maxLength ? maxLength : 1024 /* DataSanitizerValues.MAX_STRING_LENGTH */; // in case default parameters dont work\n value = strTrim(asString(value));\n if (value[_DYN_LENGTH /* @min:%2elength */] > maxLength) {\n valueTrunc = strSubstring(value, 0, maxLength);\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 61 /* _eInternalMessageId.StringValueTooLong */, \"string value is too long. It has been truncated to \" + maxLength + \" characters.\", {\n value: value\n }, true);\n }\n }\n return valueTrunc || value;\n}\nexport function dataSanitizeUrl(logger, url) {\n return dataSanitizeInput(logger, url, 2048 /* DataSanitizerValues.MAX_URL_LENGTH */, 66 /* _eInternalMessageId.UrlTooLong */);\n}\nexport function dataSanitizeMessage(logger, message) {\n var messageTrunc;\n if (message) {\n if (message[_DYN_LENGTH /* @min:%2elength */] > 32768 /* DataSanitizerValues.MAX_MESSAGE_LENGTH */) {\n messageTrunc = strSubstring(message, 0, 32768 /* DataSanitizerValues.MAX_MESSAGE_LENGTH */);\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 56 /* _eInternalMessageId.MessageTruncated */, \"message is too long, it has been truncated to \" + 32768 /* DataSanitizerValues.MAX_MESSAGE_LENGTH */ + \" characters.\", {\n message: message\n }, true);\n }\n }\n return messageTrunc || message;\n}\nexport function dataSanitizeException(logger, exception) {\n var exceptionTrunc;\n if (exception) {\n // Make surte its a string\n var value = \"\" + exception;\n if (value[_DYN_LENGTH /* @min:%2elength */] > 32768 /* DataSanitizerValues.MAX_EXCEPTION_LENGTH */) {\n exceptionTrunc = strSubstring(value, 0, 32768 /* DataSanitizerValues.MAX_EXCEPTION_LENGTH */);\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 52 /* _eInternalMessageId.ExceptionTruncated */, \"exception is too long, it has been truncated to \" + 32768 /* DataSanitizerValues.MAX_EXCEPTION_LENGTH */ + \" characters.\", {\n exception: exception\n }, true);\n }\n }\n return exceptionTrunc || exception;\n}\nexport function dataSanitizeProperties(logger, properties) {\n if (properties) {\n var tempProps_1 = {};\n objForEachKey(properties, function (prop, value) {\n if (isObject(value) && hasJSON()) {\n // Stringify any part C properties\n try {\n value = getJSON()[_DYN_STRINGIFY /* @min:%2estringify */](value);\n } catch (e) {\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 49 /* _eInternalMessageId.CannotSerializeObjectNonSerializable */, \"custom property is not valid\", {\n exception: e\n }, true);\n }\n }\n value = dataSanitizeString(logger, value, 8192 /* DataSanitizerValues.MAX_PROPERTY_LENGTH */);\n prop = dataSanitizeKeyAndAddUniqueness(logger, prop, tempProps_1);\n tempProps_1[prop] = value;\n });\n properties = tempProps_1;\n }\n return properties;\n}\nexport function dataSanitizeMeasurements(logger, measurements) {\n if (measurements) {\n var tempMeasurements_1 = {};\n objForEachKey(measurements, function (measure, value) {\n measure = dataSanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements_1);\n tempMeasurements_1[measure] = value;\n });\n measurements = tempMeasurements_1;\n }\n return measurements;\n}\nexport function dataSanitizeId(logger, id) {\n return id ? dataSanitizeInput(logger, id, 128 /* DataSanitizerValues.MAX_ID_LENGTH */, 69 /* _eInternalMessageId.IdTooLong */)[_DYN_TO_STRING /* @min:%2etoString */]() : id;\n}\nexport function dataSanitizeInput(logger, input, maxLength, _msgId) {\n var inputTrunc;\n if (input) {\n input = strTrim(asString(input));\n if (input[_DYN_LENGTH /* @min:%2elength */] > maxLength) {\n inputTrunc = strSubstring(input, 0, maxLength);\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, _msgId, \"input is too long, it has been truncated to \" + maxLength + \" characters.\", {\n data: input\n }, true);\n }\n }\n return inputTrunc || input;\n}\nexport function dsPadNumber(num) {\n var s = \"00\" + num;\n return strSubstr(s, s[_DYN_LENGTH /* @min:%2elength */] - 3);\n}\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { getDocument, isString } from \"@microsoft/applicationinsights-core-js\";\nimport { _DYN_LENGTH, _DYN_PATHNAME, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\nvar _document = getDocument() || {};\nvar _htmlAnchorIdx = 0;\n// Use an array of temporary values as it's possible for multiple calls to parseUrl() will be called with different URLs\n// Using a cache size of 5 for now as it current depth usage is at least 2, so adding a minor buffer to handle future updates\nvar _htmlAnchorElement = [null, null, null, null, null];\nexport function urlParseUrl(url) {\n var anchorIdx = _htmlAnchorIdx;\n var anchorCache = _htmlAnchorElement;\n var tempAnchor = anchorCache[anchorIdx];\n if (!_document.createElement) {\n // Always create the temp instance if createElement is not available\n tempAnchor = {\n host: urlParseHost(url, true)\n };\n } else if (!anchorCache[anchorIdx]) {\n // Create and cache the unattached anchor instance\n tempAnchor = anchorCache[anchorIdx] = _document.createElement(\"a\");\n }\n tempAnchor.href = url;\n // Move the cache index forward\n anchorIdx++;\n if (anchorIdx >= anchorCache[_DYN_LENGTH /* @min:%2elength */]) {\n anchorIdx = 0;\n }\n _htmlAnchorIdx = anchorIdx;\n return tempAnchor;\n}\nexport function urlGetAbsoluteUrl(url) {\n var result;\n var a = urlParseUrl(url);\n if (a) {\n result = a.href;\n }\n return result;\n}\nexport function urlGetPathName(url) {\n var result;\n var a = urlParseUrl(url);\n if (a) {\n result = a[_DYN_PATHNAME /* @min:%2epathname */];\n }\n return result;\n}\nexport function urlGetCompleteUrl(method, absoluteUrl) {\n if (method) {\n return method.toUpperCase() + \" \" + absoluteUrl;\n }\n return absoluteUrl;\n}\n// Fallback method to grab host from url if document.createElement method is not available\nexport function urlParseHost(url, inclPort) {\n var fullHost = urlParseFullHost(url, inclPort) || \"\";\n if (fullHost) {\n var match = fullHost.match(/(www\\d{0,5}\\.)?([^\\/:]{1,256})(:\\d{1,20})?/i);\n if (match != null && match[_DYN_LENGTH /* @min:%2elength */] > 3 && isString(match[2]) && match[2][_DYN_LENGTH /* @min:%2elength */] > 0) {\n return match[2] + (match[3] || \"\");\n }\n }\n return fullHost;\n}\nexport function urlParseFullHost(url, inclPort) {\n var result = null;\n if (url) {\n var match = url.match(/(\\w{1,150}):\\/\\/([^\\/:]{1,256})(:\\d{1,20})?/i);\n if (match != null && match[_DYN_LENGTH /* @min:%2elength */] > 2 && isString(match[2]) && match[2][_DYN_LENGTH /* @min:%2elength */] > 0) {\n result = match[2] || \"\";\n if (inclPort && match[_DYN_LENGTH /* @min:%2elength */] > 2) {\n var protocol = (match[1] || \"\")[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\n var port = match[3] || \"\";\n // IE includes the standard port so pass it off if it's the same as the protocol\n if (protocol === \"http\" && port === \":80\") {\n port = \"\";\n } else if (protocol === \"https\" && port === \":443\") {\n port = \"\";\n }\n result += port;\n }\n }\n }\n return result;\n}\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { arrForEach, arrIndexOf, dateNow, getPerformance, isNullOrUndefined, isValidSpanId, isValidTraceId } from \"@microsoft/applicationinsights-core-js\";\nimport { strIndexOf } from \"@nevware21/ts-utils\";\nimport { DEFAULT_BREEZE_ENDPOINT, DEFAULT_BREEZE_PATH } from \"./Constants\";\nimport { RequestHeaders } from \"./RequestResponseHeaders\";\nimport { dataSanitizeString } from \"./Telemetry/Common/DataSanitizer\";\nimport { urlParseFullHost, urlParseUrl } from \"./UrlHelperFuncs\";\nimport { _DYN_CORRELATION_HEADER_E0, _DYN_LENGTH, _DYN_NAME, _DYN_PATHNAME, _DYN_SPLIT, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\n// listing only non-geo specific locations\nvar _internalEndpoints = [DEFAULT_BREEZE_ENDPOINT + DEFAULT_BREEZE_PATH, \"https://breeze.aimon.applicationinsights.io\" + DEFAULT_BREEZE_PATH, \"https://dc-int.services.visualstudio.com\" + DEFAULT_BREEZE_PATH];\nvar _correlationIdPrefix = \"cid-v1:\";\nexport function isInternalApplicationInsightsEndpoint(endpointUrl) {\n return arrIndexOf(_internalEndpoints, endpointUrl[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]()) !== -1;\n}\nexport function correlationIdSetPrefix(prefix) {\n _correlationIdPrefix = prefix;\n}\nexport function correlationIdGetPrefix() {\n return _correlationIdPrefix;\n}\n/**\r\n * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers.\r\n * Headers are always included if the current domain matches the request domain. If they do not match (CORS),\r\n * they are regex-ed across correlationHeaderDomains and correlationHeaderExcludedDomains to determine if headers are included.\r\n * Some environments don't give information on currentHost via window.location.host (e.g. Cordova). In these cases, the user must\r\n * manually supply domains to include correlation headers on. Else, no headers will be included at all.\r\n */\nexport function correlationIdCanIncludeCorrelationHeader(config, requestUrl, currentHost) {\n if (!requestUrl || config && config.disableCorrelationHeaders) {\n return false;\n }\n if (config && config[_DYN_CORRELATION_HEADER_E0 /* @min:%2ecorrelationHeaderExcludePatterns */]) {\n for (var i = 0; i < config.correlationHeaderExcludePatterns[_DYN_LENGTH /* @min:%2elength */]; i++) {\n if (config[_DYN_CORRELATION_HEADER_E0 /* @min:%2ecorrelationHeaderExcludePatterns */][i].test(requestUrl)) {\n return false;\n }\n }\n }\n var requestHost = urlParseUrl(requestUrl).host[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\n if (requestHost && (strIndexOf(requestHost, \":443\") !== -1 || strIndexOf(requestHost, \":80\") !== -1)) {\n // [Bug #1260] IE can include the port even for http and https URLs so if present\n // try and parse it to remove if it matches the default protocol port\n requestHost = (urlParseFullHost(requestUrl, true) || \"\")[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\n }\n if ((!config || !config.enableCorsCorrelation) && requestHost && requestHost !== currentHost) {\n return false;\n }\n var includedDomains = config && config.correlationHeaderDomains;\n if (includedDomains) {\n var matchExists_1;\n arrForEach(includedDomains, function (domain) {\n var regex = new RegExp(domain.toLowerCase().replace(/\\\\/g, \"\\\\\\\\\").replace(/\\./g, \"\\\\.\").replace(/\\*/g, \".*\"));\n matchExists_1 = matchExists_1 || regex.test(requestHost);\n });\n if (!matchExists_1) {\n return false;\n }\n }\n var excludedDomains = config && config.correlationHeaderExcludedDomains;\n if (!excludedDomains || excludedDomains[_DYN_LENGTH /* @min:%2elength */] === 0) {\n return true;\n }\n for (var i = 0; i < excludedDomains[_DYN_LENGTH /* @min:%2elength */]; i++) {\n var regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\\\\/g, \"\\\\\\\\\").replace(/\\./g, \"\\\\.\").replace(/\\*/g, \".*\"));\n if (regex.test(requestHost)) {\n return false;\n }\n }\n // if we don't know anything about the requestHost, require the user to use included/excludedDomains.\n // Previously we always returned false for a falsy requestHost\n return requestHost && requestHost[_DYN_LENGTH /* @min:%2elength */] > 0;\n}\n/**\r\n * Combines target appId and target role name from response header.\r\n */\nexport function correlationIdGetCorrelationContext(responseHeader) {\n if (responseHeader) {\n var correlationId = correlationIdGetCorrelationContextValue(responseHeader, RequestHeaders[1 /* eRequestHeaders.requestContextTargetKey */]);\n if (correlationId && correlationId !== _correlationIdPrefix) {\n return correlationId;\n }\n }\n}\n/**\r\n * Gets key from correlation response header\r\n */\nexport function correlationIdGetCorrelationContextValue(responseHeader, key) {\n if (responseHeader) {\n var keyValues = responseHeader[_DYN_SPLIT /* @min:%2esplit */](\",\");\n for (var i = 0; i < keyValues[_DYN_LENGTH /* @min:%2elength */]; ++i) {\n var keyValue = keyValues[i][_DYN_SPLIT /* @min:%2esplit */](\"=\");\n if (keyValue[_DYN_LENGTH /* @min:%2elength */] === 2 && keyValue[0] === key) {\n return keyValue[1];\n }\n }\n }\n}\nexport function AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName) {\n var target,\n name = commandName,\n data = commandName;\n if (absoluteUrl && absoluteUrl[_DYN_LENGTH /* @min:%2elength */] > 0) {\n var parsedUrl = urlParseUrl(absoluteUrl);\n target = parsedUrl.host;\n if (!name) {\n if (parsedUrl[_DYN_PATHNAME /* @min:%2epathname */] != null) {\n var pathName = parsedUrl.pathname[_DYN_LENGTH /* @min:%2elength */] === 0 ? \"/\" : parsedUrl[_DYN_PATHNAME /* @min:%2epathname */];\n if (pathName.charAt(0) !== \"/\") {\n pathName = \"/\" + pathName;\n }\n data = parsedUrl[_DYN_PATHNAME /* @min:%2epathname */];\n name = dataSanitizeString(logger, method ? method + \" \" + pathName : pathName);\n } else {\n name = dataSanitizeString(logger, absoluteUrl);\n }\n }\n } else {\n target = commandName;\n name = commandName;\n }\n return {\n target: target,\n name: name,\n data: data\n };\n}\nexport function dateTimeUtilsNow() {\n // returns the window or webworker performance object\n var perf = getPerformance();\n if (perf && perf.now && perf.timing) {\n var now = perf.now() + perf.timing.navigationStart;\n // Known issue with IE where this calculation can be negative, so if it is then ignore and fallback\n if (now > 0) {\n return now;\n }\n }\n return dateNow();\n}\nexport function dateTimeUtilsDuration(start, end) {\n var result = null;\n if (start !== 0 && end !== 0 && !isNullOrUndefined(start) && !isNullOrUndefined(end)) {\n result = end - start;\n }\n return result;\n}\n/**\r\n * Creates a IDistributedTraceContext from an optional telemetryTrace\r\n * @param telemetryTrace - The telemetryTrace instance that is being wrapped\r\n * @param parentCtx - An optional parent distributed trace instance, almost always undefined as this scenario is only used in the case of multiple property handlers.\r\n * @returns A new IDistributedTraceContext instance that is backed by the telemetryTrace or temporary object\r\n */\nexport function createDistributedTraceContextFromTrace(telemetryTrace, parentCtx) {\n var trace = telemetryTrace || {};\n return {\n getName: function () {\n return trace[_DYN_NAME /* @min:%2ename */];\n },\n setName: function (newValue) {\n parentCtx && parentCtx.setName(newValue);\n trace[_DYN_NAME /* @min:%2ename */] = newValue;\n },\n getTraceId: function () {\n return trace.traceID;\n },\n setTraceId: function (newValue) {\n parentCtx && parentCtx.setTraceId(newValue);\n if (isValidTraceId(newValue)) {\n trace.traceID = newValue;\n }\n },\n getSpanId: function () {\n return trace.parentID;\n },\n setSpanId: function (newValue) {\n parentCtx && parentCtx.setSpanId(newValue);\n if (isValidSpanId(newValue)) {\n trace.parentID = newValue;\n }\n },\n getTraceFlags: function () {\n return trace.traceFlags;\n },\n setTraceFlags: function (newTraceFlags) {\n parentCtx && parentCtx.setTraceFlags(newTraceFlags);\n trace.traceFlags = newTraceFlags;\n }\n };\n}\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { createEnumStyle } from \"@microsoft/applicationinsights-core-js\";\nexport var StorageType = createEnumStyle({\n LocalStorage: 0 /* eStorageType.LocalStorage */,\n SessionStorage: 1 /* eStorageType.SessionStorage */\n});\nexport var DistributedTracingModes = createEnumStyle({\n AI: 0 /* eDistributedTracingModes.AI */,\n AI_AND_W3C: 1 /* eDistributedTracingModes.AI_AND_W3C */,\n W3C: 2 /* eDistributedTracingModes.W3C */\n});\n/**\r\n * The EventPersistence contains a set of values that specify the event's persistence.\r\n */\nexport var EventPersistence = createEnumStyle({\n /**\r\n * Normal persistence.\r\n */\n Normal: 1 /* EventPersistenceValue.Normal */,\n\n /**\r\n * Critical persistence.\r\n */\n Critical: 2 /* EventPersistenceValue.Critical */\n});\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { _throwInternal, dumpObj, getExceptionName, getGlobal, getGlobalInst, isNullOrUndefined, objForEachKey } from \"@microsoft/applicationinsights-core-js\";\nimport { StorageType } from \"./Enums\";\nimport { _DYN_PUSH, _DYN_REMOVE_ITEM, _DYN_TO_STRING } from \"./__DynamicConstants\";\nvar _canUseLocalStorage = undefined;\nvar _canUseSessionStorage = undefined;\nvar _storagePrefix = \"\";\n/**\r\n * Gets the localStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\nfunction _getLocalStorageObject() {\n if (utlCanUseLocalStorage()) {\n return _getVerifiedStorageObject(StorageType.LocalStorage);\n }\n return null;\n}\n/**\r\n * Tests storage object (localStorage or sessionStorage) to verify that it is usable\r\n * More details here: https://mathiasbynens.be/notes/localstorage-pattern\r\n * @param storageType - Type of storage\r\n * @return {Storage} Returns storage object verified that it is usable\r\n */\nfunction _getVerifiedStorageObject(storageType) {\n try {\n if (isNullOrUndefined(getGlobal())) {\n return null;\n }\n var uid = new Date()[_DYN_TO_STRING /* @min:%2etoString */]();\n var storage = getGlobalInst(storageType === StorageType.LocalStorage ? \"localStorage\" : \"sessionStorage\");\n var name_1 = _storagePrefix + uid;\n storage.setItem(name_1, uid);\n var fail = storage.getItem(name_1) !== uid;\n storage[_DYN_REMOVE_ITEM /* @min:%2eremoveItem */](name_1);\n if (!fail) {\n return storage;\n }\n } catch (exception) {\n // eslint-disable-next-line no-empty\n }\n return null;\n}\n/**\r\n * Gets the sessionStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\nfunction _getSessionStorageObject() {\n if (utlCanUseSessionStorage()) {\n return _getVerifiedStorageObject(StorageType.SessionStorage);\n }\n return null;\n}\n/**\r\n * Disables the global SDK usage of local or session storage if available\r\n */\nexport function utlDisableStorage() {\n _canUseLocalStorage = false;\n _canUseSessionStorage = false;\n}\nexport function utlSetStoragePrefix(storagePrefix) {\n _storagePrefix = storagePrefix || \"\";\n}\n/**\r\n * Re-enables the global SDK usage of local or session storage if available\r\n */\nexport function utlEnableStorage() {\n _canUseLocalStorage = utlCanUseLocalStorage(true);\n _canUseSessionStorage = utlCanUseSessionStorage(true);\n}\n/**\r\n * Returns whether LocalStorage can be used, if the reset parameter is passed a true this will override\r\n * any previous disable calls.\r\n * @param reset - Should the usage be reset and determined only based on whether LocalStorage is available\r\n */\nexport function utlCanUseLocalStorage(reset) {\n if (reset || _canUseLocalStorage === undefined) {\n _canUseLocalStorage = !!_getVerifiedStorageObject(StorageType.LocalStorage);\n }\n return _canUseLocalStorage;\n}\nexport function utlGetLocalStorage(logger, name) {\n var storage = _getLocalStorageObject();\n if (storage !== null) {\n try {\n return storage.getItem(name);\n } catch (e) {\n _canUseLocalStorage = false;\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 1 /* _eInternalMessageId.BrowserCannotReadLocalStorage */, \"Browser failed read of local storage. \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n return null;\n}\nexport function utlSetLocalStorage(logger, name, data) {\n var storage = _getLocalStorageObject();\n if (storage !== null) {\n try {\n storage.setItem(name, data);\n return true;\n } catch (e) {\n _canUseLocalStorage = false;\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 3 /* _eInternalMessageId.BrowserCannotWriteLocalStorage */, \"Browser failed write to local storage. \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n return false;\n}\nexport function utlRemoveStorage(logger, name) {\n var storage = _getLocalStorageObject();\n if (storage !== null) {\n try {\n storage[_DYN_REMOVE_ITEM /* @min:%2eremoveItem */](name);\n return true;\n } catch (e) {\n _canUseLocalStorage = false;\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 5 /* _eInternalMessageId.BrowserFailedRemovalFromLocalStorage */, \"Browser failed removal of local storage item. \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n return false;\n}\nexport function utlCanUseSessionStorage(reset) {\n if (reset || _canUseSessionStorage === undefined) {\n _canUseSessionStorage = !!_getVerifiedStorageObject(StorageType.SessionStorage);\n }\n return _canUseSessionStorage;\n}\nexport function utlGetSessionStorageKeys() {\n var keys = [];\n if (utlCanUseSessionStorage()) {\n objForEachKey(getGlobalInst(\"sessionStorage\"), function (key) {\n keys[_DYN_PUSH /* @min:%2epush */](key);\n });\n }\n return keys;\n}\nexport function utlGetSessionStorage(logger, name) {\n var storage = _getSessionStorageObject();\n if (storage !== null) {\n try {\n return storage.getItem(name);\n } catch (e) {\n _canUseSessionStorage = false;\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 2 /* _eInternalMessageId.BrowserCannotReadSessionStorage */, \"Browser failed read of session storage. \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n return null;\n}\nexport function utlSetSessionStorage(logger, name, data) {\n var storage = _getSessionStorageObject();\n if (storage !== null) {\n try {\n storage.setItem(name, data);\n return true;\n } catch (e) {\n _canUseSessionStorage = false;\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 4 /* _eInternalMessageId.BrowserCannotWriteSessionStorage */, \"Browser failed write to session storage. \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n return false;\n}\nexport function utlRemoveSessionStorage(logger, name) {\n var storage = _getSessionStorageObject();\n if (storage !== null) {\n try {\n storage[_DYN_REMOVE_ITEM /* @min:%2eremoveItem */](name);\n return true;\n } catch (e) {\n _canUseSessionStorage = false;\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 6 /* _eInternalMessageId.BrowserFailedRemovalFromSessionStorage */, \"Browser failed removal of session storage item. \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n return false;\n}\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { _throwInternal, arrIndexOf, isNotNullOrUndefined, isNullOrUndefined, onConfigChange, randomValue, safeGetLogger, strTrim } from \"@microsoft/applicationinsights-core-js\";\nimport { arrForEach, objForEachKey } from \"@nevware21/ts-utils\";\nimport { utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage } from \"./StorageHelperFuncs\";\nimport { _DYN_COUNT, _DYN_DATE, _DYN_DAYS_OF_MONTH, _DYN_DISABLED, _DYN_GET_UTCDATE, _DYN_INTERVAL, _DYN_LENGTH, _DYN_MESSAGE, _DYN_PRE_TRIGGER_DATE, _DYN_PUSH, _DYN_STRINGIFY } from \"./__DynamicConstants\";\nvar THROTTLE_STORAGE_PREFIX = \"appInsightsThrottle\";\nvar ThrottleMgr = /** @class */function () {\n function ThrottleMgr(core, namePrefix) {\n var _self = this;\n var _canUseLocalStorage;\n var _logger;\n var _config;\n var _localStorageObj;\n var _isTriggered; //_isTriggered is to make sure that we only trigger throttle once a day\n var _namePrefix;\n var _queue;\n var _isReady = false;\n var _isSpecificDaysGiven = false;\n _initConfig();\n // Special internal method to allow the unit tests and DebugPlugin to hook embedded objects\n _self[\"_getDbgPlgTargets\"] = function () {\n return [_queue];\n };\n _self.getConfig = function () {\n return _config;\n };\n /**\r\n * Check if it is the correct day to send message.\r\n * If _isTriggered is true, even if canThrottle returns true, message will not be sent,\r\n * because we only allow triggering sendMessage() once a day.\r\n * @returns if the current date is the valid date to send message\r\n */\n _self.canThrottle = function (msgId) {\n var localObj = _getLocalStorageObjByKey(msgId);\n var cfg = _getCfgByKey(msgId);\n return _canThrottle(cfg, _canUseLocalStorage, localObj);\n };\n /**\r\n * Check if throttle is triggered on current day(UTC)\r\n * if canThrottle returns false, isTriggered will return false\r\n * @returns if throttle is triggered on current day(UTC)\r\n */\n _self.isTriggered = function (msgId) {\n return _isTrigger(msgId);\n };\n /**\r\n * Before isReady set to true, all message will be stored in queue.\r\n * Message will only be sent out after isReady set to true.\r\n * Initial and default value: false\r\n * @returns isReady state\r\n */\n _self.isReady = function () {\n return _isReady;\n };\n /**\r\n * Flush all message with given message key in queue with isReady state set to true.\r\n * @returns if message queue is flushed\r\n */\n _self.flush = function (msgId) {\n try {\n var queue = _getQueueByKey(msgId);\n if (queue && queue[_DYN_LENGTH /* @min:%2elength */] > 0) {\n var items = queue.slice(0);\n _queue[msgId] = [];\n arrForEach(items, function (item) {\n _flushMessage(item.msgID, item[_DYN_MESSAGE /* @min:%2emessage */], item.severity, false);\n });\n return true;\n }\n } catch (err) {\n // eslint-disable-next-line no-empty\n }\n return false;\n };\n /**\r\n * Flush all message in queue with isReady state set to true.\r\n * @returns if message queue is flushed\r\n */\n _self.flushAll = function () {\n try {\n if (_queue) {\n var result_1 = true;\n objForEachKey(_queue, function (key) {\n var isFlushed = _self.flush(parseInt(key));\n result_1 = result_1 && isFlushed;\n });\n return result_1;\n }\n } catch (err) {\n // eslint-disable-next-line no-empty\n }\n return false;\n };\n /**\r\n * Set isReady State\r\n * if isReady set to true, message queue will be flushed automatically.\r\n * @param isReady isReady State\r\n * @pa\r\n * @returns if message queue is flushed\r\n */\n _self.onReadyState = function (isReady, flushAll) {\n if (flushAll === void 0) {\n flushAll = true;\n }\n _isReady = isNullOrUndefined(isReady) ? true : isReady;\n if (_isReady && flushAll) {\n return _self.flushAll();\n }\n return null;\n };\n _self.sendMessage = function (msgID, message, severity) {\n return _flushMessage(msgID, message, severity, true);\n };\n function _flushMessage(msgID, message, severity, saveUnsentMsg) {\n if (_isReady) {\n var isSampledIn = _canSampledIn(msgID);\n if (!isSampledIn) {\n return;\n }\n var cfg = _getCfgByKey(msgID);\n var localStorageObj = _getLocalStorageObjByKey(msgID);\n var canThrottle = _canThrottle(cfg, _canUseLocalStorage, localStorageObj);\n var throttled = false;\n var number = 0;\n var isTriggered = _isTrigger(msgID);\n try {\n if (canThrottle && !isTriggered) {\n number = Math.min(cfg.limit.maxSendNumber, localStorageObj[_DYN_COUNT /* @min:%2ecount */] + 1);\n localStorageObj[_DYN_COUNT /* @min:%2ecount */] = 0;\n throttled = true;\n _isTriggered[msgID] = true;\n localStorageObj[_DYN_PRE_TRIGGER_DATE /* @min:%2epreTriggerDate */] = new Date();\n } else {\n _isTriggered[msgID] = canThrottle;\n localStorageObj[_DYN_COUNT /* @min:%2ecount */] += 1;\n }\n var localStorageName = _getLocalStorageName(msgID);\n _resetLocalStorage(_logger, localStorageName, localStorageObj);\n for (var i = 0; i < number; i++) {\n _sendMessage(msgID, _logger, message, severity);\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return {\n isThrottled: throttled,\n throttleNum: number\n };\n } else {\n if (!!saveUnsentMsg) {\n var queue = _getQueueByKey(msgID);\n queue[_DYN_PUSH /* @min:%2epush */]({\n msgID: msgID,\n message: message,\n severity: severity\n });\n }\n }\n return null;\n }\n function _initConfig() {\n _logger = safeGetLogger(core);\n _isTriggered = {};\n _localStorageObj = {};\n _queue = {};\n _config = {};\n _setCfgByKey(109 /* _eInternalMessageId.DefaultThrottleMsgKey */);\n _namePrefix = isNotNullOrUndefined(namePrefix) ? namePrefix : \"\";\n core.addUnloadHook(onConfigChange(core.config, function (details) {\n var coreConfig = details.cfg;\n _canUseLocalStorage = utlCanUseLocalStorage();\n var configMgr = coreConfig.throttleMgrCfg || {};\n objForEachKey(configMgr, function (key, cfg) {\n _setCfgByKey(parseInt(key), cfg);\n });\n }));\n }\n function _getCfgByKey(msgID) {\n return _config[msgID] || _config[109 /* _eInternalMessageId.DefaultThrottleMsgKey */];\n }\n function _setCfgByKey(msgID, config) {\n var _a, _b;\n try {\n var cfg = config || {};\n var curCfg = {};\n curCfg[_DYN_DISABLED /* @min:%2edisabled */] = !!cfg[_DYN_DISABLED /* @min:%2edisabled */];\n var configInterval = cfg[_DYN_INTERVAL /* @min:%2einterval */] || {};\n _isSpecificDaysGiven = (configInterval === null || configInterval === void 0 ? void 0 : configInterval.daysOfMonth) && (configInterval === null || configInterval === void 0 ? void 0 : configInterval.daysOfMonth[_DYN_LENGTH /* @min:%2elength */]) > 0;\n curCfg[_DYN_INTERVAL /* @min:%2einterval */] = _getIntervalConfig(configInterval);\n var limit = {\n samplingRate: ((_a = cfg.limit) === null || _a === void 0 ? void 0 : _a.samplingRate) || 100,\n // dafault: every time sent only 1 event\n maxSendNumber: ((_b = cfg.limit) === null || _b === void 0 ? void 0 : _b.maxSendNumber) || 1\n };\n curCfg.limit = limit;\n _config[msgID] = curCfg;\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n }\n function _getIntervalConfig(interval) {\n interval = interval || {};\n var monthInterval = interval === null || interval === void 0 ? void 0 : interval.monthInterval;\n var dayInterval = interval === null || interval === void 0 ? void 0 : interval.dayInterval;\n // default: send data every 3 month each year\n if (isNullOrUndefined(monthInterval) && isNullOrUndefined(dayInterval)) {\n interval.monthInterval = 3;\n if (!_isSpecificDaysGiven) {\n // default: send data on 28th\n interval[_DYN_DAYS_OF_MONTH /* @min:%2edaysOfMonth */] = [28];\n _isSpecificDaysGiven = true;\n }\n }\n interval = {\n // dafault: sent every three months\n monthInterval: interval === null || interval === void 0 ? void 0 : interval.monthInterval,\n dayInterval: interval === null || interval === void 0 ? void 0 : interval.dayInterval,\n daysOfMonth: interval === null || interval === void 0 ? void 0 : interval.daysOfMonth\n };\n return interval;\n }\n function _canThrottle(config, canUseLocalStorage, localStorageObj) {\n if (config && !config[_DYN_DISABLED /* @min:%2edisabled */] && canUseLocalStorage && isNotNullOrUndefined(localStorageObj)) {\n var curDate = _getThrottleDate();\n var date = localStorageObj[_DYN_DATE /* @min:%2edate */];\n var interval = config[_DYN_INTERVAL /* @min:%2einterval */];\n var monthCheck = 1;\n if (interval === null || interval === void 0 ? void 0 : interval.monthInterval) {\n var monthExpand = (curDate.getUTCFullYear() - date.getUTCFullYear()) * 12 + curDate.getUTCMonth() - date.getUTCMonth();\n monthCheck = _checkInterval(interval.monthInterval, 0, monthExpand);\n }\n var dayCheck = 1;\n if (_isSpecificDaysGiven) {\n dayCheck = arrIndexOf(interval[_DYN_DAYS_OF_MONTH /* @min:%2edaysOfMonth */], curDate[_DYN_GET_UTCDATE /* @min:%2egetUTCDate */]());\n } else if (interval === null || interval === void 0 ? void 0 : interval.dayInterval) {\n var daySpan = Math.floor((curDate.getTime() - date.getTime()) / 86400000);\n dayCheck = _checkInterval(interval.dayInterval, 0, daySpan);\n }\n return monthCheck >= 0 && dayCheck >= 0;\n }\n return false;\n }\n function _getLocalStorageName(msgKey, prefix) {\n var fix = isNotNullOrUndefined(prefix) ? prefix : \"\";\n if (msgKey) {\n return THROTTLE_STORAGE_PREFIX + fix + \"-\" + msgKey;\n }\n return null;\n }\n // returns if throttle is triggered on current Date\n function _isTriggeredOnCurDate(preTriggerDate) {\n try {\n if (preTriggerDate) {\n var curDate = new Date();\n return preTriggerDate.getUTCFullYear() === curDate.getUTCFullYear() && preTriggerDate.getUTCMonth() === curDate.getUTCMonth() && preTriggerDate[_DYN_GET_UTCDATE /* @min:%2egetUTCDate */]() === curDate[_DYN_GET_UTCDATE /* @min:%2egetUTCDate */]();\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return false;\n }\n // transfer local storage string value to object that identifies start date, current count and preTriggerDate\n function _getLocalStorageObj(value, logger, storageName) {\n try {\n var storageObj = {\n date: _getThrottleDate(),\n count: 0\n };\n if (value) {\n var obj = JSON.parse(value);\n var curObj = {\n date: _getThrottleDate(obj[_DYN_DATE /* @min:%2edate */]) || storageObj[_DYN_DATE /* @min:%2edate */],\n count: obj[_DYN_COUNT /* @min:%2ecount */] || storageObj[_DYN_COUNT /* @min:%2ecount */],\n preTriggerDate: obj.preTriggerDate ? _getThrottleDate(obj[_DYN_PRE_TRIGGER_DATE /* @min:%2epreTriggerDate */]) : undefined\n };\n return curObj;\n } else {\n _resetLocalStorage(logger, storageName, storageObj);\n return storageObj;\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return null;\n }\n // if datestr is not defined, current date will be returned\n function _getThrottleDate(dateStr) {\n // if new Date() can't be created through the provided dateStr, null will be returned.\n try {\n if (dateStr) {\n var date = new Date(dateStr);\n //make sure it is a valid Date Object\n if (!isNaN(date.getDate())) {\n return date;\n }\n } else {\n return new Date();\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return null;\n }\n function _resetLocalStorage(logger, storageName, obj) {\n try {\n return utlSetLocalStorage(logger, storageName, strTrim(JSON[_DYN_STRINGIFY /* @min:%2estringify */](obj)));\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return false;\n }\n function _checkInterval(interval, start, current) {\n if (interval <= 0) {\n return 1;\n }\n // count from start year\n return current >= start && (current - start) % interval == 0 ? Math.floor((current - start) / interval) + 1 : -1;\n }\n function _sendMessage(msgID, logger, message, severity) {\n _throwInternal(logger, severity || 1 /* eLoggingSeverity.CRITICAL */, msgID, message);\n }\n // NOTE: config.limit.samplingRate is set to 4 decimal places,\n // so config.limit.samplingRate = 1 means 0.0001%\n function _canSampledIn(msgID) {\n try {\n var cfg = _getCfgByKey(msgID);\n return randomValue(1000000) <= cfg.limit.samplingRate;\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return false;\n }\n function _getLocalStorageObjByKey(key) {\n try {\n var curObj = _localStorageObj[key];\n if (!curObj) {\n var localStorageName = _getLocalStorageName(key, _namePrefix);\n curObj = _getLocalStorageObj(utlGetLocalStorage(_logger, localStorageName), _logger, localStorageName);\n _localStorageObj[key] = curObj;\n }\n return _localStorageObj[key];\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return null;\n }\n function _isTrigger(key) {\n var isTrigger = _isTriggered[key];\n if (isNullOrUndefined(isTrigger)) {\n isTrigger = false;\n var localStorageObj = _getLocalStorageObjByKey(key);\n if (localStorageObj) {\n isTrigger = _isTriggeredOnCurDate(localStorageObj[_DYN_PRE_TRIGGER_DATE /* @min:%2epreTriggerDate */]);\n }\n _isTriggered[key] = isTrigger;\n }\n return _isTriggered[key];\n }\n function _getQueueByKey(key) {\n _queue = _queue || {};\n if (isNullOrUndefined(_queue[key])) {\n _queue[key] = [];\n }\n return _queue[key];\n }\n }\n return ThrottleMgr;\n}();\nexport { ThrottleMgr };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { arrReduce, objKeys, strEndsWith } from \"@microsoft/applicationinsights-core-js\";\nimport { DEFAULT_BREEZE_ENDPOINT } from \"./Constants\";\nimport { _DYN_INGESTIONENDPOINT, _DYN_LENGTH, _DYN_SPLIT, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\nvar _FIELDS_SEPARATOR = \";\";\nvar _FIELD_KEY_VALUE_SEPARATOR = \"=\";\nexport function parseConnectionString(connectionString) {\n if (!connectionString) {\n return {};\n }\n var kvPairs = connectionString[_DYN_SPLIT /* @min:%2esplit */](_FIELDS_SEPARATOR);\n var result = arrReduce(kvPairs, function (fields, kv) {\n var kvParts = kv[_DYN_SPLIT /* @min:%2esplit */](_FIELD_KEY_VALUE_SEPARATOR);\n if (kvParts[_DYN_LENGTH /* @min:%2elength */] === 2) {\n // only save fields with valid formats\n var key = kvParts[0][_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\n var value = kvParts[1];\n fields[key] = value;\n }\n return fields;\n }, {});\n if (objKeys(result)[_DYN_LENGTH /* @min:%2elength */] > 0) {\n // this is a valid connection string, so parse the results\n if (result.endpointsuffix) {\n // apply the default endpoints\n var locationPrefix = result.location ? result.location + \".\" : \"\";\n result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] || \"https://\" + locationPrefix + \"dc.\" + result.endpointsuffix;\n }\n // apply user override endpoint or the default endpoints\n result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] || DEFAULT_BREEZE_ENDPOINT;\n if (strEndsWith(result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */], \"/\")) {\n result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */].slice(0, -1);\n }\n }\n return result;\n}\nexport var ConnectionStringParser = {\n parse: parseConnectionString\n};\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { toISOString } from \"@microsoft/applicationinsights-core-js\";\nimport { strNotSpecified } from \"../../Constants\";\nimport { _DYN_NAME } from \"../../__DynamicConstants\";\nimport { dataSanitizeString } from \"./DataSanitizer\";\nvar Envelope = /** @class */function () {\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\n function Envelope(logger, data, name) {\n var _this = this;\n var _self = this;\n _self.ver = 1;\n _self.sampleRate = 100.0;\n _self.tags = {};\n _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;\n _self.data = data;\n _self.time = toISOString(new Date());\n _self.aiDataContract = {\n time: 1 /* FieldType.Required */,\n iKey: 1 /* FieldType.Required */,\n name: 1 /* FieldType.Required */,\n sampleRate: function () {\n return _this.sampleRate === 100 ? 4 /* FieldType.Hidden */ : 1 /* FieldType.Required */;\n },\n tags: 1 /* FieldType.Required */,\n data: 1 /* FieldType.Required */\n };\n }\n return Envelope;\n}();\nexport { Envelope };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { strNotSpecified } from \"../Constants\";\nimport { _DYN_MEASUREMENTS, _DYN_NAME, _DYN_PROPERTIES } from \"../__DynamicConstants\";\nimport { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString } from \"./Common/DataSanitizer\";\nvar Event = /** @class */function () {\n /**\r\n * Constructs a new instance of the EventTelemetry object\r\n */\n function Event(logger, name, properties, measurements) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */,\n name: 1 /* FieldType.Required */,\n properties: 0 /* FieldType.Default */,\n measurements: 0 /* FieldType.Default */\n };\n var _self = this;\n _self.ver = 2;\n _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\n }\n Event.envelopeType = \"Microsoft.ApplicationInsights.{0}.Event\";\n Event.dataType = \"EventData\";\n return Event;\n}();\nexport { Event };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { __assignFn as __assign } from \"@microsoft/applicationinsights-shims\";\nimport { arrForEach, arrMap, isArray, isError, isFunction, isNullOrUndefined, isObject, isString, strTrim } from \"@microsoft/applicationinsights-core-js\";\nimport { getWindow, strIndexOf } from \"@nevware21/ts-utils\";\nimport { strNotSpecified } from \"../Constants\";\nimport { _DYN_ASSEMBLY, _DYN_EXCEPTIONS, _DYN_FILE_NAME, _DYN_HAS_FULL_STACK, _DYN_IS_MANUAL, _DYN_LENGTH, _DYN_LEVEL, _DYN_LINE, _DYN_MEASUREMENTS, _DYN_MESSAGE, _DYN_METHOD, _DYN_NAME, _DYN_PARSED_STACK, _DYN_PROBLEM_GROUP, _DYN_PROPERTIES, _DYN_PUSH, _DYN_SEVERITY_LEVEL, _DYN_SIZE_IN_BYTES, _DYN_SPLIT, _DYN_STRINGIFY, _DYN_TO_STRING, _DYN_TYPE_NAME, _DYN__CREATE_FROM_INTERFA1 } from \"../__DynamicConstants\";\nimport { dataSanitizeException, dataSanitizeMeasurements, dataSanitizeMessage, dataSanitizeProperties, dataSanitizeString } from \"./Common/DataSanitizer\";\nvar NoMethod = \"\";\nvar strError = \"error\";\nvar strStack = \"stack\";\nvar strStackDetails = \"stackDetails\";\nvar strErrorSrc = \"errorSrc\";\nvar strMessage = \"message\";\nvar strDescription = \"description\";\nfunction _stringify(value, convertToString) {\n var result = value;\n if (result && !isString(result)) {\n if (JSON && JSON[_DYN_STRINGIFY /* @min:%2estringify */]) {\n result = JSON[_DYN_STRINGIFY /* @min:%2estringify */](value);\n if (convertToString && (!result || result === \"{}\")) {\n if (isFunction(value[_DYN_TO_STRING /* @min:%2etoString */])) {\n result = value[_DYN_TO_STRING /* @min:%2etoString */]();\n } else {\n result = \"\" + value;\n }\n }\n } else {\n result = \"\" + value + \" - (Missing JSON.stringify)\";\n }\n }\n return result || \"\";\n}\nfunction _formatMessage(theEvent, errorType) {\n var evtMessage = theEvent;\n if (theEvent) {\n if (evtMessage && !isString(evtMessage)) {\n evtMessage = theEvent[strMessage] || theEvent[strDescription] || evtMessage;\n }\n // Make sure the message is a string\n if (evtMessage && !isString(evtMessage)) {\n // tslint:disable-next-line: prefer-conditional-expression\n evtMessage = _stringify(evtMessage, true);\n }\n if (theEvent[\"filename\"]) {\n // Looks like an event object with filename\n evtMessage = evtMessage + \" @\" + (theEvent[\"filename\"] || \"\") + \":\" + (theEvent[\"lineno\"] || \"?\") + \":\" + (theEvent[\"colno\"] || \"?\");\n }\n }\n // Automatically add the error type to the message if it does already appear to be present\n if (errorType && errorType !== \"String\" && errorType !== \"Object\" && errorType !== \"Error\" && strIndexOf(evtMessage || \"\", errorType) === -1) {\n evtMessage = errorType + \": \" + evtMessage;\n }\n return evtMessage || \"\";\n}\nfunction _isExceptionDetailsInternal(value) {\n try {\n if (isObject(value)) {\n return \"hasFullStack\" in value && \"typeName\" in value;\n }\n } catch (e) {\n // This can happen with some native browser objects, but should not happen for the type we are checking for\n }\n return false;\n}\nfunction _isExceptionInternal(value) {\n try {\n if (isObject(value)) {\n return \"ver\" in value && \"exceptions\" in value && \"properties\" in value;\n }\n } catch (e) {\n // This can happen with some native browser objects, but should not happen for the type we are checking for\n }\n return false;\n}\nfunction _isStackDetails(details) {\n return details && details.src && isString(details.src) && details.obj && isArray(details.obj);\n}\nfunction _convertStackObj(errorStack) {\n var src = errorStack || \"\";\n if (!isString(src)) {\n if (isString(src[strStack])) {\n src = src[strStack];\n } else {\n src = \"\" + src;\n }\n }\n var items = src[_DYN_SPLIT /* @min:%2esplit */](\"\\n\");\n return {\n src: src,\n obj: items\n };\n}\nfunction _getOperaStack(errorMessage) {\n var stack = [];\n var lines = errorMessage[_DYN_SPLIT /* @min:%2esplit */](\"\\n\");\n for (var lp = 0; lp < lines[_DYN_LENGTH /* @min:%2elength */]; lp++) {\n var entry = lines[lp];\n if (lines[lp + 1]) {\n entry += \"@\" + lines[lp + 1];\n lp++;\n }\n stack[_DYN_PUSH /* @min:%2epush */](entry);\n }\n return {\n src: errorMessage,\n obj: stack\n };\n}\nfunction _getStackFromErrorObj(errorObj) {\n var details = null;\n if (errorObj) {\n try {\n /* Using bracket notation is support older browsers (IE 7/8 -- dont remember the version) that throw when using dot\r\n notation for undefined objects and we don't want to loose the error from being reported */\n if (errorObj[strStack]) {\n // Chrome/Firefox\n details = _convertStackObj(errorObj[strStack]);\n } else if (errorObj[strError] && errorObj[strError][strStack]) {\n // Edge error event provides the stack and error object\n details = _convertStackObj(errorObj[strError][strStack]);\n } else if (errorObj[\"exception\"] && errorObj.exception[strStack]) {\n details = _convertStackObj(errorObj.exception[strStack]);\n } else if (_isStackDetails(errorObj)) {\n details = errorObj;\n } else if (_isStackDetails(errorObj[strStackDetails])) {\n details = errorObj[strStackDetails];\n } else if (getWindow() && getWindow()[\"opera\"] && errorObj[strMessage]) {\n // Opera\n details = _getOperaStack(errorObj[_DYN_MESSAGE /* @min:%2emessage */]);\n } else if (errorObj[\"reason\"] && errorObj.reason[strStack]) {\n // UnhandledPromiseRejection\n details = _convertStackObj(errorObj.reason[strStack]);\n } else if (isString(errorObj)) {\n details = _convertStackObj(errorObj);\n } else {\n var evtMessage = errorObj[strMessage] || errorObj[strDescription] || \"\";\n if (isString(errorObj[strErrorSrc])) {\n if (evtMessage) {\n evtMessage += \"\\n\";\n }\n evtMessage += \" from \" + errorObj[strErrorSrc];\n }\n if (evtMessage) {\n details = _convertStackObj(evtMessage);\n }\n }\n } catch (e) {\n // something unexpected happened so to avoid failing to report any error lets swallow the exception\n // and fallback to the callee/caller method\n details = _convertStackObj(e);\n }\n }\n return details || {\n src: \"\",\n obj: null\n };\n}\nfunction _formatStackTrace(stackDetails) {\n var stack = \"\";\n if (stackDetails) {\n if (stackDetails.obj) {\n arrForEach(stackDetails.obj, function (entry) {\n stack += entry + \"\\n\";\n });\n } else {\n stack = stackDetails.src || \"\";\n }\n }\n return stack;\n}\nfunction _parseStack(stack) {\n var parsedStack;\n var frames = stack.obj;\n if (frames && frames[_DYN_LENGTH /* @min:%2elength */] > 0) {\n parsedStack = [];\n var level_1 = 0;\n var totalSizeInBytes_1 = 0;\n arrForEach(frames, function (frame) {\n var theFrame = frame[_DYN_TO_STRING /* @min:%2etoString */]();\n if (_StackFrame.regex.test(theFrame)) {\n var parsedFrame = new _StackFrame(theFrame, level_1++);\n totalSizeInBytes_1 += parsedFrame[_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */];\n parsedStack[_DYN_PUSH /* @min:%2epush */](parsedFrame);\n }\n });\n // DP Constraint - exception parsed stack must be < 32KB\n // remove frames from the middle to meet the threshold\n var exceptionParsedStackThreshold = 32 * 1024;\n if (totalSizeInBytes_1 > exceptionParsedStackThreshold) {\n var left = 0;\n var right = parsedStack[_DYN_LENGTH /* @min:%2elength */] - 1;\n var size = 0;\n var acceptedLeft = left;\n var acceptedRight = right;\n while (left < right) {\n // check size\n var lSize = parsedStack[left][_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */];\n var rSize = parsedStack[right][_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */];\n size += lSize + rSize;\n if (size > exceptionParsedStackThreshold) {\n // remove extra frames from the middle\n var howMany = acceptedRight - acceptedLeft + 1;\n parsedStack.splice(acceptedLeft, howMany);\n break;\n }\n // update pointers\n acceptedLeft = left;\n acceptedRight = right;\n left++;\n right--;\n }\n }\n }\n return parsedStack;\n}\nfunction _getErrorType(errorType) {\n // Gets the Error Type by passing the constructor (used to get the true type of native error object).\n var typeName = \"\";\n if (errorType) {\n typeName = errorType.typeName || errorType[_DYN_NAME /* @min:%2ename */] || \"\";\n if (!typeName) {\n try {\n var funcNameRegex = /function (.{1,200})\\(/;\n var results = funcNameRegex.exec(errorType.constructor[_DYN_TO_STRING /* @min:%2etoString */]());\n typeName = results && results[_DYN_LENGTH /* @min:%2elength */] > 1 ? results[1] : \"\";\n } catch (e) {\n // eslint-disable-next-line no-empty -- Ignoring any failures as nothing we can do\n }\n }\n }\n return typeName;\n}\n/**\r\n * Formats the provided errorObj for display and reporting, it may be a String, Object, integer or undefined depending on the browser.\r\n * @param errorObj - The supplied errorObj\r\n */\nexport function _formatErrorCode(errorObj) {\n if (errorObj) {\n try {\n if (!isString(errorObj)) {\n var errorType = _getErrorType(errorObj);\n var result = _stringify(errorObj, false);\n if (!result || result === \"{}\") {\n if (errorObj[strError]) {\n // Looks like an MS Error Event\n errorObj = errorObj[strError];\n errorType = _getErrorType(errorObj);\n }\n result = _stringify(errorObj, true);\n }\n if (strIndexOf(result, errorType) !== 0 && errorType !== \"String\") {\n return errorType + \":\" + result;\n }\n return result;\n }\n } catch (e) {\n // eslint-disable-next-line no-empty -- Ignoring any failures as nothing we can do\n }\n }\n // Fallback to just letting the object format itself into a string\n return \"\" + (errorObj || \"\");\n}\nvar Exception = /** @class */function () {\n /**\r\n * Constructs a new instance of the ExceptionTelemetry object\r\n */\n function Exception(logger, exception, properties, measurements, severityLevel, id) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */,\n exceptions: 1 /* FieldType.Required */,\n severityLevel: 0 /* FieldType.Default */,\n properties: 0 /* FieldType.Default */,\n measurements: 0 /* FieldType.Default */\n };\n var _self = this;\n _self.ver = 2; // TODO: handle the CS\"4.0\" ==> breeze 2 conversion in a better way\n if (!_isExceptionInternal(exception)) {\n if (!properties) {\n properties = {};\n }\n if (id) {\n properties.id = id;\n }\n _self[_DYN_EXCEPTIONS /* @min:%2eexceptions */] = [new _ExceptionDetails(logger, exception, properties)];\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\n if (severityLevel) {\n _self[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */] = severityLevel;\n }\n if (id) {\n _self.id = id;\n }\n } else {\n _self[_DYN_EXCEPTIONS /* @min:%2eexceptions */] = exception[_DYN_EXCEPTIONS /* @min:%2eexceptions */] || [];\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = exception[_DYN_PROPERTIES /* @min:%2eproperties */];\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = exception[_DYN_MEASUREMENTS /* @min:%2emeasurements */];\n if (exception[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */]) {\n _self[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */] = exception[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */];\n }\n if (exception.id) {\n _self.id = exception.id;\n exception[_DYN_PROPERTIES /* @min:%2eproperties */].id = exception.id;\n }\n if (exception[_DYN_PROBLEM_GROUP /* @min:%2eproblemGroup */]) {\n _self[_DYN_PROBLEM_GROUP /* @min:%2eproblemGroup */] = exception[_DYN_PROBLEM_GROUP /* @min:%2eproblemGroup */];\n }\n // bool/int types, use isNullOrUndefined\n if (!isNullOrUndefined(exception[_DYN_IS_MANUAL /* @min:%2eisManual */])) {\n _self[_DYN_IS_MANUAL /* @min:%2eisManual */] = exception[_DYN_IS_MANUAL /* @min:%2eisManual */];\n }\n }\n }\n Exception.CreateAutoException = function (message, url, lineNumber, columnNumber, error, evt, stack, errorSrc) {\n var _a;\n var errorType = _getErrorType(error || evt || message);\n return _a = {}, _a[_DYN_MESSAGE /* @min:message */] = _formatMessage(message, errorType), _a.url = url, _a.lineNumber = lineNumber, _a.columnNumber = columnNumber, _a.error = _formatErrorCode(error || evt || message), _a.evt = _formatErrorCode(evt || message), _a[_DYN_TYPE_NAME /* @min:typeName */] = errorType, _a.stackDetails = _getStackFromErrorObj(stack || error || evt), _a.errorSrc = errorSrc, _a;\n };\n Exception.CreateFromInterface = function (logger, exception, properties, measurements) {\n var exceptions = exception[_DYN_EXCEPTIONS /* @min:%2eexceptions */] && arrMap(exception[_DYN_EXCEPTIONS /* @min:%2eexceptions */], function (ex) {\n return _ExceptionDetails[_DYN__CREATE_FROM_INTERFA1 /* @min:%2eCreateFromInterface */](logger, ex);\n });\n var exceptionData = new Exception(logger, __assign(__assign({}, exception), {\n exceptions: exceptions\n }), properties, measurements);\n return exceptionData;\n };\n Exception.prototype.toInterface = function () {\n var _a;\n var _b = this,\n exceptions = _b.exceptions,\n properties = _b.properties,\n measurements = _b.measurements,\n severityLevel = _b.severityLevel,\n problemGroup = _b.problemGroup,\n id = _b.id,\n isManual = _b.isManual;\n var exceptionDetailsInterface = exceptions instanceof Array && arrMap(exceptions, function (exception) {\n return exception.toInterface();\n }) || undefined;\n return _a = {\n ver: \"4.0\"\n }, _a[_DYN_EXCEPTIONS /* @min:exceptions */] = exceptionDetailsInterface, _a.severityLevel = severityLevel, _a.properties = properties, _a.measurements = measurements, _a.problemGroup = problemGroup, _a.id = id, _a.isManual = isManual, _a;\n };\n /**\r\n * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.\r\n */\n Exception.CreateSimpleException = function (message, typeName, assembly, fileName, details, line) {\n var _a;\n return {\n exceptions: [(_a = {}, _a[_DYN_HAS_FULL_STACK /* @min:hasFullStack */] = true, _a.message = message, _a.stack = details, _a.typeName = typeName, _a)]\n };\n };\n Exception.envelopeType = \"Microsoft.ApplicationInsights.{0}.Exception\";\n Exception.dataType = \"ExceptionData\";\n Exception.formatError = _formatErrorCode;\n return Exception;\n}();\nexport { Exception };\nvar _ExceptionDetails = /** @class */function () {\n function _ExceptionDetails(logger, exception, properties) {\n this.aiDataContract = {\n id: 0 /* FieldType.Default */,\n outerId: 0 /* FieldType.Default */,\n typeName: 1 /* FieldType.Required */,\n message: 1 /* FieldType.Required */,\n hasFullStack: 0 /* FieldType.Default */,\n stack: 0 /* FieldType.Default */,\n parsedStack: 2 /* FieldType.Array */\n };\n var _self = this;\n if (!_isExceptionDetailsInternal(exception)) {\n var error = exception;\n var evt = error && error.evt;\n if (!isError(error)) {\n error = error[strError] || evt || error;\n }\n _self[_DYN_TYPE_NAME /* @min:%2etypeName */] = dataSanitizeString(logger, _getErrorType(error)) || strNotSpecified;\n _self[_DYN_MESSAGE /* @min:%2emessage */] = dataSanitizeMessage(logger, _formatMessage(exception || error, _self[_DYN_TYPE_NAME /* @min:%2etypeName */])) || strNotSpecified;\n var stack = exception[strStackDetails] || _getStackFromErrorObj(exception);\n _self[_DYN_PARSED_STACK /* @min:%2eparsedStack */] = _parseStack(stack);\n // after parsedStack is inited, iterate over each frame object, sanitize its assembly field\n if (isArray(_self[_DYN_PARSED_STACK /* @min:%2eparsedStack */])) {\n arrMap(_self[_DYN_PARSED_STACK /* @min:%2eparsedStack */], function (frame) {\n frame[_DYN_ASSEMBLY /* @min:%2eassembly */] = dataSanitizeString(logger, frame[_DYN_ASSEMBLY /* @min:%2eassembly */]);\n frame[_DYN_FILE_NAME /* @min:%2efileName */] = dataSanitizeString(logger, frame[_DYN_FILE_NAME /* @min:%2efileName */]);\n });\n }\n _self[strStack] = dataSanitizeException(logger, _formatStackTrace(stack));\n _self.hasFullStack = isArray(_self.parsedStack) && _self.parsedStack[_DYN_LENGTH /* @min:%2elength */] > 0;\n if (properties) {\n properties[_DYN_TYPE_NAME /* @min:%2etypeName */] = properties[_DYN_TYPE_NAME /* @min:%2etypeName */] || _self[_DYN_TYPE_NAME /* @min:%2etypeName */];\n }\n } else {\n _self[_DYN_TYPE_NAME /* @min:%2etypeName */] = exception[_DYN_TYPE_NAME /* @min:%2etypeName */];\n _self[_DYN_MESSAGE /* @min:%2emessage */] = exception[_DYN_MESSAGE /* @min:%2emessage */];\n _self[strStack] = exception[strStack];\n _self[_DYN_PARSED_STACK /* @min:%2eparsedStack */] = exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */] || [];\n _self[_DYN_HAS_FULL_STACK /* @min:%2ehasFullStack */] = exception[_DYN_HAS_FULL_STACK /* @min:%2ehasFullStack */];\n }\n }\n _ExceptionDetails.prototype.toInterface = function () {\n var _a;\n var _self = this;\n var parsedStack = _self[_DYN_PARSED_STACK /* @min:%2eparsedStack */] instanceof Array && arrMap(_self[_DYN_PARSED_STACK /* @min:%2eparsedStack */], function (frame) {\n return frame.toInterface();\n });\n var exceptionDetailsInterface = (_a = {\n id: _self.id,\n outerId: _self.outerId,\n typeName: _self[_DYN_TYPE_NAME /* @min:%2etypeName */],\n message: _self[_DYN_MESSAGE /* @min:%2emessage */],\n hasFullStack: _self[_DYN_HAS_FULL_STACK /* @min:%2ehasFullStack */],\n stack: _self[strStack]\n }, _a[_DYN_PARSED_STACK /* @min:parsedStack */] = parsedStack || undefined, _a);\n return exceptionDetailsInterface;\n };\n _ExceptionDetails.CreateFromInterface = function (logger, exception) {\n var parsedStack = exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */] instanceof Array && arrMap(exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */], function (frame) {\n return _StackFrame[_DYN__CREATE_FROM_INTERFA1 /* @min:%2eCreateFromInterface */](frame);\n }) || exception[_DYN_PARSED_STACK /* @min:%2eparsedStack */];\n var exceptionDetails = new _ExceptionDetails(logger, __assign(__assign({}, exception), {\n parsedStack: parsedStack\n }));\n return exceptionDetails;\n };\n return _ExceptionDetails;\n}();\nexport { _ExceptionDetails };\nvar _StackFrame = /** @class */function () {\n function _StackFrame(sourceFrame, level) {\n this.aiDataContract = {\n level: 1 /* FieldType.Required */,\n method: 1 /* FieldType.Required */,\n assembly: 0 /* FieldType.Default */,\n fileName: 0 /* FieldType.Default */,\n line: 0 /* FieldType.Default */\n };\n var _self = this;\n _self[_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */] = 0;\n // Not converting this to isString() as typescript uses this logic to \"understand\" the different\n // types for the 2 different code paths\n if (typeof sourceFrame === \"string\") {\n var frame = sourceFrame;\n _self[_DYN_LEVEL /* @min:%2elevel */] = level;\n _self[_DYN_METHOD /* @min:%2emethod */] = NoMethod;\n _self[_DYN_ASSEMBLY /* @min:%2eassembly */] = strTrim(frame);\n _self[_DYN_FILE_NAME /* @min:%2efileName */] = \"\";\n _self[_DYN_LINE /* @min:%2eline */] = 0;\n var matches = frame.match(_StackFrame.regex);\n if (matches && matches[_DYN_LENGTH /* @min:%2elength */] >= 5) {\n _self[_DYN_METHOD /* @min:%2emethod */] = strTrim(matches[2]) || _self[_DYN_METHOD /* @min:%2emethod */];\n _self[_DYN_FILE_NAME /* @min:%2efileName */] = strTrim(matches[4]);\n _self[_DYN_LINE /* @min:%2eline */] = parseInt(matches[5]) || 0;\n }\n } else {\n _self[_DYN_LEVEL /* @min:%2elevel */] = sourceFrame[_DYN_LEVEL /* @min:%2elevel */];\n _self[_DYN_METHOD /* @min:%2emethod */] = sourceFrame[_DYN_METHOD /* @min:%2emethod */];\n _self[_DYN_ASSEMBLY /* @min:%2eassembly */] = sourceFrame[_DYN_ASSEMBLY /* @min:%2eassembly */];\n _self[_DYN_FILE_NAME /* @min:%2efileName */] = sourceFrame[_DYN_FILE_NAME /* @min:%2efileName */];\n _self[_DYN_LINE /* @min:%2eline */] = sourceFrame[_DYN_LINE /* @min:%2eline */];\n _self[_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */] = 0;\n }\n _self.sizeInBytes += _self.method[_DYN_LENGTH /* @min:%2elength */];\n _self.sizeInBytes += _self.fileName[_DYN_LENGTH /* @min:%2elength */];\n _self.sizeInBytes += _self.assembly[_DYN_LENGTH /* @min:%2elength */];\n // todo: these might need to be removed depending on how the back-end settles on their size calculation\n _self[_DYN_SIZE_IN_BYTES /* @min:%2esizeInBytes */] += _StackFrame.baseSize;\n _self.sizeInBytes += _self.level.toString()[_DYN_LENGTH /* @min:%2elength */];\n _self.sizeInBytes += _self.line.toString()[_DYN_LENGTH /* @min:%2elength */];\n }\n _StackFrame.CreateFromInterface = function (frame) {\n return new _StackFrame(frame, null /* level is available in frame interface */);\n };\n _StackFrame.prototype.toInterface = function () {\n var _self = this;\n return {\n level: _self[_DYN_LEVEL /* @min:%2elevel */],\n method: _self[_DYN_METHOD /* @min:%2emethod */],\n assembly: _self[_DYN_ASSEMBLY /* @min:%2eassembly */],\n fileName: _self[_DYN_FILE_NAME /* @min:%2efileName */],\n line: _self[_DYN_LINE /* @min:%2eline */]\n };\n };\n // regex to match stack frames from ie/chrome/ff\n // methodName=$2, fileName=$4, lineNo=$5, column=$6\n _StackFrame.regex = /^([\\s]+at)?[\\s]{0,50}([^\\@\\()]+?)[\\s]{0,50}(\\@|\\()([^\\(\\n]+):([0-9]+):([0-9]+)(\\)?)$/;\n _StackFrame.baseSize = 58; // '{\"method\":\"\",\"level\":,\"assembly\":\"\",\"fileName\":\"\",\"line\":}'.length\n return _StackFrame;\n}();\nexport { _StackFrame };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nvar DataPoint = /** @class */function () {\n function DataPoint() {\n /**\r\n * The data contract for serializing this object.\r\n */\n this.aiDataContract = {\n name: 1 /* FieldType.Required */,\n kind: 0 /* FieldType.Default */,\n value: 1 /* FieldType.Required */,\n count: 0 /* FieldType.Default */,\n min: 0 /* FieldType.Default */,\n max: 0 /* FieldType.Default */,\n stdDev: 0 /* FieldType.Default */\n };\n /**\r\n * Metric type. Single measurement or the aggregated value.\r\n */\n this.kind = 0 /* DataPointType.Measurement */;\n }\n return DataPoint;\n}();\nexport { DataPoint };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { strNotSpecified } from \"../Constants\";\nimport { _DYN_COUNT, _DYN_MEASUREMENTS, _DYN_NAME, _DYN_PROPERTIES } from \"../__DynamicConstants\";\nimport { DataPoint } from \"./Common/DataPoint\";\nimport { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString } from \"./Common/DataSanitizer\";\nvar Metric = /** @class */function () {\n /**\r\n * Constructs a new instance of the MetricTelemetry object\r\n */\n function Metric(logger, name, value, count, min, max, stdDev, properties, measurements) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */,\n metrics: 1 /* FieldType.Required */,\n properties: 0 /* FieldType.Default */\n };\n var _self = this;\n _self.ver = 2;\n var dataPoint = new DataPoint();\n dataPoint[_DYN_COUNT /* @min:%2ecount */] = count > 0 ? count : undefined;\n dataPoint.max = isNaN(max) || max === null ? undefined : max;\n dataPoint.min = isNaN(min) || min === null ? undefined : min;\n dataPoint[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;\n dataPoint.value = value;\n dataPoint.stdDev = isNaN(stdDev) || stdDev === null ? undefined : stdDev;\n _self.metrics = [dataPoint];\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\n }\n Metric.envelopeType = \"Microsoft.ApplicationInsights.{0}.Metric\";\n Metric.dataType = \"MetricData\";\n return Metric;\n}();\nexport { Metric };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { arrForEach, isString } from \"@microsoft/applicationinsights-core-js\";\nimport { _DYN_LENGTH, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\nvar strEmpty = \"\";\nexport function stringToBoolOrDefault(str, defaultValue) {\n if (defaultValue === void 0) {\n defaultValue = false;\n }\n if (str === undefined || str === null) {\n return defaultValue;\n }\n return str.toString()[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() === \"true\";\n}\n/**\r\n * Convert ms to c# time span format\r\n */\nexport function msToTimeSpan(totalms) {\n if (isNaN(totalms) || totalms < 0) {\n totalms = 0;\n }\n totalms = Math.round(totalms);\n var ms = strEmpty + totalms % 1000;\n var sec = strEmpty + Math.floor(totalms / 1000) % 60;\n var min = strEmpty + Math.floor(totalms / (1000 * 60)) % 60;\n var hour = strEmpty + Math.floor(totalms / (1000 * 60 * 60)) % 24;\n var days = Math.floor(totalms / (1000 * 60 * 60 * 24));\n ms = ms[_DYN_LENGTH /* @min:%2elength */] === 1 ? \"00\" + ms : ms[_DYN_LENGTH /* @min:%2elength */] === 2 ? \"0\" + ms : ms;\n sec = sec[_DYN_LENGTH /* @min:%2elength */] < 2 ? \"0\" + sec : sec;\n min = min[_DYN_LENGTH /* @min:%2elength */] < 2 ? \"0\" + min : min;\n hour = hour[_DYN_LENGTH /* @min:%2elength */] < 2 ? \"0\" + hour : hour;\n return (days > 0 ? days + \".\" : strEmpty) + hour + \":\" + min + \":\" + sec + \".\" + ms;\n}\nexport function getExtensionByName(extensions, identifier) {\n var extension = null;\n arrForEach(extensions, function (value) {\n if (value.identifier === identifier) {\n extension = value;\n return -1;\n }\n });\n return extension;\n}\nexport function isCrossOriginError(message, url, lineNumber, columnNumber, error) {\n return !error && isString(message) && (message === \"Script error.\" || message === \"Script error\");\n}\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { strNotSpecified } from \"../Constants\";\nimport { msToTimeSpan } from \"../HelperFuncs\";\nimport { _DYN_DURATION, _DYN_MEASUREMENTS, _DYN_NAME, _DYN_PROPERTIES } from \"../__DynamicConstants\";\nimport { dataSanitizeId, dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from \"./Common/DataSanitizer\";\nvar PageView = /** @class */function () {\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\n function PageView(logger, name, url, durationMs, properties, measurements, id) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */,\n name: 0 /* FieldType.Default */,\n url: 0 /* FieldType.Default */,\n duration: 0 /* FieldType.Default */,\n properties: 0 /* FieldType.Default */,\n measurements: 0 /* FieldType.Default */,\n id: 0 /* FieldType.Default */\n };\n var _self = this;\n _self.ver = 2;\n _self.id = dataSanitizeId(logger, id);\n _self.url = dataSanitizeUrl(logger, url);\n _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;\n if (!isNaN(durationMs)) {\n _self[_DYN_DURATION /* @min:%2eduration */] = msToTimeSpan(durationMs);\n }\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\n }\n PageView.envelopeType = \"Microsoft.ApplicationInsights.{0}.Pageview\";\n PageView.dataType = \"PageviewData\";\n return PageView;\n}();\nexport { PageView };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { msToTimeSpan } from \"../HelperFuncs\";\nimport { AjaxHelperParseDependencyPath } from \"../Util\";\nimport { _DYN_DURATION, _DYN_MEASUREMENTS, _DYN_NAME, _DYN_PROPERTIES } from \"../__DynamicConstants\";\nimport { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from \"./Common/DataSanitizer\";\nvar RemoteDependencyData = /** @class */function () {\n /**\r\n * Constructs a new instance of the RemoteDependencyData object\r\n */\n function RemoteDependencyData(logger, id, absoluteUrl, commandName, value, success, resultCode, method, requestAPI, correlationContext, properties, measurements) {\n if (requestAPI === void 0) {\n requestAPI = \"Ajax\";\n }\n this.aiDataContract = {\n id: 1 /* FieldType.Required */,\n ver: 1 /* FieldType.Required */,\n name: 0 /* FieldType.Default */,\n resultCode: 0 /* FieldType.Default */,\n duration: 0 /* FieldType.Default */,\n success: 0 /* FieldType.Default */,\n data: 0 /* FieldType.Default */,\n target: 0 /* FieldType.Default */,\n type: 0 /* FieldType.Default */,\n properties: 0 /* FieldType.Default */,\n measurements: 0 /* FieldType.Default */,\n kind: 0 /* FieldType.Default */,\n value: 0 /* FieldType.Default */,\n count: 0 /* FieldType.Default */,\n min: 0 /* FieldType.Default */,\n max: 0 /* FieldType.Default */,\n stdDev: 0 /* FieldType.Default */,\n dependencyKind: 0 /* FieldType.Default */,\n dependencySource: 0 /* FieldType.Default */,\n commandName: 0 /* FieldType.Default */,\n dependencyTypeName: 0 /* FieldType.Default */\n };\n var _self = this;\n _self.ver = 2;\n _self.id = id;\n _self[_DYN_DURATION /* @min:%2eduration */] = msToTimeSpan(value);\n _self.success = success;\n _self.resultCode = resultCode + \"\";\n _self.type = dataSanitizeString(logger, requestAPI);\n var dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);\n _self.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data; // get a value from hosturl if commandName not available\n _self.target = dataSanitizeString(logger, dependencyFields.target);\n if (correlationContext) {\n _self.target = \"\".concat(_self.target, \" | \").concat(correlationContext);\n }\n _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, dependencyFields[_DYN_NAME /* @min:%2ename */]);\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\n }\n RemoteDependencyData.envelopeType = \"Microsoft.ApplicationInsights.{0}.RemoteDependency\";\n RemoteDependencyData.dataType = \"RemoteDependencyData\";\n return RemoteDependencyData;\n}();\nexport { RemoteDependencyData };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { strNotSpecified } from \"../Constants\";\nimport { _DYN_MEASUREMENTS, _DYN_MESSAGE, _DYN_PROPERTIES, _DYN_SEVERITY_LEVEL } from \"../__DynamicConstants\";\nimport { dataSanitizeMeasurements, dataSanitizeMessage, dataSanitizeProperties } from \"./Common/DataSanitizer\";\nvar Trace = /** @class */function () {\n /**\r\n * Constructs a new instance of the TraceTelemetry object\r\n */\n function Trace(logger, message, severityLevel, properties, measurements) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */,\n message: 1 /* FieldType.Required */,\n severityLevel: 0 /* FieldType.Default */,\n properties: 0 /* FieldType.Default */\n };\n var _self = this;\n _self.ver = 2;\n message = message || strNotSpecified;\n _self[_DYN_MESSAGE /* @min:%2emessage */] = dataSanitizeMessage(logger, message);\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\n if (severityLevel) {\n _self[_DYN_SEVERITY_LEVEL /* @min:%2eseverityLevel */] = severityLevel;\n }\n }\n Trace.envelopeType = \"Microsoft.ApplicationInsights.{0}.Message\";\n Trace.dataType = \"MessageData\";\n return Trace;\n}();\nexport { Trace };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { strNotSpecified } from \"../Constants\";\nimport { _DYN_DURATION, _DYN_MEASUREMENTS, _DYN_NAME, _DYN_PROPERTIES, _DYN_RECEIVED_RESPONSE } from \"../__DynamicConstants\";\nimport { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from \"./Common/DataSanitizer\";\nvar PageViewPerformance = /** @class */function () {\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\n function PageViewPerformance(logger, name, url, unused, properties, measurements, cs4BaseData) {\n this.aiDataContract = {\n ver: 1 /* FieldType.Required */,\n name: 0 /* FieldType.Default */,\n url: 0 /* FieldType.Default */,\n duration: 0 /* FieldType.Default */,\n perfTotal: 0 /* FieldType.Default */,\n networkConnect: 0 /* FieldType.Default */,\n sentRequest: 0 /* FieldType.Default */,\n receivedResponse: 0 /* FieldType.Default */,\n domProcessing: 0 /* FieldType.Default */,\n properties: 0 /* FieldType.Default */,\n measurements: 0 /* FieldType.Default */\n };\n var _self = this;\n _self.ver = 2;\n _self.url = dataSanitizeUrl(logger, url);\n _self[_DYN_NAME /* @min:%2ename */] = dataSanitizeString(logger, name) || strNotSpecified;\n _self[_DYN_PROPERTIES /* @min:%2eproperties */] = dataSanitizeProperties(logger, properties);\n _self[_DYN_MEASUREMENTS /* @min:%2emeasurements */] = dataSanitizeMeasurements(logger, measurements);\n if (cs4BaseData) {\n _self.domProcessing = cs4BaseData.domProcessing;\n _self[_DYN_DURATION /* @min:%2eduration */] = cs4BaseData[_DYN_DURATION /* @min:%2eduration */];\n _self.networkConnect = cs4BaseData.networkConnect;\n _self.perfTotal = cs4BaseData.perfTotal;\n _self[_DYN_RECEIVED_RESPONSE /* @min:%2ereceivedResponse */] = cs4BaseData[_DYN_RECEIVED_RESPONSE /* @min:%2ereceivedResponse */];\n _self.sentRequest = cs4BaseData.sentRequest;\n }\n }\n PageViewPerformance.envelopeType = \"Microsoft.ApplicationInsights.{0}.PageviewPerformance\";\n PageViewPerformance.dataType = \"PageviewPerformanceData\";\n return PageViewPerformance;\n}();\nexport { PageViewPerformance };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nvar Data = /** @class */function () {\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\n function Data(baseType, data) {\n /**\r\n * The data contract for serializing this object.\r\n */\n this.aiDataContract = {\n baseType: 1 /* FieldType.Required */,\n baseData: 1 /* FieldType.Required */\n };\n this.baseType = baseType;\n this.baseData = data;\n }\n return Data;\n}();\nexport { Data };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { createEnumStyle } from \"@microsoft/applicationinsights-core-js\";\n/**\r\n * Defines the level of severity for the event.\r\n */\nexport var SeverityLevel = createEnumStyle({\n Verbose: 0 /* eSeverityLevel.Verbose */,\n Information: 1 /* eSeverityLevel.Information */,\n Warning: 2 /* eSeverityLevel.Warning */,\n Error: 3 /* eSeverityLevel.Error */,\n Critical: 4 /* eSeverityLevel.Critical */\n});\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { __extendsFn as __extends } from \"@microsoft/applicationinsights-shims\";\nimport { createClassFromInterface } from \"@microsoft/applicationinsights-core-js\";\nfunction _aiNameFunc(baseName) {\n var aiName = \"ai.\" + baseName + \".\";\n return function (name) {\n return aiName + name;\n };\n}\nvar _aiApplication = _aiNameFunc(\"application\");\nvar _aiDevice = _aiNameFunc(\"device\");\nvar _aiLocation = _aiNameFunc(\"location\");\nvar _aiOperation = _aiNameFunc(\"operation\");\nvar _aiSession = _aiNameFunc(\"session\");\nvar _aiUser = _aiNameFunc(\"user\");\nvar _aiCloud = _aiNameFunc(\"cloud\");\nvar _aiInternal = _aiNameFunc(\"internal\");\nvar ContextTagKeys = /** @class */function (_super) {\n __extends(ContextTagKeys, _super);\n function ContextTagKeys() {\n return _super.call(this) || this;\n }\n return ContextTagKeys;\n}(createClassFromInterface({\n applicationVersion: _aiApplication(\"ver\"),\n applicationBuild: _aiApplication(\"build\"),\n applicationTypeId: _aiApplication(\"typeId\"),\n applicationId: _aiApplication(\"applicationId\"),\n applicationLayer: _aiApplication(\"layer\"),\n deviceId: _aiDevice(\"id\"),\n deviceIp: _aiDevice(\"ip\"),\n deviceLanguage: _aiDevice(\"language\"),\n deviceLocale: _aiDevice(\"locale\"),\n deviceModel: _aiDevice(\"model\"),\n deviceFriendlyName: _aiDevice(\"friendlyName\"),\n deviceNetwork: _aiDevice(\"network\"),\n deviceNetworkName: _aiDevice(\"networkName\"),\n deviceOEMName: _aiDevice(\"oemName\"),\n deviceOS: _aiDevice(\"os\"),\n deviceOSVersion: _aiDevice(\"osVersion\"),\n deviceRoleInstance: _aiDevice(\"roleInstance\"),\n deviceRoleName: _aiDevice(\"roleName\"),\n deviceScreenResolution: _aiDevice(\"screenResolution\"),\n deviceType: _aiDevice(\"type\"),\n deviceMachineName: _aiDevice(\"machineName\"),\n deviceVMName: _aiDevice(\"vmName\"),\n deviceBrowser: _aiDevice(\"browser\"),\n deviceBrowserVersion: _aiDevice(\"browserVersion\"),\n locationIp: _aiLocation(\"ip\"),\n locationCountry: _aiLocation(\"country\"),\n locationProvince: _aiLocation(\"province\"),\n locationCity: _aiLocation(\"city\"),\n operationId: _aiOperation(\"id\"),\n operationName: _aiOperation(\"name\"),\n operationParentId: _aiOperation(\"parentId\"),\n operationRootId: _aiOperation(\"rootId\"),\n operationSyntheticSource: _aiOperation(\"syntheticSource\"),\n operationCorrelationVector: _aiOperation(\"correlationVector\"),\n sessionId: _aiSession(\"id\"),\n sessionIsFirst: _aiSession(\"isFirst\"),\n sessionIsNew: _aiSession(\"isNew\"),\n userAccountAcquisitionDate: _aiUser(\"accountAcquisitionDate\"),\n userAccountId: _aiUser(\"accountId\"),\n userAgent: _aiUser(\"userAgent\"),\n userId: _aiUser(\"id\"),\n userStoreRegion: _aiUser(\"storeRegion\"),\n userAuthUserId: _aiUser(\"authUserId\"),\n userAnonymousUserAcquisitionDate: _aiUser(\"anonUserAcquisitionDate\"),\n userAuthenticatedUserAcquisitionDate: _aiUser(\"authUserAcquisitionDate\"),\n cloudName: _aiCloud(\"name\"),\n cloudRole: _aiCloud(\"role\"),\n cloudRoleVer: _aiCloud(\"roleVer\"),\n cloudRoleInstance: _aiCloud(\"roleInstance\"),\n cloudEnvironment: _aiCloud(\"environment\"),\n cloudLocation: _aiCloud(\"location\"),\n cloudDeploymentUnit: _aiCloud(\"deploymentUnit\"),\n internalNodeName: _aiInternal(\"nodeName\"),\n internalSdkVersion: _aiInternal(\"sdkVersion\"),\n internalAgentVersion: _aiInternal(\"agentVersion\"),\n internalSnippet: _aiInternal(\"snippet\"),\n internalSdkSrc: _aiInternal(\"sdkSrc\")\n}));\nexport { ContextTagKeys };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { isNullOrUndefined, objForEachKey, throwError, toISOString } from \"@microsoft/applicationinsights-core-js\";\nimport { strIkey, strNotSpecified } from \"./Constants\";\nimport { dataSanitizeString } from \"./Telemetry/Common/DataSanitizer\";\nimport { _DYN_NAME } from \"./__DynamicConstants\";\n/**\r\n * Create a telemetry item that the 1DS channel understands\r\n * @param item - domain specific properties; part B\r\n * @param baseType - telemetry item type. ie PageViewData\r\n * @param envelopeName - name of the envelope. ie Microsoft.ApplicationInsights..PageView\r\n * @param customProperties - user defined custom properties; part C\r\n * @param systemProperties - system properties that are added to the context; part A\r\n * @returns ITelemetryItem that is sent to channel\r\n */\nexport function createTelemetryItem(item, baseType, envelopeName, logger, customProperties, systemProperties) {\n var _a;\n envelopeName = dataSanitizeString(logger, envelopeName) || strNotSpecified;\n if (isNullOrUndefined(item) || isNullOrUndefined(baseType) || isNullOrUndefined(envelopeName)) {\n throwError(\"Input doesn't contain all required fields\");\n }\n var iKey = \"\";\n if (item[strIkey]) {\n iKey = item[strIkey];\n delete item[strIkey];\n }\n var telemetryItem = (_a = {}, _a[_DYN_NAME /* @min:name */] = envelopeName, _a.time = toISOString(new Date()), _a.iKey = iKey, _a.ext = systemProperties ? systemProperties : {}, _a.tags = [], _a.data = {}, _a.baseType = baseType, _a.baseData = item // Part B\n , _a);\n // Part C\n if (!isNullOrUndefined(customProperties)) {\n objForEachKey(customProperties, function (prop, value) {\n telemetryItem.data[prop] = value;\n });\n }\n return telemetryItem;\n}\nvar TelemetryItemCreator = /** @class */function () {\n function TelemetryItemCreator() {}\n /**\r\n * Create a telemetry item that the 1DS channel understands\r\n * @param item - domain specific properties; part B\r\n * @param baseType - telemetry item type. ie PageViewData\r\n * @param envelopeName - name of the envelope. ie Microsoft.ApplicationInsights..PageView\r\n * @param customProperties - user defined custom properties; part C\r\n * @param systemProperties - system properties that are added to the context; part A\r\n * @returns ITelemetryItem that is sent to channel\r\n */\n TelemetryItemCreator.create = createTelemetryItem;\n return TelemetryItemCreator;\n}();\nexport { TelemetryItemCreator };\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { ContextTagKeys } from \"./Contracts/ContextTagKeys\";\nexport var Extensions = {\n UserExt: \"user\",\n DeviceExt: \"device\",\n TraceExt: \"trace\",\n WebExt: \"web\",\n AppExt: \"app\",\n OSExt: \"os\",\n SessionExt: \"ses\",\n SDKExt: \"sdk\"\n};\nexport var CtxTagKeys = new ContextTagKeys();\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { getDocument, isFunction } from \"@microsoft/applicationinsights-core-js\";\nexport function createDomEvent(eventName) {\n var event = null;\n if (isFunction(Event)) {\n // Use Event constructor when available\n event = new Event(eventName);\n } else {\n // Event has no constructor in IE\n var doc = getDocument();\n if (doc && doc.createEvent) {\n event = doc.createEvent(\"Event\");\n event.initEvent(eventName, true, true);\n }\n }\n return event;\n}\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { arrForEach, createUniqueNamespace, eventOff, eventOn, getDocument, getNavigator, getWindow, isNullOrUndefined, isUndefined, mergeEvtNamespace } from \"@microsoft/applicationinsights-core-js\";\nimport { _DYN_PUSH } from \"./__DynamicConstants\";\nfunction _disableEvents(target, evtNamespace) {\n eventOff(target, null, null, evtNamespace);\n}\n/**\r\n * Create a new OfflineListener instance to monitor browser online / offline events\r\n * @param parentEvtNamespace - The parent event namespace to append to any specific events for this instance\r\n */\nexport function createOfflineListener(parentEvtNamespace) {\n var _document = getDocument();\n var _navigator = getNavigator(); // Gets the window.navigator or workerNavigator depending on the global\n var _isListening = false;\n var listenerList = [];\n // Set the initial state\n // rState is changed by the browser, both via events and when we check the navigator.onLine property\n var rState = 1 /* eOfflineValue.Online */;\n if (_navigator && !isNullOrUndefined(_navigator.onLine) && !_navigator.onLine) {\n // navigator.onLine is undefined in react-native\n rState = 2 /* eOfflineValue.Offline */;\n }\n // ustate is changed by the user calling setOnlineState\n var uState = 0 /* eOfflineValue.Unknown */;\n // current state would be updated each time rState or uState is changed\n // it is a resolved value of rState and uState\n var _currentState = calCurrentState();\n var _evtNamespace = mergeEvtNamespace(createUniqueNamespace(\"OfflineListener\"), parentEvtNamespace);\n try {\n if (_enableEvents(getWindow())) {\n _isListening = true;\n }\n if (_document) {\n // Also attach to the document.body or document\n var target = _document.body || _document;\n if (target.ononline) {\n if (_enableEvents(target)) {\n _isListening = true;\n }\n }\n }\n } catch (e) {\n // this makes react-native less angry\n _isListening = false;\n }\n function _enableEvents(target) {\n var enabled = false;\n if (target) {\n enabled = eventOn(target, \"online\", _setOnline, _evtNamespace);\n if (enabled) {\n eventOn(target, \"offline\", _setOffline, _evtNamespace);\n }\n }\n return enabled;\n }\n function _isOnline() {\n return _currentState;\n }\n function calCurrentState() {\n if (uState === 2 /* eOfflineValue.Offline */ || rState === 2 /* eOfflineValue.Offline */) {\n return false;\n }\n return true; // if both unknown, then we assume the network is good\n }\n function listnerNoticeCheck() {\n // we were offline and are now online or we were online and now offline\n var newState = calCurrentState();\n if (_currentState !== newState) {\n _currentState = newState; // use the resolved state to update\n // send all the callbacks with the current state\n arrForEach(listenerList, function (callback) {\n var offlineState = {\n isOnline: _currentState,\n rState: rState,\n uState: uState\n };\n try {\n callback(offlineState);\n } catch (e) {\n // Do nothing, just making sure we run all of the callbacks\n }\n });\n }\n }\n function setOnlineState(newState) {\n uState = newState;\n listnerNoticeCheck();\n }\n function _setOnline() {\n rState = 1 /* eOfflineValue.Online */;\n listnerNoticeCheck();\n }\n function _setOffline() {\n rState = 2 /* eOfflineValue.Offline */;\n listnerNoticeCheck();\n }\n function _unload() {\n var win = getWindow();\n if (win && _isListening) {\n _disableEvents(win, _evtNamespace);\n if (_document) {\n // Also attach to the document.body or document\n var target = _document.body || _document;\n if (!isUndefined(target.ononline)) {\n _disableEvents(target, _evtNamespace);\n }\n }\n _isListening = false;\n }\n }\n function addListener(callback) {\n listenerList[_DYN_PUSH /* @min:%2epush */](callback);\n // Define rm as an instance of IUnloadHook\n return {\n rm: function () {\n var index = listenerList.indexOf(callback);\n if (index > -1) {\n return listenerList.splice(index, 1);\n } else {\n return;\n }\n }\n };\n }\n return {\n isOnline: _isOnline,\n isListening: function () {\n return _isListening;\n },\n unload: _unload,\n addListener: addListener,\n setOnlineState: setOnlineState\n };\n}\n","/*\n * Application Insights JavaScript SDK - Common, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// Licensed under the\nexport { correlationIdSetPrefix, correlationIdGetPrefix, correlationIdCanIncludeCorrelationHeader, correlationIdGetCorrelationContext, correlationIdGetCorrelationContextValue, dateTimeUtilsNow, dateTimeUtilsDuration, isInternalApplicationInsightsEndpoint, createDistributedTraceContextFromTrace } from \"./Util\";\nexport { ThrottleMgr } from \"./ThrottleMgr\";\nexport { parseConnectionString, ConnectionStringParser } from \"./ConnectionStringParser\";\nexport { RequestHeaders } from \"./RequestResponseHeaders\";\nexport { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, DEFAULT_BREEZE_PATH, strNotSpecified } from \"./Constants\";\nexport { Envelope } from \"./Telemetry/Common/Envelope\";\nexport { Event } from \"./Telemetry/Event\";\nexport { Exception } from \"./Telemetry/Exception\";\nexport { Metric } from \"./Telemetry/Metric\";\nexport { PageView } from \"./Telemetry/PageView\";\nexport { RemoteDependencyData } from \"./Telemetry/RemoteDependencyData\";\nexport { Trace } from \"./Telemetry/Trace\";\nexport { PageViewPerformance } from \"./Telemetry/PageViewPerformance\";\nexport { Data } from \"./Telemetry/Common/Data\";\nexport { SeverityLevel } from \"./Interfaces/Contracts/SeverityLevel\";\nexport { ConfigurationManager } from \"./Interfaces/IConfig\";\nexport { ContextTagKeys } from \"./Interfaces/Contracts/ContextTagKeys\";\nexport { dataSanitizeKeyAndAddUniqueness, dataSanitizeKey, dataSanitizeString, dataSanitizeUrl, dataSanitizeMessage, dataSanitizeException, dataSanitizeProperties, dataSanitizeMeasurements, dataSanitizeId, dataSanitizeInput, dsPadNumber } from \"./Telemetry/Common/DataSanitizer\";\nexport { TelemetryItemCreator, createTelemetryItem } from \"./TelemetryItemCreator\";\nexport { CtxTagKeys, Extensions } from \"./Interfaces/PartAExtensions\";\nexport { DistributedTracingModes, EventPersistence } from \"./Enums\";\nexport { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from \"./HelperFuncs\";\nexport { isBeaconsSupported as isBeaconApiSupported, createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent, findAllScripts } from \"@microsoft/applicationinsights-core-js\";\nexport { createDomEvent } from \"./DomHelperFuncs\";\nexport { utlDisableStorage, utlEnableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage, utlSetStoragePrefix } from \"./StorageHelperFuncs\";\nexport { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from \"./UrlHelperFuncs\";\nexport { createOfflineListener } from \"./Offline\";\nexport var PropertiesPluginIdentifier = \"AppInsightsPropertiesPlugin\";\nexport var BreezeChannelIdentifier = \"AppInsightsChannelPlugin\";\nexport var AnalyticsPluginIdentifier = \"ApplicationInsightsAnalytics\";\n","/*\n * Application Insights JavaScript SDK - Web Analytics, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nexport var _DYN_TO_STRING = \"toString\"; // Count: 4\nexport var _DYN_IS_STORAGE_USE_DISAB0 = \"isStorageUseDisabled\"; // Count: 3\nexport var _DYN__ADD_HOOK = \"_addHook\"; // Count: 6\nexport var _DYN_CORE = \"core\"; // Count: 7\nexport var _DYN_DATA_TYPE = \"dataType\"; // Count: 8\nexport var _DYN_ENVELOPE_TYPE = \"envelopeType\"; // Count: 7\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 13\nexport var _DYN_TRACK = \"track\"; // Count: 7\nexport var _DYN_TRACK_PAGE_VIEW = \"trackPageView\"; // Count: 4\nexport var _DYN_TRACK_PREVIOUS_PAGE_1 = \"trackPreviousPageVisit\"; // Count: 3\nexport var _DYN_SEND_PAGE_VIEW_INTER2 = \"sendPageViewInternal\"; // Count: 7\nexport var _DYN_START_TIME = \"startTime\"; // Count: 6\nexport var _DYN_PROPERTIES = \"properties\"; // Count: 5\nexport var _DYN_DURATION = \"duration\"; // Count: 12\nexport var _DYN_SEND_PAGE_VIEW_PERFO3 = \"sendPageViewPerformanceInternal\"; // Count: 3\nexport var _DYN_POPULATE_PAGE_VIEW_P4 = \"populatePageViewPerformanceEvent\"; // Count: 3\nexport var _DYN_HREF = \"href\"; // Count: 6\nexport var _DYN_SEND_EXCEPTION_INTER5 = \"sendExceptionInternal\"; // Count: 2\nexport var _DYN_EXCEPTION = \"exception\"; // Count: 3\nexport var _DYN_ERROR = \"error\"; // Count: 5\nexport var _DYN__ONERROR = \"_onerror\"; // Count: 3\nexport var _DYN_ERROR_SRC = \"errorSrc\"; // Count: 3\nexport var _DYN_LINE_NUMBER = \"lineNumber\"; // Count: 5\nexport var _DYN_COLUMN_NUMBER = \"columnNumber\"; // Count: 5\nexport var _DYN_MESSAGE = \"message\"; // Count: 4\nexport var _DYN__CREATE_AUTO_EXCEPTI6 = \"CreateAutoException\"; // Count: 3\nexport var _DYN_ADD_TELEMETRY_INITIA7 = \"addTelemetryInitializer\"; // Count: 4\nexport var _DYN_OVERRIDE_PAGE_VIEW_D8 = \"overridePageViewDuration\"; // Count: 2\nexport var _DYN_AUTO_TRACK_PAGE_VISI9 = \"autoTrackPageVisitTime\"; // Count: 2\nexport var _DYN_IS_BROWSER_LINK_TRAC10 = \"isBrowserLinkTrackingEnabled\"; // Count: 2\nexport var _DYN_LENGTH = \"length\"; // Count: 5\nexport var _DYN_ENABLE_AUTO_ROUTE_TR11 = \"enableAutoRouteTracking\"; // Count: 2\nexport var _DYN_ENABLE_UNHANDLED_PRO12 = \"enableUnhandledPromiseRejectionTracking\"; // Count: 2\nexport var _DYN_AUTO_UNHANDLED_PROMI13 = \"autoUnhandledPromiseInstrumented\"; // Count: 3\nexport var _DYN_GET_ENTRIES_BY_TYPE = \"getEntriesByType\"; // Count: 5\nexport var _DYN_IS_PERFORMANCE_TIMIN14 = \"isPerformanceTimingSupported\"; // Count: 2\nexport var _DYN_GET_PERFORMANCE_TIMI15 = \"getPerformanceTiming\"; // Count: 2\nexport var _DYN_NAVIGATION_START = \"navigationStart\"; // Count: 4\nexport var _DYN_SHOULD_COLLECT_DURAT16 = \"shouldCollectDuration\"; // Count: 3\nexport var _DYN_IS_PERFORMANCE_TIMIN17 = \"isPerformanceTimingDataReady\"; // Count: 2\nexport var _DYN_RESPONSE_START = \"responseStart\"; // Count: 5\nexport var _DYN_REQUEST_START = \"requestStart\"; // Count: 3\nexport var _DYN_LOAD_EVENT_END = \"loadEventEnd\"; // Count: 4\nexport var _DYN_RESPONSE_END = \"responseEnd\"; // Count: 5\nexport var _DYN_CONNECT_END = \"connectEnd\"; // Count: 4\nexport var _DYN_PAGE_VISIT_START_TIM18 = \"pageVisitStartTime\"; // Count: 2\n","/*\n * Application Insights JavaScript SDK - Web Analytics, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { dateTimeUtilsDuration } from \"@microsoft/applicationinsights-common\";\nimport { _throwInternal, arrForEach, dumpObj, getDocument, getExceptionName, getLocation, isNullOrUndefined } from \"@microsoft/applicationinsights-core-js\";\nimport { getPerformance, isUndefined, isWebWorker, scheduleTimeout } from \"@nevware21/ts-utils\";\nimport { _DYN_DURATION, _DYN_GET_ENTRIES_BY_TYPE, _DYN_GET_PERFORMANCE_TIMI15, _DYN_HREF, _DYN_IS_PERFORMANCE_TIMIN14, _DYN_IS_PERFORMANCE_TIMIN17, _DYN_LENGTH, _DYN_NAVIGATION_START, _DYN_POPULATE_PAGE_VIEW_P4, _DYN_PROPERTIES, _DYN_SEND_PAGE_VIEW_INTER2, _DYN_SEND_PAGE_VIEW_PERFO3, _DYN_SHOULD_COLLECT_DURAT16, _DYN_START_TIME, _DYN_TRACK_PAGE_VIEW } from \"../../__DynamicConstants\";\n/**\r\n * Class encapsulates sending page views and page view performance telemetry.\r\n */\nvar PageViewManager = /** @class */function () {\n function PageViewManager(appInsights, overridePageViewDuration, core, pageViewPerformanceManager) {\n dynamicProto(PageViewManager, this, function (_self) {\n var queueTimer = null;\n var itemQueue = [];\n var pageViewPerformanceSent = false;\n var firstPageViewSent = false;\n var _logger;\n if (core) {\n _logger = core.logger;\n }\n function _flushChannels(isAsync) {\n if (core) {\n core.flush(isAsync, function () {\n // Event flushed, callback added to prevent promise creation\n });\n }\n }\n function _startTimer() {\n if (!queueTimer) {\n queueTimer = scheduleTimeout(function () {\n queueTimer = null;\n var allItems = itemQueue.slice(0);\n var doFlush = false;\n itemQueue = [];\n arrForEach(allItems, function (item) {\n if (!item()) {\n // Not processed so rescheduled\n itemQueue.push(item);\n } else {\n doFlush = true;\n }\n });\n if (itemQueue[_DYN_LENGTH /* @min:%2elength */] > 0) {\n _startTimer();\n }\n if (doFlush) {\n // We process at least one item so flush the queue\n _flushChannels(true);\n }\n }, 100);\n }\n }\n function _addQueue(cb) {\n itemQueue.push(cb);\n _startTimer();\n }\n _self[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */] = function (pageView, customProperties) {\n var name = pageView.name;\n if (isNullOrUndefined(name) || typeof name !== \"string\") {\n var doc = getDocument();\n name = pageView.name = doc && doc.title || \"\";\n }\n var uri = pageView.uri;\n if (isNullOrUndefined(uri) || typeof uri !== \"string\") {\n var location_1 = getLocation();\n uri = pageView.uri = location_1 && location_1[_DYN_HREF /* @min:%2ehref */] || \"\";\n }\n if (!firstPageViewSent) {\n var perf = getPerformance();\n // Access the performance timing object\n var navigationEntries = perf && perf[_DYN_GET_ENTRIES_BY_TYPE /* @min:%2egetEntriesByType */] && perf[_DYN_GET_ENTRIES_BY_TYPE /* @min:%2egetEntriesByType */](\"navigation\");\n // Edge Case the navigation Entries may return an empty array and the timeOrigin is not supported on IE\n if (navigationEntries && navigationEntries[0] && !isUndefined(perf.timeOrigin)) {\n // Get the value of loadEventStart\n var loadEventStart = navigationEntries[0].loadEventStart;\n pageView[_DYN_START_TIME /* @min:%2estartTime */] = new Date(perf.timeOrigin + loadEventStart);\n } else {\n // calculate the start time manually\n var duration_1 = (customProperties || pageView[_DYN_PROPERTIES /* @min:%2eproperties */] || {})[_DYN_DURATION /* @min:%2eduration */] || 0;\n pageView[_DYN_START_TIME /* @min:%2estartTime */] = new Date(new Date().getTime() - duration_1);\n }\n firstPageViewSent = true;\n }\n // case 1a. if performance timing is not supported by the browser, send the page view telemetry with the duration provided by the user. If the user\n // do not provide the duration, set duration to undefined\n // Also this is case 4\n if (!pageViewPerformanceManager[_DYN_IS_PERFORMANCE_TIMIN14 /* @min:%2eisPerformanceTimingSupported */]()) {\n appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);\n _flushChannels(true);\n if (!isWebWorker()) {\n // no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 25 /* _eInternalMessageId.NavigationTimingNotSupported */, \"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.\");\n }\n return;\n }\n var pageViewSent = false;\n var customDuration;\n // if the performance timing is supported by the browser, calculate the custom duration\n var start = pageViewPerformanceManager[_DYN_GET_PERFORMANCE_TIMI15 /* @min:%2egetPerformanceTiming */]()[_DYN_NAVIGATION_START /* @min:%2enavigationStart */];\n if (start > 0) {\n customDuration = dateTimeUtilsDuration(start, +new Date());\n if (!pageViewPerformanceManager[_DYN_SHOULD_COLLECT_DURAT16 /* @min:%2eshouldCollectDuration */](customDuration)) {\n customDuration = undefined;\n }\n }\n // if the user has provided duration, send a page view telemetry with the provided duration. Otherwise, if\n // overridePageViewDuration is set to true, send a page view telemetry with the custom duration calculated earlier\n var duration;\n if (!isNullOrUndefined(customProperties) && !isNullOrUndefined(customProperties[_DYN_DURATION /* @min:%2eduration */])) {\n duration = customProperties[_DYN_DURATION /* @min:%2eduration */];\n }\n if (overridePageViewDuration || !isNaN(duration)) {\n if (isNaN(duration)) {\n // case 3\n if (!customProperties) {\n customProperties = {};\n }\n customProperties[_DYN_DURATION /* @min:%2eduration */] = customDuration;\n }\n // case 2\n appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);\n _flushChannels(true);\n pageViewSent = true;\n }\n // now try to send the page view performance telemetry\n var maxDurationLimit = 60000;\n if (!customProperties) {\n customProperties = {};\n }\n // Queue the event for processing\n _addQueue(function () {\n var processed = false;\n try {\n if (pageViewPerformanceManager[_DYN_IS_PERFORMANCE_TIMIN17 /* @min:%2eisPerformanceTimingDataReady */]()) {\n processed = true;\n var pageViewPerformance = {\n name: name,\n uri: uri\n };\n pageViewPerformanceManager[_DYN_POPULATE_PAGE_VIEW_P4 /* @min:%2epopulatePageViewPerformanceEvent */](pageViewPerformance);\n if (!pageViewPerformance.isValid && !pageViewSent) {\n // If navigation timing gives invalid numbers, then go back to \"override page view duration\" mode.\n // That's the best value we can get that makes sense.\n customProperties[_DYN_DURATION /* @min:%2eduration */] = customDuration;\n appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);\n } else {\n if (!pageViewSent) {\n customProperties[_DYN_DURATION /* @min:%2eduration */] = pageViewPerformance.durationMs;\n appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);\n }\n if (!pageViewPerformanceSent) {\n appInsights[_DYN_SEND_PAGE_VIEW_PERFO3 /* @min:%2esendPageViewPerformanceInternal */](pageViewPerformance, customProperties);\n pageViewPerformanceSent = true;\n }\n }\n } else if (start > 0 && dateTimeUtilsDuration(start, +new Date()) > maxDurationLimit) {\n // if performance timings are not ready but we exceeded the maximum duration limit, just log a page view telemetry\n // with the maximum duration limit. Otherwise, keep waiting until performance timings are ready\n processed = true;\n if (!pageViewSent) {\n customProperties[_DYN_DURATION /* @min:%2eduration */] = maxDurationLimit;\n appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);\n }\n }\n } catch (e) {\n _throwInternal(_logger, 1 /* eLoggingSeverity.CRITICAL */, 38 /* _eInternalMessageId.TrackPVFailedCalc */, \"trackPageView failed on page load calculation: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n return processed;\n });\n };\n _self.teardown = function (unloadCtx, unloadState) {\n if (queueTimer) {\n queueTimer.cancel();\n queueTimer = null;\n var allItems = itemQueue.slice(0);\n var doFlush_1 = false;\n itemQueue = [];\n arrForEach(allItems, function (item) {\n if (item()) {\n doFlush_1 = true;\n }\n });\n }\n };\n });\n }\n // Removed Stub for PageViewManager.prototype.trackPageView.\n // Removed Stub for PageViewManager.prototype.teardown.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n PageViewManager.__ieDyn = 1;\n return PageViewManager;\n}();\nexport { PageViewManager };\n","/*\n * Application Insights JavaScript SDK - Web Analytics, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { dateTimeUtilsDuration, msToTimeSpan } from \"@microsoft/applicationinsights-common\";\nimport { _throwInternal, getNavigator, getPerformance, safeGetLogger } from \"@microsoft/applicationinsights-core-js\";\nimport { strIndexOf } from \"@nevware21/ts-utils\";\nimport { _DYN_CONNECT_END, _DYN_DURATION, _DYN_GET_ENTRIES_BY_TYPE, _DYN_GET_PERFORMANCE_TIMI15, _DYN_IS_PERFORMANCE_TIMIN14, _DYN_IS_PERFORMANCE_TIMIN17, _DYN_LENGTH, _DYN_LOAD_EVENT_END, _DYN_NAVIGATION_START, _DYN_POPULATE_PAGE_VIEW_P4, _DYN_REQUEST_START, _DYN_RESPONSE_END, _DYN_RESPONSE_START, _DYN_SHOULD_COLLECT_DURAT16, _DYN_START_TIME } from \"../../__DynamicConstants\";\nvar MAX_DURATION_ALLOWED = 3600000; // 1h\nvar botAgentNames = [\"googlebot\", \"adsbot-google\", \"apis-google\", \"mediapartners-google\"];\nfunction _isPerformanceTimingSupported() {\n var perf = getPerformance();\n return perf && !!perf.timing;\n}\nfunction _isPerformanceNavigationTimingSupported() {\n var perf = getPerformance();\n return perf && perf.getEntriesByType && perf.getEntriesByType(\"navigation\")[_DYN_LENGTH /* @min:%2elength */] > 0;\n}\nfunction _isPerformanceTimingDataReady() {\n var perf = getPerformance();\n var timing = perf ? perf.timing : 0;\n return timing && timing.domainLookupStart > 0 && timing[_DYN_NAVIGATION_START /* @min:%2enavigationStart */] > 0 && timing[_DYN_RESPONSE_START /* @min:%2eresponseStart */] > 0 && timing[_DYN_REQUEST_START /* @min:%2erequestStart */] > 0 && timing[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */] > 0 && timing[_DYN_RESPONSE_END /* @min:%2eresponseEnd */] > 0 && timing[_DYN_CONNECT_END /* @min:%2econnectEnd */] > 0 && timing.domLoading > 0;\n}\nfunction _getPerformanceTiming() {\n if (_isPerformanceTimingSupported()) {\n return getPerformance().timing;\n }\n return null;\n}\nfunction _getPerformanceNavigationTiming() {\n if (_isPerformanceNavigationTimingSupported()) {\n return getPerformance()[_DYN_GET_ENTRIES_BY_TYPE /* @min:%2egetEntriesByType */](\"navigation\")[0];\n }\n return null;\n}\n/**\r\n* This method tells if given durations should be excluded from collection.\r\n*/\nfunction _shouldCollectDuration() {\n var durations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n durations[_i] = arguments[_i];\n }\n var _navigator = getNavigator() || {};\n // a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en\n var userAgent = _navigator.userAgent;\n var isGoogleBot = false;\n if (userAgent) {\n for (var i = 0; i < botAgentNames[_DYN_LENGTH /* @min:%2elength */]; i++) {\n isGoogleBot = isGoogleBot || strIndexOf(userAgent.toLowerCase(), botAgentNames[i]) !== -1;\n }\n }\n if (isGoogleBot) {\n // Don't report durations for GoogleBot, it is returning invalid values in performance.timing API.\n return false;\n } else {\n // for other page views, don't report if it's outside of a reasonable range\n for (var i = 0; i < durations[_DYN_LENGTH /* @min:%2elength */]; i++) {\n if (durations[i] < 0 || durations[i] >= MAX_DURATION_ALLOWED) {\n return false;\n }\n }\n }\n return true;\n}\n/**\r\n * Class encapsulates sending page view performance telemetry.\r\n */\nvar PageViewPerformanceManager = /** @class */function () {\n function PageViewPerformanceManager(core) {\n var _logger = safeGetLogger(core);\n dynamicProto(PageViewPerformanceManager, this, function (_self) {\n _self[_DYN_POPULATE_PAGE_VIEW_P4 /* @min:%2epopulatePageViewPerformanceEvent */] = function (pageViewPerformance) {\n pageViewPerformance.isValid = false;\n /*\r\n * http://www.w3.org/TR/navigation-timing/#processing-model\r\n * |-navigationStart\r\n * | |-connectEnd\r\n * | ||-requestStart\r\n * | || |-responseStart\r\n * | || | |-responseEnd\r\n * | || | |\r\n * | || | | |-loadEventEnd\r\n * |---network---||---request---|---response---|---dom---|\r\n * |--------------------------total----------------------|\r\n *\r\n * total = The difference between the load event of the current document is completed and the first recorded timestamp of the performance entry : https://developer.mozilla.org/en-US/docs/Web/Performance/Navigation_and_resource_timings#duration\r\n * network = Redirect time + App Cache + DNS lookup time + TCP connection time\r\n * request = Request time : https://developer.mozilla.org/en-US/docs/Web/Performance/Navigation_and_resource_timings#request_time\r\n * response = Response time\r\n * dom = Document load time : https://html.spec.whatwg.org/multipage/dom.html#document-load-timing-info\r\n * = Document processing time : https://developers.google.com/web/fundamentals/performance/navigation-and-resource-timing/#document_processing\r\n * + Loading time : https://developers.google.com/web/fundamentals/performance/navigation-and-resource-timing/#loading\r\n */\n var navigationTiming = _getPerformanceNavigationTiming();\n var timing = _getPerformanceTiming();\n var total = 0;\n var network = 0;\n var request = 0;\n var response = 0;\n var dom = 0;\n if (navigationTiming || timing) {\n if (navigationTiming) {\n total = navigationTiming[_DYN_DURATION /* @min:%2eduration */];\n /**\r\n * support both cases:\r\n * - startTime is always zero: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming\r\n * - for older browsers where the startTime is not zero\r\n */\n network = navigationTiming[_DYN_START_TIME /* @min:%2estartTime */] === 0 ? navigationTiming[_DYN_CONNECT_END /* @min:%2econnectEnd */] : dateTimeUtilsDuration(navigationTiming[_DYN_START_TIME /* @min:%2estartTime */], navigationTiming[_DYN_CONNECT_END /* @min:%2econnectEnd */]);\n request = dateTimeUtilsDuration(navigationTiming.requestStart, navigationTiming[_DYN_RESPONSE_START /* @min:%2eresponseStart */]);\n response = dateTimeUtilsDuration(navigationTiming[_DYN_RESPONSE_START /* @min:%2eresponseStart */], navigationTiming[_DYN_RESPONSE_END /* @min:%2eresponseEnd */]);\n dom = dateTimeUtilsDuration(navigationTiming.responseEnd, navigationTiming[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */]);\n } else {\n total = dateTimeUtilsDuration(timing[_DYN_NAVIGATION_START /* @min:%2enavigationStart */], timing[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */]);\n network = dateTimeUtilsDuration(timing[_DYN_NAVIGATION_START /* @min:%2enavigationStart */], timing[_DYN_CONNECT_END /* @min:%2econnectEnd */]);\n request = dateTimeUtilsDuration(timing.requestStart, timing[_DYN_RESPONSE_START /* @min:%2eresponseStart */]);\n response = dateTimeUtilsDuration(timing[_DYN_RESPONSE_START /* @min:%2eresponseStart */], timing[_DYN_RESPONSE_END /* @min:%2eresponseEnd */]);\n dom = dateTimeUtilsDuration(timing.responseEnd, timing[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */]);\n }\n if (total === 0) {\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 10 /* _eInternalMessageId.ErrorPVCalc */, \"error calculating page view performance.\", {\n total: total,\n network: network,\n request: request,\n response: response,\n dom: dom\n });\n } else if (!_self[_DYN_SHOULD_COLLECT_DURAT16 /* @min:%2eshouldCollectDuration */](total, network, request, response, dom)) {\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 45 /* _eInternalMessageId.InvalidDurationValue */, \"Invalid page load duration value. Browser perf data won't be sent.\", {\n total: total,\n network: network,\n request: request,\n response: response,\n dom: dom\n });\n } else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {\n // some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT\n // in this case, don't report client performance from this page\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 8 /* _eInternalMessageId.ClientPerformanceMathError */, \"client performance math error.\", {\n total: total,\n network: network,\n request: request,\n response: response,\n dom: dom\n });\n } else {\n pageViewPerformance.durationMs = total;\n // // convert to timespans\n pageViewPerformance.perfTotal = pageViewPerformance[_DYN_DURATION /* @min:%2eduration */] = msToTimeSpan(total);\n pageViewPerformance.networkConnect = msToTimeSpan(network);\n pageViewPerformance.sentRequest = msToTimeSpan(request);\n pageViewPerformance.receivedResponse = msToTimeSpan(response);\n pageViewPerformance.domProcessing = msToTimeSpan(dom);\n pageViewPerformance.isValid = true;\n }\n }\n };\n _self[_DYN_GET_PERFORMANCE_TIMI15 /* @min:%2egetPerformanceTiming */] = _getPerformanceTiming;\n _self[_DYN_IS_PERFORMANCE_TIMIN14 /* @min:%2eisPerformanceTimingSupported */] = _isPerformanceTimingSupported;\n _self[_DYN_IS_PERFORMANCE_TIMIN17 /* @min:%2eisPerformanceTimingDataReady */] = _isPerformanceTimingDataReady;\n _self[_DYN_SHOULD_COLLECT_DURAT16 /* @min:%2eshouldCollectDuration */] = _shouldCollectDuration;\n });\n }\n // Removed Stub for PageViewPerformanceManager.prototype.populatePageViewPerformanceEvent.\n // Removed Stub for PageViewPerformanceManager.prototype.getPerformanceTiming.\n // Removed Stub for PageViewPerformanceManager.prototype.isPerformanceTimingSupported.\n // Removed Stub for PageViewPerformanceManager.prototype.isPerformanceTimingDataReady.\n // Removed Stub for PageViewPerformanceManager.prototype.shouldCollectDuration.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n PageViewPerformanceManager.__ieDyn = 1;\n return PageViewPerformanceManager;\n}();\nexport { PageViewPerformanceManager };\n","/*\n * Application Insights JavaScript SDK - Web Analytics, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { utlCanUseSessionStorage, utlGetSessionStorage, utlRemoveSessionStorage, utlSetSessionStorage } from \"@microsoft/applicationinsights-common\";\nimport { _warnToConsole, dateNow, dumpObj, getJSON, hasJSON, throwError } from \"@microsoft/applicationinsights-core-js\";\nimport { objDefine } from \"@nevware21/ts-utils\";\nimport { _DYN_PAGE_VISIT_START_TIM18, _DYN_TRACK_PREVIOUS_PAGE_1 } from \"../../__DynamicConstants\";\n/**\r\n * Used to track page visit durations\r\n */\nvar PageVisitTimeManager = /** @class */function () {\n /**\r\n * Creates a new instance of PageVisitTimeManager\r\n * @param pageVisitTimeTrackingHandler - Delegate that will be called to send telemetry data to AI (when trackPreviousPageVisit is called)\r\n * @returns {}\r\n */\n function PageVisitTimeManager(logger, pageVisitTimeTrackingHandler) {\n var prevPageVisitDataKeyName = \"prevPageVisitData\";\n dynamicProto(PageVisitTimeManager, this, function (_self) {\n _self[_DYN_TRACK_PREVIOUS_PAGE_1 /* @min:%2etrackPreviousPageVisit */] = function (currentPageName, currentPageUrl) {\n try {\n // Restart timer for new page view\n var prevPageVisitTimeData = restartPageVisitTimer(currentPageName, currentPageUrl);\n // If there was a page already being timed, track the visit time for it now.\n if (prevPageVisitTimeData) {\n pageVisitTimeTrackingHandler(prevPageVisitTimeData.pageName, prevPageVisitTimeData.pageUrl, prevPageVisitTimeData.pageVisitTime);\n }\n } catch (e) {\n _warnToConsole(logger, \"Auto track page visit time failed, metric will not be collected: \" + dumpObj(e));\n }\n };\n /**\r\n * Stops timing of current page (if exists) and starts timing for duration of visit to pageName\r\n * @param pageName - Name of page to begin timing visit duration\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from last call to start or restart, if exists. Null if not.\r\n */\n function restartPageVisitTimer(pageName, pageUrl) {\n var prevPageVisitData = null;\n try {\n prevPageVisitData = stopPageVisitTimer();\n if (utlCanUseSessionStorage()) {\n if (utlGetSessionStorage(logger, prevPageVisitDataKeyName) != null) {\n throwError(\"Cannot call startPageVisit consecutively without first calling stopPageVisit\");\n }\n var currPageVisitDataStr = getJSON().stringify(new PageVisitData(pageName, pageUrl));\n utlSetSessionStorage(logger, prevPageVisitDataKeyName, currPageVisitDataStr);\n }\n } catch (e) {\n _warnToConsole(logger, \"Call to restart failed: \" + dumpObj(e));\n prevPageVisitData = null;\n }\n return prevPageVisitData;\n }\n /**\r\n * Stops timing of current page, if exists.\r\n * @returns {PageVisitData} Page visit data (including duration) of pageName from call to start, if exists. Null if not.\r\n */\n function stopPageVisitTimer() {\n var prevPageVisitData = null;\n try {\n if (utlCanUseSessionStorage()) {\n // Define end time of page's visit\n var pageVisitEndTime = dateNow();\n // Try to retrieve page name and start time from session storage\n var pageVisitDataJsonStr = utlGetSessionStorage(logger, prevPageVisitDataKeyName);\n if (pageVisitDataJsonStr && hasJSON()) {\n // if previous page data exists, set end time of visit\n prevPageVisitData = getJSON().parse(pageVisitDataJsonStr);\n prevPageVisitData.pageVisitTime = pageVisitEndTime - prevPageVisitData[_DYN_PAGE_VISIT_START_TIM18 /* @min:%2epageVisitStartTime */];\n // Remove data from storage since we already used it\n utlRemoveSessionStorage(logger, prevPageVisitDataKeyName);\n }\n }\n } catch (e) {\n _warnToConsole(logger, \"Stop page visit timer failed: \" + dumpObj(e));\n prevPageVisitData = null;\n }\n return prevPageVisitData;\n }\n // For backward compatibility\n objDefine(_self, \"_logger\", {\n g: function () {\n return logger;\n }\n });\n objDefine(_self, \"pageVisitTimeTrackingHandler\", {\n g: function () {\n return pageVisitTimeTrackingHandler;\n }\n });\n });\n }\n // Removed Stub for PageVisitTimeManager.prototype.trackPreviousPageVisit.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n PageVisitTimeManager.__ieDyn = 1;\n return PageVisitTimeManager;\n}();\nexport { PageVisitTimeManager };\nvar PageVisitData = /** @class */function () {\n function PageVisitData(pageName, pageUrl) {\n this[_DYN_PAGE_VISIT_START_TIM18 /* @min:%2epageVisitStartTime */] = dateNow();\n this.pageName = pageName;\n this.pageUrl = pageUrl;\n }\n return PageVisitData;\n}();\nexport { PageVisitData };\n","/*\n * Application Insights JavaScript SDK - Web Analytics, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { dateTimeUtilsDuration } from \"@microsoft/applicationinsights-common\";\nimport { _throwInternal } from \"@microsoft/applicationinsights-core-js\";\n/**\r\n * Used to record timed events and page views.\r\n */\nvar Timing = /** @class */function () {\n function Timing(logger, name) {\n var _self = this;\n var _events = {};\n _self.start = function (name) {\n if (typeof _events[name] !== \"undefined\") {\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 62 /* _eInternalMessageId.StartCalledMoreThanOnce */, \"start was called more than once for this event without calling stop.\", {\n name: name,\n key: name\n }, true);\n }\n _events[name] = +new Date();\n };\n _self.stop = function (name, url, properties, measurements) {\n var start = _events[name];\n if (isNaN(start)) {\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 63 /* _eInternalMessageId.StopCalledWithoutStart */, \"stop was called without a corresponding start.\", {\n name: name,\n key: name\n }, true);\n } else {\n var end = +new Date();\n var duration = dateTimeUtilsDuration(start, end);\n _self.action(name, url, duration, properties, measurements);\n }\n delete _events[name];\n _events[name] = undefined;\n };\n }\n return Timing;\n}();\nexport { Timing };\n","/*\n * Application Insights JavaScript SDK - Web Analytics, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n/**\r\n* ApplicationInsights.ts\r\n* @copyright Microsoft 2018\r\n*/\nvar _a;\nimport { __assignFn as __assign, __extendsFn as __extends } from \"@microsoft/applicationinsights-shims\";\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { AnalyticsPluginIdentifier, Event as EventTelemetry, Exception, Metric, PageView, PageViewPerformance, PropertiesPluginIdentifier, RemoteDependencyData, Trace, createDistributedTraceContextFromTrace, createDomEvent, createTelemetryItem, dataSanitizeString, isCrossOriginError, strNotSpecified, utlDisableStorage, utlEnableStorage, utlSetStoragePrefix } from \"@microsoft/applicationinsights-common\";\nimport { BaseTelemetryPlugin, InstrumentEvent, arrForEach, cfgDfBoolean, cfgDfMerge, cfgDfSet, cfgDfString, cfgDfValidate, createProcessTelemetryContext, createUniqueNamespace, dumpObj, eventOff, eventOn, findAllScripts, generateW3CId, getDocument, getExceptionName, getHistory, getLocation, getWindow, hasHistory, hasWindow, isFunction, isNullOrUndefined, isString, isUndefined, mergeEvtNamespace, onConfigChange, safeGetCookieMgr, strUndefined, throwError } from \"@microsoft/applicationinsights-core-js\";\nimport { isArray, isError, objDeepFreeze, objDefine, scheduleTimeout, strIndexOf } from \"@nevware21/ts-utils\";\nimport { _DYN_ADD_TELEMETRY_INITIA7, _DYN_AUTO_TRACK_PAGE_VISI9, _DYN_AUTO_UNHANDLED_PROMI13, _DYN_COLUMN_NUMBER, _DYN_CORE, _DYN_DATA_TYPE, _DYN_DIAG_LOG, _DYN_DURATION, _DYN_ENABLE_AUTO_ROUTE_TR11, _DYN_ENABLE_UNHANDLED_PRO12, _DYN_ENVELOPE_TYPE, _DYN_ERROR, _DYN_ERROR_SRC, _DYN_EXCEPTION, _DYN_HREF, _DYN_IS_BROWSER_LINK_TRAC10, _DYN_IS_STORAGE_USE_DISAB0, _DYN_LENGTH, _DYN_LINE_NUMBER, _DYN_MESSAGE, _DYN_OVERRIDE_PAGE_VIEW_D8, _DYN_POPULATE_PAGE_VIEW_P4, _DYN_PROPERTIES, _DYN_SEND_EXCEPTION_INTER5, _DYN_SEND_PAGE_VIEW_INTER2, _DYN_SEND_PAGE_VIEW_PERFO3, _DYN_START_TIME, _DYN_TO_STRING, _DYN_TRACK, _DYN_TRACK_PAGE_VIEW, _DYN_TRACK_PREVIOUS_PAGE_1, _DYN__ADD_HOOK, _DYN__CREATE_AUTO_EXCEPTI6, _DYN__ONERROR } from \"../__DynamicConstants\";\nimport { PageViewManager } from \"./Telemetry/PageViewManager\";\nimport { PageViewPerformanceManager } from \"./Telemetry/PageViewPerformanceManager\";\nimport { PageVisitTimeManager } from \"./Telemetry/PageVisitTimeManager\";\nimport { Timing } from \"./Timing\";\nvar strEvent = \"event\";\nfunction _dispatchEvent(target, evnt) {\n if (target && target.dispatchEvent && evnt) {\n target.dispatchEvent(evnt);\n }\n}\nfunction _getReason(error) {\n if (error && error.reason) {\n var reason = error.reason;\n if (!isString(reason) && isFunction(reason[_DYN_TO_STRING /* @min:%2etoString */])) {\n return reason[_DYN_TO_STRING /* @min:%2etoString */]();\n }\n return dumpObj(reason);\n }\n // Pass the original object down which will eventually get evaluated for any message or description\n return error || \"\";\n}\nvar MinMilliSeconds = 60000;\nvar defaultValues = objDeepFreeze((_a = {\n sessionRenewalMs: cfgDfSet(_chkConfigMilliseconds, 30 * 60 * 1000),\n sessionExpirationMs: cfgDfSet(_chkConfigMilliseconds, 24 * 60 * 60 * 1000),\n disableExceptionTracking: cfgDfBoolean()\n}, _a[_DYN_AUTO_TRACK_PAGE_VISI9 /* @min:autoTrackPageVisitTime */] = cfgDfBoolean(), _a[_DYN_OVERRIDE_PAGE_VIEW_D8 /* @min:overridePageViewDuration */] = cfgDfBoolean(), _a[_DYN_ENABLE_UNHANDLED_PRO12 /* @min:enableUnhandledPromiseRejectionTracking */] = cfgDfBoolean(), _a[_DYN_AUTO_UNHANDLED_PROMI13 /* @min:autoUnhandledPromiseInstrumented */] = false, _a.samplingPercentage = cfgDfValidate(_chkSampling, 100), _a[_DYN_IS_STORAGE_USE_DISAB0 /* @min:isStorageUseDisabled */] = cfgDfBoolean(), _a[_DYN_IS_BROWSER_LINK_TRAC10 /* @min:isBrowserLinkTrackingEnabled */] = cfgDfBoolean(), _a[_DYN_ENABLE_AUTO_ROUTE_TR11 /* @min:enableAutoRouteTracking */] = cfgDfBoolean(), _a.namePrefix = cfgDfString(), _a.enableDebug = cfgDfBoolean(), _a.disableFlushOnBeforeUnload = cfgDfBoolean(), _a.disableFlushOnUnload = cfgDfBoolean(false, \"disableFlushOnBeforeUnload\"), _a.expCfg = cfgDfMerge({\n inclScripts: false,\n expLog: undefined,\n maxLogs: 50\n}), _a));\nfunction _chkConfigMilliseconds(value, defValue) {\n value = value || defValue;\n if (value < MinMilliSeconds) {\n value = MinMilliSeconds;\n }\n return +value;\n}\nfunction _chkSampling(value) {\n return !isNaN(value) && value > 0 && value <= 100;\n}\nfunction _updateStorageUsage(extConfig) {\n // Not resetting the storage usage as someone may have manually called utlDisableStorage, so this will only\n // reset based if the configuration option is provided\n if (!isUndefined(extConfig[_DYN_IS_STORAGE_USE_DISAB0 /* @min:%2eisStorageUseDisabled */])) {\n if (extConfig[_DYN_IS_STORAGE_USE_DISAB0 /* @min:%2eisStorageUseDisabled */]) {\n utlDisableStorage();\n } else {\n utlEnableStorage();\n }\n }\n}\nvar AnalyticsPlugin = /** @class */function (_super) {\n __extends(AnalyticsPlugin, _super);\n function AnalyticsPlugin() {\n var _this = _super.call(this) || this;\n _this.identifier = AnalyticsPluginIdentifier; // do not change name or priority\n _this.priority = 180; // take from reserved priority range 100- 200\n _this.autoRoutePVDelay = 500; // ms; Time to wait after a route change before triggering a pageview to allow DOM changes to take place\n var _eventTracking;\n var _pageTracking;\n var _pageViewManager;\n var _pageViewPerformanceManager;\n var _pageVisitTimeManager;\n var _preInitTelemetryInitializers;\n var _isBrowserLinkTrackingEnabled;\n var _browserLinkInitializerAdded;\n var _enableAutoRouteTracking;\n var _historyListenerAdded;\n var _disableExceptionTracking;\n var _autoExceptionInstrumented;\n var _enableUnhandledPromiseRejectionTracking;\n var _autoUnhandledPromiseInstrumented;\n var _extConfig;\n var _autoTrackPageVisitTime;\n var _expCfg;\n // Counts number of trackAjax invocations.\n // By default we only monitor X ajax call per view to avoid too much load.\n // Default value is set in config.\n // This counter keeps increasing even after the limit is reached.\n var _trackAjaxAttempts = 0;\n // array with max length of 2 that store current url and previous url for SPA page route change trackPageview use.\n var _prevUri; // Assigned in the constructor\n var _currUri;\n var _evtNamespace;\n dynamicProto(AnalyticsPlugin, _this, function (_self, _base) {\n var _addHook = _base[_DYN__ADD_HOOK /* @min:%2e_addHook */];\n _initDefaults();\n _self.getCookieMgr = function () {\n return safeGetCookieMgr(_self[_DYN_CORE /* @min:%2ecore */]);\n };\n _self.processTelemetry = function (env, itemCtx) {\n _self.processNext(env, itemCtx);\n };\n _self.trackEvent = function (event, customProperties) {\n try {\n var telemetryItem = createTelemetryItem(event, EventTelemetry[_DYN_DATA_TYPE /* @min:%2edataType */], EventTelemetry[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\n } catch (e) {\n _throwInternal(2 /* eLoggingSeverity.WARNING */, 39 /* _eInternalMessageId.TrackTraceFailed */, \"trackTrace failed, trace will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n };\n /**\r\n * Start timing an extended event. Call `stopTrackEvent` to log the event when it ends.\r\n * @param name A string that identifies this event uniquely within the document.\r\n */\n _self.startTrackEvent = function (name) {\n try {\n _eventTracking.start(name);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 29 /* _eInternalMessageId.StartTrackEventFailed */, \"startTrackEvent failed, event will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n };\n /**\r\n * Log an extended event that you started timing with `startTrackEvent`.\r\n * @param name The string you used to identify this event in `startTrackEvent`.\r\n * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\n _self.stopTrackEvent = function (name, properties, measurements) {\n try {\n _eventTracking.stop(name, undefined, properties, measurements);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 30 /* _eInternalMessageId.StopTrackEventFailed */, \"stopTrackEvent failed, event will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n };\n /**\r\n * @description Log a diagnostic message\r\n * @param trace\r\n * @param ICustomProperties.\r\n * @memberof ApplicationInsights\r\n */\n _self.trackTrace = function (trace, customProperties) {\n try {\n var telemetryItem = createTelemetryItem(trace, Trace[_DYN_DATA_TYPE /* @min:%2edataType */], Trace[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\n } catch (e) {\n _throwInternal(2 /* eLoggingSeverity.WARNING */, 39 /* _eInternalMessageId.TrackTraceFailed */, \"trackTrace failed, trace will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n };\n /**\r\n * @description Log a numeric value that is not associated with a specific event. Typically\r\n * used to send regular reports of performance indicators. To send single measurement, just\r\n * use the name and average fields of {@link IMetricTelemetry}. If you take measurements\r\n * frequently, you can reduce the telemetry bandwidth by aggregating multiple measurements\r\n * and sending the resulting average at intervals\r\n * @param metric - input object argument. Only name and average are mandatory.\r\n * @param } customProperties additional data used to filter metrics in the\r\n * portal. Defaults to empty.\r\n * @memberof ApplicationInsights\r\n */\n _self.trackMetric = function (metric, customProperties) {\n try {\n var telemetryItem = createTelemetryItem(metric, Metric[_DYN_DATA_TYPE /* @min:%2edataType */], Metric[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 36 /* _eInternalMessageId.TrackMetricFailed */, \"trackMetric failed, metric will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n };\n /**\r\n * Logs that a page or other item was viewed.\r\n * @param IPageViewTelemetry - The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param customProperties - Additional data used to filter events and metrics. Defaults to empty.\r\n * If a user wants to provide duration for pageLoad, it'll have to be in pageView.properties.duration\r\n */\n _self[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */] = function (pageView, customProperties) {\n try {\n var inPv = pageView || {};\n _pageViewManager[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */](inPv, __assign(__assign(__assign({}, inPv.properties), inPv.measurements), customProperties));\n if (_autoTrackPageVisitTime) {\n _pageVisitTimeManager[_DYN_TRACK_PREVIOUS_PAGE_1 /* @min:%2etrackPreviousPageVisit */](inPv.name, inPv.uri);\n }\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 37 /* _eInternalMessageId.TrackPVFailed */, \"trackPageView failed, page view will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n };\n /**\r\n * Create a page view telemetry item and send it to the SDK pipeline through the core.track API\r\n * @param pageView - Page view item to be sent\r\n * @param properties - Custom properties (Part C) that a user can add to the telemetry item\r\n * @param systemProperties - System level properties (Part A) that a user can add to the telemetry item\r\n */\n _self[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */] = function (pageView, properties, systemProperties) {\n var doc = getDocument();\n if (doc) {\n pageView.refUri = pageView.refUri === undefined ? doc.referrer : pageView.refUri;\n }\n if (isNullOrUndefined(pageView[_DYN_START_TIME /* @min:%2estartTime */])) {\n // calculate the start time manually\n var duration = (properties || pageView[_DYN_PROPERTIES /* @min:%2eproperties */] || {})[_DYN_DURATION /* @min:%2eduration */] || 0;\n pageView[_DYN_START_TIME /* @min:%2estartTime */] = new Date(new Date().getTime() - duration);\n }\n var telemetryItem = createTelemetryItem(pageView, PageView[_DYN_DATA_TYPE /* @min:%2edataType */], PageView[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties, systemProperties);\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\n // reset ajaxes counter\n _trackAjaxAttempts = 0;\n };\n /**\r\n * @ignore INTERNAL ONLY\r\n * @param pageViewPerformance\r\n * @param properties\r\n */\n _self[_DYN_SEND_PAGE_VIEW_PERFO3 /* @min:%2esendPageViewPerformanceInternal */] = function (pageViewPerformance, properties, systemProperties) {\n var telemetryItem = createTelemetryItem(pageViewPerformance, PageViewPerformance[_DYN_DATA_TYPE /* @min:%2edataType */], PageViewPerformance[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties, systemProperties);\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\n };\n /**\r\n * Send browser performance metrics.\r\n * @param pageViewPerformance\r\n * @param customProperties\r\n */\n _self.trackPageViewPerformance = function (pageViewPerformance, customProperties) {\n var inPvp = pageViewPerformance || {};\n try {\n _pageViewPerformanceManager[_DYN_POPULATE_PAGE_VIEW_P4 /* @min:%2epopulatePageViewPerformanceEvent */](inPvp);\n _self[_DYN_SEND_PAGE_VIEW_PERFO3 /* @min:%2esendPageViewPerformanceInternal */](inPvp, customProperties);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 37 /* _eInternalMessageId.TrackPVFailed */, \"trackPageViewPerformance failed, page view will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n };\n /**\r\n * Starts the timer for tracking a page load time. Use this instead of `trackPageView` if you want to control when the page view timer starts and stops,\r\n * but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call `stopTrackPage` to log the end of the page view\r\n * and send the event.\r\n * @param name - A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\n _self.startTrackPage = function (name) {\n try {\n if (typeof name !== \"string\") {\n var doc = getDocument();\n name = doc && doc.title || \"\";\n }\n _pageTracking.start(name);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 31 /* _eInternalMessageId.StartTrackFailed */, \"startTrackPage failed, page view may not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n };\n /**\r\n * Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements.\r\n * The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`.\r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.\r\n */\n _self.stopTrackPage = function (name, url, properties, measurement) {\n try {\n if (typeof name !== \"string\") {\n var doc = getDocument();\n name = doc && doc.title || \"\";\n }\n if (typeof url !== \"string\") {\n var loc = getLocation();\n url = loc && loc[_DYN_HREF /* @min:%2ehref */] || \"\";\n }\n _pageTracking.stop(name, url, properties, measurement);\n if (_autoTrackPageVisitTime) {\n _pageVisitTimeManager[_DYN_TRACK_PREVIOUS_PAGE_1 /* @min:%2etrackPreviousPageVisit */](name, url);\n }\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 32 /* _eInternalMessageId.StopTrackFailed */, \"stopTrackPage failed, page view will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n };\n /**\r\n * @ignore INTERNAL ONLY\r\n * @param exception\r\n * @param properties\r\n * @param systemProperties\r\n */\n _self[_DYN_SEND_EXCEPTION_INTER5 /* @min:%2esendExceptionInternal */] = function (exception, customProperties, systemProperties) {\n // Adding additional edge cases to handle\n // - Not passing anything (null / undefined)\n var theError = exception && (exception[_DYN_EXCEPTION /* @min:%2eexception */] || exception[_DYN_ERROR /* @min:%2eerror */]) ||\n // - Handle someone calling trackException based of v1 API where the exception was the Error\n isError(exception) && exception ||\n // - Handles no error being defined and instead of creating a new Error() instance attempt to map so any stacktrace\n // is preserved and does not list ApplicationInsights code as the source\n {\n name: exception && typeof exception,\n message: exception || strNotSpecified\n };\n // If no exception object was passed assign to an empty object to avoid internal exceptions\n exception = exception || {};\n var exceptionPartB = new Exception(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), theError, exception[_DYN_PROPERTIES /* @min:%2eproperties */] || customProperties, exception.measurements, exception.severityLevel, exception.id).toInterface();\n var doc = getDocument();\n if (doc && (_expCfg === null || _expCfg === void 0 ? void 0 : _expCfg.inclScripts)) {\n var scriptsInfo = findAllScripts(doc);\n exceptionPartB[_DYN_PROPERTIES /* @min:%2eproperties */][\"exceptionScripts\"] = JSON.stringify(scriptsInfo);\n }\n if (_expCfg === null || _expCfg === void 0 ? void 0 : _expCfg.expLog) {\n var logs = _expCfg.expLog();\n if (logs && logs.logs && isArray(logs.logs)) {\n exceptionPartB[_DYN_PROPERTIES /* @min:%2eproperties */][\"exceptionLog\"] = logs.logs.slice(0, _expCfg.maxLogs).join(\"\\n\");\n }\n }\n var telemetryItem = createTelemetryItem(exceptionPartB, Exception[_DYN_DATA_TYPE /* @min:%2edataType */], Exception[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties, systemProperties);\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\n };\n /**\r\n * Log an exception you have caught.\r\n *\r\n * @param exception - Object which contains exception to be sent\r\n * @param } customProperties Additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n *\r\n * Any property of type double will be considered a measurement, and will be treated by Application Insights as a metric.\r\n * @memberof ApplicationInsights\r\n */\n _self.trackException = function (exception, customProperties) {\n if (exception && !exception[_DYN_EXCEPTION /* @min:%2eexception */] && exception[_DYN_ERROR /* @min:%2eerror */]) {\n exception[_DYN_EXCEPTION /* @min:%2eexception */] = exception[_DYN_ERROR /* @min:%2eerror */];\n }\n try {\n _self[_DYN_SEND_EXCEPTION_INTER5 /* @min:%2esendExceptionInternal */](exception, customProperties);\n } catch (e) {\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 35 /* _eInternalMessageId.TrackExceptionFailed */, \"trackException failed, exception will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n };\n /**\r\n * @description Custom error handler for Application Insights Analytics\r\n * @param exception\r\n * @memberof ApplicationInsights\r\n */\n _self[_DYN__ONERROR /* @min:%2e_onerror */] = function (exception) {\n var error = exception && exception[_DYN_ERROR /* @min:%2eerror */];\n var evt = exception && exception.evt;\n try {\n if (!evt) {\n var _window = getWindow();\n if (_window) {\n evt = _window[strEvent];\n }\n }\n var url = exception && exception.url || (getDocument() || {}).URL;\n // If no error source is provided assume the default window.onerror handler\n var errorSrc = exception[_DYN_ERROR_SRC /* @min:%2eerrorSrc */] || \"window.onerror@\" + url + \":\" + (exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0) + \":\" + (exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0);\n var properties = {\n errorSrc: errorSrc,\n url: url,\n lineNumber: exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0,\n columnNumber: exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0,\n message: exception[_DYN_MESSAGE /* @min:%2emessage */]\n };\n if (isCrossOriginError(exception.message, exception.url, exception.lineNumber, exception.columnNumber, exception[_DYN_ERROR /* @min:%2eerror */])) {\n _sendCORSException(Exception[_DYN__CREATE_AUTO_EXCEPTI6 /* @min:%2eCreateAutoException */](\"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.\", url, exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0, exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0, error, evt, null, errorSrc), properties);\n } else {\n if (!exception[_DYN_ERROR_SRC /* @min:%2eerrorSrc */]) {\n exception[_DYN_ERROR_SRC /* @min:%2eerrorSrc */] = errorSrc;\n }\n _self.trackException({\n exception: exception,\n severityLevel: 3 /* eSeverityLevel.Error */\n }, properties);\n }\n } catch (e) {\n var errorString = error ? error.name + \", \" + error[_DYN_MESSAGE /* @min:%2emessage */] : \"null\";\n _throwInternal(1 /* eLoggingSeverity.CRITICAL */, 11 /* _eInternalMessageId.ExceptionWhileLoggingError */, \"_onError threw exception while logging error, error will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e),\n errorString: errorString\n });\n }\n };\n _self[_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */] = function (telemetryInitializer) {\n if (_self[_DYN_CORE /* @min:%2ecore */]) {\n // Just add to the core\n return _self[_DYN_CORE /* @min:%2ecore */][_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */](telemetryInitializer);\n }\n // Handle \"pre-initialization\" telemetry initializers (for backward compatibility)\n if (!_preInitTelemetryInitializers) {\n _preInitTelemetryInitializers = [];\n }\n _preInitTelemetryInitializers.push(telemetryInitializer);\n };\n _self.initialize = function (config, core, extensions, pluginChain) {\n if (_self.isInitialized()) {\n return;\n }\n if (isNullOrUndefined(core)) {\n throwError(\"Error initializing\");\n }\n _base.initialize(config, core, extensions, pluginChain);\n try {\n _evtNamespace = mergeEvtNamespace(createUniqueNamespace(_self.identifier), core.evtNamespace && core.evtNamespace());\n if (_preInitTelemetryInitializers) {\n arrForEach(_preInitTelemetryInitializers, function (initializer) {\n core[_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */](initializer);\n });\n _preInitTelemetryInitializers = null;\n }\n _populateDefaults(config);\n _pageViewPerformanceManager = new PageViewPerformanceManager(_self[_DYN_CORE /* @min:%2ecore */]);\n _pageViewManager = new PageViewManager(_self, _extConfig.overridePageViewDuration, _self[_DYN_CORE /* @min:%2ecore */], _pageViewPerformanceManager);\n _pageVisitTimeManager = new PageVisitTimeManager(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), function (pageName, pageUrl, pageVisitTime) {\n return trackPageVisitTime(pageName, pageUrl, pageVisitTime);\n });\n _eventTracking = new Timing(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), \"trackEvent\");\n _eventTracking.action = function (name, url, duration, properties, measurements) {\n if (!properties) {\n properties = {};\n }\n if (!measurements) {\n measurements = {};\n }\n properties.duration = duration[_DYN_TO_STRING /* @min:%2etoString */]();\n _self.trackEvent({\n name: name,\n properties: properties,\n measurements: measurements\n });\n };\n // initialize page view timing\n _pageTracking = new Timing(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), \"trackPageView\");\n _pageTracking.action = function (name, url, duration, properties, measurements) {\n // duration must be a custom property in order for the collector to extract it\n if (isNullOrUndefined(properties)) {\n properties = {};\n }\n properties.duration = duration[_DYN_TO_STRING /* @min:%2etoString */]();\n var pageViewItem = {\n name: name,\n uri: url,\n properties: properties,\n measurements: measurements\n };\n _self[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageViewItem, properties);\n };\n if (hasWindow()) {\n _updateExceptionTracking();\n _updateLocationChange();\n }\n } catch (e) {\n // resetting the initialized state because of failure\n _self.setInitialized(false);\n throw e;\n }\n };\n _self._doTeardown = function (unloadCtx, unloadState) {\n _pageViewManager && _pageViewManager.teardown(unloadCtx, unloadState);\n // Just register to remove all events associated with this namespace\n eventOff(window, null, null, _evtNamespace);\n _initDefaults();\n };\n function _populateDefaults(config) {\n var identifier = _self.identifier;\n var core = _self[_DYN_CORE /* @min:%2ecore */];\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(config, function () {\n var ctx = createProcessTelemetryContext(null, config, core);\n _extConfig = ctx.getExtCfg(identifier, defaultValues);\n _expCfg = _extConfig.expCfg;\n _autoTrackPageVisitTime = _extConfig[_DYN_AUTO_TRACK_PAGE_VISI9 /* @min:%2eautoTrackPageVisitTime */];\n if (config.storagePrefix) {\n utlSetStoragePrefix(config.storagePrefix);\n }\n _updateStorageUsage(_extConfig);\n // _updateBrowserLinkTracking\n _isBrowserLinkTrackingEnabled = _extConfig[_DYN_IS_BROWSER_LINK_TRAC10 /* @min:%2eisBrowserLinkTrackingEnabled */];\n _addDefaultTelemetryInitializers();\n }));\n }\n /**\r\n * Log a page visit time\r\n * @param pageName Name of page\r\n * @param pageVisitDuration Duration of visit to the page in milliseconds\r\n */\n function trackPageVisitTime(pageName, pageUrl, pageVisitTime) {\n var properties = {\n PageName: pageName,\n PageUrl: pageUrl\n };\n _self.trackMetric({\n name: \"PageVisitTime\",\n average: pageVisitTime,\n max: pageVisitTime,\n min: pageVisitTime,\n sampleCount: 1\n }, properties);\n }\n function _addDefaultTelemetryInitializers() {\n if (!_browserLinkInitializerAdded && _isBrowserLinkTrackingEnabled) {\n var browserLinkPaths_1 = [\"/browserLinkSignalR/\", \"/__browserLink/\"];\n var dropBrowserLinkRequests = function (envelope) {\n if (_isBrowserLinkTrackingEnabled && envelope.baseType === RemoteDependencyData[_DYN_DATA_TYPE /* @min:%2edataType */]) {\n var remoteData = envelope.baseData;\n if (remoteData) {\n for (var i = 0; i < browserLinkPaths_1[_DYN_LENGTH /* @min:%2elength */]; i++) {\n if (remoteData.target && strIndexOf(remoteData.target, browserLinkPaths_1[i]) >= 0) {\n return false;\n }\n }\n }\n }\n return true;\n };\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](_self[_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */](dropBrowserLinkRequests));\n _browserLinkInitializerAdded = true;\n }\n }\n function _sendCORSException(exception, properties) {\n var telemetryItem = createTelemetryItem(exception, Exception[_DYN_DATA_TYPE /* @min:%2edataType */], Exception[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties);\n _self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);\n }\n function _updateExceptionTracking() {\n var _window = getWindow();\n var locn = getLocation(true);\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extConfig, function () {\n _disableExceptionTracking = _extConfig.disableExceptionTracking;\n if (!_disableExceptionTracking && !_autoExceptionInstrumented && !_extConfig.autoExceptionInstrumented) {\n // We want to enable exception auto collection and it has not been done so yet\n _addHook(InstrumentEvent(_window, \"onerror\", {\n ns: _evtNamespace,\n rsp: function (callDetails, message, url, lineNumber, columnNumber, error) {\n if (!_disableExceptionTracking && callDetails.rslt !== true) {\n _self[_DYN__ONERROR /* @min:%2e_onerror */](Exception[_DYN__CREATE_AUTO_EXCEPTI6 /* @min:%2eCreateAutoException */](message, url, lineNumber, columnNumber, error, callDetails.evt));\n }\n }\n }, false));\n _autoExceptionInstrumented = true;\n }\n }));\n _addUnhandledPromiseRejectionTracking(_window, locn);\n }\n function _updateLocationChange() {\n var win = getWindow();\n var locn = getLocation(true);\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extConfig, function () {\n _enableAutoRouteTracking = _extConfig[_DYN_ENABLE_AUTO_ROUTE_TR11 /* @min:%2eenableAutoRouteTracking */] === true;\n /**\r\n * Create a custom \"locationchange\" event which is triggered each time the history object is changed\r\n */\n if (win && _enableAutoRouteTracking && !_historyListenerAdded && hasHistory()) {\n var _history = getHistory();\n if (isFunction(_history.pushState) && isFunction(_history.replaceState) && typeof Event !== strUndefined) {\n _addHistoryListener(win, _history, locn);\n }\n }\n }));\n }\n function _getDistributedTraceCtx() {\n var distributedTraceCtx = null;\n if (_self[_DYN_CORE /* @min:%2ecore */] && _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx) {\n distributedTraceCtx = _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx(false);\n }\n if (!distributedTraceCtx) {\n // Fallback when using an older Core and PropertiesPlugin\n var properties = _self[_DYN_CORE /* @min:%2ecore */].getPlugin(PropertiesPluginIdentifier);\n if (properties) {\n var context = properties.plugin.context;\n if (context) {\n distributedTraceCtx = createDistributedTraceContextFromTrace(context.telemetryTrace);\n }\n }\n }\n return distributedTraceCtx;\n }\n /**\r\n * Create a custom \"locationchange\" event which is triggered each time the history object is changed\r\n */\n function _addHistoryListener(win, history, locn) {\n if (_historyListenerAdded) {\n return;\n }\n // Name Prefix is only referenced during the initial initialization and cannot be changed afterwards\n var namePrefix = _extConfig.namePrefix || \"\";\n function _popstateHandler() {\n if (_enableAutoRouteTracking) {\n _dispatchEvent(win, createDomEvent(namePrefix + \"locationchange\"));\n }\n }\n function _locationChangeHandler() {\n // We always track the changes (if the handler is installed) to handle the feature being disabled between location changes\n if (_currUri) {\n _prevUri = _currUri;\n _currUri = locn && locn[_DYN_HREF /* @min:%2ehref */] || \"\";\n } else {\n _currUri = locn && locn[_DYN_HREF /* @min:%2ehref */] || \"\";\n }\n if (_enableAutoRouteTracking) {\n var distributedTraceCtx = _getDistributedTraceCtx();\n if (distributedTraceCtx) {\n distributedTraceCtx.setTraceId(generateW3CId());\n var traceLocationName = \"_unknown_\";\n if (locn && locn.pathname) {\n traceLocationName = locn.pathname + (locn.hash || \"\");\n }\n // This populates the ai.operation.name which has a maximum size of 1024 so we need to sanitize it\n distributedTraceCtx.setName(dataSanitizeString(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), traceLocationName));\n }\n scheduleTimeout(function (uri) {\n // todo: override start time so that it is not affected by autoRoutePVDelay\n _self[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */]({\n refUri: uri,\n properties: {\n duration: 0\n }\n }); // SPA route change loading durations are undefined, so send 0\n }.bind(_self, _prevUri), _self.autoRoutePVDelay);\n }\n }\n _addHook(InstrumentEvent(history, \"pushState\", {\n ns: _evtNamespace,\n rsp: function () {\n if (_enableAutoRouteTracking) {\n _dispatchEvent(win, createDomEvent(namePrefix + \"pushState\"));\n _dispatchEvent(win, createDomEvent(namePrefix + \"locationchange\"));\n }\n }\n }, true));\n _addHook(InstrumentEvent(history, \"replaceState\", {\n ns: _evtNamespace,\n rsp: function () {\n if (_enableAutoRouteTracking) {\n _dispatchEvent(win, createDomEvent(namePrefix + \"replaceState\"));\n _dispatchEvent(win, createDomEvent(namePrefix + \"locationchange\"));\n }\n }\n }, true));\n eventOn(win, namePrefix + \"popstate\", _popstateHandler, _evtNamespace);\n eventOn(win, namePrefix + \"locationchange\", _locationChangeHandler, _evtNamespace);\n _historyListenerAdded = true;\n }\n function _addUnhandledPromiseRejectionTracking(_window, _location) {\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extConfig, function () {\n _enableUnhandledPromiseRejectionTracking = _extConfig[_DYN_ENABLE_UNHANDLED_PRO12 /* @min:%2eenableUnhandledPromiseRejectionTracking */] === true;\n _autoExceptionInstrumented = _autoExceptionInstrumented || _extConfig[_DYN_AUTO_UNHANDLED_PROMI13 /* @min:%2eautoUnhandledPromiseInstrumented */];\n if (_enableUnhandledPromiseRejectionTracking && !_autoUnhandledPromiseInstrumented) {\n // We want to enable exception auto collection and it has not been done so yet\n _addHook(InstrumentEvent(_window, \"onunhandledrejection\", {\n ns: _evtNamespace,\n rsp: function (callDetails, error) {\n if (_enableUnhandledPromiseRejectionTracking && callDetails.rslt !== true) {\n // handled could be typeof function\n _self[_DYN__ONERROR /* @min:%2e_onerror */](Exception[_DYN__CREATE_AUTO_EXCEPTI6 /* @min:%2eCreateAutoException */](_getReason(error), _location ? _location[_DYN_HREF /* @min:%2ehref */] : \"\", 0, 0, error, callDetails.evt));\n }\n }\n }, false));\n _extConfig[_DYN_AUTO_UNHANDLED_PROMI13 /* @min:%2eautoUnhandledPromiseInstrumented */] = _autoUnhandledPromiseInstrumented = true;\n }\n }));\n }\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity - {eLoggingSeverity} - The severity of the log message\r\n * @param msgId - {_eInternalLogMessage} - The log message.\r\n */\n function _throwInternal(severity, msgId, msg, properties, isUserAct) {\n _self[_DYN_DIAG_LOG /* @min:%2ediagLog */]().throwInternal(severity, msgId, msg, properties, isUserAct);\n }\n function _initDefaults() {\n _eventTracking = null;\n _pageTracking = null;\n _pageViewManager = null;\n _pageViewPerformanceManager = null;\n _pageVisitTimeManager = null;\n _preInitTelemetryInitializers = null;\n _isBrowserLinkTrackingEnabled = false;\n _browserLinkInitializerAdded = false;\n _enableAutoRouteTracking = false;\n _historyListenerAdded = false;\n _disableExceptionTracking = false;\n _autoExceptionInstrumented = false;\n _enableUnhandledPromiseRejectionTracking = false;\n _autoUnhandledPromiseInstrumented = false;\n _autoTrackPageVisitTime = false;\n // Counts number of trackAjax invocations.\n // By default we only monitor X ajax call per view to avoid too much load.\n // Default value is set in config.\n // This counter keeps increasing even after the limit is reached.\n _trackAjaxAttempts = 0;\n // array with max length of 2 that store current url and previous url for SPA page route change trackPageview use.\n var location = getLocation(true);\n _prevUri = location && location[_DYN_HREF /* @min:%2ehref */] || \"\";\n _currUri = null;\n _evtNamespace = null;\n _extConfig = null;\n // Define _self.config\n objDefine(_self, \"config\", {\n g: function () {\n return _extConfig;\n }\n });\n }\n // For backward compatibility\n objDefine(_self, \"_pageViewManager\", {\n g: function () {\n return _pageViewManager;\n }\n });\n objDefine(_self, \"_pageViewPerformanceManager\", {\n g: function () {\n return _pageViewPerformanceManager;\n }\n });\n objDefine(_self, \"_pageVisitTimeManager\", {\n g: function () {\n return _pageVisitTimeManager;\n }\n });\n objDefine(_self, \"_evtNamespace\", {\n g: function () {\n return \".\" + _evtNamespace;\n }\n });\n });\n return _this;\n }\n // Removed Stub for AnalyticsPlugin.prototype.getCookieMgr.\n // Removed Stub for AnalyticsPlugin.prototype.processTelemetry.\n // Removed Stub for AnalyticsPlugin.prototype.trackEvent.\n // Removed Stub for AnalyticsPlugin.prototype.startTrackEvent.\n // Removed Stub for AnalyticsPlugin.prototype.stopTrackEvent.\n // Removed Stub for AnalyticsPlugin.prototype.trackTrace.\n // Removed Stub for AnalyticsPlugin.prototype.trackMetric.\n // Removed Stub for AnalyticsPlugin.prototype.trackPageView.\n // Removed Stub for AnalyticsPlugin.prototype.sendPageViewInternal.\n // Removed Stub for AnalyticsPlugin.prototype.sendPageViewPerformanceInternal.\n // Removed Stub for AnalyticsPlugin.prototype.trackPageViewPerformance.\n // Removed Stub for AnalyticsPlugin.prototype.startTrackPage.\n // Removed Stub for AnalyticsPlugin.prototype.stopTrackPage.\n // Removed Stub for AnalyticsPlugin.prototype.sendExceptionInternal.\n // Removed Stub for AnalyticsPlugin.prototype.trackException.\n // Removed Stub for AnalyticsPlugin.prototype._onerror.\n // Removed Stub for AnalyticsPlugin.prototype.addTelemetryInitializer.\n // Removed Stub for AnalyticsPlugin.prototype.initialize.\n AnalyticsPlugin.Version = '3.3.4'; // Not currently used anywhere\n return AnalyticsPlugin;\n}(BaseTelemetryPlugin);\nexport { AnalyticsPlugin };\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nexport var _DYN_FEATURE_OPT_IN = \"featureOptIn\"; // Count: 4\nexport var _DYN_ON_CFG_CHANGE_RECEIV0 = \"onCfgChangeReceive\"; // Count: 2\nexport var _DYN_NON_OVERRIDE_CONFIGS = \"nonOverrideConfigs\"; // Count: 2\nexport var _DYN_SCHEDULE_FETCH_TIMEO1 = \"scheduleFetchTimeout\"; // Count: 2\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { isNullOrUndefined, isObject, objExtend, objForEachKey, setValueByKey } from \"@nevware21/ts-utils\";\nimport { _DYN_FEATURE_OPT_IN } from \"./__DynamicConstants\";\n/**\r\n * Delete a config key in the given cfg, if the config key exists in nonOverrideConfigs and its value is set to true\r\n * @param cfg cfg to modify\r\n * @param nonOverrideConfigs nonOverrideConfigs\r\n * @param curLevel cur config level, starting at 0\r\n * @param maxLevel max config level\r\n * @returns new copy of modified configs\r\n */\nexport function replaceByNonOverrideCfg(cfg, nonOverrideConfigs, curLevel, maxLevel) {\n try {\n var exceedMaxLevel = curLevel > maxLevel;\n if (exceedMaxLevel) {\n cfg = null;\n }\n var curCfg_1 = curLevel == 0 ? objExtend({}, cfg) : cfg; // only copy cfg at the begining level\n if (curCfg_1 && nonOverrideConfigs && !exceedMaxLevel) {\n objForEachKey(curCfg_1, function (key) {\n var nonOverrideVal = nonOverrideConfigs[key];\n if (!!nonOverrideVal) {\n if (isObject(curCfg_1[key]) && isObject(nonOverrideVal)) {\n curCfg_1[key] = replaceByNonOverrideCfg(curCfg_1[key], nonOverrideVal, ++curLevel, maxLevel);\n } else {\n delete curCfg_1[key];\n }\n }\n });\n }\n return curCfg_1;\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n // if errors happen, do nothing\n return cfg;\n}\n// CDN Mode, value = B (CDN value = B)\n// |--------------------------------------------------------------------------|-----------|\n// | | none | disabled | enabled | forceOn | forceOff |\n// | ------------------ | ----------- | ----------- | ----------- | --------- | --------- |\n// | User Mode, value = A | none | none | disabled | enabled | enabled | disabled |\n// (user Value = A) | disabled | disabled | disabled | disabled | enabled | disabled |\n// | enabled | enabled | disabled | enabled | enabled | disabled |\n// | none(blockCdn) | none | none | none | none | none |\n// | disabled(blockCdn) | disabled | disabled | disabled | disabled | disabled |\n// | enabled(blockCdn) | enabled | enabled | enabled | enabled | enabled |\n// This matrix identifies how feature based overrides are selected (if present)\n// cdn Mode (cdn Value = B)\n// |---------------------------------------------------------------------------|\n// | | none | disabled | enabled | forceOn | forceOff |\n// | ------------------ | ---------| ---------| ---------| ---------|----------|\n// | User Mode | none | A | A | A || B | B || A | B || A |\n// (user Value = A) | disabled | A | A | A | B || A | B || A |\n// | enabled | A | A | A || B | B || A | B || A |\n// | none(blockCdn) | A | A | A | A | A |\n// | disabled(blockCdn) | A | A | A | A | A |\n// | enabled(blockCdn) | A | A | A | A | A |\n// Note:\n// Where the \"value\" is an object (map) of encoded key/values which will be used to override the real configuration\n// A = either the user supplied enable/disable value (via the `config.featureOptIn[name]`) or if not defined by the user the SDK defaults of the same.\n// B = The enable/disable value obtained from the CDN for the named feature\n// These are evaluated based on the above matrix to either\n// - A (Always the user/sdk value)\n// - B (Always the value from the CDN)\n// - A || B (If A is null or undefined use the value from the CDN (B) otherwise A)\n// - B || A (If B is null or undefined use the user/SDK value otherwise use the value from the CDN)\n//\n// The result of the value may also be null / undefined, which means there are no overrides to apply when the feature is enabled\nvar F = \"featureOptIn.\";\nvar M = \".mode\";\nvar ON = \".onCfg\";\nvar OFF = \".offCfg\";\nexport function resolveCdnFeatureCfg(field, cdnCfg, userOptInDetails) {\n var _a;\n // cdn conifg value\n if (!cdnCfg || !cdnCfg.enabled) {\n return null;\n }\n var cdnFt = (cdnCfg[_DYN_FEATURE_OPT_IN /* @min:%2efeatureOptIn */] || {})[field] || {\n mode: 1 /* CdnFeatureMode.none */\n };\n var cdnM = cdnFt.mode;\n var cdnOnV = cdnFt.onCfg;\n var cdnOffV = cdnFt.offCfg;\n var userFt = (userOptInDetails || {})[field] || {\n mode: 2 /* FeatureOptInMode.disable */\n }; // default user mode is disable\n var userM = userFt.mode;\n var userOnV = userFt.onCfg;\n var userOffV = userFt.offCfg;\n var blockCdn = !!userFt.blockCdnCfg;\n var mFld = F + field + M;\n var onFld = F + field + ON;\n var offFld = F + field + OFF;\n var mode = userM;\n var onV = userOnV;\n var offV = userOffV;\n if (!blockCdn) {\n if (cdnM === 4 /* CdnFeatureMode.forceOn */ || cdnM === 5 /* CdnFeatureMode.forceOff */) {\n mode = cdnM == 4 /* CdnFeatureMode.forceOn */ ? 3 /* FeatureOptInMode.enable */ : 2 /* FeatureOptInMode.disable */;\n onV = cdnOnV || userOnV;\n offV = cdnOffV || userOffV;\n } else if (cdnM === 2 /* CdnFeatureMode.disable */ || userM === 2 /* FeatureOptInMode.disable */) {\n mode = 2 /* FeatureOptInMode.disable */;\n onV = userOnV || cdnOnV;\n offV = userOffV || cdnOffV;\n } else if (cdnM === 3 /* CdnFeatureMode.enable */) {\n mode = 3 /* FeatureOptInMode.enable */;\n onV = userOnV || cdnOnV;\n offV = userOffV || cdnOffV;\n } else if (cdnM === 1 /* CdnFeatureMode.none */ && userM === 1 /* FeatureOptInMode.none */) {\n mode = 1 /* FeatureOptInMode.none */;\n }\n }\n return _a = {}, _a[mFld] = mode, _a[onFld] = onV, _a[offFld] = offV, _a;\n}\n// helper function to get cdn config with opt-in features\nexport function applyCdnfeatureCfg(cdnCfg, core) {\n try {\n if (!cdnCfg || !cdnCfg.enabled) {\n return null;\n }\n if (!cdnCfg[_DYN_FEATURE_OPT_IN /* @min:%2efeatureOptIn */]) {\n return cdnCfg.config;\n }\n var optInMap = cdnCfg[_DYN_FEATURE_OPT_IN /* @min:%2efeatureOptIn */];\n var cdnConfig_1 = cdnCfg.config || {};\n objForEachKey(optInMap, function (key) {\n var featureVal = resolveCdnFeatureCfg(key, cdnCfg, core.config[_DYN_FEATURE_OPT_IN /* @min:%2efeatureOptIn */]);\n if (!isNullOrUndefined(featureVal)) {\n objForEachKey(featureVal, function (config, val) {\n setValueByKey(cdnConfig_1, config, val);\n });\n _overrideCdnCfgByFeature(key, featureVal, cdnConfig_1);\n }\n });\n return cdnConfig_1;\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return null;\n}\nfunction _overrideCdnCfgByFeature(field, ftVal, config) {\n var mode = ftVal[F + field + M];\n var val = ftVal[F + field + ON];\n var dVal = ftVal[F + field + OFF];\n var target = null;\n if (mode === 3 /* FeatureOptInMode.enable */) {\n target = val;\n }\n if (mode === 2 /* FeatureOptInMode.disable */) {\n target = dVal;\n }\n if (target) {\n objForEachKey(target, function (key, cfg) {\n setValueByKey(config, key, cfg);\n });\n }\n}\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n/**\r\n* CfgSyncPlugin.ts\r\n* @copyright Microsoft 2018\r\n*/\nvar _a;\nimport { __extendsFn as __extends } from \"@microsoft/applicationinsights-shims\";\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { BaseTelemetryPlugin, createProcessTelemetryContext, createUniqueNamespace, eventOff, eventOn, getGlobal, getJSON, isFetchSupported, isXhrSupported, mergeEvtNamespace, onConfigChange, sendCustomEvent } from \"@microsoft/applicationinsights-core-js\";\nimport { doAwaitResponse } from \"@nevware21/ts-async\";\nimport { isFunction, isNullOrUndefined, isPlainObject, objDeepFreeze, scheduleTimeout } from \"@nevware21/ts-utils\";\nimport { applyCdnfeatureCfg, replaceByNonOverrideCfg } from \"./CfgSyncHelperFuncs\";\nimport { _DYN_NON_OVERRIDE_CONFIGS, _DYN_ON_CFG_CHANGE_RECEIV0, _DYN_SCHEDULE_FETCH_TIMEO1 } from \"./__DynamicConstants\";\nvar EVENT_NAME = \"ai_cfgsync\";\nvar STR_GET_METHOD = \"GET\";\nvar FETCH_TIMEOUT = 1800000; // 30 minutes\nvar udfVal = undefined;\nvar defaultNonOverrideCfg = {\n instrumentationKey: true,\n connectionString: true,\n endpointUrl: true\n};\nvar _defaultConfig = objDeepFreeze((_a = {\n syncMode: 1 /* ICfgSyncMode.Broadcast */,\n blkCdnCfg: udfVal,\n customEvtName: udfVal,\n cfgUrl: udfVal,\n overrideSyncFn: udfVal,\n overrideFetchFn: udfVal\n}, _a[_DYN_ON_CFG_CHANGE_RECEIV0 /* @min:onCfgChangeReceive */] = udfVal, _a[_DYN_SCHEDULE_FETCH_TIMEO1 /* @min:scheduleFetchTimeout */] = FETCH_TIMEOUT, _a[_DYN_NON_OVERRIDE_CONFIGS /* @min:nonOverrideConfigs */] = defaultNonOverrideCfg, _a));\nvar CfgSyncPlugin = /** @class */function (_super) {\n __extends(CfgSyncPlugin, _super);\n function CfgSyncPlugin() {\n var _this = _super.call(this) || this;\n _this.priority = 198;\n _this.identifier = \"AppInsightsCfgSyncPlugin\";\n var _extensionConfig;\n var _mainConfig; // throttle config should be wrapped in IConfiguration\n var _evtName;\n var _evtNamespace;\n var _cfgUrl;\n var _timeoutHandle;\n var _receiveChanges;\n var _broadcastChanges;\n var _blkCdnCfg;\n var _fetchTimeout;\n var _retryCnt;\n var _onCfgChangeReceive;\n var _nonOverrideConfigs;\n var _fetchFn;\n var _overrideFetchFn;\n var _overrideSyncFn;\n var _paused = false;\n dynamicProto(CfgSyncPlugin, _this, function (_self, _base) {\n _initDefaults();\n _self.initialize = function (config, core, extensions, pluginChain) {\n _base.initialize(config, core, extensions, pluginChain);\n _evtNamespace = mergeEvtNamespace(createUniqueNamespace(_self.identifier), core.evtNamespace && core.evtNamespace());\n _populateDefaults(config);\n };\n _self.getCfg = function () {\n return _mainConfig;\n };\n _self.pause = function () {\n _paused = true;\n _clearScheduledTimer();\n };\n _self.resume = function () {\n _paused = false;\n _setupTimer();\n };\n // used for V2 to manaully trigger config udpate\n _self.setCfg = function (config) {\n return _setCfg(config);\n };\n _self.sync = function (customDetails) {\n return _sendCfgsyncEvents(customDetails);\n };\n _self.updateEventListenerName = function (eventName) {\n return _updateEventListenerName(eventName);\n };\n _self._doTeardown = function (unloadCtx, unloadState) {\n _eventOff();\n _clearScheduledTimer();\n _initDefaults();\n };\n _self[\"_getDbgPlgTargets\"] = function () {\n return [_broadcastChanges, _receiveChanges, _evtName, _blkCdnCfg, _nonOverrideConfigs];\n };\n function _initDefaults() {\n _mainConfig = null;\n _evtName = null;\n _evtNamespace = null;\n _cfgUrl = null;\n _receiveChanges = null;\n _broadcastChanges = null;\n _nonOverrideConfigs = null;\n _timeoutHandle = null;\n _fetchTimeout = null;\n _retryCnt = null;\n _blkCdnCfg = null;\n _overrideFetchFn = null;\n _overrideSyncFn = null;\n _onCfgChangeReceive = null;\n }\n function _populateDefaults(config) {\n var identifier = _self.identifier;\n var core = _self.core;\n _self._addHook(onConfigChange(config, function () {\n var ctx = createProcessTelemetryContext(null, config, core);\n _extensionConfig = ctx.getExtCfg(identifier, _defaultConfig);\n var preBlkCdn = _blkCdnCfg;\n _blkCdnCfg = !!_extensionConfig.blkCdnCfg;\n // avoid initial call\n if (!isNullOrUndefined(preBlkCdn) && preBlkCdn !== _blkCdnCfg) {\n if (!_blkCdnCfg && _cfgUrl) {\n _fetchFn && _fetchFn(_cfgUrl, _onFetchComplete, _broadcastChanges);\n } else {\n _clearScheduledTimer();\n }\n }\n if (isNullOrUndefined(_receiveChanges)) {\n _receiveChanges = _extensionConfig.syncMode === 2 /* ICfgSyncMode.Receive */;\n }\n if (isNullOrUndefined(_broadcastChanges)) {\n _broadcastChanges = _extensionConfig.syncMode === 1 /* ICfgSyncMode.Broadcast */;\n }\n var newEvtName = _extensionConfig.customEvtName || EVENT_NAME;\n if (_evtName !== newEvtName) {\n if (_receiveChanges) {\n _updateEventListenerName(newEvtName);\n } else {\n _eventOff();\n _evtName = newEvtName;\n }\n }\n if (isNullOrUndefined(_cfgUrl)) {\n _cfgUrl = _extensionConfig.cfgUrl;\n }\n // if cfgUrl is set, we will ignore core config change\n if (!_cfgUrl) {\n _mainConfig = config;\n if (_broadcastChanges) {\n _sendCfgsyncEvents();\n }\n }\n }));\n _overrideSyncFn = _extensionConfig.overrideSyncFn;\n _overrideFetchFn = _extensionConfig.overrideFetchFn;\n _onCfgChangeReceive = _extensionConfig[_DYN_ON_CFG_CHANGE_RECEIV0 /* @min:%2eonCfgChangeReceive */];\n _nonOverrideConfigs = _extensionConfig[_DYN_NON_OVERRIDE_CONFIGS /* @min:%2enonOverrideConfigs */]; // override values should not be changed\n _fetchTimeout = _extensionConfig[_DYN_SCHEDULE_FETCH_TIMEO1 /* @min:%2escheduleFetchTimeout */];\n _fetchFn = _getFetchFnInterface();\n _retryCnt = 0;\n // NOT support cfgURL change to avoid mutiple fetch calls\n if (_cfgUrl && !_blkCdnCfg) {\n _fetchFn && _fetchFn(_cfgUrl, _onFetchComplete, _broadcastChanges);\n }\n }\n function _setCfg(config, isAutoSync) {\n if (config) {\n _mainConfig = config;\n if (!!isAutoSync && !_paused) {\n return _sendCfgsyncEvents();\n }\n if (_receiveChanges && !_paused) {\n _self.core.updateCfg(config);\n return true;\n }\n }\n return false;\n }\n function _eventOff() {\n try {\n var global_1 = getGlobal();\n if (global_1) {\n eventOff(global_1, null, null, _evtNamespace);\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n }\n function _sendCfgsyncEvents(customDetails) {\n try {\n if (!!_overrideSyncFn && isFunction(_overrideSyncFn)) {\n return _overrideSyncFn(_mainConfig, customDetails);\n }\n return sendCustomEvent(_evtName, _mainConfig, customDetails);\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return false;\n }\n function _updateEventListenerName(name) {\n try {\n _eventOff();\n if (name) {\n _evtName = name;\n _addEventListener();\n }\n return true;\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return false;\n }\n function _getFetchFnInterface() {\n var _fetchFn = _overrideFetchFn;\n if (isNullOrUndefined(_fetchFn)) {\n if (isFetchSupported()) {\n _fetchFn = _fetchSender;\n } else if (isXhrSupported()) {\n _fetchFn = _xhrSender;\n }\n }\n return _fetchFn;\n }\n function _fetchSender(url, oncomplete, isAutoSync) {\n var global = getGlobal();\n var fetchFn = global && global.fetch || null;\n if (url && fetchFn && isFunction(fetchFn)) {\n try {\n var init = {\n method: STR_GET_METHOD\n };\n var request = new Request(url, init);\n doAwaitResponse(fetch(request), function (result) {\n var response = result.value;\n if (!result.rejected) {\n if (response.ok) {\n doAwaitResponse(response.text(), function (res) {\n _doOnComplete(oncomplete, response.status, res.value, isAutoSync);\n });\n } else {\n _doOnComplete(oncomplete, response.status, null, isAutoSync);\n }\n } else {\n _doOnComplete(oncomplete, 400);\n }\n });\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n }\n }\n function _xhrSender(url, oncomplete, isAutoSync) {\n try {\n var xhr_1 = new XMLHttpRequest();\n xhr_1.open(STR_GET_METHOD, url);\n xhr_1.onreadystatechange = function () {\n if (xhr_1.readyState === XMLHttpRequest.DONE) {\n _doOnComplete(oncomplete, xhr_1.status, xhr_1.responseText, isAutoSync);\n }\n };\n xhr_1.onerror = function () {\n _doOnComplete(oncomplete, 400);\n };\n xhr_1.ontimeout = function () {\n _doOnComplete(oncomplete, 400);\n };\n xhr_1.send();\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n }\n function _onFetchComplete(status, response, isAutoSync) {\n try {\n if (status >= 200 && status < 400 && response) {\n _retryCnt = 0; // any successful response will reset retry count to 0\n var JSON_1 = getJSON();\n if (JSON_1) {\n var cdnCfg = JSON_1.parse(response); //comments are not allowed\n var cfg = applyCdnfeatureCfg(cdnCfg, _self.core);\n var newCfg = cfg && isPlainObject(cfg) && _replaceTartgetByKeys(cfg);\n newCfg && _setCfg(newCfg, isAutoSync);\n //cfg && _setCfg(cfg, isAutoSync);\n }\n } else {\n _retryCnt++;\n }\n if (_retryCnt < 3) {\n _setupTimer();\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n }\n function _doOnComplete(oncomplete, status, response, isAutoSync) {\n try {\n oncomplete(status, response, isAutoSync);\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n }\n function _addEventListener() {\n if (_receiveChanges) {\n var global_2 = getGlobal();\n if (global_2) {\n try {\n eventOn(global_2, _evtName, function (event) {\n // TODO: add more validation here\n // may include a \"name\" or some other features to check\n var cfgEvent = event && event.detail;\n if (_onCfgChangeReceive && cfgEvent) {\n _onCfgChangeReceive(cfgEvent);\n } else {\n var cfg = cfgEvent && cfgEvent.cfg;\n var newCfg = cfg && isPlainObject(cfg) && _replaceTartgetByKeys(cfg);\n newCfg && _setCfg(newCfg);\n }\n }, _evtNamespace, true);\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n }\n }\n }\n // 4 levels\n function _replaceTartgetByKeys(cfg, level) {\n var _cfg = null;\n try {\n if (cfg) {\n _cfg = replaceByNonOverrideCfg(cfg, _nonOverrideConfigs, 0, 5);\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return _cfg;\n }\n /**\r\n * Sets up the timer which triggers fetching cdn every 30mins after inital call\r\n */\n function _setupTimer() {\n if (!_timeoutHandle && _fetchTimeout) {\n _timeoutHandle = scheduleTimeout(function () {\n _timeoutHandle = null;\n _fetchFn(_cfgUrl, _onFetchComplete, _broadcastChanges);\n }, _fetchTimeout);\n _timeoutHandle.unref();\n }\n }\n function _clearScheduledTimer() {\n _timeoutHandle && _timeoutHandle.cancel();\n _timeoutHandle = null;\n _retryCnt = 0;\n }\n _self.processTelemetry = function (env, itemCtx) {\n _self.processNext(env, itemCtx);\n };\n });\n return _this;\n }\n // Removed Stub for CfgSyncPlugin.prototype.initialize.\n // Removed Stub for CfgSyncPlugin.prototype.getCfg.\n // Removed Stub for CfgSyncPlugin.prototype.setCfg.\n // Removed Stub for CfgSyncPlugin.prototype.sync.\n // Removed Stub for CfgSyncPlugin.prototype.updateEventListenerName.\n // Removed Stub for CfgSyncPlugin.prototype.pause.\n // Removed Stub for CfgSyncPlugin.prototype.resume.\n //// Removed Stub for CfgSyncPlugin.prototype.processTelemetry.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n CfgSyncPlugin.__ieDyn = 1;\n return CfgSyncPlugin;\n}(BaseTelemetryPlugin);\nexport { CfgSyncPlugin };\n","/*\n * Application Insights JavaScript SDK - Channel, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// ###################################################################################################################################################\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\n// ###################################################################################################################################################\n// Generally you should only put values that are used more than 2 times and then only if not already exposed as a constant (such as SdkCoreNames)\n// as when using \"short\" named values from here they will be will be minified smaller than the SdkCoreNames[eSdkCoreNames.xxxx] value.\nexport var STR_DURATION = \"duration\";\n","/*\n * Application Insights JavaScript SDK - Channel, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nexport var _DYN_TAGS = \"tags\"; // Count: 17\nexport var _DYN_DEVICE_TYPE = \"deviceType\"; // Count: 3\nexport var _DYN_DATA = \"data\"; // Count: 15\nexport var _DYN_NAME = \"name\"; // Count: 8\nexport var _DYN_TRACE_ID = \"traceID\"; // Count: 5\nexport var _DYN_LENGTH = \"length\"; // Count: 38\nexport var _DYN_STRINGIFY = \"stringify\"; // Count: 5\nexport var _DYN_MEASUREMENTS = \"measurements\"; // Count: 7\nexport var _DYN_DATA_TYPE = \"dataType\"; // Count: 10\nexport var _DYN_ENVELOPE_TYPE = \"envelopeType\"; // Count: 7\nexport var _DYN_TO_STRING = \"toString\"; // Count: 7\nexport var _DYN__GET = \"_get\"; // Count: 5\nexport var _DYN_ENQUEUE = \"enqueue\"; // Count: 7\nexport var _DYN_COUNT = \"count\"; // Count: 7\nexport var _DYN_EVENTS_LIMIT_IN_MEM = \"eventsLimitInMem\"; // Count: 2\nexport var _DYN_PUSH = \"push\"; // Count: 9\nexport var _DYN_ITEM = \"item\"; // Count: 6\nexport var _DYN_EMIT_LINE_DELIMITED_0 = \"emitLineDelimitedJson\"; // Count: 3\nexport var _DYN_CLEAR = \"clear\"; // Count: 6\nexport var _DYN_CREATE_NEW = \"createNew\"; // Count: 3\nexport var _DYN_MARK_AS_SENT = \"markAsSent\"; // Count: 4\nexport var _DYN_CLEAR_SENT = \"clearSent\"; // Count: 5\nexport var _DYN_BUFFER_OVERRIDE = \"bufferOverride\"; // Count: 3\nexport var _DYN__BUFFER__KEY = \"BUFFER_KEY\"; // Count: 5\nexport var _DYN__SENT__BUFFER__KEY = \"SENT_BUFFER_KEY\"; // Count: 8\nexport var _DYN_CONCAT = \"concat\"; // Count: 6\nexport var _DYN__MAX__BUFFER__SIZE = \"MAX_BUFFER_SIZE\"; // Count: 5\nexport var _DYN_TRIGGER_SEND = \"triggerSend\"; // Count: 5\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 16\nexport var _DYN_INITIALIZE = \"initialize\"; // Count: 3\nexport var _DYN__SENDER = \"_sender\"; // Count: 5\nexport var _DYN_ENDPOINT_URL = \"endpointUrl\"; // Count: 5\nexport var _DYN_INSTRUMENTATION_KEY = \"instrumentationKey\"; // Count: 5\nexport var _DYN_CUSTOM_HEADERS = \"customHeaders\"; // Count: 3\nexport var _DYN_MAX_BATCH_SIZE_IN_BY1 = \"maxBatchSizeInBytes\"; // Count: 2\nexport var _DYN_ONUNLOAD_DISABLE_BEA2 = \"onunloadDisableBeacon\"; // Count: 3\nexport var _DYN_IS_BEACON_API_DISABL3 = \"isBeaconApiDisabled\"; // Count: 3\nexport var _DYN_ALWAYS_USE_XHR_OVERR4 = \"alwaysUseXhrOverride\"; // Count: 2\nexport var _DYN_DISABLE_XHR = \"disableXhr\"; // Count: 3\nexport var _DYN_ENABLE_SESSION_STORA5 = \"enableSessionStorageBuffer\"; // Count: 2\nexport var _DYN__BUFFER = \"_buffer\"; // Count: 9\nexport var _DYN_ONUNLOAD_DISABLE_FET6 = \"onunloadDisableFetch\"; // Count: 2\nexport var _DYN_DISABLE_SEND_BEACON_7 = \"disableSendBeaconSplit\"; // Count: 2\nexport var _DYN_ENABLE_SEND_PROMISE = \"enableSendPromise\"; // Count: 2\nexport var _DYN_GET_SENDER_INST = \"getSenderInst\"; // Count: 4\nexport var _DYN_UNLOAD_TRANSPORTS = \"unloadTransports\"; // Count: 2\nexport var _DYN_CONVERT_UNDEFINED = \"convertUndefined\"; // Count: 2\nexport var _DYN_MAX_BATCH_INTERVAL = \"maxBatchInterval\"; // Count: 2\nexport var _DYN_SERIALIZE = \"serialize\"; // Count: 4\nexport var _DYN__ON_ERROR = \"_onError\"; // Count: 7\nexport var _DYN__ON_PARTIAL_SUCCESS = \"_onPartialSuccess\"; // Count: 3\nexport var _DYN__ON_SUCCESS = \"_onSuccess\"; // Count: 6\nexport var _DYN_ITEMS_RECEIVED = \"itemsReceived\"; // Count: 3\nexport var _DYN_ITEMS_ACCEPTED = \"itemsAccepted\"; // Count: 3\nexport var _DYN_ORI_PAYLOAD = \"oriPayload\"; // Count: 3\nexport var _DYN_BASE_TYPE = \"baseType\"; // Count: 4\nexport var _DYN_SAMPLE_RATE = \"sampleRate\"; // Count: 4\nexport var _DYN_EVENTS_SEND_REQUEST = \"eventsSendRequest\"; // Count: 2\nexport var _DYN_GET_SAMPLING_SCORE = \"getSamplingScore\"; // Count: 2\nexport var _DYN_GET_HASH_CODE_SCORE = \"getHashCodeScore\"; // Count: 4\n","/*\n * Application Insights JavaScript SDK - Channel, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { __assignFn as __assign } from \"@microsoft/applicationinsights-shims\";\nimport { CtxTagKeys, Data, Envelope, Event, Exception, HttpMethod, Metric, PageView, PageViewPerformance, RemoteDependencyData, SampleRate, Trace, dataSanitizeString } from \"@microsoft/applicationinsights-common\";\nimport { _throwInternal, _warnToConsole, getJSON, hasJSON, isNullOrUndefined, isNumber, isString, isTruthy, objForEachKey, optimizeObject, setValue, toISOString } from \"@microsoft/applicationinsights-core-js\";\nimport { STR_DURATION } from \"./InternalConstants\";\nimport { _DYN_DATA, _DYN_DATA_TYPE, _DYN_DEVICE_TYPE, _DYN_ENVELOPE_TYPE, _DYN_LENGTH, _DYN_MEASUREMENTS, _DYN_NAME, _DYN_STRINGIFY, _DYN_TAGS, _DYN_TO_STRING, _DYN_TRACE_ID } from \"./__DynamicConstants\";\n// these two constants are used to filter out properties not needed when trying to extract custom properties and measurements from the incoming payload\nvar strBaseType = \"baseType\";\nvar strBaseData = \"baseData\";\nvar strProperties = \"properties\";\nvar strTrue = \"true\";\nfunction _setValueIf(target, field, value) {\n return setValue(target, field, value, isTruthy);\n}\n/*\r\n * Maps Part A data from CS 4.0\r\n */\nfunction _extractPartAExtensions(logger, item, env) {\n // todo: switch to keys from common in this method\n var envTags = env[_DYN_TAGS /* @min:%2etags */] = env[_DYN_TAGS /* @min:%2etags */] || {};\n var itmExt = item.ext = item.ext || {};\n var itmTags = item[_DYN_TAGS /* @min:%2etags */] = item[_DYN_TAGS /* @min:%2etags */] || [];\n var extUser = itmExt.user;\n if (extUser) {\n _setValueIf(envTags, CtxTagKeys.userAuthUserId, extUser.authId);\n _setValueIf(envTags, CtxTagKeys.userId, extUser.id || extUser.localId);\n }\n var extApp = itmExt.app;\n if (extApp) {\n _setValueIf(envTags, CtxTagKeys.sessionId, extApp.sesId);\n }\n var extDevice = itmExt.device;\n if (extDevice) {\n _setValueIf(envTags, CtxTagKeys.deviceId, extDevice.id || extDevice.localId);\n _setValueIf(envTags, CtxTagKeys[_DYN_DEVICE_TYPE /* @min:%2edeviceType */], extDevice.deviceClass);\n _setValueIf(envTags, CtxTagKeys.deviceIp, extDevice.ip);\n _setValueIf(envTags, CtxTagKeys.deviceModel, extDevice.model);\n _setValueIf(envTags, CtxTagKeys[_DYN_DEVICE_TYPE /* @min:%2edeviceType */], extDevice[_DYN_DEVICE_TYPE /* @min:%2edeviceType */]);\n }\n var web = item.ext.web;\n if (web) {\n _setValueIf(envTags, CtxTagKeys.deviceLanguage, web.browserLang);\n _setValueIf(envTags, CtxTagKeys.deviceBrowserVersion, web.browserVer);\n _setValueIf(envTags, CtxTagKeys.deviceBrowser, web.browser);\n var envData = env[_DYN_DATA /* @min:%2edata */] = env[_DYN_DATA /* @min:%2edata */] || {};\n var envBaseData = envData[strBaseData] = envData[strBaseData] || {};\n var envProps = envBaseData[strProperties] = envBaseData[strProperties] || {};\n _setValueIf(envProps, \"domain\", web.domain);\n _setValueIf(envProps, \"isManual\", web.isManual ? strTrue : null);\n _setValueIf(envProps, \"screenRes\", web.screenRes);\n _setValueIf(envProps, \"userConsent\", web.userConsent ? strTrue : null);\n }\n var extOs = itmExt.os;\n if (extOs) {\n _setValueIf(envTags, CtxTagKeys.deviceOS, extOs[_DYN_NAME /* @min:%2ename */]);\n _setValueIf(envTags, CtxTagKeys.deviceOSVersion, extOs.osVer);\n }\n // No support for mapping Trace.traceState to 2.0 as it is currently empty\n var extTrace = itmExt.trace;\n if (extTrace) {\n _setValueIf(envTags, CtxTagKeys.operationParentId, extTrace.parentID);\n _setValueIf(envTags, CtxTagKeys.operationName, dataSanitizeString(logger, extTrace[_DYN_NAME /* @min:%2ename */]));\n _setValueIf(envTags, CtxTagKeys.operationId, extTrace[_DYN_TRACE_ID /* @min:%2etraceID */]);\n }\n // Sample 4.0 schema\n // {\n // \"time\" : \"2018-09-05T22:51:22.4936Z\",\n // \"name\" : \"MetricWithNamespace\",\n // \"iKey\" : \"ABC-5a4cbd20-e601-4ef5-a3c6-5d6577e4398e\",\n // \"ext\": { \"cloud\": {\n // \"role\": \"WATSON3\",\n // \"roleInstance\": \"CO4AEAP00000260\"\n // },\n // \"device\": {}, \"correlation\": {} },\n // \"tags\": [\n // { \"amazon.region\" : \"east2\" },\n // { \"os.expid\" : \"wp:02df239\" }\n // ]\n // }\n var tgs = {};\n // deals with tags.push({object})\n for (var i = itmTags[_DYN_LENGTH /* @min:%2elength */] - 1; i >= 0; i--) {\n var tg = itmTags[i];\n objForEachKey(tg, function (key, value) {\n tgs[key] = value;\n });\n itmTags.splice(i, 1);\n }\n // deals with tags[key]=value (and handles hasOwnProperty)\n objForEachKey(itmTags, function (tg, value) {\n tgs[tg] = value;\n });\n var theTags = __assign(__assign({}, envTags), tgs);\n if (!theTags[CtxTagKeys.internalSdkVersion]) {\n // Append a version in case it is not already set\n theTags[CtxTagKeys.internalSdkVersion] = dataSanitizeString(logger, \"javascript:\".concat(EnvelopeCreator.Version), 64);\n }\n env[_DYN_TAGS /* @min:%2etags */] = optimizeObject(theTags);\n}\nfunction _extractPropsAndMeasurements(data, properties, measurements) {\n if (!isNullOrUndefined(data)) {\n objForEachKey(data, function (key, value) {\n if (isNumber(value)) {\n measurements[key] = value;\n } else if (isString(value)) {\n properties[key] = value;\n } else if (hasJSON()) {\n properties[key] = getJSON()[_DYN_STRINGIFY /* @min:%2estringify */](value);\n }\n });\n }\n}\nfunction _convertPropsUndefinedToCustomDefinedValue(properties, customUndefinedValue) {\n if (!isNullOrUndefined(properties)) {\n objForEachKey(properties, function (key, value) {\n properties[key] = value || customUndefinedValue;\n });\n }\n}\n// TODO: Do we want this to take logger as arg or use this._logger as nonstatic?\nfunction _createEnvelope(logger, envelopeType, telemetryItem, data) {\n var envelope = new Envelope(logger, data, envelopeType);\n _setValueIf(envelope, \"sampleRate\", telemetryItem[SampleRate]);\n if ((telemetryItem[strBaseData] || {}).startTime) {\n // Starting from Version 3.0.3, the time property will be assigned by the startTime value,\n // which records the loadEvent time for the pageView event.\n envelope.time = toISOString(telemetryItem[strBaseData].startTime);\n }\n envelope.iKey = telemetryItem.iKey;\n var iKeyNoDashes = telemetryItem.iKey.replace(/-/g, \"\");\n envelope[_DYN_NAME /* @min:%2ename */] = envelope[_DYN_NAME /* @min:%2ename */].replace(\"{0}\", iKeyNoDashes);\n // extract all extensions from ctx\n _extractPartAExtensions(logger, telemetryItem, envelope);\n // loop through the envelope tags (extension of Part A) and pick out the ones that should go in outgoing envelope tags\n telemetryItem[_DYN_TAGS /* @min:%2etags */] = telemetryItem[_DYN_TAGS /* @min:%2etags */] || [];\n return optimizeObject(envelope);\n}\nfunction EnvelopeCreatorInit(logger, telemetryItem) {\n if (isNullOrUndefined(telemetryItem[strBaseData])) {\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 46 /* _eInternalMessageId.TelemetryEnvelopeInvalid */, \"telemetryItem.baseData cannot be null.\");\n }\n}\nexport var EnvelopeCreator = {\n Version: '3.3.4'\n};\nexport function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\n EnvelopeCreatorInit(logger, telemetryItem);\n var customMeasurements = telemetryItem[strBaseData][_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\n var customProperties = telemetryItem[strBaseData][strProperties] || {};\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], customProperties, customMeasurements);\n if (!isNullOrUndefined(customUndefinedValue)) {\n _convertPropsUndefinedToCustomDefinedValue(customProperties, customUndefinedValue);\n }\n var bd = telemetryItem[strBaseData];\n if (isNullOrUndefined(bd)) {\n _warnToConsole(logger, \"Invalid input for dependency data\");\n return null;\n }\n var method = bd[strProperties] && bd[strProperties][HttpMethod] ? bd[strProperties][HttpMethod] : \"GET\";\n var remoteDepData = new RemoteDependencyData(logger, bd.id, bd.target, bd[_DYN_NAME /* @min:%2ename */], bd[STR_DURATION /* @min:%2eduration */], bd.success, bd.responseCode, method, bd.type, bd.correlationContext, customProperties, customMeasurements);\n var data = new Data(RemoteDependencyData[_DYN_DATA_TYPE /* @min:%2edataType */], remoteDepData);\n return _createEnvelope(logger, RemoteDependencyData[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\n}\nexport function EventEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\n EnvelopeCreatorInit(logger, telemetryItem);\n var customProperties = {};\n var customMeasurements = {};\n if (telemetryItem[strBaseType] !== Event[_DYN_DATA_TYPE /* @min:%2edataType */]) {\n customProperties[\"baseTypeSource\"] = telemetryItem[strBaseType]; // save the passed in base type as a property\n }\n if (telemetryItem[strBaseType] === Event[_DYN_DATA_TYPE /* @min:%2edataType */]) {\n // take collection\n customProperties = telemetryItem[strBaseData][strProperties] || {};\n customMeasurements = telemetryItem[strBaseData][_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\n } else {\n // if its not a known type, convert to custom event\n if (telemetryItem[strBaseData]) {\n _extractPropsAndMeasurements(telemetryItem[strBaseData], customProperties, customMeasurements);\n }\n }\n // Extract root level properties from part C telemetryItem.data\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], customProperties, customMeasurements);\n if (!isNullOrUndefined(customUndefinedValue)) {\n _convertPropsUndefinedToCustomDefinedValue(customProperties, customUndefinedValue);\n }\n var eventName = telemetryItem[strBaseData][_DYN_NAME /* @min:%2ename */];\n var eventData = new Event(logger, eventName, customProperties, customMeasurements);\n var data = new Data(Event[_DYN_DATA_TYPE /* @min:%2edataType */], eventData);\n return _createEnvelope(logger, Event[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\n}\nexport function ExceptionEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\n EnvelopeCreatorInit(logger, telemetryItem);\n // Extract root level properties from part C telemetryItem.data\n var customMeasurements = telemetryItem[strBaseData][_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\n var customProperties = telemetryItem[strBaseData][strProperties] || {};\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], customProperties, customMeasurements);\n if (!isNullOrUndefined(customUndefinedValue)) {\n _convertPropsUndefinedToCustomDefinedValue(customProperties, customUndefinedValue);\n }\n var bd = telemetryItem[strBaseData];\n var exData = Exception.CreateFromInterface(logger, bd, customProperties, customMeasurements);\n var data = new Data(Exception[_DYN_DATA_TYPE /* @min:%2edataType */], exData);\n return _createEnvelope(logger, Exception[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\n}\nexport function MetricEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\n EnvelopeCreatorInit(logger, telemetryItem);\n var baseData = telemetryItem[strBaseData];\n var props = baseData[strProperties] || {};\n var measurements = baseData[_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], props, measurements);\n if (!isNullOrUndefined(customUndefinedValue)) {\n _convertPropsUndefinedToCustomDefinedValue(props, customUndefinedValue);\n }\n var baseMetricData = new Metric(logger, baseData[_DYN_NAME /* @min:%2ename */], baseData.average, baseData.sampleCount, baseData.min, baseData.max, baseData.stdDev, props, measurements);\n var data = new Data(Metric[_DYN_DATA_TYPE /* @min:%2edataType */], baseMetricData);\n return _createEnvelope(logger, Metric[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\n}\nexport function PageViewEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\n EnvelopeCreatorInit(logger, telemetryItem);\n // Since duration is not part of the domain properties in Common Schema, extract it from part C\n var duration;\n var baseData = telemetryItem[strBaseData];\n if (!isNullOrUndefined(baseData) && !isNullOrUndefined(baseData[strProperties]) && !isNullOrUndefined(baseData[strProperties][STR_DURATION])) {\n // from part B properties\n duration = baseData[strProperties][STR_DURATION];\n delete baseData[strProperties][STR_DURATION];\n } else if (!isNullOrUndefined(telemetryItem[_DYN_DATA /* @min:%2edata */]) && !isNullOrUndefined(telemetryItem[_DYN_DATA /* @min:%2edata */][STR_DURATION])) {\n // from custom properties\n duration = telemetryItem[_DYN_DATA /* @min:%2edata */][STR_DURATION];\n delete telemetryItem[_DYN_DATA /* @min:%2edata */][STR_DURATION];\n }\n var bd = telemetryItem[strBaseData];\n // special case: pageview.id is grabbed from current operation id. Analytics plugin is decoupled from properties plugin, so this is done here instead. This can be made a default telemetry intializer instead if needed to be decoupled from channel\n var currentContextId;\n if (((telemetryItem.ext || {}).trace || {})[_DYN_TRACE_ID /* @min:%2etraceID */]) {\n currentContextId = telemetryItem.ext.trace[_DYN_TRACE_ID /* @min:%2etraceID */];\n }\n var id = bd.id || currentContextId;\n var name = bd[_DYN_NAME /* @min:%2ename */];\n var url = bd.uri;\n var properties = bd[strProperties] || {};\n var measurements = bd[_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\n // refUri is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n if (!isNullOrUndefined(bd.refUri)) {\n properties[\"refUri\"] = bd.refUri;\n }\n // pageType is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n if (!isNullOrUndefined(bd.pageType)) {\n properties[\"pageType\"] = bd.pageType;\n }\n // isLoggedIn is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n if (!isNullOrUndefined(bd.isLoggedIn)) {\n properties[\"isLoggedIn\"] = bd.isLoggedIn[_DYN_TO_STRING /* @min:%2etoString */]();\n }\n // pageTags is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\n if (!isNullOrUndefined(bd[strProperties])) {\n var pageTags = bd[strProperties];\n objForEachKey(pageTags, function (key, value) {\n properties[key] = value;\n });\n }\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], properties, measurements);\n if (!isNullOrUndefined(customUndefinedValue)) {\n _convertPropsUndefinedToCustomDefinedValue(properties, customUndefinedValue);\n }\n var pageViewData = new PageView(logger, name, url, duration, properties, measurements, id);\n var data = new Data(PageView[_DYN_DATA_TYPE /* @min:%2edataType */], pageViewData);\n return _createEnvelope(logger, PageView[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\n}\nexport function PageViewPerformanceEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\n EnvelopeCreatorInit(logger, telemetryItem);\n var bd = telemetryItem[strBaseData];\n var name = bd[_DYN_NAME /* @min:%2ename */];\n var url = bd.uri || bd.url;\n var properties = bd[strProperties] || {};\n var measurements = bd[_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], properties, measurements);\n if (!isNullOrUndefined(customUndefinedValue)) {\n _convertPropsUndefinedToCustomDefinedValue(properties, customUndefinedValue);\n }\n var baseData = new PageViewPerformance(logger, name, url, undefined, properties, measurements, bd);\n var data = new Data(PageViewPerformance[_DYN_DATA_TYPE /* @min:%2edataType */], baseData);\n return _createEnvelope(logger, PageViewPerformance[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\n}\nexport function TraceEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {\n EnvelopeCreatorInit(logger, telemetryItem);\n var message = telemetryItem[strBaseData].message;\n var severityLevel = telemetryItem[strBaseData].severityLevel;\n var props = telemetryItem[strBaseData][strProperties] || {};\n var measurements = telemetryItem[strBaseData][_DYN_MEASUREMENTS /* @min:%2emeasurements */] || {};\n _extractPropsAndMeasurements(telemetryItem[_DYN_DATA /* @min:%2edata */], props, measurements);\n if (!isNullOrUndefined(customUndefinedValue)) {\n _convertPropsUndefinedToCustomDefinedValue(props, customUndefinedValue);\n }\n var baseData = new Trace(logger, message, severityLevel, props, measurements);\n var data = new Data(Trace[_DYN_DATA_TYPE /* @min:%2edataType */], baseData);\n return _createEnvelope(logger, Trace[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], telemetryItem, data);\n}\n","/*\n * Application Insights JavaScript SDK - Channel, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { __extendsFn as __extends } from \"@microsoft/applicationinsights-shims\";\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { utlGetSessionStorage, utlRemoveSessionStorage, utlSetSessionStorage } from \"@microsoft/applicationinsights-common\";\nimport { _throwInternal, arrForEach, arrIndexOf, dumpObj, getExceptionName, getJSON, isArray, isFunction, isNullOrUndefined, isString } from \"@microsoft/applicationinsights-core-js\";\nimport { _DYN_BUFFER_OVERRIDE, _DYN_CLEAR, _DYN_CLEAR_SENT, _DYN_CONCAT, _DYN_COUNT, _DYN_CREATE_NEW, _DYN_EMIT_LINE_DELIMITED_0, _DYN_ENQUEUE, _DYN_EVENTS_LIMIT_IN_MEM, _DYN_ITEM, _DYN_LENGTH, _DYN_MARK_AS_SENT, _DYN_PUSH, _DYN_STRINGIFY, _DYN__BUFFER__KEY, _DYN__GET, _DYN__MAX__BUFFER__SIZE, _DYN__SENT__BUFFER__KEY } from \"./__DynamicConstants\";\nvar BaseSendBuffer = /** @class */function () {\n function BaseSendBuffer(logger, config) {\n var _buffer = [];\n var _bufferFullMessageSent = false;\n var _maxRetryCnt = config.maxRetryCnt;\n this[_DYN__GET /* @min:%2e_get */] = function () {\n return _buffer;\n };\n this._set = function (buffer) {\n _buffer = buffer;\n return _buffer;\n };\n dynamicProto(BaseSendBuffer, this, function (_self) {\n _self[_DYN_ENQUEUE /* @min:%2eenqueue */] = function (payload) {\n if (_self[_DYN_COUNT /* @min:%2ecount */]() >= config[_DYN_EVENTS_LIMIT_IN_MEM /* @min:%2eeventsLimitInMem */]) {\n // sent internal log only once per page view\n if (!_bufferFullMessageSent) {\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 105 /* _eInternalMessageId.InMemoryStorageBufferFull */, \"Maximum in-memory buffer size reached: \" + _self[_DYN_COUNT /* @min:%2ecount */](), true);\n _bufferFullMessageSent = true;\n }\n return;\n }\n payload.cnt = payload.cnt || 0;\n // max retry is defined, and max retry is reached, do not add the payload to buffer\n if (!isNullOrUndefined(_maxRetryCnt)) {\n if (payload.cnt > _maxRetryCnt) {\n // TODO: add log here on dropping payloads\n return;\n }\n }\n _buffer[_DYN_PUSH /* @min:%2epush */](payload);\n return;\n };\n _self[_DYN_COUNT /* @min:%2ecount */] = function () {\n return _buffer[_DYN_LENGTH /* @min:%2elength */];\n };\n _self.size = function () {\n var size = _buffer[_DYN_LENGTH /* @min:%2elength */];\n for (var lp = 0; lp < _buffer[_DYN_LENGTH /* @min:%2elength */]; lp++) {\n size += _buffer[lp].item[_DYN_LENGTH /* @min:%2elength */];\n }\n if (!config[_DYN_EMIT_LINE_DELIMITED_0 /* @min:%2eemitLineDelimitedJson */]) {\n size += 2;\n }\n return size;\n };\n _self[_DYN_CLEAR /* @min:%2eclear */] = function () {\n _buffer = [];\n _bufferFullMessageSent = false;\n };\n _self.getItems = function () {\n return _buffer.slice(0);\n };\n _self.batchPayloads = function (payloads) {\n if (payloads && payloads[_DYN_LENGTH /* @min:%2elength */] > 0) {\n var payloadStr_1 = [];\n arrForEach(payloads, function (payload) {\n payloadStr_1[_DYN_PUSH /* @min:%2epush */](payload[_DYN_ITEM /* @min:%2eitem */]);\n });\n var batch = config[_DYN_EMIT_LINE_DELIMITED_0 /* @min:%2eemitLineDelimitedJson */] ? payloadStr_1.join(\"\\n\") : \"[\" + payloadStr_1.join(\",\") + \"]\";\n return batch;\n }\n return null;\n };\n _self[_DYN_CREATE_NEW /* @min:%2ecreateNew */] = function (newLogger, newConfig, canUseSessionStorage) {\n var items = _buffer.slice(0);\n newLogger = newLogger || logger;\n newConfig = newConfig || {};\n var newBuffer = !!canUseSessionStorage ? new SessionStorageSendBuffer(newLogger, newConfig) : new ArraySendBuffer(newLogger, newConfig);\n arrForEach(items, function (payload) {\n newBuffer[_DYN_ENQUEUE /* @min:%2eenqueue */](payload);\n });\n return newBuffer;\n };\n });\n }\n // Removed Stub for BaseSendBuffer.prototype.enqueue.\n // Removed Stub for BaseSendBuffer.prototype.count.\n // Removed Stub for BaseSendBuffer.prototype.size.\n // Removed Stub for BaseSendBuffer.prototype.clear.\n // Removed Stub for BaseSendBuffer.prototype.getItems.\n // Removed Stub for BaseSendBuffer.prototype.batchPayloads.\n // Removed Stub for BaseSendBuffer.prototype.createNew.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n BaseSendBuffer.__ieDyn = 1;\n return BaseSendBuffer;\n}();\n/*\r\n * An array based send buffer.\r\n */\nvar ArraySendBuffer = /** @class */function (_super) {\n __extends(ArraySendBuffer, _super);\n function ArraySendBuffer(logger, config) {\n var _this = _super.call(this, logger, config) || this;\n dynamicProto(ArraySendBuffer, _this, function (_self, _base) {\n _self[_DYN_MARK_AS_SENT /* @min:%2emarkAsSent */] = function (payload) {\n _base[_DYN_CLEAR /* @min:%2eclear */]();\n };\n _self[_DYN_CLEAR_SENT /* @min:%2eclearSent */] = function (payload) {\n // not supported\n };\n });\n return _this;\n }\n // Removed Stub for ArraySendBuffer.prototype.markAsSent.\n // Removed Stub for ArraySendBuffer.prototype.clearSent.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n ArraySendBuffer.__ieDyn = 1;\n return ArraySendBuffer;\n}(BaseSendBuffer);\nexport { ArraySendBuffer };\nvar PREVIOUS_KEYS = [\"AI_buffer\", \"AI_sentBuffer\"];\n/*\r\n * Session storage buffer holds a copy of all unsent items in the browser session storage.\r\n */\nvar SessionStorageSendBuffer = /** @class */function (_super) {\n __extends(SessionStorageSendBuffer, _super);\n function SessionStorageSendBuffer(logger, config) {\n var _this = _super.call(this, logger, config) || this;\n var _bufferFullMessageSent = false;\n //Note: should not use config.namePrefix directly, because it will always refers to the latest namePrefix\n var _namePrefix = config === null || config === void 0 ? void 0 : config.namePrefix;\n // TODO: add remove buffer override as well\n var _b = config[_DYN_BUFFER_OVERRIDE /* @min:%2ebufferOverride */] || {\n getItem: utlGetSessionStorage,\n setItem: utlSetSessionStorage\n },\n getItem = _b.getItem,\n setItem = _b.setItem;\n var _maxRetryCnt = config.maxRetryCnt;\n dynamicProto(SessionStorageSendBuffer, _this, function (_self, _base) {\n var bufferItems = _getBuffer(SessionStorageSendBuffer[_DYN__BUFFER__KEY /* @min:%2eBUFFER_KEY */]);\n var itemsInSentBuffer = _getBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */]);\n var previousItems = _getPreviousEvents();\n var notDeliveredItems = itemsInSentBuffer[_DYN_CONCAT /* @min:%2econcat */](previousItems);\n var buffer = _self._set(bufferItems[_DYN_CONCAT /* @min:%2econcat */](notDeliveredItems));\n // If the buffer has too many items, drop items from the end.\n if (buffer[_DYN_LENGTH /* @min:%2elength */] > SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE /* @min:%2eMAX_BUFFER_SIZE */]) {\n buffer[_DYN_LENGTH /* @min:%2elength */] = SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE /* @min:%2eMAX_BUFFER_SIZE */];\n }\n _setBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */], []);\n _setBuffer(SessionStorageSendBuffer[_DYN__BUFFER__KEY /* @min:%2eBUFFER_KEY */], buffer);\n _self[_DYN_ENQUEUE /* @min:%2eenqueue */] = function (payload) {\n if (_self[_DYN_COUNT /* @min:%2ecount */]() >= SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE /* @min:%2eMAX_BUFFER_SIZE */]) {\n // sent internal log only once per page view\n if (!_bufferFullMessageSent) {\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 67 /* _eInternalMessageId.SessionStorageBufferFull */, \"Maximum buffer size reached: \" + _self[_DYN_COUNT /* @min:%2ecount */](), true);\n _bufferFullMessageSent = true;\n }\n return;\n }\n payload.cnt = payload.cnt || 0;\n // max retry is defined, and max retry is reached, do not add the payload to buffer\n if (!isNullOrUndefined(_maxRetryCnt)) {\n if (payload.cnt > _maxRetryCnt) {\n // TODO: add log here on dropping payloads\n return;\n }\n }\n _base[_DYN_ENQUEUE /* @min:%2eenqueue */](payload);\n _setBuffer(SessionStorageSendBuffer.BUFFER_KEY, _self[_DYN__GET /* @min:%2e_get */]());\n };\n _self[_DYN_CLEAR /* @min:%2eclear */] = function () {\n _base[_DYN_CLEAR /* @min:%2eclear */]();\n _setBuffer(SessionStorageSendBuffer.BUFFER_KEY, _self[_DYN__GET /* @min:%2e_get */]());\n _setBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */], []);\n _bufferFullMessageSent = false;\n };\n _self[_DYN_MARK_AS_SENT /* @min:%2emarkAsSent */] = function (payload) {\n _setBuffer(SessionStorageSendBuffer[_DYN__BUFFER__KEY /* @min:%2eBUFFER_KEY */], _self._set(_removePayloadsFromBuffer(payload, _self[_DYN__GET /* @min:%2e_get */]())));\n var sentElements = _getBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */]);\n if (sentElements instanceof Array && payload instanceof Array) {\n sentElements = sentElements[_DYN_CONCAT /* @min:%2econcat */](payload);\n if (sentElements[_DYN_LENGTH /* @min:%2elength */] > SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE /* @min:%2eMAX_BUFFER_SIZE */]) {\n // We send telemetry normally. If the SENT_BUFFER is too big we don't add new elements\n // until we receive a response from the backend and the buffer has free space again (see clearSent method)\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 67 /* _eInternalMessageId.SessionStorageBufferFull */, \"Sent buffer reached its maximum size: \" + sentElements[_DYN_LENGTH /* @min:%2elength */], true);\n sentElements[_DYN_LENGTH /* @min:%2elength */] = SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE /* @min:%2eMAX_BUFFER_SIZE */];\n }\n _setBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */], sentElements);\n }\n };\n _self[_DYN_CLEAR_SENT /* @min:%2eclearSent */] = function (payload) {\n var sentElements = _getBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */]);\n sentElements = _removePayloadsFromBuffer(payload, sentElements);\n _setBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */], sentElements);\n };\n _self[_DYN_CREATE_NEW /* @min:%2ecreateNew */] = function (newLogger, newConfig, canUseSessionStorage) {\n canUseSessionStorage = !!canUseSessionStorage;\n var unsentItems = _self[_DYN__GET /* @min:%2e_get */]().slice(0);\n var sentItems = _getBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY /* @min:%2eSENT_BUFFER_KEY */]).slice(0);\n newLogger = newLogger || logger;\n newConfig = newConfig || {};\n // to make sure that we do not send duplicated payloads when it is switched back to previous one\n _self[_DYN_CLEAR /* @min:%2eclear */]();\n var newBuffer = canUseSessionStorage ? new SessionStorageSendBuffer(newLogger, newConfig) : new ArraySendBuffer(newLogger, newConfig);\n arrForEach(unsentItems, function (payload) {\n newBuffer[_DYN_ENQUEUE /* @min:%2eenqueue */](payload);\n });\n if (canUseSessionStorage) {\n // arr buffer will clear all payloads if markAsSent() is called\n newBuffer[_DYN_MARK_AS_SENT /* @min:%2emarkAsSent */](sentItems);\n }\n return newBuffer;\n };\n function _removePayloadsFromBuffer(payloads, buffer) {\n var remaining = [];\n var payloadStr = [];\n arrForEach(payloads, function (payload) {\n payloadStr[_DYN_PUSH /* @min:%2epush */](payload[_DYN_ITEM /* @min:%2eitem */]);\n });\n arrForEach(buffer, function (value) {\n if (!isFunction(value) && arrIndexOf(payloadStr, value[_DYN_ITEM /* @min:%2eitem */]) === -1) {\n remaining[_DYN_PUSH /* @min:%2epush */](value);\n }\n });\n return remaining;\n }\n function _getBuffer(key) {\n var prefixedKey = key;\n prefixedKey = _namePrefix ? _namePrefix + \"_\" + prefixedKey : prefixedKey;\n return _getBufferBase(prefixedKey);\n }\n function _getBufferBase(key) {\n try {\n var bufferJson = getItem(logger, key);\n if (bufferJson) {\n var buffer_1 = getJSON().parse(bufferJson);\n if (isString(buffer_1)) {\n // When using some version prototype.js the stringify / parse cycle does not decode array's correctly\n buffer_1 = getJSON().parse(buffer_1);\n }\n if (buffer_1 && isArray(buffer_1)) {\n return buffer_1;\n }\n }\n } catch (e) {\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 42 /* _eInternalMessageId.FailedToRestoreStorageBuffer */, \" storage key: \" + key + \", \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n return [];\n }\n function _setBuffer(key, buffer) {\n var prefixedKey = key;\n try {\n prefixedKey = _namePrefix ? _namePrefix + \"_\" + prefixedKey : prefixedKey;\n var bufferJson = JSON[_DYN_STRINGIFY /* @min:%2estringify */](buffer);\n setItem(logger, prefixedKey, bufferJson);\n } catch (e) {\n // if there was an error, clear the buffer\n // telemetry is stored in the _buffer array so we won't loose any items\n setItem(logger, prefixedKey, JSON[_DYN_STRINGIFY /* @min:%2estringify */]([]));\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 41 /* _eInternalMessageId.FailedToSetStorageBuffer */, \" storage key: \" + prefixedKey + \", \" + getExceptionName(e) + \". Buffer cleared\", {\n exception: dumpObj(e)\n });\n }\n }\n // this removes buffer with prefix+key\n function _getPreviousEvents() {\n var items = [];\n try {\n arrForEach(PREVIOUS_KEYS, function (key) {\n var events = _getItemsFromPreviousKey(key);\n items = items[_DYN_CONCAT /* @min:%2econcat */](events);\n // to make sure that we also transfer items from old prefixed + key buffer\n if (_namePrefix) {\n var prefixedKey = _namePrefix + \"_\" + key;\n var prefixEvents = _getItemsFromPreviousKey(prefixedKey);\n items = items[_DYN_CONCAT /* @min:%2econcat */](prefixEvents);\n }\n });\n return items;\n } catch (e) {\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 41 /* _eInternalMessageId.FailedToSetStorageBuffer */, \"Transfer events from previous buffers: \" + getExceptionName(e) + \". previous Buffer items can not be removed\", {\n exception: dumpObj(e)\n });\n }\n return [];\n }\n // transform string[] to IInternalStorageItem[]\n function _getItemsFromPreviousKey(key) {\n try {\n var items = _getBufferBase(key);\n var transFormedItems_1 = [];\n arrForEach(items, function (item) {\n var internalItem = {\n item: item,\n cnt: 0 // previous events will be default to 0 count\n };\n transFormedItems_1[_DYN_PUSH /* @min:%2epush */](internalItem);\n });\n // remove the session storage if we can add events back\n utlRemoveSessionStorage(logger, key);\n return transFormedItems_1;\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return [];\n }\n });\n return _this;\n }\n // Removed Stub for SessionStorageSendBuffer.prototype.enqueue.\n // Removed Stub for SessionStorageSendBuffer.prototype.clear.\n // Removed Stub for SessionStorageSendBuffer.prototype.markAsSent.\n // Removed Stub for SessionStorageSendBuffer.prototype.clearSent.\n // Removed Stub for SessionStorageSendBuffer.prototype.createNew.\n var _a;\n _a = SessionStorageSendBuffer;\n SessionStorageSendBuffer.VERSION = \"_1\";\n SessionStorageSendBuffer.BUFFER_KEY = \"AI_buffer\" + _a.VERSION;\n SessionStorageSendBuffer.SENT_BUFFER_KEY = \"AI_sentBuffer\" + _a.VERSION;\n // Maximum number of payloads stored in the buffer. If the buffer is full, new elements will be dropped.\n SessionStorageSendBuffer.MAX_BUFFER_SIZE = 2000;\n return SessionStorageSendBuffer;\n}(BaseSendBuffer);\nexport { SessionStorageSendBuffer };\n","/*\n * Application Insights JavaScript SDK - Channel, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { _throwInternal, getJSON, isArray, isFunction, isObject, objForEachKey } from \"@microsoft/applicationinsights-core-js\";\nimport { _DYN_LENGTH, _DYN_PUSH, _DYN_SERIALIZE, _DYN_STRINGIFY, _DYN_TO_STRING } from \"./__DynamicConstants\";\nvar Serializer = /** @class */function () {\n function Serializer(logger) {\n dynamicProto(Serializer, this, function (_self) {\n /**\r\n * Serializes the current object to a JSON string.\r\n */\n _self[_DYN_SERIALIZE /* @min:%2eserialize */] = function (input) {\n var output = _serializeObject(input, \"root\");\n try {\n return getJSON()[_DYN_STRINGIFY /* @min:%2estringify */](output);\n } catch (e) {\n // if serialization fails return an empty string\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.CannotSerializeObject */, e && isFunction(e[_DYN_TO_STRING /* @min:%2etoString */]) ? e[_DYN_TO_STRING /* @min:%2etoString */]() : \"Error serializing object\", null, true);\n }\n };\n function _serializeObject(source, name) {\n var circularReferenceCheck = \"__aiCircularRefCheck\";\n var output = {};\n if (!source) {\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.CannotSerializeObject */, \"cannot serialize object because it is null or undefined\", {\n name: name\n }, true);\n return output;\n }\n if (source[circularReferenceCheck]) {\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 50 /* _eInternalMessageId.CircularReferenceDetected */, \"Circular reference detected while serializing object\", {\n name: name\n }, true);\n return output;\n }\n if (!source.aiDataContract) {\n // special case for measurements/properties/tags\n if (name === \"measurements\") {\n output = _serializeStringMap(source, \"number\", name);\n } else if (name === \"properties\") {\n output = _serializeStringMap(source, \"string\", name);\n } else if (name === \"tags\") {\n output = _serializeStringMap(source, \"string\", name);\n } else if (isArray(source)) {\n output = _serializeArray(source, name);\n } else {\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 49 /* _eInternalMessageId.CannotSerializeObjectNonSerializable */, \"Attempting to serialize an object which does not implement ISerializable\", {\n name: name\n }, true);\n try {\n // verify that the object can be stringified\n getJSON()[_DYN_STRINGIFY /* @min:%2estringify */](source);\n output = source;\n } catch (e) {\n // if serialization fails return an empty string\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.CannotSerializeObject */, e && isFunction(e[_DYN_TO_STRING /* @min:%2etoString */]) ? e[_DYN_TO_STRING /* @min:%2etoString */]() : \"Error serializing object\", null, true);\n }\n }\n return output;\n }\n source[circularReferenceCheck] = true;\n objForEachKey(source.aiDataContract, function (field, contract) {\n var isRequired = isFunction(contract) ? contract() & 1 /* FieldType.Required */ : contract & 1 /* FieldType.Required */;\n var isHidden = isFunction(contract) ? contract() & 4 /* FieldType.Hidden */ : contract & 4 /* FieldType.Hidden */;\n var isArray = contract & 2 /* FieldType.Array */;\n var isPresent = source[field] !== undefined;\n var isObj = isObject(source[field]) && source[field] !== null;\n if (isRequired && !isPresent && !isArray) {\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 24 /* _eInternalMessageId.MissingRequiredFieldSpecification */, \"Missing required field specification. The field is required but not present on source\", {\n field: field,\n name: name\n });\n // If not in debug mode, continue and hope the error is permissible\n } else if (!isHidden) {\n // Don't serialize hidden fields\n var value = void 0;\n if (isObj) {\n if (isArray) {\n // special case; recurse on each object in the source array\n value = _serializeArray(source[field], field);\n } else {\n // recurse on the source object in this field\n value = _serializeObject(source[field], field);\n }\n } else {\n // assign the source field to the output even if undefined or required\n value = source[field];\n }\n // only emit this field if the value is defined\n if (value !== undefined) {\n output[field] = value;\n }\n }\n });\n delete source[circularReferenceCheck];\n return output;\n }\n function _serializeArray(sources, name) {\n var output;\n if (!!sources) {\n if (!isArray(sources)) {\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, 54 /* _eInternalMessageId.ItemNotInArray */, \"This field was specified as an array in the contract but the item is not an array.\\r\\n\", {\n name: name\n }, true);\n } else {\n output = [];\n for (var i = 0; i < sources[_DYN_LENGTH /* @min:%2elength */]; i++) {\n var source = sources[i];\n var item = _serializeObject(source, name + \"[\" + i + \"]\");\n output[_DYN_PUSH /* @min:%2epush */](item);\n }\n }\n }\n return output;\n }\n function _serializeStringMap(map, expectedType, name) {\n var output;\n if (map) {\n output = {};\n objForEachKey(map, function (field, value) {\n if (expectedType === \"string\") {\n if (value === undefined) {\n output[field] = \"undefined\";\n } else if (value === null) {\n output[field] = \"null\";\n } else if (!value[_DYN_TO_STRING /* @min:%2etoString */]) {\n output[field] = \"invalid field: toString() is not defined.\";\n } else {\n output[field] = value[_DYN_TO_STRING /* @min:%2etoString */]();\n }\n } else if (expectedType === \"number\") {\n if (value === undefined) {\n output[field] = \"undefined\";\n } else if (value === null) {\n output[field] = \"null\";\n } else {\n var num = parseFloat(value);\n output[field] = num;\n }\n } else {\n output[field] = \"invalid field: \" + name + \" is of unknown type.\";\n _throwInternal(logger, 1 /* eLoggingSeverity.CRITICAL */, output[field], null, true);\n }\n });\n }\n return output;\n }\n });\n }\n // Removed Stub for Serializer.prototype.serialize.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n Serializer.__ieDyn = 1;\n return Serializer;\n}();\nexport { Serializer };\n","/*\n * Application Insights JavaScript SDK - Channel, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { _DYN_CONCAT, _DYN_LENGTH } from \"../../__DynamicConstants\";\n// (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution\nvar MIN_INPUT_LENGTH = 8;\nvar HashCodeScoreGenerator = /** @class */function () {\n function HashCodeScoreGenerator() {}\n HashCodeScoreGenerator.prototype.getHashCodeScore = function (key) {\n var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;\n return score * 100;\n };\n HashCodeScoreGenerator.prototype.getHashCode = function (input) {\n if (input === \"\") {\n return 0;\n }\n while (input[_DYN_LENGTH /* @min:%2elength */] < MIN_INPUT_LENGTH) {\n input = input[_DYN_CONCAT /* @min:%2econcat */](input);\n }\n // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function\n var hash = 5381;\n for (var i = 0; i < input[_DYN_LENGTH /* @min:%2elength */]; ++i) {\n hash = (hash << 5) + hash + input.charCodeAt(i);\n // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)\n // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.\n hash = hash & hash;\n }\n return Math.abs(hash);\n };\n // We're using 32 bit math, hence max value is (2^31 - 1)\n HashCodeScoreGenerator.INT_MAX_VALUE = 2147483647;\n return HashCodeScoreGenerator;\n}();\nexport { HashCodeScoreGenerator };\n","/*\n * Application Insights JavaScript SDK - Channel, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { ContextTagKeys } from \"@microsoft/applicationinsights-common\";\nimport { _DYN_GET_HASH_CODE_SCORE, _DYN_GET_SAMPLING_SCORE, _DYN_TAGS, _DYN_TRACE_ID } from \"../../__DynamicConstants\";\nimport { HashCodeScoreGenerator } from \"./HashCodeScoreGenerator\";\nvar SamplingScoreGenerator = /** @class */function () {\n function SamplingScoreGenerator() {\n var _self = this;\n var hashCodeGenerator = new HashCodeScoreGenerator();\n var keys = new ContextTagKeys();\n _self[_DYN_GET_SAMPLING_SCORE /* @min:%2egetSamplingScore */] = function (item) {\n var score = 0;\n if (item[_DYN_TAGS /* @min:%2etags */] && item[_DYN_TAGS /* @min:%2etags */][keys.userId]) {\n // search in tags first, then ext\n score = hashCodeGenerator.getHashCodeScore(item[_DYN_TAGS /* @min:%2etags */][keys.userId]);\n } else if (item.ext && item.ext.user && item.ext.user.id) {\n score = hashCodeGenerator[_DYN_GET_HASH_CODE_SCORE /* @min:%2egetHashCodeScore */](item.ext.user.id);\n } else if (item[_DYN_TAGS /* @min:%2etags */] && item[_DYN_TAGS /* @min:%2etags */][keys.operationId]) {\n // search in tags first, then ext\n score = hashCodeGenerator.getHashCodeScore(item[_DYN_TAGS /* @min:%2etags */][keys.operationId]);\n } else if (item.ext && item.ext.telemetryTrace && item.ext.telemetryTrace[_DYN_TRACE_ID /* @min:%2etraceID */]) {\n score = hashCodeGenerator.getHashCodeScore(item.ext.telemetryTrace[_DYN_TRACE_ID /* @min:%2etraceID */]);\n } else {\n // tslint:disable-next-line:insecure-random\n score = Math.random() * 100;\n }\n return score;\n };\n }\n return SamplingScoreGenerator;\n}();\nexport { SamplingScoreGenerator };\n","/*\n * Application Insights JavaScript SDK - Channel, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { Metric } from \"@microsoft/applicationinsights-common\";\nimport { safeGetLogger } from \"@microsoft/applicationinsights-core-js\";\nimport { _DYN_DATA_TYPE, _DYN_GET_SAMPLING_SCORE, _DYN_SAMPLE_RATE } from \"../__DynamicConstants\";\nimport { SamplingScoreGenerator } from \"./SamplingScoreGenerators/SamplingScoreGenerator\";\nvar Sample = /** @class */function () {\n function Sample(sampleRate, logger) {\n // We're using 32 bit math, hence max value is (2^31 - 1)\n this.INT_MAX_VALUE = 2147483647;\n var _logger = logger || safeGetLogger(null);\n if (sampleRate > 100 || sampleRate < 0) {\n _logger.throwInternal(2 /* eLoggingSeverity.WARNING */, 58 /* _eInternalMessageId.SampleRateOutOfRange */, \"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.\", {\n samplingRate: sampleRate\n }, true);\n sampleRate = 100;\n }\n this[_DYN_SAMPLE_RATE /* @min:%2esampleRate */] = sampleRate;\n this.samplingScoreGenerator = new SamplingScoreGenerator();\n }\n /**\r\n * Determines if an envelope is sampled in (i.e. will be sent) or not (i.e. will be dropped).\r\n */\n Sample.prototype.isSampledIn = function (envelope) {\n var samplingPercentage = this[_DYN_SAMPLE_RATE /* @min:%2esampleRate */]; // 0 - 100\n var isSampledIn = false;\n if (samplingPercentage === null || samplingPercentage === undefined || samplingPercentage >= 100) {\n return true;\n } else if (envelope.baseType === Metric[_DYN_DATA_TYPE /* @min:%2edataType */]) {\n // exclude MetricData telemetry from sampling\n return true;\n }\n isSampledIn = this.samplingScoreGenerator[_DYN_GET_SAMPLING_SCORE /* @min:%2egetSamplingScore */](envelope) < samplingPercentage;\n return isSampledIn;\n };\n return Sample;\n}();\nexport { Sample };\n","/*\n * Application Insights JavaScript SDK - Channel, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nvar _a, _b;\nimport { __assignFn as __assign, __extendsFn as __extends } from \"@microsoft/applicationinsights-shims\";\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { BreezeChannelIdentifier, DEFAULT_BREEZE_ENDPOINT, DEFAULT_BREEZE_PATH, Event, Exception, Metric, PageView, PageViewPerformance, ProcessLegacy, RemoteDependencyData, RequestHeaders, SampleRate, Trace, createOfflineListener, isInternalApplicationInsightsEndpoint, utlCanUseSessionStorage, utlSetStoragePrefix } from \"@microsoft/applicationinsights-common\";\nimport { ActiveStatus, BaseTelemetryPlugin, SenderPostManager, _throwInternal, _warnToConsole, arrForEach, cfgDfBoolean, cfgDfValidate, createProcessTelemetryContext, createUniqueNamespace, dateNow, dumpObj, formatErrorMessageXdr, formatErrorMessageXhr, getExceptionName, getIEVersion, isArray, isBeaconsSupported, isFetchSupported, isNullOrUndefined, mergeEvtNamespace, objExtend, onConfigChange, parseResponse, prependTransports, runTargetUnload } from \"@microsoft/applicationinsights-core-js\";\nimport { isNumber, isPromiseLike, isString, isTruthy, objDeepFreeze, objDefine, scheduleTimeout } from \"@nevware21/ts-utils\";\nimport { DependencyEnvelopeCreator, EventEnvelopeCreator, ExceptionEnvelopeCreator, MetricEnvelopeCreator, PageViewEnvelopeCreator, PageViewPerformanceEnvelopeCreator, TraceEnvelopeCreator } from \"./EnvelopeCreator\";\nimport { ArraySendBuffer, SessionStorageSendBuffer } from \"./SendBuffer\";\nimport { Serializer } from \"./Serializer\";\nimport { Sample } from \"./TelemetryProcessors/Sample\";\nimport { _DYN_ALWAYS_USE_XHR_OVERR4, _DYN_BASE_TYPE, _DYN_BUFFER_OVERRIDE, _DYN_CLEAR, _DYN_CLEAR_SENT, _DYN_CONVERT_UNDEFINED, _DYN_COUNT, _DYN_CREATE_NEW, _DYN_CUSTOM_HEADERS, _DYN_DATA, _DYN_DIAG_LOG, _DYN_DISABLE_SEND_BEACON_7, _DYN_DISABLE_XHR, _DYN_EMIT_LINE_DELIMITED_0, _DYN_ENABLE_SEND_PROMISE, _DYN_ENABLE_SESSION_STORA5, _DYN_ENDPOINT_URL, _DYN_ENQUEUE, _DYN_EVENTS_LIMIT_IN_MEM, _DYN_EVENTS_SEND_REQUEST, _DYN_GET_SENDER_INST, _DYN_INITIALIZE, _DYN_INSTRUMENTATION_KEY, _DYN_IS_BEACON_API_DISABL3, _DYN_ITEM, _DYN_ITEMS_ACCEPTED, _DYN_ITEMS_RECEIVED, _DYN_LENGTH, _DYN_MARK_AS_SENT, _DYN_MAX_BATCH_INTERVAL, _DYN_MAX_BATCH_SIZE_IN_BY1, _DYN_ONUNLOAD_DISABLE_BEA2, _DYN_ONUNLOAD_DISABLE_FET6, _DYN_ORI_PAYLOAD, _DYN_PUSH, _DYN_SAMPLE_RATE, _DYN_SERIALIZE, _DYN_TAGS, _DYN_TRIGGER_SEND, _DYN_UNLOAD_TRANSPORTS, _DYN__BUFFER, _DYN__ON_ERROR, _DYN__ON_PARTIAL_SUCCESS, _DYN__ON_SUCCESS, _DYN__SENDER } from \"./__DynamicConstants\";\nvar UNDEFINED_VALUE = undefined;\nvar EMPTY_STR = \"\";\nvar FetchSyncRequestSizeLimitBytes = 65000; // approx 64kb (the current Edge, Firefox and Chrome max limit)\nfunction _getResponseText(xhr) {\n try {\n return xhr.responseText;\n } catch (e) {\n // Best effort, as XHR may throw while XDR wont so just ignore\n }\n return null;\n}\nfunction isOverrideFn(httpXHROverride) {\n return httpXHROverride && httpXHROverride.sendPOST;\n}\nvar defaultAppInsightsChannelConfig = objDeepFreeze((_a = {\n // Use the default value (handles empty string in the configuration)\n endpointUrl: cfgDfValidate(isTruthy, DEFAULT_BREEZE_ENDPOINT + DEFAULT_BREEZE_PATH)\n}, _a[_DYN_EMIT_LINE_DELIMITED_0 /* @min:emitLineDelimitedJson */] = cfgDfBoolean(), _a[_DYN_MAX_BATCH_INTERVAL /* @min:maxBatchInterval */] = 15000, _a[_DYN_MAX_BATCH_SIZE_IN_BY1 /* @min:maxBatchSizeInBytes */] = 102400, _a.disableTelemetry = cfgDfBoolean(), _a[_DYN_ENABLE_SESSION_STORA5 /* @min:enableSessionStorageBuffer */] = cfgDfBoolean(true), _a.isRetryDisabled = cfgDfBoolean(), _a[_DYN_IS_BEACON_API_DISABL3 /* @min:isBeaconApiDisabled */] = cfgDfBoolean(true), _a[_DYN_DISABLE_SEND_BEACON_7 /* @min:disableSendBeaconSplit */] = cfgDfBoolean(true), _a[_DYN_DISABLE_XHR /* @min:disableXhr */] = cfgDfBoolean(), _a[_DYN_ONUNLOAD_DISABLE_FET6 /* @min:onunloadDisableFetch */] = cfgDfBoolean(), _a[_DYN_ONUNLOAD_DISABLE_BEA2 /* @min:onunloadDisableBeacon */] = cfgDfBoolean(), _a[_DYN_INSTRUMENTATION_KEY /* @min:instrumentationKey */] = UNDEFINED_VALUE, _a.namePrefix = UNDEFINED_VALUE, _a.samplingPercentage = cfgDfValidate(_chkSampling, 100), _a[_DYN_CUSTOM_HEADERS /* @min:customHeaders */] = UNDEFINED_VALUE, _a[_DYN_CONVERT_UNDEFINED /* @min:convertUndefined */] = UNDEFINED_VALUE, _a[_DYN_EVENTS_LIMIT_IN_MEM /* @min:eventsLimitInMem */] = 10000, _a[_DYN_BUFFER_OVERRIDE /* @min:bufferOverride */] = false, _a.httpXHROverride = {\n isVal: isOverrideFn,\n v: UNDEFINED_VALUE\n}, _a[_DYN_ALWAYS_USE_XHR_OVERR4 /* @min:alwaysUseXhrOverride */] = cfgDfBoolean(), _a.transports = UNDEFINED_VALUE, _a.retryCodes = UNDEFINED_VALUE, _a.maxRetryCnt = {\n isVal: isNumber,\n v: 10\n}, _a));\nfunction _chkSampling(value) {\n return !isNaN(value) && value > 0 && value <= 100;\n}\nvar EnvelopeTypeCreator = (_b = {}, _b[Event.dataType] = EventEnvelopeCreator, _b[Trace.dataType] = TraceEnvelopeCreator, _b[PageView.dataType] = PageViewEnvelopeCreator, _b[PageViewPerformance.dataType] = PageViewPerformanceEnvelopeCreator, _b[Exception.dataType] = ExceptionEnvelopeCreator, _b[Metric.dataType] = MetricEnvelopeCreator, _b[RemoteDependencyData.dataType] = DependencyEnvelopeCreator, _b);\nvar Sender = /** @class */function (_super) {\n __extends(Sender, _super);\n function Sender() {\n var _this = _super.call(this) || this;\n _this.priority = 1001;\n _this.identifier = BreezeChannelIdentifier;\n // Don't set the defaults here, set them in the _initDefaults() as this is also called during unload\n var _consecutiveErrors; // How many times in a row a retryable error condition has occurred.\n var _retryAt; // The time to retry at in milliseconds from 1970/01/01 (this makes the timer calculation easy).\n var _lastSend; // The time of the last send operation.\n var _paused; // Flag indicating that the sending should be paused\n var _timeoutHandle; // Handle to the timer for delayed sending of batches of data.\n var _serializer;\n var _stamp_specific_redirects;\n var _headers;\n var _syncFetchPayload = 0; // Keep track of the outstanding sync fetch payload total (as sync fetch has limits)\n var _syncUnloadSender; // The identified sender to use for the synchronous unload stage\n var _offlineListener;\n var _evtNamespace;\n var _endpointUrl;\n var _orgEndpointUrl;\n var _maxBatchSizeInBytes;\n var _beaconSupported;\n var _beaconOnUnloadSupported;\n var _beaconNormalSupported;\n var _customHeaders;\n var _disableTelemetry;\n var _instrumentationKey;\n var _convertUndefined;\n var _isRetryDisabled;\n var _maxBatchInterval;\n var _sessionStorageUsed;\n var _bufferOverrideUsed;\n var _namePrefix;\n var _enableSendPromise;\n var _alwaysUseCustomSend;\n var _disableXhr;\n var _fetchKeepAlive;\n var _xhrSend;\n var _fallbackSend;\n var _disableBeaconSplit;\n var _sendPostMgr;\n var _retryCodes;\n dynamicProto(Sender, _this, function (_self, _base) {\n _initDefaults();\n _self.pause = function () {\n _clearScheduledTimer();\n _paused = true;\n };\n _self.resume = function () {\n if (_paused) {\n _paused = false;\n _retryAt = null;\n // flush if we have exceeded the max-size already\n _checkMaxSize();\n _setupTimer();\n }\n };\n _self.flush = function (isAsync, callBack, sendReason) {\n if (isAsync === void 0) {\n isAsync = true;\n }\n if (!_paused) {\n // Clear the normal schedule timer as we are going to try and flush ASAP\n _clearScheduledTimer();\n try {\n return _self[_DYN_TRIGGER_SEND /* @min:%2etriggerSend */](isAsync, null, sendReason || 1 /* SendRequestReason.ManualFlush */);\n } catch (e) {\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 22 /* _eInternalMessageId.FlushFailed */, \"flush failed, telemetry will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n };\n _self.onunloadFlush = function () {\n if (!_paused) {\n if (_beaconSupported || _alwaysUseCustomSend) {\n try {\n return _self[_DYN_TRIGGER_SEND /* @min:%2etriggerSend */](true, _doUnloadSend, 2 /* SendRequestReason.Unload */);\n } catch (e) {\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 20 /* _eInternalMessageId.FailedToSendQueuedTelemetry */, \"failed to flush with beacon sender on page unload, telemetry will not be collected: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n } else {\n _self.flush(false);\n }\n }\n };\n _self.addHeader = function (name, value) {\n _headers[name] = value;\n };\n _self[_DYN_INITIALIZE /* @min:%2einitialize */] = function (config, core, extensions, pluginChain) {\n if (_self.isInitialized()) {\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 28 /* _eInternalMessageId.SenderNotInitialized */, \"Sender is already initialized\");\n }\n _base[_DYN_INITIALIZE /* @min:%2einitialize */](config, core, extensions, pluginChain);\n var identifier = _self.identifier;\n _serializer = new Serializer(core.logger);\n _consecutiveErrors = 0;\n _retryAt = null;\n _lastSend = 0;\n _self[_DYN__SENDER /* @min:%2e_sender */] = null;\n _stamp_specific_redirects = 0;\n var diagLog = _self[_DYN_DIAG_LOG /* @min:%2ediagLog */]();\n _evtNamespace = mergeEvtNamespace(createUniqueNamespace(\"Sender\"), core.evtNamespace && core.evtNamespace());\n _offlineListener = createOfflineListener(_evtNamespace);\n // This function will be re-called whenever any referenced configuration is changed\n _self._addHook(onConfigChange(config, function (details) {\n var config = details.cfg;\n if (config.storagePrefix) {\n utlSetStoragePrefix(config.storagePrefix);\n }\n var ctx = createProcessTelemetryContext(null, config, core);\n // getExtCfg only finds undefined values from core\n var senderConfig = ctx.getExtCfg(identifier, defaultAppInsightsChannelConfig);\n var curExtUrl = senderConfig[_DYN_ENDPOINT_URL /* @min:%2eendpointUrl */];\n // if it is not inital change (_endpointUrl has value)\n // if current sender endpoint url is not changed directly\n // means ExtCfg is not changed directly\n // then we need to monitor endpoint url changes from core\n if (_endpointUrl && curExtUrl === _endpointUrl) {\n var coreUrl = config[_DYN_ENDPOINT_URL /* @min:%2eendpointUrl */];\n // if core endpoint url is changed\n if (coreUrl && coreUrl !== curExtUrl) {\n // and endpoint promise changes is handled by this as well\n senderConfig[_DYN_ENDPOINT_URL /* @min:%2eendpointUrl */] = coreUrl;\n }\n }\n if (isPromiseLike(senderConfig[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */])) {\n // if it is promise, means the endpoint url is from core.endpointurl\n senderConfig[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */] = config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */];\n }\n objDefine(_self, \"_senderConfig\", {\n g: function () {\n return senderConfig;\n }\n });\n // Only update the endpoint if the original config !== the current config\n // This is so any redirect endpointUrl is not overwritten\n if (_orgEndpointUrl !== senderConfig[_DYN_ENDPOINT_URL /* @min:%2eendpointUrl */]) {\n if (_orgEndpointUrl) {\n // TODO: add doc to remind users to flush before changing endpoint, otherwise all unsent payload will be sent to new endpoint\n }\n _endpointUrl = _orgEndpointUrl = senderConfig[_DYN_ENDPOINT_URL /* @min:%2eendpointUrl */];\n }\n // or is not string\n if (core.activeStatus() === ActiveStatus.PENDING) {\n // waiting for core promises to be resolved\n // NOTE: if active status is set to pending, stop sending, clear timer here\n _self.pause();\n } else if (core.activeStatus() === ActiveStatus.ACTIVE) {\n // core status changed from pending to other status\n _self.resume();\n }\n if (_customHeaders && _customHeaders !== senderConfig[_DYN_CUSTOM_HEADERS /* @min:%2ecustomHeaders */]) {\n // Removing any previously defined custom headers as they have changed\n arrForEach(_customHeaders, function (customHeader) {\n delete _headers[customHeader.header];\n });\n }\n _maxBatchSizeInBytes = senderConfig[_DYN_MAX_BATCH_SIZE_IN_BY1 /* @min:%2emaxBatchSizeInBytes */];\n _beaconSupported = (senderConfig[_DYN_ONUNLOAD_DISABLE_BEA2 /* @min:%2eonunloadDisableBeacon */] === false || senderConfig[_DYN_IS_BEACON_API_DISABL3 /* @min:%2eisBeaconApiDisabled */] === false) && isBeaconsSupported();\n _beaconOnUnloadSupported = senderConfig[_DYN_ONUNLOAD_DISABLE_BEA2 /* @min:%2eonunloadDisableBeacon */] === false && isBeaconsSupported();\n _beaconNormalSupported = senderConfig[_DYN_IS_BEACON_API_DISABL3 /* @min:%2eisBeaconApiDisabled */] === false && isBeaconsSupported();\n _alwaysUseCustomSend = senderConfig[_DYN_ALWAYS_USE_XHR_OVERR4 /* @min:%2ealwaysUseXhrOverride */];\n _disableXhr = !!senderConfig[_DYN_DISABLE_XHR /* @min:%2edisableXhr */];\n _retryCodes = senderConfig.retryCodes;\n var bufferOverride = senderConfig[_DYN_BUFFER_OVERRIDE /* @min:%2ebufferOverride */];\n var canUseSessionStorage = !!senderConfig[_DYN_ENABLE_SESSION_STORA5 /* @min:%2eenableSessionStorageBuffer */] && (!!bufferOverride || utlCanUseSessionStorage());\n var namePrefix = senderConfig.namePrefix;\n //Note: emitLineDelimitedJson and eventsLimitInMem is directly accessed via config in senderBuffer\n //Therefore, if canUseSessionStorage is not changed, we do not need to re initialize a new one\n var shouldUpdate = canUseSessionStorage !== _sessionStorageUsed || canUseSessionStorage && _namePrefix !== namePrefix // prefixName is only used in session storage\n || canUseSessionStorage && _bufferOverrideUsed !== bufferOverride;\n if (_self[_DYN__BUFFER /* @min:%2e_buffer */]) {\n // case1 (Pre and Now enableSessionStorageBuffer settings are same)\n // if namePrefix changes, transfer current buffer to new buffer\n // else no action needed\n //case2 (Pre and Now enableSessionStorageBuffer settings are changed)\n // transfer current buffer to new buffer\n if (shouldUpdate) {\n try {\n _self._buffer = _self._buffer[_DYN_CREATE_NEW /* @min:%2ecreateNew */](diagLog, senderConfig, canUseSessionStorage);\n } catch (e) {\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 12 /* _eInternalMessageId.FailedAddingTelemetryToBuffer */, \"failed to transfer telemetry to different buffer storage, telemetry will be lost: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n _checkMaxSize();\n } else {\n _self[_DYN__BUFFER /* @min:%2e_buffer */] = canUseSessionStorage ? new SessionStorageSendBuffer(diagLog, senderConfig) : new ArraySendBuffer(diagLog, senderConfig);\n }\n _namePrefix = namePrefix;\n _sessionStorageUsed = canUseSessionStorage;\n _bufferOverrideUsed = bufferOverride;\n _fetchKeepAlive = !senderConfig[_DYN_ONUNLOAD_DISABLE_FET6 /* @min:%2eonunloadDisableFetch */] && isFetchSupported(true);\n _disableBeaconSplit = !!senderConfig[_DYN_DISABLE_SEND_BEACON_7 /* @min:%2edisableSendBeaconSplit */];\n _self._sample = new Sample(senderConfig.samplingPercentage, diagLog);\n _instrumentationKey = senderConfig[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */];\n if (!isPromiseLike(_instrumentationKey) && !_validateInstrumentationKey(_instrumentationKey, config)) {\n _throwInternal(diagLog, 1 /* eLoggingSeverity.CRITICAL */, 100 /* _eInternalMessageId.InvalidInstrumentationKey */, \"Invalid Instrumentation key \" + _instrumentationKey);\n }\n _customHeaders = senderConfig[_DYN_CUSTOM_HEADERS /* @min:%2ecustomHeaders */];\n if (isString(_endpointUrl) && !isInternalApplicationInsightsEndpoint(_endpointUrl) && _customHeaders && _customHeaders[_DYN_LENGTH /* @min:%2elength */] > 0) {\n arrForEach(_customHeaders, function (customHeader) {\n _this.addHeader(customHeader.header, customHeader.value);\n });\n } else {\n _customHeaders = null;\n }\n _enableSendPromise = senderConfig[_DYN_ENABLE_SEND_PROMISE /* @min:%2eenableSendPromise */];\n var sendPostConfig = _getSendPostMgrConfig();\n // only init it once\n if (!_sendPostMgr) {\n _sendPostMgr = new SenderPostManager();\n _sendPostMgr[_DYN_INITIALIZE /* @min:%2einitialize */](sendPostConfig, diagLog);\n } else {\n _sendPostMgr.SetConfig(sendPostConfig);\n }\n var customInterface = senderConfig.httpXHROverride;\n var httpInterface = null;\n var syncInterface = null;\n // User requested transport(s) values > Beacon > Fetch > XHR\n // Beacon would be filtered out if user has set disableBeaconApi to true at _getSenderInterface\n var theTransports = prependTransports([3 /* TransportType.Beacon */, 1 /* TransportType.Xhr */, 2 /* TransportType.Fetch */], senderConfig.transports);\n httpInterface = _sendPostMgr && _sendPostMgr[_DYN_GET_SENDER_INST /* @min:%2egetSenderInst */](theTransports, false);\n var xhrInterface = _sendPostMgr && _sendPostMgr.getFallbackInst();\n _xhrSend = function (payload, isAsync) {\n return _doSend(xhrInterface, payload, isAsync);\n };\n _fallbackSend = function (payload, isAsync) {\n return _doSend(xhrInterface, payload, isAsync, false);\n };\n httpInterface = _alwaysUseCustomSend ? customInterface : httpInterface || customInterface || xhrInterface;\n _self[_DYN__SENDER /* @min:%2e_sender */] = function (payload, isAsync) {\n return _doSend(httpInterface, payload, isAsync);\n };\n if (_fetchKeepAlive) {\n // Try and use the fetch with keepalive\n _syncUnloadSender = _fetchKeepAliveSender;\n }\n var syncTransports = prependTransports([3 /* TransportType.Beacon */, 1 /* TransportType.Xhr */], senderConfig[_DYN_UNLOAD_TRANSPORTS /* @min:%2eunloadTransports */]);\n if (!_fetchKeepAlive) {\n // remove fetch from theTransports\n syncTransports = syncTransports.filter(function (transport) {\n return transport !== 2 /* TransportType.Fetch */;\n });\n }\n syncInterface = _sendPostMgr && _sendPostMgr[_DYN_GET_SENDER_INST /* @min:%2egetSenderInst */](syncTransports, true);\n syncInterface = _alwaysUseCustomSend ? customInterface : syncInterface || customInterface;\n if ((_alwaysUseCustomSend || senderConfig[_DYN_UNLOAD_TRANSPORTS /* @min:%2eunloadTransports */] || !_syncUnloadSender) && syncInterface) {\n _syncUnloadSender = function (payload, isAsync) {\n return _doSend(syncInterface, payload, isAsync);\n };\n }\n if (!_syncUnloadSender) {\n _syncUnloadSender = _xhrSend;\n }\n _disableTelemetry = senderConfig.disableTelemetry;\n _convertUndefined = senderConfig[_DYN_CONVERT_UNDEFINED /* @min:%2econvertUndefined */] || UNDEFINED_VALUE;\n _isRetryDisabled = senderConfig.isRetryDisabled;\n _maxBatchInterval = senderConfig[_DYN_MAX_BATCH_INTERVAL /* @min:%2emaxBatchInterval */];\n }));\n };\n _self.processTelemetry = function (telemetryItem, itemCtx) {\n var _a;\n itemCtx = _self._getTelCtx(itemCtx);\n var diagLogger = itemCtx[_DYN_DIAG_LOG /* @min:%2ediagLog */]();\n try {\n var isValidate = _validate(telemetryItem, diagLogger);\n if (!isValidate) {\n return;\n }\n var aiEnvelope = _getEnvelope(telemetryItem, diagLogger);\n if (!aiEnvelope) {\n return;\n }\n // check if the incoming payload is too large, truncate if necessary\n var payload = _serializer[_DYN_SERIALIZE /* @min:%2eserialize */](aiEnvelope);\n // flush if we would exceed the max-size limit by adding this item\n var buffer = _self[_DYN__BUFFER /* @min:%2e_buffer */];\n _checkMaxSize(payload);\n var payloadItem = (_a = {}, _a[_DYN_ITEM /* @min:item */] = payload, _a.cnt = 0 // inital cnt will always be 0\n , _a);\n // enqueue the payload\n buffer[_DYN_ENQUEUE /* @min:%2eenqueue */](payloadItem);\n // ensure an invocation timeout is set\n _setupTimer();\n } catch (e) {\n _throwInternal(diagLogger, 2 /* eLoggingSeverity.WARNING */, 12 /* _eInternalMessageId.FailedAddingTelemetryToBuffer */, \"Failed adding telemetry to the sender's buffer, some telemetry will be lost: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n // hand off the telemetry item to the next plugin\n _self.processNext(telemetryItem, itemCtx);\n };\n _self.isCompletelyIdle = function () {\n return !_paused && _syncFetchPayload === 0 && _self._buffer[_DYN_COUNT /* @min:%2ecount */]() === 0;\n };\n _self.getOfflineListener = function () {\n return _offlineListener;\n };\n /**\r\n * xhr state changes\r\n */\n _self._xhrReadyStateChange = function (xhr, payload, countOfItemsInPayload) {\n // since version 3.2.0, this function is no-op\n if (_isStringArr(payload)) {\n return;\n }\n return _xhrReadyStateChange(xhr, payload, countOfItemsInPayload);\n };\n /**\r\n * Immediately send buffered data\r\n * @param async - {boolean} - Indicates if the events should be sent asynchronously\r\n * @param forcedSender - {SenderFunction} - Indicates the forcedSender, undefined if not passed\r\n */\n _self[_DYN_TRIGGER_SEND /* @min:%2etriggerSend */] = function (async, forcedSender, sendReason) {\n if (async === void 0) {\n async = true;\n }\n var result;\n if (!_paused) {\n try {\n var buffer = _self[_DYN__BUFFER /* @min:%2e_buffer */];\n // Send data only if disableTelemetry is false\n if (!_disableTelemetry) {\n if (buffer[_DYN_COUNT /* @min:%2ecount */]() > 0) {\n var payload = buffer.getItems();\n _notifySendRequest(sendReason || 0 /* SendRequestReason.Undefined */, async);\n // invoke send\n if (forcedSender) {\n result = forcedSender.call(_self, payload, async);\n } else {\n result = _self[_DYN__SENDER /* @min:%2e_sender */](payload, async);\n }\n }\n // update lastSend time to enable throttling\n _lastSend = +new Date();\n } else {\n buffer[_DYN_CLEAR /* @min:%2eclear */]();\n }\n _clearScheduledTimer();\n } catch (e) {\n /* Ignore this error for IE under v10 */\n var ieVer = getIEVersion();\n if (!ieVer || ieVer > 9) {\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 40 /* _eInternalMessageId.TransmissionFailed */, \"Telemetry transmission failed, some telemetry will be lost: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n }\n return result;\n };\n _self.getOfflineSupport = function () {\n var _a;\n return _a = {\n getUrl: function () {\n return _endpointUrl;\n },\n createPayload: _createPayload\n }, _a[_DYN_SERIALIZE /* @min:serialize */] = _serialize, _a.batch = _batch, _a.shouldProcess = function (evt) {\n return !!_validate(evt);\n }, _a;\n };\n _self._doTeardown = function (unloadCtx, unloadState) {\n _self.onunloadFlush();\n runTargetUnload(_offlineListener, false);\n _initDefaults();\n };\n /**\r\n * error handler\r\n */\n _self[_DYN__ON_ERROR /* @min:%2e_onError */] = function (payload, message, event) {\n // since version 3.1.3, string[] is no-op\n if (_isStringArr(payload)) {\n return;\n }\n return _onError(payload, message, event);\n };\n /**\r\n * partial success handler\r\n */\n _self[_DYN__ON_PARTIAL_SUCCESS /* @min:%2e_onPartialSuccess */] = function (payload, results) {\n // since version 3.1.3, string[] is no-op\n if (_isStringArr(payload)) {\n return;\n }\n return _onPartialSuccess(payload, results);\n };\n /**\r\n * success handler\r\n */\n _self[_DYN__ON_SUCCESS /* @min:%2e_onSuccess */] = function (payload, countOfItemsInPayload) {\n // since version 3.1.3, string[] is no-op\n if (_isStringArr(payload)) {\n return;\n }\n return _onSuccess(payload, countOfItemsInPayload);\n //_self._buffer && _self._buffer.clearSent(payload);\n };\n /**\r\n * xdr state changes\r\n */\n _self._xdrOnLoad = function (xdr, payload) {\n // since version 3.1.3, string[] is no-op\n if (_isStringArr(payload)) {\n return;\n }\n return _xdrOnLoad(xdr, payload);\n };\n function _xdrOnLoad(xdr, payload) {\n var responseText = _getResponseText(xdr);\n if (xdr && (responseText + \"\" === \"200\" || responseText === \"\")) {\n _consecutiveErrors = 0;\n _self[_DYN__ON_SUCCESS /* @min:%2e_onSuccess */](payload, 0);\n } else {\n var results = parseResponse(responseText);\n if (results && results[_DYN_ITEMS_RECEIVED /* @min:%2eitemsReceived */] && results[_DYN_ITEMS_RECEIVED /* @min:%2eitemsReceived */] > results[_DYN_ITEMS_ACCEPTED /* @min:%2eitemsAccepted */] && !_isRetryDisabled) {\n _self[_DYN__ON_PARTIAL_SUCCESS /* @min:%2e_onPartialSuccess */](payload, results);\n } else {\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, formatErrorMessageXdr(xdr));\n }\n }\n }\n function _getSendPostMgrConfig() {\n var _a;\n try {\n var onCompleteFuncs = {\n xdrOnComplete: function (xdr, oncomplete, payload) {\n var data = _getPayloadArr(payload);\n if (!data) {\n return;\n }\n return _xdrOnLoad(xdr, data);\n },\n fetchOnComplete: function (response, onComplete, resValue, payload) {\n var data = _getPayloadArr(payload);\n if (!data) {\n return;\n }\n return _checkResponsStatus(response.status, data, response.url, data[_DYN_LENGTH /* @min:%2elength */], response.statusText, resValue || \"\");\n },\n xhrOnComplete: function (request, oncomplete, payload) {\n var data = _getPayloadArr(payload);\n if (!data) {\n return;\n }\n return _xhrReadyStateChange(request, data, data[_DYN_LENGTH /* @min:%2elength */]);\n },\n beaconOnRetry: function (data, onComplete, canSend) {\n return _onBeaconRetry(data, onComplete, canSend);\n }\n };\n var config = (_a = {}, _a[_DYN_ENABLE_SEND_PROMISE /* @min:enableSendPromise */] = _enableSendPromise, _a.isOneDs = false, _a.disableCredentials = false, _a[_DYN_DISABLE_XHR /* @min:disableXhr */] = _disableXhr, _a.disableBeacon = !_beaconNormalSupported, _a.disableBeaconSync = !_beaconOnUnloadSupported, _a.senderOnCompleteCallBack = onCompleteFuncs, _a);\n return config;\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return null;\n }\n /**\r\n * xhr state changes\r\n */\n function _xhrReadyStateChange(xhr, payload, countOfItemsInPayload) {\n if (xhr.readyState === 4) {\n _checkResponsStatus(xhr.status, payload, xhr.responseURL, countOfItemsInPayload, formatErrorMessageXhr(xhr), _getResponseText(xhr) || xhr.response);\n }\n }\n /**\r\n * error handler\r\n */\n function _onError(payload, message, event) {\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 26 /* _eInternalMessageId.OnError */, \"Failed to send telemetry.\", {\n message: message\n });\n _self._buffer && _self._buffer[_DYN_CLEAR_SENT /* @min:%2eclearSent */](payload);\n }\n /**\r\n * partial success handler\r\n */\n function _onPartialSuccess(payload, results) {\n var failed = [];\n var retry = [];\n // Iterate through the reversed array of errors so that splicing doesn't have invalid indexes after the first item.\n var errors = results.errors.reverse();\n for (var _i = 0, errors_1 = errors; _i < errors_1.length; _i++) {\n var error = errors_1[_i];\n var extracted = payload.splice(error.index, 1)[0];\n if (_isRetriable(error.statusCode)) {\n retry[_DYN_PUSH /* @min:%2epush */](extracted);\n } else {\n // All other errors, including: 402 (Monthly quota exceeded) and 439 (Too many requests and refresh cache).\n failed[_DYN_PUSH /* @min:%2epush */](extracted);\n }\n }\n if (payload[_DYN_LENGTH /* @min:%2elength */] > 0) {\n _self[_DYN__ON_SUCCESS /* @min:%2e_onSuccess */](payload, results[_DYN_ITEMS_ACCEPTED /* @min:%2eitemsAccepted */]);\n }\n if (failed[_DYN_LENGTH /* @min:%2elength */] > 0) {\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](failed, formatErrorMessageXhr(null, [\"partial success\", results[_DYN_ITEMS_ACCEPTED /* @min:%2eitemsAccepted */], \"of\", results.itemsReceived].join(\" \")));\n }\n if (retry[_DYN_LENGTH /* @min:%2elength */] > 0) {\n _resendPayload(retry);\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \"Partial success. \" + \"Delivered: \" + payload[_DYN_LENGTH /* @min:%2elength */] + \", Failed: \" + failed[_DYN_LENGTH /* @min:%2elength */] + \". Will retry to send \" + retry[_DYN_LENGTH /* @min:%2elength */] + \" our of \" + results[_DYN_ITEMS_RECEIVED /* @min:%2eitemsReceived */] + \" items\");\n }\n }\n /**\r\n * success handler\r\n */\n function _onSuccess(payload, countOfItemsInPayload) {\n _self._buffer && _self._buffer[_DYN_CLEAR_SENT /* @min:%2eclearSent */](payload);\n }\n function _getPayloadArr(payload) {\n try {\n if (payload) {\n var internalPayload = payload;\n var arr = internalPayload[_DYN_ORI_PAYLOAD /* @min:%2eoriPayload */];\n if (arr && arr[_DYN_LENGTH /* @min:%2elength */]) {\n return arr;\n }\n return null;\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return null;\n }\n function _validate(telemetryItem, diagLogger) {\n if (_disableTelemetry) {\n // Do not send/save data\n return false;\n }\n // validate input\n if (!telemetryItem) {\n diagLogger && _throwInternal(diagLogger, 1 /* eLoggingSeverity.CRITICAL */, 7 /* _eInternalMessageId.CannotSendEmptyTelemetry */, \"Cannot send empty telemetry\");\n return false;\n }\n // validate event\n if (telemetryItem.baseData && !telemetryItem[_DYN_BASE_TYPE /* @min:%2ebaseType */]) {\n diagLogger && _throwInternal(diagLogger, 1 /* eLoggingSeverity.CRITICAL */, 70 /* _eInternalMessageId.InvalidEvent */, \"Cannot send telemetry without baseData and baseType\");\n return false;\n }\n if (!telemetryItem[_DYN_BASE_TYPE /* @min:%2ebaseType */]) {\n // Default\n telemetryItem[_DYN_BASE_TYPE /* @min:%2ebaseType */] = \"EventData\";\n }\n // ensure a sender was constructed\n if (!_self[_DYN__SENDER /* @min:%2e_sender */]) {\n diagLogger && _throwInternal(diagLogger, 1 /* eLoggingSeverity.CRITICAL */, 28 /* _eInternalMessageId.SenderNotInitialized */, \"Sender was not initialized\");\n return false;\n }\n // check if this item should be sampled in, else add sampleRate tag\n if (!_isSampledIn(telemetryItem)) {\n // Item is sampled out, do not send it\n diagLogger && _throwInternal(diagLogger, 2 /* eLoggingSeverity.WARNING */, 33 /* _eInternalMessageId.TelemetrySampledAndNotSent */, \"Telemetry item was sampled out and not sent\", {\n SampleRate: _self._sample[_DYN_SAMPLE_RATE /* @min:%2esampleRate */]\n });\n return false;\n } else {\n telemetryItem[SampleRate] = _self._sample[_DYN_SAMPLE_RATE /* @min:%2esampleRate */];\n }\n return true;\n }\n function _getEnvelope(telemetryItem, diagLogger) {\n // construct an envelope that Application Insights endpoint can understand\n // if ikey of telemetry is provided and not empty, envelope will use this iKey instead of senderConfig iKey\n var defaultEnvelopeIkey = telemetryItem.iKey || _instrumentationKey;\n var aiEnvelope = Sender.constructEnvelope(telemetryItem, defaultEnvelopeIkey, diagLogger, _convertUndefined);\n if (!aiEnvelope) {\n _throwInternal(diagLogger, 1 /* eLoggingSeverity.CRITICAL */, 47 /* _eInternalMessageId.CreateEnvelopeError */, \"Unable to create an AppInsights envelope\");\n return;\n }\n var doNotSendItem = false;\n // this is for running in legacy mode, where customer may already have a custom initializer present\n if (telemetryItem[_DYN_TAGS /* @min:%2etags */] && telemetryItem[_DYN_TAGS /* @min:%2etags */][ProcessLegacy]) {\n arrForEach(telemetryItem[_DYN_TAGS /* @min:%2etags */][ProcessLegacy], function (callBack) {\n try {\n if (callBack && callBack(aiEnvelope) === false) {\n doNotSendItem = true;\n _warnToConsole(diagLogger, \"Telemetry processor check returns false\");\n }\n } catch (e) {\n // log error but dont stop executing rest of the telemetry initializers\n // doNotSendItem = true;\n _throwInternal(diagLogger, 1 /* eLoggingSeverity.CRITICAL */, 64 /* _eInternalMessageId.TelemetryInitializerFailed */, \"One of telemetry initializers failed, telemetry item will not be sent: \" + getExceptionName(e), {\n exception: dumpObj(e)\n }, true);\n }\n });\n delete telemetryItem[_DYN_TAGS /* @min:%2etags */][ProcessLegacy];\n }\n if (doNotSendItem) {\n return; // do not send, no need to execute next plugin\n }\n return aiEnvelope;\n }\n function _serialize(item) {\n var rlt = EMPTY_STR;\n var diagLogger = _self[_DYN_DIAG_LOG /* @min:%2ediagLog */]();\n try {\n var valid = _validate(item, diagLogger);\n var envelope = null;\n if (valid) {\n envelope = _getEnvelope(item, diagLogger);\n }\n if (envelope) {\n rlt = _serializer[_DYN_SERIALIZE /* @min:%2eserialize */](envelope);\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return rlt;\n }\n function _batch(arr) {\n var rlt = EMPTY_STR;\n if (arr && arr[_DYN_LENGTH /* @min:%2elength */]) {\n rlt = \"[\" + arr.join(\",\") + \"]\";\n }\n return rlt;\n }\n function _createPayload(data) {\n var _a;\n var headers = _getHeaders();\n return _a = {\n urlString: _endpointUrl\n }, _a[_DYN_DATA /* @min:data */] = data, _a.headers = headers, _a;\n }\n function _isSampledIn(envelope) {\n return _self._sample.isSampledIn(envelope);\n }\n function _getOnComplete(payload, status, headers, response) {\n // ***********************************************************************************************\n //TODO: handle other status codes\n if (status === 200 && payload) {\n _self._onSuccess(payload, payload[_DYN_LENGTH /* @min:%2elength */]);\n } else {\n response && _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, response);\n }\n }\n function _doSend(sendInterface, payload, isAsync, markAsSent) {\n if (markAsSent === void 0) {\n markAsSent = true;\n }\n var onComplete = function (status, headers, response) {\n return _getOnComplete(payload, status, headers, response);\n };\n var payloadData = _getPayload(payload);\n var sendPostFunc = sendInterface && sendInterface.sendPOST;\n if (sendPostFunc && payloadData) {\n // ***********************************************************************************************\n // mark payload as sent at the beginning of calling each send function\n if (markAsSent) {\n _self._buffer[_DYN_MARK_AS_SENT /* @min:%2emarkAsSent */](payload);\n }\n return sendPostFunc(payloadData, onComplete, !isAsync);\n }\n return null;\n }\n function _getPayload(payload) {\n var _a;\n if (isArray(payload) && payload[_DYN_LENGTH /* @min:%2elength */] > 0) {\n var batch = _self[_DYN__BUFFER /* @min:%2e_buffer */].batchPayloads(payload);\n var headers = _getHeaders();\n var payloadData = (_a = {}, _a[_DYN_DATA /* @min:data */] = batch, _a.urlString = _endpointUrl, _a.headers = headers, _a.disableXhrSync = _disableXhr, _a.disableFetchKeepAlive = !_fetchKeepAlive, _a[_DYN_ORI_PAYLOAD /* @min:oriPayload */] = payload, _a);\n return payloadData;\n }\n return null;\n }\n function _getHeaders() {\n try {\n var headers = _headers || {};\n if (isInternalApplicationInsightsEndpoint(_endpointUrl)) {\n headers[RequestHeaders[6 /* eRequestHeaders.sdkContextHeader */]] = RequestHeaders[7 /* eRequestHeaders.sdkContextHeaderAppIdRequest */];\n }\n return headers;\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return null;\n }\n function _checkMaxSize(incomingPayload) {\n var incomingSize = incomingPayload ? incomingPayload[_DYN_LENGTH /* @min:%2elength */] : 0;\n if (_self[_DYN__BUFFER /* @min:%2e_buffer */].size() + incomingSize > _maxBatchSizeInBytes) {\n if (!_offlineListener || _offlineListener.isOnline()) {\n // only trigger send when currently online\n _self[_DYN_TRIGGER_SEND /* @min:%2etriggerSend */](true, null, 10 /* SendRequestReason.MaxBatchSize */);\n }\n return true;\n }\n return false;\n }\n function _checkResponsStatus(status, payload, responseUrl, countOfItemsInPayload, errorMessage, res) {\n var response = null;\n if (!_self._appId) {\n response = parseResponse(res);\n if (response && response.appId) {\n _self._appId = response.appId;\n }\n }\n if ((status < 200 || status >= 300) && status !== 0) {\n // Update End Point url if permanent redirect or moved permanently\n // Updates the end point url before retry\n if (status === 301 || status === 307 || status === 308) {\n if (!_checkAndUpdateEndPointUrl(responseUrl)) {\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, errorMessage);\n return;\n }\n }\n if (_offlineListener && !_offlineListener.isOnline()) {\n // offline\n // Note: Don't check for status == 0, since adblock gives this code\n if (!_isRetryDisabled) {\n var offlineBackOffMultiplier = 10; // arbritrary number\n _resendPayload(payload, offlineBackOffMultiplier);\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". Offline - Response Code: \".concat(status, \". Offline status: \").concat(!_offlineListener.isOnline(), \". Will retry to send \").concat(payload.length, \" items.\"));\n }\n return;\n }\n if (!_isRetryDisabled && _isRetriable(status)) {\n _resendPayload(payload);\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". \" + \"Response code \" + status + \". Will retry to send \" + payload[_DYN_LENGTH /* @min:%2elength */] + \" items.\");\n } else {\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, errorMessage);\n }\n } else {\n // check if the xhr's responseURL or fetch's response.url is same as endpoint url\n // TODO after 10 redirects force send telemetry with 'redirect=false' as query parameter.\n _checkAndUpdateEndPointUrl(responseUrl);\n if (status === 206) {\n if (!response) {\n response = parseResponse(res);\n }\n if (response && !_isRetryDisabled) {\n _self[_DYN__ON_PARTIAL_SUCCESS /* @min:%2e_onPartialSuccess */](payload, response);\n } else {\n _self[_DYN__ON_ERROR /* @min:%2e_onError */](payload, errorMessage);\n }\n } else {\n _consecutiveErrors = 0;\n _self[_DYN__ON_SUCCESS /* @min:%2e_onSuccess */](payload, countOfItemsInPayload);\n }\n }\n }\n function _checkAndUpdateEndPointUrl(responseUrl) {\n // Maximum stamp specific redirects allowed(uncomment this when breeze is ready with not allowing redirects feature)\n if (_stamp_specific_redirects >= 10) {\n // _self._senderConfig.endpointUrl = () => Sender._getDefaultAppInsightsChannelConfig().endpointUrl()+\"/?redirect=false\";\n // _stamp_specific_redirects = 0;\n return false;\n }\n if (!isNullOrUndefined(responseUrl) && responseUrl !== \"\") {\n if (responseUrl !== _endpointUrl) {\n _endpointUrl = responseUrl;\n ++_stamp_specific_redirects;\n return true;\n }\n }\n return false;\n }\n function _doUnloadSend(payload, isAsync) {\n if (_syncUnloadSender) {\n // We are unloading so always call the sender with sync set to false\n _syncUnloadSender(payload, false);\n } else {\n // Fallback to the previous beacon Sender (which causes a CORB warning on chrome now)\n var beaconInst = _sendPostMgr && _sendPostMgr[_DYN_GET_SENDER_INST /* @min:%2egetSenderInst */]([3 /* TransportType.Beacon */], true);\n return _doSend(beaconInst, payload, isAsync);\n }\n }\n function _onBeaconRetry(payload, onComplete, canSend) {\n var internalPayload = payload;\n var data = internalPayload && internalPayload[_DYN_ORI_PAYLOAD /* @min:%2eoriPayload */];\n if (!_disableBeaconSplit) {\n // Failed to send entire payload so try and split data and try to send as much events as possible\n var droppedPayload = [];\n for (var lp = 0; lp < data[_DYN_LENGTH /* @min:%2elength */]; lp++) {\n var thePayload = data[lp];\n var arr = [thePayload];\n var item = _getPayload(arr);\n if (!canSend(item, onComplete)) {\n // Can't send anymore, so split the batch and drop the rest\n droppedPayload[_DYN_PUSH /* @min:%2epush */](thePayload);\n } else {\n _self._onSuccess(arr, arr[_DYN_LENGTH /* @min:%2elength */]);\n }\n }\n if (droppedPayload[_DYN_LENGTH /* @min:%2elength */] > 0) {\n _fallbackSend && _fallbackSend(droppedPayload, true);\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". \" + \"Failed to send telemetry with Beacon API, retried with normal sender.\");\n }\n } else {\n _fallbackSend && _fallbackSend(data, true);\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". \" + \"Failed to send telemetry with Beacon API, retried with normal sender.\");\n }\n }\n function _isStringArr(arr) {\n try {\n if (arr && arr[_DYN_LENGTH /* @min:%2elength */]) {\n return isString(arr[0]);\n }\n } catch (e) {\n //TODO: log, sender use IInternalStorageItem instead of string since 3.1.3\n }\n return null;\n }\n function _fetchKeepAliveSender(payload, isAsync) {\n var transport = null;\n if (isArray(payload)) {\n var payloadSize = payload[_DYN_LENGTH /* @min:%2elength */];\n for (var lp = 0; lp < payload[_DYN_LENGTH /* @min:%2elength */]; lp++) {\n payloadSize += payload[lp].item[_DYN_LENGTH /* @min:%2elength */];\n }\n var syncFetchPayload = _sendPostMgr.getSyncFetchPayload();\n if (syncFetchPayload + payloadSize <= FetchSyncRequestSizeLimitBytes) {\n transport = 2 /* TransportType.Fetch */;\n } else if (isBeaconsSupported()) {\n // Fallback to beacon sender as we at least get told which events can't be scheduled\n transport = 3 /* TransportType.Beacon */;\n } else {\n // Payload is going to be too big so just try and send via XHR\n transport = 1 /* TransportType.Xhr */;\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 2 /* eLoggingSeverity.WARNING */, 40 /* _eInternalMessageId.TransmissionFailed */, \". \" + \"Failed to send telemetry with Beacon API, retried with xhrSender.\");\n }\n var inst = _sendPostMgr && _sendPostMgr[_DYN_GET_SENDER_INST /* @min:%2egetSenderInst */]([transport], true);\n return _doSend(inst, payload, isAsync);\n }\n return null;\n }\n /**\r\n * Resend payload. Adds payload back to the send buffer and setup a send timer (with exponential backoff).\r\n * @param payload\r\n */\n function _resendPayload(payload, linearFactor) {\n if (linearFactor === void 0) {\n linearFactor = 1;\n }\n if (!payload || payload[_DYN_LENGTH /* @min:%2elength */] === 0) {\n return;\n }\n var buffer = _self[_DYN__BUFFER /* @min:%2e_buffer */];\n buffer[_DYN_CLEAR_SENT /* @min:%2eclearSent */](payload);\n _consecutiveErrors++;\n for (var _i = 0, payload_1 = payload; _i < payload_1.length; _i++) {\n var item = payload_1[_i];\n item.cnt = item.cnt || 0; // to make sure we have cnt for each payload\n item.cnt++; // when resend, increase cnt\n buffer[_DYN_ENQUEUE /* @min:%2eenqueue */](item);\n }\n // setup timer\n _setRetryTime(linearFactor);\n _setupTimer();\n }\n /**\r\n * Calculates the time to wait before retrying in case of an error based on\r\n * http://en.wikipedia.org/wiki/Exponential_backoff\r\n */\n function _setRetryTime(linearFactor) {\n var SlotDelayInSeconds = 10;\n var delayInSeconds;\n if (_consecutiveErrors <= 1) {\n delayInSeconds = SlotDelayInSeconds;\n } else {\n var backOffSlot = (Math.pow(2, _consecutiveErrors) - 1) / 2;\n // tslint:disable-next-line:insecure-random\n var backOffDelay = Math.floor(Math.random() * backOffSlot * SlotDelayInSeconds) + 1;\n backOffDelay = linearFactor * backOffDelay;\n delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds);\n }\n // TODO: Log the backoff time like the C# version does.\n var retryAfterTimeSpan = dateNow() + delayInSeconds * 1000;\n // TODO: Log the retry at time like the C# version does.\n _retryAt = retryAfterTimeSpan;\n }\n /**\r\n * Sets up the timer which triggers actually sending the data.\r\n */\n function _setupTimer() {\n if (!_timeoutHandle && !_paused) {\n var retryInterval = _retryAt ? Math.max(0, _retryAt - dateNow()) : 0;\n var timerValue = Math.max(_maxBatchInterval, retryInterval);\n _timeoutHandle = scheduleTimeout(function () {\n _timeoutHandle = null;\n _self[_DYN_TRIGGER_SEND /* @min:%2etriggerSend */](true, null, 1 /* SendRequestReason.NormalSchedule */);\n }, timerValue);\n }\n }\n function _clearScheduledTimer() {\n _timeoutHandle && _timeoutHandle.cancel();\n _timeoutHandle = null;\n _retryAt = null;\n }\n /**\r\n * Checks if the SDK should resend the payload after receiving this status code from the backend.\r\n * @param statusCode\r\n */\n function _isRetriable(statusCode) {\n // retryCodes = [] means should not retry\n if (!isNullOrUndefined(_retryCodes)) {\n return _retryCodes[_DYN_LENGTH /* @min:%2elength */] && _retryCodes.indexOf(statusCode) > -1;\n }\n return statusCode === 401 // Unauthorized\n // Removing as private links can return a 403 which causes excessive retries and session storage usage\n // || statusCode === 403 // Forbidden\n || statusCode === 408 // Timeout\n || statusCode === 429 // Too many requests.\n || statusCode === 500 // Internal server error.\n || statusCode === 502 // Bad Gateway.\n || statusCode === 503 // Service unavailable.\n || statusCode === 504; // Gateway timeout.\n }\n // Using function lookups for backward compatibility as the getNotifyMgr() did not exist until after v2.5.6\n function _getNotifyMgr() {\n var func = \"getNotifyMgr\";\n if (_self.core[func]) {\n return _self.core[func]();\n }\n // using _self.core['_notificationManager'] for backward compatibility\n return _self.core[\"_notificationManager\"];\n }\n function _notifySendRequest(sendRequest, isAsync) {\n var manager = _getNotifyMgr();\n if (manager && manager[_DYN_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */]) {\n try {\n manager[_DYN_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */](sendRequest, isAsync);\n } catch (e) {\n _throwInternal(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), 1 /* eLoggingSeverity.CRITICAL */, 74 /* _eInternalMessageId.NotificationException */, \"send request notification failed: \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n }\n /**\r\n * Validate UUID Format\r\n * Specs taken from https://tools.ietf.org/html/rfc4122 and breeze repo\r\n */\n function _validateInstrumentationKey(instrumentationKey, config) {\n var disableValidation = config.disableInstrumentationKeyValidation;\n var disableIKeyValidationFlag = isNullOrUndefined(disableValidation) ? false : disableValidation;\n if (disableIKeyValidationFlag) {\n return true;\n }\n var UUID_Regex = \"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$\";\n var regexp = new RegExp(UUID_Regex);\n return regexp.test(instrumentationKey);\n }\n function _initDefaults() {\n _self[_DYN__SENDER /* @min:%2e_sender */] = null;\n _self[_DYN__BUFFER /* @min:%2e_buffer */] = null;\n _self._appId = null;\n _self._sample = null;\n _headers = {};\n _offlineListener = null;\n _consecutiveErrors = 0;\n _retryAt = null;\n _lastSend = null;\n _paused = false;\n _timeoutHandle = null;\n _serializer = null;\n _stamp_specific_redirects = 0;\n _syncFetchPayload = 0;\n _syncUnloadSender = null;\n _evtNamespace = null;\n _endpointUrl = null;\n _orgEndpointUrl = null;\n _maxBatchSizeInBytes = 0;\n _beaconSupported = false;\n _customHeaders = null;\n _disableTelemetry = false;\n _instrumentationKey = null;\n _convertUndefined = UNDEFINED_VALUE;\n _isRetryDisabled = false;\n _sessionStorageUsed = null;\n _namePrefix = UNDEFINED_VALUE;\n _disableXhr = false;\n _fetchKeepAlive = false;\n _disableBeaconSplit = false;\n _xhrSend = null;\n _fallbackSend = null;\n _sendPostMgr = null;\n objDefine(_self, \"_senderConfig\", {\n g: function () {\n return objExtend({}, defaultAppInsightsChannelConfig);\n }\n });\n }\n });\n return _this;\n }\n Sender.constructEnvelope = function (orig, iKey, logger, convertUndefined) {\n var envelope;\n if (iKey !== orig.iKey && !isNullOrUndefined(iKey)) {\n envelope = __assign(__assign({}, orig), {\n iKey: iKey\n });\n } else {\n envelope = orig;\n }\n var creator = EnvelopeTypeCreator[envelope.baseType] || EventEnvelopeCreator;\n return creator(logger, envelope, convertUndefined);\n };\n // Removed Stub for Sender.prototype.pause.\n // Removed Stub for Sender.prototype.resume.\n // Removed Stub for Sender.prototype.flush.\n // Removed Stub for Sender.prototype.onunloadFlush.\n // Removed Stub for Sender.prototype.initialize.\n // Removed Stub for Sender.prototype.processTelemetry.\n // Removed Stub for Sender.prototype._xhrReadyStateChange.\n // Removed Stub for Sender.prototype.triggerSend.\n // Removed Stub for Sender.prototype._onError.\n // Removed Stub for Sender.prototype._onPartialSuccess.\n // Removed Stub for Sender.prototype._onSuccess.\n // Removed Stub for Sender.prototype._xdrOnLoad.\n // Removed Stub for Sender.prototype.addHeader.\n // Removed Stub for Sender.prototype.isCompletelyIdle.\n // Removed Stub for Sender.prototype.getOfflineSupport.\n // Removed Stub for Sender.prototype.getOfflineListener.\n return Sender;\n}(BaseTelemetryPlugin);\nexport { Sender };\n","/*\n * Application Insights JavaScript SDK - Dependencies Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// ###################################################################################################################################################\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\n// ###################################################################################################################################################\n// Generally you should only put values that are used more than 2 times and then only if not already exposed as a constant (such as SdkCoreNames)\n// as when using \"short\" named values from here they will be will be minified smaller than the SdkCoreNames[eSdkCoreNames.xxxx] value.\nexport var STR_DURATION = \"duration\";\nexport var STR_PROPERTIES = \"properties\";\n","/*\n * Application Insights JavaScript SDK - Dependencies Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nexport var _DYN_REQUEST_URL = \"requestUrl\"; // Count: 11\nexport var _DYN_INST = \"inst\"; // Count: 5\nexport var _DYN_LENGTH = \"length\"; // Count: 8\nexport var _DYN_TRACE_ID = \"traceID\"; // Count: 9\nexport var _DYN_SPAN_ID = \"spanID\"; // Count: 8\nexport var _DYN_TRACE_FLAGS = \"traceFlags\"; // Count: 13\nexport var _DYN_CONTEXT = \"context\"; // Count: 7\nexport var _DYN_ABORTED = \"aborted\"; // Count: 7\nexport var _DYN_TRACE_ID0 = \"traceId\"; // Count: 5\nexport var _DYN_SPAN_ID1 = \"spanId\"; // Count: 5\nexport var _DYN__ADD_HOOK = \"_addHook\"; // Count: 4\nexport var _DYN_CORE = \"core\"; // Count: 8\nexport var _DYN_INCLUDE_CORRELATION_2 = \"includeCorrelationHeaders\"; // Count: 4\nexport var _DYN_GET_ABSOLUTE_URL = \"getAbsoluteUrl\"; // Count: 3\nexport var _DYN_HEADERS = \"headers\"; // Count: 6\nexport var _DYN_REQUEST_HEADERS = \"requestHeaders\"; // Count: 13\nexport var _DYN_SET_REQUEST_HEADER = \"setRequestHeader\"; // Count: 3\nexport var _DYN_TRACK_DEPENDENCY_DAT3 = \"trackDependencyDataInternal\"; // Count: 2\nexport var _DYN_START_TIME = \"startTime\"; // Count: 6\nexport var _DYN_TO_LOWER_CASE = \"toLowerCase\"; // Count: 6\nexport var _DYN_ENABLE_REQUEST_HEADE4 = \"enableRequestHeaderTracking\"; // Count: 3\nexport var _DYN_ENABLE_AJAX_ERROR_ST5 = \"enableAjaxErrorStatusText\"; // Count: 2\nexport var _DYN_ENABLE_AJAX_PERF_TRA6 = \"enableAjaxPerfTracking\"; // Count: 2\nexport var _DYN_MAX_AJAX_CALLS_PER_V7 = \"maxAjaxCallsPerView\"; // Count: 2\nexport var _DYN_EXCLUDE_REQUEST_FROM8 = \"excludeRequestFromAutoTrackingPatterns\"; // Count: 2\nexport var _DYN_ADD_REQUEST_CONTEXT = \"addRequestContext\"; // Count: 2\nexport var _DYN_DISABLE_AJAX_TRACKIN9 = \"disableAjaxTracking\"; // Count: 3\nexport var _DYN_AJAX_PERF_LOOKUP_DEL10 = \"ajaxPerfLookupDelay\"; // Count: 2\nexport var _DYN_DISABLE_FETCH_TRACKI11 = \"disableFetchTracking\"; // Count: 2\nexport var _DYN_ENABLE_RESPONSE_HEAD12 = \"enableResponseHeaderTracking\"; // Count: 2\nexport var _DYN_STATUS = \"status\"; // Count: 11\nexport var _DYN_STATUS_TEXT = \"statusText\"; // Count: 9\nexport var _DYN_HEADER_MAP = \"headerMap\"; // Count: 8\nexport var _DYN_OPEN_DONE = \"openDone\"; // Count: 3\nexport var _DYN_SEND_DONE = \"sendDone\"; // Count: 3\nexport var _DYN_REQUEST_SENT_TIME = \"requestSentTime\"; // Count: 9\nexport var _DYN_ABORT_DONE = \"abortDone\"; // Count: 3\nexport var _DYN_GET_TRACE_ID = \"getTraceId\"; // Count: 3\nexport var _DYN_GET_TRACE_FLAGS = \"getTraceFlags\"; // Count: 3\nexport var _DYN_METHOD = \"method\"; // Count: 8\nexport var _DYN_ERROR_STATUS_TEXT = \"errorStatusText\"; // Count: 3\nexport var _DYN_STATE_CHANGE_ATTACHE13 = \"stateChangeAttached\"; // Count: 2\nexport var _DYN_RESPONSE_TEXT = \"responseText\"; // Count: 6\nexport var _DYN_RESPONSE_FINISHED_TI14 = \"responseFinishedTime\"; // Count: 7\nexport var _DYN__CREATE_TRACK_ITEM = \"CreateTrackItem\"; // Count: 3\nexport var _DYN_RESPONSE = \"response\"; // Count: 4\nexport var _DYN_GET_ALL_RESPONSE_HEA15 = \"getAllResponseHeaders\"; // Count: 2\nexport var _DYN_GET_PART_APROPS = \"getPartAProps\"; // Count: 3\nexport var _DYN_PERF_MARK = \"perfMark\"; // Count: 4\nexport var _DYN_NAME = \"name\"; // Count: 6\nexport var _DYN_PERF_TIMING = \"perfTiming\"; // Count: 3\nexport var _DYN_EXCEPTION = \"exception\"; // Count: 5\nexport var _DYN_AJAX_DIAGNOSTICS_MES16 = \"ajaxDiagnosticsMessage\"; // Count: 3\nexport var _DYN_CORRELATION_CONTEXT = \"correlationContext\"; // Count: 3\nexport var _DYN_AJAX_TOTAL_DURATION = \"ajaxTotalDuration\"; // Count: 3\nexport var _DYN_EVENT_TRACE_CTX = \"eventTraceCtx\"; // Count: 3\n","/*\n * Application Insights JavaScript SDK - Dependencies Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { Extensions, dataSanitizeUrl, dateTimeUtilsDuration, msToTimeSpan, urlGetAbsoluteUrl, urlGetCompleteUrl } from \"@microsoft/applicationinsights-common\";\nimport { arrForEach, isNullOrUndefined, isNumber, isString, normalizeJsName, objForEachKey, objKeys } from \"@microsoft/applicationinsights-core-js\";\nimport { STR_DURATION, STR_PROPERTIES } from \"./InternalConstants\";\nimport { _DYN_ABORTED, _DYN_ABORT_DONE, _DYN_AJAX_TOTAL_DURATION, _DYN_CORRELATION_CONTEXT, _DYN_ERROR_STATUS_TEXT, _DYN_EVENT_TRACE_CTX, _DYN_GET_ABSOLUTE_URL, _DYN_GET_PART_APROPS, _DYN_GET_TRACE_FLAGS, _DYN_GET_TRACE_ID, _DYN_HEADER_MAP, _DYN_LENGTH, _DYN_METHOD, _DYN_NAME, _DYN_OPEN_DONE, _DYN_PERF_MARK, _DYN_PERF_TIMING, _DYN_REQUEST_HEADERS, _DYN_REQUEST_SENT_TIME, _DYN_REQUEST_URL, _DYN_RESPONSE, _DYN_RESPONSE_FINISHED_TI14, _DYN_SEND_DONE, _DYN_SPAN_ID, _DYN_SPAN_ID1, _DYN_START_TIME, _DYN_STATE_CHANGE_ATTACHE13, _DYN_STATUS, _DYN_STATUS_TEXT, _DYN_TRACE_FLAGS, _DYN_TRACE_ID, _DYN_TRACE_ID0, _DYN__CREATE_TRACK_ITEM } from \"./__DynamicConstants\";\n/** @ignore */\nfunction _calcPerfDuration(resourceEntry, start, end) {\n var result = 0;\n var from = resourceEntry[start];\n var to = resourceEntry[end];\n if (from && to) {\n result = dateTimeUtilsDuration(from, to);\n }\n return result;\n}\n/** @ignore */\nfunction _setPerfDuration(props, name, resourceEntry, start, end) {\n var result = 0;\n var value = _calcPerfDuration(resourceEntry, start, end);\n if (value) {\n result = _setPerfValue(props, name, msToTimeSpan(value));\n }\n return result;\n}\n/** @ignore */\nfunction _setPerfValue(props, name, value) {\n var strPerf = \"ajaxPerf\";\n var result = 0;\n if (props && name && value) {\n var perfData = props[strPerf] = props[strPerf] || {};\n perfData[name] = value;\n result = 1;\n }\n return result;\n}\n/** @ignore */\nfunction _populatePerfData(ajaxData, dependency) {\n /*\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API\r\n * | -startTime\r\n * | -redirectStart\r\n * | | -redirectEnd\r\n * | | | -fetchStart\r\n * | | | | -domainLookupStart\r\n * | | | | |- domainLookupEnd\r\n * | | | | | | -connectStart\r\n * | | | | | | | -secureConnectionStart\r\n * | | | | | | | | -connectEnd\r\n * | | | | | | | | | -requestStart\r\n * | | | | | | | | | | | -responseStart\r\n * | | | | | | | | | | | | | -responseEnd\r\n * +------------+-+---+----------------+-+--+--------+-+-----------+-+------------+-+\r\n * |--redirect--| |---|--domainLookup--| |--connect--| |--request--| |--response--| |\r\n * |-------------------networkConnect----------------|\r\n * | |---------sentRequest--------|\r\n * |------------------------------------perfTotal-----------------------------------|\r\n */\n var resourceEntry = ajaxData[_DYN_PERF_TIMING /* @min:%2eperfTiming */];\n var props = dependency[STR_PROPERTIES /* @min:%2eproperties */] || {};\n var propsSet = 0;\n var strName = \"name\";\n var strStart = \"Start\";\n var strEnd = \"End\";\n var strDomainLookup = \"domainLookup\";\n var strConnect = \"connect\";\n var strRedirect = \"redirect\";\n var strRequest = \"request\";\n var strResponse = \"response\";\n var strStartTime = \"startTime\";\n var strDomainLookupStart = strDomainLookup + strStart;\n var strDomainLookupEnd = strDomainLookup + strEnd;\n var strConnectStart = strConnect + strStart;\n var strConnectEnd = strConnect + strEnd;\n var strRequestStart = strRequest + strStart;\n var strRequestEnd = strRequest + strEnd;\n var strResponseStart = strResponse + strStart;\n var strResponseEnd = strResponse + strEnd;\n var strRedirectStart = strRedirect + strStart;\n var strRedirectEnd = strRedirect = strEnd;\n var strTransferSize = \"transferSize\";\n var strEncodedBodySize = \"encodedBodySize\";\n var strDecodedBodySize = \"decodedBodySize\";\n var strServerTiming = \"serverTiming\";\n if (resourceEntry) {\n // redirect\n propsSet |= _setPerfDuration(props, strRedirect, resourceEntry, strRedirectStart, strRedirectEnd);\n // domainLookup\n propsSet |= _setPerfDuration(props, strDomainLookup, resourceEntry, strDomainLookupStart, strDomainLookupEnd);\n // connect\n propsSet |= _setPerfDuration(props, strConnect, resourceEntry, strConnectStart, strConnectEnd);\n // request\n propsSet |= _setPerfDuration(props, strRequest, resourceEntry, strRequestStart, strRequestEnd);\n // response\n propsSet |= _setPerfDuration(props, strResponse, resourceEntry, strResponseStart, strResponseEnd);\n // Network connection time\n propsSet |= _setPerfDuration(props, \"networkConnect\", resourceEntry, strStartTime, strConnectEnd);\n // Sent Request\n propsSet |= _setPerfDuration(props, \"sentRequest\", resourceEntry, strRequestStart, strResponseEnd);\n // PerfTotal / Duration\n var duration = resourceEntry[STR_DURATION /* @min:%2eduration */];\n if (!duration) {\n duration = _calcPerfDuration(resourceEntry, strStartTime, strResponseEnd) || 0;\n }\n propsSet |= _setPerfValue(props, STR_DURATION, duration);\n propsSet |= _setPerfValue(props, \"perfTotal\", duration);\n var serverTiming = resourceEntry[strServerTiming];\n if (serverTiming) {\n var server_1 = {};\n arrForEach(serverTiming, function (value, idx) {\n var name = normalizeJsName(value[strName] || \"\" + idx);\n var newValue = server_1[name] || {};\n objForEachKey(value, function (key, val) {\n if (key !== strName && isString(val) || isNumber(val)) {\n if (newValue[key]) {\n val = newValue[key] + \";\" + val;\n }\n if (val || !isString(val)) {\n // Only set the value if it has a value and it's not an empty string\n newValue[key] = val;\n }\n }\n });\n server_1[name] = newValue;\n });\n propsSet |= _setPerfValue(props, strServerTiming, server_1);\n }\n propsSet |= _setPerfValue(props, strTransferSize, resourceEntry[strTransferSize]);\n propsSet |= _setPerfValue(props, strEncodedBodySize, resourceEntry[strEncodedBodySize]);\n propsSet |= _setPerfValue(props, strDecodedBodySize, resourceEntry[strDecodedBodySize]);\n } else {\n if (ajaxData[_DYN_PERF_MARK /* @min:%2eperfMark */]) {\n propsSet |= _setPerfValue(props, \"missing\", ajaxData.perfAttempts);\n }\n }\n if (propsSet) {\n dependency[STR_PROPERTIES /* @min:%2eproperties */] = props;\n }\n}\nvar XHRMonitoringState = /** @class */function () {\n function XHRMonitoringState() {\n var self = this;\n self[_DYN_OPEN_DONE /* @min:%2eopenDone */] = false;\n self.setRequestHeaderDone = false;\n self[_DYN_SEND_DONE /* @min:%2esendDone */] = false;\n self[_DYN_ABORT_DONE /* @min:%2eabortDone */] = false;\n // True, if onreadyStateChangeCallback function attached to xhr, otherwise false\n self[_DYN_STATE_CHANGE_ATTACHE13 /* @min:%2estateChangeAttached */] = false;\n }\n return XHRMonitoringState;\n}();\nexport { XHRMonitoringState };\nvar ajaxRecord = /** @class */function () {\n function ajaxRecord(traceId, spanId, logger, traceCtx) {\n var _a;\n var self = this;\n var _logger = logger;\n var strResponseText = \"responseText\";\n // Assigning the initial/default values within the constructor to avoid typescript from creating a bunch of\n // this.XXXX = null\n self[_DYN_PERF_MARK /* @min:%2eperfMark */] = null;\n self.completed = false;\n self.requestHeadersSize = null;\n self[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */] = null;\n self.responseReceivingDuration = null;\n self.callbackDuration = null;\n self[_DYN_AJAX_TOTAL_DURATION /* @min:%2eajaxTotalDuration */] = null;\n self[_DYN_ABORTED /* @min:%2eaborted */] = 0;\n self.pageUrl = null;\n self[_DYN_REQUEST_URL /* @min:%2erequestUrl */] = null;\n self.requestSize = 0;\n self[_DYN_METHOD /* @min:%2emethod */] = null;\n self[_DYN_STATUS /* @min:%2estatus */] = null;\n self[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */] = null;\n self.responseStartedTime = null;\n self[_DYN_RESPONSE_FINISHED_TI14 /* @min:%2eresponseFinishedTime */] = null;\n self.callbackFinishedTime = null;\n self.endTime = null;\n self.xhrMonitoringState = new XHRMonitoringState();\n self.clientFailure = 0;\n self[_DYN_TRACE_ID /* @min:%2etraceID */] = traceId;\n self[_DYN_SPAN_ID /* @min:%2espanID */] = spanId;\n self[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = traceCtx === null || traceCtx === void 0 ? void 0 : traceCtx.getTraceFlags();\n if (traceCtx) {\n self[_DYN_EVENT_TRACE_CTX /* @min:%2eeventTraceCtx */] = (_a = {}, _a[_DYN_TRACE_ID0 /* @min:traceId */] = traceCtx[_DYN_GET_TRACE_ID /* @min:%2egetTraceId */](), _a[_DYN_SPAN_ID1 /* @min:spanId */] = traceCtx.getSpanId(), _a[_DYN_TRACE_FLAGS /* @min:traceFlags */] = traceCtx[_DYN_GET_TRACE_FLAGS /* @min:%2egetTraceFlags */](), _a);\n } else {\n self[_DYN_EVENT_TRACE_CTX /* @min:%2eeventTraceCtx */] = null;\n }\n dynamicProto(ajaxRecord, self, function (self) {\n self.getAbsoluteUrl = function () {\n return self[_DYN_REQUEST_URL /* @min:%2erequestUrl */] ? urlGetAbsoluteUrl(self[_DYN_REQUEST_URL /* @min:%2erequestUrl */]) : null;\n };\n self.getPathName = function () {\n return self[_DYN_REQUEST_URL /* @min:%2erequestUrl */] ? dataSanitizeUrl(_logger, urlGetCompleteUrl(self[_DYN_METHOD /* @min:%2emethod */], self[_DYN_REQUEST_URL /* @min:%2erequestUrl */])) : null;\n };\n self[_DYN__CREATE_TRACK_ITEM /* @min:%2eCreateTrackItem */] = function (ajaxType, enableRequestHeaderTracking, getResponse) {\n var _a;\n // round to 3 decimal points\n self.ajaxTotalDuration = Math.round(dateTimeUtilsDuration(self.requestSentTime, self.responseFinishedTime) * 1000) / 1000;\n if (self[_DYN_AJAX_TOTAL_DURATION /* @min:%2eajaxTotalDuration */] < 0) {\n return null;\n }\n var dependency = (_a = {\n id: \"|\" + self[_DYN_TRACE_ID /* @min:%2etraceID */] + \".\" + self[_DYN_SPAN_ID /* @min:%2espanID */],\n target: self[_DYN_GET_ABSOLUTE_URL /* @min:%2egetAbsoluteUrl */]()\n }, _a[_DYN_NAME /* @min:name */] = self.getPathName(), _a.type = ajaxType, _a[_DYN_START_TIME /* @min:startTime */] = null, _a.duration = self[_DYN_AJAX_TOTAL_DURATION /* @min:%2eajaxTotalDuration */], _a.success = +self[_DYN_STATUS /* @min:%2estatus */] >= 200 && +self[_DYN_STATUS /* @min:%2estatus */] < 400, _a.responseCode = +self[_DYN_STATUS /* @min:%2estatus */], _a[STR_PROPERTIES] = {\n HttpMethod: self[_DYN_METHOD /* @min:%2emethod */]\n }, _a);\n var props = dependency[STR_PROPERTIES];\n if (self[_DYN_ABORTED /* @min:%2eaborted */]) {\n props[_DYN_ABORTED /* @min:%2eaborted */] = true;\n }\n if (self[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */]) {\n // Set the correct dependency start time\n dependency[_DYN_START_TIME /* @min:%2estartTime */] = new Date();\n dependency[_DYN_START_TIME /* @min:%2estartTime */].setTime(self[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */]);\n }\n // Add Ajax perf details if available\n _populatePerfData(self, dependency);\n if (enableRequestHeaderTracking) {\n if (objKeys(self.requestHeaders)[_DYN_LENGTH /* @min:%2elength */] > 0) {\n props[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */] = self[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */];\n }\n }\n if (getResponse) {\n var response = getResponse();\n if (response) {\n // enrich dependency target with correlation context from the server\n var correlationContext = response[_DYN_CORRELATION_CONTEXT /* @min:%2ecorrelationContext */];\n if (correlationContext) {\n dependency.correlationContext = /* dependency.target + \" | \" + */correlationContext;\n }\n if (response[_DYN_HEADER_MAP /* @min:%2eheaderMap */]) {\n if (objKeys(response.headerMap)[_DYN_LENGTH /* @min:%2elength */] > 0) {\n props.responseHeaders = response[_DYN_HEADER_MAP /* @min:%2eheaderMap */];\n }\n }\n if (self[_DYN_ERROR_STATUS_TEXT /* @min:%2eerrorStatusText */]) {\n if (self[_DYN_STATUS /* @min:%2estatus */] >= 400) {\n var responseType = response.type;\n if (responseType === \"\" || responseType === \"text\") {\n props.responseText = response.responseText ? response[_DYN_STATUS_TEXT /* @min:%2estatusText */] + \" - \" + response[strResponseText] : response[_DYN_STATUS_TEXT /* @min:%2estatusText */];\n }\n if (responseType === \"json\") {\n props.responseText = response.response ? response[_DYN_STATUS_TEXT /* @min:%2estatusText */] + \" - \" + JSON.stringify(response[_DYN_RESPONSE /* @min:%2eresponse */]) : response[_DYN_STATUS_TEXT /* @min:%2estatusText */];\n }\n } else if (self[_DYN_STATUS /* @min:%2estatus */] === 0) {\n props.responseText = response[_DYN_STATUS_TEXT /* @min:%2estatusText */] || \"\";\n }\n }\n }\n }\n return dependency;\n };\n self[_DYN_GET_PART_APROPS /* @min:%2egetPartAProps */] = function () {\n var _a;\n var partA = null;\n var traceCtx = self[_DYN_EVENT_TRACE_CTX /* @min:%2eeventTraceCtx */];\n if (traceCtx && (traceCtx[_DYN_TRACE_ID0 /* @min:%2etraceId */] || traceCtx[_DYN_SPAN_ID1 /* @min:%2espanId */])) {\n partA = {};\n var traceExt = partA[Extensions.TraceExt] = (_a = {}, _a[_DYN_TRACE_ID /* @min:traceID */] = traceCtx[_DYN_TRACE_ID0 /* @min:%2etraceId */], _a.parentID = traceCtx[_DYN_SPAN_ID1 /* @min:%2espanId */], _a);\n if (!isNullOrUndefined(traceCtx[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */])) {\n traceExt[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = traceCtx[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */];\n }\n }\n return partA;\n };\n });\n }\n // Removed Stub for ajaxRecord.prototype.getAbsoluteUrl.\n // Removed Stub for ajaxRecord.prototype.getPathName.\n // Removed Stub for ajaxRecord.prototype.CreateTrackItem.\n // Removed Stub for ajaxRecord.prototype.getPartAProps.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n ajaxRecord.__ieDyn = 1;\n return ajaxRecord;\n}();\nexport { ajaxRecord };\n","/*\n * Application Insights JavaScript SDK - Dependencies Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nvar _a;\nimport { __assignFn as __assign, __extendsFn as __extends } from \"@microsoft/applicationinsights-shims\";\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { DisabledPropertyName, PropertiesPluginIdentifier, RemoteDependencyData, RequestHeaders, correlationIdCanIncludeCorrelationHeader, correlationIdGetCorrelationContext, createDistributedTraceContextFromTrace, createTelemetryItem, createTraceParent, dateTimeUtilsNow, formatTraceParent, isInternalApplicationInsightsEndpoint } from \"@microsoft/applicationinsights-common\";\nimport { BaseTelemetryPlugin, InstrumentFunc, InstrumentProto, _throwInternal, arrForEach, createProcessTelemetryContext, createUniqueNamespace, dumpObj, eventOn, generateW3CId, getExceptionName, getGlobal, getIEVersion, getLocation, getPerformance, isFunction, isNullOrUndefined, isString, isXhrSupported, mergeEvtNamespace, onConfigChange, strPrototype, strTrim } from \"@microsoft/applicationinsights-core-js\";\nimport { isWebWorker, objFreeze, scheduleTimeout, strIndexOf, strSplit, strSubstr } from \"@nevware21/ts-utils\";\nimport { STR_PROPERTIES } from \"./InternalConstants\";\nimport { _DYN_ABORTED, _DYN_ABORT_DONE, _DYN_ADD_REQUEST_CONTEXT, _DYN_AJAX_DIAGNOSTICS_MES16, _DYN_AJAX_PERF_LOOKUP_DEL10, _DYN_CONTEXT, _DYN_CORE, _DYN_CORRELATION_CONTEXT, _DYN_DISABLE_AJAX_TRACKIN9, _DYN_DISABLE_FETCH_TRACKI11, _DYN_ENABLE_AJAX_ERROR_ST5, _DYN_ENABLE_AJAX_PERF_TRA6, _DYN_ENABLE_REQUEST_HEADE4, _DYN_ENABLE_RESPONSE_HEAD12, _DYN_ERROR_STATUS_TEXT, _DYN_EXCEPTION, _DYN_EXCLUDE_REQUEST_FROM8, _DYN_GET_ABSOLUTE_URL, _DYN_GET_ALL_RESPONSE_HEA15, _DYN_GET_PART_APROPS, _DYN_GET_TRACE_FLAGS, _DYN_GET_TRACE_ID, _DYN_HEADERS, _DYN_HEADER_MAP, _DYN_INCLUDE_CORRELATION_2, _DYN_INST, _DYN_LENGTH, _DYN_MAX_AJAX_CALLS_PER_V7, _DYN_METHOD, _DYN_NAME, _DYN_OPEN_DONE, _DYN_PERF_MARK, _DYN_PERF_TIMING, _DYN_REQUEST_HEADERS, _DYN_REQUEST_SENT_TIME, _DYN_REQUEST_URL, _DYN_RESPONSE, _DYN_RESPONSE_FINISHED_TI14, _DYN_RESPONSE_TEXT, _DYN_SEND_DONE, _DYN_SET_REQUEST_HEADER, _DYN_SPAN_ID, _DYN_SPAN_ID1, _DYN_START_TIME, _DYN_STATE_CHANGE_ATTACHE13, _DYN_STATUS, _DYN_STATUS_TEXT, _DYN_TO_LOWER_CASE, _DYN_TRACE_FLAGS, _DYN_TRACE_ID, _DYN_TRACE_ID0, _DYN_TRACK_DEPENDENCY_DAT3, _DYN__ADD_HOOK, _DYN__CREATE_TRACK_ITEM } from \"./__DynamicConstants\";\nimport { ajaxRecord } from \"./ajaxRecord\";\nvar AJAX_MONITOR_PREFIX = \"ai.ajxmn.\";\nvar strDiagLog = \"diagLog\";\nvar AJAX_DATA_CONTAINER = \"_ajaxData\";\nvar STR_FETCH = \"fetch\";\nvar ERROR_HEADER = \"Failed to monitor XMLHttpRequest\";\nvar ERROR_PREFIX = \", monitoring data for this ajax call \";\nvar ERROR_POSTFIX = ERROR_PREFIX + \"may be incorrect.\";\nvar ERROR_NOT_SENT = ERROR_PREFIX + \"won't be sent.\";\nvar CORRELATION_HEADER_ERROR = \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\";\nvar CUSTOM_REQUEST_CONTEXT_ERROR = \"Failed to add custom defined request context as configured call back may missing a null check.\";\nvar FAILED_TO_CALCULATE_DURATION_ERROR = \"Failed to calculate the duration of the \";\n// Using a global value so that to handle same iKey with multiple app insights instances (mostly for testing)\nvar _markCount = 0;\n/** @Ignore */\nfunction _supportsFetch() {\n var _global = getGlobal();\n if (!_global || isNullOrUndefined(_global.Request) || isNullOrUndefined(_global.Request[strPrototype]) || isNullOrUndefined(_global[STR_FETCH])) {\n return null;\n }\n return _global[STR_FETCH];\n}\n/**\r\n * Determines whether ajax monitoring can be enabled on this document\r\n * @returns True if Ajax monitoring is supported on this page, otherwise false\r\n * @ignore\r\n */\nfunction _supportsAjaxMonitoring(ajaxMonitorInstance, ajaxDataId) {\n var _a, _b;\n var result = false;\n if (isXhrSupported()) {\n var proto = XMLHttpRequest[strPrototype];\n result = !isNullOrUndefined(proto) && !isNullOrUndefined(proto.open) &&\n // eslint-disable-line security/detect-non-literal-fs-filename -- false positive\n !isNullOrUndefined(proto.send) && !isNullOrUndefined(proto.abort);\n }\n var ieVer = getIEVersion();\n if (ieVer && ieVer < 9) {\n result = false;\n }\n if (result) {\n // Disable if the XmlHttpRequest can't be extended or hooked\n try {\n var xhr = new XMLHttpRequest();\n var xhrData = {\n xh: [],\n i: (_a = {}, _a[ajaxDataId] = {}, _a)\n };\n xhr[AJAX_DATA_CONTAINER] = xhrData;\n // Check that we can update the prototype\n var theOpen = XMLHttpRequest[strPrototype].open;\n XMLHttpRequest[strPrototype].open = theOpen;\n } catch (e) {\n // We can't decorate the xhr object so disable monitoring\n result = false;\n _throwInternalCritical(ajaxMonitorInstance, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */, \"Failed to enable XMLHttpRequest monitoring, extension is not supported\", (_b = {}, _b[_DYN_EXCEPTION /* @min:exception */] = dumpObj(e), _b));\n }\n }\n return result;\n}\n/**\r\n * Internal helper to fetch the SDK instance tracking data for this XHR request\r\n * @param xhr\r\n * @param ajaxDataId\r\n * @returns\r\n */\nvar _getAjaxData = function (xhr, ajaxDataId) {\n if (xhr && ajaxDataId && xhr[AJAX_DATA_CONTAINER]) {\n return (xhr[AJAX_DATA_CONTAINER].i || {})[ajaxDataId];\n }\n return null;\n};\n/**\r\n * @ignore\r\n * Internal helper to track the singleton shared tracking headers, so we can attempt to not create headers\r\n * that might cause an issue if multiple values are populated.\r\n * @param xhr - The instrumented XHR instance\r\n */\nvar _addSharedXhrHeaders = function (xhr, name, value) {\n if (xhr) {\n var headers = (xhr[AJAX_DATA_CONTAINER] || {}).xh;\n if (headers) {\n headers.push({\n n: name,\n v: value\n });\n }\n }\n};\nvar _isHeaderSet = function (xhr, name) {\n var isPresent = false;\n if (xhr) {\n var headers = (xhr[AJAX_DATA_CONTAINER] || {}).xh;\n if (headers) {\n arrForEach(headers, function (header) {\n if (header.n === name) {\n isPresent = true;\n return -1;\n }\n });\n }\n }\n return isPresent;\n};\n/** @Ignore */\nfunction _getFailedAjaxDiagnosticsMessage(xhr, ajaxDataId) {\n var result = \"\";\n try {\n var ajaxData = _getAjaxData(xhr, ajaxDataId);\n if (ajaxData && ajaxData[_DYN_REQUEST_URL /* @min:%2erequestUrl */]) {\n result += \"(url: '\" + ajaxData[_DYN_REQUEST_URL /* @min:%2erequestUrl */] + \"')\";\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n return result;\n}\n/** @ignore */\nfunction _throwInternalCritical(ajaxMonitorInstance, msgId, message, properties, isUserAct) {\n _throwInternal(ajaxMonitorInstance[strDiagLog](), 1 /* eLoggingSeverity.CRITICAL */, msgId, message, properties, isUserAct);\n}\n/** @ignore */\nfunction _throwInternalWarning(ajaxMonitorInstance, msgId, message, properties, isUserAct) {\n _throwInternal(ajaxMonitorInstance[strDiagLog](), 2 /* eLoggingSeverity.WARNING */, msgId, message, properties, isUserAct);\n}\n/** @Ignore */\nfunction _createErrorCallbackFunc(ajaxMonitorInstance, internalMessage, message) {\n // tslint:disable-next-line\n return function (callDetails) {\n var _a;\n _throwInternalCritical(ajaxMonitorInstance, internalMessage, message, (_a = {\n ajaxDiagnosticsMessage: _getFailedAjaxDiagnosticsMessage(callDetails[_DYN_INST /* @min:%2einst */], ajaxMonitorInstance._ajaxDataId)\n }, _a[_DYN_EXCEPTION /* @min:exception */] = dumpObj(callDetails.err), _a));\n };\n}\nfunction _indexOf(value, match) {\n if (value && match) {\n return strIndexOf(value, match);\n }\n return -1;\n}\nfunction _addHandler(container, id, theFunc) {\n var theHandler = {\n id: id,\n fn: theFunc\n };\n container.push(theHandler);\n return {\n remove: function () {\n arrForEach(container, function (initializer, idx) {\n if (initializer.id === theHandler.id) {\n container.splice(idx, 1);\n return -1;\n }\n });\n }\n };\n}\nfunction _processDependencyContainer(core, container, details, message) {\n var result = true;\n arrForEach(container, function (theFunc, idx) {\n try {\n if (theFunc.fn.call(null, details) === false) {\n result = false;\n }\n } catch (e) {\n _throwInternal(core && core.logger, 1 /* eLoggingSeverity.CRITICAL */, 64 /* _eInternalMessageId.TelemetryInitializerFailed */, \"Dependency \" + message + \" [#\" + idx + \"] failed: \" + getExceptionName(e), {\n exception: dumpObj(e)\n }, true);\n }\n });\n return result;\n}\nfunction _processDependencyListeners(listeners, core, ajaxData, xhr, input, init) {\n var _a;\n var initializersCount = listeners[_DYN_LENGTH /* @min:%2elength */];\n if (initializersCount > 0) {\n var details = (_a = {}, _a[_DYN_CORE /* @min:core */] = core, _a.xhr = xhr, _a.input = input, _a.init = init, _a.traceId = ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */], _a.spanId = ajaxData[_DYN_SPAN_ID /* @min:%2espanID */], _a.traceFlags = ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */], _a.context = ajaxData[_DYN_CONTEXT /* @min:%2econtext */] || {}, _a.aborted = !!ajaxData[_DYN_ABORTED /* @min:%2eaborted */], _a);\n _processDependencyContainer(core, listeners, details, \"listener\");\n ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */] = details[_DYN_TRACE_ID0 /* @min:%2etraceId */];\n ajaxData[_DYN_SPAN_ID /* @min:%2espanID */] = details[_DYN_SPAN_ID1 /* @min:%2espanId */];\n ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = details[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */];\n ajaxData[_DYN_CONTEXT /* @min:%2econtext */] = details[_DYN_CONTEXT /* @min:%2econtext */];\n }\n}\nvar BLOB_CORE = \"*.blob.core.\";\nexport var DfltAjaxCorrelationHeaderExDomains = objFreeze([BLOB_CORE + \"windows.net\", BLOB_CORE + \"chinacloudapi.cn\", BLOB_CORE + \"cloudapi.de\", BLOB_CORE + \"usgovcloudapi.net\"]);\nvar _internalExcludeEndpoints = [/https:\\/\\/[^\\/]*(\\.pipe\\.aria|aria\\.pipe|events\\.data|collector\\.azure)\\.[^\\/]+\\/(OneCollector\\/1|Collector\\/3)\\.0/i];\nvar _defaultConfig = objFreeze((_a = {}, _a[_DYN_MAX_AJAX_CALLS_PER_V7 /* @min:maxAjaxCallsPerView */] = 500, _a[_DYN_DISABLE_AJAX_TRACKIN9 /* @min:disableAjaxTracking */] = false, _a[_DYN_DISABLE_FETCH_TRACKI11 /* @min:disableFetchTracking */] = false, _a[_DYN_EXCLUDE_REQUEST_FROM8 /* @min:excludeRequestFromAutoTrackingPatterns */] = undefined, _a.disableCorrelationHeaders = false, _a.distributedTracingMode = 1 /* eDistributedTracingModes.AI_AND_W3C */, _a.correlationHeaderExcludedDomains = DfltAjaxCorrelationHeaderExDomains, _a.correlationHeaderDomains = undefined, _a.correlationHeaderExcludePatterns = undefined, _a.appId = undefined, _a.enableCorsCorrelation = false, _a[_DYN_ENABLE_REQUEST_HEADE4 /* @min:enableRequestHeaderTracking */] = false, _a[_DYN_ENABLE_RESPONSE_HEAD12 /* @min:enableResponseHeaderTracking */] = false, _a[_DYN_ENABLE_AJAX_ERROR_ST5 /* @min:enableAjaxErrorStatusText */] = false, _a[_DYN_ENABLE_AJAX_PERF_TRA6 /* @min:enableAjaxPerfTracking */] = false, _a.maxAjaxPerfLookupAttempts = 3, _a[_DYN_AJAX_PERF_LOOKUP_DEL10 /* @min:ajaxPerfLookupDelay */] = 25, _a.ignoreHeaders = [\"Authorization\", \"X-API-Key\", \"WWW-Authenticate\"], _a[_DYN_ADD_REQUEST_CONTEXT /* @min:addRequestContext */] = undefined, _a.addIntEndpoints = true, _a));\nvar AjaxMonitor = /** @class */function (_super) {\n __extends(AjaxMonitor, _super);\n function AjaxMonitor() {\n var _this = _super.call(this) || this;\n _this.identifier = AjaxMonitor.identifier;\n _this.priority = 120;\n var _fetchInitialized; // fetch monitoring initialized\n var _xhrInitialized; // XHR monitoring initialized\n var _currentWindowHost;\n var _extensionConfig;\n var _enableRequestHeaderTracking;\n var _enableAjaxErrorStatusText;\n var _trackAjaxAttempts;\n var _context;\n var _isUsingW3CHeaders;\n var _isUsingAIHeaders;\n var _markPrefix;\n var _enableAjaxPerfTracking;\n var _maxAjaxCallsPerView;\n var _enableResponseHeaderTracking;\n var _disabledUrls;\n var _disableAjaxTracking;\n var _disableFetchTracking;\n var _excludeRequestFromAutoTrackingPatterns;\n var _addRequestContext;\n var _evtNamespace;\n var _ajaxDataId;\n var _dependencyHandlerId;\n var _dependencyListeners;\n var _dependencyInitializers;\n var _ignoreHeaders;\n var _maxAjaxPerfLookupAttempts;\n var _ajaxPerfLookupDelay;\n var _distributedTracingMode;\n var _appId;\n var _polyfillInitialized;\n dynamicProto(AjaxMonitor, _this, function (_self, _base) {\n var _addHook = _base[_DYN__ADD_HOOK /* @min:%2e_addHook */];\n _initDefaults();\n _self.initialize = function (config, core, extensions, pluginChain) {\n if (!_self.isInitialized()) {\n _base.initialize(config, core, extensions, pluginChain);\n _evtNamespace = mergeEvtNamespace(createUniqueNamespace(\"ajax\"), core && core.evtNamespace && core.evtNamespace());\n _populateDefaults(config);\n _instrumentXhr();\n _instrumentFetch();\n _populateContext();\n }\n };\n _self._doTeardown = function () {\n _initDefaults();\n };\n _self.trackDependencyData = function (dependency, properties) {\n _reportDependencyInternal(_dependencyInitializers, _self[_DYN_CORE /* @min:%2ecore */], null, dependency, properties);\n };\n _self[_DYN_INCLUDE_CORRELATION_2 /* @min:%2eincludeCorrelationHeaders */] = function (ajaxData, input, init, xhr) {\n // Test Hook to allow the overriding of the location host\n var currentWindowHost = _self[\"_currentWindowHost\"] || _currentWindowHost;\n _processDependencyListeners(_dependencyListeners, _self[_DYN_CORE /* @min:%2ecore */], ajaxData, xhr, input, init);\n if (input || input === \"\") {\n // Fetch\n if (correlationIdCanIncludeCorrelationHeader(_extensionConfig, ajaxData[_DYN_GET_ABSOLUTE_URL /* @min:%2egetAbsoluteUrl */](), currentWindowHost)) {\n if (!init) {\n init = {};\n }\n // init headers override original request headers\n // so, if they exist use only them, otherwise use request's because they should have been applied in the first place\n // not using original request headers will result in them being lost\n var headers = new Headers(init[_DYN_HEADERS /* @min:%2eheaders */] || (input instanceof Request ? input[_DYN_HEADERS /* @min:%2eheaders */] || {} : {}));\n if (_isUsingAIHeaders) {\n var id = \"|\" + ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */] + \".\" + ajaxData[_DYN_SPAN_ID /* @min:%2espanID */];\n headers.set(RequestHeaders[3 /* eRequestHeaders.requestIdHeader */], id);\n if (_enableRequestHeaderTracking) {\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[3 /* eRequestHeaders.requestIdHeader */]] = id;\n }\n }\n var appId = _appId || _context && _context.appId();\n if (appId) {\n headers.set(RequestHeaders[0 /* eRequestHeaders.requestContextHeader */], RequestHeaders[2 /* eRequestHeaders.requestContextAppIdFormat */] + appId);\n if (_enableRequestHeaderTracking) {\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[0 /* eRequestHeaders.requestContextHeader */]] = RequestHeaders[2 /* eRequestHeaders.requestContextAppIdFormat */] + appId;\n }\n }\n if (_isUsingW3CHeaders) {\n var traceFlags = ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */];\n if (isNullOrUndefined(traceFlags)) {\n traceFlags = 0x01;\n }\n var traceParent = formatTraceParent(createTraceParent(ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */], ajaxData[_DYN_SPAN_ID /* @min:%2espanID */], traceFlags));\n headers.set(RequestHeaders[4 /* eRequestHeaders.traceParentHeader */], traceParent);\n if (_enableRequestHeaderTracking) {\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[4 /* eRequestHeaders.traceParentHeader */]] = traceParent;\n }\n }\n init[_DYN_HEADERS /* @min:%2eheaders */] = headers;\n }\n return init;\n } else if (xhr) {\n // XHR\n if (correlationIdCanIncludeCorrelationHeader(_extensionConfig, ajaxData[_DYN_GET_ABSOLUTE_URL /* @min:%2egetAbsoluteUrl */](), currentWindowHost)) {\n if (_isUsingAIHeaders) {\n if (!_isHeaderSet(xhr, RequestHeaders[3 /* eRequestHeaders.requestIdHeader */])) {\n var id = \"|\" + ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */] + \".\" + ajaxData[_DYN_SPAN_ID /* @min:%2espanID */];\n xhr[_DYN_SET_REQUEST_HEADER /* @min:%2esetRequestHeader */](RequestHeaders[3 /* eRequestHeaders.requestIdHeader */], id);\n if (_enableRequestHeaderTracking) {\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[3 /* eRequestHeaders.requestIdHeader */]] = id;\n }\n } else {\n _throwInternalWarning(_self, 71 /* _eInternalMessageId.FailedMonitorAjaxSetRequestHeader */, \"Unable to set [\" + RequestHeaders[3 /* eRequestHeaders.requestIdHeader */] + \"] as it has already been set by another instance\");\n }\n }\n var appId = _appId || _context && _context.appId();\n if (appId) {\n if (!_isHeaderSet(xhr, RequestHeaders[0 /* eRequestHeaders.requestContextHeader */])) {\n xhr[_DYN_SET_REQUEST_HEADER /* @min:%2esetRequestHeader */](RequestHeaders[0 /* eRequestHeaders.requestContextHeader */], RequestHeaders[2 /* eRequestHeaders.requestContextAppIdFormat */] + appId);\n if (_enableRequestHeaderTracking) {\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[0 /* eRequestHeaders.requestContextHeader */]] = RequestHeaders[2 /* eRequestHeaders.requestContextAppIdFormat */] + appId;\n }\n } else {\n _throwInternalWarning(_self, 71 /* _eInternalMessageId.FailedMonitorAjaxSetRequestHeader */, \"Unable to set [\" + RequestHeaders[0 /* eRequestHeaders.requestContextHeader */] + \"] as it has already been set by another instance\");\n }\n }\n if (_isUsingW3CHeaders) {\n var traceFlags = ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */];\n if (isNullOrUndefined(traceFlags)) {\n traceFlags = 0x01;\n }\n if (!_isHeaderSet(xhr, RequestHeaders[4 /* eRequestHeaders.traceParentHeader */])) {\n var traceParent = formatTraceParent(createTraceParent(ajaxData[_DYN_TRACE_ID /* @min:%2etraceID */], ajaxData[_DYN_SPAN_ID /* @min:%2espanID */], traceFlags));\n xhr[_DYN_SET_REQUEST_HEADER /* @min:%2esetRequestHeader */](RequestHeaders[4 /* eRequestHeaders.traceParentHeader */], traceParent);\n if (_enableRequestHeaderTracking) {\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][RequestHeaders[4 /* eRequestHeaders.traceParentHeader */]] = traceParent;\n }\n } else {\n _throwInternalWarning(_self, 71 /* _eInternalMessageId.FailedMonitorAjaxSetRequestHeader */, \"Unable to set [\" + RequestHeaders[4 /* eRequestHeaders.traceParentHeader */] + \"] as it has already been set by another instance\");\n }\n }\n }\n return xhr;\n }\n return undefined;\n };\n _self[_DYN_TRACK_DEPENDENCY_DAT3 /* @min:%2etrackDependencyDataInternal */] = function (dependency, properties, systemProperties) {\n if (_maxAjaxCallsPerView === -1 || _trackAjaxAttempts < _maxAjaxCallsPerView) {\n // Hack since expected format in w3c mode is |abc.def.\n // Non-w3c format is |abc.def\n // @todo Remove if better solution is available, e.g. handle in portal\n if ((_distributedTracingMode === 2 /* eDistributedTracingModes.W3C */ || _distributedTracingMode === 1 /* eDistributedTracingModes.AI_AND_W3C */) && typeof dependency.id === \"string\" && dependency.id[dependency.id[_DYN_LENGTH /* @min:%2elength */] - 1] !== \".\") {\n dependency.id += \".\";\n }\n if (isNullOrUndefined(dependency[_DYN_START_TIME /* @min:%2estartTime */])) {\n dependency[_DYN_START_TIME /* @min:%2estartTime */] = new Date();\n }\n var item = createTelemetryItem(dependency, RemoteDependencyData.dataType, RemoteDependencyData.envelopeType, _self[strDiagLog](), properties, systemProperties);\n _self[_DYN_CORE /* @min:%2ecore */].track(item);\n } else if (_trackAjaxAttempts === _maxAjaxCallsPerView) {\n _throwInternalCritical(_self, 55 /* _eInternalMessageId.MaxAjaxPerPVExceeded */, \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\", true);\n }\n ++_trackAjaxAttempts;\n };\n _self.addDependencyListener = function (dependencyListener) {\n return _addHandler(_dependencyListeners, _dependencyHandlerId++, dependencyListener);\n };\n _self.addDependencyInitializer = function (dependencyInitializer) {\n return _addHandler(_dependencyInitializers, _dependencyHandlerId++, dependencyInitializer);\n };\n function _initDefaults() {\n var location = getLocation();\n _fetchInitialized = false; // fetch monitoring initialized\n _xhrInitialized = false; // XHR monitoring initialized\n _polyfillInitialized = false; // polyfill monitoring initialized\n _currentWindowHost = location && location.host && location.host[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\n _extensionConfig = null;\n _enableRequestHeaderTracking = false;\n _enableAjaxErrorStatusText = false;\n _trackAjaxAttempts = 0;\n _context = null;\n _isUsingW3CHeaders = false;\n _isUsingAIHeaders = false;\n _markPrefix = null;\n _enableAjaxPerfTracking = false;\n _maxAjaxCallsPerView = 0;\n _enableResponseHeaderTracking = false;\n _disabledUrls = {};\n _disableAjaxTracking = false;\n _disableFetchTracking = false;\n _excludeRequestFromAutoTrackingPatterns = null;\n _addRequestContext = null;\n _evtNamespace = null;\n _dependencyHandlerId = 0;\n _dependencyListeners = [];\n _dependencyInitializers = [];\n _ajaxDataId = createUniqueNamespace(\"ajaxData\");\n _self._ajaxDataId = _ajaxDataId;\n _ignoreHeaders = null;\n _maxAjaxPerfLookupAttempts = 1;\n _ajaxPerfLookupDelay = 1;\n _distributedTracingMode = 1 /* eDistributedTracingModes.AI_AND_W3C */;\n _appId = null;\n }\n function _populateDefaults(config) {\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(config, function (details) {\n var config = details.cfg;\n var ctx = createProcessTelemetryContext(null, config, _self[_DYN_CORE /* @min:%2ecore */]);\n _extensionConfig = ctx.getExtCfg(AjaxMonitor.identifier, _defaultConfig);\n _distributedTracingMode = _extensionConfig.distributedTracingMode;\n _enableRequestHeaderTracking = _extensionConfig[_DYN_ENABLE_REQUEST_HEADE4 /* @min:%2eenableRequestHeaderTracking */];\n _enableAjaxErrorStatusText = _extensionConfig[_DYN_ENABLE_AJAX_ERROR_ST5 /* @min:%2eenableAjaxErrorStatusText */];\n _enableAjaxPerfTracking = _extensionConfig[_DYN_ENABLE_AJAX_PERF_TRA6 /* @min:%2eenableAjaxPerfTracking */];\n _maxAjaxCallsPerView = _extensionConfig[_DYN_MAX_AJAX_CALLS_PER_V7 /* @min:%2emaxAjaxCallsPerView */];\n _excludeRequestFromAutoTrackingPatterns = [].concat(_extensionConfig[_DYN_EXCLUDE_REQUEST_FROM8 /* @min:%2eexcludeRequestFromAutoTrackingPatterns */] || [], _extensionConfig.addIntEndpoints !== false ? _internalExcludeEndpoints : []);\n _addRequestContext = _extensionConfig[_DYN_ADD_REQUEST_CONTEXT /* @min:%2eaddRequestContext */];\n _isUsingAIHeaders = _distributedTracingMode === 0 /* eDistributedTracingModes.AI */ || _distributedTracingMode === 1 /* eDistributedTracingModes.AI_AND_W3C */;\n _isUsingW3CHeaders = _distributedTracingMode === 1 /* eDistributedTracingModes.AI_AND_W3C */ || _distributedTracingMode === 2 /* eDistributedTracingModes.W3C */;\n if (_enableAjaxPerfTracking) {\n _markPrefix = _ajaxDataId;\n }\n _disableAjaxTracking = !!_extensionConfig[_DYN_DISABLE_AJAX_TRACKIN9 /* @min:%2edisableAjaxTracking */];\n _maxAjaxPerfLookupAttempts = _extensionConfig.maxAjaxPerfLookupAttempts;\n _ajaxPerfLookupDelay = _extensionConfig[_DYN_AJAX_PERF_LOOKUP_DEL10 /* @min:%2eajaxPerfLookupDelay */];\n _ignoreHeaders = _extensionConfig.ignoreHeaders;\n _appId = _extensionConfig.appId;\n }));\n }\n function _populateContext() {\n var propExt = _self[_DYN_CORE /* @min:%2ecore */].getPlugin(PropertiesPluginIdentifier);\n if (propExt) {\n _context = propExt.plugin[_DYN_CONTEXT /* @min:%2econtext */]; // we could move IPropertiesPlugin to common as well\n }\n }\n // discard the header if it's defined as ignoreHeaders in ICorrelationConfig\n function _canIncludeHeaders(header) {\n var rlt = true;\n if (header || _ignoreHeaders) {\n arrForEach(_ignoreHeaders, function (key) {\n if (key[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() === header[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]()) {\n rlt = false;\n return -1;\n }\n });\n }\n return rlt;\n }\n // Fetch Stuff\n function _instrumentFetch() {\n var fetch = _supportsFetch();\n if (!fetch) {\n return;\n }\n var global = getGlobal();\n var isPolyfill = fetch.polyfill;\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extensionConfig, function () {\n _disableFetchTracking = !!_extensionConfig[_DYN_DISABLE_FETCH_TRACKI11 /* @min:%2edisableFetchTracking */];\n _enableResponseHeaderTracking = _extensionConfig[_DYN_ENABLE_RESPONSE_HEAD12 /* @min:%2eenableResponseHeaderTracking */];\n if (!_disableFetchTracking && !_fetchInitialized) {\n _addHook(InstrumentFunc(global, STR_FETCH, {\n ns: _evtNamespace,\n // Add request hook\n req: function (callDetails, input, init) {\n var fetchData;\n if (!_disableFetchTracking && _fetchInitialized && !_isDisabledRequest(null, input, init) &&\n // If we have a polyfil and XHR instrumented then let XHR report otherwise we get duplicates\n !(isPolyfill && _xhrInitialized)) {\n var ctx = callDetails.ctx();\n fetchData = _createFetchRecord(input, init);\n var newInit = _self[_DYN_INCLUDE_CORRELATION_2 /* @min:%2eincludeCorrelationHeaders */](fetchData, input, init);\n if (newInit !== init) {\n callDetails.set(1, newInit);\n }\n ctx.data = fetchData;\n }\n },\n rsp: function (callDetails, input) {\n if (!_disableFetchTracking) {\n var fetchData_1 = callDetails.ctx().data;\n if (fetchData_1) {\n // Replace the result with the new promise from this code\n callDetails.rslt = callDetails.rslt.then(function (response) {\n _reportFetchMetrics(callDetails, (response || {})[_DYN_STATUS /* @min:%2estatus */], input, response, fetchData_1, function () {\n var _a;\n var ajaxResponse = (_a = {\n statusText: (response || {})[_DYN_STATUS_TEXT /* @min:%2estatusText */]\n }, _a[_DYN_HEADER_MAP /* @min:headerMap */] = null, _a[_DYN_CORRELATION_CONTEXT /* @min:correlationContext */] = _getFetchCorrelationContext(response), _a);\n if (_enableResponseHeaderTracking && response) {\n var responseHeaderMap_1 = {};\n response.headers.forEach(function (value, name) {\n if (_canIncludeHeaders(name)) {\n responseHeaderMap_1[name] = value;\n }\n });\n ajaxResponse[_DYN_HEADER_MAP /* @min:%2eheaderMap */] = responseHeaderMap_1;\n }\n return ajaxResponse;\n });\n return response;\n }).catch(function (reason) {\n _reportFetchMetrics(callDetails, 0, input, null, fetchData_1, null, {\n error: reason.message || dumpObj(reason)\n });\n throw reason;\n });\n }\n }\n },\n // Create an error callback to report any hook errors\n hkErr: _createErrorCallbackFunc(_self, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */, \"Failed to monitor Window.fetch\" + ERROR_POSTFIX)\n }, true, isWebWorker()));\n _fetchInitialized = true;\n } else if (isPolyfill && !_polyfillInitialized) {\n // If fetch is a polyfill we need to capture the request to ensure that we correctly track\n // disabled request URLS (i.e. internal urls) to ensure we don't end up in a constant loop\n // of reporting ourselves, for example React Native uses a polyfill for fetch\n // Note: Polyfill implementations that don't support the \"polyfill\" tag are not supported\n // the workaround is to add a polyfill property to your fetch implementation before initializing\n // App Insights\n _addHook(InstrumentFunc(global, STR_FETCH, {\n ns: _evtNamespace,\n req: function (callDetails, input, init) {\n // Just call so that we record any disabled URL\n _isDisabledRequest(null, input, init);\n }\n }));\n _polyfillInitialized = true;\n }\n }));\n if (isPolyfill) {\n // retag the instrumented fetch with the same polyfill settings this is mostly for testing\n // But also supports multiple App Insights usages\n global[STR_FETCH].polyfill = isPolyfill;\n }\n }\n function _hookProto(target, funcName, callbacks) {\n _addHook(InstrumentProto(target, funcName, callbacks));\n }\n function _instrumentXhr() {\n if (!_supportsAjaxMonitoring(_self, _ajaxDataId)) {\n return;\n }\n _self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extensionConfig, function () {\n _disableAjaxTracking = !!_extensionConfig[_DYN_DISABLE_AJAX_TRACKIN9 /* @min:%2edisableAjaxTracking */];\n _enableRequestHeaderTracking = _extensionConfig[_DYN_ENABLE_REQUEST_HEADE4 /* @min:%2eenableRequestHeaderTracking */];\n if (!_disableAjaxTracking && !_xhrInitialized) {\n // Instrument open\n _hookProto(XMLHttpRequest, \"open\", {\n ns: _evtNamespace,\n req: function (callDetails, method, url, async) {\n if (!_disableAjaxTracking) {\n var xhr = callDetails[_DYN_INST /* @min:%2einst */];\n var ajaxData = _getAjaxData(xhr, _ajaxDataId);\n if (!_isDisabledRequest(xhr, url) && _isMonitoredXhrInstance(xhr, ajaxData, true)) {\n if (!ajaxData || !ajaxData.xhrMonitoringState[_DYN_OPEN_DONE /* @min:%2eopenDone */]) {\n // Only create a single ajaxData (even when multiple AI instances are running)\n ajaxData = _openHandler(xhr, method, url, async);\n }\n // always attach to the on ready state change (required for handling multiple instances)\n _attachToOnReadyStateChange(xhr, ajaxData);\n }\n }\n },\n hkErr: _createErrorCallbackFunc(_self, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */, ERROR_HEADER + \".open\" + ERROR_POSTFIX)\n });\n // Instrument send\n _hookProto(XMLHttpRequest, \"send\", {\n ns: _evtNamespace,\n req: function (callDetails, context) {\n if (!_disableAjaxTracking) {\n var xhr = callDetails[_DYN_INST /* @min:%2einst */];\n var ajaxData = _getAjaxData(xhr, _ajaxDataId);\n if (_isMonitoredXhrInstance(xhr, ajaxData) && !ajaxData.xhrMonitoringState[_DYN_SEND_DONE /* @min:%2esendDone */]) {\n _createMarkId(\"xhr\", ajaxData);\n ajaxData[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */] = dateTimeUtilsNow();\n _self[_DYN_INCLUDE_CORRELATION_2 /* @min:%2eincludeCorrelationHeaders */](ajaxData, undefined, undefined, xhr);\n ajaxData.xhrMonitoringState[_DYN_SEND_DONE /* @min:%2esendDone */] = true;\n }\n }\n },\n hkErr: _createErrorCallbackFunc(_self, 17 /* _eInternalMessageId.FailedMonitorAjaxSend */, ERROR_HEADER + ERROR_POSTFIX)\n });\n // Instrument abort\n _hookProto(XMLHttpRequest, \"abort\", {\n ns: _evtNamespace,\n req: function (callDetails) {\n if (!_disableAjaxTracking) {\n var xhr = callDetails[_DYN_INST /* @min:%2einst */];\n var ajaxData = _getAjaxData(xhr, _ajaxDataId);\n if (_isMonitoredXhrInstance(xhr, ajaxData) && !ajaxData.xhrMonitoringState[_DYN_ABORT_DONE /* @min:%2eabortDone */]) {\n ajaxData[_DYN_ABORTED /* @min:%2eaborted */] = 1;\n ajaxData.xhrMonitoringState[_DYN_ABORT_DONE /* @min:%2eabortDone */] = true;\n }\n }\n },\n hkErr: _createErrorCallbackFunc(_self, 13 /* _eInternalMessageId.FailedMonitorAjaxAbort */, ERROR_HEADER + \".abort\" + ERROR_POSTFIX)\n });\n // Instrument setRequestHeader\n _hookProto(XMLHttpRequest, \"setRequestHeader\", {\n ns: _evtNamespace,\n req: function (callDetails, header, value) {\n if (!_disableAjaxTracking) {\n var xhr = callDetails[_DYN_INST /* @min:%2einst */];\n var ajaxData = _getAjaxData(xhr, _ajaxDataId);\n if (ajaxData && _isMonitoredXhrInstance(xhr, ajaxData)) {\n _addSharedXhrHeaders(xhr, header, value);\n if (_enableRequestHeaderTracking && _canIncludeHeaders(header)) {\n if (ajaxData) {\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */][header] = value;\n }\n }\n }\n }\n },\n hkErr: _createErrorCallbackFunc(_self, 71 /* _eInternalMessageId.FailedMonitorAjaxSetRequestHeader */, ERROR_HEADER + \".setRequestHeader\" + ERROR_POSTFIX)\n });\n _xhrInitialized = true;\n }\n }));\n }\n function _isDisabledRequest(xhr, request, init) {\n var isDisabled = false;\n var theUrl = ((!isString(request) ? (request || {}).url || \"\" : request) || \"\")[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\n // check excludeRequestFromAutoTrackingPatterns before stripping off any query string\n arrForEach(_excludeRequestFromAutoTrackingPatterns, function (regex) {\n var theRegex = regex;\n if (isString(regex)) {\n theRegex = new RegExp(regex);\n }\n if (!isDisabled) {\n isDisabled = theRegex.test(theUrl);\n }\n });\n // if request url matches with exclude regex pattern, return true and no need to check for headers\n if (isDisabled) {\n return isDisabled;\n }\n var idx = _indexOf(theUrl, \"?\");\n var idx2 = _indexOf(theUrl, \"#\");\n if (idx === -1 || idx2 !== -1 && idx2 < idx) {\n idx = idx2;\n }\n if (idx !== -1) {\n // Strip off any Query string\n theUrl = theUrl.substring(0, idx);\n }\n // check that this instance is not not used by ajax call performed inside client side monitoring to send data to collector\n if (!isNullOrUndefined(xhr)) {\n // Look on the XMLHttpRequest of the URL string value\n isDisabled = xhr[DisabledPropertyName] === true || theUrl[DisabledPropertyName] === true;\n } else if (!isNullOrUndefined(request)) {\n // fetch\n // Look for DisabledPropertyName in either Request or RequestInit\n isDisabled = (typeof request === \"object\" ? request[DisabledPropertyName] === true : false) || (init ? init[DisabledPropertyName] === true : false);\n }\n // Also add extra check just in case the XHR or fetch objects where not decorated with the DisableProperty due to sealing or freezing\n if (!isDisabled && theUrl && isInternalApplicationInsightsEndpoint(theUrl)) {\n isDisabled = true;\n }\n if (isDisabled) {\n // Add the disabled url if not present\n if (!_disabledUrls[theUrl]) {\n _disabledUrls[theUrl] = 1;\n }\n } else {\n // Check to see if the url is listed as disabled\n if (_disabledUrls[theUrl]) {\n isDisabled = true;\n }\n }\n return isDisabled;\n }\n /// Verifies that particular instance of XMLHttpRequest needs to be monitored\n /// Optional parameter. True if ajaxData must be excluded from verification\n /// True if instance needs to be monitored, otherwise false\n function _isMonitoredXhrInstance(xhr, ajaxData, excludeAjaxDataValidation) {\n var ajaxValidation = true;\n var initialized = _xhrInitialized;\n if (!isNullOrUndefined(xhr)) {\n ajaxValidation = excludeAjaxDataValidation === true || !isNullOrUndefined(ajaxData);\n }\n // checking to see that all interested functions on xhr were instrumented\n return initialized\n // checking on ajaxData to see that it was not removed in user code\n && ajaxValidation;\n }\n function _getDistributedTraceCtx() {\n var distributedTraceCtx = null;\n if (_self[_DYN_CORE /* @min:%2ecore */] && _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx) {\n distributedTraceCtx = _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx(false);\n }\n // Fall back\n if (!distributedTraceCtx && _context && _context.telemetryTrace) {\n distributedTraceCtx = createDistributedTraceContextFromTrace(_context.telemetryTrace);\n }\n return distributedTraceCtx;\n }\n function _openHandler(xhr, method, url, async) {\n var _a;\n var distributedTraceCtx = _getDistributedTraceCtx();\n var traceID = distributedTraceCtx && distributedTraceCtx[_DYN_GET_TRACE_ID /* @min:%2egetTraceId */]() || generateW3CId();\n var spanID = strSubstr(generateW3CId(), 0, 16);\n var xhrRequestData = xhr[AJAX_DATA_CONTAINER] = xhr[AJAX_DATA_CONTAINER] || {\n xh: [],\n i: {}\n };\n var ajaxDataCntr = xhrRequestData.i = xhrRequestData.i || {};\n var ajaxData = ajaxDataCntr[_ajaxDataId] = ajaxDataCntr[_ajaxDataId] || new ajaxRecord(traceID, spanID, _self[strDiagLog](), (_a = _self.core) === null || _a === void 0 ? void 0 : _a.getTraceCtx());\n ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = distributedTraceCtx && distributedTraceCtx[_DYN_GET_TRACE_FLAGS /* @min:%2egetTraceFlags */]();\n ajaxData[_DYN_METHOD /* @min:%2emethod */] = method;\n ajaxData[_DYN_REQUEST_URL /* @min:%2erequestUrl */] = url;\n ajaxData.xhrMonitoringState[_DYN_OPEN_DONE /* @min:%2eopenDone */] = true;\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */] = {};\n ajaxData.async = async;\n ajaxData[_DYN_ERROR_STATUS_TEXT /* @min:%2eerrorStatusText */] = _enableAjaxErrorStatusText;\n return ajaxData;\n }\n function _attachToOnReadyStateChange(xhr, ajaxData) {\n ajaxData.xhrMonitoringState[_DYN_STATE_CHANGE_ATTACHE13 /* @min:%2estateChangeAttached */] = eventOn(xhr, \"readystatechange\", function () {\n var _a;\n try {\n if (xhr && xhr.readyState === 4 && _isMonitoredXhrInstance(xhr, ajaxData)) {\n _onAjaxComplete(xhr);\n }\n } catch (e) {\n var exceptionText = dumpObj(e);\n // ignore messages with c00c023f, as this a known IE9 XHR abort issue\n if (!exceptionText || _indexOf(exceptionText[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */](), \"c00c023f\") === -1) {\n _throwInternalCritical(_self, 16 /* _eInternalMessageId.FailedMonitorAjaxRSC */, ERROR_HEADER + \" 'readystatechange' event handler\" + ERROR_POSTFIX, (_a = {}, _a[_DYN_AJAX_DIAGNOSTICS_MES16 /* @min:ajaxDiagnosticsMessage */] = _getFailedAjaxDiagnosticsMessage(xhr, _ajaxDataId), _a[_DYN_EXCEPTION /* @min:exception */] = exceptionText, _a));\n }\n }\n }, _evtNamespace);\n }\n function _getResponseText(xhr) {\n try {\n var responseType = xhr.responseType;\n if (responseType === \"\" || responseType === \"text\") {\n // As per the specification responseText is only valid if the type is an empty string or \"text\"\n return xhr[_DYN_RESPONSE_TEXT /* @min:%2eresponseText */];\n }\n } catch (e) {\n // This shouldn't happen because of the above check -- but just in case, so just ignore\n }\n return null;\n }\n function _onAjaxComplete(xhr) {\n var ajaxData = _getAjaxData(xhr, _ajaxDataId);\n ajaxData[_DYN_RESPONSE_FINISHED_TI14 /* @min:%2eresponseFinishedTime */] = dateTimeUtilsNow();\n ajaxData[_DYN_STATUS /* @min:%2estatus */] = xhr[_DYN_STATUS /* @min:%2estatus */];\n function _reportXhrError(e, failedProps) {\n var errorProps = failedProps || {};\n errorProps[\"ajaxDiagnosticsMessage\"] = _getFailedAjaxDiagnosticsMessage(xhr, _ajaxDataId);\n if (e) {\n errorProps[\"exception\"] = dumpObj(e);\n }\n _throwInternalWarning(_self, 14 /* _eInternalMessageId.FailedMonitorAjaxDur */, FAILED_TO_CALCULATE_DURATION_ERROR + \"ajax call\" + ERROR_NOT_SENT, errorProps);\n }\n _findPerfResourceEntry(\"xmlhttprequest\", ajaxData, function () {\n try {\n var dependency = ajaxData[_DYN__CREATE_TRACK_ITEM /* @min:%2eCreateTrackItem */](\"Ajax\", _enableRequestHeaderTracking, function () {\n var _a;\n var ajaxResponse = (_a = {\n statusText: xhr[_DYN_STATUS_TEXT /* @min:%2estatusText */]\n }, _a[_DYN_HEADER_MAP /* @min:headerMap */] = null, _a[_DYN_CORRELATION_CONTEXT /* @min:correlationContext */] = _getAjaxCorrelationContext(xhr), _a.type = xhr.responseType, _a[_DYN_RESPONSE_TEXT /* @min:responseText */] = _getResponseText(xhr), _a.response = xhr[_DYN_RESPONSE /* @min:%2eresponse */], _a);\n if (_enableResponseHeaderTracking) {\n var headers = xhr[_DYN_GET_ALL_RESPONSE_HEA15 /* @min:%2egetAllResponseHeaders */]();\n if (headers) {\n // xhr.getAllResponseHeaders() method returns all the response headers, separated by CRLF, as a string or null\n // the regex converts the header string into an array of individual headers\n var arr = strTrim(headers).split(/[\\r\\n]+/);\n var responseHeaderMap_2 = {};\n arrForEach(arr, function (line) {\n var parts = line.split(\": \");\n var header = parts.shift();\n var value = parts.join(\": \");\n if (_canIncludeHeaders(header)) {\n responseHeaderMap_2[header] = value;\n }\n });\n ajaxResponse[_DYN_HEADER_MAP /* @min:%2eheaderMap */] = responseHeaderMap_2;\n }\n }\n return ajaxResponse;\n });\n var properties = void 0;\n try {\n if (!!_addRequestContext) {\n properties = _addRequestContext({\n status: xhr[_DYN_STATUS /* @min:%2estatus */],\n xhr: xhr\n });\n }\n } catch (e) {\n _throwInternalWarning(_self, 104 /* _eInternalMessageId.FailedAddingCustomDefinedRequestContext */, CUSTOM_REQUEST_CONTEXT_ERROR);\n }\n if (dependency) {\n if (properties !== undefined) {\n dependency[STR_PROPERTIES /* @min:%2eproperties */] = __assign(__assign({}, dependency.properties), properties);\n }\n var sysProperties = ajaxData[_DYN_GET_PART_APROPS /* @min:%2egetPartAProps */]();\n _reportDependencyInternal(_dependencyInitializers, _self[_DYN_CORE /* @min:%2ecore */], ajaxData, dependency, null, sysProperties);\n } else {\n _reportXhrError(null, {\n requestSentTime: ajaxData[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */],\n responseFinishedTime: ajaxData[_DYN_RESPONSE_FINISHED_TI14 /* @min:%2eresponseFinishedTime */]\n });\n }\n } finally {\n // cleanup telemetry data\n try {\n var xhrRequestData = xhr[AJAX_DATA_CONTAINER] || {\n i: {}\n };\n var ajaxDataCntr = xhrRequestData.i || {};\n if (ajaxDataCntr[_ajaxDataId]) {\n ajaxDataCntr[_ajaxDataId] = null;\n }\n } catch (e) {\n // May throw in environments that prevent extension or freeze xhr\n }\n }\n }, function (e) {\n _reportXhrError(e, null);\n });\n }\n function _getAjaxCorrelationContext(xhr) {\n var _a;\n try {\n var responseHeadersString = xhr[_DYN_GET_ALL_RESPONSE_HEA15 /* @min:%2egetAllResponseHeaders */]();\n if (responseHeadersString !== null) {\n var index = _indexOf(responseHeadersString[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */](), RequestHeaders[8 /* eRequestHeaders.requestContextHeaderLowerCase */]);\n if (index !== -1) {\n var responseHeader = xhr.getResponseHeader(RequestHeaders[0 /* eRequestHeaders.requestContextHeader */]);\n return correlationIdGetCorrelationContext(responseHeader);\n }\n }\n } catch (e) {\n _throwInternalWarning(_self, 18 /* _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader */, CORRELATION_HEADER_ERROR, (_a = {}, _a[_DYN_AJAX_DIAGNOSTICS_MES16 /* @min:ajaxDiagnosticsMessage */] = _getFailedAjaxDiagnosticsMessage(xhr, _ajaxDataId), _a[_DYN_EXCEPTION /* @min:exception */] = dumpObj(e), _a));\n }\n }\n function _createMarkId(type, ajaxData) {\n if (ajaxData[_DYN_REQUEST_URL /* @min:%2erequestUrl */] && _markPrefix && _enableAjaxPerfTracking) {\n var performance_1 = getPerformance();\n if (performance_1 && isFunction(performance_1.mark)) {\n _markCount++;\n var markId = _markPrefix + type + \"#\" + _markCount;\n performance_1.mark(markId);\n var entries = performance_1.getEntriesByName(markId);\n if (entries && entries[_DYN_LENGTH /* @min:%2elength */] === 1) {\n ajaxData[_DYN_PERF_MARK /* @min:%2eperfMark */] = entries[0];\n }\n }\n }\n }\n function _findPerfResourceEntry(initiatorType, ajaxData, trackCallback, reportError) {\n var perfMark = ajaxData[_DYN_PERF_MARK /* @min:%2eperfMark */];\n var performance = getPerformance();\n var maxAttempts = _maxAjaxPerfLookupAttempts;\n var retryDelay = _ajaxPerfLookupDelay;\n var requestUrl = ajaxData[_DYN_REQUEST_URL /* @min:%2erequestUrl */];\n var attempt = 0;\n (function locateResourceTiming() {\n try {\n if (performance && perfMark) {\n attempt++;\n var perfTiming = null;\n var entries = performance.getEntries();\n for (var lp = entries[_DYN_LENGTH /* @min:%2elength */] - 1; lp >= 0; lp--) {\n var entry = entries[lp];\n if (entry) {\n if (entry.entryType === \"resource\") {\n if (entry.initiatorType === initiatorType && (_indexOf(entry[_DYN_NAME /* @min:%2ename */], requestUrl) !== -1 || _indexOf(requestUrl, entry[_DYN_NAME /* @min:%2ename */]) !== -1)) {\n perfTiming = entry;\n }\n } else if (entry.entryType === \"mark\" && entry[_DYN_NAME /* @min:%2ename */] === perfMark[_DYN_NAME /* @min:%2ename */]) {\n // We hit the start event\n ajaxData[_DYN_PERF_TIMING /* @min:%2eperfTiming */] = perfTiming;\n break;\n }\n if (entry[_DYN_START_TIME /* @min:%2estartTime */] < perfMark[_DYN_START_TIME /* @min:%2estartTime */] - 1000) {\n // Fallback to try and reduce the time spent looking for the perf entry\n break;\n }\n }\n }\n }\n if (!perfMark ||\n // - we don't have a perfMark or\n ajaxData[_DYN_PERF_TIMING /* @min:%2eperfTiming */] ||\n // - we have not found the perf entry or\n attempt >= maxAttempts ||\n // - we have tried too many attempts or\n ajaxData.async === false) {\n // - this is a sync request\n if (perfMark && isFunction(performance.clearMarks)) {\n // Remove the mark so we don't fill up the performance resources too much\n performance.clearMarks(perfMark[_DYN_NAME /* @min:%2ename */]);\n }\n ajaxData.perfAttempts = attempt;\n // just continue and report the track event\n trackCallback();\n } else {\n // We need to wait for the browser to populate the window.performance entry\n // This needs to be at least 1ms as waiting <= 1 (on firefox) is not enough time for fetch or xhr,\n // this is a scheduling issue for the browser implementation\n scheduleTimeout(locateResourceTiming, retryDelay);\n }\n } catch (e) {\n reportError(e);\n }\n })();\n }\n function _createFetchRecord(input, init) {\n var _a;\n var distributedTraceCtx = _getDistributedTraceCtx();\n var traceID = distributedTraceCtx && distributedTraceCtx[_DYN_GET_TRACE_ID /* @min:%2egetTraceId */]() || generateW3CId();\n var spanID = strSubstr(generateW3CId(), 0, 16);\n var ajaxData = new ajaxRecord(traceID, spanID, _self[strDiagLog](), (_a = _self.core) === null || _a === void 0 ? void 0 : _a.getTraceCtx());\n ajaxData[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */] = distributedTraceCtx && distributedTraceCtx[_DYN_GET_TRACE_FLAGS /* @min:%2egetTraceFlags */]();\n ajaxData[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */] = dateTimeUtilsNow();\n ajaxData[_DYN_ERROR_STATUS_TEXT /* @min:%2eerrorStatusText */] = _enableAjaxErrorStatusText;\n var requestUrl;\n if (input instanceof Request) {\n requestUrl = (input || {}).url || \"\";\n } else {\n requestUrl = input;\n }\n if (requestUrl === \"\") {\n var location_1 = getLocation();\n if (location_1 && location_1.href) {\n requestUrl = strSplit(location_1.href, \"#\")[0];\n }\n }\n ajaxData[_DYN_REQUEST_URL /* @min:%2erequestUrl */] = requestUrl;\n var method = \"GET\";\n if (init && init[_DYN_METHOD /* @min:%2emethod */]) {\n method = init[_DYN_METHOD /* @min:%2emethod */];\n } else if (input && input instanceof Request) {\n method = input[_DYN_METHOD /* @min:%2emethod */];\n }\n ajaxData[_DYN_METHOD /* @min:%2emethod */] = method;\n var requestHeaders = {};\n if (_enableRequestHeaderTracking) {\n var headers = new Headers((init ? init[_DYN_HEADERS /* @min:%2eheaders */] : 0) || (input instanceof Request ? input[_DYN_HEADERS /* @min:%2eheaders */] || {} : {}));\n headers.forEach(function (value, key) {\n if (_canIncludeHeaders(key)) {\n requestHeaders[key] = value;\n }\n });\n }\n ajaxData[_DYN_REQUEST_HEADERS /* @min:%2erequestHeaders */] = requestHeaders;\n _createMarkId(STR_FETCH, ajaxData);\n return ajaxData;\n }\n function _getFailedFetchDiagnosticsMessage(input) {\n var result = \"\";\n try {\n if (!isNullOrUndefined(input)) {\n if (typeof input === \"string\") {\n result += \"(url: '\".concat(input, \"')\");\n } else {\n result += \"(url: '\".concat(input.url, \"')\");\n }\n }\n } catch (e) {\n _throwInternalCritical(_self, 15 /* _eInternalMessageId.FailedMonitorAjaxOpen */, \"Failed to grab failed fetch diagnostics message\", {\n exception: dumpObj(e)\n });\n }\n return result;\n }\n function _reportFetchMetrics(callDetails, status, input, response, ajaxData, getResponse, properties) {\n if (!ajaxData) {\n return;\n }\n function _reportFetchError(msgId, e, failedProps) {\n var errorProps = failedProps || {};\n errorProps[\"fetchDiagnosticsMessage\"] = _getFailedFetchDiagnosticsMessage(input);\n if (e) {\n errorProps[\"exception\"] = dumpObj(e);\n }\n _throwInternalWarning(_self, msgId, FAILED_TO_CALCULATE_DURATION_ERROR + \"fetch call\" + ERROR_NOT_SENT, errorProps);\n }\n ajaxData[_DYN_RESPONSE_FINISHED_TI14 /* @min:%2eresponseFinishedTime */] = dateTimeUtilsNow();\n ajaxData[_DYN_STATUS /* @min:%2estatus */] = status;\n _findPerfResourceEntry(STR_FETCH, ajaxData, function () {\n var dependency = ajaxData[_DYN__CREATE_TRACK_ITEM /* @min:%2eCreateTrackItem */](\"Fetch\", _enableRequestHeaderTracking, getResponse);\n var properties;\n try {\n if (!!_addRequestContext) {\n properties = _addRequestContext({\n status: status,\n request: input,\n response: response\n });\n }\n } catch (e) {\n _throwInternalWarning(_self, 104 /* _eInternalMessageId.FailedAddingCustomDefinedRequestContext */, CUSTOM_REQUEST_CONTEXT_ERROR);\n }\n if (dependency) {\n if (properties !== undefined) {\n dependency[STR_PROPERTIES /* @min:%2eproperties */] = __assign(__assign({}, dependency.properties), properties);\n }\n var sysProperties = ajaxData[_DYN_GET_PART_APROPS /* @min:%2egetPartAProps */]();\n _reportDependencyInternal(_dependencyInitializers, _self[_DYN_CORE /* @min:%2ecore */], ajaxData, dependency, null, sysProperties);\n } else {\n _reportFetchError(14 /* _eInternalMessageId.FailedMonitorAjaxDur */, null, {\n requestSentTime: ajaxData[_DYN_REQUEST_SENT_TIME /* @min:%2erequestSentTime */],\n responseFinishedTime: ajaxData[_DYN_RESPONSE_FINISHED_TI14 /* @min:%2eresponseFinishedTime */]\n });\n }\n }, function (e) {\n _reportFetchError(18 /* _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader */, e, null);\n });\n }\n function _getFetchCorrelationContext(response) {\n var _a;\n if (response && response[_DYN_HEADERS /* @min:%2eheaders */]) {\n try {\n var responseHeader = response[_DYN_HEADERS /* @min:%2eheaders */].get(RequestHeaders[0 /* eRequestHeaders.requestContextHeader */]);\n return correlationIdGetCorrelationContext(responseHeader);\n } catch (e) {\n _throwInternalWarning(_self, 18 /* _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader */, CORRELATION_HEADER_ERROR, (_a = {\n fetchDiagnosticsMessage: _getFailedFetchDiagnosticsMessage(response)\n }, _a[_DYN_EXCEPTION /* @min:exception */] = dumpObj(e), _a));\n }\n }\n }\n function _reportDependencyInternal(initializers, core, ajaxData, dependency, properties, systemProperties) {\n var _a;\n var result = true;\n var initializersCount = initializers[_DYN_LENGTH /* @min:%2elength */];\n if (initializersCount > 0) {\n var details = (_a = {\n item: dependency\n }, _a[STR_PROPERTIES /* @min:properties */] = properties, _a.sysProperties = systemProperties, _a.context = ajaxData ? ajaxData[_DYN_CONTEXT /* @min:%2econtext */] : null, _a.aborted = ajaxData ? !!ajaxData[_DYN_ABORTED /* @min:%2eaborted */] : false, _a);\n result = _processDependencyContainer(core, initializers, details, \"initializer\");\n }\n if (result) {\n _self[_DYN_TRACK_DEPENDENCY_DAT3 /* @min:%2etrackDependencyDataInternal */](dependency, properties, systemProperties);\n }\n }\n });\n return _this;\n }\n // Removed Stub for AjaxMonitor.prototype.initialize.\n AjaxMonitor.prototype.processTelemetry = function (item, itemCtx) {\n this.processNext(item, itemCtx);\n };\n // Removed Stub for AjaxMonitor.prototype.trackDependencyData.\n // Removed Stub for AjaxMonitor.prototype.includeCorrelationHeaders.\n // Removed Stub for AjaxMonitor.prototype.addDependencyListener.\n /**\r\n * Add an dependency telemetry initializer callback function to allow populating additional properties or drop the request.\r\n * It is called after the dependency call has completed and any available performance details are available. A dependency\r\n * initializer is similar to the TelemetryInitializer function but it allows you to block the reporting of the dependency\r\n * request so that it doesn't count against the `maxAjaxCallsPerView`.\r\n * @param dependencyInitializer - The Dependency Telemetry Initializer function\r\n * @returns - A IDependencyInitializerHandler to enable the initializer to be removed\r\n */\n AjaxMonitor.prototype.addDependencyInitializer = function (dependencyInitializer) {\n return null;\n };\n // Removed Stub for AjaxMonitor.prototype.trackDependencyDataInternal.\n AjaxMonitor.identifier = \"AjaxDependencyPlugin\";\n return AjaxMonitor;\n}(BaseTelemetryPlugin);\nexport { AjaxMonitor };\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nvar Application = /** @class */function () {\n function Application() {}\n return Application;\n}();\nexport { Application };\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nvar Device = /** @class */function () {\n /**\r\n * Constructs a new instance of the Device class\r\n */\n function Device() {\n // don't attempt to fingerprint browsers\n this.id = \"browser\";\n // Device type is a dimension in our data platform\n // Setting it to 'Browser' allows to separate client and server dependencies/exceptions\n this.deviceClass = \"Browser\";\n }\n return Device;\n}();\nexport { Device };\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { onConfigChange } from \"@microsoft/applicationinsights-core-js\";\nvar Version = '3.3.4';\nvar Internal = /** @class */function () {\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */\n function Internal(config, unloadHookContainer) {\n var _this = this;\n var unloadHook = onConfigChange(config, function () {\n var prefix = config.sdkExtension;\n _this.sdkVersion = (prefix ? prefix + \"_\" : \"\") + \"javascript:\" + Version;\n });\n unloadHookContainer && unloadHookContainer.add(unloadHook);\n }\n return Internal;\n}();\nexport { Internal };\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nvar Location = /** @class */function () {\n function Location() {}\n return Location;\n}();\nexport { Location };\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nexport var _DYN_SESSION_MANAGER = \"sessionManager\"; // Count: 3\nexport var _DYN_UPDATE = \"update\"; // Count: 4\nexport var _DYN_IS_USER_COOKIE_SET = \"isUserCookieSet\"; // Count: 4\nexport var _DYN_IS_NEW_USER = \"isNewUser\"; // Count: 4\nexport var _DYN_GET_TRACE_CTX = \"getTraceCtx\"; // Count: 3\nexport var _DYN_TELEMETRY_TRACE = \"telemetryTrace\"; // Count: 3\nexport var _DYN_APPLY_SESSION_CONTEX0 = \"applySessionContext\"; // Count: 2\nexport var _DYN_APPLY_APPLICATION_CO1 = \"applyApplicationContext\"; // Count: 2\nexport var _DYN_APPLY_DEVICE_CONTEXT = \"applyDeviceContext\"; // Count: 2\nexport var _DYN_APPLY_OPERATION_CONT2 = \"applyOperationContext\"; // Count: 2\nexport var _DYN_APPLY_USER_CONTEXT = \"applyUserContext\"; // Count: 2\nexport var _DYN_APPLY_OPERATING_SYST3 = \"applyOperatingSystemContxt\"; // Count: 2\nexport var _DYN_APPLY_LOCATION_CONTE4 = \"applyLocationContext\"; // Count: 2\nexport var _DYN_APPLY_INTERNAL_CONTE5 = \"applyInternalContext\"; // Count: 2\nexport var _DYN_ACCOUNT_ID = \"accountId\"; // Count: 7\nexport var _DYN_GET_SESSION_ID = \"getSessionId\"; // Count: 4\nexport var _DYN_NAME_PREFIX = \"namePrefix\"; // Count: 3\nexport var _DYN_SESSION_COOKIE_POSTF6 = \"sessionCookiePostfix\"; // Count: 2\nexport var _DYN_USER_COOKIE_POSTFIX = \"userCookiePostfix\"; // Count: 2\nexport var _DYN_ID_LENGTH = \"idLength\"; // Count: 4\nexport var _DYN_GET_NEW_ID = \"getNewId\"; // Count: 3\nexport var _DYN_LENGTH = \"length\"; // Count: 4\nexport var _DYN_AUTOMATIC_SESSION = \"automaticSession\"; // Count: 5\nexport var _DYN_AUTHENTICATED_ID = \"authenticatedId\"; // Count: 6\nexport var _DYN_ACQUISITION_DATE = \"acquisitionDate\"; // Count: 5\nexport var _DYN_RENEWAL_DATE = \"renewalDate\"; // Count: 4\nexport var _DYN_JOIN = \"join\"; // Count: 5\nexport var _DYN_COOKIE_SEPARATOR = \"cookieSeparator\"; // Count: 5\nexport var _DYN_AUTH_USER_COOKIE_NAM7 = \"authUserCookieName\"; // Count: 3\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage } from \"@microsoft/applicationinsights-common\";\nimport { _throwInternal, dateNow, dumpObj, getExceptionName, isFunction, newId, onConfigChange, safeGetCookieMgr, safeGetLogger } from \"@microsoft/applicationinsights-core-js\";\nimport { _DYN_ACQUISITION_DATE, _DYN_AUTOMATIC_SESSION, _DYN_GET_NEW_ID, _DYN_ID_LENGTH, _DYN_JOIN, _DYN_LENGTH, _DYN_NAME_PREFIX, _DYN_RENEWAL_DATE, _DYN_UPDATE } from \"../__DynamicConstants\";\nvar SESSION_COOKIE_NAME = \"ai_session\";\nvar ACQUISITION_SPAN = 86400000; // 24 hours in ms\nvar RENEWAL_SPAN = 1800000; // 30 minutes in ms\nvar COOKIE_UPDATE_INTERVAL = 60000; // 1 minute in ms\nvar Session = /** @class */function () {\n function Session() {}\n return Session;\n}();\nexport { Session };\nvar _SessionManager = /** @class */function () {\n function _SessionManager(config, core, unloadHookContainer) {\n var self = this;\n var _storageNamePrefix;\n var _cookieUpdatedTimestamp;\n var _logger = safeGetLogger(core);\n var _cookieManager = safeGetCookieMgr(core);\n var _sessionExpirationMs;\n var _sessionRenewalMs;\n dynamicProto(_SessionManager, self, function (_self) {\n if (!config) {\n config = {};\n }\n var unloadHook = onConfigChange(config, function (details) {\n _sessionExpirationMs = config.sessionExpirationMs || ACQUISITION_SPAN;\n _sessionRenewalMs = config.sessionRenewalMs || RENEWAL_SPAN;\n // sessionCookiePostfix takes the preference if it is configured, otherwise takes namePrefix if configured.\n var sessionCookiePostfix = config.sessionCookiePostfix || config[_DYN_NAME_PREFIX /* @min:%2enamePrefix */] || \"\";\n _storageNamePrefix = SESSION_COOKIE_NAME + sessionCookiePostfix;\n });\n unloadHookContainer && unloadHookContainer.add(unloadHook);\n _self[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */] = new Session();\n _self[_DYN_UPDATE /* @min:%2eupdate */] = function () {\n // Always using Date getTime() as there is a bug in older IE instances that causes the performance timings to have the hi-bit set eg 0x800000000 causing\n // the number to be incorrect.\n var nowMs = dateNow();\n var isExpired = false;\n var session = _self[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */];\n if (!session.id) {\n isExpired = !_initializeAutomaticSession(session, nowMs);\n }\n if (!isExpired && _sessionExpirationMs > 0) {\n var timeSinceAcqMs = nowMs - session[_DYN_ACQUISITION_DATE /* @min:%2eacquisitionDate */];\n var timeSinceRenewalMs = nowMs - session[_DYN_RENEWAL_DATE /* @min:%2erenewalDate */];\n isExpired = timeSinceAcqMs < 0 || timeSinceRenewalMs < 0; // expired if the acquisition or last renewal are in the future\n isExpired = isExpired || timeSinceAcqMs > _sessionExpirationMs; // expired if the time since acquisition is more than session Expiration\n isExpired = isExpired || timeSinceRenewalMs > _sessionRenewalMs; // expired if the time since last renewal is more than renewal period\n }\n // renew if acquisitionSpan or renewalSpan has elapsed\n if (isExpired) {\n // update automaticSession so session state has correct id\n _renew(nowMs);\n } else {\n // do not update the cookie more often than cookieUpdateInterval\n if (!_cookieUpdatedTimestamp || nowMs - _cookieUpdatedTimestamp > COOKIE_UPDATE_INTERVAL) {\n _setCookie(session, nowMs);\n }\n }\n };\n /**\r\n * Record the current state of the automatic session and store it in our cookie string format\r\n * into the browser's local storage. This is used to restore the session data when the cookie\r\n * expires.\r\n */\n _self.backup = function () {\n var session = _self[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */];\n _setStorage(session.id, session[_DYN_ACQUISITION_DATE /* @min:%2eacquisitionDate */], session[_DYN_RENEWAL_DATE /* @min:%2erenewalDate */]);\n };\n /**\r\n * Use config.namePrefix + ai_session cookie data or local storage data (when the cookie is unavailable) to\r\n * initialize the automatic session.\r\n * @returns true if values set otherwise false\r\n */\n function _initializeAutomaticSession(session, now) {\n var isValid = false;\n var cookieValue = _cookieManager.get(_storageNamePrefix);\n if (cookieValue && isFunction(cookieValue.split)) {\n isValid = _initializeAutomaticSessionWithData(session, cookieValue);\n } else {\n // There's no cookie, but we might have session data in local storage\n // This can happen if the session expired or the user actively deleted the cookie\n // We only want to recover data if the cookie is missing from expiry. We should respect the user's wishes if the cookie was deleted actively.\n // The User class handles this for us and deletes our local storage object if the persistent user cookie was removed.\n var storageValue = utlGetLocalStorage(_logger, _storageNamePrefix);\n if (storageValue) {\n isValid = _initializeAutomaticSessionWithData(session, storageValue);\n }\n }\n return isValid || !!session.id;\n }\n /**\r\n * Extract id, acquisitionDate, and renewalDate from an ai_session payload string and\r\n * use this data to initialize automaticSession.\r\n *\r\n * @param sessionData - The string stored in an ai_session cookie or local storage backup\r\n * @returns true if values set otherwise false\r\n */\n function _initializeAutomaticSessionWithData(session, sessionData) {\n var isValid = false;\n var sessionReset = \", session will be reset\";\n var tokens = sessionData.split(\"|\");\n if (tokens[_DYN_LENGTH /* @min:%2elength */] >= 2) {\n try {\n var acqMs = +tokens[1] || 0;\n var renewalMs = +tokens[2] || 0;\n if (isNaN(acqMs) || acqMs <= 0) {\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 27 /* _eInternalMessageId.SessionRenewalDateIsZero */, \"AI session acquisition date is 0\" + sessionReset);\n } else if (isNaN(renewalMs) || renewalMs <= 0) {\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 27 /* _eInternalMessageId.SessionRenewalDateIsZero */, \"AI session renewal date is 0\" + sessionReset);\n } else if (tokens[0]) {\n // Everything looks valid so set the values\n session.id = tokens[0];\n session[_DYN_ACQUISITION_DATE /* @min:%2eacquisitionDate */] = acqMs;\n session[_DYN_RENEWAL_DATE /* @min:%2erenewalDate */] = renewalMs;\n isValid = true;\n }\n } catch (e) {\n _throwInternal(_logger, 1 /* eLoggingSeverity.CRITICAL */, 9 /* _eInternalMessageId.ErrorParsingAISessionCookie */, \"Error parsing ai_session value [\" + (sessionData || \"\") + \"]\" + sessionReset + \" - \" + getExceptionName(e), {\n exception: dumpObj(e)\n });\n }\n }\n return isValid;\n }\n function _renew(nowMs) {\n var getNewId = config[_DYN_GET_NEW_ID /* @min:%2egetNewId */] || newId;\n _self.automaticSession.id = getNewId(config[_DYN_ID_LENGTH /* @min:%2eidLength */] || 22);\n _self[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */][_DYN_ACQUISITION_DATE /* @min:%2eacquisitionDate */] = nowMs;\n _setCookie(_self[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */], nowMs);\n // If this browser does not support local storage, fire an internal log to keep track of it at this point\n if (!utlCanUseLocalStorage()) {\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 0 /* _eInternalMessageId.BrowserDoesNotSupportLocalStorage */, \"Browser does not support local storage. Session durations will be inaccurate.\");\n }\n }\n function _setCookie(session, nowMs) {\n var acq = session[_DYN_ACQUISITION_DATE /* @min:%2eacquisitionDate */];\n session[_DYN_RENEWAL_DATE /* @min:%2erenewalDate */] = nowMs;\n var renewalPeriodMs = _sessionRenewalMs;\n // Set cookie to expire after the session expiry time passes or the session renewal deadline, whichever is sooner\n // Expiring the cookie will cause the session to expire even if the user isn't on the page\n var acqTimeLeftMs = acq + _sessionExpirationMs - nowMs;\n var cookie = [session.id, acq, nowMs];\n var maxAgeSec = 0;\n if (acqTimeLeftMs < renewalPeriodMs) {\n maxAgeSec = acqTimeLeftMs / 1000;\n } else {\n maxAgeSec = renewalPeriodMs / 1000;\n }\n var cookieDomain = config.cookieDomain || null;\n // if sessionExpirationMs is set to 0, it means the expiry is set to 0 for this session cookie\n // A cookie with 0 expiry in the session cookie will never expire for that browser session. If the browser is closed the cookie expires.\n // Depending on the browser, another instance does not inherit this cookie, however, another tab will\n _cookieManager.set(_storageNamePrefix, cookie[_DYN_JOIN /* @min:%2ejoin */](\"|\"), _sessionExpirationMs > 0 ? maxAgeSec : null, cookieDomain);\n _cookieUpdatedTimestamp = nowMs;\n }\n function _setStorage(guid, acq, renewal) {\n // Keep data in local storage to retain the last session id, allowing us to cleanly end the session when it expires\n // Browsers that don't support local storage won't be able to end sessions cleanly from the client\n // The server will notice this and end the sessions itself, with loss of accurate session duration\n utlSetLocalStorage(_logger, _storageNamePrefix, [guid, acq, renewal][_DYN_JOIN /* @min:%2ejoin */](\"|\"));\n }\n });\n }\n // Removed Stub for _SessionManager.prototype.update.\n // Removed Stub for _SessionManager.prototype.backup.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n _SessionManager.__ieDyn = 1;\n return _SessionManager;\n}();\nexport { _SessionManager };\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport { dataSanitizeString } from \"@microsoft/applicationinsights-common\";\nimport { generateW3CId, getLocation } from \"@microsoft/applicationinsights-core-js\";\nvar TelemetryTrace = /** @class */function () {\n function TelemetryTrace(id, parentId, name, logger) {\n var _self = this;\n _self.traceID = id || generateW3CId();\n _self.parentID = parentId;\n var location = getLocation();\n if (!name && location && location.pathname) {\n name = location.pathname;\n }\n _self.name = dataSanitizeString(logger, name);\n }\n return TelemetryTrace;\n}();\nexport { TelemetryTrace };\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { utlRemoveStorage } from \"@microsoft/applicationinsights-common\";\nimport { _throwInternal, newId, onConfigChange, safeGetCookieMgr, safeGetLogger, toISOString } from \"@microsoft/applicationinsights-core-js\";\nimport { objDefine } from \"@nevware21/ts-utils\";\nimport { _DYN_ACCOUNT_ID, _DYN_AUTHENTICATED_ID, _DYN_AUTH_USER_COOKIE_NAM7, _DYN_COOKIE_SEPARATOR, _DYN_GET_NEW_ID, _DYN_ID_LENGTH, _DYN_IS_NEW_USER, _DYN_IS_USER_COOKIE_SET, _DYN_JOIN, _DYN_LENGTH, _DYN_NAME_PREFIX, _DYN_UPDATE, _DYN_USER_COOKIE_POSTFIX } from \"../__DynamicConstants\";\nfunction _validateUserInput(id) {\n // Validate:\n // 1. Id is a non-empty string.\n // 2. It does not contain special characters for cookies.\n if (typeof id !== \"string\" || !id || id.match(/,|;|=| |\\|/)) {\n return false;\n }\n return true;\n}\nvar User = /** @class */function () {\n function User(config, core, unloadHookContainer) {\n /**\r\n * A flag indicating whether this represents a new user\r\n */\n this.isNewUser = false;\n /**\r\n * A flag indicating whether the user cookie has been set\r\n */\n this.isUserCookieSet = false;\n var _logger = safeGetLogger(core);\n var _cookieManager = safeGetCookieMgr(core);\n var _storageNamePrefix;\n dynamicProto(User, this, function (_self) {\n // Define _self.config\n objDefine(_self, \"config\", {\n g: function () {\n return config;\n }\n });\n var unloadHook = onConfigChange(config, function () {\n var userCookiePostfix = config[_DYN_USER_COOKIE_POSTFIX /* @min:%2euserCookiePostfix */] || \"\";\n _storageNamePrefix = User.userCookieName + userCookiePostfix;\n // get userId or create new one if none exists\n var cookie = _cookieManager.get(_storageNamePrefix);\n if (cookie) {\n _self[_DYN_IS_NEW_USER /* @min:%2eisNewUser */] = false;\n var params = cookie.split(User[_DYN_COOKIE_SEPARATOR /* @min:%2ecookieSeparator */]);\n if (params[_DYN_LENGTH /* @min:%2elength */] > 0) {\n _self.id = params[0];\n // we already have a cookie\n _self[_DYN_IS_USER_COOKIE_SET /* @min:%2eisUserCookieSet */] = !!_self.id;\n }\n }\n if (!_self.id) {\n _self.id = _generateNewId();\n var newCookie = _generateNewCookie(_self.id);\n _setUserCookie(newCookie[_DYN_JOIN /* @min:%2ejoin */](User[_DYN_COOKIE_SEPARATOR /* @min:%2ecookieSeparator */]));\n // If we have an config.namePrefix() + ai_session in local storage this means the user actively removed our cookies.\n // We should respect their wishes and clear ourselves from local storage\n var name_1 = (config[_DYN_NAME_PREFIX /* @min:%2enamePrefix */] || \"\") + \"ai_session\";\n utlRemoveStorage(_logger, name_1);\n }\n // We still take the account id from the ctor param for backward compatibility.\n // But if the the customer set the accountId through the newer setAuthenticatedUserContext API, we will override it.\n _self[_DYN_ACCOUNT_ID /* @min:%2eaccountId */] = config[_DYN_ACCOUNT_ID /* @min:%2eaccountId */] || undefined;\n // Get the auth user id and account id from the cookie if exists\n // Cookie is in the pattern: |\n var authCookie = _cookieManager.get(User[_DYN_AUTH_USER_COOKIE_NAM7 /* @min:%2eauthUserCookieName */]);\n if (authCookie) {\n authCookie = decodeURI(authCookie);\n var authCookieString = authCookie.split(User[_DYN_COOKIE_SEPARATOR /* @min:%2ecookieSeparator */]);\n if (authCookieString[0]) {\n _self[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */] = authCookieString[0];\n }\n if (authCookieString[_DYN_LENGTH /* @min:%2elength */] > 1 && authCookieString[1]) {\n _self[_DYN_ACCOUNT_ID /* @min:%2eaccountId */] = authCookieString[1];\n }\n }\n });\n unloadHookContainer && unloadHookContainer.add(unloadHook);\n function _generateNewId() {\n var theConfig = config || {};\n var getNewId = theConfig[_DYN_GET_NEW_ID /* @min:%2egetNewId */] || newId;\n var id = getNewId(theConfig[_DYN_ID_LENGTH /* @min:%2eidLength */] ? config[_DYN_ID_LENGTH /* @min:%2eidLength */] : 22);\n return id;\n }\n function _generateNewCookie(userId) {\n var acqStr = toISOString(new Date());\n _self.accountAcquisitionDate = acqStr;\n _self[_DYN_IS_NEW_USER /* @min:%2eisNewUser */] = true;\n var newCookie = [userId, acqStr];\n return newCookie;\n }\n function _setUserCookie(cookie) {\n // without expiration, cookies expire at the end of the session\n // set it to 365 days from now\n // 365 * 24 * 60 * 60 = 31536000\n var oneYear = 31536000;\n _self[_DYN_IS_USER_COOKIE_SET /* @min:%2eisUserCookieSet */] = _cookieManager.set(_storageNamePrefix, cookie, oneYear);\n }\n _self.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) {\n if (storeInCookie === void 0) {\n storeInCookie = false;\n }\n // Validate inputs to ensure no cookie control characters.\n var isInvalidInput = !_validateUserInput(authenticatedUserId) || accountId && !_validateUserInput(accountId);\n if (isInvalidInput) {\n _throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 60 /* _eInternalMessageId.SetAuthContextFailedAccountName */, \"Setting auth user context failed. \" + \"User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\", true);\n return;\n }\n // Create cookie string.\n _self[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */] = authenticatedUserId;\n var authCookie = _self[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */];\n if (accountId) {\n _self[_DYN_ACCOUNT_ID /* @min:%2eaccountId */] = accountId;\n authCookie = [_self[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */], _self.accountId][_DYN_JOIN /* @min:%2ejoin */](User[_DYN_COOKIE_SEPARATOR /* @min:%2ecookieSeparator */]);\n }\n if (storeInCookie) {\n // Set the cookie. No expiration date because this is a session cookie (expires when browser closed).\n // Encoding the cookie to handle unexpected unicode characters.\n _cookieManager.set(User[_DYN_AUTH_USER_COOKIE_NAM7 /* @min:%2eauthUserCookieName */], encodeURI(authCookie));\n }\n };\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n * @returns {}\r\n */\n _self.clearAuthenticatedUserContext = function () {\n _self[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */] = null;\n _self[_DYN_ACCOUNT_ID /* @min:%2eaccountId */] = null;\n _cookieManager.del(User[_DYN_AUTH_USER_COOKIE_NAM7 /* @min:%2eauthUserCookieName */]);\n };\n _self[_DYN_UPDATE /* @min:%2eupdate */] = function (userId) {\n // Optimizations to avoid setting and processing the cookie when not needed\n if (_self.id !== userId || !_self[_DYN_IS_USER_COOKIE_SET /* @min:%2eisUserCookieSet */]) {\n var user_id = userId ? userId : _generateNewId();\n var user_cookie = _generateNewCookie(user_id);\n _setUserCookie(user_cookie[_DYN_JOIN /* @min:%2ejoin */](User[_DYN_COOKIE_SEPARATOR /* @min:%2ecookieSeparator */]));\n }\n };\n });\n }\n // Removed Stub for User.prototype.setAuthenticatedUserContext.\n // Removed Stub for User.prototype.clearAuthenticatedUserContext.\n // Removed Stub for User.prototype.update.\n User.cookieSeparator = \"|\";\n User.userCookieName = \"ai_user\";\n User.authUserCookieName = \"ai_authUser\";\n return User;\n}();\nexport { User };\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n/**\r\n* TelemetryContext.ts\r\n* @copyright Microsoft 2018\r\n*/\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { CtxTagKeys, Extensions, PageView, dataSanitizeString } from \"@microsoft/applicationinsights-common\";\nimport { _InternalLogMessage, getSetValue, hasWindow, isNullOrUndefined, isString, objKeys, setValue } from \"@microsoft/applicationinsights-core-js\";\nimport { Application } from \"./Context/Application\";\nimport { Device } from \"./Context/Device\";\nimport { Internal } from \"./Context/Internal\";\nimport { Location } from \"./Context/Location\";\nimport { Session, _SessionManager } from \"./Context/Session\";\nimport { TelemetryTrace } from \"./Context/TelemetryTrace\";\nimport { User } from \"./Context/User\";\nimport { _DYN_ACCOUNT_ID, _DYN_APPLY_APPLICATION_CO1, _DYN_APPLY_DEVICE_CONTEXT, _DYN_APPLY_INTERNAL_CONTE5, _DYN_APPLY_LOCATION_CONTE4, _DYN_APPLY_OPERATING_SYST3, _DYN_APPLY_OPERATION_CONT2, _DYN_APPLY_SESSION_CONTEX0, _DYN_APPLY_USER_CONTEXT, _DYN_AUTHENTICATED_ID, _DYN_AUTOMATIC_SESSION, _DYN_GET_SESSION_ID, _DYN_LENGTH, _DYN_SESSION_MANAGER, _DYN_TELEMETRY_TRACE } from \"./__DynamicConstants\";\nvar strExt = \"ext\";\nvar strTags = \"tags\";\nfunction _removeEmpty(target, name) {\n if (target && target[name] && objKeys(target[name])[_DYN_LENGTH /* @min:%2elength */] === 0) {\n delete target[name];\n }\n}\nfunction _nullResult() {\n return null;\n}\nvar TelemetryContext = /** @class */function () {\n function TelemetryContext(core, defaultConfig, previousTraceCtx, unloadHookContainer) {\n var _this = this;\n var logger = core.logger;\n dynamicProto(TelemetryContext, this, function (_self) {\n _self.appId = _nullResult;\n _self[_DYN_GET_SESSION_ID /* @min:%2egetSessionId */] = _nullResult;\n _self.application = new Application();\n _self.internal = new Internal(defaultConfig, unloadHookContainer);\n if (hasWindow()) {\n _self[_DYN_SESSION_MANAGER /* @min:%2esessionManager */] = new _SessionManager(defaultConfig, core, unloadHookContainer);\n _self.device = new Device();\n _self.location = new Location();\n _self.user = new User(defaultConfig, core, unloadHookContainer);\n var traceId = void 0;\n var parentId = void 0;\n var name_1;\n if (previousTraceCtx) {\n traceId = previousTraceCtx.getTraceId();\n parentId = previousTraceCtx.getSpanId();\n name_1 = previousTraceCtx.getName();\n }\n _self[_DYN_TELEMETRY_TRACE /* @min:%2etelemetryTrace */] = new TelemetryTrace(traceId, parentId, name_1, logger);\n _self.session = new Session();\n }\n _self[_DYN_GET_SESSION_ID /* @min:%2egetSessionId */] = function () {\n var session = _self.session;\n var sesId = null;\n // If customer set session info, apply their context; otherwise apply context automatically generated\n if (session && isString(session.id)) {\n sesId = session.id;\n } else {\n // Gets the automatic session if it exists or an empty object\n var autoSession = (_self[_DYN_SESSION_MANAGER /* @min:%2esessionManager */] || {})[_DYN_AUTOMATIC_SESSION /* @min:%2eautomaticSession */];\n sesId = autoSession && isString(autoSession.id) ? autoSession.id : null;\n }\n return sesId;\n };\n _self[_DYN_APPLY_SESSION_CONTEX0 /* @min:%2eapplySessionContext */] = function (evt, itemCtx) {\n setValue(getSetValue(evt.ext, Extensions.AppExt), \"sesId\", _self[_DYN_GET_SESSION_ID /* @min:%2egetSessionId */](), isString);\n };\n _self[_DYN_APPLY_OPERATING_SYST3 /* @min:%2eapplyOperatingSystemContxt */] = function (evt, itemCtx) {\n setValue(evt.ext, Extensions.OSExt, _self.os);\n };\n _self[_DYN_APPLY_APPLICATION_CO1 /* @min:%2eapplyApplicationContext */] = function (evt, itemCtx) {\n var application = _self.application;\n if (application) {\n // evt.ext.app\n var tags = getSetValue(evt, strTags);\n setValue(tags, CtxTagKeys.applicationVersion, application.ver, isString);\n setValue(tags, CtxTagKeys.applicationBuild, application.build, isString);\n }\n };\n _self[_DYN_APPLY_DEVICE_CONTEXT /* @min:%2eapplyDeviceContext */] = function (evt, itemCtx) {\n var device = _self.device;\n if (device) {\n // evt.ext.device\n var extDevice = getSetValue(getSetValue(evt, strExt), Extensions.DeviceExt);\n setValue(extDevice, \"localId\", device.id, isString);\n setValue(extDevice, \"ip\", device.ip, isString);\n setValue(extDevice, \"model\", device.model, isString);\n setValue(extDevice, \"deviceClass\", device.deviceClass, isString);\n }\n };\n _self[_DYN_APPLY_INTERNAL_CONTE5 /* @min:%2eapplyInternalContext */] = function (evt, itemCtx) {\n var internal = _self.internal;\n if (internal) {\n var tags = getSetValue(evt, strTags);\n setValue(tags, CtxTagKeys.internalAgentVersion, internal.agentVersion, isString); // not mapped in CS 4.0\n setValue(tags, CtxTagKeys.internalSdkVersion, dataSanitizeString(logger, internal.sdkVersion, 64), isString);\n if (evt.baseType === _InternalLogMessage.dataType || evt.baseType === PageView.dataType) {\n setValue(tags, CtxTagKeys.internalSnippet, internal.snippetVer, isString);\n setValue(tags, CtxTagKeys.internalSdkSrc, internal.sdkSrc, isString);\n }\n }\n };\n _self[_DYN_APPLY_LOCATION_CONTE4 /* @min:%2eapplyLocationContext */] = function (evt, itemCtx) {\n var location = _this.location;\n if (location) {\n setValue(getSetValue(evt, strTags, []), CtxTagKeys.locationIp, location.ip, isString);\n }\n };\n _self[_DYN_APPLY_OPERATION_CONT2 /* @min:%2eapplyOperationContext */] = function (evt, itemCtx) {\n var telemetryTrace = _self[_DYN_TELEMETRY_TRACE /* @min:%2etelemetryTrace */];\n if (telemetryTrace) {\n var extTrace = getSetValue(getSetValue(evt, strExt), Extensions.TraceExt, {\n traceID: undefined,\n parentID: undefined\n });\n setValue(extTrace, \"traceID\", telemetryTrace.traceID, isString, isNullOrUndefined);\n setValue(extTrace, \"name\", telemetryTrace.name, isString, isNullOrUndefined);\n setValue(extTrace, \"parentID\", telemetryTrace.parentID, isString, isNullOrUndefined);\n }\n };\n _self.applyWebContext = function (evt, itemCtx) {\n var web = _this.web;\n if (web) {\n setValue(getSetValue(evt, strExt), Extensions.WebExt, web);\n }\n };\n _self[_DYN_APPLY_USER_CONTEXT /* @min:%2eapplyUserContext */] = function (evt, itemCtx) {\n var user = _self.user;\n if (user) {\n var tags = getSetValue(evt, strTags, []);\n // stays in tags\n setValue(tags, CtxTagKeys.userAccountId, user[_DYN_ACCOUNT_ID /* @min:%2eaccountId */], isString);\n // CS 4.0\n var extUser = getSetValue(getSetValue(evt, strExt), Extensions.UserExt);\n setValue(extUser, \"id\", user.id, isString);\n setValue(extUser, \"authId\", user[_DYN_AUTHENTICATED_ID /* @min:%2eauthenticatedId */], isString);\n }\n };\n _self.cleanUp = function (evt, itemCtx) {\n var ext = evt.ext;\n if (ext) {\n _removeEmpty(ext, Extensions.DeviceExt);\n _removeEmpty(ext, Extensions.UserExt);\n _removeEmpty(ext, Extensions.WebExt);\n _removeEmpty(ext, Extensions.OSExt);\n _removeEmpty(ext, Extensions.AppExt);\n _removeEmpty(ext, Extensions.TraceExt);\n }\n };\n });\n }\n // Removed Stub for TelemetryContext.prototype.applySessionContext.\n // Removed Stub for TelemetryContext.prototype.applyOperatingSystemContxt.\n // Removed Stub for TelemetryContext.prototype.applyApplicationContext.\n // Removed Stub for TelemetryContext.prototype.applyDeviceContext.\n // Removed Stub for TelemetryContext.prototype.applyInternalContext.\n // Removed Stub for TelemetryContext.prototype.applyLocationContext.\n // Removed Stub for TelemetryContext.prototype.applyOperationContext.\n // Removed Stub for TelemetryContext.prototype.applyWebContext.\n // Removed Stub for TelemetryContext.prototype.applyUserContext.\n // Removed Stub for TelemetryContext.prototype.cleanUp.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n TelemetryContext.__ieDyn = 1;\n return TelemetryContext;\n}();\nexport { TelemetryContext };\n","/*\n * Application Insights JavaScript SDK - Properties Plugin, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n/**\r\n* PropertiesPlugin.ts\r\n* @copyright Microsoft 2018\r\n*/\nvar _a;\nimport { __extendsFn as __extends } from \"@microsoft/applicationinsights-shims\";\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { BreezeChannelIdentifier, PageView, PropertiesPluginIdentifier, createDistributedTraceContextFromTrace, utlSetStoragePrefix } from \"@microsoft/applicationinsights-common\";\nimport { BaseTelemetryPlugin, _InternalLogMessage, _logInternalMessage, createProcessTelemetryContext, getNavigator, getSetValue, isNullOrUndefined, onConfigChange } from \"@microsoft/applicationinsights-core-js\";\nimport { objDeepFreeze, objDefine } from \"@nevware21/ts-utils\";\nimport { TelemetryContext } from \"./TelemetryContext\";\nimport { _DYN_ACCOUNT_ID, _DYN_APPLY_APPLICATION_CO1, _DYN_APPLY_DEVICE_CONTEXT, _DYN_APPLY_INTERNAL_CONTE5, _DYN_APPLY_LOCATION_CONTE4, _DYN_APPLY_OPERATING_SYST3, _DYN_APPLY_OPERATION_CONT2, _DYN_APPLY_SESSION_CONTEX0, _DYN_APPLY_USER_CONTEXT, _DYN_GET_NEW_ID, _DYN_GET_SESSION_ID, _DYN_GET_TRACE_CTX, _DYN_ID_LENGTH, _DYN_IS_NEW_USER, _DYN_IS_USER_COOKIE_SET, _DYN_NAME_PREFIX, _DYN_SESSION_COOKIE_POSTF6, _DYN_SESSION_MANAGER, _DYN_TELEMETRY_TRACE, _DYN_UPDATE, _DYN_USER_COOKIE_POSTFIX } from \"./__DynamicConstants\";\nvar undefString;\nvar nullValue = null;\nvar _defaultConfig = objDeepFreeze((_a = {}, _a[_DYN_ACCOUNT_ID /* @min:accountId */] = nullValue, _a.sessionRenewalMs = 30 * 60 * 1000, _a.samplingPercentage = 100, _a.sessionExpirationMs = 24 * 60 * 60 * 1000, _a.cookieDomain = nullValue, _a.sdkExtension = nullValue, _a.isBrowserLinkTrackingEnabled = false, _a.appId = nullValue, _a[_DYN_GET_SESSION_ID /* @min:getSessionId */] = nullValue, _a[_DYN_NAME_PREFIX /* @min:namePrefix */] = undefString, _a[_DYN_SESSION_COOKIE_POSTF6 /* @min:sessionCookiePostfix */] = undefString, _a[_DYN_USER_COOKIE_POSTFIX /* @min:userCookiePostfix */] = undefString, _a[_DYN_ID_LENGTH /* @min:idLength */] = 22, _a[_DYN_GET_NEW_ID /* @min:getNewId */] = nullValue, _a));\nvar PropertiesPlugin = /** @class */function (_super) {\n __extends(PropertiesPlugin, _super);\n function PropertiesPlugin() {\n var _this = _super.call(this) || this;\n _this.priority = 110;\n _this.identifier = PropertiesPluginIdentifier;\n var _extensionConfig;\n var _distributedTraceCtx;\n var _previousTraceCtx;\n var _context;\n var _disableUserInitMessage;\n dynamicProto(PropertiesPlugin, _this, function (_self, _base) {\n _initDefaults();\n objDefine(_self, \"context\", {\n g: function () {\n return _context;\n }\n });\n _self.initialize = function (config, core, extensions, pluginChain) {\n _base.initialize(config, core, extensions, pluginChain);\n _populateDefaults(config);\n };\n /**\r\n * Add Part A fields to the event\r\n * @param event - The event that needs to be processed\r\n */\n _self.processTelemetry = function (event, itemCtx) {\n if (!isNullOrUndefined(event)) {\n itemCtx = _self._getTelCtx(itemCtx);\n // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\n if (event.name === PageView.envelopeType) {\n itemCtx.diagLog().resetInternalMessageCount();\n }\n var theContext = _context || {};\n if (theContext.session) {\n // If customer did not provide custom session id update the session manager\n if (typeof _context.session.id !== \"string\" && theContext[_DYN_SESSION_MANAGER /* @min:%2esessionManager */]) {\n theContext[_DYN_SESSION_MANAGER /* @min:%2esessionManager */][_DYN_UPDATE /* @min:%2eupdate */]();\n }\n }\n var userCtx = theContext.user;\n if (userCtx && !userCtx[_DYN_IS_USER_COOKIE_SET /* @min:%2eisUserCookieSet */]) {\n userCtx[_DYN_UPDATE /* @min:%2eupdate */](theContext.user.id);\n }\n _processTelemetryInternal(event, itemCtx);\n if (userCtx && userCtx[_DYN_IS_NEW_USER /* @min:%2eisNewUser */]) {\n userCtx[_DYN_IS_NEW_USER /* @min:%2eisNewUser */] = false;\n if (!_disableUserInitMessage) {\n var message = new _InternalLogMessage(72 /* _eInternalMessageId.SendBrowserInfoOnUserInit */, (getNavigator() || {}).userAgent || \"\");\n _logInternalMessage(itemCtx.diagLog(), 1 /* eLoggingSeverity.CRITICAL */, message);\n }\n }\n _self.processNext(event, itemCtx);\n }\n };\n _self._doTeardown = function (unloadCtx, unloadState) {\n var core = (unloadCtx || {}).core();\n if (core && core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */]) {\n var traceCtx = core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */](false);\n if (traceCtx === _distributedTraceCtx) {\n core.setTraceCtx(_previousTraceCtx);\n }\n }\n _initDefaults();\n };\n function _initDefaults() {\n _extensionConfig = null;\n _distributedTraceCtx = null;\n _previousTraceCtx = null;\n _context = null;\n _disableUserInitMessage = true;\n }\n function _populateDefaults(config) {\n var identifier = _self.identifier;\n var core = _self.core;\n // This function will be re-called whenever any referenced configuration is changed\n _self._addHook(onConfigChange(config, function () {\n var ctx = createProcessTelemetryContext(null, config, core);\n if (config.storagePrefix) {\n utlSetStoragePrefix(config.storagePrefix);\n }\n _disableUserInitMessage = config.disableUserInitMessage === false ? false : true;\n _extensionConfig = ctx.getExtCfg(identifier, _defaultConfig);\n // Test hook to allow accessing the internal values -- explicitly not defined as an available property on the class\n _self[\"_extConfig\"] = _extensionConfig;\n }));\n // This is outside of the onConfigChange as we don't want to update (replace) these values whenever a referenced config item changes\n _previousTraceCtx = core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */](false);\n _context = new TelemetryContext(core, _extensionConfig, _previousTraceCtx, _self._unloadHooks);\n _distributedTraceCtx = createDistributedTraceContextFromTrace(_self.context[_DYN_TELEMETRY_TRACE /* @min:%2etelemetryTrace */], _previousTraceCtx);\n core.setTraceCtx(_distributedTraceCtx);\n _self.context.appId = function () {\n var breezeChannel = core.getPlugin(BreezeChannelIdentifier);\n return breezeChannel ? breezeChannel.plugin[\"_appId\"] : null;\n };\n }\n function _processTelemetryInternal(evt, itemCtx) {\n // Set Part A fields\n getSetValue(evt, \"tags\", []);\n getSetValue(evt, \"ext\", {});\n var ctx = _self.context;\n ctx[_DYN_APPLY_SESSION_CONTEX0 /* @min:%2eapplySessionContext */](evt, itemCtx);\n ctx[_DYN_APPLY_APPLICATION_CO1 /* @min:%2eapplyApplicationContext */](evt, itemCtx);\n ctx[_DYN_APPLY_DEVICE_CONTEXT /* @min:%2eapplyDeviceContext */](evt, itemCtx);\n ctx[_DYN_APPLY_OPERATION_CONT2 /* @min:%2eapplyOperationContext */](evt, itemCtx);\n ctx[_DYN_APPLY_USER_CONTEXT /* @min:%2eapplyUserContext */](evt, itemCtx);\n ctx[_DYN_APPLY_OPERATING_SYST3 /* @min:%2eapplyOperatingSystemContxt */](evt, itemCtx);\n ctx.applyWebContext(evt, itemCtx);\n ctx[_DYN_APPLY_LOCATION_CONTE4 /* @min:%2eapplyLocationContext */](evt, itemCtx); // legacy tags\n ctx[_DYN_APPLY_INTERNAL_CONTE5 /* @min:%2eapplyInternalContext */](evt, itemCtx); // legacy tags\n ctx.cleanUp(evt, itemCtx);\n }\n });\n return _this;\n }\n // Removed Stub for PropertiesPlugin.prototype.initialize.\n // Removed Stub for PropertiesPlugin.prototype.processTelemetry.\n // This is a workaround for an IE bug when using dynamicProto() with classes that don't have any\n // non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.\n PropertiesPlugin.__ieDyn = 1;\n return PropertiesPlugin;\n}(BaseTelemetryPlugin);\nexport default PropertiesPlugin;\n","/*\n * Application Insights JavaScript SDK - Web, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// ###################################################################################################################################################\n// Note: DON'T Export these const from the package as we are still targeting IE/ES5 this will export a mutable variables that someone could change ###\n// ###################################################################################################################################################\n// Generally you should only put values that are used more than 2 times and then only if not already exposed as a constant (such as SdkCoreNames)\n// as when using \"short\" named values from here they will be will be minified smaller than the SdkCoreNames[eSdkCoreNames.xxxx] value.\nvar _AUTHENTICATED_USER_CONTEXT = \"AuthenticatedUserContext\";\nvar _TRACK = \"track\";\nexport var STR_EMPTY = \"\";\nexport var STR_SNIPPET = \"snippet\";\nexport var STR_GET_COOKIE_MGR = \"getCookieMgr\";\nexport var STR_START_TRACK_PAGE = \"startTrackPage\";\nexport var STR_STOP_TRACK_PAGE = \"stopTrackPage\";\nexport var STR_FLUSH = \"flush\";\nexport var STR_START_TRACK_EVENT = \"startTrackEvent\";\nexport var STR_STOP_TRACK_EVENT = \"stopTrackEvent\";\nexport var STR_ADD_TELEMETRY_INITIALIZER = \"addTelemetryInitializer\";\nexport var STR_ADD_TELEMETRY_INITIALIZERS = STR_ADD_TELEMETRY_INITIALIZER + \"s\";\nexport var STR_POLL_INTERNAL_LOGS = \"pollInternalLogs\";\nexport var STR_GET_PLUGIN = \"getPlugin\";\nexport var STR_EVT_NAMESPACE = \"evtNamespace\";\nexport var STR_TRACK_EVENT = _TRACK + \"Event\";\nexport var STR_TRACK_TRACE = _TRACK + \"Trace\";\nexport var STR_TRACK_METRIC = _TRACK + \"Metric\";\nexport var STR_TRACK_PAGE_VIEW = _TRACK + \"PageView\";\nexport var STR_TRACK_EXCEPTION = _TRACK + \"Exception\";\nexport var STR_TRACK_DEPENDENCY_DATA = _TRACK + \"DependencyData\";\nexport var STR_SET_AUTHENTICATED_USER_CONTEXT = \"set\" + _AUTHENTICATED_USER_CONTEXT;\nexport var STR_CLEAR_AUTHENTICATED_USER_CONTEXT = \"clear\" + _AUTHENTICATED_USER_CONTEXT;\nexport var CONFIG_ENDPOINT_URL = \"https://js.monitor.azure.com/scripts/b/ai.config.1.cfg.json\";\n","/*\n * Application Insights JavaScript SDK - Web, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n// @skip-file-minify\n// ##############################################################\n// AUTO GENERATED FILE: This file is Auto Generated during build.\n// ##############################################################\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nexport var _DYN_VERSION = \"version\"; // Count: 6\nexport var _DYN_QUEUE = \"queue\"; // Count: 6\nexport var _DYN_CONNECTION_STRING = \"connectionString\"; // Count: 4\nexport var _DYN_INSTRUMENTATION_KEY = \"instrumentationKey\"; // Count: 5\nexport var _DYN_INSTRUMENTATIONKEY0 = \"instrumentationkey\"; // Count: 2\nexport var _DYN_USER_OVERRIDE_ENDPOI1 = \"userOverrideEndpointUrl\"; // Count: 6\nexport var _DYN_ENDPOINT_URL = \"endpointUrl\"; // Count: 6\nexport var _DYN_INGESTIONENDPOINT = \"ingestionendpoint\"; // Count: 2\nexport var _DYN_ONUNLOAD_FLUSH = \"onunloadFlush\"; // Count: 6\nexport var _DYN_CONTEXT = \"context\"; // Count: 5\nexport var _DYN_ADD_HOUSEKEEPING_BEF2 = \"addHousekeepingBeforeUnload\"; // Count: 2\nexport var _DYN_SEND_MESSAGE = \"sendMessage\"; // Count: 3\nexport var _DYN_UPDATE_SNIPPET_DEFIN3 = \"updateSnippetDefinitions\"; // Count: 2\n","/*\n * Application Insights JavaScript SDK - Web, 3.3.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\n\"use strict\";\n\nvar _a, _b, _c, _d;\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\nimport { AnalyticsPlugin } from \"@microsoft/applicationinsights-analytics-js\";\nimport { CfgSyncPlugin } from \"@microsoft/applicationinsights-cfgsync-js\";\nimport { Sender } from \"@microsoft/applicationinsights-channel-js\";\nimport { AnalyticsPluginIdentifier, DEFAULT_BREEZE_PATH, PropertiesPluginIdentifier, ThrottleMgr, parseConnectionString } from \"@microsoft/applicationinsights-common\";\nimport { AppInsightsCore, _throwInternal, addPageHideEventListener, addPageUnloadEventListener, cfgDfMerge, cfgDfValidate, createDynamicConfig, createProcessTelemetryContext, createUniqueNamespace, doPerf, hasDocument, hasWindow, isArray, isFeatureEnabled, isFunction, isNullOrUndefined, isReactNative, isString, mergeEvtNamespace, onConfigChange, proxyAssign, proxyFunctions, removePageHideEventListener, removePageUnloadEventListener } from \"@microsoft/applicationinsights-core-js\";\nimport { AjaxPlugin as DependenciesPlugin } from \"@microsoft/applicationinsights-dependencies-js\";\nimport { PropertiesPlugin } from \"@microsoft/applicationinsights-properties-js\";\nimport { createPromise, createSyncPromise, doAwaitResponse } from \"@nevware21/ts-async\";\nimport { arrForEach, arrIndexOf, isPromiseLike, objDefine, objForEachKey, strIndexOf, throwUnsupported } from \"@nevware21/ts-utils\";\nimport { CONFIG_ENDPOINT_URL, STR_ADD_TELEMETRY_INITIALIZER, STR_CLEAR_AUTHENTICATED_USER_CONTEXT, STR_EVT_NAMESPACE, STR_FLUSH, STR_GET_COOKIE_MGR, STR_GET_PLUGIN, STR_POLL_INTERNAL_LOGS, STR_SET_AUTHENTICATED_USER_CONTEXT, STR_SNIPPET, STR_START_TRACK_EVENT, STR_START_TRACK_PAGE, STR_STOP_TRACK_EVENT, STR_STOP_TRACK_PAGE, STR_TRACK_DEPENDENCY_DATA, STR_TRACK_EVENT, STR_TRACK_EXCEPTION, STR_TRACK_METRIC, STR_TRACK_PAGE_VIEW, STR_TRACK_TRACE } from \"./InternalConstants\";\nimport { _DYN_ADD_HOUSEKEEPING_BEF2, _DYN_CONNECTION_STRING, _DYN_CONTEXT, _DYN_ENDPOINT_URL, _DYN_INGESTIONENDPOINT, _DYN_INSTRUMENTATIONKEY0, _DYN_INSTRUMENTATION_KEY, _DYN_ONUNLOAD_FLUSH, _DYN_QUEUE, _DYN_SEND_MESSAGE, _DYN_UPDATE_SNIPPET_DEFIN3, _DYN_USER_OVERRIDE_ENDPOI1, _DYN_VERSION } from \"./__DynamicConstants\";\nvar _internalSdkSrc;\n// This is an exclude list of properties that should not be updated during initialization\n// They include a combination of private and internal property names\nvar _ignoreUpdateSnippetProperties = [STR_SNIPPET, \"dependencies\", \"properties\", \"_snippetVersion\", \"appInsightsNew\", \"getSKUDefaults\"];\nvar IKEY_USAGE = \"iKeyUsage\";\nvar CDN_USAGE = \"CdnUsage\";\nvar SDK_LOADER_VER = \"SdkLoaderVer\";\nvar UNDEFINED_VALUE = undefined;\nvar default_limit = {\n samplingRate: 100,\n maxSendNumber: 1\n};\nvar default_interval = {\n monthInterval: 3,\n daysOfMonth: [28]\n};\nvar default_throttle_config = {\n disabled: true,\n limit: cfgDfMerge(default_limit),\n interval: cfgDfMerge(default_interval)\n};\n// We need to include all properties that we only reference that we want to be dynamically updatable here\n// So they are converted even when not specified in the passed configuration\nvar defaultConfigValues = (_a = {}, _a[_DYN_CONNECTION_STRING /* @min:connectionString */] = UNDEFINED_VALUE, _a[_DYN_ENDPOINT_URL /* @min:endpointUrl */] = UNDEFINED_VALUE, _a[_DYN_INSTRUMENTATION_KEY /* @min:instrumentationKey */] = UNDEFINED_VALUE, _a[_DYN_USER_OVERRIDE_ENDPOI1 /* @min:userOverrideEndpointUrl */] = UNDEFINED_VALUE, _a.diagnosticLogInterval = cfgDfValidate(_chkDiagLevel, 10000), _a.featureOptIn = (_b = {}, _b[IKEY_USAGE] = {\n mode: 3 /* FeatureOptInMode.enable */\n}, _b[CDN_USAGE] = {\n mode: 2 /* FeatureOptInMode.disable */\n}, _b[SDK_LOADER_VER] = {\n mode: 2 /* FeatureOptInMode.disable */\n}, _b), _a.throttleMgrCfg = cfgDfMerge((_c = {}, _c[109 /* _eInternalMessageId.DefaultThrottleMsgKey */] = cfgDfMerge(default_throttle_config), _c[106 /* _eInternalMessageId.InstrumentationKeyDeprecation */] = cfgDfMerge(default_throttle_config), _c[111 /* _eInternalMessageId.SdkLdrUpdate */] = cfgDfMerge(default_throttle_config), _c[110 /* _eInternalMessageId.CdnDeprecation */] = cfgDfMerge(default_throttle_config), _c)), _a.extensionConfig = cfgDfMerge((_d = {}, _d[\"AppInsightsCfgSyncPlugin\"] = cfgDfMerge({\n cfgUrl: CONFIG_ENDPOINT_URL,\n syncMode: 2 /* ICfgSyncMode.Receive */\n}), _d)), _a);\nfunction _chkDiagLevel(value) {\n // Make sure we have a value > 0\n return value && value > 0;\n}\n/**\r\n * Application Insights API\r\n * @group Entrypoint\r\n * @group Classes\r\n * @class Initialization\r\n * @implements {IApplicationInsights}\r\n */\nvar AppInsightsSku = /** @class */function () {\n function AppInsightsSku(snippet) {\n var _this = this;\n // NOTE!: DON'T set default values here, instead set them in the _initDefaults() function as it is also called during teardown()\n var dependencies;\n var properties;\n var _sender;\n var _snippetVersion;\n var _evtNamespace;\n var _houseKeepingNamespace;\n var _core;\n var _config;\n var _analyticsPlugin;\n var _cfgSyncPlugin;\n var _throttleMgr;\n var _iKeySentMessage;\n var _cdnSentMessage;\n var _sdkVerSentMessage;\n dynamicProto(AppInsightsSku, this, function (_self) {\n _initDefaults();\n objDefine(_self, \"config\", {\n g: function () {\n return _config;\n }\n });\n arrForEach([\"pluginVersionStringArr\", \"pluginVersionString\"], function (key) {\n objDefine(_self, key, {\n g: function () {\n if (_core) {\n return _core[key];\n }\n return null;\n }\n });\n });\n // initialize the queue and config in case they are undefined\n _snippetVersion = \"\" + (snippet.sv || snippet[_DYN_VERSION /* @min:%2eversion */] || \"\");\n snippet[_DYN_QUEUE /* @min:%2equeue */] = snippet[_DYN_QUEUE /* @min:%2equeue */] || [];\n snippet[_DYN_VERSION /* @min:%2eversion */] = snippet[_DYN_VERSION /* @min:%2eversion */] || 2.0; // Default to new version\n var cfgHandler = createDynamicConfig(snippet.config || {}, defaultConfigValues);\n _config = cfgHandler.cfg;\n _analyticsPlugin = new AnalyticsPlugin();\n objDefine(_self, \"appInsights\", {\n g: function () {\n return _analyticsPlugin;\n }\n });\n properties = new PropertiesPlugin();\n dependencies = new DependenciesPlugin();\n _sender = new Sender();\n _core = new AppInsightsCore();\n objDefine(_self, \"core\", {\n g: function () {\n return _core;\n }\n });\n // Will get recalled if any referenced values are changed\n _addUnloadHook(onConfigChange(cfgHandler, function () {\n var configCs = _config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */];\n function _parseCs() {\n return createSyncPromise(function (resolve, reject) {\n doAwaitResponse(configCs, function (res) {\n var curCs = res && res.value;\n var parsedCs = null;\n if (!res.rejected && curCs) {\n // replace cs with resolved values in case of circular promises\n _config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */] = curCs;\n parsedCs = parseConnectionString(curCs);\n }\n // if can't resolve cs promise, null will be returned\n resolve(parsedCs);\n });\n });\n }\n if (isPromiseLike(configCs)) {\n var ikeyPromise = createSyncPromise(function (resolve, reject) {\n _parseCs().then(function (cs) {\n var ikey = _config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */];\n ikey = cs && cs[_DYN_INSTRUMENTATIONKEY0 /* @min:%2einstrumentationkey */] || ikey;\n resolve(ikey);\n }).catch(function (e) {\n // parseCs will always resolve(unless timeout)\n // return null in case any error happens\n resolve(null);\n });\n });\n var url = _config[_DYN_USER_OVERRIDE_ENDPOI1 /* @min:%2euserOverrideEndpointUrl */];\n if (isNullOrUndefined(url)) {\n url = createSyncPromise(function (resolve, reject) {\n _parseCs().then(function (cs) {\n var url = _config[_DYN_ENDPOINT_URL /* @min:%2eendpointUrl */];\n var ingest = cs && cs[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */];\n url = ingest ? ingest + DEFAULT_BREEZE_PATH : url;\n resolve(url);\n }).catch(function (e) {\n // parseCs will always resolve(unless timeout)\n // return null in case any error happens\n resolve(null);\n });\n });\n }\n _config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */] = ikeyPromise;\n _config[_DYN_ENDPOINT_URL /* @min:%2eendpointUrl */] = url;\n }\n if (isString(configCs) && configCs) {\n // confirm if promiselike function present\n // handle cs promise here\n // add cases to oneNote\n var cs = parseConnectionString(configCs);\n var ingest = cs[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */];\n _config.endpointUrl = _config[_DYN_USER_OVERRIDE_ENDPOI1 /* @min:%2euserOverrideEndpointUrl */] ? _config[_DYN_USER_OVERRIDE_ENDPOI1 /* @min:%2euserOverrideEndpointUrl */] : ingest + DEFAULT_BREEZE_PATH; // add /v2/track\n _config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */] = cs[_DYN_INSTRUMENTATIONKEY0 /* @min:%2einstrumentationkey */] || _config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */];\n }\n // userOverrideEndpointUrl have the highest priority\n _config.endpointUrl = _config[_DYN_USER_OVERRIDE_ENDPOI1 /* @min:%2euserOverrideEndpointUrl */] ? _config[_DYN_USER_OVERRIDE_ENDPOI1 /* @min:%2euserOverrideEndpointUrl */] : _config[_DYN_ENDPOINT_URL /* @min:%2eendpointUrl */];\n }));\n _self[STR_SNIPPET /* @min:%2esnippet */] = snippet;\n _self[STR_FLUSH /* @min:%2eflush */] = function (async, callBack) {\n if (async === void 0) {\n async = true;\n }\n var result;\n doPerf(_core, function () {\n return \"AISKU.flush\";\n }, function () {\n if (async && !callBack) {\n result = createPromise(function (resolve) {\n callBack = resolve;\n });\n }\n var waiting = 1;\n var flushDone = function () {\n waiting--;\n if (waiting === 0) {\n callBack();\n }\n };\n arrForEach(_core.getChannels(), function (channel) {\n if (channel) {\n waiting++;\n channel[STR_FLUSH /* @min:%2eflush */](async, flushDone);\n }\n });\n // decrement the initial \"waiting\"\n flushDone();\n }, null, async);\n return result;\n };\n _self[_DYN_ONUNLOAD_FLUSH /* @min:%2eonunloadFlush */] = function (async) {\n if (async === void 0) {\n async = true;\n }\n arrForEach(_core.getChannels(), function (channel) {\n if (channel[_DYN_ONUNLOAD_FLUSH /* @min:%2eonunloadFlush */]) {\n channel[_DYN_ONUNLOAD_FLUSH /* @min:%2eonunloadFlush */]();\n } else {\n channel[STR_FLUSH /* @min:%2eflush */](async);\n }\n });\n };\n _self.loadAppInsights = function (legacyMode, logger, notificationManager) {\n if (legacyMode === void 0) {\n legacyMode = false;\n }\n if (legacyMode) {\n throwUnsupported(\"Legacy Mode is no longer supported\");\n }\n function _updateSnippetProperties(snippet) {\n if (snippet) {\n var snippetVer = \"\";\n if (!isNullOrUndefined(_snippetVersion)) {\n snippetVer += _snippetVersion;\n }\n if (_self[_DYN_CONTEXT /* @min:%2econtext */] && _self[_DYN_CONTEXT /* @min:%2econtext */].internal) {\n _self[_DYN_CONTEXT /* @min:%2econtext */].internal.snippetVer = snippetVer || \"-\";\n }\n // apply updated properties to the global instance (snippet)\n objForEachKey(_self, function (field, value) {\n if (isString(field) && !isFunction(value) && field && field[0] !== \"_\" &&\n // Don't copy \"internal\" values\n arrIndexOf(_ignoreUpdateSnippetProperties, field) === -1) {\n if (snippet[field] !== value) {\n snippet[field] = value;\n }\n }\n });\n }\n }\n doPerf(_self.core, function () {\n return \"AISKU.loadAppInsights\";\n }, function () {\n // initialize core\n _core.initialize(_config, [_sender, properties, dependencies, _analyticsPlugin, _cfgSyncPlugin], logger, notificationManager);\n objDefine(_self, \"context\", {\n g: function () {\n return properties[_DYN_CONTEXT /* @min:%2econtext */];\n }\n });\n if (!_throttleMgr) {\n _throttleMgr = new ThrottleMgr(_core);\n }\n var sdkSrc = _findSdkSourceFile();\n if (sdkSrc && _self[_DYN_CONTEXT /* @min:%2econtext */]) {\n _self[_DYN_CONTEXT /* @min:%2econtext */].internal.sdkSrc = sdkSrc;\n }\n _updateSnippetProperties(_self[STR_SNIPPET /* @min:%2esnippet */]);\n // Empty queue of all api calls logged prior to sdk download\n _self.emptyQueue();\n _self[STR_POLL_INTERNAL_LOGS /* @min:%2epollInternalLogs */]();\n _self[_DYN_ADD_HOUSEKEEPING_BEF2 /* @min:%2eaddHousekeepingBeforeUnload */](_self);\n _addUnloadHook(onConfigChange(cfgHandler, function () {\n var defaultEnable = false;\n if (_config.throttleMgrCfg[109 /* _eInternalMessageId.DefaultThrottleMsgKey */]) {\n defaultEnable = !_config.throttleMgrCfg[109 /* _eInternalMessageId.DefaultThrottleMsgKey */].disabled;\n }\n if (!_throttleMgr.isReady() && _config.extensionConfig && _config.extensionConfig[_cfgSyncPlugin.identifier] && defaultEnable) {\n // set ready state to true will automatically trigger flush()\n _throttleMgr.onReadyState(true);\n }\n var result;\n if (!_iKeySentMessage && !_config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */] && isFeatureEnabled(IKEY_USAGE, _config)) {\n result = _throttleMgr[_DYN_SEND_MESSAGE /* @min:%2esendMessage */](106 /* _eInternalMessageId.InstrumentationKeyDeprecation */, \"See Instrumentation key support at aka.ms/IkeyMigrate\");\n _iKeySentMessage = true;\n }\n if (!_cdnSentMessage && _self[_DYN_CONTEXT /* @min:%2econtext */].internal.sdkSrc && _self[_DYN_CONTEXT /* @min:%2econtext */].internal.sdkSrc.indexOf(\"az416426\") != -1 && isFeatureEnabled(CDN_USAGE, _config)) {\n result = _throttleMgr[_DYN_SEND_MESSAGE /* @min:%2esendMessage */](110 /* _eInternalMessageId.CdnDeprecation */, \"See Cdn support notice at aka.ms/JsActiveCdn\");\n _cdnSentMessage = true;\n }\n if (!_sdkVerSentMessage && parseInt(_snippetVersion) < 6 && isFeatureEnabled(SDK_LOADER_VER, _config)) {\n result = _throttleMgr[_DYN_SEND_MESSAGE /* @min:%2esendMessage */](111 /* _eInternalMessageId.SdkLdrUpdate */, \"An updated Sdk Loader is available, see aka.ms/SnippetVer\");\n _sdkVerSentMessage = true;\n }\n }));\n });\n return _self;\n };\n _self[_DYN_UPDATE_SNIPPET_DEFIN3 /* @min:%2eupdateSnippetDefinitions */] = function (snippet) {\n // apply full appInsights to the global instance\n // Note: This must be called before loadAppInsights is called\n proxyAssign(snippet, _self, function (name) {\n // Not excluding names prefixed with \"_\" as we need to proxy some functions like _onError\n return name && arrIndexOf(_ignoreUpdateSnippetProperties, name) === -1;\n });\n };\n _self.emptyQueue = function () {\n // call functions that were queued before the main script was loaded\n try {\n if (isArray(_self.snippet[_DYN_QUEUE /* @min:%2equeue */])) {\n // note: do not check length in the for-loop conditional in case something goes wrong and the stub methods are not overridden.\n var length_1 = _self.snippet[_DYN_QUEUE /* @min:%2equeue */].length;\n for (var i = 0; i < length_1; i++) {\n var call = _self.snippet[_DYN_QUEUE /* @min:%2equeue */][i];\n call();\n }\n _self.snippet[_DYN_QUEUE /* @min:%2equeue */] = undefined;\n delete _self.snippet[_DYN_QUEUE /* @min:%2equeue */];\n }\n } catch (exception) {\n var properties_1 = {};\n if (exception && isFunction(exception.toString)) {\n properties_1.exception = exception.toString();\n }\n // need from core\n // Microsoft.ApplicationInsights._InternalLogging.throwInternal(\n // eLoggingSeverity.WARNING,\n // _eInternalMessageId.FailedToSendQueuedTelemetry,\n // \"Failed to send queued telemetry\",\n // properties);\n }\n };\n _self[_DYN_ADD_HOUSEKEEPING_BEF2 /* @min:%2eaddHousekeepingBeforeUnload */] = function (appInsightsInstance) {\n // Add callback to push events when the user navigates away\n if (hasWindow() || hasDocument()) {\n var performHousekeeping_1 = function () {\n // Adds the ability to flush all data before the page unloads.\n // Note: This approach tries to push a sync request with all the pending events onbeforeunload.\n // Firefox does not respect this.Other browsers DO push out the call with < 100% hit rate.\n // Telemetry here will help us analyze how effective this approach is.\n // Another approach would be to make this call sync with a acceptable timeout to reduce the\n // impact on user experience.\n // appInsightsInstance.context._sender.triggerSend();\n appInsightsInstance[_DYN_ONUNLOAD_FLUSH /* @min:%2eonunloadFlush */](false);\n // Back up the current session to local storage\n // This lets us close expired sessions after the cookies themselves expire\n if (isFunction(_self.core[STR_GET_PLUGIN /* @min:%2egetPlugin */])) {\n var loadedPlugin = _this.core[STR_GET_PLUGIN /* @min:%2egetPlugin */](PropertiesPluginIdentifier);\n if (loadedPlugin) {\n var propertiesPlugin = loadedPlugin.plugin;\n if (propertiesPlugin && propertiesPlugin[_DYN_CONTEXT /* @min:%2econtext */] && propertiesPlugin[_DYN_CONTEXT /* @min:%2econtext */]._sessionManager) {\n propertiesPlugin[_DYN_CONTEXT /* @min:%2econtext */]._sessionManager.backup();\n }\n }\n }\n };\n var added_1 = false;\n if (!_houseKeepingNamespace) {\n _houseKeepingNamespace = mergeEvtNamespace(_evtNamespace, _core[STR_EVT_NAMESPACE /* @min:%2eevtNamespace */] && _core[STR_EVT_NAMESPACE /* @min:%2eevtNamespace */]());\n }\n // Will be recalled if any referenced config properties change\n _addUnloadHook(onConfigChange(_config, function (details) {\n var coreConfig = details.cfg;\n var analyticsPlugin = appInsightsInstance.appInsights;\n var ctx = createProcessTelemetryContext(null, coreConfig, analyticsPlugin.core);\n var extConfig = ctx.getExtCfg(analyticsPlugin.identifier || AnalyticsPluginIdentifier);\n // As we could get recalled, remove any previously registered event handlers first\n _removePageEventHandlers();\n var excludePageUnloadEvents = coreConfig.disablePageUnloadEvents;\n if (!extConfig.disableFlushOnBeforeUnload) {\n // Hook the unload event for the document, window and body to ensure that the client events are flushed to the server\n // As just hooking the window does not always fire (on chrome) for page navigation's.\n if (addPageUnloadEventListener(performHousekeeping_1, excludePageUnloadEvents, _houseKeepingNamespace)) {\n added_1 = true;\n }\n // We also need to hook the pagehide and visibilitychange events as not all versions of Safari support load/unload events.\n if (addPageHideEventListener(performHousekeeping_1, excludePageUnloadEvents, _houseKeepingNamespace)) {\n added_1 = true;\n }\n // A reactNative app may not have a window and therefore the beforeunload/pagehide events -- so don't\n // log the failure in this case\n if (!added_1 && !isReactNative()) {\n _throwInternal(_core.logger, 1 /* eLoggingSeverity.CRITICAL */, 19 /* _eInternalMessageId.FailedToAddHandlerForOnBeforeUnload */, \"Could not add handler for beforeunload and pagehide\");\n }\n }\n if (!added_1 && !extConfig.disableFlushOnUnload) {\n // If we didn't add the normal set then attempt to add the pagehide and visibilitychange only\n addPageHideEventListener(performHousekeeping_1, excludePageUnloadEvents, _houseKeepingNamespace);\n }\n }));\n }\n };\n _self.getSender = function () {\n return _sender;\n };\n _self.unload = function (isAsync, unloadComplete, cbTimeout) {\n var unloadDone = false;\n var result;\n if (isAsync && !unloadComplete) {\n result = createPromise(function (resolve) {\n // Set the callback to the promise resolve callback\n unloadComplete = resolve;\n });\n }\n function _unloadCallback(unloadState) {\n if (!unloadDone) {\n unloadDone = true;\n _initDefaults();\n unloadComplete && unloadComplete(unloadState);\n }\n }\n _self[_DYN_ONUNLOAD_FLUSH /* @min:%2eonunloadFlush */](isAsync);\n _removePageEventHandlers();\n _core.unload && _core.unload(isAsync, _unloadCallback, cbTimeout);\n return result;\n };\n proxyFunctions(_self, _analyticsPlugin, [STR_GET_COOKIE_MGR, STR_TRACK_EVENT, STR_TRACK_PAGE_VIEW, \"trackPageViewPerformance\", STR_TRACK_EXCEPTION, \"_onerror\", STR_TRACK_TRACE, STR_TRACK_METRIC, STR_START_TRACK_PAGE, STR_STOP_TRACK_PAGE, STR_START_TRACK_EVENT, STR_STOP_TRACK_EVENT]);\n proxyFunctions(_self, _getCurrentDependencies, [STR_TRACK_DEPENDENCY_DATA, \"addDependencyListener\", \"addDependencyInitializer\"]);\n proxyFunctions(_self, _core, [STR_ADD_TELEMETRY_INITIALIZER, STR_POLL_INTERNAL_LOGS, \"stopPollingInternalLogs\", STR_GET_PLUGIN, \"addPlugin\", STR_EVT_NAMESPACE, \"addUnloadCb\", \"getTraceCtx\", \"updateCfg\", \"onCfgChange\"]);\n proxyFunctions(_self, function () {\n var context = properties[_DYN_CONTEXT /* @min:%2econtext */];\n return context ? context.user : null;\n }, [STR_SET_AUTHENTICATED_USER_CONTEXT, STR_CLEAR_AUTHENTICATED_USER_CONTEXT]);\n // Using a function to support the dynamic adding / removal of plugins, so this will always return the current value\n function _getCurrentDependencies() {\n return dependencies;\n }\n function _initDefaults() {\n _evtNamespace = createUniqueNamespace(\"AISKU\");\n _houseKeepingNamespace = null;\n dependencies = null;\n properties = null;\n _sender = null;\n _snippetVersion = null;\n _throttleMgr = null;\n _iKeySentMessage = false;\n _cdnSentMessage = false;\n _sdkVerSentMessage = false;\n _cfgSyncPlugin = new CfgSyncPlugin();\n }\n function _removePageEventHandlers() {\n // Remove any registered event handlers\n if (_houseKeepingNamespace) {\n removePageUnloadEventListener(null, _houseKeepingNamespace);\n removePageHideEventListener(null, _houseKeepingNamespace);\n }\n }\n function _addUnloadHook(hooks) {\n _core.addUnloadHook(hooks);\n }\n });\n }\n // Analytics Plugin\n // Removed Stub for AppInsightsSku.prototype.getCookieMgr.\n // Removed Stub for AppInsightsSku.prototype.trackEvent.\n // Removed Stub for AppInsightsSku.prototype.trackPageView.\n // Removed Stub for AppInsightsSku.prototype.trackPageViewPerformance.\n // Removed Stub for AppInsightsSku.prototype.trackException.\n // Removed Stub for AppInsightsSku.prototype._onerror.\n // Removed Stub for AppInsightsSku.prototype.trackTrace.\n // Removed Stub for AppInsightsSku.prototype.trackMetric.\n // Removed Stub for AppInsightsSku.prototype.startTrackPage.\n // Removed Stub for AppInsightsSku.prototype.stopTrackPage.\n // Removed Stub for AppInsightsSku.prototype.startTrackEvent.\n // Removed Stub for AppInsightsSku.prototype.stopTrackEvent.\n // Removed Stub for AppInsightsSku.prototype.addTelemetryInitializer.\n // Properties Plugin\n // Removed Stub for AppInsightsSku.prototype.setAuthenticatedUserContext.\n // Removed Stub for AppInsightsSku.prototype.clearAuthenticatedUserContext.\n // Dependencies Plugin\n // Removed Stub for AppInsightsSku.prototype.trackDependencyData.\n // Misc\n // Removed Stub for AppInsightsSku.prototype.flush.\n // Removed Stub for AppInsightsSku.prototype.onunloadFlush.\n // Removed Stub for AppInsightsSku.prototype.loadAppInsights.\n // Removed Stub for AppInsightsSku.prototype.updateSnippetDefinitions.\n // Removed Stub for AppInsightsSku.prototype.emptyQueue.\n // Removed Stub for AppInsightsSku.prototype.pollInternalLogs.\n // Removed Stub for AppInsightsSku.prototype.stopPollingInternalLogs.\n // Removed Stub for AppInsightsSku.prototype.addHousekeepingBeforeUnload.\n // Removed Stub for AppInsightsSku.prototype.getSender.\n // Removed Stub for AppInsightsSku.prototype.unload.\n // Removed Stub for AppInsightsSku.prototype.getPlugin.\n // Removed Stub for AppInsightsSku.prototype.addPlugin.\n // Removed Stub for AppInsightsSku.prototype.updateCfg.\n // Removed Stub for AppInsightsSku.prototype.evtNamespace.\n // Removed Stub for AppInsightsSku.prototype.addUnloadCb.\n // Removed Stub for AppInsightsSku.prototype.addDependencyListener.\n /**\r\n * Add an dependency telemetry initializer callback function to allow populating additional properties or drop the request.\r\n * It is called after the dependency call has completed and any available performance details are available. A dependency\r\n * initializer is similar to the TelemetryInitializer function but it allows you to block the reporting of the dependency\r\n * request so that it doesn't count against the `maxAjaxCallsPerView`.\r\n * @param dependencyInitializer - The Dependency Telemetry Initializer function\r\n * @returns - A IDependencyInitializerHandler to enable the initializer to be removed\r\n */\n AppInsightsSku.prototype.addDependencyInitializer = function (dependencyInitializer) {\n return null;\n };\n // Removed Stub for AppInsightsSku.prototype.getTraceCtx.\n // Removed Stub for AppInsightsSku.prototype.onCfgChange.\n return AppInsightsSku;\n}();\nexport { AppInsightsSku };\n// tslint:disable-next-line\nexport function _findSdkSourceFile() {\n if (_internalSdkSrc) {\n // Use the cached value\n return _internalSdkSrc;\n }\n var sdkSrc = null;\n var isModule = false;\n var cdns = [\"://js.monitor.azure.com/\", \"://az416426.vo.msecnd.net/\"];\n try {\n // Try and determine whether the sdk is being loaded from the CDN\n // currentScript is only valid during initial processing\n var scrpt = (document || {}).currentScript;\n if (scrpt) {\n sdkSrc = scrpt.src;\n // } else {\n // // We need to update to at least typescript 2.9 for this to work :-(\n // // Leaving as a stub for now so after we upgrade this breadcrumb is available\n // let meta = import.meta;\n // sdkSrc = (meta || {}).url;\n // isModule = true;\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n if (sdkSrc) {\n try {\n var url_1 = sdkSrc.toLowerCase();\n if (url_1) {\n var src_1 = \"\";\n arrForEach(cdns, function (value, idx) {\n if (strIndexOf(url_1, value) !== -1) {\n src_1 = \"cdn\" + (idx + 1);\n if (strIndexOf(url_1, \"/scripts/\") === -1) {\n if (strIndexOf(url_1, \"/next/\") !== -1) {\n src_1 += \"-next\";\n } else if (strIndexOf(url_1, \"/beta/\") !== -1) {\n src_1 += \"-beta\";\n }\n }\n _internalSdkSrc = src_1 + (isModule ? \".mod\" : \"\");\n return -1;\n }\n });\n }\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n // Cache the found value so we don't have to look it up again\n _internalSdkSrc = sdkSrc;\n }\n return _internalSdkSrc;\n}\n","import { Injectable, OnDestroy, inject } from '@angular/core';\nimport { Event, NavigationEnd, Router } from '@angular/router';\nimport { ApplicationInsights, ICustomProperties, SeverityLevel } from '@microsoft/applicationinsights-web';\nimport { Subscription } from 'rxjs';\nimport { AppService } from '../app.service';\nimport { getEnv } from '../utils/getEnv';\n\n/**\n *\n */\n// TODO: Add Angular decorator.\n// TODO: Add Angular decorator.\n@Injectable()\nexport class TelemetryService implements OnDestroy {\n subscriptions: Subscription[] = [];\n private appInsights!: ApplicationInsights;\n private router = inject(Router);\n private app = inject(AppService);\n\n private lastEvent: NavigationEnd | null = null;\n\n /**\n *\n */\n init() {\n const instrumentationKey = getEnv('instrumentationKey');\n if (instrumentationKey && location.hostname !== 'localhost') {\n if (!this.appInsights) {\n // Setup azure telemetry\n this.appInsights = new ApplicationInsights({\n config: {\n instrumentationKey,\n maxBatchInterval: 0,\n disableFetchTracking: false,\n },\n });\n }\n this.appInsights.loadAppInsights();\n\n // Track page views\n this.subscriptions.push(\n this.router.events.subscribe((event: Event) => {\n if (event instanceof NavigationEnd) {\n const url = event.urlAfterRedirects;\n this.appInsights?.trackPageView({\n name: document.title,\n refUri: this.lastEvent?.url ?? document.referrer ?? '',\n uri: url,\n properties: {\n application: this.app.getApplicationName(),\n },\n });\n this.lastEvent = event;\n }\n }),\n );\n }\n }\n\n logEvent(name: string, event: ICustomProperties) {\n event = { ...event, application: this.app.getApplicationName() };\n this.appInsights?.trackEvent({ name, properties: event });\n }\n\n logError(error: Error) {\n // Log an exception that you have caught\n this.appInsights?.trackException(\n { exception: error, severityLevel: SeverityLevel.Error },\n { application: this.app.getApplicationName() },\n );\n }\n\n ngOnDestroy() {\n this.subscriptions.filter(s => !!s && !s.closed).forEach(s => s.unsubscribe());\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { TelemetryService } from './telemetry.service';\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule],\n providers: [TelemetryService],\n})\nexport class TelemetryModule {}\n"],"mappings":"wKAMA,SAASA,GAAYC,EAAOC,EAAO,CACjC,OAAOD,GAASC,CAClB,CAEA,SAASC,GAASC,EAAOC,EAAM,CAC7B,OAAOD,EAAMC,CAAI,CACnB,CACA,IAAIC,GAAc,OACdC,GAAa,KACbC,GAAQ,GACRC,GAAW,WACXC,GAAS,SACTC,GAAY,YACZC,GAAY,YACZC,GAAY,YACZC,GAAc,cACdC,GAAS,SACTC,GAAe,YACfC,GAAS,SACTC,GAAO,OACPC,GAAO,OACPC,GAAY,WACZC,GAAwBrB,GAAY,MAAM,EAC1CsB,GAAwBnB,GAASkB,GAAUV,EAAS,EACpDY,GAAsBvB,GAAY,MAAM,EACxCwB,GAAwBrB,GAASoB,GAAQZ,EAAS,EAClDc,GAAuBzB,GAAY,IAAI,EACvC0B,GAAsB1B,GAAY,KAAK,EACvC2B,GAAwBxB,GAASuB,GAAQf,EAAS,EAClDiB,GAAwBzB,GAASwB,GAAU,OAAO,EACtD,SAASE,GAAKC,EAAMC,EAAU,CAC5B,GAAI,CACF,MAAO,CACL,EAAGD,EAAK,MAAM,KAAMC,CAAQ,CAC9B,CACF,OAASC,EAAG,CACV,MAAO,CACL,EAAGA,CACL,CACF,CACF,CAGA,SAAS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AI8B,mBAAkB,GAE3C,EACD,KAAK5B,UAAYe,CACnB,CACF,CAAC,CAAC,EAGR,CAEAc,SAAST,EAAcL,EAAwB,CAC7CA,EAAQe,GAAAC,GAAA,GAAKhB,GAAL,CAAYY,YAAa,KAAK7B,IAAI8B,mBAAkB,CAAE,GAC9D,KAAKtB,aAAa0B,WAAW,CAAEZ,KAAAA,EAAMM,WAAYX,CAAK,CAAE,CAC1D,CAEAkB,SAASC,EAAY,CAEnB,KAAK5B,aAAa6B,eAChB,CAAEC,UAAWF,EAAOG,cAAeC,GAAcC,KAAK,EACtD,CAAEZ,YAAa,KAAK7B,IAAI8B,mBAAkB,CAAE,CAAE,CAElD,CAEAY,aAAW,CACT,KAAK9C,cAAc+C,OAAOC,GAAK,CAAC,CAACA,GAAK,CAACA,EAAEC,MAAM,EAAEC,QAAQF,GAAKA,EAAEG,YAAW,CAAE,CAC/E,iDA7DWrD,EAAgB,CAAA,kCAAhBA,EAAgBsD,QAAhBtD,EAAgBuD,SAAA,CAAA,CAAA,SAAhBvD,CAAgB,GAAA,ECH7B,IAAawD,IAAe,IAAA,CAAtB,MAAOA,CAAe,iDAAfA,EAAe,CAAA,gCAAfA,CAAe,CAAA,CAAA,qCAFf,CAACC,EAAgB,EAACC,QAAA,CADnBC,GAAcC,EAAY,CAAA,CAAA,CAAA,SAGzBJ,CAAe,GAAA","names":["_pureAssign","func1","func2","_pureRef","value","name","UNDEF_VALUE","NULL_VALUE","EMPTY","FUNCTION","OBJECT","PROTOTYPE","__PROTO__","UNDEFINED","CONSTRUCTOR","SYMBOL","POLYFILL_TAG","LENGTH","NAME","CALL","TO_STRING","ObjClass","ObjProto","StrCls","StrProto","MathCls","ArrCls","ArrProto","ArrSlice","safe","func","argArray","e","safeGet","cb","defValue","result","_primitiveTypes","_createIs","theType","_createObjIs","theName","objToString","isUndefined","value","UNDEFINED","isStrictUndefined","arg","isDefined","isNullOrUndefined","NULL_VALUE","isStrictNullOrUndefined","UNDEF_VALUE","isPrimitiveType","theType","_primitiveTypes","UNDEFINED","OBJECT","isString","_createIs","isFunction","FUNCTION","isObject","value","isNullOrUndefined","isArray","_pureRef","ArrCls","isDate","_createObjIs","isNumber","isBoolean","isError","_createObjIs","isPromiseLike","value","isFunction","isTruthy","value","safeGet","objGetOwnPropertyDescriptor","_pureRef","ObjClass","objHasOwnProperty","obj","prop","ObjProto","CALL","objHasOwn","_pureAssign","polyObjHasOwn","objForEachKey","theObject","callbackfn","thisArg","isObject","propMap","_createProp","desc","newValue","key","isStrictUndefined","objDefineProp","objDefineProperties","objDefine","target","key","propDesc","objDefineProp","_createProp","_createKeyValueMap","values","keyType","valueType","completeFn","writable","theMap","objForEachKey","key","value","_assignMapValue","objDefineProp","asString","_pureAssign","StrCls","ERROR_TYPE","dumpObj","object","format","propertyValueDump","EMPTY","objType","ObjProto","TO_STRING","CALL","NULL_VALUE","UNDEF_VALUE","e","throwError","message","throwTypeError","_objFreeze","_pureRef","ObjClass","_doNothing","value","_getProto","__PROTO__","NULL_VALUE","objAssign","objKeys","objDeepFreeze","objForEachKey","key","isArray","isObject","objFreeze","_pureAssign","objGetPrototypeOf","_pureAssign","_pureRef","ObjClass","_getProto","createEnum","values","_createKeyValueMap","objFreeze","createEnumKeyMap","createSimpleMap","values","mapClass","objForEachKey","key","value","_assignMapValue","objFreeze","createTypeMap","_wellKnownSymbolMap","createEnumKeyMap","GLOBAL_CONFIG_KEY","_globalCfg","_getGlobalValue","result","UNDEFINED","_getGlobalConfig","gbl","safe","_unwrapFunction","_unwrapFunctionWithPoly","funcName","clsProto","polyFunc","clsFn","NULL_VALUE","thisArg","theFunc","theArgs","ArrSlice","CALL","throwTypeError","asString","dumpObj","_unwrapProp","propName","mathMax","_pureRef","MathCls","strSlice","_unwrapFunction","StrProto","strSubstring","strSubstr","_unwrapFunctionWithPoly","polyStrSubstr","value","start","length","isNullOrUndefined","throwTypeError","dumpObj","EMPTY","LENGTH","isUndefined","strLeft","count","UNIQUE_REGISTRY_ID","_polySymbols","_globalSymbolRegistry","gblCfg","_getGlobalConfig","_wellKnownSymbolCache","polyNewSymbol","description","theSymbol","asString","SYMBOL","POLYFILL_TAG","polySymbolFor","key","registry","objHasOwn","newSymbol_1","regId_1","objKeys","TO_STRING","polyGetKnownSymbol","name","_wellKnownSymbolCache","result","knownName","_wellKnownSymbolMap","polyNewSymbol","SYMBOL","_globalLazyTestHooks","_initTestHooks","_getGlobalConfig","getLazy","cb","lazyValue","objDefineProp","createCachedValue","value","objDefineProp","WINDOW","_cachedGlobal","_getGlobalInstFn","getFn","theArgs","cachedValue","_globalLazyTestHooks","_initTestHooks","createCachedValue","safe","getGlobal","useCached","_globalLazyTestHooks","_initTestHooks","_cachedGlobal","createCachedValue","safe","_getGlobalValue","NULL_VALUE","getInst","name","gbl","WINDOW","hasDocument","getDocument","_getGlobalInstFn","hasWindow","getWindow","hasNavigator","getNavigator","hasHistory","getHistory","isNode","isWebWorker","_symbol","_symbolFor","_initSymbol","_symbol","createCachedValue","safe","getInst","SYMBOL","_getSymbolKey","key","gblSym","_globalLazyTestHooks","UNDEF_VALUE","hasSymbol","getSymbol","_globalLazyTestHooks","_initTestHooks","_symbol","_initSymbol","getKnownSymbol","name","noPoly","knownName","_wellKnownSymbolMap","sym","UNDEF_VALUE","polyGetKnownSymbol","newSymbol","description","NULL_VALUE","polyNewSymbol","symbolFor","key","_symbolFor","createCachedValue","safe","_getSymbolKey","polySymbolFor","isIterator","value","isFunction","isIterable","isStrictNullOrUndefined","getKnownSymbol","_iterSymbol$1","iterForOf","iter","callbackfn","thisArg","createCachedValue","NULL_VALUE","err","UNDEF_VALUE","iterResult","count","CALL","failed","fnApply","fn","argArray","arrAppend","target","elms","isUndefined","isArray","fnApply","isIterator","isIterable","iterForOf","elm","arrForEach","theArray","callbackfn","thisArg","len","LENGTH","idx","CALL","arrIndexOf","_unwrapFunction","ArrProto","arrMap","_unwrapFunction","ArrProto","arrSlice","theArray","start","end","NULL_VALUE","ArrSlice","CALL","arrReduce","_unwrapFunction","ArrProto","objCreate","_pureAssign","_pureRef","ObjClass","polyObjCreate","obj","type","OBJECT","FUNCTION","throwTypeError","dumpObj","tempFunc","PROTOTYPE","_isProtoArray","objSetPrototypeOf","proto","fn","d","b","_a","createCachedValue","__PROTO__","objForEachKey","key","value","_createCustomError","name","safe","objDefine","NAME","__","CONSTRUCTOR","NULL_VALUE","_setName","baseClass","createCustomError","constructCb","errorBase","theBaseClass","orgName","captureFn","_this","theArgs","_self","fnApply","ArrSlice","CALL","orgProto","objGetPrototypeOf","_unsupportedError","throwUnsupported","message","utcNow","polyUtcNow","_createTrimFn","exp","isNullOrUndefined","EMPTY","polyStrTrim","strTrim","_unwrapFunctionWithPoly","StrProto","polyStrTrim","_fnToString","_objCtrFnString","_gblWindow","isPlainObject","value","OBJECT","hasWindow","getWindow","result","PROTOTYPE","TO_STRING","CALL","ObjClass","proto","objGetPrototypeOf","objHasOwnProperty","CONSTRUCTOR","FUNCTION","_defaultDeepCopyHandler","details","plainObjDeepCopyHandler","defaultDeepCopyHandlers","arrayDeepCopyHandler","functionDeepCopyHandler","dateDeepCopyHandler","_getSetVisited","visitMap","source","newPath","cb","theEntry","arrForEach","entry","_deepCopy","ctx","key","userHandler","newCtx","theType","isPlain","isPrim","NULL_VALUE","isPrimitiveType","newKey","target","_copyProps","newEntry","objDefine","newValue","idx","handler","isNullOrUndefined","objCopyProps","objDeepCopy","isArray","isDate","_doExtend","theArgs","theArg","deepExtend","obj1","obj2","obj3","obj4","obj5","obj6","ArrSlice","objExtend","getLength","_unwrapProp","LENGTH","_perf","getPerformance","_globalLazyTestHooks","_initTestHooks","_perf","createCachedValue","safe","getInst","strSplit","_unwrapFunction","StrProto","setValueByKey","target","path","value","parts","strSplit","lastKey","arrForEach","key","isNullOrUndefined","strEndsWith","_unwrapFunctionWithPoly","StrProto","polyStrEndsWith","value","searchString","length","isString","throwTypeError","dumpObj","searchValue","asString","end","isUndefined","LENGTH","strSubstring","strIndexOf","_unwrapFunction","REF","UNREF","HAS_REF","ENABLED","_createTimerHandler","startTimer","refreshFn","cancelFn","ref","timerId","NULL_VALUE","theTimerHandler","_unref","_cancel","_refresh","_setEnabled","value","objDefineProp","_createTimeoutWith","overrideFn","theArgs","isArr","isArray","len","setFn","UNDEF_VALUE","clearFn","timerFn","handler","fnApply","ArrSlice","CALL","scheduleTimeout","callback","timeout","createTimeout","callback","timeout","_createTimeoutWith","UNDEF_VALUE","ArrSlice","CALL","_a","Constructor","Prototype","strFunction","DynInstFuncTable","DynProxyTag","DynClassName","DynClassNamePrefix","DynInstChkTag","DynAllowInstChkTag","DynProtoDefaultOptions","UnknownValue","str__Proto","DynProtoBaseProto","DynProtoGlobalSettings","DynProtoCurrent","strUseBaseInst","strSetInstFuncs","Obj","_objGetPrototypeOf","_objGetOwnProps","_gbl","getGlobal","_gblInst","_a","_isObjectOrArrayPrototype","target","_isObjectArrayOrFunctionPrototype","_getObjProto","newProto","curProto","objHasOwnProperty","_forEachProp","func","props","name_1","lp","_isDynamicCandidate","funcName","skipOwn","_throwTypeError","message","throwTypeError","_getInstanceFuncs","thisTarget","instFuncs","objCreate","name","_hasVisited","values","value","_getBaseFuncs","classProto","useBaseInst","_instFuncProxy","funcHost","theFunc","instFuncTable","baseFuncs","baseProto","visited","_getInstFunc","proto","currentDynProtoProxy","instFunc","canAddInst","objProto","protoFunc","_getProtoFunc","_populatePrototype","className","baseInstFuncs","setInstanceFunc","_createDynamicPrototype","dynProtoProxy","instFuncs_1","_checkPrototype","thisProto","_getObjName","unknownValue","dynamicProto","theClass","delegateFunc","options","perfOptions","strShimFunction","strShimObject","strShimUndefined","strShimPrototype","ObjClass","ObjProto","strShimPrototype","SymbolObj","getGlobal","ReflectObj","strHasOwnProperty","__objAssignFnImpl","t","s","i","p","ObjProto","__assignFn","objAssign","extendStaticsFn","d","b","ObjClass","__extendsFn","strShimFunction","throwTypeError","__","strShimPrototype","objCreate","__spreadArrayFn","to","from","i","il","j","createEnumStyle","createEnum","createValueMap","createTypeMap","ActiveStatus","createEnumStyle","_DYN_TO_LOWER_CASE","_DYN_BLK_VAL","_DYN_LENGTH","_DYN_RD_ONLY","_DYN_NOTIFY","_DYN_WARN_TO_CONSOLE","_DYN_THROW_INTERNAL","_DYN_SET_DF","_DYN_WATCH","_DYN_LOGGER","_DYN_APPLY","_DYN_PUSH","_DYN_SPLICE","_DYN_HDLR","_DYN_CANCEL","_DYN_INITIALIZE","_DYN_IDENTIFIER","_DYN_REMOVE_NOTIFICATION_0","_DYN_ADD_NOTIFICATION_LIS1","_DYN_IS_INITIALIZED","_DYN_INSTRUMENTATION_KEY","_DYN__INACTIVE","_DYN_VALUE","_DYN_GET_NOTIFY_MGR","_DYN_GET_PLUGIN","_DYN_NAME","_DYN_I_KEY","_DYN_TIME","_DYN_PROCESS_NEXT","_DYN_GET_PROCESS_TEL_CONT2","_DYN_POLL_INTERNAL_LOGS","_DYN_ENABLED","_DYN_STOP_POLLING_INTERNA3","_DYN_UNLOAD","_DYN_ON_COMPLETE","_DYN_VERSION","_DYN_LOGGING_LEVEL_CONSOL4","_DYN_CREATE_NEW","_DYN_TEARDOWN","_DYN_MESSAGE_ID","_DYN_MESSAGE","_DYN_IS_ASYNC","_DYN_DIAG_LOG","_DYN__DO_TEARDOWN","_DYN_UPDATE","_DYN_GET_NEXT","_DYN_SET_NEXT_PLUGIN","_DYN_PROTOCOL","_DYN_USER_AGENT","_DYN_SPLIT","_DYN_NODE_TYPE","_DYN_REPLACE","_DYN_LOG_INTERNAL_MESSAGE","_DYN_TYPE","_DYN_HANDLER","_DYN_STATUS","_DYN_GET_RESPONSE_HEADER","_DYN_GET_ALL_RESPONSE_HEA5","_DYN_IS_CHILD_EVT","_DYN_DATA","_DYN_GET_CTX","_DYN_SET_CTX","_DYN_COMPLETE","_DYN_ITEMS_RECEIVED","_DYN_URL_STRING","_DYN_SEND_POST","_DYN_HEADERS","_DYN_TIMEOUT","_DYN_SET_REQUEST_HEADER","_DYN_TRACE_ID","_DYN_SPAN_ID","_DYN_TRACE_FLAGS","_DYN_GET_ATTRIBUTE","aggregationErrorType","throwAggregationError","message","sourceErrors","createCustomError","self","args","_DYN_LENGTH","theMessage","arrForEach","srcError","idx","dumpObj","STR_PROMISE","REJECTED","doAwaitResponse","value","cb","doAwait","reason","resolveFn","rejectFn","finallyFn","result","isPromiseLike","err","doFinally","_debugState","_debugResult","_debugHandled","_promiseDebugEnabled","_addDebugState$1","thePromise","stateFn","resultFn","handledFn","props","objDefineProperties","STRING_STATES","REJECTED","DISPATCH_EVENT","_hasInitEvent","_hasInitEventFn","doc","evt","emitEvent","target","evtName","populateEvent","useNewEvent","getDocument","createCachedValue","safe","theEvt","handler","theConsole","getInst","dumpObj","NODE_UNHANDLED_REJECTION","UNHANDLED_REJECTION","_currentPromiseId","_uniquePromiseId","_unhandledRejectionTimeout","_hasPromiseRejectionEvent","dumpFnObj","value","isFunction","dumpObj","_createPromise","newPromise","processor","executor","additionalArgs","arrSlice","_state","_hasResolved","_settledValue","_queue","_id","_uniquePromiseId","_parentId","_currentPromiseId","_handled","_unHandledRejectionHandler","_thePromise","_then","onResolved","onRejected","thenPromise","resolve","reject","handler","value","isUndefined","isFunction","isPromiseLike","e","_processQueue","_catch","_finally","onFinally","thenFinally","catchFinally","reason","_strState","STRING_STATES","pending","_createSettleIfFn","newState","allowState","theValue","scheduleTimeout","_notifyUnhandledRejection","_unhandledRejectionTimeout","isNode","NODE_UNHANDLED_REJECTION","gbl","getWindow","getGlobal","_hasPromiseRejectionEvent","createCachedValue","safe","getInst","STR_PROMISE","emitEvent","UNHANDLED_REJECTION","theEvt","objDefine","objDefineProp","_promiseDebugEnabled","_addDebugState$1","objToString","hasSymbol","getKnownSymbol","_toString","dumpFnObj","throwTypeError","_rejectFn","_createAllPromise","input","values_1","pending_1","iterForOf","item","idx","doAwait","_createAllSettledPromise","newPromise","createCachedValue","input","additionalArgs","arrSlice","resolve","reject","values","pending","processItem","item","idx","doAwaitResponse","value","REJECTED","isArray","arrForEach","isIterable","iterForOf","throwTypeError","e","syncItemProcessor","pending","arrForEach","fn","timeoutItemProcessor","timeout","callbackTimeout","isNumber","scheduleTimeout","createAsyncPromise","executor","timeout","_createPromise","timeoutItemProcessor","_promiseCls","createNativePromise","executor","timeout","_promiseCls","createCachedValue","safe","getInst","STR_PROMISE","PrmCls","createAsyncPromise","isFunction","throwTypeError","dumpObj","_state","_strState","STRING_STATES","thePromise","resolve","reject","_resolve","value","_reject","reason","objDefineProp","_allSyncSettledCreator","createSyncPromise","executor","_createPromise","syncItemProcessor","createSyncAllSettledPromise","input","timeout","_allSyncSettledCreator","_createAllSettledPromise","createSyncPromise","_promiseCreator","createPromise","executor","timeout","_promiseCreator","createCachedValue","createNativePromise","createAllPromise","_createAllPromise","toStringTagSymbol","getKnownSymbol","UNDEFINED_VALUE","STR_EMPTY","STR_CHANNELS","STR_CORE","STR_CREATE_PERF_MGR","STR_DISABLED","STR_EXTENSION_CONFIG","STR_EXTENSIONS","STR_PROCESS_TELEMETRY","STR_PRIORITY","STR_EVENTS_SENT","STR_EVENTS_DISCARDED","STR_EVENTS_SEND_REQUEST","STR_PERF_EVENT","STR_OFFLINE_STORE","STR_OFFLINE_SENT","STR_OFFLINE_DROP","STR_GET_PERF_MGR","STR_DOMAIN","STR_PATH","STR_NOT_DYNAMIC_ERROR","strGetPrototypeOf","rCamelCase","rNormalizeInvalid","rLeadingNumeric","_getObjProto","isNotNullOrUndefined","value","isNullOrUndefined","normalizeJsName","name","isString","_DYN_REPLACE","rCamelCase","_all","letter","rNormalizeInvalid","rLeadingNumeric","match","strContains","search","strIndexOf","toISOString","date","getExceptionName","object","isError","_DYN_NAME","STR_EMPTY","setValue","target","field","value","valChk","srcChk","theValue","getSetValue","defValue","isNullOrUndefined","isUndefined","_createProxyFunction","source","funcName","srcFunc","src","isFunction","originalArguments","_DYN_APPLY","proxyAssign","chkSet","isObject","_loop_1","isString","objHasOwn","objDefine","proxyFunctionAs","name","theFunc","overwriteTarget","proxyFunctions","functionsToProxy","isArray","arrForEach","theFuncName","createClassFromInterface","defaults","class_1","_this","objForEachKey","optimizeObject","theObject","objAssign","ObjClass","objExtend","obj1","obj2","obj3","obj4","obj5","obj6","theArgs","extended","argLen","_DYN_LENGTH","deep","idx","isBoolean","arg","isArgArray","isArgObj","prop","propOk","newValue","isNewArray","isPlainObject","clone","isFeatureEnabled","feature","cfg","rlt","ft","mode","getResponseText","xhr","formatErrorMessageXdr","xdr","message","formatErrorMessageXhr","_DYN_STATUS","prependTransports","theTransports","newTransports","isNumber","isArray","strDisabledPropertyName","strWithCredentials","strTimeout","openXhr","method","urlString","withCredentials","disabled","isSync","timeout","_wrapSetXhrProp","prop","value","convertAllHeadersToMap","headersString","headers","isString","headersArray","strTrim","_DYN_SPLIT","arrForEach","headerEntry","idx","header","_DYN_TO_LOWER_CASE","_appendHeader","theHeaders","name","_DYN_GET_RESPONSE_HEADER","STR_KILL_DURATION_HEADER","STR_KILL_DURATION_SECONDS_HEADER","STR_TIME_DELTA_HEADER","_getAllResponseHeaders","isOneDs","_DYN_GET_ALL_RESPONSE_HEA5","strDocumentMode","strLocation","strConsole","strJSON","strCrypto","strMsCrypto","strReactNative","strMsie","strTrident","strXMLHttpRequest","_isTrident","_navUserAgentCheck","_enableMocks","_useXDomainRequest","_beaconsSupported","_hasProperty","theClass","property","supported","proto","strShimPrototype","tmp","isUndefined","getLocation","checkForMock","_enableMocks","mockLocation","getInst","strShimObject","strLocation","getConsole","strShimUndefined","strConsole","hasJSON","strJSON","getJSON","getCrypto","strCrypto","getMsCrypto","strMsCrypto","isReactNative","nav","getNavigator","strReactNative","isIE","_DYN_USER_AGENT","_navUserAgentCheck","_isTrident","userAgent","STR_EMPTY","_DYN_TO_LOWER_CASE","strContains","strMsie","strTrident","getIEVersion","userAgentStr","navigator_1","ua","doc","getDocument","_DYN_SPLIT","strDocumentMode","tridentVer","isBeaconsSupported","useCached","_beaconsSupported","hasNavigator","getNavigator","isFetchSupported","withKeepAlive","isSupported","getInst","request","_hasProperty","useXDomainRequest","_useXDomainRequest","strShimUndefined","isXhrSupported","strXMLHttpRequest","xmlHttpRequest","dispatchEvent","target","evnt","createCustomDomEvent","eventName","details","event","detail","isFunction","doc","getDocument","sendCustomEvent","evtName","cfg","customDetails","global","getGlobal","UInt32Mask","MaxUInt32","SEED1","SEED2","_mwcSeeded","_mwcW","_mwcZ","_mwcSeed","seedValue","_autoSeedMwc","now","utcNow","randomValue","maxValue","random32","signed","value","c","getCrypto","getMsCrypto","isIE","mwcRandom32","mwcRandom32","signed","_mwcZ","MaxUInt32","_mwcW","value","newId","maxLength","base64chars","number","random32","chars","result","STR_EMPTY","_DYN_LENGTH","version","instanceName","newId","_dataUid","_canAcceptData","target","_DYN_NODE_TYPE","_getCache","data","theCache","objDefine","createUniqueNamespace","name","includeVersion","normalizeJsName","STR_EMPTY","createElmNodeData","defValue","addDefault","_isConfigDefaults","value","isObject","objHasOwn","_getDefault","dynamicHandler","theConfig","cfgDefaults","defValue","isDefaultValid","isDefined","fallbacks","isArray","lp","_DYN_LENGTH","fallback","fbValue","asString","_resolveDefaultValue","theValue","newValue_1","isPlainObject","objForEachKey","key","_applyDefaultValue","name","defaultValue","isValid","setFn","mergeDf","reference","readOnly","blkDynamicValue","_DYN_RD_ONLY","_DYN_BLK_VAL","isUndefined","usingDefault","cfgValue","isNullOrUndefined","dfName","dfValue","CFG_HANDLER_LINK","symbolFor","BLOCK_DYNAMIC","FORCE_DYNAMIC","_cfgDeepCopy","source","target_1","isArray","_DYN_LENGTH","isPlainObject","objForEachKey","key","value","getDynamicConfigHandler","handler","blockDynamicConversion","_canMakeDynamic","getFunc","state","value","result","FORCE_DYNAMIC","BLOCK_DYNAMIC","isPlainObject","isArray","throwInvalidAccess","message","throwTypeError","arrayMethodsToPatch","_throwDynamicError","logger","name","desc","e","_DYN_THROW_INTERNAL","dumpObj","_patchArray","state","target","isArray","arrForEach","method","orgMethod","args","_i","result","_DYN_APPLY","_makeDynamicObject","_getOwnPropGetter","propDesc","objGetOwnPropertyDescriptor","_createDynamicProperty","theConfig","value","detail","handler","arrIndexOf","_DYN_PUSH","idx","_DYN_SPLICE","checkDynamic","isObjectOrArray","_getProperty","_canMakeDynamic","CFG_HANDLER_LINK","activeHandler","_setProperty","newValue","throwInvalidAccess","isReferenced","objForEachKey","key","UNDEFINED_VALUE","theValue","_setDynamicProperty","_DYN_LOGGER","getter","valueState","newIsObjectOrArray","objDefine","isDynamic","_setDynamicPropertyState","flags","inPlace","rdOnly","blkProp","blockDynamicConversion","objDefineProp","_DYN_HDLR","symPrefix","symPostfix","_createState","cfgHandler","_a","dynamicPropertySymbol","newSymbol","dynamicPropertyReadOnly","dynamicPropertyReferenced","dynamicPropertyBlockValue","dynamicPropertyDetail","_waitingHandlers","_watcherTimer","theState","_useHandler","activeHandler","callback","prevWatcher","arrForEach","detail","_DYN_SET_DF","_DYN_RD_ONLY","e","logger","_DYN_LOGGER","_DYN_THROW_INTERNAL","dumpObj","_notifyWatchers","notifyHandlers","_DYN_CANCEL","watcherFailures_1","handler","_DYN_PUSH","_DYN_LENGTH","throwAggregationError","_addWatcher","scheduleTimeout","idx","arrIndexOf","_trackHandler","details","_DYN_BLK_VAL","_DYN_HDLR","_DYN_NOTIFY","_createAndUseHandler","state","configHandler","handler","objDefine","_createDynamicHandler","logger","target","inPlace","_a","dynamicHandler","getDynamicConfigHandler","uid","createUniqueNamespace","newTarget","_cfgDeepCopy","theState","_notifyWatchers","_DYN_NOTIFY","_setValue","name","value","_setDynamicProperty","e","_throwDynamicError","_watch","_block","allowUpdate","details","prevUpd","isUndefined","_ref","_setDynamicPropertyState","_rdOnly","_blkPropValue","_applyDefaults","theConfig","defaultValues","objForEachKey","_applyDefaultValue","cfgHandler","_DYN_LOGGER","_DYN_SET_DF","_DYN_WATCH","_DYN_RD_ONLY","_DYN_BLK_VAL","_createState","_makeDynamicObject","_logInvalidAccess","message","_DYN_WARN_TO_CONSOLE","_DYN_THROW_INTERNAL","throwInvalidAccess","createDynamicConfig","config","defaultConfig","onConfigChange","CFG_HANDLER_LINK","STR_NOT_DYNAMIC_ERROR","dumpObj","runTargetUnload","target","isAsync","_DYN_UNLOAD","doUnloadAll","targets","done","result","createPromise","resolved","getLength","doAwaitResponse","arrSlice","ChannelControllerPriority","DisabledPropertyName","_stringToBoolOrDefault","theValue","defaultValue","theConfig","isNullOrUndefined","isBoolean","asString","_DYN_TO_LOWER_CASE","cfgDfMerge","cfgDfSet","setter","cfgDfValidate","validator","fallBackName","cfgDfBoolean","cfgDfString","defaultValue","isString","asString","STR_EMPTY","listenerFuncs","STR_EVENTS_SENT","STR_EVENTS_DISCARDED","STR_EVENTS_SEND_REQUEST","STR_PERF_EVENT","_aiNamespace","_debugListener","_listenerProxyFunc","name","config","args","dbgExt","getDebugExt","listener","_DYN_APPLY","_getExtensionNamespace","target","getInst","ns","getDebugListener","lp","_DYN_LENGTH","_a","STR_WARN_TO_CONSOLE","AiNonUserActionablePrefix","AiUserActionablePrefix","AIInternalMessagePrefix","defaultValues","_logFuncs","_sanitizeDiagnosticText","text","_DYN_REPLACE","STR_EMPTY","_logToConsole","func","message","theConsole","getConsole","logFunc","isFunction","_InternalLogMessage","msgId","msg","isUserAct","properties","_self","_DYN_MESSAGE_ID","_DYN_MESSAGE","strProps","hasJSON","getJSON","diagnosticText","safeGetLogger","core","config","_DYN_LOGGER","DiagnosticLogger","_messageCount","_messageLogged","_loggingLevelConsole","_loggingLevelTelemetry","_maxInternalMessageLimit","_enableDebug","_unloadHandler","dynamicProto","_self","_setDefaultsFromConfig","_DYN_THROW_INTERNAL","severity","msgId","msg","properties","isUserAct","message","_InternalLogMessage","dumpObj","logFunc","_logFuncs","STR_WARN_TO_CONSOLE","isUndefined","_DYN_MESSAGE","_debugExtMsg","messageKey","_DYN_MESSAGE_ID","_logInternalMessage","_logToConsole","_DYN_WARN_TO_CONSOLE","_DYN_LOG_INTERNAL_MESSAGE","_DYN_UNLOAD","isAsync","_areInternalMessagesThrottled","logMessage","AIInternalMessagePrefix","_DYN_PUSH","throttleLimitMessage","throttleMessage","onConfigChange","createDynamicConfig","defaultValues","details","_DYN_LOGGING_LEVEL_CONSOL4","name","data","dbgExt","getDebugExt","_DYN_DIAG_LOG","_getLogger","logger","DiagnosticLogger","_throwInternal","severity","msgId","msg","properties","isUserAct","_DYN_THROW_INTERNAL","_warnToConsole","message","_DYN_WARN_TO_CONSOLE","_logInternalMessage","_DYN_LOG_INTERNAL_MESSAGE","_a","_b","strToGMTString","strToUTCString","strCookie","strExpires","strIsCookieUseDisabled","strDisableCookiesUsage","strConfigCookieMgr","_supportsCookies","_allowUaSameSite","_parsedCookieValue","_doc","_cookieCache","_globalCookieConfig","rootDefaultConfig","cfgDfMerge","STR_DOMAIN","isNotNullOrUndefined","UNDEFINED_VALUE","_getDoc","getLazy","getDocument","_gblCookieMgr","config","logger","inst","createCookieMgr","_isMgrEnabled","cookieMgr","_isIgnoredCookie","cookieMgrCfg","name","isArray","arrIndexOf","_isBlockedCookie","_isCfgEnabled","rootConfig","cookieMgrConfig","isCfgEnabled","_DYN_ENABLED","isNullOrUndefined","cookieEnabled","isUndefined","safeGetCookieMgr","core","cookieCfg","_DYN_LOGGER","_path","_domain","unloadHandler","_enabled","_getCookieFn","_setCookieFn","_delCookieFn","createDynamicConfig","onConfigChange","details","_DYN_SET_DF","STR_PATH","_getCookieValue","_setCookieValue","enabled","areCookiesSupported","gblManager","value","maxAgeSec","domain","path","result","values","theValue","strTrim","STR_EMPTY","idx","strIndexOf","strLeft","_extractParts","strSubstring","setValue","isTruthy","_isIE","isIE","nowMs","utcNow","expireMs","expiry","_formatDate","location_1","getLocation","_DYN_PROTOCOL","uaDisallowsSameSiteNone","getNavigator","_DYN_USER_AGENT","_formatCookieValue","_DYN_UNLOAD","isAsync","doc","e","_throwInternal","getExceptionName","dumpObj","_DYN_LENGTH","parts","_DYN_SPLIT","arrForEach","thePart","theDate","func","isFunction","cookieValue","objForEachKey","theCookie","userAgent","isString","strContains","strEndsWith","defaultValues","_runScheduledListeners","asyncNotifications","callbacks","arrForEach","cb","safe","_runListeners","listeners","name","callback","listener","_DYN_PUSH","scheduleTimeout","NotificationManager","config","perfEvtsSendAll","unloadHandler","_listeners","_asyncNotifications","cfgHandler","createDynamicConfig","_DYN_WATCH","details","dynamicProto","_self","objDefine","_DYN_ADD_NOTIFICATION_LIS1","_DYN_REMOVE_NOTIFICATION_0","index","arrIndexOf","_DYN_SPLICE","STR_EVENTS_SENT","events","STR_EVENTS_DISCARDED","reason","STR_EVENTS_SEND_REQUEST","sendReason","isAsync","STR_PERF_EVENT","perfEvent","_DYN_IS_CHILD_EVT","_DYN_IS_ASYNC","STR_OFFLINE_STORE","_DYN_LENGTH","STR_OFFLINE_SENT","batch","_DYN_DATA","STR_OFFLINE_DROP","cnt","rn_1","_DYN_UNLOAD","_finishUnload","_DYN_CANCEL","waiting","asyncUnload","createPromise","resolve","doAwaitResponse","createAllPromise","strExecutionContextKey","strParentContextKey","strChildrenContextKey","_defaultPerfManager","PerfEvent","name","payloadDetails","isAsync","_self","utcNow","_DYN_NAME","_DYN_IS_ASYNC","_DYN_IS_CHILD_EVT","isFunction","theDetails_1","objDefine","_DYN_GET_CTX","key","_DYN_SET_CTX","value","ctx","_DYN_COMPLETE","childTime","childEvts","isArray","lp","_DYN_LENGTH","childEvt","_DYN_TIME","PerfManager","manager","dynamicProto","_self","src","payloadDetails","isAsync","PerfEvent","perfEvent","_DYN_COMPLETE","isFunction","STR_PERF_EVENT","_DYN_SET_CTX","key","value","ctx","strExecutionContextKey","_DYN_GET_CTX","doPerfActiveKey","doPerf","mgrSource","getSource","func","details","isAsync","perfMgr","STR_GET_PERF_MGR","perfEvt","currentActive","_DYN_GET_CTX","_DYN_SET_CTX","PerfEvent","strParentContextKey","children","strChildrenContextKey","_DYN_PUSH","ex","getGblPerfMgr","_defaultPerfManager","generateW3CId","hexValues","oct","STR_EMPTY","tmp","a","random32","clockSequenceHi","strSubstr","DEFAULT_VERSION","INVALID_VERSION","INVALID_TRACE_ID","INVALID_SPAN_ID","_isValid","value","len","invalidValue","_DYN_LENGTH","_formatValue","defValue","_formatFlags","result","createTraceParent","traceId","spanId","flags","version","_a","_DYN_VERSION","INVALID_VERSION","DEFAULT_VERSION","_DYN_TRACE_ID","isValidTraceId","generateW3CId","_DYN_SPAN_ID","isValidSpanId","strLeft","isValidTraceId","value","_isValid","INVALID_TRACE_ID","isValidSpanId","INVALID_SPAN_ID","formatTraceParent","value","flags","_formatFlags","_DYN_TRACE_FLAGS","_isValid","version","_DYN_VERSION","DEFAULT_VERSION","_formatValue","INVALID_TRACE_ID","INVALID_SPAN_ID","findAllScripts","doc","scripts","result","arrForEach","script","src","_DYN_GET_ATTRIBUTE","crossOrigin","async","defer","referrerPolicy","info","_DYN_PUSH","pluginStateData","createElmNodeData","_getPluginState","plugin","initializePlugins","processContext","extensions","initPlugins","lastPlugin","proxy","_DYN_GET_NEXT","pluginState","thePlugin","_DYN_GET_PLUGIN","_DYN_SET_NEXT_PLUGIN","STR_PROCESS_TELEMETRY","isInitialized","_DYN_IS_INITIALIZED","_DYN_PUSH","arrForEach","core","STR_CORE","_DYN_INITIALIZE","_DYN_TEARDOWN","sortPlugins","plugins","extA","extB","result","bHasProcess","STR_PRIORITY","createDistributedTraceContext","parentCtx","trace","_DYN_NAME","newValue","_DYN_TRACE_ID","isValidTraceId","_DYN_SPAN_ID","isValidSpanId","_DYN_TRACE_FLAGS","newTraceFlags","strTelemetryPluginChain","strHasRunFlags","strGetTelCtx","_chainId","_getNextProxyStart","proxy","core","startAt","_DYN_GET_PLUGIN","_DYN_GET_NEXT","createTelemetryProxyChain","_createInternalContext","telemetryChain","dynamicHandler","_nextProxy","_onComplete","createDynamicConfig","_DYN_LOGGER","context","_moveNext","safeGetLogger","_resolveExtCfg","_getConfig","nextPlugin","_iterateChain","_addOnComplete","onComplete","that","args","_i","_DYN_PUSH","isUndefined","nextProxy","_DYN_LENGTH","arrForEach","completeDetails","e","_throwInternal","dumpObj","_getExtCfg","identifier","createIfMissing","idCfg","cfg","extCfg","STR_EXTENSION_CONFIG","defaultValues","newConfig","objForEachKey","field","defaultValue","isNullOrUndefined","cfgValue","_applyDefaultValue","_DYN_SET_DF","theValue","extConfig","rootConfig","cb","plugin","createProcessTelemetryContext","config","internalContext","_processNext","env","STR_PROCESS_TELEMETRY","_createNew","plugins","isArray","_DYN_PROCESS_NEXT","_DYN_CREATE_NEW","createProcessTelemetryUnloadContext","unloadState","_DYN_UNLOAD","createProcessTelemetryUpdateContext","updateState","isFunction","_DYN_UPDATE","firstProxy","add","lastProxy_1","thePlugin","newProxy","createTelemetryPluginProxy","hasProcessTelemetry","hasSetNext","_DYN_SET_NEXT_PLUGIN","chainId","_DYN_IDENTIFIER","STR_PRIORITY","proxyChain","_processTelemetry","_unloadPlugin","_updatePlugin","_getTelCtx","itemCtx","_processChain","processPluginFn","name","details","isAsync","hasRun","hasRunContext","doPerf","STR_CORE","nextId","STR_EMPTY","error","hasNextRun","_DYN_DIAG_LOG","_callProcessTelemetry","pluginState","_getPluginState","_DYN_TEARDOWN","STR_DISABLED","unloadCtx","_callTeardown","pluginCore","_DYN_IS_INITIALIZED","_DYN_IS_ASYNC","updateCtx","_callUpdate","objFreeze","createUnloadHandlerContainer","handlers","_addHandler","handler","_DYN_PUSH","_runHandlers","unloadCtx","unloadState","arrForEach","e","_throwInternal","_DYN_DIAG_LOG","dumpObj","_maxHooks","_hookAddMonitor","createUnloadHookContainer","_hooks","_doUnload","logger","oldHooks","arrForEach","fn","e","_throwInternal","dumpObj","_maxHooks","_DYN_LENGTH","_hookAddMonitor","_addHook","hooks","arrAppend","_a","strGetPlugin","defaultValues","STR_EXTENSION_CONFIG","isNotNullOrUndefined","BaseTelemetryPlugin","_self","_isinitialized","_rootCtx","_nextPlugin","_unloadHandlerContainer","_hookContainer","_initDefaults","dynamicProto","_DYN_INITIALIZE","config","core","extensions","pluginChain","_setDefaults","_DYN_TEARDOWN","unloadCtx","unloadState","STR_CORE","result","unloadDone","theUnloadCtx","createProcessTelemetryUnloadContext","theUnloadState","_DYN_IS_ASYNC","_unloadCallback","_DYN_DIAG_LOG","_DYN_PROCESS_NEXT","_DYN__DO_TEARDOWN","_DYN_UPDATE","updateCtx","updateState","updateDone","theUpdateCtx","createProcessTelemetryUpdateContext","theUpdateState","_updateCallback","_DYN_GET_NEXT","proxyFunctionAs","objDefine","itemCtx","_getTelCtx","_DYN_IS_INITIALIZED","isInitialized","_DYN_SET_NEXT_PLUGIN","next","env","isFunction","STR_PROCESS_TELEMETRY","currentCtx","rootCtx","createProcessTelemetryContext","_DYN_CREATE_NEW","createDynamicConfig","safeGetLogger","_DYN_GET_PROCESS_TEL_CONT2","nextPlugin","createUnloadHookContainer","createUnloadHandlerContainer","_addInitializer","_initializers","id","telemetryInitializer","theInitializer","arrAppend","handler","arrForEach","initializer","idx","_DYN_SPLICE","_runInitializers","item","logger","doNotSendItem","telemetryInitializersCount","_DYN_LENGTH","i","_DYN_APPLY","e","_throwInternal","getExceptionName","dumpObj","TelemetryInitializerPlugin","_super","__extendsFn","_this","_id","_initDefaults","dynamicProto","_self","_base","STR_PROCESS_TELEMETRY","itemCtx","_DYN_DIAG_LOG","_DYN_PROCESS_NEXT","_DYN__DO_TEARDOWN","BaseTelemetryPlugin","_a","strValidationError","strNotificationManager","strSdkUnloadingError","strSdkNotInitialized","maxInitQueueSize","maxInitTimeout","defaultConfig","objDeepFreeze","STR_EXTENSIONS","STR_CHANNELS","STR_EXTENSION_CONFIG","STR_CREATE_PERF_MGR","UNDEFINED_VALUE","_createPerfManager","core","notificationMgr","PerfManager","_validateExtensions","logger","channelPriority","allExtensions","coreExtensions","channels","extPriorities","arrForEach","ext","isNullOrUndefined","_DYN_INITIALIZE","throwError","extPriority","STR_PRIORITY","identifier","_DYN_IDENTIFIER","_warnToConsole","_DYN_PUSH","STR_CORE","_isPluginPresent","thePlugin","plugins","exists","plugin","_deepMergeConfig","details","target","newValues","merge","objForEachKey","key","value","isPlainObject","_findWatcher","listeners","newWatcher","theListener","idx","listener","lp","_addDelayedCfgListener","fnd","_DYN_SPLICE","_registerDelayedCfgListener","config","unloadHdl","onConfigChange","_initDebugListener","configHandler","unloadContainer","notificationManager","debugListener","_DYN_WATCH","disableDbgExt","_DYN_REMOVE_NOTIFICATION_0","getDebugListener","_DYN_ADD_NOTIFICATION_LIS1","_createUnloadHook","unloadHook","objDefine","AppInsightsCore","_configHandler","_isInitialized","_logger","_eventQueue","_notificationManager","_perfManager","_cfgPerfManager","_cookieManager","_pluginChain","_configExtensions","_channelConfig","_channels","_isUnloading","_telemetryInitializerPlugin","_internalLogsEventName","_evtNamespace","_unloadHandlers","_hookContainer","_debugListener","_traceCtx","_instrumentationKey","_cfgListeners","_extensions","_pluginVersionStringArr","_pluginVersionString","_activeStatus","_endpoint","_initInMemoMaxSize","_isStatusSet","_initTimer","_internalLogPoller","_internalLogPollerListening","_forceStopInternalLogPoller","dynamicProto","_self","_initDefaults","_DYN_IS_INITIALIZED","extensions","createDynamicConfig","_DYN_LOGGER","_addUnloadHook","rootCfg","isPending","ikey","_DYN_INSTRUMENTATION_KEY","endpointUrl","ActiveStatus","_DYN__INACTIVE","msg","_throwInternal","_releaseQueues","promises","isPromiseLike","_DYN_LENGTH","initTimeout","isNotNullOrUndefined","allPromises","createSyncAllSettledPromise","scheduleTimeout","_setStatus","doAwaitResponse","response","values","_DYN_VALUE","ikeyRes","endpointRes","extCfg","_DYN_GET_NOTIFY_MGR","_initPerfManager","cfgExtensions","__spreadArrayFn","_initPluginChain","teeController","_DYN_GET_PLUGIN","controls","channel","objFreeze","telemetryItem","doPerf","STR_GET_PERF_MGR","_notifyInvalidEvent","_DYN_NAME","_DYN_I_KEY","_DYN_TIME","toISOString","_createTelCtx","_DYN_PROCESS_NEXT","_DYN_GET_PROCESS_TEL_CONT2","NotificationManager","createCookieMgr","cookieMgr","runTargetUnload","getGblPerfMgr","perfMgr","eventQueue","event","_DYN_POLL_INTERNAL_LOGS","eventName","_DYN_CANCEL","_startLogPoller","alwaysStart","_DYN_ENABLED","shouldStart","interval","isRunning","createTimeout","_flushInternalLogs","_DYN_STOP_POLLING_INTERNA3","proxyFunctions","_DYN_UNLOAD","isAsync","unloadComplete","cbTimeout","unloadState","_DYN_IS_ASYNC","result","createPromise","resolve","processUnloadCtx","createProcessTelemetryUnloadContext","_getPluginChain","_DYN_ON_COMPLETE","doUnloadAll","_doUnload","flushComplete","_flushChannels","_getPlugin","replaceExisting","addCb","_logOrThrowError","existingPlugin","updateState","_addPlugin","removed","removedPlugins_1","_removePlugins","newConfig","mergeExisting","deepExtend","cfg","theConfig","objHasOwn","_DYN_SET_DF","_DYN_NOTIFY","_doUpdate","createNew","createDistributedTraceContext","traceCtx","proxyFunctionAs","handler","hasDocument","_setPluginVersions","thePlugins","_addPluginVersions","_DYN_VERSION","ver","_DYN_LOGGING_LEVEL_CONSOL4","newValue","STR_EMPTY","DiagnosticLogger","newLogger","arrAppend","TelemetryInitializerPlugin","createUniqueNamespace","createUnloadHandlerContainer","createUnloadHookContainer","theCtx","createProcessTelemetryContext","theExtensions","ChannelControllerPriority","sortPlugins","rootCtx","initializePlugins","_DYN_CREATE_NEW","pluginIdentifier","theExt","channelHosts","host","enabled","_getPluginState","STR_DISABLED","pluginState","_DYN_TEARDOWN","removeCb","pluginsToRemove","arrIndexOf","createTelemetryProxyChain","removeComplete","unloadChain","unloadCtx","newConfigExtensions","newChannelConfig","queue","newQueue","logMessage","item","_DYN_MESSAGE_ID","_InternalLogMessage","_DYN_MESSAGE","callBack","sendReason","waiting","doneIterating","cbTimer","doCallback","flushCtx","handled_1","prevCfgPerfMgr","enablePerfMgr","createPerfMgr","getSetValue","isFunction","updateCtx","createProcessTelemetryUpdateContext","message","manager","STR_EVENTS_DISCARDED","hooks","parseResponse","response","diagLog","result","getJSON","_DYN_ITEMS_RECEIVED","_DYN_LENGTH","e","_throwInternal","_DYN_NAME","dumpObj","STR_EMPTY","STR_NO_RESPONSE_BODY","_noResponseQs","STR_POST_METHOD","SenderPostManager","_syncFetchPayload","_enableSendPromise","_isInitialized","_diagLog","_isOneDs","_onCompleteFuncs","_disableCredentials","_fetchCredentials","_fallbackInst","_disableXhr","_disableBeacon","_disableBeaconSync","_disableFetchKeepAlive","_addNoResponse","_timeoutWrapper","dynamicProto","_self","_base","_sendCredentials","_initDefaults","_DYN_INITIALIZE","config","diagLog","_throwInternal","_xhrSender","location_1","getLocation","_DYN_TO_LOWER_CASE","transports","sync","_DYN_LENGTH","_getSenderInterface","_DYN__DO_TEARDOWN","unloadCtx","unloadState","_onSuccess","res","onComplete","_doOnComplete","_onError","message","_onNoPayloadUrl","syncSupport","_a","transportType","sendPostFunc","lp","useXDomainRequest","_xdrSender","isXhrSupported","isFetchSupported","_doFetchSender","isBeaconsSupported","_beaconSender","_DYN_SEND_POST","oncomplete","status","headers","response","_doBeaconSend","payload","nav","getNavigator","url","_DYN_URL_STRING","data","_DYN_DATA","plainTextBatch","queued","onRetry","isFunction","e","_warnToConsole","dumpObj","thePromise","resolveFunc","rejectFunc","_DYN_HEADERS","createPromise","resolve","reject","endPointUrl","xhr","openXhr","_DYN_TIMEOUT","_DYN_SET_REQUEST_HEADER","arrForEach","objKeys","headerName","_doOnReadyFunc","onReadyFunc","onReadyFuncExist","getResponseText","_DYN_STATUS","_getAllResponseHeaders","event","formatErrorMessageXhr","batch","requestHeaders","batchLength","ignoreResponse","responseHandled","init","DisabledPropertyName","request","_handleError","_onFetchComplete","value","onCompleteFunc","doAwaitResponse","result","_DYN_MESSAGE","response_1","_DYN_VALUE","resp","_window","getWindow","xdr","onloadFunc","formatErrorMessageXdr","hostingProtocol","_DYN_PROTOCOL","endpoint","msg","endpointUrl","_DYN_REPLACE","strOnPrefix","strAttachEvent","strAddEventHelper","strDetachEvent","strRemoveEventListener","strEvents","strVisibilityChangeEvt","strPageHide","strUnload","strBeforeUnload","strPageHideNamespace","createUniqueNamespace","strPageShowNamespace","rRemoveEmptyNs","rRemoveTrailingEmptyNs","_guid","elmNodeData","createElmNodeData","eventNamespace","_normalizeNamespace","name","_DYN_REPLACE","STR_EMPTY","_getEvtNamespace","eventName","evtNamespace","_a","theNamespace_1","isArray","arrForEach","parsedEvent","_DYN_TYPE","_DYN_SPLIT","_getRegisteredEvents","target","evtName","addDefault","aiEvts","elmNodeData","strEvents","registeredEvents","_doDetach","obj","handlerRef","useCapture","_DYN_TYPE","strRemoveEventListener","strDetachEvent","strOnPrefix","_doAttach","result","strAddEventHelper","strAttachEvent","_doUnregister","events","unRegFn","idx","_DYN_LENGTH","theEvent","_DYN_HANDLER","_DYN_SPLICE","_unregisterEvents","eventCache","objForEachKey","evtType","objKeys","mergeEvtNamespace","theNamespace","namespaces","newNamespaces","isArray","_getEvtNamespace","_DYN_SPLIT","eventOn","eventName","evtNamespace","_a","registeredEvent","_guid","_DYN_PUSH","eventOff","evtName_1","found_1","regEvent","addEventHandler","eventName","callback","evtNamespace","result","w","getWindow","eventOn","doc","getDocument","removeEventHandler","eventOff","_addEventListeners","events","listener","excludeEvents","added","_DYN_LENGTH","arrForEach","name","arrIndexOf","addEventListeners","isArray","removeEventListeners","addPageUnloadEventListener","strBeforeUnload","strUnload","strPageHide","removePageUnloadEventListener","addPageHideEventListener","_handlePageVisibility","evt","newNamespaces","mergeEvtNamespace","strPageHideNamespace","pageUnloadAdded","strVisibilityChangeEvt","removePageHideEventListener","aiInstrumentHooks","cbNames","_arrLoop","arr","fn","lp","_DYN_LENGTH","_doCallbacks","hooks","callDetails","cbArgs","hookCtx","type","hook","idx","cbks","cb","ctx","_DYN_APPLY","err","orgEx","hookErrorCb","_createFunctionHook","aiHook","_a","funcThis","orgArgs","funcArgs","_DYN_NAME","_replaceArg","_createArgs","getInst","target","theArgs","arg","_DYN_PUSH","value","theFunc","_getOwner","name","checkPrototype","checkParentProto","owner","objHasOwnProperty","_getObjProto","InstrumentProto","funcName","callbacks","InstrumentFunc","strShimPrototype","_createInstrumentHook","owner","funcName","fn","callbacks","aiHook","aiInstrumentHooks","newFunc","_createFunctionHook","theHook","id","_arrLoop","hook","idx","_DYN_SPLICE","_DYN_PUSH","InstrumentFunc","target","checkPrototype","checkParentProto","_getOwner","strShimFunction","InstrumentEvent","target","evtName","callbacks","checkPrototype","checkParentProto","owner","_getOwner","_createInstrumentHook","DisabledPropertyName","SampleRate","ProcessLegacy","HttpMethod","DEFAULT_BREEZE_ENDPOINT","DEFAULT_BREEZE_PATH","strNotSpecified","strIkey","RequestHeaders","createValueMap","_DYN_SPLIT","_DYN_LENGTH","_DYN_TO_LOWER_CASE","_DYN_INGESTIONENDPOINT","_DYN_TO_STRING","_DYN_PUSH","_DYN_REMOVE_ITEM","_DYN_NAME","_DYN_MESSAGE","_DYN_COUNT","_DYN_PRE_TRIGGER_DATE","_DYN_DISABLED","_DYN_INTERVAL","_DYN_DAYS_OF_MONTH","_DYN_DATE","_DYN_GET_UTCDATE","_DYN_STRINGIFY","_DYN_PATHNAME","_DYN_CORRELATION_HEADER_E0","_DYN_EXCEPTIONS","_DYN_PARSED_STACK","_DYN_PROPERTIES","_DYN_MEASUREMENTS","_DYN_SIZE_IN_BYTES","_DYN_TYPE_NAME","_DYN_SEVERITY_LEVEL","_DYN_PROBLEM_GROUP","_DYN_IS_MANUAL","_DYN__CREATE_FROM_INTERFA1","_DYN_ASSEMBLY","_DYN_FILE_NAME","_DYN_HAS_FULL_STACK","_DYN_LEVEL","_DYN_METHOD","_DYN_LINE","_DYN_DURATION","_DYN_RECEIVED_RESPONSE","dataSanitizeKeyAndAddUniqueness","logger","key","map","origLength","_DYN_LENGTH","field","dataSanitizeKey","i","uniqueField","strSubstring","dsPadNumber","name","nameTrunc","strTrim","asString","_throwInternal","dataSanitizeString","value","maxLength","valueTrunc","dataSanitizeUrl","url","dataSanitizeInput","dataSanitizeMessage","message","messageTrunc","dataSanitizeException","exception","exceptionTrunc","dataSanitizeProperties","properties","tempProps_1","objForEachKey","prop","isObject","hasJSON","getJSON","_DYN_STRINGIFY","e","dataSanitizeMeasurements","measurements","tempMeasurements_1","measure","dataSanitizeId","id","_DYN_TO_STRING","input","_msgId","inputTrunc","num","s","strSubstr","_document","getDocument","_htmlAnchorIdx","_htmlAnchorElement","urlParseUrl","url","anchorIdx","anchorCache","tempAnchor","urlParseHost","_DYN_LENGTH","urlGetAbsoluteUrl","result","a","urlGetCompleteUrl","method","absoluteUrl","urlParseHost","url","inclPort","fullHost","urlParseFullHost","match","_DYN_LENGTH","isString","result","protocol","_DYN_TO_LOWER_CASE","port","_internalEndpoints","DEFAULT_BREEZE_ENDPOINT","DEFAULT_BREEZE_PATH","_correlationIdPrefix","isInternalApplicationInsightsEndpoint","endpointUrl","arrIndexOf","_DYN_TO_LOWER_CASE","correlationIdCanIncludeCorrelationHeader","config","requestUrl","currentHost","_DYN_CORRELATION_HEADER_E0","i","_DYN_LENGTH","requestHost","urlParseUrl","_DYN_TO_LOWER_CASE","strIndexOf","urlParseFullHost","includedDomains","matchExists_1","arrForEach","domain","regex","excludedDomains","correlationIdGetCorrelationContext","responseHeader","correlationId","correlationIdGetCorrelationContextValue","RequestHeaders","_correlationIdPrefix","key","keyValues","_DYN_SPLIT","keyValue","AjaxHelperParseDependencyPath","logger","absoluteUrl","method","commandName","target","name","data","parsedUrl","_DYN_PATHNAME","pathName","dataSanitizeString","dateTimeUtilsNow","perf","getPerformance","now","utcNow","dateTimeUtilsDuration","start","end","result","isNullOrUndefined","createDistributedTraceContextFromTrace","telemetryTrace","parentCtx","trace","_DYN_NAME","newValue","isValidTraceId","isValidSpanId","newTraceFlags","StorageType","createEnumStyle","DistributedTracingModes","EventPersistence","_canUseLocalStorage","_canUseSessionStorage","_storagePrefix","_getLocalStorageObject","utlCanUseLocalStorage","_getVerifiedStorageObject","StorageType","storageType","isNullOrUndefined","getGlobal","uid","_DYN_TO_STRING","storage","getInst","name_1","fail","_DYN_REMOVE_ITEM","_getSessionStorageObject","utlCanUseSessionStorage","utlDisableStorage","utlSetStoragePrefix","storagePrefix","utlEnableStorage","reset","utlGetLocalStorage","logger","name","e","_throwInternal","getExceptionName","dumpObj","utlSetLocalStorage","data","utlRemoveStorage","utlGetSessionStorage","logger","name","storage","_getSessionStorageObject","e","_canUseSessionStorage","_throwInternal","getExceptionName","dumpObj","utlSetSessionStorage","data","utlRemoveSessionStorage","_DYN_REMOVE_ITEM","THROTTLE_STORAGE_PREFIX","ThrottleMgr","core","namePrefix","_self","_canUseLocalStorage","_logger","_config","_localStorageObj","_isTriggered","_namePrefix","_queue","_isReady","_isSpecificDaysGiven","_initConfig","msgId","localObj","_getLocalStorageObjByKey","cfg","_getCfgByKey","_canThrottle","_isTrigger","queue","_getQueueByKey","_DYN_LENGTH","items","arrForEach","item","_flushMessage","_DYN_MESSAGE","result_1","objForEachKey","key","isFlushed","isReady","flushAll","isNullOrUndefined","msgID","message","severity","saveUnsentMsg","isSampledIn","_canSampledIn","localStorageObj","canThrottle","throttled","number","isTriggered","_DYN_COUNT","_DYN_PRE_TRIGGER_DATE","localStorageName","_getLocalStorageName","_resetLocalStorage","i","_sendMessage","_DYN_PUSH","safeGetLogger","_setCfgByKey","isNotNullOrUndefined","onConfigChange","details","coreConfig","utlCanUseLocalStorage","configMgr","config","_a","_b","curCfg","_DYN_DISABLED","configInterval","_DYN_INTERVAL","_getIntervalConfig","limit","interval","monthInterval","dayInterval","_DYN_DAYS_OF_MONTH","canUseLocalStorage","curDate","_getThrottleDate","date","_DYN_DATE","monthCheck","monthExpand","_checkInterval","dayCheck","arrIndexOf","_DYN_GET_UTCDATE","daySpan","msgKey","prefix","fix","_isTriggeredOnCurDate","preTriggerDate","_getLocalStorageObj","value","logger","storageName","storageObj","obj","curObj","dateStr","utlSetLocalStorage","strTrim","_DYN_STRINGIFY","start","current","_throwInternal","randomValue","utlGetLocalStorage","isTrigger","_FIELDS_SEPARATOR","_FIELD_KEY_VALUE_SEPARATOR","parseConnectionString","connectionString","kvPairs","_DYN_SPLIT","result","arrReduce","fields","kv","kvParts","_DYN_LENGTH","key","_DYN_TO_LOWER_CASE","value","objKeys","locationPrefix","_DYN_INGESTIONENDPOINT","DEFAULT_BREEZE_ENDPOINT","strEndsWith","Envelope","logger","data","name","_this","_self","_DYN_NAME","dataSanitizeString","strNotSpecified","toISOString","Event","logger","name","properties","measurements","_self","_DYN_NAME","dataSanitizeString","strNotSpecified","_DYN_PROPERTIES","dataSanitizeProperties","_DYN_MEASUREMENTS","dataSanitizeMeasurements","NoMethod","strError","strStack","strStackDetails","strErrorSrc","strMessage","strDescription","_stringify","value","convertToString","result","isString","_DYN_STRINGIFY","isFunction","_DYN_TO_STRING","_formatMessage","theEvent","errorType","evtMessage","strIndexOf","_isExceptionDetailsInternal","isObject","_isExceptionInternal","_isStackDetails","details","isArray","_convertStackObj","errorStack","src","items","_DYN_SPLIT","_getOperaStack","errorMessage","stack","lines","lp","_DYN_LENGTH","entry","_DYN_PUSH","_getStackFromErrorObj","errorObj","getWindow","_DYN_MESSAGE","e","_formatStackTrace","stackDetails","arrForEach","_parseStack","parsedStack","frames","level_1","totalSizeInBytes_1","frame","theFrame","_StackFrame","parsedFrame","_DYN_SIZE_IN_BYTES","exceptionParsedStackThreshold","left","right","size","acceptedLeft","acceptedRight","lSize","rSize","howMany","_getErrorType","typeName","_DYN_NAME","funcNameRegex","results","_formatErrorCode","Exception","logger","exception","properties","measurements","severityLevel","id","_self","_DYN_EXCEPTIONS","_DYN_PROPERTIES","_DYN_MEASUREMENTS","_DYN_SEVERITY_LEVEL","_DYN_PROBLEM_GROUP","isNullOrUndefined","_DYN_IS_MANUAL","_ExceptionDetails","dataSanitizeProperties","dataSanitizeMeasurements","message","url","lineNumber","columnNumber","error","evt","errorSrc","_a","_DYN_TYPE_NAME","exceptions","arrMap","ex","_DYN__CREATE_FROM_INTERFA1","exceptionData","__assignFn","_b","problemGroup","isManual","exceptionDetailsInterface","assembly","fileName","line","_DYN_HAS_FULL_STACK","_ExceptionDetails","logger","exception","properties","_self","_isExceptionDetailsInternal","_DYN_TYPE_NAME","_DYN_MESSAGE","strStack","_DYN_PARSED_STACK","_DYN_HAS_FULL_STACK","error","evt","isError","strError","dataSanitizeString","_getErrorType","strNotSpecified","dataSanitizeMessage","_formatMessage","stack","strStackDetails","_getStackFromErrorObj","_parseStack","isArray","arrMap","frame","_DYN_ASSEMBLY","_DYN_FILE_NAME","dataSanitizeException","_formatStackTrace","_DYN_LENGTH","_a","parsedStack","exceptionDetailsInterface","_StackFrame","_DYN__CREATE_FROM_INTERFA1","exceptionDetails","__assignFn","_StackFrame","sourceFrame","level","_self","_DYN_SIZE_IN_BYTES","frame","_DYN_LEVEL","_DYN_METHOD","NoMethod","_DYN_ASSEMBLY","strTrim","_DYN_FILE_NAME","_DYN_LINE","matches","_DYN_LENGTH","DataPoint","Metric","logger","name","value","count","min","max","stdDev","properties","measurements","_self","dataPoint","DataPoint","_DYN_COUNT","_DYN_NAME","dataSanitizeString","strNotSpecified","_DYN_PROPERTIES","dataSanitizeProperties","_DYN_MEASUREMENTS","dataSanitizeMeasurements","strEmpty","msToTimeSpan","totalms","ms","strEmpty","sec","min","hour","days","_DYN_LENGTH","isCrossOriginError","message","url","lineNumber","columnNumber","error","isString","PageView","logger","name","url","durationMs","properties","measurements","id","_self","dataSanitizeId","dataSanitizeUrl","_DYN_NAME","dataSanitizeString","strNotSpecified","_DYN_DURATION","msToTimeSpan","_DYN_PROPERTIES","dataSanitizeProperties","_DYN_MEASUREMENTS","dataSanitizeMeasurements","RemoteDependencyData","logger","id","absoluteUrl","commandName","value","success","resultCode","method","requestAPI","correlationContext","properties","measurements","_self","_DYN_DURATION","msToTimeSpan","dataSanitizeString","dependencyFields","AjaxHelperParseDependencyPath","dataSanitizeUrl","_DYN_NAME","_DYN_PROPERTIES","dataSanitizeProperties","_DYN_MEASUREMENTS","dataSanitizeMeasurements","Trace","logger","message","severityLevel","properties","measurements","_self","strNotSpecified","_DYN_MESSAGE","dataSanitizeMessage","_DYN_PROPERTIES","dataSanitizeProperties","_DYN_MEASUREMENTS","dataSanitizeMeasurements","_DYN_SEVERITY_LEVEL","PageViewPerformance","logger","name","url","unused","properties","measurements","cs4BaseData","_self","dataSanitizeUrl","_DYN_NAME","dataSanitizeString","strNotSpecified","_DYN_PROPERTIES","dataSanitizeProperties","_DYN_MEASUREMENTS","dataSanitizeMeasurements","_DYN_DURATION","_DYN_RECEIVED_RESPONSE","Data","baseType","data","SeverityLevel","createEnumStyle","_aiNameFunc","baseName","aiName","name","_aiApplication","_aiDevice","_aiLocation","_aiOperation","_aiSession","_aiUser","_aiCloud","_aiInternal","ContextTagKeys","_super","__extendsFn","createClassFromInterface","createTelemetryItem","item","baseType","envelopeName","logger","customProperties","systemProperties","_a","dataSanitizeString","strNotSpecified","isNullOrUndefined","throwError","iKey","strIkey","telemetryItem","_DYN_NAME","toISOString","objForEachKey","prop","value","TelemetryItemCreator","Extensions","CtxTagKeys","ContextTagKeys","createDomEvent","eventName","event","isFunction","doc","getDocument","_disableEvents","target","evtNamespace","eventOff","createOfflineListener","parentEvtNamespace","_document","getDocument","_navigator","getNavigator","_isListening","listenerList","rState","isNullOrUndefined","uState","_currentState","calCurrentState","_evtNamespace","mergeEvtNamespace","createUniqueNamespace","_enableEvents","getWindow","enabled","eventOn","_setOnline","_setOffline","_isOnline","listnerNoticeCheck","newState","arrForEach","callback","offlineState","setOnlineState","_unload","win","isUndefined","addListener","_DYN_PUSH","index","PropertiesPluginIdentifier","BreezeChannelIdentifier","AnalyticsPluginIdentifier","_DYN_TO_STRING","_DYN_IS_STORAGE_USE_DISAB0","_DYN__ADD_HOOK","_DYN_CORE","_DYN_DATA_TYPE","_DYN_ENVELOPE_TYPE","_DYN_DIAG_LOG","_DYN_TRACK","_DYN_TRACK_PAGE_VIEW","_DYN_TRACK_PREVIOUS_PAGE_1","_DYN_SEND_PAGE_VIEW_INTER2","_DYN_START_TIME","_DYN_PROPERTIES","_DYN_DURATION","_DYN_SEND_PAGE_VIEW_PERFO3","_DYN_POPULATE_PAGE_VIEW_P4","_DYN_HREF","_DYN_SEND_EXCEPTION_INTER5","_DYN_EXCEPTION","_DYN_ERROR","_DYN__ONERROR","_DYN_ERROR_SRC","_DYN_LINE_NUMBER","_DYN_COLUMN_NUMBER","_DYN_MESSAGE","_DYN__CREATE_AUTO_EXCEPTI6","_DYN_ADD_TELEMETRY_INITIA7","_DYN_OVERRIDE_PAGE_VIEW_D8","_DYN_AUTO_TRACK_PAGE_VISI9","_DYN_IS_BROWSER_LINK_TRAC10","_DYN_LENGTH","_DYN_ENABLE_AUTO_ROUTE_TR11","_DYN_ENABLE_UNHANDLED_PRO12","_DYN_AUTO_UNHANDLED_PROMI13","_DYN_GET_ENTRIES_BY_TYPE","_DYN_IS_PERFORMANCE_TIMIN14","_DYN_GET_PERFORMANCE_TIMI15","_DYN_NAVIGATION_START","_DYN_SHOULD_COLLECT_DURAT16","_DYN_IS_PERFORMANCE_TIMIN17","_DYN_RESPONSE_START","_DYN_REQUEST_START","_DYN_LOAD_EVENT_END","_DYN_RESPONSE_END","_DYN_CONNECT_END","_DYN_PAGE_VISIT_START_TIM18","PageViewManager","appInsights","overridePageViewDuration","core","pageViewPerformanceManager","dynamicProto","_self","queueTimer","itemQueue","pageViewPerformanceSent","firstPageViewSent","_logger","_flushChannels","isAsync","_startTimer","scheduleTimeout","allItems","doFlush","arrForEach","item","_DYN_LENGTH","_addQueue","cb","_DYN_TRACK_PAGE_VIEW","pageView","customProperties","name","isNullOrUndefined","doc","getDocument","uri","location_1","getLocation","_DYN_HREF","perf","getPerformance","navigationEntries","_DYN_GET_ENTRIES_BY_TYPE","isUndefined","loadEventStart","_DYN_START_TIME","duration_1","_DYN_PROPERTIES","_DYN_DURATION","_DYN_IS_PERFORMANCE_TIMIN14","_DYN_SEND_PAGE_VIEW_INTER2","isWebWorker","_throwInternal","pageViewSent","customDuration","start","_DYN_GET_PERFORMANCE_TIMI15","_DYN_NAVIGATION_START","dateTimeUtilsDuration","_DYN_SHOULD_COLLECT_DURAT16","duration","maxDurationLimit","processed","_DYN_IS_PERFORMANCE_TIMIN17","pageViewPerformance","_DYN_POPULATE_PAGE_VIEW_P4","_DYN_SEND_PAGE_VIEW_PERFO3","e","getExceptionName","dumpObj","unloadCtx","unloadState","doFlush_1","MAX_DURATION_ALLOWED","botAgentNames","_isPerformanceTimingSupported","perf","getPerformance","_isPerformanceNavigationTimingSupported","_DYN_LENGTH","_isPerformanceTimingDataReady","timing","_DYN_NAVIGATION_START","_DYN_RESPONSE_START","_DYN_REQUEST_START","_DYN_LOAD_EVENT_END","_DYN_RESPONSE_END","_DYN_CONNECT_END","_getPerformanceTiming","_getPerformanceNavigationTiming","_DYN_GET_ENTRIES_BY_TYPE","_shouldCollectDuration","durations","_i","_navigator","getNavigator","userAgent","isGoogleBot","i","strIndexOf","PageViewPerformanceManager","core","_logger","safeGetLogger","dynamicProto","_self","_DYN_POPULATE_PAGE_VIEW_P4","pageViewPerformance","navigationTiming","total","network","request","response","dom","_DYN_DURATION","_DYN_START_TIME","dateTimeUtilsDuration","_throwInternal","_DYN_SHOULD_COLLECT_DURAT16","msToTimeSpan","_DYN_GET_PERFORMANCE_TIMI15","_DYN_IS_PERFORMANCE_TIMIN14","_DYN_IS_PERFORMANCE_TIMIN17","PageVisitTimeManager","logger","pageVisitTimeTrackingHandler","prevPageVisitDataKeyName","dynamicProto","_self","_DYN_TRACK_PREVIOUS_PAGE_1","currentPageName","currentPageUrl","prevPageVisitTimeData","restartPageVisitTimer","e","_warnToConsole","dumpObj","pageName","pageUrl","prevPageVisitData","stopPageVisitTimer","utlCanUseSessionStorage","utlGetSessionStorage","throwError","currPageVisitDataStr","getJSON","PageVisitData","utlSetSessionStorage","pageVisitEndTime","utcNow","pageVisitDataJsonStr","hasJSON","_DYN_PAGE_VISIT_START_TIM18","utlRemoveSessionStorage","objDefine","PageVisitData","pageName","pageUrl","_DYN_PAGE_VISIT_START_TIM18","utcNow","Timing","logger","name","_self","_events","_throwInternal","url","properties","measurements","start","end","duration","dateTimeUtilsDuration","_a","strEvent","_dispatchEvent","target","evnt","_getReason","error","reason","isString","isFunction","_DYN_TO_STRING","dumpObj","MinMilliSeconds","defaultValues","objDeepFreeze","cfgDfSet","_chkConfigMilliseconds","cfgDfBoolean","_DYN_AUTO_TRACK_PAGE_VISI9","_DYN_OVERRIDE_PAGE_VIEW_D8","_DYN_ENABLE_UNHANDLED_PRO12","_DYN_AUTO_UNHANDLED_PROMI13","cfgDfValidate","_chkSampling","_DYN_IS_STORAGE_USE_DISAB0","_DYN_IS_BROWSER_LINK_TRAC10","_DYN_ENABLE_AUTO_ROUTE_TR11","cfgDfString","cfgDfMerge","value","defValue","_updateStorageUsage","extConfig","isUndefined","utlDisableStorage","utlEnableStorage","AnalyticsPlugin","_super","__extendsFn","_this","AnalyticsPluginIdentifier","_eventTracking","_pageTracking","_pageViewManager","_pageViewPerformanceManager","_pageVisitTimeManager","_preInitTelemetryInitializers","_isBrowserLinkTrackingEnabled","_browserLinkInitializerAdded","_enableAutoRouteTracking","_historyListenerAdded","_disableExceptionTracking","_autoExceptionInstrumented","_enableUnhandledPromiseRejectionTracking","_autoUnhandledPromiseInstrumented","_extConfig","_autoTrackPageVisitTime","_expCfg","_trackAjaxAttempts","_prevUri","_currUri","_evtNamespace","dynamicProto","_self","_base","_addHook","_DYN__ADD_HOOK","_initDefaults","safeGetCookieMgr","_DYN_CORE","env","itemCtx","event","customProperties","telemetryItem","createTelemetryItem","Event","_DYN_DATA_TYPE","_DYN_ENVELOPE_TYPE","_DYN_DIAG_LOG","_DYN_TRACK","e","_throwInternal","getExceptionName","name","properties","measurements","trace","Trace","metric","Metric","_DYN_TRACK_PAGE_VIEW","pageView","inPv","__assignFn","_DYN_TRACK_PREVIOUS_PAGE_1","_DYN_SEND_PAGE_VIEW_INTER2","systemProperties","doc","getDocument","isNullOrUndefined","_DYN_START_TIME","duration","_DYN_PROPERTIES","_DYN_DURATION","PageView","_DYN_SEND_PAGE_VIEW_PERFO3","pageViewPerformance","PageViewPerformance","inPvp","_DYN_POPULATE_PAGE_VIEW_P4","url","measurement","loc","getLocation","_DYN_HREF","_DYN_SEND_EXCEPTION_INTER5","exception","theError","_DYN_EXCEPTION","_DYN_ERROR","isError","strNotSpecified","exceptionPartB","Exception","scriptsInfo","findAllScripts","logs","isArray","_DYN__ONERROR","evt","_window","getWindow","errorSrc","_DYN_ERROR_SRC","_DYN_LINE_NUMBER","_DYN_COLUMN_NUMBER","_DYN_MESSAGE","isCrossOriginError","_sendCORSException","_DYN__CREATE_AUTO_EXCEPTI6","errorString","_DYN_ADD_TELEMETRY_INITIA7","telemetryInitializer","config","core","extensions","pluginChain","throwError","mergeEvtNamespace","createUniqueNamespace","arrForEach","initializer","_populateDefaults","PageViewPerformanceManager","PageViewManager","PageVisitTimeManager","pageName","pageUrl","pageVisitTime","trackPageVisitTime","Timing","pageViewItem","hasWindow","_updateExceptionTracking","_updateLocationChange","unloadCtx","unloadState","eventOff","identifier","onConfigChange","ctx","createProcessTelemetryContext","utlSetStoragePrefix","_addDefaultTelemetryInitializers","browserLinkPaths_1","dropBrowserLinkRequests","envelope","RemoteDependencyData","remoteData","i","_DYN_LENGTH","strIndexOf","locn","InstrumentEvent","callDetails","message","lineNumber","columnNumber","_addUnhandledPromiseRejectionTracking","win","hasHistory","_history","getHistory","strShimUndefined","_addHistoryListener","_getDistributedTraceCtx","distributedTraceCtx","PropertiesPluginIdentifier","context","createDistributedTraceContextFromTrace","history","namePrefix","_popstateHandler","createDomEvent","_locationChangeHandler","generateW3CId","traceLocationName","dataSanitizeString","scheduleTimeout","uri","eventOn","_location","severity","msgId","msg","isUserAct","location","objDefine","BaseTelemetryPlugin","_DYN_FEATURE_OPT_IN","_DYN_ON_CFG_CHANGE_RECEIV0","_DYN_NON_OVERRIDE_CONFIGS","_DYN_SCHEDULE_FETCH_TIMEO1","replaceByNonOverrideCfg","cfg","nonOverrideConfigs","curLevel","maxLevel","exceedMaxLevel","curCfg_1","objExtend","objForEachKey","key","nonOverrideVal","isObject","F","M","ON","OFF","resolveCdnFeatureCfg","field","cdnCfg","userOptInDetails","_a","cdnFt","_DYN_FEATURE_OPT_IN","cdnM","cdnOnV","cdnOffV","userFt","userM","userOnV","userOffV","blockCdn","mFld","onFld","offFld","mode","onV","offV","applyCdnfeatureCfg","core","optInMap","cdnConfig_1","featureVal","isNullOrUndefined","config","val","setValueByKey","_overrideCdnCfgByFeature","ftVal","dVal","target","_a","EVENT_NAME","STR_GET_METHOD","FETCH_TIMEOUT","udfVal","defaultNonOverrideCfg","_defaultConfig","objDeepFreeze","_DYN_ON_CFG_CHANGE_RECEIV0","_DYN_SCHEDULE_FETCH_TIMEO1","_DYN_NON_OVERRIDE_CONFIGS","CfgSyncPlugin","_super","__extendsFn","_this","_extensionConfig","_mainConfig","_evtName","_evtNamespace","_cfgUrl","_timeoutHandle","_receiveChanges","_broadcastChanges","_blkCdnCfg","_fetchTimeout","_retryCnt","_onCfgChangeReceive","_nonOverrideConfigs","_fetchFn","_overrideFetchFn","_overrideSyncFn","_paused","dynamicProto","_self","_base","_initDefaults","config","core","extensions","pluginChain","mergeEvtNamespace","createUniqueNamespace","_populateDefaults","_clearScheduledTimer","_setupTimer","_setCfg","customDetails","_sendCfgsyncEvents","eventName","_updateEventListenerName","unloadCtx","unloadState","_eventOff","identifier","onConfigChange","ctx","createProcessTelemetryContext","preBlkCdn","isNullOrUndefined","_onFetchComplete","newEvtName","_getFetchFnInterface","isAutoSync","global_1","getGlobal","eventOff","isFunction","sendCustomEvent","name","_addEventListener","isFetchSupported","_fetchSender","isXhrSupported","_xhrSender","url","oncomplete","global","fetchFn","init","request","doAwaitResponse","result","response","_doOnComplete","res","xhr_1","status","JSON_1","getJSON","cdnCfg","cfg","applyCdnfeatureCfg","newCfg","isPlainObject","_replaceTartgetByKeys","global_2","eventOn","event","cfgEvent","level","_cfg","replaceByNonOverrideCfg","scheduleTimeout","env","itemCtx","BaseTelemetryPlugin","STR_DURATION","_DYN_TAGS","_DYN_DEVICE_TYPE","_DYN_DATA","_DYN_NAME","_DYN_TRACE_ID","_DYN_LENGTH","_DYN_STRINGIFY","_DYN_MEASUREMENTS","_DYN_DATA_TYPE","_DYN_ENVELOPE_TYPE","_DYN_TO_STRING","_DYN__GET","_DYN_ENQUEUE","_DYN_COUNT","_DYN_EVENTS_LIMIT_IN_MEM","_DYN_PUSH","_DYN_ITEM","_DYN_EMIT_LINE_DELIMITED_0","_DYN_CLEAR","_DYN_CREATE_NEW","_DYN_MARK_AS_SENT","_DYN_CLEAR_SENT","_DYN_BUFFER_OVERRIDE","_DYN__BUFFER__KEY","_DYN__SENT__BUFFER__KEY","_DYN_CONCAT","_DYN__MAX__BUFFER__SIZE","_DYN_TRIGGER_SEND","_DYN_DIAG_LOG","_DYN_INITIALIZE","_DYN__SENDER","_DYN_ENDPOINT_URL","_DYN_INSTRUMENTATION_KEY","_DYN_CUSTOM_HEADERS","_DYN_MAX_BATCH_SIZE_IN_BY1","_DYN_ONUNLOAD_DISABLE_BEA2","_DYN_IS_BEACON_API_DISABL3","_DYN_ALWAYS_USE_XHR_OVERR4","_DYN_DISABLE_XHR","_DYN_ENABLE_SESSION_STORA5","_DYN__BUFFER","_DYN_ONUNLOAD_DISABLE_FET6","_DYN_DISABLE_SEND_BEACON_7","_DYN_ENABLE_SEND_PROMISE","_DYN_GET_SENDER_INST","_DYN_UNLOAD_TRANSPORTS","_DYN_CONVERT_UNDEFINED","_DYN_MAX_BATCH_INTERVAL","_DYN_SERIALIZE","_DYN__ON_ERROR","_DYN__ON_PARTIAL_SUCCESS","_DYN__ON_SUCCESS","_DYN_ITEMS_RECEIVED","_DYN_ITEMS_ACCEPTED","_DYN_ORI_PAYLOAD","_DYN_BASE_TYPE","_DYN_SAMPLE_RATE","_DYN_EVENTS_SEND_REQUEST","_DYN_GET_SAMPLING_SCORE","_DYN_GET_HASH_CODE_SCORE","strBaseType","strBaseData","strProperties","strTrue","_setValueIf","target","field","value","setValue","isTruthy","_extractPartAExtensions","logger","item","env","envTags","_DYN_TAGS","itmExt","itmTags","extUser","CtxTagKeys","extApp","extDevice","_DYN_DEVICE_TYPE","web","envData","_DYN_DATA","envBaseData","envProps","extOs","_DYN_NAME","extTrace","dataSanitizeString","_DYN_TRACE_ID","tgs","i","_DYN_LENGTH","tg","objForEachKey","key","theTags","__assignFn","EnvelopeCreator","optimizeObject","_extractPropsAndMeasurements","data","properties","measurements","isNullOrUndefined","isNumber","isString","hasJSON","getJSON","_DYN_STRINGIFY","_convertPropsUndefinedToCustomDefinedValue","customUndefinedValue","_createEnvelope","envelopeType","telemetryItem","envelope","Envelope","SampleRate","toISOString","iKeyNoDashes","EnvelopeCreatorInit","_throwInternal","DependencyEnvelopeCreator","customMeasurements","_DYN_MEASUREMENTS","customProperties","bd","_warnToConsole","method","HttpMethod","remoteDepData","RemoteDependencyData","STR_DURATION","Data","_DYN_DATA_TYPE","_DYN_ENVELOPE_TYPE","EventEnvelopeCreator","Event","eventName","eventData","ExceptionEnvelopeCreator","exData","Exception","MetricEnvelopeCreator","baseData","props","baseMetricData","Metric","PageViewEnvelopeCreator","duration","currentContextId","id","name","url","_DYN_TO_STRING","pageTags","pageViewData","PageView","PageViewPerformanceEnvelopeCreator","PageViewPerformance","TraceEnvelopeCreator","message","severityLevel","Trace","BaseSendBuffer","logger","config","_buffer","_bufferFullMessageSent","_maxRetryCnt","_DYN__GET","buffer","dynamicProto","_self","_DYN_ENQUEUE","payload","_DYN_COUNT","_DYN_EVENTS_LIMIT_IN_MEM","_throwInternal","isNullOrUndefined","_DYN_PUSH","_DYN_LENGTH","size","lp","_DYN_EMIT_LINE_DELIMITED_0","_DYN_CLEAR","payloads","payloadStr_1","arrForEach","_DYN_ITEM","batch","_DYN_CREATE_NEW","newLogger","newConfig","canUseSessionStorage","items","newBuffer","SessionStorageSendBuffer","ArraySendBuffer","_super","__extendsFn","_this","_base","_DYN_MARK_AS_SENT","_DYN_CLEAR_SENT","PREVIOUS_KEYS","SessionStorageSendBuffer","_super","__extendsFn","logger","config","_this","_bufferFullMessageSent","_namePrefix","_b","_DYN_BUFFER_OVERRIDE","utlGetSessionStorage","utlSetSessionStorage","getItem","setItem","_maxRetryCnt","dynamicProto","_self","_base","bufferItems","_getBuffer","_DYN__BUFFER__KEY","itemsInSentBuffer","_DYN__SENT__BUFFER__KEY","previousItems","_getPreviousEvents","notDeliveredItems","_DYN_CONCAT","buffer","_DYN_LENGTH","_DYN__MAX__BUFFER__SIZE","_setBuffer","_DYN_ENQUEUE","payload","_DYN_COUNT","_throwInternal","isNullOrUndefined","_DYN__GET","_DYN_CLEAR","_DYN_MARK_AS_SENT","_removePayloadsFromBuffer","sentElements","_DYN_CLEAR_SENT","_DYN_CREATE_NEW","newLogger","newConfig","canUseSessionStorage","unsentItems","sentItems","newBuffer","ArraySendBuffer","arrForEach","payloads","remaining","payloadStr","_DYN_PUSH","_DYN_ITEM","value","isFunction","arrIndexOf","key","prefixedKey","_getBufferBase","bufferJson","buffer_1","getJSON","isString","isArray","e","getExceptionName","dumpObj","_DYN_STRINGIFY","items","events","_getItemsFromPreviousKey","prefixEvents","transFormedItems_1","item","internalItem","utlRemoveSessionStorage","_a","BaseSendBuffer","Serializer","logger","dynamicProto","_self","_DYN_SERIALIZE","input","output","_serializeObject","getJSON","_DYN_STRINGIFY","e","_throwInternal","isFunction","_DYN_TO_STRING","source","name","circularReferenceCheck","_serializeStringMap","isArray","_serializeArray","objForEachKey","field","contract","isRequired","isHidden","isPresent","isObj","isObject","value","sources","i","_DYN_LENGTH","item","_DYN_PUSH","map","expectedType","num","MIN_INPUT_LENGTH","HashCodeScoreGenerator","key","score","input","_DYN_LENGTH","_DYN_CONCAT","hash","i","SamplingScoreGenerator","_self","hashCodeGenerator","HashCodeScoreGenerator","keys","ContextTagKeys","_DYN_GET_SAMPLING_SCORE","item","score","_DYN_TAGS","_DYN_GET_HASH_CODE_SCORE","_DYN_TRACE_ID","Sample","sampleRate","logger","_logger","safeGetLogger","_DYN_SAMPLE_RATE","SamplingScoreGenerator","envelope","samplingPercentage","isSampledIn","Metric","_DYN_DATA_TYPE","_DYN_GET_SAMPLING_SCORE","_a","_b","UNDEFINED_VALUE","EMPTY_STR","FetchSyncRequestSizeLimitBytes","_getResponseText","xhr","isOverrideFn","httpXHROverride","defaultAppInsightsChannelConfig","objDeepFreeze","cfgDfValidate","isTruthy","DEFAULT_BREEZE_ENDPOINT","DEFAULT_BREEZE_PATH","_DYN_EMIT_LINE_DELIMITED_0","cfgDfBoolean","_DYN_MAX_BATCH_INTERVAL","_DYN_MAX_BATCH_SIZE_IN_BY1","_DYN_ENABLE_SESSION_STORA5","_DYN_IS_BEACON_API_DISABL3","_DYN_DISABLE_SEND_BEACON_7","_DYN_DISABLE_XHR","_DYN_ONUNLOAD_DISABLE_FET6","_DYN_ONUNLOAD_DISABLE_BEA2","_DYN_INSTRUMENTATION_KEY","_chkSampling","_DYN_CUSTOM_HEADERS","_DYN_CONVERT_UNDEFINED","_DYN_EVENTS_LIMIT_IN_MEM","_DYN_BUFFER_OVERRIDE","_DYN_ALWAYS_USE_XHR_OVERR4","isNumber","value","EnvelopeTypeCreator","Event","EventEnvelopeCreator","Trace","TraceEnvelopeCreator","PageView","PageViewEnvelopeCreator","PageViewPerformance","PageViewPerformanceEnvelopeCreator","Exception","ExceptionEnvelopeCreator","Metric","MetricEnvelopeCreator","RemoteDependencyData","DependencyEnvelopeCreator","Sender","_super","__extendsFn","_this","BreezeChannelIdentifier","_consecutiveErrors","_retryAt","_lastSend","_paused","_timeoutHandle","_serializer","_stamp_specific_redirects","_headers","_syncFetchPayload","_syncUnloadSender","_offlineListener","_evtNamespace","_endpointUrl","_orgEndpointUrl","_maxBatchSizeInBytes","_beaconSupported","_beaconOnUnloadSupported","_beaconNormalSupported","_customHeaders","_disableTelemetry","_instrumentationKey","_convertUndefined","_isRetryDisabled","_maxBatchInterval","_sessionStorageUsed","_bufferOverrideUsed","_namePrefix","_enableSendPromise","_alwaysUseCustomSend","_disableXhr","_fetchKeepAlive","_xhrSend","_fallbackSend","_disableBeaconSplit","_sendPostMgr","_retryCodes","dynamicProto","_self","_base","_initDefaults","_clearScheduledTimer","_checkMaxSize","_setupTimer","isAsync","callBack","sendReason","_DYN_TRIGGER_SEND","e","_throwInternal","_DYN_DIAG_LOG","getExceptionName","dumpObj","_doUnloadSend","name","_DYN_INITIALIZE","config","core","extensions","pluginChain","identifier","Serializer","_DYN__SENDER","diagLog","mergeEvtNamespace","createUniqueNamespace","createOfflineListener","onConfigChange","details","utlSetStoragePrefix","ctx","createProcessTelemetryContext","senderConfig","curExtUrl","_DYN_ENDPOINT_URL","coreUrl","isPromiseLike","objDefine","ActiveStatus","arrForEach","customHeader","isBeaconsSupported","bufferOverride","canUseSessionStorage","utlCanUseSessionStorage","namePrefix","shouldUpdate","_DYN__BUFFER","_DYN_CREATE_NEW","SessionStorageSendBuffer","ArraySendBuffer","isFetchSupported","Sample","_validateInstrumentationKey","isString","isInternalApplicationInsightsEndpoint","_DYN_LENGTH","_DYN_ENABLE_SEND_PROMISE","sendPostConfig","_getSendPostMgrConfig","SenderPostManager","customInterface","httpInterface","syncInterface","theTransports","prependTransports","_DYN_GET_SENDER_INST","xhrInterface","payload","_doSend","_fetchKeepAliveSender","syncTransports","_DYN_UNLOAD_TRANSPORTS","transport","telemetryItem","itemCtx","diagLogger","isValidate","_validate","aiEnvelope","_getEnvelope","_DYN_SERIALIZE","buffer","payloadItem","_DYN_ITEM","_DYN_ENQUEUE","_DYN_COUNT","countOfItemsInPayload","_isStringArr","_xhrReadyStateChange","async","forcedSender","result","_DYN_CLEAR","_notifySendRequest","ieVer","getIEVersion","_createPayload","_serialize","_batch","evt","unloadCtx","unloadState","runTargetUnload","_DYN__ON_ERROR","message","event","_onError","_DYN__ON_PARTIAL_SUCCESS","results","_onPartialSuccess","_DYN__ON_SUCCESS","_onSuccess","xdr","_xdrOnLoad","responseText","parseResponse","_DYN_ITEMS_RECEIVED","_DYN_ITEMS_ACCEPTED","formatErrorMessageXdr","onCompleteFuncs","oncomplete","data","_getPayloadArr","response","onComplete","resValue","_checkResponsStatus","request","canSend","_onBeaconRetry","formatErrorMessageXhr","_DYN_CLEAR_SENT","failed","retry","errors","_i","errors_1","error","extracted","_isRetriable","_DYN_PUSH","_resendPayload","internalPayload","arr","_DYN_ORI_PAYLOAD","_DYN_BASE_TYPE","_isSampledIn","SampleRate","_DYN_SAMPLE_RATE","defaultEnvelopeIkey","doNotSendItem","_DYN_TAGS","ProcessLegacy","_warnToConsole","item","rlt","valid","envelope","headers","_getHeaders","_DYN_DATA","_getOnComplete","status","sendInterface","markAsSent","payloadData","_getPayload","sendPostFunc","_DYN_MARK_AS_SENT","isArray","batch","RequestHeaders","incomingPayload","incomingSize","responseUrl","errorMessage","res","_checkAndUpdateEndPointUrl","offlineBackOffMultiplier","isNullOrUndefined","beaconInst","droppedPayload","lp","thePayload","payloadSize","syncFetchPayload","inst","linearFactor","payload_1","_setRetryTime","SlotDelayInSeconds","delayInSeconds","backOffSlot","backOffDelay","retryAfterTimeSpan","utcNow","retryInterval","timerValue","scheduleTimeout","statusCode","_getNotifyMgr","func","sendRequest","manager","_DYN_EVENTS_SEND_REQUEST","instrumentationKey","disableValidation","disableIKeyValidationFlag","UUID_Regex","regexp","objExtend","orig","iKey","logger","convertUndefined","__assignFn","creator","BaseTelemetryPlugin","STR_DURATION","STR_PROPERTIES","_DYN_REQUEST_URL","_DYN_INST","_DYN_LENGTH","_DYN_TRACE_ID","_DYN_SPAN_ID","_DYN_TRACE_FLAGS","_DYN_CONTEXT","_DYN_ABORTED","_DYN_TRACE_ID0","_DYN_SPAN_ID1","_DYN__ADD_HOOK","_DYN_CORE","_DYN_INCLUDE_CORRELATION_2","_DYN_GET_ABSOLUTE_URL","_DYN_HEADERS","_DYN_REQUEST_HEADERS","_DYN_SET_REQUEST_HEADER","_DYN_TRACK_DEPENDENCY_DAT3","_DYN_START_TIME","_DYN_TO_LOWER_CASE","_DYN_ENABLE_REQUEST_HEADE4","_DYN_ENABLE_AJAX_ERROR_ST5","_DYN_ENABLE_AJAX_PERF_TRA6","_DYN_MAX_AJAX_CALLS_PER_V7","_DYN_EXCLUDE_REQUEST_FROM8","_DYN_ADD_REQUEST_CONTEXT","_DYN_DISABLE_AJAX_TRACKIN9","_DYN_AJAX_PERF_LOOKUP_DEL10","_DYN_DISABLE_FETCH_TRACKI11","_DYN_ENABLE_RESPONSE_HEAD12","_DYN_STATUS","_DYN_STATUS_TEXT","_DYN_HEADER_MAP","_DYN_OPEN_DONE","_DYN_SEND_DONE","_DYN_REQUEST_SENT_TIME","_DYN_ABORT_DONE","_DYN_GET_TRACE_ID","_DYN_GET_TRACE_FLAGS","_DYN_METHOD","_DYN_ERROR_STATUS_TEXT","_DYN_STATE_CHANGE_ATTACHE13","_DYN_RESPONSE_TEXT","_DYN_RESPONSE_FINISHED_TI14","_DYN__CREATE_TRACK_ITEM","_DYN_RESPONSE","_DYN_GET_ALL_RESPONSE_HEA15","_DYN_GET_PART_APROPS","_DYN_PERF_MARK","_DYN_NAME","_DYN_PERF_TIMING","_DYN_EXCEPTION","_DYN_AJAX_DIAGNOSTICS_MES16","_DYN_CORRELATION_CONTEXT","_DYN_AJAX_TOTAL_DURATION","_DYN_EVENT_TRACE_CTX","_calcPerfDuration","resourceEntry","start","end","result","from","to","dateTimeUtilsDuration","_setPerfDuration","props","name","value","_setPerfValue","msToTimeSpan","strPerf","perfData","_populatePerfData","ajaxData","dependency","_DYN_PERF_TIMING","STR_PROPERTIES","propsSet","strName","strStart","strEnd","strDomainLookup","strConnect","strRedirect","strRequest","strResponse","strStartTime","strDomainLookupStart","strDomainLookupEnd","strConnectStart","strConnectEnd","strRequestStart","strRequestEnd","strResponseStart","strResponseEnd","strRedirectStart","strRedirectEnd","strTransferSize","strEncodedBodySize","strDecodedBodySize","strServerTiming","duration","STR_DURATION","serverTiming","server_1","arrForEach","idx","normalizeJsName","newValue","objForEachKey","key","val","isString","isNumber","_DYN_PERF_MARK","XHRMonitoringState","self","_DYN_OPEN_DONE","_DYN_SEND_DONE","_DYN_ABORT_DONE","_DYN_STATE_CHANGE_ATTACHE13","ajaxRecord","traceId","spanId","logger","traceCtx","_a","self","_logger","strResponseText","_DYN_PERF_MARK","_DYN_REQUEST_HEADERS","_DYN_AJAX_TOTAL_DURATION","_DYN_ABORTED","_DYN_REQUEST_URL","_DYN_METHOD","_DYN_STATUS","_DYN_REQUEST_SENT_TIME","_DYN_RESPONSE_FINISHED_TI14","XHRMonitoringState","_DYN_TRACE_ID","_DYN_SPAN_ID","_DYN_TRACE_FLAGS","_DYN_EVENT_TRACE_CTX","_DYN_TRACE_ID0","_DYN_GET_TRACE_ID","_DYN_SPAN_ID1","_DYN_GET_TRACE_FLAGS","dynamicProto","urlGetAbsoluteUrl","dataSanitizeUrl","urlGetCompleteUrl","_DYN__CREATE_TRACK_ITEM","ajaxType","enableRequestHeaderTracking","getResponse","dateTimeUtilsDuration","dependency","_DYN_GET_ABSOLUTE_URL","_DYN_NAME","_DYN_START_TIME","STR_PROPERTIES","props","_populatePerfData","objKeys","_DYN_LENGTH","response","correlationContext","_DYN_CORRELATION_CONTEXT","_DYN_HEADER_MAP","_DYN_ERROR_STATUS_TEXT","responseType","_DYN_STATUS_TEXT","_DYN_RESPONSE","_DYN_GET_PART_APROPS","partA","traceExt","Extensions","isNullOrUndefined","_a","strDiagLog","AJAX_DATA_CONTAINER","STR_FETCH","ERROR_HEADER","ERROR_PREFIX","ERROR_POSTFIX","ERROR_NOT_SENT","CORRELATION_HEADER_ERROR","CUSTOM_REQUEST_CONTEXT_ERROR","FAILED_TO_CALCULATE_DURATION_ERROR","_markCount","_supportsFetch","_global","getGlobal","isNullOrUndefined","strShimPrototype","_supportsAjaxMonitoring","ajaxMonitorInstance","ajaxDataId","_a","_b","result","isXhrSupported","proto","ieVer","getIEVersion","xhr","xhrData","theOpen","e","_throwInternalCritical","_DYN_EXCEPTION","dumpObj","_getAjaxData","_addSharedXhrHeaders","name","value","headers","_isHeaderSet","isPresent","arrForEach","header","_getFailedAjaxDiagnosticsMessage","ajaxData","_DYN_REQUEST_URL","msgId","message","properties","isUserAct","_throwInternal","_throwInternalWarning","_createErrorCallbackFunc","internalMessage","callDetails","_DYN_INST","_indexOf","match","strIndexOf","_addHandler","container","id","theFunc","theHandler","initializer","idx","_processDependencyContainer","core","details","getExceptionName","_processDependencyListeners","listeners","input","init","initializersCount","_DYN_LENGTH","_DYN_CORE","_DYN_TRACE_ID","_DYN_SPAN_ID","_DYN_TRACE_FLAGS","_DYN_CONTEXT","_DYN_ABORTED","_DYN_TRACE_ID0","_DYN_SPAN_ID1","BLOB_CORE","DfltAjaxCorrelationHeaderExDomains","objFreeze","_internalExcludeEndpoints","_defaultConfig","_DYN_MAX_AJAX_CALLS_PER_V7","_DYN_DISABLE_AJAX_TRACKIN9","_DYN_DISABLE_FETCH_TRACKI11","_DYN_EXCLUDE_REQUEST_FROM8","_DYN_ENABLE_REQUEST_HEADE4","_DYN_ENABLE_RESPONSE_HEAD12","_DYN_ENABLE_AJAX_ERROR_ST5","_DYN_ENABLE_AJAX_PERF_TRA6","_DYN_AJAX_PERF_LOOKUP_DEL10","_DYN_ADD_REQUEST_CONTEXT","AjaxMonitor","_super","__extendsFn","_this","_fetchInitialized","_xhrInitialized","_currentWindowHost","_extensionConfig","_enableRequestHeaderTracking","_enableAjaxErrorStatusText","_trackAjaxAttempts","_context","_isUsingW3CHeaders","_isUsingAIHeaders","_markPrefix","_enableAjaxPerfTracking","_maxAjaxCallsPerView","_enableResponseHeaderTracking","_disabledUrls","_disableAjaxTracking","_disableFetchTracking","_excludeRequestFromAutoTrackingPatterns","_addRequestContext","_evtNamespace","_ajaxDataId","_dependencyHandlerId","_dependencyListeners","_dependencyInitializers","_ignoreHeaders","_maxAjaxPerfLookupAttempts","_ajaxPerfLookupDelay","_distributedTracingMode","_appId","_polyfillInitialized","dynamicProto","_self","_base","_addHook","_DYN__ADD_HOOK","_initDefaults","config","extensions","pluginChain","mergeEvtNamespace","createUniqueNamespace","_populateDefaults","_instrumentXhr","_instrumentFetch","_populateContext","dependency","_reportDependencyInternal","_DYN_INCLUDE_CORRELATION_2","currentWindowHost","correlationIdCanIncludeCorrelationHeader","_DYN_GET_ABSOLUTE_URL","_DYN_HEADERS","RequestHeaders","_DYN_REQUEST_HEADERS","appId","traceFlags","traceParent","formatTraceParent","createTraceParent","_DYN_SET_REQUEST_HEADER","_DYN_TRACK_DEPENDENCY_DAT3","systemProperties","_DYN_START_TIME","item","createTelemetryItem","RemoteDependencyData","dependencyListener","dependencyInitializer","location","getLocation","_DYN_TO_LOWER_CASE","onConfigChange","ctx","createProcessTelemetryContext","propExt","PropertiesPluginIdentifier","_canIncludeHeaders","rlt","key","fetch","global","isPolyfill","InstrumentFunc","fetchData","_isDisabledRequest","_createFetchRecord","newInit","fetchData_1","response","_reportFetchMetrics","_DYN_STATUS","ajaxResponse","_DYN_STATUS_TEXT","_DYN_HEADER_MAP","_DYN_CORRELATION_CONTEXT","_getFetchCorrelationContext","responseHeaderMap_1","reason","isWebWorker","_hookProto","target","funcName","callbacks","InstrumentProto","method","url","async","_isMonitoredXhrInstance","_DYN_OPEN_DONE","_openHandler","_attachToOnReadyStateChange","context","_DYN_SEND_DONE","_createMarkId","_DYN_REQUEST_SENT_TIME","dateTimeUtilsNow","_DYN_ABORT_DONE","request","isDisabled","theUrl","isString","regex","theRegex","idx2","DisabledPropertyName","isInternalApplicationInsightsEndpoint","excludeAjaxDataValidation","ajaxValidation","initialized","_getDistributedTraceCtx","distributedTraceCtx","createDistributedTraceContextFromTrace","traceID","_DYN_GET_TRACE_ID","generateW3CId","spanID","strSubstr","xhrRequestData","ajaxDataCntr","ajaxRecord","_DYN_GET_TRACE_FLAGS","_DYN_METHOD","_DYN_ERROR_STATUS_TEXT","_DYN_STATE_CHANGE_ATTACHE13","eventOn","_onAjaxComplete","exceptionText","_DYN_AJAX_DIAGNOSTICS_MES16","_getResponseText","responseType","_DYN_RESPONSE_TEXT","_DYN_RESPONSE_FINISHED_TI14","_reportXhrError","failedProps","errorProps","_findPerfResourceEntry","_DYN__CREATE_TRACK_ITEM","_getAjaxCorrelationContext","_DYN_RESPONSE","_DYN_GET_ALL_RESPONSE_HEA15","arr","strTrim","responseHeaderMap_2","line","parts","STR_PROPERTIES","__assignFn","sysProperties","_DYN_GET_PART_APROPS","responseHeadersString","index","responseHeader","correlationIdGetCorrelationContext","type","performance_1","getPerformance","isFunction","markId","entries","_DYN_PERF_MARK","initiatorType","trackCallback","reportError","perfMark","performance","maxAttempts","retryDelay","requestUrl","attempt","locateResourceTiming","perfTiming","lp","entry","_DYN_NAME","_DYN_PERF_TIMING","scheduleTimeout","location_1","strSplit","requestHeaders","_getFailedFetchDiagnosticsMessage","status","getResponse","_reportFetchError","initializers","itemCtx","BaseTelemetryPlugin","Application","Device","Version","Internal","config","unloadHookContainer","_this","unloadHook","onConfigChange","prefix","Location","_DYN_SESSION_MANAGER","_DYN_UPDATE","_DYN_IS_USER_COOKIE_SET","_DYN_IS_NEW_USER","_DYN_GET_TRACE_CTX","_DYN_TELEMETRY_TRACE","_DYN_APPLY_SESSION_CONTEX0","_DYN_APPLY_APPLICATION_CO1","_DYN_APPLY_DEVICE_CONTEXT","_DYN_APPLY_OPERATION_CONT2","_DYN_APPLY_USER_CONTEXT","_DYN_APPLY_OPERATING_SYST3","_DYN_APPLY_LOCATION_CONTE4","_DYN_APPLY_INTERNAL_CONTE5","_DYN_ACCOUNT_ID","_DYN_GET_SESSION_ID","_DYN_NAME_PREFIX","_DYN_SESSION_COOKIE_POSTF6","_DYN_USER_COOKIE_POSTFIX","_DYN_ID_LENGTH","_DYN_GET_NEW_ID","_DYN_LENGTH","_DYN_AUTOMATIC_SESSION","_DYN_AUTHENTICATED_ID","_DYN_ACQUISITION_DATE","_DYN_RENEWAL_DATE","_DYN_JOIN","_DYN_COOKIE_SEPARATOR","_DYN_AUTH_USER_COOKIE_NAM7","SESSION_COOKIE_NAME","ACQUISITION_SPAN","RENEWAL_SPAN","COOKIE_UPDATE_INTERVAL","Session","_SessionManager","config","core","unloadHookContainer","self","_storageNamePrefix","_cookieUpdatedTimestamp","_logger","safeGetLogger","_cookieManager","safeGetCookieMgr","_sessionExpirationMs","_sessionRenewalMs","dynamicProto","_self","unloadHook","onConfigChange","details","ACQUISITION_SPAN","RENEWAL_SPAN","sessionCookiePostfix","_DYN_NAME_PREFIX","SESSION_COOKIE_NAME","_DYN_AUTOMATIC_SESSION","Session","_DYN_UPDATE","nowMs","utcNow","isExpired","session","_initializeAutomaticSession","timeSinceAcqMs","_DYN_ACQUISITION_DATE","timeSinceRenewalMs","_DYN_RENEWAL_DATE","_renew","COOKIE_UPDATE_INTERVAL","_setCookie","_setStorage","now","isValid","cookieValue","isFunction","_initializeAutomaticSessionWithData","storageValue","utlGetLocalStorage","sessionData","sessionReset","tokens","_DYN_LENGTH","acqMs","renewalMs","_throwInternal","e","getExceptionName","dumpObj","getNewId","_DYN_GET_NEW_ID","newId","_DYN_ID_LENGTH","utlCanUseLocalStorage","acq","renewalPeriodMs","acqTimeLeftMs","cookie","maxAgeSec","cookieDomain","_DYN_JOIN","guid","renewal","utlSetLocalStorage","TelemetryTrace","id","parentId","name","logger","_self","generateW3CId","location","getLocation","dataSanitizeString","_validateUserInput","id","User","config","core","unloadHookContainer","_logger","safeGetLogger","_cookieManager","safeGetCookieMgr","_storageNamePrefix","dynamicProto","_self","objDefine","unloadHook","onConfigChange","userCookiePostfix","_DYN_USER_COOKIE_POSTFIX","cookie","_DYN_IS_NEW_USER","params","_DYN_COOKIE_SEPARATOR","_DYN_LENGTH","_DYN_IS_USER_COOKIE_SET","_generateNewId","newCookie","_generateNewCookie","_setUserCookie","_DYN_JOIN","name_1","_DYN_NAME_PREFIX","utlRemoveStorage","_DYN_ACCOUNT_ID","authCookie","_DYN_AUTH_USER_COOKIE_NAM7","authCookieString","_DYN_AUTHENTICATED_ID","theConfig","getNewId","_DYN_GET_NEW_ID","newId","_DYN_ID_LENGTH","userId","acqStr","toISOString","oneYear","authenticatedUserId","accountId","storeInCookie","isInvalidInput","_throwInternal","_DYN_UPDATE","user_id","user_cookie","strExt","strTags","_removeEmpty","target","name","objKeys","_DYN_LENGTH","_nullResult","TelemetryContext","core","defaultConfig","previousTraceCtx","unloadHookContainer","_this","logger","dynamicProto","_self","_DYN_GET_SESSION_ID","Application","Internal","hasWindow","_DYN_SESSION_MANAGER","_SessionManager","Device","Location","User","traceId","parentId","name_1","_DYN_TELEMETRY_TRACE","TelemetryTrace","Session","session","sesId","isString","autoSession","_DYN_AUTOMATIC_SESSION","_DYN_APPLY_SESSION_CONTEX0","evt","itemCtx","setValue","getSetValue","Extensions","_DYN_APPLY_OPERATING_SYST3","_DYN_APPLY_APPLICATION_CO1","application","tags","CtxTagKeys","_DYN_APPLY_DEVICE_CONTEXT","device","extDevice","_DYN_APPLY_INTERNAL_CONTE5","internal","dataSanitizeString","_InternalLogMessage","PageView","_DYN_APPLY_LOCATION_CONTE4","location","_DYN_APPLY_OPERATION_CONT2","telemetryTrace","extTrace","isNullOrUndefined","web","_DYN_APPLY_USER_CONTEXT","user","_DYN_ACCOUNT_ID","extUser","_DYN_AUTHENTICATED_ID","ext","_a","undefString","nullValue","_defaultConfig","objDeepFreeze","_DYN_ACCOUNT_ID","_DYN_GET_SESSION_ID","_DYN_NAME_PREFIX","_DYN_SESSION_COOKIE_POSTF6","_DYN_USER_COOKIE_POSTFIX","_DYN_ID_LENGTH","_DYN_GET_NEW_ID","PropertiesPlugin","_super","__extendsFn","_this","PropertiesPluginIdentifier","_extensionConfig","_distributedTraceCtx","_previousTraceCtx","_context","_disableUserInitMessage","dynamicProto","_self","_base","_initDefaults","objDefine","config","core","extensions","pluginChain","_populateDefaults","event","itemCtx","isNullOrUndefined","PageView","theContext","_DYN_SESSION_MANAGER","_DYN_UPDATE","userCtx","_DYN_IS_USER_COOKIE_SET","_processTelemetryInternal","_DYN_IS_NEW_USER","message","_InternalLogMessage","getNavigator","_logInternalMessage","unloadCtx","unloadState","_DYN_GET_TRACE_CTX","traceCtx","identifier","onConfigChange","ctx","createProcessTelemetryContext","utlSetStoragePrefix","TelemetryContext","createDistributedTraceContextFromTrace","_DYN_TELEMETRY_TRACE","breezeChannel","BreezeChannelIdentifier","evt","getSetValue","_DYN_APPLY_SESSION_CONTEX0","_DYN_APPLY_APPLICATION_CO1","_DYN_APPLY_DEVICE_CONTEXT","_DYN_APPLY_OPERATION_CONT2","_DYN_APPLY_USER_CONTEXT","_DYN_APPLY_OPERATING_SYST3","_DYN_APPLY_LOCATION_CONTE4","_DYN_APPLY_INTERNAL_CONTE5","BaseTelemetryPlugin","PropertiesPlugin_default","_AUTHENTICATED_USER_CONTEXT","_TRACK","STR_SNIPPET","STR_GET_COOKIE_MGR","STR_START_TRACK_PAGE","STR_STOP_TRACK_PAGE","STR_FLUSH","STR_START_TRACK_EVENT","STR_STOP_TRACK_EVENT","STR_ADD_TELEMETRY_INITIALIZER","STR_ADD_TELEMETRY_INITIALIZERS","STR_POLL_INTERNAL_LOGS","STR_GET_PLUGIN","STR_EVT_NAMESPACE","STR_TRACK_EVENT","_TRACK","STR_TRACK_TRACE","STR_TRACK_METRIC","STR_TRACK_PAGE_VIEW","STR_TRACK_EXCEPTION","STR_TRACK_DEPENDENCY_DATA","STR_SET_AUTHENTICATED_USER_CONTEXT","_AUTHENTICATED_USER_CONTEXT","STR_CLEAR_AUTHENTICATED_USER_CONTEXT","CONFIG_ENDPOINT_URL","_DYN_VERSION","_DYN_QUEUE","_DYN_CONNECTION_STRING","_DYN_INSTRUMENTATION_KEY","_DYN_INSTRUMENTATIONKEY0","_DYN_USER_OVERRIDE_ENDPOI1","_DYN_ENDPOINT_URL","_DYN_INGESTIONENDPOINT","_DYN_ONUNLOAD_FLUSH","_DYN_CONTEXT","_DYN_ADD_HOUSEKEEPING_BEF2","_DYN_SEND_MESSAGE","_DYN_UPDATE_SNIPPET_DEFIN3","_a","_b","_c","_d","_internalSdkSrc","_ignoreUpdateSnippetProperties","STR_SNIPPET","IKEY_USAGE","CDN_USAGE","SDK_LOADER_VER","UNDEFINED_VALUE","default_limit","default_interval","default_throttle_config","cfgDfMerge","defaultConfigValues","_DYN_CONNECTION_STRING","_DYN_ENDPOINT_URL","_DYN_INSTRUMENTATION_KEY","_DYN_USER_OVERRIDE_ENDPOI1","cfgDfValidate","_chkDiagLevel","CONFIG_ENDPOINT_URL","value","AppInsightsSku","snippet","_this","dependencies","properties","_sender","_snippetVersion","_evtNamespace","_houseKeepingNamespace","_core","_config","_analyticsPlugin","_cfgSyncPlugin","_throttleMgr","_iKeySentMessage","_cdnSentMessage","_sdkVerSentMessage","dynamicProto","_self","_initDefaults","objDefine","arrForEach","key","_DYN_VERSION","_DYN_QUEUE","cfgHandler","createDynamicConfig","AnalyticsPlugin","PropertiesPlugin_default","AjaxMonitor","Sender","AppInsightsCore","_addUnloadHook","onConfigChange","configCs","_parseCs","createSyncPromise","resolve","reject","doAwaitResponse","res","curCs","parsedCs","parseConnectionString","isPromiseLike","ikeyPromise","cs","ikey","_DYN_INSTRUMENTATIONKEY0","e","url","isNullOrUndefined","ingest","_DYN_INGESTIONENDPOINT","DEFAULT_BREEZE_PATH","isString","STR_FLUSH","async","callBack","result","doPerf","createPromise","waiting","flushDone","channel","_DYN_ONUNLOAD_FLUSH","legacyMode","logger","notificationManager","throwUnsupported","_updateSnippetProperties","snippetVer","_DYN_CONTEXT","objForEachKey","field","isFunction","arrIndexOf","ThrottleMgr","sdkSrc","_findSdkSourceFile","STR_POLL_INTERNAL_LOGS","_DYN_ADD_HOUSEKEEPING_BEF2","defaultEnable","isFeatureEnabled","_DYN_SEND_MESSAGE","_DYN_UPDATE_SNIPPET_DEFIN3","proxyAssign","name","isArray","length_1","i","call","exception","properties_1","appInsightsInstance","hasWindow","hasDocument","performHousekeeping_1","STR_GET_PLUGIN","loadedPlugin","PropertiesPluginIdentifier","propertiesPlugin","added_1","mergeEvtNamespace","STR_EVT_NAMESPACE","details","coreConfig","analyticsPlugin","ctx","createProcessTelemetryContext","extConfig","AnalyticsPluginIdentifier","_removePageEventHandlers","excludePageUnloadEvents","addPageUnloadEventListener","addPageHideEventListener","isReactNative","_throwInternal","isAsync","unloadComplete","cbTimeout","unloadDone","_unloadCallback","unloadState","proxyFunctions","STR_GET_COOKIE_MGR","STR_TRACK_EVENT","STR_TRACK_PAGE_VIEW","STR_TRACK_EXCEPTION","STR_TRACK_TRACE","STR_TRACK_METRIC","STR_START_TRACK_PAGE","STR_STOP_TRACK_PAGE","STR_START_TRACK_EVENT","STR_STOP_TRACK_EVENT","_getCurrentDependencies","STR_TRACK_DEPENDENCY_DATA","STR_ADD_TELEMETRY_INITIALIZER","context","STR_SET_AUTHENTICATED_USER_CONTEXT","STR_CLEAR_AUTHENTICATED_USER_CONTEXT","createUniqueNamespace","CfgSyncPlugin","removePageUnloadEventListener","removePageHideEventListener","hooks","dependencyInitializer","_findSdkSourceFile","_internalSdkSrc","sdkSrc","isModule","cdns","scrpt","url_1","src_1","arrForEach","value","idx","strIndexOf","TelemetryService","constructor","subscriptions","router","inject","Router","app","AppService","lastEvent","init","instrumentationKey","getEnv","location","hostname","appInsights","ApplicationInsights","config","maxBatchInterval","disableFetchTracking","loadAppInsights","push","events","subscribe","event","NavigationEnd","url","urlAfterRedirects","trackPageView","name","document","title","refUri","referrer","uri","properties","application","getApplicationName","logEvent","__spreadProps","__spreadValues","trackEvent","logError","error","trackException","exception","severityLevel","SeverityLevel","Error","ngOnDestroy","filter","s","closed","forEach","unsubscribe","factory","ɵfac","TelemetryModule","TelemetryService","imports","CommonModule","RouterModule"],"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,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102]}