apxor-rtm-ui 0.9.2 → 0.9.3
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 +456 -317
- package/dist/apxor.rtm.min.js +4 -4
- package/package.json +1 -1
package/dist/apxor.rtm.js.bak
CHANGED
|
@@ -7910,6 +7910,7 @@
|
|
|
7910
7910
|
var iframe_id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
7911
7911
|
var find_config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
7912
7912
|
var view_additional_info = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
7913
|
+
var element = null;
|
|
7913
7914
|
// Given selector can be an ID.
|
|
7914
7915
|
if (Object.keys(view_additional_info).length > 0 && Object.keys(find_config).length > 0 && (find_config === null || find_config === void 0 ? void 0 : find_config.search_criteria[0]) == "content") {
|
|
7915
7916
|
var _elements_list;
|
|
@@ -7939,27 +7940,29 @@
|
|
|
7939
7940
|
if (element) {
|
|
7940
7941
|
return element;
|
|
7941
7942
|
}
|
|
7942
|
-
}
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7943
|
+
} else {
|
|
7944
|
+
element = document.getElementById(selector);
|
|
7945
|
+
if (!element) {
|
|
7946
|
+
try {
|
|
7947
|
+
element = document.querySelector(selector);
|
|
7948
|
+
} catch (e) {
|
|
7949
|
+
//If there is an exception, it means it is not a valid selector.
|
|
7950
|
+
console.error("Error finding element in DOM:" + e);
|
|
7951
|
+
}
|
|
7952
|
+
}
|
|
7953
|
+
// If no element is found till now, it means it is neither an ID nor a valid css selector. It could be an XPath.
|
|
7954
|
+
if (!element) {
|
|
7955
|
+
element = getElementByXPath(selector);
|
|
7950
7956
|
}
|
|
7951
|
-
}
|
|
7952
|
-
// If no element is found till now, it means it is neither an ID nor a valid css selector. It could be an XPath.
|
|
7953
|
-
if (!element) {
|
|
7954
|
-
element = getElementByXPath(selector);
|
|
7955
|
-
}
|
|
7956
7957
|
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7958
|
+
// If no element is found, it means the selector is not an ID. It could be a css selector
|
|
7959
|
+
if (!element && iframe_id.length > 0) {
|
|
7960
|
+
var _document$getElementB;
|
|
7961
|
+
element = (_document$getElementB = document.getElementById(iframe_id)) === null || _document$getElementB === void 0 || (_document$getElementB = _document$getElementB.contentWindow) === null || _document$getElementB === void 0 || (_document$getElementB = _document$getElementB.document) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.querySelector(selector);
|
|
7962
|
+
}
|
|
7963
|
+
return element;
|
|
7961
7964
|
}
|
|
7962
|
-
return
|
|
7965
|
+
return null;
|
|
7963
7966
|
};
|
|
7964
7967
|
var getElementByXPath = function getElementByXPath(path) {
|
|
7965
7968
|
var index = path.indexOf("svg");
|
|
@@ -8074,7 +8077,12 @@
|
|
|
8074
8077
|
break;
|
|
8075
8078
|
case "redirect":
|
|
8076
8079
|
action = function action() {
|
|
8077
|
-
|
|
8080
|
+
var _window$Apxor3;
|
|
8081
|
+
if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
|
|
8082
|
+
window.Apxor.redirectTo(action_config_str);
|
|
8083
|
+
} else {
|
|
8084
|
+
window.Apxor.redirectTo(uuid, name, text, action_config_str);
|
|
8085
|
+
}
|
|
8078
8086
|
ActionHandler.complete(_action);
|
|
8079
8087
|
};
|
|
8080
8088
|
break;
|
|
@@ -8298,7 +8306,9 @@
|
|
|
8298
8306
|
_uiConfig$set_font_to = uiConfig.set_font_to_scale,
|
|
8299
8307
|
set_font_to_scale = _uiConfig$set_font_to === void 0 ? false : _uiConfig$set_font_to,
|
|
8300
8308
|
_uiConfig$is_preview = uiConfig.is_preview,
|
|
8301
|
-
is_preview = _uiConfig$is_preview === void 0 ? false : _uiConfig$is_preview
|
|
8309
|
+
is_preview = _uiConfig$is_preview === void 0 ? false : _uiConfig$is_preview,
|
|
8310
|
+
_uiConfig$additional_ = uiConfig.additional_info,
|
|
8311
|
+
additional_info = _uiConfig$additional_ === void 0 ? {} : _uiConfig$additional_;
|
|
8302
8312
|
var dismissOnScroll;
|
|
8303
8313
|
var configId = messageConfig.configId,
|
|
8304
8314
|
configName = messageConfig.configName;
|
|
@@ -8323,44 +8333,75 @@
|
|
|
8323
8333
|
var action_config = (button_config === null || button_config === void 0 ? void 0 : button_config.action_config) || {};
|
|
8324
8334
|
var action_config_str = JSON.stringify(action_config);
|
|
8325
8335
|
var url = (_button_config$action3 = button_config === null || button_config === void 0 || (_button_config$action4 = button_config.action_config) === null || _button_config$action4 === void 0 ? void 0 : _button_config$action4.url) !== null && _button_config$action3 !== void 0 ? _button_config$action3 : "";
|
|
8336
|
+
var logBtnClickEvent = function logBtnClickEvent() {
|
|
8337
|
+
if (additional_info.version && additional_info.version === 4) {
|
|
8338
|
+
var _window$Apxor, _additional_info$apx_, _window$Apxor2;
|
|
8339
|
+
(_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 || _window$Apxor.logAppEvent("apx_nudge_CTA_clicked", {
|
|
8340
|
+
apx_nudge_name: configName,
|
|
8341
|
+
apx_nudge_id: configId,
|
|
8342
|
+
apx_cta_name: button_text,
|
|
8343
|
+
apx_variant_code: (_additional_info$apx_ = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_ !== void 0 ? _additional_info$apx_ : "",
|
|
8344
|
+
apx_step: ((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios" ? additional_info !== null && additional_info !== void 0 && additional_info.is_preview ? 1 : additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step : additional_info !== null && additional_info !== void 0 && additional_info.is_preview ? 1 : additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step
|
|
8345
|
+
});
|
|
8346
|
+
} else {
|
|
8347
|
+
window.Apxor.logActionEvent("inline_".concat(button_text, "_Clicked"), configId, configName);
|
|
8348
|
+
}
|
|
8349
|
+
};
|
|
8326
8350
|
switch (_action) {
|
|
8327
8351
|
case "done":
|
|
8328
8352
|
case "dismiss":
|
|
8329
8353
|
action = function action() {
|
|
8330
|
-
|
|
8354
|
+
logBtnClickEvent();
|
|
8331
8355
|
ApxorWalkthroughTour.complete();
|
|
8332
8356
|
};
|
|
8333
8357
|
break;
|
|
8334
8358
|
case "next":
|
|
8335
8359
|
action = function action() {
|
|
8336
|
-
|
|
8360
|
+
logBtnClickEvent();
|
|
8337
8361
|
ApxorWalkthroughTour.complete();
|
|
8338
8362
|
};
|
|
8339
8363
|
break;
|
|
8340
8364
|
case "prev":
|
|
8341
8365
|
action = function action() {
|
|
8342
|
-
|
|
8366
|
+
logBtnClickEvent();
|
|
8343
8367
|
ApxorWalkthroughTour.complete();
|
|
8344
8368
|
};
|
|
8345
8369
|
break;
|
|
8346
8370
|
case "redirect":
|
|
8347
8371
|
action = function action() {
|
|
8372
|
+
var _window$Apxor3;
|
|
8348
8373
|
buttonAction = "redirect";
|
|
8374
|
+
if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
|
|
8375
|
+
window.Apxor.redirectTo(JSON.stringify(action_config));
|
|
8376
|
+
} else {
|
|
8377
|
+
window.Apxor.redirectTo(configId, configName, button_text, action_config_str);
|
|
8378
|
+
}
|
|
8379
|
+
logBtnClickEvent();
|
|
8349
8380
|
ApxorWalkthroughTour.complete();
|
|
8350
|
-
window.Apxor.redirectTo(configId, configName, button_text, action_config_str);
|
|
8351
8381
|
};
|
|
8352
8382
|
break;
|
|
8353
8383
|
case "cancel":
|
|
8354
8384
|
action = function action() {
|
|
8355
8385
|
buttonAction = "cancel";
|
|
8356
|
-
|
|
8386
|
+
logBtnClickEvent();
|
|
8357
8387
|
ApxorWalkthroughTour.complete();
|
|
8358
8388
|
window.Apxor.logActionEvent("walk_through_cancelled", configId, configName);
|
|
8359
8389
|
};
|
|
8360
8390
|
break;
|
|
8391
|
+
case "never":
|
|
8392
|
+
action = function action() {
|
|
8393
|
+
var _window$Apxor4, _window$Apxor5;
|
|
8394
|
+
buttonAction = "never";
|
|
8395
|
+
logBtnClickEvent();
|
|
8396
|
+
ApxorWalkthroughTour.complete();
|
|
8397
|
+
window.Apxor.logActionEvent("never_show_clicked", configId, configName);
|
|
8398
|
+
(_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 || _window$Apxor4.neverShow(configId, configName, "WEB_INLINE");
|
|
8399
|
+
(_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 || _window$Apxor5.updateFlag(false);
|
|
8400
|
+
};
|
|
8401
|
+
break;
|
|
8361
8402
|
default:
|
|
8362
8403
|
action = function action() {
|
|
8363
|
-
|
|
8404
|
+
logBtnClickEvent();
|
|
8364
8405
|
ApxorWalkthroughTour.cancel();
|
|
8365
8406
|
};
|
|
8366
8407
|
}
|
|
@@ -8594,8 +8635,52 @@
|
|
|
8594
8635
|
}
|
|
8595
8636
|
styleDiv === null || styleDiv === void 0 || (_styleDiv$parentNode = styleDiv.parentNode) === null || _styleDiv$parentNode === void 0 || _styleDiv$parentNode.removeChild(styleDiv);
|
|
8596
8637
|
(_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || _window2.updateFlag(false);
|
|
8597
|
-
if (
|
|
8598
|
-
|
|
8638
|
+
if (buttonAction !== null) {
|
|
8639
|
+
// when btn is click, loggging event based on button action
|
|
8640
|
+
if (buttonAction !== "redirect" || buttonAction !== "never" || buttonAction !== "cancel") {
|
|
8641
|
+
if (additional_info.version && additional_info.version === 4) {
|
|
8642
|
+
var _window$Apxor6, _additional_info$apx_2, _additional_info$apx_3;
|
|
8643
|
+
(_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 || _window$Apxor6.logAppEvent("apx_nudge_dismissed", {
|
|
8644
|
+
apx_nudge_id: configId,
|
|
8645
|
+
apx_nudge_name: configName,
|
|
8646
|
+
apx_step: (_additional_info$apx_2 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_2 !== void 0 ? _additional_info$apx_2 : 1,
|
|
8647
|
+
apx_termination_type: buttonAction + " Clicked",
|
|
8648
|
+
apx_variant_code: (_additional_info$apx_3 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_3 !== void 0 ? _additional_info$apx_3 : ""
|
|
8649
|
+
});
|
|
8650
|
+
} else {
|
|
8651
|
+
window.Apxor.logActionEvent("inline_dismissed", configId, configName);
|
|
8652
|
+
}
|
|
8653
|
+
}
|
|
8654
|
+
|
|
8655
|
+
// logging nudge_terminated event when button action is never show
|
|
8656
|
+
if (buttonAction === "never") {
|
|
8657
|
+
if (additional_info.version && additional_info.version === 4) {
|
|
8658
|
+
var _window$Apxor7, _additional_info$apx_4, _additional_info$apx_5;
|
|
8659
|
+
(_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 || _window$Apxor7.logAppEvent("apx_nudge_terminated", {
|
|
8660
|
+
apx_nudge_id: configId,
|
|
8661
|
+
apx_nudge_name: configName,
|
|
8662
|
+
apx_step: (_additional_info$apx_4 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_4 !== void 0 ? _additional_info$apx_4 : 1,
|
|
8663
|
+
apx_termination_type: buttonAction + " Clicked",
|
|
8664
|
+
apx_variant_code: (_additional_info$apx_5 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_5 !== void 0 ? _additional_info$apx_5 : ""
|
|
8665
|
+
});
|
|
8666
|
+
} else {
|
|
8667
|
+
window.Apxor.logActionEvent("inline_dismissed", configId, configName);
|
|
8668
|
+
}
|
|
8669
|
+
}
|
|
8670
|
+
} else {
|
|
8671
|
+
// when btn is not clicked, logging dismiss event
|
|
8672
|
+
if (additional_info.version && additional_info.version === 4) {
|
|
8673
|
+
var _window$Apxor8, _additional_info$apx_6, _additional_info$apx_7;
|
|
8674
|
+
(_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 || _window$Apxor8.logAppEvent("apx_nudge_dismissed", {
|
|
8675
|
+
apx_nudge_id: configId,
|
|
8676
|
+
apx_nudge_name: configName,
|
|
8677
|
+
apx_step: (_additional_info$apx_6 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_6 !== void 0 ? _additional_info$apx_6 : 1,
|
|
8678
|
+
apx_termination_type: buttonAction + " Clicked",
|
|
8679
|
+
apx_variant_code: (_additional_info$apx_7 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_7 !== void 0 ? _additional_info$apx_7 : ""
|
|
8680
|
+
});
|
|
8681
|
+
} else {
|
|
8682
|
+
window.Apxor.logActionEvent("inline_dismissed", configId, configName);
|
|
8683
|
+
}
|
|
8599
8684
|
}
|
|
8600
8685
|
rtmInstance.isShowingAction = false;
|
|
8601
8686
|
rtmInstance.currentAction = null;
|
|
@@ -8685,10 +8770,21 @@
|
|
|
8685
8770
|
onShow: function onShow() {
|
|
8686
8771
|
var _window5, _window5$updateFlag;
|
|
8687
8772
|
(_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, true);
|
|
8688
|
-
|
|
8773
|
+
if (additional_info.version && additional_info.version === 4) {
|
|
8774
|
+
var _window6, _additional_info$apx_8, _additional_info$apx_9, _additional_info$apx_10;
|
|
8775
|
+
(_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || _window6.logAppEvent("apx_nudge_shown", {
|
|
8776
|
+
apx_nudge_id: messageConfig.configId,
|
|
8777
|
+
apx_nudge_name: messageConfig.configName,
|
|
8778
|
+
apx_step: (_additional_info$apx_8 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_8 !== void 0 ? _additional_info$apx_8 : 1,
|
|
8779
|
+
apx_variant_code: (_additional_info$apx_9 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_9 !== void 0 ? _additional_info$apx_9 : "",
|
|
8780
|
+
apx_screen_name: (_additional_info$apx_10 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_screen_name) !== null && _additional_info$apx_10 !== void 0 ? _additional_info$apx_10 : ""
|
|
8781
|
+
});
|
|
8782
|
+
} else {
|
|
8783
|
+
window.Apxor.logActionEvent("inline_shown", configId, configName);
|
|
8784
|
+
}
|
|
8689
8785
|
if (is_preview) setTimeout(function () {
|
|
8690
|
-
var
|
|
8691
|
-
(
|
|
8786
|
+
var _window7, _window7$logInternalE;
|
|
8787
|
+
(_window7 = window) === null || _window7 === void 0 || (_window7 = _window7.Apxor) === null || _window7 === void 0 || (_window7$logInternalE = _window7.logInternalEvent) === null || _window7$logInternalE === void 0 || _window7$logInternalE.call(_window7, "capt");
|
|
8692
8788
|
}, 500);
|
|
8693
8789
|
window.Apxor.updateCount(configId);
|
|
8694
8790
|
rtmInstance.isShowingAction = true;
|
|
@@ -8715,7 +8811,9 @@
|
|
|
8715
8811
|
_uiConfig$max_find_in = uiConfig.max_find_interval,
|
|
8716
8812
|
max_find_interval = _uiConfig$max_find_in === void 0 ? 10000 : _uiConfig$max_find_in,
|
|
8717
8813
|
_uiConfig$scrollToVie = uiConfig.scrollToView,
|
|
8718
|
-
scrollToView = _uiConfig$scrollToVie === void 0 ? true : _uiConfig$scrollToVie
|
|
8814
|
+
scrollToView = _uiConfig$scrollToVie === void 0 ? true : _uiConfig$scrollToVie,
|
|
8815
|
+
_uiConfig$additional_2 = uiConfig.additional_info,
|
|
8816
|
+
additional_info = _uiConfig$additional_2 === void 0 ? {} : _uiConfig$additional_2;
|
|
8719
8817
|
var scrollTo = false;
|
|
8720
8818
|
// when dim-dim_background is true and scrollToView is false and element is not in viewport then a black mask is applied to the webview and scrolling behaviour doesn't work, to resolve it the below case is written.
|
|
8721
8819
|
if (dim_background && !isElementInViewport(getElementFromSelector(view_id))) {
|
|
@@ -8785,8 +8883,15 @@
|
|
|
8785
8883
|
var currentTime = new Date();
|
|
8786
8884
|
// If the element is not found even after 10sec, stop checking
|
|
8787
8885
|
if (currentTime - recheckStartedAt > max_find_interval) {
|
|
8886
|
+
var _window8, _additional_info$apx_11;
|
|
8788
8887
|
clearInterval(elementRecheckIntervalId);
|
|
8789
8888
|
console.warn("Element with id:".concat(view_id, " not found."));
|
|
8889
|
+
(_window8 = window) === null || _window8 === void 0 || (_window8 = _window8.Apxor) === null || _window8 === void 0 || _window8.logAppEvent("apx_nudge_not_shown", {
|
|
8890
|
+
apx_nudge_id: messageConfig.configId,
|
|
8891
|
+
apx_nudge_name: messageConfig.configName,
|
|
8892
|
+
apx_reason: "View not found",
|
|
8893
|
+
apx_step: (_additional_info$apx_11 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_11 !== void 0 ? _additional_info$apx_11 : 1
|
|
8894
|
+
});
|
|
8790
8895
|
}
|
|
8791
8896
|
}
|
|
8792
8897
|
}, find_interval);
|
|
@@ -8798,6 +8903,14 @@
|
|
|
8798
8903
|
if (find_interval) {
|
|
8799
8904
|
console.warn("Rechecking");
|
|
8800
8905
|
recheckViewElementAndAddStep(view_id);
|
|
8906
|
+
} else {
|
|
8907
|
+
var _window9, _additional_info$apx_12;
|
|
8908
|
+
(_window9 = window) === null || _window9 === void 0 || (_window9 = _window9.Apxor) === null || _window9 === void 0 || _window9.logAppEvent("apx_nudge_not_shown", {
|
|
8909
|
+
apx_nudge_id: messageConfig.configId,
|
|
8910
|
+
apx_nudge_name: messageConfig.configName,
|
|
8911
|
+
apx_reason: "View not found",
|
|
8912
|
+
apx_step: (_additional_info$apx_12 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_12 !== void 0 ? _additional_info$apx_12 : 1
|
|
8913
|
+
});
|
|
8801
8914
|
}
|
|
8802
8915
|
} else {
|
|
8803
8916
|
checkViewPortAndAddStep(element);
|
|
@@ -8809,7 +8922,18 @@
|
|
|
8809
8922
|
}, delay + terminationConfig["duration"]);
|
|
8810
8923
|
}
|
|
8811
8924
|
var dismiss_callback = function dismiss_callback() {
|
|
8812
|
-
|
|
8925
|
+
if (additional_info.version && additional_info.version === 4) {
|
|
8926
|
+
var _window10, _additional_info$apx_13, _additional_info$apx_14;
|
|
8927
|
+
(_window10 = window) === null || _window10 === void 0 || (_window10 = _window10.Apxor) === null || _window10 === void 0 || _window10.logAppEvent("apx_nudge_terminated", {
|
|
8928
|
+
apx_nudge_id: messageConfig.configId,
|
|
8929
|
+
apx_nudge_name: messageConfig.configName,
|
|
8930
|
+
apx_step: (_additional_info$apx_13 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_13 !== void 0 ? _additional_info$apx_13 : 1,
|
|
8931
|
+
apx_termination_type: buttonAction + " Clicked",
|
|
8932
|
+
apx_variant_code: (_additional_info$apx_14 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_variant_code) !== null && _additional_info$apx_14 !== void 0 ? _additional_info$apx_14 : ""
|
|
8933
|
+
});
|
|
8934
|
+
} else {
|
|
8935
|
+
window.Apxor.logActionEvent("inline_dismissed", messageConfig.configId, messageConfig.configName);
|
|
8936
|
+
}
|
|
8813
8937
|
ApxorWalkthroughTour.complete();
|
|
8814
8938
|
};
|
|
8815
8939
|
return dismiss_callback;
|
|
@@ -12172,14 +12296,14 @@
|
|
|
12172
12296
|
_config$wait_interval,
|
|
12173
12297
|
_config$termination;
|
|
12174
12298
|
_classCallCheck(this, TemplateContent);
|
|
12175
|
-
_defineProperty(this, "
|
|
12299
|
+
_defineProperty(this, "tclX", function () {
|
|
12176
12300
|
return new Promise(function (resolve, reject) {
|
|
12177
12301
|
try {
|
|
12178
|
-
var element = _this.
|
|
12302
|
+
var element = _this.JssF(_this.layout);
|
|
12179
12303
|
var styleElement = document.createElement("style");
|
|
12180
12304
|
styleElement.innerHTML = _this.styleContent;
|
|
12181
12305
|
document.head.appendChild(styleElement);
|
|
12182
|
-
_this.
|
|
12306
|
+
_this.jTYU();
|
|
12183
12307
|
try {
|
|
12184
12308
|
eval(_this.script);
|
|
12185
12309
|
} catch (e) {
|
|
@@ -12190,15 +12314,15 @@
|
|
|
12190
12314
|
}
|
|
12191
12315
|
_this.imageElements.forEach(function (img) {
|
|
12192
12316
|
img.addEventListener("error", function () {
|
|
12193
|
-
_this.
|
|
12317
|
+
_this.ayPc("provided image doesn't exists");
|
|
12194
12318
|
});
|
|
12195
12319
|
});
|
|
12196
12320
|
_this.intervalToCheckMediaLoadingStatus = setInterval(function () {
|
|
12197
12321
|
_this.wait_interval -= 1;
|
|
12198
12322
|
if (_this.wait_interval <= 0) {
|
|
12199
|
-
_this.
|
|
12323
|
+
_this.ayPc("provided media doesn't exists");
|
|
12200
12324
|
} else {
|
|
12201
|
-
if (_this.
|
|
12325
|
+
if (_this.XUBL() && _this.kxrF() && _this.sSIh()) {
|
|
12202
12326
|
clearInterval(_this.intervalToCheckMediaLoadingStatus);
|
|
12203
12327
|
resolve(element);
|
|
12204
12328
|
}
|
|
@@ -12212,7 +12336,7 @@
|
|
|
12212
12336
|
}
|
|
12213
12337
|
});
|
|
12214
12338
|
});
|
|
12215
|
-
_defineProperty(this, "
|
|
12339
|
+
_defineProperty(this, "ayPc", function (reason) {
|
|
12216
12340
|
var _window$ApxorRTM, _window$Apxor, _this$config, _this$config2, _window$Apxor2, _this$config3, _this$config4, _this$config5, _this$config6, _window3;
|
|
12217
12341
|
!_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
|
|
12218
12342
|
apx_nudge_name: _this.name,
|
|
@@ -12228,13 +12352,13 @@
|
|
|
12228
12352
|
_this.closeCallBack("cancel");
|
|
12229
12353
|
(_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorInternals) === null || _window3 === void 0 || _window3.removeBuilderTemplate(_this.configId);
|
|
12230
12354
|
});
|
|
12231
|
-
_defineProperty(this, "
|
|
12355
|
+
_defineProperty(this, "jTYU", function () {
|
|
12232
12356
|
var BuilderTemplatesStyles = document.createElement("style");
|
|
12233
12357
|
BuilderTemplatesStyles.innerHTML = _this.initialStyles;
|
|
12234
12358
|
BuilderTemplatesStyles.setAttribute("apx-builder-template-styles", "");
|
|
12235
12359
|
document.head.appendChild(BuilderTemplatesStyles);
|
|
12236
12360
|
});
|
|
12237
|
-
_defineProperty(this, "
|
|
12361
|
+
_defineProperty(this, "JssF", function (config) {
|
|
12238
12362
|
var _window$Apxor3;
|
|
12239
12363
|
var element;
|
|
12240
12364
|
switch (config.type) {
|
|
@@ -12320,7 +12444,7 @@
|
|
|
12320
12444
|
if (config.type === "cta_button" || config.type === "button") {
|
|
12321
12445
|
reason = "cta-clicked";
|
|
12322
12446
|
}
|
|
12323
|
-
_this.
|
|
12447
|
+
_this.dGod(e, "redirect", reason);
|
|
12324
12448
|
if ((_this$config7 = _this.config) !== null && _this$config7 !== void 0 && (_this$config7 = _this$config7.additional_info) !== null && _this$config7 !== void 0 && _this$config7.apx_step) {
|
|
12325
12449
|
var _window4, _this$config8;
|
|
12326
12450
|
(_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || _window4.triggerNextStep(_this.configId, ((_this$config8 = _this.config) === null || _this$config8 === void 0 || (_this$config8 = _this$config8.additional_info) === null || _this$config8 === void 0 ? void 0 : _this$config8.apx_step) + 1);
|
|
@@ -12336,7 +12460,7 @@
|
|
|
12336
12460
|
} else if (config.type === "cta_button" || config.type === "button") {
|
|
12337
12461
|
reason = "cta-clicked";
|
|
12338
12462
|
}
|
|
12339
|
-
_this.
|
|
12463
|
+
_this.dGod(e, "cancel", reason);
|
|
12340
12464
|
// window.Apxor.logActionEvent(
|
|
12341
12465
|
// "walk_through_cancelled",
|
|
12342
12466
|
// this.configId,
|
|
@@ -12355,7 +12479,7 @@
|
|
|
12355
12479
|
} else if (config.type === "cta_button" || config.type === "button") {
|
|
12356
12480
|
reason = "cta-clicked";
|
|
12357
12481
|
}
|
|
12358
|
-
_this.
|
|
12482
|
+
_this.dGod(e, "dismiss", reason);
|
|
12359
12483
|
if ((_this$config9 = _this.config) !== null && _this$config9 !== void 0 && (_this$config9 = _this$config9.additional_info) !== null && _this$config9 !== void 0 && _this$config9.apx_step) {
|
|
12360
12484
|
var _window5, _this$config10;
|
|
12361
12485
|
(_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || _window5.triggerNextStep(_this.configId, ((_this$config10 = _this.config) === null || _this$config10 === void 0 || (_this$config10 = _this$config10.additional_info) === null || _this$config10 === void 0 ? void 0 : _this$config10.apx_step) + 1);
|
|
@@ -12366,7 +12490,7 @@
|
|
|
12366
12490
|
element.onclick = function (e) {
|
|
12367
12491
|
e.stopPropagation();
|
|
12368
12492
|
window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
|
|
12369
|
-
_this.
|
|
12493
|
+
_this.dGod(e, "never");
|
|
12370
12494
|
};
|
|
12371
12495
|
break;
|
|
12372
12496
|
case "toggle-class":
|
|
@@ -12391,7 +12515,7 @@
|
|
|
12391
12515
|
tempInput.select();
|
|
12392
12516
|
document.execCommand("copy");
|
|
12393
12517
|
document.body.removeChild(tempInput);
|
|
12394
|
-
_this.
|
|
12518
|
+
_this.dGod(e, "copy-content", "cta-clicked");
|
|
12395
12519
|
setTimeout(function () {
|
|
12396
12520
|
window.Apxor.showInfoToast("Text-Copied:".concat(textToCopy));
|
|
12397
12521
|
}, 500);
|
|
@@ -12413,7 +12537,7 @@
|
|
|
12413
12537
|
}
|
|
12414
12538
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
12415
12539
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
12416
|
-
var childElement = _this.
|
|
12540
|
+
var childElement = _this.JssF(childConfig);
|
|
12417
12541
|
element.appendChild(childElement);
|
|
12418
12542
|
});
|
|
12419
12543
|
}
|
|
@@ -12421,7 +12545,7 @@
|
|
|
12421
12545
|
// Process children
|
|
12422
12546
|
if (config.children && config.children.length > 0) {
|
|
12423
12547
|
config.children.forEach(function (childConfig) {
|
|
12424
|
-
var childElement = _this.
|
|
12548
|
+
var childElement = _this.JssF(childConfig);
|
|
12425
12549
|
element.appendChild(childElement);
|
|
12426
12550
|
});
|
|
12427
12551
|
}
|
|
@@ -12448,7 +12572,7 @@
|
|
|
12448
12572
|
}
|
|
12449
12573
|
return element;
|
|
12450
12574
|
});
|
|
12451
|
-
_defineProperty(this, "
|
|
12575
|
+
_defineProperty(this, "dGod", function (e, action) {
|
|
12452
12576
|
var _window$Apxor4, _this$config11, _this$config12, _window$Apxor5, _this$config13, _this$config14, _this$config15, _this$config16;
|
|
12453
12577
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
12454
12578
|
var additional_info = {
|
|
@@ -12477,7 +12601,7 @@
|
|
|
12477
12601
|
_this.closeCallBack(action);
|
|
12478
12602
|
}
|
|
12479
12603
|
});
|
|
12480
|
-
_defineProperty(this, "
|
|
12604
|
+
_defineProperty(this, "kxrF", function () {
|
|
12481
12605
|
//This logic is to make sure that image has loaded, it doesn't check whether image is broken
|
|
12482
12606
|
//refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
|
|
12483
12607
|
if (_this.imageElements.length === 0) return true;
|
|
@@ -12485,13 +12609,13 @@
|
|
|
12485
12609
|
return img.complete;
|
|
12486
12610
|
});
|
|
12487
12611
|
});
|
|
12488
|
-
_defineProperty(this, "
|
|
12612
|
+
_defineProperty(this, "sSIh", function () {
|
|
12489
12613
|
if (!_this.bgImageUrl) return true;
|
|
12490
12614
|
var img = new Image();
|
|
12491
12615
|
img.src = _this.bgImageUrl;
|
|
12492
12616
|
return img.complete;
|
|
12493
12617
|
});
|
|
12494
|
-
_defineProperty(this, "
|
|
12618
|
+
_defineProperty(this, "XUBL", function () {
|
|
12495
12619
|
if (_this.videoElements.length === 0) return true;
|
|
12496
12620
|
return _this.videoElements.every(function (video) {
|
|
12497
12621
|
return video.readyState >= 3;
|
|
@@ -13008,7 +13132,8 @@
|
|
|
13008
13132
|
// Read name and id of the config
|
|
13009
13133
|
this.configId = messageConfig.configId;
|
|
13010
13134
|
this.name = messageConfig.configName;
|
|
13011
|
-
|
|
13135
|
+
// Replace spaces with empty then all special characters except "-"
|
|
13136
|
+
this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
|
|
13012
13137
|
this.showCallback = showCallback;
|
|
13013
13138
|
this.closeCallback = hideCallback;
|
|
13014
13139
|
this.targetDeletionObserver = null;
|
|
@@ -13027,6 +13152,8 @@
|
|
|
13027
13152
|
this.interactive_border = config.interactive_border || 10; // Determines the invisible border around the tippy that will prevent it from hiding if the cursorleft it
|
|
13028
13153
|
|
|
13029
13154
|
this.target = new Target$1(config.target);
|
|
13155
|
+
this.view_additional_info = (config === null || config === void 0 ? void 0 : config.view_additional_info) || {};
|
|
13156
|
+
this.find_config = (config === null || config === void 0 ? void 0 : config.find_config) || {};
|
|
13030
13157
|
this.elementHighlighter = new ElementHighlighter(config.highlighter);
|
|
13031
13158
|
this.position = new Position(config.position);
|
|
13032
13159
|
this.enable_dismiss_actions = config.enable_dismiss_actions;
|
|
@@ -13313,7 +13440,7 @@
|
|
|
13313
13440
|
}, {
|
|
13314
13441
|
key: "_findTargetElement",
|
|
13315
13442
|
value: function _findTargetElement(targetFoundCallback) {
|
|
13316
|
-
this.targetElement = getElementFromSelector(this.target.id, this.target.frame_id);
|
|
13443
|
+
this.targetElement = getElementFromSelector(this.target.id, this.target.frame_id, this.find_config, this.view_additional_info);
|
|
13317
13444
|
if (!this.targetElement) {
|
|
13318
13445
|
if (this.target.enable_retry) {
|
|
13319
13446
|
console.info("Not found yet. Rechecking the DOM.");
|
|
@@ -13332,7 +13459,7 @@
|
|
|
13332
13459
|
var _this3 = this;
|
|
13333
13460
|
//After every find_interval check the DOM for target element.
|
|
13334
13461
|
var elementRecheckIntervalId = setInterval(function () {
|
|
13335
|
-
_this3.targetElement = getElementFromSelector(_this3.target.id, _this3.target.frame_id);
|
|
13462
|
+
_this3.targetElement = getElementFromSelector(_this3.target.id, _this3.target.frame_id, _this3.find_config, _this3.view_additional_info);
|
|
13336
13463
|
//If the element is found, stop checking the DOM.
|
|
13337
13464
|
if (_this3.targetElement) {
|
|
13338
13465
|
clearInterval(elementRecheckIntervalId);
|
|
@@ -13427,7 +13554,7 @@
|
|
|
13427
13554
|
case 0:
|
|
13428
13555
|
_context2.prev = 0;
|
|
13429
13556
|
_context2.next = 3;
|
|
13430
|
-
return this.templateContent.
|
|
13557
|
+
return this.templateContent.tclX();
|
|
13431
13558
|
case 3:
|
|
13432
13559
|
this.inLineContainer = _context2.sent;
|
|
13433
13560
|
_context2.next = 9;
|
|
@@ -15004,7 +15131,7 @@
|
|
|
15004
15131
|
* @description Creates the styles for Marketing message.
|
|
15005
15132
|
* @returns {string} css styles
|
|
15006
15133
|
*/
|
|
15007
|
-
_defineProperty(this, "
|
|
15134
|
+
_defineProperty(this, "nqOV", function () {
|
|
15008
15135
|
if (!_this.enable_marketing) {
|
|
15009
15136
|
return "";
|
|
15010
15137
|
}
|
|
@@ -15023,7 +15150,7 @@
|
|
|
15023
15150
|
* @private
|
|
15024
15151
|
* @description Sets the marketing content at the end of the Inline
|
|
15025
15152
|
*/
|
|
15026
|
-
_defineProperty(this, "
|
|
15153
|
+
_defineProperty(this, "BHya", function () {
|
|
15027
15154
|
if (_this.enable_marketing) {
|
|
15028
15155
|
var marketingContainer = document.createElement("div");
|
|
15029
15156
|
marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
|
|
@@ -15044,7 +15171,8 @@
|
|
|
15044
15171
|
// Read name and id of the config
|
|
15045
15172
|
this.configId = messageConfig.configId;
|
|
15046
15173
|
this.name = messageConfig.configName;
|
|
15047
|
-
|
|
15174
|
+
// Replace spaces with empty then all special characters except "-"
|
|
15175
|
+
this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
|
|
15048
15176
|
this.showCallback = showCallback;
|
|
15049
15177
|
this.closeCallback = hideCallback;
|
|
15050
15178
|
this.stepperCallBack = stepperCallBack;
|
|
@@ -15279,7 +15407,7 @@
|
|
|
15279
15407
|
var _this4 = this;
|
|
15280
15408
|
//After every find_interval check the DOM for target element.
|
|
15281
15409
|
var elementRecheckIntervalId = setInterval(function () {
|
|
15282
|
-
_this4.targetElement = getElementFromSelector(_this4.target.id, _this4.target.frame_id);
|
|
15410
|
+
_this4.targetElement = getElementFromSelector(_this4.target.id, _this4.target.frame_id, _this4.find_config, _this4.view_additional_info);
|
|
15283
15411
|
//If the element is found, stop checking the DOM.
|
|
15284
15412
|
if (_this4.targetElement) {
|
|
15285
15413
|
clearInterval(elementRecheckIntervalId);
|
|
@@ -15636,7 +15764,7 @@
|
|
|
15636
15764
|
if (apxor_tooltip_styles) {
|
|
15637
15765
|
return;
|
|
15638
15766
|
}
|
|
15639
|
-
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.
|
|
15767
|
+
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.nqOV(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
15640
15768
|
var styleNode = document.createElement("style");
|
|
15641
15769
|
styleNode.setAttribute("apx-tooltip-styles", "");
|
|
15642
15770
|
styleNode.innerHTML = styles;
|
|
@@ -16446,7 +16574,7 @@
|
|
|
16446
16574
|
this._setCloseButton();
|
|
16447
16575
|
|
|
16448
16576
|
//Set the Marketing content
|
|
16449
|
-
this.
|
|
16577
|
+
this.BHya();
|
|
16450
16578
|
}
|
|
16451
16579
|
|
|
16452
16580
|
/**
|
|
@@ -17704,7 +17832,8 @@
|
|
|
17704
17832
|
// Read name and id of the config
|
|
17705
17833
|
this.configId = messageConfig.configId;
|
|
17706
17834
|
this.name = messageConfig.configName;
|
|
17707
|
-
|
|
17835
|
+
// Replace spaces with empty then all special characters except "-"
|
|
17836
|
+
this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
|
|
17708
17837
|
this.showCallback = showCallback;
|
|
17709
17838
|
this.closeCallback = hideCallback;
|
|
17710
17839
|
this.stepperCallBack = stepperCallBack;
|
|
@@ -19218,7 +19347,8 @@
|
|
|
19218
19347
|
this.name = name;
|
|
19219
19348
|
this.terminationConfig = terminationConfig;
|
|
19220
19349
|
this.terminationTimeoutId = null;
|
|
19221
|
-
|
|
19350
|
+
// Replace spaces with empty then all special characters except "-"
|
|
19351
|
+
this.cssPostFix = "-".concat(configId, "-").concat(name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
|
|
19222
19352
|
|
|
19223
19353
|
//this.height = config.height || 50; // Mostly auto. But for scrollable templates, should be the pixels.
|
|
19224
19354
|
|
|
@@ -19341,7 +19471,7 @@
|
|
|
19341
19471
|
case 0:
|
|
19342
19472
|
_context2.prev = 0;
|
|
19343
19473
|
_context2.next = 3;
|
|
19344
|
-
return this.templateContent.
|
|
19474
|
+
return this.templateContent.tclX();
|
|
19345
19475
|
case 3:
|
|
19346
19476
|
this.inAppContainer = _context2.sent;
|
|
19347
19477
|
this.inAppContainer.style.zIndex = 99999;
|
|
@@ -19540,7 +19670,7 @@
|
|
|
19540
19670
|
* @description Creates the styles for Marketing message.
|
|
19541
19671
|
* @returns {string} css styles
|
|
19542
19672
|
*/
|
|
19543
|
-
_defineProperty(this, "
|
|
19673
|
+
_defineProperty(this, "nqOV", function () {
|
|
19544
19674
|
if (!_this.enable_marketing) {
|
|
19545
19675
|
return "";
|
|
19546
19676
|
}
|
|
@@ -19586,7 +19716,7 @@
|
|
|
19586
19716
|
* @private
|
|
19587
19717
|
* @description Get the response for Form content in the InApp modal.
|
|
19588
19718
|
*/
|
|
19589
|
-
_defineProperty(this, "
|
|
19719
|
+
_defineProperty(this, "VNyc", function (form_elements) {
|
|
19590
19720
|
var obj = {};
|
|
19591
19721
|
var callback = "";
|
|
19592
19722
|
form_elements.forEach(function (element) {
|
|
@@ -19626,7 +19756,7 @@
|
|
|
19626
19756
|
* @private
|
|
19627
19757
|
* @description Sets the marketing content at the end of the InApp
|
|
19628
19758
|
*/
|
|
19629
|
-
_defineProperty(this, "
|
|
19759
|
+
_defineProperty(this, "BHya", function () {
|
|
19630
19760
|
if (_this.enable_marketing) {
|
|
19631
19761
|
var marketingContainer = document.createElement("div");
|
|
19632
19762
|
marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
|
|
@@ -19641,7 +19771,8 @@
|
|
|
19641
19771
|
this.terminationTimeoutId = null;
|
|
19642
19772
|
this.isWalkthrough = isWalkthrough;
|
|
19643
19773
|
this.config = config;
|
|
19644
|
-
|
|
19774
|
+
// Replace spaces with empty then all special characters except "-"
|
|
19775
|
+
this.cssPostFix = "-".concat(configId, "-").concat(name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
|
|
19645
19776
|
this.delay = config.delay || 0;
|
|
19646
19777
|
this.background_color = config.bg_color || COLORS.WHITE;
|
|
19647
19778
|
this.width = config.width || 50; // Scale of the screen
|
|
@@ -19885,7 +20016,7 @@
|
|
|
19885
20016
|
}, {
|
|
19886
20017
|
key: "_setStyles",
|
|
19887
20018
|
value: function _setStyles() {
|
|
19888
|
-
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.
|
|
20019
|
+
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.nqOV(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
19889
20020
|
var styleNode = document.createElement("style");
|
|
19890
20021
|
styleNode.setAttribute("id", "apxor-style-" + this.configId);
|
|
19891
20022
|
styleNode.innerHTML = styles;
|
|
@@ -20249,19 +20380,14 @@
|
|
|
20249
20380
|
var imagePath;
|
|
20250
20381
|
if (this.enable_image) {
|
|
20251
20382
|
if (this.enable_download_files) {
|
|
20252
|
-
var _this$download_files;
|
|
20383
|
+
var _this$download_files, _window, _window$getFilePath;
|
|
20253
20384
|
var format = "";
|
|
20254
20385
|
(_this$download_files = this.download_files) === null || _this$download_files === void 0 || _this$download_files.forEach(function (file) {
|
|
20255
20386
|
if ((file === null || file === void 0 ? void 0 : file.url) === _this4.image.path) {
|
|
20256
20387
|
format = file.format;
|
|
20257
20388
|
}
|
|
20258
20389
|
});
|
|
20259
|
-
|
|
20260
|
-
var _window, _window$getFilePath;
|
|
20261
|
-
imagePath = this.image.path && format ? ((_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || (_window$getFilePath = _window.getFilePath) === null || _window$getFilePath === void 0 ? void 0 : _window$getFilePath.call(_window, this.configId, this.image.path, format)) || this.image.path : this.image.path;
|
|
20262
|
-
} else {
|
|
20263
|
-
imagePath = this.image.path;
|
|
20264
|
-
}
|
|
20390
|
+
imagePath = this.image.path && format ? ((_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || (_window$getFilePath = _window.getFilePath) === null || _window$getFilePath === void 0 ? void 0 : _window$getFilePath.call(_window, this.configId, this.image.path, format)) || this.image.path : this.image.path;
|
|
20265
20391
|
} else {
|
|
20266
20392
|
imagePath = this.image.path;
|
|
20267
20393
|
}
|
|
@@ -20384,7 +20510,7 @@
|
|
|
20384
20510
|
this._setCloseButton();
|
|
20385
20511
|
|
|
20386
20512
|
//Set the Marketing content
|
|
20387
|
-
this.
|
|
20513
|
+
this.BHya();
|
|
20388
20514
|
}
|
|
20389
20515
|
|
|
20390
20516
|
/**
|
|
@@ -20459,19 +20585,14 @@
|
|
|
20459
20585
|
} else {
|
|
20460
20586
|
var imgElement = document.createElement("img");
|
|
20461
20587
|
if (this.enable_download_files) {
|
|
20462
|
-
var _this$download_files2;
|
|
20588
|
+
var _this$download_files2, _window2, _window2$getFilePath;
|
|
20463
20589
|
var format = "";
|
|
20464
20590
|
(_this$download_files2 = this.download_files) === null || _this$download_files2 === void 0 || _this$download_files2.forEach(function (file) {
|
|
20465
20591
|
if ((file === null || file === void 0 ? void 0 : file.url) === _this5.image.path) {
|
|
20466
20592
|
format = file.format;
|
|
20467
20593
|
}
|
|
20468
20594
|
});
|
|
20469
|
-
|
|
20470
|
-
var _window2, _window2$getFilePath;
|
|
20471
|
-
imgElement.src = this.image.path && format ? ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || (_window2$getFilePath = _window2.getFilePath) === null || _window2$getFilePath === void 0 ? void 0 : _window2$getFilePath.call(_window2, this.configId, this.image.path, format)) || this.image.path : this.image.path;
|
|
20472
|
-
} else {
|
|
20473
|
-
imgElement.src = this.image.path;
|
|
20474
|
-
}
|
|
20595
|
+
imgElement.src = this.image.path && format ? ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || (_window2$getFilePath = _window2.getFilePath) === null || _window2$getFilePath === void 0 ? void 0 : _window2$getFilePath.call(_window2, this.configId, this.image.path, format)) || this.image.path : this.image.path;
|
|
20475
20596
|
} else {
|
|
20476
20597
|
imgElement.src = this.image.path;
|
|
20477
20598
|
}
|
|
@@ -20534,19 +20655,14 @@
|
|
|
20534
20655
|
iconDiv.classList.add("apx-inapp-icon-container".concat(this.cssPostFix));
|
|
20535
20656
|
var iconElement = document.createElement("img");
|
|
20536
20657
|
if (this.enable_download_files) {
|
|
20537
|
-
var _this$download_files3;
|
|
20658
|
+
var _this$download_files3, _window3, _window3$getFilePath;
|
|
20538
20659
|
var format = "";
|
|
20539
20660
|
(_this$download_files3 = this.download_files) === null || _this$download_files3 === void 0 || _this$download_files3.forEach(function (file) {
|
|
20540
20661
|
if ((file === null || file === void 0 ? void 0 : file.url) === _this6.icon.path) {
|
|
20541
20662
|
format = file.format;
|
|
20542
20663
|
}
|
|
20543
20664
|
});
|
|
20544
|
-
|
|
20545
|
-
var _window3, _window3$getFilePath;
|
|
20546
|
-
iconElement.src = this.icon.path && format ? ((_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || (_window3$getFilePath = _window3.getFilePath) === null || _window3$getFilePath === void 0 ? void 0 : _window3$getFilePath.call(_window3, this.configId, iconElement.src, format)) || this.icon.path : this.icon.path;
|
|
20547
|
-
} else {
|
|
20548
|
-
iconElement.src = this.icon.path;
|
|
20549
|
-
}
|
|
20665
|
+
iconElement.src = this.icon.path && format ? ((_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || (_window3$getFilePath = _window3.getFilePath) === null || _window3$getFilePath === void 0 ? void 0 : _window3$getFilePath.call(_window3, this.configId, this.icon.path, format)) || this.icon.path : this.icon.path;
|
|
20550
20666
|
} else {
|
|
20551
20667
|
iconElement.src = this.icon.path;
|
|
20552
20668
|
}
|
|
@@ -20666,7 +20782,7 @@
|
|
|
20666
20782
|
var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
|
|
20667
20783
|
form.addEventListener("submit", function (e) {
|
|
20668
20784
|
e.preventDefault();
|
|
20669
|
-
var _this8$generateRespon = _this8.
|
|
20785
|
+
var _this8$generateRespon = _this8.VNyc(_this8.form.elements),
|
|
20670
20786
|
obj = _this8$generateRespon.obj,
|
|
20671
20787
|
callback = _this8$generateRespon.callback;
|
|
20672
20788
|
var evalString = "(obj)=>" + callback + "(obj)";
|
|
@@ -21026,7 +21142,7 @@
|
|
|
21026
21142
|
};
|
|
21027
21143
|
} else {
|
|
21028
21144
|
// As the video player is hidden by default, unhide if the mode is not PIP.
|
|
21029
|
-
_this.
|
|
21145
|
+
_this.qkwF();
|
|
21030
21146
|
}
|
|
21031
21147
|
_this.showCallback();
|
|
21032
21148
|
} catch (e) {
|
|
@@ -21047,7 +21163,7 @@
|
|
|
21047
21163
|
* For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
|
|
21048
21164
|
* For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
|
|
21049
21165
|
*/
|
|
21050
|
-
_defineProperty(this, "
|
|
21166
|
+
_defineProperty(this, "FVBl", function () {
|
|
21051
21167
|
var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
|
|
21052
21168
|
width = _getHeightWidthFromRe.width,
|
|
21053
21169
|
height = _getHeightWidthFromRe.height;
|
|
@@ -21059,7 +21175,7 @@
|
|
|
21059
21175
|
* @private
|
|
21060
21176
|
* @description Removes the video player style element.
|
|
21061
21177
|
*/
|
|
21062
|
-
_defineProperty(this, "
|
|
21178
|
+
_defineProperty(this, "Vbqc", function () {
|
|
21063
21179
|
var playerStyles = document.getElementById("apx-mpl-styles");
|
|
21064
21180
|
if (playerStyles) {
|
|
21065
21181
|
playerStyles.remove();
|
|
@@ -21070,7 +21186,7 @@
|
|
|
21070
21186
|
* @private
|
|
21071
21187
|
* @description Attach listeners on the video controls
|
|
21072
21188
|
*/
|
|
21073
|
-
_defineProperty(this, "
|
|
21189
|
+
_defineProperty(this, "zTef", function () {
|
|
21074
21190
|
// Listener for the video end. Display the CTA's when the video ends.
|
|
21075
21191
|
_this.videoElement.addEventListener("ended", function () {
|
|
21076
21192
|
var ctaButtons = document.getElementById("apx-cta-btn");
|
|
@@ -21090,7 +21206,6 @@
|
|
|
21090
21206
|
// If the play button is clicked again, the CTA buttons should be removed.
|
|
21091
21207
|
_this.videoElement.addEventListener("play", function () {
|
|
21092
21208
|
if (!_this.inAppShown) {
|
|
21093
|
-
var _window$ApxorRTM5;
|
|
21094
21209
|
// Initialize the fields to keep the track of aditional info required for logging events.
|
|
21095
21210
|
_this.minimisedCount = 0;
|
|
21096
21211
|
_this.maximisedCount = 0;
|
|
@@ -21102,17 +21217,6 @@
|
|
|
21102
21217
|
_this.slotStartTime = 0; // to tract the start time of the minimize and maximize time slot.
|
|
21103
21218
|
_this.slotStartTimeVolumeChange = 0; // to track the start time of the volume change time slot.
|
|
21104
21219
|
|
|
21105
|
-
(_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("inapp_shown", {
|
|
21106
|
-
message_name: _this.name,
|
|
21107
|
-
visibleScreen: location.pathname,
|
|
21108
|
-
inappType: "PIP Inapp",
|
|
21109
|
-
autoReplay: _this.videoElement.loop ? "On" : "Off",
|
|
21110
|
-
defaultSound: _this.videoElement.muted ? "Mute" : "Unmute",
|
|
21111
|
-
id: _this.configId,
|
|
21112
|
-
videoDuration: Math.round(_this.videoElement.duration),
|
|
21113
|
-
videoResolution: "".concat(_this.videoElement.videoWidth, "x").concat(_this.videoElement.videoHeight),
|
|
21114
|
-
videoConfiguration: "Streaming"
|
|
21115
|
-
});
|
|
21116
21220
|
_this.inAppShown = true;
|
|
21117
21221
|
}
|
|
21118
21222
|
if (_this.videoElement.currentTime === 0 || _this.videoElement.currentTime === _this.videoElement.duration) {
|
|
@@ -21129,14 +21233,14 @@
|
|
|
21129
21233
|
_this.videoElement.addEventListener("fullscreenchange", function () {
|
|
21130
21234
|
_this.slotEndTime = _this.videoElement.currentTime;
|
|
21131
21235
|
if (document.fullscreenElement) {
|
|
21132
|
-
var _window$
|
|
21236
|
+
var _window$ApxorRTM5;
|
|
21133
21237
|
_this.maximisedCount++;
|
|
21134
21238
|
_this.durationMinimised = Math.round(_this.slotEndTime) - Math.round(_this.slotStartTime);
|
|
21135
21239
|
if (_this.videoElement.currentTime !== _this.videoElement.duration) {
|
|
21136
21240
|
_this.totalDurationMinimised += _this.durationMinimised;
|
|
21137
21241
|
_this.durationMinimisedSlots.push("".concat(Math.round(_this.slotStartTime), "-").concat(Math.round(_this.slotEndTime)));
|
|
21138
21242
|
}
|
|
21139
|
-
(_window$
|
|
21243
|
+
(_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_video_inapp_maximised", {
|
|
21140
21244
|
message_name: _this.name,
|
|
21141
21245
|
durationMinimised: _this.durationMinimised,
|
|
21142
21246
|
durationSlotMinimised: "".concat(Math.round(_this.slotStartTime), "-").concat(Math.round(_this.slotEndTime)),
|
|
@@ -21146,14 +21250,14 @@
|
|
|
21146
21250
|
maximisedCount: _this.maximisedCount
|
|
21147
21251
|
});
|
|
21148
21252
|
} else {
|
|
21149
|
-
var _window$
|
|
21253
|
+
var _window$ApxorRTM6;
|
|
21150
21254
|
_this.durationMaximised = Math.round(_this.slotEndTime) - Math.round(_this.slotStartTime);
|
|
21151
21255
|
_this.minimisedCount++;
|
|
21152
21256
|
if (_this.videoElement.currentTime !== _this.videoElement.duration) {
|
|
21153
21257
|
_this.totalDurationMaximised += _this.durationMaximised;
|
|
21154
21258
|
_this.durationMaximisedSlots.push("".concat(Math.round(_this.slotStartTime), "-").concat(Math.round(_this.slotEndTime)));
|
|
21155
21259
|
}
|
|
21156
|
-
(_window$
|
|
21260
|
+
(_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent("apx_video_inapp_minimised", {
|
|
21157
21261
|
message_name: _this.name,
|
|
21158
21262
|
durationMaximised: _this.durationMaximised,
|
|
21159
21263
|
durationSlotMaximised: "".concat(Math.round(_this.slotStartTime), "-").concat(Math.round(_this.slotEndTime)),
|
|
@@ -21167,9 +21271,9 @@
|
|
|
21167
21271
|
});
|
|
21168
21272
|
_this.videoElement.addEventListener("volumechange", function () {
|
|
21169
21273
|
if (!isNaN(_this.slotStartTimeVolumeChange)) {
|
|
21170
|
-
var _window$
|
|
21274
|
+
var _window$ApxorRTM7;
|
|
21171
21275
|
_this.volumeClickedCount++;
|
|
21172
|
-
(_window$
|
|
21276
|
+
(_window$ApxorRTM7 = window.ApxorRTM) === null || _window$ApxorRTM7 === void 0 || _window$ApxorRTM7.logEvent("apx_video_inapp_volume_button_clicked", {
|
|
21173
21277
|
message_name: _this.name,
|
|
21174
21278
|
id: _this.configId,
|
|
21175
21279
|
actionPerformed: _this.videoElement.muted ? "mute" : "unmute",
|
|
@@ -21185,7 +21289,7 @@
|
|
|
21185
21289
|
* @private
|
|
21186
21290
|
* @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
21187
21291
|
*/
|
|
21188
|
-
_defineProperty(this, "
|
|
21292
|
+
_defineProperty(this, "pAjc", function () {
|
|
21189
21293
|
var _this$terminationConf;
|
|
21190
21294
|
if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
|
|
21191
21295
|
// On Exit of the PIP,
|
|
@@ -21225,7 +21329,7 @@
|
|
|
21225
21329
|
* @private Sets the custom controls on the video player.
|
|
21226
21330
|
* PIP and close are the custom controls that are created and positions on the video.
|
|
21227
21331
|
*/
|
|
21228
|
-
_defineProperty(this, "
|
|
21332
|
+
_defineProperty(this, "EVzk", function () {
|
|
21229
21333
|
_this.enable_close_button;
|
|
21230
21334
|
if (_this.enable_close_button) {
|
|
21231
21335
|
var closeButton = document.createElement("span");
|
|
@@ -21272,21 +21376,21 @@
|
|
|
21272
21376
|
* @function hideVideoPlayer
|
|
21273
21377
|
* @description Sets the visibility of the video player to hidden.
|
|
21274
21378
|
*/
|
|
21275
|
-
_defineProperty(this, "
|
|
21379
|
+
_defineProperty(this, "lKkb", function () {
|
|
21276
21380
|
_this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
21277
21381
|
});
|
|
21278
21382
|
/**
|
|
21279
21383
|
* @function unhideVideoPlayer
|
|
21280
21384
|
* @description Unhides video player.
|
|
21281
21385
|
*/
|
|
21282
|
-
_defineProperty(this, "
|
|
21386
|
+
_defineProperty(this, "qkwF", function () {
|
|
21283
21387
|
_this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
21284
21388
|
});
|
|
21285
21389
|
/**
|
|
21286
21390
|
* @function getVideoElement
|
|
21287
21391
|
* @returns {HTMLElement} Video ekement
|
|
21288
21392
|
*/
|
|
21289
|
-
_defineProperty(this, "
|
|
21393
|
+
_defineProperty(this, "CVxJ", function () {
|
|
21290
21394
|
return _this.videoElement;
|
|
21291
21395
|
});
|
|
21292
21396
|
this.videoPlayer = null;
|
|
@@ -21299,7 +21403,8 @@
|
|
|
21299
21403
|
this.configId = configId;
|
|
21300
21404
|
this.config = config;
|
|
21301
21405
|
this.name = name || "VideoPlayer";
|
|
21302
|
-
|
|
21406
|
+
// Replace spaces with empty then all special characters except "-"
|
|
21407
|
+
this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
|
|
21303
21408
|
this.replayCount = 0;
|
|
21304
21409
|
this.inAppShown = false; // This boolean restricts the "inapp_shown" event from logging multiple times.
|
|
21305
21410
|
|
|
@@ -21340,7 +21445,7 @@
|
|
|
21340
21445
|
this.videoPlayer.style.backgroundColor = this.bg_color;
|
|
21341
21446
|
|
|
21342
21447
|
// Video has a resolution, not deviating from the resolution set the height and width.
|
|
21343
|
-
this.
|
|
21448
|
+
this.FVBl();
|
|
21344
21449
|
//Generate the styles and add them to the document head.
|
|
21345
21450
|
this._setVideoPlayerStyles();
|
|
21346
21451
|
//Set the position of the video player with in the 5 possible positions.
|
|
@@ -21348,16 +21453,16 @@
|
|
|
21348
21453
|
//Create a video element,set the source and add to the container.
|
|
21349
21454
|
this._setPlayerContent();
|
|
21350
21455
|
//Set the listeners on the video control buttons.
|
|
21351
|
-
this.
|
|
21456
|
+
this.zTef();
|
|
21352
21457
|
//Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
21353
|
-
this.
|
|
21458
|
+
this.pAjc();
|
|
21354
21459
|
//Set the custom close and PIP controls. Not using the defaults from the html video element.
|
|
21355
21460
|
//Reason - We want to position them at the top right and left positions.
|
|
21356
|
-
this.
|
|
21461
|
+
this.EVzk();
|
|
21357
21462
|
//Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
|
|
21358
21463
|
this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
|
|
21359
21464
|
//Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
|
|
21360
|
-
this.
|
|
21465
|
+
this.lKkb();
|
|
21361
21466
|
//If the auto dismiss is enabled, sets the timeout to call the InApp close.
|
|
21362
21467
|
this._setAutoTerminate();
|
|
21363
21468
|
document.body.appendChild(this.videoPlayer);
|
|
@@ -21461,7 +21566,7 @@
|
|
|
21461
21566
|
function _onClose() {
|
|
21462
21567
|
var closeButtonName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "web_minimise_x_clicked";
|
|
21463
21568
|
try {
|
|
21464
|
-
var _window$
|
|
21569
|
+
var _window$ApxorRTM9;
|
|
21465
21570
|
if (this.inAppShown) {
|
|
21466
21571
|
if (!document.fullscreenElement) {
|
|
21467
21572
|
this.totalDurationMinimised += Math.round(this.videoElement.currentTime) - Math.round(this.slotStartTime);
|
|
@@ -21472,10 +21577,10 @@
|
|
|
21472
21577
|
}
|
|
21473
21578
|
}
|
|
21474
21579
|
this.videoPlayer.remove();
|
|
21475
|
-
this.
|
|
21580
|
+
this.Vbqc();
|
|
21476
21581
|
if (closeButtonName !== "auto_dismiss") {
|
|
21477
|
-
var _window$
|
|
21478
|
-
(_window$
|
|
21582
|
+
var _window$ApxorRTM8;
|
|
21583
|
+
(_window$ApxorRTM8 = window.ApxorRTM) === null || _window$ApxorRTM8 === void 0 || _window$ApxorRTM8.logEvent("apx_video_inapp_close_button_clicked", {
|
|
21479
21584
|
message_name: this.name,
|
|
21480
21585
|
id: this.configId,
|
|
21481
21586
|
totalDurationWatchedSlot: "0-".concat(Math.round(this.videoElement.currentTime)),
|
|
@@ -21483,7 +21588,7 @@
|
|
|
21483
21588
|
closeButtonName: closeButtonName
|
|
21484
21589
|
});
|
|
21485
21590
|
}
|
|
21486
|
-
(_window$
|
|
21591
|
+
(_window$ApxorRTM9 = window.ApxorRTM) === null || _window$ApxorRTM9 === void 0 || _window$ApxorRTM9.logEvent("apx_inapp_dismissed", {
|
|
21487
21592
|
campaignName: this.name,
|
|
21488
21593
|
id: this.configId,
|
|
21489
21594
|
totalDurationWatched: Math.round(this.videoElement.currentTime),
|
|
@@ -21521,7 +21626,7 @@
|
|
|
21521
21626
|
if (this.buttons.enable_top || this.buttons.enable_center || this.buttons.enable_bottom) {
|
|
21522
21627
|
var removeCallback = function removeCallback(isCancel, action, index) {
|
|
21523
21628
|
try {
|
|
21524
|
-
var _window$
|
|
21629
|
+
var _window$ApxorRTM10;
|
|
21525
21630
|
var button;
|
|
21526
21631
|
if (_this3.buttons.enable_top && _this3.buttons.top.length > 0) {
|
|
21527
21632
|
button = _this3.buttons.top;
|
|
@@ -21532,7 +21637,7 @@
|
|
|
21532
21637
|
if (_this3.buttons.enable_bottom && _this3.buttons.bottom.length) {
|
|
21533
21638
|
button = _this3.buttons.bottom;
|
|
21534
21639
|
}
|
|
21535
|
-
(_window$
|
|
21640
|
+
(_window$ApxorRTM10 = window.ApxorRTM) === null || _window$ApxorRTM10 === void 0 || _window$ApxorRTM10.logEvent("apx_video_inapp_button_clicked", {
|
|
21536
21641
|
buttonName: button.at(index).text.text,
|
|
21537
21642
|
redirection: button.at(index).action.type,
|
|
21538
21643
|
totalDurationWatched: Math.round(_this3.videoElement.currentTime),
|
|
@@ -21542,7 +21647,7 @@
|
|
|
21542
21647
|
replayCount: _this3.replayCount
|
|
21543
21648
|
});
|
|
21544
21649
|
_this3.videoPlayer.remove();
|
|
21545
|
-
_this3.
|
|
21650
|
+
_this3.Vbqc();
|
|
21546
21651
|
_this3.hideCallback();
|
|
21547
21652
|
} catch (e) {
|
|
21548
21653
|
console.log("Can't close the video player\n".concat(e));
|
|
@@ -21636,14 +21741,14 @@
|
|
|
21636
21741
|
try {
|
|
21637
21742
|
var _window;
|
|
21638
21743
|
(_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.debug("called showEmbedCards");
|
|
21639
|
-
var element = _this.
|
|
21640
|
-
_this.
|
|
21744
|
+
var element = _this.THPB(_this.layout);
|
|
21745
|
+
_this.vIRY();
|
|
21641
21746
|
window.onresize = function () {
|
|
21642
|
-
_this.
|
|
21747
|
+
_this.hRVV();
|
|
21643
21748
|
};
|
|
21644
21749
|
_this.imageElements.forEach(function (img) {
|
|
21645
21750
|
img.addEventListener("error", function () {
|
|
21646
|
-
_this.
|
|
21751
|
+
_this.ayPc("provided image doesn't exists");
|
|
21647
21752
|
});
|
|
21648
21753
|
});
|
|
21649
21754
|
var rootContainer = document.createElement("div");
|
|
@@ -21654,7 +21759,7 @@
|
|
|
21654
21759
|
var styleElement = document.createElement("style");
|
|
21655
21760
|
styleElement.innerHTML = _this.styleContent;
|
|
21656
21761
|
document.head.appendChild(styleElement);
|
|
21657
|
-
_this.
|
|
21762
|
+
_this.KGpF(_this.termination);
|
|
21658
21763
|
try {
|
|
21659
21764
|
eval(_this.script);
|
|
21660
21765
|
} catch (e) {
|
|
@@ -21665,10 +21770,10 @@
|
|
|
21665
21770
|
_this.intervalToCheckMediaLoadingStatus = setInterval(function () {
|
|
21666
21771
|
_this.wait_interval -= 1;
|
|
21667
21772
|
if (_this.wait_interval <= 0) {
|
|
21668
|
-
_this.
|
|
21773
|
+
_this.ayPc("provided media doesn't exists");
|
|
21669
21774
|
} else {
|
|
21670
|
-
if (_this.
|
|
21671
|
-
_this.
|
|
21775
|
+
if (_this.XUBL() && _this.kxrF() && _this.sSIh()) {
|
|
21776
|
+
_this.hRVV();
|
|
21672
21777
|
clearInterval(_this.intervalToCheckMediaLoadingStatus);
|
|
21673
21778
|
}
|
|
21674
21779
|
}
|
|
@@ -21679,9 +21784,9 @@
|
|
|
21679
21784
|
(_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorLogger) === null || _window3 === void 0 || _window3.error("failed while creating embed card with error: ".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
|
|
21680
21785
|
}
|
|
21681
21786
|
});
|
|
21682
|
-
_defineProperty(this, "
|
|
21683
|
-
var _window$
|
|
21684
|
-
!_this.loggedNudgeNotShownEvent && ((_window$
|
|
21787
|
+
_defineProperty(this, "ayPc", function (reason) {
|
|
21788
|
+
var _window$Apxor, _window4;
|
|
21789
|
+
!_this.loggedNudgeNotShownEvent && ((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.logAppEvent("apx_nudge_not_shown", {
|
|
21685
21790
|
apx_nudge_name: _this.name,
|
|
21686
21791
|
apx_nudge_id: _this.configId,
|
|
21687
21792
|
apx_template_time: "embed-card",
|
|
@@ -21693,14 +21798,14 @@
|
|
|
21693
21798
|
clearInterval(_this.intervalToCheckMediaLoadingStatus);
|
|
21694
21799
|
(_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorWidget) === null || _window4 === void 0 || _window4.removeEmbedCard(_this.configId);
|
|
21695
21800
|
});
|
|
21696
|
-
_defineProperty(this, "
|
|
21801
|
+
_defineProperty(this, "vIRY", function () {
|
|
21697
21802
|
var EmbeddedCardsStyles = document.createElement("style");
|
|
21698
21803
|
EmbeddedCardsStyles.innerHTML = _this.initialStyles;
|
|
21699
21804
|
EmbeddedCardsStyles.setAttribute("apx-embedded-card-styles", "");
|
|
21700
21805
|
document.head.appendChild(EmbeddedCardsStyles);
|
|
21701
21806
|
});
|
|
21702
|
-
_defineProperty(this, "
|
|
21703
|
-
var _window$
|
|
21807
|
+
_defineProperty(this, "THPB", function (config) {
|
|
21808
|
+
var _window$Apxor2;
|
|
21704
21809
|
var element;
|
|
21705
21810
|
switch (config.type) {
|
|
21706
21811
|
case "cell":
|
|
@@ -21717,7 +21822,7 @@
|
|
|
21717
21822
|
element.muted = true;
|
|
21718
21823
|
element.disablePictureInPicture = true;
|
|
21719
21824
|
element.autoplay = true;
|
|
21720
|
-
if (((_window$
|
|
21825
|
+
if (((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios") {
|
|
21721
21826
|
element.playsInline = true;
|
|
21722
21827
|
}
|
|
21723
21828
|
break;
|
|
@@ -21779,35 +21884,40 @@
|
|
|
21779
21884
|
element.onclick = function (e) {
|
|
21780
21885
|
e.stopPropagation();
|
|
21781
21886
|
window.Apxor.redirect(JSON.stringify(action));
|
|
21782
|
-
_this.
|
|
21887
|
+
_this.dGod(e);
|
|
21783
21888
|
};
|
|
21784
21889
|
break;
|
|
21785
21890
|
case "show-video":
|
|
21786
21891
|
element.onclick = function (e) {
|
|
21787
21892
|
e.stopPropagation();
|
|
21788
21893
|
window.Apxor.showVideoInApp(_this.configId, _this.name, action.url);
|
|
21789
|
-
_this.
|
|
21894
|
+
_this.dGod(e);
|
|
21790
21895
|
};
|
|
21791
21896
|
break;
|
|
21792
21897
|
case "cancel":
|
|
21793
21898
|
element.onclick = function (e) {
|
|
21794
21899
|
e.stopPropagation();
|
|
21795
|
-
_this.
|
|
21900
|
+
_this.dGod(e);
|
|
21796
21901
|
window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
|
|
21797
21902
|
};
|
|
21798
21903
|
break;
|
|
21799
21904
|
case "dismiss":
|
|
21800
21905
|
element.onclick = function (e) {
|
|
21801
21906
|
e.stopPropagation();
|
|
21802
|
-
_this.
|
|
21907
|
+
_this.dGod(e);
|
|
21803
21908
|
};
|
|
21804
21909
|
break;
|
|
21805
21910
|
case "never":
|
|
21806
21911
|
element.onclick = function (e) {
|
|
21912
|
+
var _window$Apxor3;
|
|
21807
21913
|
e.stopPropagation();
|
|
21808
21914
|
window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
|
|
21809
|
-
window.Apxor.
|
|
21810
|
-
|
|
21915
|
+
(_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 || _window$Apxor3.logAppEvent("apx_nudge_terminated", {
|
|
21916
|
+
apx_nudge_name: _this.name,
|
|
21917
|
+
apx_nudge_id: _this.configId,
|
|
21918
|
+
apx_termination_type: "never-show"
|
|
21919
|
+
});
|
|
21920
|
+
_this.dGod(e);
|
|
21811
21921
|
};
|
|
21812
21922
|
break;
|
|
21813
21923
|
case "toggle-class":
|
|
@@ -21832,7 +21942,7 @@
|
|
|
21832
21942
|
tempInput.select();
|
|
21833
21943
|
document.execCommand("copy");
|
|
21834
21944
|
document.body.removeChild(tempInput);
|
|
21835
|
-
_this.
|
|
21945
|
+
_this.dGod(e);
|
|
21836
21946
|
};
|
|
21837
21947
|
break;
|
|
21838
21948
|
case "log-app-event":
|
|
@@ -21851,7 +21961,7 @@
|
|
|
21851
21961
|
}
|
|
21852
21962
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
21853
21963
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
21854
|
-
var childElement = _this.
|
|
21964
|
+
var childElement = _this.JssF(childConfig);
|
|
21855
21965
|
element.appendChild(childElement);
|
|
21856
21966
|
});
|
|
21857
21967
|
}
|
|
@@ -21859,7 +21969,7 @@
|
|
|
21859
21969
|
// Process children
|
|
21860
21970
|
if (config.children && config.children.length > 0) {
|
|
21861
21971
|
config.children.forEach(function (childConfig) {
|
|
21862
|
-
var childElement = _this.
|
|
21972
|
+
var childElement = _this.THPB(childConfig);
|
|
21863
21973
|
element.appendChild(childElement);
|
|
21864
21974
|
});
|
|
21865
21975
|
}
|
|
@@ -21885,7 +21995,7 @@
|
|
|
21885
21995
|
}
|
|
21886
21996
|
return element;
|
|
21887
21997
|
});
|
|
21888
|
-
_defineProperty(this, "
|
|
21998
|
+
_defineProperty(this, "dGod", function (e) {
|
|
21889
21999
|
var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
|
|
21890
22000
|
var additional_info = {
|
|
21891
22001
|
apx_nudge_name: _this.name,
|
|
@@ -21894,15 +22004,15 @@
|
|
|
21894
22004
|
apx_template_name: "embed-card"
|
|
21895
22005
|
};
|
|
21896
22006
|
if (e.target.tagName === "BUTTON") {
|
|
21897
|
-
var _e$target$innerHTML, _e$target2, _window$
|
|
22007
|
+
var _e$target$innerHTML, _e$target2, _window$Apxor4;
|
|
21898
22008
|
additional_info["apx_cta_text"] = (_e$target$innerHTML = e === null || e === void 0 || (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.innerHTML) !== null && _e$target$innerHTML !== void 0 ? _e$target$innerHTML : "";
|
|
21899
|
-
(_window$
|
|
22009
|
+
(_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 || _window$Apxor4.logAppEvent("apx_card_CTA_clicked", additional_info);
|
|
21900
22010
|
} else {
|
|
21901
|
-
var _window$
|
|
21902
|
-
(_window$
|
|
22011
|
+
var _window$Apxor5;
|
|
22012
|
+
(_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 || _window$Apxor5.logAppEvent("apx_card_interaction", additional_info);
|
|
21903
22013
|
}
|
|
21904
22014
|
});
|
|
21905
|
-
_defineProperty(this, "
|
|
22015
|
+
_defineProperty(this, "KGpF", function (config) {
|
|
21906
22016
|
config.forEach(function (id) {
|
|
21907
22017
|
var element = document.getElementById(id);
|
|
21908
22018
|
if (element) {
|
|
@@ -21910,7 +22020,7 @@
|
|
|
21910
22020
|
}
|
|
21911
22021
|
});
|
|
21912
22022
|
});
|
|
21913
|
-
_defineProperty(this, "
|
|
22023
|
+
_defineProperty(this, "kxrF", function () {
|
|
21914
22024
|
//This logic is to make sure that image has loaded, it doesn't check whether image is broken
|
|
21915
22025
|
//refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
|
|
21916
22026
|
if (_this.imageElements.length === 0) return true;
|
|
@@ -21918,19 +22028,19 @@
|
|
|
21918
22028
|
return img.complete;
|
|
21919
22029
|
});
|
|
21920
22030
|
});
|
|
21921
|
-
_defineProperty(this, "
|
|
22031
|
+
_defineProperty(this, "XUBL", function () {
|
|
21922
22032
|
if (_this.videoElements.length === 0) return true;
|
|
21923
22033
|
return _this.videoElements.every(function (video) {
|
|
21924
22034
|
return video.readyState >= 3;
|
|
21925
22035
|
});
|
|
21926
22036
|
});
|
|
21927
|
-
_defineProperty(this, "
|
|
22037
|
+
_defineProperty(this, "sSIh", function () {
|
|
21928
22038
|
if (!_this.bgImageUrl) return true;
|
|
21929
22039
|
var img = new Image();
|
|
21930
22040
|
img.src = _this.bgImageUrl;
|
|
21931
22041
|
return img.complete;
|
|
21932
22042
|
});
|
|
21933
|
-
_defineProperty(this, "
|
|
22043
|
+
_defineProperty(this, "hRVV", function () {
|
|
21934
22044
|
var _window6, _window7;
|
|
21935
22045
|
var width = window.document.querySelector("html").offsetWidth;
|
|
21936
22046
|
var height = window.document.querySelector("html").offsetHeight;
|
|
@@ -22019,8 +22129,8 @@
|
|
|
22019
22129
|
_this.storyContainer.appendChild(currentElement);
|
|
22020
22130
|
_this.storyContainer.appendChild(slideDetails);
|
|
22021
22131
|
document.body.appendChild(_this.storyContainer);
|
|
22022
|
-
_this.
|
|
22023
|
-
_this.
|
|
22132
|
+
_this.QWQi();
|
|
22133
|
+
_this.Hxdq();
|
|
22024
22134
|
_this.progress = Array.from(document.querySelectorAll(".progress"));
|
|
22025
22135
|
var current_slide = document.querySelector(".slide-details");
|
|
22026
22136
|
var playNext = function playNext(e) {
|
|
@@ -22066,7 +22176,7 @@
|
|
|
22066
22176
|
_existingAbsoluteElements2.forEach(function (element) {
|
|
22067
22177
|
element.remove();
|
|
22068
22178
|
});
|
|
22069
|
-
// this.
|
|
22179
|
+
// this.pZHH();
|
|
22070
22180
|
var _currentSlideDetails = document.querySelector(".slide-details");
|
|
22071
22181
|
_currentSlideDetails.innerHTML = "";
|
|
22072
22182
|
_this.position = _this.position + 1;
|
|
@@ -22162,7 +22272,7 @@
|
|
|
22162
22272
|
absolute_header = document.createElement("div");
|
|
22163
22273
|
current_slide_from_config.layout.absolute_position_children.forEach(function (current_element) {
|
|
22164
22274
|
var current_absolute_element;
|
|
22165
|
-
current_absolute_element = _this.
|
|
22275
|
+
current_absolute_element = _this.JssF(current_element);
|
|
22166
22276
|
absolute_header.appendChild(current_absolute_element);
|
|
22167
22277
|
});
|
|
22168
22278
|
(_absolute_header = absolute_header) === null || _absolute_header === void 0 || _absolute_header.classList.add("apx-slide-header");
|
|
@@ -22171,12 +22281,12 @@
|
|
|
22171
22281
|
if (current_slide_from_config.media_type === "image") {
|
|
22172
22282
|
var _window$Apxor;
|
|
22173
22283
|
element = document.createElement("div");
|
|
22174
|
-
var
|
|
22284
|
+
var imageSrc;
|
|
22175
22285
|
if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) != "ios") {
|
|
22176
22286
|
var _window$Apxor2;
|
|
22177
|
-
|
|
22178
|
-
if (
|
|
22179
|
-
document.body.style.backgroundImage = "url(".concat(
|
|
22287
|
+
imageSrc = (_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.getFilePathForStories(_this.config[_this.position].id, current_slide_from_config.media_url);
|
|
22288
|
+
if (imageSrc && imageSrc != "") {
|
|
22289
|
+
document.body.style.backgroundImage = "url(".concat(imageSrc, ")");
|
|
22180
22290
|
document.body.style.backgroundSize = "100% auto";
|
|
22181
22291
|
document.body.style.backgroundPosition = "center";
|
|
22182
22292
|
document.body.style.backgroundRepeat = "no-repeat";
|
|
@@ -22222,7 +22332,7 @@
|
|
|
22222
22332
|
document.body.style.backgroundRepeat = "";
|
|
22223
22333
|
var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
|
|
22224
22334
|
delete updated_layout_without_absolute_elements["absolute_position_children"];
|
|
22225
|
-
element = _this.
|
|
22335
|
+
element = _this.JssF(updated_layout_without_absolute_elements);
|
|
22226
22336
|
document.body.style.backgroundColor = current_slide_from_config.media_background_color;
|
|
22227
22337
|
document.body.style.margin = "0px";
|
|
22228
22338
|
}
|
|
@@ -22230,9 +22340,9 @@
|
|
|
22230
22340
|
current_slide.removeChild(current_slide.children[0]);
|
|
22231
22341
|
}
|
|
22232
22342
|
current_slide.appendChild(element);
|
|
22233
|
-
_this.
|
|
22343
|
+
_this.lJjJ();
|
|
22234
22344
|
window.intervalToCheckImgStatus = setInterval(function () {
|
|
22235
|
-
if (_this.
|
|
22345
|
+
if (_this.Aayi()) {
|
|
22236
22346
|
clearInterval(window.intervalToCheckImgStatus);
|
|
22237
22347
|
}
|
|
22238
22348
|
}, 500);
|
|
@@ -22260,7 +22370,7 @@
|
|
|
22260
22370
|
});
|
|
22261
22371
|
playNext();
|
|
22262
22372
|
});
|
|
22263
|
-
_defineProperty(this, "
|
|
22373
|
+
_defineProperty(this, "pZHH", function () {
|
|
22264
22374
|
document.body.classList.add("slide-right");
|
|
22265
22375
|
var animationEndCounter = 0;
|
|
22266
22376
|
var onAnimationEnd = function onAnimationEnd() {
|
|
@@ -22272,7 +22382,7 @@
|
|
|
22272
22382
|
};
|
|
22273
22383
|
document.body.addEventListener("animationend", onAnimationEnd);
|
|
22274
22384
|
});
|
|
22275
|
-
_defineProperty(this, "
|
|
22385
|
+
_defineProperty(this, "JssF", function (config) {
|
|
22276
22386
|
var _window$Apxor4;
|
|
22277
22387
|
var element;
|
|
22278
22388
|
var explicit_styles = "";
|
|
@@ -22330,7 +22440,7 @@
|
|
|
22330
22440
|
element.innerHTML = "<svg width=\"30\" height=\"30\" viewBox=\"0 0 25 25\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12.375 4L10.1979 6.17708L7.92708 9.20833H3V15.4583H7.16667L12.375 20.6667V4Z\" fill=\"currentColor\" />\n <path d=\"M14.4905 20.2167C18.9193 20.2167 22.5095 16.6265 22.5095 12.1977C22.5095 7.76894 18.9193 4.17871 14.4905 4.17871\" stroke=\"currentColor\" fill =\"transparent\" stroke-width=\"1.782\"/>\n <path d=\"M14.4905 15.7618C16.4588 15.7618 18.0545 14.1661 18.0545 12.1978C18.0545 10.2294 16.4588 8.63379 14.4905 8.63379\" stroke=\"currentColor\" fill=\"transparent\" stroke-width=\"1.782\"/>\n </svg>";
|
|
22331
22441
|
element.id = "apx-mute-icon";
|
|
22332
22442
|
element.addEventListener("touchstart", function (event) {
|
|
22333
|
-
_this.
|
|
22443
|
+
_this.HChJ(event);
|
|
22334
22444
|
});
|
|
22335
22445
|
break;
|
|
22336
22446
|
case "copy_icon":
|
|
@@ -22529,7 +22639,7 @@
|
|
|
22529
22639
|
}
|
|
22530
22640
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
22531
22641
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
22532
|
-
var childElement = _this.
|
|
22642
|
+
var childElement = _this.JssF(childConfig);
|
|
22533
22643
|
element.appendChild(childElement);
|
|
22534
22644
|
});
|
|
22535
22645
|
}
|
|
@@ -22537,7 +22647,7 @@
|
|
|
22537
22647
|
// Process children
|
|
22538
22648
|
if (config.children && config.children.length > 0) {
|
|
22539
22649
|
config.children.forEach(function (childConfig) {
|
|
22540
|
-
var childElement = _this.
|
|
22650
|
+
var childElement = _this.JssF(childConfig);
|
|
22541
22651
|
element.appendChild(childElement);
|
|
22542
22652
|
});
|
|
22543
22653
|
}
|
|
@@ -22565,7 +22675,7 @@
|
|
|
22565
22675
|
element.appendChild(ElementStyles);
|
|
22566
22676
|
return element;
|
|
22567
22677
|
});
|
|
22568
|
-
_defineProperty(this, "
|
|
22678
|
+
_defineProperty(this, "HChJ", function (event) {
|
|
22569
22679
|
var slide_details_to_be_deleted;
|
|
22570
22680
|
var mute_child_elements;
|
|
22571
22681
|
var unmute_child_elements;
|
|
@@ -22595,11 +22705,11 @@
|
|
|
22595
22705
|
}
|
|
22596
22706
|
// this.muteElement.addEventListener("touchstart", (event) => {
|
|
22597
22707
|
// event.stopPropagation();
|
|
22598
|
-
// this.
|
|
22708
|
+
// this.HChJ(event);
|
|
22599
22709
|
// });
|
|
22600
22710
|
}
|
|
22601
22711
|
});
|
|
22602
|
-
_defineProperty(this, "
|
|
22712
|
+
_defineProperty(this, "Hxdq", function () {
|
|
22603
22713
|
var tapTimeout;
|
|
22604
22714
|
var tapThreshold = 0.5; // Assuming 0.5 is the center of the WebView
|
|
22605
22715
|
var longPressDuration = 200;
|
|
@@ -22723,7 +22833,7 @@
|
|
|
22723
22833
|
event.target.dataset.touchStartTime = event.timeStamp;
|
|
22724
22834
|
});
|
|
22725
22835
|
});
|
|
22726
|
-
_defineProperty(this, "
|
|
22836
|
+
_defineProperty(this, "QWQi", function () {
|
|
22727
22837
|
var startY, startX;
|
|
22728
22838
|
_this.storyContainer.addEventListener("touchstart", function (event) {
|
|
22729
22839
|
_this.swipeTouch = true;
|
|
@@ -22930,7 +23040,7 @@
|
|
|
22930
23040
|
}, 50);
|
|
22931
23041
|
});
|
|
22932
23042
|
});
|
|
22933
|
-
_defineProperty(this, "
|
|
23043
|
+
_defineProperty(this, "lJjJ", function () {
|
|
22934
23044
|
_this.loader.style.display = "block";
|
|
22935
23045
|
var progress = Array.from(document.querySelectorAll(".progress"));
|
|
22936
23046
|
var activeIndex = progress.findIndex(function (el) {
|
|
@@ -22946,7 +23056,7 @@
|
|
|
22946
23056
|
}
|
|
22947
23057
|
}
|
|
22948
23058
|
});
|
|
22949
|
-
_defineProperty(this, "
|
|
23059
|
+
_defineProperty(this, "ofzx", function () {
|
|
22950
23060
|
if (!_this.continueLoading) {
|
|
22951
23061
|
var slide_details_to_be_deleted = document.querySelector(".slide-details");
|
|
22952
23062
|
var childElements = slide_details_to_be_deleted.querySelectorAll("video");
|
|
@@ -22966,19 +23076,19 @@
|
|
|
22966
23076
|
_this.loader.style.display = "none";
|
|
22967
23077
|
}
|
|
22968
23078
|
});
|
|
22969
|
-
_defineProperty(this, "
|
|
23079
|
+
_defineProperty(this, "kxrF", function () {
|
|
22970
23080
|
if (_this.imageElements.length === 0) return true;
|
|
22971
23081
|
return _this.imageElements.every(function (img) {
|
|
22972
23082
|
return img.complete;
|
|
22973
23083
|
});
|
|
22974
23084
|
});
|
|
22975
|
-
_defineProperty(this, "
|
|
23085
|
+
_defineProperty(this, "XUBL", function () {
|
|
22976
23086
|
if (_this.videoElements.length === 0) return true;
|
|
22977
23087
|
return _this.videoElements.every(function (video) {
|
|
22978
23088
|
return video.readyState >= 3;
|
|
22979
23089
|
});
|
|
22980
23090
|
});
|
|
22981
|
-
_defineProperty(this, "
|
|
23091
|
+
_defineProperty(this, "Aayi", function () {
|
|
22982
23092
|
var bodyStyles = window.getComputedStyle(document.body);
|
|
22983
23093
|
var backgroundImage = bodyStyles.backgroundImage;
|
|
22984
23094
|
if (backgroundImage && backgroundImage !== "none" && _this.current_slide_config.media_type === "image") {
|
|
@@ -22988,7 +23098,7 @@
|
|
|
22988
23098
|
var img = new Image();
|
|
22989
23099
|
img.src = imageUrl;
|
|
22990
23100
|
if (img.complete) {
|
|
22991
|
-
_this.
|
|
23101
|
+
_this.ofzx();
|
|
22992
23102
|
return true;
|
|
22993
23103
|
}
|
|
22994
23104
|
return false;
|
|
@@ -22996,21 +23106,21 @@
|
|
|
22996
23106
|
var slide_details_to_be_deleted = document.querySelector(".slide-details");
|
|
22997
23107
|
var childElements = slide_details_to_be_deleted.querySelectorAll("video");
|
|
22998
23108
|
if (childElements[0].readyState >= 3) {
|
|
22999
|
-
_this.
|
|
23109
|
+
_this.ofzx();
|
|
23000
23110
|
return true;
|
|
23001
23111
|
}
|
|
23002
23112
|
return false;
|
|
23003
23113
|
} else {
|
|
23004
23114
|
if (_this.videoElements.length == 0 && _this.imageElements.length == 0) {
|
|
23005
|
-
_this.
|
|
23115
|
+
_this.ofzx();
|
|
23006
23116
|
return true;
|
|
23007
|
-
} else if (_this.
|
|
23008
|
-
_this.
|
|
23117
|
+
} else if (_this.kxrF() && _this.XUBL()) {
|
|
23118
|
+
_this.ofzx();
|
|
23009
23119
|
return true;
|
|
23010
23120
|
}
|
|
23011
23121
|
}
|
|
23012
23122
|
});
|
|
23013
|
-
_defineProperty(this, "
|
|
23123
|
+
_defineProperty(this, "jJUR", function (event, startY, action) {
|
|
23014
23124
|
event.stopPropagation();
|
|
23015
23125
|
var endY = event.changedTouches[0].clientY;
|
|
23016
23126
|
var deltaY = startY - endY;
|
|
@@ -23105,7 +23215,7 @@
|
|
|
23105
23215
|
this.swipe_action;
|
|
23106
23216
|
this.continueLoading = false;
|
|
23107
23217
|
this.boundSwipeUpHandling = function (event) {
|
|
23108
|
-
return _this.
|
|
23218
|
+
return _this.jJUR(event, _this.startY, _this.swipe_action);
|
|
23109
23219
|
};
|
|
23110
23220
|
}
|
|
23111
23221
|
_createClass(Stories, [{
|
|
@@ -23168,7 +23278,7 @@
|
|
|
23168
23278
|
} else {
|
|
23169
23279
|
var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM16, _window$ApxorRTM17, _window$ApxorRTM18;
|
|
23170
23280
|
// Move to the first slide of the next group
|
|
23171
|
-
// this.
|
|
23281
|
+
// this.pZHH();
|
|
23172
23282
|
this.position++;
|
|
23173
23283
|
this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
|
|
23174
23284
|
this.slides = this.config[this.position].slides;
|
|
@@ -23294,7 +23404,7 @@
|
|
|
23294
23404
|
if (activeIndex === 0) {
|
|
23295
23405
|
var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM22, _window$ApxorRTM23, _window$ApxorRTM24;
|
|
23296
23406
|
// If at the first slide of the current group, move to the last slide of the previous group
|
|
23297
|
-
// this.
|
|
23407
|
+
// this.pZHH();
|
|
23298
23408
|
this.position--;
|
|
23299
23409
|
this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
|
|
23300
23410
|
this.slides = this.config[this.position].slides;
|
|
@@ -23424,12 +23534,12 @@
|
|
|
23424
23534
|
if ((current_slide_from_config === null || current_slide_from_config === void 0 ? void 0 : current_slide_from_config.media_type) === "image") {
|
|
23425
23535
|
var _window$Apxor5;
|
|
23426
23536
|
element = document.createElement("div");
|
|
23427
|
-
var
|
|
23537
|
+
var imageSrc;
|
|
23428
23538
|
if (((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) != "ios") {
|
|
23429
23539
|
var _window$Apxor6;
|
|
23430
|
-
|
|
23431
|
-
if (
|
|
23432
|
-
document.body.style.backgroundImage = "url(".concat(
|
|
23540
|
+
imageSrc = (_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.getFilePathForStories(this.config[this.position].id, current_slide_from_config.media_url);
|
|
23541
|
+
if (imageSrc && imageSrc != "") {
|
|
23542
|
+
document.body.style.backgroundImage = "url(".concat(imageSrc, ")");
|
|
23433
23543
|
document.body.style.backgroundSize = "100% auto";
|
|
23434
23544
|
document.body.style.backgroundPosition = "center";
|
|
23435
23545
|
document.body.style.backgroundRepeat = "no-repeat";
|
|
@@ -23481,25 +23591,25 @@
|
|
|
23481
23591
|
// Create custom content
|
|
23482
23592
|
var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
|
|
23483
23593
|
delete updated_layout_without_absolute_elements["absolute_position_children"];
|
|
23484
|
-
element = this.
|
|
23594
|
+
element = this.JssF(updated_layout_without_absolute_elements);
|
|
23485
23595
|
}
|
|
23486
23596
|
// Append slide content to slide details container
|
|
23487
23597
|
|
|
23488
23598
|
document.body.style.backgroundColor = current_slide_from_config.media_background_color;
|
|
23489
23599
|
document.body.style.margin = "0px";
|
|
23490
23600
|
currentSlideDetails.appendChild(element);
|
|
23491
|
-
this.
|
|
23601
|
+
this.lJjJ();
|
|
23492
23602
|
|
|
23493
23603
|
// Handle absolute position children
|
|
23494
23604
|
if (current_slide_from_config.layout.absolute_position_children && current_slide_from_config.layout.absolute_position_children.length > 0) {
|
|
23495
23605
|
current_slide_from_config.layout.absolute_position_children.forEach(function (childConfig) {
|
|
23496
|
-
var childElement = _this2.
|
|
23606
|
+
var childElement = _this2.JssF(childConfig);
|
|
23497
23607
|
// Append absolute position children to slide details container
|
|
23498
23608
|
currentSlideDetails.appendChild(childElement);
|
|
23499
23609
|
});
|
|
23500
23610
|
}
|
|
23501
23611
|
window.intervalToCheckImgStatus2 = setInterval(function () {
|
|
23502
|
-
if (_this2.
|
|
23612
|
+
if (_this2.Aayi()) {
|
|
23503
23613
|
clearInterval(window.intervalToCheckImgStatus2);
|
|
23504
23614
|
}
|
|
23505
23615
|
}, 500);
|
|
@@ -23934,15 +24044,15 @@
|
|
|
23934
24044
|
_this$badge$animation2,
|
|
23935
24045
|
_this$badge$animation3;
|
|
23936
24046
|
_classCallCheck(this, ApxorBadge);
|
|
23937
|
-
_defineProperty(this, "
|
|
24047
|
+
_defineProperty(this, "nJJY", function () {
|
|
23938
24048
|
var delayMillis = _this.delayMillis * 1000;
|
|
23939
24049
|
_this.shakeAnimationRepeat(_this.interCount, delayMillis);
|
|
23940
24050
|
});
|
|
23941
|
-
_defineProperty(this, "
|
|
24051
|
+
_defineProperty(this, "PfNh", function () {
|
|
23942
24052
|
var delayMillis = _this.delayMillis * 1000;
|
|
23943
24053
|
_this.fadeAnimationRepeat(_this.interCount, delayMillis);
|
|
23944
24054
|
});
|
|
23945
|
-
_defineProperty(this, "
|
|
24055
|
+
_defineProperty(this, "UIWW", function () {
|
|
23946
24056
|
var _this$targetElement;
|
|
23947
24057
|
var delayMillis = _this.delayMillis * 1000;
|
|
23948
24058
|
var finalStyles = ".apxor-badge-container-stylesdummy-".concat(_this.cssPostFix, " {\n opacity:0;\n }").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
@@ -23951,7 +24061,7 @@
|
|
|
23951
24061
|
(_this$targetElement = _this.targetElement) === null || _this$targetElement === void 0 || _this$targetElement.appendChild(newstyleNode1);
|
|
23952
24062
|
_this.rippleAnimationRepeat(_this.interCount, delayMillis);
|
|
23953
24063
|
});
|
|
23954
|
-
_defineProperty(this, "
|
|
24064
|
+
_defineProperty(this, "xisV", function () {
|
|
23955
24065
|
var delayMillis = _this.delayMillis * 1000;
|
|
23956
24066
|
//let badgeContainerClass = `.apxor-badge-container-styles-${this.cssPostFix}`;
|
|
23957
24067
|
//let badgeAnimationElement = document.querySelector(badgeContainerClass);
|
|
@@ -23968,7 +24078,7 @@
|
|
|
23968
24078
|
// newstyleNode1.innerHTML = finalStyles;
|
|
23969
24079
|
// this.targetElement?.appendChild(newstyleNode1);
|
|
23970
24080
|
});
|
|
23971
|
-
_defineProperty(this, "
|
|
24081
|
+
_defineProperty(this, "iuYq", function () {
|
|
23972
24082
|
var elements = document.querySelectorAll(".apx-main-styles-".concat(_this.configId));
|
|
23973
24083
|
elements === null || elements === void 0 || elements.forEach(function (ele) {
|
|
23974
24084
|
ele === null || ele === void 0 || ele.remove();
|
|
@@ -23977,9 +24087,9 @@
|
|
|
23977
24087
|
dummy_elements === null || dummy_elements === void 0 || dummy_elements.forEach(function (ele) {
|
|
23978
24088
|
ele === null || ele === void 0 || ele.remove();
|
|
23979
24089
|
});
|
|
23980
|
-
_this.
|
|
24090
|
+
_this.moVg();
|
|
23981
24091
|
});
|
|
23982
|
-
_defineProperty(this, "
|
|
24092
|
+
_defineProperty(this, "moVg", function () {
|
|
23983
24093
|
var targetWrapperElement = document.querySelector(".image-container-".concat(_this.configId));
|
|
23984
24094
|
// Ensure the target element is the wrapper with class 'image-container'
|
|
23985
24095
|
if (targetWrapperElement) {
|
|
@@ -24003,12 +24113,12 @@
|
|
|
24003
24113
|
* @param {boolean} optimized
|
|
24004
24114
|
* @returns viewId
|
|
24005
24115
|
*/
|
|
24006
|
-
_defineProperty(this, "
|
|
24116
|
+
_defineProperty(this, "xuge", function (node, optimized) {
|
|
24007
24117
|
if (node.nodeType !== Node.ELEMENT_NODE) return "";
|
|
24008
24118
|
var steps = [];
|
|
24009
24119
|
var contextNode = node;
|
|
24010
24120
|
while (contextNode) {
|
|
24011
|
-
var step = _this.
|
|
24121
|
+
var step = _this.DnjD(contextNode, !!optimized, contextNode === node);
|
|
24012
24122
|
if (!step) break; // Error - bail out early.
|
|
24013
24123
|
steps.push(step);
|
|
24014
24124
|
if (step.optimized) break;
|
|
@@ -24023,7 +24133,7 @@
|
|
|
24023
24133
|
* @param {boolean} optimized
|
|
24024
24134
|
* @param {object} isTargetNode
|
|
24025
24135
|
*/
|
|
24026
|
-
_defineProperty(this, "
|
|
24136
|
+
_defineProperty(this, "DnjD", function (node, optimized, isTargetNode) {
|
|
24027
24137
|
if (node.nodeType !== Node.ELEMENT_NODE) return null;
|
|
24028
24138
|
var id = node.getAttribute("id");
|
|
24029
24139
|
if (optimized) {
|
|
@@ -24118,7 +24228,8 @@
|
|
|
24118
24228
|
this.name = messageConfig.configName;
|
|
24119
24229
|
this.terminationConfig = terminationConfig;
|
|
24120
24230
|
this.showCallback = showCallback;
|
|
24121
|
-
|
|
24231
|
+
// Replace spaces with empty then all special characters except "-"
|
|
24232
|
+
this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
|
|
24122
24233
|
this.target = new Target$1(config.target);
|
|
24123
24234
|
this.view_additional_info = (config === null || config === void 0 ? void 0 : config.view_additional_info) || {};
|
|
24124
24235
|
this.find_config = (config === null || config === void 0 ? void 0 : config.find_config) || {};
|
|
@@ -24144,7 +24255,7 @@
|
|
|
24144
24255
|
this.contentZindexValue = 1;
|
|
24145
24256
|
}
|
|
24146
24257
|
_createClass(ApxorBadge, [{
|
|
24147
|
-
key: "
|
|
24258
|
+
key: "euPP",
|
|
24148
24259
|
value: function createBadge() {
|
|
24149
24260
|
var _this2 = this;
|
|
24150
24261
|
var targetFoundCallback = function targetFoundCallback() {
|
|
@@ -24413,7 +24524,7 @@
|
|
|
24413
24524
|
if (content.icon.enable_border) {
|
|
24414
24525
|
borderStylesForIcon = "\n border-radius:".concat(content.icon.border.radius, "%;\n border:").concat(content.icon.border.width, "px ").concat(content.icon.border.style, " ").concat(content.icon.border.color, ";\n ");
|
|
24415
24526
|
}
|
|
24416
|
-
badgeContentElementsstyles += "\n .apxor-badge-".concat(ind, "-icon-container").concat(_this4.cssPostFix, "{\n width:auto;\n height:auto;\n display: flex;\n justify-content:center;\n align-items:center;\n }\n .apxor-badge-").concat(ind, "-icon-content").concat(_this4.cssPostFix, " {\n position:relative;\n background:url('").concat(content.icon.path, "') no-repeat center;\n background-size:cover;\n display:inline-block;\n height: ").concat(content.icon.height, "px;\n width: ").concat(content.icon.width, "px;\n ").concat(marginForIcon, "\n ").concat(borderStylesForIcon, "\n }");
|
|
24527
|
+
badgeContentElementsstyles += "\n .apxor-badge-".concat(ind, "-icon-container").concat(_this4.cssPostFix, "{\n width:auto;\n height:auto;\n display: flex;\n justify-content:center;\n align-items:center;\n }\n .apxor-badge-").concat(ind, "-icon-content").concat(_this4.cssPostFix, " {\n position:relative;\n background-image: url('").concat(content.icon.path, "');\n background-repeat: no-repeat;\n background-position: center;\n background-size:cover;\n display:inline-block;\n height: ").concat(content.icon.height, "px;\n width: ").concat(content.icon.width, "px;\n ").concat(marginForIcon, "\n ").concat(borderStylesForIcon, "\n }");
|
|
24417
24528
|
}
|
|
24418
24529
|
if (content.enable_label) {
|
|
24419
24530
|
var marginForLabel = "";
|
|
@@ -24788,7 +24899,7 @@
|
|
|
24788
24899
|
_transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;;\n transform: skewx(30deg)\n ");
|
|
24789
24900
|
break;
|
|
24790
24901
|
}
|
|
24791
|
-
_animationForBadgeContainernew4 = "\n .apxor-badge-content-container-".concat(_this8.cssPostFix, "::before{\n content:'';\n position:absolute;\n background:transparent;\n
|
|
24902
|
+
_animationForBadgeContainernew4 = "\n .apxor-badge-content-container-".concat(_this8.cssPostFix, "::before{\n content:'';\n position:absolute;\n background:transparent;\n width:").concat(lines_total_width, "px;\n ").concat(lines_length === 1 ? "border-left: ".concat(line1width, "px solid ").concat(lines_color, ";") : "border-left: ".concat(line1width, "px solid ").concat(lines_color, "; border-right: ").concat(line2width, "px solid ").concat(lines_color, ";"), "\n height:100%;\n animation: badgeAnimation").concat(_this8.c, " ").concat(_this8.badge.animation.duration_millis, "s ").concat((_this8$badge$animatio4 = _this8.badge.animation) === null || _this8$badge$animatio4 === void 0 ? void 0 : _this8$badge$animatio4.intra_count, ";\n ").concat(_transformForMultipleDirection, ";\n }");
|
|
24792
24903
|
_keyframeForAnimationnew4 = _this8.badge.animation.shineDirection === "to_bottom_right" || _this8.badge.animation.shineDirection === "to_top_right" ? "@keyframes badgeAnimation".concat(_this8.c, " {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }") : "@keyframes badgeAnimation".concat(_this8.c, " {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }");
|
|
24793
24904
|
var _animationStyles4 = "\n ".concat(_animationForBadgeContainernew4, "\n ").concat(_keyframeForAnimationnew4, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24794
24905
|
var _newstyleNode3 = document.createElement("style");
|
|
@@ -24889,31 +25000,61 @@
|
|
|
24889
25000
|
}, {
|
|
24890
25001
|
key: "_setOnClickTerminationForBadges",
|
|
24891
25002
|
value: function _setOnClickTerminationForBadges() {
|
|
24892
|
-
var
|
|
24893
|
-
|
|
24894
|
-
_this10
|
|
24895
|
-
|
|
24896
|
-
|
|
25003
|
+
var _this10 = this;
|
|
25004
|
+
var onclickCallBack = function onclickCallBack() {
|
|
25005
|
+
var _this10$terminationCo, _this10$terminationCo2;
|
|
25006
|
+
// Log the events based on the campaign version
|
|
25007
|
+
if (_this10.uiConfig.additional_info && _this10.uiConfig.additional_info.version && _this10.uiConfig.additional_info.version === 4) {
|
|
25008
|
+
var _window3, _this10$uiConfig$addi, _this10$uiConfig, _this10$uiConfig$addi2, _this10$uiConfig2;
|
|
25009
|
+
(_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorRTM) === null || _window3 === void 0 || _window3.logEvent("apx_nudge_target_clicked", {
|
|
25010
|
+
apx_nudge_id: _this10.configId,
|
|
25011
|
+
apx_nudge_name: _this10.name,
|
|
25012
|
+
apx_template_name: "badge",
|
|
25013
|
+
apx_step: (_this10$uiConfig$addi = (_this10$uiConfig = _this10.uiConfig) === null || _this10$uiConfig === void 0 || (_this10$uiConfig = _this10$uiConfig.additional_info) === null || _this10$uiConfig === void 0 ? void 0 : _this10$uiConfig.apx_step) !== null && _this10$uiConfig$addi !== void 0 ? _this10$uiConfig$addi : 1,
|
|
25014
|
+
apx_variant_code: (_this10$uiConfig$addi2 = (_this10$uiConfig2 = _this10.uiConfig) === null || _this10$uiConfig2 === void 0 || (_this10$uiConfig2 = _this10$uiConfig2.additional_info) === null || _this10$uiConfig2 === void 0 ? void 0 : _this10$uiConfig2.apx_variant_code) !== null && _this10$uiConfig$addi2 !== void 0 ? _this10$uiConfig$addi2 : ""
|
|
25015
|
+
});
|
|
25016
|
+
} else {
|
|
25017
|
+
var _window$ApxorRTM;
|
|
25018
|
+
(_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 || _window$ApxorRTM.logEvent("InlineTargetViewClicked", {
|
|
25019
|
+
id: _this10.configId,
|
|
25020
|
+
message_name: _this10.name,
|
|
25021
|
+
apx_message_step: 1
|
|
25022
|
+
});
|
|
25023
|
+
}
|
|
25024
|
+
|
|
25025
|
+
// Remove the Badge when touch termination is enabled with logging the event
|
|
25026
|
+
if ((_this10$terminationCo = _this10.terminationConfig) !== null && _this10$terminationCo !== void 0 && _this10$terminationCo.enable_touch && Object(_this10.terminationConfig.touch).length !== 0 && _this10.terminationConfig.touch.enable_user_interaction && (_this10$terminationCo2 = _this10.terminationConfig.touch) !== null && _this10$terminationCo2 !== void 0 && _this10$terminationCo2.target_view) {
|
|
24897
25027
|
var _window$Apxor, _this10$targetElement;
|
|
24898
25028
|
var badge = document.getElementsByClassName("apxor-badge-container-styles-".concat(_this10.cssPostFix));
|
|
24899
25029
|
while (badge.length > 0) badge[0].remove();
|
|
25030
|
+
// Update badge status (nudge_shown event is handled by this operation)
|
|
24900
25031
|
(_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 || _window$Apxor.updateBadgeStatus("target_click", _this10.configId);
|
|
24901
25032
|
_this10.targetClicked = true;
|
|
24902
25033
|
(_this10$targetElement = _this10.targetElement) === null || _this10$targetElement === void 0 || _this10$targetElement.classList.remove("apx-badge-target-style".concat(_this10.cssPostFix));
|
|
24903
|
-
|
|
24904
|
-
|
|
24905
|
-
|
|
24906
|
-
|
|
24907
|
-
|
|
24908
|
-
|
|
24909
|
-
|
|
24910
|
-
|
|
24911
|
-
|
|
24912
|
-
|
|
24913
|
-
|
|
24914
|
-
|
|
24915
|
-
|
|
24916
|
-
|
|
25034
|
+
|
|
25035
|
+
// Log the events based on the campaign version
|
|
25036
|
+
if (_this10.uiConfig.additional_info && _this10.uiConfig.additional_info.version && _this10.uiConfig.additional_info.version === 4) {
|
|
25037
|
+
var _window4, _this10$uiConfig$addi3, _this10$uiConfig3, _this10$uiConfig$addi4, _this10$uiConfig4;
|
|
25038
|
+
(_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorRTM) === null || _window4 === void 0 || _window4.logEvent("apx_nudge_terminated", {
|
|
25039
|
+
apx_nudge_id: _this10.configId,
|
|
25040
|
+
apx_nudge_name: _this10.name,
|
|
25041
|
+
apx_template_name: "badge",
|
|
25042
|
+
apx_step: (_this10$uiConfig$addi3 = (_this10$uiConfig3 = _this10.uiConfig) === null || _this10$uiConfig3 === void 0 || (_this10$uiConfig3 = _this10$uiConfig3.additional_info) === null || _this10$uiConfig3 === void 0 ? void 0 : _this10$uiConfig3.apx_step) !== null && _this10$uiConfig$addi3 !== void 0 ? _this10$uiConfig$addi3 : 1,
|
|
25043
|
+
apx_termination_type: "Target Element Clicked",
|
|
25044
|
+
apx_variant_code: (_this10$uiConfig$addi4 = (_this10$uiConfig4 = _this10.uiConfig) === null || _this10$uiConfig4 === void 0 || (_this10$uiConfig4 = _this10$uiConfig4.additional_info) === null || _this10$uiConfig4 === void 0 ? void 0 : _this10$uiConfig4.apx_variant_code) !== null && _this10$uiConfig$addi4 !== void 0 ? _this10$uiConfig$addi4 : ""
|
|
25045
|
+
});
|
|
25046
|
+
} else {
|
|
25047
|
+
var _window$ApxorRTM2;
|
|
25048
|
+
(_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("inline_dismissed", {
|
|
25049
|
+
id: _this10.configId,
|
|
25050
|
+
message_name: _this10.name,
|
|
25051
|
+
apx_reason: "InlineTargetViewClicked"
|
|
25052
|
+
});
|
|
25053
|
+
}
|
|
25054
|
+
}
|
|
25055
|
+
_this10.targetElement.removeEventListener("click", onclickCallBack);
|
|
25056
|
+
};
|
|
25057
|
+
this.targetElement.addEventListener("click", onclickCallBack);
|
|
24917
25058
|
}
|
|
24918
25059
|
}]);
|
|
24919
25060
|
return ApxorBadge;
|
|
@@ -24931,16 +25072,16 @@
|
|
|
24931
25072
|
var RTM = /*#__PURE__*/_createClass(function RTM() {
|
|
24932
25073
|
var _this = this;
|
|
24933
25074
|
_classCallCheck(this, RTM);
|
|
24934
|
-
_defineProperty(this, "
|
|
25075
|
+
_defineProperty(this, "tdGc", {});
|
|
24935
25076
|
_defineProperty(this, "isShowingAction", false);
|
|
24936
25077
|
_defineProperty(this, "currentAction", null);
|
|
24937
|
-
_defineProperty(this, "
|
|
24938
|
-
_defineProperty(this, "version",
|
|
25078
|
+
_defineProperty(this, "ThXo", null);
|
|
25079
|
+
_defineProperty(this, "version", 93);
|
|
24939
25080
|
_defineProperty(this, "isInitialised", false);
|
|
24940
|
-
_defineProperty(this, "
|
|
24941
|
-
_defineProperty(this, "
|
|
25081
|
+
_defineProperty(this, "MSgZ", {});
|
|
25082
|
+
_defineProperty(this, "gkkE", false);
|
|
24942
25083
|
_defineProperty(this, "_isShownECCalled", false);
|
|
24943
|
-
_defineProperty(this, "
|
|
25084
|
+
_defineProperty(this, "DvMV", function () {
|
|
24944
25085
|
_this.isInitialised = true;
|
|
24945
25086
|
var oldPushState = history.pushState;
|
|
24946
25087
|
history.pushState = function pushState() {
|
|
@@ -24967,7 +25108,7 @@
|
|
|
24967
25108
|
var _window;
|
|
24968
25109
|
(_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("logger show");
|
|
24969
25110
|
if (!_this.isInitialised) {
|
|
24970
|
-
_this.
|
|
25111
|
+
_this.DvMV();
|
|
24971
25112
|
}
|
|
24972
25113
|
window.addEventListener("pagehide", function () {
|
|
24973
25114
|
var _window$Apxor, _window$Apxor$pageUnl;
|
|
@@ -24992,7 +25133,7 @@
|
|
|
24992
25133
|
} else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
|
|
24993
25134
|
_this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
|
|
24994
25135
|
} else if (ui_config.display_type === "coach_mark_v2") {
|
|
24995
|
-
_this.
|
|
25136
|
+
_this.FxIS(ui_config, duration, uuid, name);
|
|
24996
25137
|
} else {
|
|
24997
25138
|
showCoachmarkWithDelay(_this, ui_config, {
|
|
24998
25139
|
configId: uuid,
|
|
@@ -25032,7 +25173,7 @@
|
|
|
25032
25173
|
});
|
|
25033
25174
|
_defineProperty(this, "showBadge", function (uiJson, duration, uuid, name, terminationConfig) {
|
|
25034
25175
|
if (!_this.isInitialised) {
|
|
25035
|
-
_this.
|
|
25176
|
+
_this.DvMV();
|
|
25036
25177
|
}
|
|
25037
25178
|
window.addEventListener("pagehide", function () {
|
|
25038
25179
|
var _window$Apxor2, _window$Apxor2$pageUn;
|
|
@@ -25044,7 +25185,7 @@
|
|
|
25044
25185
|
_this.removeBadge(name, uuid);
|
|
25045
25186
|
}
|
|
25046
25187
|
var termination_config = JSON.parse(terminationConfig);
|
|
25047
|
-
_this.
|
|
25188
|
+
_this.euPP(ui_config, duration, uuid, name, termination_config);
|
|
25048
25189
|
});
|
|
25049
25190
|
_defineProperty(this, "showInApp", function (config, duration, configId, name) {
|
|
25050
25191
|
try {
|
|
@@ -25110,7 +25251,7 @@
|
|
|
25110
25251
|
try {
|
|
25111
25252
|
config = config.split("\n").join("\\n");
|
|
25112
25253
|
var ui_config = JSON.parse(config);
|
|
25113
|
-
_this.
|
|
25254
|
+
_this.NaBI(ui_config, configId, name, position, slidesSeenCount, view_id);
|
|
25114
25255
|
} catch (e) {
|
|
25115
25256
|
var _window$Apxor4;
|
|
25116
25257
|
if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
|
|
@@ -25124,10 +25265,10 @@
|
|
|
25124
25265
|
console.error(e);
|
|
25125
25266
|
}
|
|
25126
25267
|
});
|
|
25127
|
-
_defineProperty(this, "
|
|
25268
|
+
_defineProperty(this, "NaBI", function (config, configId, name, position, slidesSeenCount, view_id) {
|
|
25128
25269
|
var cardsContainer = new Stories(config, configId, name, position, slidesSeenCount, view_id, function () {
|
|
25129
|
-
var _config$additional_in3, _config$additional_in4;
|
|
25130
|
-
window.
|
|
25270
|
+
var _window$ApxorRTM3, _config$additional_in3, _config$additional_in4;
|
|
25271
|
+
(_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_shown", {
|
|
25131
25272
|
apx_nudge_name: name,
|
|
25132
25273
|
apx_nudge_id: configId,
|
|
25133
25274
|
apx_template_name: "stories",
|
|
@@ -25144,10 +25285,8 @@
|
|
|
25144
25285
|
if (_this.currentAction !== null && _this.currentAction !== undefined) {
|
|
25145
25286
|
_this.isShowingAction = false;
|
|
25146
25287
|
try {
|
|
25147
|
-
var _window19;
|
|
25148
25288
|
_this.currentAction();
|
|
25149
25289
|
_this.currentAction = null;
|
|
25150
|
-
(_window19 = window) === null || _window19 === void 0 || (_window19 = _window19.ApxorLogger) === null || _window19 === void 0 || _window19.debug("Callback is called");
|
|
25151
25290
|
} catch (e) {}
|
|
25152
25291
|
}
|
|
25153
25292
|
});
|
|
@@ -25159,48 +25298,48 @@
|
|
|
25159
25298
|
var onShow = function onShow() {
|
|
25160
25299
|
_this.isShowingAction = true;
|
|
25161
25300
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
25162
|
-
var
|
|
25163
|
-
(
|
|
25301
|
+
var _window19, _window19$updateFlag, _window20, _window20$updateCount;
|
|
25302
|
+
(_window19 = window) === null || _window19 === void 0 || (_window19 = _window19.Apxor) === null || _window19 === void 0 || (_window19$updateFlag = _window19.updateFlag) === null || _window19$updateFlag === void 0 || _window19$updateFlag.call(_window19, true);
|
|
25164
25303
|
window.Apxor.logActionEvent("inline_shown", uuid, name);
|
|
25165
|
-
(
|
|
25304
|
+
(_window20 = window) === null || _window20 === void 0 || (_window20 = _window20.Apxor) === null || _window20 === void 0 || (_window20$updateCount = _window20.updateCount) === null || _window20$updateCount === void 0 || _window20$updateCount.call(_window20, uuid);
|
|
25166
25305
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
25167
25306
|
setTimeout(function () {
|
|
25168
|
-
var
|
|
25169
|
-
(
|
|
25307
|
+
var _window21, _window21$logInternal;
|
|
25308
|
+
(_window21 = window) === null || _window21 === void 0 || (_window21 = _window21.Apxor) === null || _window21 === void 0 || (_window21$logInternal = _window21.logInternalEvent) === null || _window21$logInternal === void 0 || _window21$logInternal.call(_window21, "capt");
|
|
25170
25309
|
}, 500);
|
|
25171
25310
|
}
|
|
25172
25311
|
}
|
|
25173
25312
|
};
|
|
25174
25313
|
var onHide = function onHide(isCancelled) {
|
|
25175
|
-
var
|
|
25314
|
+
var _window22, _window22$updateFlag, _window23;
|
|
25176
25315
|
_this.isShowingAction = false;
|
|
25177
25316
|
_this.currentAction = null;
|
|
25178
|
-
_this.
|
|
25179
|
-
(
|
|
25317
|
+
_this.ThXo = null;
|
|
25318
|
+
(_window22 = window) === null || _window22 === void 0 || (_window22 = _window22.Apxor) === null || _window22 === void 0 || (_window22$updateFlag = _window22.updateFlag) === null || _window22$updateFlag === void 0 || _window22$updateFlag.call(_window22, false);
|
|
25180
25319
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
25181
25320
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
25182
25321
|
}
|
|
25183
|
-
if (((
|
|
25184
|
-
var
|
|
25185
|
-
(
|
|
25322
|
+
if (((_window23 = window) === null || _window23 === void 0 || (_window23 = _window23.ApxorWebView) === null || _window23 === void 0 ? void 0 : _window23.getLayoutType()) === "web-inline") {
|
|
25323
|
+
var _window24;
|
|
25324
|
+
(_window24 = window) === null || _window24 === void 0 || (_window24 = _window24.ApxorWebView) === null || _window24 === void 0 || _window24.removeWebView();
|
|
25186
25325
|
}
|
|
25187
25326
|
};
|
|
25188
25327
|
if (action_class === "new-inline") {
|
|
25189
|
-
_this.
|
|
25328
|
+
_this.ThXo = new InLineTooltip(ui_config, [], [], terminationConfig, {
|
|
25190
25329
|
configId: uuid,
|
|
25191
25330
|
configName: name
|
|
25192
25331
|
}, _this, onShow, onHide, function () {}, false, 0);
|
|
25193
25332
|
} else if (action_class === "tooltip_builder") {
|
|
25194
|
-
_this.
|
|
25333
|
+
_this.ThXo = new NewInLineTooltip(ui_config, terminationConfig, {
|
|
25195
25334
|
configId: uuid,
|
|
25196
25335
|
configName: name
|
|
25197
25336
|
}, _this, onShow, onHide);
|
|
25198
25337
|
}
|
|
25199
25338
|
setTimeout(function () {
|
|
25200
|
-
_this.
|
|
25339
|
+
_this.ThXo.createNewTooltip();
|
|
25201
25340
|
}, ui_config.delay);
|
|
25202
25341
|
});
|
|
25203
|
-
_defineProperty(this, "
|
|
25342
|
+
_defineProperty(this, "FxIS", function (ui_config, duration, uuid, name) {
|
|
25204
25343
|
var terminationConfig = {};
|
|
25205
25344
|
terminationConfig["auto_dismiss"] = duration > 0;
|
|
25206
25345
|
terminationConfig["duration"] = duration;
|
|
@@ -25210,33 +25349,33 @@
|
|
|
25210
25349
|
}, _this, function () {
|
|
25211
25350
|
_this.isShowingAction = true;
|
|
25212
25351
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
25213
|
-
var
|
|
25214
|
-
(
|
|
25352
|
+
var _window25, _window25$updateFlag;
|
|
25353
|
+
(_window25 = window) === null || _window25 === void 0 || (_window25 = _window25.Apxor) === null || _window25 === void 0 || (_window25$updateFlag = _window25.updateFlag) === null || _window25$updateFlag === void 0 || _window25$updateFlag.call(_window25, true);
|
|
25215
25354
|
window.Apxor.logActionEvent("inline_shown", uuid, name);
|
|
25216
25355
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
25217
25356
|
setTimeout(function () {
|
|
25218
|
-
var
|
|
25219
|
-
(
|
|
25357
|
+
var _window26, _window26$logInternal;
|
|
25358
|
+
(_window26 = window) === null || _window26 === void 0 || (_window26 = _window26.Apxor) === null || _window26 === void 0 || (_window26$logInternal = _window26.logInternalEvent) === null || _window26$logInternal === void 0 || _window26$logInternal.call(_window26, "capt");
|
|
25220
25359
|
}, 500);
|
|
25221
25360
|
}
|
|
25222
25361
|
}
|
|
25223
25362
|
}, function (isCancelled) {
|
|
25224
|
-
var
|
|
25363
|
+
var _window27, _window27$updateFlag, _window28;
|
|
25225
25364
|
_this.isShowingAction = false;
|
|
25226
25365
|
_this.currentAction = null;
|
|
25227
|
-
_this.
|
|
25228
|
-
(
|
|
25366
|
+
_this.ThXo = null;
|
|
25367
|
+
(_window27 = window) === null || _window27 === void 0 || (_window27 = _window27.Apxor) === null || _window27 === void 0 || (_window27$updateFlag = _window27.updateFlag) === null || _window27$updateFlag === void 0 || _window27$updateFlag.call(_window27, false);
|
|
25229
25368
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
25230
25369
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
25231
25370
|
}
|
|
25232
|
-
if (((
|
|
25233
|
-
var
|
|
25234
|
-
(
|
|
25371
|
+
if (((_window28 = window) === null || _window28 === void 0 || (_window28 = _window28.ApxorWebView) === null || _window28 === void 0 ? void 0 : _window28.getLayoutType()) === "web-inline") {
|
|
25372
|
+
var _window29;
|
|
25373
|
+
(_window29 = window) === null || _window29 === void 0 || (_window29 = _window29.ApxorWebView) === null || _window29 === void 0 || _window29.removeWebView();
|
|
25235
25374
|
}
|
|
25236
25375
|
}, _this.stepperCallback, false, 0);
|
|
25237
25376
|
_this._currentCoachmark.createNewCoachMark();
|
|
25238
25377
|
});
|
|
25239
|
-
_defineProperty(this, "
|
|
25378
|
+
_defineProperty(this, "euPP", function (ui_config, duration, uuid, name, terminationConfig) {
|
|
25240
25379
|
_this._currentBadge = new ApxorBadge(ui_config, terminationConfig, {
|
|
25241
25380
|
configId: uuid,
|
|
25242
25381
|
configName: name
|
|
@@ -25247,18 +25386,18 @@
|
|
|
25247
25386
|
(_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 || _window$Apxor5.updateBadgeStatus("show", uuid);
|
|
25248
25387
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
25249
25388
|
setTimeout(function () {
|
|
25250
|
-
var
|
|
25251
|
-
(
|
|
25389
|
+
var _window30, _window30$logInternal;
|
|
25390
|
+
(_window30 = window) === null || _window30 === void 0 || (_window30 = _window30.Apxor) === null || _window30 === void 0 || (_window30$logInternal = _window30.logInternalEvent) === null || _window30$logInternal === void 0 || _window30$logInternal.call(_window30, "capt");
|
|
25252
25391
|
}, 500);
|
|
25253
25392
|
}
|
|
25254
25393
|
}
|
|
25255
25394
|
});
|
|
25256
|
-
_this._currentBadge.
|
|
25257
|
-
_this._currentBadge.
|
|
25395
|
+
_this._currentBadge.iuYq();
|
|
25396
|
+
_this._currentBadge.euPP();
|
|
25258
25397
|
});
|
|
25259
25398
|
_defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
|
|
25260
|
-
if (_this.
|
|
25261
|
-
_this.
|
|
25399
|
+
if (_this.ThXo) {
|
|
25400
|
+
_this.ThXo.updateElementPositionOnScroll(top, left, height, width);
|
|
25262
25401
|
}
|
|
25263
25402
|
});
|
|
25264
25403
|
_defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
|
|
@@ -25275,15 +25414,15 @@
|
|
|
25275
25414
|
var VideoInAppInstance = new VideoInApp(videoConfig, terminationConfig, configId, name, function () {
|
|
25276
25415
|
_this.isShowingAction = true;
|
|
25277
25416
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
25278
|
-
var
|
|
25279
|
-
(
|
|
25417
|
+
var _window31, _window31$updateFlag;
|
|
25418
|
+
(_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, true);
|
|
25280
25419
|
window.Apxor.logActionEvent("inapp_shown", configId, name);
|
|
25281
25420
|
}
|
|
25282
25421
|
}, function () {
|
|
25283
|
-
var
|
|
25422
|
+
var _window32, _window32$updateFlag;
|
|
25284
25423
|
_this.isShowingAction = false;
|
|
25285
25424
|
_this.currentAction = null;
|
|
25286
|
-
(
|
|
25425
|
+
(_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, false);
|
|
25287
25426
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
25288
25427
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|
|
25289
25428
|
}
|
|
@@ -25310,17 +25449,17 @@
|
|
|
25310
25449
|
var _window$Apxor6;
|
|
25311
25450
|
_this.isShowingAction = true;
|
|
25312
25451
|
if (((_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.platform) === "ios") {
|
|
25313
|
-
var
|
|
25314
|
-
(
|
|
25452
|
+
var _window33, _window33$updateFlag;
|
|
25453
|
+
(_window33 = window) === null || _window33 === void 0 || (_window33 = _window33.Apxor) === null || _window33 === void 0 || (_window33$updateFlag = _window33.updateFlag) === null || _window33$updateFlag === void 0 || _window33$updateFlag.call(_window33, true, "IN_APP");
|
|
25315
25454
|
} else {
|
|
25316
|
-
var
|
|
25317
|
-
(
|
|
25455
|
+
var _window34, _window34$updateFlag;
|
|
25456
|
+
(_window34 = window) === null || _window34 === void 0 || (_window34 = _window34.Apxor) === null || _window34 === void 0 || (_window34$updateFlag = _window34.updateFlag) === null || _window34$updateFlag === void 0 || _window34$updateFlag.call(_window34, "IN_APP", true);
|
|
25318
25457
|
}
|
|
25319
25458
|
if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent) {
|
|
25320
25459
|
window.Apxor.logActionEvent("inapp_shown", configId, name);
|
|
25321
25460
|
} else if (action_class === "inapp_builder") {
|
|
25322
|
-
var _window$
|
|
25323
|
-
(_window$
|
|
25461
|
+
var _window$ApxorRTM4, _window$Apxor7, _config$additional_in5, _window$Apxor8, _config$additional_in6, _config$additional_in7, _config$additional_in8, _config$additional_in9, _config$additional_in10, _config$additional_in11;
|
|
25462
|
+
(_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_nudge_shown", {
|
|
25324
25463
|
apx_nudge_name: name,
|
|
25325
25464
|
apx_nudge_id: ((_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in5 = config.additional_info) === null || _config$additional_in5 === void 0 ? void 0 : _config$additional_in5.id : configId,
|
|
25326
25465
|
apx_template_name: "inapp",
|
|
@@ -25344,19 +25483,19 @@
|
|
|
25344
25483
|
backgroundDiv.remove();
|
|
25345
25484
|
_this.isShowingAction = false;
|
|
25346
25485
|
if (((_window$Apxor9 = window.Apxor) === null || _window$Apxor9 === void 0 ? void 0 : _window$Apxor9.platform) === "ios") {
|
|
25347
|
-
var
|
|
25348
|
-
(
|
|
25486
|
+
var _window35, _window35$updateFlag;
|
|
25487
|
+
(_window35 = window) === null || _window35 === void 0 || (_window35 = _window35.Apxor) === null || _window35 === void 0 || (_window35$updateFlag = _window35.updateFlag) === null || _window35$updateFlag === void 0 || _window35$updateFlag.call(_window35, false, "IN_APP");
|
|
25349
25488
|
} else {
|
|
25350
|
-
var
|
|
25351
|
-
(
|
|
25489
|
+
var _window36, _window36$updateFlag;
|
|
25490
|
+
(_window36 = window) === null || _window36 === void 0 || (_window36 = _window36.Apxor) === null || _window36 === void 0 || (_window36$updateFlag = _window36.updateFlag) === null || _window36$updateFlag === void 0 || _window36$updateFlag.call(_window36, "IN_APP", false);
|
|
25352
25491
|
}
|
|
25353
25492
|
_this.currentAction = null;
|
|
25354
25493
|
if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
|
|
25355
25494
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|
|
25356
25495
|
} else if (action_class === "inapp_builder") {
|
|
25357
|
-
var
|
|
25496
|
+
var _window37;
|
|
25358
25497
|
if (!(action == "cancel" || action == "never")) {
|
|
25359
|
-
var _window$Apxor10, _config$additional_in12, _config$additional_in13, _window$Apxor11, _config$additional_in14, _config$additional_in15, _config$additional_in16, _config$additional_in17, _window$
|
|
25498
|
+
var _window$Apxor10, _config$additional_in12, _config$additional_in13, _window$Apxor11, _config$additional_in14, _config$additional_in15, _config$additional_in16, _config$additional_in17, _window$ApxorRTM5;
|
|
25360
25499
|
var additional_info = {
|
|
25361
25500
|
apx_nudge_name: name,
|
|
25362
25501
|
apx_nudge_id: ((_window$Apxor10 = window.Apxor) === null || _window$Apxor10 === void 0 ? void 0 : _window$Apxor10.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in12 = config.additional_info) === null || _config$additional_in12 === void 0 ? void 0 : _config$additional_in12.id : configId,
|
|
@@ -25367,10 +25506,10 @@
|
|
|
25367
25506
|
if (type != "") {
|
|
25368
25507
|
additional_info["apx_dismiss_type"] = type;
|
|
25369
25508
|
}
|
|
25370
|
-
(_window$
|
|
25509
|
+
(_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_nudge_dismissed", additional_info);
|
|
25371
25510
|
}
|
|
25372
25511
|
if (action === "cancel") {
|
|
25373
|
-
var _window$Apxor12, _config$additional_in18, _config$additional_in19, _window$Apxor13, _config$additional_in20, _config$additional_in21, _config$additional_in22, _config$additional_in23, _window$
|
|
25512
|
+
var _window$Apxor12, _config$additional_in18, _config$additional_in19, _window$Apxor13, _config$additional_in20, _config$additional_in21, _config$additional_in22, _config$additional_in23, _window$ApxorRTM6;
|
|
25374
25513
|
var _additional_info = {
|
|
25375
25514
|
apx_nudge_name: name,
|
|
25376
25515
|
apx_nudge_id: ((_window$Apxor12 = window.Apxor) === null || _window$Apxor12 === void 0 ? void 0 : _window$Apxor12.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in18 = config.additional_info) === null || _config$additional_in18 === void 0 ? void 0 : _config$additional_in18.id : configId,
|
|
@@ -25378,9 +25517,9 @@
|
|
|
25378
25517
|
apx_variant_code: config === null || config === void 0 || (_config$additional_in19 = config.additional_info) === null || _config$additional_in19 === void 0 ? void 0 : _config$additional_in19.apx_variant_code,
|
|
25379
25518
|
apx_step: ((_window$Apxor13 = window.Apxor) === null || _window$Apxor13 === void 0 ? void 0 : _window$Apxor13.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in20 = config.additional_info) !== null && _config$additional_in20 !== void 0 && _config$additional_in20.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in21 = config.additional_info) === null || _config$additional_in21 === void 0 ? void 0 : _config$additional_in21.apx_step : config !== null && config !== void 0 && (_config$additional_in22 = config.additional_info) !== null && _config$additional_in22 !== void 0 && _config$additional_in22.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in23 = config.additional_info) === null || _config$additional_in23 === void 0 ? void 0 : _config$additional_in23.apx_step
|
|
25380
25519
|
};
|
|
25381
|
-
(_window$
|
|
25520
|
+
(_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent("apx_nudge_cancelled", _additional_info);
|
|
25382
25521
|
}
|
|
25383
|
-
(
|
|
25522
|
+
(_window37 = window) === null || _window37 === void 0 || (_window37 = _window37.ApxorInternals) === null || _window37 === void 0 || _window37.removeBuilderTemplate(configId);
|
|
25384
25523
|
}
|
|
25385
25524
|
};
|
|
25386
25525
|
if (action_class === "modal") {
|
|
@@ -25392,11 +25531,11 @@
|
|
|
25392
25531
|
}
|
|
25393
25532
|
});
|
|
25394
25533
|
_defineProperty(this, "showPlaceHolder", function () {
|
|
25395
|
-
var
|
|
25396
|
-
if (_this.
|
|
25534
|
+
var _window38;
|
|
25535
|
+
if (_this.gkkE) {
|
|
25397
25536
|
return;
|
|
25398
25537
|
}
|
|
25399
|
-
_this.
|
|
25538
|
+
_this.gkkE = true;
|
|
25400
25539
|
var ele = document.createElement("div");
|
|
25401
25540
|
ele.innerHTML = "place your immersive card here";
|
|
25402
25541
|
ele.style.backgroundColor = "#f5f5f5";
|
|
@@ -25406,7 +25545,7 @@
|
|
|
25406
25545
|
ele.style.padding = "12px";
|
|
25407
25546
|
ele.style.fontSize = "14px";
|
|
25408
25547
|
document.body.appendChild(ele);
|
|
25409
|
-
(
|
|
25548
|
+
(_window38 = window) === null || _window38 === void 0 || (_window38 = _window38.ApxorWidget) === null || _window38 === void 0 || _window38.setDimensions(window.document.querySelector("html").offsetWidth, window.document.querySelector("html").offsetHeight);
|
|
25410
25549
|
});
|
|
25411
25550
|
_defineProperty(this, "pauseStories", function () {
|
|
25412
25551
|
var progress = Array.from(document.querySelectorAll(".progress"));
|
|
@@ -25463,7 +25602,7 @@
|
|
|
25463
25602
|
}
|
|
25464
25603
|
});
|
|
25465
25604
|
_defineProperty(this, "removeBadge", function (name, id) {
|
|
25466
|
-
var cssPostFix = "-".concat(id, "-").concat(name).
|
|
25605
|
+
var cssPostFix = "-".concat(id, "-").concat(name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
|
|
25467
25606
|
var badge = Array.from(document.getElementsByClassName("apxor-badge-container")).find(function (element) {
|
|
25468
25607
|
return element.classList.contains("apxor-badge-container-styles-".concat(cssPostFix));
|
|
25469
25608
|
});
|