@microsoft/applicationinsights-channel-js 3.1.2-nightly3.2403-07 → 3.1.3-nightly3.2403-11

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 (55) hide show
  1. package/browser/es5/{applicationinsights-channel-js.3.1.2-nightly3.2403-07.cjs.js → applicationinsights-channel-js.3.1.3-nightly3.2403-11.cjs.js} +528 -543
  2. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-11.cjs.js.map +1 -0
  3. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-11.cjs.min.js +6 -0
  4. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-11.cjs.min.js.map +1 -0
  5. package/browser/es5/{applicationinsights-channel-js.3.1.2-nightly3.2403-07.gbl.js → applicationinsights-channel-js.3.1.3-nightly3.2403-11.gbl.js} +530 -545
  6. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-11.gbl.js.map +1 -0
  7. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-11.gbl.min.js +6 -0
  8. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-11.gbl.min.js.map +1 -0
  9. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-11.integrity.json +66 -0
  10. package/browser/es5/{applicationinsights-channel-js.3.1.2-nightly3.2403-07.js → applicationinsights-channel-js.3.1.3-nightly3.2403-11.js} +530 -545
  11. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-11.js.map +1 -0
  12. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-11.min.js +6 -0
  13. package/browser/es5/applicationinsights-channel-js.3.1.3-nightly3.2403-11.min.js.map +1 -0
  14. package/browser/es5/applicationinsights-channel-js.3.cjs.js +527 -542
  15. package/browser/es5/applicationinsights-channel-js.3.cjs.js.map +1 -1
  16. package/browser/es5/applicationinsights-channel-js.3.cjs.min.js +2 -2
  17. package/browser/es5/applicationinsights-channel-js.3.cjs.min.js.map +1 -1
  18. package/browser/es5/applicationinsights-channel-js.3.gbl.js +529 -544
  19. package/browser/es5/applicationinsights-channel-js.3.gbl.js.map +1 -1
  20. package/browser/es5/applicationinsights-channel-js.3.gbl.min.js +2 -2
  21. package/browser/es5/applicationinsights-channel-js.3.gbl.min.js.map +1 -1
  22. package/browser/es5/applicationinsights-channel-js.3.integrity.json +25 -25
  23. package/browser/es5/applicationinsights-channel-js.3.js +529 -544
  24. package/browser/es5/applicationinsights-channel-js.3.js.map +1 -1
  25. package/browser/es5/applicationinsights-channel-js.3.min.js +2 -2
  26. package/browser/es5/applicationinsights-channel-js.3.min.js.map +1 -1
  27. package/dist/es5/applicationinsights-channel-js.js +527 -542
  28. package/dist/es5/applicationinsights-channel-js.js.map +1 -1
  29. package/dist/es5/applicationinsights-channel-js.min.js +2 -2
  30. package/dist/es5/applicationinsights-channel-js.min.js.map +1 -1
  31. package/dist-es5/EnvelopeCreator.js +2 -2
  32. package/dist-es5/EnvelopeCreator.js.map +1 -1
  33. package/dist-es5/Interfaces.js +1 -1
  34. package/dist-es5/InternalConstants.js +1 -1
  35. package/dist-es5/SendBuffer.js +1 -1
  36. package/dist-es5/Sender.js +1 -1
  37. package/dist-es5/Serializer.js +1 -1
  38. package/dist-es5/TelemetryProcessors/Sample.js +1 -1
  39. package/dist-es5/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
  40. package/dist-es5/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +1 -1
  41. package/dist-es5/__DynamicConstants.js +1 -1
  42. package/dist-es5/applicationinsights-channel-js.js +1 -1
  43. package/package.json +4 -4
  44. package/types/applicationinsights-channel-js.d.ts +1 -1
  45. package/types/applicationinsights-channel-js.namespaced.d.ts +2 -1
  46. package/browser/es5/applicationinsights-channel-js.3.1.2-nightly3.2403-07.cjs.js.map +0 -1
  47. package/browser/es5/applicationinsights-channel-js.3.1.2-nightly3.2403-07.cjs.min.js +0 -6
  48. package/browser/es5/applicationinsights-channel-js.3.1.2-nightly3.2403-07.cjs.min.js.map +0 -1
  49. package/browser/es5/applicationinsights-channel-js.3.1.2-nightly3.2403-07.gbl.js.map +0 -1
  50. package/browser/es5/applicationinsights-channel-js.3.1.2-nightly3.2403-07.gbl.min.js +0 -6
  51. package/browser/es5/applicationinsights-channel-js.3.1.2-nightly3.2403-07.gbl.min.js.map +0 -1
  52. package/browser/es5/applicationinsights-channel-js.3.1.2-nightly3.2403-07.integrity.json +0 -66
  53. package/browser/es5/applicationinsights-channel-js.3.1.2-nightly3.2403-07.js.map +0 -1
  54. package/browser/es5/applicationinsights-channel-js.3.1.2-nightly3.2403-07.min.js +0 -6
  55. package/browser/es5/applicationinsights-channel-js.3.1.2-nightly3.2403-07.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Channel, 3.1.2-nightly3.2403-07
2
+ * Application Insights JavaScript SDK - Channel, 3.1.3-nightly3.2403-11
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_channel_js_3_1_2_nightly3_2403_07", msMod="__ms$mod__";
11
- var mods={}, modDetail=mods[modName]={}, ver="3.1.2-nightly3.2403-07";
10
+ var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_channel_js_3_1_3_nightly3_2403_11", msMod="__ms$mod__";
11
+ var mods={}, modDetail=mods[modName]={}, ver="3.1.3-nightly3.2403-11";
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]||{});
@@ -40,23 +40,16 @@ var ObjProto$1 = ObjClass$1[strShimPrototype];
40
40
  var UNDEF_VALUE = undefined;
41
41
  var NULL_VALUE = null;
42
42
  var EMPTY = "";
43
- var BOOLEAN = "boolean";
44
43
  var FUNCTION = "function";
45
- var NUMBER = "number";
46
44
  var OBJECT = "object";
47
45
  var PROTOTYPE = "prototype";
48
46
  var __PROTO__ = "__proto__";
49
- var STRING = "string";
50
47
  var UNDEFINED = "undefined";
51
48
  var CONSTRUCTOR = "constructor";
52
49
  var SYMBOL = "Symbol";
53
50
  var POLYFILL_TAG = "_polyfill";
54
- var INDEX_OF = "indexOf";
55
51
  var LENGTH = "length";
56
- var DONE = "done";
57
- var VALUE = "value";
58
52
  var NAME = "name";
59
- var SLICE = "slice";
60
53
  var CALL = "call";
61
54
  var TO_STRING = "toString";
62
55
  var ObjClass = Object;
@@ -66,6 +59,7 @@ var StrProto = StrCls[PROTOTYPE];
66
59
  var MathCls = Math;
67
60
  var ArrCls = Array;
68
61
  var ArrProto = ArrCls[PROTOTYPE];
62
+ var ArrSlice = ArrProto["slice"];
69
63
 
70
64
  function safe(func, argArray) {
71
65
  try {
@@ -78,6 +72,7 @@ function safe(func, argArray) {
78
72
  }
79
73
  }
80
74
 
75
+ /*#__NO_SIDE_EFFECTS__*/
81
76
  function safeGet(cb, defValue) {
82
77
  var result = safe(cb);
83
78
  return result.e ? defValue : result.v;
@@ -116,7 +111,7 @@ function isStrictNullOrUndefined(value) {
116
111
  function isDefined(arg) {
117
112
  return !!arg || arg !== UNDEF_VALUE;
118
113
  }
119
- var isString = ( /*#__PURE__*/_createIs(STRING));
114
+ var isString = ( /*#__PURE__*/_createIs("string"));
120
115
  var isFunction = ( /*#__PURE__*/_createIs(FUNCTION));
121
116
  /*#__NO_SIDE_EFFECTS__*/
122
117
  function isObject(value) {
@@ -126,8 +121,8 @@ function isObject(value) {
126
121
  return !!value && typeof value === OBJECT;
127
122
  }
128
123
  var isArray = ArrCls.isArray;
129
- var isNumber = ( /*#__PURE__*/_createIs(NUMBER));
130
- var isBoolean = ( /*#__PURE__*/_createIs(BOOLEAN));
124
+ var isNumber = ( /*#__PURE__*/_createIs("number"));
125
+ var isBoolean = ( /*#__PURE__*/_createIs("boolean"));
131
126
  var isError = ( /*#__PURE__*/_createObjIs("Error"));
132
127
  /*#__NO_SIDE_EFFECTS__*/
133
128
  function isPromiseLike(value) {
@@ -242,6 +237,7 @@ var asString = StrCls;
242
237
 
243
238
  var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
244
239
  var _globalCfg;
240
+ /*#__NO_SIDE_EFFECTS__*/
245
241
  function _getGlobalValue() {
246
242
  var result;
247
243
  if (typeof globalThis !== UNDEFINED) {
@@ -276,7 +272,7 @@ function dumpObj(object, format) {
276
272
  object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
277
273
  }
278
274
  try {
279
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
275
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
280
276
  propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
281
277
  }
282
278
  catch (e) {
@@ -285,18 +281,15 @@ function dumpObj(object, format) {
285
281
  return objType + ": " + propertyValueDump;
286
282
  }
287
283
 
288
- var _slice;
289
- var _unwrapInstFunction = _unwrapFunctionWithPoly;
290
284
  var _unwrapFunction = _unwrapFunctionWithPoly;
291
285
  /*#__NO_SIDE_EFFECTS__*/
292
286
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
293
- _slice = _slice || ArrProto[SLICE];
294
287
  var clsFn = clsProto && clsProto[funcName];
295
288
  return function (thisArg) {
296
289
  var theFunc = (thisArg && thisArg[funcName]) || clsFn;
297
290
  if (theFunc || polyFunc) {
298
291
  var theArgs = arguments;
299
- return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
292
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
300
293
  }
301
294
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
302
295
  };
@@ -304,7 +297,7 @@ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
304
297
 
305
298
  var mathMax = MathCls.max;
306
299
 
307
- var strSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, StrProto));
300
+ var strSlice = ( /*#__PURE__*/_unwrapFunction("slice", StrProto));
308
301
 
309
302
  var strSubstring = ( /*#__PURE__*/_unwrapFunction("substring", StrProto));
310
303
  var strSubstr = ( /*#__PURE__*/_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
@@ -372,7 +365,7 @@ function polyGetKnownSymbol(name) {
372
365
  var propMap = {
373
366
  e: "enumerable",
374
367
  c: "configurable",
375
- v: VALUE,
368
+ v: "value",
376
369
  w: "writable",
377
370
  g: "get",
378
371
  s: "set"
@@ -405,6 +398,7 @@ var _globalLazyTestHooks;
405
398
  function _initTestHooks() {
406
399
  _globalLazyTestHooks = _getGlobalConfig();
407
400
  }
401
+ /*#__NO_SIDE_EFFECTS__*/
408
402
  function getLazy(cb) {
409
403
  var lazyValue = {};
410
404
  !_globalLazyTestHooks && _initTestHooks();
@@ -442,10 +436,14 @@ function createCachedValue(value) {
442
436
 
443
437
  var WINDOW = "window";
444
438
  var _cachedGlobal;
445
- var _cachedWindow;
446
- var _cachedDocument;
447
- var _cachedNavigator;
448
- var _isNode;
439
+ function _getGlobalInstFn(getFn, theArgs) {
440
+ var cachedValue;
441
+ return function () {
442
+ !_globalLazyTestHooks && _initTestHooks();
443
+ (!cachedValue || _globalLazyTestHooks.lzy) && (cachedValue = createCachedValue(safe(getFn, theArgs).v));
444
+ return cachedValue.v;
445
+ };
446
+ }
449
447
  /*#__NO_SIDE_EFFECTS__*/
450
448
  function lazySafeGetInst(name) {
451
449
  return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
@@ -462,41 +460,25 @@ function getInst(name, useCached) {
462
460
  if (gbl && gbl[name]) {
463
461
  return gbl[name];
464
462
  }
465
- if (name === WINDOW && _cachedWindow) {
466
- return _cachedWindow.v;
463
+ if (name === WINDOW) {
464
+ return getWindow();
467
465
  }
468
466
  return NULL_VALUE;
469
467
  }
470
- /*#__NO_SIDE_EFFECTS__*/
471
- function getDocument() {
472
- !_globalLazyTestHooks && _initTestHooks();
473
- (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
474
- return _cachedDocument.v;
475
- }
468
+ var getDocument = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["document"]));
476
469
  /*#__NO_SIDE_EFFECTS__*/
477
470
  function hasWindow() {
478
471
  return !!getWindow();
479
472
  }
480
- /*#__NO_SIDE_EFFECTS__*/
481
- function getWindow() {
482
- !_globalLazyTestHooks && _initTestHooks();
483
- (!_cachedWindow || _globalLazyTestHooks.lzy) && (_cachedWindow = createCachedValue(safe((getInst), [WINDOW]).v));
484
- return _cachedWindow.v;
485
- }
473
+ var getWindow = ( /*#__PURE__*/_getGlobalInstFn(getInst, [WINDOW]));
486
474
  /*#__NO_SIDE_EFFECTS__*/
487
475
  function hasNavigator() {
488
476
  return !!getNavigator();
489
477
  }
490
- /*#__NO_SIDE_EFFECTS__*/
491
- function getNavigator() {
492
- !_globalLazyTestHooks && _initTestHooks();
493
- (!_cachedNavigator || _globalLazyTestHooks.lzy) && (_cachedNavigator = createCachedValue(safe((getInst), ["navigator"]).v));
494
- return _cachedNavigator.v;
495
- }
496
- function isNode() {
497
- !_isNode && (_isNode = createCachedValue(!!safe(function () { return (process && (process.versions || {}).node); }).v));
498
- return _isNode.v;
499
- }
478
+ var getNavigator = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["navigator"]));
479
+ var isNode = ( /*#__PURE__*/_getGlobalInstFn(function () {
480
+ return !!safe(function () { return (process && (process.versions || {}).node); }).v;
481
+ }));
500
482
 
501
483
  var _symbol;
502
484
  var _symbolFor;
@@ -557,8 +539,8 @@ function iterForOf(iter, callbackfn, thisArg) {
557
539
  var iterResult = void 0;
558
540
  try {
559
541
  var count = 0;
560
- while (!(iterResult = iter.next())[DONE]) {
561
- if (callbackfn[CALL](thisArg || iter, iterResult[VALUE], count, iter) === -1) {
542
+ while (!(iterResult = iter.next()).done) {
543
+ if (callbackfn[CALL](thisArg || iter, iterResult.value, count, iter) === -1) {
562
544
  break;
563
545
  }
564
546
  count++;
@@ -573,7 +555,7 @@ function iterForOf(iter, callbackfn, thisArg) {
573
555
  }
574
556
  finally {
575
557
  try {
576
- if (iterResult && !iterResult[DONE]) {
558
+ if (iterResult && !iterResult.done) {
577
559
  iter.return && iter.return(iterResult);
578
560
  }
579
561
  }
@@ -587,7 +569,9 @@ function iterForOf(iter, callbackfn, thisArg) {
587
569
  }
588
570
  }
589
571
 
590
- var fnApply = ( /*#__PURE__*/_unwrapInstFunction("apply"));
572
+ function fnApply(fn, thisArg, argArray) {
573
+ return fn.apply(thisArg, argArray);
574
+ }
591
575
 
592
576
  function arrAppend(target, elms) {
593
577
  if (!isUndefined(elms) && target) {
@@ -619,11 +603,13 @@ function arrForEach(theArray, callbackfn, thisArg) {
619
603
  }
620
604
  }
621
605
 
622
- var arrIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, ArrProto));
606
+ var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
623
607
 
624
608
  var arrMap = ( /*#__PURE__*/_unwrapFunction("map", ArrProto));
625
609
 
626
- var arrSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, ArrProto));
610
+ function arrSlice(theArray, start, end) {
611
+ return ((theArray && theArray["slice"]) || ArrSlice).apply(theArray, ArrSlice[CALL](arguments, 1));
612
+ }
627
613
 
628
614
  var objCreate = ObjClass["create"] || polyObjCreate;
629
615
  /*#__NO_SIDE_EFFECTS__*/
@@ -653,6 +639,7 @@ function objSetPrototypeOf(obj, proto) {
653
639
  return fn(obj, proto);
654
640
  }
655
641
 
642
+ /*#__NO_SIDE_EFFECTS__*/
656
643
  function _createCustomError(name, d, b) {
657
644
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
658
645
  d = objSetPrototypeOf(d, b);
@@ -676,7 +663,7 @@ function createCustomError(name, constructCb, errorBase) {
676
663
  var theArgs = arguments;
677
664
  try {
678
665
  safe(_setName, [theBaseClass, name]);
679
- var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
666
+ var _self = fnApply(theBaseClass, _this, ArrSlice[CALL](theArgs)) || _this;
680
667
  if (_self !== _this) {
681
668
  var orgProto = objGetPrototypeOf(_this);
682
669
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -751,58 +738,54 @@ function isPlainObject(value) {
751
738
  return result;
752
739
  }
753
740
 
754
- var strIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, StrProto));
741
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
755
742
 
756
743
  var REF = "ref";
757
- var UNREF = "un" + REF;
744
+ var UNREF = "unref";
758
745
  var HAS_REF = "hasRef";
759
746
  var ENABLED = "enabled";
747
+ /*#__NO_SIDE_EFFECTS__*/
760
748
  function _createTimerHandler(startTimer, refreshFn, cancelFn) {
761
- var _a;
762
749
  var ref = true;
763
750
  var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;
764
751
  var theTimerHandler;
765
- var _unref = function () {
752
+ function _unref() {
766
753
  ref = false;
767
754
  timerId && timerId[UNREF] && timerId[UNREF]();
768
755
  return theTimerHandler;
769
- };
770
- var _ref = function () {
771
- ref = true;
772
- timerId && timerId[REF] && timerId[REF]();
756
+ }
757
+ function _cancel() {
758
+ timerId && cancelFn(timerId);
759
+ timerId = NULL_VALUE;
760
+ }
761
+ function _refresh() {
762
+ timerId = refreshFn(timerId);
763
+ if (!ref) {
764
+ _unref();
765
+ }
773
766
  return theTimerHandler;
767
+ }
768
+ function _setEnabled(value) {
769
+ !value && timerId && _cancel();
770
+ value && !timerId && _refresh();
771
+ }
772
+ theTimerHandler = {
773
+ cancel: _cancel,
774
+ refresh: _refresh
774
775
  };
775
- var _hasRef = function () {
776
+ theTimerHandler[HAS_REF] = function () {
776
777
  if (timerId && timerId[HAS_REF]) {
777
778
  return timerId[HAS_REF]();
778
779
  }
779
780
  return ref;
780
781
  };
781
- var _refresh = function () {
782
- timerId = refreshFn(timerId);
783
- if (!ref) {
784
- _unref();
785
- }
782
+ theTimerHandler[REF] = function () {
783
+ ref = true;
784
+ timerId && timerId[REF] && timerId[REF]();
786
785
  return theTimerHandler;
787
786
  };
788
- var _cancel = function () {
789
- timerId && cancelFn(timerId);
790
- timerId = NULL_VALUE;
791
- };
792
- var _setEnabled = function (value) {
793
- !value && timerId && _cancel();
794
- value && !timerId && _refresh();
795
- };
796
- theTimerHandler = (_a = {
797
- cancel: _cancel,
798
- refresh: _refresh
799
- },
800
- _a[HAS_REF] = _hasRef,
801
- _a[REF] = _ref,
802
- _a[UNREF] = _unref,
803
- _a[ENABLED] = false,
804
- _a);
805
- objDefineProp(theTimerHandler, ENABLED, {
787
+ theTimerHandler[UNREF] = _unref;
788
+ theTimerHandler = objDefineProp(theTimerHandler, ENABLED, {
806
789
  get: function () { return !!timerId; },
807
790
  set: _setEnabled
808
791
  });
@@ -814,7 +797,7 @@ function _createTimerHandler(startTimer, refreshFn, cancelFn) {
814
797
  };
815
798
  }
816
799
 
817
- function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
800
+ function _createTimeoutWith(startTimer, overrideFn, theArgs) {
818
801
  var isArr = isArray(overrideFn);
819
802
  var len = isArr ? overrideFn.length : 0;
820
803
  var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
@@ -822,7 +805,7 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
822
805
  var timerFn = theArgs[0];
823
806
  theArgs[0] = function () {
824
807
  handler.dn();
825
- fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
808
+ fnApply(timerFn, UNDEF_VALUE, ArrSlice[CALL](arguments));
826
809
  };
827
810
  var handler = _createTimerHandler(startTimer, function (timerId) {
828
811
  if (timerId) {
@@ -830,16 +813,16 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
830
813
  timerId.refresh();
831
814
  return timerId;
832
815
  }
833
- fnApply(clearFn, self, [timerId]);
816
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
834
817
  }
835
- return fnApply(setFn, self, theArgs);
818
+ return fnApply(setFn, UNDEF_VALUE, theArgs);
836
819
  }, function (timerId) {
837
- fnApply(clearFn, self, [timerId]);
820
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
838
821
  });
839
822
  return handler.h;
840
823
  }
841
824
  function scheduleTimeout(callback, timeout) {
842
- return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
825
+ return _createTimeoutWith(true, UNDEF_VALUE, ArrSlice[CALL](arguments));
843
826
  }
844
827
 
845
828
  var strHasOwnProperty = "hasOwnProperty";
@@ -1155,7 +1138,7 @@ var _DYN_GET_PLUGIN = "getPlugin";
1155
1138
  var _DYN_NAME$2 = "name";
1156
1139
  var _DYN_TIME = "time";
1157
1140
  var _DYN_PROCESS_NEXT = "processNext";
1158
- var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
1141
+ var _DYN_GET_PROCESS_TEL_CONT2 = "getProcessTelContext";
1159
1142
  var _DYN_UNLOAD = "unload";
1160
1143
  var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole";
1161
1144
  var _DYN_CREATE_NEW$1 = "createNew";
@@ -1177,7 +1160,6 @@ var _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
1177
1160
  var _DYN_TYPE = "type";
1178
1161
  var _DYN_HANDLER = "handler";
1179
1162
  var _DYN_STATUS = "status";
1180
- var _DYN_ITEMS_RECEIVED$1 = "itemsReceived";
1181
1163
  var _DYN_GET_RESPONSE_HEADER = "getResponseHeader";
1182
1164
  var _DYN_GET_ALL_RESPONSE_HEA5 = "getAllResponseHeaders";
1183
1165
  var _DYN_IS_CHILD_EVT = "isChildEvt";
@@ -1185,6 +1167,7 @@ var _DYN_DATA$1 = "data";
1185
1167
  var _DYN_GET_CTX = "getCtx";
1186
1168
  var _DYN_SET_CTX = "setCtx";
1187
1169
  var _DYN_COMPLETE = "complete";
1170
+ var _DYN_ITEMS_RECEIVED$1 = "itemsReceived";
1188
1171
  var _DYN_URL_STRING = "urlString";
1189
1172
  var _DYN_SEND_POST = "sendPOST";
1190
1173
  var _DYN_HEADERS = "headers";
@@ -1517,435 +1500,95 @@ var STR_PRIORITY = "priority";
1517
1500
  var STR_GET_PERF_MGR = "getPerfMgr";
1518
1501
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1519
1502
 
1520
- var _aiNamespace = null;
1521
- function _getExtensionNamespace() {
1522
- var target = getInst("Microsoft");
1523
- if (target) {
1524
- _aiNamespace = target["ApplicationInsights"];
1525
- }
1526
- return _aiNamespace;
1527
- }
1528
- function getDebugExt(config) {
1529
- var ns = _aiNamespace;
1530
- if (!ns && config.disableDbgExt !== true) {
1531
- ns = _aiNamespace || _getExtensionNamespace();
1532
- }
1533
- return ns ? ns["ChromeDbgExt"] : null;
1534
- }
1535
-
1536
- var strDocumentMode = "documentMode";
1537
- var strLocation = "location";
1538
- var strConsole = "console";
1539
- var strJSON = "JSON";
1540
- var strCrypto = "crypto";
1541
- var strMsCrypto = "msCrypto";
1542
- var strMsie = "msie";
1543
- var strTrident = "trident/";
1544
- var strXMLHttpRequest = "XMLHttpRequest";
1545
- var _isTrident = null;
1546
- var _navUserAgentCheck = null;
1547
- var _enableMocks = false;
1548
- var _useXDomainRequest = null;
1549
- var _beaconsSupported = null;
1550
- function _hasProperty(theClass, property) {
1551
- var supported = false;
1552
- if (theClass) {
1553
- try {
1554
- supported = property in theClass;
1555
- if (!supported) {
1556
- var proto = theClass[strShimPrototype];
1557
- if (proto) {
1558
- supported = property in proto;
1559
- }
1560
- }
1561
- }
1562
- catch (e) {
1563
- }
1564
- if (!supported) {
1565
- try {
1566
- var tmp = new theClass();
1567
- supported = !isUndefined(tmp[property]);
1568
- }
1569
- catch (e) {
1570
- }
1571
- }
1572
- }
1573
- return supported;
1503
+ var rCamelCase = /-([a-z])/g;
1504
+ var rNormalizeInvalid = /([^\w\d_$])/g;
1505
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
1506
+ function isNotNullOrUndefined(value) {
1507
+ return !isNullOrUndefined(value);
1574
1508
  }
1575
- function getLocation(checkForMock) {
1576
- if (checkForMock && _enableMocks) {
1577
- var mockLocation = getInst("__mockLocation");
1578
- if (mockLocation) {
1579
- return mockLocation;
1580
- }
1581
- }
1582
- if (typeof location === strShimObject && location) {
1583
- return location;
1509
+ function normalizeJsName(name) {
1510
+ var value = name;
1511
+ if (value && isString(value)) {
1512
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1513
+ return letter.toUpperCase();
1514
+ });
1515
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1516
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1517
+ return "_" + match;
1518
+ });
1584
1519
  }
1585
- return getInst(strLocation);
1520
+ return value;
1586
1521
  }
1587
- function getConsole() {
1588
- if (typeof console !== strShimUndefined) {
1589
- return console;
1522
+ function strContains(value, search) {
1523
+ if (value && search) {
1524
+ return strIndexOf(value, search) !== -1;
1590
1525
  }
1591
- return getInst(strConsole);
1526
+ return false;
1592
1527
  }
1593
- function hasJSON() {
1594
- return Boolean((typeof JSON === strShimObject && JSON) || getInst(strJSON) !== null);
1528
+ function toISOString(date) {
1529
+ return date && date.toISOString() || "";
1595
1530
  }
1596
- function getJSON() {
1597
- if (hasJSON()) {
1598
- return JSON || getInst(strJSON);
1531
+ function getExceptionName(object) {
1532
+ if (isError(object)) {
1533
+ return object[_DYN_NAME$2 ];
1599
1534
  }
1600
- return null;
1601
- }
1602
- function getCrypto() {
1603
- return getInst(strCrypto);
1604
- }
1605
- function getMsCrypto() {
1606
- return getInst(strMsCrypto);
1535
+ return STR_EMPTY$1;
1607
1536
  }
1608
- function isIE() {
1609
- var nav = getNavigator();
1610
- if (nav && (nav[_DYN_USER_AGENT ] !== _navUserAgentCheck || _isTrident === null)) {
1611
- _navUserAgentCheck = nav[_DYN_USER_AGENT ];
1612
- var userAgent = (_navUserAgentCheck || STR_EMPTY$1)[_DYN_TO_LOWER_CASE$1 ]();
1613
- _isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
1537
+ function setValue(target, field, value, valChk, srcChk) {
1538
+ var theValue = value;
1539
+ if (target) {
1540
+ theValue = target[field];
1541
+ if (theValue !== value && (!srcChk || srcChk(theValue)) && (!valChk || valChk(value))) {
1542
+ theValue = value;
1543
+ target[field] = theValue;
1544
+ }
1614
1545
  }
1615
- return _isTrident;
1546
+ return theValue;
1616
1547
  }
1617
- function getIEVersion(userAgentStr) {
1618
- if (userAgentStr === void 0) { userAgentStr = null; }
1619
- if (!userAgentStr) {
1620
- var navigator_1 = getNavigator() || {};
1621
- userAgentStr = navigator_1 ? (navigator_1.userAgent || STR_EMPTY$1)[_DYN_TO_LOWER_CASE$1 ]() : STR_EMPTY$1;
1548
+ function _createProxyFunction(source, funcName) {
1549
+ var srcFunc = null;
1550
+ var src = null;
1551
+ if (isFunction(source)) {
1552
+ srcFunc = source;
1622
1553
  }
1623
- var ua = (userAgentStr || STR_EMPTY$1)[_DYN_TO_LOWER_CASE$1 ]();
1624
- if (strContains(ua, strMsie)) {
1625
- var doc = getDocument() || {};
1626
- return Math.max(parseInt(ua[_DYN_SPLIT$1 ](strMsie)[1]), (doc[strDocumentMode] || 0));
1554
+ else {
1555
+ src = source;
1627
1556
  }
1628
- else if (strContains(ua, strTrident)) {
1629
- var tridentVer = parseInt(ua[_DYN_SPLIT$1 ](strTrident)[1]);
1630
- if (tridentVer) {
1631
- return tridentVer + 4;
1557
+ return function () {
1558
+ var originalArguments = arguments;
1559
+ if (srcFunc) {
1560
+ src = srcFunc();
1632
1561
  }
1633
- }
1634
- return null;
1635
- }
1636
- function isBeaconsSupported(useCached) {
1637
- if (_beaconsSupported === null || useCached === false) {
1638
- _beaconsSupported = hasNavigator() && Boolean(getNavigator().sendBeacon);
1639
- }
1640
- return _beaconsSupported;
1562
+ if (src) {
1563
+ return src[funcName][_DYN_APPLY ](src, originalArguments);
1564
+ }
1565
+ };
1641
1566
  }
1642
- function isFetchSupported(withKeepAlive) {
1643
- var isSupported = false;
1644
- try {
1645
- isSupported = !!getInst("fetch");
1646
- var request = getInst("Request");
1647
- if (isSupported && withKeepAlive && request) {
1648
- isSupported = _hasProperty(request, "keepalive");
1567
+ function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1568
+ if (target && name && source) {
1569
+ if (overwriteTarget !== false || isUndefined(target[name])) {
1570
+ target[name] = _createProxyFunction(source, theFunc);
1649
1571
  }
1650
1572
  }
1651
- catch (e) {
1652
- }
1653
- return isSupported;
1654
1573
  }
1655
- function useXDomainRequest() {
1656
- if (_useXDomainRequest === null) {
1657
- _useXDomainRequest = (typeof XDomainRequest !== strShimUndefined);
1658
- if (_useXDomainRequest && isXhrSupported()) {
1659
- _useXDomainRequest = _useXDomainRequest && !_hasProperty(getInst(strXMLHttpRequest), "withCredentials");
1574
+ function createClassFromInterface(defaults) {
1575
+ return /** @class */ (function () {
1576
+ function class_1() {
1577
+ var _this = this;
1578
+ if (defaults) {
1579
+ objForEachKey(defaults, function (field, value) {
1580
+ _this[field] = value;
1581
+ });
1582
+ }
1660
1583
  }
1661
- }
1662
- return _useXDomainRequest;
1584
+ return class_1;
1585
+ }());
1663
1586
  }
1664
- function isXhrSupported() {
1665
- var isSupported = false;
1666
- try {
1667
- var xmlHttpRequest = getInst(strXMLHttpRequest);
1668
- isSupported = !!xmlHttpRequest;
1669
- }
1670
- catch (e) {
1587
+ function optimizeObject(theObject) {
1588
+ if (theObject && objAssign) {
1589
+ theObject = ObjClass$1(objAssign({}, theObject));
1671
1590
  }
1672
- return isSupported;
1673
- }
1674
-
1675
- var _a$2;
1676
- var STR_WARN_TO_CONSOLE = "warnToConsole";
1677
- var AiNonUserActionablePrefix = "AI (Internal): ";
1678
- var AiUserActionablePrefix = "AI: ";
1679
- var AIInternalMessagePrefix = "AITR_";
1680
- var defaultValues$1 = {
1681
- loggingLevelConsole: 0,
1682
- loggingLevelTelemetry: 1,
1683
- maxMessageLimit: 25,
1684
- enableDebug: false
1685
- };
1686
- var _logFuncs = (_a$2 = {},
1687
- _a$2[0 ] = null,
1688
- _a$2[1 ] = "errorToConsole",
1689
- _a$2[2 ] = STR_WARN_TO_CONSOLE,
1690
- _a$2[3 ] = "debugToConsole",
1691
- _a$2);
1692
- function _sanitizeDiagnosticText(text) {
1693
- if (text) {
1694
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY$1) + "\"";
1695
- }
1696
- return STR_EMPTY$1;
1697
- }
1698
- function _logToConsole(func, message) {
1699
- var theConsole = getConsole();
1700
- if (!!theConsole) {
1701
- var logFunc = "log";
1702
- if (theConsole[func]) {
1703
- logFunc = func;
1704
- }
1705
- if (isFunction(theConsole[logFunc])) {
1706
- theConsole[logFunc](message);
1707
- }
1708
- }
1709
- }
1710
- var _InternalLogMessage = /** @class */ (function () {
1711
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1712
- if (isUserAct === void 0) { isUserAct = false; }
1713
- var _self = this;
1714
- _self[_DYN_MESSAGE_ID ] = msgId;
1715
- _self[_DYN_MESSAGE$1 ] =
1716
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1717
- msgId;
1718
- var strProps = STR_EMPTY$1;
1719
- if (hasJSON()) {
1720
- strProps = getJSON().stringify(properties);
1721
- }
1722
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY$1) +
1723
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY$1);
1724
- _self[_DYN_MESSAGE$1 ] += diagnosticText;
1725
- }
1726
- _InternalLogMessage.dataType = "MessageData";
1727
- return _InternalLogMessage;
1728
- }());
1729
- function safeGetLogger(core, config) {
1730
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1731
- }
1732
- var DiagnosticLogger = /** @class */ (function () {
1733
- function DiagnosticLogger(config) {
1734
- this.identifier = "DiagnosticLogger";
1735
- this.queue = [];
1736
- var _messageCount = 0;
1737
- var _messageLogged = {};
1738
- var _loggingLevelConsole;
1739
- var _loggingLevelTelemetry;
1740
- var _maxInternalMessageLimit;
1741
- var _enableDebug;
1742
- var _unloadHandler;
1743
- dynamicProto(DiagnosticLogger, this, function (_self) {
1744
- _unloadHandler = _setDefaultsFromConfig(config || {});
1745
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1746
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1747
- if (isUserAct === void 0) { isUserAct = false; }
1748
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1749
- if (_enableDebug) {
1750
- throw dumpObj(message);
1751
- }
1752
- else {
1753
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1754
- if (!isUndefined(message[_DYN_MESSAGE$1 ])) {
1755
- if (isUserAct) {
1756
- var messageKey = +message[_DYN_MESSAGE_ID ];
1757
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1758
- _self[logFunc](message[_DYN_MESSAGE$1 ]);
1759
- _messageLogged[messageKey] = true;
1760
- }
1761
- }
1762
- else {
1763
- if (_loggingLevelConsole >= severity) {
1764
- _self[logFunc](message[_DYN_MESSAGE$1 ]);
1765
- }
1766
- }
1767
- _logInternalMessage(severity, message);
1768
- }
1769
- else {
1770
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1771
- }
1772
- }
1773
- };
1774
- _self.debugToConsole = function (message) {
1775
- _logToConsole("debug", message);
1776
- _debugExtMsg("warning", message);
1777
- };
1778
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1779
- _logToConsole("warn", message);
1780
- _debugExtMsg("warning", message);
1781
- };
1782
- _self.errorToConsole = function (message) {
1783
- _logToConsole("error", message);
1784
- _debugExtMsg("error", message);
1785
- };
1786
- _self.resetInternalMessageCount = function () {
1787
- _messageCount = 0;
1788
- _messageLogged = {};
1789
- };
1790
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1791
- _self[_DYN_UNLOAD ] = function (isAsync) {
1792
- _unloadHandler && _unloadHandler.rm();
1793
- _unloadHandler = null;
1794
- };
1795
- function _logInternalMessage(severity, message) {
1796
- if (_areInternalMessagesThrottled()) {
1797
- return;
1798
- }
1799
- var logMessage = true;
1800
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1801
- if (_messageLogged[messageKey]) {
1802
- logMessage = false;
1803
- }
1804
- else {
1805
- _messageLogged[messageKey] = true;
1806
- }
1807
- if (logMessage) {
1808
- if (severity <= _loggingLevelTelemetry) {
1809
- _self.queue[_DYN_PUSH$2 ](message);
1810
- _messageCount++;
1811
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1812
- }
1813
- if (_messageCount === _maxInternalMessageLimit) {
1814
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1815
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1816
- _self.queue[_DYN_PUSH$2 ](throttleMessage);
1817
- if (severity === 1 ) {
1818
- _self.errorToConsole(throttleLimitMessage);
1819
- }
1820
- else {
1821
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1822
- }
1823
- }
1824
- }
1825
- }
1826
- function _setDefaultsFromConfig(config) {
1827
- return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
1828
- var config = details.cfg;
1829
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1830
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
1831
- _maxInternalMessageLimit = config.maxMessageLimit;
1832
- _enableDebug = config.enableDebug;
1833
- });
1834
- }
1835
- function _areInternalMessagesThrottled() {
1836
- return _messageCount >= _maxInternalMessageLimit;
1837
- }
1838
- function _debugExtMsg(name, data) {
1839
- var dbgExt = getDebugExt(config || {});
1840
- if (dbgExt && dbgExt[_DYN_DIAG_LOG$1 ]) {
1841
- dbgExt[_DYN_DIAG_LOG$1 ](name, data);
1842
- }
1843
- }
1844
- });
1845
- }
1846
- DiagnosticLogger.__ieDyn=1;
1847
- return DiagnosticLogger;
1848
- }());
1849
- function _getLogger(logger) {
1850
- return (logger || new DiagnosticLogger());
1851
- }
1852
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1853
- if (isUserAct === void 0) { isUserAct = false; }
1854
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1855
- }
1856
- function _warnToConsole(logger, message) {
1857
- _getLogger(logger)[_DYN_WARN_TO_CONSOLE ](message);
1858
- }
1859
-
1860
- var rCamelCase = /-([a-z])/g;
1861
- var rNormalizeInvalid = /([^\w\d_$])/g;
1862
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
1863
- function isNotNullOrUndefined(value) {
1864
- return !isNullOrUndefined(value);
1865
- }
1866
- function normalizeJsName(name) {
1867
- var value = name;
1868
- if (value && isString(value)) {
1869
- value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1870
- return letter.toUpperCase();
1871
- });
1872
- value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1873
- value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1874
- return "_" + match;
1875
- });
1876
- }
1877
- return value;
1878
- }
1879
- function strContains(value, search) {
1880
- if (value && search) {
1881
- return strIndexOf(value, search) !== -1;
1882
- }
1883
- return false;
1884
- }
1885
- function toISOString(date) {
1886
- return date && date.toISOString() || "";
1887
- }
1888
- function getExceptionName(object) {
1889
- if (isError(object)) {
1890
- return object[_DYN_NAME$2 ];
1891
- }
1892
- return STR_EMPTY$1;
1893
- }
1894
- function setValue(target, field, value, valChk, srcChk) {
1895
- var theValue = value;
1896
- if (target) {
1897
- theValue = target[field];
1898
- if (theValue !== value && (!srcChk || srcChk(theValue)) && (!valChk || valChk(value))) {
1899
- theValue = value;
1900
- target[field] = theValue;
1901
- }
1902
- }
1903
- return theValue;
1904
- }
1905
- function _createProxyFunction(source, funcName) {
1906
- var srcFunc = null;
1907
- var src = null;
1908
- if (isFunction(source)) {
1909
- srcFunc = source;
1910
- }
1911
- else {
1912
- src = source;
1913
- }
1914
- return function () {
1915
- var originalArguments = arguments;
1916
- if (srcFunc) {
1917
- src = srcFunc();
1918
- }
1919
- if (src) {
1920
- return src[funcName][_DYN_APPLY ](src, originalArguments);
1921
- }
1922
- };
1923
- }
1924
- function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1925
- if (target && name && source) {
1926
- if (overwriteTarget !== false || isUndefined(target[name])) {
1927
- target[name] = _createProxyFunction(source, theFunc);
1928
- }
1929
- }
1930
- }
1931
- function createClassFromInterface(defaults) {
1932
- return /** @class */ (function () {
1933
- function class_1() {
1934
- var _this = this;
1935
- if (defaults) {
1936
- objForEachKey(defaults, function (field, value) {
1937
- _this[field] = value;
1938
- });
1939
- }
1940
- }
1941
- return class_1;
1942
- }());
1943
- }
1944
- function optimizeObject(theObject) {
1945
- if (theObject && objAssign) {
1946
- theObject = ObjClass$1(objAssign({}, theObject));
1947
- }
1948
- return theObject;
1591
+ return theObject;
1949
1592
  }
1950
1593
  function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {
1951
1594
  var theArgs = arguments;
@@ -2022,23 +1665,6 @@ function prependTransports(theTransports, newTransports) {
2022
1665
  }
2023
1666
  return theTransports;
2024
1667
  }
2025
- function parseResponse(response, diagLog) {
2026
- try {
2027
- if (response && response !== "") {
2028
- var result = getJSON().parse(response);
2029
- if (result && result[_DYN_ITEMS_RECEIVED$1 ] && result[_DYN_ITEMS_RECEIVED$1 ] >= result.itemsAccepted &&
2030
- result.itemsReceived - result.itemsAccepted === result.errors[_DYN_LENGTH$2 ]) {
2031
- return result;
2032
- }
2033
- }
2034
- }
2035
- catch (e) {
2036
- _throwInternal(diagLog, 1 , 43 , "Cannot parse the response. " + getExceptionName(e), {
2037
- response: response
2038
- });
2039
- }
2040
- return null;
2041
- }
2042
1668
  var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
2043
1669
  var strWithCredentials = "withCredentials";
2044
1670
  var strTimeout = "timeout";
@@ -2086,33 +1712,172 @@ function convertAllHeadersToMap(headersString) {
2086
1712
  }
2087
1713
  });
2088
1714
  }
2089
- return headers;
1715
+ return headers;
1716
+ }
1717
+ function _appendHeader(theHeaders, xhr, name) {
1718
+ if (!theHeaders[name] && xhr && xhr[_DYN_GET_RESPONSE_HEADER ]) {
1719
+ var value = xhr[_DYN_GET_RESPONSE_HEADER ](name);
1720
+ if (value) {
1721
+ theHeaders[name] = strTrim(value);
1722
+ }
1723
+ }
1724
+ return theHeaders;
1725
+ }
1726
+ var STR_KILL_DURATION_HEADER = "kill-duration";
1727
+ var STR_KILL_DURATION_SECONDS_HEADER = "kill-duration-seconds";
1728
+ var STR_TIME_DELTA_HEADER = "time-delta-millis";
1729
+ function _getAllResponseHeaders(xhr, isOneDs) {
1730
+ var theHeaders = {};
1731
+ if (!xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]) {
1732
+ if (!!isOneDs) {
1733
+ theHeaders = _appendHeader(theHeaders, xhr, STR_TIME_DELTA_HEADER);
1734
+ theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_HEADER);
1735
+ theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_SECONDS_HEADER);
1736
+ }
1737
+ }
1738
+ else {
1739
+ theHeaders = convertAllHeadersToMap(xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]());
1740
+ }
1741
+ return theHeaders;
1742
+ }
1743
+
1744
+ var strDocumentMode = "documentMode";
1745
+ var strLocation = "location";
1746
+ var strConsole = "console";
1747
+ var strJSON = "JSON";
1748
+ var strCrypto = "crypto";
1749
+ var strMsCrypto = "msCrypto";
1750
+ var strMsie = "msie";
1751
+ var strTrident = "trident/";
1752
+ var strXMLHttpRequest = "XMLHttpRequest";
1753
+ var _isTrident = null;
1754
+ var _navUserAgentCheck = null;
1755
+ var _enableMocks = false;
1756
+ var _useXDomainRequest = null;
1757
+ var _beaconsSupported = null;
1758
+ function _hasProperty(theClass, property) {
1759
+ var supported = false;
1760
+ if (theClass) {
1761
+ try {
1762
+ supported = property in theClass;
1763
+ if (!supported) {
1764
+ var proto = theClass[strShimPrototype];
1765
+ if (proto) {
1766
+ supported = property in proto;
1767
+ }
1768
+ }
1769
+ }
1770
+ catch (e) {
1771
+ }
1772
+ if (!supported) {
1773
+ try {
1774
+ var tmp = new theClass();
1775
+ supported = !isUndefined(tmp[property]);
1776
+ }
1777
+ catch (e) {
1778
+ }
1779
+ }
1780
+ }
1781
+ return supported;
1782
+ }
1783
+ function getLocation(checkForMock) {
1784
+ if (checkForMock && _enableMocks) {
1785
+ var mockLocation = getInst("__mockLocation");
1786
+ if (mockLocation) {
1787
+ return mockLocation;
1788
+ }
1789
+ }
1790
+ if (typeof location === strShimObject && location) {
1791
+ return location;
1792
+ }
1793
+ return getInst(strLocation);
1794
+ }
1795
+ function getConsole() {
1796
+ if (typeof console !== strShimUndefined) {
1797
+ return console;
1798
+ }
1799
+ return getInst(strConsole);
1800
+ }
1801
+ function hasJSON() {
1802
+ return Boolean((typeof JSON === strShimObject && JSON) || getInst(strJSON) !== null);
1803
+ }
1804
+ function getJSON() {
1805
+ if (hasJSON()) {
1806
+ return JSON || getInst(strJSON);
1807
+ }
1808
+ return null;
1809
+ }
1810
+ function getCrypto() {
1811
+ return getInst(strCrypto);
1812
+ }
1813
+ function getMsCrypto() {
1814
+ return getInst(strMsCrypto);
1815
+ }
1816
+ function isIE() {
1817
+ var nav = getNavigator();
1818
+ if (nav && (nav[_DYN_USER_AGENT ] !== _navUserAgentCheck || _isTrident === null)) {
1819
+ _navUserAgentCheck = nav[_DYN_USER_AGENT ];
1820
+ var userAgent = (_navUserAgentCheck || STR_EMPTY$1)[_DYN_TO_LOWER_CASE$1 ]();
1821
+ _isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
1822
+ }
1823
+ return _isTrident;
1824
+ }
1825
+ function getIEVersion(userAgentStr) {
1826
+ if (userAgentStr === void 0) { userAgentStr = null; }
1827
+ if (!userAgentStr) {
1828
+ var navigator_1 = getNavigator() || {};
1829
+ userAgentStr = navigator_1 ? (navigator_1.userAgent || STR_EMPTY$1)[_DYN_TO_LOWER_CASE$1 ]() : STR_EMPTY$1;
1830
+ }
1831
+ var ua = (userAgentStr || STR_EMPTY$1)[_DYN_TO_LOWER_CASE$1 ]();
1832
+ if (strContains(ua, strMsie)) {
1833
+ var doc = getDocument() || {};
1834
+ return Math.max(parseInt(ua[_DYN_SPLIT$1 ](strMsie)[1]), (doc[strDocumentMode] || 0));
1835
+ }
1836
+ else if (strContains(ua, strTrident)) {
1837
+ var tridentVer = parseInt(ua[_DYN_SPLIT$1 ](strTrident)[1]);
1838
+ if (tridentVer) {
1839
+ return tridentVer + 4;
1840
+ }
1841
+ }
1842
+ return null;
1843
+ }
1844
+ function isBeaconsSupported(useCached) {
1845
+ if (_beaconsSupported === null || useCached === false) {
1846
+ _beaconsSupported = hasNavigator() && Boolean(getNavigator().sendBeacon);
1847
+ }
1848
+ return _beaconsSupported;
1849
+ }
1850
+ function isFetchSupported(withKeepAlive) {
1851
+ var isSupported = false;
1852
+ try {
1853
+ isSupported = !!getInst("fetch");
1854
+ var request = getInst("Request");
1855
+ if (isSupported && withKeepAlive && request) {
1856
+ isSupported = _hasProperty(request, "keepalive");
1857
+ }
1858
+ }
1859
+ catch (e) {
1860
+ }
1861
+ return isSupported;
2090
1862
  }
2091
- function _appendHeader(theHeaders, xhr, name) {
2092
- if (!theHeaders[name] && xhr && xhr[_DYN_GET_RESPONSE_HEADER ]) {
2093
- var value = xhr[_DYN_GET_RESPONSE_HEADER ](name);
2094
- if (value) {
2095
- theHeaders[name] = strTrim(value);
1863
+ function useXDomainRequest() {
1864
+ if (_useXDomainRequest === null) {
1865
+ _useXDomainRequest = (typeof XDomainRequest !== strShimUndefined);
1866
+ if (_useXDomainRequest && isXhrSupported()) {
1867
+ _useXDomainRequest = _useXDomainRequest && !_hasProperty(getInst(strXMLHttpRequest), "withCredentials");
2096
1868
  }
2097
1869
  }
2098
- return theHeaders;
1870
+ return _useXDomainRequest;
2099
1871
  }
2100
- var STR_KILL_DURATION_HEADER = "kill-duration";
2101
- var STR_KILL_DURATION_SECONDS_HEADER = "kill-duration-seconds";
2102
- var STR_TIME_DELTA_HEADER = "time-delta-millis";
2103
- function _getAllResponseHeaders(xhr, isOneDs) {
2104
- var theHeaders = {};
2105
- if (!xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]) {
2106
- if (!!isOneDs) {
2107
- theHeaders = _appendHeader(theHeaders, xhr, STR_TIME_DELTA_HEADER);
2108
- theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_HEADER);
2109
- theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_SECONDS_HEADER);
2110
- }
1872
+ function isXhrSupported() {
1873
+ var isSupported = false;
1874
+ try {
1875
+ var xmlHttpRequest = getInst(strXMLHttpRequest);
1876
+ isSupported = !!xmlHttpRequest;
2111
1877
  }
2112
- else {
2113
- theHeaders = convertAllHeadersToMap(xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]());
1878
+ catch (e) {
2114
1879
  }
2115
- return theHeaders;
1880
+ return isSupported;
2116
1881
  }
2117
1882
 
2118
1883
  var UInt32Mask = 0x100000000;
@@ -2744,6 +2509,7 @@ function _createAndUseHandler(state, configHandler) {
2744
2509
  configHandler = null;
2745
2510
  }
2746
2511
  };
2512
+ objDefine(handler, "toJSON", { v: function () { return "WatcherHandler" + (handler.fn ? "" : "[X]"); } });
2747
2513
  state.use(handler, configHandler);
2748
2514
  return handler;
2749
2515
  }
@@ -2886,6 +2652,207 @@ function cfgDfBoolean(defaultValue, fallBackName) {
2886
2652
  };
2887
2653
  }
2888
2654
 
2655
+ var _aiNamespace = null;
2656
+ function _getExtensionNamespace() {
2657
+ var target = getInst("Microsoft");
2658
+ if (target) {
2659
+ _aiNamespace = target["ApplicationInsights"];
2660
+ }
2661
+ return _aiNamespace;
2662
+ }
2663
+ function getDebugExt(config) {
2664
+ var ns = _aiNamespace;
2665
+ if (!ns && config.disableDbgExt !== true) {
2666
+ ns = _aiNamespace || _getExtensionNamespace();
2667
+ }
2668
+ return ns ? ns["ChromeDbgExt"] : null;
2669
+ }
2670
+
2671
+ var _a$2;
2672
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
2673
+ var AiNonUserActionablePrefix = "AI (Internal): ";
2674
+ var AiUserActionablePrefix = "AI: ";
2675
+ var AIInternalMessagePrefix = "AITR_";
2676
+ var defaultValues$1 = {
2677
+ loggingLevelConsole: 0,
2678
+ loggingLevelTelemetry: 1,
2679
+ maxMessageLimit: 25,
2680
+ enableDebug: false
2681
+ };
2682
+ var _logFuncs = (_a$2 = {},
2683
+ _a$2[0 ] = null,
2684
+ _a$2[1 ] = "errorToConsole",
2685
+ _a$2[2 ] = STR_WARN_TO_CONSOLE,
2686
+ _a$2[3 ] = "debugToConsole",
2687
+ _a$2);
2688
+ function _sanitizeDiagnosticText(text) {
2689
+ if (text) {
2690
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY$1) + "\"";
2691
+ }
2692
+ return STR_EMPTY$1;
2693
+ }
2694
+ function _logToConsole(func, message) {
2695
+ var theConsole = getConsole();
2696
+ if (!!theConsole) {
2697
+ var logFunc = "log";
2698
+ if (theConsole[func]) {
2699
+ logFunc = func;
2700
+ }
2701
+ if (isFunction(theConsole[logFunc])) {
2702
+ theConsole[logFunc](message);
2703
+ }
2704
+ }
2705
+ }
2706
+ var _InternalLogMessage = /** @class */ (function () {
2707
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
2708
+ if (isUserAct === void 0) { isUserAct = false; }
2709
+ var _self = this;
2710
+ _self[_DYN_MESSAGE_ID ] = msgId;
2711
+ _self[_DYN_MESSAGE$1 ] =
2712
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
2713
+ msgId;
2714
+ var strProps = STR_EMPTY$1;
2715
+ if (hasJSON()) {
2716
+ strProps = getJSON().stringify(properties);
2717
+ }
2718
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY$1) +
2719
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY$1);
2720
+ _self[_DYN_MESSAGE$1 ] += diagnosticText;
2721
+ }
2722
+ _InternalLogMessage.dataType = "MessageData";
2723
+ return _InternalLogMessage;
2724
+ }());
2725
+ function safeGetLogger(core, config) {
2726
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
2727
+ }
2728
+ var DiagnosticLogger = /** @class */ (function () {
2729
+ function DiagnosticLogger(config) {
2730
+ this.identifier = "DiagnosticLogger";
2731
+ this.queue = [];
2732
+ var _messageCount = 0;
2733
+ var _messageLogged = {};
2734
+ var _loggingLevelConsole;
2735
+ var _loggingLevelTelemetry;
2736
+ var _maxInternalMessageLimit;
2737
+ var _enableDebug;
2738
+ var _unloadHandler;
2739
+ dynamicProto(DiagnosticLogger, this, function (_self) {
2740
+ _unloadHandler = _setDefaultsFromConfig(config || {});
2741
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2742
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2743
+ if (isUserAct === void 0) { isUserAct = false; }
2744
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2745
+ if (_enableDebug) {
2746
+ throw dumpObj(message);
2747
+ }
2748
+ else {
2749
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2750
+ if (!isUndefined(message[_DYN_MESSAGE$1 ])) {
2751
+ if (isUserAct) {
2752
+ var messageKey = +message[_DYN_MESSAGE_ID ];
2753
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2754
+ _self[logFunc](message[_DYN_MESSAGE$1 ]);
2755
+ _messageLogged[messageKey] = true;
2756
+ }
2757
+ }
2758
+ else {
2759
+ if (_loggingLevelConsole >= severity) {
2760
+ _self[logFunc](message[_DYN_MESSAGE$1 ]);
2761
+ }
2762
+ }
2763
+ _logInternalMessage(severity, message);
2764
+ }
2765
+ else {
2766
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2767
+ }
2768
+ }
2769
+ };
2770
+ _self.debugToConsole = function (message) {
2771
+ _logToConsole("debug", message);
2772
+ _debugExtMsg("warning", message);
2773
+ };
2774
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2775
+ _logToConsole("warn", message);
2776
+ _debugExtMsg("warning", message);
2777
+ };
2778
+ _self.errorToConsole = function (message) {
2779
+ _logToConsole("error", message);
2780
+ _debugExtMsg("error", message);
2781
+ };
2782
+ _self.resetInternalMessageCount = function () {
2783
+ _messageCount = 0;
2784
+ _messageLogged = {};
2785
+ };
2786
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2787
+ _self[_DYN_UNLOAD ] = function (isAsync) {
2788
+ _unloadHandler && _unloadHandler.rm();
2789
+ _unloadHandler = null;
2790
+ };
2791
+ function _logInternalMessage(severity, message) {
2792
+ if (_areInternalMessagesThrottled()) {
2793
+ return;
2794
+ }
2795
+ var logMessage = true;
2796
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2797
+ if (_messageLogged[messageKey]) {
2798
+ logMessage = false;
2799
+ }
2800
+ else {
2801
+ _messageLogged[messageKey] = true;
2802
+ }
2803
+ if (logMessage) {
2804
+ if (severity <= _loggingLevelTelemetry) {
2805
+ _self.queue[_DYN_PUSH$2 ](message);
2806
+ _messageCount++;
2807
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2808
+ }
2809
+ if (_messageCount === _maxInternalMessageLimit) {
2810
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2811
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2812
+ _self.queue[_DYN_PUSH$2 ](throttleMessage);
2813
+ if (severity === 1 ) {
2814
+ _self.errorToConsole(throttleLimitMessage);
2815
+ }
2816
+ else {
2817
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2818
+ }
2819
+ }
2820
+ }
2821
+ }
2822
+ function _setDefaultsFromConfig(config) {
2823
+ return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
2824
+ var config = details.cfg;
2825
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2826
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
2827
+ _maxInternalMessageLimit = config.maxMessageLimit;
2828
+ _enableDebug = config.enableDebug;
2829
+ });
2830
+ }
2831
+ function _areInternalMessagesThrottled() {
2832
+ return _messageCount >= _maxInternalMessageLimit;
2833
+ }
2834
+ function _debugExtMsg(name, data) {
2835
+ var dbgExt = getDebugExt(config || {});
2836
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG$1 ]) {
2837
+ dbgExt[_DYN_DIAG_LOG$1 ](name, data);
2838
+ }
2839
+ }
2840
+ });
2841
+ }
2842
+ DiagnosticLogger.__ieDyn=1;
2843
+ return DiagnosticLogger;
2844
+ }());
2845
+ function _getLogger(logger) {
2846
+ return (logger || new DiagnosticLogger());
2847
+ }
2848
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2849
+ if (isUserAct === void 0) { isUserAct = false; }
2850
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2851
+ }
2852
+ function _warnToConsole(logger, message) {
2853
+ _getLogger(logger)[_DYN_WARN_TO_CONSOLE ](message);
2854
+ }
2855
+
2889
2856
  var strExecutionContextKey = "ctx";
2890
2857
  var strParentContextKey = "ParentContextKey";
2891
2858
  var strChildrenContextKey = "ChildrenContextKey";
@@ -3531,7 +3498,7 @@ var BaseTelemetryPlugin = /** @class */ (function () {
3531
3498
  function _setDefaults(config, core, pluginChain) {
3532
3499
  createDynamicConfig(config, defaultValues, safeGetLogger(core));
3533
3500
  if (!pluginChain && core) {
3534
- pluginChain = core[_DYN_GET_PROCESS_TEL_CONT0 ]()[_DYN_GET_NEXT ]();
3501
+ pluginChain = core[_DYN_GET_PROCESS_TEL_CONT2 ]()[_DYN_GET_NEXT ]();
3535
3502
  }
3536
3503
  var nextPlugin = _nextPlugin;
3537
3504
  if (_nextPlugin && _nextPlugin[strGetPlugin]) {
@@ -3553,6 +3520,24 @@ var BaseTelemetryPlugin = /** @class */ (function () {
3553
3520
  return BaseTelemetryPlugin;
3554
3521
  }());
3555
3522
 
3523
+ function parseResponse(response, diagLog) {
3524
+ try {
3525
+ if (response && response !== "") {
3526
+ var result = getJSON().parse(response);
3527
+ if (result && result[_DYN_ITEMS_RECEIVED$1 ] && result[_DYN_ITEMS_RECEIVED$1 ] >= result.itemsAccepted &&
3528
+ result.itemsReceived - result.itemsAccepted === result.errors[_DYN_LENGTH$2 ]) {
3529
+ return result;
3530
+ }
3531
+ }
3532
+ }
3533
+ catch (e) {
3534
+ _throwInternal(diagLog, 1 , 43 , "Cannot parse the response. " + (e[_DYN_NAME$2 ] || dumpObj(e)), {
3535
+ response: response
3536
+ });
3537
+ }
3538
+ return null;
3539
+ }
3540
+
3556
3541
  var STR_EMPTY = "";
3557
3542
  var STR_NO_RESPONSE_BODY = "NoResponseBody";
3558
3543
  var _noResponseQs = "&" + STR_NO_RESPONSE_BODY + "=true";
@@ -5569,7 +5554,7 @@ function EnvelopeCreatorInit(logger, telemetryItem) {
5569
5554
  }
5570
5555
  }
5571
5556
  var EnvelopeCreator = {
5572
- Version: '3.1.2-nightly3.2403-07'
5557
+ Version: '3.1.3-nightly3.2403-11'
5573
5558
  };
5574
5559
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
5575
5560
  EnvelopeCreatorInit(logger, telemetryItem);