@microsoft/applicationinsights-core-js 3.0.8 → 3.0.9

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.
Files changed (97) hide show
  1. package/browser/es5/applicationinsights-core-js.cjs.js +179 -162
  2. package/browser/es5/applicationinsights-core-js.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-core-js.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-core-js.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-core-js.gbl.js +181 -164
  6. package/browser/es5/applicationinsights-core-js.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-core-js.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-core-js.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-core-js.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-core-js.js +181 -164
  11. package/browser/es5/applicationinsights-core-js.js.map +1 -1
  12. package/browser/es5/applicationinsights-core-js.min.js +2 -2
  13. package/browser/es5/applicationinsights-core-js.min.js.map +1 -1
  14. package/dist/es5/applicationinsights-core-js.js +179 -162
  15. package/dist/es5/applicationinsights-core-js.js.map +1 -1
  16. package/dist/es5/applicationinsights-core-js.min.js +2 -2
  17. package/dist/es5/applicationinsights-core-js.min.js.map +1 -1
  18. package/dist-es5/Config/ConfigDefaultHelpers.js +1 -1
  19. package/dist-es5/Config/ConfigDefaults.js +1 -1
  20. package/dist-es5/Config/DynamicConfig.js +2 -1
  21. package/dist-es5/Config/DynamicConfig.js.map +1 -1
  22. package/dist-es5/Config/DynamicProperty.js +1 -1
  23. package/dist-es5/Config/DynamicState.js +1 -1
  24. package/dist-es5/Config/DynamicSupport.js +1 -1
  25. package/dist-es5/Config/IConfigDefaults.js +1 -1
  26. package/dist-es5/Config/IDynamicConfigHandler.js +1 -1
  27. package/dist-es5/Config/IDynamicPropertyHandler.js +1 -1
  28. package/dist-es5/Config/IDynamicWatcher.js +1 -1
  29. package/dist-es5/Config/_IDynamicConfigHandlerState.js +1 -1
  30. package/dist-es5/JavaScriptSDK/AggregationError.js +1 -1
  31. package/dist-es5/JavaScriptSDK/AppInsightsCore.js +59 -44
  32. package/dist-es5/JavaScriptSDK/AppInsightsCore.js.map +1 -1
  33. package/dist-es5/JavaScriptSDK/AsyncUtils.js +1 -1
  34. package/dist-es5/JavaScriptSDK/BaseTelemetryPlugin.js +3 -3
  35. package/dist-es5/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
  36. package/dist-es5/JavaScriptSDK/Constants.js +1 -1
  37. package/dist-es5/JavaScriptSDK/CookieMgr.js +1 -1
  38. package/dist-es5/JavaScriptSDK/CoreUtils.js +1 -1
  39. package/dist-es5/JavaScriptSDK/DataCacheHelper.js +2 -2
  40. package/dist-es5/JavaScriptSDK/DataCacheHelper.js.map +1 -1
  41. package/dist-es5/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  42. package/dist-es5/JavaScriptSDK/DiagnosticLogger.js +1 -1
  43. package/dist-es5/JavaScriptSDK/EnvUtils.js +1 -1
  44. package/dist-es5/JavaScriptSDK/EventHelpers.js +1 -1
  45. package/dist-es5/JavaScriptSDK/HelperFuncs.js +1 -1
  46. package/dist-es5/JavaScriptSDK/InstrumentHooks.js +1 -1
  47. package/dist-es5/JavaScriptSDK/InternalConstants.js +1 -1
  48. package/dist-es5/JavaScriptSDK/NotificationManager.js +38 -18
  49. package/dist-es5/JavaScriptSDK/NotificationManager.js.map +1 -1
  50. package/dist-es5/JavaScriptSDK/PerfManager.js +1 -1
  51. package/dist-es5/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
  52. package/dist-es5/JavaScriptSDK/RandomHelper.js +1 -1
  53. package/dist-es5/JavaScriptSDK/TelemetryHelpers.js +1 -1
  54. package/dist-es5/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
  55. package/dist-es5/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
  56. package/dist-es5/JavaScriptSDK/UnloadHookContainer.js +20 -1
  57. package/dist-es5/JavaScriptSDK/UnloadHookContainer.js.map +1 -1
  58. package/dist-es5/JavaScriptSDK/W3cTraceParent.js +1 -1
  59. package/dist-es5/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
  60. package/dist-es5/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  61. package/dist-es5/JavaScriptSDK.Enums/FeatureOptInEnums.js +1 -1
  62. package/dist-es5/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  63. package/dist-es5/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  64. package/dist-es5/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
  65. package/dist-es5/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
  66. package/dist-es5/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  67. package/dist-es5/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  68. package/dist-es5/JavaScriptSDK.Interfaces/IChannelControlsHost.js +1 -1
  69. package/dist-es5/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  70. package/dist-es5/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  71. package/dist-es5/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  72. package/dist-es5/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  73. package/dist-es5/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
  74. package/dist-es5/JavaScriptSDK.Interfaces/IFeatureOptIn.js +1 -1
  75. package/dist-es5/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  76. package/dist-es5/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  77. package/dist-es5/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  78. package/dist-es5/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  79. package/dist-es5/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  80. package/dist-es5/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  81. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
  82. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  83. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  84. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  85. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
  86. package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
  87. package/dist-es5/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
  88. package/dist-es5/JavaScriptSDK.Interfaces/IUnloadHook.js +1 -1
  89. package/dist-es5/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
  90. package/dist-es5/JavaScriptSDK.Interfaces/IXHROverride.js +1 -1
  91. package/dist-es5/__DynamicConstants.js +9 -9
  92. package/dist-es5/__DynamicConstants.js.map +1 -1
  93. package/dist-es5/applicationinsights-core-js.js +2 -2
  94. package/dist-es5/applicationinsights-core-js.js.map +1 -1
  95. package/package.json +78 -75
  96. package/types/applicationinsights-core-js.d.ts +60 -2
  97. package/types/applicationinsights-core-js.namespaced.d.ts +1287 -104
@@ -1,31 +1,43 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
7
  import dynamicProto from "@microsoft/dynamicproto-js";
8
8
  import { createAllPromise, createPromise, doAwaitResponse } from "@nevware21/ts-async";
9
- import { arrForEach, arrIndexOf, objDefine, scheduleTimeout } from "@nevware21/ts-utils";
9
+ import { arrForEach, arrIndexOf, objDefine, safe, scheduleTimeout } from "@nevware21/ts-utils";
10
10
  import { createDynamicConfig } from "../Config/DynamicConfig";
11
- import { _DYN_ADD_NOTIFICATION_LIS1, _DYN_IS_ASYNC, _DYN_IS_CHILD_EVT, _DYN_PUSH, _DYN_REMOVE_NOTIFICATION_2, _DYN_SPLICE, _DYN_UNLOAD, _DYN_WATCH } from "../__DynamicConstants";
11
+ import { _DYN_ADD_NOTIFICATION_LIS1, _DYN_CANCEL, _DYN_IS_ASYNC, _DYN_IS_CHILD_EVT, _DYN_PUSH, _DYN_REMOVE_NOTIFICATION_0, _DYN_SPLICE, _DYN_UNLOAD, _DYN_WATCH } from "../__DynamicConstants";
12
12
  import { STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_EVENTS_SENT, STR_PERF_EVENT } from "./InternalConstants";
13
13
  var defaultValues = {
14
14
  perfEvtsSendAll: false
15
15
  };
16
- function _runListeners(listeners, name, isAsync, callback) {
16
+ function _runScheduledListeners(asyncNotifications) {
17
+ asyncNotifications.h = null;
18
+ var callbacks = asyncNotifications.cb;
19
+ asyncNotifications.cb = [];
20
+ arrForEach(callbacks, function (cb) {
21
+ // Run the listener in a try-catch to ensure that a single listener failing doesn't prevent the others from running
22
+ safe(cb.fn, [cb.arg]);
23
+ });
24
+ }
25
+ // This function is used to combine the logic of running the listeners and handling the async notifications so that they don't
26
+ // create multiple timers if there are multiple async listeners.
27
+ function _runListeners(listeners, name, asyncNotifications, callback) {
17
28
  arrForEach(listeners, function (listener) {
18
29
  if (listener && listener[name]) {
19
- if (isAsync) {
20
- scheduleTimeout(function () { return callback(listener); }, 0);
30
+ if (asyncNotifications) {
31
+ // Schedule the callback to be called after the current call stack has cleared.
32
+ asyncNotifications.cb[_DYN_PUSH /* @min:%2epush */]({
33
+ fn: callback,
34
+ arg: listener
35
+ });
36
+ asyncNotifications.h = asyncNotifications.h || scheduleTimeout(_runScheduledListeners, 0, asyncNotifications);
21
37
  }
22
38
  else {
23
- try {
24
- callback(listener);
25
- }
26
- catch (e) {
27
- // Catch errors to ensure we don't block sending the requests
28
- }
39
+ // Run the listener in a try-catch to ensure that a single listener failing doesn't prevent the others from running
40
+ safe(callback, [listener]);
29
41
  }
30
42
  }
31
43
  });
@@ -39,6 +51,10 @@ var NotificationManager = /** @class */ (function () {
39
51
  var perfEvtsSendAll;
40
52
  var unloadHandler;
41
53
  var _listeners = [];
54
+ var _asyncNotifications = {
55
+ h: null,
56
+ cb: []
57
+ };
42
58
  var cfgHandler = createDynamicConfig(config, defaultValues);
43
59
  unloadHandler = cfgHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {
44
60
  perfEvtsSendAll = !!details.cfg.perfEvtsSendAll;
@@ -54,7 +70,7 @@ var NotificationManager = /** @class */ (function () {
54
70
  * Removes all instances of the listener.
55
71
  * @param listener - AWTNotificationListener to remove.
56
72
  */
57
- _self[_DYN_REMOVE_NOTIFICATION_2 /* @min:%2eremoveNotificationListener */] = function (listener) {
73
+ _self[_DYN_REMOVE_NOTIFICATION_0 /* @min:%2eremoveNotificationListener */] = function (listener) {
58
74
  var index = arrIndexOf(_listeners, listener);
59
75
  while (index > -1) {
60
76
  _listeners[_DYN_SPLICE /* @min:%2esplice */](index, 1);
@@ -66,7 +82,7 @@ var NotificationManager = /** @class */ (function () {
66
82
  * @param events - The array of events that have been sent.
67
83
  */
68
84
  _self[STR_EVENTS_SENT /* @min:%2eeventsSent */] = function (events) {
69
- _runListeners(_listeners, STR_EVENTS_SENT, true, function (listener) {
85
+ _runListeners(_listeners, STR_EVENTS_SENT, _asyncNotifications, function (listener) {
70
86
  listener[STR_EVENTS_SENT /* @min:%2eeventsSent */](events);
71
87
  });
72
88
  };
@@ -77,7 +93,7 @@ var NotificationManager = /** @class */ (function () {
77
93
  * constant should be used to check the different values.
78
94
  */
79
95
  _self[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */] = function (events, reason) {
80
- _runListeners(_listeners, STR_EVENTS_DISCARDED, true, function (listener) {
96
+ _runListeners(_listeners, STR_EVENTS_DISCARDED, _asyncNotifications, function (listener) {
81
97
  listener[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */](events, reason);
82
98
  });
83
99
  };
@@ -87,7 +103,7 @@ var NotificationManager = /** @class */ (function () {
87
103
  * @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.
88
104
  */
89
105
  _self[STR_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */] = function (sendReason, isAsync) {
90
- _runListeners(_listeners, STR_EVENTS_SEND_REQUEST, isAsync, function (listener) {
106
+ _runListeners(_listeners, STR_EVENTS_SEND_REQUEST, isAsync ? _asyncNotifications : null, function (listener) {
91
107
  listener[STR_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */](sendReason, isAsync);
92
108
  });
93
109
  };
@@ -95,7 +111,7 @@ var NotificationManager = /** @class */ (function () {
95
111
  if (perfEvent) {
96
112
  // Send all events or only parent events
97
113
  if (perfEvtsSendAll || !perfEvent[_DYN_IS_CHILD_EVT /* @min:%2eisChildEvt */]()) {
98
- _runListeners(_listeners, STR_PERF_EVENT, false, function (listener) {
114
+ _runListeners(_listeners, STR_PERF_EVENT, null, function (listener) {
99
115
  if (perfEvent[_DYN_IS_ASYNC /* @min:%2eisAsync */]) {
100
116
  scheduleTimeout(function () { return listener[STR_PERF_EVENT /* @min:%2eperfEvent */](perfEvent); }, 0);
101
117
  }
@@ -111,9 +127,13 @@ var NotificationManager = /** @class */ (function () {
111
127
  unloadHandler && unloadHandler.rm();
112
128
  unloadHandler = null;
113
129
  _listeners = [];
130
+ // Clear any async listener
131
+ _asyncNotifications.h && _asyncNotifications.h[_DYN_CANCEL /* @min:%2ecancel */]();
132
+ _asyncNotifications.h = null;
133
+ _asyncNotifications.cb = [];
114
134
  };
115
135
  var waiting;
116
- _runListeners(_listeners, "unload", false, function (listener) {
136
+ _runListeners(_listeners, "unload", null, function (listener) {
117
137
  var asyncUnload = listener[_DYN_UNLOAD /* @min:%2eunload */](isAsync);
118
138
  if (asyncUnload) {
119
139
  if (!waiting) {
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationManager.js.map","sources":["NotificationManager.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { createAllPromise, createPromise, doAwaitResponse } from \"@nevware21/ts-async\";\r\nimport { arrForEach, arrIndexOf, objDefine, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { createDynamicConfig } from \"../Config/DynamicConfig\";\r\nimport { _DYN_ADD_NOTIFICATION_LIS1, _DYN_IS_ASYNC, _DYN_IS_CHILD_EVT, _DYN_PUSH, _DYN_REMOVE_NOTIFICATION_2, _DYN_SPLICE, _DYN_UNLOAD, _DYN_WATCH } from \"../__DynamicConstants\";\r\nimport { STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_EVENTS_SENT, STR_PERF_EVENT } from \"./InternalConstants\";\r\nvar defaultValues = {\r\n perfEvtsSendAll: false\r\n};\r\nfunction _runListeners(listeners, name, isAsync, callback) {\r\n arrForEach(listeners, function (listener) {\r\n if (listener && listener[name]) {\r\n if (isAsync) {\r\n scheduleTimeout(function () { return callback(listener); }, 0);\r\n }\r\n else {\r\n try {\r\n callback(listener);\r\n }\r\n catch (e) {\r\n // Catch errors to ensure we don't block sending the requests\r\n }\r\n }\r\n }\r\n });\r\n}\r\n/**\r\n * Class to manage sending notifications to all the listeners.\r\n */\r\nvar NotificationManager = /** @class */ (function () {\r\n function NotificationManager(config) {\r\n this.listeners = [];\r\n var perfEvtsSendAll;\r\n var unloadHandler;\r\n var _listeners = [];\r\n var cfgHandler = createDynamicConfig(config, defaultValues);\r\n unloadHandler = cfgHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\r\n perfEvtsSendAll = !!details.cfg.perfEvtsSendAll;\r\n });\r\n dynamicProto(NotificationManager, this, function (_self) {\r\n objDefine(_self, \"listeners\", {\r\n g: function () { return _listeners; }\r\n });\r\n _self[_DYN_ADD_NOTIFICATION_LIS1 /* @min:%2eaddNotificationListener */] = function (listener) {\r\n _listeners[_DYN_PUSH /* @min:%2epush */](listener);\r\n };\r\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - AWTNotificationListener to remove.\r\n */\r\n _self[_DYN_REMOVE_NOTIFICATION_2 /* @min:%2eremoveNotificationListener */] = function (listener) {\r\n var index = arrIndexOf(_listeners, listener);\r\n while (index > -1) {\r\n _listeners[_DYN_SPLICE /* @min:%2esplice */](index, 1);\r\n index = arrIndexOf(_listeners, listener);\r\n }\r\n };\r\n /**\r\n * Notification for events sent.\r\n * @param events - The array of events that have been sent.\r\n */\r\n _self[STR_EVENTS_SENT /* @min:%2eeventsSent */] = function (events) {\r\n _runListeners(_listeners, STR_EVENTS_SENT, true, function (listener) {\r\n listener[STR_EVENTS_SENT /* @min:%2eeventsSent */](events);\r\n });\r\n };\r\n /**\r\n * Notification for events being discarded.\r\n * @param events - The array of events that have been discarded by the SDK.\r\n * @param reason - The reason for which the SDK discarded the events. The EventsDiscardedReason\r\n * constant should be used to check the different values.\r\n */\r\n _self[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */] = function (events, reason) {\r\n _runListeners(_listeners, STR_EVENTS_DISCARDED, true, function (listener) {\r\n listener[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */](events, reason);\r\n });\r\n };\r\n /**\r\n * [Optional] A function called when the events have been requested to be sent to the sever.\r\n * @param sendReason - The reason why the event batch is being sent.\r\n * @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.\r\n */\r\n _self[STR_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */] = function (sendReason, isAsync) {\r\n _runListeners(_listeners, STR_EVENTS_SEND_REQUEST, isAsync, function (listener) {\r\n listener[STR_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */](sendReason, isAsync);\r\n });\r\n };\r\n _self[STR_PERF_EVENT /* @min:%2eperfEvent */] = function (perfEvent) {\r\n if (perfEvent) {\r\n // Send all events or only parent events\r\n if (perfEvtsSendAll || !perfEvent[_DYN_IS_CHILD_EVT /* @min:%2eisChildEvt */]()) {\r\n _runListeners(_listeners, STR_PERF_EVENT, false, function (listener) {\r\n if (perfEvent[_DYN_IS_ASYNC /* @min:%2eisAsync */]) {\r\n scheduleTimeout(function () { return listener[STR_PERF_EVENT /* @min:%2eperfEvent */](perfEvent); }, 0);\r\n }\r\n else {\r\n listener[STR_PERF_EVENT /* @min:%2eperfEvent */](perfEvent);\r\n }\r\n });\r\n }\r\n }\r\n };\r\n _self[_DYN_UNLOAD /* @min:%2eunload */] = function (isAsync) {\r\n var _finishUnload = function () {\r\n unloadHandler && unloadHandler.rm();\r\n unloadHandler = null;\r\n _listeners = [];\r\n };\r\n var waiting;\r\n _runListeners(_listeners, \"unload\", false, function (listener) {\r\n var asyncUnload = listener[_DYN_UNLOAD /* @min:%2eunload */](isAsync);\r\n if (asyncUnload) {\r\n if (!waiting) {\r\n waiting = [];\r\n }\r\n waiting[_DYN_PUSH /* @min:%2epush */](asyncUnload);\r\n }\r\n });\r\n if (waiting) {\r\n return createPromise(function (resolve) {\r\n return doAwaitResponse(createAllPromise(waiting), function () {\r\n _finishUnload();\r\n resolve();\r\n });\r\n });\r\n }\r\n else {\r\n _finishUnload();\r\n }\r\n };\r\n });\r\n }\r\n /**\r\n * Adds a notification listener.\r\n * @param listener - The notification listener to be added.\r\n */\r\n NotificationManager.prototype.addNotificationListener = function (listener) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - AWTNotificationListener to remove.\r\n */\r\n NotificationManager.prototype.removeNotificationListener = function (listener) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Notification for events sent.\r\n * @param events - The array of events that have been sent.\r\n */\r\n NotificationManager.prototype.eventsSent = function (events) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Notification for events being discarded.\r\n * @param events - The array of events that have been discarded by the SDK.\r\n * @param reason - The reason for which the SDK discarded the events. The EventsDiscardedReason\r\n * constant should be used to check the different values.\r\n */\r\n NotificationManager.prototype.eventsDiscarded = function (events, reason) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * [Optional] A function called when the events have been requested to be sent to the sever.\r\n * @param sendReason - The reason why the event batch is being sent.\r\n * @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.\r\n */\r\n NotificationManager.prototype.eventsSendRequest = function (sendReason, isAsync) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * [Optional] This event is sent if you have enabled perf events, they are primarily used to track internal performance testing and debugging\r\n * the event can be displayed via the debug plugin extension.\r\n * @param perfEvent\r\n */\r\n NotificationManager.prototype.perfEvent = function (perfEvent) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Unload and remove any state that this INotificationManager may be holding, this is generally called when the\r\n * owning SDK is being unloaded.\r\n * @param isAsync - Can the unload be performed asynchronously (default)\r\n * @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then\r\n * the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * / Promise to allow any listeners to wait for the operation to complete.\r\n */\r\n NotificationManager.prototype.unload = function (isAsync) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return NotificationManager;\r\n}());\r\nexport { NotificationManager };\r\n//# sourceMappingURL=NotificationManager.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;yDAwDM,CAAC;;;;;+BACwB;AAC/B;AACA;AACA"}
1
+ {"version":3,"file":"NotificationManager.js.map","sources":["NotificationManager.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { createAllPromise, createPromise, doAwaitResponse } from \"@nevware21/ts-async\";\r\nimport { arrForEach, arrIndexOf, objDefine, safe, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { createDynamicConfig } from \"../Config/DynamicConfig\";\r\nimport { _DYN_ADD_NOTIFICATION_LIS1, _DYN_CANCEL, _DYN_IS_ASYNC, _DYN_IS_CHILD_EVT, _DYN_PUSH, _DYN_REMOVE_NOTIFICATION_0, _DYN_SPLICE, _DYN_UNLOAD, _DYN_WATCH } from \"../__DynamicConstants\";\r\nimport { STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_EVENTS_SENT, STR_PERF_EVENT } from \"./InternalConstants\";\r\nvar defaultValues = {\r\n perfEvtsSendAll: false\r\n};\r\nfunction _runScheduledListeners(asyncNotifications) {\r\n asyncNotifications.h = null;\r\n var callbacks = asyncNotifications.cb;\r\n asyncNotifications.cb = [];\r\n arrForEach(callbacks, function (cb) {\r\n // Run the listener in a try-catch to ensure that a single listener failing doesn't prevent the others from running\r\n safe(cb.fn, [cb.arg]);\r\n });\r\n}\r\n// This function is used to combine the logic of running the listeners and handling the async notifications so that they don't\r\n// create multiple timers if there are multiple async listeners.\r\nfunction _runListeners(listeners, name, asyncNotifications, callback) {\r\n arrForEach(listeners, function (listener) {\r\n if (listener && listener[name]) {\r\n if (asyncNotifications) {\r\n // Schedule the callback to be called after the current call stack has cleared.\r\n asyncNotifications.cb[_DYN_PUSH /* @min:%2epush */]({\r\n fn: callback,\r\n arg: listener\r\n });\r\n asyncNotifications.h = asyncNotifications.h || scheduleTimeout(_runScheduledListeners, 0, asyncNotifications);\r\n }\r\n else {\r\n // Run the listener in a try-catch to ensure that a single listener failing doesn't prevent the others from running\r\n safe(callback, [listener]);\r\n }\r\n }\r\n });\r\n}\r\n/**\r\n * Class to manage sending notifications to all the listeners.\r\n */\r\nvar NotificationManager = /** @class */ (function () {\r\n function NotificationManager(config) {\r\n this.listeners = [];\r\n var perfEvtsSendAll;\r\n var unloadHandler;\r\n var _listeners = [];\r\n var _asyncNotifications = {\r\n h: null,\r\n cb: []\r\n };\r\n var cfgHandler = createDynamicConfig(config, defaultValues);\r\n unloadHandler = cfgHandler[_DYN_WATCH /* @min:%2ewatch */](function (details) {\r\n perfEvtsSendAll = !!details.cfg.perfEvtsSendAll;\r\n });\r\n dynamicProto(NotificationManager, this, function (_self) {\r\n objDefine(_self, \"listeners\", {\r\n g: function () { return _listeners; }\r\n });\r\n _self[_DYN_ADD_NOTIFICATION_LIS1 /* @min:%2eaddNotificationListener */] = function (listener) {\r\n _listeners[_DYN_PUSH /* @min:%2epush */](listener);\r\n };\r\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - AWTNotificationListener to remove.\r\n */\r\n _self[_DYN_REMOVE_NOTIFICATION_0 /* @min:%2eremoveNotificationListener */] = function (listener) {\r\n var index = arrIndexOf(_listeners, listener);\r\n while (index > -1) {\r\n _listeners[_DYN_SPLICE /* @min:%2esplice */](index, 1);\r\n index = arrIndexOf(_listeners, listener);\r\n }\r\n };\r\n /**\r\n * Notification for events sent.\r\n * @param events - The array of events that have been sent.\r\n */\r\n _self[STR_EVENTS_SENT /* @min:%2eeventsSent */] = function (events) {\r\n _runListeners(_listeners, STR_EVENTS_SENT, _asyncNotifications, function (listener) {\r\n listener[STR_EVENTS_SENT /* @min:%2eeventsSent */](events);\r\n });\r\n };\r\n /**\r\n * Notification for events being discarded.\r\n * @param events - The array of events that have been discarded by the SDK.\r\n * @param reason - The reason for which the SDK discarded the events. The EventsDiscardedReason\r\n * constant should be used to check the different values.\r\n */\r\n _self[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */] = function (events, reason) {\r\n _runListeners(_listeners, STR_EVENTS_DISCARDED, _asyncNotifications, function (listener) {\r\n listener[STR_EVENTS_DISCARDED /* @min:%2eeventsDiscarded */](events, reason);\r\n });\r\n };\r\n /**\r\n * [Optional] A function called when the events have been requested to be sent to the sever.\r\n * @param sendReason - The reason why the event batch is being sent.\r\n * @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.\r\n */\r\n _self[STR_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */] = function (sendReason, isAsync) {\r\n _runListeners(_listeners, STR_EVENTS_SEND_REQUEST, isAsync ? _asyncNotifications : null, function (listener) {\r\n listener[STR_EVENTS_SEND_REQUEST /* @min:%2eeventsSendRequest */](sendReason, isAsync);\r\n });\r\n };\r\n _self[STR_PERF_EVENT /* @min:%2eperfEvent */] = function (perfEvent) {\r\n if (perfEvent) {\r\n // Send all events or only parent events\r\n if (perfEvtsSendAll || !perfEvent[_DYN_IS_CHILD_EVT /* @min:%2eisChildEvt */]()) {\r\n _runListeners(_listeners, STR_PERF_EVENT, null, function (listener) {\r\n if (perfEvent[_DYN_IS_ASYNC /* @min:%2eisAsync */]) {\r\n scheduleTimeout(function () { return listener[STR_PERF_EVENT /* @min:%2eperfEvent */](perfEvent); }, 0);\r\n }\r\n else {\r\n listener[STR_PERF_EVENT /* @min:%2eperfEvent */](perfEvent);\r\n }\r\n });\r\n }\r\n }\r\n };\r\n _self[_DYN_UNLOAD /* @min:%2eunload */] = function (isAsync) {\r\n var _finishUnload = function () {\r\n unloadHandler && unloadHandler.rm();\r\n unloadHandler = null;\r\n _listeners = [];\r\n // Clear any async listener\r\n _asyncNotifications.h && _asyncNotifications.h[_DYN_CANCEL /* @min:%2ecancel */]();\r\n _asyncNotifications.h = null;\r\n _asyncNotifications.cb = [];\r\n };\r\n var waiting;\r\n _runListeners(_listeners, \"unload\", null, function (listener) {\r\n var asyncUnload = listener[_DYN_UNLOAD /* @min:%2eunload */](isAsync);\r\n if (asyncUnload) {\r\n if (!waiting) {\r\n waiting = [];\r\n }\r\n waiting[_DYN_PUSH /* @min:%2epush */](asyncUnload);\r\n }\r\n });\r\n if (waiting) {\r\n return createPromise(function (resolve) {\r\n return doAwaitResponse(createAllPromise(waiting), function () {\r\n _finishUnload();\r\n resolve();\r\n });\r\n });\r\n }\r\n else {\r\n _finishUnload();\r\n }\r\n };\r\n });\r\n }\r\n /**\r\n * Adds a notification listener.\r\n * @param listener - The notification listener to be added.\r\n */\r\n NotificationManager.prototype.addNotificationListener = function (listener) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Removes all instances of the listener.\r\n * @param listener - AWTNotificationListener to remove.\r\n */\r\n NotificationManager.prototype.removeNotificationListener = function (listener) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Notification for events sent.\r\n * @param events - The array of events that have been sent.\r\n */\r\n NotificationManager.prototype.eventsSent = function (events) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Notification for events being discarded.\r\n * @param events - The array of events that have been discarded by the SDK.\r\n * @param reason - The reason for which the SDK discarded the events. The EventsDiscardedReason\r\n * constant should be used to check the different values.\r\n */\r\n NotificationManager.prototype.eventsDiscarded = function (events, reason) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * [Optional] A function called when the events have been requested to be sent to the sever.\r\n * @param sendReason - The reason why the event batch is being sent.\r\n * @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.\r\n */\r\n NotificationManager.prototype.eventsSendRequest = function (sendReason, isAsync) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * [Optional] This event is sent if you have enabled perf events, they are primarily used to track internal performance testing and debugging\r\n * the event can be displayed via the debug plugin extension.\r\n * @param perfEvent\r\n */\r\n NotificationManager.prototype.perfEvent = function (perfEvent) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Unload and remove any state that this INotificationManager may be holding, this is generally called when the\r\n * owning SDK is being unloaded.\r\n * @param isAsync - Can the unload be performed asynchronously (default)\r\n * @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then\r\n * the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)\r\n * / Promise to allow any listeners to wait for the operation to complete.\r\n */\r\n NotificationManager.prototype.unload = function (isAsync) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return NotificationManager;\r\n}());\r\nexport { NotificationManager };\r\n//# sourceMappingURL=NotificationManager.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;yDAwDM,CAAC;;;;;+BACwB;AAC/B;AACA;AACA"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  //
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,11 +1,24 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
7
  import { arrAppend, arrForEach, dumpObj } from "@nevware21/ts-utils";
8
+ import { _DYN_LENGTH } from "../__DynamicConstants";
8
9
  import { _throwInternal } from "./DiagnosticLogger";
10
+ var _maxHooks;
11
+ var _hookAddMonitor;
12
+ /**
13
+ * Test hook for setting the maximum number of unload hooks and calling a monitor function when the hooks are added or removed
14
+ * This allows for automatic test failure when the maximum number of unload hooks is exceeded
15
+ * @param maxHooks - The maximum number of unload hooks
16
+ * @param addMonitor - The monitor function to call when hooks are added or removed
17
+ */
18
+ export function _testHookMaxUnloadHooksCb(maxHooks, addMonitor) {
19
+ _maxHooks = maxHooks;
20
+ _hookAddMonitor = addMonitor;
21
+ }
9
22
  /**
10
23
  * Create a IUnloadHookContainer which can be used to remember unload hook functions to be executed during the component unloading
11
24
  * process.
@@ -26,10 +39,16 @@ export function createUnloadHookContainer() {
26
39
  _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 73 /* _eInternalMessageId.PluginException */, "Unloading:" + dumpObj(e));
27
40
  }
28
41
  });
42
+ if (_maxHooks && oldHooks[_DYN_LENGTH /* @min:%2elength */] > _maxHooks) {
43
+ _hookAddMonitor ? _hookAddMonitor("doUnload", oldHooks) : _throwInternal(null, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.MaxUnloadHookExceeded */, "Max unload hooks exceeded. An excessive number of unload hooks has been detected.");
44
+ }
29
45
  }
30
46
  function _addHook(hooks) {
31
47
  if (hooks) {
32
48
  arrAppend(_hooks, hooks);
49
+ if (_maxHooks && _hooks[_DYN_LENGTH /* @min:%2elength */] > _maxHooks) {
50
+ _hookAddMonitor ? _hookAddMonitor("Add", _hooks) : _throwInternal(null, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.MaxUnloadHookExceeded */, "Max unload hooks exceeded. An excessive number of unload hooks has been detected.");
51
+ }
33
52
  }
34
53
  }
35
54
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"UnloadHookContainer.js.map","sources":["UnloadHookContainer.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrAppend, arrForEach, dumpObj } from \"@nevware21/ts-utils\";\r\nimport { _throwInternal } from \"./DiagnosticLogger\";\r\n/**\r\n * Create a IUnloadHookContainer which can be used to remember unload hook functions to be executed during the component unloading\r\n * process.\r\n * @returns A new IUnloadHookContainer instance\r\n */\r\nexport function createUnloadHookContainer() {\r\n var _hooks = [];\r\n function _doUnload(logger) {\r\n var oldHooks = _hooks;\r\n _hooks = [];\r\n // Remove all registered unload hooks\r\n arrForEach(oldHooks, function (fn) {\r\n // allow either rm or remove callback function\r\n try {\r\n (fn.rm || fn.remove).call(fn);\r\n }\r\n catch (e) {\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 73 /* _eInternalMessageId.PluginException */, \"Unloading:\" + dumpObj(e));\r\n }\r\n });\r\n }\r\n function _addHook(hooks) {\r\n if (hooks) {\r\n arrAppend(_hooks, hooks);\r\n }\r\n }\r\n return {\r\n run: _doUnload,\r\n add: _addHook\r\n };\r\n}\r\n//# sourceMappingURL=UnloadHookContainer.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"UnloadHookContainer.js.map","sources":["UnloadHookContainer.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrAppend, arrForEach, dumpObj } from \"@nevware21/ts-utils\";\r\nimport { _DYN_LENGTH } from \"../__DynamicConstants\";\r\nimport { _throwInternal } from \"./DiagnosticLogger\";\r\nvar _maxHooks;\r\nvar _hookAddMonitor;\r\n/**\r\n * Test hook for setting the maximum number of unload hooks and calling a monitor function when the hooks are added or removed\r\n * This allows for automatic test failure when the maximum number of unload hooks is exceeded\r\n * @param maxHooks - The maximum number of unload hooks\r\n * @param addMonitor - The monitor function to call when hooks are added or removed\r\n */\r\nexport function _testHookMaxUnloadHooksCb(maxHooks, addMonitor) {\r\n _maxHooks = maxHooks;\r\n _hookAddMonitor = addMonitor;\r\n}\r\n/**\r\n * Create a IUnloadHookContainer which can be used to remember unload hook functions to be executed during the component unloading\r\n * process.\r\n * @returns A new IUnloadHookContainer instance\r\n */\r\nexport function createUnloadHookContainer() {\r\n var _hooks = [];\r\n function _doUnload(logger) {\r\n var oldHooks = _hooks;\r\n _hooks = [];\r\n // Remove all registered unload hooks\r\n arrForEach(oldHooks, function (fn) {\r\n // allow either rm or remove callback function\r\n try {\r\n (fn.rm || fn.remove).call(fn);\r\n }\r\n catch (e) {\r\n _throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 73 /* _eInternalMessageId.PluginException */, \"Unloading:\" + dumpObj(e));\r\n }\r\n });\r\n if (_maxHooks && oldHooks[_DYN_LENGTH /* @min:%2elength */] > _maxHooks) {\r\n _hookAddMonitor ? _hookAddMonitor(\"doUnload\", oldHooks) : _throwInternal(null, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.MaxUnloadHookExceeded */, \"Max unload hooks exceeded. An excessive number of unload hooks has been detected.\");\r\n }\r\n }\r\n function _addHook(hooks) {\r\n if (hooks) {\r\n arrAppend(_hooks, hooks);\r\n if (_maxHooks && _hooks[_DYN_LENGTH /* @min:%2elength */] > _maxHooks) {\r\n _hookAddMonitor ? _hookAddMonitor(\"Add\", _hooks) : _throwInternal(null, 1 /* eLoggingSeverity.CRITICAL */, 48 /* _eInternalMessageId.MaxUnloadHookExceeded */, \"Max unload hooks exceeded. An excessive number of unload hooks has been detected.\");\r\n }\r\n }\r\n }\r\n return {\r\n run: _doUnload,\r\n add: _addHook\r\n };\r\n}\r\n//# sourceMappingURL=UnloadHookContainer.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  import { isArray, isString, strLeft, strTrim } from "@nevware21/ts-utils";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.8
2
+ * Application Insights JavaScript SDK - Core, 3.0.9
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -13,31 +13,31 @@
13
13
  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
14
  export var _DYN_TO_LOWER_CASE = "toLowerCase"; // Count: 9
15
15
  export var _DYN_BLK_VAL = "blkVal"; // Count: 5
16
- export var _DYN_LENGTH = "length"; // Count: 43
16
+ export var _DYN_LENGTH = "length"; // Count: 45
17
17
  export var _DYN_RD_ONLY = "rdOnly"; // Count: 4
18
18
  export var _DYN_NOTIFY = "notify"; // Count: 4
19
19
  export var _DYN_WARN_TO_CONSOLE = "warnToConsole"; // Count: 4
20
20
  export var _DYN_THROW_INTERNAL = "throwInternal"; // Count: 5
21
21
  export var _DYN_SET_DF = "setDf"; // Count: 6
22
- export var _DYN_WATCH = "watch"; // Count: 9
22
+ export var _DYN_WATCH = "watch"; // Count: 8
23
23
  export var _DYN_LOGGER = "logger"; // Count: 21
24
24
  export var _DYN_APPLY = "apply"; // Count: 7
25
- export var _DYN_PUSH = "push"; // Count: 31
25
+ export var _DYN_PUSH = "push"; // Count: 32
26
26
  export var _DYN_SPLICE = "splice"; // Count: 8
27
27
  export var _DYN_HDLR = "hdlr"; // Count: 6
28
- export var _DYN_CANCEL = "cancel"; // Count: 5
28
+ export var _DYN_CANCEL = "cancel"; // Count: 6
29
29
  export var _DYN_INITIALIZE = "initialize"; // Count: 4
30
30
  export var _DYN_IDENTIFIER = "identifier"; // Count: 8
31
+ export var _DYN_REMOVE_NOTIFICATION_0 = "removeNotificationListener"; // Count: 4
32
+ export var _DYN_ADD_NOTIFICATION_LIS1 = "addNotificationListener"; // Count: 4
31
33
  export var _DYN_IS_INITIALIZED = "isInitialized"; // Count: 10
34
+ export var _DYN_GET_NOTIFY_MGR = "getNotifyMgr"; // Count: 5
32
35
  export var _DYN_GET_PLUGIN = "getPlugin"; // Count: 6
33
36
  export var _DYN_POLL_INTERNAL_LOGS = "pollInternalLogs"; // Count: 2
34
37
  export var _DYN_NAME = "name"; // Count: 11
35
38
  export var _DYN_TIME = "time"; // Count: 6
36
39
  export var _DYN_PROCESS_NEXT = "processNext"; // Count: 15
37
- export var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext"; // Count: 2
38
- export var _DYN_GET_NOTIFY_MGR = "getNotifyMgr"; // Count: 5
39
- export var _DYN_ADD_NOTIFICATION_LIS1 = "addNotificationListener"; // Count: 4
40
- export var _DYN_REMOVE_NOTIFICATION_2 = "removeNotificationListener"; // Count: 4
40
+ export var _DYN_GET_PROCESS_TEL_CONT2 = "getProcessTelContext"; // Count: 2
41
41
  export var _DYN_ENABLED = "enabled"; // Count: 6
42
42
  export var _DYN_STOP_POLLING_INTERNA3 = "stopPollingInternalLogs"; // Count: 2
43
43
  export var _DYN_UNLOAD = "unload"; // Count: 9