@microsoft/applicationinsights-dependencies-js 2.8.0-beta.2203-16 → 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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Dependencies Plugin, 2.8.0-beta.2203-16
2
+ * Application Insights JavaScript SDK - Dependencies Plugin, 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$1 = "__proto__";
117
- var strUseBaseInst = 'useBaseInst';
118
- var strSetInstFuncs = 'setInstFuncs';
119
- var Obj = Object;
120
- var _objGetPrototypeOf$1 = 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$1(target) {
132
- if (target) {
133
- if (_objGetPrototypeOf$1) {
134
- return _objGetPrototypeOf$1(target);
135
- }
136
- var newProto = target[str__Proto$1] || 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$1(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$1)) {
207
- baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
208
- }
209
- });
210
- visited.push(baseProto);
211
- baseProto = _getObjProto$1(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$1(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$1(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$1(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$1) {
287
- var visited = [];
288
- var thisProto = _getObjProto$1(thisTarget);
289
- while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
290
- if (thisProto === classProto) {
291
- return true;
292
- }
293
- visited.push(thisProto);
294
- thisProto = _getObjProto$1(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$1 && !!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
  var strSetNextPlugin = "setNextPlugin";
344
103
  var strIsInitialized = "isInitialized";
@@ -351,7 +110,7 @@
351
110
  var strToISOString = "toISOString";
352
111
  var cStrTrim = "trim";
353
112
  var strToString = "toString";
354
- var str__Proto = "__proto__";
113
+ var str__Proto$1 = "__proto__";
355
114
  var strConstructor = "constructor";
356
115
  var _objDefineProperty$1 = ObjDefineProperty;
357
116
  var _objFreeze = ObjClass.freeze;
@@ -367,13 +126,13 @@
367
126
  var rCamelCase = /-([a-z])/g;
368
127
  var rNormalizeInvalid = /([^\w\d_$])/g;
369
128
  var rLeadingNumeric = /^(\d+[\w\d_$])/;
370
- var _objGetPrototypeOf = Object["getPrototypeOf"];
371
- function _getObjProto(target) {
129
+ var _objGetPrototypeOf$1 = Object["getPrototypeOf"];
130
+ function _getObjProto$1(target) {
372
131
  if (target) {
373
- if (_objGetPrototypeOf) {
374
- return _objGetPrototypeOf(target);
132
+ if (_objGetPrototypeOf$1) {
133
+ return _objGetPrototypeOf$1(target);
375
134
  }
376
- var newProto = target[str__Proto] || target[strShimPrototype] || target[strConstructor];
135
+ var newProto = target[str__Proto$1] || target[strShimPrototype] || target[strConstructor];
377
136
  if (newProto) {
378
137
  return newProto;
379
138
  }
@@ -439,7 +198,7 @@
439
198
  function isPlainObject(value) {
440
199
  var result = false;
441
200
  if (value && typeof value === "object") {
442
- var proto = _objGetPrototypeOf ? _objGetPrototypeOf(value) : _getObjProto(value);
201
+ var proto = _objGetPrototypeOf$1 ? _objGetPrototypeOf$1(value) : _getObjProto$1(value);
443
202
  if (!proto) {
444
203
  result = true;
445
204
  }
@@ -570,9 +329,6 @@
570
329
  }
571
330
  return theValue;
572
331
  }
573
- function throwError(message) {
574
- throw new Error(message);
575
- }
576
332
  function _createProxyFunction(source, funcName) {
577
333
  var srcFunc = null;
578
334
  var src = null;
@@ -593,24 +349,12 @@
593
349
  };
594
350
  }
595
351
  function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
596
- if (overwriteTarget === void 0) { overwriteTarget = true; }
597
352
  if (target && name && source) {
598
- if (overwriteTarget || isUndefined(target[name])) {
353
+ if (overwriteTarget !== false || isUndefined(target[name])) {
599
354
  target[name] = _createProxyFunction(source, theFunc);
600
355
  }
601
356
  }
602
357
  }
603
- function createEnumStyle(values) {
604
- var enumClass = {};
605
- objForEachKey(values, function (field, value) {
606
- enumClass[field] = value;
607
- if (!isUndefined(enumClass[value])) {
608
- throwError("[" + value + "] exists for " + field);
609
- }
610
- enumClass[value] = field;
611
- });
612
- return objFreeze(enumClass);
613
- }
614
358
  function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {
615
359
  var theArgs = arguments;
616
360
  var extended = theArgs[0] || {};
@@ -656,6 +400,247 @@
656
400
  return extended;
657
401
  }
658
402
 
403
+ /*!
404
+ * Microsoft Dynamic Proto Utility, 1.1.4
405
+ * Copyright (c) Microsoft and contributors. All rights reserved.
406
+ */
407
+ var Constructor = 'constructor';
408
+ var Prototype = 'prototype';
409
+ var strFunction = 'function';
410
+ var DynInstFuncTable = '_dynInstFuncs';
411
+ var DynProxyTag = '_isDynProxy';
412
+ var DynClassName = '_dynClass';
413
+ var DynClassNamePrefix = '_dynCls$';
414
+ var DynInstChkTag = '_dynInstChk';
415
+ var DynAllowInstChkTag = DynInstChkTag;
416
+ var DynProtoDefaultOptions = '_dfOpts';
417
+ var UnknownValue = '_unknown_';
418
+ var str__Proto = "__proto__";
419
+ var strUseBaseInst = 'useBaseInst';
420
+ var strSetInstFuncs = 'setInstFuncs';
421
+ var Obj = Object;
422
+ var _objGetPrototypeOf = Obj["getPrototypeOf"];
423
+ var _dynamicNames = 0;
424
+ function _hasOwnProperty(obj, prop) {
425
+ return obj && Obj[Prototype].hasOwnProperty.call(obj, prop);
426
+ }
427
+ function _isObjectOrArrayPrototype(target) {
428
+ return target && (target === Obj[Prototype] || target === Array[Prototype]);
429
+ }
430
+ function _isObjectArrayOrFunctionPrototype(target) {
431
+ return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
432
+ }
433
+ function _getObjProto(target) {
434
+ if (target) {
435
+ if (_objGetPrototypeOf) {
436
+ return _objGetPrototypeOf(target);
437
+ }
438
+ var newProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
439
+ if (newProto) {
440
+ return newProto;
441
+ }
442
+ }
443
+ return null;
444
+ }
445
+ function _forEachProp(target, func) {
446
+ var props = [];
447
+ var getOwnProps = Obj["getOwnPropertyNames"];
448
+ if (getOwnProps) {
449
+ props = getOwnProps(target);
450
+ }
451
+ else {
452
+ for (var name_1 in target) {
453
+ if (typeof name_1 === "string" && _hasOwnProperty(target, name_1)) {
454
+ props.push(name_1);
455
+ }
456
+ }
457
+ }
458
+ if (props && props.length > 0) {
459
+ for (var lp = 0; lp < props.length; lp++) {
460
+ func(props[lp]);
461
+ }
462
+ }
463
+ }
464
+ function _isDynamicCandidate(target, funcName, skipOwn) {
465
+ return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || _hasOwnProperty(target, funcName)));
466
+ }
467
+ function _throwTypeError(message) {
468
+ throw new TypeError("DynamicProto: " + message);
469
+ }
470
+ function _getInstanceFuncs(thisTarget) {
471
+ var instFuncs = {};
472
+ _forEachProp(thisTarget, function (name) {
473
+ if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {
474
+ instFuncs[name] = thisTarget[name];
475
+ }
476
+ });
477
+ return instFuncs;
478
+ }
479
+ function _hasVisited(values, value) {
480
+ for (var lp = values.length - 1; lp >= 0; lp--) {
481
+ if (values[lp] === value) {
482
+ return true;
483
+ }
484
+ }
485
+ return false;
486
+ }
487
+ function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
488
+ function _instFuncProxy(target, funcHost, funcName) {
489
+ var theFunc = funcHost[funcName];
490
+ if (theFunc[DynProxyTag] && useBaseInst) {
491
+ var instFuncTable = target[DynInstFuncTable] || {};
492
+ if (instFuncTable[DynAllowInstChkTag] !== false) {
493
+ theFunc = (instFuncTable[funcHost[DynClassName]] || {})[funcName] || theFunc;
494
+ }
495
+ }
496
+ return function () {
497
+ return theFunc.apply(target, arguments);
498
+ };
499
+ }
500
+ var baseFuncs = {};
501
+ _forEachProp(instFuncs, function (name) {
502
+ baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
503
+ });
504
+ var baseProto = _getObjProto(classProto);
505
+ var visited = [];
506
+ while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
507
+ _forEachProp(baseProto, function (name) {
508
+ if (!baseFuncs[name] && _isDynamicCandidate(baseProto, name, !_objGetPrototypeOf)) {
509
+ baseFuncs[name] = _instFuncProxy(thisTarget, baseProto, name);
510
+ }
511
+ });
512
+ visited.push(baseProto);
513
+ baseProto = _getObjProto(baseProto);
514
+ }
515
+ return baseFuncs;
516
+ }
517
+ function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
518
+ var instFunc = null;
519
+ if (target && _hasOwnProperty(proto, DynClassName)) {
520
+ var instFuncTable = target[DynInstFuncTable] || {};
521
+ instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];
522
+ if (!instFunc) {
523
+ _throwTypeError("Missing [" + funcName + "] " + strFunction);
524
+ }
525
+ if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
526
+ var canAddInst = !_hasOwnProperty(target, funcName);
527
+ var objProto = _getObjProto(target);
528
+ var visited = [];
529
+ while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
530
+ var protoFunc = objProto[funcName];
531
+ if (protoFunc) {
532
+ canAddInst = (protoFunc === currentDynProtoProxy);
533
+ break;
534
+ }
535
+ visited.push(objProto);
536
+ objProto = _getObjProto(objProto);
537
+ }
538
+ try {
539
+ if (canAddInst) {
540
+ target[funcName] = instFunc;
541
+ }
542
+ instFunc[DynInstChkTag] = 1;
543
+ }
544
+ catch (e) {
545
+ instFuncTable[DynAllowInstChkTag] = false;
546
+ }
547
+ }
548
+ }
549
+ return instFunc;
550
+ }
551
+ function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
552
+ var protoFunc = proto[funcName];
553
+ if (protoFunc === currentDynProtoProxy) {
554
+ protoFunc = _getObjProto(proto)[funcName];
555
+ }
556
+ if (typeof protoFunc !== strFunction) {
557
+ _throwTypeError("[" + funcName + "] is not a " + strFunction);
558
+ }
559
+ return protoFunc;
560
+ }
561
+ function _populatePrototype(proto, className, target, baseInstFuncs, setInstanceFunc) {
562
+ function _createDynamicPrototype(proto, funcName) {
563
+ var dynProtoProxy = function () {
564
+ var instFunc = _getInstFunc(this, funcName, proto, dynProtoProxy) || _getProtoFunc(funcName, proto, dynProtoProxy);
565
+ return instFunc.apply(this, arguments);
566
+ };
567
+ dynProtoProxy[DynProxyTag] = 1;
568
+ return dynProtoProxy;
569
+ }
570
+ if (!_isObjectOrArrayPrototype(proto)) {
571
+ var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};
572
+ var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || {});
573
+ if (instFuncTable[DynAllowInstChkTag] !== false) {
574
+ instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
575
+ }
576
+ _forEachProp(target, function (name) {
577
+ if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
578
+ instFuncs_1[name] = target[name];
579
+ delete target[name];
580
+ if (!_hasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
581
+ proto[name] = _createDynamicPrototype(proto, name);
582
+ }
583
+ }
584
+ });
585
+ }
586
+ }
587
+ function _checkPrototype(classProto, thisTarget) {
588
+ if (_objGetPrototypeOf) {
589
+ var visited = [];
590
+ var thisProto = _getObjProto(thisTarget);
591
+ while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
592
+ if (thisProto === classProto) {
593
+ return true;
594
+ }
595
+ visited.push(thisProto);
596
+ thisProto = _getObjProto(thisProto);
597
+ }
598
+ }
599
+ return false;
600
+ }
601
+ function _getObjName(target, unknownValue) {
602
+ if (_hasOwnProperty(target, Prototype)) {
603
+ return target.name || unknownValue || UnknownValue;
604
+ }
605
+ return (((target || {})[Constructor]) || {}).name || unknownValue || UnknownValue;
606
+ }
607
+ function dynamicProto(theClass, target, delegateFunc, options) {
608
+ if (!_hasOwnProperty(theClass, Prototype)) {
609
+ _throwTypeError("theClass is an invalid class definition.");
610
+ }
611
+ var classProto = theClass[Prototype];
612
+ if (!_checkPrototype(classProto, target)) {
613
+ _throwTypeError("[" + _getObjName(theClass) + "] is not in class hierarchy of [" + _getObjName(target) + "]");
614
+ }
615
+ var className = null;
616
+ if (_hasOwnProperty(classProto, DynClassName)) {
617
+ className = classProto[DynClassName];
618
+ }
619
+ else {
620
+ className = DynClassNamePrefix + _getObjName(theClass, "_") + "$" + _dynamicNames;
621
+ _dynamicNames++;
622
+ classProto[DynClassName] = className;
623
+ }
624
+ var perfOptions = dynamicProto[DynProtoDefaultOptions];
625
+ var useBaseInst = !!perfOptions[strUseBaseInst];
626
+ if (useBaseInst && options && options[strUseBaseInst] !== undefined) {
627
+ useBaseInst = !!options[strUseBaseInst];
628
+ }
629
+ var instFuncs = _getInstanceFuncs(target);
630
+ var baseFuncs = _getBaseFuncs(classProto, target, instFuncs, useBaseInst);
631
+ delegateFunc(target, baseFuncs);
632
+ var setInstanceFunc = !!_objGetPrototypeOf && !!perfOptions[strSetInstFuncs];
633
+ if (setInstanceFunc && options) {
634
+ setInstanceFunc = !!options[strSetInstFuncs];
635
+ }
636
+ _populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);
637
+ }
638
+ var perfDefaults = {
639
+ setInstFuncs: true,
640
+ useBaseInst: true
641
+ };
642
+ dynamicProto[DynProtoDefaultOptions] = perfDefaults;
643
+
659
644
  var strWindow = "window";
660
645
  var strDocument = "document";
661
646
  var strDocumentMode = "documentMode";
@@ -1142,7 +1127,7 @@
1142
1127
  }
1143
1128
 
1144
1129
  var _objDefineProperty = ObjDefineProperty;
1145
- var version = "2.8.0-beta.2203-16";
1130
+ var version = "2.8.0-nightly.2204-05";
1146
1131
  var instanceName = "." + newId(6);
1147
1132
  var _dataUid = 0;
1148
1133
  function _createAccessor(target, prop, value) {
@@ -1863,95 +1848,6 @@
1863
1848
  return oct.substr(0, 8) + oct.substr(9, 4) + "4" + oct.substr(13, 3) + clockSequenceHi + oct.substr(16, 3) + oct.substr(19, 12);
1864
1849
  }
1865
1850
 
1866
- var LoggingSeverity = createEnumStyle({
1867
- CRITICAL: 1 ,
1868
- WARNING: 2
1869
- });
1870
- var _InternalMessageId = createEnumStyle({
1871
- BrowserDoesNotSupportLocalStorage: 0 ,
1872
- BrowserCannotReadLocalStorage: 1 ,
1873
- BrowserCannotReadSessionStorage: 2 ,
1874
- BrowserCannotWriteLocalStorage: 3 ,
1875
- BrowserCannotWriteSessionStorage: 4 ,
1876
- BrowserFailedRemovalFromLocalStorage: 5 ,
1877
- BrowserFailedRemovalFromSessionStorage: 6 ,
1878
- CannotSendEmptyTelemetry: 7 ,
1879
- ClientPerformanceMathError: 8 ,
1880
- ErrorParsingAISessionCookie: 9 ,
1881
- ErrorPVCalc: 10 ,
1882
- ExceptionWhileLoggingError: 11 ,
1883
- FailedAddingTelemetryToBuffer: 12 ,
1884
- FailedMonitorAjaxAbort: 13 ,
1885
- FailedMonitorAjaxDur: 14 ,
1886
- FailedMonitorAjaxOpen: 15 ,
1887
- FailedMonitorAjaxRSC: 16 ,
1888
- FailedMonitorAjaxSend: 17 ,
1889
- FailedMonitorAjaxGetCorrelationHeader: 18 ,
1890
- FailedToAddHandlerForOnBeforeUnload: 19 ,
1891
- FailedToSendQueuedTelemetry: 20 ,
1892
- FailedToReportDataLoss: 21 ,
1893
- FlushFailed: 22 ,
1894
- MessageLimitPerPVExceeded: 23 ,
1895
- MissingRequiredFieldSpecification: 24 ,
1896
- NavigationTimingNotSupported: 25 ,
1897
- OnError: 26 ,
1898
- SessionRenewalDateIsZero: 27 ,
1899
- SenderNotInitialized: 28 ,
1900
- StartTrackEventFailed: 29 ,
1901
- StopTrackEventFailed: 30 ,
1902
- StartTrackFailed: 31 ,
1903
- StopTrackFailed: 32 ,
1904
- TelemetrySampledAndNotSent: 33 ,
1905
- TrackEventFailed: 34 ,
1906
- TrackExceptionFailed: 35 ,
1907
- TrackMetricFailed: 36 ,
1908
- TrackPVFailed: 37 ,
1909
- TrackPVFailedCalc: 38 ,
1910
- TrackTraceFailed: 39 ,
1911
- TransmissionFailed: 40 ,
1912
- FailedToSetStorageBuffer: 41 ,
1913
- FailedToRestoreStorageBuffer: 42 ,
1914
- InvalidBackendResponse: 43 ,
1915
- FailedToFixDepricatedValues: 44 ,
1916
- InvalidDurationValue: 45 ,
1917
- TelemetryEnvelopeInvalid: 46 ,
1918
- CreateEnvelopeError: 47 ,
1919
- CannotSerializeObject: 48 ,
1920
- CannotSerializeObjectNonSerializable: 49 ,
1921
- CircularReferenceDetected: 50 ,
1922
- ClearAuthContextFailed: 51 ,
1923
- ExceptionTruncated: 52 ,
1924
- IllegalCharsInName: 53 ,
1925
- ItemNotInArray: 54 ,
1926
- MaxAjaxPerPVExceeded: 55 ,
1927
- MessageTruncated: 56 ,
1928
- NameTooLong: 57 ,
1929
- SampleRateOutOfRange: 58 ,
1930
- SetAuthContextFailed: 59 ,
1931
- SetAuthContextFailedAccountName: 60 ,
1932
- StringValueTooLong: 61 ,
1933
- StartCalledMoreThanOnce: 62 ,
1934
- StopCalledWithoutStart: 63 ,
1935
- TelemetryInitializerFailed: 64 ,
1936
- TrackArgumentsNotSpecified: 65 ,
1937
- UrlTooLong: 66 ,
1938
- SessionStorageBufferFull: 67 ,
1939
- CannotAccessCookie: 68 ,
1940
- IdTooLong: 69 ,
1941
- InvalidEvent: 70 ,
1942
- FailedMonitorAjaxSetRequestHeader: 71 ,
1943
- SendBrowserInfoOnUserInit: 72 ,
1944
- PluginException: 73 ,
1945
- NotificationException: 74 ,
1946
- SnippetScriptLoadFailure: 99 ,
1947
- InvalidInstrumentationKey: 100 ,
1948
- CannotParseAiBlobValue: 101 ,
1949
- InvalidContentBlob: 102 ,
1950
- TrackPageActionEventFailed: 103 ,
1951
- FailedAddingCustomDefinedRequestContext: 104 ,
1952
- InMemoryStorageBufferFull: 105
1953
- });
1954
-
1955
1851
  var aiInstrumentHooks = "_aiHooks";
1956
1852
  var cbNames = [
1957
1853
  "req", "rsp", "hkErr", "fnErr"
@@ -2043,7 +1939,7 @@
2043
1939
  owner = target;
2044
1940
  }
2045
1941
  else if (checkPrototype) {
2046
- owner = _getOwner(_getObjProto(target), name, false);
1942
+ owner = _getOwner(_getObjProto$1(target), name, false);
2047
1943
  }
2048
1944
  }
2049
1945
  return owner;
@@ -2127,7 +2023,7 @@
2127
2023
  name = strTrim(name.toString());
2128
2024
  if (name.length > 150 ) {
2129
2025
  nameTrunc = name.substring(0, 150 );
2130
- _throwInternal(logger, 2 , _InternalMessageId.NameTooLong, "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
2026
+ _throwInternal(logger, 2 , 57 , "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
2131
2027
  }
2132
2028
  }
2133
2029
  return nameTrunc || name;
@@ -2140,13 +2036,13 @@
2140
2036
  value = strTrim(value);
2141
2037
  if (value.toString().length > maxLength) {
2142
2038
  valueTrunc = value.toString().substring(0, maxLength);
2143
- _throwInternal(logger, 2 , _InternalMessageId.StringValueTooLong, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
2039
+ _throwInternal(logger, 2 , 61 , "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
2144
2040
  }
2145
2041
  }
2146
2042
  return valueTrunc || value;
2147
2043
  }
2148
2044
  function dataSanitizeUrl(logger, url) {
2149
- return dataSanitizeInput(logger, url, 2048 , _InternalMessageId.UrlTooLong);
2045
+ return dataSanitizeInput(logger, url, 2048 , 66 );
2150
2046
  }
2151
2047
  function dataSanitizeProperties(logger, properties) {
2152
2048
  if (properties) {
@@ -2157,7 +2053,7 @@
2157
2053
  value = getJSON().stringify(value);
2158
2054
  }
2159
2055
  catch (e) {
2160
- _throwInternal(logger, 2 , _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e }, true);
2056
+ _throwInternal(logger, 2 , 49 , "custom property is not valid", { exception: e }, true);
2161
2057
  }
2162
2058
  }
2163
2059
  value = dataSanitizeString(logger, value, 8192 );
@@ -2402,22 +2298,10 @@
2402
2298
  return result;
2403
2299
  }
2404
2300
 
2405
- var RemoteDependencyData$1 = /** @class */ (function () {
2406
- function RemoteDependencyData() {
2407
- this.ver = 2;
2408
- this.success = true;
2409
- this.properties = {};
2410
- this.measurements = {};
2411
- }
2412
- return RemoteDependencyData;
2413
- }());
2414
-
2415
- var RemoteDependencyData = /** @class */ (function (_super) {
2416
- __extendsFn(RemoteDependencyData, _super);
2301
+ var RemoteDependencyData = /** @class */ (function () {
2417
2302
  function RemoteDependencyData(logger, id, absoluteUrl, commandName, value, success, resultCode, method, requestAPI, correlationContext, properties, measurements) {
2418
2303
  if (requestAPI === void 0) { requestAPI = "Ajax"; }
2419
- var _this = _super.call(this) || this;
2420
- _this.aiDataContract = {
2304
+ this.aiDataContract = {
2421
2305
  id: 1 ,
2422
2306
  ver: 1 ,
2423
2307
  name: 0 ,
@@ -2440,26 +2324,27 @@
2440
2324
  commandName: 0 ,
2441
2325
  dependencyTypeName: 0
2442
2326
  };
2443
- _this.id = id;
2444
- _this.duration = msToTimeSpan(value);
2445
- _this.success = success;
2446
- _this.resultCode = resultCode + "";
2447
- _this.type = dataSanitizeString(logger, requestAPI);
2327
+ var _self = this;
2328
+ _self.ver = 2;
2329
+ _self.id = id;
2330
+ _self.duration = msToTimeSpan(value);
2331
+ _self.success = success;
2332
+ _self.resultCode = resultCode + "";
2333
+ _self.type = dataSanitizeString(logger, requestAPI);
2448
2334
  var dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);
2449
- _this.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data;
2450
- _this.target = dataSanitizeString(logger, dependencyFields.target);
2335
+ _self.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data;
2336
+ _self.target = dataSanitizeString(logger, dependencyFields.target);
2451
2337
  if (correlationContext) {
2452
- _this.target = "".concat(_this.target, " | ").concat(correlationContext);
2338
+ _self.target = "".concat(_self.target, " | ").concat(correlationContext);
2453
2339
  }
2454
- _this.name = dataSanitizeString(logger, dependencyFields.name);
2455
- _this.properties = dataSanitizeProperties(logger, properties);
2456
- _this.measurements = dataSanitizeMeasurements(logger, measurements);
2457
- return _this;
2340
+ _self.name = dataSanitizeString(logger, dependencyFields.name);
2341
+ _self.properties = dataSanitizeProperties(logger, properties);
2342
+ _self.measurements = dataSanitizeMeasurements(logger, measurements);
2458
2343
  }
2459
2344
  RemoteDependencyData.envelopeType = "Microsoft.ApplicationInsights.{0}.RemoteDependency";
2460
2345
  RemoteDependencyData.dataType = "RemoteDependencyData";
2461
2346
  return RemoteDependencyData;
2462
- }(RemoteDependencyData$1));
2347
+ }());
2463
2348
 
2464
2349
  var TelemetryItemCreator = /** @class */ (function () {
2465
2350
  function TelemetryItemCreator() {
@@ -2780,7 +2665,7 @@
2780
2665
  }
2781
2666
  catch (e) {
2782
2667
  result = false;
2783
- _throwInternalCritical(ajaxMonitorInstance, _InternalMessageId.FailedMonitorAjaxOpen, "Failed to enable XMLHttpRequest monitoring, extension is not supported", {
2668
+ _throwInternalCritical(ajaxMonitorInstance, 15 , "Failed to enable XMLHttpRequest monitoring, extension is not supported", {
2784
2669
  exception: dumpObj(e)
2785
2670
  });
2786
2671
  }
@@ -2801,10 +2686,10 @@
2801
2686
  return result;
2802
2687
  }
2803
2688
  function _throwInternalCritical(ajaxMonitorInstance, msgId, message, properties, isUserAct) {
2804
- ajaxMonitorInstance[strDiagLog]()[strThrowInternal](LoggingSeverity.CRITICAL, msgId, message, properties, isUserAct);
2689
+ ajaxMonitorInstance[strDiagLog]()[strThrowInternal](1 , msgId, message, properties, isUserAct);
2805
2690
  }
2806
2691
  function _throwInternalWarning(ajaxMonitorInstance, msgId, message, properties, isUserAct) {
2807
- ajaxMonitorInstance[strDiagLog]()[strThrowInternal](LoggingSeverity.WARNING, msgId, message, properties, isUserAct);
2692
+ ajaxMonitorInstance[strDiagLog]()[strThrowInternal](2 , msgId, message, properties, isUserAct);
2808
2693
  }
2809
2694
  function _createErrorCallbackFunc(ajaxMonitorInstance, internalMessage, message) {
2810
2695
  return function (args) {
@@ -2939,7 +2824,7 @@
2939
2824
  _self.core.track(item);
2940
2825
  }
2941
2826
  else if (_trackAjaxAttempts === _maxAjaxCallsPerView) {
2942
- _throwInternalCritical(_self, _InternalMessageId.MaxAjaxPerPVExceeded, "Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.", true);
2827
+ _throwInternalCritical(_self, 55 , "Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.", true);
2943
2828
  }
2944
2829
  ++_trackAjaxAttempts;
2945
2830
  };
@@ -3067,7 +2952,7 @@
3067
2952
  }
3068
2953
  }
3069
2954
  },
3070
- hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxOpen, "Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")
2955
+ hkErr: _createErrorCallbackFunc(_self, 15 , "Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")
3071
2956
  }));
3072
2957
  _fetchInitialized = true;
3073
2958
  }
@@ -3102,7 +2987,7 @@
3102
2987
  }
3103
2988
  }
3104
2989
  },
3105
- hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxOpen, "Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")
2990
+ hkErr: _createErrorCallbackFunc(_self, 15 , "Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")
3106
2991
  });
3107
2992
  _hookProto(XMLHttpRequest, "send", {
3108
2993
  ns: _evtNamespace,
@@ -3118,7 +3003,7 @@
3118
3003
  }
3119
3004
  }
3120
3005
  },
3121
- hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxSend, "Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")
3006
+ hkErr: _createErrorCallbackFunc(_self, 17 , "Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")
3122
3007
  });
3123
3008
  _hookProto(XMLHttpRequest, "abort", {
3124
3009
  ns: _evtNamespace,
@@ -3132,7 +3017,7 @@
3132
3017
  }
3133
3018
  }
3134
3019
  },
3135
- hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxAbort, "Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")
3020
+ hkErr: _createErrorCallbackFunc(_self, 13 , "Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")
3136
3021
  });
3137
3022
  _hookProto(XMLHttpRequest, "setRequestHeader", {
3138
3023
  ns: _evtNamespace,
@@ -3144,7 +3029,7 @@
3144
3029
  }
3145
3030
  }
3146
3031
  },
3147
- hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxSetRequestHeader, "Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")
3032
+ hkErr: _createErrorCallbackFunc(_self, 71 , "Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")
3148
3033
  });
3149
3034
  _xhrInitialized = true;
3150
3035
  }
@@ -3225,7 +3110,7 @@
3225
3110
  catch (e) {
3226
3111
  var exceptionText = dumpObj(e);
3227
3112
  if (!exceptionText || _indexOf(exceptionText.toLowerCase(), "c00c023f") === -1) {
3228
- _throwInternalCritical(_self, _InternalMessageId.FailedMonitorAjaxRSC, "Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.", {
3113
+ _throwInternalCritical(_self, 16 , "Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.", {
3229
3114
  ajaxDiagnosticsMessage: _getFailedAjaxDiagnosticsMessage(xhr),
3230
3115
  exception: exceptionText
3231
3116
  });
@@ -3254,7 +3139,7 @@
3254
3139
  if (e) {
3255
3140
  errorProps["exception"] = dumpObj(e);
3256
3141
  }
3257
- _throwInternalWarning(_self, _InternalMessageId.FailedMonitorAjaxDur, "Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.", errorProps);
3142
+ _throwInternalWarning(_self, 14 , "Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.", errorProps);
3258
3143
  }
3259
3144
  _findPerfResourceEntry("xmlhttprequest", ajaxData, function () {
3260
3145
  try {
@@ -3292,7 +3177,7 @@
3292
3177
  }
3293
3178
  }
3294
3179
  catch (e) {
3295
- _throwInternalWarning(_self, _InternalMessageId.FailedAddingCustomDefinedRequestContext, "Failed to add custom defined request context as configured call back may missing a null check.");
3180
+ _throwInternalWarning(_self, 104 , "Failed to add custom defined request context as configured call back may missing a null check.");
3296
3181
  }
3297
3182
  if (dependency) {
3298
3183
  if (properties !== undefined) {
@@ -3330,7 +3215,7 @@
3330
3215
  }
3331
3216
  }
3332
3217
  catch (e) {
3333
- _throwInternalWarning(_self, _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, "Failed to get Request-Context correlation header as it may be not included in the response or not accessible.", {
3218
+ _throwInternalWarning(_self, 18 , "Failed to get Request-Context correlation header as it may be not included in the response or not accessible.", {
3334
3219
  ajaxDiagnosticsMessage: _getFailedAjaxDiagnosticsMessage(xhr),
3335
3220
  exception: dumpObj(e)
3336
3221
  });
@@ -3447,7 +3332,7 @@
3447
3332
  }
3448
3333
  }
3449
3334
  catch (e) {
3450
- _throwInternalCritical(_self, _InternalMessageId.FailedMonitorAjaxOpen, "Failed to grab failed fetch diagnostics message", { exception: dumpObj(e) });
3335
+ _throwInternalCritical(_self, 15 , "Failed to grab failed fetch diagnostics message", { exception: dumpObj(e) });
3451
3336
  }
3452
3337
  return result;
3453
3338
  }
@@ -3474,7 +3359,7 @@
3474
3359
  }
3475
3360
  }
3476
3361
  catch (e) {
3477
- _throwInternalWarning(_self, _InternalMessageId.FailedAddingCustomDefinedRequestContext, "Failed to add custom defined request context as configured call back may missing a null check.");
3362
+ _throwInternalWarning(_self, 104 , "Failed to add custom defined request context as configured call back may missing a null check.");
3478
3363
  }
3479
3364
  if (dependency) {
3480
3365
  if (properties !== undefined) {
@@ -3483,13 +3368,13 @@
3483
3368
  _self[strTrackDependencyDataInternal](dependency);
3484
3369
  }
3485
3370
  else {
3486
- _reportFetchError(_InternalMessageId.FailedMonitorAjaxDur, null, {
3371
+ _reportFetchError(14 , null, {
3487
3372
  requestSentTime: ajaxData.requestSentTime,
3488
3373
  responseFinishedTime: ajaxData.responseFinishedTime
3489
3374
  });
3490
3375
  }
3491
3376
  }, function (e) {
3492
- _reportFetchError(_InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, e, null);
3377
+ _reportFetchError(18 , e, null);
3493
3378
  });
3494
3379
  }
3495
3380
  function _getFetchCorrelationContext(response) {
@@ -3499,7 +3384,7 @@
3499
3384
  return CorrelationIdHelper.getCorrelationContext(responseHeader);
3500
3385
  }
3501
3386
  catch (e) {
3502
- _throwInternalWarning(_self, _InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, "Failed to get Request-Context correlation header as it may be not included in the response or not accessible.", {
3387
+ _throwInternalWarning(_self, 18 , "Failed to get Request-Context correlation header as it may be not included in the response or not accessible.", {
3503
3388
  fetchDiagnosticsMessage: _getFailedFetchDiagnosticsMessage(response),
3504
3389
  exception: dumpObj(e)
3505
3390
  });