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