storyly-placement 1.16.0 → 1.17.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.
Files changed (41) hide show
  1. package/dist/{BaseStory-CYzLr9nq.js → BaseStory-Dp6ZPHfW.js} +19 -19
  2. package/dist/{create-product-feed-impl-DY8k3rv-.js → create-product-feed-impl-DZWD7TEs.js} +70 -69
  3. package/dist/{directions-CwnC3a_E.js → directions-CYrnCIsr.js} +1 -1
  4. package/dist/{impression-Cyq4TnV1.js → impression-D7bza-i1.js} +1 -1
  5. package/dist/{index-Cle6_VmW.js → index-B4sVwTts.js} +2 -2
  6. package/dist/{index-0pvHE7Wu.js → index-BDysZ6T0.js} +77 -63
  7. package/dist/{index-CGq62ZYq.js → index-BKrDAPj3.js} +1 -1
  8. package/dist/{index-DrDeJPCY.js → index-BOQkbWPT.js} +1 -1
  9. package/dist/{index-DX0vXov2.js → index-BaFJwG4g.js} +667 -653
  10. package/dist/{index-B6K9g2w6.js → index-ByIMLOKp.js} +6 -6
  11. package/dist/{index-B0HCD_CX.js → index-C1fn9AQg.js} +39 -20
  12. package/dist/{index-m_3R9vOw.js → index-C8U5qprH.js} +3 -3
  13. package/dist/{index-DqwsIsSl.js → index-CYo9buTd.js} +2 -2
  14. package/dist/{index-BUoSa-yy.js → index-CdwqtsHq.js} +3 -3
  15. package/dist/{index-DxGx5tX1.js → index-CyjCBEyP.js} +1 -1
  16. package/dist/{index-BAn-lwM1.js → index-D53y-xHp.js} +10 -9
  17. package/dist/{index-DIKtXa9n.js → index-DJp9Dcfo.js} +10 -9
  18. package/dist/{index-CjvoRgFg.js → index-DUF2iwAC.js} +2 -2
  19. package/dist/{index-B1g2jFTK.js → index-DVS4GjvO.js} +173 -161
  20. package/dist/{index-CCmzNuJt.js → index-DYeLhwYf.js} +6 -6
  21. package/dist/{index-CBr5Wz3q.js → index-Dj2Z2Wpc.js} +2 -2
  22. package/dist/{index-wakxYZ6u.js → index-Dpz5cxtJ.js} +7 -7
  23. package/dist/{index-C4dW1pqw.js → index-DqXTSvMa.js} +2 -2
  24. package/dist/{index-7dFV-4xE.js → index-DqpUbp6C.js} +2 -2
  25. package/dist/{index-rx0D-y8n.js → index-Dsgw9pGm.js} +3 -3
  26. package/dist/{index-jshOOKml.js → index-DtkbMJBy.js} +3 -3
  27. package/dist/{index-BnRkcr11.js → index-FKqJ98aT.js} +27 -16
  28. package/dist/{index-CgsKfExI.js → index-GhI0hjb1.js} +2 -2
  29. package/dist/{index-D6pJkk7f.js → index-H_0SdzVc.js} +19 -19
  30. package/dist/{index-sOArwfJA.js → index-WsVuu54O.js} +2 -2
  31. package/dist/{index-BurYE_Od.js → index-ZB3iR_0R.js} +3 -3
  32. package/dist/{index-VB84vh55.js → index-etd1gZ-J.js} +2 -2
  33. package/dist/{index-DCFTpn-q.js → index-fJIiqh6e.js} +6 -6
  34. package/dist/{index-CNoaiD9c.js → index-qhJuUVu6.js} +254 -245
  35. package/dist/{index-C1OlHTOJ.js → index-w6CilWA_.js} +2 -2
  36. package/dist/index.d.ts +29 -0
  37. package/dist/{nudge-story-groups-impl-BSQbx9HB.js → nudge-story-groups-impl-BN06697L.js} +1 -1
  38. package/dist/{ref-CBdAG3Tv.js → ref-p4rHSR93.js} +1 -1
  39. package/dist/{story-group-animation-impl-CJQDNc61.js → story-group-animation-impl-CZXDqc4v.js} +1 -1
  40. package/dist/storyly-placement.js +1 -1
  41. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { S as E, s as _, h as r, J as L, m as y, j as d, a1 as p, M as n, C as l, a2 as A, b as v, a3 as c, u as a, $ as h, P as u, o as S, _ as w, a4 as x, K as b, n as P, a5 as O, c as q, a6 as I, f as m, l as V } from "./index-DX0vXov2.js";
2
- import { d as k } from "./directions-CwnC3a_E.js";
3
- import { H as W, C as B, r as g, A as R, S as G } from "./index-B0HCD_CX.js";
1
+ import { S as E, s as _, h as r, J as L, m as y, j as d, a1 as p, M as n, C as l, a2 as A, b as v, a3 as c, u as a, $ as h, P as u, o as S, _ as w, a4 as x, K as b, n as P, a5 as O, c as q, a6 as I, f as m, l as V } from "./index-BaFJwG4g.js";
2
+ import { d as k } from "./directions-CYrnCIsr.js";
3
+ import { H as W, C as B, r as g, A as R, S as G } from "./index-C1fn9AQg.js";
4
4
  class H {
5
5
  constructor({
6
6
  story: t,
@@ -92,7 +92,7 @@ class H {
92
92
  height: this.videoAsset_.videoHeight,
93
93
  width: this.videoAsset_.videoWidth
94
94
  }), this.storyProgressRemain_ = this.videoAsset_.duration, this.storyProgressSecond_ = this.videoAsset_.duration, this.videoAsset_.duration >= 120 && !p(this.storyData_.video_type)) {
95
- const t = await (await import("./index-DrDeJPCY.js")).default;
95
+ const t = await (await import("./index-BOQkbWPT.js")).default;
96
96
  this.videoSeekbar_ = new t({
97
97
  storyDom: this.storyDom_,
98
98
  videoDom: this.videoAsset_,
@@ -179,26 +179,26 @@ class H {
179
179
  };
180
180
  if (t.is_bg && (t.bg_color || t.gradient_colors)) {
181
181
  this.isBlankStory_ = !0;
182
- const i = (await import("./index-7dFV-4xE.js")).default;
182
+ const i = (await import("./index-DqpUbp6C.js")).default;
183
183
  e.instance = new i({ ...o });
184
184
  }
185
185
  if (t.type === a.EMOJI) {
186
- const i = (await import("./index-VB84vh55.js")).default;
186
+ const i = (await import("./index-etd1gZ-J.js")).default;
187
187
  e.instance = new i({ ...o });
188
188
  } else if (t.type === a.POLL) {
189
- const i = (await import("./index-CBr5Wz3q.js")).default;
189
+ const i = (await import("./index-Dj2Z2Wpc.js")).default;
190
190
  e.instance = new i({ ...o });
191
191
  } else if (t.type === a.RATING) {
192
- const i = (await import("./index-DqwsIsSl.js")).default;
192
+ const i = (await import("./index-CYo9buTd.js")).default;
193
193
  e.instance = new i({ ...o });
194
194
  } else if (t.type === a.QUIZ) {
195
- const i = (await import("./index-CjvoRgFg.js")).default;
195
+ const i = (await import("./index-DUF2iwAC.js")).default;
196
196
  e.instance = new i({ ...o });
197
197
  } else if (t.type === a.COUNTDOWN) {
198
- const i = (await import("./index-C1OlHTOJ.js")).default;
198
+ const i = (await import("./index-w6CilWA_.js")).default;
199
199
  e.instance = new i({ ...o });
200
200
  } else if (t.type === a.IMAGE_CTA) {
201
- const i = (await import("./index-CgsKfExI.js")).default;
201
+ const i = (await import("./index-GhI0hjb1.js")).default;
202
202
  e.instance = new i({
203
203
  ...o,
204
204
  type: a.IMAGE_CTA
@@ -209,34 +209,34 @@ class H {
209
209
  type: t.type === a.BUTTON ? a.BUTTON : a.SWIPE
210
210
  }), e.instance = this.ctaLayer_;
211
211
  else if ((t.image_path || t.video_path || t.image_url) && t.studio_component_type) {
212
- const i = (await import("./index-C4dW1pqw.js")).default;
212
+ const i = (await import("./index-DqXTSvMa.js")).default;
213
213
  e.instance = new i({
214
214
  ...o,
215
215
  mediaHost: this.group_.media_host
216
216
  });
217
217
  } else if (t.type === a.TEXT) {
218
- const i = (await import("./index-Cle6_VmW.js")).default;
218
+ const i = (await import("./index-B4sVwTts.js")).default;
219
219
  e.instance = new i({ ...o });
220
220
  } else if (t.type === a.PRODUCT_TAG) {
221
- const i = (await import("./index-BurYE_Od.js")).default;
221
+ const i = (await import("./index-ZB3iR_0R.js")).default;
222
222
  e.instance = new i({ ...o });
223
223
  } else if (t.type === a.PROMO_CODE) {
224
- const i = (await import("./index-jshOOKml.js")).default;
224
+ const i = (await import("./index-DtkbMJBy.js")).default;
225
225
  e.instance = new i({ ...o });
226
226
  } else if (t.type === a.QUESTION) {
227
- const i = (await import("./index-BUoSa-yy.js")).default;
227
+ const i = (await import("./index-CdwqtsHq.js")).default;
228
228
  e.instance = new i({
229
229
  ...o,
230
230
  storiesContainer: this.storiesContainer_
231
231
  });
232
232
  } else if (t.type === a.PRODUCT_CARD) {
233
- const i = (await import("./index-sOArwfJA.js")).default;
233
+ const i = (await import("./index-WsVuu54O.js")).default;
234
234
  e.instance = new i({ ...o });
235
235
  } else if (t.type === a.PRODUCT_CATALOG) {
236
- const i = (await import("./index-0pvHE7Wu.js")).default;
236
+ const i = (await import("./index-BDysZ6T0.js")).default;
237
237
  e.instance = new i({ ...o });
238
238
  } else if (t.type === a.IMAGE_QUIZ) {
239
- const i = (await import("./index-m_3R9vOw.js")).default;
239
+ const i = (await import("./index-C8U5qprH.js")).default;
240
240
  e.instance = new i({ ...o });
241
241
  }
242
242
  (e.start_time || e.end_time) && (e.instance.hideLayer(), this.timedLayers_.push(e));
@@ -1,6 +1,6 @@
1
- import { Y as b, X as A } from "./index-DX0vXov2.js";
2
- function v(g, D) {
3
- const _ = /@{p_(\d).+?}/, s = Object.freeze({
1
+ import { Y as L, X as D } from "./index-BaFJwG4g.js";
2
+ function F(g, U, I) {
3
+ const _ = /@{p_(\d).+?}/, i = Object.freeze({
4
4
  TITLE: /@{p_\d_title}/,
5
5
  IMAGE: /@{p_\d_image_\d}/,
6
6
  DESCRIPTION: /@{p_\d_desc}/,
@@ -13,31 +13,31 @@ function v(g, D) {
13
13
  PRODUCT_ID: /@{p_\d_pid}/,
14
14
  DISCOUNT: /@{p_\d_discount}/,
15
15
  CURRENCY: /@{p_\d_currency}/
16
- }), I = [], U = 8;
17
- return D.forEach((h) => {
16
+ }), R = [], w = 8;
17
+ return U.forEach((h) => {
18
18
  if (!g[h.name])
19
19
  return;
20
- const R = g[h.name], l = [];
21
- b(h.stories).forEach((f) => {
22
- if (l.length === U)
20
+ const S = g[h.name], l = [];
21
+ L(h.stories).forEach((f) => {
22
+ if (l.length === w)
23
23
  return;
24
- const S = Math.max(
24
+ const O = Math.max(
25
25
  ...f.media.layers.flatMap((o) => Object.values(o)).filter(
26
26
  (o) => typeof o == "string" && o.match(_)
27
27
  ).map((o) => +o.match(_)[1])
28
28
  );
29
29
  let m = structuredClone(f), C = 0;
30
30
  const E = [];
31
- R.filter((o) => !o.used).forEach((o, w) => {
32
- if (C === S)
31
+ S.filter((o) => !o.used).forEach((o, x) => {
32
+ if (C === O)
33
33
  return;
34
- const t = structuredClone(o), T = t.price, P = t.sales_price;
34
+ const t = structuredClone(o), P = t.price, T = t.sales_price;
35
35
  m.media.layers.forEach((e, u) => {
36
36
  const d = e;
37
37
  Object.keys(e).filter(
38
38
  (c) => typeof e[c] == "string" && e[c].match(_) || c === "products"
39
39
  ).forEach((c) => {
40
- var O;
40
+ var A;
41
41
  if (c === "products") {
42
42
  if (!t.product_id || !t.product_group_id)
43
43
  return;
@@ -52,10 +52,10 @@ function v(g, D) {
52
52
  product_group_id: t.product_group_id
53
53
  }
54
54
  ], delete t.product_id, delete t.product_group_id);
55
- else if (e[c].match(s.PRODUCTS)) {
56
- const i = f.media.layers[u - 1], p = (O = Object.values(i).find(
55
+ else if (e[c].match(i.PRODUCTS)) {
56
+ const s = f.media.layers[u - 1], p = (A = Object.values(s).find(
57
57
  (n) => typeof n == "string" && n.match(_)
58
- )) == null ? void 0 : O.match(_), a = e[c].match(_);
58
+ )) == null ? void 0 : A.match(_), a = e[c].match(_);
59
59
  if (!p || p[1] !== a[1]) {
60
60
  d[c] = [
61
61
  {
@@ -65,7 +65,7 @@ function v(g, D) {
65
65
  }
66
66
  ];
67
67
  for (let n = 1; n < 5; n += 1) {
68
- const r = R[w + n];
68
+ const r = S[x + n];
69
69
  r && (d[c].push({
70
70
  id: r.id,
71
71
  product_id: r.product_id,
@@ -85,98 +85,99 @@ function v(g, D) {
85
85
  ]);
86
86
  delete t.product_id, delete t.product_group_id;
87
87
  }
88
- } else if (e[c].match(s.TITLE) && t.title) {
89
- const i = e[c].replace(
90
- s.TITLE,
88
+ } else if (e[c].match(i.TITLE) && t.title) {
89
+ const s = e[c].replace(
90
+ i.TITLE,
91
91
  t.title
92
92
  );
93
- d[c] = i, delete t.title;
94
- } else if (e[c].match(s.CTA) && t.url) {
95
- const i = e[c].replace(
96
- s.CTA,
93
+ d[c] = s, delete t.title;
94
+ } else if (e[c].match(i.CTA) && t.url) {
95
+ const s = e[c].replace(
96
+ i.CTA,
97
97
  t.url
98
98
  );
99
- d[c] = i, delete t.url;
100
- } else if (e[c].match(s.CTA_TEXT)) {
101
- const i = t.cta_text ?? null, p = e[c].replace(
102
- s.CTA_TEXT,
103
- `${i}`
99
+ d[c] = s, delete t.url;
100
+ } else if (e[c].match(i.CTA_TEXT)) {
101
+ const s = t.cta_text ?? null, p = e[c].replace(
102
+ i.CTA_TEXT,
103
+ `${s}`
104
104
  );
105
105
  d[c] = p, delete t.cta_text;
106
- } else if (e[c].match(s.SALES_PRICE) && t.sales_price) {
107
- const i = e[c].replace(
108
- s.SALES_PRICE,
109
- A(
106
+ } else if (e[c].match(i.SALES_PRICE) && t.sales_price) {
107
+ const s = e[c].replace(
108
+ i.SALES_PRICE,
109
+ D(
110
110
  t.sales_price,
111
- t.price_currency
111
+ t.price_currency,
112
+ I
112
113
  )
113
114
  );
114
- d[c] = i, delete t.sales_price;
115
- } else if (e[c].match(s.PRICE) && (t.price || t.sales_price)) {
116
- const i = f.media.layers.some(
115
+ d[c] = s, delete t.sales_price;
116
+ } else if (e[c].match(i.PRICE) && (t.price || t.sales_price)) {
117
+ const s = f.media.layers.some(
117
118
  (n) => Object.values(n).some(
118
- (r) => typeof r == "string" && r.match(s.SALES_PRICE)
119
+ (r) => typeof r == "string" && r.match(i.SALES_PRICE)
119
120
  )
120
121
  );
121
122
  let { price: p } = t;
122
- !i && t.sales_price && (p = t.sales_price, delete t.sales_price);
123
+ !s && t.sales_price && (p = t.sales_price, delete t.sales_price);
123
124
  const a = e[c].replace(
124
- s.PRICE,
125
- A(p, t.price_currency) || 0
125
+ i.PRICE,
126
+ D(p, t.price_currency, I) || 0
126
127
  );
127
128
  d[c] = a, delete t.price;
128
- } else if (e[c].match(s.CURRENCY) && t.price_currency) {
129
- const i = e[c].replace(
130
- s.CURRENCY,
129
+ } else if (e[c].match(i.CURRENCY) && t.price_currency) {
130
+ const s = e[c].replace(
131
+ i.CURRENCY,
131
132
  t.price_currency
132
133
  );
133
- d[c] = i, delete t.price_currency;
134
- } else if (e[c].match(s.PRODUCT_ID) && t.product_id) {
135
- const i = e[c].replace(
136
- s.PRODUCT_ID,
134
+ d[c] = s, delete t.price_currency;
135
+ } else if (e[c].match(i.PRODUCT_ID) && t.product_id) {
136
+ const s = e[c].replace(
137
+ i.PRODUCT_ID,
137
138
  t.product_id
138
139
  );
139
- d[c] = i, delete t.product_id;
140
- } else if (e[c].match(s.DISCOUNT) && P && P < T) {
141
- const i = Math.ceil(
142
- (T - P) * 100 / T
140
+ d[c] = s, delete t.product_id;
141
+ } else if (e[c].match(i.DISCOUNT) && T && T < P) {
142
+ const s = Math.ceil(
143
+ (P - T) * 100 / P
143
144
  ), p = e[c].replace(
144
- s.DISCOUNT,
145
- `${i}%`
145
+ i.DISCOUNT,
146
+ `${s}%`
146
147
  );
147
148
  d[c] = p;
148
- } else if (e[c].match(s.DESCRIPTION) && t.description) {
149
- const i = e[c].replace(
150
- s.DESCRIPTION,
149
+ } else if (e[c].match(i.DESCRIPTION) && t.description) {
150
+ const s = e[c].replace(
151
+ i.DESCRIPTION,
151
152
  t.description
152
153
  );
153
- d[c] = i, delete t.description;
154
- } else if (e[c].match(s.IMAGE) && t.image_urls) {
154
+ d[c] = s, delete t.description;
155
+ } else if (e[c].match(i.IMAGE) && t.image_urls) {
155
156
  if (t.image_urls.length === 0)
156
157
  return;
157
- const i = e[c].replace(
158
- s.IMAGE,
158
+ const s = e[c].replace(
159
+ i.IMAGE,
159
160
  t.image_urls[0]
160
161
  );
161
- t.image_urls.length > 0 && t.image_urls.splice(0, 1), d[c] = i;
162
+ t.image_urls.length > 0 && t.image_urls.splice(0, 1), d[c] = s;
162
163
  }
163
164
  });
164
165
  });
165
- const x = m.media.layers.every(
166
+ const N = m.media.layers.every(
166
167
  (e) => Object.values(e).filter((u) => typeof u == "string").every((u) => !u.match(_))
167
- ), N = m.media.layers.some(
168
+ ), b = m.media.layers.some(
168
169
  (e) => Object.values(e).filter((u) => typeof u == "string").some((u) => u == null ? void 0 : u.match(_))
169
170
  );
170
- x ? (C += 1, E.length > 0 && E.forEach((e) => {
171
+ N ? (C += 1, E.length > 0 && E.forEach((e) => {
171
172
  e.used = !0;
172
- }), o.used = !0, l.push(m), m = structuredClone(f)) : S > 1 && N && (C += 1, E.push(o));
173
+ }), o.used = !0, l.push(m), m = structuredClone(f)) : O > 1 && b && (C += 1, E.push(o));
173
174
  });
174
- }), l.length > 0 && I.push({
175
+ }), l.length > 0 && R.push({
175
176
  ...h,
176
177
  stories: l
177
178
  });
178
- }), Promise.resolve(I);
179
+ }), Promise.resolve(R);
179
180
  }
180
181
  export {
181
- v as default
182
+ F as default
182
183
  };
@@ -1,4 +1,4 @@
1
- import { T as Ge, V as Ve, L as pe } from "./index-DX0vXov2.js";
1
+ import { T as Ge, V as Ve, L as pe } from "./index-BaFJwG4g.js";
2
2
  function he(e) {
3
3
  return e !== null && typeof e == "object" && "constructor" in e && e.constructor === Object;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { S, W as y } from "./index-DX0vXov2.js";
1
+ import { S, W as y } from "./index-BaFJwG4g.js";
2
2
  const h = (m, e) => {
3
3
  var d, f, p, u;
4
4
  const i = S.getContext(m), t = i == null ? void 0 : i.getState(), a = (t == null ? void 0 : t.rules) || [];
@@ -1,5 +1,5 @@
1
- import { u, aj as k, m as E, F as g, S as T, O as _, Z as x, M as C } from "./index-DX0vXov2.js";
2
- import { a as w } from "./index-B0HCD_CX.js";
1
+ import { u, aj as k, m as E, F as g, S as T, O as _, Z as x, M as C } from "./index-BaFJwG4g.js";
2
+ import { a as w } from "./index-C1fn9AQg.js";
3
3
  class A {
4
4
  constructor() {
5
5
  }
@@ -1,11 +1,11 @@
1
- import { a as L, b as x, w as $ } from "./index-B0HCD_CX.js";
2
- import { X as h, F as p, O as E, S as d, u as A, b as C, s as u, Z as f, L as m, M as b, ak as P, ae as D, E as y, af as v, A as S, Q as T, n as w } from "./index-DX0vXov2.js";
1
+ import { a as L, b as x, w as E } from "./index-C1fn9AQg.js";
2
+ import { X as h, F as p, O as $, S as l, u as P, b as C, s as _, Z as f, L as m, M as b, ak as A, ae as D, E as v, af as y, A as S, Q as T, n as w } from "./index-BaFJwG4g.js";
3
3
  const g = {
4
4
  heart: (t) => `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="${t ?? "none"}"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.8931 3.07333C13.2054 2.38532 12.2725 1.99878 11.2998 1.99878C10.327 1.99878 9.3941 2.38532 8.70642 3.07333L7.99975 3.78L7.29309 3.07333C5.86083 1.64107 3.53868 1.64107 2.10642 3.07333C0.674162 4.50559 0.674162 6.82774 2.10642 8.26L2.81309 8.96666L7.99975 14.1533L13.1864 8.96666L13.8931 8.26C14.5811 7.57231 14.9676 6.63942 14.9676 5.66666C14.9676 4.6939 14.5811 3.76101 13.8931 3.07333Z" stroke="#242450" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
5
5
  bookmark: (t) => `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="${t ?? "none"}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.6668 14L8.00016 10.6667L3.3335 14V3.33333C3.3335 2.59695 3.93045 2 4.66683 2H11.3335C12.0699 2 12.6668 2.59695 12.6668 3.33333V14Z" stroke="#242450" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
6
6
  star: (t) => `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="${t ?? "none"}"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.00016 1.33331L10.0602 5.50665L14.6668 6.17998L11.3335 9.42665L12.1202 14.0133L8.00016 11.8466L3.88016 14.0133L4.66683 9.42665L1.3335 6.17998L5.94016 5.50665L8.00016 1.33331Z" stroke="#242450" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`
7
- }, k = (t, r) => {
8
- var e;
7
+ }, k = (t, r, e) => {
8
+ var s;
9
9
  return `
10
10
  <div
11
11
  class="product-card"
@@ -14,7 +14,7 @@ const g = {
14
14
  tabindex="-1"
15
15
  aria-hidden="true"
16
16
  >
17
- ${(e = t.image_urls) != null && e.length ? `<img class="product-card-media" src="${t.image_urls[0]}" alt="product" />` : ""}
17
+ ${(s = t.image_urls) != null && s.length ? `<img class="product-card-media" src="${t.image_urls[0]}" alt="product" />` : ""}
18
18
  <div class="product-card-right-container">
19
19
  <div class="product-description-container ${t.is_title_visible ? "" : "no-description"} ${t.w_v ? "has-wishlist" : ""}">
20
20
  ${t.is_title_visible ? `<p class="product-card-right-container-description">${t.title}</p>` : ""}
@@ -24,27 +24,33 @@ const g = {
24
24
  </div>
25
25
  <div class="product-card-right-container-bottom-section">
26
26
  <div class="product-card-price-container">
27
- ${t.is_price_visible && !t.sales_price ? `<span class="product-card-current-price">${t.price_currency ? h(
28
- Number(t.price),
29
- t.price_currency
30
- ) : t.price}</span>` : ""}
31
- ${!t.is_price_visible && t.sales_price && t.is_s_price_visible ? `<span class="product-card-current-price">${t.price_currency ? h(
32
- Number(t.sales_price),
33
- t.price_currency
34
- ) : t.sales_price}</span>` : ""}
35
- ${t.is_s_price_visible && t.sales_price && t.is_price_visible ? `<span class="product-card-current-price">${t.price_currency ? h(
36
- Number(t.sales_price),
37
- t.price_currency
38
- ) : t.sales_price}</span>${t.lowest_price ? `<span class="product-card-old-price-container">${t.price_currency ? `<span class="product-card-old-lowest-price">${h(
27
+ ${t.is_price_visible && !t.sales_price ? `<span class="product-card-current-price">${h(
28
+ t.price,
29
+ t.price_currency,
30
+ e
31
+ )}</span>` : ""}
32
+ ${!t.is_price_visible && t.sales_price && t.is_s_price_visible ? `<span class="product-card-current-price">${h(
33
+ t.sales_price,
34
+ t.price_currency,
35
+ e
36
+ )}</span>` : ""}
37
+ ${t.is_s_price_visible && t.sales_price && t.is_price_visible ? `<span class="product-card-current-price">${h(
38
+ t.sales_price,
39
+ t.price_currency,
40
+ e
41
+ )}</span>${t.lowest_price ? `<span class="product-card-old-price-container"><span class="product-card-old-lowest-price">${h(
39
42
  t.lowest_price,
40
- t.price_currency
41
- )}</span>` : `<span class="product-card-old-lowest-price">${t.lowest_price}</span>`}<span class="product-card-old-price">${t.price_currency ? h(
42
- Number(t.price),
43
- t.price_currency
44
- ) : t.price}</span></span>` : `<span class="product-card-old-price">${t.price_currency ? h(
45
- Number(t.price),
46
- t.price_currency
47
- ) : t.price}</span>`}` : ""}
43
+ t.price_currency,
44
+ e
45
+ )}</span><span class="product-card-old-price">${h(
46
+ t.price,
47
+ t.price_currency,
48
+ e
49
+ )}</span></span>` : `<span class="product-card-old-price">${h(
50
+ t.price,
51
+ t.price_currency,
52
+ e
53
+ )}</span>`}` : ""}
48
54
  </div>
49
55
  ${t.c_b_text ? `<button
50
56
  class="product-card-purchase-button"
@@ -76,10 +82,10 @@ const g = {
76
82
  role="component"
77
83
  data-group=""
78
84
  data-story=""
79
- style="font-family: ${E({ instanceId: t, font: "" })};"
85
+ style="font-family: ${$({ instanceId: t, font: "" })};"
80
86
  tabindex="-1"
81
87
  aria-hidden="true"
82
- dir="${((s = (e = (r = d.getContext(t)) == null ? void 0 : r.getState()) == null ? void 0 : e.placementConfig) == null ? void 0 : s.direction) ?? "ltr"}"
88
+ dir="${((s = (e = (r = l.getContext(t)) == null ? void 0 : r.getState()) == null ? void 0 : e.placementConfig) == null ? void 0 : s.direction) ?? "ltr"}"
83
89
  ></div>
84
90
  <div class="product-list-arrow left-arrow" hidden>
85
91
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" class="no-pointer-events"><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.333 8H2.666M6.667 12l-4-4 4-4" class="no-pointer-events"/></svg>
@@ -91,7 +97,7 @@ const g = {
91
97
  </div>
92
98
  `;
93
99
  };
94
- class N extends L {
100
+ class O extends L {
95
101
  constructor({
96
102
  layer: r,
97
103
  group: e,
@@ -100,17 +106,17 @@ class N extends L {
100
106
  instanceId: i
101
107
  }) {
102
108
  super({
103
- type: A.PRODUCT_CATALOG,
109
+ type: P.PRODUCT_CATALOG,
104
110
  storyDom: s,
105
111
  instanceId: i
106
112
  }), this.story_ = o, this.group_ = e, this.rendered_ = !1, this.storyPaused_ = !1, this.cardListenersAttached_ = !1, this.instanceId = i, this.setLayerData({ ...r }), this.attachCallbacksToElement_(), this.generateComponentAndAppendToPage(
107
113
  I(i)
108
114
  ).then((a) => {
109
- var n, l;
110
- this.dom_ = a, (l = (n = d.getContext(this.instanceId)) == null ? void 0 : n.getState()) != null && l.isVideoFeed && (C() ? (u(
115
+ var n, d;
116
+ this.dom_ = a, (d = (n = l.getContext(this.instanceId)) == null ? void 0 : n.getState()) != null && d.isVideoFeed && (C() ? (_(
111
117
  this.dom_.parentElement,
112
118
  ["video-feed-mobile-view"]
113
- ), u(this.dom_, "mask")) : u(
119
+ ), _(this.dom_, "mask")) : _(
114
120
  this.dom_.parentElement,
115
121
  "video-feed-desktop-view"
116
122
  )), this.init_(), this.storyObserver_(this.storyObserverCallback_);
@@ -159,7 +165,7 @@ class N extends L {
159
165
  const e = Array.from(
160
166
  this.dom_.querySelectorAll(".product-list-arrow")
161
167
  ), [s, o] = e;
162
- d.getContext(this.instanceId).getState().layout === m.MODERN && e.forEach((i, a) => {
168
+ l.getContext(this.instanceId).getState().layout === m.MODERN && e.forEach((i, a) => {
163
169
  a === 1 && o.removeAttribute("hidden"), i.addEventListener(
164
170
  "click",
165
171
  (n) => this.onClickArrow_({ target: n.target })
@@ -167,9 +173,9 @@ class N extends L {
167
173
  }), this.productCardsContainer_.addEventListener(
168
174
  "scroll",
169
175
  ({ currentTarget: i }) => {
170
- const { scrollLeft: a, clientWidth: n, scrollWidth: l } = i;
171
- if (this.storyPaused_ || b(this.dom_, "onPlayPause"), d.getContext(this.instanceId).getState().layout !== m.CLASSIC) {
172
- if (a + n >= l - 1) {
176
+ const { scrollLeft: a, clientWidth: n, scrollWidth: d } = i;
177
+ if (this.storyPaused_ || b(this.dom_, "onPlayPause"), l.getContext(this.instanceId).getState().layout !== m.CLASSIC) {
178
+ if (a + n >= d - 1) {
173
179
  o.setAttribute("hidden", "true");
174
180
  return;
175
181
  }
@@ -196,13 +202,13 @@ class N extends L {
196
202
  */
197
203
  renderProducts_() {
198
204
  if (this.rendered_) {
199
- const { products: e, s_products: s } = this.layerData, o = d.getContext(this.instanceId), { storylyHydration: i } = o.getState() ?? {}, a = (i ?? []).filter(
200
- (l) => (e || s).filter(
201
- (_) => _.product_group_id === l.product_group_id
205
+ const { products: e, s_products: s } = this.layerData, o = l.getContext(this.instanceId), { storylyHydration: i } = o.getState() ?? {}, a = (i ?? []).filter(
206
+ (d) => (e || s).filter(
207
+ (u) => u.product_group_id === d.product_group_id
202
208
  ).length
203
209
  );
204
210
  if (!a.length) return this.productCardsContainer_;
205
- if (P(
211
+ if (A(
206
212
  a,
207
213
  this.layerData.productVariants ?? []
208
214
  )) return this.productCardsContainer_;
@@ -212,13 +218,13 @@ class N extends L {
212
218
  const s = e.closest(".product-card");
213
219
  if (this.handleEvent_(D.ProductCatalogClicked), this.layerData.s_products) {
214
220
  const { productIndex: o } = s.dataset, i = this.layerData.s_products[+o], { url: a } = i;
215
- if (y.hasEvent(
216
- v.ActionClicked,
221
+ if (v.hasEvent(
222
+ y.ActionClicked,
217
223
  this.instanceId
218
224
  )) {
219
225
  const n = this.group_.stories.findIndex(
220
- (_) => _.story_id === this.story_.story_id
221
- ), l = {
226
+ (u) => u.story_id === this.story_.story_id
227
+ ), d = {
222
228
  id: this.story_.story_id,
223
229
  title: this.story_.title ?? null,
224
230
  name: this.story_.name ?? null,
@@ -228,13 +234,13 @@ class N extends L {
228
234
  actionUrl: a,
229
235
  products: [i]
230
236
  };
231
- y.runEvent(
232
- v.ActionClicked,
233
- l,
237
+ v.runEvent(
238
+ y.ActionClicked,
239
+ d,
234
240
  this.instanceId
235
- ), y.runEvent(
241
+ ), v.runEvent(
236
242
  S.UserEvent,
237
- { event: v.ActionClicked, ...l },
243
+ { event: y.ActionClicked, ...d },
238
244
  this.instanceId
239
245
  );
240
246
  return;
@@ -284,29 +290,29 @@ class N extends L {
284
290
  return this.productCardsContainer_;
285
291
  }
286
292
  clickedWishlist_({ target: r }) {
287
- const e = r.closest(".product-card"), { productId: s } = e.dataset, o = d.getContext(this.instanceId), { storylyHydration: i } = o.getState(), a = r.closest(".wishlist-wrapper"), n = i.find(
293
+ const e = r.closest(".product-card"), { productId: s } = e.dataset, o = l.getContext(this.instanceId), { storylyHydration: i } = o.getState(), a = r.closest(".wishlist-wrapper"), n = i.find(
288
294
  (c) => c.product_id === s
289
295
  );
290
296
  if (!n)
291
297
  return;
292
- const l = d.getContext(
298
+ const d = l.getContext(
293
299
  this.instanceId
294
- ).getState().ToastComponent, _ = (c) => {
295
- c === 0 ? (l.show(
300
+ ).getState().ToastComponent, u = (c) => {
301
+ c === 0 ? (d.show(
296
302
  `${g[this.layerData.w_i ?? "heart"]()} ${this.layerData.w_r_m}`
297
- ), this.handleWislistEvent_(n, w.WishlistRemoved), n.wishlist = !1) : c === 1 ? (l.show(
303
+ ), this.handleWislistEvent_(n, w.WishlistRemoved), n.wishlist = !1) : c === 1 ? (d.show(
298
304
  `${g[this.layerData.w_i ?? "heart"]("black")} ${this.layerData.w_a_m}`
299
- ), n.wishlist = !0, this.handleWislistEvent_(n, w.WishlistAdded)) : c && (l.show(
305
+ ), n.wishlist = !0, this.handleWislistEvent_(n, w.WishlistAdded)) : c && (d.show(
300
306
  `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.99967 14.6668C11.6816 14.6668 14.6663 11.6821 14.6663 8.00016C14.6663 4.31826 11.6816 1.3335 7.99967 1.3335C4.31778 1.3335 1.33301 4.31826 1.33301 8.00016C1.33301 11.6821 4.31778 14.6668 7.99967 14.6668Z" stroke="#212121" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 5.3335V8.00016" stroke="#212121" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><circle cx="8" cy="11" r="1" fill="#212121"/></svg> ${c}`
301
307
  ), this.handleWislistEvent_(n, w.WishlistFailed));
302
308
  };
303
- $(
309
+ E(
304
310
  this.dom_,
305
311
  n,
306
312
  this.group_,
307
313
  this.story_,
308
314
  a,
309
- _
315
+ u
310
316
  );
311
317
  }
312
318
  /**
@@ -316,7 +322,11 @@ class N extends L {
316
322
  var r;
317
323
  this.layerData.s_products ? this.layerData.s_products.forEach((e, s) => {
318
324
  const o = this.generateHtmlFromTemplate(
319
- k({ ...this.layerData, ...e }, s)
325
+ k(
326
+ { ...this.layerData, ...e },
327
+ s,
328
+ this.instanceId
329
+ )
320
330
  );
321
331
  this.productCardsContainer_.appendChild(o);
322
332
  }) : (r = this.layerData.products) == null || r.forEach(({ product_id: e, product_group_id: s }) => {
@@ -325,10 +335,14 @@ class N extends L {
325
335
  );
326
336
  if (o) {
327
337
  const i = this.generateHtmlFromTemplate(
328
- k({
329
- ...this.layerData,
330
- ...o
331
- })
338
+ k(
339
+ {
340
+ ...this.layerData,
341
+ ...o
342
+ },
343
+ void 0,
344
+ this.instanceId
345
+ )
332
346
  );
333
347
  this.productCardsContainer_.appendChild(i);
334
348
  }
@@ -377,5 +391,5 @@ class N extends L {
377
391
  }
378
392
  }
379
393
  export {
380
- N as default
394
+ O as default
381
395
  };
@@ -1,4 +1,4 @@
1
- import { S as l, m as d, L as a, j as o, Z as c, M as n, b as _, s as m, f as g } from "./index-DX0vXov2.js";
1
+ import { S as l, m as d, L as a, j as o, Z as c, M as n, b as _, s as m, f as g } from "./index-BaFJwG4g.js";
2
2
  const y = () => `
3
3
  <div class="storyly__video-feed-video-seekbar show">
4
4
  <div class="seekbar-time-wrapper">
@@ -1,4 +1,4 @@
1
- import { S as h, m as l, L as a, Z as d, M as c, j as r } from "./index-DX0vXov2.js";
1
+ import { S as h, m as l, L as a, Z as d, M as c, j as r } from "./index-BaFJwG4g.js";
2
2
  const _ = () => `
3
3
  <div class="storyly__default-video-seekbar show">
4
4
  <div class="action-icon">