@bikdotai/bik-component-library 0.0.857-beta.1 → 0.0.857-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { jsxDEV as v, Fragment as je } from "react/jsx-dev-runtime";
2
2
  import { useState as p, useEffect as O, useCallback as x } from "react";
3
3
  import me, { ACTIONS as fe } from "react-joyride";
4
- import re from "./MajorUpdatePopup.js";
4
+ import ie from "./MajorUpdatePopup.js";
5
5
  import ae from "./MinorUpdatePopup.js";
6
6
  import { VideoModal as Ee } from "./VideoModal.js";
7
7
  import { useFeatureAnnouncements as Ve } from "./hooks/useFeatureAnnouncements.js";
@@ -22,8 +22,8 @@ const $e = ({
22
22
  const {
23
23
  majorUpdateFeatures: a,
24
24
  minorUpdateFeatures: E,
25
- isLoading: F,
26
- markFeatureAsViewed: c
25
+ isLoading: N,
26
+ markFeatureAsViewed: u
27
27
  } = Ve({
28
28
  fetchVisibleFeatures: ye,
29
29
  getStoreFeatureProgress: ge,
@@ -32,7 +32,7 @@ const $e = ({
32
32
  isFeatureApplicableToCurrentPage: Se,
33
33
  module: ke,
34
34
  router: L
35
- }), [g, M] = p(null), [s, S] = p(null), [J, B] = p(!1), [se, k] = p([]), [we, V] = p(!1), [le, I] = p([]), [de, w] = p(!1), [C, h] = p(!1), [l, _] = p([]), [T, N] = p(!1), [U, P] = p(!1), [Ce, A] = p(!1), [Te, q] = p(""), [$, D] = p(!1), [Ue, z] = p(!1), [ue, K] = p(!1), [ve, Ne] = p(0), [Fe, Me] = p(0), [j, Q] = p(
35
+ }), [g, M] = p(null), [c, S] = p(null), [J, B] = p(!1), [se, k] = p([]), [we, V] = p(!1), [le, I] = p([]), [de, w] = p(!1), [C, h] = p(!1), [s, _] = p([]), [T, F] = p(!1), [U, P] = p(!1), [Ce, A] = p(!1), [Te, q] = p(""), [$, D] = p(!1), [Ue, z] = p(!1), [ue, K] = p(!1), [ve, Fe] = p(0), [Ne, Me] = p(0), [j, Q] = p(
36
36
  /* @__PURE__ */ new Set()
37
37
  );
38
38
  O(() => {
@@ -57,10 +57,10 @@ const $e = ({
57
57
  n && n.remove();
58
58
  };
59
59
  }, []), O(() => {
60
- Ne((e) => e + 1), Me((e) => e + 1), z(!1), K(!1), Q(/* @__PURE__ */ new Set());
60
+ Fe((e) => e + 1), Me((e) => e + 1), z(!1), K(!1), Q(/* @__PURE__ */ new Set());
61
61
  }, [L?.pathname]), O(() => {
62
- if (a.length > 0 && !g && !F && !de && !$) {
63
- P(!1), N(!1), B(!1), k([]), S(null), _([]);
62
+ if (a.length > 0 && !g && !N && !de && !$) {
63
+ P(!1), F(!1), B(!1), k([]), S(null), _([]);
64
64
  let e = 0;
65
65
  const o = 10, n = () => {
66
66
  e++, document.querySelector(
@@ -68,114 +68,114 @@ const $e = ({
68
68
  ) ? ce(a[0]) : e < o ? setTimeout(n, 1e3) : P(!0);
69
69
  };
70
70
  n();
71
- } else a.length === 0 && !F && P(!0);
71
+ } else a.length === 0 && !N && P(!0);
72
72
  }, [
73
73
  a,
74
74
  g,
75
- F,
75
+ N,
76
76
  de,
77
77
  $
78
78
  ]), O(() => {
79
79
  const e = L?.query?.featureId;
80
- if (!e || F || E.length === 0)
80
+ if (!e || N || E.length === 0)
81
81
  return;
82
82
  const o = E.find(
83
- (r) => r.id === e
83
+ (i) => i.id === e
84
84
  );
85
85
  if (!o || !o.featureTag)
86
86
  return;
87
- N(!0), h(!0);
87
+ F(!0), h(!0);
88
88
  let n = 0;
89
- const t = 25, i = setInterval(() => {
89
+ const t = 25, r = setInterval(() => {
90
90
  n++;
91
- const r = o.featureTag.startsWith("#") || o.featureTag.startsWith(".") || o.featureTag.startsWith("[") ? o.featureTag : `#${o.featureTag}`;
92
- if (document.querySelector(r)) {
93
- const u = [o];
94
- _(u), W(o, u), clearInterval(i);
95
- } else n >= t && (h(!1), clearInterval(i));
91
+ const i = o.featureTag.startsWith("#") || o.featureTag.startsWith(".") || o.featureTag.startsWith("[") ? o.featureTag : `#${o.featureTag}`;
92
+ if (document.querySelector(i)) {
93
+ const d = [o];
94
+ _(d), W(o, d), clearInterval(r);
95
+ } else n >= t && (h(!1), clearInterval(r));
96
96
  }, 200);
97
97
  return () => {
98
- clearInterval(i);
98
+ clearInterval(r);
99
99
  };
100
- }, [E, L?.query?.featureId, F]), O(() => {
101
- if (E.length > 0 && !F && !J && !C && !s && !T && U && !$) {
100
+ }, [E, L?.query?.featureId, N]), O(() => {
101
+ if (E.length > 0 && !N && !J && !C && !c && !T && U && !$) {
102
102
  let e = null, o = null, n = null, t = !1;
103
- const i = () => {
104
- if (t || C || s || T || !U)
103
+ const r = () => {
104
+ if (t || C || c || T || !U)
105
105
  return;
106
- const r = E.filter((d) => {
107
- if (!d.featureTag || d.featureTag.trim() === "" || j.has(d.id))
106
+ const i = E.filter((l) => {
107
+ if (!l.featureTag || l.featureTag.trim() === "" || j.has(l.id))
108
108
  return !1;
109
- const u = d.featureTag.startsWith("#") || d.featureTag.startsWith(".") || d.featureTag.startsWith("[") ? d.featureTag : `#${d.featureTag}`;
110
- return document.querySelector(u) !== null;
109
+ const d = l.featureTag.startsWith("#") || l.featureTag.startsWith(".") || l.featureTag.startsWith("[") ? l.featureTag : `#${l.featureTag}`;
110
+ return document.querySelector(d) !== null;
111
111
  });
112
- r.length > 0 && (_(r), W(r[0], r), e && (e.disconnect(), e = null), o && (window.removeEventListener("scroll", o), o = null), n && (clearTimeout(n), n = null));
112
+ i.length > 0 && (_(i), W(i[0], i), e && (e.disconnect(), e = null), o && (window.removeEventListener("scroll", o), o = null), n && (clearTimeout(n), n = null));
113
113
  };
114
- return e = new MutationObserver((r) => {
115
- let d = !1;
116
- for (const u of r) {
117
- if (u.type === "childList" && u.addedNodes.length > 0)
118
- for (let b = 0; b < u.addedNodes.length; b++) {
119
- const f = u.addedNodes[b];
114
+ return e = new MutationObserver((i) => {
115
+ let l = !1;
116
+ for (const d of i) {
117
+ if (d.type === "childList" && d.addedNodes.length > 0)
118
+ for (let b = 0; b < d.addedNodes.length; b++) {
119
+ const f = d.addedNodes[b];
120
120
  if (f.nodeType === Node.ELEMENT_NODE) {
121
121
  const pe = f;
122
122
  if (pe.id || pe.querySelector("[id]")) {
123
- d = !0;
123
+ l = !0;
124
124
  break;
125
125
  }
126
126
  }
127
127
  }
128
- if (d) break;
128
+ if (l) break;
129
129
  }
130
- !J && !t && !C && !s && !T && U && d && (n && clearTimeout(n), n = setTimeout(() => {
131
- !t && !C && !s && !T && U && i();
130
+ !J && !t && !C && !c && !T && U && l && (n && clearTimeout(n), n = setTimeout(() => {
131
+ !t && !C && !c && !T && U && r();
132
132
  }, 200));
133
133
  }), o = () => {
134
- !J && !t && !C && !s && !T && U && (n && clearTimeout(n), requestAnimationFrame(() => {
134
+ !J && !t && !C && !c && !T && U && (n && clearTimeout(n), requestAnimationFrame(() => {
135
135
  n = setTimeout(() => {
136
- !t && !C && !s && !T && U && i();
136
+ !t && !C && !c && !T && U && r();
137
137
  }, 300);
138
138
  }));
139
139
  }, e && e.observe(document.body, {
140
140
  childList: !0,
141
141
  subtree: !0
142
- }), o && window.addEventListener("scroll", o, { passive: !0 }), i(), setTimeout(() => {
143
- !t && !C && !s && !T && U && i();
142
+ }), o && window.addEventListener("scroll", o, { passive: !0 }), r(), setTimeout(() => {
143
+ !t && !C && !c && !T && U && r();
144
144
  }, 100), setTimeout(() => {
145
- !t && !C && !s && !T && U && i();
145
+ !t && !C && !c && !T && U && r();
146
146
  }, 1e3), setTimeout(() => {
147
- !t && !C && !s && !T && U && i();
147
+ !t && !C && !c && !T && U && r();
148
148
  }, 500), () => {
149
149
  t = !0, e && e.disconnect(), o && window.removeEventListener("scroll", o), n && clearTimeout(n);
150
150
  };
151
- } else (E.length === 0 || F) && (L?.query?.featureId && s || (B(!1), k([]), S(null), _([]), N(!1)));
151
+ } else (E.length === 0 || N) && (L?.query?.featureId && c || (B(!1), k([]), S(null), _([]), F(!1)));
152
152
  }, [
153
153
  E,
154
- F,
154
+ N,
155
155
  J,
156
156
  C,
157
- s,
157
+ c,
158
158
  T,
159
159
  U,
160
- c,
160
+ u,
161
161
  $
162
162
  ]);
163
163
  const ce = (e) => {
164
164
  M(e);
165
165
  const o = a.findIndex(
166
- (i) => i.id === e.id
166
+ (r) => r.id === e.id
167
167
  ), n = a.length, t = [
168
168
  {
169
169
  target: We.WHATS_NEW_BUTTON,
170
170
  content: /* @__PURE__ */ v(
171
- re,
171
+ ie,
172
172
  {
173
173
  feature: e,
174
174
  currentIndex: o,
175
175
  totalFeatures: n,
176
176
  onSkip: () => Z(e),
177
- onExplore: (i) => H(e, i),
178
- onSecondaryAction: (i) => X(e, i),
177
+ onExplore: (r) => H(e, r),
178
+ onSecondaryAction: (r) => X(e, r),
179
179
  onPrevious: () => G(e),
180
180
  onNext: () => Y(e),
181
181
  setIsClosing: z
@@ -236,7 +236,7 @@ const $e = ({
236
236
  const o = e || g;
237
237
  o && (w(!0), await Promise.all(
238
238
  a.map(
239
- (n) => c(n.id)
239
+ (n) => u(n.id)
240
240
  )
241
241
  ), V(!1), M(null), I([]), P(!0), y && m && y({
242
242
  storeId: m,
@@ -251,17 +251,17 @@ const $e = ({
251
251
  w(!1);
252
252
  }, 500));
253
253
  },
254
- [g, a, c]
254
+ [g, a, u]
255
255
  ), H = x(
256
256
  async (e, o) => {
257
- w(!0), await c(e.id);
257
+ w(!0), await u(e.id);
258
258
  const n = o ?? e.primaryButton?.action;
259
259
  if (n === "Play Video" && e.productVideo && (q(e.productVideo), A(!0), D(!0)), n === "Open link") {
260
- const r = e.primaryButton?.redirectionUrl || e.redirectUrl;
261
- r && !r.startsWith("http") && (window.location.href = r);
260
+ const i = e.primaryButton?.redirectionUrl || e.redirectUrl;
261
+ i && !i.startsWith("http") && (window.location.href = i);
262
262
  }
263
263
  V(!1), M(null), I([]), a.findIndex(
264
- (r) => r.id === e.id
264
+ (i) => i.id === e.id
265
265
  ) === a.length - 1 && P(!0), y && m && y({
266
266
  storeId: m,
267
267
  announcementId: e.id,
@@ -277,11 +277,11 @@ const $e = ({
277
277
  w(!1);
278
278
  }, 500);
279
279
  },
280
- [a, c]
280
+ [a, u]
281
281
  ), X = x(
282
282
  async (e, o) => {
283
- w(!0), await c(e.id), (o ?? e.secondaryButton?.action) === "Play Video" && e.productVideo && (q(e.productVideo), A(!0), D(!0)), V(!1), M(null), I([]), a.findIndex(
284
- (r) => r.id === e.id
283
+ w(!0), await u(e.id), (o ?? e.secondaryButton?.action) === "Play Video" && e.productVideo && (q(e.productVideo), A(!0), D(!0)), V(!1), M(null), I([]), a.findIndex(
284
+ (i) => i.id === e.id
285
285
  ) === a.length - 1 && P(!0), y && m && y({
286
286
  storeId: m,
287
287
  announcementId: e.id,
@@ -295,7 +295,7 @@ const $e = ({
295
295
  w(!1);
296
296
  }, 500);
297
297
  },
298
- [a, c]
298
+ [a, u]
299
299
  ), G = x(
300
300
  (e) => {
301
301
  const o = e || g;
@@ -307,19 +307,19 @@ const $e = ({
307
307
  if (n > 0) {
308
308
  const t = a[n - 1];
309
309
  M(t);
310
- const i = n - 1, r = a.length;
310
+ const r = n - 1, i = a.length;
311
311
  I([
312
312
  {
313
313
  target: '[data-testid="whats-new-button"]',
314
314
  content: /* @__PURE__ */ v(
315
- re,
315
+ ie,
316
316
  {
317
317
  feature: t,
318
- currentIndex: i,
319
- totalFeatures: r,
318
+ currentIndex: r,
319
+ totalFeatures: i,
320
320
  onSkip: () => Z(t),
321
- onExplore: (u) => H(t, u),
322
- onSecondaryAction: (u) => X(t, u),
321
+ onExplore: (d) => H(t, d),
322
+ onSecondaryAction: (d) => X(t, d),
323
323
  onPrevious: () => G(t),
324
324
  onNext: () => Y(t),
325
325
  setIsClosing: z
@@ -382,19 +382,19 @@ const $e = ({
382
382
  if (n < a.length - 1) {
383
383
  const t = a[n + 1];
384
384
  M(t);
385
- const i = n + 1, r = a.length;
385
+ const r = n + 1, i = a.length;
386
386
  I([
387
387
  {
388
388
  target: '[data-testid="whats-new-button"]',
389
389
  content: /* @__PURE__ */ v(
390
- re,
390
+ ie,
391
391
  {
392
392
  feature: t,
393
- currentIndex: i,
394
- totalFeatures: r,
393
+ currentIndex: r,
394
+ totalFeatures: i,
395
395
  onSkip: () => Z(t),
396
- onExplore: (u) => H(t, u),
397
- onSecondaryAction: (u) => X(t, u),
396
+ onExplore: (d) => H(t, d),
397
+ onSecondaryAction: (d) => X(t, d),
398
398
  onPrevious: () => G(t),
399
399
  onNext: () => Y(t),
400
400
  setIsClosing: z
@@ -444,11 +444,11 @@ const $e = ({
444
444
  }
445
445
  ]);
446
446
  } else
447
- w(!0), c(o.id), V(!1), M(null), I([]), P(!0), setTimeout(() => {
447
+ w(!0), u(o.id), V(!1), M(null), I([]), P(!0), setTimeout(() => {
448
448
  w(!1);
449
449
  }, 500);
450
450
  },
451
- [g, a, c]
451
+ [g, a, u]
452
452
  ), Be = () => {
453
453
  a.length > 0 && !g && document.querySelector(
454
454
  '[data-testid="whats-new-button"]'
@@ -461,61 +461,52 @@ const $e = ({
461
461
  (e) => {
462
462
  const { action: o } = e;
463
463
  o === fe.CLOSE && (g && (w(!0), a.forEach((n) => {
464
- c(n.id);
464
+ u(n.id);
465
465
  }), P(!0), setTimeout(() => {
466
466
  w(!1);
467
467
  }, 500)), V(!1), M(null), I([]));
468
468
  },
469
- [g, a, c]
469
+ [g, a, u]
470
470
  ), Pe = x(
471
471
  (e) => {
472
472
  const { action: o } = e;
473
- o === fe.CLOSE && (s && (h(!0), c(s.id), l.findIndex(
474
- (i) => i.id === s.id
475
- ) === l.length - 1 && N(!0), y && m && y({
476
- storeId: m,
477
- announcementId: s.id,
478
- announcementTitle: s.title,
479
- imageUrl: s.displayImage || s.image,
480
- videoUrl: s.productVideo,
481
- buttonClicked: "Skip",
482
- buttonName: "Skip",
483
- buttonUrl: void 0
484
- }), setTimeout(() => {
473
+ o === fe.CLOSE && (c && (h(!0), u(c.id), s.findIndex(
474
+ (r) => r.id === c.id
475
+ ) === s.length - 1 && F(!0), setTimeout(() => {
485
476
  h(!1);
486
477
  }, 500)), B(!1), S(null), k([]));
487
478
  },
488
- [s, l, c]
479
+ [c, s, u]
489
480
  ), W = async (e, o) => {
490
481
  S(e);
491
- const n = o || l, t = n.findIndex((b) => b.id === e.id), i = n.length, r = e.featureTag.startsWith("#") || e.featureTag.startsWith(".") || e.featureTag.startsWith("[") ? e.featureTag : `#${e.featureTag}`, d = document.querySelector(r);
492
- if (d)
482
+ const n = o || s, t = n.findIndex((b) => b.id === e.id), r = n.length, i = e.featureTag.startsWith("#") || e.featureTag.startsWith(".") || e.featureTag.startsWith("[") ? e.featureTag : `#${e.featureTag}`, l = document.querySelector(i);
483
+ if (l)
493
484
  try {
494
485
  const { scrollToElementSmooth: b } = await import("./utils/elementHelpers.js");
495
- await b(d, 120);
486
+ await b(l, 120);
496
487
  } catch {
497
488
  }
498
489
  k([
499
490
  {
500
- target: r,
491
+ target: i,
501
492
  content: /* @__PURE__ */ v(
502
493
  ae,
503
494
  {
504
495
  feature: e,
505
496
  currentIndex: t,
506
- totalFeatures: i,
497
+ totalFeatures: r,
507
498
  onSkip: () => ee(e),
508
499
  onExplore: (b) => te(e, b),
509
500
  onSecondaryAction: (b) => oe(e, b),
510
501
  onPrevious: () => ne(e),
511
- onNext: () => ie(e),
502
+ onNext: () => re(e),
512
503
  setIsClosing: K
513
504
  },
514
505
  void 0,
515
506
  !1,
516
507
  {
517
508
  fileName: "/Users/syedanoorain/Downloads/bik-component-library/src/components/feature-announcements/FeatureAnnouncementProvider.tsx",
518
- lineNumber: 970,
509
+ lineNumber: 955,
519
510
  columnNumber: 6
520
511
  },
521
512
  void 0
@@ -563,10 +554,10 @@ const $e = ({
563
554
  });
564
555
  }, ee = x(
565
556
  async (e) => {
566
- const o = e || s;
557
+ const o = e || c;
567
558
  if (o) {
568
- h(!0), await c(o.id), Q((t) => new Set(t).add(o.id)), B(!1), S(null), k([]);
569
- const n = l.find(
559
+ h(!0), await u(o.id), Q((t) => new Set(t).add(o.id)), B(!1), S(null), k([]);
560
+ const n = s.find(
570
561
  (t) => t.id !== o.id && !j.has(t.id)
571
562
  );
572
563
  y && m && y({
@@ -579,27 +570,27 @@ const $e = ({
579
570
  buttonName: "Skip",
580
571
  buttonUrl: void 0
581
572
  }), setTimeout(() => {
582
- h(!1), n ? W(n, l) : N(!0);
573
+ h(!1), n ? W(n, s) : F(!0);
583
574
  }, 500);
584
575
  }
585
576
  },
586
577
  [
587
- s,
588
- l,
589
578
  c,
579
+ s,
580
+ u,
590
581
  j
591
582
  ]
592
583
  ), te = x(
593
584
  async (e, o) => {
594
- h(!0), await c(e.id), Q((i) => new Set(i).add(e.id));
585
+ h(!0), await u(e.id), Q((r) => new Set(r).add(e.id));
595
586
  const n = o ?? e.primaryButton?.action;
596
587
  if (n === "Play Video" && e.productVideo && (q(e.productVideo), A(!0), D(!0)), n === "Open link") {
597
- const i = e.primaryButton?.redirectionUrl || e.redirectUrl;
598
- i && !i.startsWith("http") && (window.location.href = i);
588
+ const r = e.primaryButton?.redirectionUrl || e.redirectUrl;
589
+ r && !r.startsWith("http") && (window.location.href = r);
599
590
  }
600
591
  B(!1), S(null), k([]);
601
- const t = l.find(
602
- (i) => i.id !== e.id && !j.has(i.id)
592
+ const t = s.find(
593
+ (r) => r.id !== e.id && !j.has(r.id)
603
594
  );
604
595
  y && m && y({
605
596
  storeId: m,
@@ -613,17 +604,17 @@ const $e = ({
613
604
  buttonName: e.primaryButton?.text || e.buttonText || "Explore",
614
605
  buttonUrl: e.primaryButton?.redirectionUrl || e.redirectUrl || e.productVideo
615
606
  }), setTimeout(() => {
616
- h(!1), t && n !== "Play Video" ? W(t, l) : t || N(!0);
607
+ h(!1), t && n !== "Play Video" ? W(t, s) : t || F(!0);
617
608
  }, 500);
618
609
  },
619
- [l, c, j]
610
+ [s, u, j]
620
611
  ), oe = x(
621
612
  async (e, o) => {
622
- h(!0), await c(e.id), Q((i) => new Set(i).add(e.id));
613
+ h(!0), await u(e.id), Q((r) => new Set(r).add(e.id));
623
614
  const n = o ?? e.secondaryButton?.action;
624
615
  n === "Play Video" && e.productVideo && (q(e.productVideo), A(!0), D(!0)), B(!1), S(null), k([]);
625
- const t = l.find(
626
- (i) => i.id !== e.id && !j.has(i.id)
616
+ const t = s.find(
617
+ (r) => r.id !== e.id && !j.has(r.id)
627
618
  );
628
619
  y && m && y({
629
620
  storeId: m,
@@ -635,50 +626,50 @@ const $e = ({
635
626
  buttonName: e.secondaryButton?.text || "Secondary",
636
627
  buttonUrl: e.secondaryButton?.redirectionUrl
637
628
  }), setTimeout(() => {
638
- h(!1), t && n !== "Play Video" ? W(t, l) : t || N(!0);
629
+ h(!1), t && n !== "Play Video" ? W(t, s) : t || F(!0);
639
630
  }, 500);
640
631
  },
641
- [l, c, j]
632
+ [s, u, j]
642
633
  ), ne = x(
643
634
  async (e) => {
644
- const o = e || s;
635
+ const o = e || c;
645
636
  if (!o)
646
637
  return;
647
- const n = l.findIndex(
638
+ const n = s.findIndex(
648
639
  (t) => t.id === o.id
649
640
  );
650
641
  if (n > 0) {
651
- const t = l[n - 1];
642
+ const t = s[n - 1];
652
643
  S(t);
653
- const i = t.featureTag.startsWith("#") || t.featureTag.startsWith(".") || t.featureTag.startsWith("[") ? t.featureTag : `#${t.featureTag}`, r = document.querySelector(i);
654
- if (r)
644
+ const r = t.featureTag.startsWith("#") || t.featureTag.startsWith(".") || t.featureTag.startsWith("[") ? t.featureTag : `#${t.featureTag}`, i = document.querySelector(r);
645
+ if (i)
655
646
  try {
656
647
  const { scrollToElementSmooth: f } = await import("./utils/elementHelpers.js");
657
- await f(r, 120);
648
+ await f(i, 120);
658
649
  } catch {
659
650
  }
660
- const d = n - 1, u = l.length;
651
+ const l = n - 1, d = s.length;
661
652
  k([
662
653
  {
663
- target: i,
654
+ target: r,
664
655
  content: /* @__PURE__ */ v(
665
656
  ae,
666
657
  {
667
658
  feature: t,
668
- currentIndex: d,
669
- totalFeatures: u,
659
+ currentIndex: l,
660
+ totalFeatures: d,
670
661
  onSkip: () => ee(t),
671
662
  onExplore: (f) => te(t, f),
672
663
  onSecondaryAction: (f) => oe(t, f),
673
664
  onPrevious: () => ne(t),
674
- onNext: () => ie(t),
665
+ onNext: () => re(t),
675
666
  setIsClosing: K
676
667
  },
677
668
  void 0,
678
669
  !1,
679
670
  {
680
671
  fileName: "/Users/syedanoorain/Downloads/bik-component-library/src/components/feature-announcements/FeatureAnnouncementProvider.tsx",
681
- lineNumber: 1262,
672
+ lineNumber: 1247,
682
673
  columnNumber: 8
683
674
  },
684
675
  void 0
@@ -720,47 +711,47 @@ const $e = ({
720
711
  ]);
721
712
  }
722
713
  },
723
- [s, l]
724
- ), ie = x(
714
+ [c, s]
715
+ ), re = x(
725
716
  async (e) => {
726
- const o = e || s;
717
+ const o = e || c;
727
718
  if (!o)
728
719
  return;
729
- const n = l.findIndex(
720
+ const n = s.findIndex(
730
721
  (t) => t.id === o.id
731
722
  );
732
- if (n < l.length - 1) {
733
- const t = l[n + 1];
723
+ if (n < s.length - 1) {
724
+ const t = s[n + 1];
734
725
  S(t);
735
- const i = t.featureTag.startsWith("#") || t.featureTag.startsWith(".") || t.featureTag.startsWith("[") ? t.featureTag : `#${t.featureTag}`, r = document.querySelector(i);
736
- if (r)
726
+ const r = t.featureTag.startsWith("#") || t.featureTag.startsWith(".") || t.featureTag.startsWith("[") ? t.featureTag : `#${t.featureTag}`, i = document.querySelector(r);
727
+ if (i)
737
728
  try {
738
729
  const { scrollToElementSmooth: f } = await import("./utils/elementHelpers.js");
739
- await f(r, 120);
730
+ await f(i, 120);
740
731
  } catch {
741
732
  }
742
- const d = n + 1, u = l.length;
733
+ const l = n + 1, d = s.length;
743
734
  k([
744
735
  {
745
- target: i,
736
+ target: r,
746
737
  content: /* @__PURE__ */ v(
747
738
  ae,
748
739
  {
749
740
  feature: t,
750
- currentIndex: d,
751
- totalFeatures: u,
741
+ currentIndex: l,
742
+ totalFeatures: d,
752
743
  onSkip: () => ee(t),
753
744
  onExplore: (f) => te(t, f),
754
745
  onSecondaryAction: (f) => oe(t, f),
755
746
  onPrevious: () => ne(t),
756
- onNext: () => ie(t),
747
+ onNext: () => re(t),
757
748
  setIsClosing: K
758
749
  },
759
750
  void 0,
760
751
  !1,
761
752
  {
762
753
  fileName: "/Users/syedanoorain/Downloads/bik-component-library/src/components/feature-announcements/FeatureAnnouncementProvider.tsx",
763
- lineNumber: 1362,
754
+ lineNumber: 1347,
764
755
  columnNumber: 8
765
756
  },
766
757
  void 0
@@ -801,11 +792,11 @@ const $e = ({
801
792
  }
802
793
  ]);
803
794
  } else
804
- h(!0), N(!0), c(o.id), B(!1), S(null), k([]), setTimeout(() => {
795
+ h(!0), F(!0), u(o.id), B(!1), S(null), k([]), setTimeout(() => {
805
796
  h(!1);
806
797
  }, 500);
807
798
  },
808
- [s, l, c]
799
+ [c, s, u]
809
800
  );
810
801
  return /* @__PURE__ */ v(je, { children: [
811
802
  be,
@@ -874,7 +865,7 @@ const $e = ({
874
865
  !1,
875
866
  {
876
867
  fileName: "/Users/syedanoorain/Downloads/bik-component-library/src/components/feature-announcements/FeatureAnnouncementProvider.tsx",
877
- lineNumber: 1437,
868
+ lineNumber: 1422,
878
869
  columnNumber: 5
879
870
  },
880
871
  void 0
@@ -942,11 +933,11 @@ const $e = ({
942
933
  skip: "Skip"
943
934
  }
944
935
  },
945
- `minor-joyride-${Fe}`,
936
+ `minor-joyride-${Ne}`,
946
937
  !1,
947
938
  {
948
939
  fileName: "/Users/syedanoorain/Downloads/bik-component-library/src/components/feature-announcements/FeatureAnnouncementProvider.tsx",
949
- lineNumber: 1500,
940
+ lineNumber: 1485,
950
941
  columnNumber: 5
951
942
  },
952
943
  void 0
@@ -958,26 +949,26 @@ const $e = ({
958
949
  videoUrl: Te,
959
950
  onClose: () => {
960
951
  A(!1), q(""), D(!1);
961
- const e = l.find(
952
+ const e = s.find(
962
953
  (o) => !j.has(o.id)
963
954
  );
964
955
  e ? setTimeout(() => {
965
- W(e, l);
966
- }, 300) : N(!0);
956
+ W(e, s);
957
+ }, 300) : F(!0);
967
958
  }
968
959
  },
969
960
  void 0,
970
961
  !1,
971
962
  {
972
963
  fileName: "/Users/syedanoorain/Downloads/bik-component-library/src/components/feature-announcements/FeatureAnnouncementProvider.tsx",
973
- lineNumber: 1566,
964
+ lineNumber: 1551,
974
965
  columnNumber: 4
975
966
  },
976
967
  void 0
977
968
  )
978
969
  ] }, void 0, !0, {
979
970
  fileName: "/Users/syedanoorain/Downloads/bik-component-library/src/components/feature-announcements/FeatureAnnouncementProvider.tsx",
980
- lineNumber: 1433,
971
+ lineNumber: 1418,
981
972
  columnNumber: 3
982
973
  }, void 0);
983
974
  };