@microsoft/applicationinsights-channel-js 2.7.1-nightly.202110-07 → 2.7.1-nightly.202110-16

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 (44) hide show
  1. package/browser/applicationinsights-channel-js.integrity.json +9 -9
  2. package/browser/applicationinsights-channel-js.js +74 -65
  3. package/browser/applicationinsights-channel-js.js.map +1 -1
  4. package/browser/applicationinsights-channel-js.min.js +2 -2
  5. package/browser/applicationinsights-channel-js.min.js.map +1 -1
  6. package/dist/applicationinsights-channel-js.api.json +1 -1
  7. package/dist/applicationinsights-channel-js.d.ts +1 -1
  8. package/dist/applicationinsights-channel-js.js +74 -65
  9. package/dist/applicationinsights-channel-js.js.map +1 -1
  10. package/dist/applicationinsights-channel-js.min.js +2 -2
  11. package/dist/applicationinsights-channel-js.min.js.map +1 -1
  12. package/dist/applicationinsights-channel-js.rollup.d.ts +1 -1
  13. package/dist-esm/EnvelopeCreator.js +17 -17
  14. package/dist-esm/EnvelopeCreator.js.map +1 -1
  15. package/dist-esm/Interfaces.js +1 -1
  16. package/dist-esm/Offline.js +5 -5
  17. package/dist-esm/Offline.js.map +1 -1
  18. package/dist-esm/SendBuffer.js +4 -4
  19. package/dist-esm/SendBuffer.js.map +1 -1
  20. package/dist-esm/Sender.js +17 -17
  21. package/dist-esm/Sender.js.map +1 -1
  22. package/dist-esm/Serializer.js +3 -3
  23. package/dist-esm/Serializer.js.map +1 -1
  24. package/dist-esm/TelemetryProcessors/Sample.js +4 -4
  25. package/dist-esm/TelemetryProcessors/Sample.js.map +1 -1
  26. package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
  27. package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +3 -3
  28. package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js.map +1 -1
  29. package/dist-esm/applicationinsights-channel-js.js +1 -1
  30. package/package.json +3 -4
  31. package/src/EnvelopeCreator.ts +18 -17
  32. package/src/Offline.ts +4 -4
  33. package/src/SendBuffer.ts +4 -4
  34. package/src/Sender.ts +17 -17
  35. package/src/Serializer.ts +3 -3
  36. package/src/TelemetryProcessors/Sample.ts +3 -3
  37. package/src/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.ts +3 -3
  38. package/types/EnvelopeCreator.d.ts +2 -2
  39. package/types/SendBuffer.d.ts +2 -2
  40. package/types/Sender.d.ts +4 -4
  41. package/types/Serializer.d.ts +2 -2
  42. package/types/TelemetryProcessors/Sample.d.ts +2 -2
  43. package/types/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.d.ts +1 -1
  44. package/types/tsdoc-metadata.json +1 -1
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "name": "applicationinsights-channel-js",
3
- "version": "2.7.1-nightly.202110-07",
3
+ "version": "2.7.1-nightly.202110-16",
4
4
  "ext": {
5
5
  "@js": {
6
6
  "file": "applicationinsights-channel-js.js",
7
7
  "type": "text/javascript; charset=utf-8",
8
- "integrity": "sha256-GiAQCZ/lhOvzOkQXiRoqFoQrHktFufwnOejVNXOB2xA= sha384-GdFe/VSAYcyXxFYov6cNGtWDq8yLo2Phx99GFpZbeL8FzCqt28eU/4+6rQh2VJ7S sha512-Af7AhQjpOko/0+Jw2KjagUG69EATIb1J04VEyoKVCfm+EHKrEy3mnI+0vv93cwFEtYKHG/4S8NgDe2sLnCSVcA==",
8
+ "integrity": "sha256-yKQVaw5EOy5Gr9mpEqd7zwXFGKDizxd+SEZH2rnBNPg= sha384-l+UMKBfvvYK4m/RDT2h3BP2/KDaeKozLaMgtsSHRp0NFaH/2rt9W/2rGmQbbcdOp sha512-m3h78/azQlt+3yBM/USd3FL4URb7radBq2AXuE2NdgF5WdDnimAGfdlSd0/uFKibBbKGeUV55X8vX4sDBdIAfw==",
9
9
  "hashes": {
10
- "sha256": "GiAQCZ/lhOvzOkQXiRoqFoQrHktFufwnOejVNXOB2xA=",
11
- "sha384": "GdFe/VSAYcyXxFYov6cNGtWDq8yLo2Phx99GFpZbeL8FzCqt28eU/4+6rQh2VJ7S",
12
- "sha512": "Af7AhQjpOko/0+Jw2KjagUG69EATIb1J04VEyoKVCfm+EHKrEy3mnI+0vv93cwFEtYKHG/4S8NgDe2sLnCSVcA=="
10
+ "sha256": "yKQVaw5EOy5Gr9mpEqd7zwXFGKDizxd+SEZH2rnBNPg=",
11
+ "sha384": "l+UMKBfvvYK4m/RDT2h3BP2/KDaeKozLaMgtsSHRp0NFaH/2rt9W/2rGmQbbcdOp",
12
+ "sha512": "m3h78/azQlt+3yBM/USd3FL4URb7radBq2AXuE2NdgF5WdDnimAGfdlSd0/uFKibBbKGeUV55X8vX4sDBdIAfw=="
13
13
  }
14
14
  },
15
15
  "@min.js": {
16
16
  "file": "applicationinsights-channel-js.min.js",
17
17
  "type": "text/javascript; charset=utf-8",
18
- "integrity": "sha256-HTJenfOcepUUp5X/Rp5RNaBs94GN8O/KzGv7gum7EDo= sha384-uqLx0P7c4sG7NjcfSamL8o3jeNmEHapcxtXTn1qRJviraXfXj96NPtLvmI5O6WBE sha512-+KHoH72UiKpmBDjlgOPbuxgGwNlbUmfRplA8SbtDW1AELGIC5q72tQbv4cnZQsgeQbGsglew1llhvu34nA8Thw==",
18
+ "integrity": "sha256-te+BL3Fk80Czt2rzJdMdO91UAPdRH54S0g3Lh+1Jo/E= sha384-3Belvg+m0EvNOZYzGo0segqmAGb3pykituoDn2H8Mxh/n72f3V3lodwsmTJl7fFr sha512-D9O3VFPFZiNSFY6aqCc3z8bGryPwfSm+9ZhmUPSuktzbjo+y8Os0dlKDaX8mjpOaC3HfpyZGy5ZND018IU5Euw==",
19
19
  "hashes": {
20
- "sha256": "HTJenfOcepUUp5X/Rp5RNaBs94GN8O/KzGv7gum7EDo=",
21
- "sha384": "uqLx0P7c4sG7NjcfSamL8o3jeNmEHapcxtXTn1qRJviraXfXj96NPtLvmI5O6WBE",
22
- "sha512": "+KHoH72UiKpmBDjlgOPbuxgGwNlbUmfRplA8SbtDW1AELGIC5q72tQbv4cnZQsgeQbGsglew1llhvu34nA8Thw=="
20
+ "sha256": "te+BL3Fk80Czt2rzJdMdO91UAPdRH54S0g3Lh+1Jo/E=",
21
+ "sha384": "3Belvg+m0EvNOZYzGo0segqmAGb3pykituoDn2H8Mxh/n72f3V3lodwsmTJl7fFr",
22
+ "sha512": "D9O3VFPFZiNSFY6aqCc3z8bGryPwfSm+9ZhmUPSuktzbjo+y8Os0dlKDaX8mjpOaC3HfpyZGy5ZND018IU5Euw=="
23
23
  }
24
24
  }
25
25
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Channel, 2.7.1-nightly.202110-07
2
+ * Application Insights JavaScript SDK - Channel, 2.7.1-nightly.202110-16
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -48,7 +48,7 @@
48
48
  }
49
49
  var type = typeof obj;
50
50
  if (type !== strShimObject && type !== strShimFunction) {
51
- throwTypeError('Object prototype may only be an Object:' + obj);
51
+ throwTypeError("Object prototype may only be an Object:" + obj);
52
52
  }
53
53
  function tmpFunc() { }
54
54
  tmpFunc[strShimPrototype] = obj;
@@ -557,20 +557,20 @@
557
557
  }
558
558
  return str.replace(/^\s+|\s+$/g, "");
559
559
  }
560
- var _objKeysHasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');
560
+ var _objKeysHasDontEnumBug = !({ toString: null }).propertyIsEnumerable("toString");
561
561
  var _objKeysDontEnums = [
562
- 'toString',
563
- 'toLocaleString',
564
- 'valueOf',
565
- 'hasOwnProperty',
566
- 'isPrototypeOf',
567
- 'propertyIsEnumerable',
568
- 'constructor'
562
+ "toString",
563
+ "toLocaleString",
564
+ "valueOf",
565
+ "hasOwnProperty",
566
+ "isPrototypeOf",
567
+ "propertyIsEnumerable",
568
+ "constructor"
569
569
  ];
570
570
  function objKeys(obj) {
571
571
  var objType = typeof obj;
572
572
  if (objType !== strShimFunction && (objType !== strShimObject || obj === null)) {
573
- throwTypeError('objKeys called on non-object');
573
+ throwTypeError("objKeys called on non-object");
574
574
  }
575
575
  var result = [];
576
576
  for (var prop in obj) {
@@ -817,12 +817,26 @@
817
817
  var AiNonUserActionablePrefix = "AI (Internal): ";
818
818
  var AiUserActionablePrefix = "AI: ";
819
819
  var AIInternalMessagePrefix = "AITR_";
820
+ var strErrorToConsole = "errorToConsole";
821
+ var strWarnToConsole = "warnToConsole";
820
822
  function _sanitizeDiagnosticText(text) {
821
823
  if (text) {
822
824
  return "\"" + text.replace(/\"/g, "") + "\"";
823
825
  }
824
826
  return "";
825
827
  }
828
+ function _logToConsole(func, message) {
829
+ var theConsole = getConsole();
830
+ if (!!theConsole) {
831
+ var logFunc = "log";
832
+ if (theConsole[func]) {
833
+ logFunc = "func";
834
+ }
835
+ if (isFunction(theConsole[logFunc])) {
836
+ theConsole[logFunc](message);
837
+ }
838
+ }
839
+ }
826
840
  var _InternalLogMessage = /** @class */ (function () {
827
841
  function _InternalLogMessage(msgId, msg, isUserAct, properties) {
828
842
  if (isUserAct === void 0) { isUserAct = false; }
@@ -847,7 +861,7 @@
847
861
  }
848
862
  var DiagnosticLogger = /** @class */ (function () {
849
863
  function DiagnosticLogger(config) {
850
- this.identifier = 'DiagnosticLogger';
864
+ this.identifier = "DiagnosticLogger";
851
865
  this.queue = [];
852
866
  var _messageCount = 0;
853
867
  var _messageLogged = {};
@@ -855,10 +869,10 @@
855
869
  if (isNullOrUndefined(config)) {
856
870
  config = {};
857
871
  }
858
- _self.consoleLoggingLevel = function () { return _getConfigValue('loggingLevelConsole', 0); };
859
- _self.telemetryLoggingLevel = function () { return _getConfigValue('loggingLevelTelemetry', 1); };
860
- _self.maxInternalMessageLimit = function () { return _getConfigValue('maxMessageLimit', 25); };
861
- _self.enableDebugExceptions = function () { return _getConfigValue('enableDebugExceptions', false); };
872
+ _self.consoleLoggingLevel = function () { return _getConfigValue("loggingLevelConsole", 0); };
873
+ _self.telemetryLoggingLevel = function () { return _getConfigValue("loggingLevelTelemetry", 1); };
874
+ _self.maxInternalMessageLimit = function () { return _getConfigValue("maxMessageLimit", 25); };
875
+ _self.enableDebugExceptions = function () { return _getConfigValue("enableDebugExceptions", false); };
862
876
  _self.throwInternal = function (severity, msgId, msg, properties, isUserAct) {
863
877
  if (isUserAct === void 0) { isUserAct = false; }
864
878
  var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
@@ -866,18 +880,19 @@
866
880
  throw message;
867
881
  }
868
882
  else {
883
+ var logFunc = severity === LoggingSeverity.CRITICAL ? strErrorToConsole : strWarnToConsole;
869
884
  if (!isUndefined(message.message)) {
870
885
  var logLevel = _self.consoleLoggingLevel();
871
886
  if (isUserAct) {
872
887
  var messageKey = +message.messageId;
873
- if (!_messageLogged[messageKey] && logLevel >= LoggingSeverity.WARNING) {
874
- _self.warnToConsole(message.message);
888
+ if (!_messageLogged[messageKey] && logLevel >= severity) {
889
+ _self[logFunc](message.message);
875
890
  _messageLogged[messageKey] = true;
876
891
  }
877
892
  }
878
893
  else {
879
- if (logLevel >= LoggingSeverity.WARNING) {
880
- _self.warnToConsole(message.message);
894
+ if (logLevel >= severity) {
895
+ _self[logFunc](message.message);
881
896
  }
882
897
  }
883
898
  _self.logInternalMessage(severity, message);
@@ -885,16 +900,10 @@
885
900
  }
886
901
  };
887
902
  _self.warnToConsole = function (message) {
888
- var theConsole = getConsole();
889
- if (!!theConsole) {
890
- var logFunc = 'log';
891
- if (theConsole.warn) {
892
- logFunc = 'warn';
893
- }
894
- if (isFunction(theConsole[logFunc])) {
895
- theConsole[logFunc](message);
896
- }
897
- }
903
+ _logToConsole("warn", message);
904
+ };
905
+ _self.errorToConsole = function (message) {
906
+ _logToConsole("error", message);
898
907
  };
899
908
  _self.resetInternalMessageCount = function () {
900
909
  _messageCount = 0;
@@ -951,7 +960,7 @@
951
960
  _self.isChildEvt = function () { return false; };
952
961
  if (isFunction(payloadDetails)) {
953
962
  var theDetails_1;
954
- accessorDefined = objDefineAccessors(_self, 'payload', function () {
963
+ accessorDefined = objDefineAccessors(_self, "payload", function () {
955
964
  if (!theDetails_1 && isFunction(payloadDetails)) {
956
965
  theDetails_1 = payloadDetails();
957
966
  payloadDetails = null;
@@ -1331,7 +1340,7 @@
1331
1340
  name = strTrim(name.toString());
1332
1341
  if (name.length > 150 ) {
1333
1342
  nameTrunc = name.substring(0, 150 );
1334
- logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.NameTooLong, "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
1343
+ logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.NameTooLong, "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
1335
1344
  }
1336
1345
  }
1337
1346
  return nameTrunc || name;
@@ -1344,7 +1353,7 @@
1344
1353
  value = strTrim(value);
1345
1354
  if (value.toString().length > maxLength) {
1346
1355
  valueTrunc = value.toString().substring(0, maxLength);
1347
- logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.StringValueTooLong, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
1356
+ logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.StringValueTooLong, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
1348
1357
  }
1349
1358
  }
1350
1359
  return valueTrunc || value;
@@ -1357,7 +1366,7 @@
1357
1366
  if (message) {
1358
1367
  if (message.length > 32768 ) {
1359
1368
  messageTrunc = message.substring(0, 32768 );
1360
- logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.MessageTruncated, "message is too long, it has been truncated to " + 32768 + " characters.", { message: message }, true);
1369
+ logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.MessageTruncated, "message is too long, it has been truncated to " + 32768 + " characters.", { message: message }, true);
1361
1370
  }
1362
1371
  }
1363
1372
  return messageTrunc || message;
@@ -1368,7 +1377,7 @@
1368
1377
  var value = "" + exception;
1369
1378
  if (value.length > 32768 ) {
1370
1379
  exceptionTrunc = value.substring(0, 32768 );
1371
- logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + 32768 + " characters.", { exception: exception }, true);
1380
+ logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + 32768 + " characters.", { exception: exception }, true);
1372
1381
  }
1373
1382
  }
1374
1383
  return exceptionTrunc || exception;
@@ -1382,7 +1391,7 @@
1382
1391
  value = getJSON().stringify(value);
1383
1392
  }
1384
1393
  catch (e) {
1385
- logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e }, true);
1394
+ logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e }, true);
1386
1395
  }
1387
1396
  }
1388
1397
  value = dataSanitizeString(logger, value, 8192 );
@@ -1413,7 +1422,7 @@
1413
1422
  input = strTrim(input);
1414
1423
  if (input.length > maxLength) {
1415
1424
  inputTrunc = input.substring(0, maxLength);
1416
- logger.throwInternal(LoggingSeverity.WARNING, _msgId, "input is too long, it has been truncated to " + maxLength + " characters.", { data: input }, true);
1425
+ logger && logger.throwInternal(LoggingSeverity.WARNING, _msgId, "input is too long, it has been truncated to " + maxLength + " characters.", { data: input }, true);
1417
1426
  }
1418
1427
  }
1419
1428
  return inputTrunc || input;
@@ -1528,7 +1537,7 @@
1528
1537
  tempAnchor = { host: urlParseHost(url, true) };
1529
1538
  }
1530
1539
  else if (!anchorCache[anchorIdx]) {
1531
- tempAnchor = anchorCache[anchorIdx] = _document.createElement('a');
1540
+ tempAnchor = anchorCache[anchorIdx] = _document.createElement("a");
1532
1541
  }
1533
1542
  tempAnchor.href = url;
1534
1543
  anchorIdx++;
@@ -1586,7 +1595,7 @@
1586
1595
  if (!name) {
1587
1596
  if (parsedUrl.pathname != null) {
1588
1597
  var pathName = (parsedUrl.pathname.length === 0) ? "/" : parsedUrl.pathname;
1589
- if (pathName.charAt(0) !== '/') {
1598
+ if (pathName.charAt(0) !== "/") {
1590
1599
  pathName = "/" + pathName;
1591
1600
  }
1592
1601
  data = parsedUrl.pathname;
@@ -1816,7 +1825,7 @@
1816
1825
  else if (errorObj[strError] && errorObj[strError][strStack]) {
1817
1826
  details = _convertStackObj(errorObj[strError][strStack]);
1818
1827
  }
1819
- else if (errorObj['exception'] && errorObj.exception[strStack]) {
1828
+ else if (errorObj["exception"] && errorObj.exception[strStack]) {
1820
1829
  details = _convertStackObj(errorObj.exception[strStack]);
1821
1830
  }
1822
1831
  else if (_isStackDetails(errorObj)) {
@@ -1825,7 +1834,7 @@
1825
1834
  else if (_isStackDetails(errorObj[strStackDetails])) {
1826
1835
  details = errorObj[strStackDetails];
1827
1836
  }
1828
- else if (window['opera'] && errorObj[strMessage]) {
1837
+ else if (window["opera"] && errorObj[strMessage]) {
1829
1838
  details = _getOperaStack(errorObj.message);
1830
1839
  }
1831
1840
  else if (isString(errorObj)) {
@@ -2678,14 +2687,14 @@
2678
2687
  return SessionStorageSendBuffer;
2679
2688
  }(BaseSendBuffer));
2680
2689
 
2681
- var strBaseType = 'baseType';
2682
- var strBaseData = 'baseData';
2683
- var strProperties = 'properties';
2684
- var strTrue = 'true';
2690
+ var strBaseType = "baseType";
2691
+ var strBaseData = "baseData";
2692
+ var strProperties = "properties";
2693
+ var strTrue = "true";
2685
2694
  function _setValueIf(target, field, value) {
2686
2695
  return setValue(target, field, value, isTruthy);
2687
2696
  }
2688
- function _extractPartAExtensions(item, env) {
2697
+ function _extractPartAExtensions(logger, item, env) {
2689
2698
  var envTags = env.tags = env.tags || {};
2690
2699
  var itmExt = item.ext = item.ext || {};
2691
2700
  var itmTags = item.tags = item.tags || [];
@@ -2714,10 +2723,10 @@
2714
2723
  var envData = env.data = env.data || {};
2715
2724
  var envBaseData = envData[strBaseData] = envData[strBaseData] || {};
2716
2725
  var envProps = envBaseData[strProperties] = envBaseData[strProperties] || {};
2717
- _setValueIf(envProps, 'domain', web.domain);
2718
- _setValueIf(envProps, 'isManual', web.isManual ? strTrue : null);
2719
- _setValueIf(envProps, 'screenRes', web.screenRes);
2720
- _setValueIf(envProps, 'userConsent', web.userConsent ? strTrue : null);
2726
+ _setValueIf(envProps, "domain", web.domain);
2727
+ _setValueIf(envProps, "isManual", web.isManual ? strTrue : null);
2728
+ _setValueIf(envProps, "screenRes", web.screenRes);
2729
+ _setValueIf(envProps, "userConsent", web.userConsent ? strTrue : null);
2721
2730
  }
2722
2731
  var extOs = itmExt.os;
2723
2732
  if (extOs) {
@@ -2726,7 +2735,7 @@
2726
2735
  var extTrace = itmExt.trace;
2727
2736
  if (extTrace) {
2728
2737
  _setValueIf(envTags, CtxTagKeys.operationParentId, extTrace.parentID);
2729
- _setValueIf(envTags, CtxTagKeys.operationName, extTrace.name);
2738
+ _setValueIf(envTags, CtxTagKeys.operationName, dataSanitizeString(logger, extTrace.name));
2730
2739
  _setValueIf(envTags, CtxTagKeys.operationId, extTrace.traceID);
2731
2740
  }
2732
2741
  var tgs = {};
@@ -2770,14 +2779,14 @@
2770
2779
  }
2771
2780
  function _createEnvelope(logger, envelopeType, telemetryItem, data) {
2772
2781
  var envelope = new Envelope(logger, data, envelopeType);
2773
- _setValueIf(envelope, 'sampleRate', telemetryItem[SampleRate]);
2782
+ _setValueIf(envelope, "sampleRate", telemetryItem[SampleRate]);
2774
2783
  if ((telemetryItem[strBaseData] || {}).startTime) {
2775
2784
  envelope.time = toISOString(telemetryItem[strBaseData].startTime);
2776
2785
  }
2777
2786
  envelope.iKey = telemetryItem.iKey;
2778
2787
  var iKeyNoDashes = telemetryItem.iKey.replace(/-/g, "");
2779
2788
  envelope.name = envelope.name.replace("{0}", iKeyNoDashes);
2780
- _extractPartAExtensions(telemetryItem, envelope);
2789
+ _extractPartAExtensions(logger, telemetryItem, envelope);
2781
2790
  telemetryItem.tags = telemetryItem.tags || [];
2782
2791
  return optimizeObject(envelope);
2783
2792
  }
@@ -2787,7 +2796,7 @@
2787
2796
  }
2788
2797
  }
2789
2798
  var EnvelopeCreator = {
2790
- Version: "2.7.1-nightly.202110-07"
2799
+ Version: "2.7.1-nightly.202110-16"
2791
2800
  };
2792
2801
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
2793
2802
  EnvelopeCreatorInit(logger, telemetryItem);
@@ -2812,7 +2821,7 @@
2812
2821
  var customProperties = {};
2813
2822
  var customMeasurements = {};
2814
2823
  if (telemetryItem[strBaseType] !== Event.dataType) {
2815
- customProperties['baseTypeSource'] = telemetryItem[strBaseType];
2824
+ customProperties["baseTypeSource"] = telemetryItem[strBaseType];
2816
2825
  }
2817
2826
  if (telemetryItem[strBaseType] === Event.dataType) {
2818
2827
  customProperties = telemetryItem[strBaseData][strProperties] || {};
@@ -3091,8 +3100,8 @@
3091
3100
  dynamicProto(OfflineListener, this, function (_self) {
3092
3101
  try {
3093
3102
  if (_window) {
3094
- if (attachEvent(_window, 'online', _setOnline)) {
3095
- attachEvent(_window, 'offline', _setOffline);
3103
+ if (attachEvent(_window, "online", _setOnline)) {
3104
+ attachEvent(_window, "offline", _setOffline);
3096
3105
  isListening = true;
3097
3106
  }
3098
3107
  }
@@ -3511,7 +3520,7 @@
3511
3520
  _self._onSuccess(payload, results.itemsAccepted);
3512
3521
  }
3513
3522
  if (failed.length > 0) {
3514
- _self._onError(failed, _formatErrorMessageXhr(null, ['partial success', results.itemsAccepted, 'of', results.itemsReceived].join(' ')));
3523
+ _self._onError(failed, _formatErrorMessageXhr(null, ["partial success", results.itemsAccepted, "of", results.itemsReceived].join(" ")));
3515
3524
  }
3516
3525
  if (retry.length > 0) {
3517
3526
  _resendPayload(retry);
@@ -3597,7 +3606,7 @@
3597
3606
  if (_stamp_specific_redirects >= 10) {
3598
3607
  return false;
3599
3608
  }
3600
- if (!isNullOrUndefined(responseUrl) && responseUrl !== '') {
3609
+ if (!isNullOrUndefined(responseUrl) && responseUrl !== "") {
3601
3610
  if (responseUrl !== _self._senderConfig.endpointUrl()) {
3602
3611
  _self._senderConfig.endpointUrl = function () { return responseUrl; };
3603
3612
  ++_stamp_specific_redirects;
@@ -3619,7 +3628,7 @@
3619
3628
  var buffer = _self._buffer;
3620
3629
  var url = _self._senderConfig.endpointUrl();
3621
3630
  var batch = _self._buffer.batchPayloads(payload);
3622
- var plainTextBatch = new Blob([batch], { type: 'text/plain;charset=UTF-8' });
3631
+ var plainTextBatch = new Blob([batch], { type: "text/plain;charset=UTF-8" });
3623
3632
  var queued = nav.sendBeacon(url, plainTextBatch);
3624
3633
  if (queued) {
3625
3634
  buffer.markAsSent(payload);
@@ -3691,7 +3700,7 @@
3691
3700
  var _a;
3692
3701
  var endPointUrl = _self._senderConfig.endpointUrl();
3693
3702
  var batch = _self._buffer.batchPayloads(payload);
3694
- var plainTextBatch = new Blob([batch], { type: 'application/json' });
3703
+ var plainTextBatch = new Blob([batch], { type: "application/json" });
3695
3704
  var requestHeaders = new Headers();
3696
3705
  var batchLength = batch.length;
3697
3706
  if (isInternalApplicationInsightsEndpoint(endPointUrl)) {
@@ -3828,7 +3837,7 @@
3828
3837
  return;
3829
3838
  }
3830
3839
  var endpointUrl = _self._senderConfig.endpointUrl().replace(/^(https?:)/, "");
3831
- xdr.open('POST', endpointUrl);
3840
+ xdr.open("POST", endpointUrl);
3832
3841
  var batch = buffer.batchPayloads(payload);
3833
3842
  xdr.send(batch);
3834
3843
  buffer.markAsSent(payload);
@@ -3840,11 +3849,11 @@
3840
3849
  return message;
3841
3850
  }
3842
3851
  function _getNotifyMgr() {
3843
- var func = 'getNotifyMgr';
3852
+ var func = "getNotifyMgr";
3844
3853
  if (_self.core[func]) {
3845
3854
  return _self.core[func]();
3846
3855
  }
3847
- return _self.core['_notificationManager'];
3856
+ return _self.core["_notificationManager"];
3848
3857
  }
3849
3858
  function _notifySendRequest(sendRequest, isAsync) {
3850
3859
  var manager = _getNotifyMgr();
@@ -3862,7 +3871,7 @@
3862
3871
  if (disableIKeyValidationFlag) {
3863
3872
  return true;
3864
3873
  }
3865
- var UUID_Regex = '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$';
3874
+ var UUID_Regex = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$";
3866
3875
  var regexp = new RegExp(UUID_Regex);
3867
3876
  return regexp.test(config.instrumentationKey);
3868
3877
  }