@microsoft/applicationinsights-teechannel-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 (45) hide show
  1. package/browser/es5/{applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.cjs.js → applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.cjs.js} +230 -230
  2. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.cjs.js.map +1 -0
  3. package/browser/es5/{applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.cjs.min.js → applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.cjs.min.js} +3 -3
  4. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.cjs.min.js.map +1 -0
  5. package/browser/es5/{applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.gbl.js → applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.gbl.js} +232 -232
  6. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.gbl.js.map +1 -0
  7. package/browser/es5/{applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.gbl.min.js → applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.gbl.min.js} +3 -3
  8. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.gbl.min.js.map +1 -0
  9. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.integrity.json +66 -0
  10. package/browser/es5/{applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.js → applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.js} +232 -232
  11. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.js.map +1 -0
  12. package/browser/es5/{applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.min.js → applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.min.js} +3 -3
  13. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-04.min.js.map +1 -0
  14. package/browser/es5/applicationinsights-teechannel-js.3.cjs.js +229 -229
  15. package/browser/es5/applicationinsights-teechannel-js.3.cjs.js.map +1 -1
  16. package/browser/es5/applicationinsights-teechannel-js.3.cjs.min.js +2 -2
  17. package/browser/es5/applicationinsights-teechannel-js.3.cjs.min.js.map +1 -1
  18. package/browser/es5/applicationinsights-teechannel-js.3.gbl.js +231 -231
  19. package/browser/es5/applicationinsights-teechannel-js.3.gbl.js.map +1 -1
  20. package/browser/es5/applicationinsights-teechannel-js.3.gbl.min.js +2 -2
  21. package/browser/es5/applicationinsights-teechannel-js.3.gbl.min.js.map +1 -1
  22. package/browser/es5/applicationinsights-teechannel-js.3.integrity.json +25 -25
  23. package/browser/es5/applicationinsights-teechannel-js.3.js +231 -231
  24. package/browser/es5/applicationinsights-teechannel-js.3.js.map +1 -1
  25. package/browser/es5/applicationinsights-teechannel-js.3.min.js +2 -2
  26. package/browser/es5/applicationinsights-teechannel-js.3.min.js.map +1 -1
  27. package/dist/es5/applicationinsights-teechannel-js.js +229 -229
  28. package/dist/es5/applicationinsights-teechannel-js.js.map +1 -1
  29. package/dist/es5/applicationinsights-teechannel-js.min.js +2 -2
  30. package/dist/es5/applicationinsights-teechannel-js.min.js.map +1 -1
  31. package/dist-es5/ChannelController.js +1 -1
  32. package/dist-es5/Interfaces/ITeeChannelConfig.js +1 -1
  33. package/dist-es5/TeeChannel.js +1 -1
  34. package/dist-es5/__DynamicConstants.js +1 -1
  35. package/dist-es5/applicationinsights-teechannel-js.js +1 -1
  36. package/package.json +3 -3
  37. package/types/applicationinsights-teechannel-js.d.ts +1 -1
  38. package/types/applicationinsights-teechannel-js.namespaced.d.ts +1 -1
  39. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.cjs.js.map +0 -1
  40. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.cjs.min.js.map +0 -1
  41. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.gbl.js.map +0 -1
  42. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.gbl.min.js.map +0 -1
  43. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.integrity.json +0 -66
  44. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.js.map +0 -1
  45. package/browser/es5/applicationinsights-teechannel-js.3.1.1-nightly3.2403-02.min.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Tee Channel, 3.1.1-nightly3.2403-02
2
+ * Application Insights JavaScript SDK - Tee Channel, 3.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
6
6
  var undef = "undefined";
7
- var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_teechannel_js_3_1_1_nightly3_2403_02", msMod="__ms$mod__";
8
- var mods={}, modDetail=mods[modName]={}, ver="3.1.1-nightly3.2403-02";
7
+ var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_teechannel_js_3_1_1_nightly3_2403_04", msMod="__ms$mod__";
8
+ var mods={}, modDetail=mods[modName]={}, ver="3.1.1-nightly3.2403-04";
9
9
  var baseNs=global, nsKey="Microsoft", baseNs=baseNs[nsKey]=(baseNs[nsKey]||{});
10
10
  // Versioned namespace "Microsoft.ApplicationInsights3"
11
11
  var exportNs=baseNs, nsKey="ApplicationInsights3", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
@@ -1325,6 +1325,234 @@ var STR_PRIORITY = "priority";
1325
1325
  var STR_GET_PERF_MGR = "getPerfMgr";
1326
1326
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1327
1327
 
1328
+ var _aiNamespace = null;
1329
+ function _getExtensionNamespace() {
1330
+ var target = getInst("Microsoft");
1331
+ if (target) {
1332
+ _aiNamespace = target["ApplicationInsights"];
1333
+ }
1334
+ return _aiNamespace;
1335
+ }
1336
+ function getDebugExt(config) {
1337
+ var ns = _aiNamespace;
1338
+ if (!ns && config.disableDbgExt !== true) {
1339
+ ns = _aiNamespace || _getExtensionNamespace();
1340
+ }
1341
+ return ns ? ns["ChromeDbgExt"] : null;
1342
+ }
1343
+
1344
+ var strConsole = "console";
1345
+ var strJSON = "JSON";
1346
+ var strCrypto = "crypto";
1347
+ var strMsCrypto = "msCrypto";
1348
+ var _isTrident = null;
1349
+ function getConsole() {
1350
+ if (typeof console !== strShimUndefined) {
1351
+ return console;
1352
+ }
1353
+ return getInst(strConsole);
1354
+ }
1355
+ function hasJSON() {
1356
+ return Boolean((typeof JSON === strShimObject && JSON) || getInst(strJSON) !== null);
1357
+ }
1358
+ function getJSON() {
1359
+ if (hasJSON()) {
1360
+ return JSON || getInst(strJSON);
1361
+ }
1362
+ return null;
1363
+ }
1364
+ function getCrypto() {
1365
+ return getInst(strCrypto);
1366
+ }
1367
+ function getMsCrypto() {
1368
+ return getInst(strMsCrypto);
1369
+ }
1370
+ function isIE() {
1371
+ return _isTrident;
1372
+ }
1373
+
1374
+ var _a$2;
1375
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
1376
+ var AiNonUserActionablePrefix = "AI (Internal): ";
1377
+ var AiUserActionablePrefix = "AI: ";
1378
+ var AIInternalMessagePrefix = "AITR_";
1379
+ var defaultValues$1 = {
1380
+ loggingLevelConsole: 0,
1381
+ loggingLevelTelemetry: 1,
1382
+ maxMessageLimit: 25,
1383
+ enableDebug: false
1384
+ };
1385
+ var _logFuncs = (_a$2 = {},
1386
+ _a$2[0 ] = null,
1387
+ _a$2[1 ] = "errorToConsole",
1388
+ _a$2[2 ] = STR_WARN_TO_CONSOLE,
1389
+ _a$2[3 ] = "debugToConsole",
1390
+ _a$2);
1391
+ function _sanitizeDiagnosticText(text) {
1392
+ if (text) {
1393
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1394
+ }
1395
+ return STR_EMPTY;
1396
+ }
1397
+ function _logToConsole(func, message) {
1398
+ var theConsole = getConsole();
1399
+ if (!!theConsole) {
1400
+ var logFunc = "log";
1401
+ if (theConsole[func]) {
1402
+ logFunc = func;
1403
+ }
1404
+ if (isFunction(theConsole[logFunc])) {
1405
+ theConsole[logFunc](message);
1406
+ }
1407
+ }
1408
+ }
1409
+ var _InternalLogMessage = /** @class */ (function () {
1410
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1411
+ if (isUserAct === void 0) { isUserAct = false; }
1412
+ var _self = this;
1413
+ _self[_DYN_MESSAGE_ID ] = msgId;
1414
+ _self[_DYN_MESSAGE ] =
1415
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1416
+ msgId;
1417
+ var strProps = STR_EMPTY;
1418
+ if (hasJSON()) {
1419
+ strProps = getJSON().stringify(properties);
1420
+ }
1421
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1422
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1423
+ _self[_DYN_MESSAGE ] += diagnosticText;
1424
+ }
1425
+ _InternalLogMessage.dataType = "MessageData";
1426
+ return _InternalLogMessage;
1427
+ }());
1428
+ function safeGetLogger(core, config) {
1429
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1430
+ }
1431
+ var DiagnosticLogger = /** @class */ (function () {
1432
+ function DiagnosticLogger(config) {
1433
+ this.identifier = "DiagnosticLogger";
1434
+ this.queue = [];
1435
+ var _messageCount = 0;
1436
+ var _messageLogged = {};
1437
+ var _loggingLevelConsole;
1438
+ var _loggingLevelTelemetry;
1439
+ var _maxInternalMessageLimit;
1440
+ var _enableDebug;
1441
+ var _unloadHandler;
1442
+ dynamicProto(DiagnosticLogger, this, function (_self) {
1443
+ _unloadHandler = _setDefaultsFromConfig(config || {});
1444
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1445
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1446
+ if (isUserAct === void 0) { isUserAct = false; }
1447
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1448
+ if (_enableDebug) {
1449
+ throw dumpObj(message);
1450
+ }
1451
+ else {
1452
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1453
+ if (!isUndefined(message[_DYN_MESSAGE ])) {
1454
+ if (isUserAct) {
1455
+ var messageKey = +message[_DYN_MESSAGE_ID ];
1456
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1457
+ _self[logFunc](message[_DYN_MESSAGE ]);
1458
+ _messageLogged[messageKey] = true;
1459
+ }
1460
+ }
1461
+ else {
1462
+ if (_loggingLevelConsole >= severity) {
1463
+ _self[logFunc](message[_DYN_MESSAGE ]);
1464
+ }
1465
+ }
1466
+ _logInternalMessage(severity, message);
1467
+ }
1468
+ else {
1469
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1470
+ }
1471
+ }
1472
+ };
1473
+ _self.debugToConsole = function (message) {
1474
+ _logToConsole("debug", message);
1475
+ _debugExtMsg("warning", message);
1476
+ };
1477
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1478
+ _logToConsole("warn", message);
1479
+ _debugExtMsg("warning", message);
1480
+ };
1481
+ _self.errorToConsole = function (message) {
1482
+ _logToConsole("error", message);
1483
+ _debugExtMsg("error", message);
1484
+ };
1485
+ _self.resetInternalMessageCount = function () {
1486
+ _messageCount = 0;
1487
+ _messageLogged = {};
1488
+ };
1489
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1490
+ _self[_DYN_UNLOAD ] = function (isAsync) {
1491
+ _unloadHandler && _unloadHandler.rm();
1492
+ _unloadHandler = null;
1493
+ };
1494
+ function _logInternalMessage(severity, message) {
1495
+ if (_areInternalMessagesThrottled()) {
1496
+ return;
1497
+ }
1498
+ var logMessage = true;
1499
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1500
+ if (_messageLogged[messageKey]) {
1501
+ logMessage = false;
1502
+ }
1503
+ else {
1504
+ _messageLogged[messageKey] = true;
1505
+ }
1506
+ if (logMessage) {
1507
+ if (severity <= _loggingLevelTelemetry) {
1508
+ _self.queue[_DYN_PUSH ](message);
1509
+ _messageCount++;
1510
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1511
+ }
1512
+ if (_messageCount === _maxInternalMessageLimit) {
1513
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1514
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1515
+ _self.queue[_DYN_PUSH ](throttleMessage);
1516
+ if (severity === 1 ) {
1517
+ _self.errorToConsole(throttleLimitMessage);
1518
+ }
1519
+ else {
1520
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1521
+ }
1522
+ }
1523
+ }
1524
+ }
1525
+ function _setDefaultsFromConfig(config) {
1526
+ return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
1527
+ var config = details.cfg;
1528
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1529
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
1530
+ _maxInternalMessageLimit = config.maxMessageLimit;
1531
+ _enableDebug = config.enableDebug;
1532
+ });
1533
+ }
1534
+ function _areInternalMessagesThrottled() {
1535
+ return _messageCount >= _maxInternalMessageLimit;
1536
+ }
1537
+ function _debugExtMsg(name, data) {
1538
+ var dbgExt = getDebugExt(config || {});
1539
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1540
+ dbgExt[_DYN_DIAG_LOG ](name, data);
1541
+ }
1542
+ }
1543
+ });
1544
+ }
1545
+ DiagnosticLogger.__ieDyn=1;
1546
+ return DiagnosticLogger;
1547
+ }());
1548
+ function _getLogger(logger) {
1549
+ return (logger || new DiagnosticLogger());
1550
+ }
1551
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1552
+ if (isUserAct === void 0) { isUserAct = false; }
1553
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1554
+ }
1555
+
1328
1556
  var rCamelCase = /-([a-z])/g;
1329
1557
  var rNormalizeInvalid = /([^\w\d_$])/g;
1330
1558
  var rLeadingNumeric = /^(\d+[\w\d_$])/;
@@ -1381,36 +1609,6 @@ function proxyFunctions(target, source, functionsToProxy, overwriteTarget) {
1381
1609
  return target;
1382
1610
  }
1383
1611
 
1384
- var strConsole = "console";
1385
- var strJSON = "JSON";
1386
- var strCrypto = "crypto";
1387
- var strMsCrypto = "msCrypto";
1388
- var _isTrident = null;
1389
- function getConsole() {
1390
- if (typeof console !== strShimUndefined) {
1391
- return console;
1392
- }
1393
- return getInst(strConsole);
1394
- }
1395
- function hasJSON() {
1396
- return Boolean((typeof JSON === strShimObject && JSON) || getInst(strJSON) !== null);
1397
- }
1398
- function getJSON() {
1399
- if (hasJSON()) {
1400
- return JSON || getInst(strJSON);
1401
- }
1402
- return null;
1403
- }
1404
- function getCrypto() {
1405
- return getInst(strCrypto);
1406
- }
1407
- function getMsCrypto() {
1408
- return getInst(strMsCrypto);
1409
- }
1410
- function isIE() {
1411
- return _isTrident;
1412
- }
1413
-
1414
1612
  var UInt32Mask = 0x100000000;
1415
1613
  var MaxUInt32 = 0xffffffff;
1416
1614
  var SEED1 = 123456789;
@@ -2167,204 +2365,6 @@ function cfgDfBoolean(defaultValue, fallBackName) {
2167
2365
  };
2168
2366
  }
2169
2367
 
2170
- var _aiNamespace = null;
2171
- function _getExtensionNamespace() {
2172
- var target = getInst("Microsoft");
2173
- if (target) {
2174
- _aiNamespace = target["ApplicationInsights"];
2175
- }
2176
- return _aiNamespace;
2177
- }
2178
- function getDebugExt(config) {
2179
- var ns = _aiNamespace;
2180
- if (!ns && config.disableDbgExt !== true) {
2181
- ns = _aiNamespace || _getExtensionNamespace();
2182
- }
2183
- return ns ? ns["ChromeDbgExt"] : null;
2184
- }
2185
-
2186
- var _a$2;
2187
- var STR_WARN_TO_CONSOLE = "warnToConsole";
2188
- var AiNonUserActionablePrefix = "AI (Internal): ";
2189
- var AiUserActionablePrefix = "AI: ";
2190
- var AIInternalMessagePrefix = "AITR_";
2191
- var defaultValues$1 = {
2192
- loggingLevelConsole: 0,
2193
- loggingLevelTelemetry: 1,
2194
- maxMessageLimit: 25,
2195
- enableDebug: false
2196
- };
2197
- var _logFuncs = (_a$2 = {},
2198
- _a$2[0 ] = null,
2199
- _a$2[1 ] = "errorToConsole",
2200
- _a$2[2 ] = STR_WARN_TO_CONSOLE,
2201
- _a$2[3 ] = "debugToConsole",
2202
- _a$2);
2203
- function _sanitizeDiagnosticText(text) {
2204
- if (text) {
2205
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
2206
- }
2207
- return STR_EMPTY;
2208
- }
2209
- function _logToConsole(func, message) {
2210
- var theConsole = getConsole();
2211
- if (!!theConsole) {
2212
- var logFunc = "log";
2213
- if (theConsole[func]) {
2214
- logFunc = func;
2215
- }
2216
- if (isFunction(theConsole[logFunc])) {
2217
- theConsole[logFunc](message);
2218
- }
2219
- }
2220
- }
2221
- var _InternalLogMessage = /** @class */ (function () {
2222
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
2223
- if (isUserAct === void 0) { isUserAct = false; }
2224
- var _self = this;
2225
- _self[_DYN_MESSAGE_ID ] = msgId;
2226
- _self[_DYN_MESSAGE ] =
2227
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
2228
- msgId;
2229
- var strProps = STR_EMPTY;
2230
- if (hasJSON()) {
2231
- strProps = getJSON().stringify(properties);
2232
- }
2233
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
2234
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
2235
- _self[_DYN_MESSAGE ] += diagnosticText;
2236
- }
2237
- _InternalLogMessage.dataType = "MessageData";
2238
- return _InternalLogMessage;
2239
- }());
2240
- function safeGetLogger(core, config) {
2241
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
2242
- }
2243
- var DiagnosticLogger = /** @class */ (function () {
2244
- function DiagnosticLogger(config) {
2245
- this.identifier = "DiagnosticLogger";
2246
- this.queue = [];
2247
- var _messageCount = 0;
2248
- var _messageLogged = {};
2249
- var _loggingLevelConsole;
2250
- var _loggingLevelTelemetry;
2251
- var _maxInternalMessageLimit;
2252
- var _enableDebug;
2253
- var _unloadHandler;
2254
- dynamicProto(DiagnosticLogger, this, function (_self) {
2255
- _unloadHandler = _setDefaultsFromConfig(config || {});
2256
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2257
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2258
- if (isUserAct === void 0) { isUserAct = false; }
2259
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2260
- if (_enableDebug) {
2261
- throw dumpObj(message);
2262
- }
2263
- else {
2264
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2265
- if (!isUndefined(message[_DYN_MESSAGE ])) {
2266
- if (isUserAct) {
2267
- var messageKey = +message[_DYN_MESSAGE_ID ];
2268
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2269
- _self[logFunc](message[_DYN_MESSAGE ]);
2270
- _messageLogged[messageKey] = true;
2271
- }
2272
- }
2273
- else {
2274
- if (_loggingLevelConsole >= severity) {
2275
- _self[logFunc](message[_DYN_MESSAGE ]);
2276
- }
2277
- }
2278
- _logInternalMessage(severity, message);
2279
- }
2280
- else {
2281
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2282
- }
2283
- }
2284
- };
2285
- _self.debugToConsole = function (message) {
2286
- _logToConsole("debug", message);
2287
- _debugExtMsg("warning", message);
2288
- };
2289
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2290
- _logToConsole("warn", message);
2291
- _debugExtMsg("warning", message);
2292
- };
2293
- _self.errorToConsole = function (message) {
2294
- _logToConsole("error", message);
2295
- _debugExtMsg("error", message);
2296
- };
2297
- _self.resetInternalMessageCount = function () {
2298
- _messageCount = 0;
2299
- _messageLogged = {};
2300
- };
2301
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2302
- _self[_DYN_UNLOAD ] = function (isAsync) {
2303
- _unloadHandler && _unloadHandler.rm();
2304
- _unloadHandler = null;
2305
- };
2306
- function _logInternalMessage(severity, message) {
2307
- if (_areInternalMessagesThrottled()) {
2308
- return;
2309
- }
2310
- var logMessage = true;
2311
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2312
- if (_messageLogged[messageKey]) {
2313
- logMessage = false;
2314
- }
2315
- else {
2316
- _messageLogged[messageKey] = true;
2317
- }
2318
- if (logMessage) {
2319
- if (severity <= _loggingLevelTelemetry) {
2320
- _self.queue[_DYN_PUSH ](message);
2321
- _messageCount++;
2322
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2323
- }
2324
- if (_messageCount === _maxInternalMessageLimit) {
2325
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2326
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2327
- _self.queue[_DYN_PUSH ](throttleMessage);
2328
- if (severity === 1 ) {
2329
- _self.errorToConsole(throttleLimitMessage);
2330
- }
2331
- else {
2332
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2333
- }
2334
- }
2335
- }
2336
- }
2337
- function _setDefaultsFromConfig(config) {
2338
- return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
2339
- var config = details.cfg;
2340
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2341
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
2342
- _maxInternalMessageLimit = config.maxMessageLimit;
2343
- _enableDebug = config.enableDebug;
2344
- });
2345
- }
2346
- function _areInternalMessagesThrottled() {
2347
- return _messageCount >= _maxInternalMessageLimit;
2348
- }
2349
- function _debugExtMsg(name, data) {
2350
- var dbgExt = getDebugExt(config || {});
2351
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2352
- dbgExt[_DYN_DIAG_LOG ](name, data);
2353
- }
2354
- }
2355
- });
2356
- }
2357
- DiagnosticLogger.__ieDyn=1;
2358
- return DiagnosticLogger;
2359
- }());
2360
- function _getLogger(logger) {
2361
- return (logger || new DiagnosticLogger());
2362
- }
2363
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2364
- if (isUserAct === void 0) { isUserAct = false; }
2365
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2366
- }
2367
-
2368
2368
  var strExecutionContextKey = "ctx";
2369
2369
  var strParentContextKey = "ParentContextKey";
2370
2370
  var strChildrenContextKey = "ChildrenContextKey";