@microsoft/applicationinsights-properties-js 3.0.0-beta.2210-17 → 3.0.0-beta.2210-18
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.
- package/browser/applicationinsights-properties-js.integrity.json +9 -9
- package/browser/applicationinsights-properties-js.js +152 -104
- package/browser/applicationinsights-properties-js.js.map +1 -1
- package/browser/applicationinsights-properties-js.min.js +2 -2
- package/browser/applicationinsights-properties-js.min.js.map +1 -1
- package/dist/applicationinsights-properties-js.d.ts +1 -1
- package/dist/applicationinsights-properties-js.js +152 -104
- package/dist/applicationinsights-properties-js.js.map +1 -1
- package/dist/applicationinsights-properties-js.min.js +2 -2
- package/dist/applicationinsights-properties-js.min.js.map +1 -1
- package/dist/applicationinsights-properties-js.rollup.d.ts +1 -1
- package/dist-esm/Context/Application.js +1 -1
- package/dist-esm/Context/Device.js +1 -1
- package/dist-esm/Context/Internal.js +1 -1
- package/dist-esm/Context/Location.js +1 -1
- package/dist-esm/Context/Session.js +1 -1
- package/dist-esm/Context/TelemetryTrace.js +1 -1
- package/dist-esm/Context/User.js +1 -1
- package/dist-esm/Interfaces/IPropTelemetryContext.js +1 -1
- package/dist-esm/Interfaces/IPropertiesConfig.js +1 -1
- package/dist-esm/PropertiesPlugin.js +1 -1
- package/dist-esm/TelemetryContext.js +1 -1
- package/dist-esm/__DynamicConstants.js +1 -1
- package/dist-esm/applicationinsights-properties-js.js +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Properties Plugin, 3.0.0-beta.2210-
|
|
2
|
+
* Application Insights JavaScript SDK - Properties Plugin, 3.0.0-beta.2210-18
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
function _isObjectArrayOrFunctionPrototype(target) {
|
|
145
145
|
return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
|
|
146
146
|
}
|
|
147
|
-
function _getObjProto
|
|
147
|
+
function _getObjProto(target) {
|
|
148
148
|
var newProto;
|
|
149
149
|
if (target) {
|
|
150
150
|
if (_objGetPrototypeOf) {
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
_forEachProp(instFuncs, function (name) {
|
|
219
219
|
baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
|
|
220
220
|
});
|
|
221
|
-
var baseProto = _getObjProto
|
|
221
|
+
var baseProto = _getObjProto(classProto);
|
|
222
222
|
var visited = [];
|
|
223
223
|
while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
|
|
224
224
|
_forEachProp(baseProto, function (name) {
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
229
|
visited.push(baseProto);
|
|
230
|
-
baseProto = _getObjProto
|
|
230
|
+
baseProto = _getObjProto(baseProto);
|
|
231
231
|
}
|
|
232
232
|
return baseFuncs;
|
|
233
233
|
}
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
}
|
|
242
242
|
if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
|
|
243
243
|
var canAddInst = !_hasOwnProperty(target, funcName);
|
|
244
|
-
var objProto = _getObjProto
|
|
244
|
+
var objProto = _getObjProto(target);
|
|
245
245
|
var visited = [];
|
|
246
246
|
while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
|
|
247
247
|
var protoFunc = objProto[funcName];
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
visited.push(objProto);
|
|
253
|
-
objProto = _getObjProto
|
|
253
|
+
objProto = _getObjProto(objProto);
|
|
254
254
|
}
|
|
255
255
|
try {
|
|
256
256
|
if (canAddInst) {
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
|
|
269
269
|
var protoFunc = proto[funcName];
|
|
270
270
|
if (protoFunc === currentDynProtoProxy) {
|
|
271
|
-
protoFunc = _getObjProto
|
|
271
|
+
protoFunc = _getObjProto(proto)[funcName];
|
|
272
272
|
}
|
|
273
273
|
if (typeof protoFunc !== strFunction) {
|
|
274
274
|
_throwTypeError("[" + funcName + "] is not a " + strFunction);
|
|
@@ -304,13 +304,13 @@
|
|
|
304
304
|
function _checkPrototype(classProto, thisTarget) {
|
|
305
305
|
if (_objGetPrototypeOf) {
|
|
306
306
|
var visited = [];
|
|
307
|
-
var thisProto = _getObjProto
|
|
307
|
+
var thisProto = _getObjProto(thisTarget);
|
|
308
308
|
while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
|
|
309
309
|
if (thisProto === classProto) {
|
|
310
310
|
return true;
|
|
311
311
|
}
|
|
312
312
|
visited.push(thisProto);
|
|
313
|
-
thisProto = _getObjProto
|
|
313
|
+
thisProto = _getObjProto(thisProto);
|
|
314
314
|
}
|
|
315
315
|
return false;
|
|
316
316
|
}
|
|
@@ -363,6 +363,7 @@
|
|
|
363
363
|
var PROTOTYPE = "prototype";
|
|
364
364
|
var STRING = "string";
|
|
365
365
|
var UNDEFINED = "undefined";
|
|
366
|
+
var CONSTRUCTOR = "constructor";
|
|
366
367
|
var HAS_OWN_PROPERTY = "hasOwnProperty";
|
|
367
368
|
var SYMBOL = "Symbol";
|
|
368
369
|
var POLYFILL_TAG = "_polyfill";
|
|
@@ -435,7 +436,7 @@
|
|
|
435
436
|
return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
|
|
436
437
|
}
|
|
437
438
|
|
|
438
|
-
function objForEachKey
|
|
439
|
+
function objForEachKey(theObject, callbackfn, thisArg) {
|
|
439
440
|
if (theObject && isObject(theObject)) {
|
|
440
441
|
for (var prop in theObject) {
|
|
441
442
|
if (objHasOwn(theObject, prop)) {
|
|
@@ -464,7 +465,7 @@
|
|
|
464
465
|
}
|
|
465
466
|
function objDeepFreeze(value) {
|
|
466
467
|
if (_objFreeze) {
|
|
467
|
-
objForEachKey
|
|
468
|
+
objForEachKey(value, function (key, value) {
|
|
468
469
|
if (isArray(value) || isObject(value)) {
|
|
469
470
|
_objFreeze(value);
|
|
470
471
|
}
|
|
@@ -474,11 +475,11 @@
|
|
|
474
475
|
}
|
|
475
476
|
var objFreeze = _objFreeze || _doNothing;
|
|
476
477
|
ObjClass["seal"] || _doNothing;
|
|
477
|
-
ObjClass["getPrototypeOf"] || _doNothing;
|
|
478
|
+
var objGetPrototypeOf = ObjClass["getPrototypeOf"] || _doNothing;
|
|
478
479
|
|
|
479
480
|
function createEnum(values) {
|
|
480
481
|
var theEnum = {};
|
|
481
|
-
objForEachKey
|
|
482
|
+
objForEachKey(values, function (field, value) {
|
|
482
483
|
theEnum[field] = value;
|
|
483
484
|
theEnum[value] = field;
|
|
484
485
|
});
|
|
@@ -545,7 +546,7 @@
|
|
|
545
546
|
d.__proto__ = b;
|
|
546
547
|
}) ||
|
|
547
548
|
function (d, b) {
|
|
548
|
-
objForEachKey
|
|
549
|
+
objForEachKey(b, function (key, value) {
|
|
549
550
|
d[key] = value;
|
|
550
551
|
});
|
|
551
552
|
};
|
|
@@ -788,6 +789,47 @@
|
|
|
788
789
|
};
|
|
789
790
|
}
|
|
790
791
|
|
|
792
|
+
var arrIndexOf = _unwrapFunction(INDEX_OF);
|
|
793
|
+
|
|
794
|
+
function utcNow() {
|
|
795
|
+
return (Date.now || polyUtcNow)();
|
|
796
|
+
}
|
|
797
|
+
function polyUtcNow() {
|
|
798
|
+
return new Date().getTime();
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
var _fnToString$1;
|
|
802
|
+
var _objCtrFnString;
|
|
803
|
+
var _gblWindow;
|
|
804
|
+
function isPlainObject(value) {
|
|
805
|
+
if (!value || typeof value !== OBJECT) {
|
|
806
|
+
return false;
|
|
807
|
+
}
|
|
808
|
+
if (!_gblWindow) {
|
|
809
|
+
_gblWindow = hasWindow() ? getWindow() : true;
|
|
810
|
+
}
|
|
811
|
+
var result = false;
|
|
812
|
+
if (value !== _gblWindow) {
|
|
813
|
+
if (!_objCtrFnString) {
|
|
814
|
+
_fnToString$1 = Function[PROTOTYPE].toString;
|
|
815
|
+
_objCtrFnString = _fnToString$1.call(ObjClass);
|
|
816
|
+
}
|
|
817
|
+
try {
|
|
818
|
+
var proto = objGetPrototypeOf(value);
|
|
819
|
+
result = !proto;
|
|
820
|
+
if (!result) {
|
|
821
|
+
if (objHasOwnProperty(proto, CONSTRUCTOR)) {
|
|
822
|
+
proto = proto[CONSTRUCTOR];
|
|
823
|
+
}
|
|
824
|
+
result = proto && typeof proto === FUNCTION && _fnToString$1.call(proto) === _objCtrFnString;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
catch (ex) {
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
return result;
|
|
831
|
+
}
|
|
832
|
+
|
|
791
833
|
var mathMax = MathCls.max;
|
|
792
834
|
|
|
793
835
|
var strSlice = _unwrapFunction("slice");
|
|
@@ -811,6 +853,9 @@
|
|
|
811
853
|
}
|
|
812
854
|
return strSlice(value, start, start + length);
|
|
813
855
|
}
|
|
856
|
+
function strLeft(value, count) {
|
|
857
|
+
return strSubstring(value, 0, count);
|
|
858
|
+
}
|
|
814
859
|
|
|
815
860
|
var ENDS_WITH = "endsWith";
|
|
816
861
|
var strEndsWith = StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith;
|
|
@@ -880,8 +925,8 @@
|
|
|
880
925
|
var _DYN_CONFIGURABLE = "configurable";
|
|
881
926
|
var _DYN_ENUMERABLE = "enumerable";
|
|
882
927
|
var _DYN_APPLY = "apply";
|
|
883
|
-
var _DYN_INDEX_OF = "indexOf";
|
|
884
928
|
var _DYN_PUSH = "push";
|
|
929
|
+
var _DYN_SPLICE = "splice";
|
|
885
930
|
var _DYN_INITIALIZE = "initialize";
|
|
886
931
|
var _DYN_IDENTIFIER = "identifier";
|
|
887
932
|
var _DYN_IS_INITIALIZED = "isInitialized";
|
|
@@ -903,7 +948,6 @@
|
|
|
903
948
|
var _DYN_SET_NEXT_PLUGIN = "setNextPlugin";
|
|
904
949
|
var _DYN_CREATE_NEW = "createNew";
|
|
905
950
|
var _DYN_CONFIG = "config";
|
|
906
|
-
var _DYN_SUBSTRING$1 = "substring";
|
|
907
951
|
var _DYN_USER_AGENT = "userAgent";
|
|
908
952
|
var _DYN_SPLIT = "split";
|
|
909
953
|
var _DYN_NODE_TYPE = "nodeType";
|
|
@@ -947,14 +991,11 @@
|
|
|
947
991
|
var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
|
|
948
992
|
|
|
949
993
|
var strToString = "toString";
|
|
950
|
-
var strGetPrototypeOf = "getPrototypeOf";
|
|
951
|
-
var strConstructor = "constructor";
|
|
952
994
|
var _fnToString = ObjClass$1[strToString];
|
|
953
|
-
|
|
995
|
+
_fnToString[_DYN_CALL ](ObjClass$1);
|
|
954
996
|
var rCamelCase = /-([a-z])/g;
|
|
955
997
|
var rNormalizeInvalid = /([^\w\d_$])/g;
|
|
956
998
|
var rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
957
|
-
var _getObjProto = Object[strGetPrototypeOf];
|
|
958
999
|
function isNotNullOrUndefined(value) {
|
|
959
1000
|
return !isNullOrUndefined(value);
|
|
960
1001
|
}
|
|
@@ -971,36 +1012,15 @@
|
|
|
971
1012
|
}
|
|
972
1013
|
return value;
|
|
973
1014
|
}
|
|
974
|
-
var objForEachKey = objForEachKey$1;
|
|
975
1015
|
function strContains(value, search) {
|
|
976
1016
|
if (value && search) {
|
|
977
1017
|
return strIndexOf(value, search) !== -1;
|
|
978
1018
|
}
|
|
979
1019
|
return false;
|
|
980
1020
|
}
|
|
981
|
-
function isPlainObject(value) {
|
|
982
|
-
var result = false;
|
|
983
|
-
if (value && typeof value === "object") {
|
|
984
|
-
var proto = _getObjProto(value);
|
|
985
|
-
if (!proto) {
|
|
986
|
-
result = true;
|
|
987
|
-
}
|
|
988
|
-
else {
|
|
989
|
-
if (proto[strConstructor] && objHasOwnProperty(proto, strConstructor)) {
|
|
990
|
-
proto = proto[strConstructor];
|
|
991
|
-
}
|
|
992
|
-
result = typeof proto === strShimFunction && _fnToString[_DYN_CALL ](proto) === _objFunctionString;
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
return result;
|
|
996
|
-
}
|
|
997
1021
|
function toISOString(date) {
|
|
998
1022
|
return date && date.toISOString() || "";
|
|
999
1023
|
}
|
|
1000
|
-
function dateNow() {
|
|
1001
|
-
var dt = Date;
|
|
1002
|
-
return dt.now ? dt.now() : new dt().getTime();
|
|
1003
|
-
}
|
|
1004
1024
|
function getExceptionName(object) {
|
|
1005
1025
|
if (isError(object)) {
|
|
1006
1026
|
return object[_DYN_NAME$1 ];
|
|
@@ -1140,7 +1160,7 @@
|
|
|
1140
1160
|
}
|
|
1141
1161
|
function _autoSeedMwc() {
|
|
1142
1162
|
try {
|
|
1143
|
-
var now =
|
|
1163
|
+
var now = utcNow() & 0x7fffffff;
|
|
1144
1164
|
_mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
|
|
1145
1165
|
}
|
|
1146
1166
|
catch (e) {
|
|
@@ -1194,7 +1214,7 @@
|
|
|
1194
1214
|
}
|
|
1195
1215
|
|
|
1196
1216
|
var _objDefineProperty = ObjDefineProperty;
|
|
1197
|
-
var version = "3.0.0-beta.2210-
|
|
1217
|
+
var version = "3.0.0-beta.2210-18";
|
|
1198
1218
|
var instanceName = "." + newId(6);
|
|
1199
1219
|
var _dataUid = 0;
|
|
1200
1220
|
function _createAccessor(target, prop, value) {
|
|
@@ -1279,7 +1299,7 @@
|
|
|
1279
1299
|
target_1 = {};
|
|
1280
1300
|
}
|
|
1281
1301
|
if (target_1) {
|
|
1282
|
-
objForEachKey
|
|
1302
|
+
objForEachKey(source, function (key, value) {
|
|
1283
1303
|
target_1[key] = _cfgDeepCopy(value);
|
|
1284
1304
|
});
|
|
1285
1305
|
return target_1;
|
|
@@ -1394,9 +1414,18 @@
|
|
|
1394
1414
|
var detail = {
|
|
1395
1415
|
n: name,
|
|
1396
1416
|
h: [],
|
|
1397
|
-
|
|
1398
|
-
if (handler && handler.fn
|
|
1399
|
-
detail.h
|
|
1417
|
+
trk: function (handler) {
|
|
1418
|
+
if (handler && handler.fn) {
|
|
1419
|
+
if (arrIndexOf(detail.h, handler) === -1) {
|
|
1420
|
+
detail.h[_DYN_PUSH ](handler);
|
|
1421
|
+
}
|
|
1422
|
+
state.trk(handler, detail);
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1425
|
+
clr: function (handler) {
|
|
1426
|
+
var idx = arrIndexOf(detail.h, handler);
|
|
1427
|
+
if (idx !== -1) {
|
|
1428
|
+
detail.h[_DYN_SPLICE ](idx, 1);
|
|
1400
1429
|
}
|
|
1401
1430
|
}
|
|
1402
1431
|
};
|
|
@@ -1410,25 +1439,28 @@
|
|
|
1410
1439
|
}
|
|
1411
1440
|
var activeHandler = state.act;
|
|
1412
1441
|
if (activeHandler) {
|
|
1413
|
-
detail.
|
|
1442
|
+
detail.trk(activeHandler);
|
|
1414
1443
|
}
|
|
1415
1444
|
return value;
|
|
1416
1445
|
}
|
|
1417
|
-
_getProperty[state.prop] =
|
|
1446
|
+
_getProperty[state.prop] = {
|
|
1447
|
+
chng: function () {
|
|
1448
|
+
state.add(detail);
|
|
1449
|
+
}
|
|
1450
|
+
};
|
|
1418
1451
|
function _setProperty(newValue) {
|
|
1419
1452
|
if (value !== newValue) {
|
|
1420
1453
|
if (!!_setProperty[state.ro] && state.upd) {
|
|
1421
1454
|
throwInvalidAccess("[" + name + "] is sealed from " + dumpObj(theConfig));
|
|
1422
1455
|
}
|
|
1423
1456
|
if (value && value[CFG_HANDLER_LINK]) {
|
|
1424
|
-
if (isPlainObject(value)) {
|
|
1425
|
-
objForEachKey
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
value[idx] = UNDEFINED_VALUE;
|
|
1457
|
+
if (isPlainObject(value) || isArray(value)) {
|
|
1458
|
+
objForEachKey(value, function (key) {
|
|
1459
|
+
var propDesc = objGetOwnPropertyDescriptor(value, key);
|
|
1460
|
+
if (propDesc && propDesc.get) {
|
|
1461
|
+
var valueState = propDesc.get[state.prop];
|
|
1462
|
+
valueState && valueState.chng();
|
|
1463
|
+
}
|
|
1432
1464
|
});
|
|
1433
1465
|
}
|
|
1434
1466
|
}
|
|
@@ -1460,7 +1492,7 @@
|
|
|
1460
1492
|
}
|
|
1461
1493
|
function _makeDynamicObject(state, target ) {
|
|
1462
1494
|
var _a;
|
|
1463
|
-
objForEachKey
|
|
1495
|
+
objForEachKey( target, function (key, value) {
|
|
1464
1496
|
_setDynamicProperty(state, target, key, value);
|
|
1465
1497
|
});
|
|
1466
1498
|
if (!target[CFG_HANDLER_LINK]) {
|
|
@@ -1478,19 +1510,10 @@
|
|
|
1478
1510
|
|
|
1479
1511
|
var symPrefix = "[[ai_";
|
|
1480
1512
|
var symPostfix = "]]";
|
|
1481
|
-
function _insertWatcher(watchers, theDetail) {
|
|
1482
|
-
if (theDetail && theDetail.h && theDetail.h[_DYN_LENGTH$2 ] > 0) {
|
|
1483
|
-
arrForEach(theDetail.h, function (handler) {
|
|
1484
|
-
if (handler && handler.fn && watchers[_DYN_INDEX_OF ](handler) === -1) {
|
|
1485
|
-
watchers[_DYN_PUSH ](handler);
|
|
1486
|
-
}
|
|
1487
|
-
});
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
1513
|
function _createState(cfgHandler) {
|
|
1491
|
-
var _a;
|
|
1492
1514
|
var dynamicPropertySymbol = newSymbol(symPrefix + "get" + cfgHandler.uid + symPostfix);
|
|
1493
1515
|
var dynamicPropertyReadOnly = newSymbol(symPrefix + "ro" + cfgHandler.uid + symPostfix);
|
|
1516
|
+
var dynamicPropertyDetail = newSymbol(symPrefix + "dtl" + cfgHandler.uid + symPostfix);
|
|
1494
1517
|
var _waitingHandlers = null;
|
|
1495
1518
|
var _watcherTimer = null;
|
|
1496
1519
|
var theState;
|
|
@@ -1498,6 +1521,12 @@
|
|
|
1498
1521
|
var prevWatcher = theState.act;
|
|
1499
1522
|
try {
|
|
1500
1523
|
theState.act = activeHandler;
|
|
1524
|
+
if (activeHandler && activeHandler[dynamicPropertyDetail]) {
|
|
1525
|
+
arrForEach(activeHandler[dynamicPropertyDetail], function (detail) {
|
|
1526
|
+
detail.clr(activeHandler);
|
|
1527
|
+
});
|
|
1528
|
+
activeHandler[dynamicPropertyDetail] = [];
|
|
1529
|
+
}
|
|
1501
1530
|
callback({
|
|
1502
1531
|
cfg: cfgHandler.cfg,
|
|
1503
1532
|
set: cfgHandler.set.bind(cfgHandler),
|
|
@@ -1507,7 +1536,7 @@
|
|
|
1507
1536
|
catch (e) {
|
|
1508
1537
|
var logger = cfgHandler[_DYN_LOGGER ];
|
|
1509
1538
|
if (logger) {
|
|
1510
|
-
logger[_DYN_THROW_INTERNAL ](1 , 107 ,
|
|
1539
|
+
logger[_DYN_THROW_INTERNAL ](1 , 107 , dumpObj(e));
|
|
1511
1540
|
}
|
|
1512
1541
|
throw e;
|
|
1513
1542
|
}
|
|
@@ -1519,18 +1548,24 @@
|
|
|
1519
1548
|
if (_waitingHandlers) {
|
|
1520
1549
|
var notifyHandlers = _waitingHandlers;
|
|
1521
1550
|
_waitingHandlers = null;
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
_watcherTimer = null;
|
|
1525
|
-
}
|
|
1551
|
+
_watcherTimer && _watcherTimer.cancel();
|
|
1552
|
+
_watcherTimer = null;
|
|
1526
1553
|
var watcherFailures_1 = [];
|
|
1527
1554
|
arrForEach(notifyHandlers, function (handler) {
|
|
1528
|
-
if (handler
|
|
1529
|
-
|
|
1530
|
-
|
|
1555
|
+
if (handler) {
|
|
1556
|
+
if (handler[dynamicPropertyDetail]) {
|
|
1557
|
+
arrForEach(handler[dynamicPropertyDetail], function (detail) {
|
|
1558
|
+
detail.clr(handler);
|
|
1559
|
+
});
|
|
1560
|
+
handler[dynamicPropertyDetail] = null;
|
|
1531
1561
|
}
|
|
1532
|
-
|
|
1533
|
-
|
|
1562
|
+
if (handler.fn) {
|
|
1563
|
+
try {
|
|
1564
|
+
_useHandler(handler, handler.fn);
|
|
1565
|
+
}
|
|
1566
|
+
catch (e) {
|
|
1567
|
+
watcherFailures_1[_DYN_PUSH ](e);
|
|
1568
|
+
}
|
|
1534
1569
|
}
|
|
1535
1570
|
}
|
|
1536
1571
|
});
|
|
@@ -1543,7 +1578,7 @@
|
|
|
1543
1578
|
}
|
|
1544
1579
|
}
|
|
1545
1580
|
if (watcherFailures_1[_DYN_LENGTH$2 ] > 0) {
|
|
1546
|
-
throwAggregationError("
|
|
1581
|
+
throwAggregationError("Watcher error(s): ", watcherFailures_1);
|
|
1547
1582
|
}
|
|
1548
1583
|
}
|
|
1549
1584
|
}
|
|
@@ -1558,18 +1593,31 @@
|
|
|
1558
1593
|
_notifyWatchers();
|
|
1559
1594
|
}, 0);
|
|
1560
1595
|
}
|
|
1561
|
-
|
|
1596
|
+
for (var idx = 0; idx < detail.h[_DYN_LENGTH$2 ]; idx++) {
|
|
1597
|
+
var handler = detail.h[idx];
|
|
1598
|
+
if (handler && arrIndexOf(_waitingHandlers, handler) === -1) {
|
|
1599
|
+
_waitingHandlers[_DYN_PUSH ](handler);
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1562
1602
|
}
|
|
1563
1603
|
}
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1604
|
+
function _trackHandler(handler, detail) {
|
|
1605
|
+
if (handler) {
|
|
1606
|
+
var details = handler[dynamicPropertyDetail] = handler[dynamicPropertyDetail] || [];
|
|
1607
|
+
if (arrIndexOf(details, detail) === -1) {
|
|
1608
|
+
details[_DYN_PUSH ](detail);
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
theState = {
|
|
1613
|
+
prop: dynamicPropertySymbol,
|
|
1614
|
+
ro: dynamicPropertyReadOnly,
|
|
1615
|
+
hdlr: cfgHandler,
|
|
1616
|
+
add: _addWatcher,
|
|
1617
|
+
notify: _notifyWatchers,
|
|
1618
|
+
use: _useHandler,
|
|
1619
|
+
trk: _trackHandler
|
|
1620
|
+
};
|
|
1573
1621
|
return theState;
|
|
1574
1622
|
}
|
|
1575
1623
|
|
|
@@ -1856,7 +1904,7 @@
|
|
|
1856
1904
|
var PerfEvent = /** @class */ (function () {
|
|
1857
1905
|
function PerfEvent(name, payloadDetails, isAsync) {
|
|
1858
1906
|
var _self = this;
|
|
1859
|
-
_self.start =
|
|
1907
|
+
_self.start = utcNow();
|
|
1860
1908
|
_self[_DYN_NAME$1 ] = name;
|
|
1861
1909
|
_self[_DYN_IS_ASYNC ] = isAsync;
|
|
1862
1910
|
_self[_DYN_IS_CHILD_EVT ] = function () { return false; };
|
|
@@ -1907,7 +1955,7 @@
|
|
|
1907
1955
|
}
|
|
1908
1956
|
}
|
|
1909
1957
|
}
|
|
1910
|
-
_self[_DYN_TIME ] =
|
|
1958
|
+
_self[_DYN_TIME ] = utcNow() - _self.start;
|
|
1911
1959
|
_self.exTime = _self[_DYN_TIME ] - childTime;
|
|
1912
1960
|
_self[_DYN_COMPLETE ] = function () { };
|
|
1913
1961
|
};
|
|
@@ -2088,7 +2136,7 @@
|
|
|
2088
2136
|
if (!extCfg && createIfMissing) {
|
|
2089
2137
|
extCfg = {};
|
|
2090
2138
|
}
|
|
2091
|
-
dynamicHandler.set(cfg,
|
|
2139
|
+
dynamicHandler.set(cfg, STR_EXTENSION_CONFIG, extCfg);
|
|
2092
2140
|
extCfg = cfg[STR_EXTENSION_CONFIG ];
|
|
2093
2141
|
if (extCfg) {
|
|
2094
2142
|
idCfg = extCfg[identifier];
|
|
@@ -2401,13 +2449,13 @@
|
|
|
2401
2449
|
}
|
|
2402
2450
|
function _isIgnoredCookie(cookieMgrCfg, name) {
|
|
2403
2451
|
if (name && cookieMgrCfg && isArray(cookieMgrCfg.ignoreCookies)) {
|
|
2404
|
-
return cookieMgrCfg.ignoreCookies
|
|
2452
|
+
return arrIndexOf(cookieMgrCfg.ignoreCookies, name) !== -1;
|
|
2405
2453
|
}
|
|
2406
2454
|
return false;
|
|
2407
2455
|
}
|
|
2408
2456
|
function _isBlockedCookie(cookieMgrCfg, name) {
|
|
2409
2457
|
if (name && cookieMgrCfg && isArray(cookieMgrCfg.blockedCookies)) {
|
|
2410
|
-
if (cookieMgrCfg.blockedCookies
|
|
2458
|
+
if (arrIndexOf(cookieMgrCfg.blockedCookies, name) !== -1) {
|
|
2411
2459
|
return true;
|
|
2412
2460
|
}
|
|
2413
2461
|
}
|
|
@@ -2479,16 +2527,16 @@
|
|
|
2479
2527
|
if (_isMgrEnabled(cookieMgr) && !_isBlockedCookie(cookieMgrConfig, name)) {
|
|
2480
2528
|
var values = {};
|
|
2481
2529
|
var theValue = strTrim(value || STR_EMPTY);
|
|
2482
|
-
var idx = theValue
|
|
2530
|
+
var idx = strIndexOf(theValue, ";");
|
|
2483
2531
|
if (idx !== -1) {
|
|
2484
|
-
theValue = strTrim(value
|
|
2485
|
-
values = _extractParts(value
|
|
2532
|
+
theValue = strTrim(strLeft(value, idx));
|
|
2533
|
+
values = _extractParts(strSubstring(value, idx + 1));
|
|
2486
2534
|
}
|
|
2487
2535
|
setValue(values, STR_DOMAIN, domain || _domain, isTruthy, isUndefined);
|
|
2488
2536
|
if (!isNullOrUndefined(maxAgeSec)) {
|
|
2489
2537
|
var _isIE = isIE();
|
|
2490
2538
|
if (isUndefined(values[strExpires])) {
|
|
2491
|
-
var nowMs =
|
|
2539
|
+
var nowMs = utcNow();
|
|
2492
2540
|
var expireMs = nowMs + (maxAgeSec * 1000);
|
|
2493
2541
|
if (expireMs > 0) {
|
|
2494
2542
|
var expiry = new Date();
|
|
@@ -2570,12 +2618,12 @@
|
|
|
2570
2618
|
arrForEach(parts, function (thePart) {
|
|
2571
2619
|
thePart = strTrim(thePart || STR_EMPTY);
|
|
2572
2620
|
if (thePart) {
|
|
2573
|
-
var idx = thePart
|
|
2621
|
+
var idx = strIndexOf(thePart, "=");
|
|
2574
2622
|
if (idx === -1) {
|
|
2575
2623
|
values[thePart] = null;
|
|
2576
2624
|
}
|
|
2577
2625
|
else {
|
|
2578
|
-
values[strTrim(thePart
|
|
2626
|
+
values[strTrim(strLeft(thePart, idx))] = strTrim(strSubstring(thePart, idx + 1));
|
|
2579
2627
|
}
|
|
2580
2628
|
}
|
|
2581
2629
|
});
|
|
@@ -2590,7 +2638,7 @@
|
|
|
2590
2638
|
}
|
|
2591
2639
|
function _formatCookieValue(value, values) {
|
|
2592
2640
|
var cookieValue = value || STR_EMPTY;
|
|
2593
|
-
objForEachKey
|
|
2641
|
+
objForEachKey(values, function (name, theValue) {
|
|
2594
2642
|
cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : STR_EMPTY);
|
|
2595
2643
|
});
|
|
2596
2644
|
return cookieValue;
|
|
@@ -2870,7 +2918,7 @@
|
|
|
2870
2918
|
function dataSanitizeProperties(logger, properties) {
|
|
2871
2919
|
if (properties) {
|
|
2872
2920
|
var tempProps_1 = {};
|
|
2873
|
-
objForEachKey
|
|
2921
|
+
objForEachKey(properties, function (prop, value) {
|
|
2874
2922
|
if (isObject(value) && hasJSON()) {
|
|
2875
2923
|
try {
|
|
2876
2924
|
value = getJSON()[_DYN_STRINGIFY ](value);
|
|
@@ -2890,7 +2938,7 @@
|
|
|
2890
2938
|
function dataSanitizeMeasurements(logger, measurements) {
|
|
2891
2939
|
if (measurements) {
|
|
2892
2940
|
var tempMeasurements_1 = {};
|
|
2893
|
-
objForEachKey
|
|
2941
|
+
objForEachKey(measurements, function (measure, value) {
|
|
2894
2942
|
measure = dataSanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements_1);
|
|
2895
2943
|
tempMeasurements_1[measure] = value;
|
|
2896
2944
|
});
|
|
@@ -3265,7 +3313,7 @@
|
|
|
3265
3313
|
_storageNamePrefix = SESSION_COOKIE_NAME + sessionCookiePostfix;
|
|
3266
3314
|
_self[_DYN_AUTOMATIC_SESSION ] = new Session();
|
|
3267
3315
|
_self[_DYN_UPDATE ] = function () {
|
|
3268
|
-
var nowMs =
|
|
3316
|
+
var nowMs = utcNow();
|
|
3269
3317
|
var isExpired = false;
|
|
3270
3318
|
var session = _self[_DYN_AUTOMATIC_SESSION ];
|
|
3271
3319
|
if (!session.id) {
|