@microsoft/applicationinsights-teechannel-js 3.1.3-nightly3.240329-01 → 3.1.3-nightly3.240410-01

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 (48) hide show
  1. package/browser/es5/{applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.cjs.js → applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.cjs.js} +41 -38
  2. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.cjs.js.map +1 -0
  3. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.cjs.min.js +6 -0
  4. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.cjs.min.js.map +1 -0
  5. package/browser/es5/{applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.gbl.js → applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.gbl.js} +43 -40
  6. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.gbl.js.map +1 -0
  7. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.gbl.min.js +6 -0
  8. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.gbl.min.js.map +1 -0
  9. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.integrity.json +66 -0
  10. package/browser/es5/{applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.js → applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.js} +43 -40
  11. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.js.map +1 -0
  12. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.min.js +6 -0
  13. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240410-01.min.js.map +1 -0
  14. package/browser/es5/applicationinsights-teechannel-js.3.cjs.js +40 -37
  15. package/browser/es5/applicationinsights-teechannel-js.3.cjs.js.map +1 -1
  16. package/browser/es5/applicationinsights-teechannel-js.3.cjs.min.js +2 -2
  17. package/browser/es5/applicationinsights-teechannel-js.3.cjs.min.js.map +1 -1
  18. package/browser/es5/applicationinsights-teechannel-js.3.gbl.js +42 -39
  19. package/browser/es5/applicationinsights-teechannel-js.3.gbl.js.map +1 -1
  20. package/browser/es5/applicationinsights-teechannel-js.3.gbl.min.js +2 -2
  21. package/browser/es5/applicationinsights-teechannel-js.3.gbl.min.js.map +1 -1
  22. package/browser/es5/applicationinsights-teechannel-js.3.integrity.json +25 -25
  23. package/browser/es5/applicationinsights-teechannel-js.3.js +42 -39
  24. package/browser/es5/applicationinsights-teechannel-js.3.js.map +1 -1
  25. package/browser/es5/applicationinsights-teechannel-js.3.min.js +2 -2
  26. package/browser/es5/applicationinsights-teechannel-js.3.min.js.map +1 -1
  27. package/dist/es5/applicationinsights-teechannel-js.js +40 -37
  28. package/dist/es5/applicationinsights-teechannel-js.js.map +1 -1
  29. package/dist/es5/applicationinsights-teechannel-js.min.js +2 -2
  30. package/dist/es5/applicationinsights-teechannel-js.min.js.map +1 -1
  31. package/dist-es5/ChannelController.js +1 -1
  32. package/dist-es5/Interfaces/ITeeChannelConfig.js +1 -1
  33. package/dist-es5/TeeChannel.js +1 -1
  34. package/dist-es5/__DynamicConstants.js +1 -1
  35. package/dist-es5/applicationinsights-teechannel-js.js +1 -1
  36. package/package.json +3 -3
  37. package/types/applicationinsights-teechannel-js.d.ts +1 -1
  38. package/types/applicationinsights-teechannel-js.namespaced.d.ts +1 -28
  39. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.cjs.js.map +0 -1
  40. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.cjs.min.js +0 -6
  41. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.cjs.min.js.map +0 -1
  42. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.gbl.js.map +0 -1
  43. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.gbl.min.js +0 -6
  44. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.gbl.min.js.map +0 -1
  45. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.integrity.json +0 -66
  46. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.js.map +0 -1
  47. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.min.js +0 -6
  48. package/browser/es5/applicationinsights-teechannel-js.3.1.3-nightly3.240329-01.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Tee Channel, 3.1.3-nightly3.240329-01
2
+ * Application Insights JavaScript SDK - Tee Channel, 3.1.3-nightly3.240410-01
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  'use strict';
@@ -1051,21 +1051,25 @@ function throwAggregationError(message, sourceErrors) {
1051
1051
  throw new aggregationErrorType(theMessage, sourceErrors || []);
1052
1052
  }
1053
1053
 
1054
- var STRING_STATES = [
1055
- "pending", "resolving", "resolved", "rejected"
1054
+ var STR_PROMISE = "Promise";
1055
+ var REJECTED = "rejected";
1056
+
1057
+ var STRING_STATES = [
1058
+ "pending", "resolving", "resolved", REJECTED
1056
1059
  ];
1057
1060
 
1058
1061
  var DISPATCH_EVENT = "dispatchEvent";
1059
1062
  var _hasInitEvent;
1063
+ function _hasInitEventFn(doc) {
1064
+ var evt;
1065
+ if (doc && doc.createEvent) {
1066
+ evt = doc.createEvent("Event");
1067
+ }
1068
+ return (!!evt && evt.initEvent);
1069
+ }
1060
1070
  function emitEvent(target, evtName, populateEvent, useNewEvent) {
1061
1071
  var doc = getDocument();
1062
- !_hasInitEvent && (_hasInitEvent = safeGetLazy(function () {
1063
- var evt;
1064
- if (doc && doc.createEvent) {
1065
- evt = doc.createEvent("Event");
1066
- }
1067
- return (!!evt && evt.initEvent);
1068
- }, null));
1072
+ !_hasInitEvent && (_hasInitEvent = createCachedValue(!!safe(_hasInitEventFn, [doc]).v));
1069
1073
  var theEvt = _hasInitEvent.v ? doc.createEvent("Event") : (useNewEvent ? new Event(evtName) : {});
1070
1074
  populateEvent && populateEvent(theEvt);
1071
1075
  if (_hasInitEvent.v) {
@@ -1086,8 +1090,6 @@ function emitEvent(target, evtName, populateEvent, useNewEvent) {
1086
1090
  }
1087
1091
  }
1088
1092
 
1089
- var STR_PROMISE = "Promise";
1090
-
1091
1093
  var NODE_UNHANDLED_REJECTION = "unhandledRejection";
1092
1094
  var UNHANDLED_REJECTION = NODE_UNHANDLED_REJECTION.toLowerCase();
1093
1095
  var _unhandledRejectionTimeout = 10;
@@ -1108,7 +1110,7 @@ function _createPromise(newPromise, processor, executor) {
1108
1110
  var _unHandledRejectionHandler = null;
1109
1111
  var _thePromise;
1110
1112
  !_hasPromiseRejectionEvent && (_hasPromiseRejectionEvent = lazySafeGetInst(STR_PROMISE + "RejectionEvent"));
1111
- var _then = function (onResolved, onRejected) {
1113
+ function _then(onResolved, onRejected) {
1112
1114
  try {
1113
1115
  _handled = true;
1114
1116
  _unHandledRejectionHandler && _unHandledRejectionHandler.cancel();
@@ -1143,11 +1145,11 @@ function _createPromise(newPromise, processor, executor) {
1143
1145
  }
1144
1146
  finally {
1145
1147
  }
1146
- };
1147
- var _catch = function (onRejected) {
1148
+ }
1149
+ function _catch(onRejected) {
1148
1150
  return _then(undefined, onRejected);
1149
- };
1150
- var _finally = function (onFinally) {
1151
+ }
1152
+ function _finally(onFinally) {
1151
1153
  var thenFinally = onFinally;
1152
1154
  var catchFinally = onFinally;
1153
1155
  if (isFunction(onFinally)) {
@@ -1161,21 +1163,21 @@ function _createPromise(newPromise, processor, executor) {
1161
1163
  };
1162
1164
  }
1163
1165
  return _then(thenFinally, catchFinally);
1164
- };
1165
- var _strState = function () {
1166
+ }
1167
+ function _strState() {
1166
1168
  return STRING_STATES[_state];
1167
- };
1168
- var _processQueue = function () {
1169
+ }
1170
+ function _processQueue() {
1169
1171
  if (_queue.length > 0) {
1170
1172
  var pending = _queue.slice();
1171
1173
  _queue = [];
1172
1174
  _handled = true;
1173
- processor(pending);
1174
1175
  _unHandledRejectionHandler && _unHandledRejectionHandler.cancel();
1175
1176
  _unHandledRejectionHandler = null;
1177
+ processor(pending);
1176
1178
  }
1177
- };
1178
- var _createSettleIfFn = function (newState, allowState) {
1179
+ }
1180
+ function _createSettleIfFn(newState, allowState) {
1179
1181
  return function (theValue) {
1180
1182
  if (_state === allowState) {
1181
1183
  if (newState === 2 && isPromiseLike(theValue)) {
@@ -1192,9 +1194,10 @@ function _createPromise(newPromise, processor, executor) {
1192
1194
  }
1193
1195
  }
1194
1196
  };
1195
- };
1196
- var _notifyUnhandledRejection = function () {
1197
+ }
1198
+ function _notifyUnhandledRejection() {
1197
1199
  if (!_handled) {
1200
+ _handled = true;
1198
1201
  if (isNode()) {
1199
1202
  process.emit(NODE_UNHANDLED_REJECTION, _settledValue, _thePromise);
1200
1203
  }
@@ -1207,7 +1210,7 @@ function _createPromise(newPromise, processor, executor) {
1207
1210
  }, !!_hasPromiseRejectionEvent.v);
1208
1211
  }
1209
1212
  }
1210
- };
1213
+ }
1211
1214
  _thePromise = {
1212
1215
  then: _then,
1213
1216
  "catch": _catch,
@@ -1219,9 +1222,9 @@ function _createPromise(newPromise, processor, executor) {
1219
1222
  if (hasSymbol()) {
1220
1223
  _thePromise[getKnownSymbol(11 )] = "IPromise";
1221
1224
  }
1222
- var _toString = function () {
1223
- return "IPromise" + ("") + " " + _strState() + (_hasResolved ? (" - " + dumpFnObj(_settledValue)) : "");
1224
- };
1225
+ function _toString() {
1226
+ return "IPromise" + ("") + " " + _strState() + (_hasResolved ? (" - " + dumpFnObj(_settledValue)) : "") + ("");
1227
+ }
1225
1228
  _thePromise.toString = _toString;
1226
1229
  (function _initialize() {
1227
1230
  if (!isFunction(executor)) {
@@ -1238,7 +1241,7 @@ function _createPromise(newPromise, processor, executor) {
1238
1241
  return _thePromise;
1239
1242
  }
1240
1243
 
1241
- var _processPendingItems = function (pending) {
1244
+ function syncItemProcessor(pending) {
1242
1245
  arrForEach(pending, function (fn) {
1243
1246
  try {
1244
1247
  fn();
@@ -1246,12 +1249,12 @@ var _processPendingItems = function (pending) {
1246
1249
  catch (e) {
1247
1250
  }
1248
1251
  });
1249
- };
1252
+ }
1250
1253
  function timeoutItemProcessor(timeout) {
1251
1254
  var callbackTimeout = isNumber(timeout) ? timeout : 0;
1252
1255
  return function (pending) {
1253
1256
  scheduleTimeout(function () {
1254
- _processPendingItems(pending);
1257
+ syncItemProcessor(pending);
1255
1258
  }, callbackTimeout);
1256
1259
  };
1257
1260
  }
@@ -1260,10 +1263,10 @@ function createAsyncPromise(executor, timeout) {
1260
1263
  return _createPromise(createAsyncPromise, timeoutItemProcessor(timeout), executor, timeout);
1261
1264
  }
1262
1265
 
1263
- var _isPromiseSupported;
1266
+ var _promiseCls;
1264
1267
  function createNativePromise(executor, timeout) {
1265
- !_isPromiseSupported && (_isPromiseSupported = lazySafeGetInst(STR_PROMISE));
1266
- var PrmCls = _isPromiseSupported.v;
1268
+ !_promiseCls && (_promiseCls = createCachedValue((safe(getInst, [STR_PROMISE]).v) || null));
1269
+ var PrmCls = _promiseCls.v;
1267
1270
  if (!PrmCls) {
1268
1271
  return createAsyncPromise(executor);
1269
1272
  }
@@ -1293,7 +1296,7 @@ function createNativePromise(executor, timeout) {
1293
1296
 
1294
1297
  var _promiseCreator;
1295
1298
  function createPromise(executor, timeout) {
1296
- !_promiseCreator && (_promiseCreator = getLazy(function () { return createNativePromise; }));
1299
+ !_promiseCreator && (_promiseCreator = createCachedValue(createNativePromise));
1297
1300
  return _promiseCreator.v.call(this, executor, timeout);
1298
1301
  }
1299
1302