@microsoft/applicationinsights-dependencies-js 3.1.1-nightly3.2403-02 → 3.1.1-nightly3.2403-04

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/browser/es5/applicationinsights-dependencies-js.cjs.js +296 -297
  2. package/browser/es5/applicationinsights-dependencies-js.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-dependencies-js.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-dependencies-js.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-dependencies-js.gbl.js +298 -299
  6. package/browser/es5/applicationinsights-dependencies-js.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-dependencies-js.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-dependencies-js.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-dependencies-js.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-dependencies-js.js +298 -299
  11. package/browser/es5/applicationinsights-dependencies-js.js.map +1 -1
  12. package/browser/es5/applicationinsights-dependencies-js.min.js +2 -2
  13. package/browser/es5/applicationinsights-dependencies-js.min.js.map +1 -1
  14. package/dist/es5/applicationinsights-dependencies-js.js +296 -297
  15. package/dist/es5/applicationinsights-dependencies-js.js.map +1 -1
  16. package/dist/es5/applicationinsights-dependencies-js.min.js +2 -2
  17. package/dist/es5/applicationinsights-dependencies-js.min.js.map +1 -1
  18. package/dist-es5/DependencyInitializer.js +1 -1
  19. package/dist-es5/DependencyListener.js +1 -1
  20. package/dist-es5/InternalConstants.js +1 -1
  21. package/dist-es5/__DynamicConstants.js +1 -1
  22. package/dist-es5/ajax.js +1 -1
  23. package/dist-es5/ajaxRecord.js +1 -1
  24. package/dist-es5/ajaxUtils.js +1 -1
  25. package/dist-es5/applicationinsights-dependencies-js.js +1 -1
  26. package/package.json +3 -3
  27. package/types/applicationinsights-dependencies-js.d.ts +1 -1
  28. package/types/applicationinsights-dependencies-js.namespaced.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Dependencies Plugin, 3.1.1-nightly3.2403-02
2
+ * Application Insights JavaScript SDK - Dependencies Plugin, 3.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -7,8 +7,8 @@
7
7
  typeof exports === "object" && typeof module !== undef ? factory(exports) :
8
8
  typeof define === "function" && define.amd ? define(["exports"], factory) :
9
9
  (function(global){
10
- var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_dependencies_js_3_1_1_nightly3_2403_02", msMod="__ms$mod__";
11
- var mods={}, modDetail=mods[modName]={}, ver="3.1.1-nightly3.2403-02";
10
+ var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_dependencies_js_3_1_1_nightly3_2403_04", msMod="__ms$mod__";
11
+ var mods={}, modDetail=mods[modName]={}, ver="3.1.1-nightly3.2403-04";
12
12
  var baseNs=global, nsKey="Microsoft", baseNs=baseNs[nsKey]=(baseNs[nsKey]||{});
13
13
  // Versioned namespace "Microsoft.ApplicationInsights3"
14
14
  var exportNs=baseNs, nsKey="ApplicationInsights3", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
@@ -1179,80 +1179,20 @@ var STR_PRIORITY = "priority";
1179
1179
  var STR_GET_PERF_MGR = "getPerfMgr";
1180
1180
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1181
1181
 
1182
- var strGetPrototypeOf = "getPrototypeOf";
1183
- var rCamelCase = /-([a-z])/g;
1184
- var rNormalizeInvalid = /([^\w\d_$])/g;
1185
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
1186
- var _getObjProto = Object[strGetPrototypeOf];
1187
- function isNotNullOrUndefined(value) {
1188
- return !isNullOrUndefined(value);
1189
- }
1190
- function normalizeJsName(name) {
1191
- var value = name;
1192
- if (value && isString(value)) {
1193
- value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1194
- return letter.toUpperCase();
1195
- });
1196
- value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1197
- value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1198
- return "_" + match;
1199
- });
1200
- }
1201
- return value;
1202
- }
1203
- function strContains(value, search) {
1204
- if (value && search) {
1205
- return strIndexOf(value, search) !== -1;
1206
- }
1207
- return false;
1208
- }
1209
- function toISOString(date) {
1210
- return date && date.toISOString() || "";
1211
- }
1212
- function getExceptionName(object) {
1213
- if (isError(object)) {
1214
- return object[_DYN_NAME$2 ];
1215
- }
1216
- return STR_EMPTY;
1217
- }
1218
- function _createProxyFunction(source, funcName) {
1219
- var srcFunc = null;
1220
- var src = null;
1221
- if (isFunction(source)) {
1222
- srcFunc = source;
1223
- }
1224
- else {
1225
- src = source;
1182
+ var _aiNamespace = null;
1183
+ function _getExtensionNamespace() {
1184
+ var target = getInst("Microsoft");
1185
+ if (target) {
1186
+ _aiNamespace = target["ApplicationInsights"];
1226
1187
  }
1227
- return function () {
1228
- var originalArguments = arguments;
1229
- if (srcFunc) {
1230
- src = srcFunc();
1231
- }
1232
- if (src) {
1233
- return src[funcName][_DYN_APPLY ](src, originalArguments);
1234
- }
1235
- };
1188
+ return _aiNamespace;
1236
1189
  }
1237
- function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1238
- if (target && name && source) {
1239
- if (overwriteTarget !== false || isUndefined(target[name])) {
1240
- target[name] = _createProxyFunction(source, theFunc);
1241
- }
1190
+ function getDebugExt(config) {
1191
+ var ns = _aiNamespace;
1192
+ if (!ns && config.disableDbgExt !== true) {
1193
+ ns = _aiNamespace || _getExtensionNamespace();
1242
1194
  }
1243
- }
1244
- function createClassFromInterface(defaults) {
1245
- return /** @class */ (function () {
1246
- function class_1() {
1247
- var _this = this;
1248
- if (defaults) {
1249
- objForEachKey(defaults, function (field, value) {
1250
- _this[field] = value;
1251
- });
1252
- }
1253
- }
1254
- return class_1;
1255
- }());
1195
+ return ns ? ns["ChromeDbgExt"] : null;
1256
1196
  }
1257
1197
 
1258
1198
  var strDocumentMode = "documentMode";
@@ -1307,36 +1247,294 @@ function isIE() {
1307
1247
  var userAgent = (_navUserAgentCheck || STR_EMPTY)[_DYN_TO_LOWER_CASE$2 ]();
1308
1248
  _isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
1309
1249
  }
1310
- return _isTrident;
1250
+ return _isTrident;
1251
+ }
1252
+ function getIEVersion(userAgentStr) {
1253
+ if (userAgentStr === void 0) { userAgentStr = null; }
1254
+ if (!userAgentStr) {
1255
+ var navigator_1 = getNavigator() || {};
1256
+ userAgentStr = navigator_1 ? (navigator_1.userAgent || STR_EMPTY)[_DYN_TO_LOWER_CASE$2 ]() : STR_EMPTY;
1257
+ }
1258
+ var ua = (userAgentStr || STR_EMPTY)[_DYN_TO_LOWER_CASE$2 ]();
1259
+ if (strContains(ua, strMsie)) {
1260
+ var doc = getDocument() || {};
1261
+ return Math.max(parseInt(ua[_DYN_SPLIT$1 ](strMsie)[1]), (doc[strDocumentMode] || 0));
1262
+ }
1263
+ else if (strContains(ua, strTrident)) {
1264
+ var tridentVer = parseInt(ua[_DYN_SPLIT$1 ](strTrident)[1]);
1265
+ if (tridentVer) {
1266
+ return tridentVer + 4;
1267
+ }
1268
+ }
1269
+ return null;
1270
+ }
1271
+ function isXhrSupported() {
1272
+ var isSupported = false;
1273
+ try {
1274
+ var xmlHttpRequest = getInst(strXMLHttpRequest);
1275
+ isSupported = !!xmlHttpRequest;
1276
+ }
1277
+ catch (e) {
1278
+ }
1279
+ return isSupported;
1280
+ }
1281
+
1282
+ var _a$2;
1283
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
1284
+ var AiNonUserActionablePrefix = "AI (Internal): ";
1285
+ var AiUserActionablePrefix = "AI: ";
1286
+ var AIInternalMessagePrefix = "AITR_";
1287
+ var defaultValues$1 = {
1288
+ loggingLevelConsole: 0,
1289
+ loggingLevelTelemetry: 1,
1290
+ maxMessageLimit: 25,
1291
+ enableDebug: false
1292
+ };
1293
+ var _logFuncs = (_a$2 = {},
1294
+ _a$2[0 ] = null,
1295
+ _a$2[1 ] = "errorToConsole",
1296
+ _a$2[2 ] = STR_WARN_TO_CONSOLE,
1297
+ _a$2[3 ] = "debugToConsole",
1298
+ _a$2);
1299
+ function _sanitizeDiagnosticText(text) {
1300
+ if (text) {
1301
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1302
+ }
1303
+ return STR_EMPTY;
1304
+ }
1305
+ function _logToConsole(func, message) {
1306
+ var theConsole = getConsole();
1307
+ if (!!theConsole) {
1308
+ var logFunc = "log";
1309
+ if (theConsole[func]) {
1310
+ logFunc = func;
1311
+ }
1312
+ if (isFunction(theConsole[logFunc])) {
1313
+ theConsole[logFunc](message);
1314
+ }
1315
+ }
1316
+ }
1317
+ var _InternalLogMessage = /** @class */ (function () {
1318
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1319
+ if (isUserAct === void 0) { isUserAct = false; }
1320
+ var _self = this;
1321
+ _self[_DYN_MESSAGE_ID ] = msgId;
1322
+ _self[_DYN_MESSAGE ] =
1323
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1324
+ msgId;
1325
+ var strProps = STR_EMPTY;
1326
+ if (hasJSON()) {
1327
+ strProps = getJSON().stringify(properties);
1328
+ }
1329
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1330
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1331
+ _self[_DYN_MESSAGE ] += diagnosticText;
1332
+ }
1333
+ _InternalLogMessage.dataType = "MessageData";
1334
+ return _InternalLogMessage;
1335
+ }());
1336
+ function safeGetLogger(core, config) {
1337
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1338
+ }
1339
+ var DiagnosticLogger = /** @class */ (function () {
1340
+ function DiagnosticLogger(config) {
1341
+ this.identifier = "DiagnosticLogger";
1342
+ this.queue = [];
1343
+ var _messageCount = 0;
1344
+ var _messageLogged = {};
1345
+ var _loggingLevelConsole;
1346
+ var _loggingLevelTelemetry;
1347
+ var _maxInternalMessageLimit;
1348
+ var _enableDebug;
1349
+ var _unloadHandler;
1350
+ dynamicProto(DiagnosticLogger, this, function (_self) {
1351
+ _unloadHandler = _setDefaultsFromConfig(config || {});
1352
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1353
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1354
+ if (isUserAct === void 0) { isUserAct = false; }
1355
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1356
+ if (_enableDebug) {
1357
+ throw dumpObj(message);
1358
+ }
1359
+ else {
1360
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1361
+ if (!isUndefined(message[_DYN_MESSAGE ])) {
1362
+ if (isUserAct) {
1363
+ var messageKey = +message[_DYN_MESSAGE_ID ];
1364
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1365
+ _self[logFunc](message[_DYN_MESSAGE ]);
1366
+ _messageLogged[messageKey] = true;
1367
+ }
1368
+ }
1369
+ else {
1370
+ if (_loggingLevelConsole >= severity) {
1371
+ _self[logFunc](message[_DYN_MESSAGE ]);
1372
+ }
1373
+ }
1374
+ _logInternalMessage(severity, message);
1375
+ }
1376
+ else {
1377
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1378
+ }
1379
+ }
1380
+ };
1381
+ _self.debugToConsole = function (message) {
1382
+ _logToConsole("debug", message);
1383
+ _debugExtMsg("warning", message);
1384
+ };
1385
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1386
+ _logToConsole("warn", message);
1387
+ _debugExtMsg("warning", message);
1388
+ };
1389
+ _self.errorToConsole = function (message) {
1390
+ _logToConsole("error", message);
1391
+ _debugExtMsg("error", message);
1392
+ };
1393
+ _self.resetInternalMessageCount = function () {
1394
+ _messageCount = 0;
1395
+ _messageLogged = {};
1396
+ };
1397
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1398
+ _self[_DYN_UNLOAD ] = function (isAsync) {
1399
+ _unloadHandler && _unloadHandler.rm();
1400
+ _unloadHandler = null;
1401
+ };
1402
+ function _logInternalMessage(severity, message) {
1403
+ if (_areInternalMessagesThrottled()) {
1404
+ return;
1405
+ }
1406
+ var logMessage = true;
1407
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1408
+ if (_messageLogged[messageKey]) {
1409
+ logMessage = false;
1410
+ }
1411
+ else {
1412
+ _messageLogged[messageKey] = true;
1413
+ }
1414
+ if (logMessage) {
1415
+ if (severity <= _loggingLevelTelemetry) {
1416
+ _self.queue[_DYN_PUSH ](message);
1417
+ _messageCount++;
1418
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1419
+ }
1420
+ if (_messageCount === _maxInternalMessageLimit) {
1421
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1422
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1423
+ _self.queue[_DYN_PUSH ](throttleMessage);
1424
+ if (severity === 1 ) {
1425
+ _self.errorToConsole(throttleLimitMessage);
1426
+ }
1427
+ else {
1428
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1429
+ }
1430
+ }
1431
+ }
1432
+ }
1433
+ function _setDefaultsFromConfig(config) {
1434
+ return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
1435
+ var config = details.cfg;
1436
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1437
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
1438
+ _maxInternalMessageLimit = config.maxMessageLimit;
1439
+ _enableDebug = config.enableDebug;
1440
+ });
1441
+ }
1442
+ function _areInternalMessagesThrottled() {
1443
+ return _messageCount >= _maxInternalMessageLimit;
1444
+ }
1445
+ function _debugExtMsg(name, data) {
1446
+ var dbgExt = getDebugExt(config || {});
1447
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1448
+ dbgExt[_DYN_DIAG_LOG ](name, data);
1449
+ }
1450
+ }
1451
+ });
1452
+ }
1453
+ DiagnosticLogger.__ieDyn=1;
1454
+ return DiagnosticLogger;
1455
+ }());
1456
+ function _getLogger(logger) {
1457
+ return (logger || new DiagnosticLogger());
1458
+ }
1459
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1460
+ if (isUserAct === void 0) { isUserAct = false; }
1461
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1462
+ }
1463
+
1464
+ var strGetPrototypeOf = "getPrototypeOf";
1465
+ var rCamelCase = /-([a-z])/g;
1466
+ var rNormalizeInvalid = /([^\w\d_$])/g;
1467
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
1468
+ var _getObjProto = Object[strGetPrototypeOf];
1469
+ function isNotNullOrUndefined(value) {
1470
+ return !isNullOrUndefined(value);
1471
+ }
1472
+ function normalizeJsName(name) {
1473
+ var value = name;
1474
+ if (value && isString(value)) {
1475
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1476
+ return letter.toUpperCase();
1477
+ });
1478
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1479
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1480
+ return "_" + match;
1481
+ });
1482
+ }
1483
+ return value;
1484
+ }
1485
+ function strContains(value, search) {
1486
+ if (value && search) {
1487
+ return strIndexOf(value, search) !== -1;
1488
+ }
1489
+ return false;
1490
+ }
1491
+ function toISOString(date) {
1492
+ return date && date.toISOString() || "";
1493
+ }
1494
+ function getExceptionName(object) {
1495
+ if (isError(object)) {
1496
+ return object[_DYN_NAME$2 ];
1497
+ }
1498
+ return STR_EMPTY;
1311
1499
  }
1312
- function getIEVersion(userAgentStr) {
1313
- if (userAgentStr === void 0) { userAgentStr = null; }
1314
- if (!userAgentStr) {
1315
- var navigator_1 = getNavigator() || {};
1316
- userAgentStr = navigator_1 ? (navigator_1.userAgent || STR_EMPTY)[_DYN_TO_LOWER_CASE$2 ]() : STR_EMPTY;
1500
+ function _createProxyFunction(source, funcName) {
1501
+ var srcFunc = null;
1502
+ var src = null;
1503
+ if (isFunction(source)) {
1504
+ srcFunc = source;
1317
1505
  }
1318
- var ua = (userAgentStr || STR_EMPTY)[_DYN_TO_LOWER_CASE$2 ]();
1319
- if (strContains(ua, strMsie)) {
1320
- var doc = getDocument() || {};
1321
- return Math.max(parseInt(ua[_DYN_SPLIT$1 ](strMsie)[1]), (doc[strDocumentMode] || 0));
1506
+ else {
1507
+ src = source;
1322
1508
  }
1323
- else if (strContains(ua, strTrident)) {
1324
- var tridentVer = parseInt(ua[_DYN_SPLIT$1 ](strTrident)[1]);
1325
- if (tridentVer) {
1326
- return tridentVer + 4;
1509
+ return function () {
1510
+ var originalArguments = arguments;
1511
+ if (srcFunc) {
1512
+ src = srcFunc();
1327
1513
  }
1328
- }
1329
- return null;
1514
+ if (src) {
1515
+ return src[funcName][_DYN_APPLY ](src, originalArguments);
1516
+ }
1517
+ };
1330
1518
  }
1331
- function isXhrSupported() {
1332
- var isSupported = false;
1333
- try {
1334
- var xmlHttpRequest = getInst(strXMLHttpRequest);
1335
- isSupported = !!xmlHttpRequest;
1336
- }
1337
- catch (e) {
1519
+ function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1520
+ if (target && name && source) {
1521
+ if (overwriteTarget !== false || isUndefined(target[name])) {
1522
+ target[name] = _createProxyFunction(source, theFunc);
1523
+ }
1338
1524
  }
1339
- return isSupported;
1525
+ }
1526
+ function createClassFromInterface(defaults) {
1527
+ return /** @class */ (function () {
1528
+ function class_1() {
1529
+ var _this = this;
1530
+ if (defaults) {
1531
+ objForEachKey(defaults, function (field, value) {
1532
+ _this[field] = value;
1533
+ });
1534
+ }
1535
+ }
1536
+ return class_1;
1537
+ }());
1340
1538
  }
1341
1539
 
1342
1540
  var UInt32Mask = 0x100000000;
@@ -2078,204 +2276,6 @@ function onConfigChange(config, configHandler, logger) {
2078
2276
  return createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
2079
2277
  }
2080
2278
 
2081
- var _aiNamespace = null;
2082
- function _getExtensionNamespace() {
2083
- var target = getInst("Microsoft");
2084
- if (target) {
2085
- _aiNamespace = target["ApplicationInsights"];
2086
- }
2087
- return _aiNamespace;
2088
- }
2089
- function getDebugExt(config) {
2090
- var ns = _aiNamespace;
2091
- if (!ns && config.disableDbgExt !== true) {
2092
- ns = _aiNamespace || _getExtensionNamespace();
2093
- }
2094
- return ns ? ns["ChromeDbgExt"] : null;
2095
- }
2096
-
2097
- var _a$2;
2098
- var STR_WARN_TO_CONSOLE = "warnToConsole";
2099
- var AiNonUserActionablePrefix = "AI (Internal): ";
2100
- var AiUserActionablePrefix = "AI: ";
2101
- var AIInternalMessagePrefix = "AITR_";
2102
- var defaultValues$1 = {
2103
- loggingLevelConsole: 0,
2104
- loggingLevelTelemetry: 1,
2105
- maxMessageLimit: 25,
2106
- enableDebug: false
2107
- };
2108
- var _logFuncs = (_a$2 = {},
2109
- _a$2[0 ] = null,
2110
- _a$2[1 ] = "errorToConsole",
2111
- _a$2[2 ] = STR_WARN_TO_CONSOLE,
2112
- _a$2[3 ] = "debugToConsole",
2113
- _a$2);
2114
- function _sanitizeDiagnosticText(text) {
2115
- if (text) {
2116
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
2117
- }
2118
- return STR_EMPTY;
2119
- }
2120
- function _logToConsole(func, message) {
2121
- var theConsole = getConsole();
2122
- if (!!theConsole) {
2123
- var logFunc = "log";
2124
- if (theConsole[func]) {
2125
- logFunc = func;
2126
- }
2127
- if (isFunction(theConsole[logFunc])) {
2128
- theConsole[logFunc](message);
2129
- }
2130
- }
2131
- }
2132
- var _InternalLogMessage = /** @class */ (function () {
2133
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
2134
- if (isUserAct === void 0) { isUserAct = false; }
2135
- var _self = this;
2136
- _self[_DYN_MESSAGE_ID ] = msgId;
2137
- _self[_DYN_MESSAGE ] =
2138
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
2139
- msgId;
2140
- var strProps = STR_EMPTY;
2141
- if (hasJSON()) {
2142
- strProps = getJSON().stringify(properties);
2143
- }
2144
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
2145
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
2146
- _self[_DYN_MESSAGE ] += diagnosticText;
2147
- }
2148
- _InternalLogMessage.dataType = "MessageData";
2149
- return _InternalLogMessage;
2150
- }());
2151
- function safeGetLogger(core, config) {
2152
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
2153
- }
2154
- var DiagnosticLogger = /** @class */ (function () {
2155
- function DiagnosticLogger(config) {
2156
- this.identifier = "DiagnosticLogger";
2157
- this.queue = [];
2158
- var _messageCount = 0;
2159
- var _messageLogged = {};
2160
- var _loggingLevelConsole;
2161
- var _loggingLevelTelemetry;
2162
- var _maxInternalMessageLimit;
2163
- var _enableDebug;
2164
- var _unloadHandler;
2165
- dynamicProto(DiagnosticLogger, this, function (_self) {
2166
- _unloadHandler = _setDefaultsFromConfig(config || {});
2167
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2168
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2169
- if (isUserAct === void 0) { isUserAct = false; }
2170
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2171
- if (_enableDebug) {
2172
- throw dumpObj(message);
2173
- }
2174
- else {
2175
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2176
- if (!isUndefined(message[_DYN_MESSAGE ])) {
2177
- if (isUserAct) {
2178
- var messageKey = +message[_DYN_MESSAGE_ID ];
2179
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2180
- _self[logFunc](message[_DYN_MESSAGE ]);
2181
- _messageLogged[messageKey] = true;
2182
- }
2183
- }
2184
- else {
2185
- if (_loggingLevelConsole >= severity) {
2186
- _self[logFunc](message[_DYN_MESSAGE ]);
2187
- }
2188
- }
2189
- _logInternalMessage(severity, message);
2190
- }
2191
- else {
2192
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2193
- }
2194
- }
2195
- };
2196
- _self.debugToConsole = function (message) {
2197
- _logToConsole("debug", message);
2198
- _debugExtMsg("warning", message);
2199
- };
2200
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2201
- _logToConsole("warn", message);
2202
- _debugExtMsg("warning", message);
2203
- };
2204
- _self.errorToConsole = function (message) {
2205
- _logToConsole("error", message);
2206
- _debugExtMsg("error", message);
2207
- };
2208
- _self.resetInternalMessageCount = function () {
2209
- _messageCount = 0;
2210
- _messageLogged = {};
2211
- };
2212
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2213
- _self[_DYN_UNLOAD ] = function (isAsync) {
2214
- _unloadHandler && _unloadHandler.rm();
2215
- _unloadHandler = null;
2216
- };
2217
- function _logInternalMessage(severity, message) {
2218
- if (_areInternalMessagesThrottled()) {
2219
- return;
2220
- }
2221
- var logMessage = true;
2222
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2223
- if (_messageLogged[messageKey]) {
2224
- logMessage = false;
2225
- }
2226
- else {
2227
- _messageLogged[messageKey] = true;
2228
- }
2229
- if (logMessage) {
2230
- if (severity <= _loggingLevelTelemetry) {
2231
- _self.queue[_DYN_PUSH ](message);
2232
- _messageCount++;
2233
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2234
- }
2235
- if (_messageCount === _maxInternalMessageLimit) {
2236
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2237
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2238
- _self.queue[_DYN_PUSH ](throttleMessage);
2239
- if (severity === 1 ) {
2240
- _self.errorToConsole(throttleLimitMessage);
2241
- }
2242
- else {
2243
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2244
- }
2245
- }
2246
- }
2247
- }
2248
- function _setDefaultsFromConfig(config) {
2249
- return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
2250
- var config = details.cfg;
2251
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2252
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
2253
- _maxInternalMessageLimit = config.maxMessageLimit;
2254
- _enableDebug = config.enableDebug;
2255
- });
2256
- }
2257
- function _areInternalMessagesThrottled() {
2258
- return _messageCount >= _maxInternalMessageLimit;
2259
- }
2260
- function _debugExtMsg(name, data) {
2261
- var dbgExt = getDebugExt(config || {});
2262
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2263
- dbgExt[_DYN_DIAG_LOG ](name, data);
2264
- }
2265
- }
2266
- });
2267
- }
2268
- DiagnosticLogger.__ieDyn=1;
2269
- return DiagnosticLogger;
2270
- }());
2271
- function _getLogger(logger) {
2272
- return (logger || new DiagnosticLogger());
2273
- }
2274
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2275
- if (isUserAct === void 0) { isUserAct = false; }
2276
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2277
- }
2278
-
2279
2279
  var strExecutionContextKey = "ctx";
2280
2280
  var strParentContextKey = "ParentContextKey";
2281
2281
  var strChildrenContextKey = "ChildrenContextKey";
@@ -3301,7 +3301,6 @@ var RequestHeaders = createValueMap({
3301
3301
  var _DYN_SPLIT = "split";
3302
3302
  var _DYN_LENGTH$1 = "length";
3303
3303
  var _DYN_TO_LOWER_CASE$1 = "toLowerCase";
3304
- var _DYN_DATA = "data";
3305
3304
  var _DYN_NAME$1 = "name";
3306
3305
  var _DYN_STRINGIFY = "stringify";
3307
3306
  var _DYN_PATHNAME = "pathname";
@@ -3670,7 +3669,7 @@ var RemoteDependencyData = /** @class */ (function () {
3670
3669
  _self.resultCode = resultCode + "";
3671
3670
  _self.type = dataSanitizeString(logger, requestAPI);
3672
3671
  var dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);
3673
- _self[_DYN_DATA ] = dataSanitizeUrl(logger, commandName) || dependencyFields[_DYN_DATA ];
3672
+ _self.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data;
3674
3673
  _self.target = dataSanitizeString(logger, dependencyFields.target);
3675
3674
  if (correlationContext) {
3676
3675
  _self.target = "".concat(_self.target, " | ").concat(correlationContext);
@@ -3790,7 +3789,7 @@ function createTelemetryItem(item, baseType, envelopeName, logger, customPropert
3790
3789
  _a);
3791
3790
  if (!isNullOrUndefined(customProperties)) {
3792
3791
  objForEachKey(customProperties, function (prop, value) {
3793
- telemetryItem[_DYN_DATA ][prop] = value;
3792
+ telemetryItem.data[prop] = value;
3794
3793
  });
3795
3794
  }
3796
3795
  return telemetryItem;