@microsoft/applicationinsights-channel-js 3.0.0-beta.2210-17 → 3.0.0-beta.2210-19

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.
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "name": "applicationinsights-channel-js",
3
- "version": "3.0.0-beta.2210-17",
3
+ "version": "3.0.0-beta.2210-19",
4
4
  "ext": {
5
5
  "@js": {
6
6
  "file": "applicationinsights-channel-js.js",
7
7
  "type": "text/javascript; charset=utf-8",
8
- "integrity": "sha256-xRT/l37wuhHD/NvC93AE5VvdeXF+1S9Z17wH9EuC6UI= sha384-yCWMcMHZuK6Z7V62w10wwNyrmW4sUy2C/V/AIFqVbJT5tGwOd0fA4jBJRZ2qX8H6 sha512-3tAbsRGJ620wMVAtWJf53yF6Rb01HWvOBsFa5O/K5hELn3v/cyKSxpxAQxzVJ5Mfjeu8PJfcoV7vOwwS6CCNyQ==",
8
+ "integrity": "sha256-M2phu3KwgYoe5S7PR+v2clmFBLVtacK8j146G6mvcu4= sha384-WtlHqBqoMnQfYQudBNXEXCZTUyH5WMJe8x5W8foZVOeXDzgiue+6f9ZqcU4l51e1 sha512-7xHrL7pnTr43ZUQmEa1++XY8Eq7oUsb18KbCxL+g1pa+qURshtJw8pvMGk2i3kWCx8uQjLw7iB2sd6EH1/90yw==",
9
9
  "hashes": {
10
- "sha256": "xRT/l37wuhHD/NvC93AE5VvdeXF+1S9Z17wH9EuC6UI=",
11
- "sha384": "yCWMcMHZuK6Z7V62w10wwNyrmW4sUy2C/V/AIFqVbJT5tGwOd0fA4jBJRZ2qX8H6",
12
- "sha512": "3tAbsRGJ620wMVAtWJf53yF6Rb01HWvOBsFa5O/K5hELn3v/cyKSxpxAQxzVJ5Mfjeu8PJfcoV7vOwwS6CCNyQ=="
10
+ "sha256": "M2phu3KwgYoe5S7PR+v2clmFBLVtacK8j146G6mvcu4=",
11
+ "sha384": "WtlHqBqoMnQfYQudBNXEXCZTUyH5WMJe8x5W8foZVOeXDzgiue+6f9ZqcU4l51e1",
12
+ "sha512": "7xHrL7pnTr43ZUQmEa1++XY8Eq7oUsb18KbCxL+g1pa+qURshtJw8pvMGk2i3kWCx8uQjLw7iB2sd6EH1/90yw=="
13
13
  }
14
14
  },
15
15
  "@min.js": {
16
16
  "file": "applicationinsights-channel-js.min.js",
17
17
  "type": "text/javascript; charset=utf-8",
18
- "integrity": "sha256-O+xqWptU1Rp8cSf0zN24v8saIHOqjF71WKWjGtjvWik= sha384-0+MVclPRDIN+0stHtUM/niQfNpZHoMe91TOuBpGsH1b2y7oxs3qcb8+93wBrx+OK sha512-PwXWrX1CAZNxiWZAZ+EmNICGFRDQcW6JBG4j66/pfNPFycQMysP72h8AP1nVyYJh/5K9IaoQhPQsiREEBKtGDg==",
18
+ "integrity": "sha256-cYKp+W/qQqA5xPdOF8nVaNrC5ewIdMv/TFbvAwmoxeQ= sha384-WvkA5knmbfJVSemjQExhym1i8S7imUYODnXR8pCDIFS1pKaFwu+mg2SFt3VGvLf+ sha512-sdJ7T85aYjdu/pdNlggrSFDTvgI7QgG+jMVm6M8EX5RE7WZoQutsgBRpAgxApm7wSYCEHVQwA5KjRHUM7Xe/zQ==",
19
19
  "hashes": {
20
- "sha256": "O+xqWptU1Rp8cSf0zN24v8saIHOqjF71WKWjGtjvWik=",
21
- "sha384": "0+MVclPRDIN+0stHtUM/niQfNpZHoMe91TOuBpGsH1b2y7oxs3qcb8+93wBrx+OK",
22
- "sha512": "PwXWrX1CAZNxiWZAZ+EmNICGFRDQcW6JBG4j66/pfNPFycQMysP72h8AP1nVyYJh/5K9IaoQhPQsiREEBKtGDg=="
20
+ "sha256": "cYKp+W/qQqA5xPdOF8nVaNrC5ewIdMv/TFbvAwmoxeQ=",
21
+ "sha384": "WvkA5knmbfJVSemjQExhym1i8S7imUYODnXR8pCDIFS1pKaFwu+mg2SFt3VGvLf+",
22
+ "sha512": "sdJ7T85aYjdu/pdNlggrSFDTvgI7QgG+jMVm6M8EX5RE7WZoQutsgBRpAgxApm7wSYCEHVQwA5KjRHUM7Xe/zQ=="
23
23
  }
24
24
  }
25
25
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Channel, 3.0.0-beta.2210-17
2
+ * Application Insights JavaScript SDK - Channel, 3.0.0-beta.2210-19
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -158,7 +158,7 @@
158
158
  function _isObjectArrayOrFunctionPrototype(target) {
159
159
  return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
160
160
  }
161
- function _getObjProto$1(target) {
161
+ function _getObjProto(target) {
162
162
  var newProto;
163
163
  if (target) {
164
164
  if (_objGetPrototypeOf) {
@@ -232,7 +232,7 @@
232
232
  _forEachProp(instFuncs, function (name) {
233
233
  baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
234
234
  });
235
- var baseProto = _getObjProto$1(classProto);
235
+ var baseProto = _getObjProto(classProto);
236
236
  var visited = [];
237
237
  while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
238
238
  _forEachProp(baseProto, function (name) {
@@ -241,7 +241,7 @@
241
241
  }
242
242
  });
243
243
  visited.push(baseProto);
244
- baseProto = _getObjProto$1(baseProto);
244
+ baseProto = _getObjProto(baseProto);
245
245
  }
246
246
  return baseFuncs;
247
247
  }
@@ -255,7 +255,7 @@
255
255
  }
256
256
  if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
257
257
  var canAddInst = !_hasOwnProperty(target, funcName);
258
- var objProto = _getObjProto$1(target);
258
+ var objProto = _getObjProto(target);
259
259
  var visited = [];
260
260
  while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
261
261
  var protoFunc = objProto[funcName];
@@ -264,7 +264,7 @@
264
264
  break;
265
265
  }
266
266
  visited.push(objProto);
267
- objProto = _getObjProto$1(objProto);
267
+ objProto = _getObjProto(objProto);
268
268
  }
269
269
  try {
270
270
  if (canAddInst) {
@@ -282,7 +282,7 @@
282
282
  function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
283
283
  var protoFunc = proto[funcName];
284
284
  if (protoFunc === currentDynProtoProxy) {
285
- protoFunc = _getObjProto$1(proto)[funcName];
285
+ protoFunc = _getObjProto(proto)[funcName];
286
286
  }
287
287
  if (typeof protoFunc !== strFunction) {
288
288
  _throwTypeError("[" + funcName + "] is not a " + strFunction);
@@ -318,13 +318,13 @@
318
318
  function _checkPrototype(classProto, thisTarget) {
319
319
  if (_objGetPrototypeOf) {
320
320
  var visited = [];
321
- var thisProto = _getObjProto$1(thisTarget);
321
+ var thisProto = _getObjProto(thisTarget);
322
322
  while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
323
323
  if (thisProto === classProto) {
324
324
  return true;
325
325
  }
326
326
  visited.push(thisProto);
327
- thisProto = _getObjProto$1(thisProto);
327
+ thisProto = _getObjProto(thisProto);
328
328
  }
329
329
  return false;
330
330
  }
@@ -378,6 +378,7 @@
378
378
  var PROTOTYPE = "prototype";
379
379
  var STRING = "string";
380
380
  var UNDEFINED = "undefined";
381
+ var CONSTRUCTOR = "constructor";
381
382
  var HAS_OWN_PROPERTY = "hasOwnProperty";
382
383
  var SYMBOL = "Symbol";
383
384
  var POLYFILL_TAG = "_polyfill";
@@ -450,7 +451,7 @@
450
451
  return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
451
452
  }
452
453
 
453
- function objForEachKey$1(theObject, callbackfn, thisArg) {
454
+ function objForEachKey(theObject, callbackfn, thisArg) {
454
455
  if (theObject && isObject(theObject)) {
455
456
  for (var prop in theObject) {
456
457
  if (objHasOwn(theObject, prop)) {
@@ -479,7 +480,7 @@
479
480
  }
480
481
  function objDeepFreeze(value) {
481
482
  if (_objFreeze) {
482
- objForEachKey$1(value, function (key, value) {
483
+ objForEachKey(value, function (key, value) {
483
484
  if (isArray(value) || isObject(value)) {
484
485
  _objFreeze(value);
485
486
  }
@@ -489,11 +490,11 @@
489
490
  }
490
491
  var objFreeze = _objFreeze || _doNothing;
491
492
  ObjClass["seal"] || _doNothing;
492
- ObjClass["getPrototypeOf"] || _doNothing;
493
+ var objGetPrototypeOf = ObjClass["getPrototypeOf"] || _doNothing;
493
494
 
494
495
  function createEnum(values) {
495
496
  var theEnum = {};
496
- objForEachKey$1(values, function (field, value) {
497
+ objForEachKey(values, function (field, value) {
497
498
  theEnum[field] = value;
498
499
  theEnum[value] = field;
499
500
  });
@@ -501,7 +502,7 @@
501
502
  }
502
503
  function createSimpleMap(values) {
503
504
  var mapClass = {};
504
- objForEachKey$1(values, function (field, value) {
505
+ objForEachKey(values, function (field, value) {
505
506
  mapClass[field] = value[1];
506
507
  mapClass[value[0]] = value[1];
507
508
  });
@@ -571,7 +572,7 @@
571
572
  d.__proto__ = b;
572
573
  }) ||
573
574
  function (d, b) {
574
- objForEachKey$1(b, function (key, value) {
575
+ objForEachKey(b, function (key, value) {
575
576
  d[key] = value;
576
577
  });
577
578
  };
@@ -734,6 +735,9 @@
734
735
  (!_cachedDocument || (_globalLazyTestHooks.lzy && !_cachedDocument.b)) && (_cachedDocument = _lazySafeGet(function () { return getInst(DOCUMENT); }, UNDEF_VALUE));
735
736
  return _cachedDocument.v;
736
737
  }
738
+ function hasWindow() {
739
+ return !!getWindow();
740
+ }
737
741
  function getWindow() {
738
742
  (!_cachedWindow || (_globalLazyTestHooks.lzy && !_cachedWindow.b)) && (_cachedWindow = _lazySafeGet(function () { return getInst(WINDOW); }, UNDEF_VALUE));
739
743
  return _cachedWindow.v;
@@ -818,6 +822,45 @@
818
822
 
819
823
  var arrMap = _unwrapFunction("map");
820
824
 
825
+ function utcNow() {
826
+ return (Date.now || polyUtcNow)();
827
+ }
828
+ function polyUtcNow() {
829
+ return new Date().getTime();
830
+ }
831
+
832
+ var _fnToString$1;
833
+ var _objCtrFnString;
834
+ var _gblWindow;
835
+ function isPlainObject(value) {
836
+ if (!value || typeof value !== OBJECT) {
837
+ return false;
838
+ }
839
+ if (!_gblWindow) {
840
+ _gblWindow = hasWindow() ? getWindow() : true;
841
+ }
842
+ var result = false;
843
+ if (value !== _gblWindow) {
844
+ if (!_objCtrFnString) {
845
+ _fnToString$1 = Function[PROTOTYPE].toString;
846
+ _objCtrFnString = _fnToString$1.call(ObjClass);
847
+ }
848
+ try {
849
+ var proto = objGetPrototypeOf(value);
850
+ result = !proto;
851
+ if (!result) {
852
+ if (objHasOwnProperty(proto, CONSTRUCTOR)) {
853
+ proto = proto[CONSTRUCTOR];
854
+ }
855
+ result = proto && typeof proto === FUNCTION && _fnToString$1.call(proto) === _objCtrFnString;
856
+ }
857
+ }
858
+ catch (ex) {
859
+ }
860
+ }
861
+ return result;
862
+ }
863
+
821
864
  var strIndexOf = _unwrapFunction(INDEX_OF);
822
865
 
823
866
  function _createTrimFn(exp) {
@@ -874,11 +917,10 @@
874
917
  var _DYN_CONFIGURABLE = "configurable";
875
918
  var _DYN_ENUMERABLE = "enumerable";
876
919
  var _DYN_APPLY = "apply";
877
- var _DYN_INDEX_OF$1 = "indexOf";
878
920
  var _DYN_PUSH$1 = "push";
921
+ var _DYN_SPLICE = "splice";
879
922
  var _DYN_INITIALIZE = "initialize";
880
923
  var _DYN_IDENTIFIER = "identifier";
881
- var _DYN_SPLICE = "splice";
882
924
  var _DYN_IS_INITIALIZED = "isInitialized";
883
925
  var _DYN_NAME$2 = "name";
884
926
  var _DYN_TIME = "time";
@@ -928,7 +970,6 @@
928
970
  throw new aggregationErrorType(message, sourceErrors || []);
929
971
  }
930
972
 
931
- var UNDEFINED_VALUE$1 = undefined;
932
973
  var STR_EMPTY = "";
933
974
  var STR_CORE = "core";
934
975
  var STR_DISABLED = "disabled";
@@ -941,14 +982,11 @@
941
982
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
942
983
 
943
984
  var strToString = "toString";
944
- var strGetPrototypeOf = "getPrototypeOf";
945
- var strConstructor = "constructor";
946
985
  var _fnToString = ObjClass$1[strToString];
947
- var _objFunctionString = _fnToString[_DYN_CALL ](ObjClass$1);
986
+ _fnToString[_DYN_CALL ](ObjClass$1);
948
987
  var rCamelCase = /-([a-z])/g;
949
988
  var rNormalizeInvalid = /([^\w\d_$])/g;
950
989
  var rLeadingNumeric = /^(\d+[\w\d_$])/;
951
- var _getObjProto = Object[strGetPrototypeOf];
952
990
  function isNotNullOrUndefined(value) {
953
991
  return !isNullOrUndefined(value);
954
992
  }
@@ -965,36 +1003,15 @@
965
1003
  }
966
1004
  return value;
967
1005
  }
968
- var objForEachKey = objForEachKey$1;
969
1006
  function strContains(value, search) {
970
1007
  if (value && search) {
971
1008
  return strIndexOf(value, search) !== -1;
972
1009
  }
973
1010
  return false;
974
1011
  }
975
- function isPlainObject(value) {
976
- var result = false;
977
- if (value && typeof value === "object") {
978
- var proto = _getObjProto(value);
979
- if (!proto) {
980
- result = true;
981
- }
982
- else {
983
- if (proto[strConstructor] && objHasOwnProperty(proto, strConstructor)) {
984
- proto = proto[strConstructor];
985
- }
986
- result = typeof proto === strShimFunction && _fnToString[_DYN_CALL ](proto) === _objFunctionString;
987
- }
988
- }
989
- return result;
990
- }
991
1012
  function toISOString(date) {
992
1013
  return date && date.toISOString() || "";
993
1014
  }
994
- function dateNow() {
995
- var dt = Date;
996
- return dt.now ? dt.now() : new dt().getTime();
997
- }
998
1015
  function getExceptionName(object) {
999
1016
  if (isError(object)) {
1000
1017
  return object[_DYN_NAME$2 ];
@@ -1242,7 +1259,7 @@
1242
1259
  }
1243
1260
  function _autoSeedMwc() {
1244
1261
  try {
1245
- var now = dateNow() & 0x7fffffff;
1262
+ var now = utcNow() & 0x7fffffff;
1246
1263
  _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1247
1264
  }
1248
1265
  catch (e) {
@@ -1296,7 +1313,7 @@
1296
1313
  }
1297
1314
 
1298
1315
  var _objDefineProperty = ObjDefineProperty;
1299
- var version = "3.0.0-beta.2210-17";
1316
+ var version = "3.0.0-beta.2210-19";
1300
1317
  var instanceName = "." + newId(6);
1301
1318
  var _dataUid = 0;
1302
1319
  function _createAccessor(target, prop, value) {
@@ -1381,7 +1398,7 @@
1381
1398
  target_1 = {};
1382
1399
  }
1383
1400
  if (target_1) {
1384
- objForEachKey$1(source, function (key, value) {
1401
+ objForEachKey(source, function (key, value) {
1385
1402
  target_1[key] = _cfgDeepCopy(value);
1386
1403
  });
1387
1404
  return target_1;
@@ -1496,9 +1513,18 @@
1496
1513
  var detail = {
1497
1514
  n: name,
1498
1515
  h: [],
1499
- add: function (handler) {
1500
- if (handler && handler.fn && detail.h[_DYN_INDEX_OF$1 ](handler) === -1) {
1501
- detail.h[_DYN_PUSH$1 ](handler);
1516
+ trk: function (handler) {
1517
+ if (handler && handler.fn) {
1518
+ if (arrIndexOf(detail.h, handler) === -1) {
1519
+ detail.h[_DYN_PUSH$1 ](handler);
1520
+ }
1521
+ state.trk(handler, detail);
1522
+ }
1523
+ },
1524
+ clr: function (handler) {
1525
+ var idx = arrIndexOf(detail.h, handler);
1526
+ if (idx !== -1) {
1527
+ detail.h[_DYN_SPLICE ](idx, 1);
1502
1528
  }
1503
1529
  }
1504
1530
  };
@@ -1512,25 +1538,28 @@
1512
1538
  }
1513
1539
  var activeHandler = state.act;
1514
1540
  if (activeHandler) {
1515
- detail.add(activeHandler);
1541
+ detail.trk(activeHandler);
1516
1542
  }
1517
1543
  return value;
1518
1544
  }
1519
- _getProperty[state.prop] = true;
1545
+ _getProperty[state.prop] = {
1546
+ chng: function () {
1547
+ state.add(detail);
1548
+ }
1549
+ };
1520
1550
  function _setProperty(newValue) {
1521
1551
  if (value !== newValue) {
1522
1552
  if (!!_setProperty[state.ro] && state.upd) {
1523
1553
  throwInvalidAccess("[" + name + "] is sealed from " + dumpObj(theConfig));
1524
1554
  }
1525
1555
  if (value && value[CFG_HANDLER_LINK]) {
1526
- if (isPlainObject(value)) {
1527
- objForEachKey$1(value, function (key) {
1528
- value[key] = UNDEFINED_VALUE$1;
1529
- });
1530
- }
1531
- else if (isArray(value)) {
1532
- arrForEach(value, function (propValue, idx) {
1533
- value[idx] = UNDEFINED_VALUE$1;
1556
+ if (isPlainObject(value) || isArray(value)) {
1557
+ objForEachKey(value, function (key) {
1558
+ var propDesc = objGetOwnPropertyDescriptor(value, key);
1559
+ if (propDesc && propDesc.get) {
1560
+ var valueState = propDesc.get[state.prop];
1561
+ valueState && valueState.chng();
1562
+ }
1534
1563
  });
1535
1564
  }
1536
1565
  }
@@ -1562,7 +1591,7 @@
1562
1591
  }
1563
1592
  function _makeDynamicObject(state, target ) {
1564
1593
  var _a;
1565
- objForEachKey$1( target, function (key, value) {
1594
+ objForEachKey( target, function (key, value) {
1566
1595
  _setDynamicProperty(state, target, key, value);
1567
1596
  });
1568
1597
  if (!target[CFG_HANDLER_LINK]) {
@@ -1580,19 +1609,10 @@
1580
1609
 
1581
1610
  var symPrefix = "[[ai_";
1582
1611
  var symPostfix = "]]";
1583
- function _insertWatcher(watchers, theDetail) {
1584
- if (theDetail && theDetail.h && theDetail.h[_DYN_LENGTH$2 ] > 0) {
1585
- arrForEach(theDetail.h, function (handler) {
1586
- if (handler && handler.fn && watchers[_DYN_INDEX_OF$1 ](handler) === -1) {
1587
- watchers[_DYN_PUSH$1 ](handler);
1588
- }
1589
- });
1590
- }
1591
- }
1592
1612
  function _createState(cfgHandler) {
1593
- var _a;
1594
1613
  var dynamicPropertySymbol = newSymbol(symPrefix + "get" + cfgHandler.uid + symPostfix);
1595
1614
  var dynamicPropertyReadOnly = newSymbol(symPrefix + "ro" + cfgHandler.uid + symPostfix);
1615
+ var dynamicPropertyDetail = newSymbol(symPrefix + "dtl" + cfgHandler.uid + symPostfix);
1596
1616
  var _waitingHandlers = null;
1597
1617
  var _watcherTimer = null;
1598
1618
  var theState;
@@ -1600,6 +1620,12 @@
1600
1620
  var prevWatcher = theState.act;
1601
1621
  try {
1602
1622
  theState.act = activeHandler;
1623
+ if (activeHandler && activeHandler[dynamicPropertyDetail]) {
1624
+ arrForEach(activeHandler[dynamicPropertyDetail], function (detail) {
1625
+ detail.clr(activeHandler);
1626
+ });
1627
+ activeHandler[dynamicPropertyDetail] = [];
1628
+ }
1603
1629
  callback({
1604
1630
  cfg: cfgHandler.cfg,
1605
1631
  set: cfgHandler.set.bind(cfgHandler),
@@ -1609,7 +1635,7 @@
1609
1635
  catch (e) {
1610
1636
  var logger = cfgHandler[_DYN_LOGGER ];
1611
1637
  if (logger) {
1612
- logger[_DYN_THROW_INTERNAL ](1 , 107 , "Watcher [" + dumpObj(callback) + "] failed [" + dumpObj(e) + "]");
1638
+ logger[_DYN_THROW_INTERNAL ](1 , 107 , dumpObj(e));
1613
1639
  }
1614
1640
  throw e;
1615
1641
  }
@@ -1621,18 +1647,24 @@
1621
1647
  if (_waitingHandlers) {
1622
1648
  var notifyHandlers = _waitingHandlers;
1623
1649
  _waitingHandlers = null;
1624
- if (_watcherTimer) {
1625
- _watcherTimer.cancel();
1626
- _watcherTimer = null;
1627
- }
1650
+ _watcherTimer && _watcherTimer.cancel();
1651
+ _watcherTimer = null;
1628
1652
  var watcherFailures_1 = [];
1629
1653
  arrForEach(notifyHandlers, function (handler) {
1630
- if (handler.fn) {
1631
- try {
1632
- _useHandler(handler, handler.fn);
1654
+ if (handler) {
1655
+ if (handler[dynamicPropertyDetail]) {
1656
+ arrForEach(handler[dynamicPropertyDetail], function (detail) {
1657
+ detail.clr(handler);
1658
+ });
1659
+ handler[dynamicPropertyDetail] = null;
1633
1660
  }
1634
- catch (e) {
1635
- watcherFailures_1[_DYN_PUSH$1 ](e);
1661
+ if (handler.fn) {
1662
+ try {
1663
+ _useHandler(handler, handler.fn);
1664
+ }
1665
+ catch (e) {
1666
+ watcherFailures_1[_DYN_PUSH$1 ](e);
1667
+ }
1636
1668
  }
1637
1669
  }
1638
1670
  });
@@ -1645,7 +1677,7 @@
1645
1677
  }
1646
1678
  }
1647
1679
  if (watcherFailures_1[_DYN_LENGTH$2 ] > 0) {
1648
- throwAggregationError("Unexpected watcher error occurred: ", watcherFailures_1);
1680
+ throwAggregationError("Watcher error(s): ", watcherFailures_1);
1649
1681
  }
1650
1682
  }
1651
1683
  }
@@ -1660,18 +1692,31 @@
1660
1692
  _notifyWatchers();
1661
1693
  }, 0);
1662
1694
  }
1663
- _insertWatcher(_waitingHandlers, detail);
1695
+ for (var idx = 0; idx < detail.h[_DYN_LENGTH$2 ]; idx++) {
1696
+ var handler = detail.h[idx];
1697
+ if (handler && arrIndexOf(_waitingHandlers, handler) === -1) {
1698
+ _waitingHandlers[_DYN_PUSH$1 ](handler);
1699
+ }
1700
+ }
1664
1701
  }
1665
1702
  }
1666
- theState = (_a = {
1667
- prop: dynamicPropertySymbol,
1668
- ro: dynamicPropertyReadOnly,
1669
- hdlr: cfgHandler,
1670
- add: _addWatcher
1671
- },
1672
- _a[_DYN_NOTIFY ] = _notifyWatchers,
1673
- _a.use = _useHandler,
1674
- _a);
1703
+ function _trackHandler(handler, detail) {
1704
+ if (handler) {
1705
+ var details = handler[dynamicPropertyDetail] = handler[dynamicPropertyDetail] || [];
1706
+ if (arrIndexOf(details, detail) === -1) {
1707
+ details[_DYN_PUSH$1 ](detail);
1708
+ }
1709
+ }
1710
+ }
1711
+ theState = {
1712
+ prop: dynamicPropertySymbol,
1713
+ ro: dynamicPropertyReadOnly,
1714
+ hdlr: cfgHandler,
1715
+ add: _addWatcher,
1716
+ notify: _notifyWatchers,
1717
+ use: _useHandler,
1718
+ trk: _trackHandler
1719
+ };
1675
1720
  return theState;
1676
1721
  }
1677
1722
 
@@ -1958,7 +2003,7 @@
1958
2003
  var PerfEvent = /** @class */ (function () {
1959
2004
  function PerfEvent(name, payloadDetails, isAsync) {
1960
2005
  var _self = this;
1961
- _self.start = dateNow();
2006
+ _self.start = utcNow();
1962
2007
  _self[_DYN_NAME$2 ] = name;
1963
2008
  _self[_DYN_IS_ASYNC ] = isAsync;
1964
2009
  _self[_DYN_IS_CHILD_EVT ] = function () { return false; };
@@ -2009,7 +2054,7 @@
2009
2054
  }
2010
2055
  }
2011
2056
  }
2012
- _self[_DYN_TIME ] = dateNow() - _self.start;
2057
+ _self[_DYN_TIME ] = utcNow() - _self.start;
2013
2058
  _self.exTime = _self[_DYN_TIME ] - childTime;
2014
2059
  _self[_DYN_COMPLETE ] = function () { };
2015
2060
  };
@@ -2156,7 +2201,7 @@
2156
2201
  if (!extCfg && createIfMissing) {
2157
2202
  extCfg = {};
2158
2203
  }
2159
- dynamicHandler.set(cfg, "extensionConfig", extCfg);
2204
+ dynamicHandler.set(cfg, STR_EXTENSION_CONFIG, extCfg);
2160
2205
  extCfg = cfg[STR_EXTENSION_CONFIG ];
2161
2206
  if (extCfg) {
2162
2207
  idCfg = extCfg[identifier];
@@ -2805,7 +2850,6 @@
2805
2850
  var _DYN_REMOVE_ITEM = "removeItem";
2806
2851
  var _DYN_NAME$1 = "name";
2807
2852
  var _DYN_PATHNAME = "pathname";
2808
- var _DYN_INDEX_OF = "indexOf";
2809
2853
  var _DYN_EXCEPTIONS = "exceptions";
2810
2854
  var _DYN_PARSED_STACK = "parsedStack";
2811
2855
  var _DYN_PROPERTIES = "properties";
@@ -2893,7 +2937,7 @@
2893
2937
  function dataSanitizeProperties(logger, properties) {
2894
2938
  if (properties) {
2895
2939
  var tempProps_1 = {};
2896
- objForEachKey$1(properties, function (prop, value) {
2940
+ objForEachKey(properties, function (prop, value) {
2897
2941
  if (isObject(value) && hasJSON()) {
2898
2942
  try {
2899
2943
  value = getJSON()[_DYN_STRINGIFY$1 ](value);
@@ -2913,7 +2957,7 @@
2913
2957
  function dataSanitizeMeasurements(logger, measurements) {
2914
2958
  if (measurements) {
2915
2959
  var tempMeasurements_1 = {};
2916
- objForEachKey$1(measurements, function (measure, value) {
2960
+ objForEachKey(measurements, function (measure, value) {
2917
2961
  measure = dataSanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements_1);
2918
2962
  tempMeasurements_1[measure] = value;
2919
2963
  });
@@ -3114,7 +3158,7 @@
3114
3158
  evtMessage = evtMessage + " @" + (theEvent["filename"] || "") + ":" + (theEvent["lineno"] || "?") + ":" + (theEvent["colno"] || "?");
3115
3159
  }
3116
3160
  }
3117
- if (errorType && errorType !== "String" && errorType !== "Object" && errorType !== "Error" && (evtMessage || "")[_DYN_INDEX_OF ](errorType) === -1) {
3161
+ if (errorType && errorType !== "String" && errorType !== "Object" && errorType !== "Error" && strIndexOf(evtMessage || "", errorType) === -1) {
3118
3162
  evtMessage = errorType + ": " + evtMessage;
3119
3163
  }
3120
3164
  return evtMessage || "";
@@ -3307,7 +3351,7 @@
3307
3351
  }
3308
3352
  result = _stringify(errorObj, true);
3309
3353
  }
3310
- if (result[_DYN_INDEX_OF ](errorType) !== 0 && errorType !== "String") {
3354
+ if (strIndexOf(result, errorType) !== 0 && errorType !== "String") {
3311
3355
  return errorType + ":" + result;
3312
3356
  }
3313
3357
  return result;
@@ -4004,12 +4048,12 @@
4004
4048
  var tgs = {};
4005
4049
  for (var i = itmTags[_DYN_LENGTH ] - 1; i >= 0; i--) {
4006
4050
  var tg = itmTags[i];
4007
- objForEachKey$1(tg, function (key, value) {
4051
+ objForEachKey(tg, function (key, value) {
4008
4052
  tgs[key] = value;
4009
4053
  });
4010
4054
  itmTags.splice(i, 1);
4011
4055
  }
4012
- objForEachKey$1(itmTags, function (tg, value) {
4056
+ objForEachKey(itmTags, function (tg, value) {
4013
4057
  tgs[tg] = value;
4014
4058
  });
4015
4059
  var theTags = __assignFn(__assignFn({}, envTags), tgs);
@@ -4020,7 +4064,7 @@
4020
4064
  }
4021
4065
  function _extractPropsAndMeasurements(data, properties, measurements) {
4022
4066
  if (!isNullOrUndefined(data)) {
4023
- objForEachKey$1(data, function (key, value) {
4067
+ objForEachKey(data, function (key, value) {
4024
4068
  if (isNumber(value)) {
4025
4069
  measurements[key] = value;
4026
4070
  }
@@ -4035,7 +4079,7 @@
4035
4079
  }
4036
4080
  function _convertPropsUndefinedToCustomDefinedValue(properties, customUndefinedValue) {
4037
4081
  if (!isNullOrUndefined(properties)) {
4038
- objForEachKey$1(properties, function (key, value) {
4082
+ objForEachKey(properties, function (key, value) {
4039
4083
  properties[key] = value || customUndefinedValue;
4040
4084
  });
4041
4085
  }
@@ -4059,7 +4103,7 @@
4059
4103
  }
4060
4104
  }
4061
4105
  var EnvelopeCreator = {
4062
- Version: "3.0.0-beta.2210-17"
4106
+ Version: "3.0.0-beta.2210-19"
4063
4107
  };
4064
4108
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
4065
4109
  EnvelopeCreatorInit(logger, telemetryItem);
@@ -4166,7 +4210,7 @@
4166
4210
  }
4167
4211
  if (!isNullOrUndefined(bd[strProperties])) {
4168
4212
  var pageTags = bd[strProperties];
4169
- objForEachKey$1(pageTags, function (key, value) {
4213
+ objForEachKey(pageTags, function (key, value) {
4170
4214
  properties[key] = value;
4171
4215
  });
4172
4216
  }
@@ -4503,7 +4547,7 @@
4503
4547
  return output;
4504
4548
  }
4505
4549
  source[circularReferenceCheck] = true;
4506
- objForEachKey$1(source.aiDataContract, function (field, contract) {
4550
+ objForEachKey(source.aiDataContract, function (field, contract) {
4507
4551
  var isRequired = (isFunction(contract)) ? (contract() & 1 ) : (contract & 1 );
4508
4552
  var isHidden = (isFunction(contract)) ? (contract() & 4 ) : (contract & 4 );
4509
4553
  var isArray = contract & 2 ;
@@ -4554,7 +4598,7 @@
4554
4598
  var output;
4555
4599
  if (map) {
4556
4600
  output = {};
4557
- objForEachKey$1(map, function (field, value) {
4601
+ objForEachKey(map, function (field, value) {
4558
4602
  if (expectedType === "string") {
4559
4603
  if (value === undefined) {
4560
4604
  output[field] = "undefined";
@@ -5308,21 +5352,21 @@
5308
5352
  backOffDelay = linearFactor * backOffDelay;
5309
5353
  delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds);
5310
5354
  }
5311
- var retryAfterTimeSpan = dateNow() + (delayInSeconds * 1000);
5355
+ var retryAfterTimeSpan = utcNow() + (delayInSeconds * 1000);
5312
5356
  _retryAt = retryAfterTimeSpan;
5313
5357
  }
5314
5358
  function _setupTimer() {
5315
5359
  if (!_timeoutHandle && !_paused) {
5316
- var retryInterval = _retryAt ? Math.max(0, _retryAt - dateNow()) : 0;
5360
+ var retryInterval = _retryAt ? Math.max(0, _retryAt - utcNow()) : 0;
5317
5361
  var timerValue = Math.max(_maxBatchInterval, retryInterval);
5318
- _timeoutHandle = setTimeout(function () {
5362
+ _timeoutHandle = scheduleTimeout(function () {
5319
5363
  _timeoutHandle = null;
5320
5364
  _self[_DYN_TRIGGER_SEND ](true, null, 1 );
5321
5365
  }, timerValue);
5322
5366
  }
5323
5367
  }
5324
5368
  function _clearScheduledTimer() {
5325
- clearTimeout(_timeoutHandle);
5369
+ _timeoutHandle && _timeoutHandle.cancel();
5326
5370
  _timeoutHandle = null;
5327
5371
  _retryAt = null;
5328
5372
  }