apxor-rtm-ui 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,6 +52,307 @@
52
52
  }
53
53
  return e;
54
54
  }
55
+ function _regeneratorRuntime() {
56
+ _regeneratorRuntime = function () {
57
+ return e;
58
+ };
59
+ var t,
60
+ e = {},
61
+ r = Object.prototype,
62
+ n = r.hasOwnProperty,
63
+ o = Object.defineProperty || function (t, e, r) {
64
+ t[e] = r.value;
65
+ },
66
+ i = "function" == typeof Symbol ? Symbol : {},
67
+ a = i.iterator || "@@iterator",
68
+ c = i.asyncIterator || "@@asyncIterator",
69
+ u = i.toStringTag || "@@toStringTag";
70
+ function define(t, e, r) {
71
+ return Object.defineProperty(t, e, {
72
+ value: r,
73
+ enumerable: !0,
74
+ configurable: !0,
75
+ writable: !0
76
+ }), t[e];
77
+ }
78
+ try {
79
+ define({}, "");
80
+ } catch (t) {
81
+ define = function (t, e, r) {
82
+ return t[e] = r;
83
+ };
84
+ }
85
+ function wrap(t, e, r, n) {
86
+ var i = e && e.prototype instanceof Generator ? e : Generator,
87
+ a = Object.create(i.prototype),
88
+ c = new Context(n || []);
89
+ return o(a, "_invoke", {
90
+ value: makeInvokeMethod(t, r, c)
91
+ }), a;
92
+ }
93
+ function tryCatch(t, e, r) {
94
+ try {
95
+ return {
96
+ type: "normal",
97
+ arg: t.call(e, r)
98
+ };
99
+ } catch (t) {
100
+ return {
101
+ type: "throw",
102
+ arg: t
103
+ };
104
+ }
105
+ }
106
+ e.wrap = wrap;
107
+ var h = "suspendedStart",
108
+ l = "suspendedYield",
109
+ f = "executing",
110
+ s = "completed",
111
+ y = {};
112
+ function Generator() {}
113
+ function GeneratorFunction() {}
114
+ function GeneratorFunctionPrototype() {}
115
+ var p = {};
116
+ define(p, a, function () {
117
+ return this;
118
+ });
119
+ var d = Object.getPrototypeOf,
120
+ v = d && d(d(values([])));
121
+ v && v !== r && n.call(v, a) && (p = v);
122
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
123
+ function defineIteratorMethods(t) {
124
+ ["next", "throw", "return"].forEach(function (e) {
125
+ define(t, e, function (t) {
126
+ return this._invoke(e, t);
127
+ });
128
+ });
129
+ }
130
+ function AsyncIterator(t, e) {
131
+ function invoke(r, o, i, a) {
132
+ var c = tryCatch(t[r], t, o);
133
+ if ("throw" !== c.type) {
134
+ var u = c.arg,
135
+ h = u.value;
136
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
137
+ invoke("next", t, i, a);
138
+ }, function (t) {
139
+ invoke("throw", t, i, a);
140
+ }) : e.resolve(h).then(function (t) {
141
+ u.value = t, i(u);
142
+ }, function (t) {
143
+ return invoke("throw", t, i, a);
144
+ });
145
+ }
146
+ a(c.arg);
147
+ }
148
+ var r;
149
+ o(this, "_invoke", {
150
+ value: function (t, n) {
151
+ function callInvokeWithMethodAndArg() {
152
+ return new e(function (e, r) {
153
+ invoke(t, n, e, r);
154
+ });
155
+ }
156
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
157
+ }
158
+ });
159
+ }
160
+ function makeInvokeMethod(e, r, n) {
161
+ var o = h;
162
+ return function (i, a) {
163
+ if (o === f) throw new Error("Generator is already running");
164
+ if (o === s) {
165
+ if ("throw" === i) throw a;
166
+ return {
167
+ value: t,
168
+ done: !0
169
+ };
170
+ }
171
+ for (n.method = i, n.arg = a;;) {
172
+ var c = n.delegate;
173
+ if (c) {
174
+ var u = maybeInvokeDelegate(c, n);
175
+ if (u) {
176
+ if (u === y) continue;
177
+ return u;
178
+ }
179
+ }
180
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
181
+ if (o === h) throw o = s, n.arg;
182
+ n.dispatchException(n.arg);
183
+ } else "return" === n.method && n.abrupt("return", n.arg);
184
+ o = f;
185
+ var p = tryCatch(e, r, n);
186
+ if ("normal" === p.type) {
187
+ if (o = n.done ? s : l, p.arg === y) continue;
188
+ return {
189
+ value: p.arg,
190
+ done: n.done
191
+ };
192
+ }
193
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
194
+ }
195
+ };
196
+ }
197
+ function maybeInvokeDelegate(e, r) {
198
+ var n = r.method,
199
+ o = e.iterator[n];
200
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
201
+ var i = tryCatch(o, e.iterator, r.arg);
202
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
203
+ var a = i.arg;
204
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
205
+ }
206
+ function pushTryEntry(t) {
207
+ var e = {
208
+ tryLoc: t[0]
209
+ };
210
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
211
+ }
212
+ function resetTryEntry(t) {
213
+ var e = t.completion || {};
214
+ e.type = "normal", delete e.arg, t.completion = e;
215
+ }
216
+ function Context(t) {
217
+ this.tryEntries = [{
218
+ tryLoc: "root"
219
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
220
+ }
221
+ function values(e) {
222
+ if (e || "" === e) {
223
+ var r = e[a];
224
+ if (r) return r.call(e);
225
+ if ("function" == typeof e.next) return e;
226
+ if (!isNaN(e.length)) {
227
+ var o = -1,
228
+ i = function next() {
229
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
230
+ return next.value = t, next.done = !0, next;
231
+ };
232
+ return i.next = i;
233
+ }
234
+ }
235
+ throw new TypeError(typeof e + " is not iterable");
236
+ }
237
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
238
+ value: GeneratorFunctionPrototype,
239
+ configurable: !0
240
+ }), o(GeneratorFunctionPrototype, "constructor", {
241
+ value: GeneratorFunction,
242
+ configurable: !0
243
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
244
+ var e = "function" == typeof t && t.constructor;
245
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
246
+ }, e.mark = function (t) {
247
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
248
+ }, e.awrap = function (t) {
249
+ return {
250
+ __await: t
251
+ };
252
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
253
+ return this;
254
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
255
+ void 0 === i && (i = Promise);
256
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
257
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
258
+ return t.done ? t.value : a.next();
259
+ });
260
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
261
+ return this;
262
+ }), define(g, "toString", function () {
263
+ return "[object Generator]";
264
+ }), e.keys = function (t) {
265
+ var e = Object(t),
266
+ r = [];
267
+ for (var n in e) r.push(n);
268
+ return r.reverse(), function next() {
269
+ for (; r.length;) {
270
+ var t = r.pop();
271
+ if (t in e) return next.value = t, next.done = !1, next;
272
+ }
273
+ return next.done = !0, next;
274
+ };
275
+ }, e.values = values, Context.prototype = {
276
+ constructor: Context,
277
+ reset: function (e) {
278
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
279
+ },
280
+ stop: function () {
281
+ this.done = !0;
282
+ var t = this.tryEntries[0].completion;
283
+ if ("throw" === t.type) throw t.arg;
284
+ return this.rval;
285
+ },
286
+ dispatchException: function (e) {
287
+ if (this.done) throw e;
288
+ var r = this;
289
+ function handle(n, o) {
290
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
291
+ }
292
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
293
+ var i = this.tryEntries[o],
294
+ a = i.completion;
295
+ if ("root" === i.tryLoc) return handle("end");
296
+ if (i.tryLoc <= this.prev) {
297
+ var c = n.call(i, "catchLoc"),
298
+ u = n.call(i, "finallyLoc");
299
+ if (c && u) {
300
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
301
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
302
+ } else if (c) {
303
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
304
+ } else {
305
+ if (!u) throw new Error("try statement without catch or finally");
306
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
307
+ }
308
+ }
309
+ }
310
+ },
311
+ abrupt: function (t, e) {
312
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
313
+ var o = this.tryEntries[r];
314
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
315
+ var i = o;
316
+ break;
317
+ }
318
+ }
319
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
320
+ var a = i ? i.completion : {};
321
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
322
+ },
323
+ complete: function (t, e) {
324
+ if ("throw" === t.type) throw t.arg;
325
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
326
+ },
327
+ finish: function (t) {
328
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
329
+ var r = this.tryEntries[e];
330
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
331
+ }
332
+ },
333
+ catch: function (t) {
334
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
335
+ var r = this.tryEntries[e];
336
+ if (r.tryLoc === t) {
337
+ var n = r.completion;
338
+ if ("throw" === n.type) {
339
+ var o = n.arg;
340
+ resetTryEntry(r);
341
+ }
342
+ return o;
343
+ }
344
+ }
345
+ throw new Error("illegal catch attempt");
346
+ },
347
+ delegateYield: function (e, r, n) {
348
+ return this.delegate = {
349
+ iterator: values(e),
350
+ resultName: r,
351
+ nextLoc: n
352
+ }, "next" === this.method && (this.arg = t), y;
353
+ }
354
+ }, e;
355
+ }
55
356
  function _typeof(o) {
56
357
  "@babel/helpers - typeof";
57
358
 
@@ -61,6 +362,36 @@
61
362
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
62
363
  }, _typeof(o);
63
364
  }
365
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
366
+ try {
367
+ var info = gen[key](arg);
368
+ var value = info.value;
369
+ } catch (error) {
370
+ reject(error);
371
+ return;
372
+ }
373
+ if (info.done) {
374
+ resolve(value);
375
+ } else {
376
+ Promise.resolve(value).then(_next, _throw);
377
+ }
378
+ }
379
+ function _asyncToGenerator(fn) {
380
+ return function () {
381
+ var self = this,
382
+ args = arguments;
383
+ return new Promise(function (resolve, reject) {
384
+ var gen = fn.apply(self, args);
385
+ function _next(value) {
386
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
387
+ }
388
+ function _throw(err) {
389
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
390
+ }
391
+ _next(undefined);
392
+ });
393
+ };
394
+ }
64
395
  function _classCallCheck(instance, Constructor) {
65
396
  if (!(instance instanceof Constructor)) {
66
397
  throw new TypeError("Cannot call a class as a function");
@@ -6395,7 +6726,9 @@
6395
6726
  TOP_CENTER: "top-center",
6396
6727
  BOTTOM_CENTER: "bottom-center",
6397
6728
  CENTER: "center",
6398
- FULL_SCREEN: "full-screen"
6729
+ FULL_SCREEN: "full-screen",
6730
+ LEFT: "left",
6731
+ RIGHT: "right"
6399
6732
  };
6400
6733
  var imgWrapperStyles = {
6401
6734
  "margin-left": "marginLeft",
@@ -6447,8 +6780,17 @@
6447
6780
  cell: "div",
6448
6781
  img: "img",
6449
6782
  text: "span",
6450
- button: "button"
6783
+ button: "button",
6784
+ cta_button: "button"
6451
6785
  };
6786
+ var BUILDER_TEMPLATE_NODE_TYPES = {
6787
+ cell: "div",
6788
+ img: "img",
6789
+ text: "div",
6790
+ button: "button",
6791
+ cta_button: "button"
6792
+ };
6793
+ var CROSS_ICON_SVG = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"border-radius: inherit; width: 100%; height: 100%;\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"current-color\"></path><path d=\"M18 6l-12 12\"></path><path d=\"M6 6l12 12\"></path></svg>";
6452
6794
 
6453
6795
  /* eslint-disable no-unused-vars */
6454
6796
 
@@ -6808,10 +7150,11 @@
6808
7150
  var index = arguments.length > 10 ? arguments[10] : undefined;
6809
7151
  var button_alignment = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : "center";
6810
7152
  var fontMultiplier = arguments.length > 12 && arguments[12] !== undefined ? arguments[12] : 1;
7153
+ var step = arguments.length > 13 && arguments[13] !== undefined ? arguments[13] : -1;
6811
7154
  var buttons = document.createElement("div");
6812
7155
  buttons.className = "".concat(position, "-buttons-container");
6813
7156
  buttons.style.zIndex = 99999999;
6814
- var _generateButtonsFromC = generateButtonsFromConfig(buttons_config, actionHandler, id, name, eventPrefix, position, isWalkthrough, uis, index),
7157
+ var _generateButtonsFromC = generateButtonsFromConfig(buttons_config, actionHandler, id, name, eventPrefix, position, isWalkthrough, uis, index, step),
6815
7158
  buttons_array = _generateButtonsFromC.buttons_array,
6816
7159
  buttons_css = _generateButtonsFromC.buttons_css;
6817
7160
  buttons_css.fontMultiplier = fontMultiplier;
@@ -7096,6 +7439,7 @@
7096
7439
  var isWalkthrough = arguments.length > 6 ? arguments[6] : undefined;
7097
7440
  var uis = arguments.length > 7 ? arguments[7] : undefined;
7098
7441
  var ind = arguments.length > 8 ? arguments[8] : undefined;
7442
+ var step = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : -1;
7099
7443
  var buttons_array = [];
7100
7444
  var buttons_css = [];
7101
7445
  buttons_config.sort(function (a, b) {
@@ -7156,6 +7500,10 @@
7156
7500
  action = function action() {
7157
7501
  ActionHandler.complete(false, "dismiss");
7158
7502
  window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
7503
+ if (step != -1) {
7504
+ var _window;
7505
+ (_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || _window.triggerNextStep(uuid, step + 1);
7506
+ }
7159
7507
  };
7160
7508
  break;
7161
7509
  case "next":
@@ -7185,9 +7533,17 @@
7185
7533
  window.Apxor.redirectTo(JSON.stringify(action_config));
7186
7534
  var _type = configType.toLowerCase();
7187
7535
  window.Apxor.logActionEvent("".concat(_type, "dismissed"), uuid, name);
7536
+ if (step != -1) {
7537
+ var _window2;
7538
+ (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || _window2.triggerNextStep(uuid, step + 1);
7539
+ }
7188
7540
  } else {
7189
7541
  ActionHandler.complete(true, "redirect");
7190
7542
  window.Apxor.redirectTo("IN_APP", uuid, name, text, JSON.stringify(action_config));
7543
+ if (step != -1) {
7544
+ var _window3;
7545
+ (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || _window3.triggerNextStep(uuid, step + 1);
7546
+ }
7191
7547
  }
7192
7548
  // if (redirectWithin || isExternal) {
7193
7549
  // window.open(url, redirectWithin ? "_self" : "_blank");
@@ -7500,6 +7856,17 @@
7500
7856
  });
7501
7857
  return newObj;
7502
7858
  }
7859
+ var extractBgImageUrl = function extractBgImageUrl(css) {
7860
+ var _css$backgroundImage;
7861
+ var backgroundImage = (_css$backgroundImage = css === null || css === void 0 ? void 0 : css["background-image"]) !== null && _css$backgroundImage !== void 0 ? _css$backgroundImage : "url()";
7862
+ var pattern = /url\((.*?)\)/;
7863
+ var match = backgroundImage.match(pattern);
7864
+ if (match && match[1]) {
7865
+ return match[1];
7866
+ } else {
7867
+ return "";
7868
+ }
7869
+ };
7503
7870
 
7504
7871
  /**
7505
7872
  * @function getPIPSVG
@@ -11756,69 +12123,109 @@
11756
12123
  render: render
11757
12124
  });
11758
12125
 
11759
- var TemplateContent = /*#__PURE__*/_createClass(function TemplateContent(_config, configId, name, type) {
12126
+ var TemplateContent = /*#__PURE__*/_createClass(function TemplateContent(_config, configId, name, _type, closeCallback) {
11760
12127
  var _this = this,
12128
+ _config$wait_interval,
11761
12129
  _config$termination;
11762
12130
  _classCallCheck(this, TemplateContent);
11763
- _defineProperty(this, "KyAi", function () {
11764
- var element = _this.HjRo(_this.layout);
11765
- //document.body.appendChild(element);
11766
- var tooltipStyles = document.createElement("style");
11767
- tooltipStyles.innerHTML = _this.initialStyles;
11768
- tooltipStyles.setAttribute("apx-tooltip-styles", "");
11769
- document.head.appendChild(tooltipStyles);
11770
- var styleElement = document.createElement("style");
11771
- styleElement.innerHTML = _this.styleContent;
11772
- document.head.appendChild(styleElement);
11773
- try {
11774
- eval(_this.script);
11775
- } catch (e) {
11776
- console.log("found error while executing script: ".concat(e));
11777
- }
11778
- return element;
12131
+ _defineProperty(this, "UYsM", function () {
12132
+ return new Promise(function (resolve, reject) {
12133
+ try {
12134
+ var element = _this.KDYj(_this.layout);
12135
+ var styleElement = document.createElement("style");
12136
+ styleElement.innerHTML = _this.styleContent;
12137
+ document.head.appendChild(styleElement);
12138
+ _this.iDmo();
12139
+ try {
12140
+ eval(_this.script);
12141
+ } catch (e) {
12142
+ var _window;
12143
+ console.log("found error while executing script: ".concat(e));
12144
+ (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("found error while executing script: ".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
12145
+ reject("found error while executing script: ".concat(e));
12146
+ }
12147
+ _this.imageElements.forEach(function (img) {
12148
+ img.addEventListener("error", function () {
12149
+ _this.hZAf("provided image doesn't exists");
12150
+ });
12151
+ });
12152
+ _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
12153
+ _this.wait_interval -= 1;
12154
+ if (_this.wait_interval <= 0) {
12155
+ _this.hZAf("provided media doesn't exists");
12156
+ } else {
12157
+ if (_this.gDMN() && _this.Wrko() && _this.OIYp()) {
12158
+ clearInterval(_this.intervalToCheckMediaLoadingStatus);
12159
+ resolve(element);
12160
+ }
12161
+ }
12162
+ }, 100);
12163
+ } catch (e) {
12164
+ var _window2;
12165
+ console.log("failed while creating builder template with error ".concat(e));
12166
+ (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.ApxorLogger) === null || _window2 === void 0 || _window2.error("failed while creating builder template with error: ".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
12167
+ reject("failed while creating builder template with error: ".concat(e));
12168
+ }
12169
+ });
11779
12170
  });
11780
- _defineProperty(this, "HjRo", function (config) {
11781
- var _window$Apxor;
12171
+ _defineProperty(this, "hZAf", function (reason) {
12172
+ var _window$ApxorRTM, _window$Apxor, _this$config, _this$config2, _window$Apxor2, _this$config3, _this$config4, _this$config5, _this$config6, _window3;
12173
+ !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
12174
+ apx_nudge_name: _this.name,
12175
+ apx_nudge_id: ((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios" ? (_this$config = _this.config) === null || _this$config === void 0 || (_this$config = _this$config.additional_info) === null || _this$config === void 0 ? void 0 : _this$config.id : _this.configId,
12176
+ apx_template_name: _this.type,
12177
+ apx_notshown_type: "error",
12178
+ apx_reason: reason,
12179
+ apx_variant_code: (_this$config2 = _this.config) === null || _this$config2 === void 0 || (_this$config2 = _this$config2.additional_info) === null || _this$config2 === void 0 ? void 0 : _this$config2.apx_variant_code,
12180
+ apx_step: ((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios" ? (_this$config3 = _this.config) !== null && _this$config3 !== void 0 && (_this$config3 = _this$config3.additional_info) !== null && _this$config3 !== void 0 && _this$config3.is_preview ? 1 : (_this$config4 = _this.config) === null || _this$config4 === void 0 || (_this$config4 = _this$config4.additional_info) === null || _this$config4 === void 0 ? void 0 : _this$config4.apx_step : (_this$config5 = _this.config) !== null && _this$config5 !== void 0 && (_this$config5 = _this$config5.additional_info) !== null && _this$config5 !== void 0 && _this$config5.is_preview ? 1 : (_this$config6 = _this.config) === null || _this$config6 === void 0 || (_this$config6 = _this$config6.additional_info) === null || _this$config6 === void 0 ? void 0 : _this$config6.apx_step
12181
+ }));
12182
+ _this.loggedNudgeNotShownEvent = true;
12183
+ clearInterval(_this.intervalToCheckMediaLoadingStatus);
12184
+ _this.closeCallBack("cancel");
12185
+ (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorInternals) === null || _window3 === void 0 || _window3.removeBuilderTemplate(_this.configId);
12186
+ });
12187
+ _defineProperty(this, "iDmo", function () {
12188
+ var BuilderTemplatesStyles = document.createElement("style");
12189
+ BuilderTemplatesStyles.innerHTML = _this.initialStyles;
12190
+ BuilderTemplatesStyles.setAttribute("apx-builder-template-styles", "");
12191
+ document.head.appendChild(BuilderTemplatesStyles);
12192
+ });
12193
+ _defineProperty(this, "KDYj", function (config) {
12194
+ var _window$Apxor3;
11782
12195
  var element;
11783
12196
  switch (config.type) {
11784
12197
  case "cell":
11785
12198
  case "img":
11786
12199
  case "text":
12200
+ case "cta_button":
11787
12201
  case "button":
11788
- element = document.createElement(EMBED_CARD_TYPE[config.type]);
12202
+ element = document.createElement(BUILDER_TEMPLATE_NODE_TYPES[config.type]);
11789
12203
  break;
11790
12204
  case "video":
11791
12205
  element = document.createElement("video");
11792
12206
  element.controlsList = "noplaybackrate nodownload nofullscreen";
11793
12207
  element.controls = true;
12208
+ element.muted = true;
11794
12209
  element.disablePictureInPicture = true;
11795
12210
  element.autoplay = true;
11796
- if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
12211
+ if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
11797
12212
  element.playsInline = true;
11798
12213
  }
11799
- // if (config.source) {
11800
- // let sourceElement = document.createElement("source");
11801
- // for (let prop in config.source) {
11802
- // sourceElement[prop] = config.source[prop];
11803
- // }
11804
- // element.appendChild(sourceElement);
11805
- // }
11806
- // if (config.track) {
11807
- // let trackElement = document.createElement("track");
11808
- // for (let prop in config.track) {
11809
- // trackElement[prop] = config.track[prop];
11810
- // }
11811
- // element.appendChild(trackElement);
11812
- // }
11813
12214
  break;
11814
12215
  case "svg":
11815
12216
  element = document.createElement("span");
11816
12217
  break;
12218
+ case "cross_button":
12219
+ element = document.createElement("div");
12220
+ element.innerHTML = CROSS_ICON_SVG;
12221
+ element.style.display = "flex";
12222
+ break;
11817
12223
  default:
11818
12224
  element = document.createElement(config.type);
11819
12225
  }
11820
12226
  if (config.properties) {
11821
12227
  for (var prop in config.properties) {
12228
+ if (config.type === "img" && prop === "src" || config.type === "img" && prop === "format") continue;
11822
12229
  if (config.type === "video" && prop === "source") {
11823
12230
  var sourceElement = document.createElement("source");
11824
12231
  for (var srcprop in (_config$properties = config.properties) === null || _config$properties === void 0 ? void 0 : _config$properties[prop]) {
@@ -11834,37 +12241,86 @@
11834
12241
  }
11835
12242
  element.classList.add(config._id);
11836
12243
  if (config.css) {
11837
- var styles = ".".concat(config._id, " {\n ").concat(config.css, "\n }\n ");
12244
+ var styles = "";
12245
+ if (config.type === "img") {
12246
+ var styleObject = parseCSS(config.css);
12247
+ var imgStyleObject = removeKeys(styleObject, Object.keys(imgWrapperStyles));
12248
+ styles = ".".concat(config._id, " {\n ").concat(objectToCSS(imgStyleObject), "\n }\n ");
12249
+ } else if (config._id === _this.layout._id) {
12250
+ var layoutStyleObject = parseCSS(config.css);
12251
+ if (layoutStyleObject["background-image"]) {
12252
+ var backgroundImageUrl = extractBgImageUrl(layoutStyleObject);
12253
+ layoutStyleObject["background-image"] = "url(".concat(decodeURIComponent(backgroundImageUrl), ")");
12254
+ _this.bgImageUrl = decodeURIComponent(backgroundImageUrl);
12255
+ }
12256
+ styles = ".".concat(config._id, " {\n ").concat(objectToCSS(layoutStyleObject), "\n }\n ");
12257
+ } else {
12258
+ styles = ".".concat(config._id, " {\n ").concat(config.css, "\n }\n ");
12259
+ }
11838
12260
  _this.initialStyles += styles;
11839
12261
  }
11840
12262
  if (config.enable_actions && config.actions.length > 0) {
11841
12263
  config.actions.forEach(function (action) {
12264
+ var next_step = action !== null && action !== void 0 && action.next_step ? action === null || action === void 0 ? void 0 : action.next_step : 0;
11842
12265
  switch (action.type) {
11843
12266
  case "activity":
11844
12267
  case "deeplink":
11845
12268
  case "ir":
11846
12269
  element.onclick = function (e) {
12270
+ var _this$config7;
11847
12271
  e.stopPropagation();
11848
12272
  window.Apxor.redirect(JSON.stringify(action));
12273
+ var reason = "";
12274
+ if (config.type === "cta_button" || config.type === "button") {
12275
+ reason = "cta-clicked";
12276
+ }
12277
+ _this.eBcX(e, "redirect", reason);
12278
+ if ((_this$config7 = _this.config) !== null && _this$config7 !== void 0 && (_this$config7 = _this$config7.additional_info) !== null && _this$config7 !== void 0 && _this$config7.apx_step) {
12279
+ var _window4, _this$config8;
12280
+ (_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);
12281
+ }
11849
12282
  };
11850
12283
  break;
11851
12284
  case "cancel":
11852
12285
  element.onclick = function (e) {
11853
12286
  e.stopPropagation();
11854
- window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
12287
+ var reason = "";
12288
+ if (config.type === "cross_button") {
12289
+ reason = "cross-clicked";
12290
+ } else if (config.type === "cta_button" || config.type === "button") {
12291
+ reason = "cta-clicked";
12292
+ }
12293
+ _this.eBcX(e, "cancel", reason);
12294
+ // window.Apxor.logActionEvent(
12295
+ // "walk_through_cancelled",
12296
+ // this.configId,
12297
+ // this.name
12298
+ // );
11855
12299
  };
12300
+
11856
12301
  break;
11857
12302
  case "dismiss":
11858
12303
  element.onclick = function (e) {
12304
+ var _this$config9;
11859
12305
  e.stopPropagation();
11860
- window.Apxor.logActionEvent("".concat(_this.type, "_dismissed"), _this.configId, _this.name);
12306
+ var reason = "";
12307
+ if (config.type === "cross_button") {
12308
+ reason = "cross-clicked";
12309
+ } else if (config.type === "cta_button" || config.type === "button") {
12310
+ reason = "cta-clicked";
12311
+ }
12312
+ _this.eBcX(e, "dismiss", reason);
12313
+ if ((_this$config9 = _this.config) !== null && _this$config9 !== void 0 && (_this$config9 = _this$config9.additional_info) !== null && _this$config9 !== void 0 && _this$config9.apx_step) {
12314
+ var _window5, _this$config10;
12315
+ (_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);
12316
+ }
11861
12317
  };
11862
12318
  break;
11863
12319
  case "never":
11864
12320
  element.onclick = function (e) {
11865
12321
  e.stopPropagation();
11866
12322
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
11867
- window.Apxor.logActionEvent("never_show_clicked", _this.configId, _this.name);
12323
+ _this.eBcX(e, "never");
11868
12324
  };
11869
12325
  break;
11870
12326
  case "toggle-class":
@@ -11889,6 +12345,10 @@
11889
12345
  tempInput.select();
11890
12346
  document.execCommand("copy");
11891
12347
  document.body.removeChild(tempInput);
12348
+ _this.eBcX(e, "copy-content", "cta-clicked");
12349
+ setTimeout(function () {
12350
+ window.Apxor.showInfoToast("Text-Copied:".concat(textToCopy));
12351
+ }, 500);
11892
12352
  };
11893
12353
  break;
11894
12354
  case "log-app-event":
@@ -11906,45 +12366,107 @@
11906
12366
  });
11907
12367
  }
11908
12368
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
11909
- element.style.position = "relative";
11910
12369
  config.absolute_position_children.forEach(function (childConfig) {
11911
- var childElement = _this.HjRo(childConfig);
11912
- childElement.style.position = "absolute";
11913
- for (var _prop in childConfig.offset) {
11914
- childElement.style[_prop] = childConfig.offset[_prop];
11915
- }
12370
+ var childElement = _this.KDYj(childConfig);
11916
12371
  element.appendChild(childElement);
11917
12372
  });
11918
12373
  }
11919
12374
 
11920
12375
  // Process children
11921
12376
  if (config.children && config.children.length > 0) {
11922
- //element.style.display = "flex";
11923
-
11924
- // if (config.direction) {
11925
- // element.style.flexDirection = config.direction;
11926
- // }
11927
-
11928
12377
  config.children.forEach(function (childConfig) {
11929
- var childElement = _this.HjRo(childConfig);
12378
+ var childElement = _this.KDYj(childConfig);
11930
12379
  element.appendChild(childElement);
11931
12380
  });
11932
12381
  }
11933
12382
  if (config.type === "img") {
12383
+ var _config$properties3, _config$properties4, _window6, _window6$getFilePath;
12384
+ var src = config === null || config === void 0 || (_config$properties3 = config.properties) === null || _config$properties3 === void 0 ? void 0 : _config$properties3.src;
12385
+ var format = config === null || config === void 0 || (_config$properties4 = config.properties) === null || _config$properties4 === void 0 ? void 0 : _config$properties4.format;
12386
+ element["src"] = src && format ? ((_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || (_window6$getFilePath = _window6.getFilePath) === null || _window6$getFilePath === void 0 ? void 0 : _window6$getFilePath.call(_window6, _this.configId, src, format)) || src : src;
12387
+ _this.imageElements.push(element);
11934
12388
  var imgWrapper = document.createElement("div");
12389
+ var _styleObject = parseCSS(config.css);
12390
+ Object.keys(imgWrapperStyles).forEach(function (prop) {
12391
+ if (prop in _styleObject) {
12392
+ imgWrapper.style[imgWrapperStyles[prop]] = _styleObject[prop];
12393
+ }
12394
+ });
12395
+ element.style.maxWidth = "100%";
12396
+ element.style.height = "auto";
12397
+ element.style.display = "flex";
11935
12398
  imgWrapper.appendChild(element);
11936
12399
  return imgWrapper;
12400
+ } else if (config.type === "video") {
12401
+ _this.videoElements.push(element);
11937
12402
  }
11938
12403
  return element;
11939
12404
  });
12405
+ _defineProperty(this, "eBcX", function (e, action) {
12406
+ var _window$Apxor4, _this$config11, _this$config12, _window$Apxor5, _this$config13, _this$config14, _this$config15, _this$config16;
12407
+ var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
12408
+ var additional_info = {
12409
+ apx_nudge_name: _this.name,
12410
+ apx_nudge_id: ((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios" ? (_this$config11 = _this.config) === null || _this$config11 === void 0 || (_this$config11 = _this$config11.additional_info) === null || _this$config11 === void 0 ? void 0 : _this$config11.id : _this.configId,
12411
+ apx_template_name: _this.type,
12412
+ apx_variant_code: (_this$config12 = _this.config) === null || _this$config12 === void 0 || (_this$config12 = _this$config12.additional_info) === null || _this$config12 === void 0 ? void 0 : _this$config12.apx_variant_code,
12413
+ apx_step: ((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) === "ios" ? (_this$config13 = _this.config) !== null && _this$config13 !== void 0 && (_this$config13 = _this$config13.additional_info) !== null && _this$config13 !== void 0 && _this$config13.is_preview ? 1 : (_this$config14 = _this.config) === null || _this$config14 === void 0 || (_this$config14 = _this$config14.additional_info) === null || _this$config14 === void 0 ? void 0 : _this$config14.apx_step : (_this$config15 = _this.config) !== null && _this$config15 !== void 0 && (_this$config15 = _this$config15.additional_info) !== null && _this$config15 !== void 0 && _this$config15.is_preview ? 1 : (_this$config16 = _this.config) === null || _this$config16 === void 0 || (_this$config16 = _this$config16.additional_info) === null || _this$config16 === void 0 ? void 0 : _this$config16.apx_step
12414
+ };
12415
+ if (e.target.tagName === "BUTTON") {
12416
+ var _window$ApxorRTM2;
12417
+ if (action != "never") {
12418
+ var _e$target$innerHTML, _e$target;
12419
+ additional_info["apx_cta_name"] = (_e$target$innerHTML = e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.innerHTML) !== null && _e$target$innerHTML !== void 0 ? _e$target$innerHTML : "";
12420
+ }
12421
+ (_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("apx_nudge_CTA_clicked", additional_info);
12422
+ }
12423
+ if (action == "never") {
12424
+ var _window$ApxorRTM3;
12425
+ additional_info["apx_termination_type"] = "never show cta clicked";
12426
+ (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_terminated", additional_info);
12427
+ }
12428
+ if (type != "") {
12429
+ _this.closeCallBack(action, type);
12430
+ } else {
12431
+ _this.closeCallBack(action);
12432
+ }
12433
+ });
12434
+ _defineProperty(this, "Wrko", function () {
12435
+ //This logic is to make sure that image has loaded, it doesn't check whether image is broken
12436
+ //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
12437
+ if (_this.imageElements.length === 0) return true;
12438
+ return _this.imageElements.every(function (img) {
12439
+ return img.complete;
12440
+ });
12441
+ });
12442
+ _defineProperty(this, "OIYp", function () {
12443
+ if (!_this.bgImageUrl) return true;
12444
+ var img = new Image();
12445
+ img.src = _this.bgImageUrl;
12446
+ return img.complete;
12447
+ });
12448
+ _defineProperty(this, "gDMN", function () {
12449
+ if (_this.videoElements.length === 0) return true;
12450
+ return _this.videoElements.every(function (video) {
12451
+ return video.readyState >= 3;
12452
+ });
12453
+ });
11940
12454
  this.configId = configId;
12455
+ this.config = _config;
11941
12456
  this.name = name;
11942
12457
  this.layout = _config.layout;
11943
- this.styleContent = _config.css;
12458
+ this.styleContent = _config === null || _config === void 0 ? void 0 : _config.css;
12459
+ this.wait_interval = (_config$wait_interval = _config === null || _config === void 0 ? void 0 : _config.wait_interval) !== null && _config$wait_interval !== void 0 ? _config$wait_interval : 5000 / 100;
11944
12460
  this.termination = (_config$termination = _config.termination) !== null && _config$termination !== void 0 ? _config$termination : [];
11945
- this.script = _config.script;
11946
- this.type = type;
12461
+ this.script = _config === null || _config === void 0 ? void 0 : _config.script;
12462
+ this.type = _type;
11947
12463
  this.initialStyles = "";
12464
+ this.imageElements = [];
12465
+ this.videoElements = [];
12466
+ this.bgImageUrl = "";
12467
+ this.intervalToCheckMediaLoadingStatus = null;
12468
+ this.loggedNudgeNotShownEvent = false;
12469
+ this.closeCallBack = closeCallback;
11948
12470
  });
11949
12471
 
11950
12472
  var svgNS$1 = "http://www.w3.org/2000/svg";
@@ -12467,7 +12989,7 @@
12467
12989
  if (this.enable_arrow) this.arrow = new Arrow(config.arrow, this.background_color);
12468
12990
  this.enable_animation = config.enable_animation;
12469
12991
  if (this.enable_animation) this.animation = new Animation(config.animation);
12470
- this.templateContent = new TemplateContent(config, this.configId, this.name, "inline");
12992
+ this.templateContent = new TemplateContent(config, this.configId, this.name, "tooltip", this.closeInlineCallback.bind(this));
12471
12993
  this.set_font_to_scale = (_config$set_font_to_s = config.set_font_to_scale) !== null && _config$set_font_to_s !== void 0 ? _config$set_font_to_s : false;
12472
12994
  this.fontMultiplier = this.set_font_to_scale ? getFontMultiplier() : 1;
12473
12995
  this.fontMultiplier = this.fontMultiplier > 1 ? this.fontMultiplier : 1;
@@ -12498,20 +13020,42 @@
12498
13020
  //If a tooltip can be created
12499
13021
  if (canCreate) {
12500
13022
  // Called when the target element comes into the viewport to show the tooltip
12501
- var targetReachedCallback = function targetReachedCallback() {
12502
- //Set the tooltip dimensions.
12503
- //this._setInLineDimensions();
12504
- //Set the InLine styles
12505
- _this._setInlineStyles();
12506
- //Set the offset to properly align arrow w.r.t view element
12507
- //this._offsetAdjustment();
12508
- //Set the content
12509
- _this._setInLineContent();
12510
- // Set the obervors.
12511
- _this._setObservors();
12512
- // Create a tippy instance
12513
- _this._createTippyInstance();
12514
- };
13023
+ var targetReachedCallback = /*#__PURE__*/function () {
13024
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
13025
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13026
+ while (1) switch (_context.prev = _context.next) {
13027
+ case 0:
13028
+ _context.prev = 0;
13029
+ //Set the tooltip dimensions.
13030
+ //this._setInLineDimensions();
13031
+ //Set the InLine styles
13032
+ _this._setInlineStyles();
13033
+ //Set the offset to properly align arrow w.r.t view element
13034
+ //this._offsetAdjustment();
13035
+ //Set the content
13036
+ _context.next = 4;
13037
+ return _this._setInLineContent();
13038
+ case 4:
13039
+ // Set the obervors.
13040
+ _this._setObservors();
13041
+ // Create a tippy instance
13042
+ _this._createTippyInstance();
13043
+ _context.next = 11;
13044
+ break;
13045
+ case 8:
13046
+ _context.prev = 8;
13047
+ _context.t0 = _context["catch"](0);
13048
+ console.log("failed to create the inline after finding the target element with error ".concat(_context.t0));
13049
+ case 11:
13050
+ case "end":
13051
+ return _context.stop();
13052
+ }
13053
+ }, _callee, null, [[0, 8]]);
13054
+ }));
13055
+ return function targetReachedCallback() {
13056
+ return _ref.apply(this, arguments);
13057
+ };
13058
+ }();
12515
13059
 
12516
13060
  // Called when the valid target is found to show the tooltip
12517
13061
  var targetValidCallback = function targetValidCallback() {
@@ -12659,7 +13203,7 @@
12659
13203
  animationStyles = "\n @-webkit-keyframes ".concat(this.animation.type, " {\n 0% { transform: ").concat(translateDir(this.position.position, 0), "; }\n 50% { transform: ").concat(translateDir(this.position.position, 50), "; }\n 100% { transform: ").concat(translateDir(this.position.position, 100), "; }\n }\n \n @keyframes ").concat(this.animation.type, " {\n 0% { transform: ").concat(translateDir(this.position.position, 0), "; }\n 50% { transform: ").concat(translateDir(this.position.position, 50), "; }\n 100% { transform: ").concat(translateDir(this.position.position, 100), "; }\n }\n \n .tippy-box {\n animation-name: ").concat(this.animation.type, ";\n animation-duration: ").concat(this.animation.duration, "ms;\n animation-timing-function: ").concat(this.animation.anim_function, ";\n animation-iteration-count: ").concat(this.animation.iteration_count, ";\n }\n ");
12660
13204
  }
12661
13205
  // Do not modify these. These tippy styles.
12662
- var tippyStyles = "\n .tippy-box[data-animation=\"fade\"][data-state=hidden]{\n opacity:0;\n } \n [data-tippy-root] {\n max-width:calc(100vw - ".concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.width : 0, "px);\n } \n .tippy-box { \n position:relative;\n line-height:1.4;\n white-space:normal;\n outline:0;\n transition-property:transform,visibility,opacity;\n } \n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n ").concat(tippyTopArrowStyle, "\n border-top-color:initial;\n transform-origin:center top;\n }\n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n ").concat(tippyBottomArrowStyle, "\n border-bottom-color:initial;\n transform-origin:center bottom;\n }\n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n ").concat(tippyLeftArrowStyle, "\n border-left-color:initial;\n transform-origin:center left;\n }\n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n ").concat(tippyRightArrowStyle, "\n border-right-color:initial;\n transform-origin:center right;\n } \n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)\n } \n .tippy-arrow {\n z-index:9999;\n width:18px;\n height:18px;\n color:").concat(this.enable_arrow ? this.arrow.color : "transparent", ";\n opacity:0;\n visibility:hidden;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n } \n .tippy-arrow.open {\n opacity:1;\n visibility:visible;\n }\n .tippy-arrow:before{ \n content:\"\";\n position:absolute;\n border-color:transparent;\n border-style:").concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.style : "solid", ";\n } \n .tippy-content {\n padding: 0.3125rem 0.5625rem;\n position:relative;\n z-index:9998;\n } \n ").concat(animationStyles, "\n ");
13206
+ var tippyStyles = "\n .tippy-box[data-animation=\"fade\"][data-state=hidden]{\n opacity:0;\n } \n [data-tippy-root] {\n max-width:calc(100vw - ".concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.width : 0, "px);\n } \n .tippy-box { \n position:relative;\n line-height:1.4;\n white-space:normal;\n outline:0;\n transition-property:transform,visibility,opacity;\n } \n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n ").concat(tippyTopArrowStyle, "\n border-top-color:initial;\n transform-origin:center top;\n }\n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n ").concat(tippyBottomArrowStyle, "\n border-bottom-color:initial;\n transform-origin:center bottom;\n }\n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n ").concat(tippyLeftArrowStyle, "\n border-left-color:initial;\n transform-origin:center left;\n }\n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n ").concat(tippyRightArrowStyle, "\n border-right-color:initial;\n transform-origin:center right;\n } \n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)\n } \n .tippy-arrow {\n z-index:9999;\n width:18px;\n height:18px;\n color:").concat(this.enable_arrow ? this.arrow.color : "transparent", ";\n opacity:0;\n visibility:hidden;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n } \n .tippy-arrow.open {\n opacity:1;\n visibility:visible;\n }\n .tippy-arrow:before{ \n content:\"\";\n position:absolute;\n border-color:transparent;\n border-style:").concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.style : "solid", ";\n } \n .tippy-content {\n position:relative;\n z-index:9998;\n } \n ").concat(animationStyles, "\n ");
12663
13207
  var tippyTheme = "\n ".concat(tippyStyles, "\n ");
12664
13208
  return tippyTheme;
12665
13209
  }
@@ -12828,9 +13372,33 @@
12828
13372
  }
12829
13373
  }, {
12830
13374
  key: "_setInLineContent",
12831
- value: function _setInLineContent() {
12832
- this.inLineContainer = this.templateContent.KyAi();
12833
- }
13375
+ value: function () {
13376
+ var _setInLineContent2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
13377
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
13378
+ while (1) switch (_context2.prev = _context2.next) {
13379
+ case 0:
13380
+ _context2.prev = 0;
13381
+ _context2.next = 3;
13382
+ return this.templateContent.UYsM();
13383
+ case 3:
13384
+ this.inLineContainer = _context2.sent;
13385
+ _context2.next = 9;
13386
+ break;
13387
+ case 6:
13388
+ _context2.prev = 6;
13389
+ _context2.t0 = _context2["catch"](0);
13390
+ console.log("failed at creating template content with error ".concat(_context2.t0));
13391
+ case 9:
13392
+ case "end":
13393
+ return _context2.stop();
13394
+ }
13395
+ }, _callee2, this, [[0, 6]]);
13396
+ }));
13397
+ function _setInLineContent() {
13398
+ return _setInLineContent2.apply(this, arguments);
13399
+ }
13400
+ return _setInLineContent;
13401
+ }()
12834
13402
  }, {
12835
13403
  key: "_setObservors",
12836
13404
  value: function _setObservors() {
@@ -13115,6 +13683,12 @@
13115
13683
  console.error("Could not remove the tooltip styles:" + e);
13116
13684
  }
13117
13685
  }
13686
+ }, {
13687
+ key: "closeInlineCallback",
13688
+ value: function closeInlineCallback(action) {
13689
+ clearTimeout(this.terminationTimeoutId);
13690
+ this.closeCallback(action === "cancel" || action === "redirect" ? true : false);
13691
+ }
13118
13692
  }]);
13119
13693
  return NewInLineTooltip;
13120
13694
  }();
@@ -14368,6 +14942,8 @@
14368
14942
  function InLineTooltip(config, uis, walkthroughConfigs, terminationConfig, messageConfig, rtmInstance, showCallback, hideCallback, stepperCallBack) {
14369
14943
  var _this = this,
14370
14944
  _config$set_font_to_s,
14945
+ _this$uiConfig,
14946
+ _this$uiConfig2,
14371
14947
  _config$wait_scroll_i,
14372
14948
  _config$wait_scroll_i2;
14373
14949
  var isWalkthrough = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
@@ -14379,7 +14955,7 @@
14379
14955
  * @description Creates the styles for Marketing message.
14380
14956
  * @returns {string} css styles
14381
14957
  */
14382
- _defineProperty(this, "VrCy", function () {
14958
+ _defineProperty(this, "CJFJ", function () {
14383
14959
  if (!_this.enable_marketing) {
14384
14960
  return "";
14385
14961
  }
@@ -14398,7 +14974,7 @@
14398
14974
  * @private
14399
14975
  * @description Sets the marketing content at the end of the Inline
14400
14976
  */
14401
- _defineProperty(this, "wQRV", function () {
14977
+ _defineProperty(this, "CBmX", function () {
14402
14978
  if (_this.enable_marketing) {
14403
14979
  var marketingContainer = document.createElement("div");
14404
14980
  marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
@@ -14503,6 +15079,7 @@
14503
15079
  this.initial_data_placement = this.position.position;
14504
15080
  this.recent_placement = this.position.position;
14505
15081
  this.tippy_box_position = 0;
15082
+ this.step = (_this$uiConfig = this.uiConfig) !== null && _this$uiConfig !== void 0 && (_this$uiConfig = _this$uiConfig.additional_info) !== null && _this$uiConfig !== void 0 && _this$uiConfig.apx_step ? (_this$uiConfig2 = this.uiConfig) === null || _this$uiConfig2 === void 0 || (_this$uiConfig2 = _this$uiConfig2.additional_info) === null || _this$uiConfig2 === void 0 ? void 0 : _this$uiConfig2.apx_step : -1;
14506
15083
 
14507
15084
  //badge related config
14508
15085
  this.flag = true;
@@ -14985,7 +15562,12 @@
14985
15562
  this.tooltip.setProps({
14986
15563
  onClickOutside: function onClickOutside() {
14987
15564
  if (_this6.enable_dismiss_actions && _this6.dismiss_actions.outside_touch) {
15565
+ var _this6$uiConfig;
14988
15566
  _this6._destroyTooltip();
15567
+ if ((_this6$uiConfig = _this6.uiConfig) !== null && _this6$uiConfig !== void 0 && (_this6$uiConfig = _this6$uiConfig.additional_info) !== null && _this6$uiConfig !== void 0 && _this6$uiConfig.apx_step) {
15568
+ var _window2, _this6$uiConfig2;
15569
+ (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || _window2.triggerNextStep(_this6.configId, ((_this6$uiConfig2 = _this6.uiConfig) === null || _this6$uiConfig2 === void 0 || (_this6$uiConfig2 = _this6$uiConfig2.additional_info) === null || _this6$uiConfig2 === void 0 ? void 0 : _this6$uiConfig2.apx_step) + 1);
15570
+ }
14989
15571
  }
14990
15572
  }
14991
15573
  });
@@ -15004,7 +15586,7 @@
15004
15586
  if (apxor_tooltip_styles) {
15005
15587
  return;
15006
15588
  }
15007
- 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.VrCy(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15589
+ var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInLineContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInLineMediaContainerStyles(), "\n ").concat(this._getInLineNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getInLineButtonContainerStyles(), " \n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.CJFJ(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15008
15590
  var styleNode = document.createElement("style");
15009
15591
  styleNode.setAttribute("apx-tooltip-styles", "");
15010
15592
  styleNode.innerHTML = styles;
@@ -15814,7 +16396,7 @@
15814
16396
  this._setCloseButton();
15815
16397
 
15816
16398
  //Set the Marketing content
15817
- this.wQRV();
16399
+ this.CBmX();
15818
16400
  }
15819
16401
 
15820
16402
  /**
@@ -16148,7 +16730,7 @@
16148
16730
  } else {
16149
16731
  buttons_config = this.buttons.bottom;
16150
16732
  }
16151
- var _Buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INLINE, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index, this.fontMultiplier);
16733
+ var _Buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INLINE, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index, "center", this.fontMultiplier, this.step);
16152
16734
  if (position === BUTTON_CONTAINER_POSITION.TOP) {
16153
16735
  this.topButtonContainer.appendChild(_Buttons);
16154
16736
  } else if (position === BUTTON_CONTAINER_POSITION.CENTER) {
@@ -16633,8 +17215,13 @@
16633
17215
  key: "_targetClickCallback",
16634
17216
  value: function _targetClickCallback() {
16635
17217
  if (this.enable_dismiss_actions && this.dismiss_actions.target_touch) {
17218
+ var _this$uiConfig3;
16636
17219
  this._destroyTooltip();
16637
17220
  window.Apxor.logActionEvent("InlineTargetViewClicked", this.configId, this.name);
17221
+ if ((_this$uiConfig3 = this.uiConfig) !== null && _this$uiConfig3 !== void 0 && (_this$uiConfig3 = _this$uiConfig3.additional_info) !== null && _this$uiConfig3 !== void 0 && _this$uiConfig3.apx_step) {
17222
+ var _window3, _this$uiConfig4;
17223
+ (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || _window3.triggerNextStep(this.configId, ((_this$uiConfig4 = this.uiConfig) === null || _this$uiConfig4 === void 0 || (_this$uiConfig4 = _this$uiConfig4.additional_info) === null || _this$uiConfig4 === void 0 ? void 0 : _this$uiConfig4.apx_step) + 1);
17224
+ }
16638
17225
  }
16639
17226
  }
16640
17227
 
@@ -16647,7 +17234,12 @@
16647
17234
  }, {
16648
17235
  key: "_dimbackgroundClickCallback",
16649
17236
  value: function _dimbackgroundClickCallback() {
17237
+ var _this$uiConfig5;
16650
17238
  this._destroyTooltip(false);
17239
+ if ((_this$uiConfig5 = this.uiConfig) !== null && _this$uiConfig5 !== void 0 && (_this$uiConfig5 = _this$uiConfig5.additional_info) !== null && _this$uiConfig5 !== void 0 && _this$uiConfig5.apx_step) {
17240
+ var _window4, _this$uiConfig6;
17241
+ (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || _window4.triggerNextStep(this.configId, ((_this$uiConfig6 = this.uiConfig) === null || _this$uiConfig6 === void 0 || (_this$uiConfig6 = _this$uiConfig6.additional_info) === null || _this$uiConfig6 === void 0 ? void 0 : _this$uiConfig6.apx_step) + 1);
17242
+ }
16651
17243
  }
16652
17244
 
16653
17245
  /**
@@ -17046,7 +17638,7 @@
17046
17638
  var DEFAULT_PADDING$1 = 5;
17047
17639
  var InLineCoachMark = /*#__PURE__*/function () {
17048
17640
  function InLineCoachMark(config, uis, walkthroughConfigs, terminationConfig, messageConfig, rtmInstance, showCallback, hideCallback, stepperCallBack) {
17049
- var _config$content, _config$content2;
17641
+ var _config$content, _config$content2, _this$uiConfig, _this$uiConfig2;
17050
17642
  var isWalkthrough = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
17051
17643
  var index = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : 0;
17052
17644
  _classCallCheck(this, InLineCoachMark);
@@ -17091,6 +17683,7 @@
17091
17683
  }
17092
17684
  this.content_enable_buttons = (_config$content = config.content) === null || _config$content === void 0 ? void 0 : _config$content.enable_buttons;
17093
17685
  if (this.content_enable_buttons) this.buttons = new CoachmarkButtons((_config$content2 = config.content) === null || _config$content2 === void 0 ? void 0 : _config$content2.coachmark_buttons);
17686
+ this.step = (_this$uiConfig = this.uiConfig) !== null && _this$uiConfig !== void 0 && (_this$uiConfig = _this$uiConfig.additional_info) !== null && _this$uiConfig !== void 0 && _this$uiConfig.apx_step ? (_this$uiConfig2 = this.uiConfig) === null || _this$uiConfig2 === void 0 || (_this$uiConfig2 = _this$uiConfig2.additional_info) === null || _this$uiConfig2 === void 0 ? void 0 : _this$uiConfig2.apx_step : -1;
17094
17687
  this.targetElement = null;
17095
17688
  this.inline_width = "auto";
17096
17689
  this.inline_height = "auto";
@@ -17313,8 +17906,13 @@
17313
17906
  key: "_targetClickCallback",
17314
17907
  value: function _targetClickCallback() {
17315
17908
  if (this.enable_dismiss_actions && this.dismiss_actions.target_touch) {
17909
+ var _this$uiConfig3;
17316
17910
  this.rtmInstance.logActionEvent("InlineTargetViewClicked", this.configId, this.name);
17317
17911
  this._destroyCoachMark();
17912
+ if ((_this$uiConfig3 = this.uiConfig) !== null && _this$uiConfig3 !== void 0 && (_this$uiConfig3 = _this$uiConfig3.additional_info) !== null && _this$uiConfig3 !== void 0 && _this$uiConfig3.apx_step) {
17913
+ var _window, _this$uiConfig4;
17914
+ (_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || _window.triggerNextStep(this.configId, ((_this$uiConfig4 = this.uiConfig) === null || _this$uiConfig4 === void 0 || (_this$uiConfig4 = _this$uiConfig4.additional_info) === null || _this$uiConfig4 === void 0 ? void 0 : _this$uiConfig4.apx_step) + 1);
17915
+ }
17318
17916
  }
17319
17917
  }
17320
17918
  }, {
@@ -18007,7 +18605,7 @@
18007
18605
  }
18008
18606
  }
18009
18607
  }
18010
- var Buttons = generateButtonsBlock(this.configId, this.name, {}, EVENT_PREFIX.INLINE, buttons_config, this.buttons.direction, "bottom", actionHandler, this.isWalkthrough, this.uis, this.index, this.buttons.alignment, this.fontMultiplier);
18608
+ var Buttons = generateButtonsBlock(this.configId, this.name, {}, EVENT_PREFIX.INLINE, buttons_config, this.buttons.direction, "bottom", actionHandler, this.isWalkthrough, this.uis, this.index, this.buttons.alignment, this.fontMultiplier, this.step);
18011
18609
  this.buttonContainer.appendChild(Buttons);
18012
18610
  }
18013
18611
 
@@ -18558,13 +19156,16 @@
18558
19156
  _classCallCheck(this, NewModalInApp);
18559
19157
  _defineProperty(this, "closeListener", function () {
18560
19158
  clearTimeout(_this.terminationTimeoutId);
18561
- _this.closeCallback(_this.overlayElement, "dismiss", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
19159
+ _this.closeCallback(_this.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
18562
19160
  });
18563
19161
  _defineProperty(this, "redirectionListener", function () {
18564
19162
  if (window.location.href !== _this.launchPageUrl) {
18565
- _this.closeCallback(_this.overlayElement, "dismiss", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
19163
+ _this.closeCallback(_this.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
18566
19164
  }
18567
19165
  });
19166
+ this.configId = configId;
19167
+ this.config = config;
19168
+ this.name = name;
18568
19169
  this.terminationConfig = terminationConfig;
18569
19170
  this.terminationTimeoutId = null;
18570
19171
  this.cssPostFix = "-".concat(configId, "-").concat(name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
@@ -18577,31 +19178,53 @@
18577
19178
  if (this.enable_dismiss_actions) this.dismiss_actions = new DismissActions(config.dismiss_actions);
18578
19179
  this.enable_dimbackground = config.enable_dimbackground;
18579
19180
  if (this.enable_dimbackground) this.dimbackground = new DimBackground(config.dimbackground);
18580
- this.templateContent = new TemplateContent(config, this.configId, this.name, "inapp");
18581
- this.configId = configId;
18582
- this.name = name;
18583
19181
  this.showCallback = showCallback;
18584
19182
  this.closeCallback = closeCallback;
18585
19183
  this.dimBackgroundElement = null;
18586
19184
  this.overlayElement = null;
18587
19185
  this.inAppContainer = null;
18588
19186
  this.launchPageUrl = "";
19187
+ this.templateContent = new TemplateContent(config, this.configId, this.name, "inapp", this.closeInappCallback.bind(this));
18589
19188
  }
18590
19189
  _createClass(NewModalInApp, [{
18591
19190
  key: "createInAppModal",
18592
- value: function createInAppModal() {
18593
- //Set the background overlays
18594
- this._setBackgroundOverlays();
18595
- //Set the InApp styles
18596
- this._setStyles();
18597
- //Set the content
18598
- this._setInAppModalContent();
18599
- this._setPosition();
18600
- //Set the auto termination
18601
- this._setAutoTerminate();
18602
- //Show the InApp
18603
- this._showInApp();
18604
- }
19191
+ value: function () {
19192
+ var _createInAppModal = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
19193
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
19194
+ while (1) switch (_context.prev = _context.next) {
19195
+ case 0:
19196
+ _context.prev = 0;
19197
+ //Set the background overlays
19198
+ this._setBackgroundOverlays();
19199
+ //Set the InApp styles
19200
+ this._setStyles();
19201
+ //Set the content
19202
+ _context.next = 5;
19203
+ return this._setInAppModalContent();
19204
+ case 5:
19205
+ //set the position
19206
+ this._setPosition();
19207
+ //Set the auto termination
19208
+ this._setAutoTerminate();
19209
+ //Show the InApp
19210
+ this._showInApp();
19211
+ _context.next = 13;
19212
+ break;
19213
+ case 10:
19214
+ _context.prev = 10;
19215
+ _context.t0 = _context["catch"](0);
19216
+ console.log("creating Modal Template failed with error ".concat(_context.t0));
19217
+ case 13:
19218
+ case "end":
19219
+ return _context.stop();
19220
+ }
19221
+ }, _callee, this, [[0, 10]]);
19222
+ }));
19223
+ function createInAppModal() {
19224
+ return _createInAppModal.apply(this, arguments);
19225
+ }
19226
+ return createInAppModal;
19227
+ }()
18605
19228
  }, {
18606
19229
  key: "_setBackgroundOverlays",
18607
19230
  value: function _setBackgroundOverlays() {
@@ -18624,9 +19247,14 @@
18624
19247
  this.overlayElement.appendChild(this.dimBackgroundElement);
18625
19248
  if (this.enable_dismiss_actions && this.dismiss_actions.outside_touch) {
18626
19249
  dismissableElement.onclick = function () {
19250
+ var _this2$config;
18627
19251
  clearTimeout(_this2.terminationTimeoutId);
18628
19252
  dismissableElement.onclick = null;
18629
- _this2.closeCallback(_this2.overlayElement, "dismiss", ".apx-inapp-container".concat(_this2.cssPostFix), _this2.closeListener, _this2.redirectionListener);
19253
+ if ((_this2$config = _this2.config) !== null && _this2$config !== void 0 && (_this2$config = _this2$config.additional_info) !== null && _this2$config !== void 0 && _this2$config.apx_step) {
19254
+ var _window, _this2$config2;
19255
+ (_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || _window.triggerNextStep(_this2.configId, ((_this2$config2 = _this2.config) === null || _this2$config2 === void 0 || (_this2$config2 = _this2$config2.additional_info) === null || _this2$config2 === void 0 ? void 0 : _this2$config2.apx_step) + 1);
19256
+ }
19257
+ _this2.closeCallback(_this2.overlayElement, "dismiss", "outside-touch", ".apx-inapp-container".concat(_this2.cssPostFix), _this2.closeListener, _this2.redirectionListener);
18630
19258
  };
18631
19259
  }
18632
19260
  } else {
@@ -18637,8 +19265,6 @@
18637
19265
  if (!this.enable_dimbackground) {
18638
19266
  document.body.addEventListener("click", this.redirectionListener);
18639
19267
  }
18640
- // Append the overlay to the body. All the element of the InApp are children of this overlay.
18641
- document.body.appendChild(this.overlayElement);
18642
19268
  }
18643
19269
  }, {
18644
19270
  key: "_setStyles",
@@ -18653,16 +19279,45 @@
18653
19279
  key: "_getBackgroundContainerStyles",
18654
19280
  value: function _getBackgroundContainerStyles() {
18655
19281
  // Set the dim background color and opacity only if dim background is enabled.
18656
- var backgroundContainerStyle = "\n .apx-inapp-overlay".concat(this.cssPostFix, " {\n width:100%;\n height:100%;\n }\n .apx-inapp-dimbackground-overlay").concat(this.cssPostFix, " {\n width:100%;\n height:100%;\n position:fixed;\n top:0;\n left:0;\n z-index:999;\n background-color:").concat(this.enable_dimbackground ? this.dimbackground.color : "transparent", ";\n ").concat(this.enable_dimbackground ? "opacity: ".concat(this.dimbackground.opacity, ";") : "", "\n overflow: auto;\n }\n ");
19282
+ var backgroundContainerStyle = "\n .apx-inapp-overlay".concat(this.cssPostFix, " {\n width:100%;\n height:100%;\n }\n .apx-inapp-dimbackground-overlay").concat(this.cssPostFix, " {\n width:100%;\n height:100%;\n position:fixed;\n top:0;\n left:0;\n z-index:999;\n background-color:").concat(this.enable_dimbackground ? this.dimbackground.color : "transparent", ";\n overflow: auto;\n }\n ");
18657
19283
  return backgroundContainerStyle;
18658
19284
  }
18659
19285
  }, {
18660
19286
  key: "_setInAppModalContent",
18661
- value: function _setInAppModalContent() {
18662
- this.inAppContainer = this.templateContent.KyAi();
18663
- this.inAppContainer.style.zIndex = 99999;
18664
- this.overlayElement.appendChild(this.inAppContainer);
18665
- }
19287
+ value: function () {
19288
+ var _setInAppModalContent2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
19289
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
19290
+ while (1) switch (_context2.prev = _context2.next) {
19291
+ case 0:
19292
+ _context2.prev = 0;
19293
+ _context2.next = 3;
19294
+ return this.templateContent.UYsM();
19295
+ case 3:
19296
+ this.inAppContainer = _context2.sent;
19297
+ this.inAppContainer.style.zIndex = 99999;
19298
+ this.overlayElement.appendChild(this.inAppContainer);
19299
+ if (this.enable_dismiss_actions && this.dismiss_actions.outside_touch) {
19300
+ this.inAppContainer.onclick = function (event) {
19301
+ event.stopPropagation();
19302
+ };
19303
+ }
19304
+ _context2.next = 12;
19305
+ break;
19306
+ case 9:
19307
+ _context2.prev = 9;
19308
+ _context2.t0 = _context2["catch"](0);
19309
+ console.log("failed at creating template content with error ".concat(_context2.t0));
19310
+ case 12:
19311
+ case "end":
19312
+ return _context2.stop();
19313
+ }
19314
+ }, _callee2, this, [[0, 9]]);
19315
+ }));
19316
+ function _setInAppModalContent() {
19317
+ return _setInAppModalContent2.apply(this, arguments);
19318
+ }
19319
+ return _setInAppModalContent;
19320
+ }()
18666
19321
  }, {
18667
19322
  key: "_setPosition",
18668
19323
  value: function _setPosition() {
@@ -18702,6 +19357,18 @@
18702
19357
  this.inAppContainer.style.webkitTransform = "translate(-50%, -50%)";
18703
19358
  this.inAppContainer.style.MozTransform = "translate(-50%, -50%);";
18704
19359
  break;
19360
+ case INAPP_POSITION.LEFT:
19361
+ this.inAppContainer.style.top = "50%";
19362
+ this.inAppContainer.style.left = "0px";
19363
+ this.inAppContainer.style.webkitTransform = "translate(0px, -50%)";
19364
+ this.inAppContainer.style.MozTransform = "translate(0px, -50%)";
19365
+ break;
19366
+ case INAPP_POSITION.RIGHT:
19367
+ this.inAppContainer.style.top = "50%";
19368
+ this.inAppContainer.style.right = "0px";
19369
+ this.inAppContainer.style.webkitTransform = "translate(0px, -50%)";
19370
+ this.inAppContainer.style.MozTransform = "translate(0px, -50%)";
19371
+ break;
18705
19372
  default:
18706
19373
  this.inAppContainer.style.top = "50%";
18707
19374
  this.inAppContainer.style.left = "50%";
@@ -18716,14 +19383,28 @@
18716
19383
  var _this3 = this;
18717
19384
  if (this.terminationConfig.auto_dismiss === true) {
18718
19385
  this.terminationTimeoutId = window.setTimeout(function () {
18719
- _this3.closeCallback(_this3.overlayElement, "dismiss", ".apx-inapp-container".concat(_this3.cssPostFix), _this3.closeListener, _this3.redirectionListener);
19386
+ var _this3$config;
19387
+ if ((_this3$config = _this3.config) !== null && _this3$config !== void 0 && (_this3$config = _this3$config.additional_info) !== null && _this3$config !== void 0 && _this3$config.apx_step) {
19388
+ var _window2, _this3$config2;
19389
+ (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || _window2.triggerNextStep(_this3.configId, ((_this3$config2 = _this3.config) === null || _this3$config2 === void 0 || (_this3$config2 = _this3$config2.additional_info) === null || _this3$config2 === void 0 ? void 0 : _this3$config2.apx_step) + 1);
19390
+ }
19391
+ _this3.closeCallback(_this3.overlayElement, "dismiss", "auto-dismiss", ".apx-inapp-container".concat(_this3.cssPostFix), _this3.closeListener, _this3.redirectionListener);
18720
19392
  }, this.terminationConfig.duration);
18721
19393
  }
18722
19394
  }
19395
+ }, {
19396
+ key: "closeInappCallback",
19397
+ value: function closeInappCallback(action) {
19398
+ var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
19399
+ clearTimeout(this.terminationTimeoutId);
19400
+ this.closeCallback(this.overlayElement, action, type, ".apx-inapp-container".concat(this.cssPostFix), this.closeListener, this.redirectionListener);
19401
+ }
18723
19402
  }, {
18724
19403
  key: "_showInApp",
18725
19404
  value: function _showInApp() {
18726
19405
  this.inAppContainer.classList.toggle("open");
19406
+ // Append the overlay to the body. All the element of the InApp are children of this overlay.
19407
+ document.body.appendChild(this.overlayElement);
18727
19408
  this.showCallback();
18728
19409
  }
18729
19410
  }]);
@@ -18788,17 +19469,19 @@
18788
19469
  * @param {function} closeCallback
18789
19470
  */
18790
19471
  function ModalInApp(config, terminationConfig, configId, name, showCallback, closeCallback, stepperCallBack, isWalkthrough) {
18791
- var _this = this;
19472
+ var _this = this,
19473
+ _this$config,
19474
+ _this$config2;
18792
19475
  var uis = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : {};
18793
19476
  var index = arguments.length > 9 ? arguments[9] : undefined;
18794
19477
  _classCallCheck(this, ModalInApp);
18795
19478
  _defineProperty(this, "closeListener", function () {
18796
19479
  clearTimeout(_this.terminationTimeoutId);
18797
- _this.closeCallback(_this.overlayElement, "dismiss", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
19480
+ _this.closeCallback(_this.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
18798
19481
  });
18799
19482
  _defineProperty(this, "redirectionListener", function () {
18800
19483
  if (window.location.href !== _this.launchPageUrl) {
18801
- _this.closeCallback(_this.overlayElement, "dismiss", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
19484
+ _this.closeCallback(_this.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
18802
19485
  }
18803
19486
  });
18804
19487
  /**
@@ -18807,7 +19490,7 @@
18807
19490
  * @description Creates the styles for Marketing message.
18808
19491
  * @returns {string} css styles
18809
19492
  */
18810
- _defineProperty(this, "VrCy", function () {
19493
+ _defineProperty(this, "CJFJ", function () {
18811
19494
  if (!_this.enable_marketing) {
18812
19495
  return "";
18813
19496
  }
@@ -18853,7 +19536,7 @@
18853
19536
  * @private
18854
19537
  * @description Get the response for Form content in the InApp modal.
18855
19538
  */
18856
- _defineProperty(this, "UrBX", function (form_elements) {
19539
+ _defineProperty(this, "VCQT", function (form_elements) {
18857
19540
  var obj = {};
18858
19541
  var callback = "";
18859
19542
  form_elements.forEach(function (element) {
@@ -18893,7 +19576,7 @@
18893
19576
  * @private
18894
19577
  * @description Sets the marketing content at the end of the InApp
18895
19578
  */
18896
- _defineProperty(this, "wQRV", function () {
19579
+ _defineProperty(this, "CBmX", function () {
18897
19580
  if (_this.enable_marketing) {
18898
19581
  var marketingContainer = document.createElement("div");
18899
19582
  marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
@@ -18907,6 +19590,7 @@
18907
19590
  this.terminationConfig = terminationConfig;
18908
19591
  this.terminationTimeoutId = null;
18909
19592
  this.isWalkthrough = isWalkthrough;
19593
+ this.config = config;
18910
19594
  this.cssPostFix = "-".concat(configId, "-").concat(name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
18911
19595
  this.delay = config.delay || 0;
18912
19596
  this.background_color = config.bg_color || COLORS.WHITE;
@@ -18952,6 +19636,7 @@
18952
19636
  if (this.enable_gradient) this.gradient = new Gradient(config.gradient);
18953
19637
  this.enable_marketing = config.enable_marketing;
18954
19638
  if (this.enable_marketing) this.marketing = new Marketing(config.marketing);
19639
+ this.step = (_this$config = this.config) !== null && _this$config !== void 0 && (_this$config = _this$config.additional_info) !== null && _this$config !== void 0 && _this$config.apx_step ? (_this$config2 = this.config) === null || _this$config2 === void 0 || (_this$config2 = _this$config2.additional_info) === null || _this$config2 === void 0 ? void 0 : _this$config2.apx_step : -1;
18955
19640
  this.min_width = "";
18956
19641
  this.max_width = "";
18957
19642
  this.inapp_width = "auto";
@@ -19123,7 +19808,7 @@
19123
19808
  dismissableElement.onclick = function () {
19124
19809
  clearTimeout(_this2.terminationTimeoutId);
19125
19810
  dismissableElement.onclick = null;
19126
- _this2.closeCallback(_this2.overlayElement, "dismiss", ".apx-inapp-container".concat(_this2.cssPostFix), _this2.closeListener, _this2.redirectionListener);
19811
+ _this2.closeCallback(_this2.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this2.cssPostFix), _this2.closeListener, _this2.redirectionListener);
19127
19812
  };
19128
19813
  }
19129
19814
  } else {
@@ -19146,7 +19831,7 @@
19146
19831
  }, {
19147
19832
  key: "_setStyles",
19148
19833
  value: function _setStyles() {
19149
- 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.VrCy(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
19834
+ 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.CJFJ(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
19150
19835
  var styleNode = document.createElement("style");
19151
19836
  styleNode.setAttribute("id", "apxor-style-" + this.configId);
19152
19837
  styleNode.innerHTML = styles;
@@ -19626,7 +20311,7 @@
19626
20311
  this._setCloseButton();
19627
20312
 
19628
20313
  //Set the Marketing content
19629
- this.wQRV();
20314
+ this.CBmX();
19630
20315
  }
19631
20316
 
19632
20317
  /**
@@ -19858,14 +20543,14 @@
19858
20543
  var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
19859
20544
  form.addEventListener("submit", function (e) {
19860
20545
  e.preventDefault();
19861
- var _this5$generateRespon = _this5.UrBX(_this5.form.elements),
20546
+ var _this5$generateRespon = _this5.VCQT(_this5.form.elements),
19862
20547
  obj = _this5$generateRespon.obj,
19863
20548
  callback = _this5$generateRespon.callback;
19864
20549
  var evalString = "(obj)=>" + callback + "(obj)";
19865
20550
  var evalFunction = eval(evalString);
19866
20551
  evalFunction(obj);
19867
20552
  clearTimeout(_this5.terminationTimeoutId);
19868
- _this5.closeCallback(_this5.overlayElement, "dismiss", ".apx-inapp-container".concat(_this5.cssPostFix), _this5.closeListener, _this5.redirectionListener);
20553
+ _this5.closeCallback(_this5.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this5.cssPostFix), _this5.closeListener, _this5.redirectionListener);
19869
20554
  });
19870
20555
  }
19871
20556
  }
@@ -19973,7 +20658,7 @@
19973
20658
  var overlay = this.overlayElement;
19974
20659
  var actionCallback = function actionCallback(isCancelled, action) {
19975
20660
  clearTimeout(_this6.terminationTimeoutId);
19976
- _this6.closeCallback(overlay, action, "new-inline".concat(_this6.cssPostFix), _this6.closeListener, _this6.redirectionListener);
20661
+ _this6.closeCallback(overlay, action, "", "new-inline".concat(_this6.cssPostFix), _this6.closeListener, _this6.redirectionListener);
19977
20662
  };
19978
20663
  var next_Callback = function next_Callback(id, action) {
19979
20664
  actionCallback(false, "next");
@@ -20004,7 +20689,7 @@
20004
20689
  // button_config.text.font.family = this._setFontFaceAtRule(button_config.text.font);
20005
20690
  // return button_config;
20006
20691
  // })
20007
- var _Buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INAPP, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index);
20692
+ var _Buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INAPP, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index, "center", 1, this.step);
20008
20693
  if (position === BUTTON_CONTAINER_POSITION.TOP) {
20009
20694
  this.topButtonContainer.appendChild(_Buttons);
20010
20695
  } else if (position === BUTTON_CONTAINER_POSITION.CENTER) {
@@ -20046,7 +20731,7 @@
20046
20731
  window.Apxor.logActionEvent("walk_through_cancelled", _this7.configId, _this7.name);
20047
20732
  }
20048
20733
  clearTimeout(_this7.terminationTimeoutId);
20049
- _this7.closeCallback(_this7.overlayElement, _this7.close_button.action, ".apx-inapp-container".concat(_this7.cssPostFix), _this7.closeListener, _this7.redirectionListener);
20734
+ _this7.closeCallback(_this7.overlayElement, _this7.close_button.action, "", ".apx-inapp-container".concat(_this7.cssPostFix), _this7.closeListener, _this7.redirectionListener);
20050
20735
  });
20051
20736
  this.direction.non_media === DIRECTION.VERTICAL || this.direction.nudge === DIRECTION.VERTICAL ? this.inAppContainer.appendChild(closeButton) : this.buttonContainer.appendChild(closeButton);
20052
20737
  }
@@ -20063,7 +20748,7 @@
20063
20748
  var _this8 = this;
20064
20749
  if (this.terminationConfig.auto_dismiss === true) {
20065
20750
  this.terminationTimeoutId = window.setTimeout(function () {
20066
- _this8.closeCallback(_this8.overlayElement, "dismiss", ".apx-inapp-container".concat(_this8.cssPostFix), _this8.closeListener, _this8.redirectionListener);
20751
+ _this8.closeCallback(_this8.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this8.cssPostFix), _this8.closeListener, _this8.redirectionListener);
20067
20752
  }, this.terminationConfig.duration);
20068
20753
  }
20069
20754
  }
@@ -20165,7 +20850,9 @@
20165
20850
  * @param {function} hideCallback
20166
20851
  */
20167
20852
  function VideoInApp(config, terminationConfig, configId, name, showCallback, _hideCallback) {
20168
- var _this = this;
20853
+ var _this = this,
20854
+ _this$config,
20855
+ _this$config2;
20169
20856
  _classCallCheck(this, VideoInApp);
20170
20857
  /**
20171
20858
  * @function showVideoInApp
@@ -20216,7 +20903,7 @@
20216
20903
  };
20217
20904
  } else {
20218
20905
  // As the video player is hidden by default, unhide if the mode is not PIP.
20219
- _this.lZpS();
20906
+ _this.SyyJ();
20220
20907
  }
20221
20908
  _this.showCallback();
20222
20909
  } catch (e) {
@@ -20237,7 +20924,7 @@
20237
20924
  * For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
20238
20925
  * For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
20239
20926
  */
20240
- _defineProperty(this, "Bntg", function () {
20927
+ _defineProperty(this, "Xmhy", function () {
20241
20928
  var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
20242
20929
  width = _getHeightWidthFromRe.width,
20243
20930
  height = _getHeightWidthFromRe.height;
@@ -20249,7 +20936,7 @@
20249
20936
  * @private
20250
20937
  * @description Removes the video player style element.
20251
20938
  */
20252
- _defineProperty(this, "mCTB", function () {
20939
+ _defineProperty(this, "IrHN", function () {
20253
20940
  var playerStyles = document.getElementById("apx-mpl-styles");
20254
20941
  if (playerStyles) {
20255
20942
  playerStyles.remove();
@@ -20260,7 +20947,7 @@
20260
20947
  * @private
20261
20948
  * @description Attach listeners on the video controls
20262
20949
  */
20263
- _defineProperty(this, "vJMI", function () {
20950
+ _defineProperty(this, "ZTFg", function () {
20264
20951
  // Listener for the video end. Display the CTA's when the video ends.
20265
20952
  _this.videoElement.addEventListener("ended", function () {
20266
20953
  var ctaButtons = document.getElementById("apx-cta-btn");
@@ -20375,7 +21062,7 @@
20375
21062
  * @private
20376
21063
  * @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
20377
21064
  */
20378
- _defineProperty(this, "sHYh", function () {
21065
+ _defineProperty(this, "edSQ", function () {
20379
21066
  var _this$terminationConf;
20380
21067
  if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
20381
21068
  // On Exit of the PIP,
@@ -20415,7 +21102,7 @@
20415
21102
  * @private Sets the custom controls on the video player.
20416
21103
  * PIP and close are the custom controls that are created and positions on the video.
20417
21104
  */
20418
- _defineProperty(this, "WaDM", function () {
21105
+ _defineProperty(this, "czTg", function () {
20419
21106
  _this.enable_close_button;
20420
21107
  if (_this.enable_close_button) {
20421
21108
  var closeButton = document.createElement("span");
@@ -20462,21 +21149,21 @@
20462
21149
  * @function hideVideoPlayer
20463
21150
  * @description Sets the visibility of the video player to hidden.
20464
21151
  */
20465
- _defineProperty(this, "TNFE", function () {
21152
+ _defineProperty(this, "BFUA", function () {
20466
21153
  _this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
20467
21154
  });
20468
21155
  /**
20469
21156
  * @function unhideVideoPlayer
20470
21157
  * @description Unhides video player.
20471
21158
  */
20472
- _defineProperty(this, "lZpS", function () {
21159
+ _defineProperty(this, "SyyJ", function () {
20473
21160
  _this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
20474
21161
  });
20475
21162
  /**
20476
21163
  * @function getVideoElement
20477
21164
  * @returns {HTMLElement} Video ekement
20478
21165
  */
20479
- _defineProperty(this, "FXhx", function () {
21166
+ _defineProperty(this, "iueL", function () {
20480
21167
  return _this.videoElement;
20481
21168
  });
20482
21169
  this.videoPlayer = null;
@@ -20487,6 +21174,7 @@
20487
21174
  this.height = 320;
20488
21175
  this.width = 320;
20489
21176
  this.configId = configId;
21177
+ this.config = config;
20490
21178
  this.name = name || "VideoPlayer";
20491
21179
  this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
20492
21180
  this.replayCount = 0;
@@ -20506,6 +21194,7 @@
20506
21194
  if (this.enable_pip_button) this.pip_button = new PIPButton(config.pip_button);
20507
21195
  this.video = new Video(config.video);
20508
21196
  this.pip = new PIP(config.pip);
21197
+ this.step = (_this$config = this.config) !== null && _this$config !== void 0 && (_this$config = _this$config.additional_info) !== null && _this$config !== void 0 && _this$config.apx_step ? (_this$config2 = this.config) === null || _this$config2 === void 0 || (_this$config2 = _this$config2.additional_info) === null || _this$config2 === void 0 ? void 0 : _this$config2.apx_step : -1;
20509
21198
  }
20510
21199
 
20511
21200
  /**
@@ -20528,7 +21217,7 @@
20528
21217
  this.videoPlayer.style.backgroundColor = this.bg_color;
20529
21218
 
20530
21219
  // Video has a resolution, not deviating from the resolution set the height and width.
20531
- this.Bntg();
21220
+ this.Xmhy();
20532
21221
  //Generate the styles and add them to the document head.
20533
21222
  this._setVideoPlayerStyles();
20534
21223
  //Set the position of the video player with in the 5 possible positions.
@@ -20536,16 +21225,16 @@
20536
21225
  //Create a video element,set the source and add to the container.
20537
21226
  this._setPlayerContent();
20538
21227
  //Set the listeners on the video control buttons.
20539
- this.vJMI();
21228
+ this.ZTFg();
20540
21229
  //Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
20541
- this.sHYh();
21230
+ this.edSQ();
20542
21231
  //Set the custom close and PIP controls. Not using the defaults from the html video element.
20543
21232
  //Reason - We want to position them at the top right and left positions.
20544
- this.WaDM();
21233
+ this.czTg();
20545
21234
  //Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
20546
21235
  this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
20547
21236
  //Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
20548
- this.TNFE();
21237
+ this.BFUA();
20549
21238
  //If the auto dismiss is enabled, sets the timeout to call the InApp close.
20550
21239
  this._setAutoTerminate();
20551
21240
  document.body.appendChild(this.videoPlayer);
@@ -20660,7 +21349,7 @@
20660
21349
  }
20661
21350
  }
20662
21351
  this.videoPlayer.remove();
20663
- this.mCTB();
21352
+ this.IrHN();
20664
21353
  if (closeButtonName !== "auto_dismiss") {
20665
21354
  var _window$ApxorRTM9;
20666
21355
  (_window$ApxorRTM9 = window.ApxorRTM) === null || _window$ApxorRTM9 === void 0 || _window$ApxorRTM9.logEvent("apx_video_inapp_close_button_clicked", {
@@ -20730,7 +21419,7 @@
20730
21419
  replayCount: _this3.replayCount
20731
21420
  });
20732
21421
  _this3.videoPlayer.remove();
20733
- _this3.mCTB();
21422
+ _this3.IrHN();
20734
21423
  _this3.hideCallback();
20735
21424
  } catch (e) {
20736
21425
  console.log("Can't close the video player\n".concat(e));
@@ -20752,7 +21441,7 @@
20752
21441
  } else {
20753
21442
  buttons_config = this.buttons.bottom;
20754
21443
  }
20755
- var buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INAPP, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index);
21444
+ var buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INAPP, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index, "center", 1, this.step);
20756
21445
  buttons.setAttribute("id", "apx-cta-btn");
20757
21446
  buttons.classList.add("apx-video-cta".concat(this.cssPostFix));
20758
21447
  buttons.classList.add("apx-video-hide-elmt".concat(this.cssPostFix));
@@ -20824,14 +21513,14 @@
20824
21513
  try {
20825
21514
  var _window;
20826
21515
  (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.debug("called showEmbedCards");
20827
- var element = _this.VvNT(_this.layout);
20828
- _this.XCRi();
21516
+ var element = _this.qNQe(_this.layout);
21517
+ _this.uzOo();
20829
21518
  window.onresize = function () {
20830
- _this.NiOI();
21519
+ _this.RiLq();
20831
21520
  };
20832
21521
  _this.imageElements.forEach(function (img) {
20833
21522
  img.addEventListener("error", function () {
20834
- _this.YaYk("provided image doesn't exists");
21523
+ _this.hZAf("provided image doesn't exists");
20835
21524
  });
20836
21525
  });
20837
21526
  var rootContainer = document.createElement("div");
@@ -20842,7 +21531,7 @@
20842
21531
  var styleElement = document.createElement("style");
20843
21532
  styleElement.innerHTML = _this.styleContent;
20844
21533
  document.head.appendChild(styleElement);
20845
- _this.SafO(_this.termination);
21534
+ _this.dsuA(_this.termination);
20846
21535
  try {
20847
21536
  eval(_this.script);
20848
21537
  } catch (e) {
@@ -20853,10 +21542,10 @@
20853
21542
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
20854
21543
  _this.wait_interval -= 1;
20855
21544
  if (_this.wait_interval <= 0) {
20856
- _this.YaYk("provided media doesn't exists");
21545
+ _this.hZAf("provided media doesn't exists");
20857
21546
  } else {
20858
- if (_this.PXQj() && _this.DZYh()) {
20859
- _this.NiOI();
21547
+ if (_this.gDMN() && _this.Wrko() && _this.OIYp()) {
21548
+ _this.RiLq();
20860
21549
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
20861
21550
  }
20862
21551
  }
@@ -20867,12 +21556,12 @@
20867
21556
  (_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));
20868
21557
  }
20869
21558
  });
20870
- _defineProperty(this, "YaYk", function (reason) {
21559
+ _defineProperty(this, "hZAf", function (reason) {
20871
21560
  var _window$ApxorRTM, _window4;
20872
21561
  !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
20873
- campaignName: _this.name,
20874
- id: _this.configId,
20875
- apx_nudge_type: "sticky_card",
21562
+ apx_nudge_name: _this.name,
21563
+ apx_nudge_id: _this.configId,
21564
+ apx_template_time: "embed-card",
20876
21565
  apx_notshown_type: "error",
20877
21566
  apx_reason: reason
20878
21567
  }));
@@ -20881,19 +21570,20 @@
20881
21570
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
20882
21571
  (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorWidget) === null || _window4 === void 0 || _window4.removeEmbedCard(_this.configId);
20883
21572
  });
20884
- _defineProperty(this, "XCRi", function () {
21573
+ _defineProperty(this, "uzOo", function () {
20885
21574
  var EmbeddedCardsStyles = document.createElement("style");
20886
21575
  EmbeddedCardsStyles.innerHTML = _this.initialStyles;
20887
- EmbeddedCardsStyles.setAttribute("apx-tooltip-styles", "");
21576
+ EmbeddedCardsStyles.setAttribute("apx-embedded-card-styles", "");
20888
21577
  document.head.appendChild(EmbeddedCardsStyles);
20889
21578
  });
20890
- _defineProperty(this, "VvNT", function (config) {
21579
+ _defineProperty(this, "qNQe", function (config) {
20891
21580
  var _window$Apxor;
20892
21581
  var element;
20893
21582
  switch (config.type) {
20894
21583
  case "cell":
20895
21584
  case "img":
20896
21585
  case "text":
21586
+ case "cta_button":
20897
21587
  case "button":
20898
21588
  element = document.createElement(EMBED_CARD_TYPE[config.type]);
20899
21589
  break;
@@ -20907,28 +21597,14 @@
20907
21597
  if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
20908
21598
  element.playsInline = true;
20909
21599
  }
20910
- // if (config.source) {
20911
- // let sourceElement = document.createElement("source");
20912
- // for (let prop in config.source) {
20913
- // sourceElement[prop] = config.source[prop];
20914
- // }
20915
- // element.appendChild(sourceElement);
20916
- // }
20917
- // if (config.track) {
20918
- // let trackElement = document.createElement("track");
20919
- // for (let prop in config.track) {
20920
- // trackElement[prop] = config.track[prop];
20921
- // }
20922
- // element.appendChild(trackElement);
20923
- // }
21600
+ break;
21601
+ case "cross_button":
21602
+ element = document.createElement("div");
21603
+ element.innerHTML = CROSS_ICON_SVG;
20924
21604
  break;
20925
21605
  default:
20926
21606
  element = document.createElement(config.type);
20927
21607
  }
20928
- // const element = document.createElement(
20929
- // EMBED_CARD_TYPE[config.type] ?? config.type
20930
- // );
20931
-
20932
21608
  if (config.properties) {
20933
21609
  for (var prop in config.properties) {
20934
21610
  if (config.type === "img" && prop === "src" || config.type === "img" && prop === "format") continue;
@@ -20952,6 +21628,14 @@
20952
21628
  var styleObject = parseCSS(config.css);
20953
21629
  var imgStyleObject = removeKeys(styleObject, Object.keys(imgWrapperStyles));
20954
21630
  styles = ".".concat(config._id, " {\n ").concat(objectToCSS(imgStyleObject), "\n }\n ");
21631
+ } else if (config._id === _this.layout._id) {
21632
+ var layoutStyleObject = parseCSS(config.css);
21633
+ if (layoutStyleObject["background-image"]) {
21634
+ var backgroundImageUrl = extractBgImageUrl(layoutStyleObject);
21635
+ layoutStyleObject["background-image"] = "url(".concat(decodeURIComponent(backgroundImageUrl), ")");
21636
+ _this.bgImageUrl = decodeURIComponent(backgroundImageUrl);
21637
+ }
21638
+ styles = ".".concat(config._id, " {\n ").concat(objectToCSS(layoutStyleObject), "\n }\n ");
20955
21639
  } else {
20956
21640
  styles = ".".concat(config._id, " {\n ").concat(config.css, "\n }\n ");
20957
21641
  }
@@ -20964,56 +21648,29 @@
20964
21648
  case "activity":
20965
21649
  case "ir":
20966
21650
  element.onclick = function (e) {
20967
- var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
20968
21651
  e.stopPropagation();
20969
21652
  window.Apxor.redirect(JSON.stringify(action));
20970
- var additional_info = {
20971
- campaignName: _this.name,
20972
- id: _this.configId,
20973
- apx_nudge_type: "sticky_card",
20974
- apx_card_name: (_e$target$getAttribut = (_e$target = e.target) === null || _e$target === void 0 || (_e$target$getAttribut2 = _e$target.getAttribute) === null || _e$target$getAttribut2 === void 0 ? void 0 : _e$target$getAttribut2.call(_e$target, "card_name")) !== null && _e$target$getAttribut !== void 0 ? _e$target$getAttribut : ""
20975
- };
20976
- if (e.target.tagName === "BUTTON") {
20977
- var _window$ApxorRTM2;
20978
- additional_info["apx_cta_text"] = e.target.innerHTML;
20979
- (_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("apx_card_CTA_clicked", additional_info);
20980
- } else {
20981
- var _window$ApxorRTM3;
20982
- (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_card_interaction", additional_info);
20983
- }
21653
+ _this.eBcX(e);
20984
21654
  };
20985
21655
  break;
20986
21656
  case "show-video":
20987
21657
  element.onclick = function (e) {
20988
- var _e$target$getAttribut3, _e$target2, _e$target2$getAttribu;
20989
21658
  e.stopPropagation();
20990
21659
  window.Apxor.showVideoInApp(_this.configId, _this.name, action.url);
20991
- var additional_info = {
20992
- campaignName: _this.name,
20993
- id: _this.configId,
20994
- apx_nudge_type: "sticky_card",
20995
- apx_card_name: (_e$target$getAttribut3 = (_e$target2 = e.target) === null || _e$target2 === void 0 || (_e$target2$getAttribu = _e$target2.getAttribute) === null || _e$target2$getAttribu === void 0 ? void 0 : _e$target2$getAttribu.call(_e$target2, "card_name")) !== null && _e$target$getAttribut3 !== void 0 ? _e$target$getAttribut3 : ""
20996
- };
20997
- if (e.target.tagName === "BUTTON") {
20998
- var _window$ApxorRTM4;
20999
- additional_info["apx_cta_text"] = e.target.innerHTML;
21000
- (_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_card_CTA_clicked", additional_info);
21001
- } else {
21002
- var _window$ApxorRTM5;
21003
- (_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_card_interaction", additional_info);
21004
- }
21660
+ _this.eBcX(e);
21005
21661
  };
21006
21662
  break;
21007
21663
  case "cancel":
21008
21664
  element.onclick = function (e) {
21009
21665
  e.stopPropagation();
21666
+ _this.eBcX(e);
21010
21667
  window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
21011
21668
  };
21012
21669
  break;
21013
21670
  case "dismiss":
21014
21671
  element.onclick = function (e) {
21015
21672
  e.stopPropagation();
21016
- window.Apxor.logActionEvent("".concat(_this.type, "_dismissed"), _this.configId, _this.name);
21673
+ _this.eBcX(e);
21017
21674
  };
21018
21675
  break;
21019
21676
  case "never":
@@ -21021,6 +21678,7 @@
21021
21678
  e.stopPropagation();
21022
21679
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
21023
21680
  window.Apxor.logActionEvent("never_show_clicked", _this.configId, _this.name);
21681
+ _this.eBcX(e);
21024
21682
  };
21025
21683
  break;
21026
21684
  case "toggle-class":
@@ -21037,7 +21695,6 @@
21037
21695
  break;
21038
21696
  case "copy-content":
21039
21697
  element.onclick = function (e) {
21040
- var _e$target$getAttribut4, _e$target3, _e$target3$getAttribu;
21041
21698
  e.stopPropagation();
21042
21699
  var textToCopy = action === null || action === void 0 ? void 0 : action.content;
21043
21700
  var tempInput = document.createElement("input");
@@ -21046,20 +21703,7 @@
21046
21703
  tempInput.select();
21047
21704
  document.execCommand("copy");
21048
21705
  document.body.removeChild(tempInput);
21049
- var additional_info = {
21050
- campaignName: _this.name,
21051
- id: _this.configId,
21052
- apx_nudge_type: "sticky_card",
21053
- apx_card_name: (_e$target$getAttribut4 = (_e$target3 = e.target) === null || _e$target3 === void 0 || (_e$target3$getAttribu = _e$target3.getAttribute) === null || _e$target3$getAttribu === void 0 ? void 0 : _e$target3$getAttribu.call(_e$target3, "card_name")) !== null && _e$target$getAttribut4 !== void 0 ? _e$target$getAttribut4 : ""
21054
- };
21055
- if (e.target.tagName === "BUTTON") {
21056
- var _window$ApxorRTM6;
21057
- additional_info["apx_cta_text"] = e.target.innerHTML;
21058
- (_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent("apx_card_CTA_clicked", additional_info);
21059
- } else {
21060
- var _window$ApxorRTM7;
21061
- (_window$ApxorRTM7 = window.ApxorRTM) === null || _window$ApxorRTM7 === void 0 || _window$ApxorRTM7.logEvent("apx_card_interaction", additional_info);
21062
- }
21706
+ _this.eBcX(e);
21063
21707
  };
21064
21708
  break;
21065
21709
  case "log-app-event":
@@ -21077,27 +21721,16 @@
21077
21721
  });
21078
21722
  }
21079
21723
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
21080
- element.style.position = "relative";
21081
21724
  config.absolute_position_children.forEach(function (childConfig) {
21082
- var childElement = _this.HjRo(childConfig);
21083
- childElement.style.position = "absolute";
21084
- for (var _prop in childConfig.offset) {
21085
- childElement.style[_prop] = childConfig.offset[_prop];
21086
- }
21725
+ var childElement = _this.KDYj(childConfig);
21087
21726
  element.appendChild(childElement);
21088
21727
  });
21089
21728
  }
21090
21729
 
21091
21730
  // Process children
21092
21731
  if (config.children && config.children.length > 0) {
21093
- //element.style.display = "flex";
21094
-
21095
- // if (config.direction) {
21096
- // element.style.flexDirection = config.direction;
21097
- // }
21098
-
21099
21732
  config.children.forEach(function (childConfig) {
21100
- var childElement = _this.VvNT(childConfig);
21733
+ var childElement = _this.qNQe(childConfig);
21101
21734
  element.appendChild(childElement);
21102
21735
  });
21103
21736
  }
@@ -21123,7 +21756,24 @@
21123
21756
  }
21124
21757
  return element;
21125
21758
  });
21126
- _defineProperty(this, "SafO", function (config) {
21759
+ _defineProperty(this, "eBcX", function (e) {
21760
+ var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
21761
+ var additional_info = {
21762
+ apx_nudge_name: _this.name,
21763
+ apx_nudge_id: _this.configId,
21764
+ apx_card_name: (_e$target$getAttribut = e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 || (_e$target$getAttribut2 = _e$target.getAttribute) === null || _e$target$getAttribut2 === void 0 ? void 0 : _e$target$getAttribut2.call(_e$target, "card_name")) !== null && _e$target$getAttribut !== void 0 ? _e$target$getAttribut : "",
21765
+ apx_template_name: "embed-card"
21766
+ };
21767
+ if (e.target.tagName === "BUTTON") {
21768
+ var _e$target$innerHTML, _e$target2, _window$ApxorRTM2;
21769
+ 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 : "";
21770
+ (_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("apx_card_CTA_clicked", additional_info);
21771
+ } else {
21772
+ var _window$ApxorRTM3;
21773
+ (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_card_interaction", additional_info);
21774
+ }
21775
+ });
21776
+ _defineProperty(this, "dsuA", function (config) {
21127
21777
  config.forEach(function (id) {
21128
21778
  var element = document.getElementById(id);
21129
21779
  if (element) {
@@ -21131,7 +21781,7 @@
21131
21781
  }
21132
21782
  });
21133
21783
  });
21134
- _defineProperty(this, "DZYh", function () {
21784
+ _defineProperty(this, "Wrko", function () {
21135
21785
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
21136
21786
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
21137
21787
  if (_this.imageElements.length === 0) return true;
@@ -21139,13 +21789,19 @@
21139
21789
  return img.complete;
21140
21790
  });
21141
21791
  });
21142
- _defineProperty(this, "PXQj", function () {
21792
+ _defineProperty(this, "gDMN", function () {
21143
21793
  if (_this.videoElements.length === 0) return true;
21144
21794
  return _this.videoElements.every(function (video) {
21145
21795
  return video.readyState >= 3;
21146
21796
  });
21147
21797
  });
21148
- _defineProperty(this, "NiOI", function () {
21798
+ _defineProperty(this, "OIYp", function () {
21799
+ if (!_this.bgImageUrl) return true;
21800
+ var img = new Image();
21801
+ img.src = _this.bgImageUrl;
21802
+ return img.complete;
21803
+ });
21804
+ _defineProperty(this, "RiLq", function () {
21149
21805
  var _window6, _window7;
21150
21806
  var width = window.document.querySelector("html").offsetWidth;
21151
21807
  var height = window.document.querySelector("html").offsetHeight;
@@ -21168,6 +21824,7 @@
21168
21824
  this.initialStyles = "";
21169
21825
  this.imageElements = [];
21170
21826
  this.videoElements = [];
21827
+ this.bgImageUrl = "";
21171
21828
  this.intervalToCheckMediaLoadingStatus = null;
21172
21829
  this.loggedNudgeShownEvent = false;
21173
21830
  this.loggedNudgeNotShownEvent = false;
@@ -21233,8 +21890,8 @@
21233
21890
  _this.storyContainer.appendChild(currentElement);
21234
21891
  _this.storyContainer.appendChild(slideDetails);
21235
21892
  document.body.appendChild(_this.storyContainer);
21236
- _this.UhcC();
21237
- _this.yUQd();
21893
+ _this.zPUk();
21894
+ _this.NkOn();
21238
21895
  _this.progress = Array.from(document.querySelectorAll(".progress"));
21239
21896
  var current_slide = document.querySelector(".slide-details");
21240
21897
  var playNext = function playNext(e) {
@@ -21280,7 +21937,7 @@
21280
21937
  _existingAbsoluteElements2.forEach(function (element) {
21281
21938
  element.remove();
21282
21939
  });
21283
- // this.Voll();
21940
+ // this.UFDN();
21284
21941
  var _currentSlideDetails = document.querySelector(".slide-details");
21285
21942
  _currentSlideDetails.innerHTML = "";
21286
21943
  _this.position = _this.position + 1;
@@ -21376,7 +22033,7 @@
21376
22033
  absolute_header = document.createElement("div");
21377
22034
  current_slide_from_config.layout.absolute_position_children.forEach(function (current_element) {
21378
22035
  var current_absolute_element;
21379
- current_absolute_element = _this.HjRo(current_element);
22036
+ current_absolute_element = _this.KDYj(current_element);
21380
22037
  absolute_header.appendChild(current_absolute_element);
21381
22038
  });
21382
22039
  (_absolute_header = absolute_header) === null || _absolute_header === void 0 || _absolute_header.classList.add("apx-slide-header");
@@ -21437,7 +22094,7 @@
21437
22094
  document.body.style.backgroundRepeat = "";
21438
22095
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
21439
22096
  delete updated_layout_without_absolute_elements["absolute_position_children"];
21440
- element = _this.HjRo(updated_layout_without_absolute_elements);
22097
+ element = _this.KDYj(updated_layout_without_absolute_elements);
21441
22098
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
21442
22099
  document.body.style.margin = "0px";
21443
22100
  }
@@ -21445,9 +22102,9 @@
21445
22102
  current_slide.removeChild(current_slide.children[0]);
21446
22103
  }
21447
22104
  current_slide.appendChild(element);
21448
- _this.Jwju();
22105
+ _this.pXby();
21449
22106
  window.intervalToCheckImgStatus = setInterval(function () {
21450
- if (_this.rnGL()) {
22107
+ if (_this.ATnR()) {
21451
22108
  clearInterval(window.intervalToCheckImgStatus);
21452
22109
  }
21453
22110
  }, 500);
@@ -21475,7 +22132,7 @@
21475
22132
  });
21476
22133
  playNext();
21477
22134
  });
21478
- _defineProperty(this, "Voll", function () {
22135
+ _defineProperty(this, "UFDN", function () {
21479
22136
  document.body.classList.add("slide-right");
21480
22137
  var animationEndCounter = 0;
21481
22138
  var onAnimationEnd = function onAnimationEnd() {
@@ -21487,7 +22144,7 @@
21487
22144
  };
21488
22145
  document.body.addEventListener("animationend", onAnimationEnd);
21489
22146
  });
21490
- _defineProperty(this, "HjRo", function (config) {
22147
+ _defineProperty(this, "KDYj", function (config) {
21491
22148
  var _window$Apxor3;
21492
22149
  var element;
21493
22150
  var startY;
@@ -21543,7 +22200,7 @@
21543
22200
  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>";
21544
22201
  element.id = "apx-mute-icon";
21545
22202
  element.addEventListener("touchstart", function (event) {
21546
- _this.CfIa(event);
22203
+ _this.vuBO(event);
21547
22204
  });
21548
22205
  break;
21549
22206
  case "copy_icon":
@@ -21737,7 +22394,7 @@
21737
22394
  }
21738
22395
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
21739
22396
  config.absolute_position_children.forEach(function (childConfig) {
21740
- var childElement = _this.HjRo(childConfig);
22397
+ var childElement = _this.KDYj(childConfig);
21741
22398
  element.appendChild(childElement);
21742
22399
  });
21743
22400
  }
@@ -21745,7 +22402,7 @@
21745
22402
  // Process children
21746
22403
  if (config.children && config.children.length > 0) {
21747
22404
  config.children.forEach(function (childConfig) {
21748
- var childElement = _this.HjRo(childConfig);
22405
+ var childElement = _this.KDYj(childConfig);
21749
22406
  element.appendChild(childElement);
21750
22407
  });
21751
22408
  }
@@ -21772,7 +22429,7 @@
21772
22429
  }
21773
22430
  return element;
21774
22431
  });
21775
- _defineProperty(this, "CfIa", function (event) {
22432
+ _defineProperty(this, "vuBO", function (event) {
21776
22433
  var slide_details_to_be_deleted;
21777
22434
  var mute_child_elements;
21778
22435
  var unmute_child_elements;
@@ -21802,11 +22459,11 @@
21802
22459
  }
21803
22460
  // this.muteElement.addEventListener("touchstart", (event) => {
21804
22461
  // event.stopPropagation();
21805
- // this.CfIa(event);
22462
+ // this.vuBO(event);
21806
22463
  // });
21807
22464
  }
21808
22465
  });
21809
- _defineProperty(this, "yUQd", function () {
22466
+ _defineProperty(this, "NkOn", function () {
21810
22467
  var tapTimeout;
21811
22468
  var tapThreshold = 0.5; // Assuming 0.5 is the center of the WebView
21812
22469
  var longPressDuration = 200;
@@ -21930,7 +22587,7 @@
21930
22587
  event.target.dataset.touchStartTime = event.timeStamp;
21931
22588
  });
21932
22589
  });
21933
- _defineProperty(this, "UhcC", function () {
22590
+ _defineProperty(this, "zPUk", function () {
21934
22591
  var startY, startX;
21935
22592
  _this.storyContainer.addEventListener("touchstart", function (event) {
21936
22593
  _this.swipeTouch = true;
@@ -22137,7 +22794,7 @@
22137
22794
  }, 50);
22138
22795
  });
22139
22796
  });
22140
- _defineProperty(this, "Jwju", function () {
22797
+ _defineProperty(this, "pXby", function () {
22141
22798
  _this.loader.style.display = "block";
22142
22799
  var progress = Array.from(document.querySelectorAll(".progress"));
22143
22800
  var activeIndex = progress.findIndex(function (el) {
@@ -22153,7 +22810,7 @@
22153
22810
  }
22154
22811
  }
22155
22812
  });
22156
- _defineProperty(this, "vCTl", function () {
22813
+ _defineProperty(this, "SmfR", function () {
22157
22814
  if (!_this.continueLoading) {
22158
22815
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
22159
22816
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
@@ -22173,19 +22830,19 @@
22173
22830
  _this.loader.style.display = "none";
22174
22831
  }
22175
22832
  });
22176
- _defineProperty(this, "DZYh", function () {
22833
+ _defineProperty(this, "Wrko", function () {
22177
22834
  if (_this.imageElements.length === 0) return true;
22178
22835
  return _this.imageElements.every(function (img) {
22179
22836
  return img.complete;
22180
22837
  });
22181
22838
  });
22182
- _defineProperty(this, "PXQj", function () {
22839
+ _defineProperty(this, "gDMN", function () {
22183
22840
  if (_this.videoElements.length === 0) return true;
22184
22841
  return _this.videoElements.every(function (video) {
22185
22842
  return video.readyState >= 3;
22186
22843
  });
22187
22844
  });
22188
- _defineProperty(this, "rnGL", function () {
22845
+ _defineProperty(this, "ATnR", function () {
22189
22846
  var bodyStyles = window.getComputedStyle(document.body);
22190
22847
  var backgroundImage = bodyStyles.backgroundImage;
22191
22848
  if (backgroundImage && backgroundImage !== "none" && _this.current_slide_config.media_type === "image") {
@@ -22195,7 +22852,7 @@
22195
22852
  var img = new Image();
22196
22853
  img.src = imageUrl;
22197
22854
  if (img.complete) {
22198
- _this.vCTl();
22855
+ _this.SmfR();
22199
22856
  return true;
22200
22857
  }
22201
22858
  return false;
@@ -22203,21 +22860,21 @@
22203
22860
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
22204
22861
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
22205
22862
  if (childElements[0].readyState >= 3) {
22206
- _this.vCTl();
22863
+ _this.SmfR();
22207
22864
  return true;
22208
22865
  }
22209
22866
  return false;
22210
22867
  } else {
22211
22868
  if (_this.videoElements.length == 0 && _this.imageElements.length == 0) {
22212
- _this.vCTl();
22869
+ _this.SmfR();
22213
22870
  return true;
22214
- } else if (_this.DZYh() && _this.PXQj()) {
22215
- _this.vCTl();
22871
+ } else if (_this.Wrko() && _this.gDMN()) {
22872
+ _this.SmfR();
22216
22873
  return true;
22217
22874
  }
22218
22875
  }
22219
22876
  });
22220
- _defineProperty(this, "tBkX", function (event, startY, action) {
22877
+ _defineProperty(this, "nHlR", function (event, startY, action) {
22221
22878
  event.stopPropagation();
22222
22879
  var endY = event.changedTouches[0].clientY;
22223
22880
  var deltaY = startY - endY;
@@ -22305,7 +22962,7 @@
22305
22962
  this.swipe_action;
22306
22963
  this.continueLoading = false;
22307
22964
  this.boundSwipeUpHandling = function (event) {
22308
- return _this.tBkX(event, _this.startY, _this.swipe_action);
22965
+ return _this.nHlR(event, _this.startY, _this.swipe_action);
22309
22966
  };
22310
22967
  }
22311
22968
  _createClass(Stories, [{
@@ -22368,7 +23025,7 @@
22368
23025
  } else {
22369
23026
  var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM16, _window$ApxorRTM17, _window$ApxorRTM18;
22370
23027
  // Move to the first slide of the next group
22371
- // this.Voll();
23028
+ // this.UFDN();
22372
23029
  this.position++;
22373
23030
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
22374
23031
  this.slides = this.config[this.position].slides;
@@ -22494,7 +23151,7 @@
22494
23151
  if (activeIndex === 0) {
22495
23152
  var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM22, _window$ApxorRTM23, _window$ApxorRTM24;
22496
23153
  // If at the first slide of the current group, move to the last slide of the previous group
22497
- // this.Voll();
23154
+ // this.UFDN();
22498
23155
  this.position--;
22499
23156
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
22500
23157
  this.slides = this.config[this.position].slides;
@@ -22683,25 +23340,25 @@
22683
23340
  // Create custom content
22684
23341
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
22685
23342
  delete updated_layout_without_absolute_elements["absolute_position_children"];
22686
- element = this.HjRo(updated_layout_without_absolute_elements);
23343
+ element = this.KDYj(updated_layout_without_absolute_elements);
22687
23344
  }
22688
23345
  // Append slide content to slide details container
22689
23346
 
22690
23347
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
22691
23348
  document.body.style.margin = "0px";
22692
23349
  currentSlideDetails.appendChild(element);
22693
- this.Jwju();
23350
+ this.pXby();
22694
23351
 
22695
23352
  // Handle absolute position children
22696
23353
  if (current_slide_from_config.layout.absolute_position_children && current_slide_from_config.layout.absolute_position_children.length > 0) {
22697
23354
  current_slide_from_config.layout.absolute_position_children.forEach(function (childConfig) {
22698
- var childElement = _this2.HjRo(childConfig);
23355
+ var childElement = _this2.KDYj(childConfig);
22699
23356
  // Append absolute position children to slide details container
22700
23357
  currentSlideDetails.appendChild(childElement);
22701
23358
  });
22702
23359
  }
22703
23360
  window.intervalToCheckImgStatus2 = setInterval(function () {
22704
- if (_this2.rnGL()) {
23361
+ if (_this2.ATnR()) {
22705
23362
  clearInterval(window.intervalToCheckImgStatus2);
22706
23363
  }
22707
23364
  }, 500);
@@ -22748,16 +23405,16 @@
22748
23405
  var RTM = /*#__PURE__*/_createClass(function RTM() {
22749
23406
  var _this = this;
22750
23407
  _classCallCheck(this, RTM);
22751
- _defineProperty(this, "RxKq", {});
23408
+ _defineProperty(this, "GSRP", {});
22752
23409
  _defineProperty(this, "isShowingAction", false);
22753
23410
  _defineProperty(this, "currentAction", null);
22754
- _defineProperty(this, "sOOz", null);
22755
- _defineProperty(this, "version", 71);
23411
+ _defineProperty(this, "TadV", null);
23412
+ _defineProperty(this, "version", 80);
22756
23413
  _defineProperty(this, "isInitialised", false);
22757
- _defineProperty(this, "jkaK", {});
22758
- _defineProperty(this, "pNeK", false);
23414
+ _defineProperty(this, "JoHc", {});
23415
+ _defineProperty(this, "fdTw", false);
22759
23416
  _defineProperty(this, "_isShownECCalled", false);
22760
- _defineProperty(this, "BYKy", function () {
23417
+ _defineProperty(this, "mRub", function () {
22761
23418
  _this.isInitialised = true;
22762
23419
  var oldPushState = history.pushState;
22763
23420
  history.pushState = function pushState() {
@@ -22782,7 +23439,7 @@
22782
23439
  });
22783
23440
  _defineProperty(this, "show", function (uiJson, duration, uuid, name) {
22784
23441
  if (!_this.isInitialised) {
22785
- _this.BYKy();
23442
+ _this.mRub();
22786
23443
  }
22787
23444
  window.addEventListener("pagehide", function () {
22788
23445
  var _window$Apxor, _window$Apxor$pageUnl;
@@ -22809,7 +23466,7 @@
22809
23466
  } else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
22810
23467
  _this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
22811
23468
  } else if (ui_config.display_type === "coach_mark_v2") {
22812
- _this.iGMR(ui_config, duration, uuid, name);
23469
+ _this.QJAO(ui_config, duration, uuid, name);
22813
23470
  } else {
22814
23471
  showCoachmarkWithDelay(_this, ui_config, {
22815
23472
  configId: uuid,
@@ -22882,7 +23539,7 @@
22882
23539
  (_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 || _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
22883
23540
  campaignName: name,
22884
23541
  id: configId,
22885
- apx_nudge_type: "sticky_card",
23542
+ apx_template_name: "embed-card",
22886
23543
  apx_notshown_type: "error",
22887
23544
  apx_reason: "".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message)
22888
23545
  });
@@ -22897,7 +23554,7 @@
22897
23554
  (config === null || config === void 0 ? void 0 : config.initialRender) && ((_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 ? void 0 : _window$ApxorRTM2.logEvent("apx_nudge_shown", {
22898
23555
  campaignName: name,
22899
23556
  id: configId,
22900
- apx_nudge_type: "sticky_card"
23557
+ apx_template_name: "embed-card"
22901
23558
  }));
22902
23559
  _this._isShownECCalled = true;
22903
23560
  }, function () {
@@ -22910,7 +23567,7 @@
22910
23567
  try {
22911
23568
  config = config.split("\n").join("\\n");
22912
23569
  var ui_config = JSON.parse(config);
22913
- _this.jQXU(ui_config, configId, name, position, slidesSeenCount, view_id);
23570
+ _this.mKfh(ui_config, configId, name, position, slidesSeenCount, view_id);
22914
23571
  } catch (e) {
22915
23572
  var _window$Apxor3;
22916
23573
  if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
@@ -22924,12 +23581,12 @@
22924
23581
  console.error(e);
22925
23582
  }
22926
23583
  });
22927
- _defineProperty(this, "jQXU", function (config, configId, name, position, slidesSeenCount, view_id) {
23584
+ _defineProperty(this, "mKfh", function (config, configId, name, position, slidesSeenCount, view_id) {
22928
23585
  var cardsContainer = new Stories(config, configId, name, position, slidesSeenCount, view_id, function () {
22929
23586
  window.Apxor.logAppEvent("apx_nudge_shown", {
22930
23587
  campaignName: name,
22931
23588
  id: configId,
22932
- apx_nudge_type: "stories"
23589
+ apx_template_name: "stories"
22933
23590
  });
22934
23591
  }, function () {});
22935
23592
  cardsContainer.showStories();
@@ -22972,7 +23629,7 @@
22972
23629
  var _window22, _window22$updateFlag, _window23;
22973
23630
  _this.isShowingAction = false;
22974
23631
  _this.currentAction = null;
22975
- _this.sOOz = null;
23632
+ _this.TadV = null;
22976
23633
  (_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);
22977
23634
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
22978
23635
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -22983,21 +23640,21 @@
22983
23640
  }
22984
23641
  };
22985
23642
  if (action_class === "new-inline") {
22986
- _this.sOOz = new InLineTooltip(ui_config, [], [], terminationConfig, {
23643
+ _this.TadV = new InLineTooltip(ui_config, [], [], terminationConfig, {
22987
23644
  configId: uuid,
22988
23645
  configName: name
22989
23646
  }, _this, onShow, onHide, function () {}, false, 0);
22990
23647
  } else if (action_class === "tooltip_builder") {
22991
- _this.sOOz = new NewInLineTooltip(ui_config, terminationConfig, {
23648
+ _this.TadV = new NewInLineTooltip(ui_config, terminationConfig, {
22992
23649
  configId: uuid,
22993
23650
  configName: name
22994
23651
  }, _this, onShow, onHide);
22995
23652
  }
22996
23653
  setTimeout(function () {
22997
- _this.sOOz.createNewTooltip();
23654
+ _this.TadV.createNewTooltip();
22998
23655
  }, ui_config.delay);
22999
23656
  });
23000
- _defineProperty(this, "iGMR", function (ui_config, duration, uuid, name) {
23657
+ _defineProperty(this, "QJAO", function (ui_config, duration, uuid, name) {
23001
23658
  var terminationConfig = {};
23002
23659
  terminationConfig["auto_dismiss"] = duration > 0;
23003
23660
  terminationConfig["duration"] = duration;
@@ -23021,7 +23678,7 @@
23021
23678
  var _window27, _window27$updateFlag, _window28;
23022
23679
  _this.isShowingAction = false;
23023
23680
  _this.currentAction = null;
23024
- _this.sOOz = null;
23681
+ _this.TadV = null;
23025
23682
  (_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);
23026
23683
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
23027
23684
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -23034,8 +23691,8 @@
23034
23691
  _this._currentCoachmark.createNewCoachMark();
23035
23692
  });
23036
23693
  _defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
23037
- if (_this.sOOz) {
23038
- _this.sOOz.updateElementPositionOnScroll(top, left, height, width);
23694
+ if (_this.TadV) {
23695
+ _this.TadV.updateElementPositionOnScroll(top, left, height, width);
23039
23696
  }
23040
23697
  });
23041
23698
  _defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
@@ -23084,24 +23741,35 @@
23084
23741
  terminationConfig["duration"] = duration;
23085
23742
  var inappModal = null;
23086
23743
  var onShow = function onShow() {
23744
+ var _window$Apxor4;
23087
23745
  _this.isShowingAction = true;
23088
- if (window.Apxor && window.Apxor.logActionEvent) {
23089
- var _window$Apxor4;
23090
- if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
23091
- var _window32, _window32$updateFlag;
23092
- (_window32 = window) === null || _window32 === void 0 || (_window32 = _window32.Apxor) === null || _window32 === void 0 || (_window32$updateFlag = _window32.updateFlag) === null || _window32$updateFlag === void 0 || _window32$updateFlag.call(_window32, true, "IN_APP");
23093
- } else {
23094
- var _window33, _window33$updateFlag;
23095
- (_window33 = window) === null || _window33 === void 0 || (_window33 = _window33.Apxor) === null || _window33 === void 0 || (_window33$updateFlag = _window33.updateFlag) === null || _window33$updateFlag === void 0 || _window33$updateFlag.call(_window33, "IN_APP", true);
23096
- }
23746
+ if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
23747
+ var _window32, _window32$updateFlag;
23748
+ (_window32 = window) === null || _window32 === void 0 || (_window32 = _window32.Apxor) === null || _window32 === void 0 || (_window32$updateFlag = _window32.updateFlag) === null || _window32$updateFlag === void 0 || _window32$updateFlag.call(_window32, true, "IN_APP");
23749
+ } else {
23750
+ var _window33, _window33$updateFlag;
23751
+ (_window33 = window) === null || _window33 === void 0 || (_window33 = _window33.Apxor) === null || _window33 === void 0 || (_window33$updateFlag = _window33.updateFlag) === null || _window33$updateFlag === void 0 || _window33$updateFlag.call(_window33, "IN_APP", true);
23752
+ }
23753
+ if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent) {
23097
23754
  window.Apxor.logActionEvent("inapp_shown", configId, name);
23755
+ } else if (action_class === "inapp_builder") {
23756
+ var _window$ApxorRTM3, _window$Apxor5, _config$additional_in, _window$Apxor6, _config$additional_in2, _config$additional_in3, _config$additional_in4, _config$additional_in5, _config$additional_in6, _config$additional_in7;
23757
+ (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_shown", {
23758
+ apx_nudge_name: name,
23759
+ apx_nudge_id: ((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in = config.additional_info) === null || _config$additional_in === void 0 ? void 0 : _config$additional_in.id : configId,
23760
+ apx_template_name: "inapp",
23761
+ apx_step: ((_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in2 = config.additional_info) !== null && _config$additional_in2 !== void 0 && _config$additional_in2.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in3 = config.additional_info) === null || _config$additional_in3 === void 0 ? void 0 : _config$additional_in3.apx_step : config !== null && config !== void 0 && (_config$additional_in4 = config.additional_info) !== null && _config$additional_in4 !== void 0 && _config$additional_in4.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in5 = config.additional_info) === null || _config$additional_in5 === void 0 ? void 0 : _config$additional_in5.apx_step,
23762
+ apx_screen_name: config === null || config === void 0 || (_config$additional_in6 = config.additional_info) === null || _config$additional_in6 === void 0 ? void 0 : _config$additional_in6.apx_screen_name,
23763
+ apx_variant_code: config === null || config === void 0 || (_config$additional_in7 = config.additional_info) === null || _config$additional_in7 === void 0 ? void 0 : _config$additional_in7.apx_variant_code
23764
+ });
23098
23765
  }
23099
23766
  };
23100
23767
  var onHide = function onHide(backgroundDiv, action) {
23101
- var _dialogContent$classL, _window$Apxor5;
23102
- var cssClass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ".apx-dlg-c";
23103
- var closeListener = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
23104
- var redirectionListener = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
23768
+ var _dialogContent$classL, _window$Apxor7;
23769
+ var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
23770
+ var cssClass = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ".apx-dlg-c";
23771
+ var closeListener = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
23772
+ var redirectionListener = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
23105
23773
  document.body.removeEventListener("click", closeListener);
23106
23774
  document.body.removeEventListener("click", redirectionListener);
23107
23775
  var dialogContent = document.querySelector(cssClass);
@@ -23109,7 +23777,7 @@
23109
23777
  // setTimeout(() => {
23110
23778
  backgroundDiv.remove();
23111
23779
  _this.isShowingAction = false;
23112
- if (((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) === "ios") {
23780
+ if (((_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.platform) === "ios") {
23113
23781
  var _window34, _window34$updateFlag;
23114
23782
  (_window34 = window) === null || _window34 === void 0 || (_window34 = _window34.Apxor) === null || _window34 === void 0 || (_window34$updateFlag = _window34.updateFlag) === null || _window34$updateFlag === void 0 || _window34$updateFlag.call(_window34, false, "IN_APP");
23115
23783
  } else {
@@ -23117,23 +23785,54 @@
23117
23785
  (_window35 = window) === null || _window35 === void 0 || (_window35 = _window35.Apxor) === null || _window35 === void 0 || (_window35$updateFlag = _window35.updateFlag) === null || _window35$updateFlag === void 0 || _window35$updateFlag.call(_window35, "IN_APP", false);
23118
23786
  }
23119
23787
  _this.currentAction = null;
23120
- if (window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
23788
+ if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
23121
23789
  window.Apxor.logActionEvent("inapp_dismissed", configId, name);
23790
+ } else if (action_class === "inapp_builder") {
23791
+ var _window36;
23792
+ if (!(action == "cancel" || action == "never")) {
23793
+ var _window$Apxor8, _config$additional_in8, _config$additional_in9, _window$Apxor9, _config$additional_in10, _config$additional_in11, _config$additional_in12, _config$additional_in13, _window$ApxorRTM4;
23794
+ var additional_info = {
23795
+ apx_nudge_name: name,
23796
+ apx_nudge_id: ((_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 ? void 0 : _window$Apxor8.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in8 = config.additional_info) === null || _config$additional_in8 === void 0 ? void 0 : _config$additional_in8.id : configId,
23797
+ apx_template_name: "inapp",
23798
+ apx_variant_code: config === null || config === void 0 || (_config$additional_in9 = config.additional_info) === null || _config$additional_in9 === void 0 ? void 0 : _config$additional_in9.apx_variant_code,
23799
+ apx_step: ((_window$Apxor9 = window.Apxor) === null || _window$Apxor9 === void 0 ? void 0 : _window$Apxor9.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in10 = config.additional_info) !== null && _config$additional_in10 !== void 0 && _config$additional_in10.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in11 = config.additional_info) === null || _config$additional_in11 === void 0 ? void 0 : _config$additional_in11.apx_step : config !== null && config !== void 0 && (_config$additional_in12 = config.additional_info) !== null && _config$additional_in12 !== void 0 && _config$additional_in12.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in13 = config.additional_info) === null || _config$additional_in13 === void 0 ? void 0 : _config$additional_in13.apx_step
23800
+ };
23801
+ if (type != "") {
23802
+ additional_info["apx_dismiss_type"] = type;
23803
+ }
23804
+ (_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_nudge_dismissed", additional_info);
23805
+ }
23806
+ if (action === "cancel") {
23807
+ var _window$Apxor10, _config$additional_in14, _config$additional_in15, _window$Apxor11, _config$additional_in16, _config$additional_in17, _config$additional_in18, _config$additional_in19, _window$ApxorRTM5;
23808
+ var _additional_info = {
23809
+ apx_nudge_name: name,
23810
+ apx_nudge_id: ((_window$Apxor10 = window.Apxor) === null || _window$Apxor10 === void 0 ? void 0 : _window$Apxor10.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in14 = config.additional_info) === null || _config$additional_in14 === void 0 ? void 0 : _config$additional_in14.id : configId,
23811
+ apx_template_name: "inapp",
23812
+ apx_variant_code: config === null || config === void 0 || (_config$additional_in15 = config.additional_info) === null || _config$additional_in15 === void 0 ? void 0 : _config$additional_in15.apx_variant_code,
23813
+ apx_step: ((_window$Apxor11 = window.Apxor) === null || _window$Apxor11 === void 0 ? void 0 : _window$Apxor11.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in16 = config.additional_info) !== null && _config$additional_in16 !== void 0 && _config$additional_in16.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in17 = config.additional_info) === null || _config$additional_in17 === void 0 ? void 0 : _config$additional_in17.apx_step : config !== null && config !== void 0 && (_config$additional_in18 = config.additional_info) !== null && _config$additional_in18 !== void 0 && _config$additional_in18.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in19 = config.additional_info) === null || _config$additional_in19 === void 0 ? void 0 : _config$additional_in19.apx_step
23814
+ };
23815
+ (_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_nudge_cancelled", _additional_info);
23816
+ }
23817
+ (_window36 = window) === null || _window36 === void 0 || (_window36 = _window36.ApxorInternals) === null || _window36 === void 0 || _window36.removeBuilderTemplate(configId);
23122
23818
  }
23123
23819
  };
23124
23820
  if (action_class === "modal") {
23125
23821
  inappModal = new ModalInApp(config, terminationConfig, configId, name, onShow, onHide, function () {}, false, [], 0);
23822
+ inappModal.createInAppModal();
23126
23823
  } else if (action_class === "inapp_builder") {
23127
23824
  inappModal = new NewModalInApp(config, terminationConfig, configId, name, onShow, onHide);
23825
+ setTimeout(function () {
23826
+ inappModal.createInAppModal();
23827
+ }, config === null || config === void 0 ? void 0 : config.delay);
23128
23828
  }
23129
- inappModal.createInAppModal();
23130
23829
  });
23131
23830
  _defineProperty(this, "showPlaceHolder", function () {
23132
- var _window36;
23133
- if (_this.pNeK) {
23831
+ var _window37;
23832
+ if (_this.fdTw) {
23134
23833
  return;
23135
23834
  }
23136
- _this.pNeK = true;
23835
+ _this.fdTw = true;
23137
23836
  var ele = document.createElement("div");
23138
23837
  ele.innerHTML = "place your immersive card here";
23139
23838
  ele.style.backgroundColor = "#f5f5f5";
@@ -23143,7 +23842,7 @@
23143
23842
  ele.style.padding = "12px";
23144
23843
  ele.style.fontSize = "14px";
23145
23844
  document.body.appendChild(ele);
23146
- (_window36 = window) === null || _window36 === void 0 || (_window36 = _window36.ApxorWidget) === null || _window36 === void 0 || _window36.setDimensions(window.document.querySelector("html").offsetWidth, window.document.querySelector("html").offsetHeight);
23845
+ (_window37 = window) === null || _window37 === void 0 || (_window37 = _window37.ApxorWidget) === null || _window37 === void 0 || _window37.setDimensions(window.document.querySelector("html").offsetWidth, window.document.querySelector("html").offsetHeight);
23147
23846
  });
23148
23847
  _defineProperty(this, "pauseStories", function () {
23149
23848
  var progress = Array.from(document.querySelectorAll(".progress"));
@@ -23182,8 +23881,8 @@
23182
23881
  // survey_obj.createSurvey();
23183
23882
  // };
23184
23883
  _defineProperty(this, "logEvent", function (name, additional_info) {
23185
- var _window$Apxor6;
23186
- if (((_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.platform) === "ios") {
23884
+ var _window$Apxor12;
23885
+ if (((_window$Apxor12 = window.Apxor) === null || _window$Apxor12 === void 0 ? void 0 : _window$Apxor12.platform) === "ios") {
23187
23886
  window.Apxor.logAppEvent(name, additional_info);
23188
23887
  } else {
23189
23888
  window.Apxor.logAppEvent(name, JSON.stringify(additional_info));