@microsoft/applicationinsights-analytics-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-analytics-js.integrity.json +9 -9
- package/browser/applicationinsights-analytics-js.js +158 -108
- package/browser/applicationinsights-analytics-js.js.map +1 -1
- package/browser/applicationinsights-analytics-js.min.js +2 -2
- package/browser/applicationinsights-analytics-js.min.js.map +1 -1
- package/dist/applicationinsights-analytics-js.d.ts +1 -1
- package/dist/applicationinsights-analytics-js.js +158 -108
- package/dist/applicationinsights-analytics-js.js.map +1 -1
- package/dist/applicationinsights-analytics-js.min.js +2 -2
- package/dist/applicationinsights-analytics-js.min.js.map +1 -1
- package/dist/applicationinsights-analytics-js.rollup.d.ts +1 -1
- package/dist-esm/JavaScriptSDK/AnalyticsPlugin.js +5 -5
- package/dist-esm/JavaScriptSDK/AnalyticsPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/Telemetry/PageViewManager.js +1 -1
- package/dist-esm/JavaScriptSDK/Telemetry/PageViewPerformanceManager.js +3 -2
- package/dist-esm/JavaScriptSDK/Telemetry/PageViewPerformanceManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/Telemetry/PageVisitTimeManager.js +1 -1
- package/dist-esm/JavaScriptSDK/Timing.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryConfig.js +1 -1
- package/dist-esm/__DynamicConstants.js +1 -1
- package/dist-esm/applicationinsights-analytics-js.js +1 -1
- package/package.json +5 -5
- package/src/JavaScriptSDK/AnalyticsPlugin.ts +3 -3
- package/src/JavaScriptSDK/Telemetry/PageViewPerformanceManager.ts +2 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "applicationinsights-analytics-js",
|
|
3
|
-
"version": "3.0.0-beta.2210-
|
|
3
|
+
"version": "3.0.0-beta.2210-18",
|
|
4
4
|
"ext": {
|
|
5
5
|
"@js": {
|
|
6
6
|
"file": "applicationinsights-analytics-js.js",
|
|
7
7
|
"type": "text/javascript; charset=utf-8",
|
|
8
|
-
"integrity": "sha256-
|
|
8
|
+
"integrity": "sha256-TvDASqm6kYRx8RFyanike6n8ZUnzEzzgyPJ7N6/XMpc= sha384-+xCqII/9CNzLaAmWrex+bCjxODfXdNKb0NVS/csnbtvjDOhcw45M44B8jsHi1dzP sha512-pHEz//vaSiwU5x9VztvYIfODjMBX4gkjDiTXIX6rMWOfCH4qiDiM4EqVN0HJj0hVs0PKNU3louEtEmW7gzRnTg==",
|
|
9
9
|
"hashes": {
|
|
10
|
-
"sha256": "
|
|
11
|
-
"sha384": "
|
|
12
|
-
"sha512": "
|
|
10
|
+
"sha256": "TvDASqm6kYRx8RFyanike6n8ZUnzEzzgyPJ7N6/XMpc=",
|
|
11
|
+
"sha384": "+xCqII/9CNzLaAmWrex+bCjxODfXdNKb0NVS/csnbtvjDOhcw45M44B8jsHi1dzP",
|
|
12
|
+
"sha512": "pHEz//vaSiwU5x9VztvYIfODjMBX4gkjDiTXIX6rMWOfCH4qiDiM4EqVN0HJj0hVs0PKNU3louEtEmW7gzRnTg=="
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"@min.js": {
|
|
16
16
|
"file": "applicationinsights-analytics-js.min.js",
|
|
17
17
|
"type": "text/javascript; charset=utf-8",
|
|
18
|
-
"integrity": "sha256-
|
|
18
|
+
"integrity": "sha256-geEL4VD7knqoqVoFPirksL9MrLhb75ITsdyMQy9FNm8= sha384-c+rwby0iK2OJAyucvUB2sUPTBJJaYvLoVU4CU6C2CObfjEtPp6Jo52oCCaeyObPc sha512-JERxSHoHLUVyr9A+LDAU467Vgc8ntHHDT3R6PVPg0aM4Rrbt76ZlDuqQbdT/yU5S+KOTIyqYKQOtIdzy6oh4Gw==",
|
|
19
19
|
"hashes": {
|
|
20
|
-
"sha256": "
|
|
21
|
-
"sha384": "
|
|
22
|
-
"sha512": "
|
|
20
|
+
"sha256": "geEL4VD7knqoqVoFPirksL9MrLhb75ITsdyMQy9FNm8=",
|
|
21
|
+
"sha384": "c+rwby0iK2OJAyucvUB2sUPTBJJaYvLoVU4CU6C2CObfjEtPp6Jo52oCCaeyObPc",
|
|
22
|
+
"sha512": "JERxSHoHLUVyr9A+LDAU467Vgc8ntHHDT3R6PVPg0aM4Rrbt76ZlDuqQbdT/yU5S+KOTIyqYKQOtIdzy6oh4Gw=="
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Web Analytics, 3.0.0-beta.2210-
|
|
2
|
+
* Application Insights JavaScript SDK - Web Analytics, 3.0.0-beta.2210-18
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -377,6 +377,7 @@
|
|
|
377
377
|
var PROTOTYPE = "prototype";
|
|
378
378
|
var STRING = "string";
|
|
379
379
|
var UNDEFINED = "undefined";
|
|
380
|
+
var CONSTRUCTOR = "constructor";
|
|
380
381
|
var HAS_OWN_PROPERTY = "hasOwnProperty";
|
|
381
382
|
var SYMBOL = "Symbol";
|
|
382
383
|
var POLYFILL_TAG = "_polyfill";
|
|
@@ -449,7 +450,7 @@
|
|
|
449
450
|
return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
|
|
450
451
|
}
|
|
451
452
|
|
|
452
|
-
function objForEachKey
|
|
453
|
+
function objForEachKey(theObject, callbackfn, thisArg) {
|
|
453
454
|
if (theObject && isObject(theObject)) {
|
|
454
455
|
for (var prop in theObject) {
|
|
455
456
|
if (objHasOwn(theObject, prop)) {
|
|
@@ -481,7 +482,7 @@
|
|
|
481
482
|
}
|
|
482
483
|
function objDeepFreeze(value) {
|
|
483
484
|
if (_objFreeze) {
|
|
484
|
-
objForEachKey
|
|
485
|
+
objForEachKey(value, function (key, value) {
|
|
485
486
|
if (isArray(value) || isObject(value)) {
|
|
486
487
|
_objFreeze(value);
|
|
487
488
|
}
|
|
@@ -491,11 +492,11 @@
|
|
|
491
492
|
}
|
|
492
493
|
var objFreeze = _objFreeze || _doNothing;
|
|
493
494
|
ObjClass["seal"] || _doNothing;
|
|
494
|
-
ObjClass["getPrototypeOf"] || _doNothing;
|
|
495
|
+
var objGetPrototypeOf = ObjClass["getPrototypeOf"] || _doNothing;
|
|
495
496
|
|
|
496
497
|
function createEnum(values) {
|
|
497
498
|
var theEnum = {};
|
|
498
|
-
objForEachKey
|
|
499
|
+
objForEachKey(values, function (field, value) {
|
|
499
500
|
theEnum[field] = value;
|
|
500
501
|
theEnum[value] = field;
|
|
501
502
|
});
|
|
@@ -562,7 +563,7 @@
|
|
|
562
563
|
d.__proto__ = b;
|
|
563
564
|
}) ||
|
|
564
565
|
function (d, b) {
|
|
565
|
-
objForEachKey
|
|
566
|
+
objForEachKey(b, function (key, value) {
|
|
566
567
|
d[key] = value;
|
|
567
568
|
});
|
|
568
569
|
};
|
|
@@ -814,8 +815,55 @@
|
|
|
814
815
|
};
|
|
815
816
|
}
|
|
816
817
|
|
|
818
|
+
var arrIndexOf = _unwrapFunction(INDEX_OF);
|
|
819
|
+
|
|
817
820
|
var arrMap = _unwrapFunction("map");
|
|
818
821
|
|
|
822
|
+
function utcNow() {
|
|
823
|
+
return (Date.now || polyUtcNow)();
|
|
824
|
+
}
|
|
825
|
+
function polyUtcNow() {
|
|
826
|
+
return new Date().getTime();
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
var _fnToString$1;
|
|
830
|
+
var _objCtrFnString;
|
|
831
|
+
var _gblWindow;
|
|
832
|
+
function isPlainObject(value) {
|
|
833
|
+
if (!value || typeof value !== OBJECT) {
|
|
834
|
+
return false;
|
|
835
|
+
}
|
|
836
|
+
if (!_gblWindow) {
|
|
837
|
+
_gblWindow = hasWindow() ? getWindow() : true;
|
|
838
|
+
}
|
|
839
|
+
var result = false;
|
|
840
|
+
if (value !== _gblWindow) {
|
|
841
|
+
if (!_objCtrFnString) {
|
|
842
|
+
_fnToString$1 = Function[PROTOTYPE].toString;
|
|
843
|
+
_objCtrFnString = _fnToString$1.call(ObjClass);
|
|
844
|
+
}
|
|
845
|
+
try {
|
|
846
|
+
var proto = objGetPrototypeOf(value);
|
|
847
|
+
result = !proto;
|
|
848
|
+
if (!result) {
|
|
849
|
+
if (objHasOwnProperty(proto, CONSTRUCTOR)) {
|
|
850
|
+
proto = proto[CONSTRUCTOR];
|
|
851
|
+
}
|
|
852
|
+
result = proto && typeof proto === FUNCTION && _fnToString$1.call(proto) === _objCtrFnString;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
catch (ex) {
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
return result;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
var _perf;
|
|
862
|
+
function getPerformance() {
|
|
863
|
+
(!_perf || (_globalLazyTestHooks.lzy && !_perf.b)) && (_perf = _lazySafeGet(function () { return getInst("performance"); }, UNDEF_VALUE));
|
|
864
|
+
return _perf.v;
|
|
865
|
+
}
|
|
866
|
+
|
|
819
867
|
var mathMax = MathCls.max;
|
|
820
868
|
|
|
821
869
|
var strSlice = _unwrapFunction("slice");
|
|
@@ -839,6 +887,9 @@
|
|
|
839
887
|
}
|
|
840
888
|
return strSlice(value, start, start + length);
|
|
841
889
|
}
|
|
890
|
+
function strLeft(value, count) {
|
|
891
|
+
return strSubstring(value, 0, count);
|
|
892
|
+
}
|
|
842
893
|
|
|
843
894
|
var ENDS_WITH = "endsWith";
|
|
844
895
|
var strEndsWith = StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith;
|
|
@@ -908,11 +959,10 @@
|
|
|
908
959
|
var _DYN_CONFIGURABLE = "configurable";
|
|
909
960
|
var _DYN_ENUMERABLE = "enumerable";
|
|
910
961
|
var _DYN_APPLY = "apply";
|
|
911
|
-
var _DYN_INDEX_OF$1 = "indexOf";
|
|
912
962
|
var _DYN_PUSH = "push";
|
|
963
|
+
var _DYN_SPLICE = "splice";
|
|
913
964
|
var _DYN_INITIALIZE = "initialize";
|
|
914
965
|
var _DYN_IDENTIFIER = "identifier";
|
|
915
|
-
var _DYN_SPLICE = "splice";
|
|
916
966
|
var _DYN_IS_INITIALIZED = "isInitialized";
|
|
917
967
|
var _DYN_NAME$1 = "name";
|
|
918
968
|
var _DYN_TIME = "time";
|
|
@@ -932,7 +982,6 @@
|
|
|
932
982
|
var _DYN_SET_NEXT_PLUGIN = "setNextPlugin";
|
|
933
983
|
var _DYN_CREATE_NEW = "createNew";
|
|
934
984
|
var _DYN_CONFIG = "config";
|
|
935
|
-
var _DYN_SUBSTRING$1 = "substring";
|
|
936
985
|
var _DYN_USER_AGENT = "userAgent";
|
|
937
986
|
var _DYN_SPLIT$1 = "split";
|
|
938
987
|
var _DYN_NODE_TYPE = "nodeType";
|
|
@@ -979,9 +1028,8 @@
|
|
|
979
1028
|
|
|
980
1029
|
var strToString = "toString";
|
|
981
1030
|
var strGetPrototypeOf = "getPrototypeOf";
|
|
982
|
-
var strConstructor = "constructor";
|
|
983
1031
|
var _fnToString = ObjClass$1[strToString];
|
|
984
|
-
|
|
1032
|
+
_fnToString[_DYN_CALL ](ObjClass$1);
|
|
985
1033
|
var rCamelCase = /-([a-z])/g;
|
|
986
1034
|
var rNormalizeInvalid = /([^\w\d_$])/g;
|
|
987
1035
|
var rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
@@ -1002,36 +1050,15 @@
|
|
|
1002
1050
|
}
|
|
1003
1051
|
return value;
|
|
1004
1052
|
}
|
|
1005
|
-
var objForEachKey = objForEachKey$1;
|
|
1006
1053
|
function strContains(value, search) {
|
|
1007
1054
|
if (value && search) {
|
|
1008
1055
|
return strIndexOf(value, search) !== -1;
|
|
1009
1056
|
}
|
|
1010
1057
|
return false;
|
|
1011
1058
|
}
|
|
1012
|
-
function isPlainObject(value) {
|
|
1013
|
-
var result = false;
|
|
1014
|
-
if (value && typeof value === "object") {
|
|
1015
|
-
var proto = _getObjProto(value);
|
|
1016
|
-
if (!proto) {
|
|
1017
|
-
result = true;
|
|
1018
|
-
}
|
|
1019
|
-
else {
|
|
1020
|
-
if (proto[strConstructor] && objHasOwnProperty(proto, strConstructor)) {
|
|
1021
|
-
proto = proto[strConstructor];
|
|
1022
|
-
}
|
|
1023
|
-
result = typeof proto === strShimFunction && _fnToString[_DYN_CALL ](proto) === _objFunctionString;
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
return result;
|
|
1027
|
-
}
|
|
1028
1059
|
function toISOString(date) {
|
|
1029
1060
|
return date && date.toISOString() || "";
|
|
1030
1061
|
}
|
|
1031
|
-
function dateNow() {
|
|
1032
|
-
var dt = Date;
|
|
1033
|
-
return dt.now ? dt.now() : new dt().getTime();
|
|
1034
|
-
}
|
|
1035
1062
|
function getExceptionName(object) {
|
|
1036
1063
|
if (isError(object)) {
|
|
1037
1064
|
return object[_DYN_NAME$1 ];
|
|
@@ -1078,7 +1105,6 @@
|
|
|
1078
1105
|
|
|
1079
1106
|
var strLocation = "location";
|
|
1080
1107
|
var strConsole = "console";
|
|
1081
|
-
var strPerformance = "performance";
|
|
1082
1108
|
var strJSON = "JSON";
|
|
1083
1109
|
var strCrypto = "crypto";
|
|
1084
1110
|
var strMsCrypto = "msCrypto";
|
|
@@ -1105,9 +1131,6 @@
|
|
|
1105
1131
|
}
|
|
1106
1132
|
return getInst(strConsole);
|
|
1107
1133
|
}
|
|
1108
|
-
function getPerformance() {
|
|
1109
|
-
return getInst(strPerformance);
|
|
1110
|
-
}
|
|
1111
1134
|
function hasJSON() {
|
|
1112
1135
|
return Boolean((typeof JSON === strShimObject && JSON) || getInst(strJSON) !== null);
|
|
1113
1136
|
}
|
|
@@ -1148,7 +1171,7 @@
|
|
|
1148
1171
|
}
|
|
1149
1172
|
function _autoSeedMwc() {
|
|
1150
1173
|
try {
|
|
1151
|
-
var now =
|
|
1174
|
+
var now = utcNow() & 0x7fffffff;
|
|
1152
1175
|
_mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
|
|
1153
1176
|
}
|
|
1154
1177
|
catch (e) {
|
|
@@ -1202,7 +1225,7 @@
|
|
|
1202
1225
|
}
|
|
1203
1226
|
|
|
1204
1227
|
var _objDefineProperty = ObjDefineProperty;
|
|
1205
|
-
var version = "3.0.0-beta.2210-
|
|
1228
|
+
var version = "3.0.0-beta.2210-18";
|
|
1206
1229
|
var instanceName = "." + newId(6);
|
|
1207
1230
|
var _dataUid = 0;
|
|
1208
1231
|
function _createAccessor(target, prop, value) {
|
|
@@ -1287,7 +1310,7 @@
|
|
|
1287
1310
|
target_1 = {};
|
|
1288
1311
|
}
|
|
1289
1312
|
if (target_1) {
|
|
1290
|
-
objForEachKey
|
|
1313
|
+
objForEachKey(source, function (key, value) {
|
|
1291
1314
|
target_1[key] = _cfgDeepCopy(value);
|
|
1292
1315
|
});
|
|
1293
1316
|
return target_1;
|
|
@@ -1402,9 +1425,18 @@
|
|
|
1402
1425
|
var detail = {
|
|
1403
1426
|
n: name,
|
|
1404
1427
|
h: [],
|
|
1405
|
-
|
|
1406
|
-
if (handler && handler.fn
|
|
1407
|
-
detail.h
|
|
1428
|
+
trk: function (handler) {
|
|
1429
|
+
if (handler && handler.fn) {
|
|
1430
|
+
if (arrIndexOf(detail.h, handler) === -1) {
|
|
1431
|
+
detail.h[_DYN_PUSH ](handler);
|
|
1432
|
+
}
|
|
1433
|
+
state.trk(handler, detail);
|
|
1434
|
+
}
|
|
1435
|
+
},
|
|
1436
|
+
clr: function (handler) {
|
|
1437
|
+
var idx = arrIndexOf(detail.h, handler);
|
|
1438
|
+
if (idx !== -1) {
|
|
1439
|
+
detail.h[_DYN_SPLICE ](idx, 1);
|
|
1408
1440
|
}
|
|
1409
1441
|
}
|
|
1410
1442
|
};
|
|
@@ -1418,25 +1450,28 @@
|
|
|
1418
1450
|
}
|
|
1419
1451
|
var activeHandler = state.act;
|
|
1420
1452
|
if (activeHandler) {
|
|
1421
|
-
detail.
|
|
1453
|
+
detail.trk(activeHandler);
|
|
1422
1454
|
}
|
|
1423
1455
|
return value;
|
|
1424
1456
|
}
|
|
1425
|
-
_getProperty[state.prop] =
|
|
1457
|
+
_getProperty[state.prop] = {
|
|
1458
|
+
chng: function () {
|
|
1459
|
+
state.add(detail);
|
|
1460
|
+
}
|
|
1461
|
+
};
|
|
1426
1462
|
function _setProperty(newValue) {
|
|
1427
1463
|
if (value !== newValue) {
|
|
1428
1464
|
if (!!_setProperty[state.ro] && state.upd) {
|
|
1429
1465
|
throwInvalidAccess("[" + name + "] is sealed from " + dumpObj(theConfig));
|
|
1430
1466
|
}
|
|
1431
1467
|
if (value && value[CFG_HANDLER_LINK]) {
|
|
1432
|
-
if (isPlainObject(value)) {
|
|
1433
|
-
objForEachKey
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
value[idx] = UNDEFINED_VALUE;
|
|
1468
|
+
if (isPlainObject(value) || isArray(value)) {
|
|
1469
|
+
objForEachKey(value, function (key) {
|
|
1470
|
+
var propDesc = objGetOwnPropertyDescriptor(value, key);
|
|
1471
|
+
if (propDesc && propDesc.get) {
|
|
1472
|
+
var valueState = propDesc.get[state.prop];
|
|
1473
|
+
valueState && valueState.chng();
|
|
1474
|
+
}
|
|
1440
1475
|
});
|
|
1441
1476
|
}
|
|
1442
1477
|
}
|
|
@@ -1468,7 +1503,7 @@
|
|
|
1468
1503
|
}
|
|
1469
1504
|
function _makeDynamicObject(state, target ) {
|
|
1470
1505
|
var _a;
|
|
1471
|
-
objForEachKey
|
|
1506
|
+
objForEachKey( target, function (key, value) {
|
|
1472
1507
|
_setDynamicProperty(state, target, key, value);
|
|
1473
1508
|
});
|
|
1474
1509
|
if (!target[CFG_HANDLER_LINK]) {
|
|
@@ -1486,19 +1521,10 @@
|
|
|
1486
1521
|
|
|
1487
1522
|
var symPrefix = "[[ai_";
|
|
1488
1523
|
var symPostfix = "]]";
|
|
1489
|
-
function _insertWatcher(watchers, theDetail) {
|
|
1490
|
-
if (theDetail && theDetail.h && theDetail.h[_DYN_LENGTH$2 ] > 0) {
|
|
1491
|
-
arrForEach(theDetail.h, function (handler) {
|
|
1492
|
-
if (handler && handler.fn && watchers[_DYN_INDEX_OF$1 ](handler) === -1) {
|
|
1493
|
-
watchers[_DYN_PUSH ](handler);
|
|
1494
|
-
}
|
|
1495
|
-
});
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
1524
|
function _createState(cfgHandler) {
|
|
1499
|
-
var _a;
|
|
1500
1525
|
var dynamicPropertySymbol = newSymbol(symPrefix + "get" + cfgHandler.uid + symPostfix);
|
|
1501
1526
|
var dynamicPropertyReadOnly = newSymbol(symPrefix + "ro" + cfgHandler.uid + symPostfix);
|
|
1527
|
+
var dynamicPropertyDetail = newSymbol(symPrefix + "dtl" + cfgHandler.uid + symPostfix);
|
|
1502
1528
|
var _waitingHandlers = null;
|
|
1503
1529
|
var _watcherTimer = null;
|
|
1504
1530
|
var theState;
|
|
@@ -1506,6 +1532,12 @@
|
|
|
1506
1532
|
var prevWatcher = theState.act;
|
|
1507
1533
|
try {
|
|
1508
1534
|
theState.act = activeHandler;
|
|
1535
|
+
if (activeHandler && activeHandler[dynamicPropertyDetail]) {
|
|
1536
|
+
arrForEach(activeHandler[dynamicPropertyDetail], function (detail) {
|
|
1537
|
+
detail.clr(activeHandler);
|
|
1538
|
+
});
|
|
1539
|
+
activeHandler[dynamicPropertyDetail] = [];
|
|
1540
|
+
}
|
|
1509
1541
|
callback({
|
|
1510
1542
|
cfg: cfgHandler.cfg,
|
|
1511
1543
|
set: cfgHandler.set.bind(cfgHandler),
|
|
@@ -1515,7 +1547,7 @@
|
|
|
1515
1547
|
catch (e) {
|
|
1516
1548
|
var logger = cfgHandler[_DYN_LOGGER ];
|
|
1517
1549
|
if (logger) {
|
|
1518
|
-
logger[_DYN_THROW_INTERNAL ](1 , 107 ,
|
|
1550
|
+
logger[_DYN_THROW_INTERNAL ](1 , 107 , dumpObj(e));
|
|
1519
1551
|
}
|
|
1520
1552
|
throw e;
|
|
1521
1553
|
}
|
|
@@ -1527,18 +1559,24 @@
|
|
|
1527
1559
|
if (_waitingHandlers) {
|
|
1528
1560
|
var notifyHandlers = _waitingHandlers;
|
|
1529
1561
|
_waitingHandlers = null;
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
_watcherTimer = null;
|
|
1533
|
-
}
|
|
1562
|
+
_watcherTimer && _watcherTimer.cancel();
|
|
1563
|
+
_watcherTimer = null;
|
|
1534
1564
|
var watcherFailures_1 = [];
|
|
1535
1565
|
arrForEach(notifyHandlers, function (handler) {
|
|
1536
|
-
if (handler
|
|
1537
|
-
|
|
1538
|
-
|
|
1566
|
+
if (handler) {
|
|
1567
|
+
if (handler[dynamicPropertyDetail]) {
|
|
1568
|
+
arrForEach(handler[dynamicPropertyDetail], function (detail) {
|
|
1569
|
+
detail.clr(handler);
|
|
1570
|
+
});
|
|
1571
|
+
handler[dynamicPropertyDetail] = null;
|
|
1539
1572
|
}
|
|
1540
|
-
|
|
1541
|
-
|
|
1573
|
+
if (handler.fn) {
|
|
1574
|
+
try {
|
|
1575
|
+
_useHandler(handler, handler.fn);
|
|
1576
|
+
}
|
|
1577
|
+
catch (e) {
|
|
1578
|
+
watcherFailures_1[_DYN_PUSH ](e);
|
|
1579
|
+
}
|
|
1542
1580
|
}
|
|
1543
1581
|
}
|
|
1544
1582
|
});
|
|
@@ -1551,7 +1589,7 @@
|
|
|
1551
1589
|
}
|
|
1552
1590
|
}
|
|
1553
1591
|
if (watcherFailures_1[_DYN_LENGTH$2 ] > 0) {
|
|
1554
|
-
throwAggregationError("
|
|
1592
|
+
throwAggregationError("Watcher error(s): ", watcherFailures_1);
|
|
1555
1593
|
}
|
|
1556
1594
|
}
|
|
1557
1595
|
}
|
|
@@ -1566,18 +1604,31 @@
|
|
|
1566
1604
|
_notifyWatchers();
|
|
1567
1605
|
}, 0);
|
|
1568
1606
|
}
|
|
1569
|
-
|
|
1607
|
+
for (var idx = 0; idx < detail.h[_DYN_LENGTH$2 ]; idx++) {
|
|
1608
|
+
var handler = detail.h[idx];
|
|
1609
|
+
if (handler && arrIndexOf(_waitingHandlers, handler) === -1) {
|
|
1610
|
+
_waitingHandlers[_DYN_PUSH ](handler);
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1570
1613
|
}
|
|
1571
1614
|
}
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1615
|
+
function _trackHandler(handler, detail) {
|
|
1616
|
+
if (handler) {
|
|
1617
|
+
var details = handler[dynamicPropertyDetail] = handler[dynamicPropertyDetail] || [];
|
|
1618
|
+
if (arrIndexOf(details, detail) === -1) {
|
|
1619
|
+
details[_DYN_PUSH ](detail);
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
theState = {
|
|
1624
|
+
prop: dynamicPropertySymbol,
|
|
1625
|
+
ro: dynamicPropertyReadOnly,
|
|
1626
|
+
hdlr: cfgHandler,
|
|
1627
|
+
add: _addWatcher,
|
|
1628
|
+
notify: _notifyWatchers,
|
|
1629
|
+
use: _useHandler,
|
|
1630
|
+
trk: _trackHandler
|
|
1631
|
+
};
|
|
1581
1632
|
return theState;
|
|
1582
1633
|
}
|
|
1583
1634
|
|
|
@@ -1864,7 +1915,7 @@
|
|
|
1864
1915
|
var PerfEvent = /** @class */ (function () {
|
|
1865
1916
|
function PerfEvent(name, payloadDetails, isAsync) {
|
|
1866
1917
|
var _self = this;
|
|
1867
|
-
_self.start =
|
|
1918
|
+
_self.start = utcNow();
|
|
1868
1919
|
_self[_DYN_NAME$1 ] = name;
|
|
1869
1920
|
_self[_DYN_IS_ASYNC ] = isAsync;
|
|
1870
1921
|
_self[_DYN_IS_CHILD_EVT ] = function () { return false; };
|
|
@@ -1915,7 +1966,7 @@
|
|
|
1915
1966
|
}
|
|
1916
1967
|
}
|
|
1917
1968
|
}
|
|
1918
|
-
_self[_DYN_TIME ] =
|
|
1969
|
+
_self[_DYN_TIME ] = utcNow() - _self.start;
|
|
1919
1970
|
_self.exTime = _self[_DYN_TIME ] - childTime;
|
|
1920
1971
|
_self[_DYN_COMPLETE ] = function () { };
|
|
1921
1972
|
};
|
|
@@ -2096,7 +2147,7 @@
|
|
|
2096
2147
|
if (!extCfg && createIfMissing) {
|
|
2097
2148
|
extCfg = {};
|
|
2098
2149
|
}
|
|
2099
|
-
dynamicHandler.set(cfg,
|
|
2150
|
+
dynamicHandler.set(cfg, STR_EXTENSION_CONFIG, extCfg);
|
|
2100
2151
|
extCfg = cfg[STR_EXTENSION_CONFIG ];
|
|
2101
2152
|
if (extCfg) {
|
|
2102
2153
|
idCfg = extCfg[identifier];
|
|
@@ -2409,13 +2460,13 @@
|
|
|
2409
2460
|
}
|
|
2410
2461
|
function _isIgnoredCookie(cookieMgrCfg, name) {
|
|
2411
2462
|
if (name && cookieMgrCfg && isArray(cookieMgrCfg.ignoreCookies)) {
|
|
2412
|
-
return cookieMgrCfg.ignoreCookies
|
|
2463
|
+
return arrIndexOf(cookieMgrCfg.ignoreCookies, name) !== -1;
|
|
2413
2464
|
}
|
|
2414
2465
|
return false;
|
|
2415
2466
|
}
|
|
2416
2467
|
function _isBlockedCookie(cookieMgrCfg, name) {
|
|
2417
2468
|
if (name && cookieMgrCfg && isArray(cookieMgrCfg.blockedCookies)) {
|
|
2418
|
-
if (cookieMgrCfg.blockedCookies
|
|
2469
|
+
if (arrIndexOf(cookieMgrCfg.blockedCookies, name) !== -1) {
|
|
2419
2470
|
return true;
|
|
2420
2471
|
}
|
|
2421
2472
|
}
|
|
@@ -2487,16 +2538,16 @@
|
|
|
2487
2538
|
if (_isMgrEnabled(cookieMgr) && !_isBlockedCookie(cookieMgrConfig, name)) {
|
|
2488
2539
|
var values = {};
|
|
2489
2540
|
var theValue = strTrim(value || STR_EMPTY);
|
|
2490
|
-
var idx = theValue
|
|
2541
|
+
var idx = strIndexOf(theValue, ";");
|
|
2491
2542
|
if (idx !== -1) {
|
|
2492
|
-
theValue = strTrim(value
|
|
2493
|
-
values = _extractParts(value
|
|
2543
|
+
theValue = strTrim(strLeft(value, idx));
|
|
2544
|
+
values = _extractParts(strSubstring(value, idx + 1));
|
|
2494
2545
|
}
|
|
2495
2546
|
setValue(values, STR_DOMAIN, domain || _domain, isTruthy, isUndefined);
|
|
2496
2547
|
if (!isNullOrUndefined(maxAgeSec)) {
|
|
2497
2548
|
var _isIE = isIE();
|
|
2498
2549
|
if (isUndefined(values[strExpires])) {
|
|
2499
|
-
var nowMs =
|
|
2550
|
+
var nowMs = utcNow();
|
|
2500
2551
|
var expireMs = nowMs + (maxAgeSec * 1000);
|
|
2501
2552
|
if (expireMs > 0) {
|
|
2502
2553
|
var expiry = new Date();
|
|
@@ -2578,12 +2629,12 @@
|
|
|
2578
2629
|
arrForEach(parts, function (thePart) {
|
|
2579
2630
|
thePart = strTrim(thePart || STR_EMPTY);
|
|
2580
2631
|
if (thePart) {
|
|
2581
|
-
var idx = thePart
|
|
2632
|
+
var idx = strIndexOf(thePart, "=");
|
|
2582
2633
|
if (idx === -1) {
|
|
2583
2634
|
values[thePart] = null;
|
|
2584
2635
|
}
|
|
2585
2636
|
else {
|
|
2586
|
-
values[strTrim(thePart
|
|
2637
|
+
values[strTrim(strLeft(thePart, idx))] = strTrim(strSubstring(thePart, idx + 1));
|
|
2587
2638
|
}
|
|
2588
2639
|
}
|
|
2589
2640
|
});
|
|
@@ -2598,7 +2649,7 @@
|
|
|
2598
2649
|
}
|
|
2599
2650
|
function _formatCookieValue(value, values) {
|
|
2600
2651
|
var cookieValue = value || STR_EMPTY;
|
|
2601
|
-
objForEachKey
|
|
2652
|
+
objForEachKey(values, function (name, theValue) {
|
|
2602
2653
|
cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : STR_EMPTY);
|
|
2603
2654
|
});
|
|
2604
2655
|
return cookieValue;
|
|
@@ -3145,7 +3196,6 @@
|
|
|
3145
3196
|
var _DYN_REMOVE_ITEM = "removeItem";
|
|
3146
3197
|
var _DYN_NAME = "name";
|
|
3147
3198
|
var _DYN_PATHNAME = "pathname";
|
|
3148
|
-
var _DYN_INDEX_OF = "indexOf";
|
|
3149
3199
|
var _DYN_EXCEPTIONS = "exceptions";
|
|
3150
3200
|
var _DYN_PARSED_STACK = "parsedStack";
|
|
3151
3201
|
var _DYN_PROPERTIES = "properties";
|
|
@@ -3233,7 +3283,7 @@
|
|
|
3233
3283
|
function dataSanitizeProperties(logger, properties) {
|
|
3234
3284
|
if (properties) {
|
|
3235
3285
|
var tempProps_1 = {};
|
|
3236
|
-
objForEachKey
|
|
3286
|
+
objForEachKey(properties, function (prop, value) {
|
|
3237
3287
|
if (isObject(value) && hasJSON()) {
|
|
3238
3288
|
try {
|
|
3239
3289
|
value = getJSON()[_DYN_STRINGIFY ](value);
|
|
@@ -3253,7 +3303,7 @@
|
|
|
3253
3303
|
function dataSanitizeMeasurements(logger, measurements) {
|
|
3254
3304
|
if (measurements) {
|
|
3255
3305
|
var tempMeasurements_1 = {};
|
|
3256
|
-
objForEachKey
|
|
3306
|
+
objForEachKey(measurements, function (measure, value) {
|
|
3257
3307
|
measure = dataSanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements_1);
|
|
3258
3308
|
tempMeasurements_1[measure] = value;
|
|
3259
3309
|
});
|
|
@@ -3466,7 +3516,7 @@
|
|
|
3466
3516
|
evtMessage = evtMessage + " @" + (theEvent["filename"] || "") + ":" + (theEvent["lineno"] || "?") + ":" + (theEvent["colno"] || "?");
|
|
3467
3517
|
}
|
|
3468
3518
|
}
|
|
3469
|
-
if (errorType && errorType !== "String" && errorType !== "Object" && errorType !== "Error" && (evtMessage || ""
|
|
3519
|
+
if (errorType && errorType !== "String" && errorType !== "Object" && errorType !== "Error" && strIndexOf(evtMessage || "", errorType) === -1) {
|
|
3470
3520
|
evtMessage = errorType + ": " + evtMessage;
|
|
3471
3521
|
}
|
|
3472
3522
|
return evtMessage || "";
|
|
@@ -3659,7 +3709,7 @@
|
|
|
3659
3709
|
}
|
|
3660
3710
|
result = _stringify(errorObj, true);
|
|
3661
3711
|
}
|
|
3662
|
-
if (result
|
|
3712
|
+
if (strIndexOf(result, errorType) !== 0 && errorType !== "String") {
|
|
3663
3713
|
return errorType + ":" + result;
|
|
3664
3714
|
}
|
|
3665
3715
|
return result;
|
|
@@ -4117,7 +4167,7 @@
|
|
|
4117
4167
|
,
|
|
4118
4168
|
_a);
|
|
4119
4169
|
if (!isNullOrUndefined(customProperties)) {
|
|
4120
|
-
objForEachKey
|
|
4170
|
+
objForEachKey(customProperties, function (prop, value) {
|
|
4121
4171
|
telemetryItem.data[prop] = value;
|
|
4122
4172
|
});
|
|
4123
4173
|
}
|
|
@@ -4467,7 +4517,7 @@
|
|
|
4467
4517
|
var isGoogleBot = false;
|
|
4468
4518
|
if (userAgent) {
|
|
4469
4519
|
for (var i = 0; i < botAgentNames[_DYN_LENGTH ]; i++) {
|
|
4470
|
-
isGoogleBot = isGoogleBot || userAgent.toLowerCase()
|
|
4520
|
+
isGoogleBot = isGoogleBot || strIndexOf(userAgent.toLowerCase(), botAgentNames[i]) !== -1;
|
|
4471
4521
|
}
|
|
4472
4522
|
}
|
|
4473
4523
|
if (isGoogleBot) {
|
|
@@ -4587,7 +4637,7 @@
|
|
|
4587
4637
|
var prevPageVisitData = null;
|
|
4588
4638
|
try {
|
|
4589
4639
|
if (utlCanUseSessionStorage()) {
|
|
4590
|
-
var pageVisitEndTime =
|
|
4640
|
+
var pageVisitEndTime = utcNow();
|
|
4591
4641
|
var pageVisitDataJsonStr = utlGetSessionStorage(logger, prevPageVisitDataKeyName);
|
|
4592
4642
|
if (pageVisitDataJsonStr && hasJSON()) {
|
|
4593
4643
|
prevPageVisitData = getJSON().parse(pageVisitDataJsonStr);
|
|
@@ -4611,7 +4661,7 @@
|
|
|
4611
4661
|
}());
|
|
4612
4662
|
var PageVisitData = /** @class */ (function () {
|
|
4613
4663
|
function PageVisitData(pageName, pageUrl) {
|
|
4614
|
-
this[_DYN_PAGE_VISIT_START_TIM13 ] =
|
|
4664
|
+
this[_DYN_PAGE_VISIT_START_TIM13 ] = utcNow();
|
|
4615
4665
|
this.pageName = pageName;
|
|
4616
4666
|
this.pageUrl = pageUrl;
|
|
4617
4667
|
}
|
|
@@ -4996,7 +5046,7 @@
|
|
|
4996
5046
|
var remoteData = envelope.baseData;
|
|
4997
5047
|
if (remoteData) {
|
|
4998
5048
|
for (var i = 0; i < browserLinkPaths_1[_DYN_LENGTH ]; i++) {
|
|
4999
|
-
if (remoteData.target && remoteData.target
|
|
5049
|
+
if (remoteData.target && strIndexOf(remoteData.target, browserLinkPaths_1[i]) >= 0) {
|
|
5000
5050
|
return false;
|
|
5001
5051
|
}
|
|
5002
5052
|
}
|
|
@@ -5088,7 +5138,7 @@
|
|
|
5088
5138
|
}
|
|
5089
5139
|
distributedTraceCtx.setName(dataSanitizeString(_self[_DYN_DIAG_LOG ](), traceLocationName));
|
|
5090
5140
|
}
|
|
5091
|
-
|
|
5141
|
+
scheduleTimeout((function (uri) {
|
|
5092
5142
|
_self[_DYN_TRACK_PAGE_VIEW ]({ refUri: uri, properties: { duration: 0 } });
|
|
5093
5143
|
}).bind(this, _prevUri), _self.autoRoutePVDelay);
|
|
5094
5144
|
}
|
|
@@ -5169,7 +5219,7 @@
|
|
|
5169
5219
|
});
|
|
5170
5220
|
return _this;
|
|
5171
5221
|
}
|
|
5172
|
-
AnalyticsPlugin.Version = "3.0.0-beta.2210-
|
|
5222
|
+
AnalyticsPlugin.Version = "3.0.0-beta.2210-18";
|
|
5173
5223
|
return AnalyticsPlugin;
|
|
5174
5224
|
}(BaseTelemetryPlugin));
|
|
5175
5225
|
|