{"version":3,"sources":["webpack:///./node_modules/@microsoft/applicationinsights-properties-js/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/Session.js","webpack:///./node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/Application.js","webpack:///./node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/Device.js","webpack:///./node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/Internal.js","webpack:///./node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/User.js","webpack:///./node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/Location.js","webpack:///./node_modules/@microsoft/applicationinsights-properties-js/dist-esm/Context/TelemetryTrace.js","webpack:///./node_modules/@microsoft/applicationinsights-properties-js/dist-esm/TelemetryContext.js","webpack:///./node_modules/@microsoft/applicationinsights-properties-js/dist-esm/PropertiesPlugin.js","webpack:///./node_modules/@microsoft/applicationinsights-web/dist-esm/Initialization.js","webpack:///./node_modules/@microsoft/applicationinsights-web/dist-esm/ApplicationInsightsDeprecated.js","webpack:///./node_modules/@microsoft/applicationinsights-web/dist-esm/ApplicationInsightsContainer.js","webpack:///./node_modules/@microsoft/applicationinsights-web/dist-esm/applicationinsights-web.js"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","Session","_SessionManager","config","logger","_this","CoreUtils","isNullOrUndefined","_logger","DiagnosticLogger","sessionExpirationMs","acquisitionSpan","sessionRenewalMs","renewalSpan","_storageNamePrefix","namePrefix","cookieNameConst","automaticSession","update","id","initializeAutomaticSession","now","Now","acquisitionExpired","acquisitionDate","renewalExpired","renewalDate","renew","cookieUpdatedTimestamp","cookieUpdateInterval","setCookie","backup","setStorage","cookie","Util","getCookie","split","initializeAutomaticSessionWithData","storage","getStorage","sessionData","params","length","acq","Date","renewal","e","throwInternal","CRITICAL","ErrorParsingAISessionCookie","getExceptionName","exception","dump","WARNING","SessionRenewalDateIsZero","newId","canUseLocalStorage","BrowserDoesNotSupportLocalStorage","guid","acquisitionExpiry","renewalExpiry","cookieExpiry","setTime","cookieDomnain","cookieDomain","UTCString","toUTCString","join","Application","Device","deviceClass","Version","Internal","sdkVersion","sdkExtension","User","isNewUser","userCookieName","cookieSeparator","date","acqStr","toISOString","accountAcquisitionDate","getTime","newCookie","undefined","name_1","removeStorage","accountId","authCookie","authUserCookieName","decodeURI","authCookieString","authenticatedId","setAuthenticatedUserContext","authenticatedUserId","storeInCookie","isInvalidInput","validateUserInput","SetAuthContextFailedAccountName","encodeURI","clearAuthenticatedUserContext","deleteCookie","match","Location","TelemetryTrace","parentId","name","traceID","generateW3CId","parentID","location","pathname","DataSanitizer","sanitizeString","TelemetryContext","defaultConfig","sessionManager","application","device","internal","user","telemetryTrace","session","appId","applySessionContext","event","itemCtx","sessionContext","ext","app","sesId","applyOperatingSystemContxt","os","applyApplicationContext","ver","tags","applicationVersion","build","applicationBuild","applyDeviceContext","localId","ip","model","applyInternalContext","agentVersion","internalAgentVersion","internalSdkVersion","applyLocationContext","locationIp","applyOperationContext","trace","applyWebContext","web","applyUserContext","userAccountId","authId","cleanUp","DeviceExt","objKeys","UserExt","WebExt","OSExt","AppExt","TraceExt","_super","PropertiesPlugin","apply","arguments","priority","identifier","getDefaultConfig","instrumentationKey","samplingPercentage","isBrowserLinkTrackingEnabled","initialize","core","extensions","pluginChain","call","ctx","_getTelCtx","_extensionConfig","_loop_1","field","this_1","getConfig","context","_breezeChannel","getExtension","processTelemetry","PageView","envelopeType","diagLog","resetInternalMessageCount","_processTelemetryInternal","message","SendBrowserInfoOnUserInit","userAgent","logInternalMessage","processNext","BaseTelemetryPlugin","Telemetry","Initialization","snippet","queue","version","connectionString","cs","parse","ingest","ingestionendpoint","endpointUrl","instrumentationkey","appInsights","ApplicationInsights","properties","dependencies","AppInsightsCore","getSKUDefaults","trackEvent","customProperties","trackPageView","pageView","inPv","trackPageViewPerformance","pageViewPerformance","inPvp","trackException","error","_onerror","trackTrace","trackMetric","metric","startTrackPage","stopTrackPage","url","measurements","startTrackEvent","stopTrackEvent","addTelemetryInitializer","telemetryInitializer","trackDependencyData","dependency","flush","async","arrForEach","getTransmissionControls","channels","channel","onunloadFlush","loadAppInsights","legacyMode","_updateSnippetProperties","isString","isFunction","substring","Error","appInsightsChannel","Sender","push","emptyQueue","pollInternalLogs","addHousekeepingBeforeUnload","updateSnippetDefinitions","isArray","length_1","i","toString","appInsightsInstance","performHousekeeping","_sessionManager","disableFlushOnBeforeUnload","added","addEventHandler","FailedToAddHandlerForOnBeforeUnload","disableFlushOnUnload","diagnosticLogInterval","AppInsightsDeprecated","appInsightsNew","_hasLegacyInitializers","_queue","addTelemetryInitializers","bind","maxBatchSizeInBytes","maxBatchInterval","isNaN","enableDebug","stringToBoolOrDefault","disableExceptionTracking","disableTelemetry","verboseLogging","emitLineDelimitedJson","autoTrackPageVisitTime","disableAjaxTracking","maxAjaxCallsPerView","isBeaconApiDisabled","disableCorrelationHeaders","correlationHeaderExcludedDomains","enableSessionStorageBuffer","isRetryDisabled","isCookieUseDisabled","isStorageUseDisabled","enableCorsCorrelation","callBack","item","_processLegacyInitializers","duration","telemetry","uri","trackDependency","method","absoluteUrl","pathName","totalTime","success","resultCode","target","type","HttpMethod","responseCode","handledAt","severityLevel","average","sampleCount","min","max","lineNumber","columnNumber","downloadAndSetup","originalTrackPageView_1","pagePath","legacyPageView","legacyEvent","props","ApplicationInsightsContainer","getAppInsights","initialization","legacy"],"mappings":"6MAgBIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,KAClEP,EAAcC,EAAGC,IAGrB,SAASO,EAAUR,EAAGC,GAEzB,SAASQ,IAAOC,KAAKC,Y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ALyC,oBAA9BhV,KAAK+M,QAAQiI,KACpBhV,KAAKgV,GAAe,SAAUlO,EAAMmO,EAAOjG,GACvCxO,EAAMuN,WAAWjH,EAAMmO,EAAOjG,KAG/BhP,MAEXyR,EAAsBvR,UAAUmT,2BAA6B,SAAUD,GAGnE,OADAA,EAAKzK,KAAK,QAAiB3I,KAAK4R,OACzBwB,GAEJ3B,EAtK+B,GCAtC,EAA8C,WAC9C,SAASyD,KAqBT,OAnBAA,EAA6BC,eAAiB,SAAUpI,EAASE,GAC7D,IAAImI,EAAiB,IAAI,EAAoBrI,GACzCgD,EAAyB,IAAZ9C,EAKjB,GAAgB,IAAZA,EAGA,OAFAmI,EAAezE,yBAAyB5D,GACxCqI,EAAetF,gBAAgBC,GACxBqF,EAGP,IAAIC,EAAS,IAAI,EAAsBtI,EAASqI,GAGhD,OAFAC,EAAO1E,yBAAyB5D,GAChCqI,EAAetF,gBAAgBC,GACxBsF,GAGRH,EAtBsC,G,gGCNjD","file":"js/chunk-vendors~cd01edf3.2d9c13da.js","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { Util, DateTimeUtils } from '@microsoft/applicationinsights-common';\r\nimport { _InternalMessageId, LoggingSeverity, CoreUtils, DiagnosticLogger } from '@microsoft/applicationinsights-core-js';\r\nvar Session = /** @class */ (function () {\r\n function Session() {\r\n }\r\n return Session;\r\n}());\r\nexport { Session };\r\nvar _SessionManager = /** @class */ (function () {\r\n function _SessionManager(config, logger) {\r\n var _this = this;\r\n if (CoreUtils.isNullOrUndefined(logger)) {\r\n this._logger = new DiagnosticLogger();\r\n }\r\n else {\r\n this._logger = logger;\r\n }\r\n if (!config) {\r\n config = {};\r\n }\r\n if (!(typeof config.sessionExpirationMs === \"function\")) {\r\n config.sessionExpirationMs = function () { return _SessionManager.acquisitionSpan; };\r\n }\r\n if (!(typeof config.sessionRenewalMs === \"function\")) {\r\n config.sessionRenewalMs = function () { return _SessionManager.renewalSpan; };\r\n }\r\n this.config = config;\r\n this._storageNamePrefix = function () { return _this.config.namePrefix && _this.config.namePrefix() ? _SessionManager.cookieNameConst + _this.config.namePrefix() : _SessionManager.cookieNameConst; };\r\n this.automaticSession = new Session();\r\n }\r\n _SessionManager.prototype.update = function () {\r\n if (!this.automaticSession.id) {\r\n this.initializeAutomaticSession();\r\n }\r\n var now = DateTimeUtils.Now();\r\n var acquisitionExpired = this.config.sessionExpirationMs() === 0 ? false : now - this.automaticSession.acquisitionDate > this.config.sessionExpirationMs();\r\n var renewalExpired = this.config.sessionExpirationMs() === 0 ? false : now - this.automaticSession.renewalDate > this.config.sessionRenewalMs();\r\n // renew if acquisitionSpan or renewalSpan has ellapsed\r\n if (acquisitionExpired || renewalExpired) {\r\n // update automaticSession so session state has correct id\r\n this.renew();\r\n }\r\n else {\r\n // do not update the cookie more often than cookieUpdateInterval\r\n if (!this.cookieUpdatedTimestamp || now - this.cookieUpdatedTimestamp > _SessionManager.cookieUpdateInterval) {\r\n this.automaticSession.renewalDate = now;\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n }\r\n }\r\n };\r\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 */\r\n _SessionManager.prototype.backup = function () {\r\n this.setStorage(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n };\r\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 */\r\n _SessionManager.prototype.initializeAutomaticSession = function () {\r\n var cookie = Util.getCookie(this._logger, this._storageNamePrefix());\r\n if (cookie && typeof cookie.split === \"function\") {\r\n this.initializeAutomaticSessionWithData(cookie);\r\n }\r\n else {\r\n // There's no cookie, but we might have session data in local storage\r\n // This can happen if the session expired or the user actively deleted the cookie\r\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.\r\n // The User class handles this for us and deletes our local storage object if the persistent user cookie was removed.\r\n var storage = Util.getStorage(this._logger, this._storageNamePrefix());\r\n if (storage) {\r\n this.initializeAutomaticSessionWithData(storage);\r\n }\r\n }\r\n if (!this.automaticSession.id) {\r\n this.renew();\r\n }\r\n };\r\n /**\r\n * Extract id, aquisitionDate, and renewalDate from an ai_session payload string and\r\n * use this data to initialize automaticSession.\r\n *\r\n * @param {string} sessionData - The string stored in an ai_session cookie or local storage backup\r\n */\r\n _SessionManager.prototype.initializeAutomaticSessionWithData = function (sessionData) {\r\n var params = sessionData.split(\"|\");\r\n if (params.length > 0) {\r\n this.automaticSession.id = params[0];\r\n }\r\n try {\r\n if (params.length > 1) {\r\n var acq = +params[1];\r\n this.automaticSession.acquisitionDate = +new Date(acq);\r\n this.automaticSession.acquisitionDate = this.automaticSession.acquisitionDate > 0 ? this.automaticSession.acquisitionDate : 0;\r\n }\r\n if (params.length > 2) {\r\n var renewal = +params[2];\r\n this.automaticSession.renewalDate = +new Date(renewal);\r\n this.automaticSession.renewalDate = this.automaticSession.renewalDate > 0 ? this.automaticSession.renewalDate : 0;\r\n }\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.ErrorParsingAISessionCookie, \"Error parsing ai_session cookie, session will be reset: \" + Util.getExceptionName(e), { exception: Util.dump(e) });\r\n }\r\n if (this.automaticSession.renewalDate === 0) {\r\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.SessionRenewalDateIsZero, \"AI session renewal date is 0, session will be reset.\");\r\n }\r\n };\r\n _SessionManager.prototype.renew = function () {\r\n var now = DateTimeUtils.Now();\r\n this.automaticSession.id = Util.newId();\r\n this.automaticSession.acquisitionDate = now;\r\n this.automaticSession.renewalDate = now;\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n // If this browser does not support local storage, fire an internal log to keep track of it at this point\r\n if (!Util.canUseLocalStorage()) {\r\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserDoesNotSupportLocalStorage, \"Browser does not support local storage. Session durations will be inaccurate.\");\r\n }\r\n };\r\n _SessionManager.prototype.setCookie = function (guid, acq, renewal) {\r\n // Set cookie to expire after the session expiry time passes or the session renewal deadline, whichever is sooner\r\n // Expiring the cookie will cause the session to expire even if the user isn't on the page\r\n var acquisitionExpiry = acq + this.config.sessionExpirationMs();\r\n var renewalExpiry = renewal + this.config.sessionRenewalMs();\r\n var cookieExpiry = new Date();\r\n var cookie = [guid, acq, renewal];\r\n if (acquisitionExpiry < renewalExpiry) {\r\n cookieExpiry.setTime(acquisitionExpiry);\r\n }\r\n else {\r\n cookieExpiry.setTime(renewalExpiry);\r\n }\r\n var cookieDomnain = this.config.cookieDomain ? this.config.cookieDomain() : null;\r\n // if sessionExpirationMs is set to 0, it means the expiry is set to 0 for this session cookie\r\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. \r\n // Another browser instance does not inherit this cookie.\r\n var UTCString = this.config.sessionExpirationMs() === 0 ? '0' : cookieExpiry.toUTCString();\r\n Util.setCookie(this._logger, this._storageNamePrefix(), cookie.join('|') + ';expires=' + UTCString, cookieDomnain);\r\n this.cookieUpdatedTimestamp = DateTimeUtils.Now();\r\n };\r\n _SessionManager.prototype.setStorage = function (guid, acq, renewal) {\r\n // Keep data in local storage to retain the last session id, allowing us to cleanly end the session when it expires\r\n // Browsers that don't support local storage won't be able to end sessions cleanly from the client\r\n // The server will notice this and end the sessions itself, with loss of accurate session duration\r\n Util.setStorage(this._logger, this._storageNamePrefix(), [guid, acq, renewal].join('|'));\r\n };\r\n _SessionManager.acquisitionSpan = 86400000; // 24 hours in ms\r\n _SessionManager.renewalSpan = 1800000; // 30 minutes in ms\r\n _SessionManager.cookieUpdateInterval = 60000; // 1 minute in ms\r\n _SessionManager.cookieNameConst = 'ai_session';\r\n return _SessionManager;\r\n}());\r\nexport { _SessionManager };\r\n//# sourceMappingURL=Session.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Application = /** @class */ (function () {\r\n function Application() {\r\n }\r\n return Application;\r\n}());\r\nexport { Application };\r\n//# sourceMappingURL=Application.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Device = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the Device class\r\n */\r\n function Device() {\r\n // don't attempt to fingerprint browsers\r\n this.id = \"browser\";\r\n // Device type is a dimension in our data platform\r\n // Setting it to 'Browser' allows to separate client and server dependencies/exceptions\r\n this.deviceClass = \"Browser\";\r\n }\r\n return Device;\r\n}());\r\nexport { Device };\r\n//# sourceMappingURL=Device.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Version = \"2.5.4\";\r\nvar Internal = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */\r\n function Internal(config) {\r\n this.sdkVersion = (config.sdkExtension && config.sdkExtension() ? config.sdkExtension() + \"_\" : \"\") + \"javascript:\" + Version;\r\n }\r\n return Internal;\r\n}());\r\nexport { Internal };\r\n//# sourceMappingURL=Internal.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { Util } from '@microsoft/applicationinsights-common';\r\nimport { _InternalMessageId, LoggingSeverity, CoreUtils } from '@microsoft/applicationinsights-core-js';\r\nvar User = /** @class */ (function () {\r\n function User(config, logger) {\r\n this.isNewUser = false;\r\n this._logger = logger;\r\n // get userId or create new one if none exists\r\n var cookie = Util.getCookie(this._logger, User.userCookieName);\r\n if (cookie) {\r\n this.isNewUser = false;\r\n var params = cookie.split(User.cookieSeparator);\r\n if (params.length > 0) {\r\n this.id = params[0];\r\n }\r\n }\r\n this.config = config;\r\n if (!this.id) {\r\n this.id = Util.newId();\r\n var date = new Date();\r\n var acqStr = CoreUtils.toISOString(date);\r\n this.accountAcquisitionDate = acqStr;\r\n this.isNewUser = true;\r\n // without expiration, cookies expire at the end of the session\r\n // set it to 365 days from now\r\n // 365 * 24 * 60 * 60 * 1000 = 31536000000 \r\n date.setTime(date.getTime() + 31536000000);\r\n var newCookie = [this.id, acqStr];\r\n var cookieDomain = this.config.cookieDomain ? this.config.cookieDomain() : undefined;\r\n Util.setCookie(this._logger, User.userCookieName, newCookie.join(User.cookieSeparator) + ';expires=' + date.toUTCString(), cookieDomain);\r\n // If we have an config.namePrefix() + ai_session in local storage this means the user actively removed our cookies.\r\n // We should respect their wishes and clear ourselves from local storage\r\n var name_1 = config.namePrefix && config.namePrefix() ? config.namePrefix() + 'ai_session' : 'ai_session';\r\n Util.removeStorage(this._logger, name_1);\r\n }\r\n // We still take the account id from the ctor param for backward compatibility. \r\n // But if the the customer set the accountId through the newer setAuthenticatedUserContext API, we will override it.\r\n this.accountId = config.accountId ? config.accountId() : undefined;\r\n // Get the auth user id and account id from the cookie if exists\r\n // Cookie is in the pattern: |\r\n var authCookie = Util.getCookie(this._logger, User.authUserCookieName);\r\n if (authCookie) {\r\n authCookie = decodeURI(authCookie);\r\n var authCookieString = authCookie.split(User.cookieSeparator);\r\n if (authCookieString[0]) {\r\n this.authenticatedId = authCookieString[0];\r\n }\r\n if (authCookieString.length > 1 && authCookieString[1]) {\r\n this.accountId = authCookieString[1];\r\n }\r\n }\r\n }\r\n /**\r\n * Sets the authenticated user id and the account id in this session.\r\n *\r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n */\r\n User.prototype.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) {\r\n if (storeInCookie === void 0) { storeInCookie = false; }\r\n // Validate inputs to ensure no cookie control characters.\r\n var isInvalidInput = !this.validateUserInput(authenticatedUserId) || (accountId && !this.validateUserInput(accountId));\r\n if (isInvalidInput) {\r\n this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.SetAuthContextFailedAccountName, \"Setting auth user context failed. \" +\r\n \"User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\", true);\r\n return;\r\n }\r\n // Create cookie string.\r\n this.authenticatedId = authenticatedUserId;\r\n var authCookie = this.authenticatedId;\r\n if (accountId) {\r\n this.accountId = accountId;\r\n authCookie = [this.authenticatedId, this.accountId].join(User.cookieSeparator);\r\n }\r\n if (storeInCookie) {\r\n // Set the cookie. No expiration date because this is a session cookie (expires when browser closed).\r\n // Encoding the cookie to handle unexpected unicode characters.\r\n Util.setCookie(this._logger, User.authUserCookieName, encodeURI(authCookie), this.config.cookieDomain());\r\n }\r\n };\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n * @returns {}\r\n */\r\n User.prototype.clearAuthenticatedUserContext = function () {\r\n this.authenticatedId = null;\r\n this.accountId = null;\r\n Util.deleteCookie(this._logger, User.authUserCookieName);\r\n };\r\n User.prototype.validateUserInput = function (id) {\r\n // Validate:\r\n // 1. Id is a non-empty string.\r\n // 2. It does not contain special characters for cookies.\r\n if (typeof id !== 'string' ||\r\n !id ||\r\n id.match(/,|;|=| |\\|/)) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n User.cookieSeparator = '|';\r\n User.userCookieName = 'ai_user';\r\n User.authUserCookieName = 'ai_authUser';\r\n return User;\r\n}());\r\nexport { User };\r\n//# sourceMappingURL=User.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Location = /** @class */ (function () {\r\n function Location() {\r\n }\r\n return Location;\r\n}());\r\nexport { Location };\r\n//# sourceMappingURL=Location.js.map","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { Util, DataSanitizer } from '@microsoft/applicationinsights-common';\r\nimport { getLocation } from '@microsoft/applicationinsights-core-js';\r\nvar TelemetryTrace = /** @class */ (function () {\r\n function TelemetryTrace(id, parentId, name, logger) {\r\n this.traceID = id || Util.generateW3CId();\r\n this.parentID = parentId;\r\n this.name = name;\r\n var location = getLocation();\r\n if (!name && location && location.pathname) {\r\n this.name = location.pathname;\r\n }\r\n this.name = DataSanitizer.sanitizeString(logger, this.name);\r\n }\r\n return TelemetryTrace;\r\n}());\r\nexport { TelemetryTrace };\r\n//# sourceMappingURL=TelemetryTrace.js.map","/**\r\n * PropertiesPlugin.ts\r\n * @copyright Microsoft 2018\r\n */\r\nimport { CoreUtils, hasWindow } from '@microsoft/applicationinsights-core-js';\r\nimport { Session, _SessionManager } from './Context/Session';\r\nimport { Extensions, CtxTagKeys } from '@microsoft/applicationinsights-common';\r\nimport { Application } from './Context/Application';\r\nimport { Device } from './Context/Device';\r\nimport { Internal } from './Context/Internal';\r\nimport { User } from './Context/User';\r\nimport { Location } from './Context/Location';\r\nimport { TelemetryTrace } from './Context/TelemetryTrace';\r\nvar TelemetryContext = /** @class */ (function () {\r\n function TelemetryContext(logger, defaultConfig) {\r\n if (hasWindow()) {\r\n this.sessionManager = new _SessionManager(defaultConfig, logger);\r\n this.application = new Application();\r\n this.device = new Device();\r\n this.internal = new Internal(defaultConfig);\r\n this.location = new Location();\r\n this.user = new User(defaultConfig, logger);\r\n this.telemetryTrace = new TelemetryTrace(undefined, undefined, undefined, logger);\r\n this.session = new Session();\r\n }\r\n this.appId = function () { return null; };\r\n }\r\n TelemetryContext.prototype.applySessionContext = function (event, itemCtx) {\r\n var sessionContext = this.session || (this.sessionManager && this.sessionManager.automaticSession);\r\n if (sessionContext) {\r\n if (typeof sessionContext.id === \"string\") {\r\n event.ext.app.sesId = sessionContext.id;\r\n }\r\n }\r\n if (this.session) {\r\n // If customer set session info, apply his context; otherwise apply context automatically generated\r\n if (typeof this.session.id === \"string\") {\r\n event.ext.app.sesId = this.session.id;\r\n }\r\n else {\r\n event.ext.app.sesId = this.sessionManager.automaticSession.id;\r\n }\r\n }\r\n };\r\n TelemetryContext.prototype.applyOperatingSystemContxt = function (event, itemCtx) {\r\n if (this.os && this.os.name) {\r\n event.ext.os = this.os;\r\n }\r\n };\r\n TelemetryContext.prototype.applyApplicationContext = function (event, itemCtx) {\r\n if (this.application) {\r\n if (typeof this.application.ver === \"string\") {\r\n event.tags[CtxTagKeys.applicationVersion] = this.application.ver;\r\n }\r\n if (typeof this.application.build === \"string\") {\r\n event.tags[CtxTagKeys.applicationBuild] = this.application.build;\r\n }\r\n }\r\n };\r\n TelemetryContext.prototype.applyDeviceContext = function (event, itemCtx) {\r\n if (this.device) {\r\n if (typeof this.device.id === \"string\") {\r\n event.ext.device.localId = this.device.id;\r\n }\r\n if (typeof this.device.ip === \"string\") {\r\n event.ext.device.ip = this.device.ip;\r\n }\r\n if (typeof this.device.model === \"string\") {\r\n event.ext.device.model = this.device.model;\r\n }\r\n if (typeof this.device.deviceClass === \"string\") {\r\n event.ext.device.deviceClass = this.device.deviceClass;\r\n }\r\n }\r\n };\r\n TelemetryContext.prototype.applyInternalContext = function (event, itemCtx) {\r\n if (this.internal) {\r\n if (typeof this.internal.agentVersion === \"string\") {\r\n event.tags[CtxTagKeys.internalAgentVersion] = this.internal.agentVersion; // not mapped in CS 4.0\r\n }\r\n if (typeof this.internal.sdkVersion === \"string\") {\r\n event.tags[CtxTagKeys.internalSdkVersion] = this.internal.sdkVersion;\r\n }\r\n }\r\n };\r\n TelemetryContext.prototype.applyLocationContext = function (event, itemCtx) {\r\n if (this.location) {\r\n if (typeof this.location.ip === \"string\") {\r\n event.tags[CtxTagKeys.locationIp] = this.location.ip;\r\n }\r\n }\r\n };\r\n TelemetryContext.prototype.applyOperationContext = function (event, itemCtx) {\r\n if (this.telemetryTrace) {\r\n var trace = event.ext.trace || { traceID: undefined, parentID: undefined };\r\n if (typeof this.telemetryTrace.traceID === \"string\") {\r\n trace.traceID = this.telemetryTrace.traceID;\r\n }\r\n if (typeof this.telemetryTrace.name === \"string\") {\r\n trace.name = this.telemetryTrace.name;\r\n }\r\n if (typeof this.telemetryTrace.parentID === \"string\") {\r\n trace.parentID = this.telemetryTrace.parentID;\r\n }\r\n event.ext.trace = trace;\r\n }\r\n };\r\n TelemetryContext.prototype.applyWebContext = function (event, itemCtx) {\r\n if (this.web) {\r\n event.ext.web = event.ext.web || {};\r\n event.ext.web = this.web;\r\n }\r\n };\r\n TelemetryContext.prototype.applyUserContext = function (event, itemCtx) {\r\n if (this.user) {\r\n if (!event.tags) {\r\n event.tags = [];\r\n }\r\n // stays in tags\r\n if (typeof this.user.accountId === \"string\") {\r\n var item = {};\r\n event.tags[CtxTagKeys.userAccountId] = this.user.accountId;\r\n }\r\n // CS 4.0\r\n if (typeof this.user.id === \"string\") {\r\n event.ext.user.id = this.user.id;\r\n }\r\n if (typeof this.user.authenticatedId === \"string\") {\r\n event.ext.user.authId = this.user.authenticatedId;\r\n }\r\n }\r\n };\r\n TelemetryContext.prototype.cleanUp = function (event, itemCtx) {\r\n if (event.ext[Extensions.DeviceExt] && CoreUtils.objKeys(event.ext[Extensions.DeviceExt]).length === 0) {\r\n delete event.ext[Extensions.DeviceExt];\r\n }\r\n if (event.ext[Extensions.UserExt] && CoreUtils.objKeys(event.ext[Extensions.UserExt]).length === 0) {\r\n delete event.ext[Extensions.UserExt];\r\n }\r\n if (event.ext[Extensions.WebExt] && CoreUtils.objKeys(event.ext[Extensions.WebExt]).length === 0) {\r\n delete event.ext[Extensions.WebExt];\r\n }\r\n if (event.ext[Extensions.OSExt] && CoreUtils.objKeys(event.ext[Extensions.OSExt]).length === 0) {\r\n delete event.ext[Extensions.OSExt];\r\n }\r\n if (event.ext[Extensions.AppExt] && CoreUtils.objKeys(event.ext[Extensions.AppExt]).length === 0) {\r\n delete event.ext[Extensions.AppExt];\r\n }\r\n if (event.ext[Extensions.TraceExt] && CoreUtils.objKeys(event.ext[Extensions.TraceExt]).length === 0) {\r\n delete event.ext[Extensions.TraceExt];\r\n }\r\n };\r\n return TelemetryContext;\r\n}());\r\nexport { TelemetryContext };\r\n//# sourceMappingURL=TelemetryContext.js.map","/**\r\n * PropertiesPlugin.ts\r\n * @copyright Microsoft 2018\r\n */\r\nimport * as tslib_1 from \"tslib\";\r\nimport { BaseTelemetryPlugin, CoreUtils, _InternalLogMessage, LoggingSeverity, _InternalMessageId, getNavigator } from '@microsoft/applicationinsights-core-js';\r\nimport { TelemetryContext } from './TelemetryContext';\r\nimport { PageView, BreezeChannelIdentifier, PropertiesPluginIdentifier, Extensions, Util } from '@microsoft/applicationinsights-common';\r\nvar PropertiesPlugin = /** @class */ (function (_super) {\r\n tslib_1.__extends(PropertiesPlugin, _super);\r\n function PropertiesPlugin() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.priority = 110;\r\n _this.identifier = PropertiesPluginIdentifier;\r\n return _this;\r\n }\r\n PropertiesPlugin.getDefaultConfig = function () {\r\n var defaultConfig = {\r\n instrumentationKey: function () { return undefined; },\r\n accountId: function () { return null; },\r\n sessionRenewalMs: function () { return 30 * 60 * 1000; },\r\n samplingPercentage: function () { return 100; },\r\n sessionExpirationMs: function () { return 24 * 60 * 60 * 1000; },\r\n cookieDomain: function () { return null; },\r\n sdkExtension: function () { return null; },\r\n isBrowserLinkTrackingEnabled: function () { return false; },\r\n appId: function () { return null; },\r\n namePrefix: function () { return undefined; }\r\n };\r\n return defaultConfig;\r\n };\r\n PropertiesPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n var _this = this;\r\n _super.prototype.initialize.call(this, config, core, extensions, pluginChain);\r\n var ctx = this._getTelCtx();\r\n var identifier = this.identifier;\r\n var defaultConfig = PropertiesPlugin.getDefaultConfig();\r\n this._extensionConfig = this._extensionConfig || PropertiesPlugin.getDefaultConfig();\r\n var _loop_1 = function (field) {\r\n this_1._extensionConfig[field] = function () { return ctx.getConfig(identifier, field, defaultConfig[field]()); };\r\n };\r\n var this_1 = this;\r\n for (var field in defaultConfig) {\r\n _loop_1(field);\r\n }\r\n this.context = new TelemetryContext(core.logger, this._extensionConfig);\r\n this._breezeChannel = Util.getExtension(extensions, BreezeChannelIdentifier);\r\n this.context.appId = function () { return _this._breezeChannel ? _this._breezeChannel[\"_appId\"] : null; };\r\n };\r\n /**\r\n * Add Part A fields to the event\r\n * @param event The event that needs to be processed\r\n */\r\n PropertiesPlugin.prototype.processTelemetry = function (event, itemCtx) {\r\n if (CoreUtils.isNullOrUndefined(event)) {\r\n // TODO(barustum): throw an internal event once we have support for internal logging\r\n }\r\n else {\r\n itemCtx = this._getTelCtx(itemCtx);\r\n // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\r\n if (event.name === PageView.envelopeType) {\r\n itemCtx.diagLog().resetInternalMessageCount();\r\n }\r\n if (this.context.session) {\r\n // If customer did not provide custom session id update the session manager\r\n if (typeof this.context.session.id !== \"string\") {\r\n this.context.sessionManager.update();\r\n }\r\n }\r\n this._processTelemetryInternal(event, itemCtx);\r\n if (this.context && this.context.user && this.context.user.isNewUser) {\r\n this.context.user.isNewUser = false;\r\n var message = new _InternalLogMessage(_InternalMessageId.SendBrowserInfoOnUserInit, ((getNavigator() || {}).userAgent || \"\"));\r\n itemCtx.diagLog().logInternalMessage(LoggingSeverity.CRITICAL, message);\r\n }\r\n this.processNext(event, itemCtx);\r\n }\r\n };\r\n PropertiesPlugin.prototype._processTelemetryInternal = function (event, itemCtx) {\r\n // set part A fields\r\n if (!event.tags) {\r\n event.tags = [];\r\n }\r\n if (!event.ext) {\r\n event.ext = {};\r\n }\r\n var ext = event.ext;\r\n ext[Extensions.DeviceExt] = ext[Extensions.DeviceExt] || {};\r\n ext[Extensions.WebExt] = ext[Extensions.WebExt] || {};\r\n ext[Extensions.UserExt] = ext[Extensions.UserExt] || {};\r\n ext[Extensions.OSExt] = ext[Extensions.OSExt] || {};\r\n ext[Extensions.AppExt] = ext[Extensions.AppExt] || {};\r\n ext[Extensions.TraceExt] = ext[Extensions.TraceExt] || {};\r\n var context = this.context;\r\n context.applySessionContext(event, itemCtx);\r\n context.applyApplicationContext(event, itemCtx);\r\n context.applyDeviceContext(event, itemCtx);\r\n context.applyOperationContext(event, itemCtx);\r\n context.applyUserContext(event, itemCtx);\r\n context.applyOperatingSystemContxt(event, itemCtx);\r\n context.applyWebContext(event, itemCtx);\r\n context.applyLocationContext(event, itemCtx); // legacy tags\r\n context.applyInternalContext(event, itemCtx); // legacy tags\r\n context.cleanUp(event, itemCtx);\r\n };\r\n return PropertiesPlugin;\r\n}(BaseTelemetryPlugin));\r\nexport default PropertiesPlugin;\r\n//# sourceMappingURL=PropertiesPlugin.js.map","/*!\n * Application Insights JavaScript SDK - Web, 2.5.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\n\r\n\r\nimport { CoreUtils, AppInsightsCore, LoggingSeverity, _InternalMessageId, hasWindow, hasDocument } from \"@microsoft/applicationinsights-core-js\";\r\nimport { ApplicationInsights } from \"@microsoft/applicationinsights-analytics-js\";\r\nimport { Sender } from \"@microsoft/applicationinsights-channel-js\";\r\nimport { PropertiesPlugin } from \"@microsoft/applicationinsights-properties-js\";\r\nimport { AjaxPlugin as DependenciesPlugin } from '@microsoft/applicationinsights-dependencies-js';\r\nimport * as Common from \"@microsoft/applicationinsights-common\";\r\n\"use strict\";\r\n;\r\n/**\r\n * Telemetry type classes, e.g. PageView, Exception, etc\r\n */\r\nexport var Telemetry = Common;\r\n/**\r\n * Application Insights API\r\n * @class Initialization\r\n * @implements {IApplicationInsights}\r\n */\r\nvar Initialization = /** @class */ (function () {\r\n function Initialization(snippet) {\r\n var _this = this;\r\n // initialize the queue and config in case they are undefined\r\n snippet.queue = snippet.queue || [];\r\n snippet.version = snippet.version || 2.0; // Default to new version\r\n var config = snippet.config || {};\r\n if (config.connectionString) {\r\n var cs = Common.ConnectionStringParser.parse(config.connectionString);\r\n var ingest = cs.ingestionendpoint;\r\n config.endpointUrl = ingest ? ingest + \"/v2/track\" : config.endpointUrl; // only add /v2/track when from connectionstring\r\n config.instrumentationKey = cs.instrumentationkey || config.instrumentationKey;\r\n }\r\n _this.appInsights = new ApplicationInsights();\r\n _this.properties = new PropertiesPlugin();\r\n _this.dependencies = new DependenciesPlugin();\r\n _this.core = new AppInsightsCore();\r\n _this.snippet = snippet;\r\n _this.config = config;\r\n _this.getSKUDefaults();\r\n }\r\n // Analytics Plugin\r\n /**\r\n * Log a user action or other occurrence.\r\n * @param {IEventTelemetry} event\r\n * @param {ICustomProperties} [customProperties]\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.trackEvent = function (event, customProperties) {\r\n this.appInsights.trackEvent(event, customProperties);\r\n };\r\n /**\r\n * Logs that a page, or similar container was displayed to the user.\r\n * @param {IPageViewTelemetry} pageView\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.trackPageView = function (pageView) {\r\n var inPv = pageView || {};\r\n this.appInsights.trackPageView(inPv);\r\n };\r\n /**\r\n * Log a bag of performance information via the customProperties field.\r\n * @param {IPageViewPerformanceTelemetry} pageViewPerformance\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.trackPageViewPerformance = function (pageViewPerformance) {\r\n var inPvp = pageViewPerformance || {};\r\n this.appInsights.trackPageViewPerformance(inPvp);\r\n };\r\n /**\r\n * Log an exception that you have caught.\r\n * @param {IExceptionTelemetry} exception\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.trackException = function (exception) {\r\n if (!exception.exception && exception.error) {\r\n exception.exception = exception.error;\r\n }\r\n this.appInsights.trackException(exception);\r\n };\r\n /**\r\n * Manually send uncaught exception telemetry. This method is automatically triggered\r\n * on a window.onerror event.\r\n * @param {IAutoExceptionTelemetry} exception\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype._onerror = function (exception) {\r\n this.appInsights._onerror(exception);\r\n };\r\n /**\r\n * Log a diagnostic scenario such entering or leaving a function.\r\n * @param {ITraceTelemetry} trace\r\n * @param {ICustomProperties} [customProperties]\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.trackTrace = function (trace, customProperties) {\r\n this.appInsights.trackTrace(trace, customProperties);\r\n };\r\n /**\r\n * Log a numeric value that is not associated with a specific event. Typically used\r\n * to send regular reports of performance indicators.\r\n *\r\n * To send a single measurement, just use the `name` and `average` fields\r\n * of {@link IMetricTelemetry}.\r\n *\r\n * If you take measurements frequently, you can reduce the telemetry bandwidth by\r\n * aggregating multiple measurements and sending the resulting average and modifying\r\n * the `sampleCount` field of {@link IMetricTelemetry}.\r\n * @param {IMetricTelemetry} metric input object argument. Only `name` and `average` are mandatory.\r\n * @param {ICustomProperties} [customProperties]\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.trackMetric = function (metric, customProperties) {\r\n this.appInsights.trackMetric(metric, customProperties);\r\n };\r\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 */\r\n Initialization.prototype.startTrackPage = function (name) {\r\n this.appInsights.startTrackPage(name);\r\n };\r\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 */\r\n Initialization.prototype.stopTrackPage = function (name, url, customProperties, measurements) {\r\n this.appInsights.stopTrackPage(name, url, customProperties, measurements);\r\n };\r\n Initialization.prototype.startTrackEvent = function (name) {\r\n this.appInsights.startTrackEvent(name);\r\n };\r\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 */\r\n Initialization.prototype.stopTrackEvent = function (name, properties, measurements) {\r\n this.appInsights.stopTrackEvent(name, properties, measurements); // Todo: Fix to pass measurements once type is updated\r\n };\r\n Initialization.prototype.addTelemetryInitializer = function (telemetryInitializer) {\r\n return this.appInsights.addTelemetryInitializer(telemetryInitializer);\r\n };\r\n // Properties Plugin\r\n /**\r\n * Set the authenticated user id and the account id. Used for identifying a specific signed-in user. Parameters must not contain whitespace or ,;=|\r\n *\r\n * The method will only set the `authenticatedUserId` and `accountId` in the current page view. To set them for the whole session, you should set `storeInCookie = true`\r\n * @param {string} authenticatedUserId\r\n * @param {string} [accountId]\r\n * @param {boolean} [storeInCookie=false]\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) {\r\n if (storeInCookie === void 0) { storeInCookie = false; }\r\n this.properties.context.user.setAuthenticatedUserContext(authenticatedUserId, accountId, storeInCookie);\r\n };\r\n /**\r\n * Clears the authenticated user id and account id. The associated cookie is cleared, if present.\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.clearAuthenticatedUserContext = function () {\r\n this.properties.context.user.clearAuthenticatedUserContext();\r\n };\r\n // Dependencies Plugin\r\n /**\r\n * Log a dependency call (e.g. ajax)\r\n * @param {IDependencyTelemetry} dependency\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.trackDependencyData = function (dependency) {\r\n this.dependencies.trackDependencyData(dependency);\r\n };\r\n // Misc\r\n /**\r\n * Manually trigger an immediate send of all telemetry still in the buffer.\r\n * @param {boolean} [async=true]\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.flush = function (async) {\r\n if (async === void 0) { async = true; }\r\n CoreUtils.arrForEach(this.core.getTransmissionControls(), function (channels) {\r\n CoreUtils.arrForEach(channels, function (channel) {\r\n channel.flush(async);\r\n });\r\n });\r\n };\r\n /**\r\n * Manually trigger an immediate send of all telemetry still in the buffer using beacon Sender.\r\n * Fall back to xhr sender if beacon is not supported.\r\n * @param {boolean} [async=true]\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.onunloadFlush = function (async) {\r\n if (async === void 0) { async = true; }\r\n CoreUtils.arrForEach(this.core.getTransmissionControls(), function (channels) {\r\n CoreUtils.arrForEach(channels, function (channel) {\r\n if (channel.onunloadFlush) {\r\n channel.onunloadFlush();\r\n }\r\n else {\r\n channel.flush(async);\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Initialize this instance of ApplicationInsights\r\n * @returns {IApplicationInsights}\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.loadAppInsights = function (legacyMode) {\r\n if (legacyMode === void 0) { legacyMode = false; }\r\n var _this = this;\r\n function _updateSnippetProperties(snippet) {\r\n if (snippet) {\r\n // apply updated properties to the global instance (snippet)\r\n for (var field in _this) {\r\n if (CoreUtils.isString(field) &&\r\n !CoreUtils.isFunction(_this[field]) &&\r\n field.substring(0, 1) !== \"_\") {\r\n snippet[field] = _this[field];\r\n }\r\n }\r\n }\r\n }\r\n // dont allow additional channels/other extensions for legacy mode; legacy mode is only to allow users to switch with no code changes!\r\n if (legacyMode && _this.config.extensions && _this.config.extensions.length > 0) {\r\n throw new Error(\"Extensions not allowed in legacy mode\");\r\n }\r\n var extensions = [];\r\n var appInsightsChannel = new Sender();\r\n extensions.push(appInsightsChannel);\r\n extensions.push(_this.properties);\r\n extensions.push(_this.dependencies);\r\n extensions.push(_this.appInsights);\r\n // initialize core\r\n _this.core.initialize(_this.config, extensions);\r\n _this.context = _this.properties.context;\r\n _updateSnippetProperties(_this.snippet);\r\n // Empty queue of all api calls logged prior to sdk download\r\n _this.emptyQueue();\r\n _this.pollInternalLogs();\r\n _this.addHousekeepingBeforeUnload(this);\r\n return _this;\r\n };\r\n /**\r\n * Overwrite the lazy loaded fields of global window snippet to contain the\r\n * actual initialized API methods\r\n * @param {Snippet} snippet\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.updateSnippetDefinitions = function (snippet) {\r\n // apply full appInsights to the global instance\r\n // Note: This must be called before loadAppInsights is called\r\n for (var field in this) {\r\n if (CoreUtils.isString(field)) {\r\n snippet[field] = this[field];\r\n }\r\n }\r\n };\r\n /**\r\n * Call any functions that were queued before the main script was loaded\r\n * @memberof Initialization\r\n */\r\n Initialization.prototype.emptyQueue = function () {\r\n var _this = this;\r\n // call functions that were queued before the main script was loaded\r\n try {\r\n if (Common.Util.isArray(_this.snippet.queue)) {\r\n // note: do not check length in the for-loop conditional in case something goes wrong and the stub methods are not overridden.\r\n var length_1 = _this.snippet.queue.length;\r\n for (var i = 0; i < length_1; i++) {\r\n var call = _this.snippet.queue[i];\r\n call();\r\n }\r\n _this.snippet.queue = undefined;\r\n delete _this.snippet.queue;\r\n }\r\n }\r\n catch (exception) {\r\n var properties = {};\r\n if (exception && CoreUtils.isFunction(exception.toString)) {\r\n properties.exception = exception.toString();\r\n }\r\n // need from core\r\n // Microsoft.ApplicationInsights._InternalLogging.throwInternal(\r\n // LoggingSeverity.WARNING,\r\n // _InternalMessageId.FailedToSendQueuedTelemetry,\r\n // \"Failed to send queued telemetry\",\r\n // properties);\r\n }\r\n };\r\n Initialization.prototype.pollInternalLogs = function () {\r\n this.core.pollInternalLogs();\r\n };\r\n Initialization.prototype.addHousekeepingBeforeUnload = function (appInsightsInstance) {\r\n // Add callback to push events when the user navigates away\r\n if (hasWindow() || hasDocument()) {\r\n var performHousekeeping = function () {\r\n // Adds the ability to flush all data before the page unloads.\r\n // Note: This approach tries to push a sync request with all the pending events onbeforeunload.\r\n // Firefox does not respect this.Other browsers DO push out the call with < 100% hit rate.\r\n // Telemetry here will help us analyze how effective this approach is.\r\n // Another approach would be to make this call sync with a acceptable timeout to reduce the\r\n // impact on user experience.\r\n // appInsightsInstance.context._sender.triggerSend();\r\n appInsightsInstance.onunloadFlush(false);\r\n // Back up the current session to local storage\r\n // This lets us close expired sessions after the cookies themselves expire\r\n var ext = appInsightsInstance.appInsights.core['_extensions'][Common.PropertiesPluginIdentifier];\r\n if (ext && ext.context && ext.context._sessionManager) {\r\n ext.context._sessionManager.backup();\r\n }\r\n };\r\n if (!appInsightsInstance.appInsights.config.disableFlushOnBeforeUnload) {\r\n // Hook the unload event for the document, window and body to ensure that the client events are flushed to the server\r\n // As just hooking the window does not always fire (on chrome) for page navigations.\r\n var added = CoreUtils.addEventHandler('beforeunload', performHousekeeping);\r\n added = CoreUtils.addEventHandler('pagehide', performHousekeeping) || added;\r\n if (!added) {\r\n appInsightsInstance.appInsights.core.logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.FailedToAddHandlerForOnBeforeUnload, 'Could not add handler for beforeunload and pagehide');\r\n }\r\n }\r\n // We also need to hook the pagehide event as not all versions of Safari support load/unload events.\r\n if (!appInsightsInstance.appInsights.config.disableFlushOnUnload) {\r\n // Not adding any telemetry as pagehide as it's not supported on all browsers\r\n CoreUtils.addEventHandler('pagehide', performHousekeeping);\r\n }\r\n }\r\n };\r\n Initialization.prototype.getSKUDefaults = function () {\r\n var _this = this;\r\n _this.config.diagnosticLogInterval =\r\n _this.config.diagnosticLogInterval && _this.config.diagnosticLogInterval > 0 ? _this.config.diagnosticLogInterval : 10000;\r\n };\r\n return Initialization;\r\n}());\r\nexport { Initialization };\r\n//# sourceMappingURL=Initialization.js.map","/*!\n * Application Insights JavaScript SDK - Web, 2.5.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { Util, ProcessLegacy } from \"@microsoft/applicationinsights-common\";\r\n// ToDo: fix properties and measurements once updates are done to common\r\nvar AppInsightsDeprecated = /** @class */ (function () {\r\n function AppInsightsDeprecated(snippet, appInsightsNew) {\r\n this._hasLegacyInitializers = false;\r\n this._queue = [];\r\n this.config = AppInsightsDeprecated.getDefaultConfig(snippet.config);\r\n this.appInsightsNew = appInsightsNew;\r\n this.context = { addTelemetryInitializer: this.addTelemetryInitializers.bind(this) };\r\n }\r\n AppInsightsDeprecated.getDefaultConfig = function (config) {\r\n if (!config) {\r\n config = {};\r\n }\r\n // set default values\r\n config.endpointUrl = config.endpointUrl || \"https://dc.services.visualstudio.com/v2/track\";\r\n config.sessionRenewalMs = 30 * 60 * 1000;\r\n config.sessionExpirationMs = 24 * 60 * 60 * 1000;\r\n config.maxBatchSizeInBytes = config.maxBatchSizeInBytes > 0 ? config.maxBatchSizeInBytes : 102400; // 100kb\r\n config.maxBatchInterval = !isNaN(config.maxBatchInterval) ? config.maxBatchInterval : 15000;\r\n config.enableDebug = Util.stringToBoolOrDefault(config.enableDebug);\r\n config.disableExceptionTracking = Util.stringToBoolOrDefault(config.disableExceptionTracking);\r\n config.disableTelemetry = Util.stringToBoolOrDefault(config.disableTelemetry);\r\n config.verboseLogging = Util.stringToBoolOrDefault(config.verboseLogging);\r\n config.emitLineDelimitedJson = Util.stringToBoolOrDefault(config.emitLineDelimitedJson);\r\n config.diagnosticLogInterval = config.diagnosticLogInterval || 10000;\r\n config.autoTrackPageVisitTime = Util.stringToBoolOrDefault(config.autoTrackPageVisitTime);\r\n if (isNaN(config.samplingPercentage) || config.samplingPercentage <= 0 || config.samplingPercentage >= 100) {\r\n config.samplingPercentage = 100;\r\n }\r\n config.disableAjaxTracking = Util.stringToBoolOrDefault(config.disableAjaxTracking);\r\n config.maxAjaxCallsPerView = !isNaN(config.maxAjaxCallsPerView) ? config.maxAjaxCallsPerView : 500;\r\n config.isBeaconApiDisabled = Util.stringToBoolOrDefault(config.isBeaconApiDisabled, true);\r\n config.disableCorrelationHeaders = Util.stringToBoolOrDefault(config.disableCorrelationHeaders);\r\n config.correlationHeaderExcludedDomains = config.correlationHeaderExcludedDomains || [\r\n \"*.blob.core.windows.net\",\r\n \"*.blob.core.chinacloudapi.cn\",\r\n \"*.blob.core.cloudapi.de\",\r\n \"*.blob.core.usgovcloudapi.net\"\r\n ];\r\n config.disableFlushOnBeforeUnload = Util.stringToBoolOrDefault(config.disableFlushOnBeforeUnload);\r\n config.disableFlushOnUnload = Util.stringToBoolOrDefault(config.disableFlushOnUnload, config.disableFlushOnBeforeUnload);\r\n config.enableSessionStorageBuffer = Util.stringToBoolOrDefault(config.enableSessionStorageBuffer, true);\r\n config.isRetryDisabled = Util.stringToBoolOrDefault(config.isRetryDisabled);\r\n config.isCookieUseDisabled = Util.stringToBoolOrDefault(config.isCookieUseDisabled);\r\n config.isStorageUseDisabled = Util.stringToBoolOrDefault(config.isStorageUseDisabled);\r\n config.isBrowserLinkTrackingEnabled = Util.stringToBoolOrDefault(config.isBrowserLinkTrackingEnabled);\r\n config.enableCorsCorrelation = Util.stringToBoolOrDefault(config.enableCorsCorrelation);\r\n return config;\r\n };\r\n /**\r\n * The array of telemetry initializers to call before sending each telemetry item.\r\n */\r\n AppInsightsDeprecated.prototype.addTelemetryInitializers = function (callBack) {\r\n var _this = this;\r\n // Add initializer to current processing only if there is any old telemetry initializer\r\n if (!this._hasLegacyInitializers) {\r\n this.appInsightsNew.addTelemetryInitializer(function (item) {\r\n _this._processLegacyInitializers(item); // setup call back for each legacy processor\r\n });\r\n this._hasLegacyInitializers = true;\r\n }\r\n this._queue.push(callBack);\r\n };\r\n AppInsightsDeprecated.prototype.startTrackPage = function (name) {\r\n this.appInsightsNew.startTrackPage(name);\r\n };\r\n AppInsightsDeprecated.prototype.stopTrackPage = function (name, url, properties, measurements) {\r\n this.appInsightsNew.stopTrackPage(name, url, properties); // update\r\n };\r\n AppInsightsDeprecated.prototype.trackPageView = function (name, url, properties, measurements, duration) {\r\n var telemetry = {\r\n name: name,\r\n uri: url,\r\n properties: properties,\r\n measurements: measurements\r\n };\r\n // fix for props, measurements, duration\r\n this.appInsightsNew.trackPageView(telemetry);\r\n };\r\n AppInsightsDeprecated.prototype.trackEvent = function (name, properties, measurements) {\r\n this.appInsightsNew.trackEvent({ name: name });\r\n };\r\n AppInsightsDeprecated.prototype.trackDependency = function (id, method, absoluteUrl, pathName, totalTime, success, resultCode) {\r\n this.appInsightsNew.trackDependencyData({\r\n id: id,\r\n target: absoluteUrl,\r\n type: pathName,\r\n duration: totalTime,\r\n properties: { HttpMethod: method },\r\n success: success,\r\n responseCode: resultCode\r\n });\r\n };\r\n AppInsightsDeprecated.prototype.trackException = function (exception, handledAt, properties, measurements, severityLevel) {\r\n this.appInsightsNew.trackException({\r\n exception: exception\r\n });\r\n };\r\n AppInsightsDeprecated.prototype.trackMetric = function (name, average, sampleCount, min, max, properties) {\r\n this.appInsightsNew.trackMetric({ name: name, average: average, sampleCount: sampleCount, min: min, max: max });\r\n };\r\n AppInsightsDeprecated.prototype.trackTrace = function (message, properties, severityLevel) {\r\n this.appInsightsNew.trackTrace({ message: message, severityLevel: severityLevel });\r\n };\r\n AppInsightsDeprecated.prototype.flush = function (async) {\r\n this.appInsightsNew.flush(async);\r\n };\r\n AppInsightsDeprecated.prototype.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) {\r\n this.appInsightsNew.context.user.setAuthenticatedUserContext(authenticatedUserId, accountId, storeInCookie);\r\n };\r\n AppInsightsDeprecated.prototype.clearAuthenticatedUserContext = function () {\r\n this.appInsightsNew.context.user.clearAuthenticatedUserContext();\r\n };\r\n AppInsightsDeprecated.prototype._onerror = function (message, url, lineNumber, columnNumber, error) {\r\n this.appInsightsNew._onerror({ message: message, url: url, lineNumber: lineNumber, columnNumber: columnNumber, error: error });\r\n };\r\n AppInsightsDeprecated.prototype.startTrackEvent = function (name) {\r\n this.appInsightsNew.startTrackEvent(name);\r\n };\r\n AppInsightsDeprecated.prototype.stopTrackEvent = function (name, properties, measurements) {\r\n this.appInsightsNew.stopTrackEvent(name, properties, measurements);\r\n };\r\n AppInsightsDeprecated.prototype.downloadAndSetup = function (config) {\r\n throw new Error(\"downloadAndSetup not implemented in web SKU\");\r\n };\r\n AppInsightsDeprecated.prototype.updateSnippetDefinitions = function (snippet) {\r\n // apply full appInsights to the global instance\r\n // Note: This must be called before loadAppInsights is called\r\n for (var field in this) {\r\n if (typeof field === 'string') {\r\n snippet[field] = this[field];\r\n }\r\n }\r\n };\r\n // note: these are split into methods to enable unit tests\r\n AppInsightsDeprecated.prototype.loadAppInsights = function () {\r\n // initialize global instance of appInsights\r\n // var appInsights = new Microsoft.ApplicationInsights.AppInsights(this.config);\r\n var _this = this;\r\n // implement legacy version of trackPageView for 0.10<\r\n if (this.config[\"iKey\"]) {\r\n var originalTrackPageView_1 = this.trackPageView;\r\n this.trackPageView = function (pagePath, properties, measurements) {\r\n originalTrackPageView_1.apply(_this, [null, pagePath, properties, measurements]);\r\n };\r\n }\r\n // implement legacy pageView interface if it is present in the snippet\r\n var legacyPageView = \"logPageView\";\r\n if (typeof this.snippet[legacyPageView] === \"function\") {\r\n this[legacyPageView] = function (pagePath, properties, measurements) {\r\n _this.trackPageView(null, pagePath, properties, measurements);\r\n };\r\n }\r\n // implement legacy event interface if it is present in the snippet\r\n var legacyEvent = \"logEvent\";\r\n if (typeof this.snippet[legacyEvent] === \"function\") {\r\n this[legacyEvent] = function (name, props, measurements) {\r\n _this.trackEvent(name, props, measurements);\r\n };\r\n }\r\n return this;\r\n };\r\n AppInsightsDeprecated.prototype._processLegacyInitializers = function (item) {\r\n // instead of mapping new to legacy and then back again and repeating in channel, attach callback for channel to call\r\n item.tags[ProcessLegacy] = this._queue;\r\n return item;\r\n };\r\n return AppInsightsDeprecated;\r\n}());\r\nexport { AppInsightsDeprecated };\r\n//# sourceMappingURL=ApplicationInsightsDeprecated.js.map","/*!\n * Application Insights JavaScript SDK - Web, 2.5.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nimport { AppInsightsDeprecated } from \"./ApplicationInsightsDeprecated\";\r\nimport { Initialization as ApplicationInsights } from \"./Initialization\";\r\nvar ApplicationInsightsContainer = /** @class */ (function () {\r\n function ApplicationInsightsContainer() {\r\n }\r\n ApplicationInsightsContainer.getAppInsights = function (snippet, version) {\r\n var initialization = new ApplicationInsights(snippet);\r\n var legacyMode = version !== 2.0 ? true : false;\r\n // Two target scenarios:\r\n // 1. Customer runs v1 snippet + runtime. If customer updates just cdn location to new SDK, it will run in compat mode so old apis work\r\n // 2. Customer updates to new snippet (that uses cdn location to new SDK. This is same as a new customer onboarding\r\n // and all api signatures are expected to map to new SDK. Note new snippet specifies version\r\n if (version === 2.0) {\r\n initialization.updateSnippetDefinitions(snippet);\r\n initialization.loadAppInsights(legacyMode);\r\n return initialization; // default behavior with new snippet\r\n }\r\n else {\r\n var legacy = new AppInsightsDeprecated(snippet, initialization); // target scenario old snippet + updated endpoint\r\n legacy.updateSnippetDefinitions(snippet);\r\n initialization.loadAppInsights(legacyMode);\r\n return legacy;\r\n }\r\n };\r\n return ApplicationInsightsContainer;\r\n}());\r\nexport { ApplicationInsightsContainer };\r\n//# sourceMappingURL=ApplicationInsightsContainer.js.map","/*!\n * Application Insights JavaScript SDK - Web, 2.5.4\n * Copyright (c) Microsoft and contributors. All rights reserved.\n */\nexport { Initialization as ApplicationInsights, Telemetry } from \"./Initialization\";\r\nexport { ApplicationInsightsContainer } from \"./ApplicationInsightsContainer\";\r\n// Re-exports\r\nexport { AppInsightsCore, LoggingSeverity, _InternalMessageId } from \"@microsoft/applicationinsights-core-js\";\r\nexport { Util, SeverityLevel, Event, Exception, Metric, PageView, PageViewPerformance, RemoteDependencyData, Trace, DistributedTracingModes } from \"@microsoft/applicationinsights-common\";\r\nexport { Sender } from \"@microsoft/applicationinsights-channel-js\";\r\nexport { ApplicationInsights as ApplicationAnalytics } from \"@microsoft/applicationinsights-analytics-js\";\r\nexport { PropertiesPlugin } from \"@microsoft/applicationinsights-properties-js\";\r\nexport { AjaxPlugin as DependenciesPlugin } from \"@microsoft/applicationinsights-dependencies-js\";\r\n//# sourceMappingURL=applicationinsights-web.js.map"],"sourceRoot":""}