@aws-amplify/analytics 5.2.16-size-improvement.21 → 5.2.16

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.
@@ -62689,11 +62689,10 @@ module.exports = function(module) {
62689
62689
  __webpack_require__.r(__webpack_exports__);
62690
62690
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnalyticsClass", function() { return AnalyticsClass; });
62691
62691
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Analytics", function() { return Analytics; });
62692
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
62693
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
62694
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
62695
- /* harmony import */ var _Providers_AWSPinpointProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Providers/AWSPinpointProvider */ "./lib-esm/Providers/AWSPinpointProvider.js");
62696
- /* harmony import */ var _trackers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./trackers */ "./lib-esm/trackers/index.js");
62692
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
62693
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
62694
+ /* harmony import */ var _Providers_AWSPinpointProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Providers/AWSPinpointProvider */ "./lib-esm/Providers/AWSPinpointProvider.js");
62695
+ /* harmony import */ var _trackers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./trackers */ "./lib-esm/trackers/index.js");
62697
62696
  /*
62698
62697
  * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
62699
62698
  *
@@ -62706,15 +62705,173 @@ __webpack_require__.r(__webpack_exports__);
62706
62705
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
62707
62706
  * and limitations under the License.
62708
62707
  */
62708
+ var __assign = undefined && undefined.__assign || function () {
62709
+ __assign = Object.assign || function (t) {
62710
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
62711
+ s = arguments[i];
62712
+
62713
+ for (var p in s) {
62714
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
62715
+ }
62716
+ }
62717
+
62718
+ return t;
62719
+ };
62720
+
62721
+ return __assign.apply(this, arguments);
62722
+ };
62723
+
62724
+ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
62725
+ function adopt(value) {
62726
+ return value instanceof P ? value : new P(function (resolve) {
62727
+ resolve(value);
62728
+ });
62729
+ }
62730
+
62731
+ return new (P || (P = Promise))(function (resolve, reject) {
62732
+ function fulfilled(value) {
62733
+ try {
62734
+ step(generator.next(value));
62735
+ } catch (e) {
62736
+ reject(e);
62737
+ }
62738
+ }
62739
+
62740
+ function rejected(value) {
62741
+ try {
62742
+ step(generator["throw"](value));
62743
+ } catch (e) {
62744
+ reject(e);
62745
+ }
62746
+ }
62747
+
62748
+ function step(result) {
62749
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
62750
+ }
62751
+
62752
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
62753
+ });
62754
+ };
62755
+
62756
+ var __generator = undefined && undefined.__generator || function (thisArg, body) {
62757
+ var _ = {
62758
+ label: 0,
62759
+ sent: function sent() {
62760
+ if (t[0] & 1) throw t[1];
62761
+ return t[1];
62762
+ },
62763
+ trys: [],
62764
+ ops: []
62765
+ },
62766
+ f,
62767
+ y,
62768
+ t,
62769
+ g;
62770
+ return g = {
62771
+ next: verb(0),
62772
+ "throw": verb(1),
62773
+ "return": verb(2)
62774
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
62775
+ return this;
62776
+ }), g;
62777
+
62778
+ function verb(n) {
62779
+ return function (v) {
62780
+ return step([n, v]);
62781
+ };
62782
+ }
62783
+
62784
+ function step(op) {
62785
+ if (f) throw new TypeError("Generator is already executing.");
62786
+
62787
+ while (_) {
62788
+ try {
62789
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
62790
+ if (y = 0, t) op = [op[0] & 2, t.value];
62791
+
62792
+ switch (op[0]) {
62793
+ case 0:
62794
+ case 1:
62795
+ t = op;
62796
+ break;
62797
+
62798
+ case 4:
62799
+ _.label++;
62800
+ return {
62801
+ value: op[1],
62802
+ done: false
62803
+ };
62804
+
62805
+ case 5:
62806
+ _.label++;
62807
+ y = op[1];
62808
+ op = [0];
62809
+ continue;
62810
+
62811
+ case 7:
62812
+ op = _.ops.pop();
62813
+
62814
+ _.trys.pop();
62815
+
62816
+ continue;
62817
+
62818
+ default:
62819
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
62820
+ _ = 0;
62821
+ continue;
62822
+ }
62823
+
62824
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
62825
+ _.label = op[1];
62826
+ break;
62827
+ }
62828
+
62829
+ if (op[0] === 6 && _.label < t[1]) {
62830
+ _.label = t[1];
62831
+ t = op;
62832
+ break;
62833
+ }
62834
+
62835
+ if (t && _.label < t[2]) {
62836
+ _.label = t[2];
62837
+
62838
+ _.ops.push(op);
62839
+
62840
+ break;
62841
+ }
62842
+
62843
+ if (t[2]) _.ops.pop();
62844
+
62845
+ _.trys.pop();
62846
+
62847
+ continue;
62848
+ }
62849
+
62850
+ op = body.call(thisArg, _);
62851
+ } catch (e) {
62852
+ op = [6, e];
62853
+ y = 0;
62854
+ } finally {
62855
+ f = t = 0;
62856
+ }
62857
+ }
62858
+
62859
+ if (op[0] & 5) throw op[1];
62860
+ return {
62861
+ value: op[0] ? op[1] : void 0,
62862
+ done: true
62863
+ };
62864
+ }
62865
+ };
62709
62866
 
62710
62867
 
62711
62868
 
62712
62869
 
62713
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AnalyticsClass');
62870
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AnalyticsClass');
62714
62871
  var AMPLIFY_SYMBOL = typeof Symbol !== 'undefined' && typeof Symbol["for"] === 'function' ? Symbol["for"]('amplify_default') : '@@amplify_default';
62715
62872
 
62716
62873
  var dispatchAnalyticsEvent = function dispatchAnalyticsEvent(event, data, message) {
62717
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].dispatch('analytics', {
62874
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].dispatch('analytics', {
62718
62875
  event: event,
62719
62876
  data: data,
62720
62877
  message: message
@@ -62722,9 +62879,9 @@ var dispatchAnalyticsEvent = function dispatchAnalyticsEvent(event, data, messag
62722
62879
  };
62723
62880
 
62724
62881
  var trackers = {
62725
- pageView: _trackers__WEBPACK_IMPORTED_MODULE_3__["PageViewTracker"],
62726
- event: _trackers__WEBPACK_IMPORTED_MODULE_3__["EventTracker"],
62727
- session: _trackers__WEBPACK_IMPORTED_MODULE_3__["SessionTracker"]
62882
+ pageView: _trackers__WEBPACK_IMPORTED_MODULE_2__["PageViewTracker"],
62883
+ event: _trackers__WEBPACK_IMPORTED_MODULE_2__["EventTracker"],
62884
+ session: _trackers__WEBPACK_IMPORTED_MODULE_2__["SessionTracker"]
62728
62885
  };
62729
62886
  var _instance = null;
62730
62887
  /**
@@ -62745,9 +62902,9 @@ function () {
62745
62902
  this._trackers = {};
62746
62903
  _instance = this;
62747
62904
  this.record = this.record.bind(this);
62748
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].listen('auth', listener);
62749
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].listen('storage', listener);
62750
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].listen('analytics', listener);
62905
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].listen('auth', listener);
62906
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].listen('storage', listener);
62907
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].listen('analytics', listener);
62751
62908
  }
62752
62909
 
62753
62910
  AnalyticsClass.prototype.getModuleName = function () {
@@ -62764,7 +62921,7 @@ function () {
62764
62921
 
62765
62922
  if (!config) return this._config;
62766
62923
  logger.debug('configure Analytics', config);
62767
- var amplifyConfig = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Parser"].parseMobilehubConfig(config);
62924
+ var amplifyConfig = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Parser"].parseMobilehubConfig(config);
62768
62925
  this._config = Object.assign({}, this._config, amplifyConfig.Analytics, config);
62769
62926
 
62770
62927
  if (this._config['disabled']) {
@@ -62779,14 +62936,14 @@ function () {
62779
62936
  this._pluggables.forEach(function (pluggable) {
62780
62937
  // for backward compatibility
62781
62938
  var providerConfig = pluggable.getProviderName() === 'AWSPinpoint' && !_this._config['AWSPinpoint'] ? _this._config : _this._config[pluggable.getProviderName()];
62782
- pluggable.configure(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
62939
+ pluggable.configure(__assign({
62783
62940
  disabled: _this._config['disabled'],
62784
62941
  autoSessionRecord: _this._config['autoSessionRecord']
62785
62942
  }, providerConfig));
62786
62943
  });
62787
62944
 
62788
62945
  if (this._pluggables.length === 0) {
62789
- this.addPluggable(new _Providers_AWSPinpointProvider__WEBPACK_IMPORTED_MODULE_2__["AWSPinpointProvider"]());
62946
+ this.addPluggable(new _Providers_AWSPinpointProvider__WEBPACK_IMPORTED_MODULE_1__["AWSPinpointProvider"]());
62790
62947
  }
62791
62948
 
62792
62949
  dispatchAnalyticsEvent('configured', null, "The Analytics category has been configured successfully");
@@ -62806,7 +62963,7 @@ function () {
62806
62963
 
62807
62964
  var providerConfig = pluggable.getProviderName() === 'AWSPinpoint' && !this._config['AWSPinpoint'] ? this._config : this._config[pluggable.getProviderName()];
62808
62965
 
62809
- var config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
62966
+ var config = __assign({
62810
62967
  disabled: this._config['disabled']
62811
62968
  }, providerConfig);
62812
62969
 
@@ -62882,9 +63039,9 @@ function () {
62882
63039
 
62883
63040
 
62884
63041
  AnalyticsClass.prototype.startSession = function (provider) {
62885
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
63042
+ return __awaiter(this, void 0, void 0, function () {
62886
63043
  var params;
62887
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63044
+ return __generator(this, function (_a) {
62888
63045
  params = {
62889
63046
  event: {
62890
63047
  name: '_session.start'
@@ -62905,9 +63062,9 @@ function () {
62905
63062
 
62906
63063
 
62907
63064
  AnalyticsClass.prototype.stopSession = function (provider) {
62908
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
63065
+ return __awaiter(this, void 0, void 0, function () {
62909
63066
  var params;
62910
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63067
+ return __generator(this, function (_a) {
62911
63068
  params = {
62912
63069
  event: {
62913
63070
  name: '_session.stop'
@@ -62922,9 +63079,9 @@ function () {
62922
63079
  };
62923
63080
 
62924
63081
  AnalyticsClass.prototype.record = function (event, providerOrAttributes, metrics) {
62925
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
63082
+ return __awaiter(this, void 0, void 0, function () {
62926
63083
  var params;
62927
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63084
+ return __generator(this, function (_a) {
62928
63085
  params = null; // this is just for compatibility, going to be deprecated
62929
63086
 
62930
63087
  if (typeof event === 'string') {
@@ -62951,10 +63108,10 @@ function () {
62951
63108
  };
62952
63109
 
62953
63110
  AnalyticsClass.prototype.updateEndpoint = function (attrs, provider) {
62954
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
63111
+ return __awaiter(this, void 0, void 0, function () {
62955
63112
  var event;
62956
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
62957
- event = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, attrs), {
63113
+ return __generator(this, function (_a) {
63114
+ event = __assign(__assign({}, attrs), {
62958
63115
  name: '_update_endpoint'
62959
63116
  });
62960
63117
  return [2
@@ -63061,9 +63218,9 @@ var authEvent = function authEvent(payload) {
63061
63218
  }
63062
63219
 
63063
63220
  var recordAuthEvent = function recordAuthEvent(eventName) {
63064
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(void 0, void 0, void 0, function () {
63221
+ return __awaiter(void 0, void 0, void 0, function () {
63065
63222
  var err_1;
63066
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63223
+ return __generator(this, function (_a) {
63067
63224
  switch (_a.label) {
63068
63225
  case 0:
63069
63226
  if (!(authConfigured && analyticsConfigured)) return [3
@@ -63160,7 +63317,7 @@ var sendEvents = function sendEvents() {
63160
63317
  };
63161
63318
 
63162
63319
  var Analytics = new AnalyticsClass();
63163
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].register(Analytics);
63320
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Amplify"].register(Analytics);
63164
63321
 
63165
63322
  /***/ }),
63166
63323
 
@@ -63174,12 +63331,11 @@ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].register(Analytics);
63174
63331
  "use strict";
63175
63332
  __webpack_require__.r(__webpack_exports__);
63176
63333
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AWSKinesisFirehoseProvider", function() { return AWSKinesisFirehoseProvider; });
63177
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
63178
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63179
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
63180
- /* harmony import */ var _AWSKinesisProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AWSKinesisProvider */ "./lib-esm/Providers/AWSKinesisProvider.js");
63181
- /* harmony import */ var _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-sdk/client-firehose */ "../../node_modules/@aws-sdk/client-firehose/dist/es/index.js");
63182
- /* harmony import */ var _aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @aws-sdk/util-utf8-browser */ "../../node_modules/@aws-sdk/util-utf8-browser/dist/es/index.js");
63334
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63335
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
63336
+ /* harmony import */ var _AWSKinesisProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AWSKinesisProvider */ "./lib-esm/Providers/AWSKinesisProvider.js");
63337
+ /* harmony import */ var _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-firehose */ "../../node_modules/@aws-sdk/client-firehose/dist/es/index.js");
63338
+ /* harmony import */ var _aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-sdk/util-utf8-browser */ "../../node_modules/@aws-sdk/util-utf8-browser/dist/es/index.js");
63183
63339
  /*
63184
63340
  * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
63185
63341
  *
@@ -63192,17 +63348,42 @@ __webpack_require__.r(__webpack_exports__);
63192
63348
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
63193
63349
  * and limitations under the License.
63194
63350
  */
63351
+ var __extends = undefined && undefined.__extends || function () {
63352
+ var _extendStatics = function extendStatics(d, b) {
63353
+ _extendStatics = Object.setPrototypeOf || {
63354
+ __proto__: []
63355
+ } instanceof Array && function (d, b) {
63356
+ d.__proto__ = b;
63357
+ } || function (d, b) {
63358
+ for (var p in b) {
63359
+ if (b.hasOwnProperty(p)) d[p] = b[p];
63360
+ }
63361
+ };
63362
+
63363
+ return _extendStatics(d, b);
63364
+ };
63365
+
63366
+ return function (d, b) {
63367
+ _extendStatics(d, b);
63368
+
63369
+ function __() {
63370
+ this.constructor = d;
63371
+ }
63372
+
63373
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
63374
+ };
63375
+ }();
63195
63376
 
63196
63377
 
63197
63378
 
63198
63379
 
63199
63380
 
63200
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AWSKineisFirehoseProvider');
63381
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AWSKineisFirehoseProvider');
63201
63382
 
63202
63383
  var AWSKinesisFirehoseProvider =
63203
63384
  /** @class */
63204
63385
  function (_super) {
63205
- Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AWSKinesisFirehoseProvider, _super);
63386
+ __extends(AWSKinesisFirehoseProvider, _super);
63206
63387
 
63207
63388
  function AWSKinesisFirehoseProvider(config) {
63208
63389
  return _super.call(this, config) || this;
@@ -63242,7 +63423,7 @@ function (_super) {
63242
63423
  }
63243
63424
 
63244
63425
  var bufferData = data && typeof data !== 'string' ? JSON.stringify(data) : data;
63245
- var Data = Object(_aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_4__["fromUtf8"])(bufferData);
63426
+ var Data = Object(_aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_3__["fromUtf8"])(bufferData);
63246
63427
  var record = {
63247
63428
  Data: Data
63248
63429
  };
@@ -63251,7 +63432,7 @@ function (_super) {
63251
63432
  Object.keys(records).map(function (streamName) {
63252
63433
  logger.debug('putting records to kinesis', streamName, 'with records', records[streamName]);
63253
63434
 
63254
- _this._kinesisFirehose.send(new _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_3__["PutRecordBatchCommand"]({
63435
+ _this._kinesisFirehose.send(new _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_2__["PutRecordBatchCommand"]({
63255
63436
  Records: records[streamName],
63256
63437
  DeliveryStreamName: streamName
63257
63438
  })).then(function (res) {
@@ -63277,7 +63458,7 @@ function (_super) {
63277
63458
 
63278
63459
  AWSKinesisFirehoseProvider.prototype._initFirehose = function (region, credentials) {
63279
63460
  logger.debug('initialize kinesis firehose with credentials', credentials);
63280
- this._kinesisFirehose = new _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_3__["FirehoseClient"]({
63461
+ this._kinesisFirehose = new _aws_sdk_client_firehose__WEBPACK_IMPORTED_MODULE_2__["FirehoseClient"]({
63281
63462
  apiVersion: '2015-08-04',
63282
63463
  region: region,
63283
63464
  credentials: credentials
@@ -63286,7 +63467,7 @@ function (_super) {
63286
63467
  };
63287
63468
 
63288
63469
  return AWSKinesisFirehoseProvider;
63289
- }(_AWSKinesisProvider__WEBPACK_IMPORTED_MODULE_2__["AWSKinesisProvider"]);
63470
+ }(_AWSKinesisProvider__WEBPACK_IMPORTED_MODULE_1__["AWSKinesisProvider"]);
63290
63471
 
63291
63472
 
63292
63473
  /**
@@ -63307,11 +63488,10 @@ function (_super) {
63307
63488
  "use strict";
63308
63489
  __webpack_require__.r(__webpack_exports__);
63309
63490
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AWSKinesisProvider", function() { return AWSKinesisProvider; });
63310
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
63311
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63312
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
63313
- /* harmony import */ var _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-kinesis */ "../../node_modules/@aws-sdk/client-kinesis/dist/es/index.js");
63314
- /* harmony import */ var _aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-sdk/util-utf8-browser */ "../../node_modules/@aws-sdk/util-utf8-browser/dist/es/index.js");
63491
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63492
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
63493
+ /* harmony import */ var _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-sdk/client-kinesis */ "../../node_modules/@aws-sdk/client-kinesis/dist/es/index.js");
63494
+ /* harmony import */ var _aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/util-utf8-browser */ "../../node_modules/@aws-sdk/util-utf8-browser/dist/es/index.js");
63315
63495
  /*
63316
63496
  * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
63317
63497
  *
@@ -63324,11 +63504,153 @@ __webpack_require__.r(__webpack_exports__);
63324
63504
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
63325
63505
  * and limitations under the License.
63326
63506
  */
63507
+ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
63508
+ function adopt(value) {
63509
+ return value instanceof P ? value : new P(function (resolve) {
63510
+ resolve(value);
63511
+ });
63512
+ }
63513
+
63514
+ return new (P || (P = Promise))(function (resolve, reject) {
63515
+ function fulfilled(value) {
63516
+ try {
63517
+ step(generator.next(value));
63518
+ } catch (e) {
63519
+ reject(e);
63520
+ }
63521
+ }
63522
+
63523
+ function rejected(value) {
63524
+ try {
63525
+ step(generator["throw"](value));
63526
+ } catch (e) {
63527
+ reject(e);
63528
+ }
63529
+ }
63530
+
63531
+ function step(result) {
63532
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
63533
+ }
63534
+
63535
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
63536
+ });
63537
+ };
63538
+
63539
+ var __generator = undefined && undefined.__generator || function (thisArg, body) {
63540
+ var _ = {
63541
+ label: 0,
63542
+ sent: function sent() {
63543
+ if (t[0] & 1) throw t[1];
63544
+ return t[1];
63545
+ },
63546
+ trys: [],
63547
+ ops: []
63548
+ },
63549
+ f,
63550
+ y,
63551
+ t,
63552
+ g;
63553
+ return g = {
63554
+ next: verb(0),
63555
+ "throw": verb(1),
63556
+ "return": verb(2)
63557
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
63558
+ return this;
63559
+ }), g;
63560
+
63561
+ function verb(n) {
63562
+ return function (v) {
63563
+ return step([n, v]);
63564
+ };
63565
+ }
63566
+
63567
+ function step(op) {
63568
+ if (f) throw new TypeError("Generator is already executing.");
63569
+
63570
+ while (_) {
63571
+ try {
63572
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
63573
+ if (y = 0, t) op = [op[0] & 2, t.value];
63574
+
63575
+ switch (op[0]) {
63576
+ case 0:
63577
+ case 1:
63578
+ t = op;
63579
+ break;
63580
+
63581
+ case 4:
63582
+ _.label++;
63583
+ return {
63584
+ value: op[1],
63585
+ done: false
63586
+ };
63587
+
63588
+ case 5:
63589
+ _.label++;
63590
+ y = op[1];
63591
+ op = [0];
63592
+ continue;
63593
+
63594
+ case 7:
63595
+ op = _.ops.pop();
63596
+
63597
+ _.trys.pop();
63598
+
63599
+ continue;
63600
+
63601
+ default:
63602
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
63603
+ _ = 0;
63604
+ continue;
63605
+ }
63606
+
63607
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
63608
+ _.label = op[1];
63609
+ break;
63610
+ }
63611
+
63612
+ if (op[0] === 6 && _.label < t[1]) {
63613
+ _.label = t[1];
63614
+ t = op;
63615
+ break;
63616
+ }
63617
+
63618
+ if (t && _.label < t[2]) {
63619
+ _.label = t[2];
63620
+
63621
+ _.ops.push(op);
63622
+
63623
+ break;
63624
+ }
63625
+
63626
+ if (t[2]) _.ops.pop();
63627
+
63628
+ _.trys.pop();
63629
+
63630
+ continue;
63631
+ }
63632
+
63633
+ op = body.call(thisArg, _);
63634
+ } catch (e) {
63635
+ op = [6, e];
63636
+ y = 0;
63637
+ } finally {
63638
+ f = t = 0;
63639
+ }
63640
+ }
63641
+
63642
+ if (op[0] & 5) throw op[1];
63643
+ return {
63644
+ value: op[0] ? op[1] : void 0,
63645
+ done: true
63646
+ };
63647
+ }
63648
+ };
63327
63649
 
63328
63650
 
63329
63651
 
63330
63652
 
63331
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AWSKinesisProvider'); // events buffer
63653
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AWSKinesisProvider'); // events buffer
63332
63654
 
63333
63655
  var BUFFER_SIZE = 1000;
63334
63656
  var FLUSH_SIZE = 100;
@@ -63411,9 +63733,9 @@ function () {
63411
63733
 
63412
63734
 
63413
63735
  AWSKinesisProvider.prototype.record = function (params) {
63414
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
63736
+ return __awaiter(this, void 0, void 0, function () {
63415
63737
  var credentials;
63416
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63738
+ return __generator(this, function (_a) {
63417
63739
  switch (_a.label) {
63418
63740
  case 0:
63419
63741
  return [4
@@ -63518,7 +63840,7 @@ function () {
63518
63840
  }
63519
63841
 
63520
63842
  var bufferData = evt.data && typeof evt.data !== 'string' ? JSON.stringify(evt.data) : evt.data;
63521
- var Data = Object(_aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_3__["fromUtf8"])(bufferData);
63843
+ var Data = Object(_aws_sdk_util_utf8_browser__WEBPACK_IMPORTED_MODULE_2__["fromUtf8"])(bufferData);
63522
63844
  var PartitionKey = evt.partitionKey || 'partition-' + credentials.identityId;
63523
63845
  var record = {
63524
63846
  Data: Data,
@@ -63527,9 +63849,9 @@ function () {
63527
63849
  records[streamName].push(record);
63528
63850
  });
63529
63851
  Object.keys(records).map(function (streamName) {
63530
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, function () {
63852
+ return __awaiter(_this, void 0, void 0, function () {
63531
63853
  var command, err_1;
63532
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
63854
+ return __generator(this, function (_a) {
63533
63855
  switch (_a.label) {
63534
63856
  case 0:
63535
63857
  logger.debug('putting records to kinesis with records', records[streamName]);
@@ -63538,7 +63860,7 @@ function () {
63538
63860
  case 1:
63539
63861
  _a.trys.push([1, 3,, 4]);
63540
63862
 
63541
- command = new _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_2__["PutRecordsCommand"]({
63863
+ command = new _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_1__["PutRecordsCommand"]({
63542
63864
  Records: records[streamName],
63543
63865
  StreamName: streamName
63544
63866
  });
@@ -63587,10 +63909,10 @@ function () {
63587
63909
 
63588
63910
  AWSKinesisProvider.prototype._initKinesis = function (region, endpoint, credentials) {
63589
63911
  logger.debug('initialize kinesis with credentials', credentials);
63590
- this._kinesis = new _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_2__["KinesisClient"]({
63912
+ this._kinesis = new _aws_sdk_client_kinesis__WEBPACK_IMPORTED_MODULE_1__["KinesisClient"]({
63591
63913
  region: region,
63592
63914
  credentials: credentials,
63593
- customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])(),
63915
+ customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["getAmplifyUserAgent"])(),
63594
63916
  endpoint: endpoint
63595
63917
  });
63596
63918
  return true;
@@ -63604,10 +63926,10 @@ function () {
63604
63926
  AWSKinesisProvider.prototype._getCredentials = function () {
63605
63927
  var _this = this;
63606
63928
 
63607
- return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].get().then(function (credentials) {
63929
+ return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].get().then(function (credentials) {
63608
63930
  if (!credentials) return null;
63609
63931
  logger.debug('set credentials for analytics', _this._config.credentials);
63610
- return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].shear(credentials);
63932
+ return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].shear(credentials);
63611
63933
  })["catch"](function (err) {
63612
63934
  logger.debug('ensure credentials error', err);
63613
63935
  return null;
@@ -63636,15 +63958,14 @@ function () {
63636
63958
  "use strict";
63637
63959
  __webpack_require__.r(__webpack_exports__);
63638
63960
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AWSPinpointProvider", function() { return AWSPinpointProvider; });
63639
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
63640
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63641
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
63642
- /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "../../node_modules/@aws-sdk/client-pinpoint/dist/es/index.js");
63643
- /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-amplify/cache */ "@aws-amplify/cache");
63644
- /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_cache__WEBPACK_IMPORTED_MODULE_3__);
63645
- /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uuid */ "../../node_modules/uuid/index.js");
63646
- /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(uuid__WEBPACK_IMPORTED_MODULE_4__);
63647
- /* harmony import */ var _EventBuffer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./EventBuffer */ "./lib-esm/Providers/EventBuffer.js");
63961
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
63962
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
63963
+ /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "../../node_modules/@aws-sdk/client-pinpoint/dist/es/index.js");
63964
+ /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/cache */ "@aws-amplify/cache");
63965
+ /* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2__);
63966
+ /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uuid */ "../../node_modules/uuid/index.js");
63967
+ /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(uuid__WEBPACK_IMPORTED_MODULE_3__);
63968
+ /* harmony import */ var _EventBuffer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./EventBuffer */ "./lib-esm/Providers/EventBuffer.js");
63648
63969
  function _typeof(obj) {
63649
63970
  "@babel/helpers - typeof";
63650
63971
 
@@ -63668,6 +63989,177 @@ function _typeof(obj) {
63668
63989
  */
63669
63990
 
63670
63991
 
63992
+ var __assign = undefined && undefined.__assign || function () {
63993
+ __assign = Object.assign || function (t) {
63994
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
63995
+ s = arguments[i];
63996
+
63997
+ for (var p in s) {
63998
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
63999
+ }
64000
+ }
64001
+
64002
+ return t;
64003
+ };
64004
+
64005
+ return __assign.apply(this, arguments);
64006
+ };
64007
+
64008
+ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
64009
+ function adopt(value) {
64010
+ return value instanceof P ? value : new P(function (resolve) {
64011
+ resolve(value);
64012
+ });
64013
+ }
64014
+
64015
+ return new (P || (P = Promise))(function (resolve, reject) {
64016
+ function fulfilled(value) {
64017
+ try {
64018
+ step(generator.next(value));
64019
+ } catch (e) {
64020
+ reject(e);
64021
+ }
64022
+ }
64023
+
64024
+ function rejected(value) {
64025
+ try {
64026
+ step(generator["throw"](value));
64027
+ } catch (e) {
64028
+ reject(e);
64029
+ }
64030
+ }
64031
+
64032
+ function step(result) {
64033
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
64034
+ }
64035
+
64036
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
64037
+ });
64038
+ };
64039
+
64040
+ var __generator = undefined && undefined.__generator || function (thisArg, body) {
64041
+ var _ = {
64042
+ label: 0,
64043
+ sent: function sent() {
64044
+ if (t[0] & 1) throw t[1];
64045
+ return t[1];
64046
+ },
64047
+ trys: [],
64048
+ ops: []
64049
+ },
64050
+ f,
64051
+ y,
64052
+ t,
64053
+ g;
64054
+ return g = {
64055
+ next: verb(0),
64056
+ "throw": verb(1),
64057
+ "return": verb(2)
64058
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
64059
+ return this;
64060
+ }), g;
64061
+
64062
+ function verb(n) {
64063
+ return function (v) {
64064
+ return step([n, v]);
64065
+ };
64066
+ }
64067
+
64068
+ function step(op) {
64069
+ if (f) throw new TypeError("Generator is already executing.");
64070
+
64071
+ while (_) {
64072
+ try {
64073
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
64074
+ if (y = 0, t) op = [op[0] & 2, t.value];
64075
+
64076
+ switch (op[0]) {
64077
+ case 0:
64078
+ case 1:
64079
+ t = op;
64080
+ break;
64081
+
64082
+ case 4:
64083
+ _.label++;
64084
+ return {
64085
+ value: op[1],
64086
+ done: false
64087
+ };
64088
+
64089
+ case 5:
64090
+ _.label++;
64091
+ y = op[1];
64092
+ op = [0];
64093
+ continue;
64094
+
64095
+ case 7:
64096
+ op = _.ops.pop();
64097
+
64098
+ _.trys.pop();
64099
+
64100
+ continue;
64101
+
64102
+ default:
64103
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
64104
+ _ = 0;
64105
+ continue;
64106
+ }
64107
+
64108
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
64109
+ _.label = op[1];
64110
+ break;
64111
+ }
64112
+
64113
+ if (op[0] === 6 && _.label < t[1]) {
64114
+ _.label = t[1];
64115
+ t = op;
64116
+ break;
64117
+ }
64118
+
64119
+ if (t && _.label < t[2]) {
64120
+ _.label = t[2];
64121
+
64122
+ _.ops.push(op);
64123
+
64124
+ break;
64125
+ }
64126
+
64127
+ if (t[2]) _.ops.pop();
64128
+
64129
+ _.trys.pop();
64130
+
64131
+ continue;
64132
+ }
64133
+
64134
+ op = body.call(thisArg, _);
64135
+ } catch (e) {
64136
+ op = [6, e];
64137
+ y = 0;
64138
+ } finally {
64139
+ f = t = 0;
64140
+ }
64141
+ }
64142
+
64143
+ if (op[0] & 5) throw op[1];
64144
+ return {
64145
+ value: op[0] ? op[1] : void 0,
64146
+ done: true
64147
+ };
64148
+ }
64149
+ };
64150
+
64151
+ var __rest = undefined && undefined.__rest || function (s, e) {
64152
+ var t = {};
64153
+
64154
+ for (var p in s) {
64155
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
64156
+ }
64157
+
64158
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
64159
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
64160
+ }
64161
+ return t;
64162
+ };
63671
64163
 
63672
64164
 
63673
64165
 
@@ -63677,13 +64169,13 @@ function _typeof(obj) {
63677
64169
  var AMPLIFY_SYMBOL = typeof Symbol !== 'undefined' && typeof Symbol["for"] === 'function' ? Symbol["for"]('amplify_default') : '@@amplify_default';
63678
64170
 
63679
64171
  var dispatchAnalyticsEvent = function dispatchAnalyticsEvent(event, data) {
63680
- _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Hub"].dispatch('analytics', {
64172
+ _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].dispatch('analytics', {
63681
64173
  event: event,
63682
64174
  data: data
63683
64175
  }, 'Analytics', AMPLIFY_SYMBOL);
63684
64176
  };
63685
64177
 
63686
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AWSPinpointProvider');
64178
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AWSPinpointProvider');
63687
64179
  var RETRYABLE_CODES = [429, 500];
63688
64180
  var ACCEPTED_CODES = [202];
63689
64181
  var FORBIDDEN_CODE = 403;
@@ -63713,7 +64205,7 @@ function () {
63713
64205
  this._config.flushSize = this._config.flushSize || FLUSH_SIZE;
63714
64206
  this._config.flushInterval = this._config.flushInterval || FLUSH_INTERVAL;
63715
64207
  this._config.resendLimit = this._config.resendLimit || RESEND_LIMIT;
63716
- this._clientInfo = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ClientDevice"].clientInfo();
64208
+ this._clientInfo = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ClientDevice"].clientInfo();
63717
64209
  }
63718
64210
  /**
63719
64211
  * get the category of the plugin
@@ -63774,9 +64266,9 @@ function () {
63774
64266
 
63775
64267
 
63776
64268
  AWSPinpointProvider.prototype.record = function (params, handlers) {
63777
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64269
+ return __awaiter(this, void 0, void 0, function () {
63778
64270
  var credentials, timestamp;
63779
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64271
+ return __generator(this, function (_a) {
63780
64272
  switch (_a.label) {
63781
64273
  case 0:
63782
64274
  logger.debug('_public record', params);
@@ -63800,7 +64292,7 @@ function () {
63800
64292
 
63801
64293
  this._generateSession(params);
63802
64294
 
63803
- params.event.eventId = Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64295
+ params.event.eventId = Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
63804
64296
  Object.assign(params, {
63805
64297
  timestamp: timestamp,
63806
64298
  config: this._config
@@ -63823,9 +64315,9 @@ function () {
63823
64315
  };
63824
64316
 
63825
64317
  AWSPinpointProvider.prototype._sendEndpointUpdate = function (endpointObject) {
63826
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64318
+ return __awaiter(this, void 0, void 0, function () {
63827
64319
  var next;
63828
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64320
+ return __generator(this, function (_a) {
63829
64321
  switch (_a.label) {
63830
64322
  case 0:
63831
64323
  if (this._endpointUpdateInProgress) {
@@ -63878,14 +64370,14 @@ function () {
63878
64370
  };
63879
64371
 
63880
64372
  AWSPinpointProvider.prototype._generateSession = function (params) {
63881
- this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64373
+ this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
63882
64374
  var event = params.event;
63883
64375
 
63884
64376
  switch (event.name) {
63885
64377
  case SESSION_START:
63886
64378
  // refresh the session id and session start time
63887
64379
  this._sessionStartTimestamp = new Date().getTime();
63888
- this._sessionId = Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64380
+ this._sessionId = Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
63889
64381
  event.session = {
63890
64382
  Id: this._sessionId,
63891
64383
  StartTimestamp: new Date(this._sessionStartTimestamp).toISOString()
@@ -63895,7 +64387,7 @@ function () {
63895
64387
  case SESSION_STOP:
63896
64388
  var stopTimestamp = new Date().getTime();
63897
64389
  this._sessionStartTimestamp = this._sessionStartTimestamp || new Date().getTime();
63898
- this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64390
+ this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
63899
64391
  event.session = {
63900
64392
  Id: this._sessionId,
63901
64393
  Duration: stopTimestamp - this._sessionStartTimestamp,
@@ -63908,7 +64400,7 @@ function () {
63908
64400
 
63909
64401
  default:
63910
64402
  this._sessionStartTimestamp = this._sessionStartTimestamp || new Date().getTime();
63911
- this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64403
+ this._sessionId = this._sessionId || Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
63912
64404
  event.session = {
63913
64405
  Id: this._sessionId,
63914
64406
  StartTimestamp: new Date(this._sessionStartTimestamp).toISOString()
@@ -63917,9 +64409,9 @@ function () {
63917
64409
  };
63918
64410
 
63919
64411
  AWSPinpointProvider.prototype._send = function (params, handlers) {
63920
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64412
+ return __awaiter(this, void 0, void 0, function () {
63921
64413
  var event;
63922
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64414
+ return __generator(this, function (_a) {
63923
64415
  event = params.event;
63924
64416
 
63925
64417
  switch (event.name) {
@@ -63983,15 +64475,15 @@ function () {
63983
64475
  };
63984
64476
 
63985
64477
  AWSPinpointProvider.prototype._pinpointPutEvents = function (params, handlers) {
63986
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64478
+ return __awaiter(this, void 0, void 0, function () {
63987
64479
  var eventId, endpointId, eventParams, command, data, _a, _b, _c, _d, StatusCode, Message, err_1;
63988
64480
 
63989
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_e) {
64481
+ return __generator(this, function (_e) {
63990
64482
  switch (_e.label) {
63991
64483
  case 0:
63992
64484
  eventId = params.event.eventId, endpointId = params.config.endpointId;
63993
64485
  eventParams = this._generateBatchItemContext(params);
63994
- command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["PutEventsCommand"](eventParams);
64486
+ command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__["PutEventsCommand"](eventParams);
63995
64487
  _e.label = 1;
63996
64488
 
63997
64489
  case 1:
@@ -64072,7 +64564,7 @@ function () {
64072
64564
  region: region,
64073
64565
  service: MOBILE_SERVICE_NAME
64074
64566
  };
64075
- var requestUrl = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Signer"].signUrl(request, accessInfo, serviceInfo, null);
64567
+ var requestUrl = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Signer"].signUrl(request, accessInfo, serviceInfo, null);
64076
64568
  var success = navigator.sendBeacon(requestUrl, body);
64077
64569
 
64078
64570
  if (success) {
@@ -64097,15 +64589,15 @@ function () {
64097
64589
  };
64098
64590
 
64099
64591
  AWSPinpointProvider.prototype._updateEndpoint = function (endpointObject) {
64100
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64592
+ return __awaiter(this, void 0, void 0, function () {
64101
64593
  var params, handlers, config, event, appId, endpointId, request, update_params, command, data, err_2, failureData;
64102
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64594
+ return __generator(this, function (_a) {
64103
64595
  switch (_a.label) {
64104
64596
  case 0:
64105
64597
  params = endpointObject.params, handlers = endpointObject.handlers;
64106
64598
  config = params.config, event = params.event;
64107
64599
  appId = config.appId, endpointId = config.endpointId;
64108
- request = this._endpointRequest(config, _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].transferKeyToLowerCase(event, [], ['attributes', 'userAttributes', 'Attributes', 'UserAttributes']));
64600
+ request = this._endpointRequest(config, _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["JS"].transferKeyToLowerCase(event, [], ['attributes', 'userAttributes', 'Attributes', 'UserAttributes']));
64109
64601
  update_params = {
64110
64602
  ApplicationId: appId,
64111
64603
  EndpointId: endpointId,
@@ -64116,7 +64608,7 @@ function () {
64116
64608
  case 1:
64117
64609
  _a.trys.push([1, 3,, 4]);
64118
64610
 
64119
- command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["UpdateEndpointCommand"](update_params);
64611
+ command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__["UpdateEndpointCommand"](update_params);
64120
64612
  return [4
64121
64613
  /*yield*/
64122
64614
  , this.pinpointClient.send(command)];
@@ -64154,9 +64646,9 @@ function () {
64154
64646
  };
64155
64647
 
64156
64648
  AWSPinpointProvider.prototype._handleEndpointUpdateFailure = function (failureData) {
64157
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64649
+ return __awaiter(this, void 0, void 0, function () {
64158
64650
  var err, endpointObject, statusCode, exponential;
64159
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64651
+ return __generator(this, function (_a) {
64160
64652
  err = failureData.err, endpointObject = failureData.endpointObject;
64161
64653
  statusCode = err.$metadata && err.$metadata.httpStatusCode;
64162
64654
  logger.debug('updateEndpoint error', err);
@@ -64231,9 +64723,9 @@ function () {
64231
64723
 
64232
64724
 
64233
64725
  AWSPinpointProvider.prototype._initClients = function (credentials) {
64234
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64726
+ return __awaiter(this, void 0, void 0, function () {
64235
64727
  var identityId, region;
64236
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64728
+ return __generator(this, function (_a) {
64237
64729
  logger.debug('init clients');
64238
64730
 
64239
64731
  if (this.pinpointClient && this._config.credentials && this._config.credentials.sessionToken === credentials.sessionToken && this._config.credentials.identityId === credentials.identityId) {
@@ -64247,10 +64739,10 @@ function () {
64247
64739
  this._config.credentials = credentials;
64248
64740
  region = this._config.region;
64249
64741
  logger.debug('init clients with credentials', credentials);
64250
- this.pinpointClient = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["PinpointClient"]({
64742
+ this.pinpointClient = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__["PinpointClient"]({
64251
64743
  region: region,
64252
64744
  credentials: credentials,
64253
- customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])()
64745
+ customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["getAmplifyUserAgent"])()
64254
64746
  }); // TODO: remove this middleware once a long term fix is implemented by aws-sdk-js team.
64255
64747
 
64256
64748
  this.pinpointClient.middlewareStack.addRelativeTo(function (next) {
@@ -64285,7 +64777,7 @@ function () {
64285
64777
  };
64286
64778
 
64287
64779
  AWSPinpointProvider.prototype._bufferExists = function () {
64288
- return this._buffer && this._buffer instanceof _EventBuffer__WEBPACK_IMPORTED_MODULE_5__["default"];
64780
+ return this._buffer && this._buffer instanceof _EventBuffer__WEBPACK_IMPORTED_MODULE_4__["default"];
64289
64781
  };
64290
64782
 
64291
64783
  AWSPinpointProvider.prototype._initBuffer = function () {
@@ -64293,7 +64785,7 @@ function () {
64293
64785
  this._flushBuffer();
64294
64786
  }
64295
64787
 
64296
- this._buffer = new _EventBuffer__WEBPACK_IMPORTED_MODULE_5__["default"](this.pinpointClient, this._config); // if the first endpoint update hasn't yet resolved pause the buffer to
64788
+ this._buffer = new _EventBuffer__WEBPACK_IMPORTED_MODULE_4__["default"](this.pinpointClient, this._config); // if the first endpoint update hasn't yet resolved pause the buffer to
64297
64789
  // prevent race conditions. It will be resumed as soon as that request succeeds
64298
64790
 
64299
64791
  if (this._endpointGenerating) {
@@ -64332,24 +64824,24 @@ function () {
64332
64824
  };
64333
64825
 
64334
64826
  AWSPinpointProvider.prototype._getEndpointId = function (cacheKey) {
64335
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64827
+ return __awaiter(this, void 0, void 0, function () {
64336
64828
  var endpointId, ttl, expiration;
64337
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64829
+ return __generator(this, function (_a) {
64338
64830
  switch (_a.label) {
64339
64831
  case 0:
64340
64832
  return [4
64341
64833
  /*yield*/
64342
- , _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_3___default.a.getItem(cacheKey)];
64834
+ , _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2___default.a.getItem(cacheKey)];
64343
64835
 
64344
64836
  case 1:
64345
64837
  endpointId = _a.sent();
64346
64838
  logger.debug('endpointId from cache', endpointId, 'type', _typeof(endpointId));
64347
64839
 
64348
64840
  if (!endpointId) {
64349
- endpointId = Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])();
64841
+ endpointId = Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])();
64350
64842
  ttl = 1000 * 60 * 60 * 24 * 365 * 100;
64351
64843
  expiration = new Date().getTime() + ttl;
64352
- _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_3___default.a.setItem(cacheKey, endpointId, {
64844
+ _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_2___default.a.setItem(cacheKey, endpointId, {
64353
64845
  expires: expiration,
64354
64846
  priority: 1
64355
64847
  });
@@ -64390,22 +64882,22 @@ function () {
64390
64882
  appVersionName = clientContext.appVersionName,
64391
64883
  appVersionCode = clientContext.appVersionCode,
64392
64884
  appPackageName = clientContext.appPackageName,
64393
- demographicByClientContext = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(clientContext, ["clientId", "appTitle", "appVersionName", "appVersionCode", "appPackageName"]);
64885
+ demographicByClientContext = __rest(clientContext, ["clientId", "appTitle", "appVersionName", "appVersionCode", "appPackageName"]);
64394
64886
 
64395
64887
  var channelType = event.address ? clientInfo.platform === 'android' ? 'GCM' : 'APNS' : undefined;
64396
64888
 
64397
- var tmp = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
64889
+ var tmp = __assign(__assign(__assign({
64398
64890
  channelType: channelType,
64399
- requestId: Object(uuid__WEBPACK_IMPORTED_MODULE_4__["v1"])(),
64891
+ requestId: Object(uuid__WEBPACK_IMPORTED_MODULE_3__["v1"])(),
64400
64892
  effectiveDate: new Date().toISOString()
64401
64893
  }, defaultEndpointConfig), event), {
64402
- attributes: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, defaultEndpointConfig.attributes), event.attributes),
64403
- demographic: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, demographicByClientInfo), demographicByClientContext), defaultEndpointConfig.demographic), event.demographic),
64404
- location: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, defaultEndpointConfig.location), event.location),
64405
- metrics: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, defaultEndpointConfig.metrics), event.metrics),
64894
+ attributes: __assign(__assign({}, defaultEndpointConfig.attributes), event.attributes),
64895
+ demographic: __assign(__assign(__assign(__assign({}, demographicByClientInfo), demographicByClientContext), defaultEndpointConfig.demographic), event.demographic),
64896
+ location: __assign(__assign({}, defaultEndpointConfig.location), event.location),
64897
+ metrics: __assign(__assign({}, defaultEndpointConfig.metrics), event.metrics),
64406
64898
  user: {
64407
64899
  userId: event.userId || defaultEndpointConfig.userId || credentials.identityId,
64408
- userAttributes: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, defaultEndpointConfig.userAttributes), event.userAttributes)
64900
+ userAttributes: __assign(__assign({}, defaultEndpointConfig.userAttributes), event.userAttributes)
64409
64901
  }
64410
64902
  }); // eliminate unnecessary params
64411
64903
 
@@ -64416,9 +64908,9 @@ function () {
64416
64908
  session = tmp.session,
64417
64909
  eventId = tmp.eventId,
64418
64910
  immediate = tmp.immediate,
64419
- ret = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(tmp, ["userId", "userAttributes", "name", "session", "eventId", "immediate"]);
64911
+ ret = __rest(tmp, ["userId", "userAttributes", "name", "session", "eventId", "immediate"]);
64420
64912
 
64421
- return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].transferKeyToUpperCase(ret, [], ['metrics', 'userAttributes', 'attributes']);
64913
+ return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["JS"].transferKeyToUpperCase(ret, [], ['metrics', 'userAttributes', 'attributes']);
64422
64914
  };
64423
64915
 
64424
64916
  AWSPinpointProvider.prototype._eventError = function (err) {
@@ -64427,16 +64919,16 @@ function () {
64427
64919
  };
64428
64920
 
64429
64921
  AWSPinpointProvider.prototype._getCredentials = function () {
64430
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
64922
+ return __awaiter(this, void 0, void 0, function () {
64431
64923
  var credentials, err_3;
64432
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
64924
+ return __generator(this, function (_a) {
64433
64925
  switch (_a.label) {
64434
64926
  case 0:
64435
64927
  _a.trys.push([0, 2,, 3]);
64436
64928
 
64437
64929
  return [4
64438
64930
  /*yield*/
64439
- , _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].get()];
64931
+ , _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].get()];
64440
64932
 
64441
64933
  case 1:
64442
64934
  credentials = _a.sent();
@@ -64446,7 +64938,7 @@ function () {
64446
64938
  logger.debug('set credentials for analytics', credentials);
64447
64939
  return [2
64448
64940
  /*return*/
64449
- , _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].shear(credentials)];
64941
+ , _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].shear(credentials)];
64450
64942
 
64451
64943
  case 2:
64452
64944
  err_3 = _a.sent();
@@ -64845,17 +65337,16 @@ __webpack_require__.r(__webpack_exports__);
64845
65337
  "use strict";
64846
65338
  __webpack_require__.r(__webpack_exports__);
64847
65339
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AmazonPersonalizeProvider", function() { return AmazonPersonalizeProvider; });
64848
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
64849
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
64850
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
64851
- /* harmony import */ var _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-personalize-events */ "../../node_modules/@aws-sdk/client-personalize-events/dist/es/index.js");
64852
- /* harmony import */ var _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AmazonPersonalizeHelper */ "./lib-esm/Providers/AmazonPersonalizeHelper/index.js");
64853
- /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/get */ "../../node_modules/lodash/get.js");
64854
- /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_4__);
64855
- /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/isEmpty */ "../../node_modules/lodash/isEmpty.js");
64856
- /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__);
64857
- /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");
64858
- /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_6__);
65340
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
65341
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
65342
+ /* harmony import */ var _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-sdk/client-personalize-events */ "../../node_modules/@aws-sdk/client-personalize-events/dist/es/index.js");
65343
+ /* harmony import */ var _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AmazonPersonalizeHelper */ "./lib-esm/Providers/AmazonPersonalizeHelper/index.js");
65344
+ /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/get */ "../../node_modules/lodash/get.js");
65345
+ /* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_3__);
65346
+ /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isEmpty */ "../../node_modules/lodash/isEmpty.js");
65347
+ /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4__);
65348
+ /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");
65349
+ /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_5__);
64859
65350
  /*
64860
65351
  * Copyright 2019-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
64861
65352
  *
@@ -64868,15 +65359,157 @@ __webpack_require__.r(__webpack_exports__);
64868
65359
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
64869
65360
  * and limitations under the License.
64870
65361
  */
65362
+ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
65363
+ function adopt(value) {
65364
+ return value instanceof P ? value : new P(function (resolve) {
65365
+ resolve(value);
65366
+ });
65367
+ }
64871
65368
 
65369
+ return new (P || (P = Promise))(function (resolve, reject) {
65370
+ function fulfilled(value) {
65371
+ try {
65372
+ step(generator.next(value));
65373
+ } catch (e) {
65374
+ reject(e);
65375
+ }
65376
+ }
65377
+
65378
+ function rejected(value) {
65379
+ try {
65380
+ step(generator["throw"](value));
65381
+ } catch (e) {
65382
+ reject(e);
65383
+ }
65384
+ }
65385
+
65386
+ function step(result) {
65387
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
65388
+ }
65389
+
65390
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
65391
+ });
65392
+ };
65393
+
65394
+ var __generator = undefined && undefined.__generator || function (thisArg, body) {
65395
+ var _ = {
65396
+ label: 0,
65397
+ sent: function sent() {
65398
+ if (t[0] & 1) throw t[1];
65399
+ return t[1];
65400
+ },
65401
+ trys: [],
65402
+ ops: []
65403
+ },
65404
+ f,
65405
+ y,
65406
+ t,
65407
+ g;
65408
+ return g = {
65409
+ next: verb(0),
65410
+ "throw": verb(1),
65411
+ "return": verb(2)
65412
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
65413
+ return this;
65414
+ }), g;
65415
+
65416
+ function verb(n) {
65417
+ return function (v) {
65418
+ return step([n, v]);
65419
+ };
65420
+ }
65421
+
65422
+ function step(op) {
65423
+ if (f) throw new TypeError("Generator is already executing.");
65424
+
65425
+ while (_) {
65426
+ try {
65427
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
65428
+ if (y = 0, t) op = [op[0] & 2, t.value];
65429
+
65430
+ switch (op[0]) {
65431
+ case 0:
65432
+ case 1:
65433
+ t = op;
65434
+ break;
65435
+
65436
+ case 4:
65437
+ _.label++;
65438
+ return {
65439
+ value: op[1],
65440
+ done: false
65441
+ };
65442
+
65443
+ case 5:
65444
+ _.label++;
65445
+ y = op[1];
65446
+ op = [0];
65447
+ continue;
65448
+
65449
+ case 7:
65450
+ op = _.ops.pop();
65451
+
65452
+ _.trys.pop();
65453
+
65454
+ continue;
65455
+
65456
+ default:
65457
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
65458
+ _ = 0;
65459
+ continue;
65460
+ }
65461
+
65462
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
65463
+ _.label = op[1];
65464
+ break;
65465
+ }
65466
+
65467
+ if (op[0] === 6 && _.label < t[1]) {
65468
+ _.label = t[1];
65469
+ t = op;
65470
+ break;
65471
+ }
65472
+
65473
+ if (t && _.label < t[2]) {
65474
+ _.label = t[2];
65475
+
65476
+ _.ops.push(op);
65477
+
65478
+ break;
65479
+ }
65480
+
65481
+ if (t[2]) _.ops.pop();
65482
+
65483
+ _.trys.pop();
65484
+
65485
+ continue;
65486
+ }
65487
+
65488
+ op = body.call(thisArg, _);
65489
+ } catch (e) {
65490
+ op = [6, e];
65491
+ y = 0;
65492
+ } finally {
65493
+ f = t = 0;
65494
+ }
65495
+ }
65496
+
65497
+ if (op[0] & 5) throw op[1];
65498
+ return {
65499
+ value: op[0] ? op[1] : void 0,
65500
+ done: true
65501
+ };
65502
+ }
65503
+ };
64872
65504
 
64873
65505
 
64874
65506
 
64875
65507
 
64876
65508
 
64877
-
64878
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AmazonPersonalizeProvider'); // events buffer
64879
-
65509
+
65510
+
65511
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AmazonPersonalizeProvider'); // events buffer
65512
+
64880
65513
  var FLUSH_SIZE = 5;
64881
65514
  var FLUSH_SIZE_THRESHHOLD = 10;
64882
65515
  var FLUSH_INTERVAL = 5 * 1000; // 5s
@@ -64891,13 +65524,13 @@ function () {
64891
65524
  this._config = config ? config : {};
64892
65525
  this._config.flushSize = this._config.flushSize > 0 && this._config.flushSize <= FLUSH_SIZE_THRESHHOLD ? this._config.flushSize : FLUSH_SIZE;
64893
65526
  this._config.flushInterval = this._config.flushInterval || FLUSH_INTERVAL;
64894
- this._sessionManager = new _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_3__["SessionInfoManager"]();
65527
+ this._sessionManager = new _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_2__["SessionInfoManager"]();
64895
65528
 
64896
- if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(this._config.trackingId)) {
65529
+ if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(this._config.trackingId)) {
64897
65530
  this._sessionInfo = this._sessionManager.retrieveSessionInfo(this._config.trackingId);
64898
65531
  }
64899
65532
 
64900
- this._isBrowser = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser; // flush event buffer
65533
+ this._isBrowser = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["JS"].browserOrNode().isBrowser; // flush event buffer
64901
65534
 
64902
65535
  this._setupTimer();
64903
65536
  }
@@ -64922,10 +65555,10 @@ function () {
64922
65555
 
64923
65556
 
64924
65557
  AmazonPersonalizeProvider.prototype.record = function (params) {
64925
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
65558
+ return __awaiter(this, void 0, void 0, function () {
64926
65559
  var credentials, _a, eventType, properties, requestParams, isLoaded;
64927
65560
 
64928
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
65561
+ return __generator(this, function (_b) {
64929
65562
  switch (_b.label) {
64930
65563
  case 0:
64931
65564
  return [4
@@ -64950,7 +65583,7 @@ function () {
64950
65583
  return [2
64951
65584
  /*return*/
64952
65585
  ];
64953
- } else if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(params.event.userId)) {
65586
+ } else if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(params.event.userId)) {
64954
65587
  this._sessionManager.updateSessionInfo(params.event.userId, this._sessionInfo);
64955
65588
  }
64956
65589
 
@@ -64961,7 +65594,7 @@ function () {
64961
65594
  if (!this._isBrowser) return [3
64962
65595
  /*break*/
64963
65596
  , 5];
64964
- if (!!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(lodash_get__WEBPACK_IMPORTED_MODULE_4___default()(requestParams, 'eventData.properties.domElementId', null))) return [3
65597
+ if (!!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(lodash_get__WEBPACK_IMPORTED_MODULE_3___default()(requestParams, 'eventData.properties.domElementId', null))) return [3
64965
65598
  /*break*/
64966
65599
  , 3];
64967
65600
  return [4
@@ -64972,7 +65605,7 @@ function () {
64972
65605
  isLoaded = _b.sent();
64973
65606
 
64974
65607
  if (isLoaded) {
64975
- new _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_3__["MediaAutoTrack"](requestParams, this);
65608
+ new _AmazonPersonalizeHelper__WEBPACK_IMPORTED_MODULE_2__["MediaAutoTrack"](requestParams, this);
64976
65609
  } else {
64977
65610
  logger.debug('Cannot find the media element.');
64978
65611
  }
@@ -65064,7 +65697,7 @@ function () {
65064
65697
  var conf = config ? config : {};
65065
65698
  this._config = Object.assign({}, this._config, conf);
65066
65699
 
65067
- if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(this._config.trackingId)) {
65700
+ if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(this._config.trackingId)) {
65068
65701
  this._sessionInfo = this._sessionManager.retrieveSessionInfo(this._config.trackingId);
65069
65702
  }
65070
65703
 
@@ -65139,7 +65772,7 @@ function () {
65139
65772
  // @ts-ignore
65140
65773
  payload_1.eventList.push(event);
65141
65774
  });
65142
- var command = new _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_2__["PutEventsCommand"](payload_1);
65775
+ var command = new _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_1__["PutEventsCommand"](payload_1);
65143
65776
 
65144
65777
  this._personalize.send(command, function (err) {
65145
65778
  if (err) logger.debug('Failed to call putEvents in Personalize', err);else logger.debug('Put events');
@@ -65190,7 +65823,7 @@ function () {
65190
65823
  group.push(currRequestParams);
65191
65824
  preCred = cred;
65192
65825
  } else {
65193
- if (lodash_isEqual__WEBPACK_IMPORTED_MODULE_6___default()(sessionInfo, this._sessionInfo) && cred.sessionToken === preCred.sessionToken && cred.identityId === preCred.identityId) {
65826
+ if (lodash_isEqual__WEBPACK_IMPORTED_MODULE_5___default()(sessionInfo, this._sessionInfo) && cred.sessionToken === preCred.sessionToken && cred.identityId === preCred.identityId) {
65194
65827
  logger.debug('no change for cred, put event in the same group');
65195
65828
  group.push(currRequestParams);
65196
65829
  } else {
@@ -65243,10 +65876,10 @@ function () {
65243
65876
  this._config.credentials = credentials;
65244
65877
  var region = config.region;
65245
65878
  logger.debug('initialize personalize with credentials', credentials);
65246
- this._personalize = new _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_2__["PersonalizeEventsClient"]({
65879
+ this._personalize = new _aws_sdk_client_personalize_events__WEBPACK_IMPORTED_MODULE_1__["PersonalizeEventsClient"]({
65247
65880
  region: region,
65248
65881
  credentials: credentials,
65249
- customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])()
65882
+ customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["getAmplifyUserAgent"])()
65250
65883
  });
65251
65884
  return true;
65252
65885
  };
@@ -65258,10 +65891,10 @@ function () {
65258
65891
 
65259
65892
  AmazonPersonalizeProvider.prototype._getCredentials = function () {
65260
65893
  var that = this;
65261
- return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].get().then(function (credentials) {
65894
+ return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].get().then(function (credentials) {
65262
65895
  if (!credentials) return null;
65263
65896
  logger.debug('set credentials for analytics', that._config.credentials);
65264
- return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"].shear(credentials);
65897
+ return _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Credentials"].shear(credentials);
65265
65898
  })["catch"](function (err) {
65266
65899
  logger.debug('ensure credentials error', err);
65267
65900
  return null;
@@ -65289,16 +65922,192 @@ function () {
65289
65922
 
65290
65923
  "use strict";
65291
65924
  __webpack_require__.r(__webpack_exports__);
65292
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
65293
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
65294
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
65295
- /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "../../node_modules/@aws-sdk/client-pinpoint/dist/es/index.js");
65296
- /* harmony import */ var _utils_AppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/AppUtils */ "./lib-esm/utils/AppUtils.js");
65925
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
65926
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
65927
+ /* harmony import */ var _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-sdk/client-pinpoint */ "../../node_modules/@aws-sdk/client-pinpoint/dist/es/index.js");
65928
+ /* harmony import */ var _utils_AppUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/AppUtils */ "./lib-esm/utils/AppUtils.js");
65929
+ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
65930
+ function adopt(value) {
65931
+ return value instanceof P ? value : new P(function (resolve) {
65932
+ resolve(value);
65933
+ });
65934
+ }
65935
+
65936
+ return new (P || (P = Promise))(function (resolve, reject) {
65937
+ function fulfilled(value) {
65938
+ try {
65939
+ step(generator.next(value));
65940
+ } catch (e) {
65941
+ reject(e);
65942
+ }
65943
+ }
65944
+
65945
+ function rejected(value) {
65946
+ try {
65947
+ step(generator["throw"](value));
65948
+ } catch (e) {
65949
+ reject(e);
65950
+ }
65951
+ }
65952
+
65953
+ function step(result) {
65954
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
65955
+ }
65956
+
65957
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
65958
+ });
65959
+ };
65960
+
65961
+ var __generator = undefined && undefined.__generator || function (thisArg, body) {
65962
+ var _ = {
65963
+ label: 0,
65964
+ sent: function sent() {
65965
+ if (t[0] & 1) throw t[1];
65966
+ return t[1];
65967
+ },
65968
+ trys: [],
65969
+ ops: []
65970
+ },
65971
+ f,
65972
+ y,
65973
+ t,
65974
+ g;
65975
+ return g = {
65976
+ next: verb(0),
65977
+ "throw": verb(1),
65978
+ "return": verb(2)
65979
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
65980
+ return this;
65981
+ }), g;
65982
+
65983
+ function verb(n) {
65984
+ return function (v) {
65985
+ return step([n, v]);
65986
+ };
65987
+ }
65988
+
65989
+ function step(op) {
65990
+ if (f) throw new TypeError("Generator is already executing.");
65991
+
65992
+ while (_) {
65993
+ try {
65994
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
65995
+ if (y = 0, t) op = [op[0] & 2, t.value];
65996
+
65997
+ switch (op[0]) {
65998
+ case 0:
65999
+ case 1:
66000
+ t = op;
66001
+ break;
66002
+
66003
+ case 4:
66004
+ _.label++;
66005
+ return {
66006
+ value: op[1],
66007
+ done: false
66008
+ };
66009
+
66010
+ case 5:
66011
+ _.label++;
66012
+ y = op[1];
66013
+ op = [0];
66014
+ continue;
66015
+
66016
+ case 7:
66017
+ op = _.ops.pop();
66018
+
66019
+ _.trys.pop();
66020
+
66021
+ continue;
66022
+
66023
+ default:
66024
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
66025
+ _ = 0;
66026
+ continue;
66027
+ }
66028
+
66029
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
66030
+ _.label = op[1];
66031
+ break;
66032
+ }
66033
+
66034
+ if (op[0] === 6 && _.label < t[1]) {
66035
+ _.label = t[1];
66036
+ t = op;
66037
+ break;
66038
+ }
66039
+
66040
+ if (t && _.label < t[2]) {
66041
+ _.label = t[2];
66042
+
66043
+ _.ops.push(op);
66044
+
66045
+ break;
66046
+ }
66047
+
66048
+ if (t[2]) _.ops.pop();
66049
+
66050
+ _.trys.pop();
66051
+
66052
+ continue;
66053
+ }
66054
+
66055
+ op = body.call(thisArg, _);
66056
+ } catch (e) {
66057
+ op = [6, e];
66058
+ y = 0;
66059
+ } finally {
66060
+ f = t = 0;
66061
+ }
66062
+ }
66063
+
66064
+ if (op[0] & 5) throw op[1];
66065
+ return {
66066
+ value: op[0] ? op[1] : void 0,
66067
+ done: true
66068
+ };
66069
+ }
66070
+ };
66071
+
66072
+ var __read = undefined && undefined.__read || function (o, n) {
66073
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
66074
+ if (!m) return o;
66075
+ var i = m.call(o),
66076
+ r,
66077
+ ar = [],
66078
+ e;
66079
+
66080
+ try {
66081
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
66082
+ ar.push(r.value);
66083
+ }
66084
+ } catch (error) {
66085
+ e = {
66086
+ error: error
66087
+ };
66088
+ } finally {
66089
+ try {
66090
+ if (r && !r.done && (m = i["return"])) m.call(i);
66091
+ } finally {
66092
+ if (e) throw e.error;
66093
+ }
66094
+ }
66095
+
66096
+ return ar;
66097
+ };
66098
+
66099
+ var __spread = undefined && undefined.__spread || function () {
66100
+ for (var ar = [], i = 0; i < arguments.length; i++) {
66101
+ ar = ar.concat(__read(arguments[i]));
66102
+ }
66103
+
66104
+ return ar;
66105
+ };
65297
66106
 
65298
66107
 
65299
66108
 
65300
66109
 
65301
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('EventsBuffer');
66110
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('EventsBuffer');
65302
66111
  var RETRYABLE_CODES = [429, 500];
65303
66112
  var ACCEPTED_CODES = [202];
65304
66113
 
@@ -65368,7 +66177,7 @@ function () {
65368
66177
  // the OS may restrict access to the network in the background
65369
66178
 
65370
66179
 
65371
- if (this._pause || !bufferLength || !Object(_utils_AppUtils__WEBPACK_IMPORTED_MODULE_3__["isAppInForeground"])()) {
66180
+ if (this._pause || !bufferLength || !Object(_utils_AppUtils__WEBPACK_IMPORTED_MODULE_2__["isAppInForeground"])()) {
65372
66181
  return;
65373
66182
  }
65374
66183
 
@@ -65381,9 +66190,9 @@ function () {
65381
66190
  };
65382
66191
 
65383
66192
  EventsBuffer.prototype._putEvents = function (buffer) {
65384
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
66193
+ return __awaiter(this, void 0, void 0, function () {
65385
66194
  var eventMap, batchEventParams, command, data, err_1;
65386
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
66195
+ return __generator(this, function (_a) {
65387
66196
  switch (_a.label) {
65388
66197
  case 0:
65389
66198
  eventMap = this._bufferToMap(buffer);
@@ -65393,7 +66202,7 @@ function () {
65393
66202
  case 1:
65394
66203
  _a.trys.push([1, 3,, 4]);
65395
66204
 
65396
- command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_2__["PutEventsCommand"](batchEventParams);
66205
+ command = new _aws_sdk_client_pinpoint__WEBPACK_IMPORTED_MODULE_1__["PutEventsCommand"](batchEventParams);
65397
66206
  return [4
65398
66207
  /*yield*/
65399
66208
  , this._client.send(command)];
@@ -65479,7 +66288,7 @@ function () {
65479
66288
  var Results = data.EventsResponse.Results;
65480
66289
  var retryableEvents = [];
65481
66290
  Object.entries(Results).forEach(function (_a) {
65482
- var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2),
66291
+ var _b = __read(_a, 2),
65483
66292
  endpointId = _b[0],
65484
66293
  endpointValues = _b[1];
65485
66294
 
@@ -65487,7 +66296,7 @@ function () {
65487
66296
  Object.entries(responses).forEach(function (_a) {
65488
66297
  var _b, _c;
65489
66298
 
65490
- var _d = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2),
66299
+ var _d = __read(_a, 2),
65491
66300
  eventId = _d[0],
65492
66301
  _e = _d[1],
65493
66302
  StatusCode = _e.StatusCode,
@@ -65549,15 +66358,15 @@ function () {
65549
66358
  logger.debug("no retry attempts remaining for event " + eventId + " : " + name);
65550
66359
  }); // add the events to the front of the buffer
65551
66360
 
65552
- (_a = this._buffer).unshift.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(eligibleEvents));
66361
+ (_a = this._buffer).unshift.apply(_a, __spread(eligibleEvents));
65553
66362
  }; // convert buffer to map, i.e. { eventId1: { params, handler }, eventId2: { params, handlers } }
65554
66363
  // this allows us to easily access the handlers after receiving a batch response
65555
66364
 
65556
66365
 
65557
66366
  EventsBuffer.prototype._bufferToMap = function (buffer) {
65558
66367
  return buffer.reduce(function (acc, curVal) {
65559
- var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(Object.entries(curVal), 1),
65560
- _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a[0], 2),
66368
+ var _a = __read(Object.entries(curVal), 1),
66369
+ _b = __read(_a[0], 2),
65561
66370
  key = _b[0],
65562
66371
  value = _b[1];
65563
66372
 
@@ -65655,10 +66464,9 @@ __webpack_require__.r(__webpack_exports__);
65655
66464
  "use strict";
65656
66465
  __webpack_require__.r(__webpack_exports__);
65657
66466
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventTracker", function() { return EventTracker; });
65658
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
65659
- /* harmony import */ var _vendor_dom_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vendor/dom-utils */ "./lib-esm/vendor/dom-utils/index.js");
65660
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
65661
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__);
66467
+ /* harmony import */ var _vendor_dom_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../vendor/dom-utils */ "./lib-esm/vendor/dom-utils/index.js");
66468
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
66469
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
65662
66470
  /*
65663
66471
  * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
65664
66472
  *
@@ -65671,10 +66479,152 @@ __webpack_require__.r(__webpack_exports__);
65671
66479
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
65672
66480
  * and limitations under the License.
65673
66481
  */
66482
+ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
66483
+ function adopt(value) {
66484
+ return value instanceof P ? value : new P(function (resolve) {
66485
+ resolve(value);
66486
+ });
66487
+ }
66488
+
66489
+ return new (P || (P = Promise))(function (resolve, reject) {
66490
+ function fulfilled(value) {
66491
+ try {
66492
+ step(generator.next(value));
66493
+ } catch (e) {
66494
+ reject(e);
66495
+ }
66496
+ }
66497
+
66498
+ function rejected(value) {
66499
+ try {
66500
+ step(generator["throw"](value));
66501
+ } catch (e) {
66502
+ reject(e);
66503
+ }
66504
+ }
66505
+
66506
+ function step(result) {
66507
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
66508
+ }
66509
+
66510
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
66511
+ });
66512
+ };
65674
66513
 
66514
+ var __generator = undefined && undefined.__generator || function (thisArg, body) {
66515
+ var _ = {
66516
+ label: 0,
66517
+ sent: function sent() {
66518
+ if (t[0] & 1) throw t[1];
66519
+ return t[1];
66520
+ },
66521
+ trys: [],
66522
+ ops: []
66523
+ },
66524
+ f,
66525
+ y,
66526
+ t,
66527
+ g;
66528
+ return g = {
66529
+ next: verb(0),
66530
+ "throw": verb(1),
66531
+ "return": verb(2)
66532
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
66533
+ return this;
66534
+ }), g;
66535
+
66536
+ function verb(n) {
66537
+ return function (v) {
66538
+ return step([n, v]);
66539
+ };
66540
+ }
66541
+
66542
+ function step(op) {
66543
+ if (f) throw new TypeError("Generator is already executing.");
66544
+
66545
+ while (_) {
66546
+ try {
66547
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
66548
+ if (y = 0, t) op = [op[0] & 2, t.value];
66549
+
66550
+ switch (op[0]) {
66551
+ case 0:
66552
+ case 1:
66553
+ t = op;
66554
+ break;
66555
+
66556
+ case 4:
66557
+ _.label++;
66558
+ return {
66559
+ value: op[1],
66560
+ done: false
66561
+ };
66562
+
66563
+ case 5:
66564
+ _.label++;
66565
+ y = op[1];
66566
+ op = [0];
66567
+ continue;
66568
+
66569
+ case 7:
66570
+ op = _.ops.pop();
66571
+
66572
+ _.trys.pop();
66573
+
66574
+ continue;
65675
66575
 
66576
+ default:
66577
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
66578
+ _ = 0;
66579
+ continue;
66580
+ }
65676
66581
 
65677
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["ConsoleLogger"]('EventTracker');
66582
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
66583
+ _.label = op[1];
66584
+ break;
66585
+ }
66586
+
66587
+ if (op[0] === 6 && _.label < t[1]) {
66588
+ _.label = t[1];
66589
+ t = op;
66590
+ break;
66591
+ }
66592
+
66593
+ if (t && _.label < t[2]) {
66594
+ _.label = t[2];
66595
+
66596
+ _.ops.push(op);
66597
+
66598
+ break;
66599
+ }
66600
+
66601
+ if (t[2]) _.ops.pop();
66602
+
66603
+ _.trys.pop();
66604
+
66605
+ continue;
66606
+ }
66607
+
66608
+ op = body.call(thisArg, _);
66609
+ } catch (e) {
66610
+ op = [6, e];
66611
+ y = 0;
66612
+ } finally {
66613
+ f = t = 0;
66614
+ }
66615
+ }
66616
+
66617
+ if (op[0] & 5) throw op[1];
66618
+ return {
66619
+ value: op[0] ? op[1] : void 0,
66620
+ done: true
66621
+ };
66622
+ }
66623
+ };
66624
+
66625
+
66626
+
66627
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('EventTracker');
65678
66628
  var defaultOpts = {
65679
66629
  enable: false,
65680
66630
  events: ['click'],
@@ -65686,7 +66636,7 @@ var EventTracker =
65686
66636
  /** @class */
65687
66637
  function () {
65688
66638
  function EventTracker(tracker, opts) {
65689
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["JS"].browserOrNode().isBrowser || !window.addEventListener) {
66639
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser || !window.addEventListener) {
65690
66640
  logger.debug('not in the supported web environment');
65691
66641
  return;
65692
66642
  }
@@ -65713,7 +66663,7 @@ function () {
65713
66663
  var selector_1 = '[' + this._config.selectorPrefix + 'on]';
65714
66664
 
65715
66665
  this._config.events.forEach(function (evt) {
65716
- _this._delegates[evt] = Object(_vendor_dom_utils__WEBPACK_IMPORTED_MODULE_1__["delegate"])(document, evt, selector_1, _this._trackFunc, {
66666
+ _this._delegates[evt] = Object(_vendor_dom_utils__WEBPACK_IMPORTED_MODULE_0__["delegate"])(document, evt, selector_1, _this._trackFunc, {
65717
66667
  composed: true,
65718
66668
  useCapture: true
65719
66669
  });
@@ -65724,10 +66674,10 @@ function () {
65724
66674
  };
65725
66675
 
65726
66676
  EventTracker.prototype._trackFunc = function (event, element) {
65727
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
66677
+ return __awaiter(this, void 0, void 0, function () {
65728
66678
  var customAttrs, events, eventName, attrs, defaultAttrs, _a, attributes;
65729
66679
 
65730
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
66680
+ return __generator(this, function (_b) {
65731
66681
  switch (_b.label) {
65732
66682
  case 0:
65733
66683
  customAttrs = {};
@@ -65812,10 +66762,9 @@ function () {
65812
66762
  "use strict";
65813
66763
  __webpack_require__.r(__webpack_exports__);
65814
66764
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageViewTracker", function() { return PageViewTracker; });
65815
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
65816
- /* harmony import */ var _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/MethodEmbed */ "./lib-esm/utils/MethodEmbed.js");
65817
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
65818
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__);
66765
+ /* harmony import */ var _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/MethodEmbed */ "./lib-esm/utils/MethodEmbed.js");
66766
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
66767
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
65819
66768
  /*
65820
66769
  * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
65821
66770
  *
@@ -65828,14 +66777,156 @@ __webpack_require__.r(__webpack_exports__);
65828
66777
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
65829
66778
  * and limitations under the License.
65830
66779
  */
66780
+ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
66781
+ function adopt(value) {
66782
+ return value instanceof P ? value : new P(function (resolve) {
66783
+ resolve(value);
66784
+ });
66785
+ }
66786
+
66787
+ return new (P || (P = Promise))(function (resolve, reject) {
66788
+ function fulfilled(value) {
66789
+ try {
66790
+ step(generator.next(value));
66791
+ } catch (e) {
66792
+ reject(e);
66793
+ }
66794
+ }
66795
+
66796
+ function rejected(value) {
66797
+ try {
66798
+ step(generator["throw"](value));
66799
+ } catch (e) {
66800
+ reject(e);
66801
+ }
66802
+ }
66803
+
66804
+ function step(result) {
66805
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
66806
+ }
66807
+
66808
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
66809
+ });
66810
+ };
66811
+
66812
+ var __generator = undefined && undefined.__generator || function (thisArg, body) {
66813
+ var _ = {
66814
+ label: 0,
66815
+ sent: function sent() {
66816
+ if (t[0] & 1) throw t[1];
66817
+ return t[1];
66818
+ },
66819
+ trys: [],
66820
+ ops: []
66821
+ },
66822
+ f,
66823
+ y,
66824
+ t,
66825
+ g;
66826
+ return g = {
66827
+ next: verb(0),
66828
+ "throw": verb(1),
66829
+ "return": verb(2)
66830
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
66831
+ return this;
66832
+ }), g;
66833
+
66834
+ function verb(n) {
66835
+ return function (v) {
66836
+ return step([n, v]);
66837
+ };
66838
+ }
66839
+
66840
+ function step(op) {
66841
+ if (f) throw new TypeError("Generator is already executing.");
66842
+
66843
+ while (_) {
66844
+ try {
66845
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
66846
+ if (y = 0, t) op = [op[0] & 2, t.value];
66847
+
66848
+ switch (op[0]) {
66849
+ case 0:
66850
+ case 1:
66851
+ t = op;
66852
+ break;
66853
+
66854
+ case 4:
66855
+ _.label++;
66856
+ return {
66857
+ value: op[1],
66858
+ done: false
66859
+ };
66860
+
66861
+ case 5:
66862
+ _.label++;
66863
+ y = op[1];
66864
+ op = [0];
66865
+ continue;
66866
+
66867
+ case 7:
66868
+ op = _.ops.pop();
66869
+
66870
+ _.trys.pop();
66871
+
66872
+ continue;
66873
+
66874
+ default:
66875
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
66876
+ _ = 0;
66877
+ continue;
66878
+ }
66879
+
66880
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
66881
+ _.label = op[1];
66882
+ break;
66883
+ }
66884
+
66885
+ if (op[0] === 6 && _.label < t[1]) {
66886
+ _.label = t[1];
66887
+ t = op;
66888
+ break;
66889
+ }
66890
+
66891
+ if (t && _.label < t[2]) {
66892
+ _.label = t[2];
66893
+
66894
+ _.ops.push(op);
66895
+
66896
+ break;
66897
+ }
66898
+
66899
+ if (t[2]) _.ops.pop();
65831
66900
 
66901
+ _.trys.pop();
66902
+
66903
+ continue;
66904
+ }
66905
+
66906
+ op = body.call(thisArg, _);
66907
+ } catch (e) {
66908
+ op = [6, e];
66909
+ y = 0;
66910
+ } finally {
66911
+ f = t = 0;
66912
+ }
66913
+ }
66914
+
66915
+ if (op[0] & 5) throw op[1];
66916
+ return {
66917
+ value: op[0] ? op[1] : void 0,
66918
+ done: true
66919
+ };
66920
+ }
66921
+ };
65832
66922
 
65833
66923
 
65834
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["ConsoleLogger"]('PageViewTracker');
66924
+
66925
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('PageViewTracker');
65835
66926
  var PREV_URL_KEY = 'aws-amplify-analytics-prevUrl';
65836
66927
 
65837
66928
  var getUrl = function getUrl() {
65838
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["JS"].browserOrNode().isBrowser) return '';else return window.location.origin + window.location.pathname;
66929
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser) return '';else return window.location.origin + window.location.pathname;
65839
66930
  };
65840
66931
 
65841
66932
  var defaultOpts = {
@@ -65883,13 +66974,13 @@ function () {
65883
66974
  };
65884
66975
 
65885
66976
  PageViewTracker.prototype._pageViewTrackDefault = function () {
65886
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
66977
+ return __awaiter(this, void 0, void 0, function () {
65887
66978
  var url, customAttrs, _a, attributes;
65888
66979
 
65889
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
66980
+ return __generator(this, function (_b) {
65890
66981
  switch (_b.label) {
65891
66982
  case 0:
65892
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["JS"].browserOrNode().isBrowser || !window.addEventListener || !window.sessionStorage) {
66983
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser || !window.addEventListener || !window.sessionStorage) {
65893
66984
  logger.debug('not in the supported web enviroment');
65894
66985
  return [2
65895
66986
  /*return*/
@@ -65940,13 +67031,13 @@ function () {
65940
67031
  };
65941
67032
 
65942
67033
  PageViewTracker.prototype._trackFunc = function () {
65943
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
67034
+ return __awaiter(this, void 0, void 0, function () {
65944
67035
  var url, customAttrs, _a, attributes;
65945
67036
 
65946
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
67037
+ return __generator(this, function (_b) {
65947
67038
  switch (_b.label) {
65948
67039
  case 0:
65949
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["JS"].browserOrNode().isBrowser || !window.addEventListener || !history.pushState || !window.sessionStorage) {
67040
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser || !window.addEventListener || !history.pushState || !window.sessionStorage) {
65950
67041
  logger.debug('not in the supported web enviroment');
65951
67042
  return [2
65952
67043
  /*return*/
@@ -65997,22 +67088,22 @@ function () {
65997
67088
  };
65998
67089
 
65999
67090
  PageViewTracker.prototype._pageViewTrackSPA = function () {
66000
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["JS"].browserOrNode().isBrowser || !window.addEventListener || !history.pushState) {
67091
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser || !window.addEventListener || !history.pushState) {
66001
67092
  logger.debug('not in the supported web enviroment');
66002
67093
  return;
66003
67094
  }
66004
67095
 
66005
67096
  if (this._config.enable && !this._hasEnabled) {
66006
- _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_1__["MethodEmbed"].add(history, 'pushState', this._trackFunc);
66007
- _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_1__["MethodEmbed"].add(history, 'replaceState', this._trackFunc);
67097
+ _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_0__["MethodEmbed"].add(history, 'pushState', this._trackFunc);
67098
+ _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_0__["MethodEmbed"].add(history, 'replaceState', this._trackFunc);
66008
67099
  window.addEventListener('popstate', this._trackFunc);
66009
67100
 
66010
67101
  this._trackFunc();
66011
67102
 
66012
67103
  this._hasEnabled = true;
66013
67104
  } else {
66014
- _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_1__["MethodEmbed"].remove(history, 'pushState');
66015
- _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_1__["MethodEmbed"].remove(history, 'replaceState');
67105
+ _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_0__["MethodEmbed"].remove(history, 'pushState');
67106
+ _utils_MethodEmbed__WEBPACK_IMPORTED_MODULE_0__["MethodEmbed"].remove(history, 'replaceState');
66016
67107
  window.removeEventListener('popstate', this._trackFunc);
66017
67108
  this._hasEnabled = false;
66018
67109
  }
@@ -66040,9 +67131,8 @@ function () {
66040
67131
  "use strict";
66041
67132
  __webpack_require__.r(__webpack_exports__);
66042
67133
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SessionTracker", function() { return SessionTracker; });
66043
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
66044
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
66045
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
67134
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
67135
+ /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
66046
67136
  /*
66047
67137
  * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
66048
67138
  *
@@ -66055,10 +67145,152 @@ __webpack_require__.r(__webpack_exports__);
66055
67145
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
66056
67146
  * and limitations under the License.
66057
67147
  */
66058
- // the session tracker for web
67148
+ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
67149
+ function adopt(value) {
67150
+ return value instanceof P ? value : new P(function (resolve) {
67151
+ resolve(value);
67152
+ });
67153
+ }
67154
+
67155
+ return new (P || (P = Promise))(function (resolve, reject) {
67156
+ function fulfilled(value) {
67157
+ try {
67158
+ step(generator.next(value));
67159
+ } catch (e) {
67160
+ reject(e);
67161
+ }
67162
+ }
67163
+
67164
+ function rejected(value) {
67165
+ try {
67166
+ step(generator["throw"](value));
67167
+ } catch (e) {
67168
+ reject(e);
67169
+ }
67170
+ }
67171
+
67172
+ function step(result) {
67173
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
67174
+ }
67175
+
67176
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
67177
+ });
67178
+ };
67179
+
67180
+ var __generator = undefined && undefined.__generator || function (thisArg, body) {
67181
+ var _ = {
67182
+ label: 0,
67183
+ sent: function sent() {
67184
+ if (t[0] & 1) throw t[1];
67185
+ return t[1];
67186
+ },
67187
+ trys: [],
67188
+ ops: []
67189
+ },
67190
+ f,
67191
+ y,
67192
+ t,
67193
+ g;
67194
+ return g = {
67195
+ next: verb(0),
67196
+ "throw": verb(1),
67197
+ "return": verb(2)
67198
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
67199
+ return this;
67200
+ }), g;
67201
+
67202
+ function verb(n) {
67203
+ return function (v) {
67204
+ return step([n, v]);
67205
+ };
67206
+ }
67207
+
67208
+ function step(op) {
67209
+ if (f) throw new TypeError("Generator is already executing.");
67210
+
67211
+ while (_) {
67212
+ try {
67213
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
67214
+ if (y = 0, t) op = [op[0] & 2, t.value];
67215
+
67216
+ switch (op[0]) {
67217
+ case 0:
67218
+ case 1:
67219
+ t = op;
67220
+ break;
67221
+
67222
+ case 4:
67223
+ _.label++;
67224
+ return {
67225
+ value: op[1],
67226
+ done: false
67227
+ };
67228
+
67229
+ case 5:
67230
+ _.label++;
67231
+ y = op[1];
67232
+ op = [0];
67233
+ continue;
67234
+
67235
+ case 7:
67236
+ op = _.ops.pop();
66059
67237
 
67238
+ _.trys.pop();
66060
67239
 
66061
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('SessionTracker');
67240
+ continue;
67241
+
67242
+ default:
67243
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
67244
+ _ = 0;
67245
+ continue;
67246
+ }
67247
+
67248
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
67249
+ _.label = op[1];
67250
+ break;
67251
+ }
67252
+
67253
+ if (op[0] === 6 && _.label < t[1]) {
67254
+ _.label = t[1];
67255
+ t = op;
67256
+ break;
67257
+ }
67258
+
67259
+ if (t && _.label < t[2]) {
67260
+ _.label = t[2];
67261
+
67262
+ _.ops.push(op);
67263
+
67264
+ break;
67265
+ }
67266
+
67267
+ if (t[2]) _.ops.pop();
67268
+
67269
+ _.trys.pop();
67270
+
67271
+ continue;
67272
+ }
67273
+
67274
+ op = body.call(thisArg, _);
67275
+ } catch (e) {
67276
+ op = [6, e];
67277
+ y = 0;
67278
+ } finally {
67279
+ f = t = 0;
67280
+ }
67281
+ }
67282
+
67283
+ if (op[0] & 5) throw op[1];
67284
+ return {
67285
+ value: op[0] ? op[1] : void 0,
67286
+ done: true
67287
+ };
67288
+ }
67289
+ }; // the session tracker for web
67290
+
67291
+
67292
+
67293
+ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('SessionTracker');
66062
67294
  var defaultOpts = {
66063
67295
  enable: false,
66064
67296
  provider: 'AWSPinpoint'
@@ -66078,7 +67310,7 @@ function () {
66078
67310
  }
66079
67311
 
66080
67312
  SessionTracker.prototype._envCheck = function () {
66081
- if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["JS"].browserOrNode().isBrowser) {
67313
+ if (!_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["JS"].browserOrNode().isBrowser) {
66082
67314
  return false;
66083
67315
  }
66084
67316
 
@@ -66105,10 +67337,10 @@ function () {
66105
67337
  };
66106
67338
 
66107
67339
  SessionTracker.prototype._trackFunc = function () {
66108
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
67340
+ return __awaiter(this, void 0, void 0, function () {
66109
67341
  var customAttrs, _a, attributes;
66110
67342
 
66111
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
67343
+ return __generator(this, function (_b) {
66112
67344
  switch (_b.label) {
66113
67345
  case 0:
66114
67346
  if (!(typeof this._config.attributes === 'function')) return [3
@@ -66176,10 +67408,10 @@ function () {
66176
67408
 
66177
67409
 
66178
67410
  SessionTracker.prototype._sendInitialEvent = function () {
66179
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
67411
+ return __awaiter(this, void 0, void 0, function () {
66180
67412
  var customAttrs, _a, attributes;
66181
67413
 
66182
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
67414
+ return __generator(this, function (_b) {
66183
67415
  switch (_b.label) {
66184
67416
  case 0:
66185
67417
  if (initialEventSent) {
@@ -66315,7 +67547,6 @@ var isAppInForeground = function isAppInForeground() {
66315
67547
  "use strict";
66316
67548
  __webpack_require__.r(__webpack_exports__);
66317
67549
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MethodEmbed", function() { return MethodEmbed; });
66318
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
66319
67550
  /*
66320
67551
  * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
66321
67552
  *
@@ -66328,6 +67559,40 @@ __webpack_require__.r(__webpack_exports__);
66328
67559
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
66329
67560
  * and limitations under the License.
66330
67561
  */
67562
+ var __read = undefined && undefined.__read || function (o, n) {
67563
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
67564
+ if (!m) return o;
67565
+ var i = m.call(o),
67566
+ r,
67567
+ ar = [],
67568
+ e;
67569
+
67570
+ try {
67571
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
67572
+ ar.push(r.value);
67573
+ }
67574
+ } catch (error) {
67575
+ e = {
67576
+ error: error
67577
+ };
67578
+ } finally {
67579
+ try {
67580
+ if (r && !r.done && (m = i["return"])) m.call(i);
67581
+ } finally {
67582
+ if (e) throw e.error;
67583
+ }
67584
+ }
67585
+
67586
+ return ar;
67587
+ };
67588
+
67589
+ var __spread = undefined && undefined.__spread || function () {
67590
+ for (var ar = [], i = 0; i < arguments.length; i++) {
67591
+ ar = ar.concat(__read(arguments[i]));
67592
+ }
67593
+
67594
+ return ar;
67595
+ };
66331
67596
 
66332
67597
  var lists = [];
66333
67598
 
@@ -66358,7 +67623,7 @@ function () {
66358
67623
  args[_i] = arguments[_i];
66359
67624
  }
66360
67625
 
66361
- return methodOverride(_this._originalMethod.apply(_this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args)));
67626
+ return methodOverride(_this._originalMethod.apply(_this, __spread(args)));
66362
67627
  };
66363
67628
  };
66364
67629