@microsoft/applicationinsights-common 2.8.0-nightly.2204-04 → 2.8.0-nightly.2204-05

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 (93) hide show
  1. package/browser/applicationinsights-common.integrity.json +9 -9
  2. package/browser/applicationinsights-common.js +268 -352
  3. package/browser/applicationinsights-common.js.map +1 -1
  4. package/browser/applicationinsights-common.min.js +2 -2
  5. package/browser/applicationinsights-common.min.js.map +1 -1
  6. package/dist/applicationinsights-common.api.json +15 -6
  7. package/dist/applicationinsights-common.api.md +9 -8
  8. package/dist/applicationinsights-common.d.ts +10 -9
  9. package/dist/applicationinsights-common.js +268 -352
  10. package/dist/applicationinsights-common.js.map +1 -1
  11. package/dist/applicationinsights-common.min.js +2 -2
  12. package/dist/applicationinsights-common.min.js.map +1 -1
  13. package/dist/applicationinsights-common.rollup.d.ts +10 -9
  14. package/dist-esm/ConnectionStringParser.js +1 -1
  15. package/dist-esm/Constants.js +1 -1
  16. package/dist-esm/DomHelperFuncs.js +1 -1
  17. package/dist-esm/Enums.js +1 -1
  18. package/dist-esm/HelperFuncs.js +1 -1
  19. package/dist-esm/Interfaces/ConnectionString.js +1 -1
  20. package/dist-esm/Interfaces/Context/IApplication.js +1 -1
  21. package/dist-esm/Interfaces/Context/IDevice.js +1 -1
  22. package/dist-esm/Interfaces/Context/IInternal.js +1 -1
  23. package/dist-esm/Interfaces/Context/ILocation.js +1 -1
  24. package/dist-esm/Interfaces/Context/IOperatingSystem.js +1 -1
  25. package/dist-esm/Interfaces/Context/ISample.js +1 -1
  26. package/dist-esm/Interfaces/Context/ISession.js +1 -1
  27. package/dist-esm/Interfaces/Context/ITelemetryTrace.js +1 -1
  28. package/dist-esm/Interfaces/Context/IUser.js +1 -1
  29. package/dist-esm/Interfaces/Context/IWeb.js +1 -1
  30. package/dist-esm/Interfaces/Contracts/AvailabilityData.js +1 -1
  31. package/dist-esm/Interfaces/Contracts/ContextTagKeys.js +1 -1
  32. package/dist-esm/Interfaces/Contracts/DataPointType.js +1 -1
  33. package/dist-esm/Interfaces/Contracts/DependencyKind.js +1 -1
  34. package/dist-esm/Interfaces/Contracts/DependencySourceType.js +1 -1
  35. package/dist-esm/Interfaces/Contracts/IBase.js +1 -1
  36. package/dist-esm/Interfaces/Contracts/IData.js +1 -1
  37. package/dist-esm/Interfaces/Contracts/IDataPoint.js +1 -1
  38. package/dist-esm/Interfaces/Contracts/IDomain.js +1 -1
  39. package/dist-esm/Interfaces/Contracts/IEnvelope.js +1 -1
  40. package/dist-esm/Interfaces/Contracts/IEventData.js +1 -1
  41. package/dist-esm/Interfaces/Contracts/IExceptionData.js +1 -1
  42. package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +1 -1
  43. package/dist-esm/Interfaces/Contracts/IMessageData.js +1 -1
  44. package/dist-esm/Interfaces/Contracts/IMetricData.js +1 -1
  45. package/dist-esm/Interfaces/Contracts/IPageViewData.js +1 -1
  46. package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +1 -1
  47. package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
  48. package/dist-esm/Interfaces/Contracts/IStackFrame.js +1 -1
  49. package/dist-esm/Interfaces/Contracts/RequestData.js +1 -1
  50. package/dist-esm/Interfaces/Contracts/SeverityLevel.js +1 -1
  51. package/dist-esm/Interfaces/IAppInsights.js +1 -1
  52. package/dist-esm/Interfaces/IChannelControlsAI.js +1 -1
  53. package/dist-esm/Interfaces/IConfig.js +1 -1
  54. package/dist-esm/Interfaces/ICorrelationConfig.js +1 -1
  55. package/dist-esm/Interfaces/IDependencyTelemetry.js +1 -1
  56. package/dist-esm/Interfaces/IEventTelemetry.js +1 -1
  57. package/dist-esm/Interfaces/IExceptionTelemetry.js +1 -1
  58. package/dist-esm/Interfaces/IMetricTelemetry.js +1 -1
  59. package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  60. package/dist-esm/Interfaces/IPageViewTelemetry.js +1 -1
  61. package/dist-esm/Interfaces/IPartC.js +1 -1
  62. package/dist-esm/Interfaces/IPropertiesPlugin.js +1 -1
  63. package/dist-esm/Interfaces/IRequestContext.js +1 -1
  64. package/dist-esm/Interfaces/ITelemetryContext.js +1 -1
  65. package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
  66. package/dist-esm/Interfaces/PartAExtensions.js +1 -1
  67. package/dist-esm/Interfaces/Telemetry/IEnvelope.js +1 -1
  68. package/dist-esm/Interfaces/Telemetry/ISerializable.js +1 -1
  69. package/dist-esm/RequestResponseHeaders.js +1 -1
  70. package/dist-esm/StorageHelperFuncs.js +8 -8
  71. package/dist-esm/StorageHelperFuncs.js.map +1 -1
  72. package/dist-esm/Telemetry/Common/Data.js +1 -1
  73. package/dist-esm/Telemetry/Common/DataPoint.js +1 -1
  74. package/dist-esm/Telemetry/Common/DataSanitizer.js +9 -9
  75. package/dist-esm/Telemetry/Common/DataSanitizer.js.map +1 -1
  76. package/dist-esm/Telemetry/Common/Envelope.js +1 -1
  77. package/dist-esm/Telemetry/Event.js +1 -1
  78. package/dist-esm/Telemetry/Exception.js +1 -1
  79. package/dist-esm/Telemetry/Metric.js +1 -1
  80. package/dist-esm/Telemetry/PageView.js +1 -1
  81. package/dist-esm/Telemetry/PageViewPerformance.js +1 -1
  82. package/dist-esm/Telemetry/RemoteDependencyData.js +1 -1
  83. package/dist-esm/Telemetry/Trace.js +1 -1
  84. package/dist-esm/TelemetryItemCreator.js +1 -1
  85. package/dist-esm/UrlHelperFuncs.js +1 -1
  86. package/dist-esm/Util.js +1 -1
  87. package/dist-esm/applicationinsights-common.js +1 -1
  88. package/package.json +2 -2
  89. package/src/StorageHelperFuncs.ts +7 -7
  90. package/src/Telemetry/Common/DataSanitizer.ts +10 -10
  91. package/src/Telemetry/PageViewPerformance.ts +1 -1
  92. package/types/Enums.d.ts +4 -4
  93. package/types/Telemetry/Common/DataSanitizer.d.ts +3 -3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -98,247 +98,6 @@
98
98
  d[strShimPrototype] = b === null ? objCreateFn(b) : (__[strShimPrototype] = b[strShimPrototype], new __());
99
99
  }
100
100
 
101
- /*!
102
- * Microsoft Dynamic Proto Utility, 1.1.4
103
- * Copyright (c) Microsoft and contributors. All rights reserved.
104
- */
105
- var Constructor = 'constructor';
106
- var Prototype = 'prototype';
107
- var strFunction = 'function';
108
- var DynInstFuncTable = '_dynInstFuncs';
109
- var DynProxyTag = '_isDynProxy';
110
- var DynClassName = '_dynClass';
111
- var DynClassNamePrefix = '_dynCls$';
112
- var DynInstChkTag = '_dynInstChk';
113
- var DynAllowInstChkTag = DynInstChkTag;
114
- var DynProtoDefaultOptions = '_dfOpts';
115
- var UnknownValue = '_unknown_';
116
- var str__Proto = "__proto__";
117
- var strUseBaseInst = 'useBaseInst';
118
- var strSetInstFuncs = 'setInstFuncs';
119
- var Obj = Object;
120
- var _objGetPrototypeOf = Obj["getPrototypeOf"];
121
- var _dynamicNames = 0;
122
- function _hasOwnProperty(obj, prop) {
123
- return obj && Obj[Prototype].hasOwnProperty.call(obj, prop);
124
- }
125
- function _isObjectOrArrayPrototype(target) {
126
- return target && (target === Obj[Prototype] || target === Array[Prototype]);
127
- }
128
- function _isObjectArrayOrFunctionPrototype(target) {
129
- return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
130
- }
131
- function _getObjProto(target) {
132
- if (target) {
133
- if (_objGetPrototypeOf) {
134
- return _objGetPrototypeOf(target);
135
- }
136
- var newProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
137
- if (newProto) {
138
- return newProto;
139
- }
140
- }
141
- return null;
142
- }
143
- function _forEachProp(target, func) {
144
- var props = [];
145
- var getOwnProps = Obj["getOwnPropertyNames"];
146
- if (getOwnProps) {
147
- props = getOwnProps(target);
148
- }
149
- else {
150
- for (var name_1 in target) {
151
- if (typeof name_1 === "string" && _hasOwnProperty(target, name_1)) {
152
- props.push(name_1);
153
- }
154
- }
155
- }
156
- if (props && props.length > 0) {
157
- for (var lp = 0; lp < props.length; lp++) {
158
- func(props[lp]);
159
- }
160
- }
161
- }
162
- function _isDynamicCandidate(target, funcName, skipOwn) {
163
- return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || _hasOwnProperty(target, funcName)));
164
- }
165
- function _throwTypeError(message) {
166
- throw new TypeError("DynamicProto: " + message);
167
- }
168
- function _getInstanceFuncs(thisTarget) {
169
- var instFuncs = {};
170
- _forEachProp(thisTarget, function (name) {
171
- if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {
172
- instFuncs[name] = thisTarget[name];
173
- }
174
- });
175
- return instFuncs;
176
- }
177
- function _hasVisited(values, value) {
178
- for (var lp = values.length - 1; lp >= 0; lp--) {
179
- if (values[lp] === value) {
180
- return true;
181
- }
182
- }
183
- return false;
184
- }
185
- function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
186
- function _instFuncProxy(target, funcHost, funcName) {
187
- var theFunc = funcHost[funcName];
188
- if (theFunc[DynProxyTag] && useBaseInst) {
189
- var instFuncTable = target[DynInstFuncTable] || {};
190
- if (instFuncTable[DynAllowInstChkTag] !== false) {
191
- theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;
192
- }
193
- }
194
- return function () {
195
- return theFunc.apply(target, arguments);
196
- };
197
- }
198
- var baseFuncs = {};
199
- _forEachProp(instFuncs, function (name) {
200
- baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
201
- });
202
- var baseProto = _getObjProto(classProto);
203
- var visited = [];
204
- while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
205
- _forEachProp(baseProto, function (name) {
206
- if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {
207
- baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
208
- }
209
- });
210
- visited.push(baseProto);
211
- baseProto = _getObjProto(baseProto);
212
- }
213
- return baseFuncs;
214
- }
215
- function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
216
- var instFunc = null;
217
- if (target && _hasOwnProperty(proto, DynClassName)) {
218
- var instFuncTable = target[DynInstFuncTable] || {};
219
- instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];
220
- if (!instFunc) {
221
- _throwTypeError("Missing [" + funcName + "] " + strFunction);
222
- }
223
- if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
224
- var canAddInst = !_hasOwnProperty(target, funcName);
225
- var objProto = _getObjProto(target);
226
- var visited = [];
227
- while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
228
- var protoFunc = objProto[funcName];
229
- if (protoFunc) {
230
- canAddInst = (protoFunc === currentDynProtoProxy);
231
- break;
232
- }
233
- visited.push(objProto);
234
- objProto = _getObjProto(objProto);
235
- }
236
- try {
237
- if (canAddInst) {
238
- target[funcName] = instFunc;
239
- }
240
- instFunc[DynInstChkTag] = 1;
241
- }
242
- catch (e) {
243
- instFuncTable[DynAllowInstChkTag] = false;
244
- }
245
- }
246
- }
247
- return instFunc;
248
- }
249
- function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
250
- var protoFunc = proto[funcName];
251
- if (protoFunc === currentDynProtoProxy) {
252
- protoFunc = _getObjProto(proto)[funcName];
253
- }
254
- if (typeof protoFunc !== strFunction) {
255
- _throwTypeError("[" + funcName + "] is not a " + strFunction);
256
- }
257
- return protoFunc;
258
- }
259
- function _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {
260
- function _createDynamicPrototype(proto, funcName) {
261
- var dynProtoProxy = function () {
262
- var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
263
- return instFunc.apply(this, arguments);
264
- };
265
- dynProtoProxy[DynProxyTag] = 1;
266
- return dynProtoProxy;
267
- }
268
- if (!_isObjectOrArrayPrototype(proto)) {
269
- var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};
270
- var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || {});
271
- if (instFuncTable[DynAllowInstChkTag] !== false) {
272
- instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
273
- }
274
- _forEachProp(target, function (name) {
275
- if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
276
- instFuncs_1[name] = target[name];
277
- delete target[name];
278
- if (!_hasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
279
- proto[name] = _createDynamicPrototype(proto, name);
280
- }
281
- }
282
- });
283
- }
284
- }
285
- function _checkPrototype(classProto, thisTarget) {
286
- if (_objGetPrototypeOf) {
287
- var visited = [];
288
- var thisProto = _getObjProto(thisTarget);
289
- while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
290
- if (thisProto === classProto) {
291
- return true;
292
- }
293
- visited.push(thisProto);
294
- thisProto = _getObjProto(thisProto);
295
- }
296
- }
297
- return false;
298
- }
299
- function _getObjName(target, unknownValue) {
300
- if (_hasOwnProperty(target, Prototype)) {
301
- return target.name || unknownValue || UnknownValue;
302
- }
303
- return (((target || {})[Constructor]) || {}).name || unknownValue || UnknownValue;
304
- }
305
- function dynamicProto(theClass, target, delegateFunc, options) {
306
- if (!_hasOwnProperty(theClass, Prototype)) {
307
- _throwTypeError("theClass is an invalid class definition.");
308
- }
309
- var classProto = theClass[Prototype];
310
- if (!_checkPrototype(classProto, target)) {
311
- _throwTypeError("[" + _getObjName(theClass) + "] is not in class hierarchy of [" + _getObjName(target) + "]");
312
- }
313
- var className = null;
314
- if (_hasOwnProperty(classProto, DynClassName)) {
315
- className = classProto[DynClassName];
316
- }
317
- else {
318
- className = DynClassNamePrefix + _getObjName(theClass, "_") + "$" + _dynamicNames;
319
- _dynamicNames++;
320
- classProto[DynClassName] = className;
321
- }
322
- var perfOptions = dynamicProto[DynProtoDefaultOptions];
323
- var useBaseInst = !!perfOptions[strUseBaseInst];
324
- if (useBaseInst && options && options[strUseBaseInst] !== undefined) {
325
- useBaseInst = !!options[strUseBaseInst];
326
- }
327
- var instFuncs = _getInstanceFuncs(target);
328
- var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);
329
- delegateFunc(target, baseFuncs);
330
- var setInstanceFunc = !!_objGetPrototypeOf && !!perfOptions[strSetInstFuncs];
331
- if (setInstanceFunc && options) {
332
- setInstanceFunc = !!options[strSetInstFuncs];
333
- }
334
- _populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);
335
- }
336
- var perfDefaults = {
337
- setInstFuncs: true,
338
- useBaseInst: true
339
- };
340
- dynamicProto[DynProtoDefaultOptions] = perfDefaults;
341
-
342
101
  var strEmpty$1 = "";
343
102
 
344
103
  var strToISOString = "toISOString";
@@ -622,6 +381,16 @@
622
381
  function _doNothing(value) {
623
382
  return value;
624
383
  }
384
+ function deepFreeze(obj) {
385
+ if (_objFreeze) {
386
+ objForEachKey(obj, function (name, value) {
387
+ if (isArray(value) || isObject(value)) {
388
+ _objFreeze(value);
389
+ }
390
+ });
391
+ }
392
+ return objFreeze(obj);
393
+ }
625
394
  var objFreeze = _objFreeze || _doNothing;
626
395
  function dateNow() {
627
396
  var dt = Date;
@@ -647,9 +416,6 @@
647
416
  function isTruthy(value) {
648
417
  return !!value;
649
418
  }
650
- function throwError(message) {
651
- throw new Error(message);
652
- }
653
419
  function createClassFromInterface(defaults) {
654
420
  return /** @class */ (function () {
655
421
  function class_1() {
@@ -663,17 +429,256 @@
663
429
  return class_1;
664
430
  }());
665
431
  }
432
+
666
433
  function createEnumStyle(values) {
667
434
  var enumClass = {};
668
435
  objForEachKey(values, function (field, value) {
669
436
  enumClass[field] = value;
670
- if (!isUndefined(enumClass[value])) {
671
- throwError("[" + value + "] exists for " + field);
672
- }
673
437
  enumClass[value] = field;
674
438
  });
675
- return objFreeze(enumClass);
439
+ return deepFreeze(enumClass);
440
+ }
441
+
442
+ /*!
443
+ * Microsoft Dynamic Proto Utility, 1.1.4
444
+ * Copyright (c) Microsoft and contributors. All rights reserved.
445
+ */
446
+ var Constructor = 'constructor';
447
+ var Prototype = 'prototype';
448
+ var strFunction = 'function';
449
+ var DynInstFuncTable = '_dynInstFuncs';
450
+ var DynProxyTag = '_isDynProxy';
451
+ var DynClassName = '_dynClass';
452
+ var DynClassNamePrefix = '_dynCls$';
453
+ var DynInstChkTag = '_dynInstChk';
454
+ var DynAllowInstChkTag = DynInstChkTag;
455
+ var DynProtoDefaultOptions = '_dfOpts';
456
+ var UnknownValue = '_unknown_';
457
+ var str__Proto = "__proto__";
458
+ var strUseBaseInst = 'useBaseInst';
459
+ var strSetInstFuncs = 'setInstFuncs';
460
+ var Obj = Object;
461
+ var _objGetPrototypeOf = Obj["getPrototypeOf"];
462
+ var _dynamicNames = 0;
463
+ function _hasOwnProperty(obj, prop) {
464
+ return obj && Obj[Prototype].hasOwnProperty.call(obj, prop);
465
+ }
466
+ function _isObjectOrArrayPrototype(target) {
467
+ return target && (target === Obj[Prototype] || target === Array[Prototype]);
468
+ }
469
+ function _isObjectArrayOrFunctionPrototype(target) {
470
+ return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
471
+ }
472
+ function _getObjProto(target) {
473
+ if (target) {
474
+ if (_objGetPrototypeOf) {
475
+ return _objGetPrototypeOf(target);
476
+ }
477
+ var newProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
478
+ if (newProto) {
479
+ return newProto;
480
+ }
481
+ }
482
+ return null;
483
+ }
484
+ function _forEachProp(target, func) {
485
+ var props = [];
486
+ var getOwnProps = Obj["getOwnPropertyNames"];
487
+ if (getOwnProps) {
488
+ props = getOwnProps(target);
489
+ }
490
+ else {
491
+ for (var name_1 in target) {
492
+ if (typeof name_1 === "string" && _hasOwnProperty(target, name_1)) {
493
+ props.push(name_1);
494
+ }
495
+ }
496
+ }
497
+ if (props && props.length > 0) {
498
+ for (var lp = 0; lp < props.length; lp++) {
499
+ func(props[lp]);
500
+ }
501
+ }
502
+ }
503
+ function _isDynamicCandidate(target, funcName, skipOwn) {
504
+ return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || _hasOwnProperty(target, funcName)));
505
+ }
506
+ function _throwTypeError(message) {
507
+ throw new TypeError("DynamicProto: " + message);
508
+ }
509
+ function _getInstanceFuncs(thisTarget) {
510
+ var instFuncs = {};
511
+ _forEachProp(thisTarget, function (name) {
512
+ if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {
513
+ instFuncs[name] = thisTarget[name];
514
+ }
515
+ });
516
+ return instFuncs;
517
+ }
518
+ function _hasVisited(values, value) {
519
+ for (var lp = values.length - 1; lp >= 0; lp--) {
520
+ if (values[lp] === value) {
521
+ return true;
522
+ }
523
+ }
524
+ return false;
525
+ }
526
+ function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
527
+ function _instFuncProxy(target, funcHost, funcName) {
528
+ var theFunc = funcHost[funcName];
529
+ if (theFunc[DynProxyTag] && useBaseInst) {
530
+ var instFuncTable = target[DynInstFuncTable] || {};
531
+ if (instFuncTable[DynAllowInstChkTag] !== false) {
532
+ theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;
533
+ }
534
+ }
535
+ return function () {
536
+ return theFunc.apply(target, arguments);
537
+ };
538
+ }
539
+ var baseFuncs = {};
540
+ _forEachProp(instFuncs, function (name) {
541
+ baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
542
+ });
543
+ var baseProto = _getObjProto(classProto);
544
+ var visited = [];
545
+ while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
546
+ _forEachProp(baseProto, function (name) {
547
+ if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {
548
+ baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
549
+ }
550
+ });
551
+ visited.push(baseProto);
552
+ baseProto = _getObjProto(baseProto);
553
+ }
554
+ return baseFuncs;
555
+ }
556
+ function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
557
+ var instFunc = null;
558
+ if (target && _hasOwnProperty(proto, DynClassName)) {
559
+ var instFuncTable = target[DynInstFuncTable] || {};
560
+ instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];
561
+ if (!instFunc) {
562
+ _throwTypeError("Missing [" + funcName + "] " + strFunction);
563
+ }
564
+ if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
565
+ var canAddInst = !_hasOwnProperty(target, funcName);
566
+ var objProto = _getObjProto(target);
567
+ var visited = [];
568
+ while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
569
+ var protoFunc = objProto[funcName];
570
+ if (protoFunc) {
571
+ canAddInst = (protoFunc === currentDynProtoProxy);
572
+ break;
573
+ }
574
+ visited.push(objProto);
575
+ objProto = _getObjProto(objProto);
576
+ }
577
+ try {
578
+ if (canAddInst) {
579
+ target[funcName] = instFunc;
580
+ }
581
+ instFunc[DynInstChkTag] = 1;
582
+ }
583
+ catch (e) {
584
+ instFuncTable[DynAllowInstChkTag] = false;
585
+ }
586
+ }
587
+ }
588
+ return instFunc;
589
+ }
590
+ function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
591
+ var protoFunc = proto[funcName];
592
+ if (protoFunc === currentDynProtoProxy) {
593
+ protoFunc = _getObjProto(proto)[funcName];
594
+ }
595
+ if (typeof protoFunc !== strFunction) {
596
+ _throwTypeError("[" + funcName + "] is not a " + strFunction);
597
+ }
598
+ return protoFunc;
676
599
  }
600
+ function _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {
601
+ function _createDynamicPrototype(proto, funcName) {
602
+ var dynProtoProxy = function () {
603
+ var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
604
+ return instFunc.apply(this, arguments);
605
+ };
606
+ dynProtoProxy[DynProxyTag] = 1;
607
+ return dynProtoProxy;
608
+ }
609
+ if (!_isObjectOrArrayPrototype(proto)) {
610
+ var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};
611
+ var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || {});
612
+ if (instFuncTable[DynAllowInstChkTag] !== false) {
613
+ instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
614
+ }
615
+ _forEachProp(target, function (name) {
616
+ if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
617
+ instFuncs_1[name] = target[name];
618
+ delete target[name];
619
+ if (!_hasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
620
+ proto[name] = _createDynamicPrototype(proto, name);
621
+ }
622
+ }
623
+ });
624
+ }
625
+ }
626
+ function _checkPrototype(classProto, thisTarget) {
627
+ if (_objGetPrototypeOf) {
628
+ var visited = [];
629
+ var thisProto = _getObjProto(thisTarget);
630
+ while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
631
+ if (thisProto === classProto) {
632
+ return true;
633
+ }
634
+ visited.push(thisProto);
635
+ thisProto = _getObjProto(thisProto);
636
+ }
637
+ }
638
+ return false;
639
+ }
640
+ function _getObjName(target, unknownValue) {
641
+ if (_hasOwnProperty(target, Prototype)) {
642
+ return target.name || unknownValue || UnknownValue;
643
+ }
644
+ return (((target || {})[Constructor]) || {}).name || unknownValue || UnknownValue;
645
+ }
646
+ function dynamicProto(theClass, target, delegateFunc, options) {
647
+ if (!_hasOwnProperty(theClass, Prototype)) {
648
+ _throwTypeError("theClass is an invalid class definition.");
649
+ }
650
+ var classProto = theClass[Prototype];
651
+ if (!_checkPrototype(classProto, target)) {
652
+ _throwTypeError("[" + _getObjName(theClass) + "] is not in class hierarchy of [" + _getObjName(target) + "]");
653
+ }
654
+ var className = null;
655
+ if (_hasOwnProperty(classProto, DynClassName)) {
656
+ className = classProto[DynClassName];
657
+ }
658
+ else {
659
+ className = DynClassNamePrefix + _getObjName(theClass, "_") + "$" + _dynamicNames;
660
+ _dynamicNames++;
661
+ classProto[DynClassName] = className;
662
+ }
663
+ var perfOptions = dynamicProto[DynProtoDefaultOptions];
664
+ var useBaseInst = !!perfOptions[strUseBaseInst];
665
+ if (useBaseInst && options && options[strUseBaseInst] !== undefined) {
666
+ useBaseInst = !!options[strUseBaseInst];
667
+ }
668
+ var instFuncs = _getInstanceFuncs(target);
669
+ var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);
670
+ delegateFunc(target, baseFuncs);
671
+ var setInstanceFunc = !!_objGetPrototypeOf && !!perfOptions[strSetInstFuncs];
672
+ if (setInstanceFunc && options) {
673
+ setInstanceFunc = !!options[strSetInstFuncs];
674
+ }
675
+ _populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);
676
+ }
677
+ var perfDefaults = {
678
+ setInstFuncs: true,
679
+ useBaseInst: true
680
+ };
681
+ dynamicProto[DynProtoDefaultOptions] = perfDefaults;
677
682
 
678
683
  var strWindow = "window";
679
684
  var strDocument = "document";
@@ -1062,7 +1067,7 @@
1062
1067
  }
1063
1068
 
1064
1069
  var _objDefineProperty = ObjDefineProperty;
1065
- var version = "2.8.0-nightly.2204-04";
1070
+ var version = "2.8.0-nightly.2204-05";
1066
1071
  var instanceName = "." + newId(6);
1067
1072
  var _dataUid = 0;
1068
1073
  function _createAccessor(target, prop, value) {
@@ -1585,95 +1590,6 @@
1585
1590
  return _legacyCookieMgr(null, logger).del(name);
1586
1591
  }
1587
1592
 
1588
- createEnumStyle({
1589
- CRITICAL: 1 ,
1590
- WARNING: 2
1591
- });
1592
- var _InternalMessageId = createEnumStyle({
1593
- BrowserDoesNotSupportLocalStorage: 0 ,
1594
- BrowserCannotReadLocalStorage: 1 ,
1595
- BrowserCannotReadSessionStorage: 2 ,
1596
- BrowserCannotWriteLocalStorage: 3 ,
1597
- BrowserCannotWriteSessionStorage: 4 ,
1598
- BrowserFailedRemovalFromLocalStorage: 5 ,
1599
- BrowserFailedRemovalFromSessionStorage: 6 ,
1600
- CannotSendEmptyTelemetry: 7 ,
1601
- ClientPerformanceMathError: 8 ,
1602
- ErrorParsingAISessionCookie: 9 ,
1603
- ErrorPVCalc: 10 ,
1604
- ExceptionWhileLoggingError: 11 ,
1605
- FailedAddingTelemetryToBuffer: 12 ,
1606
- FailedMonitorAjaxAbort: 13 ,
1607
- FailedMonitorAjaxDur: 14 ,
1608
- FailedMonitorAjaxOpen: 15 ,
1609
- FailedMonitorAjaxRSC: 16 ,
1610
- FailedMonitorAjaxSend: 17 ,
1611
- FailedMonitorAjaxGetCorrelationHeader: 18 ,
1612
- FailedToAddHandlerForOnBeforeUnload: 19 ,
1613
- FailedToSendQueuedTelemetry: 20 ,
1614
- FailedToReportDataLoss: 21 ,
1615
- FlushFailed: 22 ,
1616
- MessageLimitPerPVExceeded: 23 ,
1617
- MissingRequiredFieldSpecification: 24 ,
1618
- NavigationTimingNotSupported: 25 ,
1619
- OnError: 26 ,
1620
- SessionRenewalDateIsZero: 27 ,
1621
- SenderNotInitialized: 28 ,
1622
- StartTrackEventFailed: 29 ,
1623
- StopTrackEventFailed: 30 ,
1624
- StartTrackFailed: 31 ,
1625
- StopTrackFailed: 32 ,
1626
- TelemetrySampledAndNotSent: 33 ,
1627
- TrackEventFailed: 34 ,
1628
- TrackExceptionFailed: 35 ,
1629
- TrackMetricFailed: 36 ,
1630
- TrackPVFailed: 37 ,
1631
- TrackPVFailedCalc: 38 ,
1632
- TrackTraceFailed: 39 ,
1633
- TransmissionFailed: 40 ,
1634
- FailedToSetStorageBuffer: 41 ,
1635
- FailedToRestoreStorageBuffer: 42 ,
1636
- InvalidBackendResponse: 43 ,
1637
- FailedToFixDepricatedValues: 44 ,
1638
- InvalidDurationValue: 45 ,
1639
- TelemetryEnvelopeInvalid: 46 ,
1640
- CreateEnvelopeError: 47 ,
1641
- CannotSerializeObject: 48 ,
1642
- CannotSerializeObjectNonSerializable: 49 ,
1643
- CircularReferenceDetected: 50 ,
1644
- ClearAuthContextFailed: 51 ,
1645
- ExceptionTruncated: 52 ,
1646
- IllegalCharsInName: 53 ,
1647
- ItemNotInArray: 54 ,
1648
- MaxAjaxPerPVExceeded: 55 ,
1649
- MessageTruncated: 56 ,
1650
- NameTooLong: 57 ,
1651
- SampleRateOutOfRange: 58 ,
1652
- SetAuthContextFailed: 59 ,
1653
- SetAuthContextFailedAccountName: 60 ,
1654
- StringValueTooLong: 61 ,
1655
- StartCalledMoreThanOnce: 62 ,
1656
- StopCalledWithoutStart: 63 ,
1657
- TelemetryInitializerFailed: 64 ,
1658
- TrackArgumentsNotSpecified: 65 ,
1659
- UrlTooLong: 66 ,
1660
- SessionStorageBufferFull: 67 ,
1661
- CannotAccessCookie: 68 ,
1662
- IdTooLong: 69 ,
1663
- InvalidEvent: 70 ,
1664
- FailedMonitorAjaxSetRequestHeader: 71 ,
1665
- SendBrowserInfoOnUserInit: 72 ,
1666
- PluginException: 73 ,
1667
- NotificationException: 74 ,
1668
- SnippetScriptLoadFailure: 99 ,
1669
- InvalidInstrumentationKey: 100 ,
1670
- CannotParseAiBlobValue: 101 ,
1671
- InvalidContentBlob: 102 ,
1672
- TrackPageActionEventFailed: 103 ,
1673
- FailedAddingCustomDefinedRequestContext: 104 ,
1674
- InMemoryStorageBufferFull: 105
1675
- });
1676
-
1677
1593
  var RequestHeaders = {
1678
1594
  requestContextHeader: "Request-Context",
1679
1595
  requestContextTargetKey: "appId",
@@ -1706,7 +1622,7 @@
1706
1622
  name = strTrim(name.toString());
1707
1623
  if (name.length > 150 ) {
1708
1624
  nameTrunc = name.substring(0, 150 );
1709
- _throwInternal(logger, 2 , _InternalMessageId.NameTooLong, "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
1625
+ _throwInternal(logger, 2 , 57 , "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
1710
1626
  }
1711
1627
  }
1712
1628
  return nameTrunc || name;
@@ -1719,20 +1635,20 @@
1719
1635
  value = strTrim(value);
1720
1636
  if (value.toString().length > maxLength) {
1721
1637
  valueTrunc = value.toString().substring(0, maxLength);
1722
- _throwInternal(logger, 2 , _InternalMessageId.StringValueTooLong, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
1638
+ _throwInternal(logger, 2 , 61 , "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
1723
1639
  }
1724
1640
  }
1725
1641
  return valueTrunc || value;
1726
1642
  }
1727
1643
  function dataSanitizeUrl(logger, url) {
1728
- return dataSanitizeInput(logger, url, 2048 , _InternalMessageId.UrlTooLong);
1644
+ return dataSanitizeInput(logger, url, 2048 , 66 );
1729
1645
  }
1730
1646
  function dataSanitizeMessage(logger, message) {
1731
1647
  var messageTrunc;
1732
1648
  if (message) {
1733
1649
  if (message.length > 32768 ) {
1734
1650
  messageTrunc = message.substring(0, 32768 );
1735
- _throwInternal(logger, 2 , _InternalMessageId.MessageTruncated, "message is too long, it has been truncated to " + 32768 + " characters.", { message: message }, true);
1651
+ _throwInternal(logger, 2 , 56 , "message is too long, it has been truncated to " + 32768 + " characters.", { message: message }, true);
1736
1652
  }
1737
1653
  }
1738
1654
  return messageTrunc || message;
@@ -1743,7 +1659,7 @@
1743
1659
  var value = "" + exception;
1744
1660
  if (value.length > 32768 ) {
1745
1661
  exceptionTrunc = value.substring(0, 32768 );
1746
- _throwInternal(logger, 2 , _InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + 32768 + " characters.", { exception: exception }, true);
1662
+ _throwInternal(logger, 2 , 52 , "exception is too long, it has been truncated to " + 32768 + " characters.", { exception: exception }, true);
1747
1663
  }
1748
1664
  }
1749
1665
  return exceptionTrunc || exception;
@@ -1757,7 +1673,7 @@
1757
1673
  value = getJSON().stringify(value);
1758
1674
  }
1759
1675
  catch (e) {
1760
- _throwInternal(logger, 2 , _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e }, true);
1676
+ _throwInternal(logger, 2 , 49 , "custom property is not valid", { exception: e }, true);
1761
1677
  }
1762
1678
  }
1763
1679
  value = dataSanitizeString(logger, value, 8192 );
@@ -1780,7 +1696,7 @@
1780
1696
  return measurements;
1781
1697
  }
1782
1698
  function dataSanitizeId(logger, id) {
1783
- return id ? dataSanitizeInput(logger, id, 128 , _InternalMessageId.IdTooLong).toString() : id;
1699
+ return id ? dataSanitizeInput(logger, id, 128 , 69 ).toString() : id;
1784
1700
  }
1785
1701
  function dataSanitizeInput(logger, input, maxLength, _msgId) {
1786
1702
  var inputTrunc;
@@ -1944,7 +1860,7 @@
1944
1860
  }
1945
1861
  catch (e) {
1946
1862
  _canUseLocalStorage = false;
1947
- _throwInternal(logger, 2 , _InternalMessageId.BrowserCannotReadLocalStorage, "Browser failed read of local storage. " + getExceptionName(e), { exception: dumpObj(e) });
1863
+ _throwInternal(logger, 2 , 1 , "Browser failed read of local storage. " + getExceptionName(e), { exception: dumpObj(e) });
1948
1864
  }
1949
1865
  }
1950
1866
  return null;
@@ -1958,7 +1874,7 @@
1958
1874
  }
1959
1875
  catch (e) {
1960
1876
  _canUseLocalStorage = false;
1961
- _throwInternal(logger, 2 , _InternalMessageId.BrowserCannotWriteLocalStorage, "Browser failed write to local storage. " + getExceptionName(e), { exception: dumpObj(e) });
1877
+ _throwInternal(logger, 2 , 3 , "Browser failed write to local storage. " + getExceptionName(e), { exception: dumpObj(e) });
1962
1878
  }
1963
1879
  }
1964
1880
  return false;
@@ -1972,7 +1888,7 @@
1972
1888
  }
1973
1889
  catch (e) {
1974
1890
  _canUseLocalStorage = false;
1975
- _throwInternal(logger, 2 , _InternalMessageId.BrowserFailedRemovalFromLocalStorage, "Browser failed removal of local storage item. " + getExceptionName(e), { exception: dumpObj(e) });
1891
+ _throwInternal(logger, 2 , 5 , "Browser failed removal of local storage item. " + getExceptionName(e), { exception: dumpObj(e) });
1976
1892
  }
1977
1893
  }
1978
1894
  return false;
@@ -2000,7 +1916,7 @@
2000
1916
  }
2001
1917
  catch (e) {
2002
1918
  _canUseSessionStorage = false;
2003
- _throwInternal(logger, 2 , _InternalMessageId.BrowserCannotReadSessionStorage, "Browser failed read of session storage. " + getExceptionName(e), { exception: dumpObj(e) });
1919
+ _throwInternal(logger, 2 , 2 , "Browser failed read of session storage. " + getExceptionName(e), { exception: dumpObj(e) });
2004
1920
  }
2005
1921
  }
2006
1922
  return null;
@@ -2014,7 +1930,7 @@
2014
1930
  }
2015
1931
  catch (e) {
2016
1932
  _canUseSessionStorage = false;
2017
- _throwInternal(logger, 2 , _InternalMessageId.BrowserCannotWriteSessionStorage, "Browser failed write to session storage. " + getExceptionName(e), { exception: dumpObj(e) });
1933
+ _throwInternal(logger, 2 , 4 , "Browser failed write to session storage. " + getExceptionName(e), { exception: dumpObj(e) });
2018
1934
  }
2019
1935
  }
2020
1936
  return false;
@@ -2028,7 +1944,7 @@
2028
1944
  }
2029
1945
  catch (e) {
2030
1946
  _canUseSessionStorage = false;
2031
- _throwInternal(logger, 2 , _InternalMessageId.BrowserFailedRemovalFromSessionStorage, "Browser failed removal of session storage item. " + getExceptionName(e), { exception: dumpObj(e) });
1947
+ _throwInternal(logger, 2 , 6 , "Browser failed removal of session storage item. " + getExceptionName(e), { exception: dumpObj(e) });
2032
1948
  }
2033
1949
  }
2034
1950
  return false;