apxor-rtm-ui 0.9.2 → 0.9.4
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 +479 -320
- 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, "uBdi", function () {
|
|
12176
12300
|
return new Promise(function (resolve, reject) {
|
|
12177
12301
|
try {
|
|
12178
|
-
var element = _this.
|
|
12302
|
+
var element = _this.wrXb(_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.OVEI();
|
|
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.CkGl("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.CkGl("provided media doesn't exists");
|
|
12200
12324
|
} else {
|
|
12201
|
-
if (_this.
|
|
12325
|
+
if (_this.iiWD() && _this.IsLE() && _this.Ffpr()) {
|
|
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, "CkGl", 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, "OVEI", 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, "wrXb", 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.ogIv(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.ogIv(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.ogIv(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.ogIv(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.ogIv(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.wrXb(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.wrXb(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, "ogIv", 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, "IsLE", 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, "Ffpr", 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, "iiWD", 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.uBdi();
|
|
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, "iVBk", 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, "cXKr", 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.iVBk(), "\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.cXKr();
|
|
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.uBdi();
|
|
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, "iVBk", 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, "waUV", 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, "cXKr", 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.iVBk(), " \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.cXKr();
|
|
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.waUV(_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.uNLx();
|
|
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, "CvsT", 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, "ryUc", 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, "XajC", 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, "SJgE", 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, "BWYs", 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, "mRDN", 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, "uNLx", 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, "pItt", 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.CvsT();
|
|
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.XajC();
|
|
21352
21457
|
//Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
21353
|
-
this.
|
|
21458
|
+
this.SJgE();
|
|
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.BWYs();
|
|
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.mRDN();
|
|
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.ryUc();
|
|
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.ryUc();
|
|
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.xzeq(_this.layout);
|
|
21745
|
+
_this.oPco();
|
|
21641
21746
|
window.onresize = function () {
|
|
21642
|
-
_this.
|
|
21747
|
+
_this.OEJQ();
|
|
21643
21748
|
};
|
|
21644
21749
|
_this.imageElements.forEach(function (img) {
|
|
21645
21750
|
img.addEventListener("error", function () {
|
|
21646
|
-
_this.
|
|
21751
|
+
_this.CkGl("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.jixP(_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.CkGl("provided media doesn't exists");
|
|
21669
21774
|
} else {
|
|
21670
|
-
if (_this.
|
|
21671
|
-
_this.
|
|
21775
|
+
if (_this.iiWD() && _this.IsLE() && _this.Ffpr()) {
|
|
21776
|
+
_this.OEJQ();
|
|
21672
21777
|
clearInterval(_this.intervalToCheckMediaLoadingStatus);
|
|
21673
21778
|
}
|
|
21674
21779
|
}
|
|
@@ -21679,7 +21784,7 @@
|
|
|
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, "
|
|
21787
|
+
_defineProperty(this, "CkGl", function (reason) {
|
|
21683
21788
|
var _window$ApxorRTM, _window4;
|
|
21684
21789
|
!_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
|
|
21685
21790
|
apx_nudge_name: _this.name,
|
|
@@ -21693,13 +21798,13 @@
|
|
|
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, "oPco", 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, "
|
|
21807
|
+
_defineProperty(this, "xzeq", function (config) {
|
|
21703
21808
|
var _window$Apxor;
|
|
21704
21809
|
var element;
|
|
21705
21810
|
switch (config.type) {
|
|
@@ -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.ogIv(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.ogIv(e);
|
|
21790
21895
|
};
|
|
21791
21896
|
break;
|
|
21792
21897
|
case "cancel":
|
|
21793
21898
|
element.onclick = function (e) {
|
|
21794
21899
|
e.stopPropagation();
|
|
21795
|
-
_this.
|
|
21900
|
+
_this.ogIv(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.ogIv(e);
|
|
21803
21908
|
};
|
|
21804
21909
|
break;
|
|
21805
21910
|
case "never":
|
|
21806
21911
|
element.onclick = function (e) {
|
|
21912
|
+
var _window$ApxorRTM2;
|
|
21807
21913
|
e.stopPropagation();
|
|
21808
21914
|
window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
|
|
21809
|
-
window.
|
|
21810
|
-
|
|
21915
|
+
(_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("apx_nudge_terminated", {
|
|
21916
|
+
apx_nudge_name: _this.name,
|
|
21917
|
+
apx_nudge_id: _this.configId,
|
|
21918
|
+
apx_termination_type: "never-show"
|
|
21919
|
+
});
|
|
21920
|
+
_this.ogIv(e);
|
|
21811
21921
|
};
|
|
21812
21922
|
break;
|
|
21813
21923
|
case "toggle-class":
|
|
@@ -21832,13 +21942,14 @@
|
|
|
21832
21942
|
tempInput.select();
|
|
21833
21943
|
document.execCommand("copy");
|
|
21834
21944
|
document.body.removeChild(tempInput);
|
|
21835
|
-
_this.
|
|
21945
|
+
_this.ogIv(e);
|
|
21836
21946
|
};
|
|
21837
21947
|
break;
|
|
21838
21948
|
case "log-app-event":
|
|
21839
21949
|
element.onclick = function (e) {
|
|
21950
|
+
var _window$ApxorRTM3;
|
|
21840
21951
|
e.stopPropagation();
|
|
21841
|
-
window.
|
|
21952
|
+
(_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent(action === null || action === void 0 ? void 0 : action.event_name);
|
|
21842
21953
|
};
|
|
21843
21954
|
break;
|
|
21844
21955
|
case "log-client-event":
|
|
@@ -21851,7 +21962,7 @@
|
|
|
21851
21962
|
}
|
|
21852
21963
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
21853
21964
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
21854
|
-
var childElement = _this.
|
|
21965
|
+
var childElement = _this.wrXb(childConfig);
|
|
21855
21966
|
element.appendChild(childElement);
|
|
21856
21967
|
});
|
|
21857
21968
|
}
|
|
@@ -21859,7 +21970,7 @@
|
|
|
21859
21970
|
// Process children
|
|
21860
21971
|
if (config.children && config.children.length > 0) {
|
|
21861
21972
|
config.children.forEach(function (childConfig) {
|
|
21862
|
-
var childElement = _this.
|
|
21973
|
+
var childElement = _this.xzeq(childConfig);
|
|
21863
21974
|
element.appendChild(childElement);
|
|
21864
21975
|
});
|
|
21865
21976
|
}
|
|
@@ -21885,7 +21996,7 @@
|
|
|
21885
21996
|
}
|
|
21886
21997
|
return element;
|
|
21887
21998
|
});
|
|
21888
|
-
_defineProperty(this, "
|
|
21999
|
+
_defineProperty(this, "ogIv", function (e) {
|
|
21889
22000
|
var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
|
|
21890
22001
|
var additional_info = {
|
|
21891
22002
|
apx_nudge_name: _this.name,
|
|
@@ -21894,15 +22005,15 @@
|
|
|
21894
22005
|
apx_template_name: "embed-card"
|
|
21895
22006
|
};
|
|
21896
22007
|
if (e.target.tagName === "BUTTON") {
|
|
21897
|
-
var _e$target$innerHTML, _e$target2, _window$
|
|
22008
|
+
var _e$target$innerHTML, _e$target2, _window$ApxorRTM4;
|
|
21898
22009
|
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$
|
|
22010
|
+
(_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_card_CTA_clicked", additional_info);
|
|
21900
22011
|
} else {
|
|
21901
|
-
var _window$
|
|
21902
|
-
(_window$
|
|
22012
|
+
var _window$ApxorRTM5;
|
|
22013
|
+
(_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_card_interaction", additional_info);
|
|
21903
22014
|
}
|
|
21904
22015
|
});
|
|
21905
|
-
_defineProperty(this, "
|
|
22016
|
+
_defineProperty(this, "jixP", function (config) {
|
|
21906
22017
|
config.forEach(function (id) {
|
|
21907
22018
|
var element = document.getElementById(id);
|
|
21908
22019
|
if (element) {
|
|
@@ -21910,7 +22021,7 @@
|
|
|
21910
22021
|
}
|
|
21911
22022
|
});
|
|
21912
22023
|
});
|
|
21913
|
-
_defineProperty(this, "
|
|
22024
|
+
_defineProperty(this, "IsLE", function () {
|
|
21914
22025
|
//This logic is to make sure that image has loaded, it doesn't check whether image is broken
|
|
21915
22026
|
//refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
|
|
21916
22027
|
if (_this.imageElements.length === 0) return true;
|
|
@@ -21918,19 +22029,19 @@
|
|
|
21918
22029
|
return img.complete;
|
|
21919
22030
|
});
|
|
21920
22031
|
});
|
|
21921
|
-
_defineProperty(this, "
|
|
22032
|
+
_defineProperty(this, "iiWD", function () {
|
|
21922
22033
|
if (_this.videoElements.length === 0) return true;
|
|
21923
22034
|
return _this.videoElements.every(function (video) {
|
|
21924
22035
|
return video.readyState >= 3;
|
|
21925
22036
|
});
|
|
21926
22037
|
});
|
|
21927
|
-
_defineProperty(this, "
|
|
22038
|
+
_defineProperty(this, "Ffpr", function () {
|
|
21928
22039
|
if (!_this.bgImageUrl) return true;
|
|
21929
22040
|
var img = new Image();
|
|
21930
22041
|
img.src = _this.bgImageUrl;
|
|
21931
22042
|
return img.complete;
|
|
21932
22043
|
});
|
|
21933
|
-
_defineProperty(this, "
|
|
22044
|
+
_defineProperty(this, "OEJQ", function () {
|
|
21934
22045
|
var _window6, _window7;
|
|
21935
22046
|
var width = window.document.querySelector("html").offsetWidth;
|
|
21936
22047
|
var height = window.document.querySelector("html").offsetHeight;
|
|
@@ -21978,7 +22089,8 @@
|
|
|
21978
22089
|
|
|
21979
22090
|
var Stories = /*#__PURE__*/function () {
|
|
21980
22091
|
function Stories(_config, configId, name, position, slidesSeenCount, view_id, showCallback, closeCallback) {
|
|
21981
|
-
var _this = this
|
|
22092
|
+
var _this = this,
|
|
22093
|
+
_config$position;
|
|
21982
22094
|
_classCallCheck(this, Stories);
|
|
21983
22095
|
_defineProperty(this, "showStories", function () {
|
|
21984
22096
|
_this.storyContainer = document.createElement("div");
|
|
@@ -22019,8 +22131,8 @@
|
|
|
22019
22131
|
_this.storyContainer.appendChild(currentElement);
|
|
22020
22132
|
_this.storyContainer.appendChild(slideDetails);
|
|
22021
22133
|
document.body.appendChild(_this.storyContainer);
|
|
22022
|
-
_this.
|
|
22023
|
-
_this.
|
|
22134
|
+
_this.gdCQ();
|
|
22135
|
+
_this.TWfo();
|
|
22024
22136
|
_this.progress = Array.from(document.querySelectorAll(".progress"));
|
|
22025
22137
|
var current_slide = document.querySelector(".slide-details");
|
|
22026
22138
|
var playNext = function playNext(e) {
|
|
@@ -22066,7 +22178,7 @@
|
|
|
22066
22178
|
_existingAbsoluteElements2.forEach(function (element) {
|
|
22067
22179
|
element.remove();
|
|
22068
22180
|
});
|
|
22069
|
-
// this.
|
|
22181
|
+
// this.DdQu();
|
|
22070
22182
|
var _currentSlideDetails = document.querySelector(".slide-details");
|
|
22071
22183
|
_currentSlideDetails.innerHTML = "";
|
|
22072
22184
|
_this.position = _this.position + 1;
|
|
@@ -22162,7 +22274,7 @@
|
|
|
22162
22274
|
absolute_header = document.createElement("div");
|
|
22163
22275
|
current_slide_from_config.layout.absolute_position_children.forEach(function (current_element) {
|
|
22164
22276
|
var current_absolute_element;
|
|
22165
|
-
current_absolute_element = _this.
|
|
22277
|
+
current_absolute_element = _this.wrXb(current_element);
|
|
22166
22278
|
absolute_header.appendChild(current_absolute_element);
|
|
22167
22279
|
});
|
|
22168
22280
|
(_absolute_header = absolute_header) === null || _absolute_header === void 0 || _absolute_header.classList.add("apx-slide-header");
|
|
@@ -22171,12 +22283,12 @@
|
|
|
22171
22283
|
if (current_slide_from_config.media_type === "image") {
|
|
22172
22284
|
var _window$Apxor;
|
|
22173
22285
|
element = document.createElement("div");
|
|
22174
|
-
var
|
|
22286
|
+
var imageSrc;
|
|
22175
22287
|
if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) != "ios") {
|
|
22176
22288
|
var _window$Apxor2;
|
|
22177
|
-
|
|
22178
|
-
if (
|
|
22179
|
-
document.body.style.backgroundImage = "url(".concat(
|
|
22289
|
+
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);
|
|
22290
|
+
if (imageSrc && imageSrc != "") {
|
|
22291
|
+
document.body.style.backgroundImage = "url(".concat(imageSrc, ")");
|
|
22180
22292
|
document.body.style.backgroundSize = "100% auto";
|
|
22181
22293
|
document.body.style.backgroundPosition = "center";
|
|
22182
22294
|
document.body.style.backgroundRepeat = "no-repeat";
|
|
@@ -22222,7 +22334,7 @@
|
|
|
22222
22334
|
document.body.style.backgroundRepeat = "";
|
|
22223
22335
|
var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
|
|
22224
22336
|
delete updated_layout_without_absolute_elements["absolute_position_children"];
|
|
22225
|
-
element = _this.
|
|
22337
|
+
element = _this.wrXb(updated_layout_without_absolute_elements);
|
|
22226
22338
|
document.body.style.backgroundColor = current_slide_from_config.media_background_color;
|
|
22227
22339
|
document.body.style.margin = "0px";
|
|
22228
22340
|
}
|
|
@@ -22230,9 +22342,9 @@
|
|
|
22230
22342
|
current_slide.removeChild(current_slide.children[0]);
|
|
22231
22343
|
}
|
|
22232
22344
|
current_slide.appendChild(element);
|
|
22233
|
-
_this.
|
|
22345
|
+
_this.KsJU();
|
|
22234
22346
|
window.intervalToCheckImgStatus = setInterval(function () {
|
|
22235
|
-
if (_this.
|
|
22347
|
+
if (_this.PWKX()) {
|
|
22236
22348
|
clearInterval(window.intervalToCheckImgStatus);
|
|
22237
22349
|
}
|
|
22238
22350
|
}, 500);
|
|
@@ -22260,7 +22372,7 @@
|
|
|
22260
22372
|
});
|
|
22261
22373
|
playNext();
|
|
22262
22374
|
});
|
|
22263
|
-
_defineProperty(this, "
|
|
22375
|
+
_defineProperty(this, "DdQu", function () {
|
|
22264
22376
|
document.body.classList.add("slide-right");
|
|
22265
22377
|
var animationEndCounter = 0;
|
|
22266
22378
|
var onAnimationEnd = function onAnimationEnd() {
|
|
@@ -22272,7 +22384,7 @@
|
|
|
22272
22384
|
};
|
|
22273
22385
|
document.body.addEventListener("animationend", onAnimationEnd);
|
|
22274
22386
|
});
|
|
22275
|
-
_defineProperty(this, "
|
|
22387
|
+
_defineProperty(this, "wrXb", function (config) {
|
|
22276
22388
|
var _window$Apxor4;
|
|
22277
22389
|
var element;
|
|
22278
22390
|
var explicit_styles = "";
|
|
@@ -22330,7 +22442,7 @@
|
|
|
22330
22442
|
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
22443
|
element.id = "apx-mute-icon";
|
|
22332
22444
|
element.addEventListener("touchstart", function (event) {
|
|
22333
|
-
_this.
|
|
22445
|
+
_this.rEMF(event);
|
|
22334
22446
|
});
|
|
22335
22447
|
break;
|
|
22336
22448
|
case "copy_icon":
|
|
@@ -22387,6 +22499,22 @@
|
|
|
22387
22499
|
var styles;
|
|
22388
22500
|
styles = objectToCSS(imgStyleObject);
|
|
22389
22501
|
element.style = styles;
|
|
22502
|
+
} else if (config.type == "cell") {
|
|
22503
|
+
var _styleObject = parseCSS(config.css);
|
|
22504
|
+
var _styles;
|
|
22505
|
+
if (!_this.status_bar_height) {
|
|
22506
|
+
_styles = objectToCSS(_styleObject);
|
|
22507
|
+
element.style = _styles;
|
|
22508
|
+
} else {
|
|
22509
|
+
var elementTop = 0;
|
|
22510
|
+
if ("top" in _styleObject) {
|
|
22511
|
+
elementTop = parseInt(_styleObject.top.split("px")[0]) + _this.status_bar_height;
|
|
22512
|
+
}
|
|
22513
|
+
var stylesObject = removeKeys(_styleObject, ["top"]);
|
|
22514
|
+
var _styles2 = objectToCSS(stylesObject);
|
|
22515
|
+
element.style = _styles2;
|
|
22516
|
+
element.style.top = "".concat(elementTop, "px");
|
|
22517
|
+
}
|
|
22390
22518
|
} else {
|
|
22391
22519
|
var _config$properties3;
|
|
22392
22520
|
element.style = config.css;
|
|
@@ -22529,7 +22657,7 @@
|
|
|
22529
22657
|
}
|
|
22530
22658
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
22531
22659
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
22532
|
-
var childElement = _this.
|
|
22660
|
+
var childElement = _this.wrXb(childConfig);
|
|
22533
22661
|
element.appendChild(childElement);
|
|
22534
22662
|
});
|
|
22535
22663
|
}
|
|
@@ -22537,7 +22665,7 @@
|
|
|
22537
22665
|
// Process children
|
|
22538
22666
|
if (config.children && config.children.length > 0) {
|
|
22539
22667
|
config.children.forEach(function (childConfig) {
|
|
22540
|
-
var childElement = _this.
|
|
22668
|
+
var childElement = _this.wrXb(childConfig);
|
|
22541
22669
|
element.appendChild(childElement);
|
|
22542
22670
|
});
|
|
22543
22671
|
}
|
|
@@ -22547,12 +22675,12 @@
|
|
|
22547
22675
|
element["src"] = src ? ((_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || (_window5$getFilePathF = _window5.getFilePathForStories) === null || _window5$getFilePathF === void 0 ? void 0 : _window5$getFilePathF.call(_window5, _this.config[_this.position].id, src)) || src : src;
|
|
22548
22676
|
_this.imageElements.push(element);
|
|
22549
22677
|
var imgWrapper = document.createElement("div");
|
|
22550
|
-
var
|
|
22678
|
+
var _styleObject2 = parseCSS(config.css);
|
|
22551
22679
|
Object.keys(imgWrapperStylesForStories).forEach(function (prop) {
|
|
22552
|
-
if (prop in
|
|
22553
|
-
imgWrapper.style[imgWrapperStylesForStories[prop]] =
|
|
22680
|
+
if (prop in _styleObject2) {
|
|
22681
|
+
imgWrapper.style[imgWrapperStylesForStories[prop]] = _styleObject2[prop];
|
|
22554
22682
|
if (prop === "width") {
|
|
22555
|
-
element.style.width =
|
|
22683
|
+
element.style.width = _styleObject2[prop];
|
|
22556
22684
|
}
|
|
22557
22685
|
}
|
|
22558
22686
|
});
|
|
@@ -22565,7 +22693,7 @@
|
|
|
22565
22693
|
element.appendChild(ElementStyles);
|
|
22566
22694
|
return element;
|
|
22567
22695
|
});
|
|
22568
|
-
_defineProperty(this, "
|
|
22696
|
+
_defineProperty(this, "rEMF", function (event) {
|
|
22569
22697
|
var slide_details_to_be_deleted;
|
|
22570
22698
|
var mute_child_elements;
|
|
22571
22699
|
var unmute_child_elements;
|
|
@@ -22595,11 +22723,11 @@
|
|
|
22595
22723
|
}
|
|
22596
22724
|
// this.muteElement.addEventListener("touchstart", (event) => {
|
|
22597
22725
|
// event.stopPropagation();
|
|
22598
|
-
// this.
|
|
22726
|
+
// this.rEMF(event);
|
|
22599
22727
|
// });
|
|
22600
22728
|
}
|
|
22601
22729
|
});
|
|
22602
|
-
_defineProperty(this, "
|
|
22730
|
+
_defineProperty(this, "TWfo", function () {
|
|
22603
22731
|
var tapTimeout;
|
|
22604
22732
|
var tapThreshold = 0.5; // Assuming 0.5 is the center of the WebView
|
|
22605
22733
|
var longPressDuration = 200;
|
|
@@ -22723,7 +22851,7 @@
|
|
|
22723
22851
|
event.target.dataset.touchStartTime = event.timeStamp;
|
|
22724
22852
|
});
|
|
22725
22853
|
});
|
|
22726
|
-
_defineProperty(this, "
|
|
22854
|
+
_defineProperty(this, "gdCQ", function () {
|
|
22727
22855
|
var startY, startX;
|
|
22728
22856
|
_this.storyContainer.addEventListener("touchstart", function (event) {
|
|
22729
22857
|
_this.swipeTouch = true;
|
|
@@ -22930,7 +23058,7 @@
|
|
|
22930
23058
|
}, 50);
|
|
22931
23059
|
});
|
|
22932
23060
|
});
|
|
22933
|
-
_defineProperty(this, "
|
|
23061
|
+
_defineProperty(this, "KsJU", function () {
|
|
22934
23062
|
_this.loader.style.display = "block";
|
|
22935
23063
|
var progress = Array.from(document.querySelectorAll(".progress"));
|
|
22936
23064
|
var activeIndex = progress.findIndex(function (el) {
|
|
@@ -22946,7 +23074,7 @@
|
|
|
22946
23074
|
}
|
|
22947
23075
|
}
|
|
22948
23076
|
});
|
|
22949
|
-
_defineProperty(this, "
|
|
23077
|
+
_defineProperty(this, "HeZe", function () {
|
|
22950
23078
|
if (!_this.continueLoading) {
|
|
22951
23079
|
var slide_details_to_be_deleted = document.querySelector(".slide-details");
|
|
22952
23080
|
var childElements = slide_details_to_be_deleted.querySelectorAll("video");
|
|
@@ -22966,19 +23094,19 @@
|
|
|
22966
23094
|
_this.loader.style.display = "none";
|
|
22967
23095
|
}
|
|
22968
23096
|
});
|
|
22969
|
-
_defineProperty(this, "
|
|
23097
|
+
_defineProperty(this, "IsLE", function () {
|
|
22970
23098
|
if (_this.imageElements.length === 0) return true;
|
|
22971
23099
|
return _this.imageElements.every(function (img) {
|
|
22972
23100
|
return img.complete;
|
|
22973
23101
|
});
|
|
22974
23102
|
});
|
|
22975
|
-
_defineProperty(this, "
|
|
23103
|
+
_defineProperty(this, "iiWD", function () {
|
|
22976
23104
|
if (_this.videoElements.length === 0) return true;
|
|
22977
23105
|
return _this.videoElements.every(function (video) {
|
|
22978
23106
|
return video.readyState >= 3;
|
|
22979
23107
|
});
|
|
22980
23108
|
});
|
|
22981
|
-
_defineProperty(this, "
|
|
23109
|
+
_defineProperty(this, "PWKX", function () {
|
|
22982
23110
|
var bodyStyles = window.getComputedStyle(document.body);
|
|
22983
23111
|
var backgroundImage = bodyStyles.backgroundImage;
|
|
22984
23112
|
if (backgroundImage && backgroundImage !== "none" && _this.current_slide_config.media_type === "image") {
|
|
@@ -22988,7 +23116,7 @@
|
|
|
22988
23116
|
var img = new Image();
|
|
22989
23117
|
img.src = imageUrl;
|
|
22990
23118
|
if (img.complete) {
|
|
22991
|
-
_this.
|
|
23119
|
+
_this.HeZe();
|
|
22992
23120
|
return true;
|
|
22993
23121
|
}
|
|
22994
23122
|
return false;
|
|
@@ -22996,21 +23124,21 @@
|
|
|
22996
23124
|
var slide_details_to_be_deleted = document.querySelector(".slide-details");
|
|
22997
23125
|
var childElements = slide_details_to_be_deleted.querySelectorAll("video");
|
|
22998
23126
|
if (childElements[0].readyState >= 3) {
|
|
22999
|
-
_this.
|
|
23127
|
+
_this.HeZe();
|
|
23000
23128
|
return true;
|
|
23001
23129
|
}
|
|
23002
23130
|
return false;
|
|
23003
23131
|
} else {
|
|
23004
23132
|
if (_this.videoElements.length == 0 && _this.imageElements.length == 0) {
|
|
23005
|
-
_this.
|
|
23133
|
+
_this.HeZe();
|
|
23006
23134
|
return true;
|
|
23007
|
-
} else if (_this.
|
|
23008
|
-
_this.
|
|
23135
|
+
} else if (_this.IsLE() && _this.iiWD()) {
|
|
23136
|
+
_this.HeZe();
|
|
23009
23137
|
return true;
|
|
23010
23138
|
}
|
|
23011
23139
|
}
|
|
23012
23140
|
});
|
|
23013
|
-
_defineProperty(this, "
|
|
23141
|
+
_defineProperty(this, "bamD", function (event, startY, action) {
|
|
23014
23142
|
event.stopPropagation();
|
|
23015
23143
|
var endY = event.changedTouches[0].clientY;
|
|
23016
23144
|
var deltaY = startY - endY;
|
|
@@ -23063,6 +23191,7 @@
|
|
|
23063
23191
|
this.view_id = view_id;
|
|
23064
23192
|
this.showCallback = showCallback;
|
|
23065
23193
|
this.closeCallback = closeCallback;
|
|
23194
|
+
this.status_bar_height = (_config$position = _config[position]) === null || _config$position === void 0 ? void 0 : _config$position.status_bar_height;
|
|
23066
23195
|
this.progress_bar = new ProgressBar$1(_config[position].progress_bar);
|
|
23067
23196
|
this.slides = _config[position].slides;
|
|
23068
23197
|
if (this.slides.length === this.slidesSeenCount) {
|
|
@@ -23105,18 +23234,19 @@
|
|
|
23105
23234
|
this.swipe_action;
|
|
23106
23235
|
this.continueLoading = false;
|
|
23107
23236
|
this.boundSwipeUpHandling = function (event) {
|
|
23108
|
-
return _this.
|
|
23237
|
+
return _this.bamD(event, _this.startY, _this.swipe_action);
|
|
23109
23238
|
};
|
|
23110
23239
|
}
|
|
23111
23240
|
_createClass(Stories, [{
|
|
23112
23241
|
key: "_getStoriesStyles",
|
|
23113
23242
|
value: function _getStoriesStyles() {
|
|
23243
|
+
var _this$status_bar_heig;
|
|
23114
23244
|
var head = document.head || document.getElementsByTagName("head")[0];
|
|
23115
23245
|
var styleNodes = head.querySelectorAll(".apx-progressbar-styles");
|
|
23116
23246
|
styleNodes.forEach(function (node) {
|
|
23117
23247
|
node.parentNode.removeChild(node);
|
|
23118
23248
|
});
|
|
23119
|
-
this.storiesStyles = "\n .progress-container {\n position:absolute;\n top:
|
|
23249
|
+
this.storiesStyles = "\n .progress-container {\n position:absolute;\n top:".concat((_this$status_bar_heig = this.status_bar_height) !== null && _this$status_bar_heig !== void 0 ? _this$status_bar_heig : 12, "px;\n display: flex !important;\n flex-direction: row !important;\n width:100%;\n }\n\n *,:before,:after {\n box-sizing: border-box;\n -webkit-user-select: none;\n -webkit-touch-callout: none;\n border-width: 0;\n border-style: solid;\n border-color: #e5e7eb\n }\n\n .progress {\n height: 4px; \n flex-grow: 1;\n border-radius: 4px;\n margin: 0 4px;\n display: flex;\n background-image: linear-gradient(\n to right,\n ").concat(this.progress_bar.seen_color, " 0%,\n ").concat(this.progress_bar.seen_color, " 50%,\n ").concat(this.progress_bar.unseen_color, " 50%,\n ").concat(this.progress_bar.unseen_color, " 100%\n );\n background-repeat: no-repeat;\n background-size: 200%;\n background-position: 100% 50%;\n animation-timing-function: linear;\n animation-delay: 0.2s;\n }\n\n .progress.active {\n animation-name: Loader;\n }\n\n .progress.passed { \n background-position: 0 0;\n }\n\n .slide-right {\n animation: 0.5s slide-right forwards;\n background: linear-gradient(to right, rgba(225, 219, 30, 0.99), rgb(36, 202, 238)); \n background-size: 200% 100%;\n }\n \n @keyframes slide-right {\n from {\n background-position: 0% 0;\n }\n to {\n background-position: 100% 0;\n }\n }\n\n @-webkit-keyframes Loader {\n 0% {\n background-position: 100% 0;\n }\n 100% {\n background-position: 0 0;\n }\n }\n\n @keyframes moveUpDownButton {\n 0%,\n 100% {\n bottom: 12px;\n }\n 50% {\n bottom: 32px;\n }\n } \n\n body {\n background: #121216;\n }\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
23120
23250
|
var styleNode = document.createElement("style");
|
|
23121
23251
|
styleNode.setAttribute("apx-stories-styles", "");
|
|
23122
23252
|
styleNode.classList.add("apx-progressbar-styles");
|
|
@@ -23168,7 +23298,7 @@
|
|
|
23168
23298
|
} else {
|
|
23169
23299
|
var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM16, _window$ApxorRTM17, _window$ApxorRTM18;
|
|
23170
23300
|
// Move to the first slide of the next group
|
|
23171
|
-
// this.
|
|
23301
|
+
// this.DdQu();
|
|
23172
23302
|
this.position++;
|
|
23173
23303
|
this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
|
|
23174
23304
|
this.slides = this.config[this.position].slides;
|
|
@@ -23294,7 +23424,7 @@
|
|
|
23294
23424
|
if (activeIndex === 0) {
|
|
23295
23425
|
var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM22, _window$ApxorRTM23, _window$ApxorRTM24;
|
|
23296
23426
|
// If at the first slide of the current group, move to the last slide of the previous group
|
|
23297
|
-
// this.
|
|
23427
|
+
// this.DdQu();
|
|
23298
23428
|
this.position--;
|
|
23299
23429
|
this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
|
|
23300
23430
|
this.slides = this.config[this.position].slides;
|
|
@@ -23424,12 +23554,12 @@
|
|
|
23424
23554
|
if ((current_slide_from_config === null || current_slide_from_config === void 0 ? void 0 : current_slide_from_config.media_type) === "image") {
|
|
23425
23555
|
var _window$Apxor5;
|
|
23426
23556
|
element = document.createElement("div");
|
|
23427
|
-
var
|
|
23557
|
+
var imageSrc;
|
|
23428
23558
|
if (((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) != "ios") {
|
|
23429
23559
|
var _window$Apxor6;
|
|
23430
|
-
|
|
23431
|
-
if (
|
|
23432
|
-
document.body.style.backgroundImage = "url(".concat(
|
|
23560
|
+
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);
|
|
23561
|
+
if (imageSrc && imageSrc != "") {
|
|
23562
|
+
document.body.style.backgroundImage = "url(".concat(imageSrc, ")");
|
|
23433
23563
|
document.body.style.backgroundSize = "100% auto";
|
|
23434
23564
|
document.body.style.backgroundPosition = "center";
|
|
23435
23565
|
document.body.style.backgroundRepeat = "no-repeat";
|
|
@@ -23481,25 +23611,25 @@
|
|
|
23481
23611
|
// Create custom content
|
|
23482
23612
|
var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
|
|
23483
23613
|
delete updated_layout_without_absolute_elements["absolute_position_children"];
|
|
23484
|
-
element = this.
|
|
23614
|
+
element = this.wrXb(updated_layout_without_absolute_elements);
|
|
23485
23615
|
}
|
|
23486
23616
|
// Append slide content to slide details container
|
|
23487
23617
|
|
|
23488
23618
|
document.body.style.backgroundColor = current_slide_from_config.media_background_color;
|
|
23489
23619
|
document.body.style.margin = "0px";
|
|
23490
23620
|
currentSlideDetails.appendChild(element);
|
|
23491
|
-
this.
|
|
23621
|
+
this.KsJU();
|
|
23492
23622
|
|
|
23493
23623
|
// Handle absolute position children
|
|
23494
23624
|
if (current_slide_from_config.layout.absolute_position_children && current_slide_from_config.layout.absolute_position_children.length > 0) {
|
|
23495
23625
|
current_slide_from_config.layout.absolute_position_children.forEach(function (childConfig) {
|
|
23496
|
-
var childElement = _this2.
|
|
23626
|
+
var childElement = _this2.wrXb(childConfig);
|
|
23497
23627
|
// Append absolute position children to slide details container
|
|
23498
23628
|
currentSlideDetails.appendChild(childElement);
|
|
23499
23629
|
});
|
|
23500
23630
|
}
|
|
23501
23631
|
window.intervalToCheckImgStatus2 = setInterval(function () {
|
|
23502
|
-
if (_this2.
|
|
23632
|
+
if (_this2.PWKX()) {
|
|
23503
23633
|
clearInterval(window.intervalToCheckImgStatus2);
|
|
23504
23634
|
}
|
|
23505
23635
|
}, 500);
|
|
@@ -23934,15 +24064,15 @@
|
|
|
23934
24064
|
_this$badge$animation2,
|
|
23935
24065
|
_this$badge$animation3;
|
|
23936
24066
|
_classCallCheck(this, ApxorBadge);
|
|
23937
|
-
_defineProperty(this, "
|
|
24067
|
+
_defineProperty(this, "auVR", function () {
|
|
23938
24068
|
var delayMillis = _this.delayMillis * 1000;
|
|
23939
24069
|
_this.shakeAnimationRepeat(_this.interCount, delayMillis);
|
|
23940
24070
|
});
|
|
23941
|
-
_defineProperty(this, "
|
|
24071
|
+
_defineProperty(this, "UQku", function () {
|
|
23942
24072
|
var delayMillis = _this.delayMillis * 1000;
|
|
23943
24073
|
_this.fadeAnimationRepeat(_this.interCount, delayMillis);
|
|
23944
24074
|
});
|
|
23945
|
-
_defineProperty(this, "
|
|
24075
|
+
_defineProperty(this, "zIql", function () {
|
|
23946
24076
|
var _this$targetElement;
|
|
23947
24077
|
var delayMillis = _this.delayMillis * 1000;
|
|
23948
24078
|
var finalStyles = ".apxor-badge-container-stylesdummy-".concat(_this.cssPostFix, " {\n opacity:0;\n }").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
@@ -23951,7 +24081,7 @@
|
|
|
23951
24081
|
(_this$targetElement = _this.targetElement) === null || _this$targetElement === void 0 || _this$targetElement.appendChild(newstyleNode1);
|
|
23952
24082
|
_this.rippleAnimationRepeat(_this.interCount, delayMillis);
|
|
23953
24083
|
});
|
|
23954
|
-
_defineProperty(this, "
|
|
24084
|
+
_defineProperty(this, "Jums", function () {
|
|
23955
24085
|
var delayMillis = _this.delayMillis * 1000;
|
|
23956
24086
|
//let badgeContainerClass = `.apxor-badge-container-styles-${this.cssPostFix}`;
|
|
23957
24087
|
//let badgeAnimationElement = document.querySelector(badgeContainerClass);
|
|
@@ -23968,7 +24098,7 @@
|
|
|
23968
24098
|
// newstyleNode1.innerHTML = finalStyles;
|
|
23969
24099
|
// this.targetElement?.appendChild(newstyleNode1);
|
|
23970
24100
|
});
|
|
23971
|
-
_defineProperty(this, "
|
|
24101
|
+
_defineProperty(this, "DfZq", function () {
|
|
23972
24102
|
var elements = document.querySelectorAll(".apx-main-styles-".concat(_this.configId));
|
|
23973
24103
|
elements === null || elements === void 0 || elements.forEach(function (ele) {
|
|
23974
24104
|
ele === null || ele === void 0 || ele.remove();
|
|
@@ -23977,9 +24107,9 @@
|
|
|
23977
24107
|
dummy_elements === null || dummy_elements === void 0 || dummy_elements.forEach(function (ele) {
|
|
23978
24108
|
ele === null || ele === void 0 || ele.remove();
|
|
23979
24109
|
});
|
|
23980
|
-
_this.
|
|
24110
|
+
_this.xIUH();
|
|
23981
24111
|
});
|
|
23982
|
-
_defineProperty(this, "
|
|
24112
|
+
_defineProperty(this, "xIUH", function () {
|
|
23983
24113
|
var targetWrapperElement = document.querySelector(".image-container-".concat(_this.configId));
|
|
23984
24114
|
// Ensure the target element is the wrapper with class 'image-container'
|
|
23985
24115
|
if (targetWrapperElement) {
|
|
@@ -24003,12 +24133,12 @@
|
|
|
24003
24133
|
* @param {boolean} optimized
|
|
24004
24134
|
* @returns viewId
|
|
24005
24135
|
*/
|
|
24006
|
-
_defineProperty(this, "
|
|
24136
|
+
_defineProperty(this, "nRJS", function (node, optimized) {
|
|
24007
24137
|
if (node.nodeType !== Node.ELEMENT_NODE) return "";
|
|
24008
24138
|
var steps = [];
|
|
24009
24139
|
var contextNode = node;
|
|
24010
24140
|
while (contextNode) {
|
|
24011
|
-
var step = _this.
|
|
24141
|
+
var step = _this.Mpsc(contextNode, !!optimized, contextNode === node);
|
|
24012
24142
|
if (!step) break; // Error - bail out early.
|
|
24013
24143
|
steps.push(step);
|
|
24014
24144
|
if (step.optimized) break;
|
|
@@ -24023,7 +24153,7 @@
|
|
|
24023
24153
|
* @param {boolean} optimized
|
|
24024
24154
|
* @param {object} isTargetNode
|
|
24025
24155
|
*/
|
|
24026
|
-
_defineProperty(this, "
|
|
24156
|
+
_defineProperty(this, "Mpsc", function (node, optimized, isTargetNode) {
|
|
24027
24157
|
if (node.nodeType !== Node.ELEMENT_NODE) return null;
|
|
24028
24158
|
var id = node.getAttribute("id");
|
|
24029
24159
|
if (optimized) {
|
|
@@ -24118,7 +24248,8 @@
|
|
|
24118
24248
|
this.name = messageConfig.configName;
|
|
24119
24249
|
this.terminationConfig = terminationConfig;
|
|
24120
24250
|
this.showCallback = showCallback;
|
|
24121
|
-
|
|
24251
|
+
// Replace spaces with empty then all special characters except "-"
|
|
24252
|
+
this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
|
|
24122
24253
|
this.target = new Target$1(config.target);
|
|
24123
24254
|
this.view_additional_info = (config === null || config === void 0 ? void 0 : config.view_additional_info) || {};
|
|
24124
24255
|
this.find_config = (config === null || config === void 0 ? void 0 : config.find_config) || {};
|
|
@@ -24144,7 +24275,7 @@
|
|
|
24144
24275
|
this.contentZindexValue = 1;
|
|
24145
24276
|
}
|
|
24146
24277
|
_createClass(ApxorBadge, [{
|
|
24147
|
-
key: "
|
|
24278
|
+
key: "TQJb",
|
|
24148
24279
|
value: function createBadge() {
|
|
24149
24280
|
var _this2 = this;
|
|
24150
24281
|
var targetFoundCallback = function targetFoundCallback() {
|
|
@@ -24413,7 +24544,7 @@
|
|
|
24413
24544
|
if (content.icon.enable_border) {
|
|
24414
24545
|
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
24546
|
}
|
|
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 }");
|
|
24547
|
+
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
24548
|
}
|
|
24418
24549
|
if (content.enable_label) {
|
|
24419
24550
|
var marginForLabel = "";
|
|
@@ -24788,7 +24919,7 @@
|
|
|
24788
24919
|
_transformForMultipleDirection = "\n right:-".concat(animationStartLeft, "px;;\n transform: skewx(30deg)\n ");
|
|
24789
24920
|
break;
|
|
24790
24921
|
}
|
|
24791
|
-
_animationForBadgeContainernew4 = "\n .apxor-badge-content-container-".concat(_this8.cssPostFix, "::before{\n content:'';\n position:absolute;\n background:transparent;\n
|
|
24922
|
+
_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
24923
|
_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
24924
|
var _animationStyles4 = "\n ".concat(_animationForBadgeContainernew4, "\n ").concat(_keyframeForAnimationnew4, "\n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
24794
24925
|
var _newstyleNode3 = document.createElement("style");
|
|
@@ -24889,31 +25020,61 @@
|
|
|
24889
25020
|
}, {
|
|
24890
25021
|
key: "_setOnClickTerminationForBadges",
|
|
24891
25022
|
value: function _setOnClickTerminationForBadges() {
|
|
24892
|
-
var
|
|
24893
|
-
|
|
24894
|
-
_this10
|
|
24895
|
-
|
|
24896
|
-
|
|
25023
|
+
var _this10 = this;
|
|
25024
|
+
var onclickCallBack = function onclickCallBack() {
|
|
25025
|
+
var _this10$terminationCo, _this10$terminationCo2;
|
|
25026
|
+
// Log the events based on the campaign version
|
|
25027
|
+
if (_this10.uiConfig.additional_info && _this10.uiConfig.additional_info.version && _this10.uiConfig.additional_info.version === 4) {
|
|
25028
|
+
var _window3, _this10$uiConfig$addi, _this10$uiConfig, _this10$uiConfig$addi2, _this10$uiConfig2;
|
|
25029
|
+
(_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorRTM) === null || _window3 === void 0 || _window3.logEvent("apx_nudge_target_clicked", {
|
|
25030
|
+
apx_nudge_id: _this10.configId,
|
|
25031
|
+
apx_nudge_name: _this10.name,
|
|
25032
|
+
apx_template_name: "badge",
|
|
25033
|
+
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,
|
|
25034
|
+
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 : ""
|
|
25035
|
+
});
|
|
25036
|
+
} else {
|
|
25037
|
+
var _window$ApxorRTM;
|
|
25038
|
+
(_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 || _window$ApxorRTM.logEvent("InlineTargetViewClicked", {
|
|
25039
|
+
id: _this10.configId,
|
|
25040
|
+
message_name: _this10.name,
|
|
25041
|
+
apx_message_step: 1
|
|
25042
|
+
});
|
|
25043
|
+
}
|
|
25044
|
+
|
|
25045
|
+
// Remove the Badge when touch termination is enabled with logging the event
|
|
25046
|
+
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
25047
|
var _window$Apxor, _this10$targetElement;
|
|
24898
25048
|
var badge = document.getElementsByClassName("apxor-badge-container-styles-".concat(_this10.cssPostFix));
|
|
24899
25049
|
while (badge.length > 0) badge[0].remove();
|
|
25050
|
+
// Update badge status (nudge_shown event is handled by this operation)
|
|
24900
25051
|
(_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 || _window$Apxor.updateBadgeStatus("target_click", _this10.configId);
|
|
24901
25052
|
_this10.targetClicked = true;
|
|
24902
25053
|
(_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
|
-
|
|
25054
|
+
|
|
25055
|
+
// Log the events based on the campaign version
|
|
25056
|
+
if (_this10.uiConfig.additional_info && _this10.uiConfig.additional_info.version && _this10.uiConfig.additional_info.version === 4) {
|
|
25057
|
+
var _window4, _this10$uiConfig$addi3, _this10$uiConfig3, _this10$uiConfig$addi4, _this10$uiConfig4;
|
|
25058
|
+
(_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorRTM) === null || _window4 === void 0 || _window4.logEvent("apx_nudge_terminated", {
|
|
25059
|
+
apx_nudge_id: _this10.configId,
|
|
25060
|
+
apx_nudge_name: _this10.name,
|
|
25061
|
+
apx_template_name: "badge",
|
|
25062
|
+
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,
|
|
25063
|
+
apx_termination_type: "Target Element Clicked",
|
|
25064
|
+
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 : ""
|
|
25065
|
+
});
|
|
25066
|
+
} else {
|
|
25067
|
+
var _window$ApxorRTM2;
|
|
25068
|
+
(_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("inline_dismissed", {
|
|
25069
|
+
id: _this10.configId,
|
|
25070
|
+
message_name: _this10.name,
|
|
25071
|
+
apx_reason: "InlineTargetViewClicked"
|
|
25072
|
+
});
|
|
25073
|
+
}
|
|
25074
|
+
}
|
|
25075
|
+
_this10.targetElement.removeEventListener("click", onclickCallBack);
|
|
25076
|
+
};
|
|
25077
|
+
this.targetElement.addEventListener("click", onclickCallBack);
|
|
24917
25078
|
}
|
|
24918
25079
|
}]);
|
|
24919
25080
|
return ApxorBadge;
|
|
@@ -24931,16 +25092,16 @@
|
|
|
24931
25092
|
var RTM = /*#__PURE__*/_createClass(function RTM() {
|
|
24932
25093
|
var _this = this;
|
|
24933
25094
|
_classCallCheck(this, RTM);
|
|
24934
|
-
_defineProperty(this, "
|
|
25095
|
+
_defineProperty(this, "wsef", {});
|
|
24935
25096
|
_defineProperty(this, "isShowingAction", false);
|
|
24936
25097
|
_defineProperty(this, "currentAction", null);
|
|
24937
|
-
_defineProperty(this, "
|
|
24938
|
-
_defineProperty(this, "version",
|
|
25098
|
+
_defineProperty(this, "snrW", null);
|
|
25099
|
+
_defineProperty(this, "version", 94);
|
|
24939
25100
|
_defineProperty(this, "isInitialised", false);
|
|
24940
|
-
_defineProperty(this, "
|
|
24941
|
-
_defineProperty(this, "
|
|
25101
|
+
_defineProperty(this, "PlOH", {});
|
|
25102
|
+
_defineProperty(this, "LEVi", false);
|
|
24942
25103
|
_defineProperty(this, "_isShownECCalled", false);
|
|
24943
|
-
_defineProperty(this, "
|
|
25104
|
+
_defineProperty(this, "ltqt", function () {
|
|
24944
25105
|
_this.isInitialised = true;
|
|
24945
25106
|
var oldPushState = history.pushState;
|
|
24946
25107
|
history.pushState = function pushState() {
|
|
@@ -24967,7 +25128,7 @@
|
|
|
24967
25128
|
var _window;
|
|
24968
25129
|
(_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("logger show");
|
|
24969
25130
|
if (!_this.isInitialised) {
|
|
24970
|
-
_this.
|
|
25131
|
+
_this.ltqt();
|
|
24971
25132
|
}
|
|
24972
25133
|
window.addEventListener("pagehide", function () {
|
|
24973
25134
|
var _window$Apxor, _window$Apxor$pageUnl;
|
|
@@ -24992,7 +25153,7 @@
|
|
|
24992
25153
|
} else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
|
|
24993
25154
|
_this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
|
|
24994
25155
|
} else if (ui_config.display_type === "coach_mark_v2") {
|
|
24995
|
-
_this.
|
|
25156
|
+
_this.ouIf(ui_config, duration, uuid, name);
|
|
24996
25157
|
} else {
|
|
24997
25158
|
showCoachmarkWithDelay(_this, ui_config, {
|
|
24998
25159
|
configId: uuid,
|
|
@@ -25032,7 +25193,7 @@
|
|
|
25032
25193
|
});
|
|
25033
25194
|
_defineProperty(this, "showBadge", function (uiJson, duration, uuid, name, terminationConfig) {
|
|
25034
25195
|
if (!_this.isInitialised) {
|
|
25035
|
-
_this.
|
|
25196
|
+
_this.ltqt();
|
|
25036
25197
|
}
|
|
25037
25198
|
window.addEventListener("pagehide", function () {
|
|
25038
25199
|
var _window$Apxor2, _window$Apxor2$pageUn;
|
|
@@ -25044,7 +25205,7 @@
|
|
|
25044
25205
|
_this.removeBadge(name, uuid);
|
|
25045
25206
|
}
|
|
25046
25207
|
var termination_config = JSON.parse(terminationConfig);
|
|
25047
|
-
_this.
|
|
25208
|
+
_this.TQJb(ui_config, duration, uuid, name, termination_config);
|
|
25048
25209
|
});
|
|
25049
25210
|
_defineProperty(this, "showInApp", function (config, duration, configId, name) {
|
|
25050
25211
|
try {
|
|
@@ -25110,7 +25271,7 @@
|
|
|
25110
25271
|
try {
|
|
25111
25272
|
config = config.split("\n").join("\\n");
|
|
25112
25273
|
var ui_config = JSON.parse(config);
|
|
25113
|
-
_this.
|
|
25274
|
+
_this.GvJD(ui_config, configId, name, position, slidesSeenCount, view_id);
|
|
25114
25275
|
} catch (e) {
|
|
25115
25276
|
var _window$Apxor4;
|
|
25116
25277
|
if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
|
|
@@ -25124,10 +25285,10 @@
|
|
|
25124
25285
|
console.error(e);
|
|
25125
25286
|
}
|
|
25126
25287
|
});
|
|
25127
|
-
_defineProperty(this, "
|
|
25288
|
+
_defineProperty(this, "GvJD", function (config, configId, name, position, slidesSeenCount, view_id) {
|
|
25128
25289
|
var cardsContainer = new Stories(config, configId, name, position, slidesSeenCount, view_id, function () {
|
|
25129
|
-
var _config$additional_in3, _config$additional_in4;
|
|
25130
|
-
window.
|
|
25290
|
+
var _window$ApxorRTM3, _config$additional_in3, _config$additional_in4;
|
|
25291
|
+
(_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_shown", {
|
|
25131
25292
|
apx_nudge_name: name,
|
|
25132
25293
|
apx_nudge_id: configId,
|
|
25133
25294
|
apx_template_name: "stories",
|
|
@@ -25144,10 +25305,8 @@
|
|
|
25144
25305
|
if (_this.currentAction !== null && _this.currentAction !== undefined) {
|
|
25145
25306
|
_this.isShowingAction = false;
|
|
25146
25307
|
try {
|
|
25147
|
-
var _window19;
|
|
25148
25308
|
_this.currentAction();
|
|
25149
25309
|
_this.currentAction = null;
|
|
25150
|
-
(_window19 = window) === null || _window19 === void 0 || (_window19 = _window19.ApxorLogger) === null || _window19 === void 0 || _window19.debug("Callback is called");
|
|
25151
25310
|
} catch (e) {}
|
|
25152
25311
|
}
|
|
25153
25312
|
});
|
|
@@ -25159,48 +25318,48 @@
|
|
|
25159
25318
|
var onShow = function onShow() {
|
|
25160
25319
|
_this.isShowingAction = true;
|
|
25161
25320
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
25162
|
-
var
|
|
25163
|
-
(
|
|
25321
|
+
var _window19, _window19$updateFlag, _window20, _window20$updateCount;
|
|
25322
|
+
(_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
25323
|
window.Apxor.logActionEvent("inline_shown", uuid, name);
|
|
25165
|
-
(
|
|
25324
|
+
(_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
25325
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
25167
25326
|
setTimeout(function () {
|
|
25168
|
-
var
|
|
25169
|
-
(
|
|
25327
|
+
var _window21, _window21$logInternal;
|
|
25328
|
+
(_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
25329
|
}, 500);
|
|
25171
25330
|
}
|
|
25172
25331
|
}
|
|
25173
25332
|
};
|
|
25174
25333
|
var onHide = function onHide(isCancelled) {
|
|
25175
|
-
var
|
|
25334
|
+
var _window22, _window22$updateFlag, _window23;
|
|
25176
25335
|
_this.isShowingAction = false;
|
|
25177
25336
|
_this.currentAction = null;
|
|
25178
|
-
_this.
|
|
25179
|
-
(
|
|
25337
|
+
_this.snrW = null;
|
|
25338
|
+
(_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
25339
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
25181
25340
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
25182
25341
|
}
|
|
25183
|
-
if (((
|
|
25184
|
-
var
|
|
25185
|
-
(
|
|
25342
|
+
if (((_window23 = window) === null || _window23 === void 0 || (_window23 = _window23.ApxorWebView) === null || _window23 === void 0 ? void 0 : _window23.getLayoutType()) === "web-inline") {
|
|
25343
|
+
var _window24;
|
|
25344
|
+
(_window24 = window) === null || _window24 === void 0 || (_window24 = _window24.ApxorWebView) === null || _window24 === void 0 || _window24.removeWebView();
|
|
25186
25345
|
}
|
|
25187
25346
|
};
|
|
25188
25347
|
if (action_class === "new-inline") {
|
|
25189
|
-
_this.
|
|
25348
|
+
_this.snrW = new InLineTooltip(ui_config, [], [], terminationConfig, {
|
|
25190
25349
|
configId: uuid,
|
|
25191
25350
|
configName: name
|
|
25192
25351
|
}, _this, onShow, onHide, function () {}, false, 0);
|
|
25193
25352
|
} else if (action_class === "tooltip_builder") {
|
|
25194
|
-
_this.
|
|
25353
|
+
_this.snrW = new NewInLineTooltip(ui_config, terminationConfig, {
|
|
25195
25354
|
configId: uuid,
|
|
25196
25355
|
configName: name
|
|
25197
25356
|
}, _this, onShow, onHide);
|
|
25198
25357
|
}
|
|
25199
25358
|
setTimeout(function () {
|
|
25200
|
-
_this.
|
|
25359
|
+
_this.snrW.createNewTooltip();
|
|
25201
25360
|
}, ui_config.delay);
|
|
25202
25361
|
});
|
|
25203
|
-
_defineProperty(this, "
|
|
25362
|
+
_defineProperty(this, "ouIf", function (ui_config, duration, uuid, name) {
|
|
25204
25363
|
var terminationConfig = {};
|
|
25205
25364
|
terminationConfig["auto_dismiss"] = duration > 0;
|
|
25206
25365
|
terminationConfig["duration"] = duration;
|
|
@@ -25210,33 +25369,33 @@
|
|
|
25210
25369
|
}, _this, function () {
|
|
25211
25370
|
_this.isShowingAction = true;
|
|
25212
25371
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
25213
|
-
var
|
|
25214
|
-
(
|
|
25372
|
+
var _window25, _window25$updateFlag;
|
|
25373
|
+
(_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
25374
|
window.Apxor.logActionEvent("inline_shown", uuid, name);
|
|
25216
25375
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
25217
25376
|
setTimeout(function () {
|
|
25218
|
-
var
|
|
25219
|
-
(
|
|
25377
|
+
var _window26, _window26$logInternal;
|
|
25378
|
+
(_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
25379
|
}, 500);
|
|
25221
25380
|
}
|
|
25222
25381
|
}
|
|
25223
25382
|
}, function (isCancelled) {
|
|
25224
|
-
var
|
|
25383
|
+
var _window27, _window27$updateFlag, _window28;
|
|
25225
25384
|
_this.isShowingAction = false;
|
|
25226
25385
|
_this.currentAction = null;
|
|
25227
|
-
_this.
|
|
25228
|
-
(
|
|
25386
|
+
_this.snrW = null;
|
|
25387
|
+
(_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
25388
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
25230
25389
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
25231
25390
|
}
|
|
25232
|
-
if (((
|
|
25233
|
-
var
|
|
25234
|
-
(
|
|
25391
|
+
if (((_window28 = window) === null || _window28 === void 0 || (_window28 = _window28.ApxorWebView) === null || _window28 === void 0 ? void 0 : _window28.getLayoutType()) === "web-inline") {
|
|
25392
|
+
var _window29;
|
|
25393
|
+
(_window29 = window) === null || _window29 === void 0 || (_window29 = _window29.ApxorWebView) === null || _window29 === void 0 || _window29.removeWebView();
|
|
25235
25394
|
}
|
|
25236
25395
|
}, _this.stepperCallback, false, 0);
|
|
25237
25396
|
_this._currentCoachmark.createNewCoachMark();
|
|
25238
25397
|
});
|
|
25239
|
-
_defineProperty(this, "
|
|
25398
|
+
_defineProperty(this, "TQJb", function (ui_config, duration, uuid, name, terminationConfig) {
|
|
25240
25399
|
_this._currentBadge = new ApxorBadge(ui_config, terminationConfig, {
|
|
25241
25400
|
configId: uuid,
|
|
25242
25401
|
configName: name
|
|
@@ -25247,18 +25406,18 @@
|
|
|
25247
25406
|
(_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 || _window$Apxor5.updateBadgeStatus("show", uuid);
|
|
25248
25407
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
25249
25408
|
setTimeout(function () {
|
|
25250
|
-
var
|
|
25251
|
-
(
|
|
25409
|
+
var _window30, _window30$logInternal;
|
|
25410
|
+
(_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
25411
|
}, 500);
|
|
25253
25412
|
}
|
|
25254
25413
|
}
|
|
25255
25414
|
});
|
|
25256
|
-
_this._currentBadge.
|
|
25257
|
-
_this._currentBadge.
|
|
25415
|
+
_this._currentBadge.DfZq();
|
|
25416
|
+
_this._currentBadge.TQJb();
|
|
25258
25417
|
});
|
|
25259
25418
|
_defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
|
|
25260
|
-
if (_this.
|
|
25261
|
-
_this.
|
|
25419
|
+
if (_this.snrW) {
|
|
25420
|
+
_this.snrW.updateElementPositionOnScroll(top, left, height, width);
|
|
25262
25421
|
}
|
|
25263
25422
|
});
|
|
25264
25423
|
_defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
|
|
@@ -25275,15 +25434,15 @@
|
|
|
25275
25434
|
var VideoInAppInstance = new VideoInApp(videoConfig, terminationConfig, configId, name, function () {
|
|
25276
25435
|
_this.isShowingAction = true;
|
|
25277
25436
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
25278
|
-
var
|
|
25279
|
-
(
|
|
25437
|
+
var _window31, _window31$updateFlag;
|
|
25438
|
+
(_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
25439
|
window.Apxor.logActionEvent("inapp_shown", configId, name);
|
|
25281
25440
|
}
|
|
25282
25441
|
}, function () {
|
|
25283
|
-
var
|
|
25442
|
+
var _window32, _window32$updateFlag;
|
|
25284
25443
|
_this.isShowingAction = false;
|
|
25285
25444
|
_this.currentAction = null;
|
|
25286
|
-
(
|
|
25445
|
+
(_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
25446
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
25288
25447
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|
|
25289
25448
|
}
|
|
@@ -25310,17 +25469,17 @@
|
|
|
25310
25469
|
var _window$Apxor6;
|
|
25311
25470
|
_this.isShowingAction = true;
|
|
25312
25471
|
if (((_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.platform) === "ios") {
|
|
25313
|
-
var
|
|
25314
|
-
(
|
|
25472
|
+
var _window33, _window33$updateFlag;
|
|
25473
|
+
(_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
25474
|
} else {
|
|
25316
|
-
var
|
|
25317
|
-
(
|
|
25475
|
+
var _window34, _window34$updateFlag;
|
|
25476
|
+
(_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
25477
|
}
|
|
25319
25478
|
if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent) {
|
|
25320
25479
|
window.Apxor.logActionEvent("inapp_shown", configId, name);
|
|
25321
25480
|
} else if (action_class === "inapp_builder") {
|
|
25322
|
-
var _window$
|
|
25323
|
-
(_window$
|
|
25481
|
+
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;
|
|
25482
|
+
(_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_nudge_shown", {
|
|
25324
25483
|
apx_nudge_name: name,
|
|
25325
25484
|
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
25485
|
apx_template_name: "inapp",
|
|
@@ -25344,19 +25503,19 @@
|
|
|
25344
25503
|
backgroundDiv.remove();
|
|
25345
25504
|
_this.isShowingAction = false;
|
|
25346
25505
|
if (((_window$Apxor9 = window.Apxor) === null || _window$Apxor9 === void 0 ? void 0 : _window$Apxor9.platform) === "ios") {
|
|
25347
|
-
var
|
|
25348
|
-
(
|
|
25506
|
+
var _window35, _window35$updateFlag;
|
|
25507
|
+
(_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
25508
|
} else {
|
|
25350
|
-
var
|
|
25351
|
-
(
|
|
25509
|
+
var _window36, _window36$updateFlag;
|
|
25510
|
+
(_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
25511
|
}
|
|
25353
25512
|
_this.currentAction = null;
|
|
25354
25513
|
if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
|
|
25355
25514
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|
|
25356
25515
|
} else if (action_class === "inapp_builder") {
|
|
25357
|
-
var
|
|
25516
|
+
var _window37;
|
|
25358
25517
|
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$
|
|
25518
|
+
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
25519
|
var additional_info = {
|
|
25361
25520
|
apx_nudge_name: name,
|
|
25362
25521
|
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 +25526,10 @@
|
|
|
25367
25526
|
if (type != "") {
|
|
25368
25527
|
additional_info["apx_dismiss_type"] = type;
|
|
25369
25528
|
}
|
|
25370
|
-
(_window$
|
|
25529
|
+
(_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_nudge_dismissed", additional_info);
|
|
25371
25530
|
}
|
|
25372
25531
|
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$
|
|
25532
|
+
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
25533
|
var _additional_info = {
|
|
25375
25534
|
apx_nudge_name: name,
|
|
25376
25535
|
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 +25537,9 @@
|
|
|
25378
25537
|
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
25538
|
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
25539
|
};
|
|
25381
|
-
(_window$
|
|
25540
|
+
(_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent("apx_nudge_cancelled", _additional_info);
|
|
25382
25541
|
}
|
|
25383
|
-
(
|
|
25542
|
+
(_window37 = window) === null || _window37 === void 0 || (_window37 = _window37.ApxorInternals) === null || _window37 === void 0 || _window37.removeBuilderTemplate(configId);
|
|
25384
25543
|
}
|
|
25385
25544
|
};
|
|
25386
25545
|
if (action_class === "modal") {
|
|
@@ -25392,11 +25551,11 @@
|
|
|
25392
25551
|
}
|
|
25393
25552
|
});
|
|
25394
25553
|
_defineProperty(this, "showPlaceHolder", function () {
|
|
25395
|
-
var
|
|
25396
|
-
if (_this.
|
|
25554
|
+
var _window38;
|
|
25555
|
+
if (_this.LEVi) {
|
|
25397
25556
|
return;
|
|
25398
25557
|
}
|
|
25399
|
-
_this.
|
|
25558
|
+
_this.LEVi = true;
|
|
25400
25559
|
var ele = document.createElement("div");
|
|
25401
25560
|
ele.innerHTML = "place your immersive card here";
|
|
25402
25561
|
ele.style.backgroundColor = "#f5f5f5";
|
|
@@ -25406,7 +25565,7 @@
|
|
|
25406
25565
|
ele.style.padding = "12px";
|
|
25407
25566
|
ele.style.fontSize = "14px";
|
|
25408
25567
|
document.body.appendChild(ele);
|
|
25409
|
-
(
|
|
25568
|
+
(_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
25569
|
});
|
|
25411
25570
|
_defineProperty(this, "pauseStories", function () {
|
|
25412
25571
|
var progress = Array.from(document.querySelectorAll(".progress"));
|
|
@@ -25463,7 +25622,7 @@
|
|
|
25463
25622
|
}
|
|
25464
25623
|
});
|
|
25465
25624
|
_defineProperty(this, "removeBadge", function (name, id) {
|
|
25466
|
-
var cssPostFix = "-".concat(id, "-").concat(name).
|
|
25625
|
+
var cssPostFix = "-".concat(id, "-").concat(name).replace(/\s+/g, "").replace(/[^\w-]/g, "");
|
|
25467
25626
|
var badge = Array.from(document.getElementsByClassName("apxor-badge-container")).find(function (element) {
|
|
25468
25627
|
return element.classList.contains("apxor-badge-container-styles-".concat(cssPostFix));
|
|
25469
25628
|
});
|