@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
|
(function (global, factory) {
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
var _DYN_WATCH = "watch";
|
|
690
690
|
var _DYN_LOGGER = "logger";
|
|
691
691
|
var _DYN_APPLY = "apply";
|
|
692
|
-
var _DYN_PUSH
|
|
692
|
+
var _DYN_PUSH = "push";
|
|
693
693
|
var _DYN_SPLICE = "splice";
|
|
694
694
|
var _DYN_HDLR = "hdlr";
|
|
695
695
|
var _DYN_CANCEL = "cancel";
|
|
@@ -702,11 +702,8 @@
|
|
|
702
702
|
var _DYN_DIAG_LOG = "diagLog";
|
|
703
703
|
var _DYN_USER_AGENT = "userAgent";
|
|
704
704
|
var _DYN_SPLIT$1 = "split";
|
|
705
|
-
var _DYN_NODE_TYPE = "nodeType";
|
|
706
705
|
var _DYN_REPLACE = "replace";
|
|
707
706
|
var _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
|
|
708
|
-
var _DYN_TYPE = "type";
|
|
709
|
-
var _DYN_HANDLER = "handler";
|
|
710
707
|
var _DYN_TRACE_ID = "traceId";
|
|
711
708
|
var _DYN_SPAN_ID = "spanId";
|
|
712
709
|
var _DYN_TRACE_FLAGS = "traceFlags";
|
|
@@ -1223,62 +1220,13 @@
|
|
|
1223
1220
|
return result;
|
|
1224
1221
|
}
|
|
1225
1222
|
|
|
1226
|
-
var version = '3.0.6
|
|
1223
|
+
var version = '3.0.6';
|
|
1227
1224
|
var instanceName = "." + newId(6);
|
|
1228
1225
|
var _dataUid = 0;
|
|
1229
|
-
function _canAcceptData(target) {
|
|
1230
|
-
return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
|
|
1231
|
-
}
|
|
1232
|
-
function _getCache(data, target) {
|
|
1233
|
-
var theCache = target[data.id];
|
|
1234
|
-
if (!theCache) {
|
|
1235
|
-
theCache = {};
|
|
1236
|
-
try {
|
|
1237
|
-
if (_canAcceptData(target)) {
|
|
1238
|
-
objDefine(target, data.id, {
|
|
1239
|
-
e: false,
|
|
1240
|
-
v: theCache
|
|
1241
|
-
});
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
catch (e) {
|
|
1245
|
-
}
|
|
1246
|
-
}
|
|
1247
|
-
return theCache;
|
|
1248
|
-
}
|
|
1249
1226
|
function createUniqueNamespace(name, includeVersion) {
|
|
1250
1227
|
if (includeVersion === void 0) { includeVersion = false; }
|
|
1251
1228
|
return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : STR_EMPTY) + instanceName);
|
|
1252
1229
|
}
|
|
1253
|
-
function createElmNodeData(name) {
|
|
1254
|
-
var data = {
|
|
1255
|
-
id: createUniqueNamespace("_aiData-" + (name || STR_EMPTY) + "." + version),
|
|
1256
|
-
accept: function (target) {
|
|
1257
|
-
return _canAcceptData(target);
|
|
1258
|
-
},
|
|
1259
|
-
get: function (target, name, defValue, addDefault) {
|
|
1260
|
-
var theCache = target[data.id];
|
|
1261
|
-
if (!theCache) {
|
|
1262
|
-
if (addDefault) {
|
|
1263
|
-
theCache = _getCache(data, target);
|
|
1264
|
-
theCache[normalizeJsName(name)] = defValue;
|
|
1265
|
-
}
|
|
1266
|
-
return defValue;
|
|
1267
|
-
}
|
|
1268
|
-
return theCache[normalizeJsName(name)];
|
|
1269
|
-
},
|
|
1270
|
-
kill: function (target, name) {
|
|
1271
|
-
if (target && target[name]) {
|
|
1272
|
-
try {
|
|
1273
|
-
delete target[name];
|
|
1274
|
-
}
|
|
1275
|
-
catch (e) {
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
};
|
|
1280
|
-
return data;
|
|
1281
|
-
}
|
|
1282
1230
|
|
|
1283
1231
|
function _isConfigDefaults(value) {
|
|
1284
1232
|
return (value && isObject(value) && (value.isVal || value.fb || objHasOwn(value, "v") || objHasOwn(value, "mrg") || objHasOwn(value, "ref") || value.set));
|
|
@@ -1501,7 +1449,7 @@
|
|
|
1501
1449
|
trk: function (handler) {
|
|
1502
1450
|
if (handler && handler.fn) {
|
|
1503
1451
|
if (arrIndexOf(detail.h, handler) === -1) {
|
|
1504
|
-
detail.h[_DYN_PUSH
|
|
1452
|
+
detail.h[_DYN_PUSH ](handler);
|
|
1505
1453
|
}
|
|
1506
1454
|
state.trk(handler, detail);
|
|
1507
1455
|
}
|
|
@@ -1713,7 +1661,7 @@
|
|
|
1713
1661
|
_useHandler(handler, handler.fn);
|
|
1714
1662
|
}
|
|
1715
1663
|
catch (e) {
|
|
1716
|
-
watcherFailures_1[_DYN_PUSH
|
|
1664
|
+
watcherFailures_1[_DYN_PUSH ](e);
|
|
1717
1665
|
}
|
|
1718
1666
|
}
|
|
1719
1667
|
}
|
|
@@ -1723,7 +1671,7 @@
|
|
|
1723
1671
|
_notifyWatchers();
|
|
1724
1672
|
}
|
|
1725
1673
|
catch (e) {
|
|
1726
|
-
watcherFailures_1[_DYN_PUSH
|
|
1674
|
+
watcherFailures_1[_DYN_PUSH ](e);
|
|
1727
1675
|
}
|
|
1728
1676
|
}
|
|
1729
1677
|
if (watcherFailures_1[_DYN_LENGTH$1 ] > 0) {
|
|
@@ -1745,7 +1693,7 @@
|
|
|
1745
1693
|
for (var idx = 0; idx < detail.h[_DYN_LENGTH$1 ]; idx++) {
|
|
1746
1694
|
var handler = detail.h[idx];
|
|
1747
1695
|
if (handler && arrIndexOf(_waitingHandlers, handler) === -1) {
|
|
1748
|
-
_waitingHandlers[_DYN_PUSH
|
|
1696
|
+
_waitingHandlers[_DYN_PUSH ](handler);
|
|
1749
1697
|
}
|
|
1750
1698
|
}
|
|
1751
1699
|
}
|
|
@@ -1754,7 +1702,7 @@
|
|
|
1754
1702
|
if (handler) {
|
|
1755
1703
|
var details = handler[dynamicPropertyDetail] = handler[dynamicPropertyDetail] || [];
|
|
1756
1704
|
if (arrIndexOf(details, detail) === -1) {
|
|
1757
|
-
details[_DYN_PUSH
|
|
1705
|
+
details[_DYN_PUSH ](detail);
|
|
1758
1706
|
}
|
|
1759
1707
|
}
|
|
1760
1708
|
}
|
|
@@ -2042,14 +1990,14 @@
|
|
|
2042
1990
|
}
|
|
2043
1991
|
if (logMessage) {
|
|
2044
1992
|
if (severity <= _loggingLevelTelemetry) {
|
|
2045
|
-
_self.queue[_DYN_PUSH
|
|
1993
|
+
_self.queue[_DYN_PUSH ](message);
|
|
2046
1994
|
_messageCount++;
|
|
2047
1995
|
_debugExtMsg((severity === 1 ? "error" : "warn"), message);
|
|
2048
1996
|
}
|
|
2049
1997
|
if (_messageCount === _maxInternalMessageLimit) {
|
|
2050
1998
|
var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
|
|
2051
1999
|
var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
|
|
2052
|
-
_self.queue[_DYN_PUSH
|
|
2000
|
+
_self.queue[_DYN_PUSH ](throttleMessage);
|
|
2053
2001
|
if (severity === 1 ) {
|
|
2054
2002
|
_self.errorToConsole(throttleLimitMessage);
|
|
2055
2003
|
}
|
|
@@ -2221,180 +2169,6 @@
|
|
|
2221
2169
|
return traceParent;
|
|
2222
2170
|
}
|
|
2223
2171
|
|
|
2224
|
-
var strOnPrefix = "on";
|
|
2225
|
-
var strAttachEvent = "attachEvent";
|
|
2226
|
-
var strAddEventHelper = "addEventListener";
|
|
2227
|
-
var strDetachEvent = "detachEvent";
|
|
2228
|
-
var strRemoveEventListener = "removeEventListener";
|
|
2229
|
-
var strEvents = "events";
|
|
2230
|
-
createUniqueNamespace("aiEvtPageHide");
|
|
2231
|
-
createUniqueNamespace("aiEvtPageShow");
|
|
2232
|
-
var rRemoveEmptyNs = /\.[\.]+/g;
|
|
2233
|
-
var rRemoveTrailingEmptyNs = /[\.]+$/;
|
|
2234
|
-
var _guid = 1;
|
|
2235
|
-
var elmNodeData = createElmNodeData("events");
|
|
2236
|
-
var eventNamespace = /^([^.]*)(?:\.(.+)|)/;
|
|
2237
|
-
function _normalizeNamespace(name) {
|
|
2238
|
-
if (name && name[_DYN_REPLACE ]) {
|
|
2239
|
-
return name[_DYN_REPLACE ](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g, STR_EMPTY);
|
|
2240
|
-
}
|
|
2241
|
-
return name;
|
|
2242
|
-
}
|
|
2243
|
-
function _getEvtNamespace(eventName, evtNamespace) {
|
|
2244
|
-
var _a;
|
|
2245
|
-
if (evtNamespace) {
|
|
2246
|
-
var theNamespace_1 = STR_EMPTY;
|
|
2247
|
-
if (isArray(evtNamespace)) {
|
|
2248
|
-
theNamespace_1 = STR_EMPTY;
|
|
2249
|
-
arrForEach(evtNamespace, function (name) {
|
|
2250
|
-
name = _normalizeNamespace(name);
|
|
2251
|
-
if (name) {
|
|
2252
|
-
if (name[0] !== ".") {
|
|
2253
|
-
name = "." + name;
|
|
2254
|
-
}
|
|
2255
|
-
theNamespace_1 += name;
|
|
2256
|
-
}
|
|
2257
|
-
});
|
|
2258
|
-
}
|
|
2259
|
-
else {
|
|
2260
|
-
theNamespace_1 = _normalizeNamespace(evtNamespace);
|
|
2261
|
-
}
|
|
2262
|
-
if (theNamespace_1) {
|
|
2263
|
-
if (theNamespace_1[0] !== ".") {
|
|
2264
|
-
theNamespace_1 = "." + theNamespace_1;
|
|
2265
|
-
}
|
|
2266
|
-
eventName = (eventName || STR_EMPTY) + theNamespace_1;
|
|
2267
|
-
}
|
|
2268
|
-
}
|
|
2269
|
-
var parsedEvent = (eventNamespace.exec(eventName || STR_EMPTY) || []);
|
|
2270
|
-
return _a = {},
|
|
2271
|
-
_a[_DYN_TYPE ] = parsedEvent[1],
|
|
2272
|
-
_a.ns = ((parsedEvent[2] || STR_EMPTY).replace(rRemoveEmptyNs, ".").replace(rRemoveTrailingEmptyNs, STR_EMPTY)[_DYN_SPLIT$1 ](".").sort()).join("."),
|
|
2273
|
-
_a;
|
|
2274
|
-
}
|
|
2275
|
-
function _getRegisteredEvents(target, evtName, addDefault) {
|
|
2276
|
-
if (addDefault === void 0) { addDefault = true; }
|
|
2277
|
-
var aiEvts = elmNodeData.get(target, strEvents, {}, addDefault);
|
|
2278
|
-
var registeredEvents = aiEvts[evtName];
|
|
2279
|
-
if (!registeredEvents) {
|
|
2280
|
-
registeredEvents = aiEvts[evtName] = [];
|
|
2281
|
-
}
|
|
2282
|
-
return registeredEvents;
|
|
2283
|
-
}
|
|
2284
|
-
function _doDetach(obj, evtName, handlerRef, useCapture) {
|
|
2285
|
-
if (obj && evtName && evtName[_DYN_TYPE ]) {
|
|
2286
|
-
if (obj[strRemoveEventListener]) {
|
|
2287
|
-
obj[strRemoveEventListener](evtName[_DYN_TYPE ], handlerRef, useCapture);
|
|
2288
|
-
}
|
|
2289
|
-
else if (obj[strDetachEvent]) {
|
|
2290
|
-
obj[strDetachEvent](strOnPrefix + evtName[_DYN_TYPE ], handlerRef);
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
}
|
|
2294
|
-
function _doAttach(obj, evtName, handlerRef, useCapture) {
|
|
2295
|
-
var result = false;
|
|
2296
|
-
if (obj && evtName && evtName[_DYN_TYPE ] && handlerRef) {
|
|
2297
|
-
if (obj[strAddEventHelper]) {
|
|
2298
|
-
obj[strAddEventHelper](evtName[_DYN_TYPE ], handlerRef, useCapture);
|
|
2299
|
-
result = true;
|
|
2300
|
-
}
|
|
2301
|
-
else if (obj[strAttachEvent]) {
|
|
2302
|
-
obj[strAttachEvent](strOnPrefix + evtName[_DYN_TYPE ], handlerRef);
|
|
2303
|
-
result = true;
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
|
-
return result;
|
|
2307
|
-
}
|
|
2308
|
-
function _doUnregister(target, events, evtName, unRegFn) {
|
|
2309
|
-
var idx = events[_DYN_LENGTH$1 ];
|
|
2310
|
-
while (idx--) {
|
|
2311
|
-
var theEvent = events[idx];
|
|
2312
|
-
if (theEvent) {
|
|
2313
|
-
if (!evtName.ns || evtName.ns === theEvent.evtName.ns) {
|
|
2314
|
-
if (!unRegFn || unRegFn(theEvent)) {
|
|
2315
|
-
_doDetach(target, theEvent.evtName, theEvent[_DYN_HANDLER ], theEvent.capture);
|
|
2316
|
-
events[_DYN_SPLICE ](idx, 1);
|
|
2317
|
-
}
|
|
2318
|
-
}
|
|
2319
|
-
}
|
|
2320
|
-
}
|
|
2321
|
-
}
|
|
2322
|
-
function _unregisterEvents(target, evtName, unRegFn) {
|
|
2323
|
-
if (evtName[_DYN_TYPE ]) {
|
|
2324
|
-
_doUnregister(target, _getRegisteredEvents(target, evtName[_DYN_TYPE ]), evtName, unRegFn);
|
|
2325
|
-
}
|
|
2326
|
-
else {
|
|
2327
|
-
var eventCache = elmNodeData.get(target, strEvents, {});
|
|
2328
|
-
objForEachKey(eventCache, function (evtType, events) {
|
|
2329
|
-
_doUnregister(target, events, evtName, unRegFn);
|
|
2330
|
-
});
|
|
2331
|
-
if (objKeys(eventCache)[_DYN_LENGTH$1 ] === 0) {
|
|
2332
|
-
elmNodeData.kill(target, strEvents);
|
|
2333
|
-
}
|
|
2334
|
-
}
|
|
2335
|
-
}
|
|
2336
|
-
function mergeEvtNamespace(theNamespace, namespaces) {
|
|
2337
|
-
var newNamespaces;
|
|
2338
|
-
if (namespaces) {
|
|
2339
|
-
if (isArray(namespaces)) {
|
|
2340
|
-
newNamespaces = [theNamespace].concat(namespaces);
|
|
2341
|
-
}
|
|
2342
|
-
else {
|
|
2343
|
-
newNamespaces = [theNamespace, namespaces];
|
|
2344
|
-
}
|
|
2345
|
-
newNamespaces = (_getEvtNamespace("xx", newNamespaces).ns)[_DYN_SPLIT$1 ](".");
|
|
2346
|
-
}
|
|
2347
|
-
else {
|
|
2348
|
-
newNamespaces = theNamespace;
|
|
2349
|
-
}
|
|
2350
|
-
return newNamespaces;
|
|
2351
|
-
}
|
|
2352
|
-
function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {
|
|
2353
|
-
var _a;
|
|
2354
|
-
if (useCapture === void 0) { useCapture = false; }
|
|
2355
|
-
var result = false;
|
|
2356
|
-
if (target) {
|
|
2357
|
-
try {
|
|
2358
|
-
var evtName = _getEvtNamespace(eventName, evtNamespace);
|
|
2359
|
-
result = _doAttach(target, evtName, handlerRef, useCapture);
|
|
2360
|
-
if (result && elmNodeData.accept(target)) {
|
|
2361
|
-
var registeredEvent = (_a = {
|
|
2362
|
-
guid: _guid++,
|
|
2363
|
-
evtName: evtName
|
|
2364
|
-
},
|
|
2365
|
-
_a[_DYN_HANDLER ] = handlerRef,
|
|
2366
|
-
_a.capture = useCapture,
|
|
2367
|
-
_a);
|
|
2368
|
-
_getRegisteredEvents(target, evtName.type)[_DYN_PUSH$1 ](registeredEvent);
|
|
2369
|
-
}
|
|
2370
|
-
}
|
|
2371
|
-
catch (e) {
|
|
2372
|
-
}
|
|
2373
|
-
}
|
|
2374
|
-
return result;
|
|
2375
|
-
}
|
|
2376
|
-
function eventOff(target, eventName, handlerRef, evtNamespace, useCapture) {
|
|
2377
|
-
if (useCapture === void 0) { useCapture = false; }
|
|
2378
|
-
if (target) {
|
|
2379
|
-
try {
|
|
2380
|
-
var evtName_1 = _getEvtNamespace(eventName, evtNamespace);
|
|
2381
|
-
var found_1 = false;
|
|
2382
|
-
_unregisterEvents(target, evtName_1, function (regEvent) {
|
|
2383
|
-
if ((evtName_1.ns && !handlerRef) || regEvent[_DYN_HANDLER ] === handlerRef) {
|
|
2384
|
-
found_1 = true;
|
|
2385
|
-
return true;
|
|
2386
|
-
}
|
|
2387
|
-
return false;
|
|
2388
|
-
});
|
|
2389
|
-
if (!found_1) {
|
|
2390
|
-
_doDetach(target, evtName_1, handlerRef, useCapture);
|
|
2391
|
-
}
|
|
2392
|
-
}
|
|
2393
|
-
catch (e) {
|
|
2394
|
-
}
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
|
-
|
|
2398
2172
|
var DisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|
|
2399
2173
|
var SampleRate = "sampleRate";
|
|
2400
2174
|
var ProcessLegacy = "ProcessLegacy";
|
|
@@ -2421,7 +2195,6 @@
|
|
|
2421
2195
|
var _DYN_TO_LOWER_CASE = "toLowerCase";
|
|
2422
2196
|
var _DYN_INGESTIONENDPOINT = "ingestionendpoint";
|
|
2423
2197
|
var _DYN_TO_STRING = "toString";
|
|
2424
|
-
var _DYN_PUSH = "push";
|
|
2425
2198
|
var _DYN_REMOVE_ITEM = "removeItem";
|
|
2426
2199
|
var _DYN_NAME = "name";
|
|
2427
2200
|
var _DYN_MESSAGE = "message";
|
|
@@ -2913,7 +2686,7 @@
|
|
|
2913
2686
|
var keys = [];
|
|
2914
2687
|
if (utlCanUseSessionStorage()) {
|
|
2915
2688
|
objForEachKey(getInst("sessionStorage"), function (key) {
|
|
2916
|
-
keys
|
|
2689
|
+
keys.push(key);
|
|
2917
2690
|
});
|
|
2918
2691
|
}
|
|
2919
2692
|
return keys;
|
|
@@ -3073,7 +2846,7 @@
|
|
|
3073
2846
|
else {
|
|
3074
2847
|
if (!!saveUnsentMsg) {
|
|
3075
2848
|
var queue = _getQueueByKey(msgID);
|
|
3076
|
-
queue
|
|
2849
|
+
queue.push({
|
|
3077
2850
|
msgID: msgID,
|
|
3078
2851
|
message: message,
|
|
3079
2852
|
severity: severity
|
|
@@ -3452,7 +3225,7 @@
|
|
|
3452
3225
|
entry += "@" + lines[lp + 1];
|
|
3453
3226
|
lp++;
|
|
3454
3227
|
}
|
|
3455
|
-
stack
|
|
3228
|
+
stack.push(entry);
|
|
3456
3229
|
}
|
|
3457
3230
|
return {
|
|
3458
3231
|
src: errorMessage,
|
|
@@ -3535,7 +3308,7 @@
|
|
|
3535
3308
|
if (_StackFrame.regex.test(theFrame)) {
|
|
3536
3309
|
var parsedFrame = new _StackFrame(theFrame, level_1++);
|
|
3537
3310
|
totalSizeInBytes_1 += parsedFrame[_DYN_SIZE_IN_BYTES ];
|
|
3538
|
-
parsedStack
|
|
3311
|
+
parsedStack.push(parsedFrame);
|
|
3539
3312
|
}
|
|
3540
3313
|
});
|
|
3541
3314
|
var exceptionParsedStackThreshold = 32 * 1024;
|
|
@@ -4223,122 +3996,6 @@
|
|
|
4223
3996
|
return event;
|
|
4224
3997
|
}
|
|
4225
3998
|
|
|
4226
|
-
function _disableEvents(target, evtNamespace) {
|
|
4227
|
-
eventOff(target, null, null, evtNamespace);
|
|
4228
|
-
}
|
|
4229
|
-
function createOfflineListener(parentEvtNamespace) {
|
|
4230
|
-
var _document = getDocument();
|
|
4231
|
-
var _navigator = getNavigator();
|
|
4232
|
-
var _isListening = false;
|
|
4233
|
-
var listenerList = [];
|
|
4234
|
-
var rState = 1 ;
|
|
4235
|
-
if (_navigator && !isNullOrUndefined(_navigator.onLine) && !_navigator.onLine) {
|
|
4236
|
-
rState = 2 ;
|
|
4237
|
-
}
|
|
4238
|
-
var uState = 0 ;
|
|
4239
|
-
var _currentState = calCurrentState();
|
|
4240
|
-
var _evtNamespace = mergeEvtNamespace(createUniqueNamespace("OfflineListener"), parentEvtNamespace);
|
|
4241
|
-
try {
|
|
4242
|
-
if (_enableEvents(getWindow())) {
|
|
4243
|
-
_isListening = true;
|
|
4244
|
-
}
|
|
4245
|
-
if (_document) {
|
|
4246
|
-
var target = _document.body || _document;
|
|
4247
|
-
if (target.ononline) {
|
|
4248
|
-
if (_enableEvents(target)) {
|
|
4249
|
-
_isListening = true;
|
|
4250
|
-
}
|
|
4251
|
-
}
|
|
4252
|
-
}
|
|
4253
|
-
}
|
|
4254
|
-
catch (e) {
|
|
4255
|
-
_isListening = false;
|
|
4256
|
-
}
|
|
4257
|
-
function _enableEvents(target) {
|
|
4258
|
-
var enabled = false;
|
|
4259
|
-
if (target) {
|
|
4260
|
-
enabled = eventOn(target, "online", _setOnline, _evtNamespace);
|
|
4261
|
-
if (enabled) {
|
|
4262
|
-
eventOn(target, "offline", _setOffline, _evtNamespace);
|
|
4263
|
-
}
|
|
4264
|
-
}
|
|
4265
|
-
return enabled;
|
|
4266
|
-
}
|
|
4267
|
-
function _isOnline() {
|
|
4268
|
-
return _currentState;
|
|
4269
|
-
}
|
|
4270
|
-
function calCurrentState() {
|
|
4271
|
-
if (uState === 2 || rState === 2 ) {
|
|
4272
|
-
return false;
|
|
4273
|
-
}
|
|
4274
|
-
return true;
|
|
4275
|
-
}
|
|
4276
|
-
function listnerNoticeCheck() {
|
|
4277
|
-
var newState = calCurrentState();
|
|
4278
|
-
if (_currentState !== newState) {
|
|
4279
|
-
_currentState = newState;
|
|
4280
|
-
arrForEach(listenerList, function (callback) {
|
|
4281
|
-
var offlineState = {
|
|
4282
|
-
isOnline: _currentState,
|
|
4283
|
-
rState: rState,
|
|
4284
|
-
uState: uState
|
|
4285
|
-
};
|
|
4286
|
-
try {
|
|
4287
|
-
callback(offlineState);
|
|
4288
|
-
}
|
|
4289
|
-
catch (e) {
|
|
4290
|
-
}
|
|
4291
|
-
});
|
|
4292
|
-
}
|
|
4293
|
-
}
|
|
4294
|
-
function setOnlineState(newState) {
|
|
4295
|
-
uState = newState;
|
|
4296
|
-
listnerNoticeCheck();
|
|
4297
|
-
}
|
|
4298
|
-
function _setOnline() {
|
|
4299
|
-
rState = 1 ;
|
|
4300
|
-
listnerNoticeCheck();
|
|
4301
|
-
}
|
|
4302
|
-
function _setOffline() {
|
|
4303
|
-
rState = 2 ;
|
|
4304
|
-
listnerNoticeCheck();
|
|
4305
|
-
}
|
|
4306
|
-
function _unload() {
|
|
4307
|
-
var win = getWindow();
|
|
4308
|
-
if (win && _isListening) {
|
|
4309
|
-
_disableEvents(win, _evtNamespace);
|
|
4310
|
-
if (_document) {
|
|
4311
|
-
var target = _document.body || _document;
|
|
4312
|
-
if (!isUndefined(target.ononline)) {
|
|
4313
|
-
_disableEvents(target, _evtNamespace);
|
|
4314
|
-
}
|
|
4315
|
-
}
|
|
4316
|
-
_isListening = false;
|
|
4317
|
-
}
|
|
4318
|
-
}
|
|
4319
|
-
function addListener(callback) {
|
|
4320
|
-
listenerList[_DYN_PUSH ](callback);
|
|
4321
|
-
return {
|
|
4322
|
-
rm: function () {
|
|
4323
|
-
var index = listenerList.indexOf(callback);
|
|
4324
|
-
if (index > -1) {
|
|
4325
|
-
return listenerList.splice(index, 1);
|
|
4326
|
-
}
|
|
4327
|
-
else {
|
|
4328
|
-
return;
|
|
4329
|
-
}
|
|
4330
|
-
}
|
|
4331
|
-
};
|
|
4332
|
-
}
|
|
4333
|
-
return {
|
|
4334
|
-
isOnline: _isOnline,
|
|
4335
|
-
isListening: function () { return _isListening; },
|
|
4336
|
-
unload: _unload,
|
|
4337
|
-
addListener: addListener,
|
|
4338
|
-
setOnlineState: setOnlineState
|
|
4339
|
-
};
|
|
4340
|
-
}
|
|
4341
|
-
|
|
4342
3999
|
var PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
|
|
4343
4000
|
var BreezeChannelIdentifier = "AppInsightsChannelPlugin";
|
|
4344
4001
|
var AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
|
|
@@ -4378,7 +4035,6 @@
|
|
|
4378
4035
|
exports.correlationIdSetPrefix = correlationIdSetPrefix;
|
|
4379
4036
|
exports.createDistributedTraceContextFromTrace = createDistributedTraceContextFromTrace;
|
|
4380
4037
|
exports.createDomEvent = createDomEvent;
|
|
4381
|
-
exports.createOfflineListener = createOfflineListener;
|
|
4382
4038
|
exports.createTelemetryItem = createTelemetryItem;
|
|
4383
4039
|
exports.createTraceParent = createTraceParent;
|
|
4384
4040
|
exports.dataSanitizeException = dataSanitizeException;
|