apxor-rtm-ui 0.8.2 → 0.9.0

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.
@@ -6921,15 +6921,6 @@
6921
6921
  return ["".concat(font_family, ", ").concat(fallbackFont), font_face];
6922
6922
  };
6923
6923
 
6924
- /**
6925
- * @function getFileExtension
6926
- * @param {*} filename takes image or video url and returns extension
6927
- * @returns extension (jpg ,png etc)
6928
- */
6929
- function getFileExtension(filename) {
6930
- return filename.slice((filename.lastIndexOf(".") - 1 >>> 0) + 2);
6931
- }
6932
-
6933
6924
  /**
6934
6925
  * @function createNewTextElement
6935
6926
  * @description Creates a text element for the given text config. It could either be a title or a description.
@@ -7886,6 +7877,28 @@
7886
7877
  var getSlotNumberByPosition = function getSlotNumberByPosition(position) {
7887
7878
  if (position === "left") return 1;else if (position === "center") return 3;else return 5;
7888
7879
  };
7880
+ var collapseSpaces = function collapseSpaces(text) {
7881
+ return text.replace(/\s+/g, " ");
7882
+ };
7883
+ var contentBasedSearch = function contentBasedSearch(element, type, op, content) {
7884
+ var _content;
7885
+ var innerText = element.innerText.trim().toLowerCase();
7886
+ innerText = collapseSpaces(innerText);
7887
+ content = (_content = content) === null || _content === void 0 ? void 0 : _content.trim().toLowerCase();
7888
+ content = collapseSpaces(content);
7889
+ if (type === "s") {
7890
+ switch (op) {
7891
+ case "CONTAINS":
7892
+ return innerText.includes(content);
7893
+ case "EQ":
7894
+ return innerText === content;
7895
+ default:
7896
+ return false;
7897
+ }
7898
+ } else {
7899
+ return false;
7900
+ }
7901
+ };
7889
7902
 
7890
7903
  /**
7891
7904
  * @function getElementFromSelector
@@ -7895,7 +7908,38 @@
7895
7908
  */
7896
7909
  var getElementFromSelector = function getElementFromSelector(selector) {
7897
7910
  var iframe_id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
7911
+ var find_config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
7912
+ var view_additional_info = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
7898
7913
  // Given selector can be an ID.
7914
+ if (Object.keys(view_additional_info).length > 0 && Object.keys(find_config).length > 0 && (find_config === null || find_config === void 0 ? void 0 : find_config.search_criteria[0]) == "content") {
7915
+ var _elements_list;
7916
+ var elements_list = document.querySelectorAll("[id=\"".concat(selector, "\"]"));
7917
+ if (elements_list.length === 0) {
7918
+ elements_list = document.querySelectorAll(selector);
7919
+ }
7920
+ if (((_elements_list = elements_list) === null || _elements_list === void 0 ? void 0 : _elements_list.length) > 0) {
7921
+ var element_satisfied_list = [];
7922
+ for (var i = 0; i < elements_list.length; i++) {
7923
+ var element_found_based_on_content = contentBasedSearch(elements_list[i], find_config.eval.t, find_config.eval.op, find_config.eval.val);
7924
+ if (element_found_based_on_content) {
7925
+ element_satisfied_list.push(elements_list[i]);
7926
+ element = element_satisfied_list[0];
7927
+ }
7928
+ }
7929
+ var content = view_additional_info === null || view_additional_info === void 0 ? void 0 : view_additional_info.content;
7930
+ } else {
7931
+ elements_list = document.querySelectorAll("*");
7932
+ for (var _i = 0; _i < elements_list.length; _i++) {
7933
+ var _element_found_based_on_content = contentBasedSearch(elements_list[_i], find_config.eval.t, find_config.eval.op, find_config.eval.val);
7934
+ if (_element_found_based_on_content) {
7935
+ element = elements_list[_i];
7936
+ }
7937
+ }
7938
+ }
7939
+ if (element) {
7940
+ return element;
7941
+ }
7942
+ }
7899
7943
  var element = document.getElementById(selector);
7900
7944
  if (!element) {
7901
7945
  try {
@@ -12128,14 +12172,14 @@
12128
12172
  _config$wait_interval,
12129
12173
  _config$termination;
12130
12174
  _classCallCheck(this, TemplateContent);
12131
- _defineProperty(this, "cdVl", function () {
12175
+ _defineProperty(this, "izJx", function () {
12132
12176
  return new Promise(function (resolve, reject) {
12133
12177
  try {
12134
- var element = _this.XiFV(_this.layout);
12178
+ var element = _this.uFpJ(_this.layout);
12135
12179
  var styleElement = document.createElement("style");
12136
12180
  styleElement.innerHTML = _this.styleContent;
12137
12181
  document.head.appendChild(styleElement);
12138
- _this.fFOm();
12182
+ _this.IQem();
12139
12183
  try {
12140
12184
  eval(_this.script);
12141
12185
  } catch (e) {
@@ -12146,15 +12190,15 @@
12146
12190
  }
12147
12191
  _this.imageElements.forEach(function (img) {
12148
12192
  img.addEventListener("error", function () {
12149
- _this.Mhrx("provided image doesn't exists");
12193
+ _this.gRtY("provided image doesn't exists");
12150
12194
  });
12151
12195
  });
12152
12196
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
12153
12197
  _this.wait_interval -= 1;
12154
12198
  if (_this.wait_interval <= 0) {
12155
- _this.Mhrx("provided media doesn't exists");
12199
+ _this.gRtY("provided media doesn't exists");
12156
12200
  } else {
12157
- if (_this.rgyV() && _this.LmNs() && _this.dPHx()) {
12201
+ if (_this.rlcV() && _this.IGHo() && _this.tVkh()) {
12158
12202
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
12159
12203
  resolve(element);
12160
12204
  }
@@ -12168,7 +12212,7 @@
12168
12212
  }
12169
12213
  });
12170
12214
  });
12171
- _defineProperty(this, "Mhrx", function (reason) {
12215
+ _defineProperty(this, "gRtY", function (reason) {
12172
12216
  var _window$ApxorRTM, _window$Apxor, _this$config, _this$config2, _window$Apxor2, _this$config3, _this$config4, _this$config5, _this$config6, _window3;
12173
12217
  !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
12174
12218
  apx_nudge_name: _this.name,
@@ -12184,13 +12228,13 @@
12184
12228
  _this.closeCallBack("cancel");
12185
12229
  (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorInternals) === null || _window3 === void 0 || _window3.removeBuilderTemplate(_this.configId);
12186
12230
  });
12187
- _defineProperty(this, "fFOm", function () {
12231
+ _defineProperty(this, "IQem", function () {
12188
12232
  var BuilderTemplatesStyles = document.createElement("style");
12189
12233
  BuilderTemplatesStyles.innerHTML = _this.initialStyles;
12190
12234
  BuilderTemplatesStyles.setAttribute("apx-builder-template-styles", "");
12191
12235
  document.head.appendChild(BuilderTemplatesStyles);
12192
12236
  });
12193
- _defineProperty(this, "XiFV", function (config) {
12237
+ _defineProperty(this, "uFpJ", function (config) {
12194
12238
  var _window$Apxor3;
12195
12239
  var element;
12196
12240
  switch (config.type) {
@@ -12274,7 +12318,7 @@
12274
12318
  if (config.type === "cta_button" || config.type === "button") {
12275
12319
  reason = "cta-clicked";
12276
12320
  }
12277
- _this.aFNw(e, "redirect", reason);
12321
+ _this.BGSc(e, "redirect", reason);
12278
12322
  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
12323
  var _window4, _this$config8;
12280
12324
  (_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 +12334,7 @@
12290
12334
  } else if (config.type === "cta_button" || config.type === "button") {
12291
12335
  reason = "cta-clicked";
12292
12336
  }
12293
- _this.aFNw(e, "cancel", reason);
12337
+ _this.BGSc(e, "cancel", reason);
12294
12338
  // window.Apxor.logActionEvent(
12295
12339
  // "walk_through_cancelled",
12296
12340
  // this.configId,
@@ -12309,7 +12353,7 @@
12309
12353
  } else if (config.type === "cta_button" || config.type === "button") {
12310
12354
  reason = "cta-clicked";
12311
12355
  }
12312
- _this.aFNw(e, "dismiss", reason);
12356
+ _this.BGSc(e, "dismiss", reason);
12313
12357
  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
12358
  var _window5, _this$config10;
12315
12359
  (_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 +12364,7 @@
12320
12364
  element.onclick = function (e) {
12321
12365
  e.stopPropagation();
12322
12366
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
12323
- _this.aFNw(e, "never");
12367
+ _this.BGSc(e, "never");
12324
12368
  };
12325
12369
  break;
12326
12370
  case "toggle-class":
@@ -12345,7 +12389,7 @@
12345
12389
  tempInput.select();
12346
12390
  document.execCommand("copy");
12347
12391
  document.body.removeChild(tempInput);
12348
- _this.aFNw(e, "copy-content", "cta-clicked");
12392
+ _this.BGSc(e, "copy-content", "cta-clicked");
12349
12393
  setTimeout(function () {
12350
12394
  window.Apxor.showInfoToast("Text-Copied:".concat(textToCopy));
12351
12395
  }, 500);
@@ -12367,7 +12411,7 @@
12367
12411
  }
12368
12412
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
12369
12413
  config.absolute_position_children.forEach(function (childConfig) {
12370
- var childElement = _this.XiFV(childConfig);
12414
+ var childElement = _this.uFpJ(childConfig);
12371
12415
  element.appendChild(childElement);
12372
12416
  });
12373
12417
  }
@@ -12375,7 +12419,7 @@
12375
12419
  // Process children
12376
12420
  if (config.children && config.children.length > 0) {
12377
12421
  config.children.forEach(function (childConfig) {
12378
- var childElement = _this.XiFV(childConfig);
12422
+ var childElement = _this.uFpJ(childConfig);
12379
12423
  element.appendChild(childElement);
12380
12424
  });
12381
12425
  }
@@ -12402,7 +12446,7 @@
12402
12446
  }
12403
12447
  return element;
12404
12448
  });
12405
- _defineProperty(this, "aFNw", function (e, action) {
12449
+ _defineProperty(this, "BGSc", function (e, action) {
12406
12450
  var _window$Apxor4, _this$config11, _this$config12, _window$Apxor5, _this$config13, _this$config14, _this$config15, _this$config16;
12407
12451
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
12408
12452
  var additional_info = {
@@ -12431,7 +12475,7 @@
12431
12475
  _this.closeCallBack(action);
12432
12476
  }
12433
12477
  });
12434
- _defineProperty(this, "LmNs", function () {
12478
+ _defineProperty(this, "IGHo", function () {
12435
12479
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
12436
12480
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
12437
12481
  if (_this.imageElements.length === 0) return true;
@@ -12439,13 +12483,13 @@
12439
12483
  return img.complete;
12440
12484
  });
12441
12485
  });
12442
- _defineProperty(this, "dPHx", function () {
12486
+ _defineProperty(this, "tVkh", function () {
12443
12487
  if (!_this.bgImageUrl) return true;
12444
12488
  var img = new Image();
12445
12489
  img.src = _this.bgImageUrl;
12446
12490
  return img.complete;
12447
12491
  });
12448
- _defineProperty(this, "rgyV", function () {
12492
+ _defineProperty(this, "rlcV", function () {
12449
12493
  if (_this.videoElements.length === 0) return true;
12450
12494
  return _this.videoElements.every(function (video) {
12451
12495
  return video.readyState >= 3;
@@ -12712,6 +12756,8 @@
12712
12756
  _classCallCheck(this, Offset);
12713
12757
  this.skid = getNumberOrDefault(data === null || data === void 0 ? void 0 : data.skid, 0);
12714
12758
  this.distance = getNumberOrDefault(data === null || data === void 0 ? void 0 : data.distance, 0);
12759
+ this.x = getNumberOrDefault(data === null || data === void 0 ? void 0 : data.x, 0);
12760
+ this.y = getNumberOrDefault(data === null || data === void 0 ? void 0 : data.y, 0);
12715
12761
  });
12716
12762
 
12717
12763
  /**
@@ -12734,7 +12780,7 @@
12734
12780
  var Position = /*#__PURE__*/_createClass(function Position() {
12735
12781
  var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
12736
12782
  _classCallCheck(this, Position);
12737
- this.position = getStringOrDefault(data === null || data === void 0 ? void 0 : data.position, "top-left").toLowerCase();
12783
+ this.position = getStringOrDefault(convertThePositionCode(data === null || data === void 0 ? void 0 : data.position), "top-left").toLowerCase();
12738
12784
  this.enable_offset = data.enable_offset;
12739
12785
  this.offset = new Offset(data.offset);
12740
12786
  });
@@ -13379,7 +13425,7 @@
13379
13425
  case 0:
13380
13426
  _context2.prev = 0;
13381
13427
  _context2.next = 3;
13382
- return this.templateContent.cdVl();
13428
+ return this.templateContent.izJx();
13383
13429
  case 3:
13384
13430
  this.inLineContainer = _context2.sent;
13385
13431
  _context2.next = 9;
@@ -13903,6 +13949,7 @@
13903
13949
  this.enable_border = data.enable_border;
13904
13950
  this.border = new Border(data.border);
13905
13951
  this.alignment = getStringOrDefault(data.alignment, CENTER);
13952
+ this.position = getStringOrDefault(data.position, "right");
13906
13953
  }
13907
13954
  _createClass(Icon, null, [{
13908
13955
  key: "isEnabled",
@@ -14955,7 +15002,7 @@
14955
15002
  * @description Creates the styles for Marketing message.
14956
15003
  * @returns {string} css styles
14957
15004
  */
14958
- _defineProperty(this, "jkcO", function () {
15005
+ _defineProperty(this, "LXYP", function () {
14959
15006
  if (!_this.enable_marketing) {
14960
15007
  return "";
14961
15008
  }
@@ -14974,7 +15021,7 @@
14974
15021
  * @private
14975
15022
  * @description Sets the marketing content at the end of the Inline
14976
15023
  */
14977
- _defineProperty(this, "UePG", function () {
15024
+ _defineProperty(this, "aozU", function () {
14978
15025
  if (_this.enable_marketing) {
14979
15026
  var marketingContainer = document.createElement("div");
14980
15027
  marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
@@ -15015,6 +15062,8 @@
15015
15062
  this.interactive_border = config.interactive_border || 10; // Determines the invisible border around the tippy that will prevent it from hiding if the cursorleft it
15016
15063
 
15017
15064
  this.target = new Target$1(config.target);
15065
+ this.view_additional_info = (config === null || config === void 0 ? void 0 : config.view_additional_info) || {};
15066
+ this.find_config = (config === null || config === void 0 ? void 0 : config.find_config) || {};
15018
15067
  this.elementHighlighter = new ElementHighlighter(config.highlighter);
15019
15068
  this.direction = new Direction(config.direction);
15020
15069
  this.position = new Position(config.position);
@@ -15201,7 +15250,7 @@
15201
15250
  }, {
15202
15251
  key: "_findTargetElement",
15203
15252
  value: function _findTargetElement(targetFoundCallback) {
15204
- this.targetElement = getElementFromSelector(this.target.id, this.target.frame_id);
15253
+ this.targetElement = getElementFromSelector(this.target.id, this.target.frame_id, this.find_config, this.view_additional_info);
15205
15254
  if (!this.targetElement) {
15206
15255
  if (this.target.enable_retry) {
15207
15256
  console.info("Not found yet. Rechecking the DOM.");
@@ -15403,7 +15452,6 @@
15403
15452
  _this5.scrollCompletelyInViewCount--;
15404
15453
  var is_element_covered = isElementCovered(_this5.targetElement);
15405
15454
  if (isElementCompletlyInView(_this5.targetElement) && !is_element_covered) {
15406
- console.log("is completely in view");
15407
15455
  targetReachedCallback();
15408
15456
  isscrolled = true;
15409
15457
  clearInterval(_this5.scrollCompletelyInViewCount);
@@ -15586,7 +15634,7 @@
15586
15634
  if (apxor_tooltip_styles) {
15587
15635
  return;
15588
15636
  }
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.jkcO(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15637
+ 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.LXYP(), "\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
15638
  var styleNode = document.createElement("style");
15591
15639
  styleNode.setAttribute("apx-tooltip-styles", "");
15592
15640
  styleNode.innerHTML = styles;
@@ -16396,7 +16444,7 @@
16396
16444
  this._setCloseButton();
16397
16445
 
16398
16446
  //Set the Marketing content
16399
- this.UePG();
16447
+ this.aozU();
16400
16448
  }
16401
16449
 
16402
16450
  /**
@@ -19291,7 +19339,7 @@
19291
19339
  case 0:
19292
19340
  _context2.prev = 0;
19293
19341
  _context2.next = 3;
19294
- return this.templateContent.cdVl();
19342
+ return this.templateContent.izJx();
19295
19343
  case 3:
19296
19344
  this.inAppContainer = _context2.sent;
19297
19345
  this.inAppContainer.style.zIndex = 99999;
@@ -19490,7 +19538,7 @@
19490
19538
  * @description Creates the styles for Marketing message.
19491
19539
  * @returns {string} css styles
19492
19540
  */
19493
- _defineProperty(this, "jkcO", function () {
19541
+ _defineProperty(this, "LXYP", function () {
19494
19542
  if (!_this.enable_marketing) {
19495
19543
  return "";
19496
19544
  }
@@ -19536,7 +19584,7 @@
19536
19584
  * @private
19537
19585
  * @description Get the response for Form content in the InApp modal.
19538
19586
  */
19539
- _defineProperty(this, "buAb", function (form_elements) {
19587
+ _defineProperty(this, "FmiR", function (form_elements) {
19540
19588
  var obj = {};
19541
19589
  var callback = "";
19542
19590
  form_elements.forEach(function (element) {
@@ -19576,7 +19624,7 @@
19576
19624
  * @private
19577
19625
  * @description Sets the marketing content at the end of the InApp
19578
19626
  */
19579
- _defineProperty(this, "UePG", function () {
19627
+ _defineProperty(this, "aozU", function () {
19580
19628
  if (_this.enable_marketing) {
19581
19629
  var marketingContainer = document.createElement("div");
19582
19630
  marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
@@ -19835,7 +19883,7 @@
19835
19883
  }, {
19836
19884
  key: "_setStyles",
19837
19885
  value: function _setStyles() {
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.jkcO(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
19886
+ 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.LXYP(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
19839
19887
  var styleNode = document.createElement("style");
19840
19888
  styleNode.setAttribute("id", "apxor-style-" + this.configId);
19841
19889
  styleNode.innerHTML = styles;
@@ -20334,7 +20382,7 @@
20334
20382
  this._setCloseButton();
20335
20383
 
20336
20384
  //Set the Marketing content
20337
- this.UePG();
20385
+ this.aozU();
20338
20386
  }
20339
20387
 
20340
20388
  /**
@@ -20616,7 +20664,7 @@
20616
20664
  var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
20617
20665
  form.addEventListener("submit", function (e) {
20618
20666
  e.preventDefault();
20619
- var _this8$generateRespon = _this8.buAb(_this8.form.elements),
20667
+ var _this8$generateRespon = _this8.FmiR(_this8.form.elements),
20620
20668
  obj = _this8$generateRespon.obj,
20621
20669
  callback = _this8$generateRespon.callback;
20622
20670
  var evalString = "(obj)=>" + callback + "(obj)";
@@ -20976,7 +21024,7 @@
20976
21024
  };
20977
21025
  } else {
20978
21026
  // As the video player is hidden by default, unhide if the mode is not PIP.
20979
- _this.DfFP();
21027
+ _this.PVYW();
20980
21028
  }
20981
21029
  _this.showCallback();
20982
21030
  } catch (e) {
@@ -20997,7 +21045,7 @@
20997
21045
  * For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
20998
21046
  * For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
20999
21047
  */
21000
- _defineProperty(this, "qLUJ", function () {
21048
+ _defineProperty(this, "gTth", function () {
21001
21049
  var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
21002
21050
  width = _getHeightWidthFromRe.width,
21003
21051
  height = _getHeightWidthFromRe.height;
@@ -21009,7 +21057,7 @@
21009
21057
  * @private
21010
21058
  * @description Removes the video player style element.
21011
21059
  */
21012
- _defineProperty(this, "JeHw", function () {
21060
+ _defineProperty(this, "uBtp", function () {
21013
21061
  var playerStyles = document.getElementById("apx-mpl-styles");
21014
21062
  if (playerStyles) {
21015
21063
  playerStyles.remove();
@@ -21020,7 +21068,7 @@
21020
21068
  * @private
21021
21069
  * @description Attach listeners on the video controls
21022
21070
  */
21023
- _defineProperty(this, "YVwh", function () {
21071
+ _defineProperty(this, "KFuB", function () {
21024
21072
  // Listener for the video end. Display the CTA's when the video ends.
21025
21073
  _this.videoElement.addEventListener("ended", function () {
21026
21074
  var ctaButtons = document.getElementById("apx-cta-btn");
@@ -21135,7 +21183,7 @@
21135
21183
  * @private
21136
21184
  * @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
21137
21185
  */
21138
- _defineProperty(this, "RrVD", function () {
21186
+ _defineProperty(this, "VYlT", function () {
21139
21187
  var _this$terminationConf;
21140
21188
  if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
21141
21189
  // On Exit of the PIP,
@@ -21175,7 +21223,7 @@
21175
21223
  * @private Sets the custom controls on the video player.
21176
21224
  * PIP and close are the custom controls that are created and positions on the video.
21177
21225
  */
21178
- _defineProperty(this, "IGDk", function () {
21226
+ _defineProperty(this, "euHT", function () {
21179
21227
  _this.enable_close_button;
21180
21228
  if (_this.enable_close_button) {
21181
21229
  var closeButton = document.createElement("span");
@@ -21222,21 +21270,21 @@
21222
21270
  * @function hideVideoPlayer
21223
21271
  * @description Sets the visibility of the video player to hidden.
21224
21272
  */
21225
- _defineProperty(this, "GSoE", function () {
21273
+ _defineProperty(this, "FEeR", function () {
21226
21274
  _this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
21227
21275
  });
21228
21276
  /**
21229
21277
  * @function unhideVideoPlayer
21230
21278
  * @description Unhides video player.
21231
21279
  */
21232
- _defineProperty(this, "DfFP", function () {
21280
+ _defineProperty(this, "PVYW", function () {
21233
21281
  _this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
21234
21282
  });
21235
21283
  /**
21236
21284
  * @function getVideoElement
21237
21285
  * @returns {HTMLElement} Video ekement
21238
21286
  */
21239
- _defineProperty(this, "aDRs", function () {
21287
+ _defineProperty(this, "FSGH", function () {
21240
21288
  return _this.videoElement;
21241
21289
  });
21242
21290
  this.videoPlayer = null;
@@ -21290,7 +21338,7 @@
21290
21338
  this.videoPlayer.style.backgroundColor = this.bg_color;
21291
21339
 
21292
21340
  // Video has a resolution, not deviating from the resolution set the height and width.
21293
- this.qLUJ();
21341
+ this.gTth();
21294
21342
  //Generate the styles and add them to the document head.
21295
21343
  this._setVideoPlayerStyles();
21296
21344
  //Set the position of the video player with in the 5 possible positions.
@@ -21298,16 +21346,16 @@
21298
21346
  //Create a video element,set the source and add to the container.
21299
21347
  this._setPlayerContent();
21300
21348
  //Set the listeners on the video control buttons.
21301
- this.YVwh();
21349
+ this.KFuB();
21302
21350
  //Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
21303
- this.RrVD();
21351
+ this.VYlT();
21304
21352
  //Set the custom close and PIP controls. Not using the defaults from the html video element.
21305
21353
  //Reason - We want to position them at the top right and left positions.
21306
- this.IGDk();
21354
+ this.euHT();
21307
21355
  //Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
21308
21356
  this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
21309
21357
  //Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
21310
- this.GSoE();
21358
+ this.FEeR();
21311
21359
  //If the auto dismiss is enabled, sets the timeout to call the InApp close.
21312
21360
  this._setAutoTerminate();
21313
21361
  document.body.appendChild(this.videoPlayer);
@@ -21422,7 +21470,7 @@
21422
21470
  }
21423
21471
  }
21424
21472
  this.videoPlayer.remove();
21425
- this.JeHw();
21473
+ this.uBtp();
21426
21474
  if (closeButtonName !== "auto_dismiss") {
21427
21475
  var _window$ApxorRTM9;
21428
21476
  (_window$ApxorRTM9 = window.ApxorRTM) === null || _window$ApxorRTM9 === void 0 || _window$ApxorRTM9.logEvent("apx_video_inapp_close_button_clicked", {
@@ -21492,7 +21540,7 @@
21492
21540
  replayCount: _this3.replayCount
21493
21541
  });
21494
21542
  _this3.videoPlayer.remove();
21495
- _this3.JeHw();
21543
+ _this3.uBtp();
21496
21544
  _this3.hideCallback();
21497
21545
  } catch (e) {
21498
21546
  console.log("Can't close the video player\n".concat(e));
@@ -21586,14 +21634,14 @@
21586
21634
  try {
21587
21635
  var _window;
21588
21636
  (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.debug("called showEmbedCards");
21589
- var element = _this.QjIQ(_this.layout);
21590
- _this.LgcC();
21637
+ var element = _this.pwLs(_this.layout);
21638
+ _this.LxnJ();
21591
21639
  window.onresize = function () {
21592
- _this.Oave();
21640
+ _this.qoWw();
21593
21641
  };
21594
21642
  _this.imageElements.forEach(function (img) {
21595
21643
  img.addEventListener("error", function () {
21596
- _this.Mhrx("provided image doesn't exists");
21644
+ _this.gRtY("provided image doesn't exists");
21597
21645
  });
21598
21646
  });
21599
21647
  var rootContainer = document.createElement("div");
@@ -21604,7 +21652,7 @@
21604
21652
  var styleElement = document.createElement("style");
21605
21653
  styleElement.innerHTML = _this.styleContent;
21606
21654
  document.head.appendChild(styleElement);
21607
- _this.Hbcw(_this.termination);
21655
+ _this.ukpn(_this.termination);
21608
21656
  try {
21609
21657
  eval(_this.script);
21610
21658
  } catch (e) {
@@ -21615,10 +21663,10 @@
21615
21663
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
21616
21664
  _this.wait_interval -= 1;
21617
21665
  if (_this.wait_interval <= 0) {
21618
- _this.Mhrx("provided media doesn't exists");
21666
+ _this.gRtY("provided media doesn't exists");
21619
21667
  } else {
21620
- if (_this.rgyV() && _this.LmNs() && _this.dPHx()) {
21621
- _this.Oave();
21668
+ if (_this.rlcV() && _this.IGHo() && _this.tVkh()) {
21669
+ _this.qoWw();
21622
21670
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
21623
21671
  }
21624
21672
  }
@@ -21629,7 +21677,7 @@
21629
21677
  (_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));
21630
21678
  }
21631
21679
  });
21632
- _defineProperty(this, "Mhrx", function (reason) {
21680
+ _defineProperty(this, "gRtY", function (reason) {
21633
21681
  var _window$ApxorRTM, _window4;
21634
21682
  !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
21635
21683
  apx_nudge_name: _this.name,
@@ -21643,13 +21691,13 @@
21643
21691
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
21644
21692
  (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorWidget) === null || _window4 === void 0 || _window4.removeEmbedCard(_this.configId);
21645
21693
  });
21646
- _defineProperty(this, "LgcC", function () {
21694
+ _defineProperty(this, "LxnJ", function () {
21647
21695
  var EmbeddedCardsStyles = document.createElement("style");
21648
21696
  EmbeddedCardsStyles.innerHTML = _this.initialStyles;
21649
21697
  EmbeddedCardsStyles.setAttribute("apx-embedded-card-styles", "");
21650
21698
  document.head.appendChild(EmbeddedCardsStyles);
21651
21699
  });
21652
- _defineProperty(this, "QjIQ", function (config) {
21700
+ _defineProperty(this, "pwLs", function (config) {
21653
21701
  var _window$Apxor;
21654
21702
  var element;
21655
21703
  switch (config.type) {
@@ -21723,27 +21771,27 @@
21723
21771
  element.onclick = function (e) {
21724
21772
  e.stopPropagation();
21725
21773
  window.Apxor.redirect(JSON.stringify(action));
21726
- _this.aFNw(e);
21774
+ _this.BGSc(e);
21727
21775
  };
21728
21776
  break;
21729
21777
  case "show-video":
21730
21778
  element.onclick = function (e) {
21731
21779
  e.stopPropagation();
21732
21780
  window.Apxor.showVideoInApp(_this.configId, _this.name, action.url);
21733
- _this.aFNw(e);
21781
+ _this.BGSc(e);
21734
21782
  };
21735
21783
  break;
21736
21784
  case "cancel":
21737
21785
  element.onclick = function (e) {
21738
21786
  e.stopPropagation();
21739
- _this.aFNw(e);
21787
+ _this.BGSc(e);
21740
21788
  window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
21741
21789
  };
21742
21790
  break;
21743
21791
  case "dismiss":
21744
21792
  element.onclick = function (e) {
21745
21793
  e.stopPropagation();
21746
- _this.aFNw(e);
21794
+ _this.BGSc(e);
21747
21795
  };
21748
21796
  break;
21749
21797
  case "never":
@@ -21751,7 +21799,7 @@
21751
21799
  e.stopPropagation();
21752
21800
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
21753
21801
  window.Apxor.logActionEvent("never_show_clicked", _this.configId, _this.name);
21754
- _this.aFNw(e);
21802
+ _this.BGSc(e);
21755
21803
  };
21756
21804
  break;
21757
21805
  case "toggle-class":
@@ -21776,7 +21824,7 @@
21776
21824
  tempInput.select();
21777
21825
  document.execCommand("copy");
21778
21826
  document.body.removeChild(tempInput);
21779
- _this.aFNw(e);
21827
+ _this.BGSc(e);
21780
21828
  };
21781
21829
  break;
21782
21830
  case "log-app-event":
@@ -21795,7 +21843,7 @@
21795
21843
  }
21796
21844
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
21797
21845
  config.absolute_position_children.forEach(function (childConfig) {
21798
- var childElement = _this.XiFV(childConfig);
21846
+ var childElement = _this.uFpJ(childConfig);
21799
21847
  element.appendChild(childElement);
21800
21848
  });
21801
21849
  }
@@ -21803,7 +21851,7 @@
21803
21851
  // Process children
21804
21852
  if (config.children && config.children.length > 0) {
21805
21853
  config.children.forEach(function (childConfig) {
21806
- var childElement = _this.QjIQ(childConfig);
21854
+ var childElement = _this.pwLs(childConfig);
21807
21855
  element.appendChild(childElement);
21808
21856
  });
21809
21857
  }
@@ -21829,7 +21877,7 @@
21829
21877
  }
21830
21878
  return element;
21831
21879
  });
21832
- _defineProperty(this, "aFNw", function (e) {
21880
+ _defineProperty(this, "BGSc", function (e) {
21833
21881
  var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
21834
21882
  var additional_info = {
21835
21883
  apx_nudge_name: _this.name,
@@ -21846,7 +21894,7 @@
21846
21894
  (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_card_interaction", additional_info);
21847
21895
  }
21848
21896
  });
21849
- _defineProperty(this, "Hbcw", function (config) {
21897
+ _defineProperty(this, "ukpn", function (config) {
21850
21898
  config.forEach(function (id) {
21851
21899
  var element = document.getElementById(id);
21852
21900
  if (element) {
@@ -21854,7 +21902,7 @@
21854
21902
  }
21855
21903
  });
21856
21904
  });
21857
- _defineProperty(this, "LmNs", function () {
21905
+ _defineProperty(this, "IGHo", function () {
21858
21906
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
21859
21907
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
21860
21908
  if (_this.imageElements.length === 0) return true;
@@ -21862,19 +21910,19 @@
21862
21910
  return img.complete;
21863
21911
  });
21864
21912
  });
21865
- _defineProperty(this, "rgyV", function () {
21913
+ _defineProperty(this, "rlcV", function () {
21866
21914
  if (_this.videoElements.length === 0) return true;
21867
21915
  return _this.videoElements.every(function (video) {
21868
21916
  return video.readyState >= 3;
21869
21917
  });
21870
21918
  });
21871
- _defineProperty(this, "dPHx", function () {
21919
+ _defineProperty(this, "tVkh", function () {
21872
21920
  if (!_this.bgImageUrl) return true;
21873
21921
  var img = new Image();
21874
21922
  img.src = _this.bgImageUrl;
21875
21923
  return img.complete;
21876
21924
  });
21877
- _defineProperty(this, "Oave", function () {
21925
+ _defineProperty(this, "qoWw", function () {
21878
21926
  var _window6, _window7;
21879
21927
  var width = window.document.querySelector("html").offsetWidth;
21880
21928
  var height = window.document.querySelector("html").offsetHeight;
@@ -21963,8 +22011,8 @@
21963
22011
  _this.storyContainer.appendChild(currentElement);
21964
22012
  _this.storyContainer.appendChild(slideDetails);
21965
22013
  document.body.appendChild(_this.storyContainer);
21966
- _this.dPXx();
21967
- _this.KwGj();
22014
+ _this.PPkW();
22015
+ _this.EDNh();
21968
22016
  _this.progress = Array.from(document.querySelectorAll(".progress"));
21969
22017
  var current_slide = document.querySelector(".slide-details");
21970
22018
  var playNext = function playNext(e) {
@@ -22010,7 +22058,7 @@
22010
22058
  _existingAbsoluteElements2.forEach(function (element) {
22011
22059
  element.remove();
22012
22060
  });
22013
- // this.vvEL();
22061
+ // this.WImt();
22014
22062
  var _currentSlideDetails = document.querySelector(".slide-details");
22015
22063
  _currentSlideDetails.innerHTML = "";
22016
22064
  _this.position = _this.position + 1;
@@ -22106,7 +22154,7 @@
22106
22154
  absolute_header = document.createElement("div");
22107
22155
  current_slide_from_config.layout.absolute_position_children.forEach(function (current_element) {
22108
22156
  var current_absolute_element;
22109
- current_absolute_element = _this.XiFV(current_element);
22157
+ current_absolute_element = _this.uFpJ(current_element);
22110
22158
  absolute_header.appendChild(current_absolute_element);
22111
22159
  });
22112
22160
  (_absolute_header = absolute_header) === null || _absolute_header === void 0 || _absolute_header.classList.add("apx-slide-header");
@@ -22116,10 +22164,9 @@
22116
22164
  var _window$Apxor;
22117
22165
  element = document.createElement("div");
22118
22166
  var image_src;
22119
- var image_ext;
22120
22167
  if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) != "ios") {
22121
- image_ext = getFileExtension(current_slide_from_config.media_url);
22122
- image_src = window.Apxor.getFilePath(_this.config[_this.position].id, current_slide_from_config.media_url, image_ext);
22168
+ var _window$Apxor2;
22169
+ image_src = (_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.getFilePathForStories(_this.config[_this.position].id, current_slide_from_config.media_url);
22123
22170
  if (image_src && image_src != "") {
22124
22171
  document.body.style.backgroundImage = "url(".concat(image_src, ")");
22125
22172
  document.body.style.backgroundSize = "100% auto";
@@ -22140,7 +22187,7 @@
22140
22187
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
22141
22188
  document.body.style.margin = "0px";
22142
22189
  } else if (current_slide_from_config.media_type === "video") {
22143
- var _window$Apxor2;
22190
+ var _window$Apxor3;
22144
22191
  document.body.style.backgroundImage = "";
22145
22192
  document.body.style.backgroundSize = "";
22146
22193
  document.body.style.backgroundPosition = "";
@@ -22153,7 +22200,7 @@
22153
22200
  //Set the video tag attributes
22154
22201
  sourceElement.setAttribute("src", current_slide_from_config.media_url);
22155
22202
  sourceElement.setAttribute("type", "video/mp4");
22156
- if (((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios") {
22203
+ if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
22157
22204
  element.playsInline = true;
22158
22205
  }
22159
22206
  element.appendChild(sourceElement);
@@ -22167,7 +22214,7 @@
22167
22214
  document.body.style.backgroundRepeat = "";
22168
22215
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
22169
22216
  delete updated_layout_without_absolute_elements["absolute_position_children"];
22170
- element = _this.XiFV(updated_layout_without_absolute_elements);
22217
+ element = _this.uFpJ(updated_layout_without_absolute_elements);
22171
22218
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
22172
22219
  document.body.style.margin = "0px";
22173
22220
  }
@@ -22175,9 +22222,9 @@
22175
22222
  current_slide.removeChild(current_slide.children[0]);
22176
22223
  }
22177
22224
  current_slide.appendChild(element);
22178
- _this.TAUG();
22225
+ _this.HkDr();
22179
22226
  window.intervalToCheckImgStatus = setInterval(function () {
22180
- if (_this.Ozlk()) {
22227
+ if (_this.tXMg()) {
22181
22228
  clearInterval(window.intervalToCheckImgStatus);
22182
22229
  }
22183
22230
  }, 500);
@@ -22205,7 +22252,7 @@
22205
22252
  });
22206
22253
  playNext();
22207
22254
  });
22208
- _defineProperty(this, "vvEL", function () {
22255
+ _defineProperty(this, "WImt", function () {
22209
22256
  document.body.classList.add("slide-right");
22210
22257
  var animationEndCounter = 0;
22211
22258
  var onAnimationEnd = function onAnimationEnd() {
@@ -22217,8 +22264,8 @@
22217
22264
  };
22218
22265
  document.body.addEventListener("animationend", onAnimationEnd);
22219
22266
  });
22220
- _defineProperty(this, "XiFV", function (config) {
22221
- var _window$Apxor3;
22267
+ _defineProperty(this, "uFpJ", function (config) {
22268
+ var _window$Apxor4;
22222
22269
  var element;
22223
22270
  var startY;
22224
22271
  var progress_bar;
@@ -22273,7 +22320,7 @@
22273
22320
  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>";
22274
22321
  element.id = "apx-mute-icon";
22275
22322
  element.addEventListener("touchstart", function (event) {
22276
- _this.GReO(event);
22323
+ _this.FbJI(event);
22277
22324
  });
22278
22325
  break;
22279
22326
  case "copy_icon":
@@ -22288,7 +22335,7 @@
22288
22335
  // element.controls = true;
22289
22336
  element.disablePictureInPicture = true;
22290
22337
  element.autoplay = true;
22291
- if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
22338
+ if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
22292
22339
  element.playsInline = true;
22293
22340
  }
22294
22341
  element.addEventListener("error", function () {
@@ -22467,7 +22514,7 @@
22467
22514
  }
22468
22515
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
22469
22516
  config.absolute_position_children.forEach(function (childConfig) {
22470
- var childElement = _this.XiFV(childConfig);
22517
+ var childElement = _this.uFpJ(childConfig);
22471
22518
  element.appendChild(childElement);
22472
22519
  });
22473
22520
  }
@@ -22475,15 +22522,14 @@
22475
22522
  // Process children
22476
22523
  if (config.children && config.children.length > 0) {
22477
22524
  config.children.forEach(function (childConfig) {
22478
- var childElement = _this.XiFV(childConfig);
22525
+ var childElement = _this.uFpJ(childConfig);
22479
22526
  element.appendChild(childElement);
22480
22527
  });
22481
22528
  }
22482
22529
  if (config.type === "img") {
22483
- var _config$properties3, _config$properties4, _window5, _window5$getFilePath;
22530
+ var _config$properties3, _window5, _window5$getFilePathF;
22484
22531
  var src = config === null || config === void 0 || (_config$properties3 = config.properties) === null || _config$properties3 === void 0 ? void 0 : _config$properties3.src;
22485
- var format = config === null || config === void 0 || (_config$properties4 = config.properties) === null || _config$properties4 === void 0 ? void 0 : _config$properties4.format;
22486
- element["src"] = src && format ? ((_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || (_window5$getFilePath = _window5.getFilePath) === null || _window5$getFilePath === void 0 ? void 0 : _window5$getFilePath.call(_window5, _this.config[_this.position].id, src, format)) || src : src;
22532
+ element["src"] = src ? ((_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || (_window5$getFilePathF = _window5.getFilePathForStories) === null || _window5$getFilePathF === void 0 ? void 0 : _window5$getFilePathF.call(_window5, _this.config[_this.position].id, src)) || src : src;
22487
22533
  _this.imageElements.push(element);
22488
22534
  var imgWrapper = document.createElement("div");
22489
22535
  var _styleObject = parseCSS(config.css);
@@ -22502,7 +22548,7 @@
22502
22548
  }
22503
22549
  return element;
22504
22550
  });
22505
- _defineProperty(this, "GReO", function (event) {
22551
+ _defineProperty(this, "FbJI", function (event) {
22506
22552
  var slide_details_to_be_deleted;
22507
22553
  var mute_child_elements;
22508
22554
  var unmute_child_elements;
@@ -22532,11 +22578,11 @@
22532
22578
  }
22533
22579
  // this.muteElement.addEventListener("touchstart", (event) => {
22534
22580
  // event.stopPropagation();
22535
- // this.GReO(event);
22581
+ // this.FbJI(event);
22536
22582
  // });
22537
22583
  }
22538
22584
  });
22539
- _defineProperty(this, "KwGj", function () {
22585
+ _defineProperty(this, "EDNh", function () {
22540
22586
  var tapTimeout;
22541
22587
  var tapThreshold = 0.5; // Assuming 0.5 is the center of the WebView
22542
22588
  var longPressDuration = 200;
@@ -22660,7 +22706,7 @@
22660
22706
  event.target.dataset.touchStartTime = event.timeStamp;
22661
22707
  });
22662
22708
  });
22663
- _defineProperty(this, "dPXx", function () {
22709
+ _defineProperty(this, "PPkW", function () {
22664
22710
  var startY, startX;
22665
22711
  _this.storyContainer.addEventListener("touchstart", function (event) {
22666
22712
  _this.swipeTouch = true;
@@ -22867,7 +22913,7 @@
22867
22913
  }, 50);
22868
22914
  });
22869
22915
  });
22870
- _defineProperty(this, "TAUG", function () {
22916
+ _defineProperty(this, "HkDr", function () {
22871
22917
  _this.loader.style.display = "block";
22872
22918
  var progress = Array.from(document.querySelectorAll(".progress"));
22873
22919
  var activeIndex = progress.findIndex(function (el) {
@@ -22883,7 +22929,7 @@
22883
22929
  }
22884
22930
  }
22885
22931
  });
22886
- _defineProperty(this, "uQZd", function () {
22932
+ _defineProperty(this, "Fgqz", function () {
22887
22933
  if (!_this.continueLoading) {
22888
22934
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
22889
22935
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
@@ -22903,19 +22949,19 @@
22903
22949
  _this.loader.style.display = "none";
22904
22950
  }
22905
22951
  });
22906
- _defineProperty(this, "LmNs", function () {
22952
+ _defineProperty(this, "IGHo", function () {
22907
22953
  if (_this.imageElements.length === 0) return true;
22908
22954
  return _this.imageElements.every(function (img) {
22909
22955
  return img.complete;
22910
22956
  });
22911
22957
  });
22912
- _defineProperty(this, "rgyV", function () {
22958
+ _defineProperty(this, "rlcV", function () {
22913
22959
  if (_this.videoElements.length === 0) return true;
22914
22960
  return _this.videoElements.every(function (video) {
22915
22961
  return video.readyState >= 3;
22916
22962
  });
22917
22963
  });
22918
- _defineProperty(this, "Ozlk", function () {
22964
+ _defineProperty(this, "tXMg", function () {
22919
22965
  var bodyStyles = window.getComputedStyle(document.body);
22920
22966
  var backgroundImage = bodyStyles.backgroundImage;
22921
22967
  if (backgroundImage && backgroundImage !== "none" && _this.current_slide_config.media_type === "image") {
@@ -22925,7 +22971,7 @@
22925
22971
  var img = new Image();
22926
22972
  img.src = imageUrl;
22927
22973
  if (img.complete) {
22928
- _this.uQZd();
22974
+ _this.Fgqz();
22929
22975
  return true;
22930
22976
  }
22931
22977
  return false;
@@ -22933,21 +22979,21 @@
22933
22979
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
22934
22980
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
22935
22981
  if (childElements[0].readyState >= 3) {
22936
- _this.uQZd();
22982
+ _this.Fgqz();
22937
22983
  return true;
22938
22984
  }
22939
22985
  return false;
22940
22986
  } else {
22941
22987
  if (_this.videoElements.length == 0 && _this.imageElements.length == 0) {
22942
- _this.uQZd();
22988
+ _this.Fgqz();
22943
22989
  return true;
22944
- } else if (_this.LmNs() && _this.rgyV()) {
22945
- _this.uQZd();
22990
+ } else if (_this.IGHo() && _this.rlcV()) {
22991
+ _this.Fgqz();
22946
22992
  return true;
22947
22993
  }
22948
22994
  }
22949
22995
  });
22950
- _defineProperty(this, "oLxi", function (event, startY, action) {
22996
+ _defineProperty(this, "qVjo", function (event, startY, action) {
22951
22997
  event.stopPropagation();
22952
22998
  var endY = event.changedTouches[0].clientY;
22953
22999
  var deltaY = startY - endY;
@@ -23009,6 +23055,13 @@
23009
23055
  var _window10, _window10$logInternal;
23010
23056
  (_window10 = window) === null || _window10 === void 0 || (_window10 = _window10.Apxor) === null || _window10 === void 0 || (_window10$logInternal = _window10.logInternalEvent) === null || _window10$logInternal === void 0 || _window10$logInternal.call(_window10, "story_slides_closed");
23011
23057
  }
23058
+ this.enable_download_files = _config === null || _config === void 0 ? void 0 : _config.enable_download_files;
23059
+ if (!this.enable_download_files) {
23060
+ this.enable_download_files = false;
23061
+ }
23062
+ if (this.enable_download_files) {
23063
+ this.download_files = _config === null || _config === void 0 ? void 0 : _config.download_files;
23064
+ }
23012
23065
  this.storiesStyles = "";
23013
23066
  this.progressContainer;
23014
23067
  this.storyContainer;
@@ -23035,7 +23088,7 @@
23035
23088
  this.swipe_action;
23036
23089
  this.continueLoading = false;
23037
23090
  this.boundSwipeUpHandling = function (event) {
23038
- return _this.oLxi(event, _this.startY, _this.swipe_action);
23091
+ return _this.qVjo(event, _this.startY, _this.swipe_action);
23039
23092
  };
23040
23093
  }
23041
23094
  _createClass(Stories, [{
@@ -23098,7 +23151,7 @@
23098
23151
  } else {
23099
23152
  var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM16, _window$ApxorRTM17, _window$ApxorRTM18;
23100
23153
  // Move to the first slide of the next group
23101
- // this.vvEL();
23154
+ // this.WImt();
23102
23155
  this.position++;
23103
23156
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
23104
23157
  this.slides = this.config[this.position].slides;
@@ -23224,7 +23277,7 @@
23224
23277
  if (activeIndex === 0) {
23225
23278
  var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM22, _window$ApxorRTM23, _window$ApxorRTM24;
23226
23279
  // If at the first slide of the current group, move to the last slide of the previous group
23227
- // this.vvEL();
23280
+ // this.WImt();
23228
23281
  this.position--;
23229
23282
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
23230
23283
  this.slides = this.config[this.position].slides;
@@ -23349,17 +23402,15 @@
23349
23402
  slideHeader.style.top = "20px";
23350
23403
  // Append slide header to slide details container
23351
23404
  currentSlideDetails.appendChild(slideHeader);
23352
-
23353
23405
  // Update slide content
23354
23406
  var element;
23355
23407
  if ((current_slide_from_config === null || current_slide_from_config === void 0 ? void 0 : current_slide_from_config.media_type) === "image") {
23356
- var _window$Apxor4;
23408
+ var _window$Apxor5;
23357
23409
  element = document.createElement("div");
23358
23410
  var image_src;
23359
- var image_ext;
23360
- if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) != "ios") {
23361
- image_ext = getFileExtension(current_slide_from_config.media_url);
23362
- image_src = window.Apxor.getFilePath(this.config[this.position].id, current_slide_from_config.media_url, image_ext);
23411
+ if (((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) != "ios") {
23412
+ var _window$Apxor6;
23413
+ image_src = (_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.getFilePathForStories(this.config[this.position].id, current_slide_from_config.media_url);
23363
23414
  if (image_src && image_src != "") {
23364
23415
  document.body.style.backgroundImage = "url(".concat(image_src, ")");
23365
23416
  document.body.style.backgroundSize = "100% auto";
@@ -23380,7 +23431,7 @@
23380
23431
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
23381
23432
  document.body.style.margin = "0px";
23382
23433
  } else if ((current_slide_from_config === null || current_slide_from_config === void 0 ? void 0 : current_slide_from_config.media_type) === "video") {
23383
- var _window$Apxor5;
23434
+ var _window$Apxor7;
23384
23435
  document.body.style.backgroundImage = "";
23385
23436
  document.body.style.backgroundSize = "";
23386
23437
  document.body.style.backgroundPosition = "";
@@ -23397,7 +23448,7 @@
23397
23448
  element.style.height = "auto";
23398
23449
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
23399
23450
  document.body.style.margin = "0px";
23400
- if (((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) === "ios") {
23451
+ if (((_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.platform) === "ios") {
23401
23452
  element.playsInline = true;
23402
23453
  }
23403
23454
  element.style.alignItems = "center";
@@ -23413,25 +23464,25 @@
23413
23464
  // Create custom content
23414
23465
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
23415
23466
  delete updated_layout_without_absolute_elements["absolute_position_children"];
23416
- element = this.XiFV(updated_layout_without_absolute_elements);
23467
+ element = this.uFpJ(updated_layout_without_absolute_elements);
23417
23468
  }
23418
23469
  // Append slide content to slide details container
23419
23470
 
23420
23471
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
23421
23472
  document.body.style.margin = "0px";
23422
23473
  currentSlideDetails.appendChild(element);
23423
- this.TAUG();
23474
+ this.HkDr();
23424
23475
 
23425
23476
  // Handle absolute position children
23426
23477
  if (current_slide_from_config.layout.absolute_position_children && current_slide_from_config.layout.absolute_position_children.length > 0) {
23427
23478
  current_slide_from_config.layout.absolute_position_children.forEach(function (childConfig) {
23428
- var childElement = _this2.XiFV(childConfig);
23479
+ var childElement = _this2.uFpJ(childConfig);
23429
23480
  // Append absolute position children to slide details container
23430
23481
  currentSlideDetails.appendChild(childElement);
23431
23482
  });
23432
23483
  }
23433
23484
  window.intervalToCheckImgStatus2 = setInterval(function () {
23434
- if (_this2.Ozlk()) {
23485
+ if (_this2.tXMg()) {
23435
23486
  clearInterval(window.intervalToCheckImgStatus2);
23436
23487
  }
23437
23488
  }, 500);
@@ -23475,19 +23526,1388 @@
23475
23526
  return Stories;
23476
23527
  }();
23477
23528
 
23529
+ /*
23530
+ "border": {
23531
+ "color": "#FF0000",
23532
+ "corners": {
23533
+ "top_left": 5,
23534
+ "top_right": 5,
23535
+ "bottom_right": 5,
23536
+ "bottom_left": 5
23537
+ },
23538
+ "width": {
23539
+ "top": 4,
23540
+ "left": 2,
23541
+ "right": 3,
23542
+ "bottom": 0
23543
+ }
23544
+ }
23545
+ */
23546
+ var Badgeborder = /*#__PURE__*/_createClass(function Badgeborder() {
23547
+ var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23548
+ _classCallCheck(this, Badgeborder);
23549
+ this.color = data.color;
23550
+ this.corners = data.corners;
23551
+ this.width = data.width;
23552
+ });
23553
+
23554
+ /*
23555
+ "shape": {
23556
+ "height": 10,
23557
+ "width": 10,
23558
+ "type": "circle/rectangle",
23559
+ "enable_border": true,
23560
+ "border": {
23561
+ "color": "#FF0000",
23562
+ "corners": {
23563
+ "top_left": 5,
23564
+ "top_right": 5,
23565
+ "bottom_right": 5,
23566
+ "bottom_left": 5
23567
+ },
23568
+ "width": {
23569
+ "top": 4,
23570
+ "left": 2,
23571
+ "right": 3,
23572
+ "bottom": 0
23573
+ }
23574
+ }
23575
+ }
23576
+ */
23577
+ var Shape = /*#__PURE__*/_createClass(function Shape() {
23578
+ var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23579
+ _classCallCheck(this, Shape);
23580
+ this.type = data.type;
23581
+ this.color = getColorOrDefault(data.color, "transparent");
23582
+ this.enable_gradient = data.enable_gradient;
23583
+ if (this.enable_gradient) this.gradient = new Gradient(data.gradient);
23584
+ this.enable_border = data.enable_border;
23585
+ if (this.enable_border) this.border = new Badgeborder(data.border);
23586
+ });
23587
+
23588
+ /*
23589
+ "background": {
23590
+ "enable_image": true,
23591
+ "image": {
23592
+ "type": "assets/url",
23593
+ "path": "",
23594
+ "width": 50,
23595
+ "height": 50
23596
+ },
23597
+ "color": "#00FF0000",
23598
+ "enable_gradient": "false",
23599
+ "gradient": {
23600
+ "colors": ["FF0000", "FF0000"],
23601
+ "direction": "to_right/to_left/to_top/to_bottom"
23602
+ },
23603
+ "shape": {
23604
+ "height": 10,
23605
+ "width": 10,
23606
+ "type": "circle/rectangle",
23607
+ "enable_border": true,
23608
+ "border": {
23609
+ "color": "#FF0000",
23610
+ "corners": {
23611
+ "top_left": 5,
23612
+ "top_right": 5,
23613
+ "bottom_right": 5,
23614
+ "bottom_left": 5
23615
+ },
23616
+ "width": {
23617
+ "top": 4,
23618
+ "left": 2,
23619
+ "right": 3,
23620
+ "bottom": 0
23621
+ }
23622
+ }
23623
+ }
23624
+ },
23625
+ */
23626
+ var Badgebackground = /*#__PURE__*/_createClass(function Badgebackground() {
23627
+ var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23628
+ _classCallCheck(this, Badgebackground);
23629
+ this.width = data.width;
23630
+ this.height = data.height;
23631
+ this.enable_image = data.enable_image;
23632
+ if (this.enable_image) this.image = new Image$1(data.image);
23633
+ this.shape = new Shape(data.shape);
23634
+ });
23635
+
23636
+ /*
23637
+ "content": [
23638
+ {
23639
+ "enable_label": true,
23640
+ "label": {
23641
+ "enable_margin": true,
23642
+ "margin": {
23643
+ "top": 5,
23644
+ "left": 5,
23645
+ "bottom": 5,
23646
+ "right": 5
23647
+ },
23648
+ "color": "#FF0000",
23649
+ "text": "123",
23650
+ "font": {
23651
+ "size": 20,
23652
+ "weight": "bold/normal",
23653
+ "style": "italic/normal",
23654
+ "family": "sans-serif"
23655
+ },
23656
+ "alignment": "left",
23657
+ "script": {
23658
+ "cmds": "e A;jz 1;e A;r \"Winner is: {}\",1;jmp L1;1:e A;r \"{} is not winner\",1;jmp L1;L1:",
23659
+ "vmap": {
23660
+ "A": {
23661
+ "t": "u",
23662
+ "n": "name",
23663
+ "def": "Tesla"
23664
+ }
23665
+ }
23666
+ },
23667
+ "is_dyn": true
23668
+ },
23669
+ "enable_icon": true,
23670
+ "icon": {
23671
+ "type": "Assets/URl",
23672
+ "path": "",
23673
+ "position": "left/right",
23674
+ "width": 50,
23675
+ "height": 50,
23676
+ "enable_margin": true,
23677
+ "margin": {
23678
+ "top": 5,
23679
+ "left": 5,
23680
+ "bottom": 5,
23681
+ "right": 5
23682
+ }
23683
+ }
23684
+ }
23685
+ ],
23686
+ */
23687
+ var Badgecontent = /*#__PURE__*/_createClass(function Badgecontent() {
23688
+ var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23689
+ _classCallCheck(this, Badgecontent);
23690
+ this.enable_label = data.enable_label;
23691
+ if (this.enable_label) this.label = new Text(data.label);
23692
+ this.enable_icon = data.enable_icon;
23693
+ if (this.enable_icon) this.icon = new Icon(data.icon);
23694
+ });
23695
+
23696
+ var Autoscroll = /*#__PURE__*/_createClass(function Autoscroll() {
23697
+ var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23698
+ _classCallCheck(this, Autoscroll);
23699
+ this.duration_millis = getNumberOrDefault(data.duration_millis, 2) / 1000;
23700
+ this.direction = getStringOrDefault(data.direction, "to_top");
23701
+ this.horizontal_gap = data === null || data === void 0 ? void 0 : data.horizontal_gap;
23702
+ });
23703
+
23704
+ /**
23705
+ * @constructor Animation
23706
+ * @example
23707
+ * Example of a Animation model is
23708
+ *
23709
+ * animation: {
23710
+ * type : "cycle",
23711
+ * duration : 10,
23712
+ * anim_function : "ease-in-out",
23713
+ * iteration_count : 2,
23714
+ * }
23715
+ */
23716
+ var BadgeAnimation = /*#__PURE__*/function () {
23717
+ function BadgeAnimation() {
23718
+ var _data$shine, _data$shine2;
23719
+ var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23720
+ _classCallCheck(this, BadgeAnimation);
23721
+ this.type = getStringOrDefault(data.type, "cycle");
23722
+ this.duration = getNumberOrDefault(data.duration, 1);
23723
+ this.delay_millis = getNumberOrDefault(data.delay_millis, 1000) / 1000;
23724
+ this.duration_millis = getNumberOrDefault(data.duration_millis, 1000) / 1000;
23725
+ this.inter_count = getNumberOrDefault(data.inter_count, 0);
23726
+ this.intra_count = getNumberOrDefault(data.intra_count, 0);
23727
+ switch (this.type) {
23728
+ case "fade":
23729
+ this.fade_opacity = getNumberOrDefault(data.fade.opacity, 50);
23730
+ break;
23731
+ case "ripple":
23732
+ this.rippleArea = getNumberOrDefault(data.ripple.area, 8);
23733
+ this.rippleColor = getColorOrDefault(data.ripple.color, "#FFFFFF");
23734
+ this.rippleCornerRadius = getNumberOrDefault(data.ripple.corner_radius, 8);
23735
+ this.rippleShape = getStringOrDefault(data.ripple.shape, "rectangle");
23736
+ break;
23737
+ case "shake":
23738
+ this.shakeDirection = getStringOrDefault(data.shake.direction, "horizontal");
23739
+ break;
23740
+ case "shine":
23741
+ this.shineDirection = getStringOrDefault(data.shine.direction, "to_bottom_right");
23742
+ this.shineColor = getColorOrDefault(data.shine.color, "#FFFFFF");
23743
+ this.lines_gap = data === null || data === void 0 || (_data$shine = data.shine) === null || _data$shine === void 0 ? void 0 : _data$shine.lines_gap;
23744
+ this.lines = data === null || data === void 0 || (_data$shine2 = data.shine) === null || _data$shine2 === void 0 ? void 0 : _data$shine2.lines;
23745
+ break;
23746
+ }
23747
+ this.anim_function = getStringOrDefault(data.anim_function, "ease-in-out");
23748
+ this.iteration_count = getNumberOrDefault(data.iteration_count, "infinite");
23749
+ }
23750
+ _createClass(BadgeAnimation, null, [{
23751
+ key: "isEnabled",
23752
+ value: function isEnabled(data) {
23753
+ if (isUndefined$1(data) || isNull(data) || isEmptyObject(data)) {
23754
+ return false;
23755
+ } else {
23756
+ return true;
23757
+ }
23758
+ }
23759
+ }]);
23760
+ return BadgeAnimation;
23761
+ }();
23762
+
23763
+ /*
23764
+ "badge": {
23765
+ "position": {
23766
+ "position": "TL/T/TR/L/C/R/BL/B/BR",
23767
+ "offset": {
23768
+ "x": 5,
23769
+ "y": 5
23770
+ }
23771
+ },
23772
+ "enable_background": true,
23773
+ "background": {
23774
+ "enable_image": true,
23775
+ "image": {
23776
+ "type": "assets/url",
23777
+ "path": "",
23778
+ "width": 50,
23779
+ "height": 50
23780
+ },
23781
+ "color": "#00FF0000",
23782
+ "enable_gradient": "false",
23783
+ "gradient": {
23784
+ "colors": ["FF0000", "FF0000"],
23785
+ "direction": "to_right/to_left/to_top/to_bottom"
23786
+ },
23787
+ "shape": {
23788
+ "height": 10,
23789
+ "width": 10,
23790
+ "type": "circle/rectangle",
23791
+ "enable_border": true,
23792
+ "border": {
23793
+ "color": "#FF0000",
23794
+ "corners": {
23795
+ "top_left": 5,
23796
+ "top_right": 5,
23797
+ "bottom_right": 5,
23798
+ "bottom_left": 5
23799
+ },
23800
+ "width": {
23801
+ "top": 4,
23802
+ "left": 2,
23803
+ "right": 3,
23804
+ "bottom": 0
23805
+ }
23806
+ }
23807
+ }
23808
+ },
23809
+ "content": [
23810
+ {
23811
+ "enable_label": true,
23812
+ "label": {
23813
+ "enable_margin": true,
23814
+ "margin": {
23815
+ "top": 5,
23816
+ "left": 5,
23817
+ "bottom": 5,
23818
+ "right": 5
23819
+ },
23820
+ "color": "#FF0000",
23821
+ "text": "123",
23822
+ "font": {
23823
+ "size": 20,
23824
+ "weight": "bold/normal",
23825
+ "style": "italic/normal",
23826
+ "family": "sans-serif"
23827
+ },
23828
+ "alignment": "left",
23829
+ "script": {
23830
+ "cmds": "e A;jz 1;e A;r \"Winner is: {}\",1;jmp L1;1:e A;r \"{} is not winner\",1;jmp L1;L1:",
23831
+ "vmap": {
23832
+ "A": {
23833
+ "t": "u",
23834
+ "n": "name",
23835
+ "def": "Tesla"
23836
+ }
23837
+ }
23838
+ },
23839
+ "is_dyn": true
23840
+ },
23841
+ "enable_icon": true,
23842
+ "icon": {
23843
+ "type": "Assets/URl",
23844
+ "path": "",
23845
+ "position": "left/right",
23846
+ "width": 50,
23847
+ "height": 50,
23848
+ "enable_margin": true,
23849
+ "margin": {
23850
+ "top": 5,
23851
+ "left": 5,
23852
+ "bottom": 5,
23853
+ "right": 5
23854
+ }
23855
+ }
23856
+ }
23857
+ ],
23858
+ "enable_shadow": true,
23859
+ "shadow": {
23860
+ "color": "#FFFFFF",
23861
+ "offset_x": 2,
23862
+ "offset_y": 2,
23863
+ "spread_radius": 2
23864
+ },
23865
+ "enable_animation": true,
23866
+ "animation": {
23867
+ "type": "shine/ripple/fading/shake",
23868
+ "time": 5,
23869
+ "ripple_area": 8,
23870
+ "ripple_color": "#FFFFFF",
23871
+ "direction": "top_to_bottom/bottom_to_top",
23872
+ "fade_opacity": 50
23873
+ },
23874
+ "enable_textscroll": true,
23875
+ "textscroll": {
23876
+ "speed": 10,
23877
+ "direction": "left_to_right/right_to_left/bottom_to_top"
23878
+ }
23879
+ }
23880
+ */
23881
+ var Badge = /*#__PURE__*/_createClass(function Badge(data) {
23882
+ var _data$auto_scroll,
23883
+ _this = this;
23884
+ _classCallCheck(this, Badge);
23885
+ this.position = new Position(data.position);
23886
+ this.enable_background = data.enable_background;
23887
+ if (this.enable_background) this.background = new Badgebackground(data.background);
23888
+ this.content = [];
23889
+ if (data !== null && data !== void 0 && data.content && data.content.length !== 0) if (data !== null && data !== void 0 && data.enable_auto_scroll && (data === null || data === void 0 || (_data$auto_scroll = data.auto_scroll) === null || _data$auto_scroll === void 0 ? void 0 : _data$auto_scroll.direction) === "to_bottom") {
23890
+ data.content.forEach(function (contentelement) {
23891
+ _this.content.unshift(new Badgecontent(contentelement));
23892
+ });
23893
+ } else {
23894
+ data.content.forEach(function (contentelement) {
23895
+ _this.content.push(new Badgecontent(contentelement));
23896
+ });
23897
+ }
23898
+ this.enable_shadow = data.enable_shadow;
23899
+ if (this.enable_shadow) this.shadow = new Shadow(data.shadow);
23900
+ this.enable_animation = data.enable_animation;
23901
+ this.animation = new BadgeAnimation(data.animation);
23902
+ this.enable_auto_scroll = data.enable_auto_scroll;
23903
+ if (this.enable_auto_scroll) this.auto_scroll = new Autoscroll(data.auto_scroll);
23904
+ this.tooltipShown = data.tooltipShown;
23905
+ });
23906
+
23907
+ var ApxorBadge = /*#__PURE__*/function () {
23908
+ /**
23909
+ * @class ApxorBadge
23910
+ * @param {JSON} config
23911
+ */
23912
+ function ApxorBadge(config, terminationConfig, messageConfig, rtmInstance, showCallback) {
23913
+ var _this = this,
23914
+ _this$target$retry$ma,
23915
+ _this$target,
23916
+ _this$badge$animation,
23917
+ _this$badge$animation2,
23918
+ _this$badge$animation3;
23919
+ _classCallCheck(this, ApxorBadge);
23920
+ _defineProperty(this, "sOno", function () {
23921
+ var delayMillis = _this.delayMillis * 1000;
23922
+ _this.shakeAnimationRepeat(_this.interCount, delayMillis);
23923
+ });
23924
+ _defineProperty(this, "Dujl", function () {
23925
+ var delayMillis = _this.delayMillis * 1000;
23926
+ _this.fadeAnimationRepeat(_this.interCount, delayMillis);
23927
+ });
23928
+ _defineProperty(this, "ExWA", function () {
23929
+ var _this$targetElement;
23930
+ var delayMillis = _this.delayMillis * 1000;
23931
+ var finalStyles = ".apxor-badge-container-stylesdummy-".concat(_this.cssPostFix, " {\n opacity:0;\n }").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
23932
+ var newstyleNode1 = document.createElement("style");
23933
+ newstyleNode1.innerHTML = finalStyles;
23934
+ (_this$targetElement = _this.targetElement) === null || _this$targetElement === void 0 || _this$targetElement.appendChild(newstyleNode1);
23935
+ _this.rippleAnimationRepeat(_this.interCount, delayMillis);
23936
+ });
23937
+ _defineProperty(this, "qAWh", function () {
23938
+ var delayMillis = _this.delayMillis * 1000;
23939
+ //let badgeContainerClass = `.apxor-badge-container-styles-${this.cssPostFix}`;
23940
+ //let badgeAnimationElement = document.querySelector(badgeContainerClass);
23941
+ //badgeAnimationElement.classList.add("finished");
23942
+
23943
+ _this.shineAnimationRepeat(_this.interCount, delayMillis);
23944
+ // let finalStyles =
23945
+ // `.apxor-badge-content-container-${this.cssPostFix}::before.finished {
23946
+ // display:none;
23947
+ // }`
23948
+ // .replaceAll("\n", "")
23949
+ // .replace(/[\s]{2,999}/g, "");
23950
+ // let newstyleNode1 = document.createElement("style");
23951
+ // newstyleNode1.innerHTML = finalStyles;
23952
+ // this.targetElement?.appendChild(newstyleNode1);
23953
+ });
23954
+ _defineProperty(this, "Krgj", function () {
23955
+ var elements = document.querySelectorAll(".apx-main-styles-".concat(_this.configId));
23956
+ elements === null || elements === void 0 || elements.forEach(function (ele) {
23957
+ ele === null || ele === void 0 || ele.remove();
23958
+ });
23959
+ var dummy_elements = document.querySelectorAll(".apxor-badge-container-stylesdummy-".concat(_this.cssPostFix));
23960
+ dummy_elements === null || dummy_elements === void 0 || dummy_elements.forEach(function (ele) {
23961
+ ele === null || ele === void 0 || ele.remove();
23962
+ });
23963
+ _this.UuHQ();
23964
+ });
23965
+ _defineProperty(this, "UuHQ", function () {
23966
+ var targetWrapperElement = document.querySelector(".image-container-".concat(_this.configId));
23967
+ // Ensure the target element is the wrapper with class 'image-container'
23968
+ if (targetWrapperElement) {
23969
+ var imageElement = targetWrapperElement.querySelector("img"); // Get the image inside the wrapper
23970
+
23971
+ if (imageElement) {
23972
+ // Move the image out of the wrapper by inserting it before the wrapper
23973
+ targetWrapperElement.parentNode.insertBefore(imageElement, targetWrapperElement);
23974
+
23975
+ // Remove the wrapper div
23976
+ targetWrapperElement.remove();
23977
+
23978
+ // Update the target element to be the image itself
23979
+ _this.targetElement = imageElement;
23980
+ }
23981
+ }
23982
+ });
23983
+ /**
23984
+ * @function cssPath
23985
+ * @param {object} node
23986
+ * @param {boolean} optimized
23987
+ * @returns viewId
23988
+ */
23989
+ _defineProperty(this, "Awdk", function (node, optimized) {
23990
+ if (node.nodeType !== Node.ELEMENT_NODE) return "";
23991
+ var steps = [];
23992
+ var contextNode = node;
23993
+ while (contextNode) {
23994
+ var step = _this.gmDO(contextNode, !!optimized, contextNode === node);
23995
+ if (!step) break; // Error - bail out early.
23996
+ steps.push(step);
23997
+ if (step.optimized) break;
23998
+ contextNode = contextNode.parentNode;
23999
+ }
24000
+ steps.reverse();
24001
+ return steps.join(" > ");
24002
+ });
24003
+ /**
24004
+ * @function _cssPathStep
24005
+ * @param {object} node
24006
+ * @param {boolean} optimized
24007
+ * @param {object} isTargetNode
24008
+ */
24009
+ _defineProperty(this, "gmDO", function (node, optimized, isTargetNode) {
24010
+ if (node.nodeType !== Node.ELEMENT_NODE) return null;
24011
+ var id = node.getAttribute("id");
24012
+ if (optimized) {
24013
+ if (id) return new DOMNodePathStep(idSelector(id), true);
24014
+ var nodeNameLower = node.nodeName.toLowerCase();
24015
+ if (nodeNameLower === "body" || nodeNameLower === "head" || nodeNameLower === "html") return new DOMNodePathStep(node.nodeName.toLowerCase(), true);
24016
+ }
24017
+ var nodeName = node.nodeName.toLowerCase();
24018
+ if (id) return new DOMNodePathStep(nodeName.toLowerCase() + idSelector(id), true);
24019
+ var parent = node.parentNode;
24020
+ if (!parent || parent.nodeType === Node.DOCUMENT_NODE) return new DOMNodePathStep(nodeName.toLowerCase(), true);
24021
+ function prefixedElementClassNames(node) {
24022
+ var classAttribute = node.getAttribute("class");
24023
+ if (!classAttribute) return [];
24024
+ return classAttribute.split(/\s+/g).filter(Boolean).map(function (name) {
24025
+ // The prefix is required to store "__proto__" in a object-based map.
24026
+ return "$" + name;
24027
+ });
24028
+ }
24029
+ function idSelector(id) {
24030
+ return "#" + escapeIdentifierIfNeeded(id);
24031
+ }
24032
+ function escapeIdentifierIfNeeded(ident) {
24033
+ if (isCSSIdentifier(ident)) return ident;
24034
+ var shouldEscapeFirst = /^(?:[0-9]|-[0-9-]?)/.test(ident);
24035
+ var lastIndex = ident.length - 1;
24036
+ return ident.replace(/./g, function (c, i) {
24037
+ return shouldEscapeFirst && i === 0 || !isCSSIdentChar(c) ? escapeAsciiChar(c, i === lastIndex) : c;
24038
+ });
24039
+ }
24040
+ function escapeAsciiChar(c, isLast) {
24041
+ return "\\" + toHexByte(c) + (isLast ? "" : " ");
24042
+ }
24043
+ function toHexByte(c) {
24044
+ var hexByte = c.charCodeAt(0).toString(16);
24045
+ if (hexByte.length === 1) hexByte = "0" + hexByte;
24046
+ return hexByte;
24047
+ }
24048
+ function isCSSIdentChar(c) {
24049
+ if (/[a-zA-Z0-9_-]/.test(c)) return true;
24050
+ return c.charCodeAt(0) >= 0xa0;
24051
+ }
24052
+ function isCSSIdentifier(value) {
24053
+ return /^-?[a-zA-Z_][a-zA-Z0-9_-]*$/.test(value);
24054
+ }
24055
+ var prefixedOwnClassNamesArray = prefixedElementClassNames(node);
24056
+ var needsClassNames = false;
24057
+ var needsNthChild = false;
24058
+ var ownIndex = -1;
24059
+ var elementIndex = -1;
24060
+ var siblings = parent.children;
24061
+ for (var i = 0; (ownIndex === -1 || !needsNthChild) && i < siblings.length; ++i) {
24062
+ var sibling = siblings[i];
24063
+ if (sibling.nodeType !== Node.ELEMENT_NODE) continue;
24064
+ elementIndex += 1;
24065
+ if (sibling === node) {
24066
+ ownIndex = elementIndex;
24067
+ continue;
24068
+ }
24069
+ if (needsNthChild) continue;
24070
+ if (sibling.nodeName.toLowerCase() !== nodeName.toLowerCase()) continue;
24071
+ needsClassNames = true;
24072
+ var ownClassNames = new Set(prefixedOwnClassNamesArray);
24073
+ if (!ownClassNames.size) {
24074
+ needsNthChild = true;
24075
+ continue;
24076
+ }
24077
+ var siblingClassNamesArray = prefixedElementClassNames(sibling);
24078
+ for (var j = 0; j < siblingClassNamesArray.length; ++j) {
24079
+ var siblingClass = siblingClassNamesArray[j];
24080
+ if (!ownClassNames.has(siblingClass)) continue;
24081
+ ownClassNames["delete"](siblingClass);
24082
+ if (!ownClassNames.size) {
24083
+ needsNthChild = true;
24084
+ break;
24085
+ }
24086
+ }
24087
+ }
24088
+ var result = nodeName.toLowerCase();
24089
+ if (isTargetNode && nodeName.toLowerCase() === "input" && node.getAttribute("type") && !node.getAttribute("id") && !node.getAttribute("class")) result += '[type="' + node.getAttribute("type") + '"]';
24090
+ if (needsNthChild) {
24091
+ result += ":nth-child(" + (ownIndex + 1) + ")";
24092
+ } else if (needsClassNames) {
24093
+ // eslint-disable-next-line no-unused-vars
24094
+ for (var prefixedName in prefixedOwnClassNamesArray) result += "." + escapeIdentifierIfNeeded(prefixedOwnClassNamesArray[prefixedName].substr(1));
24095
+ }
24096
+ return new DOMNodePathStep(result, false);
24097
+ });
24098
+ this.uiConfig = config;
24099
+ this.rtmInstance = rtmInstance;
24100
+ this.configId = messageConfig.configId;
24101
+ this.name = messageConfig.configName;
24102
+ this.terminationConfig = terminationConfig;
24103
+ this.showCallback = showCallback;
24104
+ this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
24105
+ this.target = new Target$1(config.target);
24106
+ this.view_additional_info = (config === null || config === void 0 ? void 0 : config.view_additional_info) || {};
24107
+ this.find_config = (config === null || config === void 0 ? void 0 : config.find_config) || {};
24108
+ this.elementVisibilityRetries = (_this$target$retry$ma = (_this$target = this.target) === null || _this$target === void 0 || (_this$target = _this$target.retry) === null || _this$target === void 0 ? void 0 : _this$target.max_retries) !== null && _this$target$retry$ma !== void 0 ? _this$target$retry$ma : 0;
24109
+ this.badge = new Badge(config.badge);
24110
+ this.enable_marketing = config.enable_marketing;
24111
+ if (this.enable_marketing) this.marketing = new Marketing(config.marketing);
24112
+ this.intraCount = (_this$badge$animation = this.badge.animation) === null || _this$badge$animation === void 0 ? void 0 : _this$badge$animation.intra_count;
24113
+ this.interCount = (_this$badge$animation2 = this.badge.animation) === null || _this$badge$animation2 === void 0 ? void 0 : _this$badge$animation2.inter_count;
24114
+ this.delayMillis = (_this$badge$animation3 = this.badge.animation) === null || _this$badge$animation3 === void 0 ? void 0 : _this$badge$animation3.delay_millis;
24115
+ this.count = 1;
24116
+ this.shineWidth = 0;
24117
+ this.c = 1;
24118
+ this.badgeDummyContainer = null;
24119
+ this.contentLabelWidth = 0;
24120
+ this.contentIconWidth = 0;
24121
+ this.contentWidth = 0;
24122
+ this.labelElementDummy = null;
24123
+ this.iconElementdummy = null;
24124
+ this.targetClicked = false;
24125
+ this.zIndexValue = 1;
24126
+ this.zIndexValueminusOne = 1;
24127
+ this.contentZindexValue = 1;
24128
+ }
24129
+ _createClass(ApxorBadge, [{
24130
+ key: "Ipuh",
24131
+ value: function createBadge() {
24132
+ var _this2 = this;
24133
+ var targetFoundCallback = function targetFoundCallback() {
24134
+ var _this2$targetElement;
24135
+ var style = window.getComputedStyle(_this2.targetElement);
24136
+ var zIndexValue = style.getPropertyValue("z-index");
24137
+ var zIndex = parseInt(zIndexValue, 10);
24138
+ (_this2$targetElement = _this2.targetElement) === null || _this2$targetElement === void 0 || _this2$targetElement.classList.add("apx-badge-target-style".concat(_this2.cssPostFix));
24139
+ _this2.zIndexValue = zIndex + 3;
24140
+ _this2.zIndexValueminusOne = zIndex + 1;
24141
+ _this2.contentZindexValue = zIndex + 5;
24142
+ if (isNaN(_this2.zIndex)) {
24143
+ _this2.zIndexValue = 999;
24144
+ _this2.zIndexValueminusOne = 998;
24145
+ _this2.contentZindexValue = 1000;
24146
+ }
24147
+ _this2._setBadgeStyles();
24148
+ _this2._setBadgeContent();
24149
+ _this2._setOnClickTerminationForBadges();
24150
+ _this2.showCallback();
24151
+ };
24152
+ var targetValidCallback = function targetValidCallback() {
24153
+ var isElementVisible = _this2._isElementVisible();
24154
+ if (isElementVisible) {
24155
+ targetFoundCallback();
24156
+ } else {
24157
+ _this2.target.retry.max_retries = _this2.elementVisibilityRetries;
24158
+ _this2._retryFindingTargetElement(true, targetFoundCallback);
24159
+ }
24160
+ };
24161
+ this._setTargetElement(targetValidCallback);
24162
+ }
24163
+ }, {
24164
+ key: "_setTargetElement",
24165
+ value: function _setTargetElement(targetValidCallback) {
24166
+ this.targetElement = getElementFromSelector(this.target.id, this.target.frame_id, this.find_config, this.view_additional_info);
24167
+ if (this.targetElement && this.targetElement.tagName.toLowerCase() === "img") {
24168
+ var wrapperDiv = document.createElement("div");
24169
+ wrapperDiv.classList.add("image-container-".concat(this.configId));
24170
+ wrapperDiv.style.position = "relative";
24171
+ wrapperDiv.style.display = "inline-block";
24172
+ this.targetElement.parentNode.insertBefore(wrapperDiv, this.targetElement);
24173
+ wrapperDiv.appendChild(this.targetElement);
24174
+ this.targetElement = wrapperDiv;
24175
+ }
24176
+ if (!this.targetElement) {
24177
+ if (this.target.enable_retry) {
24178
+ this._retryFindingTargetElement(false, targetValidCallback);
24179
+ }
24180
+ } else {
24181
+ targetValidCallback();
24182
+ }
24183
+ }
24184
+
24185
+ /**
24186
+ * @function _isElementVisible
24187
+ * @private
24188
+ * @description Checks if the element has a visible height and width
24189
+ * @returns {boolean} true - If element is visible
24190
+ * false - If the element is not visible
24191
+ */
24192
+ }, {
24193
+ key: "_isElementVisible",
24194
+ value: function _isElementVisible() {
24195
+ try {
24196
+ var rect = this.targetElement.getBoundingClientRect();
24197
+ if (rect.width === 0 || rect.height === 0) {
24198
+ return false;
24199
+ }
24200
+ } catch (e) {
24201
+ return false;
24202
+ }
24203
+ return true;
24204
+ }
24205
+ }, {
24206
+ key: "_retryFindingTargetElement",
24207
+ value: function _retryFindingTargetElement() {
24208
+ var _this3 = this;
24209
+ var elementVisibility = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
24210
+ var callback = arguments.length > 1 ? arguments[1] : undefined;
24211
+ //After every find_interval check the DOM for target element.
24212
+ var elementRecheckIntervalId = setInterval(function () {
24213
+ _this3.targetElement = getElementFromSelector(_this3.target.id, _this3.target.frame_id, _this3.find_config, _this3.view_additional_info);
24214
+ if (!elementVisibility) {
24215
+ //If the element is found, stop checking the DOM.
24216
+ if (_this3.targetElement) {
24217
+ clearInterval(elementRecheckIntervalId);
24218
+ callback();
24219
+ } else {
24220
+ _this3.target.retry.max_retries = _this3.target.retry.max_retries - 1;
24221
+ // If the element is not found even after max interval, stop checking
24222
+ if (_this3.target.retry.max_retries <= 0) {
24223
+ clearInterval(elementRecheckIntervalId);
24224
+ console.warn("Element with selector:".concat(_this3.target.id, " not found."));
24225
+ }
24226
+ }
24227
+ } else {
24228
+ var isElementVisible = _this3._isElementVisible();
24229
+ if (isElementVisible) {
24230
+ clearInterval(elementRecheckIntervalId);
24231
+ callback();
24232
+ } else {
24233
+ _this3.target.retry.max_retries = _this3.target.retry.max_retries - 1;
24234
+ // If the element is not visible even after max interval, stop checking
24235
+ if (_this3.target.retry.max_retries <= 0) {
24236
+ clearInterval(elementRecheckIntervalId);
24237
+ }
24238
+ }
24239
+ }
24240
+ }, this.target.retry.interval);
24241
+ }
24242
+ }, {
24243
+ key: "_setBadgeStyles",
24244
+ value: function _setBadgeStyles() {
24245
+ var _this$targetElement2;
24246
+ var styles = "\n ".concat(this._gettargetStyles(), "\n ").concat(this._getBadgeContainerStyles(), "\n ").concat(this._getBadgeContentStyles(), "\n ").concat(this._getBadgeContentElementStyles(), "\n ").concat(this._getBadgeAnimationStyles(), "\n ").concat(this._getBadgeScrollStyles(), "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
24247
+ var styleNode = document.createElement("style");
24248
+ styleNode.classList.add("apx-main-styles-".concat(this.configId));
24249
+ styleNode.innerHTML = styles;
24250
+ (_this$targetElement2 = this.targetElement) === null || _this$targetElement2 === void 0 || _this$targetElement2.appendChild(styleNode);
24251
+ }
24252
+ }, {
24253
+ key: "_gettargetStyles",
24254
+ value: function _gettargetStyles() {
24255
+ var targetcontainerstyles = "\n .apx-badge-target-style".concat(this.cssPostFix, "{\n position:relative;\n overflow:initial;\n }");
24256
+ return targetcontainerstyles;
24257
+ }
24258
+ }, {
24259
+ key: "_getBadgeContainerStyles",
24260
+ value: function _getBadgeContainerStyles() {
24261
+ var _this$badge$backgroun, _this$badge, _this$badge2, _this$badge3;
24262
+ var dimensionsForBadgeContainer = "";
24263
+ var widthOfBadge = this.badge.enable_background && this.badge.background.shape.enable_border ? this.badge.background.width + this.badge.background.shape.border.width.left + this.badge.background.shape.border.width.right : 0;
24264
+ var heightOfBadge = this.badge.enable_background && this.badge.background.shape.enable_border ? this.badge.background.height + this.badge.background.shape.border.width.top + this.badge.background.shape.border.width.bottom : 0;
24265
+ dimensionsForBadgeContainer = this.badge.enable_background ? "\n width:".concat(widthOfBadge, "px;\n height:").concat(heightOfBadge, "px;") : "\n width:auto;\n height:auto;";
24266
+ var positionForBadgeContainer = "";
24267
+ var offsetX = this.badge.position.offset.x;
24268
+ var offsetY = this.badge.position.offset.y;
24269
+ // Initialize position variables
24270
+ var topValue = "auto";
24271
+ var bottomValue = "auto";
24272
+ var leftValue = "auto";
24273
+ var rightValue = "auto";
24274
+ var badgeHeightBasedOnShape = this.badge.background.shape.type === "circle" ? this.badge.background.width : this.badge.background.height;
24275
+ switch (this.badge.position.position) {
24276
+ case "top-left":
24277
+ topValue = "-".concat(heightOfBadge / 2, "px");
24278
+ leftValue = "-".concat(widthOfBadge / 2, "px");
24279
+ break;
24280
+ case "top-center":
24281
+ case "top":
24282
+ topValue = "calc(".concat(offsetY, "px - ").concat(badgeHeightBasedOnShape / 2, "px + ").concat(-this.badge.background.shape.border.width.top, "px)");
24283
+ leftValue = "calc(50% - ".concat(this.badge.background.width / 2, "px + ").concat(offsetX, "px + ").concat(-this.badge.background.shape.border.width.left, "px)");
24284
+ break;
24285
+ case "top-right":
24286
+ topValue = "-".concat(heightOfBadge / 2, "px");
24287
+ rightValue = "-".concat(widthOfBadge / 2, "px");
24288
+ break;
24289
+ case "bottom-left":
24290
+ bottomValue = "-".concat(heightOfBadge / 2, "px");
24291
+ leftValue = "-".concat(widthOfBadge / 2, "px");
24292
+ break;
24293
+ case "bottom-center":
24294
+ case "bottom":
24295
+ bottomValue = "calc(".concat(-offsetY, "px - ").concat(badgeHeightBasedOnShape / 2, "px + ").concat(-this.badge.background.shape.border.width.bottom, "px)");
24296
+ leftValue = "calc(50% - ".concat(this.badge.background.width / 2, "px + ").concat(offsetX, "px + ").concat(-this.badge.background.shape.border.width.left, "px)");
24297
+ break;
24298
+ case "bottom-right":
24299
+ bottomValue = "-".concat(heightOfBadge / 2, "px");
24300
+ rightValue = "-".concat(widthOfBadge / 2, "px");
24301
+ break;
24302
+ case "center-left":
24303
+ case "left":
24304
+ topValue = "calc(50% - ".concat(badgeHeightBasedOnShape / 2, "px + ").concat(offsetY, "px + ").concat(-this.badge.background.shape.border.width.top, "px)");
24305
+ leftValue = "calc(".concat(offsetX, "px - ").concat(this.badge.background.width / 2, "px + ").concat(-this.badge.background.shape.border.width.left, "px)");
24306
+ break;
24307
+ case "center-right":
24308
+ case "right":
24309
+ topValue = "calc(50% - ".concat(badgeHeightBasedOnShape / 2, "px + ").concat(offsetY, "px + ").concat(-this.badge.background.shape.border.width.top, "px)");
24310
+ rightValue = "calc(".concat(-offsetX, "px - ").concat(this.badge.background.width / 2, "px + ").concat(-this.badge.background.shape.border.width.right, "px)");
24311
+ break;
24312
+ case "center":
24313
+ default:
24314
+ topValue = "calc(50% - ".concat(badgeHeightBasedOnShape / 2, "px + ").concat(offsetY, "px + ").concat(-this.badge.background.shape.border.width.top, "px)");
24315
+ leftValue = "calc(50% - ".concat(this.badge.background.width / 2, "px + ").concat(offsetX, "px + ").concat(-this.badge.background.shape.border.width.left, "px)");
24316
+ break;
24317
+ }
24318
+
24319
+ // Now set the CSS style string
24320
+ positionForBadgeContainer = "\n top: ".concat(topValue, ";\n bottom: ").concat(bottomValue, ";\n left: ").concat(leftValue, ";\n right: ").concat(rightValue, ";\n -webkit-transform: translate(").concat(offsetX, "px, ").concat(offsetY, "px);\n");
24321
+ var backgroundImageForBadgeContainer = "";
24322
+ if (this.badge.enable_background && this.badge.background.enable_image) {
24323
+ backgroundImageForBadgeContainer = "\n .apxor-badge-container-background-image".concat(this.cssPostFix, "{\n background-image: url('").concat(this.badge.background.image.path, "');\n background-repeat: no-repeat;\n background-size: 100% 100%;\n height: ").concat(this.badge.background.height, "px;\n width: ").concat(this.badge.background.width, "px;\n }");
24324
+ }
24325
+ var gradientForBadgeContainer = "";
24326
+ if (this.badge.enable_background && Object.keys(this.badge.background.shape).length !== 0 && this.badge.background.shape.enable_gradient) {
24327
+ gradientForBadgeContainer = "\n background-image:linear-gradient(".concat(this.badge.background.shape.gradient.direction, ", ").concat(this.badge.background.shape.gradient.colors[0], ", ").concat(this.badge.background.shape.gradient.colors[1], ");\n ");
24328
+ }
24329
+ var shapeOfBadgeContainer = "";
24330
+ if (this.badge.enable_background && (_this$badge$backgroun = this.badge.background) !== null && _this$badge$backgroun !== void 0 && _this$badge$backgroun.shape) {
24331
+ var badgeTypeStyles = "";
24332
+ if (!this.badge.background.enable_image) {
24333
+ if (this.badge.background.shape.type === "circle") {
24334
+ badgeTypeStyles = "\n border:".concat(this.badge.background.shape.border.width.top, "px solid ").concat(this.badge.background.shape.border.color, ";\n border-radius:50%;\n background:").concat(this.badge.background.shape.color, ";");
24335
+ } else if (this.badge.background.shape.type === "rectangle") {
24336
+ badgeTypeStyles = "\n background:".concat(this.badge.background.shape.color, ";\n border-top:").concat(this.badge.background.shape.border.width.top, "px solid ").concat(this.badge.background.shape.border.color, ";\n border-right:").concat(this.badge.background.shape.border.width.right, "px solid ").concat(this.badge.background.shape.border.color, ";\n border-bottom:").concat(this.badge.background.shape.border.width.bottom, "px solid ").concat(this.badge.background.shape.border.color, ";\n border-left:").concat(this.badge.background.shape.border.width.left, "px solid ").concat(this.badge.background.shape.border.color, ";\n border-top-left-radius:").concat(this.badge.background.shape.border.corners.top_left, "px;\n border-top-right-radius:").concat(this.badge.background.shape.border.corners.top_right, "px;\n border-bottom-left-radius:").concat(this.badge.background.shape.border.corners.bottom_left, "px;\n border-bottom-right-radius:").concat(this.badge.background.shape.border.corners.bottom_right, "px;\n ");
24337
+ }
24338
+ }
24339
+ shapeOfBadgeContainer = "\n ".concat(badgeTypeStyles, "\n ");
24340
+ }
24341
+ var shadowForBadgeContainer = "";
24342
+ var rippleBorderRadius = ((_this$badge = this.badge) === null || _this$badge === void 0 || (_this$badge = _this$badge.animation) === null || _this$badge === void 0 ? void 0 : _this$badge.rippleShape) === "circle" ? "50%" : "".concat((_this$badge2 = this.badge) === null || _this$badge2 === void 0 || (_this$badge2 = _this$badge2.animation) === null || _this$badge2 === void 0 ? void 0 : _this$badge2.rippleCornerRadius, "px");
24343
+ if (this.badge.enable_shadow) {
24344
+ shadowForBadgeContainer = "\n box-shadow: ".concat(this.badge.shadow.offset_x, "px ").concat(this.badge.shadow.offset_y, "px ").concat(this.badge.shadow.blur_radius, "px ").concat(this.badge.shadow.spread_radius, "px ").concat(this.badge.shadow.color, ";\n ");
24345
+ }
24346
+ var badgeStyles = "\n .apxor-badge-container-styles-".concat(this.cssPostFix, "{\n position:absolute;\n display:flex;\n align-items:center;\n overflow:hidden;\n ").concat(gradientForBadgeContainer, "\n ").concat(dimensionsForBadgeContainer, "\n ").concat(positionForBadgeContainer, "\n ").concat(shapeOfBadgeContainer, "\n ").concat(shadowForBadgeContainer, "\n z-index:").concat(this.zIndexValue, ";\n text-transform:none;\n }\n .apxor-badge-container-stylesdummy-").concat(this.cssPostFix, "{\n position:absolute;\n display:flex;\n z-index:").concat(this.zIndexValueminusOne, ";\n align-items:center;\n overflow:hidden;\n width:").concat(this.badge.background.width, "px;\n height:").concat(this.badge.background.height, "px;\n ").concat(positionForBadgeContainer, "\n ").concat(shadowForBadgeContainer, "\n text-transform:none;\n background:").concat((_this$badge3 = this.badge) === null || _this$badge3 === void 0 || (_this$badge3 = _this$badge3.animation) === null || _this$badge3 === void 0 ? void 0 : _this$badge3.rippleColor, ";\n border-radius:").concat(rippleBorderRadius, ";\n }\n ").concat(backgroundImageForBadgeContainer);
24347
+ return badgeStyles;
24348
+ }
24349
+ }, {
24350
+ key: "_getBadgeContentStyles",
24351
+ value: function _getBadgeContentStyles() {
24352
+ var contentScrollStyles = "";
24353
+ if (this.badge.enable_auto_scroll) {
24354
+ contentScrollStyles = this.badge.auto_scroll.direction === "to_right" || this.badge.auto_scroll.direction === "to_left" ? "display:flex;\n flex-direction:row;\n " : "";
24355
+ }
24356
+ var badgeContentStyles = "\n .apxor-badge-content-container-".concat(this.cssPostFix, "{\n position:relative;\n width:100%;\n height:100%;\n overflow:hidden;\n ").concat(contentScrollStyles, "\n }");
24357
+ return badgeContentStyles;
24358
+ }
24359
+ }, {
24360
+ key: "_getBadgeContentElementStyles",
24361
+ value: function _getBadgeContentElementStyles() {
24362
+ var _this$badge$backgroun2,
24363
+ _this4 = this;
24364
+ var badgeContentElementsstyles = "";
24365
+ var justifyContentValue = "";
24366
+ if (((_this$badge$backgroun2 = this.badge.background) === null || _this$badge$backgroun2 === void 0 ? void 0 : _this$badge$backgroun2.width) > this.contentWidth) {
24367
+ justifyContentValue = "center";
24368
+ } else {
24369
+ justifyContentValue = "left";
24370
+ }
24371
+ if (this.badge.content.length !== 0) {
24372
+ this.badge.content.forEach(function (content, ind) {
24373
+ badgeContentElementsstyles += "\n .apxor-badge-contentelement-".concat(ind, "-").concat(_this4.cssPostFix, "{\n width:100%;\n height:100%;\n display: flex;\n justify-content:").concat(justifyContentValue, ";\n align-items:center;\n }");
24374
+ if (content.enable_icon) {
24375
+ var marginForIcon = "";
24376
+ if (content.icon.enable_margin) {
24377
+ marginForIcon = "margin:".concat(content.icon.margin.top, "px ").concat(content.icon.margin.right, "px ").concat(content.icon.margin.bottom, "px ").concat(content.icon.margin.left, "px;");
24378
+ }
24379
+ var borderStylesForIcon = "";
24380
+ if (content.icon.enable_border) {
24381
+ borderStylesForIcon = "\n border-radius:".concat(content.icon.border.radius, "%;\n border:").concat(content.icon.border.width, "px ").concat(content.icon.border.style, " ").concat(content.icon.border.color, ";\n ");
24382
+ }
24383
+ badgeContentElementsstyles += "\n .apxor-badge-".concat(ind, "-icon-container").concat(_this4.cssPostFix, "{\n width:auto;\n height:auto;\n display: flex;\n justify-content:center;\n align-items:center;\n }\n .apxor-badge-").concat(ind, "-icon-content").concat(_this4.cssPostFix, " {\n position:relative;\n background:url('").concat(content.icon.path, "') no-repeat center;\n background-size:cover;\n display:inline-block;\n height: ").concat(content.icon.height, "px;\n width: ").concat(content.icon.width, "px;\n ").concat(marginForIcon, "\n ").concat(borderStylesForIcon, "\n }");
24384
+ }
24385
+ if (content.enable_label) {
24386
+ var marginForLabel = "";
24387
+ if (content.label.enable_margin) {
24388
+ marginForLabel = "margin:".concat(content.label.margin.top, "px ").concat(content.label.margin.right, "px ").concat(content.label.margin.bottom, "px ").concat(content.label.margin.left, "px;");
24389
+ }
24390
+ badgeContentElementsstyles += "\n .apxor-badge-".concat(ind, "-label-content-").concat(_this4.cssPostFix, "{\n text-align:").concat(content.label.alignment, ";\n display: flex;\n white-space: nowrap;\n text-overflow: ellipsis;\n align-items:center;\n ").concat(marginForLabel, "\n }\n ");
24391
+ }
24392
+ });
24393
+ }
24394
+ return badgeContentElementsstyles;
24395
+ }
24396
+ }, {
24397
+ key: "_getBadgeAnimationStyles",
24398
+ value: function _getBadgeAnimationStyles() {
24399
+ var animationForBadgeContainer = "";
24400
+ var keyframeForAnimation = "";
24401
+ if (this.badge.enable_animation) {
24402
+ var _this$badge$animation4, _this$badge$animation6, _this$badge$animation8, _this$badge$animation10;
24403
+ if (((_this$badge$animation4 = this.badge.animation) === null || _this$badge$animation4 === void 0 ? void 0 : _this$badge$animation4.type) === "shake") {
24404
+ if (this.badge.animation.intra_count == 0) {
24405
+ animationForBadgeContainer = "\n .apxor-badge-container-styles-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s infinite;\n }");
24406
+ keyframeForAnimation = this.badge.animation.shakeDirection === "horizontal" ? "@keyframes badgeAnimation {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }" : "@keyframes badgeAnimation {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }";
24407
+ } else {
24408
+ var _this$badge$animation5;
24409
+ animationForBadgeContainer = "\n .apxor-badge-container-styles-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s ").concat((_this$badge$animation5 = this.badge.animation) === null || _this$badge$animation5 === void 0 ? void 0 : _this$badge$animation5.intra_count, ";\n }");
24410
+ keyframeForAnimation = this.badge.animation.shakeDirection === "horizontal" ? "@keyframes badgeAnimation {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }" : "@keyframes badgeAnimation {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }";
24411
+ }
24412
+ }
24413
+ if (((_this$badge$animation6 = this.badge.animation) === null || _this$badge$animation6 === void 0 ? void 0 : _this$badge$animation6.type) === "fade") {
24414
+ if (this.badge.animation.intra_count == 0) {
24415
+ animationForBadgeContainer = "\n .apxor-badge-container-styles-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s infinite;\n }");
24416
+ keyframeForAnimation = "\n @keyframes badgeAnimation {\n 0% { opacity:1;}\n 50% { opacity:".concat(this.badge.animation.fade_opacity / 100, ";}\n 100% { opacity:1}\n }");
24417
+ } else {
24418
+ var _this$badge$animation7;
24419
+ animationForBadgeContainer = "\n .apxor-badge-container-styles-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s ").concat((_this$badge$animation7 = this.badge.animation) === null || _this$badge$animation7 === void 0 ? void 0 : _this$badge$animation7.intra_count, ";\n }");
24420
+ keyframeForAnimation = "\n @keyframes badgeAnimation {\n 0% { opacity:1;}\n 50% { opacity:".concat(this.badge.animation.fade_opacity / 100, ";}\n 100% { opacity:1}\n }");
24421
+ }
24422
+ }
24423
+ if (((_this$badge$animation8 = this.badge.animation) === null || _this$badge$animation8 === void 0 ? void 0 : _this$badge$animation8.type) === "ripple") {
24424
+ var rippleAreahalf = this.badge.animation.rippleArea / 2;
24425
+ if (this.badge.animation.intra_count == 0) {
24426
+ animationForBadgeContainer = "\n .apxor-badge-container-stylesdummy-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s ease-in-out;\n animation-iteration-count: infinite;\n \n }");
24427
+ keyframeForAnimation = "\n @keyframes badgeAnimation {\n 0% {\n box-shadow: 0 0 0 0 ".concat(this.badge.animation.rippleColor, ", 0 0 0 0 ").concat(this.badge.animation.rippleColor, ";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(rippleAreahalf, "px ").concat(this.badge.animation.rippleColor, ", 0 0 0 ").concat(this.badge.animation.rippleArea, "px ").concat(this.badge.animation.rippleColor, ";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(this.badge.animation.rippleColor, ", 0 0 0 0 ").concat(this.badge.animation.rippleColor, ";\n } \n }");
24428
+ } else {
24429
+ var _this$badge$animation9;
24430
+ animationForBadgeContainer = "\n .apxor-badge-container-stylesdummy-".concat(this.cssPostFix, "{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s ease-in-out;\n animation-iteration-count: ").concat((_this$badge$animation9 = this.badge.animation) === null || _this$badge$animation9 === void 0 ? void 0 : _this$badge$animation9.intra_count, ";\n }");
24431
+ keyframeForAnimation = "\n @keyframes badgeAnimation {\n 0% {\n box-shadow: 0 0 0 0 ".concat(this.badge.animation.rippleColor, ", 0 0 0 0 ").concat(this.badge.animation.rippleColor, ";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(rippleAreahalf, "px ").concat(this.badge.animation.rippleColor, ", 0 0 0 ").concat(this.badge.animation.rippleArea, "px ").concat(this.badge.animation.rippleColor, ";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(this.badge.animation.rippleColor, ", 0 0 0 0 ").concat(this.badge.animation.rippleColor, ";\n } \n }");
24432
+ }
24433
+ }
24434
+ if (((_this$badge$animation10 = this.badge.animation) === null || _this$badge$animation10 === void 0 ? void 0 : _this$badge$animation10.type) === "shine") {
24435
+ var _this$badge$animation11, _this$badge$animation12, _this$badge$animation13;
24436
+ var transformForMultipleDirection = "";
24437
+ var line1width = (_this$badge$animation11 = this.badge.animation) === null || _this$badge$animation11 === void 0 || (_this$badge$animation11 = _this$badge$animation11.lines[0]) === null || _this$badge$animation11 === void 0 ? void 0 : _this$badge$animation11.width;
24438
+ var line2width = (_this$badge$animation12 = (_this$badge$animation13 = this.badge.animation) === null || _this$badge$animation13 === void 0 || (_this$badge$animation13 = _this$badge$animation13.lines[1]) === null || _this$badge$animation13 === void 0 ? void 0 : _this$badge$animation13.width) !== null && _this$badge$animation12 !== void 0 ? _this$badge$animation12 : 0;
24439
+ var biggestLineWidth = Math.max(line1width, line2width);
24440
+ var animationStartLeft = this.badge.background.width + biggestLineWidth;
24441
+ var lines = this.badge.animation.lines;
24442
+ var lines_length = lines.length;
24443
+ var lines_total_width = 0;
24444
+ var lines_color = this.badge.animation.shineColor;
24445
+ if (lines_length === 1) {
24446
+ lines_total_width = this.badge.animation.lines[0].width;
24447
+ } else {
24448
+ lines_total_width = this.badge.animation.lines_gap + line1width + line2width;
24449
+ }
24450
+ switch (this.badge.animation.shineDirection) {
24451
+ case "to_bottom_right":
24452
+ transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "px;\n transform: skewx(-30deg)\n ");
24453
+ break;
24454
+ case "to_top_right":
24455
+ transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "px;\n transform: skewx(30deg)\n ");
24456
+ break;
24457
+ case "to_top_left":
24458
+ transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;\n transform: skewx(-30deg)\n ");
24459
+ break;
24460
+ case "to_bottom_left":
24461
+ transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;\n transform: skewx(30deg)\n ");
24462
+ break;
24463
+ }
24464
+ if (this.badge.animation.intra_count == 0) {
24465
+ animationForBadgeContainer = "\n .apxor-badge-content-container-".concat(this.cssPostFix, "::before{\n content:'';\n position:absolute;\n background:transparent;\n width:").concat(lines_total_width, "px;\n ").concat(lines_length === 1 ? "border-left: ".concat(line1width, "px solid ").concat(lines_color, ";") : "border-left: ".concat(line1width, "px solid ").concat(lines_color, "; border-right: ").concat(line2width, "px solid ").concat(lines_color, ";"), "\n height:100%;\n z-index:").concat(this.contentZindexValue, ";\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s infinite;\n ").concat(transformForMultipleDirection, ";\n }");
24466
+ } else {
24467
+ var _this$badge$animation14;
24468
+ animationForBadgeContainer = "\n .apxor-badge-content-container-".concat(this.cssPostFix, "::before{\n content:'';\n position:absolute;\n background:transparent;\n width:").concat(lines_total_width, "px;\n ").concat(lines_length === 1 ? "border-left: ".concat(line1width, "px solid ").concat(lines_color, ";") : "border-left: ".concat(line1width, "px solid ").concat(lines_color, "; border-right: ").concat(line2width, "px solid ").concat(lines_color, ";"), "\n height:100%;\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis, "s ").concat((_this$badge$animation14 = this.badge.animation) === null || _this$badge$animation14 === void 0 ? void 0 : _this$badge$animation14.intra_count, ";\n ").concat(transformForMultipleDirection, ";\n }");
24469
+ }
24470
+ keyframeForAnimation = this.badge.animation.shineDirection === "to_bottom_right" || this.badge.animation.shineDirection === "to_top_right" ? "@keyframes badgeAnimation {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }" : "@keyframes badgeAnimation {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }";
24471
+ }
24472
+ }
24473
+ var animationStyles = "\n ".concat(animationForBadgeContainer, "\n ").concat(keyframeForAnimation, "\n ");
24474
+ return animationStyles;
24475
+ }
24476
+ }, {
24477
+ key: "_getBadgeScrollStyles",
24478
+ value: function _getBadgeScrollStyles() {
24479
+ var badgeScrollstyles = "";
24480
+ if (this.badge.enable_auto_scroll) {
24481
+ if (this.badge.auto_scroll.direction === "to_top" || this.badge.auto_scroll.direction === "to_bottom") {
24482
+ badgeScrollstyles = "\n #apxor-scroll-option".concat(this.cssPostFix, "{\n width: inherit;\n height: inherit;\n animation: scrollAnimation ").concat(this.badge.auto_scroll.duration_millis, "s linear infinite;\n }");
24483
+ }
24484
+ if (this.badge.auto_scroll.direction === "to_left" || this.badge.auto_scroll.direction === "to_right") {
24485
+ badgeScrollstyles = "\n #apxor-scroll-option".concat(this.cssPostFix, "{\n width: inherit;\n height: inherit;\n animation: scrollText ").concat(this.badge.auto_scroll.duration_millis, "s linear infinite;\n }");
24486
+ }
24487
+ }
24488
+ return badgeScrollstyles;
24489
+ }
24490
+ }, {
24491
+ key: "_getBadgeScrollKeyFrameStyles",
24492
+ value: function _getBadgeScrollKeyFrameStyles(numberOfElement) {
24493
+ var _this$badge4, _this$badge$enable_au, _this$badge6, _this$targetElement3;
24494
+ var keyFrameStyles = "";
24495
+ var translateValue;
24496
+ var scrollRatio;
24497
+ var translateModifyingValue;
24498
+ scrollRatio = 1;
24499
+ if (((_this$badge4 = this.badge) === null || _this$badge4 === void 0 ? void 0 : _this$badge4.background.width) > this.contentWidth) {
24500
+ translateValue = "100%";
24501
+ } else {
24502
+ var _this$badge5;
24503
+ scrollRatio = this.contentWidth / ((_this$badge5 = this.badge) === null || _this$badge5 === void 0 || (_this$badge5 = _this$badge5.background) === null || _this$badge5 === void 0 ? void 0 : _this$badge5.width);
24504
+ translateModifyingValue = scrollRatio * 100;
24505
+ translateValue = "".concat(translateModifyingValue, "%");
24506
+ }
24507
+ if ((_this$badge$enable_au = !this.badge.enable_auto_scroll) !== null && _this$badge$enable_au !== void 0 ? _this$badge$enable_au : !((_this$badge6 = this.badge) !== null && _this$badge6 !== void 0 && _this$badge6.enable_animation)) {
24508
+ return;
24509
+ }
24510
+ switch (this.badge.auto_scroll.direction) {
24511
+ case "to_bottom":
24512
+ keyFrameStyles = "\n @keyframes scrollAnimation {\n 0% {\n transform: translateY(-".concat(numberOfElement * 100, "%);\n }\n 100% {\n transform: translateY(100%);\n }\n }\n ");
24513
+ break;
24514
+ case "to_top":
24515
+ keyFrameStyles = "\n @keyframes scrollAnimation {\n 0% {\n transform: translateY(100%);\n }\n 100% {\n transform: translateY(-".concat(numberOfElement * 100, "%);\n }\n }\n ");
24516
+ break;
24517
+ case "to_left":
24518
+ keyFrameStyles = "\n @keyframes scrollText {\n from {\n transform: translate3d(100%, 0, 0);\n }\n to {\n transform: translate3d(-".concat(translateValue, ", 0, 0);\n }\n }\n ");
24519
+ break;
24520
+ case "to_right":
24521
+ keyFrameStyles = "\n @keyframes scrollText {\n from {\n transform: translate3d(-".concat(translateValue, ", 0, 0);\n }\n to {\n transform: translate3d(100%, 0, 0);\n }\n }\n ");
24522
+ break;
24523
+ }
24524
+ var keyFrameForScrollAnimation = "\n ".concat(keyFrameStyles, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
24525
+ var styleNode = document.createElement("style");
24526
+ styleNode.innerHTML = keyFrameForScrollAnimation;
24527
+ (_this$targetElement3 = this.targetElement) === null || _this$targetElement3 === void 0 || _this$targetElement3.appendChild(styleNode);
24528
+ }
24529
+ }, {
24530
+ key: "_setBadgeContent",
24531
+ value: function _setBadgeContent() {
24532
+ this.createBadgeContainer();
24533
+ this.createBadgeContent();
24534
+ this.animationStop();
24535
+ }
24536
+ }, {
24537
+ key: "animationStop",
24538
+ value: function animationStop() {
24539
+ var _this$badge$animation15, _this$badge$animation16, _this$badge$animation17, _this$badge$animation18;
24540
+ var badgeContainerClass = ".apxor-badge-container-styles-".concat(this.cssPostFix);
24541
+ var badgeAnimationElement = document.querySelector(badgeContainerClass);
24542
+ var badgeContainerClassdummy = ".apxor-badge-container-stylesdummy-".concat(this.cssPostFix);
24543
+ var badgeAnimationElementdummy = document.querySelector(badgeContainerClassdummy);
24544
+ if (((_this$badge$animation15 = this.badge.animation) === null || _this$badge$animation15 === void 0 ? void 0 : _this$badge$animation15.type) === "shake" && this.badge.animation.intra_count != 0 && this.badge.enable_animation) {
24545
+ badgeAnimationElement.addEventListener("animationend", this.shakeAnimationRepeatFunction);
24546
+ } else if (((_this$badge$animation16 = this.badge.animation) === null || _this$badge$animation16 === void 0 ? void 0 : _this$badge$animation16.type) === "fade" && this.badge.animation.intra_count != 0 && this.badge.enable_animation) {
24547
+ badgeAnimationElement.addEventListener("animationend", this.fadeAnimationRepeatFunction);
24548
+ } else if (((_this$badge$animation17 = this.badge.animation) === null || _this$badge$animation17 === void 0 ? void 0 : _this$badge$animation17.type) === "ripple" && this.badge.animation.intra_count != 0 && this.badge.enable_animation) {
24549
+ badgeAnimationElementdummy.addEventListener("animationend", this.rippleAnimationRepeatFunction);
24550
+ } else if (((_this$badge$animation18 = this.badge.animation) === null || _this$badge$animation18 === void 0 ? void 0 : _this$badge$animation18.type) === "shine" && this.badge.animation.intra_count != 0 && this.badge.enable_animation) {
24551
+ badgeAnimationElement.addEventListener("animationend", this.shineAnimationRepeatFunction);
24552
+ }
24553
+ }
24554
+ }, {
24555
+ key: "shakeAnimationRepeat",
24556
+ value: function shakeAnimationRepeat(interCount, delayMillis) {
24557
+ var _this5 = this;
24558
+ var badgeContainerClass = ".apxor-badge-container-styles-".concat(this.cssPostFix);
24559
+ var badgeAnimationElement = document.querySelector(badgeContainerClass);
24560
+ if (interCount != 0) {
24561
+ if (this.count === interCount) {
24562
+ badgeAnimationElement.removeEventListener("animationend", this.shakeAnimationRepeatFunction);
24563
+ }
24564
+ }
24565
+ var repeatAnimation = function repeatAnimation() {
24566
+ if (_this5.count < interCount) {
24567
+ var _this5$badge$animatio, _this5$targetElement;
24568
+ var animationForBadgeContainernew = "";
24569
+ var keyframeForAnimationnew = "";
24570
+ animationForBadgeContainernew = "\n .apxor-badge-container-styles-".concat(_this5.cssPostFix, "{\n animation: badgeAnimation").concat(_this5.count, " ").concat(_this5.badge.animation.duration_millis, "s ").concat((_this5$badge$animatio = _this5.badge.animation) === null || _this5$badge$animatio === void 0 ? void 0 : _this5$badge$animatio.intra_count, ";\n }");
24571
+ keyframeForAnimationnew = _this5.badge.animation.shakeDirection === "horizontal" ? "@keyframes badgeAnimation".concat(_this5.count, " {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }") : "@keyframes badgeAnimation".concat(_this5.count, " {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }");
24572
+ var animationStyles = "\n ".concat(animationForBadgeContainernew, "\n ").concat(keyframeForAnimationnew, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
24573
+ var newstyleNode = document.createElement("style");
24574
+ newstyleNode.innerHTML = animationStyles;
24575
+ (_this5$targetElement = _this5.targetElement) === null || _this5$targetElement === void 0 || _this5$targetElement.appendChild(newstyleNode);
24576
+ if (_this5.badge.animation.inter_count != 0) {
24577
+ _this5.count = _this5.count + 1;
24578
+ }
24579
+ _this5.animationStop();
24580
+ } else if (interCount == 0) {
24581
+ var _this5$badge$animatio2, _this5$targetElement2;
24582
+ var _animationForBadgeContainernew = "";
24583
+ var _keyframeForAnimationnew = "";
24584
+ _animationForBadgeContainernew = "\n .apxor-badge-container-styles-".concat(_this5.cssPostFix, "{\n animation: badgeAnimation").concat(_this5.c, " ").concat(_this5.badge.animation.duration_millis, "s ").concat((_this5$badge$animatio2 = _this5.badge.animation) === null || _this5$badge$animatio2 === void 0 ? void 0 : _this5$badge$animatio2.intra_count, ";\n }");
24585
+ _keyframeForAnimationnew = _this5.badge.animation.shakeDirection === "horizontal" ? "@keyframes badgeAnimation".concat(_this5.c, " {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }") : "@keyframes badgeAnimation".concat(_this5.c, " {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }");
24586
+ var _animationStyles = "\n ".concat(_animationForBadgeContainernew, "\n ").concat(_keyframeForAnimationnew, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
24587
+ var newstyleNode1 = document.createElement("style");
24588
+ newstyleNode1.innerHTML = _animationStyles;
24589
+ (_this5$targetElement2 = _this5.targetElement) === null || _this5$targetElement2 === void 0 || _this5$targetElement2.appendChild(newstyleNode1);
24590
+ _this5.animationStop();
24591
+ _this5.c = _this5.c + 1;
24592
+ }
24593
+ };
24594
+ setTimeout(repeatAnimation, delayMillis);
24595
+ }
24596
+ }, {
24597
+ key: "fadeAnimationRepeat",
24598
+ value: function fadeAnimationRepeat(interCount, delayMillis) {
24599
+ var _this6 = this;
24600
+ var badgeContainerClass = ".apxor-badge-container-styles-".concat(this.cssPostFix);
24601
+ var badgeAnimationElement = document.querySelector(badgeContainerClass);
24602
+ if (interCount != 0) {
24603
+ if (this.count === interCount) {
24604
+ badgeAnimationElement.removeEventListener("animationend", this.fadeAnimationRepeatFunction);
24605
+ }
24606
+ }
24607
+ var repeatAnimation = function repeatAnimation() {
24608
+ if (_this6.count < interCount) {
24609
+ var _this6$badge$animatio, _this6$targetElement;
24610
+ var animationForBadgeContainernew = "";
24611
+ var keyframeForAnimationnew = "";
24612
+ animationForBadgeContainernew = "\n .apxor-badge-container-styles-".concat(_this6.cssPostFix, "{\n animation: badgeAnimation").concat(_this6.count, " ").concat(_this6.badge.animation.duration_millis, "s ").concat((_this6$badge$animatio = _this6.badge.animation) === null || _this6$badge$animatio === void 0 ? void 0 : _this6$badge$animatio.intra_count, ";\n }");
24613
+ keyframeForAnimationnew = "\n @keyframes badgeAnimation".concat(_this6.count, " {\n 0% { opacity:1;}\n 50% { opacity:").concat(_this6.badge.animation.fade_opacity / 100, ";}\n 100% { opacity:1}\n }");
24614
+ var animationStyles = "\n ".concat(animationForBadgeContainernew, "\n ").concat(keyframeForAnimationnew, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
24615
+ var newstyleNode = document.createElement("style");
24616
+ newstyleNode.innerHTML = animationStyles;
24617
+ (_this6$targetElement = _this6.targetElement) === null || _this6$targetElement === void 0 || _this6$targetElement.appendChild(newstyleNode);
24618
+ if (_this6.badge.animation.inter_count != 0) {
24619
+ _this6.count = _this6.count + 1;
24620
+ }
24621
+ _this6.animationStop();
24622
+ } else if (interCount == 0) {
24623
+ var _this6$badge$animatio2, _this6$targetElement2;
24624
+ var _animationForBadgeContainernew2 = "";
24625
+ var _keyframeForAnimationnew2 = "";
24626
+ _animationForBadgeContainernew2 = "\n .apxor-badge-container-styles-".concat(_this6.cssPostFix, "{\n animation: badgeAnimation").concat(_this6.c, " ").concat(_this6.badge.animation.duration_millis, "s ").concat((_this6$badge$animatio2 = _this6.badge.animation) === null || _this6$badge$animatio2 === void 0 ? void 0 : _this6$badge$animatio2.intra_count, ";\n }");
24627
+ _keyframeForAnimationnew2 = "\n @keyframes badgeAnimation".concat(_this6.c, " {\n 0% { opacity:1;}\n 50% { opacity:").concat(_this6.badge.animation.fade_opacity / 100, ";}\n 100% { opacity:1}\n }");
24628
+ var _animationStyles2 = "\n ".concat(_animationForBadgeContainernew2, "\n ").concat(_keyframeForAnimationnew2, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
24629
+ var _newstyleNode = document.createElement("style");
24630
+ _newstyleNode.innerHTML = _animationStyles2;
24631
+ (_this6$targetElement2 = _this6.targetElement) === null || _this6$targetElement2 === void 0 || _this6$targetElement2.appendChild(_newstyleNode);
24632
+ _this6.c = _this6.c + 1;
24633
+ _this6.animationStop();
24634
+ }
24635
+ };
24636
+ setTimeout(repeatAnimation, delayMillis);
24637
+ }
24638
+ }, {
24639
+ key: "rippleAnimationRepeat",
24640
+ value: function rippleAnimationRepeat(interCount, delayMillis) {
24641
+ var _this7 = this;
24642
+ var badgeContainerClassdummy = ".apxor-badge-container-stylesdummy-".concat(this.cssPostFix);
24643
+ var badgeAnimationElementdummy = document.querySelector(badgeContainerClassdummy);
24644
+ if (interCount != 0) {
24645
+ if (this.count === interCount) {
24646
+ badgeAnimationElementdummy.removeEventListener("animationend", this.rippleAnimationRepeatFunction);
24647
+ }
24648
+ }
24649
+ var repeatAnimation = function repeatAnimation() {
24650
+ var rippleAreahalf = _this7.badge.animation.rippleArea / 2;
24651
+ if (_this7.count < interCount) {
24652
+ var _this7$badge$animatio, _this7$targetElement;
24653
+ var animationForBadgeContainernew = "";
24654
+ var keyframeForAnimationnew = "";
24655
+ animationForBadgeContainernew = "\n .apxor-badge-container-stylesdummy-".concat(_this7.cssPostFix, "{\n animation: badgeAnimation").concat(_this7.count, " ").concat(_this7.badge.animation.duration_millis, "s ease-in-out;\n animation-iteration-count: ").concat((_this7$badge$animatio = _this7.badge.animation) === null || _this7$badge$animatio === void 0 ? void 0 : _this7$badge$animatio.intra_count, ";\n opacity:1;\n }");
24656
+ keyframeForAnimationnew = "\n @keyframes badgeAnimation".concat(_this7.count, " {\n 0% {\n box-shadow: 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(rippleAreahalf, "px ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 ").concat(_this7.badge.animation.rippleArea, "px ").concat(_this7.badge.animation.rippleColor, ";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ";\n } \n }");
24657
+ var animationStyles = "\n ".concat(animationForBadgeContainernew, "\n ").concat(keyframeForAnimationnew, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
24658
+ var newstyleNode = document.createElement("style");
24659
+ newstyleNode.innerHTML = animationStyles;
24660
+ (_this7$targetElement = _this7.targetElement) === null || _this7$targetElement === void 0 || _this7$targetElement.appendChild(newstyleNode);
24661
+ if (_this7.badge.animation.inter_count != 0) {
24662
+ _this7.count = _this7.count + 1;
24663
+ }
24664
+ _this7.animationStop();
24665
+ } else if (interCount == 0) {
24666
+ var _this7$badge$animatio2, _this7$targetElement2;
24667
+ var _animationForBadgeContainernew3 = "";
24668
+ var _keyframeForAnimationnew3 = "";
24669
+ _animationForBadgeContainernew3 = "\n .apxor-badge-container-stylesdummy-".concat(_this7.cssPostFix, "{\n animation: badgeAnimation").concat(_this7.c, " ").concat(_this7.badge.animation.duration_millis, "s ease-in-out;\n animation-iteration-count: ").concat((_this7$badge$animatio2 = _this7.badge.animation) === null || _this7$badge$animatio2 === void 0 ? void 0 : _this7$badge$animatio2.intra_count, ";\n }");
24670
+ _keyframeForAnimationnew3 = "\n @keyframes badgeAnimation".concat(_this7.c, " {\n 0% {\n box-shadow: 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(rippleAreahalf, "px ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 ").concat(_this7.badge.animation.rippleArea, "px ").concat(_this7.badge.animation.rippleColor, ";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ", 0 0 0 0 ").concat(_this7.badge.animation.rippleColor, ";\n } \n }");
24671
+ var _animationStyles3 = "\n ".concat(_animationForBadgeContainernew3, "\n ").concat(_keyframeForAnimationnew3, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
24672
+ var _newstyleNode2 = document.createElement("style");
24673
+ _newstyleNode2.innerHTML = _animationStyles3;
24674
+ (_this7$targetElement2 = _this7.targetElement) === null || _this7$targetElement2 === void 0 || _this7$targetElement2.appendChild(_newstyleNode2);
24675
+ _this7.c = _this7.c + 1;
24676
+ _this7.animationStop();
24677
+ }
24678
+ };
24679
+ setTimeout(repeatAnimation, delayMillis);
24680
+ }
24681
+ }, {
24682
+ key: "shineAnimationRepeat",
24683
+ value: function shineAnimationRepeat(interCount, delayMillis) {
24684
+ var _this$badge$animation19,
24685
+ _this$badge$animation20,
24686
+ _this8 = this;
24687
+ var line1width = (_this$badge$animation19 = this.badge.animation) === null || _this$badge$animation19 === void 0 || (_this$badge$animation19 = _this$badge$animation19.lines[0]) === null || _this$badge$animation19 === void 0 ? void 0 : _this$badge$animation19.width;
24688
+ var line2width = (_this$badge$animation20 = this.badge.animation) === null || _this$badge$animation20 === void 0 || (_this$badge$animation20 = _this$badge$animation20.lines[1]) === null || _this$badge$animation20 === void 0 ? void 0 : _this$badge$animation20.width;
24689
+ var biggestLineWidth = Math.max(line1width, line2width);
24690
+ var animationStartLeft = this.badge.background.width + biggestLineWidth;
24691
+ var badgeContainerClass = ".apxor-badge-container-styles-".concat(this.cssPostFix);
24692
+ var badgeAnimationElement = document.querySelector(badgeContainerClass);
24693
+ if (interCount != 0) {
24694
+ if (this.count === interCount) {
24695
+ badgeAnimationElement.removeEventListener("animationend", this.shineAnimationRepeatFunction);
24696
+ }
24697
+ }
24698
+ var repeatAnimation = function repeatAnimation() {
24699
+ var _this8$badge$animatio, _this8$badge$animatio2;
24700
+ var lines_length = _this8.badge.animation.lines.length;
24701
+ var lines_total_width = 0;
24702
+ var lines_color = _this8.badge.animation.shineColor;
24703
+ var line1width = (_this8$badge$animatio = _this8.badge.animation) === null || _this8$badge$animatio === void 0 || (_this8$badge$animatio = _this8$badge$animatio.lines[0]) === null || _this8$badge$animatio === void 0 ? void 0 : _this8$badge$animatio.width;
24704
+ var line2width = (_this8$badge$animatio2 = _this8.badge.animation) === null || _this8$badge$animatio2 === void 0 || (_this8$badge$animatio2 = _this8$badge$animatio2.lines[1]) === null || _this8$badge$animatio2 === void 0 ? void 0 : _this8$badge$animatio2.width;
24705
+ if (lines_length === 1) {
24706
+ lines_total_width = _this8.badge.animation.lines[0].width;
24707
+ } else {
24708
+ lines_total_width = _this8.badge.animation.lines_gap + line1width + line2width;
24709
+ }
24710
+ if (_this8.count < interCount) {
24711
+ var _this8$badge$animatio3, _this8$targetElement;
24712
+ var animationForBadgeContainernew = "";
24713
+ var keyframeForAnimationnew = "";
24714
+ var transformForMultipleDirection = "";
24715
+ switch (_this8.badge.animation.shineDirection) {
24716
+ case "to_bottom_right":
24717
+ transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "px;\n transform: skewx(-30deg)\n ");
24718
+ break;
24719
+ case "to_top_right":
24720
+ transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "pxx;\n transform: skewx(30deg)\n ");
24721
+ break;
24722
+ case "to_top_left":
24723
+ transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;\n transform: skewx(-30deg)\n ");
24724
+ break;
24725
+ case "to_bottom_left":
24726
+ transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;\n transform: skewx(30deg)\n ");
24727
+ break;
24728
+ }
24729
+ animationForBadgeContainernew = "\n .apxor-badge-content-container-".concat(_this8.cssPostFix, "::before{\n content:'';\n position:absolute;\n background:transparent;\n background:transparent;\n z-index:").concat(_this8.contentZindexValue, ";\n width:").concat(lines_total_width, "px;\n ").concat(lines_length === 1 ? "border-left: ".concat(line1width, "px solid ").concat(lines_color, ";") : "border-left: ".concat(line1width, "px solid ").concat(lines_color, "; border-right: ").concat(line2width, "px solid ").concat(lines_color, ";"), "\n height:100%;\n animation: badgeAnimation").concat(_this8.count, " ").concat(_this8.badge.animation.duration_millis, "s ").concat((_this8$badge$animatio3 = _this8.badge.animation) === null || _this8$badge$animatio3 === void 0 ? void 0 : _this8$badge$animatio3.intra_count, ";\n ").concat(transformForMultipleDirection, ";\n }");
24730
+ keyframeForAnimationnew = _this8.badge.animation.shineDirection === "to_bottom_right" || _this8.badge.animation.shineDirection === "to_top_right" ? "@keyframes badgeAnimation".concat(_this8.count, " {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }") : "@keyframes badgeAnimation".concat(_this8.count, " {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }");
24731
+ var animationStyles = "\n ".concat(animationForBadgeContainernew, "\n ").concat(keyframeForAnimationnew, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
24732
+ var newstyleNode = document.createElement("style");
24733
+ newstyleNode.innerHTML = animationStyles;
24734
+ (_this8$targetElement = _this8.targetElement) === null || _this8$targetElement === void 0 || _this8$targetElement.appendChild(newstyleNode);
24735
+ if (_this8.badge.animation.inter_count != 0) {
24736
+ _this8.count = _this8.count + 1;
24737
+ }
24738
+ _this8.animationStop();
24739
+ } else if (interCount == 0) {
24740
+ var _this8$badge$animatio4, _this8$targetElement2;
24741
+ var _animationForBadgeContainernew4 = "";
24742
+ var _keyframeForAnimationnew4 = "";
24743
+ var _transformForMultipleDirection = "";
24744
+ switch (_this8.badge.animation.shineDirection) {
24745
+ case "to_bottom_right":
24746
+ _transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "px;;\n transform: skewx(-30deg)\n ");
24747
+ break;
24748
+ case "to_top_right":
24749
+ _transformForMultipleDirection = "\n left:-".concat(animationStartLeft, "px;;\n transform: skewx(30deg)\n ");
24750
+ break;
24751
+ case "to_top_left":
24752
+ _transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;;\n transform: skewx(-30deg)\n ");
24753
+ break;
24754
+ case "to_bottom_left":
24755
+ _transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;;\n transform: skewx(30deg)\n ");
24756
+ break;
24757
+ }
24758
+ _animationForBadgeContainernew4 = "\n .apxor-badge-content-container-".concat(_this8.cssPostFix, "::before{\n content:'';\n position:absolute;\n background:transparent;\n background:transparent;\n width:").concat(lines_total_width, "px;\n ").concat(lines_length === 1 ? "border-left: ".concat(line1width, "px solid ").concat(lines_color, ";") : "border-left: ".concat(line1width, "px solid ").concat(lines_color, "; border-right: ").concat(line2width, "px solid ").concat(lines_color, ";"), "\n height:100%;\n animation: badgeAnimation").concat(_this8.c, " ").concat(_this8.badge.animation.duration_millis, "s ").concat((_this8$badge$animatio4 = _this8.badge.animation) === null || _this8$badge$animatio4 === void 0 ? void 0 : _this8$badge$animatio4.intra_count, ";\n ").concat(_transformForMultipleDirection, ";\n }");
24759
+ _keyframeForAnimationnew4 = _this8.badge.animation.shineDirection === "to_bottom_right" || _this8.badge.animation.shineDirection === "to_top_right" ? "@keyframes badgeAnimation".concat(_this8.c, " {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }") : "@keyframes badgeAnimation".concat(_this8.c, " {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }");
24760
+ var _animationStyles4 = "\n ".concat(_animationForBadgeContainernew4, "\n ").concat(_keyframeForAnimationnew4, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
24761
+ var _newstyleNode3 = document.createElement("style");
24762
+ _newstyleNode3.innerHTML = _animationStyles4;
24763
+ (_this8$targetElement2 = _this8.targetElement) === null || _this8$targetElement2 === void 0 || _this8$targetElement2.appendChild(_newstyleNode3);
24764
+ _this8.c = _this8.c + 1;
24765
+ _this8.animationStop();
24766
+ }
24767
+ };
24768
+ setTimeout(repeatAnimation, delayMillis);
24769
+ }
24770
+ }, {
24771
+ key: "createBadgeContainer",
24772
+ value: function createBadgeContainer() {
24773
+ this.badgeContainer = document.createElement("div");
24774
+ this.badgeDummyContainer = document.createElement("div");
24775
+ this.badgeContainer.id = "apxor-badge-container-".concat("-".concat(this.configId).replaceAll(" ", "").replace(/[^\w\s]/gi, ""));
24776
+ this.badgeContainer.classList.add("apxor-badge-container");
24777
+ this.badgeContainer.classList.add("apxor-badge-container-styles-".concat(this.cssPostFix));
24778
+ this.badgeDummyContainer.classList.add("apxor-badge-container");
24779
+ if (this.badge.enable_animation) {
24780
+ this.badgeDummyContainer.classList.add("apxor-badge-container-stylesdummy-".concat(this.cssPostFix));
24781
+ }
24782
+ if (this.badge.enable_background && this.badge.background.enable_image) {
24783
+ this.badgeContainer.classList.add("apxor-badge-container-background-image".concat(this.cssPostFix));
24784
+ }
24785
+ this.targetElement.appendChild(this.badgeContainer);
24786
+ this.targetElement.appendChild(this.badgeDummyContainer);
24787
+ }
24788
+ }, {
24789
+ key: "createBadgeContent",
24790
+ value: function createBadgeContent() {
24791
+ var _this$badge7,
24792
+ _this9 = this;
24793
+ this.badgeContent = document.createElement("div");
24794
+ this.badgeContent.classList.add("apxor-badge-content-container-".concat(this.cssPostFix));
24795
+ if ((_this$badge7 = this.badge) !== null && _this$badge7 !== void 0 && _this$badge7.content && this.badge.content.length !== 0) {
24796
+ this.badge.content.forEach(function (content, ind) {
24797
+ var _content$icon, _content$icon2;
24798
+ _this9.badgeContentElement = document.createElement("div");
24799
+ _this9.badgeContentElement.classList.add("apxor-badge-contentelement-".concat(ind, "-").concat(_this9.cssPostFix));
24800
+ _this9.badgeContentElement.setAttribute("id", "apxor-scroll-option".concat(_this9.cssPostFix));
24801
+ if (content.enable_icon && (_content$icon = content.icon) !== null && _content$icon !== void 0 && _content$icon.position && content.icon.position === "left") {
24802
+ var iconContainer = document.createElement("div");
24803
+ iconContainer.classList.add("apxor-badge-".concat(ind, "-icon-container").concat(_this9.cssPostFix));
24804
+ var iconElement = document.createElement("div");
24805
+ iconElement.classList.add("apxor-badge-".concat(ind, "-icon-content").concat(_this9.cssPostFix));
24806
+ iconContainer.appendChild(iconElement);
24807
+ _this9.iconElementdummy = iconContainer;
24808
+ _this9.badgeContentElement.appendChild(iconContainer);
24809
+ }
24810
+ if (content.enable_label) {
24811
+ var labelElement = document.createElement("div");
24812
+ labelElement.classList.add("apxor-badge-".concat(ind, "-label-content-").concat(_this9.cssPostFix));
24813
+ labelElement.appendChild(createNewTextElement(content.label, _this9.configId, "label-content-".concat(ind)));
24814
+ _this9.labelElementDummy = labelElement;
24815
+ _this9.badgeContentElement.appendChild(labelElement);
24816
+ }
24817
+ if (content.enable_icon && (_content$icon2 = content.icon) !== null && _content$icon2 !== void 0 && _content$icon2.position && content.icon.position === "right") {
24818
+ var _iconContainer = document.createElement("div");
24819
+ _iconContainer.classList.add("apxor-badge-".concat(ind, "-icon-container").concat(_this9.cssPostFix));
24820
+ var _iconElement = document.createElement("div");
24821
+ _iconElement.classList.add("apxor-badge-".concat(ind, "-icon-content").concat(_this9.cssPostFix));
24822
+ _iconContainer.appendChild(_iconElement);
24823
+ _this9.iconElementdummy = _iconContainer;
24824
+ _this9.badgeContentElement.appendChild(_iconContainer);
24825
+ }
24826
+ if (_this9.badge.enable_auto_scroll === true && ind == 0 && (_this9.badge.auto_scroll.direction === "to_left" || _this9.badge.auto_scroll.direction === "to_right")) {
24827
+ _this9.badgeContent.appendChild(_this9.badgeContentElement);
24828
+ } else {
24829
+ if (_this9.badge.enable_auto_scroll === true && ind === 0) {
24830
+ _this9.badgeContent.appendChild(_this9.badgeContentElement);
24831
+ } else if (_this9.badge.enable_auto_scroll === true && (_this9.badge.auto_scroll.direction === "to_top" || _this9.badge.auto_scroll.direction === "to_bottom")) {
24832
+ _this9.badgeContent.appendChild(_this9.badgeContentElement);
24833
+ } else if (_this9.badge.enable_auto_scroll === false) {
24834
+ _this9.badgeContent.appendChild(_this9.badgeContentElement);
24835
+ }
24836
+ }
24837
+ });
24838
+ this.badgeContainer.appendChild(this.badgeContent);
24839
+ if (this.badge.content[0].enable_label) {
24840
+ this.contentLabelWidth = this.labelElementDummy.getBoundingClientRect().width;
24841
+ }
24842
+ if (this.badge.content[0].enable_icon) {
24843
+ var _this$iconElementdumm;
24844
+ this.contentIconWidth = (_this$iconElementdumm = this.iconElementdummy) === null || _this$iconElementdumm === void 0 ? void 0 : _this$iconElementdumm.getBoundingClientRect().width;
24845
+ }
24846
+ this.contentWidth = this.contentLabelWidth + this.contentIconWidth;
24847
+ this._getBadgeScrollKeyFrameStyles(this.badge.content.length);
24848
+ }
24849
+ var contentElement = document.querySelector(".apxor-badge-contentelement-0-".concat(this.cssPostFix));
24850
+ if (this.badge.background.width > this.contentWidth) {
24851
+ contentElement.style.justifyContent = "center";
24852
+ } else {
24853
+ contentElement.style.justifyContent = "left";
24854
+ }
24855
+ }
24856
+ }, {
24857
+ key: "_setOnClickTerminationForBadges",
24858
+ value: function _setOnClickTerminationForBadges() {
24859
+ var _this$terminationConf,
24860
+ _this$terminationConf2,
24861
+ _this10 = this;
24862
+ if ((_this$terminationConf = this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.enable_touch && Object(this.terminationConfig.touch).length !== 0 && this.terminationConfig.touch.enable_user_interaction && (_this$terminationConf2 = this.terminationConfig.touch) !== null && _this$terminationConf2 !== void 0 && _this$terminationConf2.target_view) {
24863
+ var onclickCallBack = function onclickCallBack() {
24864
+ var _window$Apxor, _this10$targetElement;
24865
+ var badge = document.getElementsByClassName("apxor-badge-container-styles-".concat(_this10.cssPostFix));
24866
+ while (badge.length > 0) badge[0].remove();
24867
+ (_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 || _window$Apxor.updateBadgeStatus("target_click", _this10.configId);
24868
+ _this10.targetClicked = true;
24869
+ (_this10$targetElement = _this10.targetElement) === null || _this10$targetElement === void 0 || _this10$targetElement.classList.remove("apx-badge-target-style".concat(_this10.cssPostFix));
24870
+ window.Apxor.logAppEvent("InlineTargetViewClicked", {
24871
+ id: _this10.configId,
24872
+ message_name: _this10.name,
24873
+ apx_message_step: 1
24874
+ });
24875
+ window.Apxor.logAppEvent("inline_dismissed", {
24876
+ id: _this10.configId,
24877
+ message_name: _this10.name,
24878
+ apx_reason: "InlineTargetViewClicked"
24879
+ });
24880
+ _this10.targetElement.removeEventListener("click", onclickCallBack);
24881
+ };
24882
+ this.targetElement.addEventListener("click", onclickCallBack);
24883
+ }
24884
+ }
24885
+ }]);
24886
+ return ApxorBadge;
24887
+ }();
24888
+ var DOMNodePathStep = function DOMNodePathStep(value, optimized) {
24889
+ this.value = value;
24890
+ this.optimized = optimized || false;
24891
+ };
24892
+ DOMNodePathStep.prototype = {
24893
+ toString: function toString() {
24894
+ return this.value;
24895
+ }
24896
+ };
24897
+
23478
24898
  var RTM = /*#__PURE__*/_createClass(function RTM() {
23479
24899
  var _this = this;
23480
24900
  _classCallCheck(this, RTM);
23481
- _defineProperty(this, "apjN", {});
24901
+ _defineProperty(this, "yQZE", {});
23482
24902
  _defineProperty(this, "isShowingAction", false);
23483
24903
  _defineProperty(this, "currentAction", null);
23484
- _defineProperty(this, "GnDZ", null);
23485
- _defineProperty(this, "version", 82);
24904
+ _defineProperty(this, "XHla", null);
24905
+ _defineProperty(this, "version", 90);
23486
24906
  _defineProperty(this, "isInitialised", false);
23487
- _defineProperty(this, "ErUd", {});
23488
- _defineProperty(this, "yqfs", false);
24907
+ _defineProperty(this, "gGQU", {});
24908
+ _defineProperty(this, "AvTU", false);
23489
24909
  _defineProperty(this, "_isShownECCalled", false);
23490
- _defineProperty(this, "PutJ", function () {
24910
+ _defineProperty(this, "KJyT", function () {
23491
24911
  _this.isInitialised = true;
23492
24912
  var oldPushState = history.pushState;
23493
24913
  history.pushState = function pushState() {
@@ -23511,19 +24931,19 @@
23511
24931
  });
23512
24932
  });
23513
24933
  _defineProperty(this, "show", function (uiJson, duration, uuid, name) {
24934
+ var _window;
24935
+ (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("logger show");
23514
24936
  if (!_this.isInitialised) {
23515
- _this.PutJ();
24937
+ _this.KJyT();
23516
24938
  }
23517
24939
  window.addEventListener("pagehide", function () {
23518
24940
  var _window$Apxor, _window$Apxor$pageUnl;
23519
24941
  (_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 || (_window$Apxor$pageUnl = _window$Apxor.pageUnloaded) === null || _window$Apxor$pageUnl === void 0 || _window$Apxor$pageUnl.call(_window$Apxor, uuid);
23520
24942
  });
23521
24943
  try {
23522
- // console.log("Showing action for uuid:", uuid, uiJson, this.currentAction);
23523
24944
  if (_this.currentAction !== null && _this.currentAction !== undefined) {
23524
- var _window;
23525
- console.error("An action already being shown");
23526
- (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("An action already being shown");
24945
+ var _window2;
24946
+ (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.ApxorLogger) === null || _window2 === void 0 || _window2.error("An action already being shown");
23527
24947
  return;
23528
24948
  }
23529
24949
  uiJson = uiJson.split("\n").join("\\n");
@@ -23539,7 +24959,7 @@
23539
24959
  } else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
23540
24960
  _this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
23541
24961
  } else if (ui_config.display_type === "coach_mark_v2") {
23542
- _this.lzVw(ui_config, duration, uuid, name);
24962
+ _this.FKRN(ui_config, duration, uuid, name);
23543
24963
  } else {
23544
24964
  showCoachmarkWithDelay(_this, ui_config, {
23545
24965
  configId: uuid,
@@ -23547,21 +24967,21 @@
23547
24967
  }, terminationConfig, function () {
23548
24968
  _this.isShowingAction = true;
23549
24969
  if (window.Apxor && window.Apxor.logActionEvent) {
23550
- var _window2, _window2$updateFlag, _window3, _window3$updateCount;
23551
- (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || (_window2$updateFlag = _window2.updateFlag) === null || _window2$updateFlag === void 0 || _window2$updateFlag.call(_window2, true);
24970
+ var _window3, _window3$updateFlag, _window4, _window4$updateCount;
24971
+ (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || (_window3$updateFlag = _window3.updateFlag) === null || _window3$updateFlag === void 0 || _window3$updateFlag.call(_window3, true);
23552
24972
  window.Apxor.logActionEvent("inline_shown", uuid, name);
23553
- (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || (_window3$updateCount = _window3.updateCount) === null || _window3$updateCount === void 0 || _window3$updateCount.call(_window3, uuid);
24973
+ (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || (_window4$updateCount = _window4.updateCount) === null || _window4$updateCount === void 0 || _window4$updateCount.call(_window4, uuid);
23554
24974
  if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
23555
24975
  setTimeout(function () {
23556
- var _window4, _window4$logInternalE;
23557
- (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || (_window4$logInternalE = _window4.logInternalEvent) === null || _window4$logInternalE === void 0 || _window4$logInternalE.call(_window4, "capt");
24976
+ var _window5, _window5$logInternalE;
24977
+ (_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || (_window5$logInternalE = _window5.logInternalEvent) === null || _window5$logInternalE === void 0 || _window5$logInternalE.call(_window5, "capt");
23558
24978
  }, 500);
23559
24979
  }
23560
24980
  }
23561
24981
  }, function (action) {
23562
- var _window5, _window5$updateFlag;
24982
+ var _window6, _window6$updateFlag;
23563
24983
  _this.isShowingAction = false;
23564
- (_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || (_window5$updateFlag = _window5.updateFlag) === null || _window5$updateFlag === void 0 || _window5$updateFlag.call(_window5, false);
24984
+ (_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || (_window6$updateFlag = _window6.updateFlag) === null || _window6$updateFlag === void 0 || _window6$updateFlag.call(_window6, false);
23565
24985
  _this.currentAction = null;
23566
24986
  if (window.Apxor && window.Apxor.logActionEvent && !(isDefined(action) && (action === "redirect" || action === "cancel"))) {
23567
24987
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -23571,12 +24991,27 @@
23571
24991
  });
23572
24992
  }
23573
24993
  } catch (e) {
23574
- var _window6, _window6$updateFlag, _window7;
24994
+ var _window7, _window7$updateFlag, _window8;
23575
24995
  _this.isShowingAction = false;
23576
- (_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || (_window6$updateFlag = _window6.updateFlag) === null || _window6$updateFlag === void 0 || _window6$updateFlag.call(_window6, false);
23577
- console.error(e);
23578
- (_window7 = window) === null || _window7 === void 0 || (_window7 = _window7.ApxorLogger) === null || _window7 === void 0 || _window7.error("".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
24996
+ (_window7 = window) === null || _window7 === void 0 || (_window7 = _window7.Apxor) === null || _window7 === void 0 || (_window7$updateFlag = _window7.updateFlag) === null || _window7$updateFlag === void 0 || _window7$updateFlag.call(_window7, false);
24997
+ (_window8 = window) === null || _window8 === void 0 || (_window8 = _window8.ApxorLogger) === null || _window8 === void 0 || _window8.error("".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
24998
+ }
24999
+ });
25000
+ _defineProperty(this, "showBadge", function (uiJson, duration, uuid, name, terminationConfig) {
25001
+ if (!_this.isInitialised) {
25002
+ _this.KJyT();
25003
+ }
25004
+ window.addEventListener("pagehide", function () {
25005
+ var _window$Apxor2, _window$Apxor2$pageUn;
25006
+ (_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 || (_window$Apxor2$pageUn = _window$Apxor2.pageUnloaded) === null || _window$Apxor2$pageUn === void 0 || _window$Apxor2$pageUn.call(_window$Apxor2, uuid);
25007
+ });
25008
+ uiJson = uiJson.split("\n").join("\\n");
25009
+ var ui_config = JSON.parse(uiJson);
25010
+ if (name === "P" || name === "p") {
25011
+ _this.removeBadge(name, uuid);
23579
25012
  }
25013
+ var termination_config = JSON.parse(terminationConfig);
25014
+ _this.Ipuh(ui_config, duration, uuid, name, termination_config);
23580
25015
  });
23581
25016
  _defineProperty(this, "showInApp", function (config, duration, configId, name) {
23582
25017
  try {
@@ -23587,16 +25022,16 @@
23587
25022
  _this.createInAppModal(config, duration, configId, name, JSON.parse(config).action_class === "inapp_builder" ? "inapp_builder" : "modal");
23588
25023
  }
23589
25024
  } catch (e) {
23590
- var _window$Apxor2, _window10;
23591
- if (((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios") {
23592
- var _window8, _window8$updateFlag;
23593
- (_window8 = window) === null || _window8 === void 0 || (_window8 = _window8.Apxor) === null || _window8 === void 0 || (_window8$updateFlag = _window8.updateFlag) === null || _window8$updateFlag === void 0 || _window8$updateFlag.call(_window8, false, "IN_APP");
23594
- } else {
25025
+ var _window$Apxor3, _window11;
25026
+ if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
23595
25027
  var _window9, _window9$updateFlag;
23596
- (_window9 = window) === null || _window9 === void 0 || (_window9 = _window9.Apxor) === null || _window9 === void 0 || (_window9$updateFlag = _window9.updateFlag) === null || _window9$updateFlag === void 0 || _window9$updateFlag.call(_window9, "IN_APP", false);
25028
+ (_window9 = window) === null || _window9 === void 0 || (_window9 = _window9.Apxor) === null || _window9 === void 0 || (_window9$updateFlag = _window9.updateFlag) === null || _window9$updateFlag === void 0 || _window9$updateFlag.call(_window9, false, "IN_APP");
25029
+ } else {
25030
+ var _window10, _window10$updateFlag;
25031
+ (_window10 = window) === null || _window10 === void 0 || (_window10 = _window10.Apxor) === null || _window10 === void 0 || (_window10$updateFlag = _window10.updateFlag) === null || _window10$updateFlag === void 0 || _window10$updateFlag.call(_window10, "IN_APP", false);
23597
25032
  }
23598
25033
  console.error(e);
23599
- (_window10 = window) === null || _window10 === void 0 || (_window10 = _window10.ApxorLogger) === null || _window10 === void 0 || _window10.error("".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
25034
+ (_window11 = window) === null || _window11 === void 0 || (_window11 = _window11.ApxorLogger) === null || _window11 === void 0 || _window11.error("".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
23600
25035
  }
23601
25036
  });
23602
25037
  _defineProperty(this, "showEmbedCards", function (config, duration, configId, name) {
@@ -23608,7 +25043,7 @@
23608
25043
  var ui_config = JSON.parse(config);
23609
25044
  _this.createembedCards(ui_config, configId, name);
23610
25045
  } catch (e) {
23611
- var _window$ApxorRTM, _window11;
25046
+ var _window$ApxorRTM, _window12;
23612
25047
  (_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 || _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
23613
25048
  campaignName: name,
23614
25049
  id: configId,
@@ -23617,13 +25052,13 @@
23617
25052
  apx_reason: "".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message)
23618
25053
  });
23619
25054
  console.error(e);
23620
- (_window11 = window) === null || _window11 === void 0 || (_window11 = _window11.ApxorLogger) === null || _window11 === void 0 || _window11.error("".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
25055
+ (_window12 = window) === null || _window12 === void 0 || (_window12 = _window12.ApxorLogger) === null || _window12 === void 0 || _window12.error("".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
23621
25056
  }
23622
25057
  });
23623
25058
  _defineProperty(this, "createembedCards", function (config, configId, name) {
23624
25059
  var cardsContainer = new EmbedCards(config, configId, name, function () {
23625
- var _window12, _window$ApxorRTM2;
23626
- (_window12 = window) === null || _window12 === void 0 || (_window12 = _window12.ApxorLogger) === null || _window12 === void 0 || _window12.debug("successfully showing the nudge");
25060
+ var _window13, _window$ApxorRTM2;
25061
+ (_window13 = window) === null || _window13 === void 0 || (_window13 = _window13.ApxorLogger) === null || _window13 === void 0 || _window13.debug("successfully showing the nudge");
23627
25062
  (config === null || config === void 0 ? void 0 : config.initialRender) && ((_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 ? void 0 : _window$ApxorRTM2.logEvent("apx_nudge_shown", {
23628
25063
  campaignName: name,
23629
25064
  id: configId,
@@ -23631,8 +25066,8 @@
23631
25066
  }));
23632
25067
  _this._isShownECCalled = true;
23633
25068
  }, function () {
23634
- var _window13;
23635
- (_window13 = window) === null || _window13 === void 0 || (_window13 = _window13.ApxorLogger) === null || _window13 === void 0 || _window13.debug("nudge dismissed");
25069
+ var _window14;
25070
+ (_window14 = window) === null || _window14 === void 0 || (_window14 = _window14.ApxorLogger) === null || _window14 === void 0 || _window14.debug("nudge dismissed");
23636
25071
  });
23637
25072
  cardsContainer.showEmbedCards();
23638
25073
  });
@@ -23640,21 +25075,21 @@
23640
25075
  try {
23641
25076
  config = config.split("\n").join("\\n");
23642
25077
  var ui_config = JSON.parse(config);
23643
- _this.zxjU(ui_config, configId, name, position, slidesSeenCount, view_id);
25078
+ _this.dOEQ(ui_config, configId, name, position, slidesSeenCount, view_id);
23644
25079
  } catch (e) {
23645
- var _window$Apxor3;
23646
- if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
23647
- var _window14, _window14$logInternal, _window15, _window15$updateFlag;
23648
- (_window14 = window) === null || _window14 === void 0 || (_window14 = _window14.Apxor) === null || _window14 === void 0 || (_window14$logInternal = _window14.logInternalEvent) === null || _window14$logInternal === void 0 || _window14$logInternal.call(_window14, "story_slides_closed");
23649
- (_window15 = window) === null || _window15 === void 0 || (_window15 = _window15.Apxor) === null || _window15 === void 0 || (_window15$updateFlag = _window15.updateFlag) === null || _window15$updateFlag === void 0 || _window15$updateFlag.call(_window15, false, "IN_APP");
25080
+ var _window$Apxor4;
25081
+ if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
25082
+ var _window15, _window15$logInternal, _window16, _window16$updateFlag;
25083
+ (_window15 = window) === null || _window15 === void 0 || (_window15 = _window15.Apxor) === null || _window15 === void 0 || (_window15$logInternal = _window15.logInternalEvent) === null || _window15$logInternal === void 0 || _window15$logInternal.call(_window15, "story_slides_closed");
25084
+ (_window16 = window) === null || _window16 === void 0 || (_window16 = _window16.Apxor) === null || _window16 === void 0 || (_window16$updateFlag = _window16.updateFlag) === null || _window16$updateFlag === void 0 || _window16$updateFlag.call(_window16, false, "IN_APP");
23650
25085
  } else {
23651
- var _window16, _window16$updateFlag;
23652
- (_window16 = window) === null || _window16 === void 0 || (_window16 = _window16.Apxor) === null || _window16 === void 0 || (_window16$updateFlag = _window16.updateFlag) === null || _window16$updateFlag === void 0 || _window16$updateFlag.call(_window16, "IN_APP", false);
25086
+ var _window17, _window17$updateFlag;
25087
+ (_window17 = window) === null || _window17 === void 0 || (_window17 = _window17.Apxor) === null || _window17 === void 0 || (_window17$updateFlag = _window17.updateFlag) === null || _window17$updateFlag === void 0 || _window17$updateFlag.call(_window17, "IN_APP", false);
23653
25088
  }
23654
25089
  console.error(e);
23655
25090
  }
23656
25091
  });
23657
- _defineProperty(this, "zxjU", function (config, configId, name, position, slidesSeenCount, view_id) {
25092
+ _defineProperty(this, "dOEQ", function (config, configId, name, position, slidesSeenCount, view_id) {
23658
25093
  var cardsContainer = new Stories(config, configId, name, position, slidesSeenCount, view_id, function () {
23659
25094
  window.Apxor.logAppEvent("apx_nudge_shown", {
23660
25095
  campaignName: name,
@@ -23665,16 +25100,15 @@
23665
25100
  cardsContainer.showStories();
23666
25101
  });
23667
25102
  _defineProperty(this, "removeAll", function () {
23668
- var _window17, _window17$updateFlag;
23669
- (_window17 = window) === null || _window17 === void 0 || (_window17 = _window17.Apxor) === null || _window17 === void 0 || (_window17$updateFlag = _window17.updateFlag) === null || _window17$updateFlag === void 0 || _window17$updateFlag.call(_window17, false);
25103
+ var _window18, _window18$updateFlag;
25104
+ (_window18 = window) === null || _window18 === void 0 || (_window18 = _window18.Apxor) === null || _window18 === void 0 || (_window18$updateFlag = _window18.updateFlag) === null || _window18$updateFlag === void 0 || _window18$updateFlag.call(_window18, false);
23670
25105
  if (_this.currentAction !== null && _this.currentAction !== undefined) {
23671
25106
  _this.isShowingAction = false;
23672
25107
  try {
23673
- var _window18;
25108
+ var _window19;
23674
25109
  _this.currentAction();
23675
25110
  _this.currentAction = null;
23676
- console.log("Callback is called");
23677
- (_window18 = window) === null || _window18 === void 0 || (_window18 = _window18.ApxorLogger) === null || _window18 === void 0 || _window18.debug("Callback is called");
25111
+ (_window19 = window) === null || _window19 === void 0 || (_window19 = _window19.ApxorLogger) === null || _window19 === void 0 || _window19.debug("Callback is called");
23678
25112
  } catch (e) {}
23679
25113
  }
23680
25114
  });
@@ -23686,48 +25120,48 @@
23686
25120
  var onShow = function onShow() {
23687
25121
  _this.isShowingAction = true;
23688
25122
  if (window.Apxor && window.Apxor.logActionEvent) {
23689
- var _window19, _window19$updateFlag, _window20, _window20$updateCount;
23690
- (_window19 = window) === null || _window19 === void 0 || (_window19 = _window19.Apxor) === null || _window19 === void 0 || (_window19$updateFlag = _window19.updateFlag) === null || _window19$updateFlag === void 0 || _window19$updateFlag.call(_window19, true);
25123
+ var _window20, _window20$updateFlag, _window21, _window21$updateCount;
25124
+ (_window20 = window) === null || _window20 === void 0 || (_window20 = _window20.Apxor) === null || _window20 === void 0 || (_window20$updateFlag = _window20.updateFlag) === null || _window20$updateFlag === void 0 || _window20$updateFlag.call(_window20, true);
23691
25125
  window.Apxor.logActionEvent("inline_shown", uuid, name);
23692
- (_window20 = window) === null || _window20 === void 0 || (_window20 = _window20.Apxor) === null || _window20 === void 0 || (_window20$updateCount = _window20.updateCount) === null || _window20$updateCount === void 0 || _window20$updateCount.call(_window20, uuid);
25126
+ (_window21 = window) === null || _window21 === void 0 || (_window21 = _window21.Apxor) === null || _window21 === void 0 || (_window21$updateCount = _window21.updateCount) === null || _window21$updateCount === void 0 || _window21$updateCount.call(_window21, uuid);
23693
25127
  if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
23694
25128
  setTimeout(function () {
23695
- var _window21, _window21$logInternal;
23696
- (_window21 = window) === null || _window21 === void 0 || (_window21 = _window21.Apxor) === null || _window21 === void 0 || (_window21$logInternal = _window21.logInternalEvent) === null || _window21$logInternal === void 0 || _window21$logInternal.call(_window21, "capt");
25129
+ var _window22, _window22$logInternal;
25130
+ (_window22 = window) === null || _window22 === void 0 || (_window22 = _window22.Apxor) === null || _window22 === void 0 || (_window22$logInternal = _window22.logInternalEvent) === null || _window22$logInternal === void 0 || _window22$logInternal.call(_window22, "capt");
23697
25131
  }, 500);
23698
25132
  }
23699
25133
  }
23700
25134
  };
23701
25135
  var onHide = function onHide(isCancelled) {
23702
- var _window22, _window22$updateFlag, _window23;
25136
+ var _window23, _window23$updateFlag, _window24;
23703
25137
  _this.isShowingAction = false;
23704
25138
  _this.currentAction = null;
23705
- _this.GnDZ = null;
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);
25139
+ _this.XHla = null;
25140
+ (_window23 = window) === null || _window23 === void 0 || (_window23 = _window23.Apxor) === null || _window23 === void 0 || (_window23$updateFlag = _window23.updateFlag) === null || _window23$updateFlag === void 0 || _window23$updateFlag.call(_window23, false);
23707
25141
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
23708
25142
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
23709
25143
  }
23710
- if (((_window23 = window) === null || _window23 === void 0 || (_window23 = _window23.ApxorWebView) === null || _window23 === void 0 ? void 0 : _window23.getLayoutType()) === "web-inline") {
23711
- var _window24;
23712
- (_window24 = window) === null || _window24 === void 0 || (_window24 = _window24.ApxorWebView) === null || _window24 === void 0 || _window24.removeWebView();
25144
+ if (((_window24 = window) === null || _window24 === void 0 || (_window24 = _window24.ApxorWebView) === null || _window24 === void 0 ? void 0 : _window24.getLayoutType()) === "web-inline") {
25145
+ var _window25;
25146
+ (_window25 = window) === null || _window25 === void 0 || (_window25 = _window25.ApxorWebView) === null || _window25 === void 0 || _window25.removeWebView();
23713
25147
  }
23714
25148
  };
23715
25149
  if (action_class === "new-inline") {
23716
- _this.GnDZ = new InLineTooltip(ui_config, [], [], terminationConfig, {
25150
+ _this.XHla = new InLineTooltip(ui_config, [], [], terminationConfig, {
23717
25151
  configId: uuid,
23718
25152
  configName: name
23719
25153
  }, _this, onShow, onHide, function () {}, false, 0);
23720
25154
  } else if (action_class === "tooltip_builder") {
23721
- _this.GnDZ = new NewInLineTooltip(ui_config, terminationConfig, {
25155
+ _this.XHla = new NewInLineTooltip(ui_config, terminationConfig, {
23722
25156
  configId: uuid,
23723
25157
  configName: name
23724
25158
  }, _this, onShow, onHide);
23725
25159
  }
23726
25160
  setTimeout(function () {
23727
- _this.GnDZ.createNewTooltip();
25161
+ _this.XHla.createNewTooltip();
23728
25162
  }, ui_config.delay);
23729
25163
  });
23730
- _defineProperty(this, "lzVw", function (ui_config, duration, uuid, name) {
25164
+ _defineProperty(this, "FKRN", function (ui_config, duration, uuid, name) {
23731
25165
  var terminationConfig = {};
23732
25166
  terminationConfig["auto_dismiss"] = duration > 0;
23733
25167
  terminationConfig["duration"] = duration;
@@ -23737,35 +25171,56 @@
23737
25171
  }, _this, function () {
23738
25172
  _this.isShowingAction = true;
23739
25173
  if (window.Apxor && window.Apxor.logActionEvent) {
23740
- var _window25, _window25$updateFlag;
23741
- (_window25 = window) === null || _window25 === void 0 || (_window25 = _window25.Apxor) === null || _window25 === void 0 || (_window25$updateFlag = _window25.updateFlag) === null || _window25$updateFlag === void 0 || _window25$updateFlag.call(_window25, true);
25174
+ var _window26, _window26$updateFlag;
25175
+ (_window26 = window) === null || _window26 === void 0 || (_window26 = _window26.Apxor) === null || _window26 === void 0 || (_window26$updateFlag = _window26.updateFlag) === null || _window26$updateFlag === void 0 || _window26$updateFlag.call(_window26, true);
23742
25176
  window.Apxor.logActionEvent("inline_shown", uuid, name);
23743
25177
  if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
23744
25178
  setTimeout(function () {
23745
- var _window26, _window26$logInternal;
23746
- (_window26 = window) === null || _window26 === void 0 || (_window26 = _window26.Apxor) === null || _window26 === void 0 || (_window26$logInternal = _window26.logInternalEvent) === null || _window26$logInternal === void 0 || _window26$logInternal.call(_window26, "capt");
25179
+ var _window27, _window27$logInternal;
25180
+ (_window27 = window) === null || _window27 === void 0 || (_window27 = _window27.Apxor) === null || _window27 === void 0 || (_window27$logInternal = _window27.logInternalEvent) === null || _window27$logInternal === void 0 || _window27$logInternal.call(_window27, "capt");
23747
25181
  }, 500);
23748
25182
  }
23749
25183
  }
23750
25184
  }, function (isCancelled) {
23751
- var _window27, _window27$updateFlag, _window28;
25185
+ var _window28, _window28$updateFlag, _window29;
23752
25186
  _this.isShowingAction = false;
23753
25187
  _this.currentAction = null;
23754
- _this.GnDZ = null;
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);
25188
+ _this.XHla = null;
25189
+ (_window28 = window) === null || _window28 === void 0 || (_window28 = _window28.Apxor) === null || _window28 === void 0 || (_window28$updateFlag = _window28.updateFlag) === null || _window28$updateFlag === void 0 || _window28$updateFlag.call(_window28, false);
23756
25190
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
23757
25191
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
23758
25192
  }
23759
- if (((_window28 = window) === null || _window28 === void 0 || (_window28 = _window28.ApxorWebView) === null || _window28 === void 0 ? void 0 : _window28.getLayoutType()) === "web-inline") {
23760
- var _window29;
23761
- (_window29 = window) === null || _window29 === void 0 || (_window29 = _window29.ApxorWebView) === null || _window29 === void 0 || _window29.removeWebView();
25193
+ if (((_window29 = window) === null || _window29 === void 0 || (_window29 = _window29.ApxorWebView) === null || _window29 === void 0 ? void 0 : _window29.getLayoutType()) === "web-inline") {
25194
+ var _window30;
25195
+ (_window30 = window) === null || _window30 === void 0 || (_window30 = _window30.ApxorWebView) === null || _window30 === void 0 || _window30.removeWebView();
23762
25196
  }
23763
25197
  }, _this.stepperCallback, false, 0);
23764
25198
  _this._currentCoachmark.createNewCoachMark();
23765
25199
  });
25200
+ _defineProperty(this, "Ipuh", function (ui_config, duration, uuid, name, terminationConfig) {
25201
+ _this._currentBadge = new ApxorBadge(ui_config, terminationConfig, {
25202
+ configId: uuid,
25203
+ configName: name
25204
+ }, _this, function () {
25205
+ // this.isShowingAction = true;
25206
+ if (window.Apxor && window.Apxor.logActionEvent) {
25207
+ var _window$Apxor5;
25208
+ window.Apxor.logActionEvent("inline_shown", uuid, name);
25209
+ (_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 || _window$Apxor5.updateBadgeStatus("show", uuid);
25210
+ if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
25211
+ setTimeout(function () {
25212
+ var _window31, _window31$logInternal;
25213
+ (_window31 = window) === null || _window31 === void 0 || (_window31 = _window31.Apxor) === null || _window31 === void 0 || (_window31$logInternal = _window31.logInternalEvent) === null || _window31$logInternal === void 0 || _window31$logInternal.call(_window31, "capt");
25214
+ }, 500);
25215
+ }
25216
+ }
25217
+ });
25218
+ _this._currentBadge.Krgj();
25219
+ _this._currentBadge.Ipuh();
25220
+ });
23766
25221
  _defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
23767
- if (_this.GnDZ) {
23768
- _this.GnDZ.updateElementPositionOnScroll(top, left, height, width);
25222
+ if (_this.XHla) {
25223
+ _this.XHla.updateElementPositionOnScroll(top, left, height, width);
23769
25224
  }
23770
25225
  });
23771
25226
  _defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
@@ -23782,15 +25237,15 @@
23782
25237
  var VideoInAppInstance = new VideoInApp(videoConfig, terminationConfig, configId, name, function () {
23783
25238
  _this.isShowingAction = true;
23784
25239
  if (window.Apxor && window.Apxor.logActionEvent) {
23785
- var _window30, _window30$updateFlag;
23786
- (_window30 = window) === null || _window30 === void 0 || (_window30 = _window30.Apxor) === null || _window30 === void 0 || (_window30$updateFlag = _window30.updateFlag) === null || _window30$updateFlag === void 0 || _window30$updateFlag.call(_window30, true);
25240
+ var _window32, _window32$updateFlag;
25241
+ (_window32 = window) === null || _window32 === void 0 || (_window32 = _window32.Apxor) === null || _window32 === void 0 || (_window32$updateFlag = _window32.updateFlag) === null || _window32$updateFlag === void 0 || _window32$updateFlag.call(_window32, true);
23787
25242
  window.Apxor.logActionEvent("inapp_shown", configId, name);
23788
25243
  }
23789
25244
  }, function () {
23790
- var _window31, _window31$updateFlag;
25245
+ var _window33, _window33$updateFlag;
23791
25246
  _this.isShowingAction = false;
23792
25247
  _this.currentAction = null;
23793
- (_window31 = window) === null || _window31 === void 0 || (_window31 = _window31.Apxor) === null || _window31 === void 0 || (_window31$updateFlag = _window31.updateFlag) === null || _window31$updateFlag === void 0 || _window31$updateFlag.call(_window31, false);
25248
+ (_window33 = window) === null || _window33 === void 0 || (_window33 = _window33.Apxor) === null || _window33 === void 0 || (_window33$updateFlag = _window33.updateFlag) === null || _window33$updateFlag === void 0 || _window33$updateFlag.call(_window33, false);
23794
25249
  if (window.Apxor && window.Apxor.logActionEvent) {
23795
25250
  window.Apxor.logActionEvent("inapp_dismissed", configId, name);
23796
25251
  }
@@ -23814,31 +25269,31 @@
23814
25269
  terminationConfig["duration"] = duration;
23815
25270
  var inappModal = null;
23816
25271
  var onShow = function onShow() {
23817
- var _window$Apxor4;
25272
+ var _window$Apxor6;
23818
25273
  _this.isShowingAction = true;
23819
- if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
23820
- var _window32, _window32$updateFlag;
23821
- (_window32 = window) === null || _window32 === void 0 || (_window32 = _window32.Apxor) === null || _window32 === void 0 || (_window32$updateFlag = _window32.updateFlag) === null || _window32$updateFlag === void 0 || _window32$updateFlag.call(_window32, true, "IN_APP");
25274
+ if (((_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.platform) === "ios") {
25275
+ var _window34, _window34$updateFlag;
25276
+ (_window34 = window) === null || _window34 === void 0 || (_window34 = _window34.Apxor) === null || _window34 === void 0 || (_window34$updateFlag = _window34.updateFlag) === null || _window34$updateFlag === void 0 || _window34$updateFlag.call(_window34, true, "IN_APP");
23822
25277
  } else {
23823
- var _window33, _window33$updateFlag;
23824
- (_window33 = window) === null || _window33 === void 0 || (_window33 = _window33.Apxor) === null || _window33 === void 0 || (_window33$updateFlag = _window33.updateFlag) === null || _window33$updateFlag === void 0 || _window33$updateFlag.call(_window33, "IN_APP", true);
25278
+ var _window35, _window35$updateFlag;
25279
+ (_window35 = window) === null || _window35 === void 0 || (_window35 = _window35.Apxor) === null || _window35 === void 0 || (_window35$updateFlag = _window35.updateFlag) === null || _window35$updateFlag === void 0 || _window35$updateFlag.call(_window35, "IN_APP", true);
23825
25280
  }
23826
25281
  if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent) {
23827
25282
  window.Apxor.logActionEvent("inapp_shown", configId, name);
23828
25283
  } else if (action_class === "inapp_builder") {
23829
- var _window$ApxorRTM3, _window$Apxor5, _config$additional_in, _window$Apxor6, _config$additional_in2, _config$additional_in3, _config$additional_in4, _config$additional_in5, _config$additional_in6, _config$additional_in7;
25284
+ var _window$ApxorRTM3, _window$Apxor7, _config$additional_in, _window$Apxor8, _config$additional_in2, _config$additional_in3, _config$additional_in4, _config$additional_in5, _config$additional_in6, _config$additional_in7;
23830
25285
  (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_shown", {
23831
25286
  apx_nudge_name: name,
23832
- apx_nudge_id: ((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in = config.additional_info) === null || _config$additional_in === void 0 ? void 0 : _config$additional_in.id : configId,
25287
+ apx_nudge_id: ((_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in = config.additional_info) === null || _config$additional_in === void 0 ? void 0 : _config$additional_in.id : configId,
23833
25288
  apx_template_name: "inapp",
23834
- apx_step: ((_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in2 = config.additional_info) !== null && _config$additional_in2 !== void 0 && _config$additional_in2.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in3 = config.additional_info) === null || _config$additional_in3 === void 0 ? void 0 : _config$additional_in3.apx_step : config !== null && config !== void 0 && (_config$additional_in4 = config.additional_info) !== null && _config$additional_in4 !== void 0 && _config$additional_in4.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in5 = config.additional_info) === null || _config$additional_in5 === void 0 ? void 0 : _config$additional_in5.apx_step,
25289
+ apx_step: ((_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 ? void 0 : _window$Apxor8.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in2 = config.additional_info) !== null && _config$additional_in2 !== void 0 && _config$additional_in2.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in3 = config.additional_info) === null || _config$additional_in3 === void 0 ? void 0 : _config$additional_in3.apx_step : config !== null && config !== void 0 && (_config$additional_in4 = config.additional_info) !== null && _config$additional_in4 !== void 0 && _config$additional_in4.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in5 = config.additional_info) === null || _config$additional_in5 === void 0 ? void 0 : _config$additional_in5.apx_step,
23835
25290
  apx_screen_name: config === null || config === void 0 || (_config$additional_in6 = config.additional_info) === null || _config$additional_in6 === void 0 ? void 0 : _config$additional_in6.apx_screen_name,
23836
25291
  apx_variant_code: config === null || config === void 0 || (_config$additional_in7 = config.additional_info) === null || _config$additional_in7 === void 0 ? void 0 : _config$additional_in7.apx_variant_code
23837
25292
  });
23838
25293
  }
23839
25294
  };
23840
25295
  var onHide = function onHide(backgroundDiv, action) {
23841
- var _dialogContent$classL, _window$Apxor7;
25296
+ var _dialogContent$classL, _window$Apxor9;
23842
25297
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
23843
25298
  var cssClass = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ".apx-dlg-c";
23844
25299
  var closeListener = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
@@ -23850,26 +25305,26 @@
23850
25305
  // setTimeout(() => {
23851
25306
  backgroundDiv.remove();
23852
25307
  _this.isShowingAction = false;
23853
- if (((_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.platform) === "ios") {
23854
- var _window34, _window34$updateFlag;
23855
- (_window34 = window) === null || _window34 === void 0 || (_window34 = _window34.Apxor) === null || _window34 === void 0 || (_window34$updateFlag = _window34.updateFlag) === null || _window34$updateFlag === void 0 || _window34$updateFlag.call(_window34, false, "IN_APP");
25308
+ if (((_window$Apxor9 = window.Apxor) === null || _window$Apxor9 === void 0 ? void 0 : _window$Apxor9.platform) === "ios") {
25309
+ var _window36, _window36$updateFlag;
25310
+ (_window36 = window) === null || _window36 === void 0 || (_window36 = _window36.Apxor) === null || _window36 === void 0 || (_window36$updateFlag = _window36.updateFlag) === null || _window36$updateFlag === void 0 || _window36$updateFlag.call(_window36, false, "IN_APP");
23856
25311
  } else {
23857
- var _window35, _window35$updateFlag;
23858
- (_window35 = window) === null || _window35 === void 0 || (_window35 = _window35.Apxor) === null || _window35 === void 0 || (_window35$updateFlag = _window35.updateFlag) === null || _window35$updateFlag === void 0 || _window35$updateFlag.call(_window35, "IN_APP", false);
25312
+ var _window37, _window37$updateFlag;
25313
+ (_window37 = window) === null || _window37 === void 0 || (_window37 = _window37.Apxor) === null || _window37 === void 0 || (_window37$updateFlag = _window37.updateFlag) === null || _window37$updateFlag === void 0 || _window37$updateFlag.call(_window37, "IN_APP", false);
23859
25314
  }
23860
25315
  _this.currentAction = null;
23861
25316
  if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
23862
25317
  window.Apxor.logActionEvent("inapp_dismissed", configId, name);
23863
25318
  } else if (action_class === "inapp_builder") {
23864
- var _window36;
25319
+ var _window38;
23865
25320
  if (!(action == "cancel" || action == "never")) {
23866
- var _window$Apxor8, _config$additional_in8, _config$additional_in9, _window$Apxor9, _config$additional_in10, _config$additional_in11, _config$additional_in12, _config$additional_in13, _window$ApxorRTM4;
25321
+ var _window$Apxor10, _config$additional_in8, _config$additional_in9, _window$Apxor11, _config$additional_in10, _config$additional_in11, _config$additional_in12, _config$additional_in13, _window$ApxorRTM4;
23867
25322
  var additional_info = {
23868
25323
  apx_nudge_name: name,
23869
- apx_nudge_id: ((_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 ? void 0 : _window$Apxor8.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in8 = config.additional_info) === null || _config$additional_in8 === void 0 ? void 0 : _config$additional_in8.id : configId,
25324
+ apx_nudge_id: ((_window$Apxor10 = window.Apxor) === null || _window$Apxor10 === void 0 ? void 0 : _window$Apxor10.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in8 = config.additional_info) === null || _config$additional_in8 === void 0 ? void 0 : _config$additional_in8.id : configId,
23870
25325
  apx_template_name: "inapp",
23871
25326
  apx_variant_code: config === null || config === void 0 || (_config$additional_in9 = config.additional_info) === null || _config$additional_in9 === void 0 ? void 0 : _config$additional_in9.apx_variant_code,
23872
- apx_step: ((_window$Apxor9 = window.Apxor) === null || _window$Apxor9 === void 0 ? void 0 : _window$Apxor9.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in10 = config.additional_info) !== null && _config$additional_in10 !== void 0 && _config$additional_in10.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in11 = config.additional_info) === null || _config$additional_in11 === void 0 ? void 0 : _config$additional_in11.apx_step : config !== null && config !== void 0 && (_config$additional_in12 = config.additional_info) !== null && _config$additional_in12 !== void 0 && _config$additional_in12.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in13 = config.additional_info) === null || _config$additional_in13 === void 0 ? void 0 : _config$additional_in13.apx_step
25327
+ apx_step: ((_window$Apxor11 = window.Apxor) === null || _window$Apxor11 === void 0 ? void 0 : _window$Apxor11.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in10 = config.additional_info) !== null && _config$additional_in10 !== void 0 && _config$additional_in10.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in11 = config.additional_info) === null || _config$additional_in11 === void 0 ? void 0 : _config$additional_in11.apx_step : config !== null && config !== void 0 && (_config$additional_in12 = config.additional_info) !== null && _config$additional_in12 !== void 0 && _config$additional_in12.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in13 = config.additional_info) === null || _config$additional_in13 === void 0 ? void 0 : _config$additional_in13.apx_step
23873
25328
  };
23874
25329
  if (type != "") {
23875
25330
  additional_info["apx_dismiss_type"] = type;
@@ -23877,17 +25332,17 @@
23877
25332
  (_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_nudge_dismissed", additional_info);
23878
25333
  }
23879
25334
  if (action === "cancel") {
23880
- var _window$Apxor10, _config$additional_in14, _config$additional_in15, _window$Apxor11, _config$additional_in16, _config$additional_in17, _config$additional_in18, _config$additional_in19, _window$ApxorRTM5;
25335
+ var _window$Apxor12, _config$additional_in14, _config$additional_in15, _window$Apxor13, _config$additional_in16, _config$additional_in17, _config$additional_in18, _config$additional_in19, _window$ApxorRTM5;
23881
25336
  var _additional_info = {
23882
25337
  apx_nudge_name: name,
23883
- apx_nudge_id: ((_window$Apxor10 = window.Apxor) === null || _window$Apxor10 === void 0 ? void 0 : _window$Apxor10.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in14 = config.additional_info) === null || _config$additional_in14 === void 0 ? void 0 : _config$additional_in14.id : configId,
25338
+ apx_nudge_id: ((_window$Apxor12 = window.Apxor) === null || _window$Apxor12 === void 0 ? void 0 : _window$Apxor12.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in14 = config.additional_info) === null || _config$additional_in14 === void 0 ? void 0 : _config$additional_in14.id : configId,
23884
25339
  apx_template_name: "inapp",
23885
25340
  apx_variant_code: config === null || config === void 0 || (_config$additional_in15 = config.additional_info) === null || _config$additional_in15 === void 0 ? void 0 : _config$additional_in15.apx_variant_code,
23886
- apx_step: ((_window$Apxor11 = window.Apxor) === null || _window$Apxor11 === void 0 ? void 0 : _window$Apxor11.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in16 = config.additional_info) !== null && _config$additional_in16 !== void 0 && _config$additional_in16.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in17 = config.additional_info) === null || _config$additional_in17 === void 0 ? void 0 : _config$additional_in17.apx_step : config !== null && config !== void 0 && (_config$additional_in18 = config.additional_info) !== null && _config$additional_in18 !== void 0 && _config$additional_in18.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in19 = config.additional_info) === null || _config$additional_in19 === void 0 ? void 0 : _config$additional_in19.apx_step
25341
+ apx_step: ((_window$Apxor13 = window.Apxor) === null || _window$Apxor13 === void 0 ? void 0 : _window$Apxor13.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in16 = config.additional_info) !== null && _config$additional_in16 !== void 0 && _config$additional_in16.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in17 = config.additional_info) === null || _config$additional_in17 === void 0 ? void 0 : _config$additional_in17.apx_step : config !== null && config !== void 0 && (_config$additional_in18 = config.additional_info) !== null && _config$additional_in18 !== void 0 && _config$additional_in18.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in19 = config.additional_info) === null || _config$additional_in19 === void 0 ? void 0 : _config$additional_in19.apx_step
23887
25342
  };
23888
25343
  (_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_nudge_cancelled", _additional_info);
23889
25344
  }
23890
- (_window36 = window) === null || _window36 === void 0 || (_window36 = _window36.ApxorInternals) === null || _window36 === void 0 || _window36.removeBuilderTemplate(configId);
25345
+ (_window38 = window) === null || _window38 === void 0 || (_window38 = _window38.ApxorInternals) === null || _window38 === void 0 || _window38.removeBuilderTemplate(configId);
23891
25346
  }
23892
25347
  };
23893
25348
  if (action_class === "modal") {
@@ -23901,11 +25356,11 @@
23901
25356
  }
23902
25357
  });
23903
25358
  _defineProperty(this, "showPlaceHolder", function () {
23904
- var _window37;
23905
- if (_this.yqfs) {
25359
+ var _window39;
25360
+ if (_this.AvTU) {
23906
25361
  return;
23907
25362
  }
23908
- _this.yqfs = true;
25363
+ _this.AvTU = true;
23909
25364
  var ele = document.createElement("div");
23910
25365
  ele.innerHTML = "place your immersive card here";
23911
25366
  ele.style.backgroundColor = "#f5f5f5";
@@ -23915,7 +25370,7 @@
23915
25370
  ele.style.padding = "12px";
23916
25371
  ele.style.fontSize = "14px";
23917
25372
  document.body.appendChild(ele);
23918
- (_window37 = window) === null || _window37 === void 0 || (_window37 = _window37.ApxorWidget) === null || _window37 === void 0 || _window37.setDimensions(window.document.querySelector("html").offsetWidth, window.document.querySelector("html").offsetHeight);
25373
+ (_window39 = window) === null || _window39 === void 0 || (_window39 = _window39.ApxorWidget) === null || _window39 === void 0 || _window39.setDimensions(window.document.querySelector("html").offsetWidth, window.document.querySelector("html").offsetHeight);
23919
25374
  });
23920
25375
  _defineProperty(this, "pauseStories", function () {
23921
25376
  var progress = Array.from(document.querySelectorAll(".progress"));
@@ -23954,8 +25409,8 @@
23954
25409
  // survey_obj.createSurvey();
23955
25410
  // };
23956
25411
  _defineProperty(this, "logEvent", function (name, additional_info) {
23957
- var _window$Apxor12;
23958
- if (((_window$Apxor12 = window.Apxor) === null || _window$Apxor12 === void 0 ? void 0 : _window$Apxor12.platform) === "ios") {
25412
+ var _window$Apxor14;
25413
+ if (((_window$Apxor14 = window.Apxor) === null || _window$Apxor14 === void 0 ? void 0 : _window$Apxor14.platform) === "ios") {
23959
25414
  window.Apxor.logAppEvent(name, additional_info);
23960
25415
  } else {
23961
25416
  window.Apxor.logAppEvent(name, JSON.stringify(additional_info));
@@ -23971,6 +25426,15 @@
23971
25426
  }
23972
25427
  }
23973
25428
  });
25429
+ _defineProperty(this, "removeBadge", function (name, id) {
25430
+ var cssPostFix = "-".concat(id, "-").concat(name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
25431
+ var badge = Array.from(document.getElementsByClassName("apxor-badge-container")).find(function (element) {
25432
+ return element.classList.contains("apxor-badge-container-styles-".concat(cssPostFix));
25433
+ });
25434
+ if (badge) {
25435
+ badge.remove();
25436
+ }
25437
+ });
23974
25438
  });
23975
25439
 
23976
25440
  /* eslint-disable no-empty */