apxor-rtm-ui 0.9.7 → 0.9.8

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.
@@ -7285,7 +7285,7 @@
7285
7285
  var justifyContent = "space-between";
7286
7286
  var fontMultiplier = buttons_css.fontMultiplier;
7287
7287
  buttons_css.forEach(function (button_css, index) {
7288
- var _ref;
7288
+ var _ref2;
7289
7289
  var slot = button_css.slot,
7290
7290
  type = button_css.type,
7291
7291
  sub_type = button_css.sub_type,
@@ -7336,7 +7336,7 @@
7336
7336
  }
7337
7337
  var marginLeft = false;
7338
7338
  var marginRight = false;
7339
- if ((_ref = button_direction !== "vertical") !== null && _ref !== void 0 ? _ref : position !== BUTTON_CONTAINER_POSITION.BOTTOM) {
7339
+ if ((_ref2 = button_direction !== "vertical") !== null && _ref2 !== void 0 ? _ref2 : position !== BUTTON_CONTAINER_POSITION.BOTTOM) {
7340
7340
  var _buttons_css;
7341
7341
  var next = ((_buttons_css = buttons_css[index + 1]) === null || _buttons_css === void 0 ? void 0 : _buttons_css.slot) || totalSlots + 1;
7342
7342
  if (buttons_css.length === 2 && (slot === 2 && next === 3 || slot === 4 && prev === 3 || slot === 3 && (prev === 2 || next === 4))) {
@@ -7429,7 +7429,7 @@
7429
7429
  break;
7430
7430
  case "copy_clipboard":
7431
7431
  action = /*#__PURE__*/function () {
7432
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7432
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7433
7433
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7434
7434
  while (1) switch (_context.prev = _context.next) {
7435
7435
  case 0:
@@ -7455,7 +7455,7 @@
7455
7455
  }, _callee, null, [[1, 9]]);
7456
7456
  }));
7457
7457
  return function action() {
7458
- return _ref2.apply(this, arguments);
7458
+ return _ref3.apply(this, arguments);
7459
7459
  };
7460
7460
  }();
7461
7461
  break;
@@ -7686,7 +7686,7 @@
7686
7686
  break;
7687
7687
  case "copy_clipboard":
7688
7688
  action = /*#__PURE__*/function () {
7689
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
7689
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
7690
7690
  var _window$Apxor5, _window$Apxor6;
7691
7691
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7692
7692
  while (1) switch (_context2.prev = _context2.next) {
@@ -7713,7 +7713,7 @@
7713
7713
  }, _callee2, null, [[1, 9]]);
7714
7714
  }));
7715
7715
  return function action() {
7716
- return _ref3.apply(this, arguments);
7716
+ return _ref4.apply(this, arguments);
7717
7717
  };
7718
7718
  }();
7719
7719
  break;
@@ -8054,10 +8054,10 @@
8054
8054
  }
8055
8055
  function objectToCSS(styleObject) {
8056
8056
  var cssString = "";
8057
- Object.entries(styleObject).forEach(function (_ref4) {
8058
- var _ref5 = _slicedToArray(_ref4, 2),
8059
- property = _ref5[0],
8060
- value = _ref5[1];
8057
+ Object.entries(styleObject).forEach(function (_ref5) {
8058
+ var _ref6 = _slicedToArray(_ref5, 2),
8059
+ property = _ref6[0],
8060
+ value = _ref6[1];
8061
8061
  cssString += "".concat(property, ": ").concat(value, ";");
8062
8062
  });
8063
8063
  return cssString;
@@ -8314,7 +8314,7 @@
8314
8314
  break;
8315
8315
  case "copy_clipboard":
8316
8316
  action = /*#__PURE__*/function () {
8317
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
8317
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
8318
8318
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
8319
8319
  while (1) switch (_context3.prev = _context3.next) {
8320
8320
  case 0:
@@ -8340,7 +8340,7 @@
8340
8340
  }, _callee3, null, [[1, 9]]);
8341
8341
  }));
8342
8342
  return function action() {
8343
- return _ref6.apply(this, arguments);
8343
+ return _ref7.apply(this, arguments);
8344
8344
  };
8345
8345
  }();
8346
8346
  break;
@@ -8500,20 +8500,20 @@
8500
8500
  * @param {string} type - Title or Description type
8501
8501
  * @returns
8502
8502
  */
8503
- var createTextElement = function createTextElement(_ref7, currentId) {
8504
- var _ref7$color = _ref7.color,
8505
- color = _ref7$color === void 0 ? "#000" : _ref7$color,
8506
- _ref7$font_family = _ref7.font_family,
8507
- font_family = _ref7$font_family === void 0 ? "cursive" : _ref7$font_family,
8508
- _ref7$size = _ref7.size,
8509
- size = _ref7$size === void 0 ? 14 : _ref7$size,
8510
- _ref7$style = _ref7.style,
8511
- style = _ref7$style === void 0 ? "bold" : _ref7$style,
8512
- text = _ref7.text,
8513
- segments = _ref7.segments,
8514
- quote = _ref7.quote,
8515
- _ref7$link_config = _ref7.link_config,
8516
- link_config = _ref7$link_config === void 0 ? [] : _ref7$link_config;
8503
+ var createTextElement = function createTextElement(_ref8, currentId) {
8504
+ var _ref8$color = _ref8.color,
8505
+ color = _ref8$color === void 0 ? "#000" : _ref8$color,
8506
+ _ref8$font_family = _ref8.font_family,
8507
+ font_family = _ref8$font_family === void 0 ? "cursive" : _ref8$font_family,
8508
+ _ref8$size = _ref8.size,
8509
+ size = _ref8$size === void 0 ? 14 : _ref8$size,
8510
+ _ref8$style = _ref8.style,
8511
+ style = _ref8$style === void 0 ? "bold" : _ref8$style,
8512
+ text = _ref8.text,
8513
+ segments = _ref8.segments,
8514
+ quote = _ref8.quote,
8515
+ _ref8$link_config = _ref8.link_config,
8516
+ link_config = _ref8$link_config === void 0 ? [] : _ref8$link_config;
8517
8517
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "desc";
8518
8518
  var fontMultiplier = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
8519
8519
  size = size * fontMultiplier;
@@ -12693,14 +12693,14 @@
12693
12693
  _config$wait_interval,
12694
12694
  _config$termination;
12695
12695
  _classCallCheck(this, TemplateContent);
12696
- _defineProperty(this, "FeIN", function () {
12696
+ _defineProperty(this, "gVWf", function () {
12697
12697
  return new Promise(function (resolve, reject) {
12698
12698
  try {
12699
- var element = _this.gVOg(_this.layout);
12699
+ var element = _this.idIX(_this.layout);
12700
12700
  var styleElement = document.createElement("style");
12701
12701
  styleElement.innerHTML = _this.styleContent;
12702
12702
  document.head.appendChild(styleElement);
12703
- _this.evpt();
12703
+ _this.QNLg();
12704
12704
  try {
12705
12705
  eval(_this.script);
12706
12706
  } catch (e) {
@@ -12711,15 +12711,15 @@
12711
12711
  }
12712
12712
  _this.imageElements.forEach(function (img) {
12713
12713
  img.addEventListener("error", function () {
12714
- _this.sKmG("provided image doesn't exists");
12714
+ _this.bcmL("provided image doesn't exists");
12715
12715
  });
12716
12716
  });
12717
12717
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
12718
12718
  _this.wait_interval -= 1;
12719
12719
  if (_this.wait_interval <= 0) {
12720
- _this.sKmG("provided media doesn't exists");
12720
+ _this.bcmL("provided media doesn't exists");
12721
12721
  } else {
12722
- if (_this.Evhr() && _this.xGNr() && _this.FFyA()) {
12722
+ if (_this.UhLg() && _this.TzVx() && _this.YWjn()) {
12723
12723
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
12724
12724
  resolve(element);
12725
12725
  }
@@ -12733,7 +12733,7 @@
12733
12733
  }
12734
12734
  });
12735
12735
  });
12736
- _defineProperty(this, "sKmG", function (reason) {
12736
+ _defineProperty(this, "bcmL", function (reason) {
12737
12737
  var _window$ApxorRTM, _window$Apxor, _this$config, _this$config2, _window$Apxor2, _this$config3, _this$config4, _this$config5, _this$config6, _window3;
12738
12738
  !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
12739
12739
  apx_nudge_name: _this.name,
@@ -12749,13 +12749,13 @@
12749
12749
  _this.closeCallBack("cancel");
12750
12750
  (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorInternals) === null || _window3 === void 0 || _window3.removeBuilderTemplate(_this.configId);
12751
12751
  });
12752
- _defineProperty(this, "evpt", function () {
12752
+ _defineProperty(this, "QNLg", function () {
12753
12753
  var BuilderTemplatesStyles = document.createElement("style");
12754
12754
  BuilderTemplatesStyles.innerHTML = _this.initialStyles;
12755
12755
  BuilderTemplatesStyles.setAttribute("apx-builder-template-styles", "");
12756
12756
  document.head.appendChild(BuilderTemplatesStyles);
12757
12757
  });
12758
- _defineProperty(this, "gVOg", function (config) {
12758
+ _defineProperty(this, "idIX", function (config) {
12759
12759
  var _window$Apxor3;
12760
12760
  var element;
12761
12761
  switch (config.type) {
@@ -12841,7 +12841,7 @@
12841
12841
  if (config.type === "cta_button" || config.type === "button") {
12842
12842
  reason = "cta-clicked";
12843
12843
  }
12844
- _this.mrrw(e, "redirect", reason);
12844
+ _this.dVLB(e, "redirect", reason);
12845
12845
  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) {
12846
12846
  var _window4, _this$config8;
12847
12847
  (_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);
@@ -12954,7 +12954,7 @@
12954
12954
  console.error("Failed to copy:", _context2.t2);
12955
12955
  window.Apxor.showInfoToast("Failed to copy text");
12956
12956
  case 41:
12957
- _this.mrrw(e, action.type, reason);
12957
+ _this.dVLB(e, action.type, reason);
12958
12958
  // window.Apxor.logActionEvent(
12959
12959
  // "walk_through_cancelled",
12960
12960
  // this.configId,
@@ -12981,7 +12981,7 @@
12981
12981
  } else if (config.type === "cta_button" || config.type === "button") {
12982
12982
  reason = "cta-clicked";
12983
12983
  }
12984
- _this.mrrw(e, "dismiss", reason);
12984
+ _this.dVLB(e, "dismiss", reason);
12985
12985
  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) {
12986
12986
  var _window5, _this$config10;
12987
12987
  (_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);
@@ -12992,7 +12992,7 @@
12992
12992
  element.onclick = function (e) {
12993
12993
  e.stopPropagation();
12994
12994
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
12995
- _this.mrrw(e, "never");
12995
+ _this.dVLB(e, "never");
12996
12996
  };
12997
12997
  break;
12998
12998
  case "toggle-class":
@@ -13019,7 +13019,7 @@
13019
13019
  tempInput.select();
13020
13020
  document.execCommand("copy");
13021
13021
  document.body.removeChild(tempInput);
13022
- _this.mrrw(e, "copy-content", "cta-clicked");
13022
+ _this.dVLB(e, "copy-content", "cta-clicked");
13023
13023
  setTimeout(function () {
13024
13024
  window.Apxor.showInfoToast("Text-Copied:".concat(textToCopy));
13025
13025
  }, 500);
@@ -13041,7 +13041,7 @@
13041
13041
  }
13042
13042
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
13043
13043
  config.absolute_position_children.forEach(function (childConfig) {
13044
- var childElement = _this.gVOg(childConfig);
13044
+ var childElement = _this.idIX(childConfig);
13045
13045
  element.appendChild(childElement);
13046
13046
  });
13047
13047
  }
@@ -13049,7 +13049,7 @@
13049
13049
  // Process children
13050
13050
  if (config.children && config.children.length > 0) {
13051
13051
  config.children.forEach(function (childConfig) {
13052
- var childElement = _this.gVOg(childConfig);
13052
+ var childElement = _this.idIX(childConfig);
13053
13053
  element.appendChild(childElement);
13054
13054
  });
13055
13055
  }
@@ -13076,7 +13076,7 @@
13076
13076
  }
13077
13077
  return element;
13078
13078
  });
13079
- _defineProperty(this, "mrrw", function (e, action) {
13079
+ _defineProperty(this, "dVLB", function (e, action) {
13080
13080
  var _window$Apxor6, _this$config11, _this$config12, _window$Apxor7, _this$config13, _this$config14, _this$config15, _this$config16;
13081
13081
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
13082
13082
  var additional_info = {
@@ -13105,7 +13105,7 @@
13105
13105
  _this.closeCallBack(action);
13106
13106
  }
13107
13107
  });
13108
- _defineProperty(this, "xGNr", function () {
13108
+ _defineProperty(this, "TzVx", function () {
13109
13109
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
13110
13110
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
13111
13111
  if (_this.imageElements.length === 0) return true;
@@ -13113,13 +13113,13 @@
13113
13113
  return img.complete;
13114
13114
  });
13115
13115
  });
13116
- _defineProperty(this, "FFyA", function () {
13116
+ _defineProperty(this, "YWjn", function () {
13117
13117
  if (!_this.bgImageUrl) return true;
13118
13118
  var img = new Image();
13119
13119
  img.src = _this.bgImageUrl;
13120
13120
  return img.complete;
13121
13121
  });
13122
- _defineProperty(this, "Evhr", function () {
13122
+ _defineProperty(this, "UhLg", function () {
13123
13123
  if (_this.videoElements.length === 0) return true;
13124
13124
  return _this.videoElements.every(function (video) {
13125
13125
  return video.readyState >= 3;
@@ -14058,7 +14058,7 @@
14058
14058
  case 0:
14059
14059
  _context2.prev = 0;
14060
14060
  _context2.next = 3;
14061
- return this.templateContent.FeIN();
14061
+ return this.templateContent.gVWf();
14062
14062
  case 3:
14063
14063
  this.inLineContainer = _context2.sent;
14064
14064
  _context2.next = 9;
@@ -15635,7 +15635,7 @@
15635
15635
  * @description Creates the styles for Marketing message.
15636
15636
  * @returns {string} css styles
15637
15637
  */
15638
- _defineProperty(this, "sOBS", function () {
15638
+ _defineProperty(this, "bpVP", function () {
15639
15639
  if (!_this.enable_marketing) {
15640
15640
  return "";
15641
15641
  }
@@ -15654,7 +15654,7 @@
15654
15654
  * @private
15655
15655
  * @description Sets the marketing content at the end of the Inline
15656
15656
  */
15657
- _defineProperty(this, "apkU", function () {
15657
+ _defineProperty(this, "pNoA", function () {
15658
15658
  if (_this.enable_marketing) {
15659
15659
  var marketingContainer = document.createElement("div");
15660
15660
  marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
@@ -16268,7 +16268,7 @@
16268
16268
  if (apxor_tooltip_styles) {
16269
16269
  return;
16270
16270
  }
16271
- 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.sOBS(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
16271
+ 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.bpVP(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
16272
16272
  var styleNode = document.createElement("style");
16273
16273
  styleNode.setAttribute("apx-tooltip-styles", "");
16274
16274
  styleNode.innerHTML = styles;
@@ -17078,7 +17078,7 @@
17078
17078
  this._setCloseButton();
17079
17079
 
17080
17080
  //Set the Marketing content
17081
- this.apkU();
17081
+ this.pNoA();
17082
17082
  }
17083
17083
 
17084
17084
  /**
@@ -19975,7 +19975,7 @@
19975
19975
  case 0:
19976
19976
  _context2.prev = 0;
19977
19977
  _context2.next = 3;
19978
- return this.templateContent.FeIN();
19978
+ return this.templateContent.gVWf();
19979
19979
  case 3:
19980
19980
  this.inAppContainer = _context2.sent;
19981
19981
  this.inAppContainer.style.zIndex = 99999;
@@ -20174,7 +20174,7 @@
20174
20174
  * @description Creates the styles for Marketing message.
20175
20175
  * @returns {string} css styles
20176
20176
  */
20177
- _defineProperty(this, "sOBS", function () {
20177
+ _defineProperty(this, "bpVP", function () {
20178
20178
  if (!_this.enable_marketing) {
20179
20179
  return "";
20180
20180
  }
@@ -20220,7 +20220,7 @@
20220
20220
  * @private
20221
20221
  * @description Get the response for Form content in the InApp modal.
20222
20222
  */
20223
- _defineProperty(this, "IeDy", function (form_elements) {
20223
+ _defineProperty(this, "RInK", function (form_elements) {
20224
20224
  var obj = {};
20225
20225
  var callback = "";
20226
20226
  form_elements.forEach(function (element) {
@@ -20260,7 +20260,7 @@
20260
20260
  * @private
20261
20261
  * @description Sets the marketing content at the end of the InApp
20262
20262
  */
20263
- _defineProperty(this, "apkU", function () {
20263
+ _defineProperty(this, "pNoA", function () {
20264
20264
  if (_this.enable_marketing) {
20265
20265
  var marketingContainer = document.createElement("div");
20266
20266
  marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
@@ -20520,7 +20520,7 @@
20520
20520
  }, {
20521
20521
  key: "_setStyles",
20522
20522
  value: function _setStyles() {
20523
- 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.sOBS(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
20523
+ 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.bpVP(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
20524
20524
  var styleNode = document.createElement("style");
20525
20525
  styleNode.setAttribute("id", "apxor-style-" + this.configId);
20526
20526
  styleNode.innerHTML = styles;
@@ -21014,7 +21014,7 @@
21014
21014
  this._setCloseButton();
21015
21015
 
21016
21016
  //Set the Marketing content
21017
- this.apkU();
21017
+ this.pNoA();
21018
21018
  }
21019
21019
 
21020
21020
  /**
@@ -21286,7 +21286,7 @@
21286
21286
  var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
21287
21287
  form.addEventListener("submit", function (e) {
21288
21288
  e.preventDefault();
21289
- var _this8$generateRespon = _this8.IeDy(_this8.form.elements),
21289
+ var _this8$generateRespon = _this8.RInK(_this8.form.elements),
21290
21290
  obj = _this8$generateRespon.obj,
21291
21291
  callback = _this8$generateRespon.callback;
21292
21292
  var evalString = "(obj)=>" + callback + "(obj)";
@@ -21646,7 +21646,7 @@
21646
21646
  };
21647
21647
  } else {
21648
21648
  // As the video player is hidden by default, unhide if the mode is not PIP.
21649
- _this.OKdJ();
21649
+ _this.HQkM();
21650
21650
  }
21651
21651
  _this.showCallback();
21652
21652
  } catch (e) {
@@ -21667,7 +21667,7 @@
21667
21667
  * For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
21668
21668
  * For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
21669
21669
  */
21670
- _defineProperty(this, "czRO", function () {
21670
+ _defineProperty(this, "PPRB", function () {
21671
21671
  var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
21672
21672
  width = _getHeightWidthFromRe.width,
21673
21673
  height = _getHeightWidthFromRe.height;
@@ -21679,7 +21679,7 @@
21679
21679
  * @private
21680
21680
  * @description Removes the video player style element.
21681
21681
  */
21682
- _defineProperty(this, "ajoq", function () {
21682
+ _defineProperty(this, "Fden", function () {
21683
21683
  var playerStyles = document.getElementById("apx-mpl-styles");
21684
21684
  if (playerStyles) {
21685
21685
  playerStyles.remove();
@@ -21690,7 +21690,7 @@
21690
21690
  * @private
21691
21691
  * @description Attach listeners on the video controls
21692
21692
  */
21693
- _defineProperty(this, "guqQ", function () {
21693
+ _defineProperty(this, "pNiK", function () {
21694
21694
  // Listener for the video end. Display the CTA's when the video ends.
21695
21695
  _this.videoElement.addEventListener("ended", function () {
21696
21696
  var ctaButtons = document.getElementById("apx-cta-btn");
@@ -21793,7 +21793,7 @@
21793
21793
  * @private
21794
21794
  * @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
21795
21795
  */
21796
- _defineProperty(this, "arNC", function () {
21796
+ _defineProperty(this, "sltM", function () {
21797
21797
  var _this$terminationConf;
21798
21798
  if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
21799
21799
  // On Exit of the PIP,
@@ -21833,7 +21833,7 @@
21833
21833
  * @private Sets the custom controls on the video player.
21834
21834
  * PIP and close are the custom controls that are created and positions on the video.
21835
21835
  */
21836
- _defineProperty(this, "FuEG", function () {
21836
+ _defineProperty(this, "pjwj", function () {
21837
21837
  _this.enable_close_button;
21838
21838
  if (_this.enable_close_button) {
21839
21839
  var closeButton = document.createElement("span");
@@ -21880,21 +21880,21 @@
21880
21880
  * @function hideVideoPlayer
21881
21881
  * @description Sets the visibility of the video player to hidden.
21882
21882
  */
21883
- _defineProperty(this, "BzBz", function () {
21883
+ _defineProperty(this, "QwmN", function () {
21884
21884
  _this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
21885
21885
  });
21886
21886
  /**
21887
21887
  * @function unhideVideoPlayer
21888
21888
  * @description Unhides video player.
21889
21889
  */
21890
- _defineProperty(this, "OKdJ", function () {
21890
+ _defineProperty(this, "HQkM", function () {
21891
21891
  _this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
21892
21892
  });
21893
21893
  /**
21894
21894
  * @function getVideoElement
21895
21895
  * @returns {HTMLElement} Video ekement
21896
21896
  */
21897
- _defineProperty(this, "NEDi", function () {
21897
+ _defineProperty(this, "Zwdr", function () {
21898
21898
  return _this.videoElement;
21899
21899
  });
21900
21900
  this.videoPlayer = null;
@@ -21949,7 +21949,7 @@
21949
21949
  this.videoPlayer.style.backgroundColor = this.bg_color;
21950
21950
 
21951
21951
  // Video has a resolution, not deviating from the resolution set the height and width.
21952
- this.czRO();
21952
+ this.PPRB();
21953
21953
  //Generate the styles and add them to the document head.
21954
21954
  this._setVideoPlayerStyles();
21955
21955
  //Set the position of the video player with in the 5 possible positions.
@@ -21957,16 +21957,16 @@
21957
21957
  //Create a video element,set the source and add to the container.
21958
21958
  this._setPlayerContent();
21959
21959
  //Set the listeners on the video control buttons.
21960
- this.guqQ();
21960
+ this.pNiK();
21961
21961
  //Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
21962
- this.arNC();
21962
+ this.sltM();
21963
21963
  //Set the custom close and PIP controls. Not using the defaults from the html video element.
21964
21964
  //Reason - We want to position them at the top right and left positions.
21965
- this.FuEG();
21965
+ this.pjwj();
21966
21966
  //Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
21967
21967
  this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
21968
21968
  //Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
21969
- this.BzBz();
21969
+ this.QwmN();
21970
21970
  //If the auto dismiss is enabled, sets the timeout to call the InApp close.
21971
21971
  this._setAutoTerminate();
21972
21972
  document.body.appendChild(this.videoPlayer);
@@ -22081,7 +22081,7 @@
22081
22081
  }
22082
22082
  }
22083
22083
  this.videoPlayer.remove();
22084
- this.ajoq();
22084
+ this.Fden();
22085
22085
  if (closeButtonName !== "auto_dismiss") {
22086
22086
  var _window$ApxorRTM8;
22087
22087
  (_window$ApxorRTM8 = window.ApxorRTM) === null || _window$ApxorRTM8 === void 0 || _window$ApxorRTM8.logEvent("apx_video_inapp_close_button_clicked", {
@@ -22151,7 +22151,7 @@
22151
22151
  replayCount: _this3.replayCount
22152
22152
  });
22153
22153
  _this3.videoPlayer.remove();
22154
- _this3.ajoq();
22154
+ _this3.Fden();
22155
22155
  _this3.hideCallback();
22156
22156
  } catch (e) {
22157
22157
  console.log("Can't close the video player\n".concat(e));
@@ -22249,17 +22249,17 @@
22249
22249
  try {
22250
22250
  var _window, _parseCSS$background, _parseCSS;
22251
22251
  (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.debug("called showEmbedCards");
22252
- var element = _this.VIpq(_this.layout);
22253
- _this.Klaz();
22252
+ var element = _this.HxDQ(_this.layout);
22253
+ _this.zxuq();
22254
22254
  var bg_cpp = (_parseCSS$background = (_parseCSS = parseCSS(_this.layout.css)) === null || _parseCSS === void 0 ? void 0 : _parseCSS["background-color"]) !== null && _parseCSS$background !== void 0 ? _parseCSS$background : "transparent";
22255
22255
  document.body.style.backgroundColor = bg_cpp;
22256
22256
  document.body.style.minWidth = "100%";
22257
22257
  window.onresize = function () {
22258
- _this.HObN();
22258
+ _this.cdlb();
22259
22259
  };
22260
22260
  _this.imageElements.forEach(function (img) {
22261
22261
  img.addEventListener("error", function () {
22262
- _this.sKmG("provided image doesn't exists");
22262
+ _this.bcmL("provided image doesn't exists");
22263
22263
  });
22264
22264
  });
22265
22265
  var rootContainer = document.createElement("div");
@@ -22267,7 +22267,7 @@
22267
22267
  rootContainer.style.minWidth = "100%";
22268
22268
  if (_this.singleLine) {
22269
22269
  // Force the layout element to act as a slider
22270
- _this.QFqb(element);
22270
+ _this.CFbz(element);
22271
22271
 
22272
22272
  // Stack elements vertically (Images on top, Dots on bottom)
22273
22273
  rootContainer.style.display = "flex";
@@ -22279,7 +22279,7 @@
22279
22279
  document.body.appendChild(rootContainer);
22280
22280
 
22281
22281
  // Start the infinite 2-second slide and create dots
22282
- _this.MHyN(element, rootContainer);
22282
+ _this.ANhh(element, rootContainer);
22283
22283
  } else {
22284
22284
  // Fallback to original layout behavior
22285
22285
  rootContainer.style.display = "flex";
@@ -22290,7 +22290,7 @@
22290
22290
  var styleElement = document.createElement("style");
22291
22291
  styleElement.innerHTML = _this.styleContent;
22292
22292
  document.head.appendChild(styleElement);
22293
- _this.ZPVc(_this.termination);
22293
+ _this.wYHX(_this.termination);
22294
22294
  try {
22295
22295
  eval(_this.script);
22296
22296
  } catch (e) {
@@ -22301,10 +22301,10 @@
22301
22301
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
22302
22302
  _this.wait_interval -= 1;
22303
22303
  if (_this.wait_interval <= 0) {
22304
- _this.sKmG("provided media doesn't exists");
22304
+ _this.bcmL("provided media doesn't exists");
22305
22305
  } else {
22306
- if (_this.Evhr() && _this.xGNr() && _this.FFyA()) {
22307
- _this.HObN();
22306
+ if (_this.UhLg() && _this.TzVx() && _this.YWjn()) {
22307
+ _this.cdlb();
22308
22308
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
22309
22309
  }
22310
22310
  }
@@ -22316,7 +22316,7 @@
22316
22316
  }
22317
22317
  });
22318
22318
  // Applies CSS to force children into a single horizontal row for sliding
22319
- _defineProperty(this, "QFqb", function (container) {
22319
+ _defineProperty(this, "CFbz", function (container) {
22320
22320
  container.style.display = "flex";
22321
22321
  container.style.flexDirection = "row";
22322
22322
  container.style.overflowX = "auto";
@@ -22361,7 +22361,7 @@
22361
22361
  });
22362
22362
  }
22363
22363
  });
22364
- _defineProperty(this, "sKmG", function (reason) {
22364
+ _defineProperty(this, "bcmL", function (reason) {
22365
22365
  var _window$ApxorRTM, _window4;
22366
22366
  !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
22367
22367
  apx_nudge_name: _this.name,
@@ -22377,7 +22377,7 @@
22377
22377
  (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorWidget) === null || _window4 === void 0 || _window4.removeEmbedCard(_this.configId);
22378
22378
  });
22379
22379
  // Creates pagination dots under the images and handles the infinite loop
22380
- _defineProperty(this, "MHyN", function (container, rootContainer) {
22380
+ _defineProperty(this, "ANhh", function (container, rootContainer) {
22381
22381
  var _this$carousel, _this$carousel2, _this$carousel3, _this$carousel4, _this$carousel9;
22382
22382
  var childrenCount = container.children.length;
22383
22383
  if (childrenCount <= 1) return;
@@ -22426,7 +22426,7 @@
22426
22426
  } else {
22427
22427
  currentIndex++;
22428
22428
  }
22429
- _this.wmIq(container, currentIndex, dots);
22429
+ _this.maqr(container, currentIndex, dots);
22430
22430
  }
22431
22431
  }, _this.slideDuration);
22432
22432
  };
@@ -22453,7 +22453,7 @@
22453
22453
  var index = Math.round(container.scrollLeft / container.offsetWidth);
22454
22454
  if (currentIndex !== index) {
22455
22455
  currentIndex = index;
22456
- _this.vdNV(dots, currentIndex);
22456
+ _this.mtkl(dots, currentIndex);
22457
22457
  }
22458
22458
  }, 60);
22459
22459
  }, {
@@ -22462,7 +22462,7 @@
22462
22462
  startTimer();
22463
22463
  });
22464
22464
  // Helper to handle the scrolling animation
22465
- _defineProperty(this, "wmIq", function (container, index, dots) {
22465
+ _defineProperty(this, "maqr", function (container, index, dots) {
22466
22466
  var targetChild = container.children[index];
22467
22467
  if (targetChild) {
22468
22468
  // If index is 0, we explicitly scroll to the far left
@@ -22471,10 +22471,10 @@
22471
22471
  left: scrollPos,
22472
22472
  behavior: "smooth"
22473
22473
  });
22474
- _this.vdNV(dots, index);
22474
+ _this.mtkl(dots, index);
22475
22475
  }
22476
22476
  });
22477
- _defineProperty(this, "vdNV", function (dots, currentIndex) {
22477
+ _defineProperty(this, "mtkl", function (dots, currentIndex) {
22478
22478
  var _this$carousel14, _this$carousel16;
22479
22479
  if ((_this$carousel14 = _this.carousel) !== null && _this$carousel14 !== void 0 && _this$carousel14.lines) {
22480
22480
  var _this$carousel15;
@@ -22498,13 +22498,13 @@
22498
22498
  });
22499
22499
  }
22500
22500
  });
22501
- _defineProperty(this, "Klaz", function () {
22501
+ _defineProperty(this, "zxuq", function () {
22502
22502
  var EmbeddedCardsStyles = document.createElement("style");
22503
22503
  EmbeddedCardsStyles.innerHTML = _this.initialStyles;
22504
22504
  EmbeddedCardsStyles.setAttribute("apx-embedded-card-styles", "");
22505
22505
  document.head.appendChild(EmbeddedCardsStyles);
22506
22506
  });
22507
- _defineProperty(this, "VIpq", function (config) {
22507
+ _defineProperty(this, "HxDQ", function (config) {
22508
22508
  var _window$Apxor;
22509
22509
  var element;
22510
22510
  switch (config.type) {
@@ -22535,7 +22535,7 @@
22535
22535
  case "timer":
22536
22536
  //countdown timer case
22537
22537
  element = document.createElement("div");
22538
- _this.XBmm(element, config.properties);
22538
+ _this.DUNe(element, config.properties);
22539
22539
  break;
22540
22540
  default:
22541
22541
  element = document.createElement(config.type);
@@ -22591,27 +22591,27 @@
22591
22591
  element.onclick = function (e) {
22592
22592
  e.stopPropagation();
22593
22593
  window.Apxor.redirect(JSON.stringify(action));
22594
- _this.mrrw(e);
22594
+ _this.dVLB(e);
22595
22595
  };
22596
22596
  break;
22597
22597
  case "show-video":
22598
22598
  element.onclick = function (e) {
22599
22599
  e.stopPropagation();
22600
22600
  window.Apxor.showVideoInApp(_this.configId, _this.name, action.url);
22601
- _this.mrrw(e);
22601
+ _this.dVLB(e);
22602
22602
  };
22603
22603
  break;
22604
22604
  case "cancel":
22605
22605
  element.onclick = function (e) {
22606
22606
  e.stopPropagation();
22607
- _this.mrrw(e);
22607
+ _this.dVLB(e);
22608
22608
  window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
22609
22609
  };
22610
22610
  break;
22611
22611
  case "dismiss":
22612
22612
  element.onclick = function (e) {
22613
22613
  e.stopPropagation();
22614
- _this.mrrw(e);
22614
+ _this.dVLB(e);
22615
22615
  };
22616
22616
  break;
22617
22617
  case "user_props":
@@ -22621,7 +22621,7 @@
22621
22621
  var _window$Apxor2;
22622
22622
  return (_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.setUserProperties(props);
22623
22623
  });
22624
- _this.mrrw(e);
22624
+ _this.dVLB(e);
22625
22625
  };
22626
22626
  break;
22627
22627
  case "session_props":
@@ -22631,7 +22631,7 @@
22631
22631
  var _window$Apxor3;
22632
22632
  return (_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.setSessionProperties(props);
22633
22633
  });
22634
- _this.mrrw(e);
22634
+ _this.dVLB(e);
22635
22635
  };
22636
22636
  break;
22637
22637
  case "event":
@@ -22648,7 +22648,7 @@
22648
22648
  for (var i = 0; i < action.events.length; i++) {
22649
22649
  _loop();
22650
22650
  }
22651
- _this.mrrw(e);
22651
+ _this.dVLB(e);
22652
22652
  };
22653
22653
  break;
22654
22654
  case "never":
@@ -22661,7 +22661,7 @@
22661
22661
  apx_nudge_id: _this.configId,
22662
22662
  apx_termination_type: "never-show"
22663
22663
  });
22664
- _this.mrrw(e);
22664
+ _this.dVLB(e);
22665
22665
  };
22666
22666
  break;
22667
22667
  case "toggle-class":
@@ -22686,7 +22686,7 @@
22686
22686
  tempInput.select();
22687
22687
  document.execCommand("copy");
22688
22688
  document.body.removeChild(tempInput);
22689
- _this.mrrw(e);
22689
+ _this.dVLB(e);
22690
22690
  };
22691
22691
  break;
22692
22692
  case "log-app-event":
@@ -22707,7 +22707,7 @@
22707
22707
  }
22708
22708
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
22709
22709
  config.absolute_position_children.forEach(function (childConfig) {
22710
- var childElement = _this.VIpq(childConfig);
22710
+ var childElement = _this.HxDQ(childConfig);
22711
22711
  element.appendChild(childElement);
22712
22712
  });
22713
22713
  }
@@ -22715,7 +22715,7 @@
22715
22715
  // Process children
22716
22716
  if (config.children && config.children.length > 0) {
22717
22717
  config.children.forEach(function (childConfig) {
22718
- var childElement = _this.VIpq(childConfig);
22718
+ var childElement = _this.HxDQ(childConfig);
22719
22719
  element.appendChild(childElement);
22720
22720
  });
22721
22721
  }
@@ -22741,7 +22741,7 @@
22741
22741
  }
22742
22742
  return element;
22743
22743
  });
22744
- _defineProperty(this, "mrrw", function (e) {
22744
+ _defineProperty(this, "dVLB", function (e) {
22745
22745
  var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
22746
22746
  var additional_info = {
22747
22747
  apx_nudge_name: _this.name,
@@ -22758,7 +22758,7 @@
22758
22758
  (_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent("apx_card_interaction", additional_info);
22759
22759
  }
22760
22760
  });
22761
- _defineProperty(this, "ZPVc", function (config) {
22761
+ _defineProperty(this, "wYHX", function (config) {
22762
22762
  config.forEach(function (id) {
22763
22763
  var element = document.getElementById(id);
22764
22764
  if (element) {
@@ -22766,7 +22766,7 @@
22766
22766
  }
22767
22767
  });
22768
22768
  });
22769
- _defineProperty(this, "xGNr", function () {
22769
+ _defineProperty(this, "TzVx", function () {
22770
22770
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
22771
22771
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
22772
22772
  if (_this.imageElements.length === 0) return true;
@@ -22774,19 +22774,19 @@
22774
22774
  return img.complete;
22775
22775
  });
22776
22776
  });
22777
- _defineProperty(this, "Evhr", function () {
22777
+ _defineProperty(this, "UhLg", function () {
22778
22778
  if (_this.videoElements.length === 0) return true;
22779
22779
  return _this.videoElements.every(function (video) {
22780
22780
  return video.readyState >= 3;
22781
22781
  });
22782
22782
  });
22783
- _defineProperty(this, "FFyA", function () {
22783
+ _defineProperty(this, "YWjn", function () {
22784
22784
  if (!_this.bgImageUrl) return true;
22785
22785
  var img = new Image();
22786
22786
  img.src = _this.bgImageUrl;
22787
22787
  return img.complete;
22788
22788
  });
22789
- _defineProperty(this, "HObN", function () {
22789
+ _defineProperty(this, "cdlb", function () {
22790
22790
  var _window6, _window7;
22791
22791
  var html = window.document.querySelector("html");
22792
22792
  var width = html.offsetWidth;
@@ -22798,7 +22798,7 @@
22798
22798
  _this.loggedNudgeShownEvent = true;
22799
22799
  }
22800
22800
  });
22801
- _defineProperty(this, "XBmm", function (container, props) {
22801
+ _defineProperty(this, "DUNe", function (container, props) {
22802
22802
  var targetDate = new Date(props.target_date).getTime();
22803
22803
  var updateClock = function updateClock() {
22804
22804
  var now = new Date().getTime();
@@ -22813,13 +22813,13 @@
22813
22813
  var seconds = Math.floor(distance % (1000 * 60) / 1000);
22814
22814
 
22815
22815
  // Timer Layout
22816
- container.innerHTML = "\n <span style=\"font-size: 12px; margin-right: 4px;\">".concat(props.content, "</span>\n <div style=\"display: flex; gap: 4px;\">\n ").concat(_this.Qmep(hours), ":\n ").concat(_this.Qmep(minutes), ":\n ").concat(_this.Qmep(seconds), "\n </div>\n ");
22816
+ container.innerHTML = "\n <span style=\"font-size: 12px; margin-right: 4px;\">".concat(props.content, "</span>\n <div style=\"display: flex; gap: 4px;\">\n ").concat(_this.PCtw(hours), ":\n ").concat(_this.PCtw(minutes), ":\n ").concat(_this.PCtw(seconds), "\n </div>\n ");
22817
22817
  };
22818
22818
  var timerInterval = setInterval(updateClock, 1000);
22819
22819
  updateClock(); // Initial call
22820
22820
  });
22821
22821
  // Helper for the "boxed" look
22822
- _defineProperty(this, "Qmep", function (num) {
22822
+ _defineProperty(this, "PCtw", function (num) {
22823
22823
  var displayNum = num < 10 ? "0" + num : num;
22824
22824
  return "<span style=\"background: rgba(255,255,255,0.2); padding: 2px 4px; border-radius: 2px;\">".concat(displayNum, "</span>");
22825
22825
  });
@@ -22863,13 +22863,471 @@
22863
22863
  this.unseen_color = getColorOrDefault(data === null || data === void 0 ? void 0 : data.unseen_color, "#000000");
22864
22864
  });
22865
22865
 
22866
+ var StoryComponents = /*#__PURE__*/function () {
22867
+ function StoryComponents(data, nextSlideCallback) {
22868
+ _classCallCheck(this, StoryComponents);
22869
+ this.width = data.width;
22870
+ this.height = data.height;
22871
+ this.background_color = data.background_color;
22872
+ this.position = data.position;
22873
+ this.enable_border = data.enable_border;
22874
+ this.border = data.border;
22875
+ this.title = data.title;
22876
+ this.description = data.description;
22877
+ this.answer = data.answer;
22878
+ this.enable_padding = data.enable_padding;
22879
+ this.padding = data.padding;
22880
+ this.onNextSlide = nextSlideCallback;
22881
+ }
22882
+ _createClass(StoryComponents, [{
22883
+ key: "render",
22884
+ value: function render() {
22885
+ var _this = this;
22886
+ var componentOverlay = document.createElement("div");
22887
+ componentOverlay.style.position = "absolute";
22888
+ componentOverlay.style.backgroundColor = "transparent";
22889
+ componentOverlay.style.top = "0";
22890
+ componentOverlay.style.left = "0";
22891
+ componentOverlay.style.width = "100%";
22892
+ componentOverlay.style.height = "100%";
22893
+ componentOverlay.style.zIndex = "10";
22894
+ componentOverlay.style.pointerEvents = "none";
22895
+ var pollContainer = document.createElement("div");
22896
+ pollContainer.style.pointerEvents = "auto";
22897
+ pollContainer.style.backgroundColor = this.background_color;
22898
+ pollContainer.style.width = "".concat(this.width, "%");
22899
+ pollContainer.style.height = "fit-content";
22900
+ if (this.position.position === "C") {
22901
+ pollContainer.style.position = "absolute";
22902
+ pollContainer.style.top = "50%";
22903
+ pollContainer.style.left = "50%";
22904
+ pollContainer.style.transform = "translate(-50%, -50%)";
22905
+ pollContainer.style.zIndex = "999";
22906
+ }
22907
+ if (this.enable_border) {
22908
+ var _this$border = this.border,
22909
+ width = _this$border.width,
22910
+ style = _this$border.style,
22911
+ color = _this$border.color,
22912
+ radius = _this$border.radius;
22913
+ pollContainer.style.border = "".concat(width, "px ").concat(style, " ").concat(color);
22914
+ pollContainer.style.borderRadius = "".concat(radius, "px");
22915
+ }
22916
+ if (this.enable_padding) {
22917
+ var _this$padding = this.padding,
22918
+ top = _this$padding.top,
22919
+ bottom = _this$padding.bottom,
22920
+ left = _this$padding.left,
22921
+ right = _this$padding.right;
22922
+ pollContainer.style.padding = "".concat(top, "px ").concat(right, "px ").concat(bottom, "px ").concat(left, "px");
22923
+ }
22924
+
22925
+ // const cross_button = document.createElement("div");
22926
+ // cross_button.innerHTML = `<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
22927
+ // <path fill-rule="evenodd" clip-rule="evenodd" d="M5.46995 5.46983C5.61058 5.32938 5.8012 5.25049 5.99995 5.25049C6.1987 5.25049 6.38933 5.32938 6.52995 5.46983L18.53 17.4698C18.6036 17.5385 18.6627 17.6213 18.7037 17.7133C18.7447 17.8053 18.7668 17.9046 18.7685 18.0053C18.7703 18.106 18.7518 18.206 18.7141 18.2994C18.6764 18.3928 18.6202 18.4776 18.549 18.5489C18.4778 18.6201 18.3929 18.6762 18.2995 18.714C18.2062 18.7517 18.1061 18.7702 18.0054 18.7684C17.9047 18.7666 17.8054 18.7446 17.7134 18.7036C17.6214 18.6626 17.5386 18.6035 17.4699 18.5298L5.46995 6.52983C5.3295 6.3892 5.25061 6.19858 5.25061 5.99983C5.25061 5.80108 5.3295 5.61045 5.46995 5.46983Z" />
22928
+ // <path fill-rule="evenodd" clip-rule="evenodd" d="M18.53 5.46983C18.6704 5.61045 18.7493 5.80108 18.7493 5.99983C18.7493 6.19858 18.6704 6.3892 18.53 6.52983L6.52997 18.5298C6.38779 18.6623 6.19975 18.7344 6.00545 18.731C5.81114 18.7276 5.62576 18.6489 5.48835 18.5114C5.35093 18.374 5.27222 18.1887 5.26879 17.9944C5.26537 17.8 5.33749 17.612 5.46997 17.4698L17.47 5.46983C17.6106 5.32938 17.8012 5.25049 18 5.25049C18.1987 5.25049 18.3893 5.32938 18.53 5.46983Z" />
22929
+ // </svg>`;
22930
+ // cross_button.style.display = "flex";
22931
+ // cross_button.style.justifyContent = "flex-end";
22932
+ // cross_button.style.alignItems = "center";
22933
+ // cross_button.style.color = "red";
22934
+ // pollContainer.appendChild(cross_button);
22935
+ // cross_button.addEventListener("click", (e) => {
22936
+ // e.stopPropagation();
22937
+ // componentOverlay.remove();
22938
+ // });
22939
+
22940
+ var title = document.createElement("h1");
22941
+ title.innerText = this.title.text;
22942
+ title.style.color = this.title.color;
22943
+ title.style.textAlign = this.title.alignment;
22944
+ title.style.fontFamily = this.title.font.family;
22945
+ title.style.fontSize = "".concat(this.title.font.size, "px");
22946
+ title.style.fontStyle = this.title.font.style;
22947
+ title.style.fontWeight = this.title.font.weight;
22948
+ if (this.title.enable_padding) {
22949
+ var _this$title$padding = this.title.padding,
22950
+ _top = _this$title$padding.top,
22951
+ _bottom = _this$title$padding.bottom,
22952
+ _left = _this$title$padding.left,
22953
+ _right = _this$title$padding.right;
22954
+ title.style.padding = "".concat(_top, "px ").concat(_right, "px ").concat(_bottom, "px ").concat(_left, "px");
22955
+ }
22956
+ pollContainer.appendChild(title);
22957
+ var description = document.createElement("p");
22958
+ description.innerText = this.description.text;
22959
+ description.style.color = this.description.color;
22960
+ description.style.textAlign = this.description.alignment;
22961
+ description.style.fontFamily = this.description.font.family;
22962
+ description.style.fontSize = "".concat(this.description.font.size, "px");
22963
+ description.style.fontStyle = this.description.font.style;
22964
+ description.style.fontWeight = this.description.font.weight;
22965
+ if (this.description.enable_padding) {
22966
+ var _this$description$pad = this.description.padding,
22967
+ _top2 = _this$description$pad.top,
22968
+ _bottom2 = _this$description$pad.bottom,
22969
+ _left2 = _this$description$pad.left,
22970
+ _right2 = _this$description$pad.right;
22971
+ description.style.padding = "".concat(_top2, "px ").concat(_right2, "px ").concat(_bottom2, "px ").concat(_left2, "px");
22972
+ }
22973
+ pollContainer.appendChild(description);
22974
+ var selectionLocked = false;
22975
+ if (this.answer.answer_mode === "single_choice") {
22976
+ pollContainer.style.display = "flex";
22977
+ pollContainer.style.flexDirection = "column";
22978
+ pollContainer.style.webkitTapHighlightColor = "transparent";
22979
+ this.answer.choices.list.forEach(function (choice) {
22980
+ var choiceElement = document.createElement("button");
22981
+ choiceElement.innerText = choice.value;
22982
+ choiceElement.style.width = "85%";
22983
+ choiceElement.style.display = "block";
22984
+ choiceElement.style.justifySelf = "center";
22985
+ choiceElement.style.appearance = "none";
22986
+ choiceElement.style.outline = "none";
22987
+ choiceElement.style.color = _this.answer.choices.color_inactive;
22988
+ choiceElement.style.backgroundColor = _this.answer.choices.bg_color_inactive;
22989
+ choiceElement.style.fontFamily = _this.answer.font.family;
22990
+ choiceElement.style.fontSize = "".concat(_this.answer.font.size, "px");
22991
+ choiceElement.style.fontStyle = _this.answer.font.style;
22992
+ choiceElement.style.fontWeight = _this.answer.font.weight;
22993
+ if (_this.answer.choices.enable_border) {
22994
+ var b = _this.answer.choices.border;
22995
+ choiceElement.style.border = "".concat(b.width, "px ").concat(b.style, " ").concat(b.inactive_color);
22996
+ choiceElement.style.borderRadius = "".concat(b.radius, "px");
22997
+ }
22998
+ if (_this.answer.enable_padding) {
22999
+ var p = _this.answer.padding;
23000
+ choiceElement.style.padding = "".concat(p.top, "px ").concat(p.right, "px ").concat(p.bottom, "px ").concat(p.left, "px");
23001
+ } else {
23002
+ choiceElement.style.padding = "14px 20px";
23003
+ }
23004
+ if (_this.answer.enable_margin) {
23005
+ var m = _this.answer.margin;
23006
+ choiceElement.style.margin = "".concat(m.top, "px ").concat(m.right, "px ").concat(m.bottom, "px ").concat(m.left, "px");
23007
+ }
23008
+ var setActiveState = function setActiveState(isActive) {
23009
+ if (isActive) {
23010
+ choiceElement.style.backgroundColor = _this.answer.choices.bg_color_active;
23011
+ choiceElement.style.color = _this.answer.choices.color_active;
23012
+ choiceElement.style.transform = "scale(0.97)"; // IG shrink effect
23013
+ if (_this.answer.choices.enable_border) {
23014
+ choiceElement.style.borderColor = _this.answer.choices.border.color;
23015
+ }
23016
+ } else {
23017
+ choiceElement.style.backgroundColor = _this.answer.choices.bg_color_inactive;
23018
+ choiceElement.style.color = _this.answer.choices.color_inactive;
23019
+ choiceElement.style.transform = "scale(1)";
23020
+ if (_this.answer.choices.enable_border) {
23021
+ choiceElement.style.borderColor = _this.answer.choices.border.inactive_color;
23022
+ }
23023
+ }
23024
+ };
23025
+ choiceElement.addEventListener("touchstart", function (e) {
23026
+ var _window$ApxorRTM;
23027
+ e.stopPropagation();
23028
+ if (selectionLocked) return;
23029
+ choiceElement.style.transition = "transform 0.1s ease";
23030
+ (_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 || _window$ApxorRTM.logEvent("apx_poll_option_selected", {
23031
+ choice_id: choice.id,
23032
+ choice_value: choice.value
23033
+ });
23034
+ setActiveState(true);
23035
+ }, {
23036
+ passive: false
23037
+ });
23038
+ choiceElement.addEventListener("touchend", function (e) {
23039
+ e.stopPropagation();
23040
+ e.preventDefault();
23041
+ if (selectionLocked) return;
23042
+ selectionLocked = true;
23043
+ // setActiveState(false);
23044
+ // componentOverlay.remove();
23045
+ }, {
23046
+ passive: false
23047
+ });
23048
+ pollContainer.appendChild(choiceElement);
23049
+ });
23050
+ }
23051
+ componentOverlay.appendChild(pollContainer);
23052
+ return componentOverlay;
23053
+ }
23054
+ }]);
23055
+ return StoryComponents;
23056
+ }();
23057
+
23058
+ var data = {
23059
+ width: 70,
23060
+ height: 100,
23061
+ background_color: "#FFFFFF",
23062
+ position: {
23063
+ position: "C"
23064
+ },
23065
+ enable_border: true,
23066
+ enable_padding: true,
23067
+ padding: {
23068
+ top: 5,
23069
+ right: 5,
23070
+ bottom: 5,
23071
+ left: 5
23072
+ },
23073
+ border: {
23074
+ radius: 8,
23075
+ inactive_color: "#000000",
23076
+ color: "#000000",
23077
+ width: 0,
23078
+ style: "solid"
23079
+ },
23080
+ title: {
23081
+ text: "What is your favourite color?",
23082
+ color: "#1a1919ff",
23083
+ max_characters: 150,
23084
+ alignment: "center",
23085
+ font: {
23086
+ family: "sans-serif",
23087
+ size: 16,
23088
+ style: "normal",
23089
+ weight: "normal"
23090
+ },
23091
+ enable_padding: true,
23092
+ padding: {
23093
+ top: 12,
23094
+ bottom: 0,
23095
+ left: 0,
23096
+ right: 0
23097
+ },
23098
+ enable_margin: true,
23099
+ margin: {
23100
+ bottom: 0,
23101
+ left: 0,
23102
+ right: 0,
23103
+ top: 0
23104
+ }
23105
+ },
23106
+ description: {
23107
+ text: "Select from the following options",
23108
+ color: "#161414ff",
23109
+ max_characters: 150,
23110
+ alignment: "center",
23111
+ font: {
23112
+ family: "sans-serif",
23113
+ size: 14,
23114
+ style: "normal",
23115
+ weight: "normal"
23116
+ },
23117
+ enable_padding: true,
23118
+ padding: {
23119
+ top: 0,
23120
+ bottom: 0,
23121
+ left: 0,
23122
+ right: 0
23123
+ },
23124
+ enable_margin: true,
23125
+ margin: {
23126
+ bottom: 0,
23127
+ left: 0,
23128
+ right: 0,
23129
+ top: 0
23130
+ }
23131
+ },
23132
+ answer: {
23133
+ answer_mode: "single_choice",
23134
+ choices: {
23135
+ color_active: "#E5E5E5",
23136
+ color_inactive: "#002845",
23137
+ color_disable: "#002845",
23138
+ radio_color_active: "#E5E5E5",
23139
+ radio_color_inactive: "#002845",
23140
+ bg_color_active: "#5965EC",
23141
+ bg_color_inactive: "#E5E5E5",
23142
+ bg_color_disable: "#E5E5E5",
23143
+ bg_type: "filled",
23144
+ enable_border: true,
23145
+ border: {
23146
+ radius: 4,
23147
+ inactive_color: "#000000",
23148
+ color: "#000000",
23149
+ width: 0,
23150
+ style: "solid"
23151
+ },
23152
+ list: [{
23153
+ id: 30906,
23154
+ value: "red",
23155
+ is_other: false,
23156
+ next_question_id: -1
23157
+ }, {
23158
+ id: 50860,
23159
+ value: "blue",
23160
+ is_other: false,
23161
+ next_question_id: -1
23162
+ }, {
23163
+ id: 63904,
23164
+ value: "green",
23165
+ is_other: false,
23166
+ next_question_id: -1
23167
+ }]
23168
+ },
23169
+ font: {
23170
+ family: "sans-serif",
23171
+ size: 18,
23172
+ style: "normal",
23173
+ weight: "normal"
23174
+ },
23175
+ enable_border: true,
23176
+ border: {
23177
+ radius: 0,
23178
+ inactive_color: "#000000",
23179
+ color: "#000000",
23180
+ width: 0,
23181
+ style: "solid"
23182
+ },
23183
+ enable_margin: true,
23184
+ margin: {
23185
+ bottom: 2,
23186
+ left: 16,
23187
+ right: 16,
23188
+ top: 2
23189
+ },
23190
+ enable_padding: true,
23191
+ padding: {
23192
+ top: 5,
23193
+ bottom: 5,
23194
+ left: 0,
23195
+ right: 0
23196
+ },
23197
+ rating: {
23198
+ reactions: [],
23199
+ buttons: {
23200
+ start: 1,
23201
+ end: 5,
23202
+ type: "numbered",
23203
+ split_line: false,
23204
+ slider_color: "#000000",
23205
+ bg_color_active: "#017DFD",
23206
+ bg_color_inactive: "#E5E5E5",
23207
+ color_active: "#E5E5E5",
23208
+ color_inactive: "#002845",
23209
+ height: 20,
23210
+ width: 20,
23211
+ enable_colors: false,
23212
+ buttons: [],
23213
+ enable_text: false,
23214
+ enable_image: false,
23215
+ font: {
23216
+ family: "sans-serif",
23217
+ size: 16,
23218
+ style: "normal",
23219
+ weight: "normal"
23220
+ },
23221
+ enable_fade: false,
23222
+ enable_shadow: true,
23223
+ shadow: {
23224
+ color: "#5EB6CF",
23225
+ offset_x: 2,
23226
+ offset_y: 2,
23227
+ blur_radius: 12,
23228
+ spread_radius: 1
23229
+ },
23230
+ enable_box_model: false,
23231
+ box_model: {
23232
+ active_color: "#C9CFD5",
23233
+ inactive_color: "#8497A5"
23234
+ },
23235
+ enable_border: true,
23236
+ border: {
23237
+ radius: 0,
23238
+ inactive_color: "#000000",
23239
+ color: "#000000",
23240
+ width: 0,
23241
+ style: "solid"
23242
+ },
23243
+ enable_padding: true,
23244
+ padding: {
23245
+ top: 0,
23246
+ bottom: 0,
23247
+ left: 0,
23248
+ right: 0
23249
+ },
23250
+ enable_margin: true,
23251
+ margin: {
23252
+ top: 3,
23253
+ bottom: 3,
23254
+ left: 3,
23255
+ right: 3
23256
+ }
23257
+ },
23258
+ enable_labels: true,
23259
+ labels: {
23260
+ first_rating: {
23261
+ position: "top",
23262
+ text: {
23263
+ text: "Not Likely",
23264
+ color: "#B4B1B1",
23265
+ background_color: "transparent",
23266
+ max_characters: 150,
23267
+ alignment: "center",
23268
+ font: {
23269
+ family: "sans-serif",
23270
+ size: 12,
23271
+ style: "normal",
23272
+ weight: "normal"
23273
+ },
23274
+ enable_padding: true,
23275
+ padding: {
23276
+ top: 0,
23277
+ bottom: 0,
23278
+ left: 0,
23279
+ right: 0
23280
+ },
23281
+ enable_margin: true,
23282
+ margin: {
23283
+ bottom: 5,
23284
+ left: 0,
23285
+ right: 0,
23286
+ top: 5
23287
+ }
23288
+ }
23289
+ },
23290
+ last_rating: {
23291
+ position: "bottom",
23292
+ text: {
23293
+ text: "Very Likely",
23294
+ color: "#B4B1B1",
23295
+ background_color: "transparent",
23296
+ max_characters: 150,
23297
+ alignment: "center",
23298
+ font: {
23299
+ family: "sans-serif",
23300
+ size: 12,
23301
+ style: "normal",
23302
+ weight: "normal"
23303
+ },
23304
+ enable_padding: true,
23305
+ padding: {
23306
+ top: 0,
23307
+ bottom: 0,
23308
+ left: 0,
23309
+ right: 0
23310
+ },
23311
+ enable_margin: true,
23312
+ margin: {
23313
+ bottom: 5,
23314
+ left: 0,
23315
+ right: 0,
23316
+ top: 5
23317
+ }
23318
+ }
23319
+ }
23320
+ },
23321
+ q_and_s: []
23322
+ }
23323
+ }
23324
+ };
22866
23325
  var Stories = /*#__PURE__*/function () {
22867
23326
  function Stories(_config, configId, name, position, slidesSeenCount, view_id, showCallback, closeCallback) {
22868
23327
  var _this = this,
22869
23328
  _config$position;
22870
23329
  _classCallCheck(this, Stories);
22871
23330
  _defineProperty(this, "showStories", function () {
22872
- window.ApxorRTM.logEvent("showing story");
22873
23331
  _this.storyContainer = document.createElement("div");
22874
23332
  _this.storyContainer.classList.add("pause");
22875
23333
  _this.storyContainer.style = "height:100%;display:flex;align-items:center;";
@@ -22908,8 +23366,8 @@
22908
23366
  _this.storyContainer.appendChild(currentElement);
22909
23367
  _this.storyContainer.appendChild(slideDetails);
22910
23368
  document.body.appendChild(_this.storyContainer);
22911
- _this.eznj();
22912
- _this.RqiT();
23369
+ _this.YCkG();
23370
+ _this.FBFd();
22913
23371
  _this.progress = Array.from(document.querySelectorAll(".progress"));
22914
23372
  var current_slide = document.querySelector(".slide-details");
22915
23373
  var playNext = function playNext(e) {
@@ -22955,7 +23413,7 @@
22955
23413
  _existingAbsoluteElements2.forEach(function (element) {
22956
23414
  element.remove();
22957
23415
  });
22958
- // this.SfPl();
23416
+ // this.YTpx();
22959
23417
  var _currentSlideDetails = document.querySelector(".slide-details");
22960
23418
  _currentSlideDetails.innerHTML = "";
22961
23419
  _this.position = _this.position + 1;
@@ -23051,7 +23509,7 @@
23051
23509
  absolute_header = document.createElement("div");
23052
23510
  current_slide_from_config.layout.absolute_position_children.forEach(function (current_element) {
23053
23511
  var current_absolute_element;
23054
- current_absolute_element = _this.gVOg(current_element);
23512
+ current_absolute_element = _this.idIX(current_element);
23055
23513
  absolute_header.appendChild(current_absolute_element);
23056
23514
  });
23057
23515
  (_absolute_header = absolute_header) === null || _absolute_header === void 0 || _absolute_header.classList.add("apx-slide-header");
@@ -23111,7 +23569,7 @@
23111
23569
  document.body.style.backgroundRepeat = "";
23112
23570
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
23113
23571
  delete updated_layout_without_absolute_elements["absolute_position_children"];
23114
- element = _this.gVOg(updated_layout_without_absolute_elements);
23572
+ element = _this.idIX(updated_layout_without_absolute_elements);
23115
23573
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
23116
23574
  document.body.style.margin = "0px";
23117
23575
  }
@@ -23119,9 +23577,12 @@
23119
23577
  current_slide.removeChild(current_slide.children[0]);
23120
23578
  }
23121
23579
  current_slide.appendChild(element);
23122
- _this.rVWr();
23580
+ // poll component rendering
23581
+ var pollUI = _this.storyPoll.render();
23582
+ current_slide.appendChild(pollUI);
23583
+ _this.eiDZ();
23123
23584
  window.intervalToCheckImgStatus = setInterval(function () {
23124
- if (_this.Twwy()) {
23585
+ if (_this.GFtM()) {
23125
23586
  clearInterval(window.intervalToCheckImgStatus);
23126
23587
  }
23127
23588
  }, 500);
@@ -23149,7 +23610,7 @@
23149
23610
  });
23150
23611
  playNext();
23151
23612
  });
23152
- _defineProperty(this, "SfPl", function () {
23613
+ _defineProperty(this, "YTpx", function () {
23153
23614
  document.body.classList.add("slide-right");
23154
23615
  var animationEndCounter = 0;
23155
23616
  var onAnimationEnd = function onAnimationEnd() {
@@ -23161,7 +23622,7 @@
23161
23622
  };
23162
23623
  document.body.addEventListener("animationend", onAnimationEnd);
23163
23624
  });
23164
- _defineProperty(this, "gVOg", function (config) {
23625
+ _defineProperty(this, "idIX", function (config) {
23165
23626
  var _window$Apxor4;
23166
23627
  var element;
23167
23628
  var explicit_styles = "";
@@ -23219,7 +23680,7 @@
23219
23680
  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>";
23220
23681
  element.id = "apx-mute-icon";
23221
23682
  element.addEventListener("touchstart", function (event) {
23222
- _this.uSjD(event);
23683
+ _this.qqos(event);
23223
23684
  });
23224
23685
  break;
23225
23686
  case "copy_icon":
@@ -23459,7 +23920,7 @@
23459
23920
  }
23460
23921
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
23461
23922
  config.absolute_position_children.forEach(function (childConfig) {
23462
- var childElement = _this.gVOg(childConfig);
23923
+ var childElement = _this.idIX(childConfig);
23463
23924
  element.appendChild(childElement);
23464
23925
  });
23465
23926
  }
@@ -23467,7 +23928,7 @@
23467
23928
  // Process children
23468
23929
  if (config.children && config.children.length > 0) {
23469
23930
  config.children.forEach(function (childConfig) {
23470
- var childElement = _this.gVOg(childConfig);
23931
+ var childElement = _this.idIX(childConfig);
23471
23932
  element.appendChild(childElement);
23472
23933
  });
23473
23934
  }
@@ -23495,7 +23956,7 @@
23495
23956
  element.appendChild(ElementStyles);
23496
23957
  return element;
23497
23958
  });
23498
- _defineProperty(this, "uSjD", function (event) {
23959
+ _defineProperty(this, "qqos", function (event) {
23499
23960
  var slide_details_to_be_deleted;
23500
23961
  var mute_child_elements;
23501
23962
  var unmute_child_elements;
@@ -23525,11 +23986,11 @@
23525
23986
  }
23526
23987
  // this.muteElement.addEventListener("touchstart", (event) => {
23527
23988
  // event.stopPropagation();
23528
- // this.uSjD(event);
23989
+ // this.qqos(event);
23529
23990
  // });
23530
23991
  }
23531
23992
  });
23532
- _defineProperty(this, "RqiT", function () {
23993
+ _defineProperty(this, "FBFd", function () {
23533
23994
  var tapTimeout;
23534
23995
  var tapThreshold = 0.5; // Assuming 0.5 is the center of the WebView
23535
23996
  var longPressDuration = 200;
@@ -23653,7 +24114,7 @@
23653
24114
  event.target.dataset.touchStartTime = event.timeStamp;
23654
24115
  });
23655
24116
  });
23656
- _defineProperty(this, "eznj", function () {
24117
+ _defineProperty(this, "YCkG", function () {
23657
24118
  var startY, startX;
23658
24119
  _this.storyContainer.addEventListener("touchstart", function (event) {
23659
24120
  _this.swipeTouch = true;
@@ -23860,7 +24321,7 @@
23860
24321
  }, 50);
23861
24322
  });
23862
24323
  });
23863
- _defineProperty(this, "rVWr", function () {
24324
+ _defineProperty(this, "eiDZ", function () {
23864
24325
  _this.loader.style.display = "block";
23865
24326
  var progress = Array.from(document.querySelectorAll(".progress"));
23866
24327
  var activeIndex = progress.findIndex(function (el) {
@@ -23876,7 +24337,7 @@
23876
24337
  }
23877
24338
  }
23878
24339
  });
23879
- _defineProperty(this, "sfGa", function () {
24340
+ _defineProperty(this, "DOva", function () {
23880
24341
  if (!_this.continueLoading) {
23881
24342
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
23882
24343
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
@@ -23896,19 +24357,19 @@
23896
24357
  _this.loader.style.display = "none";
23897
24358
  }
23898
24359
  });
23899
- _defineProperty(this, "xGNr", function () {
24360
+ _defineProperty(this, "TzVx", function () {
23900
24361
  if (_this.imageElements.length === 0) return true;
23901
24362
  return _this.imageElements.every(function (img) {
23902
24363
  return img.complete;
23903
24364
  });
23904
24365
  });
23905
- _defineProperty(this, "Evhr", function () {
24366
+ _defineProperty(this, "UhLg", function () {
23906
24367
  if (_this.videoElements.length === 0) return true;
23907
24368
  return _this.videoElements.every(function (video) {
23908
24369
  return video.readyState >= 3;
23909
24370
  });
23910
24371
  });
23911
- _defineProperty(this, "Twwy", function () {
24372
+ _defineProperty(this, "GFtM", function () {
23912
24373
  var bodyStyles = window.getComputedStyle(document.body);
23913
24374
  var backgroundImage = bodyStyles.backgroundImage;
23914
24375
  if (backgroundImage && backgroundImage !== "none" && _this.current_slide_config.media_type === "image") {
@@ -23918,7 +24379,7 @@
23918
24379
  var img = new Image();
23919
24380
  img.src = imageUrl;
23920
24381
  if (img.complete) {
23921
- _this.sfGa();
24382
+ _this.DOva();
23922
24383
  return true;
23923
24384
  }
23924
24385
  return false;
@@ -23926,21 +24387,21 @@
23926
24387
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
23927
24388
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
23928
24389
  if (childElements[0].readyState >= 3) {
23929
- _this.sfGa();
24390
+ _this.DOva();
23930
24391
  return true;
23931
24392
  }
23932
24393
  return false;
23933
24394
  } else {
23934
24395
  if (_this.videoElements.length == 0 && _this.imageElements.length == 0) {
23935
- _this.sfGa();
24396
+ _this.DOva();
23936
24397
  return true;
23937
- } else if (_this.xGNr() && _this.Evhr()) {
23938
- _this.sfGa();
24398
+ } else if (_this.TzVx() && _this.UhLg()) {
24399
+ _this.DOva();
23939
24400
  return true;
23940
24401
  }
23941
24402
  }
23942
24403
  });
23943
- _defineProperty(this, "ZSUI", function (event, startY, action) {
24404
+ _defineProperty(this, "IdQV", function (event, startY, action) {
23944
24405
  event.stopPropagation();
23945
24406
  var endY = event.changedTouches[0].clientY;
23946
24407
  var deltaY = startY - endY;
@@ -23996,6 +24457,7 @@
23996
24457
  this.closeCallback = closeCallback;
23997
24458
  this.status_bar_height = (_config$position = _config[position]) === null || _config$position === void 0 ? void 0 : _config$position.status_bar_height;
23998
24459
  this.progress_bar = new ProgressBar$1(_config[position].progress_bar);
24460
+ this.storyPoll = new StoryComponents(data, this.moveToNextSlide.bind(this));
23999
24461
  this.slides = _config[position].slides;
24000
24462
  if (this.slides.length === this.slidesSeenCount) {
24001
24463
  this.slidesSeenCount = 0;
@@ -24037,7 +24499,7 @@
24037
24499
  this.swipe_action;
24038
24500
  this.continueLoading = false;
24039
24501
  this.boundSwipeUpHandling = function (event) {
24040
- return _this.ZSUI(event, _this.startY, _this.swipe_action);
24502
+ return _this.IdQV(event, _this.startY, _this.swipe_action);
24041
24503
  };
24042
24504
  }
24043
24505
  _createClass(Stories, [{
@@ -24101,7 +24563,7 @@
24101
24563
  } else {
24102
24564
  var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM17, _window$ApxorRTM18, _window$ApxorRTM19;
24103
24565
  // Move to the first slide of the next group
24104
- // this.SfPl();
24566
+ // this.YTpx();
24105
24567
  this.position++;
24106
24568
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
24107
24569
  this.slides = this.config[this.position].slides;
@@ -24227,7 +24689,7 @@
24227
24689
  if (activeIndex === 0) {
24228
24690
  var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM23, _window$ApxorRTM24, _window$ApxorRTM25;
24229
24691
  // If at the first slide of the current group, move to the last slide of the previous group
24230
- // this.SfPl();
24692
+ // this.YTpx();
24231
24693
  this.position--;
24232
24694
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
24233
24695
  this.slides = this.config[this.position].slides;
@@ -24414,25 +24876,28 @@
24414
24876
  // Create custom content
24415
24877
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
24416
24878
  delete updated_layout_without_absolute_elements["absolute_position_children"];
24417
- element = this.gVOg(updated_layout_without_absolute_elements);
24879
+ element = this.idIX(updated_layout_without_absolute_elements);
24418
24880
  }
24419
24881
  // Append slide content to slide details container
24420
24882
 
24421
24883
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
24422
24884
  document.body.style.margin = "0px";
24423
24885
  currentSlideDetails.appendChild(element);
24424
- this.rVWr();
24886
+ // poll
24887
+ var pollUI = this.storyPoll.render();
24888
+ currentSlideDetails.appendChild(pollUI);
24889
+ this.eiDZ();
24425
24890
 
24426
24891
  // Handle absolute position children
24427
24892
  if (current_slide_from_config.layout.absolute_position_children && current_slide_from_config.layout.absolute_position_children.length > 0) {
24428
24893
  current_slide_from_config.layout.absolute_position_children.forEach(function (childConfig) {
24429
- var childElement = _this2.gVOg(childConfig);
24894
+ var childElement = _this2.idIX(childConfig);
24430
24895
  // Append absolute position children to slide details container
24431
24896
  currentSlideDetails.appendChild(childElement);
24432
24897
  });
24433
24898
  }
24434
24899
  window.intervalToCheckImgStatus2 = setInterval(function () {
24435
- if (_this2.Twwy()) {
24900
+ if (_this2.GFtM()) {
24436
24901
  clearInterval(window.intervalToCheckImgStatus2);
24437
24902
  }
24438
24903
  }, 500);
@@ -24867,15 +25332,15 @@
24867
25332
  _this$badge$animation2,
24868
25333
  _this$badge$animation3;
24869
25334
  _classCallCheck(this, ApxorBadge);
24870
- _defineProperty(this, "qoHU", function () {
25335
+ _defineProperty(this, "LCqN", function () {
24871
25336
  var delayMillis = _this.delayMillis * 1000;
24872
25337
  _this.shakeAnimationRepeat(_this.interCount, delayMillis);
24873
25338
  });
24874
- _defineProperty(this, "fgNo", function () {
25339
+ _defineProperty(this, "RnAT", function () {
24875
25340
  var delayMillis = _this.delayMillis * 1000;
24876
25341
  _this.fadeAnimationRepeat(_this.interCount, delayMillis);
24877
25342
  });
24878
- _defineProperty(this, "AdBL", function () {
25343
+ _defineProperty(this, "Ozvq", function () {
24879
25344
  var _this$targetElement;
24880
25345
  var delayMillis = _this.delayMillis * 1000;
24881
25346
  var finalStyles = ".apxor-badge-container-stylesdummy-".concat(_this.cssPostFix, " {\n opacity:0;\n }").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
@@ -24884,7 +25349,7 @@
24884
25349
  (_this$targetElement = _this.targetElement) === null || _this$targetElement === void 0 || _this$targetElement.appendChild(newstyleNode1);
24885
25350
  _this.rippleAnimationRepeat(_this.interCount, delayMillis);
24886
25351
  });
24887
- _defineProperty(this, "qdcc", function () {
25352
+ _defineProperty(this, "AwAA", function () {
24888
25353
  var delayMillis = _this.delayMillis * 1000;
24889
25354
  //let badgeContainerClass = `.apxor-badge-container-styles-${this.cssPostFix}`;
24890
25355
  //let badgeAnimationElement = document.querySelector(badgeContainerClass);
@@ -24901,7 +25366,7 @@
24901
25366
  // newstyleNode1.innerHTML = finalStyles;
24902
25367
  // this.targetElement?.appendChild(newstyleNode1);
24903
25368
  });
24904
- _defineProperty(this, "dWIh", function () {
25369
+ _defineProperty(this, "AAlk", function () {
24905
25370
  var elements = document.querySelectorAll(".apx-main-styles-".concat(_this.configId));
24906
25371
  elements === null || elements === void 0 || elements.forEach(function (ele) {
24907
25372
  ele === null || ele === void 0 || ele.remove();
@@ -24910,9 +25375,9 @@
24910
25375
  dummy_elements === null || dummy_elements === void 0 || dummy_elements.forEach(function (ele) {
24911
25376
  ele === null || ele === void 0 || ele.remove();
24912
25377
  });
24913
- _this.xjxB();
25378
+ _this.sbAR();
24914
25379
  });
24915
- _defineProperty(this, "xjxB", function () {
25380
+ _defineProperty(this, "sbAR", function () {
24916
25381
  var targetWrapperElement = document.querySelector(".image-container-".concat(_this.configId));
24917
25382
  // Ensure the target element is the wrapper with class 'image-container'
24918
25383
  if (targetWrapperElement) {
@@ -24936,12 +25401,12 @@
24936
25401
  * @param {boolean} optimized
24937
25402
  * @returns viewId
24938
25403
  */
24939
- _defineProperty(this, "pirj", function (node, optimized) {
25404
+ _defineProperty(this, "zVVH", function (node, optimized) {
24940
25405
  if (node.nodeType !== Node.ELEMENT_NODE) return "";
24941
25406
  var steps = [];
24942
25407
  var contextNode = node;
24943
25408
  while (contextNode) {
24944
- var step = _this.QXkv(contextNode, !!optimized, contextNode === node);
25409
+ var step = _this.JUVj(contextNode, !!optimized, contextNode === node);
24945
25410
  if (!step) break; // Error - bail out early.
24946
25411
  steps.push(step);
24947
25412
  if (step.optimized) break;
@@ -24956,7 +25421,7 @@
24956
25421
  * @param {boolean} optimized
24957
25422
  * @param {object} isTargetNode
24958
25423
  */
24959
- _defineProperty(this, "QXkv", function (node, optimized, isTargetNode) {
25424
+ _defineProperty(this, "JUVj", function (node, optimized, isTargetNode) {
24960
25425
  if (node.nodeType !== Node.ELEMENT_NODE) return null;
24961
25426
  var id = node.getAttribute("id");
24962
25427
  if (optimized) {
@@ -25078,7 +25543,7 @@
25078
25543
  this.contentZindexValue = 1;
25079
25544
  }
25080
25545
  _createClass(ApxorBadge, [{
25081
- key: "epJg",
25546
+ key: "HWuf",
25082
25547
  value: function createBadge() {
25083
25548
  var _this2 = this;
25084
25549
  var targetFoundCallback = function targetFoundCallback() {
@@ -25895,16 +26360,16 @@
25895
26360
  var RTM = /*#__PURE__*/_createClass(function RTM() {
25896
26361
  var _this = this;
25897
26362
  _classCallCheck(this, RTM);
25898
- _defineProperty(this, "VbpC", {});
26363
+ _defineProperty(this, "bMVC", {});
25899
26364
  _defineProperty(this, "isShowingAction", false);
25900
26365
  _defineProperty(this, "currentAction", null);
25901
- _defineProperty(this, "QPAJ", null);
26366
+ _defineProperty(this, "QVSQ", null);
25902
26367
  _defineProperty(this, "version", 97);
25903
26368
  _defineProperty(this, "isInitialised", false);
25904
- _defineProperty(this, "fWpH", {});
25905
- _defineProperty(this, "NsON", false);
26369
+ _defineProperty(this, "wUgW", {});
26370
+ _defineProperty(this, "fMYg", false);
25906
26371
  _defineProperty(this, "_isShownECCalled", false);
25907
- _defineProperty(this, "oLJx", function () {
26372
+ _defineProperty(this, "DzGl", function () {
25908
26373
  _this.isInitialised = true;
25909
26374
  var oldPushState = history.pushState;
25910
26375
  history.pushState = function pushState() {
@@ -25931,7 +26396,7 @@
25931
26396
  var _window;
25932
26397
  (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("logger show");
25933
26398
  if (!_this.isInitialised) {
25934
- _this.oLJx();
26399
+ _this.DzGl();
25935
26400
  }
25936
26401
  window.addEventListener("pagehide", function () {
25937
26402
  var _window$Apxor, _window$Apxor$pageUnl;
@@ -25956,7 +26421,7 @@
25956
26421
  } else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
25957
26422
  _this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
25958
26423
  } else if (ui_config.display_type === "coach_mark_v2") {
25959
- _this.ikBy(ui_config, duration, uuid, name);
26424
+ _this.QAps(ui_config, duration, uuid, name);
25960
26425
  } else {
25961
26426
  showCoachmarkWithDelay(_this, ui_config, {
25962
26427
  configId: uuid,
@@ -25996,7 +26461,7 @@
25996
26461
  });
25997
26462
  _defineProperty(this, "showBadge", function (uiJson, duration, uuid, name, terminationConfig) {
25998
26463
  if (!_this.isInitialised) {
25999
- _this.oLJx();
26464
+ _this.DzGl();
26000
26465
  }
26001
26466
  window.addEventListener("pagehide", function () {
26002
26467
  var _window$Apxor2, _window$Apxor2$pageUn;
@@ -26008,7 +26473,7 @@
26008
26473
  _this.removeBadge(name, uuid);
26009
26474
  }
26010
26475
  var termination_config = JSON.parse(terminationConfig);
26011
- _this.epJg(ui_config, duration, uuid, name, termination_config);
26476
+ _this.HWuf(ui_config, duration, uuid, name, termination_config);
26012
26477
  });
26013
26478
  _defineProperty(this, "showInApp", function (config, duration, configId, name) {
26014
26479
  try {
@@ -26074,7 +26539,7 @@
26074
26539
  try {
26075
26540
  config = config.split("\n").join("\\n");
26076
26541
  var ui_config = JSON.parse(config);
26077
- _this.OIaM(ui_config, configId, name, position, slidesSeenCount, view_id);
26542
+ _this.auDv(ui_config, configId, name, position, slidesSeenCount, view_id);
26078
26543
  } catch (e) {
26079
26544
  var _window$Apxor4;
26080
26545
  if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
@@ -26088,7 +26553,7 @@
26088
26553
  console.error(e);
26089
26554
  }
26090
26555
  });
26091
- _defineProperty(this, "OIaM", function (config, configId, name, position, slidesSeenCount, view_id) {
26556
+ _defineProperty(this, "auDv", function (config, configId, name, position, slidesSeenCount, view_id) {
26092
26557
  var cardsContainer = new Stories(config, configId, name, position, slidesSeenCount, view_id, function () {
26093
26558
  var _window$ApxorRTM3, _config$additional_in3, _config$additional_in4;
26094
26559
  (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_shown", {
@@ -26137,7 +26602,7 @@
26137
26602
  var _window22, _window22$updateFlag, _window23;
26138
26603
  _this.isShowingAction = false;
26139
26604
  _this.currentAction = null;
26140
- _this.QPAJ = null;
26605
+ _this.QVSQ = null;
26141
26606
  (_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);
26142
26607
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
26143
26608
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -26148,21 +26613,21 @@
26148
26613
  }
26149
26614
  };
26150
26615
  if (action_class === "new-inline") {
26151
- _this.QPAJ = new InLineTooltip(ui_config, [], [], terminationConfig, {
26616
+ _this.QVSQ = new InLineTooltip(ui_config, [], [], terminationConfig, {
26152
26617
  configId: uuid,
26153
26618
  configName: name
26154
26619
  }, _this, onShow, onHide, function () {}, false, 0);
26155
26620
  } else if (action_class === "tooltip_builder") {
26156
- _this.QPAJ = new NewInLineTooltip(ui_config, terminationConfig, {
26621
+ _this.QVSQ = new NewInLineTooltip(ui_config, terminationConfig, {
26157
26622
  configId: uuid,
26158
26623
  configName: name
26159
26624
  }, _this, onShow, onHide);
26160
26625
  }
26161
26626
  setTimeout(function () {
26162
- _this.QPAJ.createNewTooltip();
26627
+ _this.QVSQ.createNewTooltip();
26163
26628
  }, ui_config.delay);
26164
26629
  });
26165
- _defineProperty(this, "ikBy", function (ui_config, duration, uuid, name) {
26630
+ _defineProperty(this, "QAps", function (ui_config, duration, uuid, name) {
26166
26631
  var terminationConfig = {};
26167
26632
  terminationConfig["auto_dismiss"] = duration > 0;
26168
26633
  terminationConfig["duration"] = duration;
@@ -26186,7 +26651,7 @@
26186
26651
  var _window27, _window27$updateFlag, _window28;
26187
26652
  _this.isShowingAction = false;
26188
26653
  _this.currentAction = null;
26189
- _this.QPAJ = null;
26654
+ _this.QVSQ = null;
26190
26655
  (_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);
26191
26656
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
26192
26657
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -26198,7 +26663,7 @@
26198
26663
  }, _this.stepperCallback, false, 0);
26199
26664
  _this._currentCoachmark.createNewCoachMark();
26200
26665
  });
26201
- _defineProperty(this, "epJg", function (ui_config, duration, uuid, name, terminationConfig) {
26666
+ _defineProperty(this, "HWuf", function (ui_config, duration, uuid, name, terminationConfig) {
26202
26667
  _this._currentBadge = new ApxorBadge(ui_config, terminationConfig, {
26203
26668
  configId: uuid,
26204
26669
  configName: name
@@ -26215,12 +26680,12 @@
26215
26680
  }
26216
26681
  }
26217
26682
  });
26218
- _this._currentBadge.dWIh();
26219
- _this._currentBadge.epJg();
26683
+ _this._currentBadge.AAlk();
26684
+ _this._currentBadge.HWuf();
26220
26685
  });
26221
26686
  _defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
26222
- if (_this.QPAJ) {
26223
- _this.QPAJ.updateElementPositionOnScroll(top, left, height, width);
26687
+ if (_this.QVSQ) {
26688
+ _this.QVSQ.updateElementPositionOnScroll(top, left, height, width);
26224
26689
  }
26225
26690
  });
26226
26691
  _defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
@@ -26355,10 +26820,10 @@
26355
26820
  });
26356
26821
  _defineProperty(this, "showPlaceHolder", function () {
26357
26822
  var _window38;
26358
- if (_this.NsON) {
26823
+ if (_this.fMYg) {
26359
26824
  return;
26360
26825
  }
26361
- _this.NsON = true;
26826
+ _this.fMYg = true;
26362
26827
  var ele = document.createElement("div");
26363
26828
  ele.innerHTML = "place your immersive card here";
26364
26829
  ele.style.backgroundColor = "#f5f5f5";