@microsoft/applicationinsights-analytics-js 3.0.0-beta.2211-04 → 3.0.0-beta.2212-04

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
- * Microsoft Application Insights JavaScript SDK - Web Analytics, 3.0.0-beta.2211-04
2
+ * Microsoft Application Insights JavaScript SDK - Web Analytics, 3.0.0-beta.2212-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Web Analytics, 3.0.0-beta.2211-04
2
+ * Application Insights JavaScript SDK - Web Analytics, 3.0.0-beta.2212-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -557,114 +557,39 @@
557
557
  return registry.k[key];
558
558
  }
559
559
 
560
- function objSetPrototypeOf(obj, proto) {
561
- var fn = ObjClass["setPrototypeOf"] ||
562
- ({ __proto__: [] } instanceof Array && function (d, b) {
563
- d.__proto__ = b;
564
- }) ||
565
- function (d, b) {
566
- objForEachKey(b, function (key, value) {
567
- d[key] = value;
568
- });
569
- };
570
- return fn(obj, proto);
571
- }
572
-
573
- function _createCustomError(name, d, b) {
574
- objSetPrototypeOf(d, b);
575
- function __() {
576
- this.constructor = d;
577
- }
578
- __[PROTOTYPE] = b[PROTOTYPE];
579
- __[PROTOTYPE].name = name;
580
- d[PROTOTYPE] = new __();
581
- return d;
582
- }
583
- function createCustomError(name, constructCb) {
584
- var baseClass = Error;
585
- var customError = _createCustomError(name, function () {
586
- var _this = this;
587
- _this = baseClass.apply(_this, arguments) || _this;
588
- constructCb && constructCb(_this, arguments);
589
- return _this;
590
- }, baseClass);
591
- return customError;
592
- }
593
- var _unsupportedError;
594
- function throwUnsupported(message) {
595
- if (!_unsupportedError) {
596
- _unsupportedError = createCustomError("UnsupportedError");
597
- }
598
- throw new _unsupportedError(message);
599
- }
600
-
601
- function dumpObj(object, format) {
602
- var objectTypeDump = objToString(object);
603
- var propertyValueDump = "";
604
- if (objectTypeDump === "[object Error]") {
605
- propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
606
- }
607
- else {
608
- try {
609
- if (format) {
610
- if (isNumber(format)) {
611
- propertyValueDump = JSON.stringify(object, null, format);
612
- }
613
- else {
614
- propertyValueDump = JSON.stringify(object, null, 4);
615
- }
616
- }
617
- else {
618
- propertyValueDump = JSON.stringify(object);
619
- }
620
- }
621
- catch (e) {
622
- propertyValueDump = objToString(object) + " - " + dumpObj(e, format);
623
- }
624
- }
625
- return objectTypeDump + ": " + propertyValueDump;
626
- }
627
-
628
- var _objDefineProperty$1 = ObjClass["defineProperty"];
629
- function objDefineProp(target, key, descriptor) {
630
- if (_objDefineProperty$1) {
631
- _objDefineProperty$1(target, key, descriptor);
632
- return target;
633
- }
634
- throwUnsupported("Unable to define property [" + objToString(key) + "] on " + dumpObj(target));
560
+ var propMap = {
561
+ e: "enumerable",
562
+ c: "configurable",
563
+ v: VALUE,
564
+ w: "writable",
565
+ g: "get",
566
+ s: "set"
567
+ };
568
+ function _createProp(value) {
569
+ var prop = {};
570
+ prop[propMap["c"]] = true;
571
+ prop[propMap["e"]] = true;
572
+ objForEachKey(value, function (key, value) {
573
+ prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;
574
+ });
575
+ return prop;
635
576
  }
636
- function objDefineGet(target, key, value, configurable) {
577
+ var objDefineProp = ObjClass.defineProperty;
578
+ function objDefineAccessors(target, prop, getProp, setProp, configurable, enumerable) {
637
579
  var desc = {
638
- enumerable: true,
639
- configurable: isUndefined(configurable) ? true : configurable
580
+ e: enumerable,
581
+ c: configurable
640
582
  };
641
- if (isFunction(value)) {
642
- desc.get = value;
583
+ if (getProp) {
584
+ desc.g = getProp;
643
585
  }
644
- else {
645
- desc[VALUE] = value;
586
+ if (setProp) {
587
+ desc.s = setProp;
646
588
  }
647
- return objDefineProp(target, key, desc);
589
+ return objDefineProp(target, prop, _createProp(desc));
648
590
  }
649
- function objDefineAccessors(target, prop, getProp, setProp, configurable) {
650
- if (_objDefineProperty$1) {
651
- try {
652
- var descriptor = {
653
- enumerable: true,
654
- configurable: isUndefined(configurable) ? true : configurable
655
- };
656
- if (getProp) {
657
- descriptor.get = getProp;
658
- }
659
- if (setProp) {
660
- descriptor.set = setProp;
661
- }
662
- return objDefineProp(target, prop, descriptor);
663
- }
664
- catch (e) {
665
- throwUnsupported("Unable to define accessors for [" + objToString(prop) + "] on " + dumpObj(target));
666
- }
667
- }
591
+ function objDefine(target, key, propDesc) {
592
+ return objDefineProp(target, key, _createProp(propDesc));
668
593
  }
669
594
 
670
595
  var _globalLazyTestHooks;
@@ -676,24 +601,21 @@
676
601
  var lazyValue = {};
677
602
  _fetchLazyTestHooks && _fetchLazyTestHooks();
678
603
  lazyValue.b = _globalLazyTestHooks.lzy;
679
- objDefineGet(lazyValue, "v", function () {
680
- var result = cb();
681
- if (!_globalLazyTestHooks.lzy) {
682
- objDefineProp(lazyValue, "v", {
683
- enumerable: true,
684
- configurable: true,
685
- writable: false,
686
- value: result
687
- });
688
- if (lazyValue.b) {
689
- delete lazyValue.b;
604
+ objDefine(lazyValue, "v", {
605
+ g: function () {
606
+ var result = cb();
607
+ if (!_globalLazyTestHooks.lzy) {
608
+ objDefine(lazyValue, "v", { v: result });
609
+ if (lazyValue.b) {
610
+ delete lazyValue.b;
611
+ }
690
612
  }
613
+ if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {
614
+ lazyValue.b = _globalLazyTestHooks.lzy;
615
+ }
616
+ return result;
691
617
  }
692
- if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {
693
- lazyValue.b = _globalLazyTestHooks.lzy;
694
- }
695
- return result;
696
- }, true);
618
+ });
697
619
  return lazyValue;
698
620
  }
699
621
 
@@ -802,6 +724,33 @@
802
724
  }
803
725
  }
804
726
 
727
+ function dumpObj(object, format) {
728
+ var objectTypeDump = objToString(object);
729
+ var propertyValueDump = "";
730
+ if (objectTypeDump === "[object Error]") {
731
+ propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
732
+ }
733
+ else {
734
+ try {
735
+ if (format) {
736
+ if (isNumber(format)) {
737
+ propertyValueDump = JSON.stringify(object, null, format);
738
+ }
739
+ else {
740
+ propertyValueDump = JSON.stringify(object, null, 4);
741
+ }
742
+ }
743
+ else {
744
+ propertyValueDump = JSON.stringify(object);
745
+ }
746
+ }
747
+ catch (e) {
748
+ propertyValueDump = objToString(object) + " - " + dumpObj(e, format);
749
+ }
750
+ }
751
+ return objectTypeDump + ": " + propertyValueDump;
752
+ }
753
+
805
754
  function _unwrapFunction(funcName) {
806
755
  return function (thisArg) {
807
756
  var args = [];
@@ -819,6 +768,40 @@
819
768
 
820
769
  var arrMap = _unwrapFunction("map");
821
770
 
771
+ function objSetPrototypeOf(obj, proto) {
772
+ var fn = ObjClass["setPrototypeOf"] ||
773
+ ({ __proto__: [] } instanceof Array && function (d, b) {
774
+ d.__proto__ = b;
775
+ }) ||
776
+ function (d, b) {
777
+ objForEachKey(b, function (key, value) {
778
+ d[key] = value;
779
+ });
780
+ };
781
+ return fn(obj, proto);
782
+ }
783
+
784
+ function _createCustomError(name, d, b) {
785
+ objSetPrototypeOf(d, b);
786
+ function __() {
787
+ this.constructor = d;
788
+ }
789
+ __[PROTOTYPE] = b[PROTOTYPE];
790
+ __[PROTOTYPE].name = name;
791
+ d[PROTOTYPE] = new __();
792
+ return d;
793
+ }
794
+ function createCustomError(name, constructCb) {
795
+ var baseClass = Error;
796
+ var customError = _createCustomError(name, function () {
797
+ var _this = this;
798
+ _this = baseClass.apply(_this, arguments) || _this;
799
+ constructCb && constructCb(_this, arguments);
800
+ return _this;
801
+ }, baseClass);
802
+ return customError;
803
+ }
804
+
822
805
  function utcNow() {
823
806
  return (Date.now || polyUtcNow)();
824
807
  }
@@ -1225,7 +1208,7 @@
1225
1208
  }
1226
1209
 
1227
1210
  var _objDefineProperty = ObjDefineProperty;
1228
- var version = "3.0.0-beta.2211-04";
1211
+ var version = "3.0.0-beta.2212-04";
1229
1212
  var instanceName = "." + newId(6);
1230
1213
  var _dataUid = 0;
1231
1214
  function _createAccessor(target, prop, value) {
@@ -5220,7 +5203,7 @@
5220
5203
  });
5221
5204
  return _this;
5222
5205
  }
5223
- AnalyticsPlugin.Version = "3.0.0-beta.2211-04";
5206
+ AnalyticsPlugin.Version = "3.0.0-beta.2212-04";
5224
5207
  return AnalyticsPlugin;
5225
5208
  }(BaseTelemetryPlugin));
5226
5209