@microsoft/1ds-post-js 4.1.2-nightly3.2403-07 → 4.1.3-nightly3.2403-09

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 (47) hide show
  1. package/bundle/es5/{ms.post-4.1.2-nightly3.2403-07.gbl.js → ms.post-4.1.3-nightly3.2403-09.gbl.js} +452 -469
  2. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.gbl.js.map +1 -0
  3. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.gbl.min.js +7 -0
  4. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.gbl.min.js.map +1 -0
  5. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.integrity.json +46 -0
  6. package/bundle/es5/{ms.post-4.1.2-nightly3.2403-07.js → ms.post-4.1.3-nightly3.2403-09.js} +452 -469
  7. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.js.map +1 -0
  8. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.min.js +7 -0
  9. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.min.js.map +1 -0
  10. package/bundle/es5/ms.post.gbl.js +451 -468
  11. package/bundle/es5/ms.post.gbl.js.map +1 -1
  12. package/bundle/es5/ms.post.gbl.min.js +2 -2
  13. package/bundle/es5/ms.post.gbl.min.js.map +1 -1
  14. package/bundle/es5/ms.post.integrity.json +17 -17
  15. package/bundle/es5/ms.post.js +451 -468
  16. package/bundle/es5/ms.post.js.map +1 -1
  17. package/bundle/es5/ms.post.min.js +2 -2
  18. package/bundle/es5/ms.post.min.js.map +1 -1
  19. package/dist/es5/ms.post.js +449 -466
  20. package/dist/es5/ms.post.js.map +1 -1
  21. package/dist/es5/ms.post.min.js +2 -2
  22. package/dist/es5/ms.post.min.js.map +1 -1
  23. package/dist-es5/BatchNotificationActions.js +1 -1
  24. package/dist-es5/ClockSkewManager.js +1 -1
  25. package/dist-es5/DataModels.js +1 -1
  26. package/dist-es5/EventBatch.js +1 -1
  27. package/dist-es5/HttpManager.js +1 -1
  28. package/dist-es5/Index.js +1 -1
  29. package/dist-es5/InternalConstants.js +1 -1
  30. package/dist-es5/KillSwitch.js +1 -1
  31. package/dist-es5/PostChannel.js +2 -2
  32. package/dist-es5/PostChannel.js.map +1 -1
  33. package/dist-es5/RetryPolicy.js +1 -1
  34. package/dist-es5/Serializer.js +1 -1
  35. package/dist-es5/TimeoutOverrideWrapper.js +1 -1
  36. package/dist-es5/__DynamicConstants.js +1 -1
  37. package/dist-es5/typings/XDomainRequest.js +1 -1
  38. package/package.json +3 -3
  39. package/types/1ds-post-js.d.ts +1 -1
  40. package/types/1ds-post-js.namespaced.d.ts +2 -1
  41. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.gbl.js.map +0 -1
  42. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.gbl.min.js +0 -7
  43. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.gbl.min.js.map +0 -1
  44. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.integrity.json +0 -46
  45. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.js.map +0 -1
  46. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.min.js +0 -7
  47. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.min.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * 1DS JS SDK POST plugin, 4.1.2-nightly3.2403-07
2
+ * 1DS JS SDK POST plugin, 4.1.3-nightly3.2403-09
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
6
6
  (function (global, factory) {
7
7
  var undef = "undefined";
8
- var nsKey, key, nm, theExports = {}, modName = "es5_ms_post_4_1_2_nightly3_2403_07", msMod="__ms$mod__";
9
- var mods={}, modDetail=mods[modName]={}, ver="4.1.2-nightly3.2403-07";
8
+ var nsKey, key, nm, theExports = {}, modName = "es5_ms_post_4_1_3_nightly3_2403_09", msMod="__ms$mod__";
9
+ var mods={}, modDetail=mods[modName]={}, ver="4.1.3-nightly3.2403-09";
10
10
  // Versioned namespace "oneDS4"
11
11
  var exportNs=global, nsKey="oneDS4", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
12
12
  // Global namespace "oneDS"
@@ -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 {
@@ -100,7 +94,7 @@ function isStrictNullOrUndefined(value) {
100
94
  function isDefined(arg) {
101
95
  return !!arg || arg !== UNDEF_VALUE;
102
96
  }
103
- var isString = ( /*#__PURE__*/_createIs(STRING));
97
+ var isString = ( /*#__PURE__*/_createIs("string"));
104
98
  var isFunction = ( /*#__PURE__*/_createIs(FUNCTION));
105
99
  /*#__NO_SIDE_EFFECTS__*/
106
100
  function isObject(value) {
@@ -110,8 +104,8 @@ function isObject(value) {
110
104
  return !!value && typeof value === OBJECT;
111
105
  }
112
106
  var isArray = ArrCls.isArray;
113
- var isNumber = ( /*#__PURE__*/_createIs(NUMBER));
114
- var isBoolean = ( /*#__PURE__*/_createIs(BOOLEAN));
107
+ var isNumber = ( /*#__PURE__*/_createIs("number"));
108
+ var isBoolean = ( /*#__PURE__*/_createIs("boolean"));
115
109
  /*#__NO_SIDE_EFFECTS__*/
116
110
  function isPromiseLike(value) {
117
111
  return !!(value && value.then && isFunction(value.then));
@@ -208,6 +202,7 @@ var asString = StrCls;
208
202
 
209
203
  var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
210
204
  var _globalCfg;
205
+ /*#__NO_SIDE_EFFECTS__*/
211
206
  function _getGlobalValue() {
212
207
  var result;
213
208
  if (typeof globalThis !== UNDEFINED) {
@@ -242,7 +237,7 @@ function dumpObj(object, format) {
242
237
  object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
243
238
  }
244
239
  try {
245
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
240
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
246
241
  propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
247
242
  }
248
243
  catch (e) {
@@ -251,18 +246,15 @@ function dumpObj(object, format) {
251
246
  return objType + ": " + propertyValueDump;
252
247
  }
253
248
 
254
- var _slice;
255
- var _unwrapInstFunction = _unwrapFunctionWithPoly;
256
249
  var _unwrapFunction = _unwrapFunctionWithPoly;
257
250
  /*#__NO_SIDE_EFFECTS__*/
258
251
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
259
- _slice = _slice || ArrProto[SLICE];
260
252
  var clsFn = clsProto && clsProto[funcName];
261
253
  return function (thisArg) {
262
254
  var theFunc = (thisArg && thisArg[funcName]) || clsFn;
263
255
  if (theFunc || polyFunc) {
264
256
  var theArgs = arguments;
265
- return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
257
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
266
258
  }
267
259
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
268
260
  };
@@ -270,7 +262,7 @@ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
270
262
 
271
263
  var mathMax = MathCls.max;
272
264
 
273
- var strSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, StrProto));
265
+ var strSlice = ( /*#__PURE__*/_unwrapFunction("slice", StrProto));
274
266
 
275
267
  var strSubstring = ( /*#__PURE__*/_unwrapFunction("substring", StrProto));
276
268
  var strSubstr = ( /*#__PURE__*/_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
@@ -342,7 +334,7 @@ function polyGetKnownSymbol(name) {
342
334
  var propMap = {
343
335
  e: "enumerable",
344
336
  c: "configurable",
345
- v: VALUE,
337
+ v: "value",
346
338
  w: "writable",
347
339
  g: "get",
348
340
  s: "set"
@@ -375,6 +367,7 @@ var _globalLazyTestHooks;
375
367
  function _initTestHooks() {
376
368
  _globalLazyTestHooks = _getGlobalConfig();
377
369
  }
370
+ /*#__NO_SIDE_EFFECTS__*/
378
371
  function getLazy(cb) {
379
372
  var lazyValue = {};
380
373
  !_globalLazyTestHooks && _initTestHooks();
@@ -412,10 +405,14 @@ function createCachedValue(value) {
412
405
 
413
406
  var WINDOW = "window";
414
407
  var _cachedGlobal;
415
- var _cachedWindow;
416
- var _cachedDocument;
417
- var _cachedNavigator;
418
- var _isNode;
408
+ function _getGlobalInstFn(getFn, theArgs) {
409
+ var cachedValue;
410
+ return function () {
411
+ !_globalLazyTestHooks && _initTestHooks();
412
+ (!cachedValue || _globalLazyTestHooks.lzy) && (cachedValue = createCachedValue(safe(getFn, theArgs).v));
413
+ return cachedValue.v;
414
+ };
415
+ }
419
416
  /*#__NO_SIDE_EFFECTS__*/
420
417
  function lazySafeGetInst(name) {
421
418
  return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
@@ -432,41 +429,25 @@ function getInst(name, useCached) {
432
429
  if (gbl && gbl[name]) {
433
430
  return gbl[name];
434
431
  }
435
- if (name === WINDOW && _cachedWindow) {
436
- return _cachedWindow.v;
432
+ if (name === WINDOW) {
433
+ return getWindow();
437
434
  }
438
435
  return NULL_VALUE;
439
436
  }
440
- /*#__NO_SIDE_EFFECTS__*/
441
- function getDocument() {
442
- !_globalLazyTestHooks && _initTestHooks();
443
- (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
444
- return _cachedDocument.v;
445
- }
437
+ var getDocument = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["document"]));
446
438
  /*#__NO_SIDE_EFFECTS__*/
447
439
  function hasWindow() {
448
440
  return !!getWindow();
449
441
  }
450
- /*#__NO_SIDE_EFFECTS__*/
451
- function getWindow() {
452
- !_globalLazyTestHooks && _initTestHooks();
453
- (!_cachedWindow || _globalLazyTestHooks.lzy) && (_cachedWindow = createCachedValue(safe((getInst), [WINDOW]).v));
454
- return _cachedWindow.v;
455
- }
442
+ var getWindow = ( /*#__PURE__*/_getGlobalInstFn(getInst, [WINDOW]));
456
443
  /*#__NO_SIDE_EFFECTS__*/
457
444
  function hasNavigator() {
458
445
  return !!getNavigator();
459
446
  }
460
- /*#__NO_SIDE_EFFECTS__*/
461
- function getNavigator() {
462
- !_globalLazyTestHooks && _initTestHooks();
463
- (!_cachedNavigator || _globalLazyTestHooks.lzy) && (_cachedNavigator = createCachedValue(safe((getInst), ["navigator"]).v));
464
- return _cachedNavigator.v;
465
- }
466
- function isNode() {
467
- !_isNode && (_isNode = createCachedValue(!!safe(function () { return (process && (process.versions || {}).node); }).v));
468
- return _isNode.v;
469
- }
447
+ var getNavigator = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["navigator"]));
448
+ var isNode = ( /*#__PURE__*/_getGlobalInstFn(function () {
449
+ return !!safe(function () { return (process && (process.versions || {}).node); }).v;
450
+ }));
470
451
 
471
452
  var _symbol;
472
453
  var _symbolFor;
@@ -527,8 +508,8 @@ function iterForOf(iter, callbackfn, thisArg) {
527
508
  var iterResult = void 0;
528
509
  try {
529
510
  var count = 0;
530
- while (!(iterResult = iter.next())[DONE]) {
531
- if (callbackfn[CALL](thisArg || iter, iterResult[VALUE], count, iter) === -1) {
511
+ while (!(iterResult = iter.next()).done) {
512
+ if (callbackfn[CALL](thisArg || iter, iterResult.value, count, iter) === -1) {
532
513
  break;
533
514
  }
534
515
  count++;
@@ -543,7 +524,7 @@ function iterForOf(iter, callbackfn, thisArg) {
543
524
  }
544
525
  finally {
545
526
  try {
546
- if (iterResult && !iterResult[DONE]) {
527
+ if (iterResult && !iterResult.done) {
547
528
  iter.return && iter.return(iterResult);
548
529
  }
549
530
  }
@@ -557,7 +538,9 @@ function iterForOf(iter, callbackfn, thisArg) {
557
538
  }
558
539
  }
559
540
 
560
- var fnApply = ( /*#__PURE__*/_unwrapInstFunction("apply"));
541
+ function fnApply(fn, thisArg, argArray) {
542
+ return fn.apply(thisArg, argArray);
543
+ }
561
544
 
562
545
  function arrAppend(target, elms) {
563
546
  if (!isUndefined(elms) && target) {
@@ -589,9 +572,11 @@ function arrForEach(theArray, callbackfn, thisArg) {
589
572
  }
590
573
  }
591
574
 
592
- var arrIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, ArrProto));
575
+ var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
593
576
 
594
- var arrSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, ArrProto));
577
+ function arrSlice(theArray, start, end) {
578
+ return ((theArray && theArray["slice"]) || ArrSlice).apply(theArray, ArrSlice[CALL](arguments, 1));
579
+ }
595
580
 
596
581
  var objCreate = ObjClass["create"] || polyObjCreate;
597
582
  /*#__NO_SIDE_EFFECTS__*/
@@ -621,6 +606,7 @@ function objSetPrototypeOf(obj, proto) {
621
606
  return fn(obj, proto);
622
607
  }
623
608
 
609
+ /*#__NO_SIDE_EFFECTS__*/
624
610
  function _createCustomError(name, d, b) {
625
611
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
626
612
  d = objSetPrototypeOf(d, b);
@@ -644,7 +630,7 @@ function createCustomError(name, constructCb, errorBase) {
644
630
  var theArgs = arguments;
645
631
  try {
646
632
  safe(_setName, [theBaseClass, name]);
647
- var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
633
+ var _self = fnApply(theBaseClass, _this, ArrSlice[CALL](theArgs)) || _this;
648
634
  if (_self !== _this) {
649
635
  var orgProto = objGetPrototypeOf(_this);
650
636
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -724,7 +710,7 @@ function perfNow() {
724
710
  return utcNow();
725
711
  }
726
712
 
727
- var strIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, StrProto));
713
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
728
714
 
729
715
  var strStartsWith = ( /*#__PURE__*/_unwrapFunctionWithPoly("startsWith", StrProto, polyStrStartsWith));
730
716
  /*#__NO_SIDE_EFFECTS__*/
@@ -738,55 +724,51 @@ function polyStrStartsWith(value, searchString, position) {
738
724
  }
739
725
 
740
726
  var REF = "ref";
741
- var UNREF = "un" + REF;
727
+ var UNREF = "unref";
742
728
  var HAS_REF = "hasRef";
743
729
  var ENABLED = "enabled";
730
+ /*#__NO_SIDE_EFFECTS__*/
744
731
  function _createTimerHandler(startTimer, refreshFn, cancelFn) {
745
- var _a;
746
732
  var ref = true;
747
733
  var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;
748
734
  var theTimerHandler;
749
- var _unref = function () {
735
+ function _unref() {
750
736
  ref = false;
751
737
  timerId && timerId[UNREF] && timerId[UNREF]();
752
738
  return theTimerHandler;
753
- };
754
- var _ref = function () {
755
- ref = true;
756
- timerId && timerId[REF] && timerId[REF]();
739
+ }
740
+ function _cancel() {
741
+ timerId && cancelFn(timerId);
742
+ timerId = NULL_VALUE;
743
+ }
744
+ function _refresh() {
745
+ timerId = refreshFn(timerId);
746
+ if (!ref) {
747
+ _unref();
748
+ }
757
749
  return theTimerHandler;
750
+ }
751
+ function _setEnabled(value) {
752
+ !value && timerId && _cancel();
753
+ value && !timerId && _refresh();
754
+ }
755
+ theTimerHandler = {
756
+ cancel: _cancel,
757
+ refresh: _refresh
758
758
  };
759
- var _hasRef = function () {
759
+ theTimerHandler[HAS_REF] = function () {
760
760
  if (timerId && timerId[HAS_REF]) {
761
761
  return timerId[HAS_REF]();
762
762
  }
763
763
  return ref;
764
764
  };
765
- var _refresh = function () {
766
- timerId = refreshFn(timerId);
767
- if (!ref) {
768
- _unref();
769
- }
765
+ theTimerHandler[REF] = function () {
766
+ ref = true;
767
+ timerId && timerId[REF] && timerId[REF]();
770
768
  return theTimerHandler;
771
769
  };
772
- var _cancel = function () {
773
- timerId && cancelFn(timerId);
774
- timerId = NULL_VALUE;
775
- };
776
- var _setEnabled = function (value) {
777
- !value && timerId && _cancel();
778
- value && !timerId && _refresh();
779
- };
780
- theTimerHandler = (_a = {
781
- cancel: _cancel,
782
- refresh: _refresh
783
- },
784
- _a[HAS_REF] = _hasRef,
785
- _a[REF] = _ref,
786
- _a[UNREF] = _unref,
787
- _a[ENABLED] = false,
788
- _a);
789
- objDefineProp(theTimerHandler, ENABLED, {
770
+ theTimerHandler[UNREF] = _unref;
771
+ theTimerHandler = objDefineProp(theTimerHandler, ENABLED, {
790
772
  get: function () { return !!timerId; },
791
773
  set: _setEnabled
792
774
  });
@@ -798,7 +780,7 @@ function _createTimerHandler(startTimer, refreshFn, cancelFn) {
798
780
  };
799
781
  }
800
782
 
801
- function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
783
+ function _createTimeoutWith(startTimer, overrideFn, theArgs) {
802
784
  var isArr = isArray(overrideFn);
803
785
  var len = isArr ? overrideFn.length : 0;
804
786
  var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
@@ -806,7 +788,7 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
806
788
  var timerFn = theArgs[0];
807
789
  theArgs[0] = function () {
808
790
  handler.dn();
809
- fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
791
+ fnApply(timerFn, UNDEF_VALUE, ArrSlice[CALL](arguments));
810
792
  };
811
793
  var handler = _createTimerHandler(startTimer, function (timerId) {
812
794
  if (timerId) {
@@ -814,19 +796,19 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
814
796
  timerId.refresh();
815
797
  return timerId;
816
798
  }
817
- fnApply(clearFn, self, [timerId]);
799
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
818
800
  }
819
- return fnApply(setFn, self, theArgs);
801
+ return fnApply(setFn, UNDEF_VALUE, theArgs);
820
802
  }, function (timerId) {
821
- fnApply(clearFn, self, [timerId]);
803
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
822
804
  });
823
805
  return handler.h;
824
806
  }
825
807
  function scheduleTimeout(callback, timeout) {
826
- return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
808
+ return _createTimeoutWith(true, UNDEF_VALUE, ArrSlice[CALL](arguments));
827
809
  }
828
810
  function scheduleTimeoutWith(overrideFn, callback, timeout) {
829
- return _createTimeoutWith(this, true, overrideFn, ArrProto[SLICE][CALL](arguments, 1));
811
+ return _createTimeoutWith(true, overrideFn, ArrSlice[CALL](arguments, 1));
830
812
  }
831
813
 
832
814
  var strHasOwnProperty = "hasOwnProperty";
@@ -1138,7 +1120,7 @@ var _DYN_GET_PLUGIN = "getPlugin";
1138
1120
  var _DYN_NAME = "name";
1139
1121
  var _DYN_TIME = "time";
1140
1122
  var _DYN_PROCESS_NEXT = "processNext";
1141
- var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
1123
+ var _DYN_GET_PROCESS_TEL_CONT2 = "getProcessTelContext";
1142
1124
  var _DYN_UNLOAD = "unload";
1143
1125
  var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole";
1144
1126
  var _DYN_CREATE_NEW = "createNew";
@@ -1499,20 +1481,178 @@ var STR_PRIORITY = "priority";
1499
1481
  var STR_GET_PERF_MGR = "getPerfMgr";
1500
1482
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1501
1483
 
1502
- var _aiNamespace = null;
1503
- function _getExtensionNamespace() {
1504
- var target = getInst("Microsoft");
1505
- if (target) {
1506
- _aiNamespace = target["ApplicationInsights"];
1484
+ var rCamelCase = /-([a-z])/g;
1485
+ var rNormalizeInvalid = /([^\w\d_$])/g;
1486
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
1487
+ function isNotNullOrUndefined(value) {
1488
+ return !isNullOrUndefined(value);
1489
+ }
1490
+ function normalizeJsName(name) {
1491
+ var value = name;
1492
+ if (value && isString(value)) {
1493
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1494
+ return letter.toUpperCase();
1495
+ });
1496
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1497
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1498
+ return "_" + match;
1499
+ });
1507
1500
  }
1508
- return _aiNamespace;
1501
+ return value;
1509
1502
  }
1510
- function getDebugExt(config) {
1511
- var ns = _aiNamespace;
1512
- if (!ns && config.disableDbgExt !== true) {
1513
- ns = _aiNamespace || _getExtensionNamespace();
1503
+ function strContains(value, search) {
1504
+ if (value && search) {
1505
+ return strIndexOf(value, search) !== -1;
1514
1506
  }
1515
- return ns ? ns["ChromeDbgExt"] : null;
1507
+ return false;
1508
+ }
1509
+ function _createProxyFunction(source, funcName) {
1510
+ var srcFunc = null;
1511
+ var src = null;
1512
+ if (isFunction(source)) {
1513
+ srcFunc = source;
1514
+ }
1515
+ else {
1516
+ src = source;
1517
+ }
1518
+ return function () {
1519
+ var originalArguments = arguments;
1520
+ if (srcFunc) {
1521
+ src = srcFunc();
1522
+ }
1523
+ if (src) {
1524
+ return src[funcName][_DYN_APPLY ](src, originalArguments);
1525
+ }
1526
+ };
1527
+ }
1528
+ function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1529
+ if (target && name && source) {
1530
+ if (overwriteTarget !== false || isUndefined(target[name])) {
1531
+ target[name] = _createProxyFunction(source, theFunc);
1532
+ }
1533
+ }
1534
+ }
1535
+ function proxyFunctions(target, source, functionsToProxy, overwriteTarget) {
1536
+ if (target && source && isObject(target) && isArray(functionsToProxy)) {
1537
+ arrForEach(functionsToProxy, function (theFuncName) {
1538
+ if (isString(theFuncName)) {
1539
+ proxyFunctionAs(target, theFuncName, source, theFuncName, overwriteTarget);
1540
+ }
1541
+ });
1542
+ }
1543
+ return target;
1544
+ }
1545
+ function optimizeObject(theObject) {
1546
+ if (theObject && objAssign) {
1547
+ theObject = ObjClass$1(objAssign({}, theObject));
1548
+ }
1549
+ return theObject;
1550
+ }
1551
+ function getResponseText(xhr) {
1552
+ try {
1553
+ return xhr.responseText;
1554
+ }
1555
+ catch (e) {
1556
+ }
1557
+ return null;
1558
+ }
1559
+ function formatErrorMessageXdr(xdr, message) {
1560
+ if (xdr) {
1561
+ return "XDomainRequest,Response:" + getResponseText(xdr) || "";
1562
+ }
1563
+ return message;
1564
+ }
1565
+ function formatErrorMessageXhr(xhr, message) {
1566
+ if (xhr) {
1567
+ return "XMLHttpRequest,Status:" + xhr[_DYN_STATUS ] + ",Response:" + getResponseText(xhr) || xhr.response || "";
1568
+ }
1569
+ return message;
1570
+ }
1571
+ function prependTransports(theTransports, newTransports) {
1572
+ if (newTransports) {
1573
+ if (isNumber(newTransports)) {
1574
+ theTransports = [newTransports].concat(theTransports);
1575
+ }
1576
+ else if (isArray(newTransports)) {
1577
+ theTransports = newTransports.concat(theTransports);
1578
+ }
1579
+ }
1580
+ return theTransports;
1581
+ }
1582
+ var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
1583
+ var strWithCredentials = "withCredentials";
1584
+ var strTimeout = "timeout";
1585
+ function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {
1586
+ if (disabled === void 0) { disabled = false; }
1587
+ if (isSync === void 0) { isSync = false; }
1588
+ function _wrapSetXhrProp(xhr, prop, value) {
1589
+ try {
1590
+ xhr[prop] = value;
1591
+ }
1592
+ catch (e) {
1593
+ }
1594
+ }
1595
+ var xhr = new XMLHttpRequest();
1596
+ if (disabled) {
1597
+ _wrapSetXhrProp(xhr, strDisabledPropertyName, disabled);
1598
+ }
1599
+ if (withCredentials) {
1600
+ _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1601
+ }
1602
+ xhr.open(method, urlString, !isSync);
1603
+ if (withCredentials) {
1604
+ _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1605
+ }
1606
+ if (!isSync && timeout) {
1607
+ _wrapSetXhrProp(xhr, strTimeout, timeout);
1608
+ }
1609
+ return xhr;
1610
+ }
1611
+ function convertAllHeadersToMap(headersString) {
1612
+ var headers = {};
1613
+ if (isString(headersString)) {
1614
+ var headersArray = strTrim(headersString)[_DYN_SPLIT$1 ](/[\r\n]+/);
1615
+ arrForEach(headersArray, function (headerEntry) {
1616
+ if (headerEntry) {
1617
+ var idx = headerEntry.indexOf(": ");
1618
+ if (idx !== -1) {
1619
+ var header = strTrim(headerEntry.substring(0, idx))[_DYN_TO_LOWER_CASE$1 ]();
1620
+ var value = strTrim(headerEntry.substring(idx + 1));
1621
+ headers[header] = value;
1622
+ }
1623
+ else {
1624
+ headers[strTrim(headerEntry)] = 1;
1625
+ }
1626
+ }
1627
+ });
1628
+ }
1629
+ return headers;
1630
+ }
1631
+ function _appendHeader(theHeaders, xhr, name) {
1632
+ if (!theHeaders[name] && xhr && xhr[_DYN_GET_RESPONSE_HEADER ]) {
1633
+ var value = xhr[_DYN_GET_RESPONSE_HEADER ](name);
1634
+ if (value) {
1635
+ theHeaders[name] = strTrim(value);
1636
+ }
1637
+ }
1638
+ return theHeaders;
1639
+ }
1640
+ var STR_KILL_DURATION_HEADER$1 = "kill-duration";
1641
+ var STR_KILL_DURATION_SECONDS_HEADER = "kill-duration-seconds";
1642
+ var STR_TIME_DELTA_HEADER$1 = "time-delta-millis";
1643
+ function _getAllResponseHeaders(xhr, isOneDs) {
1644
+ var theHeaders = {};
1645
+ if (!xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]) {
1646
+ if (!!isOneDs) {
1647
+ theHeaders = _appendHeader(theHeaders, xhr, STR_TIME_DELTA_HEADER$1);
1648
+ theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_HEADER$1);
1649
+ theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_SECONDS_HEADER);
1650
+ }
1651
+ }
1652
+ else {
1653
+ theHeaders = convertAllHeadersToMap(xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]());
1654
+ }
1655
+ return theHeaders;
1516
1656
  }
1517
1657
 
1518
1658
  var strLocation = "location";
@@ -1642,365 +1782,6 @@ function isXhrSupported() {
1642
1782
  return isSupported;
1643
1783
  }
1644
1784
 
1645
- var _a$3;
1646
- var STR_WARN_TO_CONSOLE = "warnToConsole";
1647
- var AiNonUserActionablePrefix = "AI (Internal): ";
1648
- var AiUserActionablePrefix = "AI: ";
1649
- var AIInternalMessagePrefix = "AITR_";
1650
- var defaultValues$1 = {
1651
- loggingLevelConsole: 0,
1652
- loggingLevelTelemetry: 1,
1653
- maxMessageLimit: 25,
1654
- enableDebug: false
1655
- };
1656
- var _logFuncs = (_a$3 = {},
1657
- _a$3[0 ] = null,
1658
- _a$3[1 ] = "errorToConsole",
1659
- _a$3[2 ] = STR_WARN_TO_CONSOLE,
1660
- _a$3[3 ] = "debugToConsole",
1661
- _a$3);
1662
- function _sanitizeDiagnosticText(text) {
1663
- if (text) {
1664
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY$3) + "\"";
1665
- }
1666
- return STR_EMPTY$3;
1667
- }
1668
- function _logToConsole(func, message) {
1669
- var theConsole = getConsole();
1670
- if (!!theConsole) {
1671
- var logFunc = "log";
1672
- if (theConsole[func]) {
1673
- logFunc = func;
1674
- }
1675
- if (isFunction(theConsole[logFunc])) {
1676
- theConsole[logFunc](message);
1677
- }
1678
- }
1679
- }
1680
- var _InternalLogMessage = /** @class */ (function () {
1681
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1682
- if (isUserAct === void 0) { isUserAct = false; }
1683
- var _self = this;
1684
- _self[_DYN_MESSAGE_ID ] = msgId;
1685
- _self[_DYN_MESSAGE ] =
1686
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1687
- msgId;
1688
- var strProps = STR_EMPTY$3;
1689
- if (hasJSON()) {
1690
- strProps = getJSON().stringify(properties);
1691
- }
1692
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY$3) +
1693
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY$3);
1694
- _self[_DYN_MESSAGE ] += diagnosticText;
1695
- }
1696
- _InternalLogMessage.dataType = "MessageData";
1697
- return _InternalLogMessage;
1698
- }());
1699
- function safeGetLogger(core, config) {
1700
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1701
- }
1702
- var DiagnosticLogger = /** @class */ (function () {
1703
- function DiagnosticLogger(config) {
1704
- this.identifier = "DiagnosticLogger";
1705
- this.queue = [];
1706
- var _messageCount = 0;
1707
- var _messageLogged = {};
1708
- var _loggingLevelConsole;
1709
- var _loggingLevelTelemetry;
1710
- var _maxInternalMessageLimit;
1711
- var _enableDebug;
1712
- var _unloadHandler;
1713
- dynamicProto(DiagnosticLogger, this, function (_self) {
1714
- _unloadHandler = _setDefaultsFromConfig(config || {});
1715
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1716
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1717
- if (isUserAct === void 0) { isUserAct = false; }
1718
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1719
- if (_enableDebug) {
1720
- throw dumpObj(message);
1721
- }
1722
- else {
1723
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1724
- if (!isUndefined(message[_DYN_MESSAGE ])) {
1725
- if (isUserAct) {
1726
- var messageKey = +message[_DYN_MESSAGE_ID ];
1727
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1728
- _self[logFunc](message[_DYN_MESSAGE ]);
1729
- _messageLogged[messageKey] = true;
1730
- }
1731
- }
1732
- else {
1733
- if (_loggingLevelConsole >= severity) {
1734
- _self[logFunc](message[_DYN_MESSAGE ]);
1735
- }
1736
- }
1737
- _logInternalMessage(severity, message);
1738
- }
1739
- else {
1740
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1741
- }
1742
- }
1743
- };
1744
- _self.debugToConsole = function (message) {
1745
- _logToConsole("debug", message);
1746
- _debugExtMsg("warning", message);
1747
- };
1748
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1749
- _logToConsole("warn", message);
1750
- _debugExtMsg("warning", message);
1751
- };
1752
- _self.errorToConsole = function (message) {
1753
- _logToConsole("error", message);
1754
- _debugExtMsg("error", message);
1755
- };
1756
- _self.resetInternalMessageCount = function () {
1757
- _messageCount = 0;
1758
- _messageLogged = {};
1759
- };
1760
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1761
- _self[_DYN_UNLOAD ] = function (isAsync) {
1762
- _unloadHandler && _unloadHandler.rm();
1763
- _unloadHandler = null;
1764
- };
1765
- function _logInternalMessage(severity, message) {
1766
- if (_areInternalMessagesThrottled()) {
1767
- return;
1768
- }
1769
- var logMessage = true;
1770
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1771
- if (_messageLogged[messageKey]) {
1772
- logMessage = false;
1773
- }
1774
- else {
1775
- _messageLogged[messageKey] = true;
1776
- }
1777
- if (logMessage) {
1778
- if (severity <= _loggingLevelTelemetry) {
1779
- _self.queue[_DYN_PUSH$1 ](message);
1780
- _messageCount++;
1781
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1782
- }
1783
- if (_messageCount === _maxInternalMessageLimit) {
1784
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1785
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1786
- _self.queue[_DYN_PUSH$1 ](throttleMessage);
1787
- if (severity === 1 ) {
1788
- _self.errorToConsole(throttleLimitMessage);
1789
- }
1790
- else {
1791
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1792
- }
1793
- }
1794
- }
1795
- }
1796
- function _setDefaultsFromConfig(config) {
1797
- return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
1798
- var config = details.cfg;
1799
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1800
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
1801
- _maxInternalMessageLimit = config.maxMessageLimit;
1802
- _enableDebug = config.enableDebug;
1803
- });
1804
- }
1805
- function _areInternalMessagesThrottled() {
1806
- return _messageCount >= _maxInternalMessageLimit;
1807
- }
1808
- function _debugExtMsg(name, data) {
1809
- var dbgExt = getDebugExt(config || {});
1810
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1811
- dbgExt[_DYN_DIAG_LOG ](name, data);
1812
- }
1813
- }
1814
- });
1815
- }
1816
- DiagnosticLogger.__ieDyn=1;
1817
- return DiagnosticLogger;
1818
- }());
1819
- function _getLogger(logger) {
1820
- return (logger || new DiagnosticLogger());
1821
- }
1822
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1823
- if (isUserAct === void 0) { isUserAct = false; }
1824
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1825
- }
1826
- function _warnToConsole(logger, message) {
1827
- _getLogger(logger)[_DYN_WARN_TO_CONSOLE ](message);
1828
- }
1829
-
1830
- var rCamelCase = /-([a-z])/g;
1831
- var rNormalizeInvalid = /([^\w\d_$])/g;
1832
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
1833
- function isNotNullOrUndefined(value) {
1834
- return !isNullOrUndefined(value);
1835
- }
1836
- function normalizeJsName(name) {
1837
- var value = name;
1838
- if (value && isString(value)) {
1839
- value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1840
- return letter.toUpperCase();
1841
- });
1842
- value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1843
- value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1844
- return "_" + match;
1845
- });
1846
- }
1847
- return value;
1848
- }
1849
- function strContains(value, search) {
1850
- if (value && search) {
1851
- return strIndexOf(value, search) !== -1;
1852
- }
1853
- return false;
1854
- }
1855
- function _createProxyFunction(source, funcName) {
1856
- var srcFunc = null;
1857
- var src = null;
1858
- if (isFunction(source)) {
1859
- srcFunc = source;
1860
- }
1861
- else {
1862
- src = source;
1863
- }
1864
- return function () {
1865
- var originalArguments = arguments;
1866
- if (srcFunc) {
1867
- src = srcFunc();
1868
- }
1869
- if (src) {
1870
- return src[funcName][_DYN_APPLY ](src, originalArguments);
1871
- }
1872
- };
1873
- }
1874
- function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1875
- if (target && name && source) {
1876
- if (overwriteTarget !== false || isUndefined(target[name])) {
1877
- target[name] = _createProxyFunction(source, theFunc);
1878
- }
1879
- }
1880
- }
1881
- function proxyFunctions(target, source, functionsToProxy, overwriteTarget) {
1882
- if (target && source && isObject(target) && isArray(functionsToProxy)) {
1883
- arrForEach(functionsToProxy, function (theFuncName) {
1884
- if (isString(theFuncName)) {
1885
- proxyFunctionAs(target, theFuncName, source, theFuncName, overwriteTarget);
1886
- }
1887
- });
1888
- }
1889
- return target;
1890
- }
1891
- function optimizeObject(theObject) {
1892
- if (theObject && objAssign) {
1893
- theObject = ObjClass$1(objAssign({}, theObject));
1894
- }
1895
- return theObject;
1896
- }
1897
- function getResponseText(xhr) {
1898
- try {
1899
- return xhr.responseText;
1900
- }
1901
- catch (e) {
1902
- }
1903
- return null;
1904
- }
1905
- function formatErrorMessageXdr(xdr, message) {
1906
- if (xdr) {
1907
- return "XDomainRequest,Response:" + getResponseText(xdr) || "";
1908
- }
1909
- return message;
1910
- }
1911
- function formatErrorMessageXhr(xhr, message) {
1912
- if (xhr) {
1913
- return "XMLHttpRequest,Status:" + xhr[_DYN_STATUS ] + ",Response:" + getResponseText(xhr) || xhr.response || "";
1914
- }
1915
- return message;
1916
- }
1917
- function prependTransports(theTransports, newTransports) {
1918
- if (newTransports) {
1919
- if (isNumber(newTransports)) {
1920
- theTransports = [newTransports].concat(theTransports);
1921
- }
1922
- else if (isArray(newTransports)) {
1923
- theTransports = newTransports.concat(theTransports);
1924
- }
1925
- }
1926
- return theTransports;
1927
- }
1928
- var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
1929
- var strWithCredentials = "withCredentials";
1930
- var strTimeout = "timeout";
1931
- function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {
1932
- if (disabled === void 0) { disabled = false; }
1933
- if (isSync === void 0) { isSync = false; }
1934
- function _wrapSetXhrProp(xhr, prop, value) {
1935
- try {
1936
- xhr[prop] = value;
1937
- }
1938
- catch (e) {
1939
- }
1940
- }
1941
- var xhr = new XMLHttpRequest();
1942
- if (disabled) {
1943
- _wrapSetXhrProp(xhr, strDisabledPropertyName, disabled);
1944
- }
1945
- if (withCredentials) {
1946
- _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1947
- }
1948
- xhr.open(method, urlString, !isSync);
1949
- if (withCredentials) {
1950
- _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1951
- }
1952
- if (!isSync && timeout) {
1953
- _wrapSetXhrProp(xhr, strTimeout, timeout);
1954
- }
1955
- return xhr;
1956
- }
1957
- function convertAllHeadersToMap(headersString) {
1958
- var headers = {};
1959
- if (isString(headersString)) {
1960
- var headersArray = strTrim(headersString)[_DYN_SPLIT$1 ](/[\r\n]+/);
1961
- arrForEach(headersArray, function (headerEntry) {
1962
- if (headerEntry) {
1963
- var idx = headerEntry.indexOf(": ");
1964
- if (idx !== -1) {
1965
- var header = strTrim(headerEntry.substring(0, idx))[_DYN_TO_LOWER_CASE$1 ]();
1966
- var value = strTrim(headerEntry.substring(idx + 1));
1967
- headers[header] = value;
1968
- }
1969
- else {
1970
- headers[strTrim(headerEntry)] = 1;
1971
- }
1972
- }
1973
- });
1974
- }
1975
- return headers;
1976
- }
1977
- function _appendHeader(theHeaders, xhr, name) {
1978
- if (!theHeaders[name] && xhr && xhr[_DYN_GET_RESPONSE_HEADER ]) {
1979
- var value = xhr[_DYN_GET_RESPONSE_HEADER ](name);
1980
- if (value) {
1981
- theHeaders[name] = strTrim(value);
1982
- }
1983
- }
1984
- return theHeaders;
1985
- }
1986
- var STR_KILL_DURATION_HEADER$1 = "kill-duration";
1987
- var STR_KILL_DURATION_SECONDS_HEADER = "kill-duration-seconds";
1988
- var STR_TIME_DELTA_HEADER$1 = "time-delta-millis";
1989
- function _getAllResponseHeaders(xhr, isOneDs) {
1990
- var theHeaders = {};
1991
- if (!xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]) {
1992
- if (!!isOneDs) {
1993
- theHeaders = _appendHeader(theHeaders, xhr, STR_TIME_DELTA_HEADER$1);
1994
- theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_HEADER$1);
1995
- theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_SECONDS_HEADER);
1996
- }
1997
- }
1998
- else {
1999
- theHeaders = convertAllHeadersToMap(xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]());
2000
- }
2001
- return theHeaders;
2002
- }
2003
-
2004
1785
  var UInt32Mask = 0x100000000;
2005
1786
  var MaxUInt32 = 0xffffffff;
2006
1787
  var SEED1 = 123456789;
@@ -2630,6 +2411,7 @@ function _createAndUseHandler(state, configHandler) {
2630
2411
  configHandler = null;
2631
2412
  }
2632
2413
  };
2414
+ objDefine(handler, "toJSON", { v: function () { return "WatcherHandler" + (handler.fn ? "" : "[X]"); } });
2633
2415
  state.use(handler, configHandler);
2634
2416
  return handler;
2635
2417
  }
@@ -2742,6 +2524,207 @@ function onConfigChange(config, configHandler, logger) {
2742
2524
 
2743
2525
  var DisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
2744
2526
 
2527
+ var _aiNamespace = null;
2528
+ function _getExtensionNamespace() {
2529
+ var target = getInst("Microsoft");
2530
+ if (target) {
2531
+ _aiNamespace = target["ApplicationInsights"];
2532
+ }
2533
+ return _aiNamespace;
2534
+ }
2535
+ function getDebugExt(config) {
2536
+ var ns = _aiNamespace;
2537
+ if (!ns && config.disableDbgExt !== true) {
2538
+ ns = _aiNamespace || _getExtensionNamespace();
2539
+ }
2540
+ return ns ? ns["ChromeDbgExt"] : null;
2541
+ }
2542
+
2543
+ var _a$3;
2544
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
2545
+ var AiNonUserActionablePrefix = "AI (Internal): ";
2546
+ var AiUserActionablePrefix = "AI: ";
2547
+ var AIInternalMessagePrefix = "AITR_";
2548
+ var defaultValues$1 = {
2549
+ loggingLevelConsole: 0,
2550
+ loggingLevelTelemetry: 1,
2551
+ maxMessageLimit: 25,
2552
+ enableDebug: false
2553
+ };
2554
+ var _logFuncs = (_a$3 = {},
2555
+ _a$3[0 ] = null,
2556
+ _a$3[1 ] = "errorToConsole",
2557
+ _a$3[2 ] = STR_WARN_TO_CONSOLE,
2558
+ _a$3[3 ] = "debugToConsole",
2559
+ _a$3);
2560
+ function _sanitizeDiagnosticText(text) {
2561
+ if (text) {
2562
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY$3) + "\"";
2563
+ }
2564
+ return STR_EMPTY$3;
2565
+ }
2566
+ function _logToConsole(func, message) {
2567
+ var theConsole = getConsole();
2568
+ if (!!theConsole) {
2569
+ var logFunc = "log";
2570
+ if (theConsole[func]) {
2571
+ logFunc = func;
2572
+ }
2573
+ if (isFunction(theConsole[logFunc])) {
2574
+ theConsole[logFunc](message);
2575
+ }
2576
+ }
2577
+ }
2578
+ var _InternalLogMessage = /** @class */ (function () {
2579
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
2580
+ if (isUserAct === void 0) { isUserAct = false; }
2581
+ var _self = this;
2582
+ _self[_DYN_MESSAGE_ID ] = msgId;
2583
+ _self[_DYN_MESSAGE ] =
2584
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
2585
+ msgId;
2586
+ var strProps = STR_EMPTY$3;
2587
+ if (hasJSON()) {
2588
+ strProps = getJSON().stringify(properties);
2589
+ }
2590
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY$3) +
2591
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY$3);
2592
+ _self[_DYN_MESSAGE ] += diagnosticText;
2593
+ }
2594
+ _InternalLogMessage.dataType = "MessageData";
2595
+ return _InternalLogMessage;
2596
+ }());
2597
+ function safeGetLogger(core, config) {
2598
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
2599
+ }
2600
+ var DiagnosticLogger = /** @class */ (function () {
2601
+ function DiagnosticLogger(config) {
2602
+ this.identifier = "DiagnosticLogger";
2603
+ this.queue = [];
2604
+ var _messageCount = 0;
2605
+ var _messageLogged = {};
2606
+ var _loggingLevelConsole;
2607
+ var _loggingLevelTelemetry;
2608
+ var _maxInternalMessageLimit;
2609
+ var _enableDebug;
2610
+ var _unloadHandler;
2611
+ dynamicProto(DiagnosticLogger, this, function (_self) {
2612
+ _unloadHandler = _setDefaultsFromConfig(config || {});
2613
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2614
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2615
+ if (isUserAct === void 0) { isUserAct = false; }
2616
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2617
+ if (_enableDebug) {
2618
+ throw dumpObj(message);
2619
+ }
2620
+ else {
2621
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2622
+ if (!isUndefined(message[_DYN_MESSAGE ])) {
2623
+ if (isUserAct) {
2624
+ var messageKey = +message[_DYN_MESSAGE_ID ];
2625
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2626
+ _self[logFunc](message[_DYN_MESSAGE ]);
2627
+ _messageLogged[messageKey] = true;
2628
+ }
2629
+ }
2630
+ else {
2631
+ if (_loggingLevelConsole >= severity) {
2632
+ _self[logFunc](message[_DYN_MESSAGE ]);
2633
+ }
2634
+ }
2635
+ _logInternalMessage(severity, message);
2636
+ }
2637
+ else {
2638
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2639
+ }
2640
+ }
2641
+ };
2642
+ _self.debugToConsole = function (message) {
2643
+ _logToConsole("debug", message);
2644
+ _debugExtMsg("warning", message);
2645
+ };
2646
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2647
+ _logToConsole("warn", message);
2648
+ _debugExtMsg("warning", message);
2649
+ };
2650
+ _self.errorToConsole = function (message) {
2651
+ _logToConsole("error", message);
2652
+ _debugExtMsg("error", message);
2653
+ };
2654
+ _self.resetInternalMessageCount = function () {
2655
+ _messageCount = 0;
2656
+ _messageLogged = {};
2657
+ };
2658
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2659
+ _self[_DYN_UNLOAD ] = function (isAsync) {
2660
+ _unloadHandler && _unloadHandler.rm();
2661
+ _unloadHandler = null;
2662
+ };
2663
+ function _logInternalMessage(severity, message) {
2664
+ if (_areInternalMessagesThrottled()) {
2665
+ return;
2666
+ }
2667
+ var logMessage = true;
2668
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2669
+ if (_messageLogged[messageKey]) {
2670
+ logMessage = false;
2671
+ }
2672
+ else {
2673
+ _messageLogged[messageKey] = true;
2674
+ }
2675
+ if (logMessage) {
2676
+ if (severity <= _loggingLevelTelemetry) {
2677
+ _self.queue[_DYN_PUSH$1 ](message);
2678
+ _messageCount++;
2679
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2680
+ }
2681
+ if (_messageCount === _maxInternalMessageLimit) {
2682
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2683
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2684
+ _self.queue[_DYN_PUSH$1 ](throttleMessage);
2685
+ if (severity === 1 ) {
2686
+ _self.errorToConsole(throttleLimitMessage);
2687
+ }
2688
+ else {
2689
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2690
+ }
2691
+ }
2692
+ }
2693
+ }
2694
+ function _setDefaultsFromConfig(config) {
2695
+ return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
2696
+ var config = details.cfg;
2697
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2698
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
2699
+ _maxInternalMessageLimit = config.maxMessageLimit;
2700
+ _enableDebug = config.enableDebug;
2701
+ });
2702
+ }
2703
+ function _areInternalMessagesThrottled() {
2704
+ return _messageCount >= _maxInternalMessageLimit;
2705
+ }
2706
+ function _debugExtMsg(name, data) {
2707
+ var dbgExt = getDebugExt(config || {});
2708
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2709
+ dbgExt[_DYN_DIAG_LOG ](name, data);
2710
+ }
2711
+ }
2712
+ });
2713
+ }
2714
+ DiagnosticLogger.__ieDyn=1;
2715
+ return DiagnosticLogger;
2716
+ }());
2717
+ function _getLogger(logger) {
2718
+ return (logger || new DiagnosticLogger());
2719
+ }
2720
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2721
+ if (isUserAct === void 0) { isUserAct = false; }
2722
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2723
+ }
2724
+ function _warnToConsole(logger, message) {
2725
+ _getLogger(logger)[_DYN_WARN_TO_CONSOLE ](message);
2726
+ }
2727
+
2745
2728
  var strExecutionContextKey = "ctx";
2746
2729
  var strParentContextKey = "ParentContextKey";
2747
2730
  var strChildrenContextKey = "ChildrenContextKey";
@@ -3387,7 +3370,7 @@ var BaseTelemetryPlugin = /** @class */ (function () {
3387
3370
  function _setDefaults(config, core, pluginChain) {
3388
3371
  createDynamicConfig(config, defaultValues, safeGetLogger(core));
3389
3372
  if (!pluginChain && core) {
3390
- pluginChain = core[_DYN_GET_PROCESS_TEL_CONT0 ]()[_DYN_GET_NEXT ]();
3373
+ pluginChain = core[_DYN_GET_PROCESS_TEL_CONT2 ]()[_DYN_GET_NEXT ]();
3391
3374
  }
3392
3375
  var nextPlugin = _nextPlugin;
3393
3376
  if (_nextPlugin && _nextPlugin[strGetPlugin]) {
@@ -4132,7 +4115,7 @@ var _DYN_LENGTH$1 = "length";
4132
4115
  var _DYN_PROCESS_TELEMETRY_ST0 = "processTelemetryStart";
4133
4116
 
4134
4117
  var _a$1;
4135
- var Version = '4.1.2-nightly3.2403-07';
4118
+ var Version = '4.1.3-nightly3.2403-09';
4136
4119
  var FullVersionString = "1DS-Web-JS-" + Version;
4137
4120
  var ObjHasOwnProperty = ObjProto$1.hasOwnProperty;
4138
4121
  var _fieldTypeEventPropMap = (_a$1 = {},
@@ -5773,7 +5756,7 @@ var PostChannel = /** @class */ (function (_super) {
5773
5756
  var _this = _super.call(this) || this;
5774
5757
  _this.identifier = "PostChannel";
5775
5758
  _this.priority = 1011;
5776
- _this.version = '4.1.2-nightly3.2403-07';
5759
+ _this.version = '4.1.3-nightly3.2403-09';
5777
5760
  var _postConfig;
5778
5761
  var _isTeardownCalled = false;
5779
5762
  var _flushCallbackQueue = [];