apxor-rtm-ui 0.5.5 → 0.6.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.
@@ -4,6 +4,54 @@
4
4
  (global = global || self, global['apxor-rtm'] = factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
+ function _iterableToArrayLimit(r, l) {
8
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
9
+ if (null != t) {
10
+ var e,
11
+ n,
12
+ i,
13
+ u,
14
+ a = [],
15
+ f = !0,
16
+ o = !1;
17
+ try {
18
+ if (i = (t = t.call(r)).next, 0 === l) {
19
+ if (Object(t) !== t) return;
20
+ f = !1;
21
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
22
+ } catch (r) {
23
+ o = !0, n = r;
24
+ } finally {
25
+ try {
26
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
27
+ } finally {
28
+ if (o) throw n;
29
+ }
30
+ }
31
+ return a;
32
+ }
33
+ }
34
+ function ownKeys(e, r) {
35
+ var t = Object.keys(e);
36
+ if (Object.getOwnPropertySymbols) {
37
+ var o = Object.getOwnPropertySymbols(e);
38
+ r && (o = o.filter(function (r) {
39
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
40
+ })), t.push.apply(t, o);
41
+ }
42
+ return t;
43
+ }
44
+ function _objectSpread2(e) {
45
+ for (var r = 1; r < arguments.length; r++) {
46
+ var t = null != arguments[r] ? arguments[r] : {};
47
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
48
+ _defineProperty(e, r, t[r]);
49
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
50
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
51
+ });
52
+ }
53
+ return e;
54
+ }
7
55
  function _typeof(o) {
8
56
  "@babel/helpers - typeof";
9
57
 
@@ -117,12 +165,18 @@
117
165
  return _possibleConstructorReturn(this, result);
118
166
  };
119
167
  }
168
+ function _slicedToArray(arr, i) {
169
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
170
+ }
120
171
  function _toConsumableArray(arr) {
121
172
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
122
173
  }
123
174
  function _arrayWithoutHoles(arr) {
124
175
  if (Array.isArray(arr)) return _arrayLikeToArray(arr);
125
176
  }
177
+ function _arrayWithHoles(arr) {
178
+ if (Array.isArray(arr)) return arr;
179
+ }
126
180
  function _iterableToArray(iter) {
127
181
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
128
182
  }
@@ -142,6 +196,9 @@
142
196
  function _nonIterableSpread() {
143
197
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
144
198
  }
199
+ function _nonIterableRest() {
200
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
201
+ }
145
202
  function _toPrimitive(input, hint) {
146
203
  if (typeof input !== "object" || input === null) return input;
147
204
  var prim = input[Symbol.toPrimitive];
@@ -222,7 +279,7 @@
222
279
  };
223
280
  return _extends.apply(this, arguments);
224
281
  }
225
- function _objectSpread2(target) {
282
+ function _objectSpread2$1(target) {
226
283
  for (var i = 1; i < arguments.length; i++) {
227
284
  if (i % 2) {
228
285
  var source = arguments[i] != null ? arguments[i] : {};
@@ -279,13 +336,13 @@
279
336
  }
280
337
  return _assertThisInitialized$1(self);
281
338
  }
282
- function _slicedToArray(arr, i) {
283
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
339
+ function _slicedToArray$1(arr, i) {
340
+ return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _nonIterableRest$1();
284
341
  }
285
- function _arrayWithHoles(arr) {
342
+ function _arrayWithHoles$1(arr) {
286
343
  if (Array.isArray(arr)) return arr;
287
344
  }
288
- function _iterableToArrayLimit(arr, i) {
345
+ function _iterableToArrayLimit$1(arr, i) {
289
346
  var _arr = [];
290
347
  var _n = true;
291
348
  var _d = false;
@@ -307,7 +364,7 @@
307
364
  }
308
365
  return _arr;
309
366
  }
310
- function _nonIterableRest() {
367
+ function _nonIterableRest$1() {
311
368
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
312
369
  }
313
370
 
@@ -4336,7 +4393,7 @@
4336
4393
  */
4337
4394
 
4338
4395
  function _makeCenteredTippy() {
4339
- var tippyOptions = _objectSpread2({
4396
+ var tippyOptions = _objectSpread2$1({
4340
4397
  content: this.el,
4341
4398
  placement: "top"
4342
4399
  }, this.options.tippyOptions);
@@ -4487,7 +4544,7 @@
4487
4544
  }
4488
4545
  if (cfg.events) {
4489
4546
  Object.entries(cfg.events).forEach(function (_ref2) {
4490
- var _ref3 = _slicedToArray(_ref2, 2),
4547
+ var _ref3 = _slicedToArray$1(_ref2, 2),
4491
4548
  event = _ref3[0],
4492
4549
  handler = _ref3[1];
4493
4550
  if (isString(handler)) {
@@ -5073,7 +5130,7 @@
5073
5130
  var RIGHT_ARROW = 39; // Get all elements that are focusable
5074
5131
 
5075
5132
  var focusableElements = element.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]');
5076
- var _focusableElements = _slicedToArray(focusableElements, 1),
5133
+ var _focusableElements = _slicedToArray$1(focusableElements, 1),
5077
5134
  firstFocusableElement = _focusableElements[0];
5078
5135
  var lastFocusableElement = focusableElements[focusableElements.length - 1];
5079
5136
  element.addEventListener("keydown", function (e) {
@@ -5269,7 +5326,7 @@
5269
5326
  this.id = this.options.id || "step-".concat(uniqueId());
5270
5327
  if (when) {
5271
5328
  Object.entries(when).forEach(function (_ref) {
5272
- var _ref2 = _slicedToArray(_ref, 2),
5329
+ var _ref2 = _slicedToArray$1(_ref, 2),
5273
5330
  event = _ref2[0],
5274
5331
  handler = _ref2[1];
5275
5332
  _this4.on(event, handler, _this4);
@@ -5572,7 +5629,7 @@
5572
5629
 
5573
5630
  function getElementFromString(element) {
5574
5631
  var _element$split = element.split(" "),
5575
- _element$split2 = _slicedToArray(_element$split, 1),
5632
+ _element$split2 = _slicedToArray$1(_element$split, 1),
5576
5633
  selector = _element$split2[0];
5577
5634
  return document.querySelector(selector);
5578
5635
  }
@@ -6339,6 +6396,14 @@
6339
6396
  BOTTOM_CENTER: "bottom-center",
6340
6397
  CENTER: "center"
6341
6398
  };
6399
+ var imgWrapperStyles = {
6400
+ "margin-left": "marginLeft",
6401
+ "margin-right": "marginRight",
6402
+ "margin-top": "marginTop",
6403
+ "margin-bottom": "marginBottom",
6404
+ "align-self": "alignSelf",
6405
+ width: "width"
6406
+ };
6342
6407
  var DIRECTION = {
6343
6408
  HORIZONTAL: "horizontal",
6344
6409
  VERTICAL: "vertical"
@@ -7296,6 +7361,45 @@
7296
7361
  return "rgb(" + r + ", " + g + ", " + b + ")";
7297
7362
  }
7298
7363
  };
7364
+ function parseCSS(cssString) {
7365
+ var styleObject = {};
7366
+
7367
+ // Match each CSS rule using regular expression
7368
+ var cssRules = cssString.match(/([^\s]+)\s*:\s*([^;]+);/g);
7369
+ if (cssRules) {
7370
+ // Iterate through matched CSS rules
7371
+ cssRules.forEach(function (rule) {
7372
+ // Split each rule into property and value
7373
+ var _rule$split$map = rule.split(":").map(function (part) {
7374
+ return part.trim();
7375
+ }),
7376
+ _rule$split$map2 = _slicedToArray(_rule$split$map, 2),
7377
+ property = _rule$split$map2[0],
7378
+ value = _rule$split$map2[1];
7379
+ if (property && value) {
7380
+ styleObject[property] = value.slice(0, -1);
7381
+ }
7382
+ });
7383
+ }
7384
+ return styleObject;
7385
+ }
7386
+ function objectToCSS(styleObject) {
7387
+ var cssString = "";
7388
+ Object.entries(styleObject).forEach(function (_ref2) {
7389
+ var _ref3 = _slicedToArray(_ref2, 2),
7390
+ property = _ref3[0],
7391
+ value = _ref3[1];
7392
+ cssString += "".concat(property, ": ").concat(value, ";");
7393
+ });
7394
+ return cssString;
7395
+ }
7396
+ function removeKeys(obj, keysToRemove) {
7397
+ var newObj = _objectSpread2({}, obj);
7398
+ keysToRemove.forEach(function (key) {
7399
+ delete newObj[key];
7400
+ });
7401
+ return newObj;
7402
+ }
7299
7403
 
7300
7404
  /**
7301
7405
  * @function getPIPSVG
@@ -7364,6 +7468,16 @@
7364
7468
  }
7365
7469
  return null;
7366
7470
  };
7471
+ var isDescendant = function isDescendant(parent, child) {
7472
+ var node = child.parentNode;
7473
+ while (node != null) {
7474
+ if (node == parent) {
7475
+ return true;
7476
+ }
7477
+ node = node.parentNode;
7478
+ }
7479
+ return false;
7480
+ };
7367
7481
  function isElementCovered(element) {
7368
7482
  var rect = element.getBoundingClientRect();
7369
7483
 
@@ -7375,22 +7489,26 @@
7375
7489
 
7376
7490
  // Check if the point is covered
7377
7491
  var elementAtPoint = document.elementFromPoint(x, y);
7378
- while (elementAtPoint) {
7379
- if (elementAtPoint === element) {
7380
- return false;
7381
- } else {
7382
- var childElements = elementAtPoint.children;
7383
- for (var i = 0; i < childElements.length; i++) {
7384
- var child = childElements[i];
7385
- if (child === element) {
7386
- return false;
7387
- }
7388
- }
7389
- }
7390
- elementAtPoint = elementAtPoint.parentElement;
7492
+ if (elementAtPoint === element || isDescendant(elementAtPoint, element) || isDescendant(element, elementAtPoint)) {
7493
+ return false;
7391
7494
  }
7495
+ // while (elementAtPoint) {
7496
+ // if (elementAtPoint === element) {
7497
+ // return false;
7498
+ // } else {
7499
+ // var childElements = elementAtPoint.children;
7500
+ // for (var i = 0; i < childElements.length; i++) {
7501
+ // var child = childElements[i];
7502
+ // if (child === element) {
7503
+ // return false;
7504
+ // }
7505
+ // }
7506
+ // }
7507
+ // elementAtPoint = elementAtPoint.parentElement;
7508
+ // }
7392
7509
  }
7393
7510
  }
7511
+
7394
7512
  return true;
7395
7513
  }
7396
7514
  var generateButtons = function generateButtons() {
@@ -7556,20 +7674,20 @@
7556
7674
  * @param {string} type - Title or Description type
7557
7675
  * @returns
7558
7676
  */
7559
- var createTextElement = function createTextElement(_ref2, currentId) {
7560
- var _ref2$color = _ref2.color,
7561
- color = _ref2$color === void 0 ? "#000" : _ref2$color,
7562
- _ref2$font_family = _ref2.font_family,
7563
- font_family = _ref2$font_family === void 0 ? "cursive" : _ref2$font_family,
7564
- _ref2$size = _ref2.size,
7565
- size = _ref2$size === void 0 ? 14 : _ref2$size,
7566
- _ref2$style = _ref2.style,
7567
- style = _ref2$style === void 0 ? "bold" : _ref2$style,
7568
- text = _ref2.text,
7569
- segments = _ref2.segments,
7570
- quote = _ref2.quote,
7571
- _ref2$link_config = _ref2.link_config,
7572
- link_config = _ref2$link_config === void 0 ? [] : _ref2$link_config;
7677
+ var createTextElement = function createTextElement(_ref4, currentId) {
7678
+ var _ref4$color = _ref4.color,
7679
+ color = _ref4$color === void 0 ? "#000" : _ref4$color,
7680
+ _ref4$font_family = _ref4.font_family,
7681
+ font_family = _ref4$font_family === void 0 ? "cursive" : _ref4$font_family,
7682
+ _ref4$size = _ref4.size,
7683
+ size = _ref4$size === void 0 ? 14 : _ref4$size,
7684
+ _ref4$style = _ref4.style,
7685
+ style = _ref4$style === void 0 ? "bold" : _ref4$style,
7686
+ text = _ref4.text,
7687
+ segments = _ref4.segments,
7688
+ quote = _ref4.quote,
7689
+ _ref4$link_config = _ref4.link_config,
7690
+ link_config = _ref4$link_config === void 0 ? [] : _ref4$link_config;
7573
7691
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "desc";
7574
7692
  var fontMultiplier = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
7575
7693
  size = size * fontMultiplier;
@@ -11542,9 +11660,13 @@
11542
11660
  var _this = this,
11543
11661
  _config$termination;
11544
11662
  _classCallCheck(this, TemplateContent);
11545
- _defineProperty(this, "uEWO", function () {
11546
- var element = _this.aDYe(_this.layout);
11663
+ _defineProperty(this, "FbqU", function () {
11664
+ var element = _this.OKHv(_this.layout);
11547
11665
  //document.body.appendChild(element);
11666
+ var tooltipStyles = document.createElement("style");
11667
+ tooltipStyles.innerHTML = _this.initialStyles;
11668
+ tooltipStyles.setAttribute("apx-tooltip-styles", "");
11669
+ document.head.appendChild(tooltipStyles);
11548
11670
  var styleElement = document.createElement("style");
11549
11671
  styleElement.innerHTML = _this.styleContent;
11550
11672
  document.head.appendChild(styleElement);
@@ -11555,7 +11677,7 @@
11555
11677
  }
11556
11678
  return element;
11557
11679
  });
11558
- _defineProperty(this, "aDYe", function (config) {
11680
+ _defineProperty(this, "OKHv", function (config) {
11559
11681
  var _window$Apxor;
11560
11682
  var element;
11561
11683
  switch (config.type) {
@@ -11574,20 +11696,20 @@
11574
11696
  if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
11575
11697
  element.playsInline = true;
11576
11698
  }
11577
- if (config.source) {
11578
- var sourceElement = document.createElement("source");
11579
- for (var prop in config.source) {
11580
- sourceElement[prop] = config.source[prop];
11581
- }
11582
- element.appendChild(sourceElement);
11583
- }
11584
- if (config.track) {
11585
- var trackElement = document.createElement("track");
11586
- for (var _prop in config.track) {
11587
- trackElement[_prop] = config.track[_prop];
11588
- }
11589
- element.appendChild(trackElement);
11590
- }
11699
+ // if (config.source) {
11700
+ // let sourceElement = document.createElement("source");
11701
+ // for (let prop in config.source) {
11702
+ // sourceElement[prop] = config.source[prop];
11703
+ // }
11704
+ // element.appendChild(sourceElement);
11705
+ // }
11706
+ // if (config.track) {
11707
+ // let trackElement = document.createElement("track");
11708
+ // for (let prop in config.track) {
11709
+ // trackElement[prop] = config.track[prop];
11710
+ // }
11711
+ // element.appendChild(trackElement);
11712
+ // }
11591
11713
  break;
11592
11714
  case "svg":
11593
11715
  element = document.createElement("span");
@@ -11596,38 +11718,58 @@
11596
11718
  element = document.createElement(config.type);
11597
11719
  }
11598
11720
  if (config.properties) {
11599
- for (var _prop2 in config.properties) {
11600
- element[_prop2] = config.properties[_prop2];
11721
+ for (var prop in config.properties) {
11722
+ if (config.type === "video" && prop === "source") {
11723
+ var sourceElement = document.createElement("source");
11724
+ for (var srcprop in (_config$properties = config.properties) === null || _config$properties === void 0 ? void 0 : _config$properties[prop]) {
11725
+ var _config$properties, _config$properties2;
11726
+ sourceElement[srcprop] = (_config$properties2 = config.properties) === null || _config$properties2 === void 0 || (_config$properties2 = _config$properties2[prop]) === null || _config$properties2 === void 0 ? void 0 : _config$properties2[srcprop];
11727
+ }
11728
+ sourceElement["type"] = "video/mp4";
11729
+ element.appendChild(sourceElement);
11730
+ continue;
11731
+ }
11732
+ element[prop] = config.properties[prop];
11601
11733
  }
11602
11734
  }
11735
+ element.classList.add(config._id);
11736
+ if (config.css) {
11737
+ var styles = ".".concat(config._id, " {\n ").concat(config.css, "\n }\n ");
11738
+ _this.initialStyles += styles;
11739
+ }
11603
11740
  if (config.enable_actions && config.actions.length > 0) {
11604
11741
  config.actions.forEach(function (action) {
11605
11742
  switch (action.type) {
11606
11743
  case "activity":
11607
11744
  case "deeplink":
11608
11745
  case "ir":
11609
- element.onclick = function () {
11746
+ element.onclick = function (e) {
11747
+ e.stopPropagation();
11610
11748
  window.Apxor.redirect(JSON.stringify(action));
11611
11749
  };
11612
11750
  break;
11613
11751
  case "cancel":
11614
- element.onclick = function () {
11752
+ element.onclick = function (e) {
11753
+ e.stopPropagation();
11615
11754
  window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
11616
11755
  };
11617
11756
  break;
11618
11757
  case "dismiss":
11619
- element.onclick = function () {
11758
+ element.onclick = function (e) {
11759
+ e.stopPropagation();
11620
11760
  window.Apxor.logActionEvent("".concat(_this.type, "_dismissed"), _this.configId, _this.name);
11621
11761
  };
11622
11762
  break;
11623
11763
  case "never":
11624
- element.onclick = function () {
11764
+ element.onclick = function (e) {
11765
+ e.stopPropagation();
11625
11766
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
11626
11767
  window.Apxor.logActionEvent("never_show_clicked", _this.configId, _this.name);
11627
11768
  };
11628
11769
  break;
11629
11770
  case "toggle-class":
11630
- element.onclick = function () {
11771
+ element.onclick = function (e) {
11772
+ e.stopPropagation();
11631
11773
  var elementToBeToggled = document.getElementById(action.target_id);
11632
11774
  if (isNull(elementToBeToggled)) {
11633
11775
  elementToBeToggled = document.querySelector(action.target_id);
@@ -11638,8 +11780,9 @@
11638
11780
  };
11639
11781
  break;
11640
11782
  case "copy-content":
11641
- element.onclick = function () {
11642
- var textToCopy = element.innerText;
11783
+ element.onclick = function (e) {
11784
+ e.stopPropagation();
11785
+ var textToCopy = action === null || action === void 0 ? void 0 : action.content;
11643
11786
  var tempInput = document.createElement("input");
11644
11787
  tempInput.value = textToCopy;
11645
11788
  document.body.appendChild(tempInput);
@@ -11649,12 +11792,14 @@
11649
11792
  };
11650
11793
  break;
11651
11794
  case "log-app-event":
11652
- element.onclick = function () {
11795
+ element.onclick = function (e) {
11796
+ e.stopPropagation();
11653
11797
  window.Apxor.logAppEvent(action === null || action === void 0 ? void 0 : action.event_name);
11654
11798
  };
11655
11799
  break;
11656
11800
  case "log-client-event":
11657
- element.onclick = function () {
11801
+ element.onclick = function (e) {
11802
+ e.stopPropagation();
11658
11803
  window.Apxor.logClientEvent(action === null || action === void 0 ? void 0 : action.event_name);
11659
11804
  };
11660
11805
  }
@@ -11663,10 +11808,10 @@
11663
11808
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
11664
11809
  element.style.position = "relative";
11665
11810
  config.absolute_position_children.forEach(function (childConfig) {
11666
- var childElement = _this.aDYe(childConfig);
11811
+ var childElement = _this.OKHv(childConfig);
11667
11812
  childElement.style.position = "absolute";
11668
- for (var _prop3 in childConfig.offset) {
11669
- childElement.style[_prop3] = childConfig.offset[_prop3];
11813
+ for (var _prop in childConfig.offset) {
11814
+ childElement.style[_prop] = childConfig.offset[_prop];
11670
11815
  }
11671
11816
  element.appendChild(childElement);
11672
11817
  });
@@ -11681,19 +11826,25 @@
11681
11826
  // }
11682
11827
 
11683
11828
  config.children.forEach(function (childConfig) {
11684
- var childElement = _this.aDYe(childConfig);
11829
+ var childElement = _this.OKHv(childConfig);
11685
11830
  element.appendChild(childElement);
11686
11831
  });
11687
11832
  }
11833
+ if (config.type === "img") {
11834
+ var imgWrapper = document.createElement("div");
11835
+ imgWrapper.appendChild(element);
11836
+ return imgWrapper;
11837
+ }
11688
11838
  return element;
11689
11839
  });
11690
11840
  this.configId = configId;
11691
11841
  this.name = name;
11692
11842
  this.layout = _config.layout;
11693
- this.styleContent = _config.styleSheet;
11843
+ this.styleContent = _config.css;
11694
11844
  this.termination = (_config$termination = _config.termination) !== null && _config$termination !== void 0 ? _config$termination : [];
11695
11845
  this.script = _config.script;
11696
11846
  this.type = type;
11847
+ this.initialStyles = "";
11697
11848
  });
11698
11849
 
11699
11850
  var svgNS$1 = "http://www.w3.org/2000/svg";
@@ -12177,7 +12328,7 @@
12177
12328
 
12178
12329
  var NewInLineTooltip = /*#__PURE__*/function () {
12179
12330
  function NewInLineTooltip(config, terminationConfig, messageConfig, rtmInstance, showCallback, hideCallback) {
12180
- var _config$set_font_to_s;
12331
+ var _config$set_font_to_s, _config$dimensions, _config$dimensions2, _config$dimensions3, _config$dimensions4;
12181
12332
  _classCallCheck(this, NewInLineTooltip);
12182
12333
  this.uiConfig = config;
12183
12334
  this.messageConfig = messageConfig;
@@ -12230,16 +12381,12 @@
12230
12381
  this.updateSkid = null;
12231
12382
  this.initial_data_placement = this.position.position;
12232
12383
  this.recent_placement = this.position.position;
12233
- this.layout_type = config.layout_type;
12234
- if (this.layout_type === "web-inline") {
12235
- var _config$dimensions, _config$dimensions2, _config$dimensions3, _config$dimensions4;
12236
- this.targetElementTop = config === null || config === void 0 || (_config$dimensions = config.dimensions) === null || _config$dimensions === void 0 ? void 0 : _config$dimensions.top;
12237
- // this.right = config.dimensions.right;
12238
- // this.bottom = config.dimensions.bottom;
12239
- this.targetElementLeft = config === null || config === void 0 || (_config$dimensions2 = config.dimensions) === null || _config$dimensions2 === void 0 ? void 0 : _config$dimensions2.left;
12240
- this.targetElementHeight = config === null || config === void 0 || (_config$dimensions3 = config.dimensions) === null || _config$dimensions3 === void 0 ? void 0 : _config$dimensions3.height;
12241
- this.targetElementWidth = config === null || config === void 0 || (_config$dimensions4 = config.dimensions) === null || _config$dimensions4 === void 0 ? void 0 : _config$dimensions4.width;
12242
- }
12384
+ this.targetElementTop = config === null || config === void 0 || (_config$dimensions = config.dimensions) === null || _config$dimensions === void 0 ? void 0 : _config$dimensions.top;
12385
+ // this.right = config.dimensions.right;
12386
+ // this.bottom = config.dimensions.bottom;
12387
+ this.targetElementLeft = config === null || config === void 0 || (_config$dimensions2 = config.dimensions) === null || _config$dimensions2 === void 0 ? void 0 : _config$dimensions2.left;
12388
+ this.targetElementHeight = config === null || config === void 0 || (_config$dimensions3 = config.dimensions) === null || _config$dimensions3 === void 0 ? void 0 : _config$dimensions3.height;
12389
+ this.targetElementWidth = config === null || config === void 0 || (_config$dimensions4 = config.dimensions) === null || _config$dimensions4 === void 0 ? void 0 : _config$dimensions4.width;
12243
12390
  }
12244
12391
  _createClass(NewInLineTooltip, [{
12245
12392
  key: "createNewTooltip",
@@ -12270,11 +12417,7 @@
12270
12417
  var targetValidCallback = function targetValidCallback() {
12271
12418
  //Once the target is found then scroll into it.
12272
12419
  // this._scrollIntoTargetIfNeeded(targetReachedCallback);
12273
- if (_this.layout_type === "web-inline") {
12274
- targetReachedCallback();
12275
- } else {
12276
- _this._scrollIntoTargetIfNeeded(targetReachedCallback);
12277
- }
12420
+ targetReachedCallback();
12278
12421
  };
12279
12422
 
12280
12423
  // Set the target for InLine tooltip
@@ -12287,15 +12430,13 @@
12287
12430
  }, {
12288
12431
  key: "updateElementPositionOnScroll",
12289
12432
  value: function updateElementPositionOnScroll(top, left, height, width) {
12433
+ var _window;
12290
12434
  setAttributes$1(this.targetElement, {
12291
12435
  style: "position: absolute; top: ".concat(top, "px; left: ").concat(left, "px; height: ").concat(height, "px; width: ").concat(width, "px")
12292
12436
  });
12293
- if (this.layout_type === "web-inline") {
12294
- var _window;
12295
- var tippyRoot = document.querySelector("[data-tippy-root]").getBoundingClientRect();
12296
- (_window = window) === null || _window === void 0 || (_window = _window.ApxorWebView) === null || _window === void 0 || _window.setInlineRect(tippyRoot.left, tippyRoot.top, tippyRoot.width, tippyRoot.height);
12297
- window.dispatchEvent(new CustomEvent("updateMaskOpeningPositionOnScroll"));
12298
- }
12437
+ var tippyRoot = document.querySelector("[data-tippy-root]").getBoundingClientRect();
12438
+ (_window = window) === null || _window === void 0 || (_window = _window.ApxorWebView) === null || _window === void 0 || _window.setInlineRect(tippyRoot.left, tippyRoot.top, tippyRoot.width, tippyRoot.height);
12439
+ window.dispatchEvent(new CustomEvent("updateMaskOpeningPositionOnScroll"));
12299
12440
  }
12300
12441
  }, {
12301
12442
  key: "_setInlineStyles",
@@ -12448,17 +12589,13 @@
12448
12589
  _this2._resetRTMAction();
12449
12590
  }
12450
12591
  };
12451
- if (this.layout_type === "web-inline") {
12452
- this.targetElement = document.createElement("div");
12453
- setAttributes$1(this.targetElement, {
12454
- id: "apx_targetElement_".concat(this.configId),
12455
- style: "position: absolute; top: ".concat(this.targetElementTop, "px; left: ").concat(this.targetElementLeft, "px; height: ").concat(this.targetElementHeight, "px; width: ").concat(this.targetElementWidth, "px")
12456
- });
12457
- document.body.appendChild(this.targetElement);
12458
- targetValidCallback();
12459
- } else {
12460
- this._findTargetElement(targetFoundCallback);
12461
- }
12592
+ this.targetElement = document.createElement("div");
12593
+ setAttributes$1(this.targetElement, {
12594
+ id: "apx_targetElement_".concat(this.configId),
12595
+ style: "position: absolute; top: ".concat(this.targetElementTop, "px; left: ").concat(this.targetElementLeft, "px; height: ").concat(this.targetElementHeight, "px; width: ").concat(this.targetElementWidth, "px")
12596
+ });
12597
+ document.body.appendChild(this.targetElement);
12598
+ targetFoundCallback();
12462
12599
  }
12463
12600
  }, {
12464
12601
  key: "_targetClickCallback",
@@ -12592,7 +12729,7 @@
12592
12729
  }, {
12593
12730
  key: "_setInLineContent",
12594
12731
  value: function _setInLineContent() {
12595
- this.inLineContainer = this.templateContent.uEWO();
12732
+ this.inLineContainer = this.templateContent.FbqU();
12596
12733
  }
12597
12734
  }, {
12598
12735
  key: "_setObservors",
@@ -12635,7 +12772,7 @@
12635
12772
  },
12636
12773
  arrow: this.enable_arrow,
12637
12774
  appendTo: function appendTo() {
12638
- return _this6.layout_type === "web-inline" ? _this6.targetElement : document.body;
12775
+ return _this6.targetElement;
12639
12776
  },
12640
12777
  content: this.inLineContainer,
12641
12778
  duration: 100,
@@ -12677,6 +12814,7 @@
12677
12814
  instance.popperInstance.update();
12678
12815
  },
12679
12816
  onShown: function onShown() {
12817
+ var _window3;
12680
12818
  // const tippyRoot = document.querySelector("[data-tippy-root]");
12681
12819
  // const tippyBox = document.querySelector(".tippy-box");
12682
12820
  // const placement = tippyBox.getAttribute("data-placement");
@@ -12712,11 +12850,8 @@
12712
12850
  _this6.updateSkid();
12713
12851
  _this6._showTippy();
12714
12852
  window.addEventListener("scroll", _this6.updateSkid);
12715
- if (_this6.layout_type === "web-inline") {
12716
- var _window3;
12717
- var tippyRoot = document.querySelector("[data-tippy-root]").getBoundingClientRect();
12718
- (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorWebView) === null || _window3 === void 0 || _window3.setInlineRect(tippyRoot.left, tippyRoot.top, tippyRoot.width, tippyRoot.height);
12719
- }
12853
+ var tippyRoot = document.querySelector("[data-tippy-root]").getBoundingClientRect();
12854
+ (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorWebView) === null || _window3 === void 0 || _window3.setInlineRect(tippyRoot.left, tippyRoot.top, tippyRoot.width, tippyRoot.height);
12720
12855
  },
12721
12856
  placement: this.position.position,
12722
12857
  popperOptions: {
@@ -14130,7 +14265,9 @@
14130
14265
  */
14131
14266
  function InLineTooltip(config, uis, walkthroughConfigs, terminationConfig, messageConfig, rtmInstance, showCallback, hideCallback, stepperCallBack) {
14132
14267
  var _this = this,
14133
- _config$set_font_to_s;
14268
+ _config$set_font_to_s,
14269
+ _config$wait_scroll_i,
14270
+ _config$wait_scroll_i2;
14134
14271
  var isWalkthrough = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
14135
14272
  var index = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : 0;
14136
14273
  _classCallCheck(this, InLineTooltip);
@@ -14140,7 +14277,7 @@
14140
14277
  * @description Creates the styles for Marketing message.
14141
14278
  * @returns {string} css styles
14142
14279
  */
14143
- _defineProperty(this, "ybFC", function () {
14280
+ _defineProperty(this, "IrSW", function () {
14144
14281
  if (!_this.enable_marketing) {
14145
14282
  return "";
14146
14283
  }
@@ -14159,7 +14296,7 @@
14159
14296
  * @private
14160
14297
  * @description Sets the marketing content at the end of the Inline
14161
14298
  */
14162
- _defineProperty(this, "smLX", function () {
14299
+ _defineProperty(this, "pcuy", function () {
14163
14300
  if (_this.enable_marketing) {
14164
14301
  var marketingContainer = document.createElement("div");
14165
14302
  marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
@@ -14269,6 +14406,8 @@
14269
14406
  this.flag = true;
14270
14407
  this.enable_nocode_events = (config === null || config === void 0 ? void 0 : config.enable_nocode_events) || false;
14271
14408
  this.customFontList = [];
14409
+ this.scrollIntervalCount = (_config$wait_scroll_i = config === null || config === void 0 ? void 0 : config.wait_scroll_interval) !== null && _config$wait_scroll_i !== void 0 ? _config$wait_scroll_i : 4;
14410
+ this.scrollCompletelyInViewCount = (_config$wait_scroll_i2 = config === null || config === void 0 ? void 0 : config.wait_scroll_interval) !== null && _config$wait_scroll_i2 !== void 0 ? _config$wait_scroll_i2 : 4;
14272
14411
  }
14273
14412
  _createClass(InLineTooltip, [{
14274
14413
  key: "createNewTooltip",
@@ -14529,24 +14668,42 @@
14529
14668
  // const initialScrollPosition =
14530
14669
  // this.targetElement.getBoundingClientRect().top;
14531
14670
  this.targetElement.scrollIntoView(scrollIntoViewOptions);
14532
- window.setTimeout(function () {
14533
- var isTargetElementCovered = isElementCovered(_this5.targetElement);
14534
- if (isTargetElementCovered) {
14535
- window.setTimeout(function () {
14536
- var isTargetElementCovered = isElementCovered(_this5.targetElement);
14537
- if (isTargetElementCovered) {
14538
- console.info("The tooltip is not visible because another element is overlapping the target element.");
14539
- _this5._resetRTMAction();
14540
- } else {
14541
- targetReachedCallback();
14542
- }
14543
- }, 1000);
14544
- // console.info(
14545
- // "The tooltip is not visible because another element is overlapping the target element."
14546
- // );
14547
- // this._resetRTMAction();
14671
+ // window.setTimeout(() => {
14672
+ // const isTargetElementCovered = isElementCovered(this.targetElement);
14673
+ // if (isTargetElementCovered) {
14674
+ // window.setTimeout(() => {
14675
+ // const isTargetElementCovered = isElementCovered(
14676
+ // this.targetElement
14677
+ // );
14678
+ // if (isTargetElementCovered) {
14679
+ // console.info(
14680
+ // "The tooltip is not visible because another element is overlapping the target element."
14681
+ // );
14682
+ // this._resetRTMAction();
14683
+ // } else {
14684
+ // targetReachedCallback();
14685
+ // }
14686
+ // }, 1000);
14687
+ // // console.info(
14688
+ // // "The tooltip is not visible because another element is overlapping the target element."
14689
+ // // );
14690
+ // // this._resetRTMAction();
14691
+ // } else {
14692
+ // targetReachedCallback();
14693
+ // }
14694
+ // }, 1000);
14695
+ this.scrollIntervalId = window.setInterval(function () {
14696
+ if (_this5.scrollIntervalCount <= 0) {
14697
+ console.info("The tooltip is not visible because another element is overlapping the target element.");
14698
+ _this5._resetRTMAction();
14699
+ clearInterval(_this5.scrollIntervalId);
14548
14700
  } else {
14549
- targetReachedCallback();
14701
+ _this5.scrollIntervalCount--;
14702
+ var is_element_covered = isElementCovered(_this5.targetElement);
14703
+ if (!is_element_covered) {
14704
+ targetReachedCallback();
14705
+ clearInterval(_this5.scrollIntervalId);
14706
+ }
14550
14707
  }
14551
14708
  }, 1000);
14552
14709
  isscrolled = true;
@@ -14557,8 +14714,24 @@
14557
14714
  }
14558
14715
  } else {
14559
14716
  if (this.scrollToView) {
14560
- isElementCompletlyInView(this.targetElement);
14561
- console.log("is completely in view");
14717
+ if (!isElementCompletlyInView(this.targetElement)) {
14718
+ this.scrollCompletelyInViewId = window.setInterval(function () {
14719
+ if (_this5.scrollCompletelyInViewCount <= 0) {
14720
+ console.info("The tooltip is not completely in viewport, hence not showing the tooltip.");
14721
+ _this5._resetRTMAction();
14722
+ clearInterval(_this5.scrollCompletelyInViewCount);
14723
+ } else {
14724
+ _this5.scrollCompletelyInViewCount--;
14725
+ var is_element_covered = isElementCovered(_this5.targetElement);
14726
+ if (isElementCompletlyInView(_this5.targetElement) && !is_element_covered) {
14727
+ console.log("is completely in view");
14728
+ targetReachedCallback();
14729
+ isscrolled = true;
14730
+ clearInterval(_this5.scrollCompletelyInViewCount);
14731
+ }
14732
+ }
14733
+ }, 1000);
14734
+ }
14562
14735
  }
14563
14736
  scrolled = true;
14564
14737
  }
@@ -14725,7 +14898,7 @@
14725
14898
  if (apxor_tooltip_styles) {
14726
14899
  return;
14727
14900
  }
14728
- 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.ybFC(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
14901
+ 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.IrSW(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
14729
14902
  var styleNode = document.createElement("style");
14730
14903
  styleNode.setAttribute("apx-tooltip-styles", "");
14731
14904
  styleNode.innerHTML = styles;
@@ -15535,7 +15708,7 @@
15535
15708
  this._setCloseButton();
15536
15709
 
15537
15710
  //Set the Marketing content
15538
- this.smLX();
15711
+ this.pcuy();
15539
15712
  }
15540
15713
 
15541
15714
  /**
@@ -18380,7 +18553,7 @@
18380
18553
  }, {
18381
18554
  key: "_setInAppModalContent",
18382
18555
  value: function _setInAppModalContent() {
18383
- this.inAppContainer = this.templateContent.uEWO();
18556
+ this.inAppContainer = this.templateContent.FbqU();
18384
18557
  this.inAppContainer.style.zIndex = 99999;
18385
18558
  this.overlayElement.appendChild(this.inAppContainer);
18386
18559
  }
@@ -18528,7 +18701,7 @@
18528
18701
  * @description Creates the styles for Marketing message.
18529
18702
  * @returns {string} css styles
18530
18703
  */
18531
- _defineProperty(this, "ybFC", function () {
18704
+ _defineProperty(this, "IrSW", function () {
18532
18705
  if (!_this.enable_marketing) {
18533
18706
  return "";
18534
18707
  }
@@ -18574,7 +18747,7 @@
18574
18747
  * @private
18575
18748
  * @description Get the response for Form content in the InApp modal.
18576
18749
  */
18577
- _defineProperty(this, "YLdL", function (form_elements) {
18750
+ _defineProperty(this, "NTBD", function (form_elements) {
18578
18751
  var obj = {};
18579
18752
  var callback = "";
18580
18753
  form_elements.forEach(function (element) {
@@ -18614,7 +18787,7 @@
18614
18787
  * @private
18615
18788
  * @description Sets the marketing content at the end of the InApp
18616
18789
  */
18617
- _defineProperty(this, "smLX", function () {
18790
+ _defineProperty(this, "pcuy", function () {
18618
18791
  if (_this.enable_marketing) {
18619
18792
  var marketingContainer = document.createElement("div");
18620
18793
  marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
@@ -18867,7 +19040,7 @@
18867
19040
  }, {
18868
19041
  key: "_setStyles",
18869
19042
  value: function _setStyles() {
18870
- 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.ybFC(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
19043
+ 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.IrSW(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
18871
19044
  var styleNode = document.createElement("style");
18872
19045
  styleNode.setAttribute("id", "apxor-style-" + this.configId);
18873
19046
  styleNode.innerHTML = styles;
@@ -19344,7 +19517,7 @@
19344
19517
  this._setCloseButton();
19345
19518
 
19346
19519
  //Set the Marketing content
19347
- this.smLX();
19520
+ this.pcuy();
19348
19521
  }
19349
19522
 
19350
19523
  /**
@@ -19549,7 +19722,7 @@
19549
19722
  var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
19550
19723
  form.addEventListener("submit", function (e) {
19551
19724
  e.preventDefault();
19552
- var _this4$generateRespon = _this4.YLdL(_this4.form.elements),
19725
+ var _this4$generateRespon = _this4.NTBD(_this4.form.elements),
19553
19726
  obj = _this4$generateRespon.obj,
19554
19727
  callback = _this4$generateRespon.callback;
19555
19728
  var evalString = "(obj)=>" + callback + "(obj)";
@@ -19862,7 +20035,7 @@
19862
20035
  * @function showVideoInApp
19863
20036
  * @description Shows the video InApp with the configured mode.
19864
20037
  */
19865
- _defineProperty(this, "NpYM", function () {
20038
+ _defineProperty(this, "showVideoInApp", function () {
19866
20039
  _this.createPlayer();
19867
20040
  try {
19868
20041
  // In PIP mode, only after the video metadata is loaded, show the PIP.
@@ -19904,7 +20077,7 @@
19904
20077
  };
19905
20078
  } else {
19906
20079
  // As the video player is hidden by default, unhide if the mode is not PIP.
19907
- _this.zvCD();
20080
+ _this.GXJg();
19908
20081
  }
19909
20082
  _this.showCallback();
19910
20083
  } catch (e) {
@@ -19924,7 +20097,7 @@
19924
20097
  * For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
19925
20098
  * For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
19926
20099
  */
19927
- _defineProperty(this, "lwnm", function () {
20100
+ _defineProperty(this, "AvhK", function () {
19928
20101
  var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
19929
20102
  width = _getHeightWidthFromRe.width,
19930
20103
  height = _getHeightWidthFromRe.height;
@@ -19936,7 +20109,7 @@
19936
20109
  * @private
19937
20110
  * @description Removes the video player style element.
19938
20111
  */
19939
- _defineProperty(this, "dQmQ", function () {
20112
+ _defineProperty(this, "EBLK", function () {
19940
20113
  var playerStyles = document.getElementById("apx-mpl-styles");
19941
20114
  if (playerStyles) {
19942
20115
  playerStyles.remove();
@@ -19947,7 +20120,7 @@
19947
20120
  * @private
19948
20121
  * @description Attach listeners on the video controls
19949
20122
  */
19950
- _defineProperty(this, "pycW", function () {
20123
+ _defineProperty(this, "PjLl", function () {
19951
20124
  // Listener for the video end. Display the CTA's when the video ends.
19952
20125
  _this.videoElement.addEventListener("ended", function () {
19953
20126
  var ctaButtons = document.getElementById("apx-cta-btn");
@@ -20058,7 +20231,7 @@
20058
20231
  * @private
20059
20232
  * @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
20060
20233
  */
20061
- _defineProperty(this, "xnYc", function () {
20234
+ _defineProperty(this, "WzKs", function () {
20062
20235
  var _this$terminationConf;
20063
20236
  if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
20064
20237
  // On Exit of the PIP,
@@ -20098,7 +20271,7 @@
20098
20271
  * @private Sets the custom controls on the video player.
20099
20272
  * PIP and close are the custom controls that are created and positions on the video.
20100
20273
  */
20101
- _defineProperty(this, "HTLJ", function () {
20274
+ _defineProperty(this, "DkQa", function () {
20102
20275
  _this.enable_close_button;
20103
20276
  if (_this.enable_close_button) {
20104
20277
  var closeButton = document.createElement("span");
@@ -20145,21 +20318,21 @@
20145
20318
  * @function hideVideoPlayer
20146
20319
  * @description Sets the visibility of the video player to hidden.
20147
20320
  */
20148
- _defineProperty(this, "KNRZ", function () {
20321
+ _defineProperty(this, "Aacc", function () {
20149
20322
  _this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
20150
20323
  });
20151
20324
  /**
20152
20325
  * @function unhideVideoPlayer
20153
20326
  * @description Unhides video player.
20154
20327
  */
20155
- _defineProperty(this, "zvCD", function () {
20328
+ _defineProperty(this, "GXJg", function () {
20156
20329
  _this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
20157
20330
  });
20158
20331
  /**
20159
20332
  * @function getVideoElement
20160
20333
  * @returns {HTMLElement} Video ekement
20161
20334
  */
20162
- _defineProperty(this, "gowd", function () {
20335
+ _defineProperty(this, "gHbQ", function () {
20163
20336
  return _this.videoElement;
20164
20337
  });
20165
20338
  this.videoPlayer = null;
@@ -20211,7 +20384,7 @@
20211
20384
  this.videoPlayer.style.backgroundColor = this.bg_color;
20212
20385
 
20213
20386
  // Video has a resolution, not deviating from the resolution set the height and width.
20214
- this.lwnm();
20387
+ this.AvhK();
20215
20388
  //Generate the styles and add them to the document head.
20216
20389
  this._setVideoPlayerStyles();
20217
20390
  //Set the position of the video player with in the 5 possible positions.
@@ -20219,16 +20392,16 @@
20219
20392
  //Create a video element,set the source and add to the container.
20220
20393
  this._setPlayerContent();
20221
20394
  //Set the listeners on the video control buttons.
20222
- this.pycW();
20395
+ this.PjLl();
20223
20396
  //Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
20224
- this.xnYc();
20397
+ this.WzKs();
20225
20398
  //Set the custom close and PIP controls. Not using the defaults from the html video element.
20226
20399
  //Reason - We want to position them at the top right and left positions.
20227
- this.HTLJ();
20400
+ this.DkQa();
20228
20401
  //Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
20229
20402
  this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
20230
20403
  //Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
20231
- this.KNRZ();
20404
+ this.Aacc();
20232
20405
  //If the auto dismiss is enabled, sets the timeout to call the InApp close.
20233
20406
  this._setAutoTerminate();
20234
20407
  document.body.appendChild(this.videoPlayer);
@@ -20342,7 +20515,7 @@
20342
20515
  }
20343
20516
  }
20344
20517
  this.videoPlayer.remove();
20345
- this.dQmQ();
20518
+ this.EBLK();
20346
20519
  if (closeButtonName !== "auto_dismiss") {
20347
20520
  window.Apxor.logAppEvent("apx_video_inapp_close_button_clicked", JSON.stringify({
20348
20521
  message_name: this.name,
@@ -20410,7 +20583,7 @@
20410
20583
  replayCount: _this3.replayCount
20411
20584
  }));
20412
20585
  _this3.videoPlayer.remove();
20413
- _this3.dQmQ();
20586
+ _this3.EBLK();
20414
20587
  _this3.hideCallback();
20415
20588
  } catch (e) {
20416
20589
  console.log("Can't close the video player\n".concat(e));
@@ -20499,32 +20672,80 @@
20499
20672
  var _this = this,
20500
20673
  _config$termination;
20501
20674
  _classCallCheck(this, EmbedCards);
20502
- _defineProperty(this, "showEmbedCardsv2", function () {
20503
- var element = _this.cJtv(_this.layout);
20504
- _this.VnpN();
20505
- window.onresize = function () {
20506
- _this.vLoj();
20507
- };
20508
- document.body.appendChild(element);
20509
- var styleElement = document.createElement("style");
20510
- styleElement.innerHTML = _this.styleContent;
20511
- document.head.appendChild(styleElement);
20512
- _this.yfBX(_this.termination);
20675
+ _defineProperty(this, "showEmbedCards", function () {
20513
20676
  try {
20514
- eval(_this.script);
20677
+ var _window;
20678
+ (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.debug("called showEmbedCards");
20679
+ var element = _this.FHhB(_this.layout);
20680
+ _this.Txlk();
20681
+ window.onresize = function () {
20682
+ _this.KXvL();
20683
+ };
20684
+ var rootContainer = document.createElement("div");
20685
+ rootContainer.style.display = "flex";
20686
+ rootContainer.style.justifyContent = "center";
20687
+ rootContainer.appendChild(element);
20688
+ document.body.appendChild(rootContainer);
20689
+ var styleElement = document.createElement("style");
20690
+ styleElement.innerHTML = _this.styleContent;
20691
+ document.head.appendChild(styleElement);
20692
+ _this.rEHS(_this.termination);
20693
+ try {
20694
+ eval(_this.script);
20695
+ } catch (e) {
20696
+ var _window2;
20697
+ console.log("found error while executing script: ".concat(e));
20698
+ (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.ApxorLogger) === null || _window2 === void 0 || _window2.error("found error while executing script: ".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
20699
+ }
20700
+ var videoStatusCheck = function videoStatusCheck() {
20701
+ _this.intervalToCheckVideoStatus = setInterval(function () {
20702
+ _this.waitInterval = _this.waitInterval - 1;
20703
+ if (_this.waitInterval === 0) {
20704
+ var _window3;
20705
+ clearInterval(_this.intervalToCheckVideoStatus);
20706
+ window.Apxor.logAppEvent("apx_nudge_not_shown", JSON.stringify({
20707
+ campaignName: _this.name,
20708
+ id: _this.configId,
20709
+ apx_nudge_type: "sticky_card",
20710
+ apx_notshown_type: "error",
20711
+ apx_reason: "provided video doesn't exists"
20712
+ }));
20713
+ window.onresize = null;
20714
+ (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorWidget) === null || _window3 === void 0 || _window3.removeEmbedCard(_this.configId);
20715
+ _this.waitInterval = 30;
20716
+ }
20717
+ if (_this.taZM()) {
20718
+ _this.waitInterval = 30;
20719
+ _this.KXvL();
20720
+ clearInterval(_this.intervalToCheckVideoStatus);
20721
+ }
20722
+ }, 100);
20723
+ };
20724
+ _this.intervalToCheckImgStatus = setInterval(function () {
20725
+ _this.waitInterval = _this.waitInterval - 1;
20726
+ if (_this.waitInterval === 0) {
20727
+ clearInterval(_this.intervalToCheckImgStatus);
20728
+ _this.waitInterval = 30;
20729
+ }
20730
+ if (_this.cIIu()) {
20731
+ _this.waitInterval = 30;
20732
+ clearInterval(_this.intervalToCheckImgStatus);
20733
+ _this.videoElements.length > 0 ? videoStatusCheck() : _this.KXvL();
20734
+ }
20735
+ }, 100);
20515
20736
  } catch (e) {
20516
- console.log("found error while executing script: ".concat(e));
20737
+ var _window4;
20738
+ console.log("failed while creating embed card with error ".concat(e));
20739
+ (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorLogger) === null || _window4 === void 0 || _window4.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));
20517
20740
  }
20518
- _this.showCallback();
20519
- _this.vLoj();
20520
20741
  });
20521
- _defineProperty(this, "VnpN", function () {
20742
+ _defineProperty(this, "Txlk", function () {
20522
20743
  var EmbeddedCardsStyles = document.createElement("style");
20523
20744
  EmbeddedCardsStyles.innerHTML = _this.initialStyles;
20524
20745
  EmbeddedCardsStyles.setAttribute("apx-tooltip-styles", "");
20525
20746
  document.head.appendChild(EmbeddedCardsStyles);
20526
20747
  });
20527
- _defineProperty(this, "cJtv", function (config) {
20748
+ _defineProperty(this, "FHhB", function (config) {
20528
20749
  var _window$Apxor;
20529
20750
  var element;
20530
20751
  switch (config.type) {
@@ -20537,26 +20758,27 @@
20537
20758
  case "video":
20538
20759
  element = document.createElement("video");
20539
20760
  element.controlsList = "noplaybackrate nodownload nofullscreen";
20540
- element.controls = true;
20761
+ element.controls = false;
20762
+ element.muted = true;
20541
20763
  element.disablePictureInPicture = true;
20542
20764
  element.autoplay = true;
20543
20765
  if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
20544
20766
  element.playsInline = true;
20545
20767
  }
20546
- if (config.source) {
20547
- var sourceElement = document.createElement("source");
20548
- for (var prop in config.source) {
20549
- sourceElement[prop] = config.source[prop];
20550
- }
20551
- element.appendChild(sourceElement);
20552
- }
20553
- if (config.track) {
20554
- var trackElement = document.createElement("track");
20555
- for (var _prop in config.track) {
20556
- trackElement[_prop] = config.track[_prop];
20557
- }
20558
- element.appendChild(trackElement);
20559
- }
20768
+ // if (config.source) {
20769
+ // let sourceElement = document.createElement("source");
20770
+ // for (let prop in config.source) {
20771
+ // sourceElement[prop] = config.source[prop];
20772
+ // }
20773
+ // element.appendChild(sourceElement);
20774
+ // }
20775
+ // if (config.track) {
20776
+ // let trackElement = document.createElement("track");
20777
+ // for (let prop in config.track) {
20778
+ // trackElement[prop] = config.track[prop];
20779
+ // }
20780
+ // element.appendChild(trackElement);
20781
+ // }
20560
20782
  break;
20561
20783
  default:
20562
20784
  element = document.createElement(config.type);
@@ -20566,13 +20788,31 @@
20566
20788
  // );
20567
20789
 
20568
20790
  if (config.properties) {
20569
- for (var _prop2 in config.properties) {
20570
- element[_prop2] = config.properties[_prop2];
20791
+ for (var prop in config.properties) {
20792
+ if (config.type === "img" && prop === "src" || config.type === "img" && prop === "format") continue;
20793
+ if (config.type === "video" && prop === "source") {
20794
+ var sourceElement = document.createElement("source");
20795
+ for (var srcprop in (_config$properties = config.properties) === null || _config$properties === void 0 ? void 0 : _config$properties[prop]) {
20796
+ var _config$properties, _config$properties2;
20797
+ sourceElement[srcprop] = (_config$properties2 = config.properties) === null || _config$properties2 === void 0 || (_config$properties2 = _config$properties2[prop]) === null || _config$properties2 === void 0 ? void 0 : _config$properties2[srcprop];
20798
+ }
20799
+ sourceElement["type"] = "video/mp4";
20800
+ element.appendChild(sourceElement);
20801
+ continue;
20802
+ }
20803
+ element[prop] = config.properties[prop];
20571
20804
  }
20572
20805
  }
20573
20806
  element.classList.add(config._id);
20574
20807
  if (config.css) {
20575
- var styles = ".".concat(config._id, " {\n ").concat(config.css, "\n }\n ");
20808
+ var styles = "";
20809
+ if (config.type === "img") {
20810
+ var styleObject = parseCSS(config.css);
20811
+ var imgStyleObject = removeKeys(styleObject, Object.keys(imgWrapperStyles));
20812
+ styles = ".".concat(config._id, " {\n ").concat(objectToCSS(imgStyleObject), "\n }\n ");
20813
+ } else {
20814
+ styles = ".".concat(config._id, " {\n ").concat(config.css, "\n }\n ");
20815
+ }
20576
20816
  _this.initialStyles += styles;
20577
20817
  }
20578
20818
  if (config.enable_actions && config.actions.length > 0) {
@@ -20582,6 +20822,7 @@
20582
20822
  case "activity":
20583
20823
  case "ir":
20584
20824
  element.onclick = function (e) {
20825
+ e.stopPropagation();
20585
20826
  window.Apxor.redirect(JSON.stringify(action));
20586
20827
  var additional_info = {
20587
20828
  campaignName: _this.name,
@@ -20591,27 +20832,46 @@
20591
20832
  if (e.target.tagName === "BUTTON") {
20592
20833
  additional_info["apx_cta_text"] = e.target.innerHTML;
20593
20834
  }
20594
- window.Apxor.logAppEvent("apx_cta_clicked", JSON.stringify(additional_info));
20835
+ window.Apxor.logAppEvent("apx_nudge_CTA_clicked", JSON.stringify(additional_info));
20836
+ };
20837
+ break;
20838
+ case "show-video":
20839
+ element.onclick = function (e) {
20840
+ e.stopPropagation();
20841
+ window.Apxor.showVideoInApp(_this.configId, _this.name, action.url);
20842
+ var additional_info = {
20843
+ campaignName: _this.name,
20844
+ id: _this.configId,
20845
+ apx_nudge_type: "sticky_card"
20846
+ };
20847
+ if (e.target.tagName === "BUTTON") {
20848
+ additional_info["apx_cta_text"] = e.target.innerHTML;
20849
+ }
20850
+ window.Apxor.logAppEvent("apx_nudge_CTA_clicked", JSON.stringify(additional_info));
20595
20851
  };
20596
20852
  break;
20597
20853
  case "cancel":
20598
- element.onclick = function () {
20854
+ element.onclick = function (e) {
20855
+ e.stopPropagation();
20599
20856
  window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
20600
20857
  };
20601
20858
  break;
20602
20859
  case "dismiss":
20603
- element.onclick = function () {
20860
+ element.onclick = function (e) {
20861
+ e.stopPropagation();
20604
20862
  window.Apxor.logActionEvent("".concat(_this.type, "_dismissed"), _this.configId, _this.name);
20605
20863
  };
20606
20864
  break;
20607
20865
  case "never":
20608
- element.onclick = function () {
20866
+ element.onclick = function (e) {
20867
+ e.stopPropagation();
20609
20868
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
20610
20869
  window.Apxor.logActionEvent("never_show_clicked", _this.configId, _this.name);
20611
20870
  };
20612
20871
  break;
20613
20872
  case "toggle-class":
20614
- element.onclick = function () {
20873
+ element.onclick = function (e) {
20874
+ e.stopPropagation();
20615
20875
  var elementToBeToggled = document.getElementById(action === null || action === void 0 ? void 0 : action.target_id);
20616
20876
  if (isNull(elementToBeToggled)) {
20617
20877
  elementToBeToggled = document.querySelector(action === null || action === void 0 ? void 0 : action.target_id);
@@ -20622,8 +20882,9 @@
20622
20882
  };
20623
20883
  break;
20624
20884
  case "copy-content":
20625
- element.onclick = function () {
20626
- var textToCopy = element.innerText;
20885
+ element.onclick = function (e) {
20886
+ e.stopPropagation();
20887
+ var textToCopy = action === null || action === void 0 ? void 0 : action.content;
20627
20888
  var tempInput = document.createElement("input");
20628
20889
  tempInput.value = textToCopy;
20629
20890
  document.body.appendChild(tempInput);
@@ -20633,12 +20894,14 @@
20633
20894
  };
20634
20895
  break;
20635
20896
  case "log-app-event":
20636
- element.onclick = function () {
20897
+ element.onclick = function (e) {
20898
+ e.stopPropagation();
20637
20899
  window.Apxor.logAppEvent(action === null || action === void 0 ? void 0 : action.event_name);
20638
20900
  };
20639
20901
  break;
20640
20902
  case "log-client-event":
20641
- element.onclick = function () {
20903
+ element.onclick = function (e) {
20904
+ e.stopPropagation();
20642
20905
  window.Apxor.logClientEvent(action === null || action === void 0 ? void 0 : action.event_name);
20643
20906
  };
20644
20907
  }
@@ -20647,10 +20910,10 @@
20647
20910
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
20648
20911
  element.style.position = "relative";
20649
20912
  config.absolute_position_children.forEach(function (childConfig) {
20650
- var childElement = _this.aDYe(childConfig);
20913
+ var childElement = _this.OKHv(childConfig);
20651
20914
  childElement.style.position = "absolute";
20652
- for (var _prop3 in childConfig.offset) {
20653
- childElement.style[_prop3] = childConfig.offset[_prop3];
20915
+ for (var _prop in childConfig.offset) {
20916
+ childElement.style[_prop] = childConfig.offset[_prop];
20654
20917
  }
20655
20918
  element.appendChild(childElement);
20656
20919
  });
@@ -20665,13 +20928,33 @@
20665
20928
  // }
20666
20929
 
20667
20930
  config.children.forEach(function (childConfig) {
20668
- var childElement = _this.cJtv(childConfig);
20931
+ var childElement = _this.FHhB(childConfig);
20669
20932
  element.appendChild(childElement);
20670
20933
  });
20671
20934
  }
20935
+ if (config.type === "img") {
20936
+ var _config$properties3, _config$properties4, _window5, _window5$getFilePath;
20937
+ var src = config === null || config === void 0 || (_config$properties3 = config.properties) === null || _config$properties3 === void 0 ? void 0 : _config$properties3.src;
20938
+ var format = config === null || config === void 0 || (_config$properties4 = config.properties) === null || _config$properties4 === void 0 ? void 0 : _config$properties4.format;
20939
+ 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.configId, src, format)) || src : src;
20940
+ _this.imageElements.push(element);
20941
+ var imgWrapper = document.createElement("div");
20942
+ var _styleObject = parseCSS(config.css);
20943
+ Object.keys(imgWrapperStyles).forEach(function (prop) {
20944
+ if (prop in _styleObject) {
20945
+ imgWrapper.style[imgWrapperStyles[prop]] = _styleObject[prop];
20946
+ }
20947
+ });
20948
+ element.style.maxWidth = "100%";
20949
+ element.style.height = "auto";
20950
+ imgWrapper.appendChild(element);
20951
+ return imgWrapper;
20952
+ } else if (config.type === "video") {
20953
+ _this.videoElements.push(element);
20954
+ }
20672
20955
  return element;
20673
20956
  });
20674
- _defineProperty(this, "yfBX", function (config) {
20957
+ _defineProperty(this, "rEHS", function (config) {
20675
20958
  config.forEach(function (id) {
20676
20959
  var element = document.getElementById(id);
20677
20960
  if (element) {
@@ -20679,11 +20962,23 @@
20679
20962
  }
20680
20963
  });
20681
20964
  });
20682
- _defineProperty(this, "vLoj", function () {
20683
- var _window;
20965
+ _defineProperty(this, "cIIu", function () {
20966
+ return _this.imageElements.every(function (img) {
20967
+ return img.complete;
20968
+ });
20969
+ });
20970
+ _defineProperty(this, "taZM", function () {
20971
+ return _this.videoElements.every(function (video) {
20972
+ return video.readyState >= 3;
20973
+ });
20974
+ });
20975
+ _defineProperty(this, "KXvL", function () {
20976
+ var _window6, _window7;
20684
20977
  var width = window.document.querySelector("html").offsetWidth;
20685
20978
  var height = window.document.querySelector("html").offsetHeight;
20686
- (_window = window) === null || _window === void 0 || (_window = _window.ApxorWidget) === null || _window === void 0 || _window.setDimensions(width, height);
20979
+ (_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.ApxorWidget) === null || _window6 === void 0 || _window6.setDimensions(width, height);
20980
+ (_window7 = window) === null || _window7 === void 0 || (_window7 = _window7.ApxorLogger) === null || _window7 === void 0 || _window7.debug("called setWebViewDimensions with width: ".concat(width, " and height: ").concat(height));
20981
+ _this.showCallback();
20687
20982
  });
20688
20983
  this.configId = configId;
20689
20984
  this.name = name;
@@ -20694,19 +20989,25 @@
20694
20989
  this.termination = (_config$termination = _config.termination) !== null && _config$termination !== void 0 ? _config$termination : [];
20695
20990
  this.script = _config.script;
20696
20991
  this.initialStyles = "";
20992
+ this.imageElements = [];
20993
+ this.videoElements = [];
20994
+ this.intervalToCheckImgStatus;
20995
+ this.waitInterval = 30;
20697
20996
  });
20698
20997
 
20699
20998
  var RTM = /*#__PURE__*/_createClass(function RTM() {
20700
20999
  var _this = this;
20701
21000
  _classCallCheck(this, RTM);
20702
- _defineProperty(this, "XcHu", {});
21001
+ _defineProperty(this, "LikI", {});
20703
21002
  _defineProperty(this, "isShowingAction", false);
20704
21003
  _defineProperty(this, "currentAction", null);
20705
- _defineProperty(this, "ZTdX", null);
20706
- _defineProperty(this, "version", 55);
21004
+ _defineProperty(this, "WliE", null);
21005
+ _defineProperty(this, "version", 60);
20707
21006
  _defineProperty(this, "isInitialised", false);
20708
- _defineProperty(this, "_eventsInDynamicText", {});
20709
- _defineProperty(this, "ivBX", function () {
21007
+ _defineProperty(this, "KMXd", {});
21008
+ _defineProperty(this, "aAuZ", false);
21009
+ _defineProperty(this, "_isShownECCalled", false);
21010
+ _defineProperty(this, "NBcm", function () {
20710
21011
  _this.isInitialised = true;
20711
21012
  var oldPushState = history.pushState;
20712
21013
  history.pushState = function pushState() {
@@ -20731,7 +21032,7 @@
20731
21032
  });
20732
21033
  _defineProperty(this, "show", function (uiJson, duration, uuid, name) {
20733
21034
  if (!_this.isInitialised) {
20734
- _this.ivBX();
21035
+ _this.NBcm();
20735
21036
  }
20736
21037
  window.addEventListener("pagehide", function () {
20737
21038
  var _window$Apxor, _window$Apxor$pageUnl;
@@ -20740,7 +21041,9 @@
20740
21041
  try {
20741
21042
  // console.log("Showing action for uuid:", uuid, uiJson, this.currentAction);
20742
21043
  if (_this.currentAction !== null && _this.currentAction !== undefined) {
21044
+ var _window;
20743
21045
  console.error("An action already being shown");
21046
+ (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("An action already being shown");
20744
21047
  return;
20745
21048
  }
20746
21049
  uiJson = uiJson.split("\n").join("\\n");
@@ -20756,7 +21059,7 @@
20756
21059
  } else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
20757
21060
  _this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
20758
21061
  } else if (ui_config.display_type === "coach_mark_v2") {
20759
- _this.AQBm(ui_config, duration, uuid, name);
21062
+ _this.iPLW(ui_config, duration, uuid, name);
20760
21063
  } else {
20761
21064
  showCoachmarkWithDelay(_this, ui_config, {
20762
21065
  configId: uuid,
@@ -20764,21 +21067,21 @@
20764
21067
  }, terminationConfig, function () {
20765
21068
  _this.isShowingAction = true;
20766
21069
  if (window.Apxor && window.Apxor.logActionEvent) {
20767
- var _window, _window$updateFlag, _window2, _window2$updateCount;
20768
- (_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || (_window$updateFlag = _window.updateFlag) === null || _window$updateFlag === void 0 || _window$updateFlag.call(_window, true);
21070
+ var _window2, _window2$updateFlag, _window3, _window3$updateCount;
21071
+ (_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);
20769
21072
  window.Apxor.logActionEvent("inline_shown", uuid, name);
20770
- (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || (_window2$updateCount = _window2.updateCount) === null || _window2$updateCount === void 0 || _window2$updateCount.call(_window2, uuid);
21073
+ (_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);
20771
21074
  if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
20772
21075
  setTimeout(function () {
20773
- var _window3, _window3$logInternalE;
20774
- (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || (_window3$logInternalE = _window3.logInternalEvent) === null || _window3$logInternalE === void 0 || _window3$logInternalE.call(_window3, "capt");
21076
+ var _window4, _window4$logInternalE;
21077
+ (_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");
20775
21078
  }, 500);
20776
21079
  }
20777
21080
  }
20778
21081
  }, function (action) {
20779
- var _window4, _window4$updateFlag;
21082
+ var _window5, _window5$updateFlag;
20780
21083
  _this.isShowingAction = false;
20781
- (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || (_window4$updateFlag = _window4.updateFlag) === null || _window4$updateFlag === void 0 || _window4$updateFlag.call(_window4, false);
21084
+ (_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);
20782
21085
  _this.currentAction = null;
20783
21086
  if (window.Apxor && window.Apxor.logActionEvent && !(isDefined(action) && (action === "redirect" || action === "cancel"))) {
20784
21087
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -20788,10 +21091,11 @@
20788
21091
  });
20789
21092
  }
20790
21093
  } catch (e) {
20791
- var _window5, _window5$updateFlag;
21094
+ var _window6, _window6$updateFlag, _window7;
20792
21095
  _this.isShowingAction = false;
20793
- (_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);
21096
+ (_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);
20794
21097
  console.error(e);
21098
+ (_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));
20795
21099
  }
20796
21100
  });
20797
21101
  _defineProperty(this, "showInApp", function (config, duration, configId, name) {
@@ -20803,53 +21107,66 @@
20803
21107
  _this.createInAppModal(config, duration, configId, name, JSON.parse(config).action_class === "inapp_builder" ? "inapp_builder" : "modal");
20804
21108
  }
20805
21109
  } catch (e) {
20806
- var _window$Apxor2;
21110
+ var _window$Apxor2, _window10;
20807
21111
  if (((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios") {
20808
- var _window6, _window6$updateFlag;
20809
- (_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, "IN_APP");
21112
+ var _window8, _window8$updateFlag;
21113
+ (_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");
20810
21114
  } else {
20811
- var _window7, _window7$updateFlag;
20812
- (_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, "IN_APP", false);
21115
+ var _window9, _window9$updateFlag;
21116
+ (_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);
20813
21117
  }
20814
21118
  console.error(e);
21119
+ (_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));
20815
21120
  }
20816
21121
  });
20817
- _defineProperty(this, "showEmbedCardsv2", function (config, duration, configId, name) {
21122
+ _defineProperty(this, "showEmbedCards", function (config, duration, configId, name) {
21123
+ if (_this._isShownECCalled) {
21124
+ return;
21125
+ }
20818
21126
  try {
20819
21127
  config = config.split("\n").join("\\n");
20820
21128
  var ui_config = JSON.parse(config);
20821
- _this.createembedCardsv2(ui_config, configId, name);
21129
+ _this.createembedCards(ui_config, configId, name);
20822
21130
  } catch (e) {
20823
- var _window$Apxor3;
20824
- if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
20825
- var _window8, _window8$updateFlag;
20826
- (_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");
20827
- } else {
20828
- var _window9, _window9$updateFlag;
20829
- (_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);
20830
- }
21131
+ var _window11;
21132
+ window.Apxor.logAppEvent("apx_nudge_not_shown", JSON.stringify({
21133
+ campaignName: name,
21134
+ id: configId,
21135
+ apx_nudge_type: "sticky_card",
21136
+ apx_notshown_type: "error",
21137
+ apx_reason: "".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message)
21138
+ }));
20831
21139
  console.error(e);
21140
+ (_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));
20832
21141
  }
20833
21142
  });
20834
- _defineProperty(this, "createembedCardsv2", function (config, configId, name) {
21143
+ _defineProperty(this, "createembedCards", function (config, configId, name) {
20835
21144
  var cardsContainer = new EmbedCards(config, configId, name, function () {
20836
- window.Apxor.logAppEvent("apx_nudge_shown", JSON.stringify({
21145
+ var _window12;
21146
+ (_window12 = window) === null || _window12 === void 0 || (_window12 = _window12.ApxorLogger) === null || _window12 === void 0 || _window12.debug("successfully showing the nudge");
21147
+ (config === null || config === void 0 ? void 0 : config.initialRender) && window.Apxor.logAppEvent("apx_nudge_shown", JSON.stringify({
20837
21148
  campaignName: name,
20838
21149
  id: configId,
20839
21150
  apx_nudge_type: "sticky_card"
20840
21151
  }));
20841
- }, function () {});
20842
- cardsContainer.showEmbedCardsv2();
21152
+ _this._isShownECCalled = true;
21153
+ }, function () {
21154
+ var _window13;
21155
+ (_window13 = window) === null || _window13 === void 0 || (_window13 = _window13.ApxorLogger) === null || _window13 === void 0 || _window13.debug("nudge dismissed");
21156
+ });
21157
+ cardsContainer.showEmbedCards();
20843
21158
  });
20844
21159
  _defineProperty(this, "removeAll", function () {
20845
- var _window10, _window10$updateFlag;
20846
- (_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, false);
21160
+ var _window14, _window14$updateFlag;
21161
+ (_window14 = window) === null || _window14 === void 0 || (_window14 = _window14.Apxor) === null || _window14 === void 0 || (_window14$updateFlag = _window14.updateFlag) === null || _window14$updateFlag === void 0 || _window14$updateFlag.call(_window14, false);
20847
21162
  if (_this.currentAction !== null && _this.currentAction !== undefined) {
20848
21163
  _this.isShowingAction = false;
20849
21164
  try {
21165
+ var _window15;
20850
21166
  _this.currentAction();
20851
21167
  _this.currentAction = null;
20852
21168
  console.log("Callback is called");
21169
+ (_window15 = window) === null || _window15 === void 0 || (_window15 = _window15.ApxorLogger) === null || _window15 === void 0 || _window15.debug("Callback is called");
20853
21170
  } catch (e) {}
20854
21171
  }
20855
21172
  });
@@ -20861,48 +21178,48 @@
20861
21178
  var onShow = function onShow() {
20862
21179
  _this.isShowingAction = true;
20863
21180
  if (window.Apxor && window.Apxor.logActionEvent) {
20864
- var _window11, _window11$updateFlag, _window12, _window12$updateCount;
20865
- (_window11 = window) === null || _window11 === void 0 || (_window11 = _window11.Apxor) === null || _window11 === void 0 || (_window11$updateFlag = _window11.updateFlag) === null || _window11$updateFlag === void 0 || _window11$updateFlag.call(_window11, true);
21181
+ var _window16, _window16$updateFlag, _window17, _window17$updateCount;
21182
+ (_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, true);
20866
21183
  window.Apxor.logActionEvent("inline_shown", uuid, name);
20867
- (_window12 = window) === null || _window12 === void 0 || (_window12 = _window12.Apxor) === null || _window12 === void 0 || (_window12$updateCount = _window12.updateCount) === null || _window12$updateCount === void 0 || _window12$updateCount.call(_window12, uuid);
21184
+ (_window17 = window) === null || _window17 === void 0 || (_window17 = _window17.Apxor) === null || _window17 === void 0 || (_window17$updateCount = _window17.updateCount) === null || _window17$updateCount === void 0 || _window17$updateCount.call(_window17, uuid);
20868
21185
  if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
20869
21186
  setTimeout(function () {
20870
- var _window13, _window13$logInternal;
20871
- (_window13 = window) === null || _window13 === void 0 || (_window13 = _window13.Apxor) === null || _window13 === void 0 || (_window13$logInternal = _window13.logInternalEvent) === null || _window13$logInternal === void 0 || _window13$logInternal.call(_window13, "capt");
21187
+ var _window18, _window18$logInternal;
21188
+ (_window18 = window) === null || _window18 === void 0 || (_window18 = _window18.Apxor) === null || _window18 === void 0 || (_window18$logInternal = _window18.logInternalEvent) === null || _window18$logInternal === void 0 || _window18$logInternal.call(_window18, "capt");
20872
21189
  }, 500);
20873
21190
  }
20874
21191
  }
20875
21192
  };
20876
21193
  var onHide = function onHide(isCancelled) {
20877
- var _window14, _window14$updateFlag, _window15;
21194
+ var _window19, _window19$updateFlag, _window20;
20878
21195
  _this.isShowingAction = false;
20879
21196
  _this.currentAction = null;
20880
- _this.ZTdX = null;
20881
- (_window14 = window) === null || _window14 === void 0 || (_window14 = _window14.Apxor) === null || _window14 === void 0 || (_window14$updateFlag = _window14.updateFlag) === null || _window14$updateFlag === void 0 || _window14$updateFlag.call(_window14, false);
21197
+ _this.WliE = null;
21198
+ (_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, false);
20882
21199
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
20883
21200
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
20884
21201
  }
20885
- if (((_window15 = window) === null || _window15 === void 0 || (_window15 = _window15.ApxorWebView) === null || _window15 === void 0 ? void 0 : _window15.getLayoutType()) === "web-inline") {
20886
- var _window16;
20887
- (_window16 = window) === null || _window16 === void 0 || (_window16 = _window16.ApxorWebView) === null || _window16 === void 0 || _window16.removeWebView();
21202
+ if (((_window20 = window) === null || _window20 === void 0 || (_window20 = _window20.ApxorWebView) === null || _window20 === void 0 ? void 0 : _window20.getLayoutType()) === "web-inline") {
21203
+ var _window21;
21204
+ (_window21 = window) === null || _window21 === void 0 || (_window21 = _window21.ApxorWebView) === null || _window21 === void 0 || _window21.removeWebView();
20888
21205
  }
20889
21206
  };
20890
21207
  if (action_class === "new-inline") {
20891
- _this.ZTdX = new InLineTooltip(ui_config, [], [], terminationConfig, {
21208
+ _this.WliE = new InLineTooltip(ui_config, [], [], terminationConfig, {
20892
21209
  configId: uuid,
20893
21210
  configName: name
20894
21211
  }, _this, onShow, onHide, function () {}, false, 0);
20895
21212
  } else if (action_class === "tooltip_builder") {
20896
- _this.ZTdX = new NewInLineTooltip(ui_config, terminationConfig, {
21213
+ _this.WliE = new NewInLineTooltip(ui_config, terminationConfig, {
20897
21214
  configId: uuid,
20898
21215
  configName: name
20899
21216
  }, _this, onShow, onHide);
20900
21217
  }
20901
21218
  setTimeout(function () {
20902
- _this.ZTdX.createNewTooltip();
21219
+ _this.WliE.createNewTooltip();
20903
21220
  }, ui_config.delay);
20904
21221
  });
20905
- _defineProperty(this, "AQBm", function (ui_config, duration, uuid, name) {
21222
+ _defineProperty(this, "iPLW", function (ui_config, duration, uuid, name) {
20906
21223
  var terminationConfig = {};
20907
21224
  terminationConfig["auto_dismiss"] = duration > 0;
20908
21225
  terminationConfig["duration"] = duration;
@@ -20912,35 +21229,35 @@
20912
21229
  }, _this, function () {
20913
21230
  _this.isShowingAction = true;
20914
21231
  if (window.Apxor && window.Apxor.logActionEvent) {
20915
- var _window17, _window17$updateFlag;
20916
- (_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, true);
21232
+ var _window22, _window22$updateFlag;
21233
+ (_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, true);
20917
21234
  window.Apxor.logActionEvent("inline_shown", uuid, name);
20918
21235
  if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
20919
21236
  setTimeout(function () {
20920
- var _window18, _window18$logInternal;
20921
- (_window18 = window) === null || _window18 === void 0 || (_window18 = _window18.Apxor) === null || _window18 === void 0 || (_window18$logInternal = _window18.logInternalEvent) === null || _window18$logInternal === void 0 || _window18$logInternal.call(_window18, "capt");
21237
+ var _window23, _window23$logInternal;
21238
+ (_window23 = window) === null || _window23 === void 0 || (_window23 = _window23.Apxor) === null || _window23 === void 0 || (_window23$logInternal = _window23.logInternalEvent) === null || _window23$logInternal === void 0 || _window23$logInternal.call(_window23, "capt");
20922
21239
  }, 500);
20923
21240
  }
20924
21241
  }
20925
21242
  }, function (isCancelled) {
20926
- var _window19, _window19$updateFlag, _window20;
21243
+ var _window24, _window24$updateFlag, _window25;
20927
21244
  _this.isShowingAction = false;
20928
21245
  _this.currentAction = null;
20929
- _this.ZTdX = null;
20930
- (_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, false);
21246
+ _this.WliE = null;
21247
+ (_window24 = window) === null || _window24 === void 0 || (_window24 = _window24.Apxor) === null || _window24 === void 0 || (_window24$updateFlag = _window24.updateFlag) === null || _window24$updateFlag === void 0 || _window24$updateFlag.call(_window24, false);
20931
21248
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
20932
21249
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
20933
21250
  }
20934
- if (((_window20 = window) === null || _window20 === void 0 || (_window20 = _window20.ApxorWebView) === null || _window20 === void 0 ? void 0 : _window20.getLayoutType()) === "web-inline") {
20935
- var _window21;
20936
- (_window21 = window) === null || _window21 === void 0 || (_window21 = _window21.ApxorWebView) === null || _window21 === void 0 || _window21.removeWebView();
21251
+ if (((_window25 = window) === null || _window25 === void 0 || (_window25 = _window25.ApxorWebView) === null || _window25 === void 0 ? void 0 : _window25.getLayoutType()) === "web-inline") {
21252
+ var _window26;
21253
+ (_window26 = window) === null || _window26 === void 0 || (_window26 = _window26.ApxorWebView) === null || _window26 === void 0 || _window26.removeWebView();
20937
21254
  }
20938
21255
  }, _this.stepperCallback, false, 0);
20939
21256
  _this._currentCoachmark.createNewCoachMark();
20940
21257
  });
20941
21258
  _defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
20942
- if (_this.ZTdX) {
20943
- _this.ZTdX.updateElementPositionOnScroll(top, left, height, width);
21259
+ if (_this.WliE) {
21260
+ _this.WliE.updateElementPositionOnScroll(top, left, height, width);
20944
21261
  }
20945
21262
  });
20946
21263
  _defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
@@ -20957,20 +21274,20 @@
20957
21274
  var VideoInAppInstance = new VideoInApp(videoConfig, terminationConfig, configId, name, function () {
20958
21275
  _this.isShowingAction = true;
20959
21276
  if (window.Apxor && window.Apxor.logActionEvent) {
20960
- var _window22, _window22$updateFlag;
20961
- (_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, true);
21277
+ var _window27, _window27$updateFlag;
21278
+ (_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, true);
20962
21279
  window.Apxor.logActionEvent("inapp_shown", configId, name);
20963
21280
  }
20964
21281
  }, function () {
20965
- var _window23, _window23$updateFlag;
21282
+ var _window28, _window28$updateFlag;
20966
21283
  _this.isShowingAction = false;
20967
21284
  _this.currentAction = null;
20968
- (_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);
21285
+ (_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);
20969
21286
  if (window.Apxor && window.Apxor.logActionEvent) {
20970
21287
  window.Apxor.logActionEvent("inapp_dismissed", configId, name);
20971
21288
  }
20972
21289
  });
20973
- VideoInAppInstance.NpYM();
21290
+ VideoInAppInstance.showVideoInApp();
20974
21291
  });
20975
21292
  /**
20976
21293
  * Creates a modal for the given config and displays it.
@@ -20991,19 +21308,19 @@
20991
21308
  var onShow = function onShow() {
20992
21309
  _this.isShowingAction = true;
20993
21310
  if (window.Apxor && window.Apxor.logActionEvent) {
20994
- var _window$Apxor4;
20995
- if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
20996
- var _window24, _window24$updateFlag;
20997
- (_window24 = window) === null || _window24 === void 0 || (_window24 = _window24.Apxor) === null || _window24 === void 0 || (_window24$updateFlag = _window24.updateFlag) === null || _window24$updateFlag === void 0 || _window24$updateFlag.call(_window24, true, "IN_APP");
21311
+ var _window$Apxor3;
21312
+ if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
21313
+ var _window29, _window29$updateFlag;
21314
+ (_window29 = window) === null || _window29 === void 0 || (_window29 = _window29.Apxor) === null || _window29 === void 0 || (_window29$updateFlag = _window29.updateFlag) === null || _window29$updateFlag === void 0 || _window29$updateFlag.call(_window29, true, "IN_APP");
20998
21315
  } else {
20999
- var _window25, _window25$updateFlag;
21000
- (_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, "IN_APP", true);
21316
+ var _window30, _window30$updateFlag;
21317
+ (_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, "IN_APP", true);
21001
21318
  }
21002
21319
  window.Apxor.logActionEvent("inapp_shown", configId, name);
21003
21320
  }
21004
21321
  };
21005
21322
  var onHide = function onHide(backgroundDiv, action) {
21006
- var _dialogContent$classL, _window$Apxor5;
21323
+ var _dialogContent$classL, _window$Apxor4;
21007
21324
  var cssClass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ".apx-dlg-c";
21008
21325
  var closeListener = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
21009
21326
  var redirectionListener = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
@@ -21014,12 +21331,12 @@
21014
21331
  // setTimeout(() => {
21015
21332
  backgroundDiv.remove();
21016
21333
  _this.isShowingAction = false;
21017
- if (((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) === "ios") {
21018
- var _window26, _window26$updateFlag;
21019
- (_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, false, "IN_APP");
21334
+ if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
21335
+ var _window31, _window31$updateFlag;
21336
+ (_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, "IN_APP");
21020
21337
  } else {
21021
- var _window27, _window27$updateFlag;
21022
- (_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, "IN_APP", false);
21338
+ var _window32, _window32$updateFlag;
21339
+ (_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, "IN_APP", false);
21023
21340
  }
21024
21341
  _this.currentAction = null;
21025
21342
  if (window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
@@ -21034,7 +21351,11 @@
21034
21351
  inappModal.createInAppModal();
21035
21352
  });
21036
21353
  _defineProperty(this, "showPlaceHolder", function () {
21037
- var _window28;
21354
+ var _window33;
21355
+ if (_this.aAuZ) {
21356
+ return;
21357
+ }
21358
+ _this.aAuZ = true;
21038
21359
  var ele = document.createElement("div");
21039
21360
  ele.innerHTML = "place your immersive card here";
21040
21361
  ele.style.backgroundColor = "#f5f5f5";
@@ -21044,7 +21365,7 @@
21044
21365
  ele.style.padding = "12px";
21045
21366
  ele.style.fontSize = "14px";
21046
21367
  document.body.appendChild(ele);
21047
- (_window28 = window) === null || _window28 === void 0 || (_window28 = _window28.ApxorWidget) === null || _window28 === void 0 || _window28.setDimensions(window.document.querySelector("html").offsetWidth, window.document.querySelector("html").offsetHeight);
21368
+ (_window33 = window) === null || _window33 === void 0 || (_window33 = _window33.ApxorWidget) === null || _window33 === void 0 || _window33.setDimensions(window.document.querySelector("html").offsetWidth, window.document.querySelector("html").offsetHeight);
21048
21369
  });
21049
21370
  } // createSurvey = (config, configId, name) => {
21050
21371
  // const survey_obj = new NewSurveys(configId, name, config, []);