apxor-rtm-ui 0.8.0 → 0.8.1

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.
@@ -12128,14 +12128,14 @@
12128
12128
  _config$wait_interval,
12129
12129
  _config$termination;
12130
12130
  _classCallCheck(this, TemplateContent);
12131
- _defineProperty(this, "UYsM", function () {
12131
+ _defineProperty(this, "NszW", function () {
12132
12132
  return new Promise(function (resolve, reject) {
12133
12133
  try {
12134
- var element = _this.KDYj(_this.layout);
12134
+ var element = _this.xyYY(_this.layout);
12135
12135
  var styleElement = document.createElement("style");
12136
12136
  styleElement.innerHTML = _this.styleContent;
12137
12137
  document.head.appendChild(styleElement);
12138
- _this.iDmo();
12138
+ _this.PfLM();
12139
12139
  try {
12140
12140
  eval(_this.script);
12141
12141
  } catch (e) {
@@ -12146,15 +12146,15 @@
12146
12146
  }
12147
12147
  _this.imageElements.forEach(function (img) {
12148
12148
  img.addEventListener("error", function () {
12149
- _this.hZAf("provided image doesn't exists");
12149
+ _this.JmOW("provided image doesn't exists");
12150
12150
  });
12151
12151
  });
12152
12152
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
12153
12153
  _this.wait_interval -= 1;
12154
12154
  if (_this.wait_interval <= 0) {
12155
- _this.hZAf("provided media doesn't exists");
12155
+ _this.JmOW("provided media doesn't exists");
12156
12156
  } else {
12157
- if (_this.gDMN() && _this.Wrko() && _this.OIYp()) {
12157
+ if (_this.uDuu() && _this.FgHb() && _this.IJFb()) {
12158
12158
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
12159
12159
  resolve(element);
12160
12160
  }
@@ -12168,7 +12168,7 @@
12168
12168
  }
12169
12169
  });
12170
12170
  });
12171
- _defineProperty(this, "hZAf", function (reason) {
12171
+ _defineProperty(this, "JmOW", function (reason) {
12172
12172
  var _window$ApxorRTM, _window$Apxor, _this$config, _this$config2, _window$Apxor2, _this$config3, _this$config4, _this$config5, _this$config6, _window3;
12173
12173
  !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
12174
12174
  apx_nudge_name: _this.name,
@@ -12184,13 +12184,13 @@
12184
12184
  _this.closeCallBack("cancel");
12185
12185
  (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorInternals) === null || _window3 === void 0 || _window3.removeBuilderTemplate(_this.configId);
12186
12186
  });
12187
- _defineProperty(this, "iDmo", function () {
12187
+ _defineProperty(this, "PfLM", function () {
12188
12188
  var BuilderTemplatesStyles = document.createElement("style");
12189
12189
  BuilderTemplatesStyles.innerHTML = _this.initialStyles;
12190
12190
  BuilderTemplatesStyles.setAttribute("apx-builder-template-styles", "");
12191
12191
  document.head.appendChild(BuilderTemplatesStyles);
12192
12192
  });
12193
- _defineProperty(this, "KDYj", function (config) {
12193
+ _defineProperty(this, "xyYY", function (config) {
12194
12194
  var _window$Apxor3;
12195
12195
  var element;
12196
12196
  switch (config.type) {
@@ -12274,7 +12274,7 @@
12274
12274
  if (config.type === "cta_button" || config.type === "button") {
12275
12275
  reason = "cta-clicked";
12276
12276
  }
12277
- _this.eBcX(e, "redirect", reason);
12277
+ _this.STbC(e, "redirect", reason);
12278
12278
  if ((_this$config7 = _this.config) !== null && _this$config7 !== void 0 && (_this$config7 = _this$config7.additional_info) !== null && _this$config7 !== void 0 && _this$config7.apx_step) {
12279
12279
  var _window4, _this$config8;
12280
12280
  (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || _window4.triggerNextStep(_this.configId, ((_this$config8 = _this.config) === null || _this$config8 === void 0 || (_this$config8 = _this$config8.additional_info) === null || _this$config8 === void 0 ? void 0 : _this$config8.apx_step) + 1);
@@ -12290,7 +12290,7 @@
12290
12290
  } else if (config.type === "cta_button" || config.type === "button") {
12291
12291
  reason = "cta-clicked";
12292
12292
  }
12293
- _this.eBcX(e, "cancel", reason);
12293
+ _this.STbC(e, "cancel", reason);
12294
12294
  // window.Apxor.logActionEvent(
12295
12295
  // "walk_through_cancelled",
12296
12296
  // this.configId,
@@ -12309,7 +12309,7 @@
12309
12309
  } else if (config.type === "cta_button" || config.type === "button") {
12310
12310
  reason = "cta-clicked";
12311
12311
  }
12312
- _this.eBcX(e, "dismiss", reason);
12312
+ _this.STbC(e, "dismiss", reason);
12313
12313
  if ((_this$config9 = _this.config) !== null && _this$config9 !== void 0 && (_this$config9 = _this$config9.additional_info) !== null && _this$config9 !== void 0 && _this$config9.apx_step) {
12314
12314
  var _window5, _this$config10;
12315
12315
  (_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || _window5.triggerNextStep(_this.configId, ((_this$config10 = _this.config) === null || _this$config10 === void 0 || (_this$config10 = _this$config10.additional_info) === null || _this$config10 === void 0 ? void 0 : _this$config10.apx_step) + 1);
@@ -12320,7 +12320,7 @@
12320
12320
  element.onclick = function (e) {
12321
12321
  e.stopPropagation();
12322
12322
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
12323
- _this.eBcX(e, "never");
12323
+ _this.STbC(e, "never");
12324
12324
  };
12325
12325
  break;
12326
12326
  case "toggle-class":
@@ -12345,7 +12345,7 @@
12345
12345
  tempInput.select();
12346
12346
  document.execCommand("copy");
12347
12347
  document.body.removeChild(tempInput);
12348
- _this.eBcX(e, "copy-content", "cta-clicked");
12348
+ _this.STbC(e, "copy-content", "cta-clicked");
12349
12349
  setTimeout(function () {
12350
12350
  window.Apxor.showInfoToast("Text-Copied:".concat(textToCopy));
12351
12351
  }, 500);
@@ -12367,7 +12367,7 @@
12367
12367
  }
12368
12368
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
12369
12369
  config.absolute_position_children.forEach(function (childConfig) {
12370
- var childElement = _this.KDYj(childConfig);
12370
+ var childElement = _this.xyYY(childConfig);
12371
12371
  element.appendChild(childElement);
12372
12372
  });
12373
12373
  }
@@ -12375,7 +12375,7 @@
12375
12375
  // Process children
12376
12376
  if (config.children && config.children.length > 0) {
12377
12377
  config.children.forEach(function (childConfig) {
12378
- var childElement = _this.KDYj(childConfig);
12378
+ var childElement = _this.xyYY(childConfig);
12379
12379
  element.appendChild(childElement);
12380
12380
  });
12381
12381
  }
@@ -12402,7 +12402,7 @@
12402
12402
  }
12403
12403
  return element;
12404
12404
  });
12405
- _defineProperty(this, "eBcX", function (e, action) {
12405
+ _defineProperty(this, "STbC", function (e, action) {
12406
12406
  var _window$Apxor4, _this$config11, _this$config12, _window$Apxor5, _this$config13, _this$config14, _this$config15, _this$config16;
12407
12407
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
12408
12408
  var additional_info = {
@@ -12431,7 +12431,7 @@
12431
12431
  _this.closeCallBack(action);
12432
12432
  }
12433
12433
  });
12434
- _defineProperty(this, "Wrko", function () {
12434
+ _defineProperty(this, "FgHb", function () {
12435
12435
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
12436
12436
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
12437
12437
  if (_this.imageElements.length === 0) return true;
@@ -12439,13 +12439,13 @@
12439
12439
  return img.complete;
12440
12440
  });
12441
12441
  });
12442
- _defineProperty(this, "OIYp", function () {
12442
+ _defineProperty(this, "IJFb", function () {
12443
12443
  if (!_this.bgImageUrl) return true;
12444
12444
  var img = new Image();
12445
12445
  img.src = _this.bgImageUrl;
12446
12446
  return img.complete;
12447
12447
  });
12448
- _defineProperty(this, "gDMN", function () {
12448
+ _defineProperty(this, "uDuu", function () {
12449
12449
  if (_this.videoElements.length === 0) return true;
12450
12450
  return _this.videoElements.every(function (video) {
12451
12451
  return video.readyState >= 3;
@@ -13379,7 +13379,7 @@
13379
13379
  case 0:
13380
13380
  _context2.prev = 0;
13381
13381
  _context2.next = 3;
13382
- return this.templateContent.UYsM();
13382
+ return this.templateContent.NszW();
13383
13383
  case 3:
13384
13384
  this.inLineContainer = _context2.sent;
13385
13385
  _context2.next = 9;
@@ -14955,7 +14955,7 @@
14955
14955
  * @description Creates the styles for Marketing message.
14956
14956
  * @returns {string} css styles
14957
14957
  */
14958
- _defineProperty(this, "CJFJ", function () {
14958
+ _defineProperty(this, "Rpwa", function () {
14959
14959
  if (!_this.enable_marketing) {
14960
14960
  return "";
14961
14961
  }
@@ -14974,7 +14974,7 @@
14974
14974
  * @private
14975
14975
  * @description Sets the marketing content at the end of the Inline
14976
14976
  */
14977
- _defineProperty(this, "CBmX", function () {
14977
+ _defineProperty(this, "EWkc", function () {
14978
14978
  if (_this.enable_marketing) {
14979
14979
  var marketingContainer = document.createElement("div");
14980
14980
  marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
@@ -15586,7 +15586,7 @@
15586
15586
  if (apxor_tooltip_styles) {
15587
15587
  return;
15588
15588
  }
15589
- var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInLineContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInLineMediaContainerStyles(), "\n ").concat(this._getInLineNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getInLineButtonContainerStyles(), " \n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.CJFJ(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15589
+ var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInLineContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInLineMediaContainerStyles(), "\n ").concat(this._getInLineNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getInLineButtonContainerStyles(), " \n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.Rpwa(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15590
15590
  var styleNode = document.createElement("style");
15591
15591
  styleNode.setAttribute("apx-tooltip-styles", "");
15592
15592
  styleNode.innerHTML = styles;
@@ -16396,7 +16396,7 @@
16396
16396
  this._setCloseButton();
16397
16397
 
16398
16398
  //Set the Marketing content
16399
- this.CBmX();
16399
+ this.EWkc();
16400
16400
  }
16401
16401
 
16402
16402
  /**
@@ -19291,7 +19291,7 @@
19291
19291
  case 0:
19292
19292
  _context2.prev = 0;
19293
19293
  _context2.next = 3;
19294
- return this.templateContent.UYsM();
19294
+ return this.templateContent.NszW();
19295
19295
  case 3:
19296
19296
  this.inAppContainer = _context2.sent;
19297
19297
  this.inAppContainer.style.zIndex = 99999;
@@ -19490,7 +19490,7 @@
19490
19490
  * @description Creates the styles for Marketing message.
19491
19491
  * @returns {string} css styles
19492
19492
  */
19493
- _defineProperty(this, "CJFJ", function () {
19493
+ _defineProperty(this, "Rpwa", function () {
19494
19494
  if (!_this.enable_marketing) {
19495
19495
  return "";
19496
19496
  }
@@ -19536,7 +19536,7 @@
19536
19536
  * @private
19537
19537
  * @description Get the response for Form content in the InApp modal.
19538
19538
  */
19539
- _defineProperty(this, "VCQT", function (form_elements) {
19539
+ _defineProperty(this, "mJrR", function (form_elements) {
19540
19540
  var obj = {};
19541
19541
  var callback = "";
19542
19542
  form_elements.forEach(function (element) {
@@ -19576,7 +19576,7 @@
19576
19576
  * @private
19577
19577
  * @description Sets the marketing content at the end of the InApp
19578
19578
  */
19579
- _defineProperty(this, "CBmX", function () {
19579
+ _defineProperty(this, "EWkc", function () {
19580
19580
  if (_this.enable_marketing) {
19581
19581
  var marketingContainer = document.createElement("div");
19582
19582
  marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
@@ -19610,6 +19610,10 @@
19610
19610
  if (this.enable_margin) this.margin = new Margin(config.margin);
19611
19611
  this.enable_border = config.enable_border;
19612
19612
  if (this.enable_border) this.border = new Border(config.border);
19613
+ this.enable_download_files = (config === null || config === void 0 ? void 0 : config.enable_download_files) || false;
19614
+ if (this.enable_download_files) {
19615
+ this.download_files = config === null || config === void 0 ? void 0 : config.download_files;
19616
+ }
19613
19617
  this.enable_close_button = config.enable_close_button;
19614
19618
  if (this.enable_close_button) this.close_button = new CloseButton(config.close_button);
19615
19619
  this.enable_scroll = config.enable_scroll;
@@ -19831,7 +19835,7 @@
19831
19835
  }, {
19832
19836
  key: "_setStyles",
19833
19837
  value: function _setStyles() {
19834
- var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInAppContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInAppMediaContainerStyles(), "\n ").concat(this._getInAppNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getFormStyles(), "\n ").concat(this._getInAppButtonContainerStyles(), "\n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.CJFJ(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
19838
+ var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInAppContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInAppMediaContainerStyles(), "\n ").concat(this._getInAppNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getFormStyles(), "\n ").concat(this._getInAppButtonContainerStyles(), "\n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.Rpwa(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
19835
19839
  var styleNode = document.createElement("style");
19836
19840
  styleNode.setAttribute("id", "apxor-style-" + this.configId);
19837
19841
  styleNode.innerHTML = styles;
@@ -20185,16 +20189,35 @@
20185
20189
  }, {
20186
20190
  key: "_getImageStyles",
20187
20191
  value: function _getImageStyles() {
20192
+ var _this4 = this;
20188
20193
  var imageStyles = "";
20189
20194
 
20190
20195
  // height: ${this.media_height};
20191
20196
  // width: ${this.media_width};
20192
20197
  // background:url('${this.image.path}') no-repeat 50% 50%;
20193
20198
  //Create the css for images only if image_config is sent.
20199
+ var imagePath;
20194
20200
  if (this.enable_image) {
20201
+ if (this.enable_download_files) {
20202
+ var _this$download_files;
20203
+ var format = "";
20204
+ (_this$download_files = this.download_files) === null || _this$download_files === void 0 || _this$download_files.forEach(function (file) {
20205
+ if ((file === null || file === void 0 ? void 0 : file.url) === _this4.image.path) {
20206
+ format = file.format;
20207
+ }
20208
+ });
20209
+ if (format != "") {
20210
+ var _window, _window$getFilePath;
20211
+ imagePath = this.image.path && format ? ((_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || (_window$getFilePath = _window.getFilePath) === null || _window$getFilePath === void 0 ? void 0 : _window$getFilePath.call(_window, this.configId, this.image.path, format)) || this.image.path : this.image.path;
20212
+ } else {
20213
+ imagePath = this.image.path;
20214
+ }
20215
+ } else {
20216
+ imagePath = this.image.path;
20217
+ }
20195
20218
  //Image can be used as a background image. Styles are different in that case.
20196
20219
  if (this.image.enable_background_image) {
20197
- imageStyles = "\n .apx-inapp-image".concat(this.cssPostFix, "{\n background-image: url('").concat(this.image.path, "');\n background-repeat: no-repeat;\n background-attachment: fixed; \n background-size: 100% 100%;\n height: ").concat(this.media_height, ";\n width: ").concat(this.media_width, ";\n box-shadow: inset ").concat(this.media_width, " ").concat(this.media_height, " 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color, this.image.background_image.mask_opacity), ",inset -").concat(this.media_width, " -").concat(this.media_height, " 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color, this.image.background_image.mask_opacity), "\n }\n ");
20220
+ imageStyles = "\n .apx-inapp-image".concat(this.cssPostFix, "{\n background-image: url('").concat(imagePath, "');\n background-repeat: no-repeat;\n background-attachment: fixed; \n background-size: 100% 100%;\n height: ").concat(this.media_height, ";\n width: ").concat(this.media_width, ";\n box-shadow: inset ").concat(this.media_width, " ").concat(this.media_height, " 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color, this.image.background_image.mask_opacity), ",inset -").concat(this.media_width, " -").concat(this.media_height, " 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color, this.image.background_image.mask_opacity), "\n }\n ");
20198
20221
  } else {
20199
20222
  var imageBorderStyles = "";
20200
20223
  if (this.image.enable_border) {
@@ -20311,7 +20334,7 @@
20311
20334
  this._setCloseButton();
20312
20335
 
20313
20336
  //Set the Marketing content
20314
- this.CBmX();
20337
+ this.EWkc();
20315
20338
  }
20316
20339
 
20317
20340
  /**
@@ -20354,22 +20377,22 @@
20354
20377
  }, {
20355
20378
  key: "_setImageOptions",
20356
20379
  value: function _setImageOptions() {
20357
- var _this4 = this;
20380
+ var _this5 = this;
20358
20381
  if (this.enable_image) {
20359
20382
  var action;
20360
20383
  if (this.image.enable_action) {
20361
20384
  var overlay = this.overlayElement;
20362
20385
  var actionCallback = function actionCallback(isCancelled, action) {
20363
- clearTimeout(_this4.terminationTimeoutId);
20364
- _this4.closeCallback(overlay, action, "new-inline".concat(_this4.cssPostFix), _this4.closeListener, _this4.redirectionListener);
20386
+ clearTimeout(_this5.terminationTimeoutId);
20387
+ _this5.closeCallback(overlay, action, "new-inline".concat(_this5.cssPostFix), _this5.closeListener, _this5.redirectionListener);
20365
20388
  };
20366
20389
  var next_Callback = function next_Callback(id, action) {
20367
20390
  actionCallback(false, "next");
20368
- _this4.stepperCallBack(id, action);
20391
+ _this5.stepperCallBack(id, action);
20369
20392
  };
20370
20393
  var prev_Callback = function prev_Callback(id, action) {
20371
20394
  actionCallback(false, "prev");
20372
- _this4.stepperCallBack(id, action);
20395
+ _this5.stepperCallBack(id, action);
20373
20396
  };
20374
20397
  var actionHandler = {
20375
20398
  next: next_Callback,
@@ -20385,7 +20408,23 @@
20385
20408
  this.inAppContainer.classList.add("apx-inapp-image".concat(this.cssPostFix));
20386
20409
  } else {
20387
20410
  var imgElement = document.createElement("img");
20388
- imgElement.src = this.image.path;
20411
+ if (this.enable_download_files) {
20412
+ var _this$download_files2;
20413
+ var format = "";
20414
+ (_this$download_files2 = this.download_files) === null || _this$download_files2 === void 0 || _this$download_files2.forEach(function (file) {
20415
+ if ((file === null || file === void 0 ? void 0 : file.url) === _this5.image.path) {
20416
+ format = file.format;
20417
+ }
20418
+ });
20419
+ if (format != "") {
20420
+ var _window2, _window2$getFilePath;
20421
+ imgElement.src.src = this.image.path && format ? ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || (_window2$getFilePath = _window2.getFilePath) === null || _window2$getFilePath === void 0 ? void 0 : _window2$getFilePath.call(_window2, this.configId, this.image.path, format)) || this.image.path : this.image.path;
20422
+ } else {
20423
+ imgElement.src = this.image.path;
20424
+ }
20425
+ } else {
20426
+ imgElement.src = this.image.path;
20427
+ }
20389
20428
  imgElement.classList.add("apx-inapp-image".concat(this.cssPostFix));
20390
20429
  if (this.image.enable_action) imgElement.onclick = function () {
20391
20430
  return action();
@@ -20439,11 +20478,28 @@
20439
20478
  }, {
20440
20479
  key: "_setIconOptions",
20441
20480
  value: function _setIconOptions() {
20481
+ var _this6 = this;
20442
20482
  if (this.enable_icon) {
20443
20483
  var iconDiv = document.createElement("div");
20444
20484
  iconDiv.classList.add("apx-inapp-icon-container".concat(this.cssPostFix));
20445
20485
  var iconElement = document.createElement("img");
20446
- iconElement.src = this.icon.path;
20486
+ if (this.enable_download_files) {
20487
+ var _this$download_files3;
20488
+ var format = "";
20489
+ (_this$download_files3 = this.download_files) === null || _this$download_files3 === void 0 || _this$download_files3.forEach(function (file) {
20490
+ if ((file === null || file === void 0 ? void 0 : file.url) === _this6.icon.path) {
20491
+ format = file.format;
20492
+ }
20493
+ });
20494
+ if (format != "") {
20495
+ var _window3, _window3$getFilePath;
20496
+ iconElement.src = this.icon.path && format ? ((_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || (_window3$getFilePath = _window3.getFilePath) === null || _window3$getFilePath === void 0 ? void 0 : _window3$getFilePath.call(_window3, this.configId, iconElement.src, format)) || this.icon.path : this.icon.path;
20497
+ } else {
20498
+ iconElement.src = this.icon.path;
20499
+ }
20500
+ } else {
20501
+ iconElement.src = this.icon.path;
20502
+ }
20447
20503
  iconElement.classList.add("apx-inapp-icon-content".concat(this.cssPostFix));
20448
20504
  iconDiv.appendChild(iconElement);
20449
20505
  this.mediaContainer.appendChild(iconDiv);
@@ -20484,13 +20540,30 @@
20484
20540
  }, {
20485
20541
  key: "_setTitleContent",
20486
20542
  value: function _setTitleContent() {
20543
+ var _this7 = this;
20487
20544
  // Create an element for the title and append it to the container.
20488
20545
  if (this.enable_title) {
20489
20546
  var titleElement = document.createElement("div");
20490
20547
  titleElement.classList.add("apx-inapp-title-div".concat(this.cssPostFix));
20491
20548
  if (this.title.enable_icon) {
20492
20549
  var titleIconElement = document.createElement("img");
20493
- titleIconElement.src = this.title.icon.path;
20550
+ if (this.enable_download_files) {
20551
+ var _this$download_files4;
20552
+ var format = "";
20553
+ (_this$download_files4 = this.download_files) === null || _this$download_files4 === void 0 || _this$download_files4.forEach(function (file) {
20554
+ if ((file === null || file === void 0 ? void 0 : file.url) === _this7.title.icon.path) {
20555
+ format = file.format;
20556
+ }
20557
+ });
20558
+ if (format != "") {
20559
+ var _window4, _window4$getFilePath;
20560
+ titleIconElement.src = this.title.icon.path && format ? ((_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || (_window4$getFilePath = _window4.getFilePath) === null || _window4$getFilePath === void 0 ? void 0 : _window4$getFilePath.call(_window4, this.configId, this.title.icon.path, format)) || this.title.icon.path : this.title.icon.path;
20561
+ } else {
20562
+ titleIconElement.src = this.title.icon.path;
20563
+ }
20564
+ } else {
20565
+ titleIconElement.src = this.title.icon.path;
20566
+ }
20494
20567
  titleIconElement.classList.add("apx-inapp-title-icon".concat(this.cssPostFix));
20495
20568
  titleElement.appendChild(titleIconElement);
20496
20569
  }
@@ -20529,7 +20602,7 @@
20529
20602
  * @description Sets the form content in the InApp modal.
20530
20603
  */
20531
20604
  function _setFormContent() {
20532
- var _this5 = this;
20605
+ var _this8 = this;
20533
20606
  if (this.enable_form) {
20534
20607
  var _this$form$elements;
20535
20608
  var formContainer = document.createElement("form");
@@ -20543,14 +20616,14 @@
20543
20616
  var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
20544
20617
  form.addEventListener("submit", function (e) {
20545
20618
  e.preventDefault();
20546
- var _this5$generateRespon = _this5.VCQT(_this5.form.elements),
20547
- obj = _this5$generateRespon.obj,
20548
- callback = _this5$generateRespon.callback;
20619
+ var _this8$generateRespon = _this8.mJrR(_this8.form.elements),
20620
+ obj = _this8$generateRespon.obj,
20621
+ callback = _this8$generateRespon.callback;
20549
20622
  var evalString = "(obj)=>" + callback + "(obj)";
20550
20623
  var evalFunction = eval(evalString);
20551
20624
  evalFunction(obj);
20552
- clearTimeout(_this5.terminationTimeoutId);
20553
- _this5.closeCallback(_this5.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this5.cssPostFix), _this5.closeListener, _this5.redirectionListener);
20625
+ clearTimeout(_this8.terminationTimeoutId);
20626
+ _this8.closeCallback(_this8.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this8.cssPostFix), _this8.closeListener, _this8.redirectionListener);
20554
20627
  });
20555
20628
  }
20556
20629
  }
@@ -20650,23 +20723,23 @@
20650
20723
  }, {
20651
20724
  key: "_setButtons",
20652
20725
  value: function _setButtons(position) {
20653
- var _this6 = this;
20726
+ var _this9 = this;
20654
20727
  if (!this.enable_buttons) {
20655
20728
  return;
20656
20729
  }
20657
20730
  if (position === BUTTON_CONTAINER_POSITION.TOP && this.buttons.enable_top || position === BUTTON_CONTAINER_POSITION.CENTER && this.buttons.enable_center || position === BUTTON_CONTAINER_POSITION.BOTTOM && this.buttons.enable_bottom) {
20658
20731
  var overlay = this.overlayElement;
20659
20732
  var actionCallback = function actionCallback(isCancelled, action) {
20660
- clearTimeout(_this6.terminationTimeoutId);
20661
- _this6.closeCallback(overlay, action, "", "new-inline".concat(_this6.cssPostFix), _this6.closeListener, _this6.redirectionListener);
20733
+ clearTimeout(_this9.terminationTimeoutId);
20734
+ _this9.closeCallback(overlay, action, "", "new-inline".concat(_this9.cssPostFix), _this9.closeListener, _this9.redirectionListener);
20662
20735
  };
20663
20736
  var next_Callback = function next_Callback(id, action) {
20664
20737
  actionCallback(false, "next");
20665
- _this6.stepperCallBack(id, action);
20738
+ _this9.stepperCallBack(id, action);
20666
20739
  };
20667
20740
  var prev_Callback = function prev_Callback(id, action) {
20668
20741
  actionCallback(false, "prev");
20669
- _this6.stepperCallBack(id, action);
20742
+ _this9.stepperCallBack(id, action);
20670
20743
  };
20671
20744
  var actionHandler = {
20672
20745
  next: next_Callback,
@@ -20708,7 +20781,7 @@
20708
20781
  }, {
20709
20782
  key: "_setCloseButton",
20710
20783
  value: function _setCloseButton() {
20711
- var _this7 = this;
20784
+ var _this10 = this;
20712
20785
  if (this.enable_close_button) {
20713
20786
  var closeButton = document.createElement("span");
20714
20787
  // Close button SVG is decided based on the type of the button in the config.
@@ -20725,13 +20798,13 @@
20725
20798
  }
20726
20799
  closeButton.classList.add("apx-inapp-close".concat(this.cssPostFix));
20727
20800
  closeButton.addEventListener("click", function () {
20728
- if (_this7.close_button.action === "dismiss") {
20729
- window.Apxor.logActionEvent(EVENT_PREFIX.INAPP + "InAppXIconClicked" + "_Clicked", _this7.configId, _this7.name);
20730
- } else if (_this7.close_button.action === "cancel") {
20731
- window.Apxor.logActionEvent("walk_through_cancelled", _this7.configId, _this7.name);
20801
+ if (_this10.close_button.action === "dismiss") {
20802
+ window.Apxor.logActionEvent(EVENT_PREFIX.INAPP + "InAppXIconClicked" + "_Clicked", _this10.configId, _this10.name);
20803
+ } else if (_this10.close_button.action === "cancel") {
20804
+ window.Apxor.logActionEvent("walk_through_cancelled", _this10.configId, _this10.name);
20732
20805
  }
20733
- clearTimeout(_this7.terminationTimeoutId);
20734
- _this7.closeCallback(_this7.overlayElement, _this7.close_button.action, "", ".apx-inapp-container".concat(_this7.cssPostFix), _this7.closeListener, _this7.redirectionListener);
20806
+ clearTimeout(_this10.terminationTimeoutId);
20807
+ _this10.closeCallback(_this10.overlayElement, _this10.close_button.action, "", ".apx-inapp-container".concat(_this10.cssPostFix), _this10.closeListener, _this10.redirectionListener);
20735
20808
  });
20736
20809
  this.direction.non_media === DIRECTION.VERTICAL || this.direction.nudge === DIRECTION.VERTICAL ? this.inAppContainer.appendChild(closeButton) : this.buttonContainer.appendChild(closeButton);
20737
20810
  }
@@ -20745,10 +20818,10 @@
20745
20818
  * @description If the auto dismiss is enabled, sets the timeout to call the InApp close.
20746
20819
  */
20747
20820
  function _setAutoTerminate() {
20748
- var _this8 = this;
20821
+ var _this11 = this;
20749
20822
  if (this.terminationConfig.auto_dismiss === true) {
20750
20823
  this.terminationTimeoutId = window.setTimeout(function () {
20751
- _this8.closeCallback(_this8.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this8.cssPostFix), _this8.closeListener, _this8.redirectionListener);
20824
+ _this11.closeCallback(_this11.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this11.cssPostFix), _this11.closeListener, _this11.redirectionListener);
20752
20825
  }, this.terminationConfig.duration);
20753
20826
  }
20754
20827
  }
@@ -20903,7 +20976,7 @@
20903
20976
  };
20904
20977
  } else {
20905
20978
  // As the video player is hidden by default, unhide if the mode is not PIP.
20906
- _this.SyyJ();
20979
+ _this.FivR();
20907
20980
  }
20908
20981
  _this.showCallback();
20909
20982
  } catch (e) {
@@ -20924,7 +20997,7 @@
20924
20997
  * For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
20925
20998
  * For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
20926
20999
  */
20927
- _defineProperty(this, "Xmhy", function () {
21000
+ _defineProperty(this, "SXHT", function () {
20928
21001
  var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
20929
21002
  width = _getHeightWidthFromRe.width,
20930
21003
  height = _getHeightWidthFromRe.height;
@@ -20936,7 +21009,7 @@
20936
21009
  * @private
20937
21010
  * @description Removes the video player style element.
20938
21011
  */
20939
- _defineProperty(this, "IrHN", function () {
21012
+ _defineProperty(this, "ejyO", function () {
20940
21013
  var playerStyles = document.getElementById("apx-mpl-styles");
20941
21014
  if (playerStyles) {
20942
21015
  playerStyles.remove();
@@ -20947,7 +21020,7 @@
20947
21020
  * @private
20948
21021
  * @description Attach listeners on the video controls
20949
21022
  */
20950
- _defineProperty(this, "ZTFg", function () {
21023
+ _defineProperty(this, "WNJK", function () {
20951
21024
  // Listener for the video end. Display the CTA's when the video ends.
20952
21025
  _this.videoElement.addEventListener("ended", function () {
20953
21026
  var ctaButtons = document.getElementById("apx-cta-btn");
@@ -21062,7 +21135,7 @@
21062
21135
  * @private
21063
21136
  * @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
21064
21137
  */
21065
- _defineProperty(this, "edSQ", function () {
21138
+ _defineProperty(this, "QBel", function () {
21066
21139
  var _this$terminationConf;
21067
21140
  if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
21068
21141
  // On Exit of the PIP,
@@ -21102,7 +21175,7 @@
21102
21175
  * @private Sets the custom controls on the video player.
21103
21176
  * PIP and close are the custom controls that are created and positions on the video.
21104
21177
  */
21105
- _defineProperty(this, "czTg", function () {
21178
+ _defineProperty(this, "stqw", function () {
21106
21179
  _this.enable_close_button;
21107
21180
  if (_this.enable_close_button) {
21108
21181
  var closeButton = document.createElement("span");
@@ -21149,21 +21222,21 @@
21149
21222
  * @function hideVideoPlayer
21150
21223
  * @description Sets the visibility of the video player to hidden.
21151
21224
  */
21152
- _defineProperty(this, "BFUA", function () {
21225
+ _defineProperty(this, "XcAB", function () {
21153
21226
  _this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
21154
21227
  });
21155
21228
  /**
21156
21229
  * @function unhideVideoPlayer
21157
21230
  * @description Unhides video player.
21158
21231
  */
21159
- _defineProperty(this, "SyyJ", function () {
21232
+ _defineProperty(this, "FivR", function () {
21160
21233
  _this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
21161
21234
  });
21162
21235
  /**
21163
21236
  * @function getVideoElement
21164
21237
  * @returns {HTMLElement} Video ekement
21165
21238
  */
21166
- _defineProperty(this, "iueL", function () {
21239
+ _defineProperty(this, "MbVl", function () {
21167
21240
  return _this.videoElement;
21168
21241
  });
21169
21242
  this.videoPlayer = null;
@@ -21217,7 +21290,7 @@
21217
21290
  this.videoPlayer.style.backgroundColor = this.bg_color;
21218
21291
 
21219
21292
  // Video has a resolution, not deviating from the resolution set the height and width.
21220
- this.Xmhy();
21293
+ this.SXHT();
21221
21294
  //Generate the styles and add them to the document head.
21222
21295
  this._setVideoPlayerStyles();
21223
21296
  //Set the position of the video player with in the 5 possible positions.
@@ -21225,16 +21298,16 @@
21225
21298
  //Create a video element,set the source and add to the container.
21226
21299
  this._setPlayerContent();
21227
21300
  //Set the listeners on the video control buttons.
21228
- this.ZTFg();
21301
+ this.WNJK();
21229
21302
  //Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
21230
- this.edSQ();
21303
+ this.QBel();
21231
21304
  //Set the custom close and PIP controls. Not using the defaults from the html video element.
21232
21305
  //Reason - We want to position them at the top right and left positions.
21233
- this.czTg();
21306
+ this.stqw();
21234
21307
  //Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
21235
21308
  this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
21236
21309
  //Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
21237
- this.BFUA();
21310
+ this.XcAB();
21238
21311
  //If the auto dismiss is enabled, sets the timeout to call the InApp close.
21239
21312
  this._setAutoTerminate();
21240
21313
  document.body.appendChild(this.videoPlayer);
@@ -21349,7 +21422,7 @@
21349
21422
  }
21350
21423
  }
21351
21424
  this.videoPlayer.remove();
21352
- this.IrHN();
21425
+ this.ejyO();
21353
21426
  if (closeButtonName !== "auto_dismiss") {
21354
21427
  var _window$ApxorRTM9;
21355
21428
  (_window$ApxorRTM9 = window.ApxorRTM) === null || _window$ApxorRTM9 === void 0 || _window$ApxorRTM9.logEvent("apx_video_inapp_close_button_clicked", {
@@ -21419,7 +21492,7 @@
21419
21492
  replayCount: _this3.replayCount
21420
21493
  });
21421
21494
  _this3.videoPlayer.remove();
21422
- _this3.IrHN();
21495
+ _this3.ejyO();
21423
21496
  _this3.hideCallback();
21424
21497
  } catch (e) {
21425
21498
  console.log("Can't close the video player\n".concat(e));
@@ -21513,14 +21586,14 @@
21513
21586
  try {
21514
21587
  var _window;
21515
21588
  (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.debug("called showEmbedCards");
21516
- var element = _this.qNQe(_this.layout);
21517
- _this.uzOo();
21589
+ var element = _this.CiXs(_this.layout);
21590
+ _this.cxsH();
21518
21591
  window.onresize = function () {
21519
- _this.RiLq();
21592
+ _this.ahtj();
21520
21593
  };
21521
21594
  _this.imageElements.forEach(function (img) {
21522
21595
  img.addEventListener("error", function () {
21523
- _this.hZAf("provided image doesn't exists");
21596
+ _this.JmOW("provided image doesn't exists");
21524
21597
  });
21525
21598
  });
21526
21599
  var rootContainer = document.createElement("div");
@@ -21531,7 +21604,7 @@
21531
21604
  var styleElement = document.createElement("style");
21532
21605
  styleElement.innerHTML = _this.styleContent;
21533
21606
  document.head.appendChild(styleElement);
21534
- _this.dsuA(_this.termination);
21607
+ _this.hQng(_this.termination);
21535
21608
  try {
21536
21609
  eval(_this.script);
21537
21610
  } catch (e) {
@@ -21542,10 +21615,10 @@
21542
21615
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
21543
21616
  _this.wait_interval -= 1;
21544
21617
  if (_this.wait_interval <= 0) {
21545
- _this.hZAf("provided media doesn't exists");
21618
+ _this.JmOW("provided media doesn't exists");
21546
21619
  } else {
21547
- if (_this.gDMN() && _this.Wrko() && _this.OIYp()) {
21548
- _this.RiLq();
21620
+ if (_this.uDuu() && _this.FgHb() && _this.IJFb()) {
21621
+ _this.ahtj();
21549
21622
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
21550
21623
  }
21551
21624
  }
@@ -21556,7 +21629,7 @@
21556
21629
  (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorLogger) === null || _window3 === void 0 || _window3.error("failed while creating embed card with error: ".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
21557
21630
  }
21558
21631
  });
21559
- _defineProperty(this, "hZAf", function (reason) {
21632
+ _defineProperty(this, "JmOW", function (reason) {
21560
21633
  var _window$ApxorRTM, _window4;
21561
21634
  !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
21562
21635
  apx_nudge_name: _this.name,
@@ -21570,13 +21643,13 @@
21570
21643
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
21571
21644
  (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorWidget) === null || _window4 === void 0 || _window4.removeEmbedCard(_this.configId);
21572
21645
  });
21573
- _defineProperty(this, "uzOo", function () {
21646
+ _defineProperty(this, "cxsH", function () {
21574
21647
  var EmbeddedCardsStyles = document.createElement("style");
21575
21648
  EmbeddedCardsStyles.innerHTML = _this.initialStyles;
21576
21649
  EmbeddedCardsStyles.setAttribute("apx-embedded-card-styles", "");
21577
21650
  document.head.appendChild(EmbeddedCardsStyles);
21578
21651
  });
21579
- _defineProperty(this, "qNQe", function (config) {
21652
+ _defineProperty(this, "CiXs", function (config) {
21580
21653
  var _window$Apxor;
21581
21654
  var element;
21582
21655
  switch (config.type) {
@@ -21650,27 +21723,27 @@
21650
21723
  element.onclick = function (e) {
21651
21724
  e.stopPropagation();
21652
21725
  window.Apxor.redirect(JSON.stringify(action));
21653
- _this.eBcX(e);
21726
+ _this.STbC(e);
21654
21727
  };
21655
21728
  break;
21656
21729
  case "show-video":
21657
21730
  element.onclick = function (e) {
21658
21731
  e.stopPropagation();
21659
21732
  window.Apxor.showVideoInApp(_this.configId, _this.name, action.url);
21660
- _this.eBcX(e);
21733
+ _this.STbC(e);
21661
21734
  };
21662
21735
  break;
21663
21736
  case "cancel":
21664
21737
  element.onclick = function (e) {
21665
21738
  e.stopPropagation();
21666
- _this.eBcX(e);
21739
+ _this.STbC(e);
21667
21740
  window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
21668
21741
  };
21669
21742
  break;
21670
21743
  case "dismiss":
21671
21744
  element.onclick = function (e) {
21672
21745
  e.stopPropagation();
21673
- _this.eBcX(e);
21746
+ _this.STbC(e);
21674
21747
  };
21675
21748
  break;
21676
21749
  case "never":
@@ -21678,7 +21751,7 @@
21678
21751
  e.stopPropagation();
21679
21752
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
21680
21753
  window.Apxor.logActionEvent("never_show_clicked", _this.configId, _this.name);
21681
- _this.eBcX(e);
21754
+ _this.STbC(e);
21682
21755
  };
21683
21756
  break;
21684
21757
  case "toggle-class":
@@ -21703,7 +21776,7 @@
21703
21776
  tempInput.select();
21704
21777
  document.execCommand("copy");
21705
21778
  document.body.removeChild(tempInput);
21706
- _this.eBcX(e);
21779
+ _this.STbC(e);
21707
21780
  };
21708
21781
  break;
21709
21782
  case "log-app-event":
@@ -21722,7 +21795,7 @@
21722
21795
  }
21723
21796
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
21724
21797
  config.absolute_position_children.forEach(function (childConfig) {
21725
- var childElement = _this.KDYj(childConfig);
21798
+ var childElement = _this.xyYY(childConfig);
21726
21799
  element.appendChild(childElement);
21727
21800
  });
21728
21801
  }
@@ -21730,7 +21803,7 @@
21730
21803
  // Process children
21731
21804
  if (config.children && config.children.length > 0) {
21732
21805
  config.children.forEach(function (childConfig) {
21733
- var childElement = _this.qNQe(childConfig);
21806
+ var childElement = _this.CiXs(childConfig);
21734
21807
  element.appendChild(childElement);
21735
21808
  });
21736
21809
  }
@@ -21756,7 +21829,7 @@
21756
21829
  }
21757
21830
  return element;
21758
21831
  });
21759
- _defineProperty(this, "eBcX", function (e) {
21832
+ _defineProperty(this, "STbC", function (e) {
21760
21833
  var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
21761
21834
  var additional_info = {
21762
21835
  apx_nudge_name: _this.name,
@@ -21773,7 +21846,7 @@
21773
21846
  (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_card_interaction", additional_info);
21774
21847
  }
21775
21848
  });
21776
- _defineProperty(this, "dsuA", function (config) {
21849
+ _defineProperty(this, "hQng", function (config) {
21777
21850
  config.forEach(function (id) {
21778
21851
  var element = document.getElementById(id);
21779
21852
  if (element) {
@@ -21781,7 +21854,7 @@
21781
21854
  }
21782
21855
  });
21783
21856
  });
21784
- _defineProperty(this, "Wrko", function () {
21857
+ _defineProperty(this, "FgHb", function () {
21785
21858
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
21786
21859
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
21787
21860
  if (_this.imageElements.length === 0) return true;
@@ -21789,19 +21862,19 @@
21789
21862
  return img.complete;
21790
21863
  });
21791
21864
  });
21792
- _defineProperty(this, "gDMN", function () {
21865
+ _defineProperty(this, "uDuu", function () {
21793
21866
  if (_this.videoElements.length === 0) return true;
21794
21867
  return _this.videoElements.every(function (video) {
21795
21868
  return video.readyState >= 3;
21796
21869
  });
21797
21870
  });
21798
- _defineProperty(this, "OIYp", function () {
21871
+ _defineProperty(this, "IJFb", function () {
21799
21872
  if (!_this.bgImageUrl) return true;
21800
21873
  var img = new Image();
21801
21874
  img.src = _this.bgImageUrl;
21802
21875
  return img.complete;
21803
21876
  });
21804
- _defineProperty(this, "RiLq", function () {
21877
+ _defineProperty(this, "ahtj", function () {
21805
21878
  var _window6, _window7;
21806
21879
  var width = window.document.querySelector("html").offsetWidth;
21807
21880
  var height = window.document.querySelector("html").offsetHeight;
@@ -21890,8 +21963,8 @@
21890
21963
  _this.storyContainer.appendChild(currentElement);
21891
21964
  _this.storyContainer.appendChild(slideDetails);
21892
21965
  document.body.appendChild(_this.storyContainer);
21893
- _this.zPUk();
21894
- _this.NkOn();
21966
+ _this.eceU();
21967
+ _this.LYqv();
21895
21968
  _this.progress = Array.from(document.querySelectorAll(".progress"));
21896
21969
  var current_slide = document.querySelector(".slide-details");
21897
21970
  var playNext = function playNext(e) {
@@ -21937,7 +22010,7 @@
21937
22010
  _existingAbsoluteElements2.forEach(function (element) {
21938
22011
  element.remove();
21939
22012
  });
21940
- // this.UFDN();
22013
+ // this.sAkH();
21941
22014
  var _currentSlideDetails = document.querySelector(".slide-details");
21942
22015
  _currentSlideDetails.innerHTML = "";
21943
22016
  _this.position = _this.position + 1;
@@ -22033,7 +22106,7 @@
22033
22106
  absolute_header = document.createElement("div");
22034
22107
  current_slide_from_config.layout.absolute_position_children.forEach(function (current_element) {
22035
22108
  var current_absolute_element;
22036
- current_absolute_element = _this.KDYj(current_element);
22109
+ current_absolute_element = _this.xyYY(current_element);
22037
22110
  absolute_header.appendChild(current_absolute_element);
22038
22111
  });
22039
22112
  (_absolute_header = absolute_header) === null || _absolute_header === void 0 || _absolute_header.classList.add("apx-slide-header");
@@ -22094,7 +22167,7 @@
22094
22167
  document.body.style.backgroundRepeat = "";
22095
22168
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
22096
22169
  delete updated_layout_without_absolute_elements["absolute_position_children"];
22097
- element = _this.KDYj(updated_layout_without_absolute_elements);
22170
+ element = _this.xyYY(updated_layout_without_absolute_elements);
22098
22171
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
22099
22172
  document.body.style.margin = "0px";
22100
22173
  }
@@ -22102,9 +22175,9 @@
22102
22175
  current_slide.removeChild(current_slide.children[0]);
22103
22176
  }
22104
22177
  current_slide.appendChild(element);
22105
- _this.pXby();
22178
+ _this.nJlx();
22106
22179
  window.intervalToCheckImgStatus = setInterval(function () {
22107
- if (_this.ATnR()) {
22180
+ if (_this.ZjRm()) {
22108
22181
  clearInterval(window.intervalToCheckImgStatus);
22109
22182
  }
22110
22183
  }, 500);
@@ -22132,7 +22205,7 @@
22132
22205
  });
22133
22206
  playNext();
22134
22207
  });
22135
- _defineProperty(this, "UFDN", function () {
22208
+ _defineProperty(this, "sAkH", function () {
22136
22209
  document.body.classList.add("slide-right");
22137
22210
  var animationEndCounter = 0;
22138
22211
  var onAnimationEnd = function onAnimationEnd() {
@@ -22144,7 +22217,7 @@
22144
22217
  };
22145
22218
  document.body.addEventListener("animationend", onAnimationEnd);
22146
22219
  });
22147
- _defineProperty(this, "KDYj", function (config) {
22220
+ _defineProperty(this, "xyYY", function (config) {
22148
22221
  var _window$Apxor3;
22149
22222
  var element;
22150
22223
  var startY;
@@ -22200,7 +22273,7 @@
22200
22273
  element.innerHTML = "<svg width=\"30\" height=\"30\" viewBox=\"0 0 25 25\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12.375 4L10.1979 6.17708L7.92708 9.20833H3V15.4583H7.16667L12.375 20.6667V4Z\" fill=\"currentColor\" />\n <path d=\"M14.4905 20.2167C18.9193 20.2167 22.5095 16.6265 22.5095 12.1977C22.5095 7.76894 18.9193 4.17871 14.4905 4.17871\" stroke=\"currentColor\" fill =\"transparent\" stroke-width=\"1.782\"/>\n <path d=\"M14.4905 15.7618C16.4588 15.7618 18.0545 14.1661 18.0545 12.1978C18.0545 10.2294 16.4588 8.63379 14.4905 8.63379\" stroke=\"currentColor\" fill=\"transparent\" stroke-width=\"1.782\"/>\n </svg>";
22201
22274
  element.id = "apx-mute-icon";
22202
22275
  element.addEventListener("touchstart", function (event) {
22203
- _this.vuBO(event);
22276
+ _this.FgHM(event);
22204
22277
  });
22205
22278
  break;
22206
22279
  case "copy_icon":
@@ -22394,7 +22467,7 @@
22394
22467
  }
22395
22468
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
22396
22469
  config.absolute_position_children.forEach(function (childConfig) {
22397
- var childElement = _this.KDYj(childConfig);
22470
+ var childElement = _this.xyYY(childConfig);
22398
22471
  element.appendChild(childElement);
22399
22472
  });
22400
22473
  }
@@ -22402,7 +22475,7 @@
22402
22475
  // Process children
22403
22476
  if (config.children && config.children.length > 0) {
22404
22477
  config.children.forEach(function (childConfig) {
22405
- var childElement = _this.KDYj(childConfig);
22478
+ var childElement = _this.xyYY(childConfig);
22406
22479
  element.appendChild(childElement);
22407
22480
  });
22408
22481
  }
@@ -22429,7 +22502,7 @@
22429
22502
  }
22430
22503
  return element;
22431
22504
  });
22432
- _defineProperty(this, "vuBO", function (event) {
22505
+ _defineProperty(this, "FgHM", function (event) {
22433
22506
  var slide_details_to_be_deleted;
22434
22507
  var mute_child_elements;
22435
22508
  var unmute_child_elements;
@@ -22459,11 +22532,11 @@
22459
22532
  }
22460
22533
  // this.muteElement.addEventListener("touchstart", (event) => {
22461
22534
  // event.stopPropagation();
22462
- // this.vuBO(event);
22535
+ // this.FgHM(event);
22463
22536
  // });
22464
22537
  }
22465
22538
  });
22466
- _defineProperty(this, "NkOn", function () {
22539
+ _defineProperty(this, "LYqv", function () {
22467
22540
  var tapTimeout;
22468
22541
  var tapThreshold = 0.5; // Assuming 0.5 is the center of the WebView
22469
22542
  var longPressDuration = 200;
@@ -22587,7 +22660,7 @@
22587
22660
  event.target.dataset.touchStartTime = event.timeStamp;
22588
22661
  });
22589
22662
  });
22590
- _defineProperty(this, "zPUk", function () {
22663
+ _defineProperty(this, "eceU", function () {
22591
22664
  var startY, startX;
22592
22665
  _this.storyContainer.addEventListener("touchstart", function (event) {
22593
22666
  _this.swipeTouch = true;
@@ -22794,7 +22867,7 @@
22794
22867
  }, 50);
22795
22868
  });
22796
22869
  });
22797
- _defineProperty(this, "pXby", function () {
22870
+ _defineProperty(this, "nJlx", function () {
22798
22871
  _this.loader.style.display = "block";
22799
22872
  var progress = Array.from(document.querySelectorAll(".progress"));
22800
22873
  var activeIndex = progress.findIndex(function (el) {
@@ -22810,7 +22883,7 @@
22810
22883
  }
22811
22884
  }
22812
22885
  });
22813
- _defineProperty(this, "SmfR", function () {
22886
+ _defineProperty(this, "XedP", function () {
22814
22887
  if (!_this.continueLoading) {
22815
22888
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
22816
22889
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
@@ -22830,19 +22903,19 @@
22830
22903
  _this.loader.style.display = "none";
22831
22904
  }
22832
22905
  });
22833
- _defineProperty(this, "Wrko", function () {
22906
+ _defineProperty(this, "FgHb", function () {
22834
22907
  if (_this.imageElements.length === 0) return true;
22835
22908
  return _this.imageElements.every(function (img) {
22836
22909
  return img.complete;
22837
22910
  });
22838
22911
  });
22839
- _defineProperty(this, "gDMN", function () {
22912
+ _defineProperty(this, "uDuu", function () {
22840
22913
  if (_this.videoElements.length === 0) return true;
22841
22914
  return _this.videoElements.every(function (video) {
22842
22915
  return video.readyState >= 3;
22843
22916
  });
22844
22917
  });
22845
- _defineProperty(this, "ATnR", function () {
22918
+ _defineProperty(this, "ZjRm", function () {
22846
22919
  var bodyStyles = window.getComputedStyle(document.body);
22847
22920
  var backgroundImage = bodyStyles.backgroundImage;
22848
22921
  if (backgroundImage && backgroundImage !== "none" && _this.current_slide_config.media_type === "image") {
@@ -22852,7 +22925,7 @@
22852
22925
  var img = new Image();
22853
22926
  img.src = imageUrl;
22854
22927
  if (img.complete) {
22855
- _this.SmfR();
22928
+ _this.XedP();
22856
22929
  return true;
22857
22930
  }
22858
22931
  return false;
@@ -22860,21 +22933,21 @@
22860
22933
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
22861
22934
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
22862
22935
  if (childElements[0].readyState >= 3) {
22863
- _this.SmfR();
22936
+ _this.XedP();
22864
22937
  return true;
22865
22938
  }
22866
22939
  return false;
22867
22940
  } else {
22868
22941
  if (_this.videoElements.length == 0 && _this.imageElements.length == 0) {
22869
- _this.SmfR();
22942
+ _this.XedP();
22870
22943
  return true;
22871
- } else if (_this.Wrko() && _this.gDMN()) {
22872
- _this.SmfR();
22944
+ } else if (_this.FgHb() && _this.uDuu()) {
22945
+ _this.XedP();
22873
22946
  return true;
22874
22947
  }
22875
22948
  }
22876
22949
  });
22877
- _defineProperty(this, "nHlR", function (event, startY, action) {
22950
+ _defineProperty(this, "Bosj", function (event, startY, action) {
22878
22951
  event.stopPropagation();
22879
22952
  var endY = event.changedTouches[0].clientY;
22880
22953
  var deltaY = startY - endY;
@@ -22962,7 +23035,7 @@
22962
23035
  this.swipe_action;
22963
23036
  this.continueLoading = false;
22964
23037
  this.boundSwipeUpHandling = function (event) {
22965
- return _this.nHlR(event, _this.startY, _this.swipe_action);
23038
+ return _this.Bosj(event, _this.startY, _this.swipe_action);
22966
23039
  };
22967
23040
  }
22968
23041
  _createClass(Stories, [{
@@ -23025,7 +23098,7 @@
23025
23098
  } else {
23026
23099
  var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM16, _window$ApxorRTM17, _window$ApxorRTM18;
23027
23100
  // Move to the first slide of the next group
23028
- // this.UFDN();
23101
+ // this.sAkH();
23029
23102
  this.position++;
23030
23103
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
23031
23104
  this.slides = this.config[this.position].slides;
@@ -23151,7 +23224,7 @@
23151
23224
  if (activeIndex === 0) {
23152
23225
  var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM22, _window$ApxorRTM23, _window$ApxorRTM24;
23153
23226
  // If at the first slide of the current group, move to the last slide of the previous group
23154
- // this.UFDN();
23227
+ // this.sAkH();
23155
23228
  this.position--;
23156
23229
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
23157
23230
  this.slides = this.config[this.position].slides;
@@ -23340,25 +23413,25 @@
23340
23413
  // Create custom content
23341
23414
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
23342
23415
  delete updated_layout_without_absolute_elements["absolute_position_children"];
23343
- element = this.KDYj(updated_layout_without_absolute_elements);
23416
+ element = this.xyYY(updated_layout_without_absolute_elements);
23344
23417
  }
23345
23418
  // Append slide content to slide details container
23346
23419
 
23347
23420
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
23348
23421
  document.body.style.margin = "0px";
23349
23422
  currentSlideDetails.appendChild(element);
23350
- this.pXby();
23423
+ this.nJlx();
23351
23424
 
23352
23425
  // Handle absolute position children
23353
23426
  if (current_slide_from_config.layout.absolute_position_children && current_slide_from_config.layout.absolute_position_children.length > 0) {
23354
23427
  current_slide_from_config.layout.absolute_position_children.forEach(function (childConfig) {
23355
- var childElement = _this2.KDYj(childConfig);
23428
+ var childElement = _this2.xyYY(childConfig);
23356
23429
  // Append absolute position children to slide details container
23357
23430
  currentSlideDetails.appendChild(childElement);
23358
23431
  });
23359
23432
  }
23360
23433
  window.intervalToCheckImgStatus2 = setInterval(function () {
23361
- if (_this2.ATnR()) {
23434
+ if (_this2.ZjRm()) {
23362
23435
  clearInterval(window.intervalToCheckImgStatus2);
23363
23436
  }
23364
23437
  }, 500);
@@ -23405,16 +23478,16 @@
23405
23478
  var RTM = /*#__PURE__*/_createClass(function RTM() {
23406
23479
  var _this = this;
23407
23480
  _classCallCheck(this, RTM);
23408
- _defineProperty(this, "GSRP", {});
23481
+ _defineProperty(this, "oVRS", {});
23409
23482
  _defineProperty(this, "isShowingAction", false);
23410
23483
  _defineProperty(this, "currentAction", null);
23411
- _defineProperty(this, "TadV", null);
23412
- _defineProperty(this, "version", 80);
23484
+ _defineProperty(this, "veMk", null);
23485
+ _defineProperty(this, "version", 81);
23413
23486
  _defineProperty(this, "isInitialised", false);
23414
- _defineProperty(this, "JoHc", {});
23415
- _defineProperty(this, "fdTw", false);
23487
+ _defineProperty(this, "rnKR", {});
23488
+ _defineProperty(this, "AYSV", false);
23416
23489
  _defineProperty(this, "_isShownECCalled", false);
23417
- _defineProperty(this, "mRub", function () {
23490
+ _defineProperty(this, "qqxH", function () {
23418
23491
  _this.isInitialised = true;
23419
23492
  var oldPushState = history.pushState;
23420
23493
  history.pushState = function pushState() {
@@ -23439,7 +23512,7 @@
23439
23512
  });
23440
23513
  _defineProperty(this, "show", function (uiJson, duration, uuid, name) {
23441
23514
  if (!_this.isInitialised) {
23442
- _this.mRub();
23515
+ _this.qqxH();
23443
23516
  }
23444
23517
  window.addEventListener("pagehide", function () {
23445
23518
  var _window$Apxor, _window$Apxor$pageUnl;
@@ -23466,7 +23539,7 @@
23466
23539
  } else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
23467
23540
  _this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
23468
23541
  } else if (ui_config.display_type === "coach_mark_v2") {
23469
- _this.QJAO(ui_config, duration, uuid, name);
23542
+ _this.rJlm(ui_config, duration, uuid, name);
23470
23543
  } else {
23471
23544
  showCoachmarkWithDelay(_this, ui_config, {
23472
23545
  configId: uuid,
@@ -23567,7 +23640,7 @@
23567
23640
  try {
23568
23641
  config = config.split("\n").join("\\n");
23569
23642
  var ui_config = JSON.parse(config);
23570
- _this.mKfh(ui_config, configId, name, position, slidesSeenCount, view_id);
23643
+ _this.pkOH(ui_config, configId, name, position, slidesSeenCount, view_id);
23571
23644
  } catch (e) {
23572
23645
  var _window$Apxor3;
23573
23646
  if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
@@ -23581,7 +23654,7 @@
23581
23654
  console.error(e);
23582
23655
  }
23583
23656
  });
23584
- _defineProperty(this, "mKfh", function (config, configId, name, position, slidesSeenCount, view_id) {
23657
+ _defineProperty(this, "pkOH", function (config, configId, name, position, slidesSeenCount, view_id) {
23585
23658
  var cardsContainer = new Stories(config, configId, name, position, slidesSeenCount, view_id, function () {
23586
23659
  window.Apxor.logAppEvent("apx_nudge_shown", {
23587
23660
  campaignName: name,
@@ -23629,7 +23702,7 @@
23629
23702
  var _window22, _window22$updateFlag, _window23;
23630
23703
  _this.isShowingAction = false;
23631
23704
  _this.currentAction = null;
23632
- _this.TadV = null;
23705
+ _this.veMk = null;
23633
23706
  (_window22 = window) === null || _window22 === void 0 || (_window22 = _window22.Apxor) === null || _window22 === void 0 || (_window22$updateFlag = _window22.updateFlag) === null || _window22$updateFlag === void 0 || _window22$updateFlag.call(_window22, false);
23634
23707
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
23635
23708
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -23640,21 +23713,21 @@
23640
23713
  }
23641
23714
  };
23642
23715
  if (action_class === "new-inline") {
23643
- _this.TadV = new InLineTooltip(ui_config, [], [], terminationConfig, {
23716
+ _this.veMk = new InLineTooltip(ui_config, [], [], terminationConfig, {
23644
23717
  configId: uuid,
23645
23718
  configName: name
23646
23719
  }, _this, onShow, onHide, function () {}, false, 0);
23647
23720
  } else if (action_class === "tooltip_builder") {
23648
- _this.TadV = new NewInLineTooltip(ui_config, terminationConfig, {
23721
+ _this.veMk = new NewInLineTooltip(ui_config, terminationConfig, {
23649
23722
  configId: uuid,
23650
23723
  configName: name
23651
23724
  }, _this, onShow, onHide);
23652
23725
  }
23653
23726
  setTimeout(function () {
23654
- _this.TadV.createNewTooltip();
23727
+ _this.veMk.createNewTooltip();
23655
23728
  }, ui_config.delay);
23656
23729
  });
23657
- _defineProperty(this, "QJAO", function (ui_config, duration, uuid, name) {
23730
+ _defineProperty(this, "rJlm", function (ui_config, duration, uuid, name) {
23658
23731
  var terminationConfig = {};
23659
23732
  terminationConfig["auto_dismiss"] = duration > 0;
23660
23733
  terminationConfig["duration"] = duration;
@@ -23678,7 +23751,7 @@
23678
23751
  var _window27, _window27$updateFlag, _window28;
23679
23752
  _this.isShowingAction = false;
23680
23753
  _this.currentAction = null;
23681
- _this.TadV = null;
23754
+ _this.veMk = null;
23682
23755
  (_window27 = window) === null || _window27 === void 0 || (_window27 = _window27.Apxor) === null || _window27 === void 0 || (_window27$updateFlag = _window27.updateFlag) === null || _window27$updateFlag === void 0 || _window27$updateFlag.call(_window27, false);
23683
23756
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
23684
23757
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -23691,8 +23764,8 @@
23691
23764
  _this._currentCoachmark.createNewCoachMark();
23692
23765
  });
23693
23766
  _defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
23694
- if (_this.TadV) {
23695
- _this.TadV.updateElementPositionOnScroll(top, left, height, width);
23767
+ if (_this.veMk) {
23768
+ _this.veMk.updateElementPositionOnScroll(top, left, height, width);
23696
23769
  }
23697
23770
  });
23698
23771
  _defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
@@ -23829,10 +23902,10 @@
23829
23902
  });
23830
23903
  _defineProperty(this, "showPlaceHolder", function () {
23831
23904
  var _window37;
23832
- if (_this.fdTw) {
23905
+ if (_this.AYSV) {
23833
23906
  return;
23834
23907
  }
23835
- _this.fdTw = true;
23908
+ _this.AYSV = true;
23836
23909
  var ele = document.createElement("div");
23837
23910
  ele.innerHTML = "place your immersive card here";
23838
23911
  ele.style.backgroundColor = "#f5f5f5";