@microsoft/applicationinsights-common 3.0.6-nightly3.2312-02 → 3.0.6
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/es5/applicationinsights-common.cjs.js +14 -358
- package/browser/es5/applicationinsights-common.cjs.js.map +1 -1
- package/browser/es5/applicationinsights-common.cjs.min.js +2 -2
- package/browser/es5/applicationinsights-common.cjs.min.js.map +1 -1
- package/browser/es5/applicationinsights-common.gbl.js +16 -360
- package/browser/es5/applicationinsights-common.gbl.js.map +1 -1
- package/browser/es5/applicationinsights-common.gbl.min.js +2 -2
- package/browser/es5/applicationinsights-common.gbl.min.js.map +1 -1
- package/browser/es5/applicationinsights-common.integrity.json +25 -25
- package/browser/es5/applicationinsights-common.js +16 -360
- package/browser/es5/applicationinsights-common.js.map +1 -1
- package/browser/es5/applicationinsights-common.min.js +2 -2
- package/browser/es5/applicationinsights-common.min.js.map +1 -1
- package/dist/es5/applicationinsights-common.js +14 -358
- package/dist/es5/applicationinsights-common.js.map +1 -1
- package/dist/es5/applicationinsights-common.min.js +2 -2
- package/dist/es5/applicationinsights-common.min.js.map +1 -1
- package/dist-es5/ConnectionStringParser.js +1 -1
- package/dist-es5/Constants.js +1 -1
- package/dist-es5/DomHelperFuncs.js +1 -1
- package/dist-es5/Enums.js +1 -1
- package/dist-es5/HelperFuncs.js +1 -1
- package/dist-es5/Interfaces/ConnectionString.js +1 -1
- package/dist-es5/Interfaces/Context/IApplication.js +1 -1
- package/dist-es5/Interfaces/Context/IDevice.js +1 -1
- package/dist-es5/Interfaces/Context/IInternal.js +1 -1
- package/dist-es5/Interfaces/Context/ILocation.js +1 -1
- package/dist-es5/Interfaces/Context/IOperatingSystem.js +1 -1
- package/dist-es5/Interfaces/Context/ISample.js +1 -1
- package/dist-es5/Interfaces/Context/ISession.js +1 -1
- package/dist-es5/Interfaces/Context/ISessionManager.js +1 -1
- package/dist-es5/Interfaces/Context/ITelemetryTrace.js +1 -1
- package/dist-es5/Interfaces/Context/IUser.js +1 -1
- package/dist-es5/Interfaces/Context/IWeb.js +1 -1
- package/dist-es5/Interfaces/Contracts/AvailabilityData.js +1 -1
- package/dist-es5/Interfaces/Contracts/ContextTagKeys.js +1 -1
- package/dist-es5/Interfaces/Contracts/DataPointType.js +1 -1
- package/dist-es5/Interfaces/Contracts/DependencyKind.js +1 -1
- package/dist-es5/Interfaces/Contracts/DependencySourceType.js +1 -1
- package/dist-es5/Interfaces/Contracts/IBase.js +1 -1
- package/dist-es5/Interfaces/Contracts/IData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IDataPoint.js +1 -1
- package/dist-es5/Interfaces/Contracts/IDomain.js +1 -1
- package/dist-es5/Interfaces/Contracts/IEnvelope.js +1 -1
- package/dist-es5/Interfaces/Contracts/IEventData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IExceptionData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IExceptionDetails.js +1 -1
- package/dist-es5/Interfaces/Contracts/IMessageData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IMetricData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IPageViewData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IPageViewPerfData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IStackFrame.js +1 -1
- package/dist-es5/Interfaces/Contracts/RequestData.js +1 -1
- package/dist-es5/Interfaces/Contracts/SeverityLevel.js +1 -1
- package/dist-es5/Interfaces/IAppInsights.js +1 -1
- package/dist-es5/Interfaces/IConfig.js +1 -1
- package/dist-es5/Interfaces/ICorrelationConfig.js +1 -1
- package/dist-es5/Interfaces/IDependencyTelemetry.js +1 -1
- package/dist-es5/Interfaces/IEventTelemetry.js +1 -1
- package/dist-es5/Interfaces/IExceptionTelemetry.js +1 -1
- package/dist-es5/Interfaces/IMetricTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPageViewTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPartC.js +1 -1
- package/dist-es5/Interfaces/IPropertiesPlugin.js +1 -1
- package/dist-es5/Interfaces/IRequestContext.js +1 -1
- package/dist-es5/Interfaces/IStorageBuffer.js +1 -1
- package/dist-es5/Interfaces/ITelemetryContext.js +1 -1
- package/dist-es5/Interfaces/IThrottleMgr.js +1 -1
- package/dist-es5/Interfaces/ITraceTelemetry.js +1 -1
- package/dist-es5/Interfaces/PartAExtensions.js +1 -1
- package/dist-es5/Interfaces/Telemetry/IEnvelope.js +1 -1
- package/dist-es5/Interfaces/Telemetry/ISerializable.js +1 -1
- package/dist-es5/RequestResponseHeaders.js +1 -1
- package/dist-es5/StorageHelperFuncs.js +3 -3
- package/dist-es5/StorageHelperFuncs.js.map +1 -1
- package/dist-es5/Telemetry/Common/Data.js +1 -1
- package/dist-es5/Telemetry/Common/DataPoint.js +1 -1
- package/dist-es5/Telemetry/Common/DataSanitizer.js +1 -1
- package/dist-es5/Telemetry/Common/Envelope.js +1 -1
- package/dist-es5/Telemetry/Event.js +1 -1
- package/dist-es5/Telemetry/Exception.js +4 -4
- package/dist-es5/Telemetry/Exception.js.map +1 -1
- package/dist-es5/Telemetry/Metric.js +1 -1
- package/dist-es5/Telemetry/PageView.js +1 -1
- package/dist-es5/Telemetry/PageViewPerformance.js +1 -1
- package/dist-es5/Telemetry/RemoteDependencyData.js +1 -1
- package/dist-es5/Telemetry/Trace.js +1 -1
- package/dist-es5/TelemetryItemCreator.js +1 -1
- package/dist-es5/ThrottleMgr.js +3 -3
- package/dist-es5/ThrottleMgr.js.map +1 -1
- package/dist-es5/UrlHelperFuncs.js +1 -1
- package/dist-es5/Util.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -2
- package/dist-es5/__DynamicConstants.js.map +1 -1
- package/dist-es5/applicationinsights-common.js +1 -2
- package/dist-es5/applicationinsights-common.js.map +1 -1
- package/package.json +63 -66
- package/types/applicationinsights-common.d.ts +1 -47
- package/types/applicationinsights-common.namespaced.d.ts +1 -47
- package/dist-es5/Offline.js +0 -138
- package/dist-es5/Offline.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 3.0.6
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 3.0.6
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -686,7 +686,7 @@ var _DYN_SET_DF = "setDf";
|
|
|
686
686
|
var _DYN_WATCH = "watch";
|
|
687
687
|
var _DYN_LOGGER = "logger";
|
|
688
688
|
var _DYN_APPLY = "apply";
|
|
689
|
-
var _DYN_PUSH
|
|
689
|
+
var _DYN_PUSH = "push";
|
|
690
690
|
var _DYN_SPLICE = "splice";
|
|
691
691
|
var _DYN_HDLR = "hdlr";
|
|
692
692
|
var _DYN_CANCEL = "cancel";
|
|
@@ -699,11 +699,8 @@ var _DYN_MESSAGE$1 = "message";
|
|
|
699
699
|
var _DYN_DIAG_LOG = "diagLog";
|
|
700
700
|
var _DYN_USER_AGENT = "userAgent";
|
|
701
701
|
var _DYN_SPLIT$1 = "split";
|
|
702
|
-
var _DYN_NODE_TYPE = "nodeType";
|
|
703
702
|
var _DYN_REPLACE = "replace";
|
|
704
703
|
var _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
|
|
705
|
-
var _DYN_TYPE = "type";
|
|
706
|
-
var _DYN_HANDLER = "handler";
|
|
707
704
|
var _DYN_TRACE_ID = "traceId";
|
|
708
705
|
var _DYN_SPAN_ID = "spanId";
|
|
709
706
|
var _DYN_TRACE_FLAGS = "traceFlags";
|
|
@@ -1220,62 +1217,13 @@ function newId(maxLength) {
|
|
|
1220
1217
|
return result;
|
|
1221
1218
|
}
|
|
1222
1219
|
|
|
1223
|
-
var version = '3.0.6
|
|
1220
|
+
var version = '3.0.6';
|
|
1224
1221
|
var instanceName = "." + newId(6);
|
|
1225
1222
|
var _dataUid = 0;
|
|
1226
|
-
function _canAcceptData(target) {
|
|
1227
|
-
return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
|
|
1228
|
-
}
|
|
1229
|
-
function _getCache(data, target) {
|
|
1230
|
-
var theCache = target[data.id];
|
|
1231
|
-
if (!theCache) {
|
|
1232
|
-
theCache = {};
|
|
1233
|
-
try {
|
|
1234
|
-
if (_canAcceptData(target)) {
|
|
1235
|
-
objDefine(target, data.id, {
|
|
1236
|
-
e: false,
|
|
1237
|
-
v: theCache
|
|
1238
|
-
});
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
catch (e) {
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
return theCache;
|
|
1245
|
-
}
|
|
1246
1223
|
function createUniqueNamespace(name, includeVersion) {
|
|
1247
1224
|
if (includeVersion === void 0) { includeVersion = false; }
|
|
1248
1225
|
return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : STR_EMPTY) + instanceName);
|
|
1249
1226
|
}
|
|
1250
|
-
function createElmNodeData(name) {
|
|
1251
|
-
var data = {
|
|
1252
|
-
id: createUniqueNamespace("_aiData-" + (name || STR_EMPTY) + "." + version),
|
|
1253
|
-
accept: function (target) {
|
|
1254
|
-
return _canAcceptData(target);
|
|
1255
|
-
},
|
|
1256
|
-
get: function (target, name, defValue, addDefault) {
|
|
1257
|
-
var theCache = target[data.id];
|
|
1258
|
-
if (!theCache) {
|
|
1259
|
-
if (addDefault) {
|
|
1260
|
-
theCache = _getCache(data, target);
|
|
1261
|
-
theCache[normalizeJsName(name)] = defValue;
|
|
1262
|
-
}
|
|
1263
|
-
return defValue;
|
|
1264
|
-
}
|
|
1265
|
-
return theCache[normalizeJsName(name)];
|
|
1266
|
-
},
|
|
1267
|
-
kill: function (target, name) {
|
|
1268
|
-
if (target && target[name]) {
|
|
1269
|
-
try {
|
|
1270
|
-
delete target[name];
|
|
1271
|
-
}
|
|
1272
|
-
catch (e) {
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
};
|
|
1277
|
-
return data;
|
|
1278
|
-
}
|
|
1279
1227
|
|
|
1280
1228
|
function _isConfigDefaults(value) {
|
|
1281
1229
|
return (value && isObject(value) && (value.isVal || value.fb || objHasOwn(value, "v") || objHasOwn(value, "mrg") || objHasOwn(value, "ref") || value.set));
|
|
@@ -1498,7 +1446,7 @@ function _createDynamicProperty(state, theConfig, name, value) {
|
|
|
1498
1446
|
trk: function (handler) {
|
|
1499
1447
|
if (handler && handler.fn) {
|
|
1500
1448
|
if (arrIndexOf(detail.h, handler) === -1) {
|
|
1501
|
-
detail.h[_DYN_PUSH
|
|
1449
|
+
detail.h[_DYN_PUSH ](handler);
|
|
1502
1450
|
}
|
|
1503
1451
|
state.trk(handler, detail);
|
|
1504
1452
|
}
|
|
@@ -1710,7 +1658,7 @@ function _createState(cfgHandler) {
|
|
|
1710
1658
|
_useHandler(handler, handler.fn);
|
|
1711
1659
|
}
|
|
1712
1660
|
catch (e) {
|
|
1713
|
-
watcherFailures_1[_DYN_PUSH
|
|
1661
|
+
watcherFailures_1[_DYN_PUSH ](e);
|
|
1714
1662
|
}
|
|
1715
1663
|
}
|
|
1716
1664
|
}
|
|
@@ -1720,7 +1668,7 @@ function _createState(cfgHandler) {
|
|
|
1720
1668
|
_notifyWatchers();
|
|
1721
1669
|
}
|
|
1722
1670
|
catch (e) {
|
|
1723
|
-
watcherFailures_1[_DYN_PUSH
|
|
1671
|
+
watcherFailures_1[_DYN_PUSH ](e);
|
|
1724
1672
|
}
|
|
1725
1673
|
}
|
|
1726
1674
|
if (watcherFailures_1[_DYN_LENGTH$1 ] > 0) {
|
|
@@ -1742,7 +1690,7 @@ function _createState(cfgHandler) {
|
|
|
1742
1690
|
for (var idx = 0; idx < detail.h[_DYN_LENGTH$1 ]; idx++) {
|
|
1743
1691
|
var handler = detail.h[idx];
|
|
1744
1692
|
if (handler && arrIndexOf(_waitingHandlers, handler) === -1) {
|
|
1745
|
-
_waitingHandlers[_DYN_PUSH
|
|
1693
|
+
_waitingHandlers[_DYN_PUSH ](handler);
|
|
1746
1694
|
}
|
|
1747
1695
|
}
|
|
1748
1696
|
}
|
|
@@ -1751,7 +1699,7 @@ function _createState(cfgHandler) {
|
|
|
1751
1699
|
if (handler) {
|
|
1752
1700
|
var details = handler[dynamicPropertyDetail] = handler[dynamicPropertyDetail] || [];
|
|
1753
1701
|
if (arrIndexOf(details, detail) === -1) {
|
|
1754
|
-
details[_DYN_PUSH
|
|
1702
|
+
details[_DYN_PUSH ](detail);
|
|
1755
1703
|
}
|
|
1756
1704
|
}
|
|
1757
1705
|
}
|
|
@@ -2039,14 +1987,14 @@ var DiagnosticLogger = /** @class */ (function () {
|
|
|
2039
1987
|
}
|
|
2040
1988
|
if (logMessage) {
|
|
2041
1989
|
if (severity <= _loggingLevelTelemetry) {
|
|
2042
|
-
_self.queue[_DYN_PUSH
|
|
1990
|
+
_self.queue[_DYN_PUSH ](message);
|
|
2043
1991
|
_messageCount++;
|
|
2044
1992
|
_debugExtMsg((severity === 1 ? "error" : "warn"), message);
|
|
2045
1993
|
}
|
|
2046
1994
|
if (_messageCount === _maxInternalMessageLimit) {
|
|
2047
1995
|
var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
|
|
2048
1996
|
var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
|
|
2049
|
-
_self.queue[_DYN_PUSH
|
|
1997
|
+
_self.queue[_DYN_PUSH ](throttleMessage);
|
|
2050
1998
|
if (severity === 1 ) {
|
|
2051
1999
|
_self.errorToConsole(throttleLimitMessage);
|
|
2052
2000
|
}
|
|
@@ -2218,180 +2166,6 @@ function findW3cTraceParent(selectIdx) {
|
|
|
2218
2166
|
return traceParent;
|
|
2219
2167
|
}
|
|
2220
2168
|
|
|
2221
|
-
var strOnPrefix = "on";
|
|
2222
|
-
var strAttachEvent = "attachEvent";
|
|
2223
|
-
var strAddEventHelper = "addEventListener";
|
|
2224
|
-
var strDetachEvent = "detachEvent";
|
|
2225
|
-
var strRemoveEventListener = "removeEventListener";
|
|
2226
|
-
var strEvents = "events";
|
|
2227
|
-
createUniqueNamespace("aiEvtPageHide");
|
|
2228
|
-
createUniqueNamespace("aiEvtPageShow");
|
|
2229
|
-
var rRemoveEmptyNs = /\.[\.]+/g;
|
|
2230
|
-
var rRemoveTrailingEmptyNs = /[\.]+$/;
|
|
2231
|
-
var _guid = 1;
|
|
2232
|
-
var elmNodeData = createElmNodeData("events");
|
|
2233
|
-
var eventNamespace = /^([^.]*)(?:\.(.+)|)/;
|
|
2234
|
-
function _normalizeNamespace(name) {
|
|
2235
|
-
if (name && name[_DYN_REPLACE ]) {
|
|
2236
|
-
return name[_DYN_REPLACE ](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g, STR_EMPTY);
|
|
2237
|
-
}
|
|
2238
|
-
return name;
|
|
2239
|
-
}
|
|
2240
|
-
function _getEvtNamespace(eventName, evtNamespace) {
|
|
2241
|
-
var _a;
|
|
2242
|
-
if (evtNamespace) {
|
|
2243
|
-
var theNamespace_1 = STR_EMPTY;
|
|
2244
|
-
if (isArray(evtNamespace)) {
|
|
2245
|
-
theNamespace_1 = STR_EMPTY;
|
|
2246
|
-
arrForEach(evtNamespace, function (name) {
|
|
2247
|
-
name = _normalizeNamespace(name);
|
|
2248
|
-
if (name) {
|
|
2249
|
-
if (name[0] !== ".") {
|
|
2250
|
-
name = "." + name;
|
|
2251
|
-
}
|
|
2252
|
-
theNamespace_1 += name;
|
|
2253
|
-
}
|
|
2254
|
-
});
|
|
2255
|
-
}
|
|
2256
|
-
else {
|
|
2257
|
-
theNamespace_1 = _normalizeNamespace(evtNamespace);
|
|
2258
|
-
}
|
|
2259
|
-
if (theNamespace_1) {
|
|
2260
|
-
if (theNamespace_1[0] !== ".") {
|
|
2261
|
-
theNamespace_1 = "." + theNamespace_1;
|
|
2262
|
-
}
|
|
2263
|
-
eventName = (eventName || STR_EMPTY) + theNamespace_1;
|
|
2264
|
-
}
|
|
2265
|
-
}
|
|
2266
|
-
var parsedEvent = (eventNamespace.exec(eventName || STR_EMPTY) || []);
|
|
2267
|
-
return _a = {},
|
|
2268
|
-
_a[_DYN_TYPE ] = parsedEvent[1],
|
|
2269
|
-
_a.ns = ((parsedEvent[2] || STR_EMPTY).replace(rRemoveEmptyNs, ".").replace(rRemoveTrailingEmptyNs, STR_EMPTY)[_DYN_SPLIT$1 ](".").sort()).join("."),
|
|
2270
|
-
_a;
|
|
2271
|
-
}
|
|
2272
|
-
function _getRegisteredEvents(target, evtName, addDefault) {
|
|
2273
|
-
if (addDefault === void 0) { addDefault = true; }
|
|
2274
|
-
var aiEvts = elmNodeData.get(target, strEvents, {}, addDefault);
|
|
2275
|
-
var registeredEvents = aiEvts[evtName];
|
|
2276
|
-
if (!registeredEvents) {
|
|
2277
|
-
registeredEvents = aiEvts[evtName] = [];
|
|
2278
|
-
}
|
|
2279
|
-
return registeredEvents;
|
|
2280
|
-
}
|
|
2281
|
-
function _doDetach(obj, evtName, handlerRef, useCapture) {
|
|
2282
|
-
if (obj && evtName && evtName[_DYN_TYPE ]) {
|
|
2283
|
-
if (obj[strRemoveEventListener]) {
|
|
2284
|
-
obj[strRemoveEventListener](evtName[_DYN_TYPE ], handlerRef, useCapture);
|
|
2285
|
-
}
|
|
2286
|
-
else if (obj[strDetachEvent]) {
|
|
2287
|
-
obj[strDetachEvent](strOnPrefix + evtName[_DYN_TYPE ], handlerRef);
|
|
2288
|
-
}
|
|
2289
|
-
}
|
|
2290
|
-
}
|
|
2291
|
-
function _doAttach(obj, evtName, handlerRef, useCapture) {
|
|
2292
|
-
var result = false;
|
|
2293
|
-
if (obj && evtName && evtName[_DYN_TYPE ] && handlerRef) {
|
|
2294
|
-
if (obj[strAddEventHelper]) {
|
|
2295
|
-
obj[strAddEventHelper](evtName[_DYN_TYPE ], handlerRef, useCapture);
|
|
2296
|
-
result = true;
|
|
2297
|
-
}
|
|
2298
|
-
else if (obj[strAttachEvent]) {
|
|
2299
|
-
obj[strAttachEvent](strOnPrefix + evtName[_DYN_TYPE ], handlerRef);
|
|
2300
|
-
result = true;
|
|
2301
|
-
}
|
|
2302
|
-
}
|
|
2303
|
-
return result;
|
|
2304
|
-
}
|
|
2305
|
-
function _doUnregister(target, events, evtName, unRegFn) {
|
|
2306
|
-
var idx = events[_DYN_LENGTH$1 ];
|
|
2307
|
-
while (idx--) {
|
|
2308
|
-
var theEvent = events[idx];
|
|
2309
|
-
if (theEvent) {
|
|
2310
|
-
if (!evtName.ns || evtName.ns === theEvent.evtName.ns) {
|
|
2311
|
-
if (!unRegFn || unRegFn(theEvent)) {
|
|
2312
|
-
_doDetach(target, theEvent.evtName, theEvent[_DYN_HANDLER ], theEvent.capture);
|
|
2313
|
-
events[_DYN_SPLICE ](idx, 1);
|
|
2314
|
-
}
|
|
2315
|
-
}
|
|
2316
|
-
}
|
|
2317
|
-
}
|
|
2318
|
-
}
|
|
2319
|
-
function _unregisterEvents(target, evtName, unRegFn) {
|
|
2320
|
-
if (evtName[_DYN_TYPE ]) {
|
|
2321
|
-
_doUnregister(target, _getRegisteredEvents(target, evtName[_DYN_TYPE ]), evtName, unRegFn);
|
|
2322
|
-
}
|
|
2323
|
-
else {
|
|
2324
|
-
var eventCache = elmNodeData.get(target, strEvents, {});
|
|
2325
|
-
objForEachKey(eventCache, function (evtType, events) {
|
|
2326
|
-
_doUnregister(target, events, evtName, unRegFn);
|
|
2327
|
-
});
|
|
2328
|
-
if (objKeys(eventCache)[_DYN_LENGTH$1 ] === 0) {
|
|
2329
|
-
elmNodeData.kill(target, strEvents);
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
}
|
|
2333
|
-
function mergeEvtNamespace(theNamespace, namespaces) {
|
|
2334
|
-
var newNamespaces;
|
|
2335
|
-
if (namespaces) {
|
|
2336
|
-
if (isArray(namespaces)) {
|
|
2337
|
-
newNamespaces = [theNamespace].concat(namespaces);
|
|
2338
|
-
}
|
|
2339
|
-
else {
|
|
2340
|
-
newNamespaces = [theNamespace, namespaces];
|
|
2341
|
-
}
|
|
2342
|
-
newNamespaces = (_getEvtNamespace("xx", newNamespaces).ns)[_DYN_SPLIT$1 ](".");
|
|
2343
|
-
}
|
|
2344
|
-
else {
|
|
2345
|
-
newNamespaces = theNamespace;
|
|
2346
|
-
}
|
|
2347
|
-
return newNamespaces;
|
|
2348
|
-
}
|
|
2349
|
-
function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {
|
|
2350
|
-
var _a;
|
|
2351
|
-
if (useCapture === void 0) { useCapture = false; }
|
|
2352
|
-
var result = false;
|
|
2353
|
-
if (target) {
|
|
2354
|
-
try {
|
|
2355
|
-
var evtName = _getEvtNamespace(eventName, evtNamespace);
|
|
2356
|
-
result = _doAttach(target, evtName, handlerRef, useCapture);
|
|
2357
|
-
if (result && elmNodeData.accept(target)) {
|
|
2358
|
-
var registeredEvent = (_a = {
|
|
2359
|
-
guid: _guid++,
|
|
2360
|
-
evtName: evtName
|
|
2361
|
-
},
|
|
2362
|
-
_a[_DYN_HANDLER ] = handlerRef,
|
|
2363
|
-
_a.capture = useCapture,
|
|
2364
|
-
_a);
|
|
2365
|
-
_getRegisteredEvents(target, evtName.type)[_DYN_PUSH$1 ](registeredEvent);
|
|
2366
|
-
}
|
|
2367
|
-
}
|
|
2368
|
-
catch (e) {
|
|
2369
|
-
}
|
|
2370
|
-
}
|
|
2371
|
-
return result;
|
|
2372
|
-
}
|
|
2373
|
-
function eventOff(target, eventName, handlerRef, evtNamespace, useCapture) {
|
|
2374
|
-
if (useCapture === void 0) { useCapture = false; }
|
|
2375
|
-
if (target) {
|
|
2376
|
-
try {
|
|
2377
|
-
var evtName_1 = _getEvtNamespace(eventName, evtNamespace);
|
|
2378
|
-
var found_1 = false;
|
|
2379
|
-
_unregisterEvents(target, evtName_1, function (regEvent) {
|
|
2380
|
-
if ((evtName_1.ns && !handlerRef) || regEvent[_DYN_HANDLER ] === handlerRef) {
|
|
2381
|
-
found_1 = true;
|
|
2382
|
-
return true;
|
|
2383
|
-
}
|
|
2384
|
-
return false;
|
|
2385
|
-
});
|
|
2386
|
-
if (!found_1) {
|
|
2387
|
-
_doDetach(target, evtName_1, handlerRef, useCapture);
|
|
2388
|
-
}
|
|
2389
|
-
}
|
|
2390
|
-
catch (e) {
|
|
2391
|
-
}
|
|
2392
|
-
}
|
|
2393
|
-
}
|
|
2394
|
-
|
|
2395
2169
|
var DisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|
|
2396
2170
|
var SampleRate = "sampleRate";
|
|
2397
2171
|
var ProcessLegacy = "ProcessLegacy";
|
|
@@ -2418,7 +2192,6 @@ var _DYN_LENGTH = "length";
|
|
|
2418
2192
|
var _DYN_TO_LOWER_CASE = "toLowerCase";
|
|
2419
2193
|
var _DYN_INGESTIONENDPOINT = "ingestionendpoint";
|
|
2420
2194
|
var _DYN_TO_STRING = "toString";
|
|
2421
|
-
var _DYN_PUSH = "push";
|
|
2422
2195
|
var _DYN_REMOVE_ITEM = "removeItem";
|
|
2423
2196
|
var _DYN_NAME = "name";
|
|
2424
2197
|
var _DYN_MESSAGE = "message";
|
|
@@ -2910,7 +2683,7 @@ function utlGetSessionStorageKeys() {
|
|
|
2910
2683
|
var keys = [];
|
|
2911
2684
|
if (utlCanUseSessionStorage()) {
|
|
2912
2685
|
objForEachKey(getInst("sessionStorage"), function (key) {
|
|
2913
|
-
keys
|
|
2686
|
+
keys.push(key);
|
|
2914
2687
|
});
|
|
2915
2688
|
}
|
|
2916
2689
|
return keys;
|
|
@@ -3070,7 +2843,7 @@ var ThrottleMgr = /** @class */ (function () {
|
|
|
3070
2843
|
else {
|
|
3071
2844
|
if (!!saveUnsentMsg) {
|
|
3072
2845
|
var queue = _getQueueByKey(msgID);
|
|
3073
|
-
queue
|
|
2846
|
+
queue.push({
|
|
3074
2847
|
msgID: msgID,
|
|
3075
2848
|
message: message,
|
|
3076
2849
|
severity: severity
|
|
@@ -3449,7 +3222,7 @@ function _getOperaStack(errorMessage) {
|
|
|
3449
3222
|
entry += "@" + lines[lp + 1];
|
|
3450
3223
|
lp++;
|
|
3451
3224
|
}
|
|
3452
|
-
stack
|
|
3225
|
+
stack.push(entry);
|
|
3453
3226
|
}
|
|
3454
3227
|
return {
|
|
3455
3228
|
src: errorMessage,
|
|
@@ -3532,7 +3305,7 @@ function _parseStack(stack) {
|
|
|
3532
3305
|
if (_StackFrame.regex.test(theFrame)) {
|
|
3533
3306
|
var parsedFrame = new _StackFrame(theFrame, level_1++);
|
|
3534
3307
|
totalSizeInBytes_1 += parsedFrame[_DYN_SIZE_IN_BYTES ];
|
|
3535
|
-
parsedStack
|
|
3308
|
+
parsedStack.push(parsedFrame);
|
|
3536
3309
|
}
|
|
3537
3310
|
});
|
|
3538
3311
|
var exceptionParsedStackThreshold = 32 * 1024;
|
|
@@ -4220,122 +3993,6 @@ function createDomEvent(eventName) {
|
|
|
4220
3993
|
return event;
|
|
4221
3994
|
}
|
|
4222
3995
|
|
|
4223
|
-
function _disableEvents(target, evtNamespace) {
|
|
4224
|
-
eventOff(target, null, null, evtNamespace);
|
|
4225
|
-
}
|
|
4226
|
-
function createOfflineListener(parentEvtNamespace) {
|
|
4227
|
-
var _document = getDocument();
|
|
4228
|
-
var _navigator = getNavigator();
|
|
4229
|
-
var _isListening = false;
|
|
4230
|
-
var listenerList = [];
|
|
4231
|
-
var rState = 1 ;
|
|
4232
|
-
if (_navigator && !isNullOrUndefined(_navigator.onLine) && !_navigator.onLine) {
|
|
4233
|
-
rState = 2 ;
|
|
4234
|
-
}
|
|
4235
|
-
var uState = 0 ;
|
|
4236
|
-
var _currentState = calCurrentState();
|
|
4237
|
-
var _evtNamespace = mergeEvtNamespace(createUniqueNamespace("OfflineListener"), parentEvtNamespace);
|
|
4238
|
-
try {
|
|
4239
|
-
if (_enableEvents(getWindow())) {
|
|
4240
|
-
_isListening = true;
|
|
4241
|
-
}
|
|
4242
|
-
if (_document) {
|
|
4243
|
-
var target = _document.body || _document;
|
|
4244
|
-
if (target.ononline) {
|
|
4245
|
-
if (_enableEvents(target)) {
|
|
4246
|
-
_isListening = true;
|
|
4247
|
-
}
|
|
4248
|
-
}
|
|
4249
|
-
}
|
|
4250
|
-
}
|
|
4251
|
-
catch (e) {
|
|
4252
|
-
_isListening = false;
|
|
4253
|
-
}
|
|
4254
|
-
function _enableEvents(target) {
|
|
4255
|
-
var enabled = false;
|
|
4256
|
-
if (target) {
|
|
4257
|
-
enabled = eventOn(target, "online", _setOnline, _evtNamespace);
|
|
4258
|
-
if (enabled) {
|
|
4259
|
-
eventOn(target, "offline", _setOffline, _evtNamespace);
|
|
4260
|
-
}
|
|
4261
|
-
}
|
|
4262
|
-
return enabled;
|
|
4263
|
-
}
|
|
4264
|
-
function _isOnline() {
|
|
4265
|
-
return _currentState;
|
|
4266
|
-
}
|
|
4267
|
-
function calCurrentState() {
|
|
4268
|
-
if (uState === 2 || rState === 2 ) {
|
|
4269
|
-
return false;
|
|
4270
|
-
}
|
|
4271
|
-
return true;
|
|
4272
|
-
}
|
|
4273
|
-
function listnerNoticeCheck() {
|
|
4274
|
-
var newState = calCurrentState();
|
|
4275
|
-
if (_currentState !== newState) {
|
|
4276
|
-
_currentState = newState;
|
|
4277
|
-
arrForEach(listenerList, function (callback) {
|
|
4278
|
-
var offlineState = {
|
|
4279
|
-
isOnline: _currentState,
|
|
4280
|
-
rState: rState,
|
|
4281
|
-
uState: uState
|
|
4282
|
-
};
|
|
4283
|
-
try {
|
|
4284
|
-
callback(offlineState);
|
|
4285
|
-
}
|
|
4286
|
-
catch (e) {
|
|
4287
|
-
}
|
|
4288
|
-
});
|
|
4289
|
-
}
|
|
4290
|
-
}
|
|
4291
|
-
function setOnlineState(newState) {
|
|
4292
|
-
uState = newState;
|
|
4293
|
-
listnerNoticeCheck();
|
|
4294
|
-
}
|
|
4295
|
-
function _setOnline() {
|
|
4296
|
-
rState = 1 ;
|
|
4297
|
-
listnerNoticeCheck();
|
|
4298
|
-
}
|
|
4299
|
-
function _setOffline() {
|
|
4300
|
-
rState = 2 ;
|
|
4301
|
-
listnerNoticeCheck();
|
|
4302
|
-
}
|
|
4303
|
-
function _unload() {
|
|
4304
|
-
var win = getWindow();
|
|
4305
|
-
if (win && _isListening) {
|
|
4306
|
-
_disableEvents(win, _evtNamespace);
|
|
4307
|
-
if (_document) {
|
|
4308
|
-
var target = _document.body || _document;
|
|
4309
|
-
if (!isUndefined(target.ononline)) {
|
|
4310
|
-
_disableEvents(target, _evtNamespace);
|
|
4311
|
-
}
|
|
4312
|
-
}
|
|
4313
|
-
_isListening = false;
|
|
4314
|
-
}
|
|
4315
|
-
}
|
|
4316
|
-
function addListener(callback) {
|
|
4317
|
-
listenerList[_DYN_PUSH ](callback);
|
|
4318
|
-
return {
|
|
4319
|
-
rm: function () {
|
|
4320
|
-
var index = listenerList.indexOf(callback);
|
|
4321
|
-
if (index > -1) {
|
|
4322
|
-
return listenerList.splice(index, 1);
|
|
4323
|
-
}
|
|
4324
|
-
else {
|
|
4325
|
-
return;
|
|
4326
|
-
}
|
|
4327
|
-
}
|
|
4328
|
-
};
|
|
4329
|
-
}
|
|
4330
|
-
return {
|
|
4331
|
-
isOnline: _isOnline,
|
|
4332
|
-
isListening: function () { return _isListening; },
|
|
4333
|
-
unload: _unload,
|
|
4334
|
-
addListener: addListener,
|
|
4335
|
-
setOnlineState: setOnlineState
|
|
4336
|
-
};
|
|
4337
|
-
}
|
|
4338
|
-
|
|
4339
3996
|
var PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
|
|
4340
3997
|
var BreezeChannelIdentifier = "AppInsightsChannelPlugin";
|
|
4341
3998
|
var AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
|
|
@@ -4375,7 +4032,6 @@ exports.correlationIdGetPrefix = correlationIdGetPrefix;
|
|
|
4375
4032
|
exports.correlationIdSetPrefix = correlationIdSetPrefix;
|
|
4376
4033
|
exports.createDistributedTraceContextFromTrace = createDistributedTraceContextFromTrace;
|
|
4377
4034
|
exports.createDomEvent = createDomEvent;
|
|
4378
|
-
exports.createOfflineListener = createOfflineListener;
|
|
4379
4035
|
exports.createTelemetryItem = createTelemetryItem;
|
|
4380
4036
|
exports.createTraceParent = createTraceParent;
|
|
4381
4037
|
exports.dataSanitizeException = dataSanitizeException;
|