apxor-rtm-ui 0.5.6 → 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.
- package/dist/apxor.rtm.js.bak +530 -261
- package/dist/apxor.rtm.min.js +5 -5
- package/package.json +1 -1
package/dist/apxor.rtm.js.bak
CHANGED
|
@@ -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
|
|
@@ -7570,20 +7674,20 @@
|
|
|
7570
7674
|
* @param {string} type - Title or Description type
|
|
7571
7675
|
* @returns
|
|
7572
7676
|
*/
|
|
7573
|
-
var createTextElement = function createTextElement(
|
|
7574
|
-
var
|
|
7575
|
-
color =
|
|
7576
|
-
|
|
7577
|
-
font_family =
|
|
7578
|
-
|
|
7579
|
-
size =
|
|
7580
|
-
|
|
7581
|
-
style =
|
|
7582
|
-
text =
|
|
7583
|
-
segments =
|
|
7584
|
-
quote =
|
|
7585
|
-
|
|
7586
|
-
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;
|
|
7587
7691
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "desc";
|
|
7588
7692
|
var fontMultiplier = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
7589
7693
|
size = size * fontMultiplier;
|
|
@@ -11556,9 +11660,13 @@
|
|
|
11556
11660
|
var _this = this,
|
|
11557
11661
|
_config$termination;
|
|
11558
11662
|
_classCallCheck(this, TemplateContent);
|
|
11559
|
-
_defineProperty(this, "
|
|
11560
|
-
var element = _this.
|
|
11663
|
+
_defineProperty(this, "FbqU", function () {
|
|
11664
|
+
var element = _this.OKHv(_this.layout);
|
|
11561
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);
|
|
11562
11670
|
var styleElement = document.createElement("style");
|
|
11563
11671
|
styleElement.innerHTML = _this.styleContent;
|
|
11564
11672
|
document.head.appendChild(styleElement);
|
|
@@ -11569,7 +11677,7 @@
|
|
|
11569
11677
|
}
|
|
11570
11678
|
return element;
|
|
11571
11679
|
});
|
|
11572
|
-
_defineProperty(this, "
|
|
11680
|
+
_defineProperty(this, "OKHv", function (config) {
|
|
11573
11681
|
var _window$Apxor;
|
|
11574
11682
|
var element;
|
|
11575
11683
|
switch (config.type) {
|
|
@@ -11588,20 +11696,20 @@
|
|
|
11588
11696
|
if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
|
|
11589
11697
|
element.playsInline = true;
|
|
11590
11698
|
}
|
|
11591
|
-
if (config.source) {
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
}
|
|
11598
|
-
if (config.track) {
|
|
11599
|
-
|
|
11600
|
-
|
|
11601
|
-
|
|
11602
|
-
|
|
11603
|
-
|
|
11604
|
-
}
|
|
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
|
+
// }
|
|
11605
11713
|
break;
|
|
11606
11714
|
case "svg":
|
|
11607
11715
|
element = document.createElement("span");
|
|
@@ -11610,38 +11718,58 @@
|
|
|
11610
11718
|
element = document.createElement(config.type);
|
|
11611
11719
|
}
|
|
11612
11720
|
if (config.properties) {
|
|
11613
|
-
for (var
|
|
11614
|
-
|
|
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];
|
|
11615
11733
|
}
|
|
11616
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
|
+
}
|
|
11617
11740
|
if (config.enable_actions && config.actions.length > 0) {
|
|
11618
11741
|
config.actions.forEach(function (action) {
|
|
11619
11742
|
switch (action.type) {
|
|
11620
11743
|
case "activity":
|
|
11621
11744
|
case "deeplink":
|
|
11622
11745
|
case "ir":
|
|
11623
|
-
element.onclick = function () {
|
|
11746
|
+
element.onclick = function (e) {
|
|
11747
|
+
e.stopPropagation();
|
|
11624
11748
|
window.Apxor.redirect(JSON.stringify(action));
|
|
11625
11749
|
};
|
|
11626
11750
|
break;
|
|
11627
11751
|
case "cancel":
|
|
11628
|
-
element.onclick = function () {
|
|
11752
|
+
element.onclick = function (e) {
|
|
11753
|
+
e.stopPropagation();
|
|
11629
11754
|
window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
|
|
11630
11755
|
};
|
|
11631
11756
|
break;
|
|
11632
11757
|
case "dismiss":
|
|
11633
|
-
element.onclick = function () {
|
|
11758
|
+
element.onclick = function (e) {
|
|
11759
|
+
e.stopPropagation();
|
|
11634
11760
|
window.Apxor.logActionEvent("".concat(_this.type, "_dismissed"), _this.configId, _this.name);
|
|
11635
11761
|
};
|
|
11636
11762
|
break;
|
|
11637
11763
|
case "never":
|
|
11638
|
-
element.onclick = function () {
|
|
11764
|
+
element.onclick = function (e) {
|
|
11765
|
+
e.stopPropagation();
|
|
11639
11766
|
window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
|
|
11640
11767
|
window.Apxor.logActionEvent("never_show_clicked", _this.configId, _this.name);
|
|
11641
11768
|
};
|
|
11642
11769
|
break;
|
|
11643
11770
|
case "toggle-class":
|
|
11644
|
-
element.onclick = function () {
|
|
11771
|
+
element.onclick = function (e) {
|
|
11772
|
+
e.stopPropagation();
|
|
11645
11773
|
var elementToBeToggled = document.getElementById(action.target_id);
|
|
11646
11774
|
if (isNull(elementToBeToggled)) {
|
|
11647
11775
|
elementToBeToggled = document.querySelector(action.target_id);
|
|
@@ -11652,8 +11780,9 @@
|
|
|
11652
11780
|
};
|
|
11653
11781
|
break;
|
|
11654
11782
|
case "copy-content":
|
|
11655
|
-
element.onclick = function () {
|
|
11656
|
-
|
|
11783
|
+
element.onclick = function (e) {
|
|
11784
|
+
e.stopPropagation();
|
|
11785
|
+
var textToCopy = action === null || action === void 0 ? void 0 : action.content;
|
|
11657
11786
|
var tempInput = document.createElement("input");
|
|
11658
11787
|
tempInput.value = textToCopy;
|
|
11659
11788
|
document.body.appendChild(tempInput);
|
|
@@ -11663,12 +11792,14 @@
|
|
|
11663
11792
|
};
|
|
11664
11793
|
break;
|
|
11665
11794
|
case "log-app-event":
|
|
11666
|
-
element.onclick = function () {
|
|
11795
|
+
element.onclick = function (e) {
|
|
11796
|
+
e.stopPropagation();
|
|
11667
11797
|
window.Apxor.logAppEvent(action === null || action === void 0 ? void 0 : action.event_name);
|
|
11668
11798
|
};
|
|
11669
11799
|
break;
|
|
11670
11800
|
case "log-client-event":
|
|
11671
|
-
element.onclick = function () {
|
|
11801
|
+
element.onclick = function (e) {
|
|
11802
|
+
e.stopPropagation();
|
|
11672
11803
|
window.Apxor.logClientEvent(action === null || action === void 0 ? void 0 : action.event_name);
|
|
11673
11804
|
};
|
|
11674
11805
|
}
|
|
@@ -11677,10 +11808,10 @@
|
|
|
11677
11808
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
11678
11809
|
element.style.position = "relative";
|
|
11679
11810
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
11680
|
-
var childElement = _this.
|
|
11811
|
+
var childElement = _this.OKHv(childConfig);
|
|
11681
11812
|
childElement.style.position = "absolute";
|
|
11682
|
-
for (var
|
|
11683
|
-
childElement.style[
|
|
11813
|
+
for (var _prop in childConfig.offset) {
|
|
11814
|
+
childElement.style[_prop] = childConfig.offset[_prop];
|
|
11684
11815
|
}
|
|
11685
11816
|
element.appendChild(childElement);
|
|
11686
11817
|
});
|
|
@@ -11695,19 +11826,25 @@
|
|
|
11695
11826
|
// }
|
|
11696
11827
|
|
|
11697
11828
|
config.children.forEach(function (childConfig) {
|
|
11698
|
-
var childElement = _this.
|
|
11829
|
+
var childElement = _this.OKHv(childConfig);
|
|
11699
11830
|
element.appendChild(childElement);
|
|
11700
11831
|
});
|
|
11701
11832
|
}
|
|
11833
|
+
if (config.type === "img") {
|
|
11834
|
+
var imgWrapper = document.createElement("div");
|
|
11835
|
+
imgWrapper.appendChild(element);
|
|
11836
|
+
return imgWrapper;
|
|
11837
|
+
}
|
|
11702
11838
|
return element;
|
|
11703
11839
|
});
|
|
11704
11840
|
this.configId = configId;
|
|
11705
11841
|
this.name = name;
|
|
11706
11842
|
this.layout = _config.layout;
|
|
11707
|
-
this.styleContent = _config.
|
|
11843
|
+
this.styleContent = _config.css;
|
|
11708
11844
|
this.termination = (_config$termination = _config.termination) !== null && _config$termination !== void 0 ? _config$termination : [];
|
|
11709
11845
|
this.script = _config.script;
|
|
11710
11846
|
this.type = type;
|
|
11847
|
+
this.initialStyles = "";
|
|
11711
11848
|
});
|
|
11712
11849
|
|
|
11713
11850
|
var svgNS$1 = "http://www.w3.org/2000/svg";
|
|
@@ -12191,7 +12328,7 @@
|
|
|
12191
12328
|
|
|
12192
12329
|
var NewInLineTooltip = /*#__PURE__*/function () {
|
|
12193
12330
|
function NewInLineTooltip(config, terminationConfig, messageConfig, rtmInstance, showCallback, hideCallback) {
|
|
12194
|
-
var _config$set_font_to_s;
|
|
12331
|
+
var _config$set_font_to_s, _config$dimensions, _config$dimensions2, _config$dimensions3, _config$dimensions4;
|
|
12195
12332
|
_classCallCheck(this, NewInLineTooltip);
|
|
12196
12333
|
this.uiConfig = config;
|
|
12197
12334
|
this.messageConfig = messageConfig;
|
|
@@ -12244,16 +12381,12 @@
|
|
|
12244
12381
|
this.updateSkid = null;
|
|
12245
12382
|
this.initial_data_placement = this.position.position;
|
|
12246
12383
|
this.recent_placement = this.position.position;
|
|
12247
|
-
this.
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
this.targetElementLeft = config === null || config === void 0 || (_config$dimensions2 = config.dimensions) === null || _config$dimensions2 === void 0 ? void 0 : _config$dimensions2.left;
|
|
12254
|
-
this.targetElementHeight = config === null || config === void 0 || (_config$dimensions3 = config.dimensions) === null || _config$dimensions3 === void 0 ? void 0 : _config$dimensions3.height;
|
|
12255
|
-
this.targetElementWidth = config === null || config === void 0 || (_config$dimensions4 = config.dimensions) === null || _config$dimensions4 === void 0 ? void 0 : _config$dimensions4.width;
|
|
12256
|
-
}
|
|
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;
|
|
12257
12390
|
}
|
|
12258
12391
|
_createClass(NewInLineTooltip, [{
|
|
12259
12392
|
key: "createNewTooltip",
|
|
@@ -12284,11 +12417,7 @@
|
|
|
12284
12417
|
var targetValidCallback = function targetValidCallback() {
|
|
12285
12418
|
//Once the target is found then scroll into it.
|
|
12286
12419
|
// this._scrollIntoTargetIfNeeded(targetReachedCallback);
|
|
12287
|
-
|
|
12288
|
-
targetReachedCallback();
|
|
12289
|
-
} else {
|
|
12290
|
-
_this._scrollIntoTargetIfNeeded(targetReachedCallback);
|
|
12291
|
-
}
|
|
12420
|
+
targetReachedCallback();
|
|
12292
12421
|
};
|
|
12293
12422
|
|
|
12294
12423
|
// Set the target for InLine tooltip
|
|
@@ -12301,15 +12430,13 @@
|
|
|
12301
12430
|
}, {
|
|
12302
12431
|
key: "updateElementPositionOnScroll",
|
|
12303
12432
|
value: function updateElementPositionOnScroll(top, left, height, width) {
|
|
12433
|
+
var _window;
|
|
12304
12434
|
setAttributes$1(this.targetElement, {
|
|
12305
12435
|
style: "position: absolute; top: ".concat(top, "px; left: ").concat(left, "px; height: ").concat(height, "px; width: ").concat(width, "px")
|
|
12306
12436
|
});
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
(_window = window) === null || _window === void 0 || (_window = _window.ApxorWebView) === null || _window === void 0 || _window.setInlineRect(tippyRoot.left, tippyRoot.top, tippyRoot.width, tippyRoot.height);
|
|
12311
|
-
window.dispatchEvent(new CustomEvent("updateMaskOpeningPositionOnScroll"));
|
|
12312
|
-
}
|
|
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"));
|
|
12313
12440
|
}
|
|
12314
12441
|
}, {
|
|
12315
12442
|
key: "_setInlineStyles",
|
|
@@ -12462,17 +12589,13 @@
|
|
|
12462
12589
|
_this2._resetRTMAction();
|
|
12463
12590
|
}
|
|
12464
12591
|
};
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
|
|
12470
|
-
|
|
12471
|
-
|
|
12472
|
-
targetValidCallback();
|
|
12473
|
-
} else {
|
|
12474
|
-
this._findTargetElement(targetFoundCallback);
|
|
12475
|
-
}
|
|
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();
|
|
12476
12599
|
}
|
|
12477
12600
|
}, {
|
|
12478
12601
|
key: "_targetClickCallback",
|
|
@@ -12606,7 +12729,7 @@
|
|
|
12606
12729
|
}, {
|
|
12607
12730
|
key: "_setInLineContent",
|
|
12608
12731
|
value: function _setInLineContent() {
|
|
12609
|
-
this.inLineContainer = this.templateContent.
|
|
12732
|
+
this.inLineContainer = this.templateContent.FbqU();
|
|
12610
12733
|
}
|
|
12611
12734
|
}, {
|
|
12612
12735
|
key: "_setObservors",
|
|
@@ -12649,7 +12772,7 @@
|
|
|
12649
12772
|
},
|
|
12650
12773
|
arrow: this.enable_arrow,
|
|
12651
12774
|
appendTo: function appendTo() {
|
|
12652
|
-
return _this6.
|
|
12775
|
+
return _this6.targetElement;
|
|
12653
12776
|
},
|
|
12654
12777
|
content: this.inLineContainer,
|
|
12655
12778
|
duration: 100,
|
|
@@ -12691,6 +12814,7 @@
|
|
|
12691
12814
|
instance.popperInstance.update();
|
|
12692
12815
|
},
|
|
12693
12816
|
onShown: function onShown() {
|
|
12817
|
+
var _window3;
|
|
12694
12818
|
// const tippyRoot = document.querySelector("[data-tippy-root]");
|
|
12695
12819
|
// const tippyBox = document.querySelector(".tippy-box");
|
|
12696
12820
|
// const placement = tippyBox.getAttribute("data-placement");
|
|
@@ -12726,11 +12850,8 @@
|
|
|
12726
12850
|
_this6.updateSkid();
|
|
12727
12851
|
_this6._showTippy();
|
|
12728
12852
|
window.addEventListener("scroll", _this6.updateSkid);
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
-
var tippyRoot = document.querySelector("[data-tippy-root]").getBoundingClientRect();
|
|
12732
|
-
(_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorWebView) === null || _window3 === void 0 || _window3.setInlineRect(tippyRoot.left, tippyRoot.top, tippyRoot.width, tippyRoot.height);
|
|
12733
|
-
}
|
|
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);
|
|
12734
12855
|
},
|
|
12735
12856
|
placement: this.position.position,
|
|
12736
12857
|
popperOptions: {
|
|
@@ -14156,7 +14277,7 @@
|
|
|
14156
14277
|
* @description Creates the styles for Marketing message.
|
|
14157
14278
|
* @returns {string} css styles
|
|
14158
14279
|
*/
|
|
14159
|
-
_defineProperty(this, "
|
|
14280
|
+
_defineProperty(this, "IrSW", function () {
|
|
14160
14281
|
if (!_this.enable_marketing) {
|
|
14161
14282
|
return "";
|
|
14162
14283
|
}
|
|
@@ -14175,7 +14296,7 @@
|
|
|
14175
14296
|
* @private
|
|
14176
14297
|
* @description Sets the marketing content at the end of the Inline
|
|
14177
14298
|
*/
|
|
14178
|
-
_defineProperty(this, "
|
|
14299
|
+
_defineProperty(this, "pcuy", function () {
|
|
14179
14300
|
if (_this.enable_marketing) {
|
|
14180
14301
|
var marketingContainer = document.createElement("div");
|
|
14181
14302
|
marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
|
|
@@ -14777,7 +14898,7 @@
|
|
|
14777
14898
|
if (apxor_tooltip_styles) {
|
|
14778
14899
|
return;
|
|
14779
14900
|
}
|
|
14780
|
-
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.
|
|
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, "");
|
|
14781
14902
|
var styleNode = document.createElement("style");
|
|
14782
14903
|
styleNode.setAttribute("apx-tooltip-styles", "");
|
|
14783
14904
|
styleNode.innerHTML = styles;
|
|
@@ -15587,7 +15708,7 @@
|
|
|
15587
15708
|
this._setCloseButton();
|
|
15588
15709
|
|
|
15589
15710
|
//Set the Marketing content
|
|
15590
|
-
this.
|
|
15711
|
+
this.pcuy();
|
|
15591
15712
|
}
|
|
15592
15713
|
|
|
15593
15714
|
/**
|
|
@@ -18432,7 +18553,7 @@
|
|
|
18432
18553
|
}, {
|
|
18433
18554
|
key: "_setInAppModalContent",
|
|
18434
18555
|
value: function _setInAppModalContent() {
|
|
18435
|
-
this.inAppContainer = this.templateContent.
|
|
18556
|
+
this.inAppContainer = this.templateContent.FbqU();
|
|
18436
18557
|
this.inAppContainer.style.zIndex = 99999;
|
|
18437
18558
|
this.overlayElement.appendChild(this.inAppContainer);
|
|
18438
18559
|
}
|
|
@@ -18580,7 +18701,7 @@
|
|
|
18580
18701
|
* @description Creates the styles for Marketing message.
|
|
18581
18702
|
* @returns {string} css styles
|
|
18582
18703
|
*/
|
|
18583
|
-
_defineProperty(this, "
|
|
18704
|
+
_defineProperty(this, "IrSW", function () {
|
|
18584
18705
|
if (!_this.enable_marketing) {
|
|
18585
18706
|
return "";
|
|
18586
18707
|
}
|
|
@@ -18626,7 +18747,7 @@
|
|
|
18626
18747
|
* @private
|
|
18627
18748
|
* @description Get the response for Form content in the InApp modal.
|
|
18628
18749
|
*/
|
|
18629
|
-
_defineProperty(this, "
|
|
18750
|
+
_defineProperty(this, "NTBD", function (form_elements) {
|
|
18630
18751
|
var obj = {};
|
|
18631
18752
|
var callback = "";
|
|
18632
18753
|
form_elements.forEach(function (element) {
|
|
@@ -18666,7 +18787,7 @@
|
|
|
18666
18787
|
* @private
|
|
18667
18788
|
* @description Sets the marketing content at the end of the InApp
|
|
18668
18789
|
*/
|
|
18669
|
-
_defineProperty(this, "
|
|
18790
|
+
_defineProperty(this, "pcuy", function () {
|
|
18670
18791
|
if (_this.enable_marketing) {
|
|
18671
18792
|
var marketingContainer = document.createElement("div");
|
|
18672
18793
|
marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
|
|
@@ -18919,7 +19040,7 @@
|
|
|
18919
19040
|
}, {
|
|
18920
19041
|
key: "_setStyles",
|
|
18921
19042
|
value: function _setStyles() {
|
|
18922
|
-
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.
|
|
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, "");
|
|
18923
19044
|
var styleNode = document.createElement("style");
|
|
18924
19045
|
styleNode.setAttribute("id", "apxor-style-" + this.configId);
|
|
18925
19046
|
styleNode.innerHTML = styles;
|
|
@@ -19396,7 +19517,7 @@
|
|
|
19396
19517
|
this._setCloseButton();
|
|
19397
19518
|
|
|
19398
19519
|
//Set the Marketing content
|
|
19399
|
-
this.
|
|
19520
|
+
this.pcuy();
|
|
19400
19521
|
}
|
|
19401
19522
|
|
|
19402
19523
|
/**
|
|
@@ -19601,7 +19722,7 @@
|
|
|
19601
19722
|
var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
|
|
19602
19723
|
form.addEventListener("submit", function (e) {
|
|
19603
19724
|
e.preventDefault();
|
|
19604
|
-
var _this4$generateRespon = _this4.
|
|
19725
|
+
var _this4$generateRespon = _this4.NTBD(_this4.form.elements),
|
|
19605
19726
|
obj = _this4$generateRespon.obj,
|
|
19606
19727
|
callback = _this4$generateRespon.callback;
|
|
19607
19728
|
var evalString = "(obj)=>" + callback + "(obj)";
|
|
@@ -19914,7 +20035,7 @@
|
|
|
19914
20035
|
* @function showVideoInApp
|
|
19915
20036
|
* @description Shows the video InApp with the configured mode.
|
|
19916
20037
|
*/
|
|
19917
|
-
_defineProperty(this, "
|
|
20038
|
+
_defineProperty(this, "showVideoInApp", function () {
|
|
19918
20039
|
_this.createPlayer();
|
|
19919
20040
|
try {
|
|
19920
20041
|
// In PIP mode, only after the video metadata is loaded, show the PIP.
|
|
@@ -19956,7 +20077,7 @@
|
|
|
19956
20077
|
};
|
|
19957
20078
|
} else {
|
|
19958
20079
|
// As the video player is hidden by default, unhide if the mode is not PIP.
|
|
19959
|
-
_this.
|
|
20080
|
+
_this.GXJg();
|
|
19960
20081
|
}
|
|
19961
20082
|
_this.showCallback();
|
|
19962
20083
|
} catch (e) {
|
|
@@ -19976,7 +20097,7 @@
|
|
|
19976
20097
|
* For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
|
|
19977
20098
|
* For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
|
|
19978
20099
|
*/
|
|
19979
|
-
_defineProperty(this, "
|
|
20100
|
+
_defineProperty(this, "AvhK", function () {
|
|
19980
20101
|
var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
|
|
19981
20102
|
width = _getHeightWidthFromRe.width,
|
|
19982
20103
|
height = _getHeightWidthFromRe.height;
|
|
@@ -19988,7 +20109,7 @@
|
|
|
19988
20109
|
* @private
|
|
19989
20110
|
* @description Removes the video player style element.
|
|
19990
20111
|
*/
|
|
19991
|
-
_defineProperty(this, "
|
|
20112
|
+
_defineProperty(this, "EBLK", function () {
|
|
19992
20113
|
var playerStyles = document.getElementById("apx-mpl-styles");
|
|
19993
20114
|
if (playerStyles) {
|
|
19994
20115
|
playerStyles.remove();
|
|
@@ -19999,7 +20120,7 @@
|
|
|
19999
20120
|
* @private
|
|
20000
20121
|
* @description Attach listeners on the video controls
|
|
20001
20122
|
*/
|
|
20002
|
-
_defineProperty(this, "
|
|
20123
|
+
_defineProperty(this, "PjLl", function () {
|
|
20003
20124
|
// Listener for the video end. Display the CTA's when the video ends.
|
|
20004
20125
|
_this.videoElement.addEventListener("ended", function () {
|
|
20005
20126
|
var ctaButtons = document.getElementById("apx-cta-btn");
|
|
@@ -20110,7 +20231,7 @@
|
|
|
20110
20231
|
* @private
|
|
20111
20232
|
* @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
20112
20233
|
*/
|
|
20113
|
-
_defineProperty(this, "
|
|
20234
|
+
_defineProperty(this, "WzKs", function () {
|
|
20114
20235
|
var _this$terminationConf;
|
|
20115
20236
|
if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
|
|
20116
20237
|
// On Exit of the PIP,
|
|
@@ -20150,7 +20271,7 @@
|
|
|
20150
20271
|
* @private Sets the custom controls on the video player.
|
|
20151
20272
|
* PIP and close are the custom controls that are created and positions on the video.
|
|
20152
20273
|
*/
|
|
20153
|
-
_defineProperty(this, "
|
|
20274
|
+
_defineProperty(this, "DkQa", function () {
|
|
20154
20275
|
_this.enable_close_button;
|
|
20155
20276
|
if (_this.enable_close_button) {
|
|
20156
20277
|
var closeButton = document.createElement("span");
|
|
@@ -20197,21 +20318,21 @@
|
|
|
20197
20318
|
* @function hideVideoPlayer
|
|
20198
20319
|
* @description Sets the visibility of the video player to hidden.
|
|
20199
20320
|
*/
|
|
20200
|
-
_defineProperty(this, "
|
|
20321
|
+
_defineProperty(this, "Aacc", function () {
|
|
20201
20322
|
_this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
20202
20323
|
});
|
|
20203
20324
|
/**
|
|
20204
20325
|
* @function unhideVideoPlayer
|
|
20205
20326
|
* @description Unhides video player.
|
|
20206
20327
|
*/
|
|
20207
|
-
_defineProperty(this, "
|
|
20328
|
+
_defineProperty(this, "GXJg", function () {
|
|
20208
20329
|
_this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
20209
20330
|
});
|
|
20210
20331
|
/**
|
|
20211
20332
|
* @function getVideoElement
|
|
20212
20333
|
* @returns {HTMLElement} Video ekement
|
|
20213
20334
|
*/
|
|
20214
|
-
_defineProperty(this, "
|
|
20335
|
+
_defineProperty(this, "gHbQ", function () {
|
|
20215
20336
|
return _this.videoElement;
|
|
20216
20337
|
});
|
|
20217
20338
|
this.videoPlayer = null;
|
|
@@ -20263,7 +20384,7 @@
|
|
|
20263
20384
|
this.videoPlayer.style.backgroundColor = this.bg_color;
|
|
20264
20385
|
|
|
20265
20386
|
// Video has a resolution, not deviating from the resolution set the height and width.
|
|
20266
|
-
this.
|
|
20387
|
+
this.AvhK();
|
|
20267
20388
|
//Generate the styles and add them to the document head.
|
|
20268
20389
|
this._setVideoPlayerStyles();
|
|
20269
20390
|
//Set the position of the video player with in the 5 possible positions.
|
|
@@ -20271,16 +20392,16 @@
|
|
|
20271
20392
|
//Create a video element,set the source and add to the container.
|
|
20272
20393
|
this._setPlayerContent();
|
|
20273
20394
|
//Set the listeners on the video control buttons.
|
|
20274
|
-
this.
|
|
20395
|
+
this.PjLl();
|
|
20275
20396
|
//Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
20276
|
-
this.
|
|
20397
|
+
this.WzKs();
|
|
20277
20398
|
//Set the custom close and PIP controls. Not using the defaults from the html video element.
|
|
20278
20399
|
//Reason - We want to position them at the top right and left positions.
|
|
20279
|
-
this.
|
|
20400
|
+
this.DkQa();
|
|
20280
20401
|
//Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
|
|
20281
20402
|
this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
|
|
20282
20403
|
//Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
|
|
20283
|
-
this.
|
|
20404
|
+
this.Aacc();
|
|
20284
20405
|
//If the auto dismiss is enabled, sets the timeout to call the InApp close.
|
|
20285
20406
|
this._setAutoTerminate();
|
|
20286
20407
|
document.body.appendChild(this.videoPlayer);
|
|
@@ -20394,7 +20515,7 @@
|
|
|
20394
20515
|
}
|
|
20395
20516
|
}
|
|
20396
20517
|
this.videoPlayer.remove();
|
|
20397
|
-
this.
|
|
20518
|
+
this.EBLK();
|
|
20398
20519
|
if (closeButtonName !== "auto_dismiss") {
|
|
20399
20520
|
window.Apxor.logAppEvent("apx_video_inapp_close_button_clicked", JSON.stringify({
|
|
20400
20521
|
message_name: this.name,
|
|
@@ -20462,7 +20583,7 @@
|
|
|
20462
20583
|
replayCount: _this3.replayCount
|
|
20463
20584
|
}));
|
|
20464
20585
|
_this3.videoPlayer.remove();
|
|
20465
|
-
_this3.
|
|
20586
|
+
_this3.EBLK();
|
|
20466
20587
|
_this3.hideCallback();
|
|
20467
20588
|
} catch (e) {
|
|
20468
20589
|
console.log("Can't close the video player\n".concat(e));
|
|
@@ -20551,32 +20672,80 @@
|
|
|
20551
20672
|
var _this = this,
|
|
20552
20673
|
_config$termination;
|
|
20553
20674
|
_classCallCheck(this, EmbedCards);
|
|
20554
|
-
_defineProperty(this, "
|
|
20555
|
-
var element = _this.JOeg(_this.layout);
|
|
20556
|
-
_this.qzdB();
|
|
20557
|
-
window.onresize = function () {
|
|
20558
|
-
_this.SbrJ();
|
|
20559
|
-
};
|
|
20560
|
-
document.body.appendChild(element);
|
|
20561
|
-
var styleElement = document.createElement("style");
|
|
20562
|
-
styleElement.innerHTML = _this.styleContent;
|
|
20563
|
-
document.head.appendChild(styleElement);
|
|
20564
|
-
_this.tbet(_this.termination);
|
|
20675
|
+
_defineProperty(this, "showEmbedCards", function () {
|
|
20565
20676
|
try {
|
|
20566
|
-
|
|
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);
|
|
20567
20736
|
} catch (e) {
|
|
20568
|
-
|
|
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));
|
|
20569
20740
|
}
|
|
20570
|
-
_this.showCallback();
|
|
20571
|
-
_this.SbrJ();
|
|
20572
20741
|
});
|
|
20573
|
-
_defineProperty(this, "
|
|
20742
|
+
_defineProperty(this, "Txlk", function () {
|
|
20574
20743
|
var EmbeddedCardsStyles = document.createElement("style");
|
|
20575
20744
|
EmbeddedCardsStyles.innerHTML = _this.initialStyles;
|
|
20576
20745
|
EmbeddedCardsStyles.setAttribute("apx-tooltip-styles", "");
|
|
20577
20746
|
document.head.appendChild(EmbeddedCardsStyles);
|
|
20578
20747
|
});
|
|
20579
|
-
_defineProperty(this, "
|
|
20748
|
+
_defineProperty(this, "FHhB", function (config) {
|
|
20580
20749
|
var _window$Apxor;
|
|
20581
20750
|
var element;
|
|
20582
20751
|
switch (config.type) {
|
|
@@ -20589,26 +20758,27 @@
|
|
|
20589
20758
|
case "video":
|
|
20590
20759
|
element = document.createElement("video");
|
|
20591
20760
|
element.controlsList = "noplaybackrate nodownload nofullscreen";
|
|
20592
|
-
element.controls =
|
|
20761
|
+
element.controls = false;
|
|
20762
|
+
element.muted = true;
|
|
20593
20763
|
element.disablePictureInPicture = true;
|
|
20594
20764
|
element.autoplay = true;
|
|
20595
20765
|
if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
|
|
20596
20766
|
element.playsInline = true;
|
|
20597
20767
|
}
|
|
20598
|
-
if (config.source) {
|
|
20599
|
-
|
|
20600
|
-
|
|
20601
|
-
|
|
20602
|
-
|
|
20603
|
-
|
|
20604
|
-
}
|
|
20605
|
-
if (config.track) {
|
|
20606
|
-
|
|
20607
|
-
|
|
20608
|
-
|
|
20609
|
-
|
|
20610
|
-
|
|
20611
|
-
}
|
|
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
|
+
// }
|
|
20612
20782
|
break;
|
|
20613
20783
|
default:
|
|
20614
20784
|
element = document.createElement(config.type);
|
|
@@ -20618,13 +20788,31 @@
|
|
|
20618
20788
|
// );
|
|
20619
20789
|
|
|
20620
20790
|
if (config.properties) {
|
|
20621
|
-
for (var
|
|
20622
|
-
|
|
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];
|
|
20623
20804
|
}
|
|
20624
20805
|
}
|
|
20625
20806
|
element.classList.add(config._id);
|
|
20626
20807
|
if (config.css) {
|
|
20627
|
-
var styles = "
|
|
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
|
+
}
|
|
20628
20816
|
_this.initialStyles += styles;
|
|
20629
20817
|
}
|
|
20630
20818
|
if (config.enable_actions && config.actions.length > 0) {
|
|
@@ -20634,6 +20822,7 @@
|
|
|
20634
20822
|
case "activity":
|
|
20635
20823
|
case "ir":
|
|
20636
20824
|
element.onclick = function (e) {
|
|
20825
|
+
e.stopPropagation();
|
|
20637
20826
|
window.Apxor.redirect(JSON.stringify(action));
|
|
20638
20827
|
var additional_info = {
|
|
20639
20828
|
campaignName: _this.name,
|
|
@@ -20643,27 +20832,46 @@
|
|
|
20643
20832
|
if (e.target.tagName === "BUTTON") {
|
|
20644
20833
|
additional_info["apx_cta_text"] = e.target.innerHTML;
|
|
20645
20834
|
}
|
|
20646
|
-
window.Apxor.logAppEvent("
|
|
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));
|
|
20647
20851
|
};
|
|
20648
20852
|
break;
|
|
20649
20853
|
case "cancel":
|
|
20650
|
-
element.onclick = function () {
|
|
20854
|
+
element.onclick = function (e) {
|
|
20855
|
+
e.stopPropagation();
|
|
20651
20856
|
window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
|
|
20652
20857
|
};
|
|
20653
20858
|
break;
|
|
20654
20859
|
case "dismiss":
|
|
20655
|
-
element.onclick = function () {
|
|
20860
|
+
element.onclick = function (e) {
|
|
20861
|
+
e.stopPropagation();
|
|
20656
20862
|
window.Apxor.logActionEvent("".concat(_this.type, "_dismissed"), _this.configId, _this.name);
|
|
20657
20863
|
};
|
|
20658
20864
|
break;
|
|
20659
20865
|
case "never":
|
|
20660
|
-
element.onclick = function () {
|
|
20866
|
+
element.onclick = function (e) {
|
|
20867
|
+
e.stopPropagation();
|
|
20661
20868
|
window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
|
|
20662
20869
|
window.Apxor.logActionEvent("never_show_clicked", _this.configId, _this.name);
|
|
20663
20870
|
};
|
|
20664
20871
|
break;
|
|
20665
20872
|
case "toggle-class":
|
|
20666
|
-
element.onclick = function () {
|
|
20873
|
+
element.onclick = function (e) {
|
|
20874
|
+
e.stopPropagation();
|
|
20667
20875
|
var elementToBeToggled = document.getElementById(action === null || action === void 0 ? void 0 : action.target_id);
|
|
20668
20876
|
if (isNull(elementToBeToggled)) {
|
|
20669
20877
|
elementToBeToggled = document.querySelector(action === null || action === void 0 ? void 0 : action.target_id);
|
|
@@ -20674,8 +20882,9 @@
|
|
|
20674
20882
|
};
|
|
20675
20883
|
break;
|
|
20676
20884
|
case "copy-content":
|
|
20677
|
-
element.onclick = function () {
|
|
20678
|
-
|
|
20885
|
+
element.onclick = function (e) {
|
|
20886
|
+
e.stopPropagation();
|
|
20887
|
+
var textToCopy = action === null || action === void 0 ? void 0 : action.content;
|
|
20679
20888
|
var tempInput = document.createElement("input");
|
|
20680
20889
|
tempInput.value = textToCopy;
|
|
20681
20890
|
document.body.appendChild(tempInput);
|
|
@@ -20685,12 +20894,14 @@
|
|
|
20685
20894
|
};
|
|
20686
20895
|
break;
|
|
20687
20896
|
case "log-app-event":
|
|
20688
|
-
element.onclick = function () {
|
|
20897
|
+
element.onclick = function (e) {
|
|
20898
|
+
e.stopPropagation();
|
|
20689
20899
|
window.Apxor.logAppEvent(action === null || action === void 0 ? void 0 : action.event_name);
|
|
20690
20900
|
};
|
|
20691
20901
|
break;
|
|
20692
20902
|
case "log-client-event":
|
|
20693
|
-
element.onclick = function () {
|
|
20903
|
+
element.onclick = function (e) {
|
|
20904
|
+
e.stopPropagation();
|
|
20694
20905
|
window.Apxor.logClientEvent(action === null || action === void 0 ? void 0 : action.event_name);
|
|
20695
20906
|
};
|
|
20696
20907
|
}
|
|
@@ -20699,10 +20910,10 @@
|
|
|
20699
20910
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
20700
20911
|
element.style.position = "relative";
|
|
20701
20912
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
20702
|
-
var childElement = _this.
|
|
20913
|
+
var childElement = _this.OKHv(childConfig);
|
|
20703
20914
|
childElement.style.position = "absolute";
|
|
20704
|
-
for (var
|
|
20705
|
-
childElement.style[
|
|
20915
|
+
for (var _prop in childConfig.offset) {
|
|
20916
|
+
childElement.style[_prop] = childConfig.offset[_prop];
|
|
20706
20917
|
}
|
|
20707
20918
|
element.appendChild(childElement);
|
|
20708
20919
|
});
|
|
@@ -20717,13 +20928,33 @@
|
|
|
20717
20928
|
// }
|
|
20718
20929
|
|
|
20719
20930
|
config.children.forEach(function (childConfig) {
|
|
20720
|
-
var childElement = _this.
|
|
20931
|
+
var childElement = _this.FHhB(childConfig);
|
|
20721
20932
|
element.appendChild(childElement);
|
|
20722
20933
|
});
|
|
20723
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
|
+
}
|
|
20724
20955
|
return element;
|
|
20725
20956
|
});
|
|
20726
|
-
_defineProperty(this, "
|
|
20957
|
+
_defineProperty(this, "rEHS", function (config) {
|
|
20727
20958
|
config.forEach(function (id) {
|
|
20728
20959
|
var element = document.getElementById(id);
|
|
20729
20960
|
if (element) {
|
|
@@ -20731,11 +20962,23 @@
|
|
|
20731
20962
|
}
|
|
20732
20963
|
});
|
|
20733
20964
|
});
|
|
20734
|
-
_defineProperty(this, "
|
|
20735
|
-
|
|
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;
|
|
20736
20977
|
var width = window.document.querySelector("html").offsetWidth;
|
|
20737
20978
|
var height = window.document.querySelector("html").offsetHeight;
|
|
20738
|
-
(
|
|
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();
|
|
20739
20982
|
});
|
|
20740
20983
|
this.configId = configId;
|
|
20741
20984
|
this.name = name;
|
|
@@ -20746,19 +20989,25 @@
|
|
|
20746
20989
|
this.termination = (_config$termination = _config.termination) !== null && _config$termination !== void 0 ? _config$termination : [];
|
|
20747
20990
|
this.script = _config.script;
|
|
20748
20991
|
this.initialStyles = "";
|
|
20992
|
+
this.imageElements = [];
|
|
20993
|
+
this.videoElements = [];
|
|
20994
|
+
this.intervalToCheckImgStatus;
|
|
20995
|
+
this.waitInterval = 30;
|
|
20749
20996
|
});
|
|
20750
20997
|
|
|
20751
20998
|
var RTM = /*#__PURE__*/_createClass(function RTM() {
|
|
20752
20999
|
var _this = this;
|
|
20753
21000
|
_classCallCheck(this, RTM);
|
|
20754
|
-
_defineProperty(this, "
|
|
21001
|
+
_defineProperty(this, "LikI", {});
|
|
20755
21002
|
_defineProperty(this, "isShowingAction", false);
|
|
20756
21003
|
_defineProperty(this, "currentAction", null);
|
|
20757
|
-
_defineProperty(this, "
|
|
20758
|
-
_defineProperty(this, "version",
|
|
21004
|
+
_defineProperty(this, "WliE", null);
|
|
21005
|
+
_defineProperty(this, "version", 60);
|
|
20759
21006
|
_defineProperty(this, "isInitialised", false);
|
|
20760
|
-
_defineProperty(this, "
|
|
20761
|
-
_defineProperty(this, "
|
|
21007
|
+
_defineProperty(this, "KMXd", {});
|
|
21008
|
+
_defineProperty(this, "aAuZ", false);
|
|
21009
|
+
_defineProperty(this, "_isShownECCalled", false);
|
|
21010
|
+
_defineProperty(this, "NBcm", function () {
|
|
20762
21011
|
_this.isInitialised = true;
|
|
20763
21012
|
var oldPushState = history.pushState;
|
|
20764
21013
|
history.pushState = function pushState() {
|
|
@@ -20783,7 +21032,7 @@
|
|
|
20783
21032
|
});
|
|
20784
21033
|
_defineProperty(this, "show", function (uiJson, duration, uuid, name) {
|
|
20785
21034
|
if (!_this.isInitialised) {
|
|
20786
|
-
_this.
|
|
21035
|
+
_this.NBcm();
|
|
20787
21036
|
}
|
|
20788
21037
|
window.addEventListener("pagehide", function () {
|
|
20789
21038
|
var _window$Apxor, _window$Apxor$pageUnl;
|
|
@@ -20792,7 +21041,9 @@
|
|
|
20792
21041
|
try {
|
|
20793
21042
|
// console.log("Showing action for uuid:", uuid, uiJson, this.currentAction);
|
|
20794
21043
|
if (_this.currentAction !== null && _this.currentAction !== undefined) {
|
|
21044
|
+
var _window;
|
|
20795
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");
|
|
20796
21047
|
return;
|
|
20797
21048
|
}
|
|
20798
21049
|
uiJson = uiJson.split("\n").join("\\n");
|
|
@@ -20808,7 +21059,7 @@
|
|
|
20808
21059
|
} else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
|
|
20809
21060
|
_this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
|
|
20810
21061
|
} else if (ui_config.display_type === "coach_mark_v2") {
|
|
20811
|
-
_this.
|
|
21062
|
+
_this.iPLW(ui_config, duration, uuid, name);
|
|
20812
21063
|
} else {
|
|
20813
21064
|
showCoachmarkWithDelay(_this, ui_config, {
|
|
20814
21065
|
configId: uuid,
|
|
@@ -20816,21 +21067,21 @@
|
|
|
20816
21067
|
}, terminationConfig, function () {
|
|
20817
21068
|
_this.isShowingAction = true;
|
|
20818
21069
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
20819
|
-
var
|
|
20820
|
-
(
|
|
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);
|
|
20821
21072
|
window.Apxor.logActionEvent("inline_shown", uuid, name);
|
|
20822
|
-
(
|
|
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);
|
|
20823
21074
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
20824
21075
|
setTimeout(function () {
|
|
20825
|
-
var
|
|
20826
|
-
(
|
|
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");
|
|
20827
21078
|
}, 500);
|
|
20828
21079
|
}
|
|
20829
21080
|
}
|
|
20830
21081
|
}, function (action) {
|
|
20831
|
-
var
|
|
21082
|
+
var _window5, _window5$updateFlag;
|
|
20832
21083
|
_this.isShowingAction = false;
|
|
20833
|
-
(
|
|
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);
|
|
20834
21085
|
_this.currentAction = null;
|
|
20835
21086
|
if (window.Apxor && window.Apxor.logActionEvent && !(isDefined(action) && (action === "redirect" || action === "cancel"))) {
|
|
20836
21087
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
@@ -20840,10 +21091,11 @@
|
|
|
20840
21091
|
});
|
|
20841
21092
|
}
|
|
20842
21093
|
} catch (e) {
|
|
20843
|
-
var
|
|
21094
|
+
var _window6, _window6$updateFlag, _window7;
|
|
20844
21095
|
_this.isShowingAction = false;
|
|
20845
|
-
(
|
|
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);
|
|
20846
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));
|
|
20847
21099
|
}
|
|
20848
21100
|
});
|
|
20849
21101
|
_defineProperty(this, "showInApp", function (config, duration, configId, name) {
|
|
@@ -20855,53 +21107,66 @@
|
|
|
20855
21107
|
_this.createInAppModal(config, duration, configId, name, JSON.parse(config).action_class === "inapp_builder" ? "inapp_builder" : "modal");
|
|
20856
21108
|
}
|
|
20857
21109
|
} catch (e) {
|
|
20858
|
-
var _window$Apxor2;
|
|
21110
|
+
var _window$Apxor2, _window10;
|
|
20859
21111
|
if (((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios") {
|
|
20860
|
-
var
|
|
20861
|
-
(
|
|
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");
|
|
20862
21114
|
} else {
|
|
20863
|
-
var
|
|
20864
|
-
(
|
|
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);
|
|
20865
21117
|
}
|
|
20866
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));
|
|
20867
21120
|
}
|
|
20868
21121
|
});
|
|
20869
|
-
_defineProperty(this, "
|
|
21122
|
+
_defineProperty(this, "showEmbedCards", function (config, duration, configId, name) {
|
|
21123
|
+
if (_this._isShownECCalled) {
|
|
21124
|
+
return;
|
|
21125
|
+
}
|
|
20870
21126
|
try {
|
|
20871
21127
|
config = config.split("\n").join("\\n");
|
|
20872
21128
|
var ui_config = JSON.parse(config);
|
|
20873
|
-
_this.
|
|
21129
|
+
_this.createembedCards(ui_config, configId, name);
|
|
20874
21130
|
} catch (e) {
|
|
20875
|
-
var
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
|
|
20879
|
-
|
|
20880
|
-
|
|
20881
|
-
(
|
|
20882
|
-
}
|
|
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
|
+
}));
|
|
20883
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));
|
|
20884
21141
|
}
|
|
20885
21142
|
});
|
|
20886
|
-
_defineProperty(this, "
|
|
21143
|
+
_defineProperty(this, "createembedCards", function (config, configId, name) {
|
|
20887
21144
|
var cardsContainer = new EmbedCards(config, configId, name, function () {
|
|
20888
|
-
|
|
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({
|
|
20889
21148
|
campaignName: name,
|
|
20890
21149
|
id: configId,
|
|
20891
21150
|
apx_nudge_type: "sticky_card"
|
|
20892
21151
|
}));
|
|
20893
|
-
|
|
20894
|
-
|
|
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();
|
|
20895
21158
|
});
|
|
20896
21159
|
_defineProperty(this, "removeAll", function () {
|
|
20897
|
-
var
|
|
20898
|
-
(
|
|
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);
|
|
20899
21162
|
if (_this.currentAction !== null && _this.currentAction !== undefined) {
|
|
20900
21163
|
_this.isShowingAction = false;
|
|
20901
21164
|
try {
|
|
21165
|
+
var _window15;
|
|
20902
21166
|
_this.currentAction();
|
|
20903
21167
|
_this.currentAction = null;
|
|
20904
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");
|
|
20905
21170
|
} catch (e) {}
|
|
20906
21171
|
}
|
|
20907
21172
|
});
|
|
@@ -20913,48 +21178,48 @@
|
|
|
20913
21178
|
var onShow = function onShow() {
|
|
20914
21179
|
_this.isShowingAction = true;
|
|
20915
21180
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
20916
|
-
var
|
|
20917
|
-
(
|
|
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);
|
|
20918
21183
|
window.Apxor.logActionEvent("inline_shown", uuid, name);
|
|
20919
|
-
(
|
|
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);
|
|
20920
21185
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
20921
21186
|
setTimeout(function () {
|
|
20922
|
-
var
|
|
20923
|
-
(
|
|
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");
|
|
20924
21189
|
}, 500);
|
|
20925
21190
|
}
|
|
20926
21191
|
}
|
|
20927
21192
|
};
|
|
20928
21193
|
var onHide = function onHide(isCancelled) {
|
|
20929
|
-
var
|
|
21194
|
+
var _window19, _window19$updateFlag, _window20;
|
|
20930
21195
|
_this.isShowingAction = false;
|
|
20931
21196
|
_this.currentAction = null;
|
|
20932
|
-
_this.
|
|
20933
|
-
(
|
|
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);
|
|
20934
21199
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
20935
21200
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
20936
21201
|
}
|
|
20937
|
-
if (((
|
|
20938
|
-
var
|
|
20939
|
-
(
|
|
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();
|
|
20940
21205
|
}
|
|
20941
21206
|
};
|
|
20942
21207
|
if (action_class === "new-inline") {
|
|
20943
|
-
_this.
|
|
21208
|
+
_this.WliE = new InLineTooltip(ui_config, [], [], terminationConfig, {
|
|
20944
21209
|
configId: uuid,
|
|
20945
21210
|
configName: name
|
|
20946
21211
|
}, _this, onShow, onHide, function () {}, false, 0);
|
|
20947
21212
|
} else if (action_class === "tooltip_builder") {
|
|
20948
|
-
_this.
|
|
21213
|
+
_this.WliE = new NewInLineTooltip(ui_config, terminationConfig, {
|
|
20949
21214
|
configId: uuid,
|
|
20950
21215
|
configName: name
|
|
20951
21216
|
}, _this, onShow, onHide);
|
|
20952
21217
|
}
|
|
20953
21218
|
setTimeout(function () {
|
|
20954
|
-
_this.
|
|
21219
|
+
_this.WliE.createNewTooltip();
|
|
20955
21220
|
}, ui_config.delay);
|
|
20956
21221
|
});
|
|
20957
|
-
_defineProperty(this, "
|
|
21222
|
+
_defineProperty(this, "iPLW", function (ui_config, duration, uuid, name) {
|
|
20958
21223
|
var terminationConfig = {};
|
|
20959
21224
|
terminationConfig["auto_dismiss"] = duration > 0;
|
|
20960
21225
|
terminationConfig["duration"] = duration;
|
|
@@ -20964,35 +21229,35 @@
|
|
|
20964
21229
|
}, _this, function () {
|
|
20965
21230
|
_this.isShowingAction = true;
|
|
20966
21231
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
20967
|
-
var
|
|
20968
|
-
(
|
|
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);
|
|
20969
21234
|
window.Apxor.logActionEvent("inline_shown", uuid, name);
|
|
20970
21235
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
20971
21236
|
setTimeout(function () {
|
|
20972
|
-
var
|
|
20973
|
-
(
|
|
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");
|
|
20974
21239
|
}, 500);
|
|
20975
21240
|
}
|
|
20976
21241
|
}
|
|
20977
21242
|
}, function (isCancelled) {
|
|
20978
|
-
var
|
|
21243
|
+
var _window24, _window24$updateFlag, _window25;
|
|
20979
21244
|
_this.isShowingAction = false;
|
|
20980
21245
|
_this.currentAction = null;
|
|
20981
|
-
_this.
|
|
20982
|
-
(
|
|
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);
|
|
20983
21248
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
20984
21249
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
20985
21250
|
}
|
|
20986
|
-
if (((
|
|
20987
|
-
var
|
|
20988
|
-
(
|
|
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();
|
|
20989
21254
|
}
|
|
20990
21255
|
}, _this.stepperCallback, false, 0);
|
|
20991
21256
|
_this._currentCoachmark.createNewCoachMark();
|
|
20992
21257
|
});
|
|
20993
21258
|
_defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
|
|
20994
|
-
if (_this.
|
|
20995
|
-
_this.
|
|
21259
|
+
if (_this.WliE) {
|
|
21260
|
+
_this.WliE.updateElementPositionOnScroll(top, left, height, width);
|
|
20996
21261
|
}
|
|
20997
21262
|
});
|
|
20998
21263
|
_defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
|
|
@@ -21009,20 +21274,20 @@
|
|
|
21009
21274
|
var VideoInAppInstance = new VideoInApp(videoConfig, terminationConfig, configId, name, function () {
|
|
21010
21275
|
_this.isShowingAction = true;
|
|
21011
21276
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
21012
|
-
var
|
|
21013
|
-
(
|
|
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);
|
|
21014
21279
|
window.Apxor.logActionEvent("inapp_shown", configId, name);
|
|
21015
21280
|
}
|
|
21016
21281
|
}, function () {
|
|
21017
|
-
var
|
|
21282
|
+
var _window28, _window28$updateFlag;
|
|
21018
21283
|
_this.isShowingAction = false;
|
|
21019
21284
|
_this.currentAction = null;
|
|
21020
|
-
(
|
|
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);
|
|
21021
21286
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
21022
21287
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|
|
21023
21288
|
}
|
|
21024
21289
|
});
|
|
21025
|
-
VideoInAppInstance.
|
|
21290
|
+
VideoInAppInstance.showVideoInApp();
|
|
21026
21291
|
});
|
|
21027
21292
|
/**
|
|
21028
21293
|
* Creates a modal for the given config and displays it.
|
|
@@ -21043,19 +21308,19 @@
|
|
|
21043
21308
|
var onShow = function onShow() {
|
|
21044
21309
|
_this.isShowingAction = true;
|
|
21045
21310
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
21046
|
-
var _window$
|
|
21047
|
-
if (((_window$
|
|
21048
|
-
var
|
|
21049
|
-
(
|
|
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");
|
|
21050
21315
|
} else {
|
|
21051
|
-
var
|
|
21052
|
-
(
|
|
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);
|
|
21053
21318
|
}
|
|
21054
21319
|
window.Apxor.logActionEvent("inapp_shown", configId, name);
|
|
21055
21320
|
}
|
|
21056
21321
|
};
|
|
21057
21322
|
var onHide = function onHide(backgroundDiv, action) {
|
|
21058
|
-
var _dialogContent$classL, _window$
|
|
21323
|
+
var _dialogContent$classL, _window$Apxor4;
|
|
21059
21324
|
var cssClass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ".apx-dlg-c";
|
|
21060
21325
|
var closeListener = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
21061
21326
|
var redirectionListener = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
@@ -21066,12 +21331,12 @@
|
|
|
21066
21331
|
// setTimeout(() => {
|
|
21067
21332
|
backgroundDiv.remove();
|
|
21068
21333
|
_this.isShowingAction = false;
|
|
21069
|
-
if (((_window$
|
|
21070
|
-
var
|
|
21071
|
-
(
|
|
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");
|
|
21072
21337
|
} else {
|
|
21073
|
-
var
|
|
21074
|
-
(
|
|
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);
|
|
21075
21340
|
}
|
|
21076
21341
|
_this.currentAction = null;
|
|
21077
21342
|
if (window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
|
|
@@ -21086,7 +21351,11 @@
|
|
|
21086
21351
|
inappModal.createInAppModal();
|
|
21087
21352
|
});
|
|
21088
21353
|
_defineProperty(this, "showPlaceHolder", function () {
|
|
21089
|
-
var
|
|
21354
|
+
var _window33;
|
|
21355
|
+
if (_this.aAuZ) {
|
|
21356
|
+
return;
|
|
21357
|
+
}
|
|
21358
|
+
_this.aAuZ = true;
|
|
21090
21359
|
var ele = document.createElement("div");
|
|
21091
21360
|
ele.innerHTML = "place your immersive card here";
|
|
21092
21361
|
ele.style.backgroundColor = "#f5f5f5";
|
|
@@ -21096,7 +21365,7 @@
|
|
|
21096
21365
|
ele.style.padding = "12px";
|
|
21097
21366
|
ele.style.fontSize = "14px";
|
|
21098
21367
|
document.body.appendChild(ele);
|
|
21099
|
-
(
|
|
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);
|
|
21100
21369
|
});
|
|
21101
21370
|
} // createSurvey = (config, configId, name) => {
|
|
21102
21371
|
// const survey_obj = new NewSurveys(configId, name, config, []);
|