@microsoft/1ds-post-js 4.1.0-nightly3.2402-03 → 4.1.0-nightly3.2402-08

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 (50) hide show
  1. package/bundle/es5/{ms.post-4.1.0-nightly3.2402-03.gbl.js → ms.post-4.1.0-nightly3.2402-08.gbl.js} +109 -133
  2. package/bundle/es5/ms.post-4.1.0-nightly3.2402-08.gbl.js.map +1 -0
  3. package/bundle/es5/ms.post-4.1.0-nightly3.2402-08.gbl.min.js +7 -0
  4. package/bundle/es5/ms.post-4.1.0-nightly3.2402-08.gbl.min.js.map +1 -0
  5. package/bundle/es5/ms.post-4.1.0-nightly3.2402-08.integrity.json +46 -0
  6. package/bundle/es5/{ms.post-4.1.0-nightly3.2402-03.js → ms.post-4.1.0-nightly3.2402-08.js} +109 -133
  7. package/bundle/es5/ms.post-4.1.0-nightly3.2402-08.js.map +1 -0
  8. package/bundle/es5/ms.post-4.1.0-nightly3.2402-08.min.js +7 -0
  9. package/bundle/es5/ms.post-4.1.0-nightly3.2402-08.min.js.map +1 -0
  10. package/bundle/es5/ms.post.gbl.js +108 -132
  11. package/bundle/es5/ms.post.gbl.js.map +1 -1
  12. package/bundle/es5/ms.post.gbl.min.js +2 -2
  13. package/bundle/es5/ms.post.gbl.min.js.map +1 -1
  14. package/bundle/es5/ms.post.integrity.json +17 -17
  15. package/bundle/es5/ms.post.js +108 -132
  16. package/bundle/es5/ms.post.js.map +1 -1
  17. package/bundle/es5/ms.post.min.js +2 -2
  18. package/bundle/es5/ms.post.min.js.map +1 -1
  19. package/dist/es5/ms.post.js +106 -130
  20. package/dist/es5/ms.post.js.map +1 -1
  21. package/dist/es5/ms.post.min.js +2 -2
  22. package/dist/es5/ms.post.min.js.map +1 -1
  23. package/dist-es5/BatchNotificationActions.js +1 -1
  24. package/dist-es5/ClockSkewManager.js +1 -1
  25. package/dist-es5/DataModels.js +1 -1
  26. package/dist-es5/EventBatch.js +1 -1
  27. package/dist-es5/HttpManager.js +7 -3
  28. package/dist-es5/HttpManager.js.map +1 -1
  29. package/dist-es5/Index.js +1 -1
  30. package/dist-es5/InternalConstants.js +2 -1
  31. package/dist-es5/InternalConstants.js.map +1 -1
  32. package/dist-es5/KillSwitch.js +1 -1
  33. package/dist-es5/PostChannel.js +13 -5
  34. package/dist-es5/PostChannel.js.map +1 -1
  35. package/dist-es5/RetryPolicy.js +1 -1
  36. package/dist-es5/Serializer.js +1 -1
  37. package/dist-es5/TimeoutOverrideWrapper.js +1 -1
  38. package/dist-es5/__DynamicConstants.js +2 -1
  39. package/dist-es5/__DynamicConstants.js.map +1 -1
  40. package/dist-es5/typings/XDomainRequest.js +1 -1
  41. package/package.json +2 -2
  42. package/types/1ds-post-js.d.ts +11 -1
  43. package/types/1ds-post-js.namespaced.d.ts +11 -1
  44. package/bundle/es5/ms.post-4.1.0-nightly3.2402-03.gbl.js.map +0 -1
  45. package/bundle/es5/ms.post-4.1.0-nightly3.2402-03.gbl.min.js +0 -7
  46. package/bundle/es5/ms.post-4.1.0-nightly3.2402-03.gbl.min.js.map +0 -1
  47. package/bundle/es5/ms.post-4.1.0-nightly3.2402-03.integrity.json +0 -46
  48. package/bundle/es5/ms.post-4.1.0-nightly3.2402-03.js.map +0 -1
  49. package/bundle/es5/ms.post-4.1.0-nightly3.2402-03.min.js +0 -7
  50. package/bundle/es5/ms.post-4.1.0-nightly3.2402-03.min.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * 1DS JS SDK POST plugin, 4.1.0-nightly3.2402-03
2
+ * 1DS JS SDK POST plugin, 4.1.0-nightly3.2402-08
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
6
6
  (function (global, factory) {
7
7
  var undef = "undefined";
8
- var nsKey, key, nm, theExports = {}, modName = "es5_ms_post_4_1_0_nightly3_2402_03", msMod="__ms$mod__";
9
- var mods={}, modDetail=mods[modName]={}, ver="4.1.0-nightly3.2402-03";
8
+ var nsKey, key, nm, theExports = {}, modName = "es5_ms_post_4_1_0_nightly3_2402_08", msMod="__ms$mod__";
9
+ var mods={}, modDetail=mods[modName]={}, ver="4.1.0-nightly3.2402-08";
10
10
  // Versioned namespace "oneDS4"
11
11
  var exportNs=global, nsKey="oneDS4", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
12
12
  // Global namespace "oneDS"
@@ -58,6 +58,7 @@ var VALUE = "value";
58
58
  var NAME = "name";
59
59
  var SLICE = "slice";
60
60
  var CALL = "call";
61
+ var TO_STRING = "toString";
61
62
  var ObjClass = Object;
62
63
  var ObjProto = ObjClass[PROTOTYPE];
63
64
  var StrCls = String;
@@ -66,14 +67,15 @@ var MathCls = Math;
66
67
  var ArrCls = Array;
67
68
  var ArrProto = ArrCls[PROTOTYPE];
68
69
 
69
- function safeGet(cb, defValue) {
70
- var result = defValue;
70
+ function safe(func, argArray) {
71
71
  try {
72
- result = cb();
72
+ return {
73
+ v: func.apply(this, argArray)
74
+ };
73
75
  }
74
76
  catch (e) {
77
+ return { e: e };
75
78
  }
76
- return result;
77
79
  }
78
80
 
79
81
  /*#__NO_SIDE_EFFECTS__*/
@@ -83,17 +85,6 @@ function _createIs(theType) {
83
85
  };
84
86
  }
85
87
  /*#__NO_SIDE_EFFECTS__*/
86
- function _createObjIs(theName) {
87
- var theType = "[object " + theName + "]";
88
- return function (value) {
89
- return !!(value && objToString(value) === theType);
90
- };
91
- }
92
- /*#__NO_SIDE_EFFECTS__*/
93
- function objToString(value) {
94
- return ObjProto.toString[CALL](value);
95
- }
96
- /*#__NO_SIDE_EFFECTS__*/
97
88
  function isUndefined(value) {
98
89
  return typeof value === UNDEFINED || value === UNDEFINED;
99
90
  }
@@ -121,7 +112,6 @@ function isObject(value) {
121
112
  var isArray = ArrCls.isArray;
122
113
  var isNumber = ( /*#__PURE__*/_createIs(NUMBER));
123
114
  var isBoolean = ( /*#__PURE__*/_createIs(BOOLEAN));
124
- var isError = ( /*#__PURE__*/_createObjIs("Error"));
125
115
  /*#__NO_SIDE_EFFECTS__*/
126
116
  function isPromiseLike(value) {
127
117
  return !!(value && value.then && isFunction(value.then));
@@ -131,7 +121,7 @@ var objGetOwnPropertyDescriptor = ObjClass.getOwnPropertyDescriptor;
131
121
 
132
122
  /*#__NO_SIDE_EFFECTS__*/
133
123
  function objHasOwnProperty(obj, prop) {
134
- return obj && ObjProto.hasOwnProperty[CALL](obj, prop);
124
+ return !!obj && ObjProto.hasOwnProperty[CALL](obj, prop);
135
125
  }
136
126
 
137
127
  var objHasOwn = ObjClass["hasOwn"] || polyObjHasOwn;
@@ -175,13 +165,7 @@ function _getProto(value) {
175
165
  return value[__PROTO__] || NULL_VALUE;
176
166
  }
177
167
  var objAssign = ObjClass["assign"];
178
- /*#__NO_SIDE_EFFECTS__*/
179
- function objKeys(value) {
180
- if (!isObject(value) || value === NULL_VALUE) {
181
- throwTypeError("objKeys called on non-object");
182
- }
183
- return ObjClass.keys(value);
184
- }
168
+ var objKeys = ObjClass.keys;
185
169
  function objDeepFreeze(value) {
186
170
  if (_objFreeze) {
187
171
  objForEachKey(value, function (key, value) {
@@ -224,7 +208,6 @@ var asString = StrCls;
224
208
 
225
209
  var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
226
210
  var _globalCfg;
227
- /*#__NO_SIDE_EFFECTS__*/
228
211
  function _getGlobalValue() {
229
212
  var result;
230
213
  if (typeof globalThis !== UNDEFINED) {
@@ -244,52 +227,33 @@ function _getGlobalValue() {
244
227
  /*#__NO_SIDE_EFFECTS__*/
245
228
  function _getGlobalConfig() {
246
229
  if (!_globalCfg) {
247
- var gbl = _getGlobalValue() || {};
230
+ var gbl = safe(_getGlobalValue).v || {};
248
231
  _globalCfg = gbl[GLOBAL_CONFIG_KEY] = gbl[GLOBAL_CONFIG_KEY] || {};
249
232
  }
250
233
  return _globalCfg;
251
234
  }
252
235
 
236
+ var ERROR_TYPE = "[object Error]";
253
237
  /*#__NO_SIDE_EFFECTS__*/
254
238
  function dumpObj(object, format) {
255
239
  var propertyValueDump = EMPTY;
256
- if (isError(object)) {
257
- propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
240
+ var objType = ObjProto[TO_STRING][CALL](object);
241
+ if (objType === ERROR_TYPE) {
242
+ object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
258
243
  }
259
- else {
260
- try {
261
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? (isNumber(format) ? format : 4) : UNDEF_VALUE);
262
- }
263
- catch (e) {
264
- propertyValueDump = " - " + dumpObj(e, format);
265
- }
244
+ try {
245
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
246
+ propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
247
+ }
248
+ catch (e) {
249
+ propertyValueDump = " - " + dumpObj(e, format);
266
250
  }
267
- return objToString(object) + ": " + propertyValueDump;
251
+ return objType + ": " + propertyValueDump;
268
252
  }
269
253
 
270
254
  var _slice;
271
- function _throwMissingFunction(funcName, thisArg) {
272
- throwTypeError("'" + asString(funcName) + "' not defined for " + dumpObj(thisArg));
273
- }
274
- /*#__NO_SIDE_EFFECTS__*/
275
- function _unwrapInstFunction(funcName) {
276
- _slice = _slice || ArrProto[SLICE];
277
- return function (thisArg) {
278
- return thisArg[funcName].apply(thisArg, _slice[CALL](arguments, 1));
279
- };
280
- }
281
- /*#__NO_SIDE_EFFECTS__*/
282
- function _unwrapFunction(funcName, clsProto) {
283
- _slice = _slice || ArrProto[SLICE];
284
- var clsFn = clsProto && clsProto[funcName];
285
- return function (thisArg) {
286
- var theFunc = (thisArg && thisArg[funcName]) || clsFn;
287
- if (theFunc) {
288
- return theFunc.apply(thisArg, _slice[CALL](arguments, 1));
289
- }
290
- _throwMissingFunction(funcName, thisArg);
291
- };
292
- }
255
+ var _unwrapInstFunction = _unwrapFunctionWithPoly;
256
+ var _unwrapFunction = _unwrapFunctionWithPoly;
293
257
  /*#__NO_SIDE_EFFECTS__*/
294
258
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
295
259
  _slice = _slice || ArrProto[SLICE];
@@ -300,7 +264,7 @@ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
300
264
  var theArgs = arguments;
301
265
  return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
302
266
  }
303
- _throwMissingFunction(funcName, thisArg);
267
+ throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
304
268
  };
305
269
  }
306
270
 
@@ -332,18 +296,6 @@ function strLeft(value, count) {
332
296
  return strSubstring(value, 0, count);
333
297
  }
334
298
 
335
- var strStartsWith = ( /*#__PURE__*/_unwrapFunctionWithPoly("startsWith", StrProto, polyStrStartsWith));
336
- /*#__NO_SIDE_EFFECTS__*/
337
- function polyStrStartsWith(value, searchString, position) {
338
- if (!isString(value)) {
339
- throwTypeError("'" + dumpObj(value) + "' is not a string");
340
- }
341
- var searchValue = isString(searchString) ? searchString : asString(searchString);
342
- var chkLen = searchValue[LENGTH];
343
- var pos = position > 0 ? position : 0;
344
- return strSubstring(value, pos, pos + chkLen) === searchValue;
345
- }
346
-
347
299
  var UNIQUE_REGISTRY_ID = "_urid";
348
300
  var _polySymbols;
349
301
  /*#__NO_SIDE_EFFECTS__*/
@@ -370,7 +322,7 @@ function polySymbolFor(key) {
370
322
  if (!objHasOwn(registry.k, key)) {
371
323
  var newSymbol_1 = polyNewSymbol(key);
372
324
  var regId_1 = objKeys(registry.s).length;
373
- newSymbol_1[UNIQUE_REGISTRY_ID] = function () { return regId_1 + "_" + newSymbol_1.toString(); };
325
+ newSymbol_1[UNIQUE_REGISTRY_ID] = function () { return regId_1 + "_" + newSymbol_1[TO_STRING](); };
374
326
  registry.k[key] = newSymbol_1;
375
327
  registry.s[newSymbol_1[UNIQUE_REGISTRY_ID]()] = asString(key);
376
328
  }
@@ -420,13 +372,12 @@ function objDefine(target, key, propDesc) {
420
372
  }
421
373
 
422
374
  var _globalLazyTestHooks;
423
- var _fetchLazyTestHooks = function () {
375
+ function _initTestHooks() {
424
376
  _globalLazyTestHooks = _getGlobalConfig();
425
- _fetchLazyTestHooks = NULL_VALUE;
426
- };
377
+ }
427
378
  function getLazy(cb) {
428
379
  var lazyValue = {};
429
- _fetchLazyTestHooks && _fetchLazyTestHooks();
380
+ !_globalLazyTestHooks && _initTestHooks();
430
381
  lazyValue.b = _globalLazyTestHooks.lzy;
431
382
  objDefineProp(lazyValue, "v", {
432
383
  configurable: true,
@@ -436,21 +387,27 @@ function getLazy(cb) {
436
387
  objDefineProp(lazyValue, "v", {
437
388
  value: result
438
389
  });
439
- if (lazyValue.b) {
440
- delete lazyValue.b;
441
- }
442
- }
443
- if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {
444
- lazyValue.b = _globalLazyTestHooks.lzy;
445
390
  }
391
+ lazyValue.b = _globalLazyTestHooks.lzy;
446
392
  return result;
447
393
  }
448
394
  });
449
395
  return lazyValue;
450
396
  }
451
397
 
398
+ /*#__NO_SIDE_EFFECTS__*/
452
399
  function safeGetLazy(cb, defValue) {
453
- return getLazy(function () { return safeGet(cb, defValue); });
400
+ return getLazy(function () {
401
+ var result = safe(cb);
402
+ return result.e ? defValue : result.v;
403
+ });
404
+ }
405
+
406
+ /*#__NO_SIDE_EFFECTS__*/
407
+ function createCachedValue(value) {
408
+ return objDefineProp({
409
+ toJSON: function () { return value; }
410
+ }, "v", { value: value });
454
411
  }
455
412
 
456
413
  var WINDOW = "window";
@@ -461,11 +418,12 @@ var _cachedNavigator;
461
418
  var _isNode;
462
419
  /*#__NO_SIDE_EFFECTS__*/
463
420
  function lazySafeGetInst(name) {
464
- return safeGetLazy(function () { return getInst(name) || UNDEF_VALUE; }, UNDEF_VALUE);
421
+ return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
465
422
  }
466
423
  /*#__NO_SIDE_EFFECTS__*/
467
424
  function getGlobal(useCached) {
468
- (!_cachedGlobal || useCached === false || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedGlobal.b)) && (_cachedGlobal = safeGetLazy(_getGlobalValue, NULL_VALUE));
425
+ !_globalLazyTestHooks && _initTestHooks();
426
+ (!_cachedGlobal || useCached === false || _globalLazyTestHooks.lzy) && (_cachedGlobal = createCachedValue(safe(_getGlobalValue).v || NULL_VALUE));
469
427
  return _cachedGlobal.v;
470
428
  }
471
429
  /*#__NO_SIDE_EFFECTS__*/
@@ -481,7 +439,8 @@ function getInst(name, useCached) {
481
439
  }
482
440
  /*#__NO_SIDE_EFFECTS__*/
483
441
  function getDocument() {
484
- (!_cachedDocument || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedDocument.b)) && (_cachedDocument = lazySafeGetInst("document"));
442
+ !_globalLazyTestHooks && _initTestHooks();
443
+ (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
485
444
  return _cachedDocument.v;
486
445
  }
487
446
  /*#__NO_SIDE_EFFECTS__*/
@@ -490,7 +449,8 @@ function hasWindow() {
490
449
  }
491
450
  /*#__NO_SIDE_EFFECTS__*/
492
451
  function getWindow() {
493
- (!_cachedWindow || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedWindow.b)) && (_cachedWindow = lazySafeGetInst(WINDOW));
452
+ !_globalLazyTestHooks && _initTestHooks();
453
+ (!_cachedWindow || _globalLazyTestHooks.lzy) && (_cachedWindow = createCachedValue(safe((getInst), [WINDOW]).v));
494
454
  return _cachedWindow.v;
495
455
  }
496
456
  /*#__NO_SIDE_EFFECTS__*/
@@ -499,46 +459,50 @@ function hasNavigator() {
499
459
  }
500
460
  /*#__NO_SIDE_EFFECTS__*/
501
461
  function getNavigator() {
502
- (!_cachedNavigator || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedNavigator.b)) && (_cachedNavigator = lazySafeGetInst("navigator"));
462
+ !_globalLazyTestHooks && _initTestHooks();
463
+ (!_cachedNavigator || _globalLazyTestHooks.lzy) && (_cachedNavigator = createCachedValue(safe((getInst), ["navigator"]).v));
503
464
  return _cachedNavigator.v;
504
465
  }
505
466
  function isNode() {
506
- !_isNode && (_isNode = safeGetLazy(function () { return !!(process && (process.versions || {}).node); }, false));
467
+ !_isNode && (_isNode = createCachedValue(!!safe(function () { return (process && (process.versions || {}).node); }).v));
507
468
  return _isNode.v;
508
469
  }
509
470
 
510
471
  var _symbol;
511
472
  var _symbolFor;
512
- /*#__NO_SIDE_EFFECTS__*/
513
- function _getSymbolValue(name) {
514
- return safeGetLazy(function () {
515
- return (_symbol.v ? _symbol.v[name] : UNDEF_VALUE);
516
- }, UNDEF_VALUE);
473
+ function _initSymbol() {
474
+ if (!_symbol || !_symbol.b) {
475
+ _symbol = lazySafeGetInst(SYMBOL);
476
+ _symbolFor = safeGetLazy(function () { return (_symbol.v ? _symbol.v["for"] : UNDEF_VALUE); }, UNDEF_VALUE);
477
+ }
517
478
  }
518
479
  /*#__NO_SIDE_EFFECTS__*/
519
480
  function hasSymbol() {
520
481
  return !!getSymbol();
521
482
  }
483
+ /*#__NO_SIDE_EFFECTS__*/
522
484
  function getSymbol() {
523
- var resetCache = !_symbol || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_symbol.b);
524
- resetCache && (_symbol = lazySafeGetInst(SYMBOL));
525
- (!_symbolFor || resetCache) && (_symbolFor = _getSymbolValue("for"));
485
+ !_globalLazyTestHooks && _initTestHooks();
486
+ (!_symbol || _globalLazyTestHooks.lzy) && _initSymbol();
526
487
  return _symbol.v;
527
488
  }
528
489
  /*#__NO_SIDE_EFFECTS__*/
529
490
  function getKnownSymbol(name, noPoly) {
530
491
  var knownName = _wellKnownSymbolMap[name];
531
- (!_symbol || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();
492
+ !_globalLazyTestHooks && _initTestHooks();
493
+ (!_symbol || _globalLazyTestHooks.lzy) && _initSymbol();
532
494
  return _symbol.v ? _symbol.v[knownName || name] : (!noPoly ? polyGetKnownSymbol(name) : UNDEF_VALUE);
533
495
  }
534
496
  /*#__NO_SIDE_EFFECTS__*/
535
497
  function newSymbol(description, noPoly) {
536
- (!_symbol || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();
498
+ !_globalLazyTestHooks && _initTestHooks();
499
+ (!_symbol || _globalLazyTestHooks.lzy) && _initSymbol();
537
500
  return _symbol.v ? _symbol.v(description) : (!noPoly ? polyNewSymbol(description) : NULL_VALUE);
538
501
  }
539
502
  /*#__NO_SIDE_EFFECTS__*/
540
503
  function symbolFor(key) {
541
- (!_symbolFor || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();
504
+ !_globalLazyTestHooks && _initTestHooks();
505
+ (!_symbolFor || !_symbol || _globalLazyTestHooks.lzy) && _initSymbol();
542
506
  return (_symbolFor.v || polySymbolFor)(key);
543
507
  }
544
508
 
@@ -555,7 +519,7 @@ var _iterSymbol;
555
519
  function iterForOf(iter, callbackfn, thisArg) {
556
520
  if (iter) {
557
521
  if (!isIterator(iter)) {
558
- !_iterSymbol && (_iterSymbol = getLazy(function () { return getKnownSymbol(3 ); }));
522
+ !_iterSymbol && (_iterSymbol = createCachedValue(getKnownSymbol(3 )));
559
523
  iter = iter[_iterSymbol.v] ? iter[_iterSymbol.v]() : null;
560
524
  }
561
525
  if (isIterator(iter)) {
@@ -637,7 +601,7 @@ function polyObjCreate(obj) {
637
601
  }
638
602
  var type = typeof obj;
639
603
  if (type !== OBJECT && type !== FUNCTION) {
640
- throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
604
+ throwTypeError("Prototype must be an Object or function: " + dumpObj(obj));
641
605
  }
642
606
  function tempFunc() { }
643
607
  tempFunc[PROTOTYPE] = obj;
@@ -658,28 +622,17 @@ function objSetPrototypeOf(obj, proto) {
658
622
  }
659
623
 
660
624
  function _createCustomError(name, d, b) {
661
- _safeDefineName(d, name);
625
+ safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
662
626
  d = objSetPrototypeOf(d, b);
663
627
  function __() {
664
628
  this.constructor = d;
665
- _safeDefineName(this, name);
629
+ safe(objDefine, [this, NAME, { v: name, c: true, e: false }]);
666
630
  }
667
631
  d[PROTOTYPE] = b === NULL_VALUE ? objCreate(b) : (__[PROTOTYPE] = b[PROTOTYPE], new __());
668
632
  return d;
669
633
  }
670
- function _safeSetName(baseClass, name) {
671
- try {
672
- name && (baseClass[NAME] = name);
673
- }
674
- catch (e) {
675
- }
676
- }
677
- function _safeDefineName(target, name) {
678
- try {
679
- objDefine(target, NAME, { v: name, c: true, e: false });
680
- }
681
- catch (e) {
682
- }
634
+ function _setName(baseClass, name) {
635
+ name && (baseClass[NAME] = name);
683
636
  }
684
637
  /*#__NO_SIDE_EFFECTS__*/
685
638
  function createCustomError(name, constructCb, errorBase) {
@@ -688,9 +641,10 @@ function createCustomError(name, constructCb, errorBase) {
688
641
  var captureFn = Error.captureStackTrace;
689
642
  return _createCustomError(name, function () {
690
643
  var _this = this;
644
+ var theArgs = arguments;
691
645
  try {
692
- _safeSetName(theBaseClass, name);
693
- var _self = fnApply(theBaseClass, _this, arrSlice(arguments)) || _this;
646
+ safe(_setName, [theBaseClass, name]);
647
+ var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
694
648
  if (_self !== _this) {
695
649
  var orgProto = objGetPrototypeOf(_this);
696
650
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -698,11 +652,11 @@ function createCustomError(name, constructCb, errorBase) {
698
652
  }
699
653
  }
700
654
  captureFn && captureFn(_self, _this[CONSTRUCTOR]);
701
- constructCb && constructCb(_self, arguments);
655
+ constructCb && constructCb(_self, theArgs);
702
656
  return _self;
703
657
  }
704
658
  finally {
705
- _safeSetName(theBaseClass, orgName);
659
+ safe(_setName, [theBaseClass, orgName]);
706
660
  }
707
661
  }, theBaseClass);
708
662
  }
@@ -746,7 +700,7 @@ function isPlainObject(value) {
746
700
  var result = false;
747
701
  if (value !== _gblWindow) {
748
702
  if (!_objCtrFnString) {
749
- _fnToString = Function[PROTOTYPE].toString;
703
+ _fnToString = Function[PROTOTYPE][TO_STRING];
750
704
  _objCtrFnString = _fnToString[CALL](ObjClass);
751
705
  }
752
706
  try {
@@ -772,6 +726,17 @@ function perfNow() {
772
726
 
773
727
  var strIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, StrProto));
774
728
 
729
+ var strStartsWith = ( /*#__PURE__*/_unwrapFunctionWithPoly("startsWith", StrProto, polyStrStartsWith));
730
+ /*#__NO_SIDE_EFFECTS__*/
731
+ function polyStrStartsWith(value, searchString, position) {
732
+ if (!isString(value)) {
733
+ throwTypeError("'" + dumpObj(value) + "' is not a string");
734
+ }
735
+ var searchValue = isString(searchString) ? searchString : asString(searchString);
736
+ var pos = position > 0 ? position : 0;
737
+ return strSubstring(value, pos, pos + searchValue[LENGTH]) === searchValue;
738
+ }
739
+
775
740
  var REF = "ref";
776
741
  var UNREF = "un" + REF;
777
742
  var HAS_REF = "hasRef";
@@ -841,7 +806,7 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
841
806
  var timerFn = theArgs[0];
842
807
  theArgs[0] = function () {
843
808
  handler.dn();
844
- fnApply(timerFn, self, arrSlice(arguments));
809
+ fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
845
810
  };
846
811
  var handler = _createTimerHandler(startTimer, function (timerId) {
847
812
  if (timerId) {
@@ -858,10 +823,10 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
858
823
  return handler.h;
859
824
  }
860
825
  function scheduleTimeout(callback, timeout) {
861
- return _createTimeoutWith(this, true, UNDEF_VALUE, arrSlice(arguments));
826
+ return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
862
827
  }
863
828
  function scheduleTimeoutWith(overrideFn, callback, timeout) {
864
- return _createTimeoutWith(this, true, overrideFn, arrSlice(arguments, 1));
829
+ return _createTimeoutWith(this, true, overrideFn, ArrProto[SLICE][CALL](arguments, 1));
865
830
  }
866
831
 
867
832
  var strHasOwnProperty = "hasOwnProperty";
@@ -3564,7 +3529,7 @@ var _DYN_LENGTH$1 = "length";
3564
3529
  var _DYN_PROCESS_TELEMETRY_ST0 = "processTelemetryStart";
3565
3530
 
3566
3531
  var _a$1;
3567
- var Version = '4.1.0-nightly3.2402-03';
3532
+ var Version = '4.1.0-nightly3.2402-08';
3568
3533
  var FullVersionString = "1DS-Web-JS-" + Version;
3569
3534
  var ObjHasOwnProperty = ObjProto$1.hasOwnProperty;
3570
3535
  var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
@@ -3790,6 +3755,7 @@ var STR_TIME_DELTA_TO_APPLY = "time-delta-to-apply-millis";
3790
3755
  var STR_UPLOAD_TIME = "upload-time";
3791
3756
  var STR_API_KEY = "apikey";
3792
3757
  var STR_MSA_DEVICE_TICKET = "AuthMsaDeviceTicket";
3758
+ var STR_AUTH_WEB_TOKEN = "WebAuthToken";
3793
3759
  var STR_AUTH_XTOKEN = "AuthXToken";
3794
3760
  var STR_NO_RESPONSE_BODY = "NoResponseBody";
3795
3761
  var STR_MSFPC = "msfpc";
@@ -3841,6 +3807,7 @@ var _DYN_GET_ALL_RESPONSE_HEA10 = "getAllResponseHeaders";
3841
3807
  var _DYN__THE_PAYLOAD = "_thePayload";
3842
3808
  var _DYN_BATCHES = "batches";
3843
3809
  var _DYN_SEND_TYPE = "sendType";
3810
+ var _DYN_ADD_HEADER = "addHeader";
3844
3811
  var _DYN_CAN_SEND_REQUEST = "canSendRequest";
3845
3812
  var _DYN_SEND_QUEUED_REQUESTS = "sendQueuedRequests";
3846
3813
  var _DYN_IS_COMPLETELY_IDLE = "isCompletelyIdle";
@@ -4806,9 +4773,12 @@ var HttpManager = /** @class */ (function () {
4806
4773
  }
4807
4774
  return sendType;
4808
4775
  }
4809
- _self.addHeader = function (name, value) {
4776
+ _self[_DYN_ADD_HEADER ] = function (name, value) {
4810
4777
  _headers[name] = value;
4811
4778
  };
4779
+ _self.removeHeader = function (name) {
4780
+ delete _headers[name];
4781
+ };
4812
4782
  _self[_DYN_CAN_SEND_REQUEST ] = function () {
4813
4783
  return _hasIdleConnection() && _clockSkewManager[_DYN_ALLOW_REQUEST_SENDIN0 ]();
4814
4784
  };
@@ -5376,7 +5346,7 @@ var PostChannel = /** @class */ (function (_super) {
5376
5346
  var _this = _super.call(this) || this;
5377
5347
  _this.identifier = "PostChannel";
5378
5348
  _this.priority = 1011;
5379
- _this.version = '4.1.0-nightly3.2402-03';
5349
+ _this.version = '4.1.0-nightly3.2402-08';
5380
5350
  var _postConfig;
5381
5351
  var _isTeardownCalled = false;
5382
5352
  var _flushCallbackQueue = [];
@@ -5701,7 +5671,13 @@ var PostChannel = /** @class */ (function (_super) {
5701
5671
  return result;
5702
5672
  };
5703
5673
  _self.setMsaAuthTicket = function (ticket) {
5704
- _httpManager.addHeader(STR_MSA_DEVICE_TICKET, ticket);
5674
+ _httpManager[_DYN_ADD_HEADER ](STR_MSA_DEVICE_TICKET, ticket);
5675
+ };
5676
+ _self.setAuthPluginHeader = function (token) {
5677
+ _httpManager[_DYN_ADD_HEADER ](STR_AUTH_WEB_TOKEN, token);
5678
+ };
5679
+ _self.removeAuthPluginHeader = function () {
5680
+ _httpManager.removeHeader(STR_AUTH_WEB_TOKEN);
5705
5681
  };
5706
5682
  _self.hasEvents = _hasEvents;
5707
5683
  _self._setTransmitProfile = function (profileName) {
@@ -6138,4 +6114,4 @@ exports.PostChannel = PostChannel;
6138
6114
  exports.RT_PROFILE = RT_PROFILE;
6139
6115
 
6140
6116
  }));
6141
- //# sourceMappingURL=ms.post-4.1.0-nightly3.2402-03.gbl.js.map
6117
+ //# sourceMappingURL=ms.post-4.1.0-nightly3.2402-08.gbl.js.map