@retoo/borda 0.0.2 → 0.1.1

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.
@@ -2279,7 +2279,7 @@
2279
2279
  return se("setContext").set(e, t), t;
2280
2280
  }(e, t)];
2281
2281
  }(), Zr = function(e) {
2282
- return e.ON_BORDA_DESTROY = "borda:on-destroy", e.ON_CLOSE_CLICK = "close:click", e.ON_OVERLAY_CLICK = "overlay:click", e.ON_TOUR_START = "tour:start", e.ON_TOUR_FINISH = "tour:finish", e.ON_TOUR_CLOSE = "tour:close", e.ON_TOUR_NEXT = "tour:next", e.ON_TOUR_PREV = "tour:prev", e.ON_KEYBOARD_NEXT = "keyboard:next", e.ON_KEYBOARD_PREV = "keyboard:prev", e.ON_TOUR_STEP_CHANGE = "tour:step-change", e.ON_SKIP_CHANGE = "skip:change", e.ON_SKIP_CLEAR = "skip:clear", e.ON_VISIBILITY_SHOW = "visibility:show", e.ON_VISIBILITY_HIDE = "visibility:hide", e;
2282
+ return e.ON_BORDA_DESTROY = "borda:on-destroy", e.ON_CLOSE_CLICK = "close:click", e.ON_OVERLAY_CLICK = "overlay:click", e.ON_TOUR_START = "tour:start", e.ON_TOUR_FINISH = "tour:finish", e.ON_TOUR_CLOSE = "tour:close", e.ON_TOUR_NEXT = "tour:next", e.ON_TOUR_PREV = "tour:prev", e.ON_TOUR_ERROR = "tour:error", e.ON_KEYBOARD_NEXT = "keyboard:next", e.ON_KEYBOARD_PREV = "keyboard:prev", e.ON_TOUR_STEP_CHANGE = "tour:step-change", e.ON_SKIP_CHANGE = "skip:change", e.ON_SKIP_CLEAR = "skip:clear", e.ON_VISIBILITY_SHOW = "visibility:show", e.ON_VISIBILITY_HIDE = "visibility:hide", e;
2283
2283
  }({});
2284
2284
  function Jr() {
2285
2285
  const e = /* @__PURE__ */ new Map();
@@ -2594,9 +2594,16 @@
2594
2594
  };
2595
2595
  }
2596
2596
  function Ao(e) {
2597
+ try {
2598
+ return document.querySelector(e);
2599
+ } catch {
2600
+ return null;
2601
+ }
2602
+ }
2603
+ function Po(e) {
2597
2604
  if (!e) return null;
2598
2605
  if (e instanceof HTMLElement) return e;
2599
- if ("string" == typeof e) return document.querySelector(e);
2606
+ if ("string" == typeof e) return Ao(e);
2600
2607
  const t = function(e) {
2601
2608
  const t = [];
2602
2609
  if (e.id && t.push(`#${CSS.escape(e.id)}`), e.class && t.push(`.${CSS.escape(e.class)}`), e.data) {
@@ -2605,22 +2612,27 @@
2605
2612
  }
2606
2613
  return t.join("");
2607
2614
  }(e);
2608
- return t ? document.querySelector(t) : null;
2615
+ return t ? Ao(t) : null;
2609
2616
  }
2610
- function Po(e, t) {
2617
+ function xo(e, t) {
2611
2618
  let n = nt(0), r = nt(!1), o = null, i = null;
2612
- const s = Ce(() => e.current.steps ?? []), a = Ce(() => En(s).length), l = Ce(() => En(s)[En(n)]), u = Ce(() => En(n) + 1), c = Ce(() => Ao(En(l)?.target)), f = Ce(() => En(n) >= En(a) - 1), d = Ce(() => En(a) > 0), p = Ce(() => !En(f)), h = Ce(() => En(n) > 0), v = Ce(() => e.getConfig().tour);
2613
- async function g(e) {
2619
+ const s = Ce(() => e.current.steps ?? []), a = Ce(() => En(s).length), l = Ce(() => En(s)[En(n)]), u = Ce(() => En(n) + 1), c = Ce(() => Po(En(l)?.target)), f = Ce(() => En(n) >= En(a) - 1), d = Ce(() => En(a) > 0), p = Ce(() => !En(f)), h = Ce(() => En(n) > 0), v = Ce(() => e.getConfig().tour);
2620
+ function g() {
2621
+ if (!En(l) || En(c)) return !0;
2622
+ const e = new vo(`Borda: target for step ${En(u)} did not resolve to an element.`);
2623
+ return console.error(e), t.emit(Zr.ON_TOUR_ERROR, e), t.emit(Zr.ON_TOUR_CLOSE), !1;
2624
+ }
2625
+ async function m(e) {
2614
2626
  if (e < 0 || e >= En(a)) return;
2615
2627
  const r = En(s)[En(n)], o = En(s)[e];
2616
- r?.onDeselected?.(), await o?.prepareElement?.(), o?.onBeforeHighlighted?.(), ot(n, e, !0), o?.onHighlighted?.(), t.emit(Zr.ON_TOUR_STEP_CHANGE, En(u));
2628
+ r?.onDeselected?.(), await o?.prepareElement?.(), o?.onBeforeHighlighted?.(), ot(n, e, !0), g() && (o?.onHighlighted?.(), t.emit(Zr.ON_TOUR_STEP_CHANGE, En(u)));
2617
2629
  }
2618
- function m() {
2630
+ function _() {
2619
2631
  return new Promise((e, t) => {
2620
2632
  o = e, i = t;
2621
2633
  });
2622
2634
  }
2623
- function _() {
2635
+ function b() {
2624
2636
  t.emit(Zr.ON_TOUR_FINISH);
2625
2637
  }
2626
2638
  return {
@@ -2664,33 +2676,34 @@
2664
2676
  clearMovePrevented: function() {
2665
2677
  ot(r, !1), i?.(), o = null, i = null;
2666
2678
  },
2667
- changeStep: g,
2679
+ changeStep: m,
2668
2680
  prev: async function() {
2669
2681
  if (En(h)) {
2670
2682
  if (En(l)?.onPrev?.(), En(v)?.onPrev?.(), t.emit(Zr.ON_TOUR_PREV), En(r)) try {
2671
- await m();
2683
+ await _();
2672
2684
  } catch {
2673
2685
  return;
2674
2686
  }
2675
- await g(En(n) - 1);
2687
+ await m(En(n) - 1);
2676
2688
  }
2677
2689
  },
2678
2690
  next: async function() {
2679
- if (En(f)) _();
2691
+ if (En(f)) b();
2680
2692
  else {
2681
2693
  if (En(l)?.onNext?.(), En(v)?.onNext?.(), t.emit(Zr.ON_TOUR_NEXT), En(r)) try {
2682
- await m();
2694
+ await _();
2683
2695
  } catch {
2684
2696
  return;
2685
2697
  }
2686
- await g(En(n) + 1);
2698
+ await m(En(n) + 1);
2687
2699
  }
2688
2700
  },
2689
- finish: _
2690
- }
2701
+ finish: b
2702
+ },
2703
+ checkCurrentTarget: g
2691
2704
  };
2692
2705
  }
2693
- function xo(e) {
2706
+ function Do(e) {
2694
2707
  return { highlight: function(t, n, r) {
2695
2708
  return e({
2696
2709
  ...n,
@@ -2698,15 +2711,15 @@
2698
2711
  }, r);
2699
2712
  } };
2700
2713
  }
2701
- var Do = new Set([
2714
+ var Lo = new Set([
2702
2715
  "INPUT",
2703
2716
  "TEXTAREA",
2704
2717
  "SELECT"
2705
2718
  ]);
2706
- function Lo(e, t) {
2719
+ function Ro(e, t) {
2707
2720
  const n = Ce(() => e.getConfig().tour);
2708
2721
  function r(e) {
2709
- if (!Do.has(e.target?.tagName)) switch (e.key) {
2722
+ if (!Lo.has(e.target?.tagName)) switch (e.key) {
2710
2723
  case "ArrowRight":
2711
2724
  e.preventDefault(), t.emit(Zr.ON_KEYBOARD_NEXT);
2712
2725
  break;
@@ -2725,15 +2738,15 @@
2725
2738
  }
2726
2739
  };
2727
2740
  }
2728
- var Ro = [fo.RESPONSIVE, fo.STEP];
2729
- function Mo(e) {
2741
+ var Mo = [fo.RESPONSIVE, fo.STEP];
2742
+ function Io(e) {
2730
2743
  const t = ut({});
2731
2744
  function n(e, n) {
2732
2745
  null === n ? delete t[e] : t[e] = n;
2733
2746
  }
2734
2747
  function r() {
2735
2748
  let n = e.current;
2736
- for (const e of Ro) {
2749
+ for (const e of Mo) {
2737
2750
  const r = t[e];
2738
2751
  r && (n = _o(n, r()));
2739
2752
  }
@@ -2769,7 +2782,7 @@
2769
2782
  }
2770
2783
  };
2771
2784
  }
2772
- function Io(e, t) {
2785
+ function Bo(e, t) {
2773
2786
  let n = nt(null), r = [];
2774
2787
  function o(e, r) {
2775
2788
  const o = function(e, t) {
@@ -2805,47 +2818,47 @@
2805
2818
  }
2806
2819
  };
2807
2820
  }
2808
- var Bo = function(e) {
2821
+ var $o = function(e) {
2809
2822
  return e.LINEAR = "linear", e.EASE = "ease", e.EASE_IN = "ease-in", e.EASE_OUT = "ease-out", e.EASE_IN_OUT = "ease-in-out", e;
2810
- }({}), $o = {
2811
- [Bo.LINEAR]: (e) => e,
2812
- [Bo.EASE]: (e) => e * e * (3 - 2 * e),
2813
- [Bo.EASE_IN]: (e) => e * e,
2814
- [Bo.EASE_OUT]: (e) => 1 - (1 - e) * (1 - e),
2815
- [Bo.EASE_IN_OUT]: (e) => e < .5 ? 2 * e * e : 1 - Math.pow(-2 * e + 2, 2) / 2
2816
- }, Ho = Bo.EASE_IN_OUT;
2817
- function jo({ getEasing: e }) {
2823
+ }({}), Ho = {
2824
+ [$o.LINEAR]: (e) => e,
2825
+ [$o.EASE]: (e) => e * e * (3 - 2 * e),
2826
+ [$o.EASE_IN]: (e) => e * e,
2827
+ [$o.EASE_OUT]: (e) => 1 - (1 - e) * (1 - e),
2828
+ [$o.EASE_IN_OUT]: (e) => e < .5 ? 2 * e * e : 1 - Math.pow(-2 * e + 2, 2) / 2
2829
+ }, jo = $o.EASE_IN_OUT;
2830
+ function Fo({ getEasing: e }) {
2818
2831
  const t = Ce(e), n = Ce(() => function(e) {
2819
- return "function" == typeof e ? e : e ? $o[e] : $o[Ho];
2832
+ return "function" == typeof e ? e : e ? Ho[e] : Ho[jo];
2820
2833
  }(En(t)));
2821
2834
  return { get easingFunction() {
2822
2835
  return En(n);
2823
2836
  } };
2824
2837
  }
2825
- var Fo = {
2838
+ var zo = {
2826
2839
  block: "center",
2827
2840
  inline: "nearest",
2828
2841
  duration: 400,
2829
- easing: Bo.EASE_IN_OUT,
2842
+ easing: $o.EASE_IN_OUT,
2830
2843
  offset: {
2831
2844
  x: 0,
2832
2845
  y: 0
2833
2846
  },
2834
2847
  isLocked: !0
2835
2848
  };
2836
- function zo(e) {
2849
+ function Uo(e) {
2837
2850
  let t = nt(!1), n = null;
2838
2851
  const r = Ce(() => e.getConfig().scroll), o = Ce(() => !1 !== En(r)), i = Ce(() => En(r) || {}), s = Ce(() => {
2839
2852
  return e = En(i), {
2840
- ...Fo,
2853
+ ...zo,
2841
2854
  ...e,
2842
2855
  offset: {
2843
- ...Fo.offset,
2856
+ ...zo.offset,
2844
2857
  ...e.offset ?? {}
2845
2858
  }
2846
2859
  };
2847
2860
  var e;
2848
- }), a = jo({ getEasing: () => En(s).easing }), l = Ce(() => e.getConfig().animation), u = Ce(() => !1 !== En(l) && !1 !== En(l)?.isEnabled), c = Ce(() => En(u) ? En(s).duration : 0), f = { resolve: function(e, t, n, r, o) {
2861
+ }), a = Fo({ getEasing: () => En(s).easing }), l = Ce(() => e.getConfig().animation), u = Ce(() => !1 !== En(l) && !1 !== En(l)?.isEnabled), c = Ce(() => En(u) ? En(s).duration : 0), f = { resolve: function(e, t, n, r, o) {
2849
2862
  return e + function(e, t, n, r) {
2850
2863
  const o = t + n;
2851
2864
  switch (r) {
@@ -2912,7 +2925,7 @@
2912
2925
  }
2913
2926
  };
2914
2927
  }
2915
- function Uo(e, t) {
2928
+ function Vo(e, t) {
2916
2929
  let n = nt(!1);
2917
2930
  const r = Ce(() => e.getConfig().skip), o = Ce(() => !1 === En(r)), i = Ce(() => "object" == typeof En(r) && En(r)?.storageKey ? En(r).storageKey : "borda-tour-skipped");
2918
2931
  function s(e, t) {
@@ -2953,7 +2966,7 @@
2953
2966
  }
2954
2967
  };
2955
2968
  }
2956
- function Vo(e, t) {
2969
+ function qo(e, t) {
2957
2970
  function n() {
2958
2971
  e.mergeConfig({ visibility: { isHidden: !1 } }), t.emit(Zr.ON_VISIBILITY_SHOW);
2959
2972
  }
@@ -2980,14 +2993,14 @@
2980
2993
  };
2981
2994
  }
2982
2995
  ee = !0;
2983
- var qo = Hn("<path d=\"M4.45416 4.45404L11.3625 11.3624Z\" fill=\"currentColor\"></path><path d=\"M4.45416 11.3624L11.3625 4.45404Z\" fill=\"currentColor\"></path><path d=\"M4.45416 4.45404L11.3625 11.3624M4.45416 11.3624L11.3625 4.45404\" stroke=\"currentColor\" stroke-width=\"1.25\" stroke-linecap=\"round\" stroke-linejoin=\"bevel\"></path>", 1);
2984
- var Ko = function(e) {
2996
+ var Ko = Hn("<path d=\"M4.45416 4.45404L11.3625 11.3624Z\" fill=\"currentColor\"></path><path d=\"M4.45416 11.3624L11.3625 4.45404Z\" fill=\"currentColor\"></path><path d=\"M4.45416 4.45404L11.3625 11.3624M4.45416 11.3624L11.3625 4.45404\" stroke=\"currentColor\" stroke-width=\"1.25\" stroke-linecap=\"round\" stroke-linejoin=\"bevel\"></path>", 1);
2997
+ var Go = function(e) {
2985
2998
  return e.RECTANGLE = "rectangle", e.CIRCLE = "circle", e.SQUARE = "square", e;
2986
- }({}), Go = function(e) {
2987
- return e.FILLED = "filled", e.OUTLINED = "outlined", e.GHOST = "ghost", e.TEXT = "text", e;
2988
2999
  }({}), Xo = function(e) {
3000
+ return e.FILLED = "filled", e.OUTLINED = "outlined", e.GHOST = "ghost", e.TEXT = "text", e;
3001
+ }({}), Wo = function(e) {
2989
3002
  return e.BUTTON = "button", e.SUBMIT = "submit", e.RESET = "reset", e;
2990
- }({}), Wo = new Set([
3003
+ }({}), Yo = new Set([
2991
3004
  "$$slots",
2992
3005
  "$$events",
2993
3006
  "$$legacy",
@@ -3002,12 +3015,12 @@
3002
3015
  "customClasses",
3003
3016
  "customStyles",
3004
3017
  "children"
3005
- ]), Yo = Bn("<button><!></button>");
3006
- function Zo(e, t) {
3018
+ ]), Zo = Bn("<button><!></button>");
3019
+ function Jo(e, t) {
3007
3020
  re(t, !0);
3008
- let n = Kr(t, "size", 19, () => io.MD), r = Kr(t, "shape", 19, () => Ko.RECTANGLE), o = Kr(t, "variant", 19, () => Go.FILLED), i = Kr(t, "type", 19, () => Xo.BUTTON), s = new Proxy({
3021
+ let n = Kr(t, "size", 19, () => io.MD), r = Kr(t, "shape", 19, () => Go.RECTANGLE), o = Kr(t, "variant", 19, () => Xo.FILLED), i = Kr(t, "type", 19, () => Wo.BUTTON), s = new Proxy({
3009
3022
  props: t,
3010
- exclude: Wo
3023
+ exclude: Yo
3011
3024
  }, Ur);
3012
3025
  const a = Ce(() => [
3013
3026
  "rb-button",
@@ -3020,7 +3033,7 @@
3020
3033
  const u = Ce(() => ro(t.customStyles?.root));
3021
3034
  var c = { getElements: function() {
3022
3035
  return { root: En(l) };
3023
- } }, f = Yo();
3036
+ } }, f = Zo();
3024
3037
  Br(f, () => ({
3025
3038
  id: t.id,
3026
3039
  type: i(),
@@ -3045,9 +3058,9 @@
3045
3058
  t.children && e(p);
3046
3059
  }), X(f), zr(f, (e) => ot(l, e), () => En(l)), zn(e, f), oe(c);
3047
3060
  }
3048
- var Jo = Hn("<svg fill=\"none\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\"><!></svg>");
3049
- var Qo = Bn("<div><!></div>");
3050
- function ei(e, t) {
3061
+ var Qo = Hn("<svg fill=\"none\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\"><!></svg>");
3062
+ var ei = Bn("<div><!></div>");
3063
+ function ti(e, t) {
3051
3064
  re(t, !0);
3052
3065
  let n = Kr(t, "size", 19, () => io.MD), r = Kr(t, "shape", 19, () => ao.CIRCLE), o = Kr(t, "aria", 19, () => ({ ariaLabel: "Close" }));
3053
3066
  const { eventEmitter: i, close: s } = Wr();
@@ -3067,22 +3080,22 @@
3067
3080
  button: oo(En(l)),
3068
3081
  cross: oo(En(u))
3069
3082
  };
3070
- } }, h = Qo(), v = yt(h), m = (e) => {
3083
+ } }, h = ei(), v = yt(h), m = (e) => {
3071
3084
  var n = Fn();
3072
3085
  hr(Tt(n), () => t.customHtml.button), zn(e, n);
3073
3086
  }, _ = (e) => {
3074
3087
  {
3075
3088
  let r = Ce(() => ({ root: t.customClasses?.button })), i = Ce(() => ({ root: t.customStyles?.button }));
3076
- zr(Zo(e, {
3089
+ zr(Jo(e, {
3077
3090
  get aria() {
3078
3091
  return o();
3079
3092
  },
3080
3093
  autosize: !0,
3081
3094
  get shape() {
3082
- return Ko.CIRCLE;
3095
+ return Go.CIRCLE;
3083
3096
  },
3084
3097
  get variant() {
3085
- return Go.FILLED;
3098
+ return Xo.FILLED;
3086
3099
  },
3087
3100
  get customClasses() {
3088
3101
  return En(r);
@@ -3104,7 +3117,7 @@
3104
3117
  ]), s = Ce(() => ro(t.customStyles?.root));
3105
3118
  var a = { getElements: function() {
3106
3119
  return { root: En(o) };
3107
- } }, l = Jo();
3120
+ } }, l = Qo();
3108
3121
  return ir(yt(l), () => t.children ?? g), X(l), zr(l, (e) => ot(o, e), () => En(o)), Bt(() => {
3109
3122
  Ir(l, "id", t.id), Tr(l, 0, mr(En(i))), Er(l, En(s)), Ir(l, "viewBox", n());
3110
3123
  }), zn(e, l), oe(a);
@@ -3120,7 +3133,7 @@
3120
3133
  },
3121
3134
  children: (e, t) => {
3122
3135
  (function(e) {
3123
- var t = qo();
3136
+ var t = Ko();
3124
3137
  W(2), zn(e, t);
3125
3138
  })(e);
3126
3139
  },
@@ -3138,34 +3151,34 @@
3138
3151
  Ir(h, "id", t.id), Tr(h, 1, mr(En(c))), Er(h, En(f));
3139
3152
  }), zn(e, h), oe(p);
3140
3153
  }
3141
- var ti = {
3154
+ var ni = {
3142
3155
  label: "Back",
3143
- type: Xo.BUTTON,
3144
- variant: Go.OUTLINED,
3145
- shape: Ko.RECTANGLE
3146
- }, ni = {
3147
- label: "Next",
3148
- type: Xo.BUTTON,
3149
- variant: Go.FILLED,
3150
- shape: Ko.RECTANGLE
3156
+ type: Wo.BUTTON,
3157
+ variant: Xo.OUTLINED,
3158
+ shape: Go.RECTANGLE
3151
3159
  }, ri = {
3152
- label: "Finish",
3153
- type: Xo.BUTTON,
3154
- variant: Go.FILLED,
3155
- shape: Ko.RECTANGLE
3160
+ label: "Next",
3161
+ type: Wo.BUTTON,
3162
+ variant: Xo.FILLED,
3163
+ shape: Go.RECTANGLE
3156
3164
  }, oi = {
3165
+ label: "Finish",
3166
+ type: Wo.BUTTON,
3167
+ variant: Xo.FILLED,
3168
+ shape: Go.RECTANGLE
3169
+ }, ii = {
3157
3170
  label: "Skip",
3158
- type: Xo.BUTTON,
3159
- variant: Go.TEXT,
3160
- shape: Ko.RECTANGLE
3161
- }, ii = Bn("<div><!> <div class=\"rb-tour-buttons__center\"><!></div> <!> <!></div>");
3162
- var si = Bn("<img/>");
3163
- var ai = function(e) {
3171
+ type: Wo.BUTTON,
3172
+ variant: Xo.TEXT,
3173
+ shape: Go.RECTANGLE
3174
+ }, si = Bn("<div><!> <div class=\"rb-tour-buttons__center\"><!></div> <!> <!></div>");
3175
+ var ai = Bn("<img/>");
3176
+ var li = function(e) {
3164
3177
  return e.DEFAULT = "default", e.BLEED = "bleed", e;
3165
3178
  }({});
3166
- function li(e, t) {
3179
+ function ui(e, t) {
3167
3180
  re(t, !0);
3168
- let n = Kr(t, "src", 3, ""), r = Kr(t, "alt", 3, ""), o = Kr(t, "variant", 19, () => ai.DEFAULT), i = nt(null);
3181
+ let n = Kr(t, "src", 3, ""), r = Kr(t, "alt", 3, ""), o = Kr(t, "variant", 19, () => li.DEFAULT), i = nt(null);
3169
3182
  const s = Ce(() => [
3170
3183
  "rb-tour-image",
3171
3184
  `rb-tour-image--${o()}`,
@@ -3186,7 +3199,7 @@
3186
3199
  var n = Fn();
3187
3200
  hr(Tt(n), () => t.customHtml.root), zn(e, n);
3188
3201
  }, f = (e) => {
3189
- var a = si();
3202
+ var a = ai();
3190
3203
  zr(a, (e) => ot(o, e), () => En(o)), Bt(() => {
3191
3204
  Ir(a, "id", t.id), Tr(a, 1, mr(En(i))), Er(a, En(s)), Ir(a, "src", n()), Ir(a, "alt", r()), Ir(a, "aria-label", t.aria?.ariaLabel), Ir(a, "aria-labelledby", t.aria?.ariaLabelledby), Ir(a, "aria-describedby", t.aria?.ariaDescribedby);
3192
3205
  }), zn(e, a);
@@ -3220,15 +3233,15 @@
3220
3233
  }
3221
3234
  return oe(a);
3222
3235
  }
3223
- var ui = Bn("<div></div>"), ci = Bn("<div role=\"progressbar\"></div>");
3224
- var fi = Bn("<div role=\"progressbar\"><div><div></div></div></div>");
3225
- var di = Bn("<div role=\"progressbar\"><span> </span></div>");
3226
- var pi = function(e) {
3236
+ var ci = Bn("<div></div>"), fi = Bn("<div role=\"progressbar\"></div>");
3237
+ var di = Bn("<div role=\"progressbar\"><div><div></div></div></div>");
3238
+ var pi = Bn("<div role=\"progressbar\"><span> </span></div>");
3239
+ var hi = function(e) {
3227
3240
  return e.DOTS = "dots", e.TEXT = "text", e.LINE = "line", e;
3228
- }({}), hi = Bn("<div><!></div>");
3229
- function vi(e, t) {
3241
+ }({}), vi = Bn("<div><!></div>");
3242
+ function gi(e, t) {
3230
3243
  re(t, !0);
3231
- let n = Kr(t, "currentStep", 3, 1), r = Kr(t, "totalSteps", 3, 1), o = Kr(t, "variant", 19, () => pi.DOTS), i = nt(null);
3244
+ let n = Kr(t, "currentStep", 3, 1), r = Kr(t, "totalSteps", 3, 1), o = Kr(t, "variant", 19, () => hi.DOTS), i = nt(null);
3232
3245
  const s = Ce(() => [
3233
3246
  "rb-tour-progress",
3234
3247
  `rb-tour-progress--${o()}`,
@@ -3236,7 +3249,7 @@
3236
3249
  ]), a = Ce(() => ro(t.customStyles?.root));
3237
3250
  var l = { getElements: function() {
3238
3251
  return { root: En(i) };
3239
- } }, u = hi(), c = yt(u), f = (e) => {
3252
+ } }, u = vi(), c = yt(u), f = (e) => {
3240
3253
  var n = Fn();
3241
3254
  hr(Tt(n), () => t.customHtml.progress), zn(e, n);
3242
3255
  }, d = (e) => {
@@ -3248,9 +3261,9 @@
3248
3261
  "rb-progress--dots",
3249
3262
  t.customClasses?.root
3250
3263
  ]), s = Ce(() => ro(t.customStyles?.root)), a = Ce(() => ["rb-progress__item", t.customClasses?.item]), l = Ce(() => ro(t.customStyles?.item));
3251
- var u = ci();
3264
+ var u = fi();
3252
3265
  Ir(u, "aria-valuemin", 1), ur(u, 20, () => Array.from({ length: r() }, (e, t) => t), (e) => e, (e, t) => {
3253
- var r = ui();
3266
+ var r = ci();
3254
3267
  Bt((e) => {
3255
3268
  Tr(r, 1, e), Er(r, En(l));
3256
3269
  }, [() => mr([...En(a), t + 1 === n() && "rb-progress__item--active"])]), zn(e, r);
@@ -3280,7 +3293,7 @@
3280
3293
  "rb-progress--text",
3281
3294
  t.customClasses?.root
3282
3295
  ]), s = Ce(() => ro(t.customStyles?.root)), a = Ce(() => ["rb-progress__item", t.customClasses?.item]), l = Ce(() => ro(t.customStyles?.item));
3283
- var u = di();
3296
+ var u = pi();
3284
3297
  Ir(u, "aria-valuemin", 1);
3285
3298
  var c = yt(u), f = yt(c);
3286
3299
  X(c), X(u), Bt(() => {
@@ -3309,7 +3322,7 @@
3309
3322
  "rb-progress--line",
3310
3323
  t.customClasses?.root
3311
3324
  ]), a = Ce(() => ro(t.customStyles?.root)), l = Ce(() => ["rb-progress__track", t.customClasses?.track]), u = Ce(() => ro(t.customStyles?.track)), c = Ce(() => ["rb-progress__progress", t.customClasses?.progress]), f = Ce(() => ro(t.customStyles?.progress));
3312
- var d = fi();
3325
+ var d = di();
3313
3326
  Ir(d, "aria-valuemin", 1);
3314
3327
  var p = yt(d), h = yt(p);
3315
3328
  let v;
@@ -3332,13 +3345,13 @@
3332
3345
  });
3333
3346
  };
3334
3347
  return ar(c, (e) => {
3335
- t.customHtml?.progress ? e(f) : o() === pi.DOTS ? e(d, 1) : o() === pi.TEXT ? e(p, 2) : o() === pi.LINE && e(h, 3);
3348
+ t.customHtml?.progress ? e(f) : o() === hi.DOTS ? e(d, 1) : o() === hi.TEXT ? e(p, 2) : o() === hi.LINE && e(h, 3);
3336
3349
  }), X(u), zr(u, (e) => ot(i, e), () => En(i)), Bt(() => {
3337
3350
  Ir(u, "id", t.id), Tr(u, 1, mr(En(s))), Er(u, En(a)), Ir(u, "aria-label", t.aria?.ariaLabel), Ir(u, "aria-labelledby", t.aria?.ariaLabelledby), Ir(u, "aria-describedby", t.aria?.ariaDescribedby), Ir(u, "aria-disabled", t.aria?.ariaDisabled), Ir(u, "aria-expanded", t.aria?.ariaExpanded), Ir(u, "aria-controls", t.aria?.ariaControls), Ir(u, "aria-haspopup", t.aria?.ariaHaspopup), Ir(u, "aria-pressed", t.aria?.ariaPressed);
3338
3351
  }), zn(e, u), oe(l);
3339
3352
  }
3340
- var gi = Bn("<input type=\"checkbox\"/>"), mi = Bn("<span></span>"), _i = Bn("<span> </span>"), bi = Bn("<label><!> <!></label>");
3341
- function yi(e, t) {
3353
+ var mi = Bn("<input type=\"checkbox\"/>"), _i = Bn("<span></span>"), bi = Bn("<span> </span>"), yi = Bn("<label><!> <!></label>");
3354
+ function Ti(e, t) {
3342
3355
  re(t, !0);
3343
3356
  let n = Kr(t, "checked", 3, !1), r = Kr(t, "label", 3, "Don't show again"), o = Kr(t, "disabled", 3, !1), i = nt(null), s = nt(null);
3344
3357
  const a = Ce(() => ["rb-tour-skip", t.customClasses?.root]), l = Ce(() => ro(t.customStyles?.root)), u = Ce(() => ["rb-tour-skip__input", t.customClasses?.input]), c = Ce(() => ro(t.customStyles?.input)), f = Ce(() => ["rb-tour-skip__label", t.customClasses?.label]), d = Ce(() => ro(t.customStyles?.label));
@@ -3351,11 +3364,11 @@
3351
3364
  root: En(i),
3352
3365
  input: En(s)
3353
3366
  };
3354
- } }, v = bi(), g = yt(v), m = (e) => {
3367
+ } }, v = yi(), g = yt(v), m = (e) => {
3355
3368
  var n = Fn();
3356
3369
  hr(Tt(n), () => t.customHtml.input), zn(e, n);
3357
3370
  }, _ = (e) => {
3358
- var t = gi();
3371
+ var t = mi();
3359
3372
  Rr(t), zr(t, (e) => ot(s, e), () => En(s)), Bt(() => {
3360
3373
  Tr(t, 1, mr(En(u))), Er(t, En(c)), function(e, t) {
3361
3374
  var n = $r(e);
@@ -3367,12 +3380,12 @@
3367
3380
  t.customHtml?.input ? e(m) : e(_, -1);
3368
3381
  });
3369
3382
  var b = wt(g, 2), y = (e) => {
3370
- var n = mi();
3383
+ var n = _i();
3371
3384
  hr(n, () => t.customHtml.label, !0), X(n), Bt(() => {
3372
3385
  Tr(n, 1, mr(En(f))), Er(n, En(d));
3373
3386
  }), zn(e, n);
3374
3387
  }, T = (e) => {
3375
- var t = _i(), n = yt(t, !0);
3388
+ var t = bi(), n = yt(t, !0);
3376
3389
  X(t), Bt(() => {
3377
3390
  Tr(t, 1, mr(En(f))), Er(t, En(d)), Yn(n, r());
3378
3391
  }), zn(e, t);
@@ -3384,20 +3397,20 @@
3384
3397
  }), zn(e, v), oe(h);
3385
3398
  }
3386
3399
  Dn(["change"]);
3387
- var Ti = function(e) {
3400
+ var wi = function(e) {
3388
3401
  return e.TOP = "top", e.BOTTOM = "bottom", e.LEFT = "left", e.RIGHT = "right", e;
3389
3402
  }({});
3390
- function wi({ getArrow: e, getPlacement: t }) {
3403
+ function Ei({ getArrow: e, getPlacement: t }) {
3391
3404
  const n = Ce(e), r = Ce(t), o = Ce(() => !1 === En(n) ? null : function(e) {
3392
3405
  switch (e) {
3393
3406
  case so.BOTTOM_START:
3394
3407
  case so.BOTTOM_CENTER:
3395
- case so.BOTTOM_END: return Ti.TOP;
3408
+ case so.BOTTOM_END: return wi.TOP;
3396
3409
  case so.TOP_START:
3397
3410
  case so.TOP_CENTER:
3398
- case so.TOP_END: return Ti.BOTTOM;
3399
- case so.MIDDLE_END: return Ti.LEFT;
3400
- case so.MIDDLE_START: return Ti.RIGHT;
3411
+ case so.TOP_END: return wi.BOTTOM;
3412
+ case so.MIDDLE_END: return wi.LEFT;
3413
+ case so.MIDDLE_START: return wi.RIGHT;
3401
3414
  default: return null;
3402
3415
  }
3403
3416
  }(En(n) ? En(n).placement : En(r))), i = Ce(() => En(o) ? function(e) {
@@ -3412,7 +3425,7 @@
3412
3425
  }
3413
3426
  };
3414
3427
  }
3415
- function Ei({ target: e, tooltip: t, placement: n, offset: r, margin: o, padding: i, autoPlacement: s, arrowSide: a, viewport: l }) {
3428
+ function Si({ target: e, tooltip: t, placement: n, offset: r, margin: o, padding: i, autoPlacement: s, arrowSide: a, viewport: l }) {
3416
3429
  function u(e, t, n, r) {
3417
3430
  switch (n) {
3418
3431
  case so.TOP_START: return {
@@ -3632,20 +3645,19 @@
3632
3645
  arrowOffset: function(e, t, n) {
3633
3646
  if (null === n) return 0;
3634
3647
  const r = e.getBoundingClientRect();
3635
- return n === Ti.TOP || n === Ti.BOTTOM ? r.left + r.width / 2 - t.left : r.top + r.height / 2 - t.top;
3648
+ return n === wi.TOP || n === wi.BOTTOM ? r.left + r.width / 2 - t.left : r.top + r.height / 2 - t.top;
3636
3649
  }(e, T, a)
3637
3650
  };
3638
3651
  }
3639
- function Si({ getTargetElement: e, getTooltipElement: t, getPlacement: n, getPadding: r, getOffset: o, getMargin: i, getAutoPlacement: s, getArrowSide: a }) {
3652
+ function Oi({ getTargetElement: e, getTooltipElement: t, getPlacement: n, getPadding: r, getOffset: o, getMargin: i, getAutoPlacement: s, getArrowSide: a }) {
3640
3653
  let l = nt(0), u = nt(0), c = nt(ut(so.BOTTOM_START)), f = nt(0);
3641
3654
  const d = To(), p = yo(), h = Ce(e), v = Ce(t), g = Ce(() => {
3642
3655
  return e = n(), po.has(e) ? e : so.BOTTOM_START;
3643
3656
  var e;
3644
3657
  }), m = Ce(o), _ = Ce(i), b = Ce(r), y = Ce(s), T = Ce(a);
3645
- return Lt(() => {
3658
+ function w() {
3646
3659
  if (!En(h) || !En(v)) return;
3647
- p.x, p.y;
3648
- const e = Ei({
3660
+ const e = Si({
3649
3661
  target: En(h),
3650
3662
  tooltip: En(v),
3651
3663
  placement: En(g),
@@ -3660,6 +3672,13 @@
3660
3672
  }
3661
3673
  });
3662
3674
  ot(l, e.position.top, !0), ot(u, e.position.left, !0), ot(c, e.placement, !0), ot(f, e.arrowOffset, !0);
3675
+ }
3676
+ return Lt(() => {
3677
+ if (!En(v)) return;
3678
+ const e = new ResizeObserver(w);
3679
+ return e.observe(En(v)), () => e.disconnect();
3680
+ }), Lt(() => {
3681
+ p.x, p.y, w();
3663
3682
  }), {
3664
3683
  get top() {
3665
3684
  return En(l);
@@ -3675,8 +3694,8 @@
3675
3694
  }
3676
3695
  };
3677
3696
  }
3678
- var Oi = Bn("<div></div>"), Ci = Bn("<p> </p>"), Ni = Bn("<div><!> <!></div>"), ki = Bn("<div><!> <!> <!> <!> <!> <!> <!></div>");
3679
- function Ai(e, t) {
3697
+ var Ci = Bn("<div></div>"), Ni = Bn("<p> </p>"), ki = Bn("<div><!> <!></div>"), Ai = Bn("<div><!> <!> <!> <!> <!> <!> <!></div>");
3698
+ function Pi(e, t) {
3680
3699
  re(t, !0);
3681
3700
  let n = Kr(t, "step", 19, () => ({
3682
3701
  target: "",
@@ -3708,7 +3727,7 @@
3708
3727
  {
3709
3728
  const n = (e) => {
3710
3729
  var n = Fn(), r = Tt(n), o = (e) => {
3711
- zr(li(e, qr(() => t.tourImageProps, {
3730
+ zr(ui(e, qr(() => t.tourImageProps, {
3712
3731
  get src() {
3713
3732
  return En(_).src;
3714
3733
  },
@@ -3722,7 +3741,7 @@
3722
3741
  }), zn(e, n);
3723
3742
  }, r = (e) => {
3724
3743
  var n = Fn(), r = Tt(n), o = (e) => {
3725
- zr(ei(e, qr({
3744
+ zr(ti(e, qr({
3726
3745
  get size() {
3727
3746
  return s();
3728
3747
  },
@@ -3736,7 +3755,7 @@
3736
3755
  }), zn(e, n);
3737
3756
  }, y = (e) => {
3738
3757
  var n = Fn(), r = Tt(n), o = (e) => {
3739
- zr(yi(e, qr(() => t.tourSkipProps, {
3758
+ zr(Ti(e, qr(() => t.tourSkipProps, {
3740
3759
  get checked() {
3741
3760
  return l();
3742
3761
  },
@@ -3752,9 +3771,9 @@
3752
3771
  var n = Fn(), r = Tt(n), s = (e) => {
3753
3772
  {
3754
3773
  let n = Ce(() => t.tourProgressProps?.customClasses), r = Ce(() => t.tourProgressProps?.customStyles);
3755
- vi(e, {
3774
+ gi(e, {
3756
3775
  get variant() {
3757
- return pi.LINE;
3776
+ return hi.LINE;
3758
3777
  },
3759
3778
  get currentStep() {
3760
3779
  return o();
@@ -3772,7 +3791,7 @@
3772
3791
  }
3773
3792
  };
3774
3793
  ar(r, (e) => {
3775
- !1 !== t.tourProgressProps && En(b) === pi.LINE && e(s);
3794
+ !1 !== t.tourProgressProps && En(b) === hi.LINE && e(s);
3776
3795
  }), zn(e, n);
3777
3796
  }, w = (e) => {
3778
3797
  var n = Fn(), r = Tt(n), a = (e) => {
@@ -3781,7 +3800,7 @@
3781
3800
  var n = Fn(), r = Tt(n), s = (e) => {
3782
3801
  {
3783
3802
  let n = Ce(() => t.tourProgressProps?.customClasses), r = Ce(() => t.tourProgressProps?.customStyles);
3784
- vi(e, {
3803
+ gi(e, {
3785
3804
  get variant() {
3786
3805
  return En(b);
3787
3806
  },
@@ -3801,7 +3820,7 @@
3801
3820
  }
3802
3821
  };
3803
3822
  ar(r, (e) => {
3804
- !1 === t.tourProgressProps || En(b) !== pi.DOTS && En(b) !== pi.TEXT || e(s);
3823
+ !1 === t.tourProgressProps || En(b) !== hi.DOTS && En(b) !== hi.TEXT || e(s);
3805
3824
  }), zn(e, n);
3806
3825
  };
3807
3826
  zr(function(e, t) {
@@ -3824,17 +3843,17 @@
3824
3843
  styles: h(o.customStyles?.root, t.customStyles?.[r])
3825
3844
  };
3826
3845
  }
3827
- const g = Ce(() => v(i(), ti, "prev")), m = Ce(() => v(s(), ni, "next")), _ = Ce(() => v(l(), oi, "skip")), b = Ce(() => v(a(), ri, "finish"));
3846
+ const g = Ce(() => v(i(), ni, "prev")), m = Ce(() => v(s(), ri, "next")), _ = Ce(() => v(l(), ii, "skip")), b = Ce(() => v(a(), oi, "finish"));
3828
3847
  var y = { getElements: function() {
3829
3848
  return { root: En(u) };
3830
- } }, T = ii(), w = yt(T), E = (e) => {
3849
+ } }, T = si(), w = yt(T), E = (e) => {
3831
3850
  var n = Fn(), r = Tt(n), i = (e) => {
3832
3851
  var n = Fn();
3833
3852
  hr(Tt(n), () => t.customHtml.prev), zn(e, n);
3834
3853
  }, s = (e) => {
3835
3854
  {
3836
3855
  let n = Ce(() => En(g).size ?? o()), r = Ce(() => ({ root: En(g).classes })), i = Ce(() => ({ root: En(g).styles }));
3837
- Zo(e, {
3856
+ Jo(e, {
3838
3857
  get type() {
3839
3858
  return En(g).type;
3840
3859
  },
@@ -3895,7 +3914,7 @@
3895
3914
  }, s = (e) => {
3896
3915
  {
3897
3916
  let n = Ce(() => En(_).size ?? o()), r = Ce(() => ({ root: En(_).classes })), i = Ce(() => ({ root: En(_).styles }));
3898
- Zo(e, {
3917
+ Jo(e, {
3899
3918
  get type() {
3900
3919
  return En(_).type;
3901
3920
  },
@@ -3947,7 +3966,7 @@
3947
3966
  }, s = (e) => {
3948
3967
  {
3949
3968
  let n = Ce(() => En(b).size ?? o()), r = Ce(() => ({ root: En(b).classes })), i = Ce(() => ({ root: En(b).styles }));
3950
- Zo(e, {
3969
+ Jo(e, {
3951
3970
  get type() {
3952
3971
  return En(b).type;
3953
3972
  },
@@ -3998,7 +4017,7 @@
3998
4017
  }, s = (e) => {
3999
4018
  {
4000
4019
  let n = Ce(() => En(m).size ?? o()), r = Ce(() => ({ root: En(m).classes })), i = Ce(() => ({ root: En(m).styles }));
4001
- Zo(e, {
4020
+ Jo(e, {
4002
4021
  get type() {
4003
4022
  return En(m).type;
4004
4023
  },
@@ -4077,10 +4096,10 @@
4077
4096
  zr(function(e, t) {
4078
4097
  re(t, !0);
4079
4098
  let n = Kr(t, "title", 3, ""), r = Kr(t, "description", 3, ""), o = Kr(t, "size", 19, () => io.MD), i = Kr(t, "placement", 19, () => so.BOTTOM_START), s = Kr(t, "targetElement", 3, null), a = Kr(t, "offset", 3, 12), l = Kr(t, "margin", 3, 8), u = Kr(t, "padding", 3, 12), c = Kr(t, "autoPlacement", 3, !0), f = Kr(t, "isHidden", 3, !1), d = Kr(t, "hasGlide", 3, !1), p = Kr(t, "animation", 3, !1), h = nt(null), v = nt(!1);
4080
- const g = wi({
4099
+ const g = Ei({
4081
4100
  getArrow: () => t.arrow,
4082
4101
  getPlacement: () => m.effectivePlacement
4083
- }), m = Si({
4102
+ }), m = Oi({
4084
4103
  getTargetElement: () => s(),
4085
4104
  getTooltipElement: () => En(h),
4086
4105
  getPlacement: () => i(),
@@ -4124,10 +4143,10 @@
4124
4143
  ]), w = Ce(() => ro(t.customStyles?.root)), E = Ce(() => ["rb-tour-tooltip__header", t.customClasses?.header]), S = Ce(() => ro(t.customStyles?.header)), O = Ce(() => ["rb-tour-tooltip__title", t.customClasses?.title]), C = Ce(() => ro(t.customStyles?.title)), N = Ce(() => ["rb-tour-tooltip__description", t.customClasses?.description]), k = Ce(() => ro(t.customStyles?.description));
4125
4144
  var A = { getElements: function() {
4126
4145
  return { root: En(h) };
4127
- } }, P = ki();
4146
+ } }, P = Ai();
4128
4147
  let x;
4129
4148
  var D = yt(P), L = (e) => {
4130
- var t = Oi();
4149
+ var t = Ci();
4131
4150
  let n;
4132
4151
  Bt(() => {
4133
4152
  Tr(t, 1, mr(g.classes)), n = Er(t, "", n, { "--rb-tour-tooltip-arrow-offset": `${m.arrowOffset ?? ""}px` });
@@ -4144,11 +4163,11 @@
4144
4163
  t.image && e(M);
4145
4164
  });
4146
4165
  var I = wt(R, 2), B = (e) => {
4147
- var r = Ni(), o = yt(r), i = (e) => {
4166
+ var r = ki(), o = yt(r), i = (e) => {
4148
4167
  var n = Fn();
4149
4168
  hr(Tt(n), () => t.customHtml.title), zn(e, n);
4150
4169
  }, s = (e) => {
4151
- var t = Ci(), r = yt(t, !0);
4170
+ var t = Ni(), r = yt(t, !0);
4152
4171
  X(t), Bt(() => {
4153
4172
  Tr(t, 1, mr(En(O))), Er(t, En(C)), Yn(r, n());
4154
4173
  }), zn(e, t);
@@ -4173,7 +4192,7 @@
4173
4192
  var n = Fn();
4174
4193
  hr(Tt(n), () => t.customHtml.description), zn(e, n);
4175
4194
  }, j = (e) => {
4176
- var t = Ci(), n = yt(t, !0);
4195
+ var t = Ni(), n = yt(t, !0);
4177
4196
  X(t), Bt(() => {
4178
4197
  Tr(t, 1, mr(En(N))), Er(t, En(k)), Yn(n, r());
4179
4198
  }), zn(e, t);
@@ -4237,8 +4256,8 @@
4237
4256
  }
4238
4257
  return oe(y);
4239
4258
  }
4240
- var Pi = Bn("<!> <!>", 1), xi = Bn("<div><!></div>");
4241
- function Di(e, t) {
4259
+ var xi = Bn("<!> <!>", 1), Di = Bn("<div><!></div>");
4260
+ function Li(e, t) {
4242
4261
  re(t, !0);
4243
4262
  let n = nt(null), r = nt(null), o = nt(null);
4244
4263
  Yr({
@@ -4262,13 +4281,20 @@
4262
4281
  getDuration: () => t.animation.overlay.transitionDuration
4263
4282
  });
4264
4283
  to({ getContainer: () => En(n)?.getElements()?.root ?? null });
4265
- const a = Ce(() => t.config.size), l = Ce(() => t.config.shape), u = Ce(() => ["rb"]), c = Ce(() => ({
4284
+ const a = Ce(() => ["rb"]), l = Ce(() => ({
4266
4285
  ...t.config.container,
4267
4286
  customClasses: {
4268
4287
  ...t.config.container?.customClasses,
4269
4288
  root: [t.config.container?.customClasses?.root, i.classes]
4270
4289
  }
4271
- })), f = Ce(() => t.config.tourOverlay), d = Ce(() => t.config.tourTooltip), p = Ce(() => t.config.tourImage), h = Ce(() => t.config.tourButtons), v = Ce(() => t.config.tourProgress), g = Ce(() => t.config.tourSkip), m = Ce(() => t.config.closeButton), _ = Ce(() => !!t.animation.isEnabled && t.animation.tooltip), b = Ce(() => t.animation.isEnabled), y = Ce(() => t.animation.tooltip.transition === Oo.GLIDE), T = Ce(() => t.animation.tooltip.appearance === So.DURING_SCROLL), w = Ce(() => t.scroll.isScrolling || s.isActive), E = Ce(() => !En(y) && En(b) && En(w) && !En(T)), S = Ce(() => t.controller.step), O = Ce(() => {
4290
+ })), u = Ce(() => !!t.animation.isEnabled && t.animation.tooltip), c = Ce(() => t.animation.isEnabled), f = Ce(() => t.animation.tooltip.transition === Oo.GLIDE), d = Ce(() => t.animation.tooltip.appearance === So.DURING_SCROLL), p = Ce(() => t.scroll.isScrolling || s.isActive), h = Ce(() => !En(f) && En(c) && En(p) && !En(d));
4291
+ let v = nt(ut({
4292
+ step: Cn(() => t.controller.step),
4293
+ target: Cn(() => t.controller.currentTarget),
4294
+ currentStep: Cn(() => t.controller.currentStep),
4295
+ config: Cn(() => t.config)
4296
+ }));
4297
+ const g = Ce(() => En(v).config.size), m = Ce(() => En(v).config.shape), _ = Ce(() => En(v).config.tourOverlay), b = Ce(() => En(v).config.tourTooltip), y = Ce(() => En(v).config.tourImage), T = Ce(() => En(v).config.tourButtons), w = Ce(() => En(v).config.tourProgress), E = Ce(() => En(v).config.tourSkip), S = Ce(() => En(v).config.closeButton), O = Ce(() => {
4272
4298
  const e = En(o)?.getComponents();
4273
4299
  return {
4274
4300
  tourTooltip: e?.tourTooltip ?? null,
@@ -4295,12 +4321,28 @@
4295
4321
  var N;
4296
4322
  Lt(() => {
4297
4323
  t.config.visibility?.isHidden || t.scroll.scrollTo(t.controller.currentTarget);
4324
+ }), Lt(() => {
4325
+ if (!En(h)) return void ot(v, {
4326
+ step: t.controller.step,
4327
+ target: t.controller.currentTarget,
4328
+ currentStep: t.controller.currentStep,
4329
+ config: t.config
4330
+ }, !0);
4331
+ const e = setTimeout(() => {
4332
+ ot(v, {
4333
+ step: t.controller.step,
4334
+ target: t.controller.currentTarget,
4335
+ currentStep: t.controller.currentStep,
4336
+ config: t.config
4337
+ }, !0);
4338
+ }, t.animation.tooltip.exitDuration);
4339
+ return () => clearTimeout(e);
4298
4340
  }), sr(() => {
4299
4341
  t.mount();
4300
4342
  }), N = () => {
4301
4343
  t.eventEmitter.emit(Zr.ON_BORDA_DESTROY), t.eventEmitter.clear();
4302
4344
  }, null === te && j(), sr(() => () => Cn(N));
4303
- var k = { api: C }, A = xi();
4345
+ var k = { api: C }, A = Di();
4304
4346
  return zr(function(e, t) {
4305
4347
  re(t, !0);
4306
4348
  let n = nt(null);
@@ -4316,10 +4358,10 @@
4316
4358
  }), X(s), zr(s, (e) => ot(n, e), () => En(n)), Bt(() => {
4317
4359
  Ir(s, "id", t.id), Tr(s, 1, mr(En(r))), Er(s, En(o));
4318
4360
  }), zn(e, s), oe(i);
4319
- }(yt(A), qr(() => En(c), {
4361
+ }(yt(A), qr(() => En(l), {
4320
4362
  children: (e, n) => {
4321
- var i = Fn(), s = Tt(i), u = (e) => {
4322
- var n = Pi(), i = Tt(n), s = (e) => {
4363
+ var i = Fn(), s = Tt(i), a = (e) => {
4364
+ var n = xi(), i = Tt(n), s = (e) => {
4323
4365
  zr(function(e, t) {
4324
4366
  re(t, !0);
4325
4367
  let n = Kr(t, "targetElement", 3, null), r = Kr(t, "borderRadius", 3, 8), o = Kr(t, "padding", 3, 12), i = Kr(t, "isAnimated", 3, !0), s = Kr(t, "hasCloseOnBackdropClick", 3, !1), a = Kr(t, "aria", 19, () => ({ ariaLabel: "Close" }));
@@ -4360,26 +4402,26 @@
4360
4402
  }), zn(e, y), oe(b);
4361
4403
  }(e, qr({
4362
4404
  get targetElement() {
4363
- return t.controller.currentTarget;
4405
+ return En(v).target;
4364
4406
  },
4365
4407
  get isAnimated() {
4366
- return En(b);
4408
+ return En(c);
4367
4409
  }
4368
- }, () => En(f))), (e) => ot(r, e, !0), () => En(r));
4410
+ }, () => En(_))), (e) => ot(r, e, !0), () => En(r));
4369
4411
  };
4370
4412
  ar(i, (e) => {
4371
- !1 !== En(f) && e(s);
4413
+ !1 !== En(_) && e(s);
4372
4414
  });
4373
- var u = wt(i, 2), c = (e) => {
4374
- zr(Ai(e, {
4415
+ var a = wt(i, 2), l = (e) => {
4416
+ zr(Pi(e, {
4375
4417
  get step() {
4376
- return En(S);
4418
+ return En(v).step;
4377
4419
  },
4378
4420
  get currentTarget() {
4379
- return t.controller.currentTarget;
4421
+ return En(v).target;
4380
4422
  },
4381
4423
  get currentStep() {
4382
- return t.controller.currentStep;
4424
+ return En(v).currentStep;
4383
4425
  },
4384
4426
  get totalSteps() {
4385
4427
  return t.controller.totalSteps;
@@ -4388,37 +4430,37 @@
4388
4430
  return t.skip.isSkipped;
4389
4431
  },
4390
4432
  get isHidden() {
4391
- return En(E);
4433
+ return En(h);
4392
4434
  },
4393
4435
  get hasGlide() {
4394
- return En(y);
4436
+ return En(f);
4395
4437
  },
4396
4438
  get tourTooltipAnimation() {
4397
- return En(_);
4439
+ return En(u);
4398
4440
  },
4399
4441
  get size() {
4400
- return En(a);
4442
+ return En(g);
4401
4443
  },
4402
4444
  get shape() {
4403
- return En(l);
4445
+ return En(m);
4404
4446
  },
4405
4447
  get tourTooltipProps() {
4406
- return En(d);
4448
+ return En(b);
4407
4449
  },
4408
4450
  get tourImageProps() {
4409
- return En(p);
4451
+ return En(y);
4410
4452
  },
4411
4453
  get tourButtonsProps() {
4412
- return En(h);
4454
+ return En(T);
4413
4455
  },
4414
4456
  get tourProgressProps() {
4415
- return En(v);
4457
+ return En(w);
4416
4458
  },
4417
4459
  get closeButtonProps() {
4418
- return En(m);
4460
+ return En(S);
4419
4461
  },
4420
4462
  get tourSkipProps() {
4421
- return En(g);
4463
+ return En(E);
4422
4464
  },
4423
4465
  get onNext() {
4424
4466
  return t.controller.next;
@@ -4437,18 +4479,18 @@
4437
4479
  }
4438
4480
  }), (e) => ot(o, e, !0), () => En(o));
4439
4481
  };
4440
- ar(u, (e) => {
4441
- !1 !== En(d) && e(c);
4482
+ ar(a, (e) => {
4483
+ !1 !== En(b) && e(l);
4442
4484
  }), zn(e, n);
4443
4485
  };
4444
4486
  ar(s, (e) => {
4445
- t.controller.currentTarget && En(S) && e(u);
4487
+ t.controller.currentTarget && t.controller.step && e(a);
4446
4488
  }), zn(e, i);
4447
4489
  },
4448
4490
  $$slots: { default: !0 }
4449
- })), (e) => ot(n, e, !0), () => En(n)), X(A), Bt(() => Tr(A, 1, mr(En(u)))), zn(e, A), oe(k);
4491
+ })), (e) => ot(n, e, !0), () => En(n)), X(A), Bt(() => Tr(A, 1, mr(En(a)))), zn(e, A), oe(k);
4450
4492
  }
4451
- function Li() {
4493
+ function Ri() {
4452
4494
  const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakSet();
4453
4495
  function n(t, n) {
4454
4496
  (function(e) {
@@ -4457,21 +4499,21 @@
4457
4499
  const o = n ?? document.body;
4458
4500
  return new Promise((n) => {
4459
4501
  let i = null;
4460
- const s = Jr(), a = Ri(t), l = Mo(a), u = Po(a, s);
4502
+ const s = Jr(), a = Mi(t), l = Io(a), u = xo(a, s);
4461
4503
  u.apply(), l.applyStep(u.api.step ?? null);
4462
- const c = Uo(a, s);
4504
+ const c = Vo(a, s);
4463
4505
  c.apply(), c.api.isSkipped && a.mergeConfig({ visibility: { isHidden: !0 } });
4464
- const f = Lo(a, s);
4506
+ const f = Ro(a, s);
4465
4507
  f.apply();
4466
- const d = zo(a);
4508
+ const d = Uo(a);
4467
4509
  d.apply();
4468
4510
  const p = ko(a);
4469
4511
  p.apply();
4470
- const h = Io(a, l);
4512
+ const h = Bo(a, l);
4471
4513
  h.apply();
4472
- const v = Vo(a, s);
4514
+ const v = qo(a, s);
4473
4515
  v.apply();
4474
- const g = Zn(Di, {
4516
+ const g = Zn(Li, {
4475
4517
  target: o,
4476
4518
  props: {
4477
4519
  get config() {
@@ -4512,7 +4554,9 @@
4512
4554
  a.getConfig().tour?.onFinish?.(), await r(t);
4513
4555
  }), s.once(Zr.ON_TOUR_CLOSE, async () => {
4514
4556
  a.getConfig().tour?.onClose?.(), await r(t);
4515
- }), n(t);
4557
+ }), s.once(Zr.ON_TOUR_ERROR, (e) => {
4558
+ a.getConfig().tour?.onError?.(e);
4559
+ }), u.checkCurrentTarget(), n(t);
4516
4560
  },
4517
4561
  unmount: () => {
4518
4562
  i && r(i);
@@ -4537,13 +4581,13 @@
4537
4581
  }
4538
4582
  return {
4539
4583
  NAME: "@retoo/borda",
4540
- VERSION: "0.0.2",
4584
+ VERSION: "0.1.1",
4541
4585
  mount: n,
4542
4586
  unmount: r,
4543
- highlight: xo(n).highlight
4587
+ highlight: Do(n).highlight
4544
4588
  };
4545
4589
  }
4546
- function Ri(e) {
4590
+ function Mi(e) {
4547
4591
  let t = nt(ut(mo(e)));
4548
4592
  function n(e) {
4549
4593
  ot(t, mo(e), !0);
@@ -4561,8 +4605,8 @@
4561
4605
  }
4562
4606
  };
4563
4607
  }
4564
- var Mi = "borda-tour-widget", Ii = "undefined" != typeof HTMLElement ? HTMLElement : class {}, Bi = class extends Ii {
4565
- static tagName = Mi;
4608
+ var Ii = "borda-tour-widget", Bi = "undefined" != typeof HTMLElement ? HTMLElement : class {}, $i = class extends Bi {
4609
+ static tagName = Ii;
4566
4610
  _instance = null;
4567
4611
  _borda = null;
4568
4612
  _connected = !1;
@@ -4589,7 +4633,7 @@
4589
4633
  }
4590
4634
  async _mount(e) {
4591
4635
  if (this._unmountPending && await this._unmountPending, this._instance) return this._instance.config.setConfig(e), this._instance;
4592
- const t = Li(), n = await t.mount(e);
4636
+ const t = Ri(), n = await t.mount(e);
4593
4637
  return this._borda = t, this._instance = n, this.dispatchEvent(new CustomEvent("borda:mount", {
4594
4638
  detail: n,
4595
4639
  bubbles: !0,
@@ -4610,11 +4654,11 @@
4610
4654
  }));
4611
4655
  }
4612
4656
  };
4613
- function $i() {
4614
- return customElements.get(Bi.tagName);
4615
- }
4616
4657
  function Hi() {
4617
- $i() || customElements.define(Bi.tagName, Bi);
4658
+ return customElements.get($i.tagName);
4659
+ }
4660
+ function ji() {
4661
+ Hi() || customElements.define($i.tagName, $i);
4618
4662
  }
4619
- ho && (window.bordaWidget = Li, window.defineBordaElement = Hi), e.AnimationEffect = co, e.BordaButtonShape = Ko, e.BordaButtonType = Xo, e.BordaButtonVariant = Go, e.BordaEvent = Zr, e.BordaScrollAppearance = So, e.BordaTooltipArrowSide = Ti, e.BordaTooltipTransition = Oo, e.BordaTourImageVariant = ai, e.BordaTourProgressVariant = pi, e.ComponentAriaHaspopup = uo, e.ComponentAriaPressed = lo, e.ComponentPlacement = so, e.ComponentShape = ao, e.ComponentSize = io, e.OverrideLayer = fo, e.SAFE_HTML_ELEMENT = Ii, e.TAG_NAME = Mi, e.bordaTourFinishButtonDefault = ri, e.bordaTourNextButtonDefault = ni, e.bordaTourPrevButtonDefault = ti, e.bordaTourSkipButtonDefault = oi, e.defineBordaElement = Hi, e.getBordaContext = Wr, e.getBordaElement = $i, e.setBordaContext = Yr, e.useBorda = Li, e.useBordaAnimation = ko, e.useBordaConfig = Ri, e.useBordaController = Po, e.useBordaHighlight = xo, e.useBordaKeyboard = Lo, e.useBordaOverrides = Mo, e.useBordaResponsive = Io, e.useBordaScroll = zo, e.useBordaSkip = Uo, e.useBordaVisibility = Vo, e.useEventEmitter = Jr, e.useOverlay = wo, e.useTooltipArrow = wi, e.useTooltipPosition = Si;
4663
+ ho && (window.bordaWidget = Ri, window.defineBordaElement = ji), e.AnimationEffect = co, e.BordaButtonShape = Go, e.BordaButtonType = Wo, e.BordaButtonVariant = Xo, e.BordaEvent = Zr, e.BordaScrollAppearance = So, e.BordaTooltipArrowSide = wi, e.BordaTooltipTransition = Oo, e.BordaTourImageVariant = li, e.BordaTourProgressVariant = hi, e.ComponentAriaHaspopup = uo, e.ComponentAriaPressed = lo, e.ComponentPlacement = so, e.ComponentShape = ao, e.ComponentSize = io, e.OverrideLayer = fo, e.SAFE_HTML_ELEMENT = Bi, e.TAG_NAME = Ii, e.bordaTourFinishButtonDefault = oi, e.bordaTourNextButtonDefault = ri, e.bordaTourPrevButtonDefault = ni, e.bordaTourSkipButtonDefault = ii, e.defineBordaElement = ji, e.getBordaContext = Wr, e.getBordaElement = Hi, e.setBordaContext = Yr, e.useBorda = Ri, e.useBordaAnimation = ko, e.useBordaConfig = Mi, e.useBordaController = xo, e.useBordaHighlight = Do, e.useBordaKeyboard = Ro, e.useBordaOverrides = Io, e.useBordaResponsive = Bo, e.useBordaScroll = Uo, e.useBordaSkip = Vo, e.useBordaVisibility = qo, e.useEventEmitter = Jr, e.useOverlay = wo, e.useTooltipArrow = Ei, e.useTooltipPosition = Oi;
4620
4664
  });