siteguide.js 0.3.0 → 0.4.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.
package/dist/index.mjs CHANGED
@@ -1,26 +1,26 @@
1
- var Bt = Object.defineProperty, Nt = Object.defineProperties;
2
- var Vt = Object.getOwnPropertyDescriptors;
1
+ var Ht = Object.defineProperty, Vt = Object.defineProperties;
2
+ var Ft = Object.getOwnPropertyDescriptors;
3
3
  var U = Object.getOwnPropertySymbols;
4
- var dt = Object.prototype.hasOwnProperty, ht = Object.prototype.propertyIsEnumerable;
5
- var Z = (t, e, n) => e in t ? Bt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, O = (t, e) => {
6
- for (var n in e || (e = {}))
7
- dt.call(e, n) && Z(t, n, e[n]);
4
+ var ut = Object.prototype.hasOwnProperty, dt = Object.prototype.propertyIsEnumerable;
5
+ var tt = (e, t, n) => t in e ? Ht(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, L = (e, t) => {
6
+ for (var n in t || (t = {}))
7
+ ut.call(t, n) && tt(e, n, t[n]);
8
8
  if (U)
9
- for (var n of U(e))
10
- ht.call(e, n) && Z(t, n, e[n]);
11
- return t;
12
- }, z = (t, e) => Nt(t, Vt(e));
13
- var pt = (t, e) => {
9
+ for (var n of U(t))
10
+ dt.call(t, n) && tt(e, n, t[n]);
11
+ return e;
12
+ }, z = (e, t) => Vt(e, Ft(t));
13
+ var gt = (e, t) => {
14
14
  var n = {};
15
- for (var i in t)
16
- dt.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
17
- if (t != null && U)
18
- for (var i of U(t))
19
- e.indexOf(i) < 0 && ht.call(t, i) && (n[i] = t[i]);
15
+ for (var i in e)
16
+ ut.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
17
+ if (e != null && U)
18
+ for (var i of U(e))
19
+ t.indexOf(i) < 0 && dt.call(e, i) && (n[i] = e[i]);
20
20
  return n;
21
21
  };
22
- var w = (t, e, n) => Z(t, typeof e != "symbol" ? e + "" : e, n);
23
- var A = (t, e, n) => new Promise((i, o) => {
22
+ var w = (e, t, n) => tt(e, typeof t != "symbol" ? t + "" : t, n);
23
+ var A = (e, t, n) => new Promise((i, o) => {
24
24
  var r = (a) => {
25
25
  try {
26
26
  l(n.next(a));
@@ -34,196 +34,196 @@ var A = (t, e, n) => new Promise((i, o) => {
34
34
  o(c);
35
35
  }
36
36
  }, l = (a) => a.done ? i(a.value) : Promise.resolve(a.value).then(r, s);
37
- l((n = n.apply(t, e)).next());
37
+ l((n = n.apply(e, t)).next());
38
38
  });
39
- const Ft = ["top", "right", "bottom", "left"], mt = ["start", "end"], gt = /* @__PURE__ */ Ft.reduce((t, e) => t.concat(e, e + "-" + mt[0], e + "-" + mt[1]), []), yt = Math.min, I = Math.max, q = Math.round, E = (t) => ({
40
- x: t,
41
- y: t
42
- }), Wt = {
39
+ const Wt = ["top", "right", "bottom", "left"], pt = ["start", "end"], mt = /* @__PURE__ */ Wt.reduce((e, t) => e.concat(t, t + "-" + pt[0], t + "-" + pt[1]), []), xt = Math.min, Y = Math.max, q = Math.round, P = (e) => ({
40
+ x: e,
41
+ y: e
42
+ }), zt = {
43
43
  left: "right",
44
44
  right: "left",
45
45
  bottom: "top",
46
46
  top: "bottom"
47
- }, zt = {
47
+ }, Yt = {
48
48
  start: "end",
49
49
  end: "start"
50
50
  };
51
- function it(t, e) {
52
- return typeof t == "function" ? t(e) : t;
51
+ function ot(e, t) {
52
+ return typeof e == "function" ? e(t) : e;
53
53
  }
54
- function j(t) {
55
- return t.split("-")[0];
54
+ function j(e) {
55
+ return e.split("-")[0];
56
56
  }
57
- function D(t) {
58
- return t.split("-")[1];
57
+ function D(e) {
58
+ return e.split("-")[1];
59
59
  }
60
- function It(t) {
61
- return t === "x" ? "y" : "x";
60
+ function It(e) {
61
+ return e === "x" ? "y" : "x";
62
62
  }
63
- function bt(t) {
64
- return t === "y" ? "height" : "width";
63
+ function Lt(e) {
64
+ return e === "y" ? "height" : "width";
65
65
  }
66
- function ot(t) {
67
- return ["top", "bottom"].includes(j(t)) ? "y" : "x";
66
+ function st(e) {
67
+ return ["top", "bottom"].includes(j(e)) ? "y" : "x";
68
68
  }
69
- function Ct(t) {
70
- return It(ot(t));
69
+ function St(e) {
70
+ return It(st(e));
71
71
  }
72
- function Yt(t, e, n) {
72
+ function jt(e, t, n) {
73
73
  n === void 0 && (n = !1);
74
- const i = D(t), o = Ct(t), r = bt(o);
74
+ const i = D(e), o = St(e), r = Lt(o);
75
75
  let s = o === "x" ? i === (n ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
76
- return e.reference[r] > e.floating[r] && (s = wt(s)), [s, wt(s)];
76
+ return t.reference[r] > t.floating[r] && (s = wt(s)), [s, wt(s)];
77
77
  }
78
- function jt(t) {
79
- return t.replace(/start|end/g, (e) => zt[e]);
78
+ function Xt(e) {
79
+ return e.replace(/start|end/g, (t) => Yt[t]);
80
80
  }
81
- function wt(t) {
82
- return t.replace(/left|right|bottom|top/g, (e) => Wt[e]);
81
+ function wt(e) {
82
+ return e.replace(/left|right|bottom|top/g, (t) => zt[t]);
83
83
  }
84
- function Xt(t) {
85
- return O({
84
+ function Ut(e) {
85
+ return L({
86
86
  top: 0,
87
87
  right: 0,
88
88
  bottom: 0,
89
89
  left: 0
90
- }, t);
91
- }
92
- function Ut(t) {
93
- return typeof t != "number" ? Xt(t) : {
94
- top: t,
95
- right: t,
96
- bottom: t,
97
- left: t
90
+ }, e);
91
+ }
92
+ function qt(e) {
93
+ return typeof e != "number" ? Ut(e) : {
94
+ top: e,
95
+ right: e,
96
+ bottom: e,
97
+ left: e
98
98
  };
99
99
  }
100
- function K(t) {
100
+ function K(e) {
101
101
  const {
102
- x: e,
102
+ x: t,
103
103
  y: n,
104
104
  width: i,
105
105
  height: o
106
- } = t;
106
+ } = e;
107
107
  return {
108
108
  width: i,
109
109
  height: o,
110
110
  top: n,
111
- left: e,
112
- right: e + i,
111
+ left: t,
112
+ right: t + i,
113
113
  bottom: n + o,
114
- x: e,
114
+ x: t,
115
115
  y: n
116
116
  };
117
117
  }
118
- function xt(t, e, n) {
118
+ function yt(e, t, n) {
119
119
  let {
120
120
  reference: i,
121
121
  floating: o
122
- } = t;
123
- const r = ot(e), s = Ct(e), l = bt(s), a = j(e), c = r === "y", f = i.x + i.width / 2 - o.width / 2, u = i.y + i.height / 2 - o.height / 2, p = i[l] / 2 - o[l] / 2;
124
- let d;
122
+ } = e;
123
+ const r = st(t), s = St(t), l = Lt(s), a = j(t), c = r === "y", h = i.x + i.width / 2 - o.width / 2, f = i.y + i.height / 2 - o.height / 2, g = i[l] / 2 - o[l] / 2;
124
+ let u;
125
125
  switch (a) {
126
126
  case "top":
127
- d = {
128
- x: f,
127
+ u = {
128
+ x: h,
129
129
  y: i.y - o.height
130
130
  };
131
131
  break;
132
132
  case "bottom":
133
- d = {
134
- x: f,
133
+ u = {
134
+ x: h,
135
135
  y: i.y + i.height
136
136
  };
137
137
  break;
138
138
  case "right":
139
- d = {
139
+ u = {
140
140
  x: i.x + i.width,
141
- y: u
141
+ y: f
142
142
  };
143
143
  break;
144
144
  case "left":
145
- d = {
145
+ u = {
146
146
  x: i.x - o.width,
147
- y: u
147
+ y: f
148
148
  };
149
149
  break;
150
150
  default:
151
- d = {
151
+ u = {
152
152
  x: i.x,
153
153
  y: i.y
154
154
  };
155
155
  }
156
- switch (D(e)) {
156
+ switch (D(t)) {
157
157
  case "start":
158
- d[s] -= p * (n && c ? -1 : 1);
158
+ u[s] -= g * (n && c ? -1 : 1);
159
159
  break;
160
160
  case "end":
161
- d[s] += p * (n && c ? -1 : 1);
161
+ u[s] += g * (n && c ? -1 : 1);
162
162
  break;
163
163
  }
164
- return d;
164
+ return u;
165
165
  }
166
- const qt = (t, e, n) => A(void 0, null, function* () {
166
+ const Kt = (e, t, n) => A(void 0, null, function* () {
167
167
  const {
168
168
  placement: i = "bottom",
169
169
  strategy: o = "absolute",
170
170
  middleware: r = [],
171
171
  platform: s
172
- } = n, l = r.filter(Boolean), a = yield s.isRTL == null ? void 0 : s.isRTL(e);
172
+ } = n, l = r.filter(Boolean), a = yield s.isRTL == null ? void 0 : s.isRTL(t);
173
173
  let c = yield s.getElementRects({
174
- reference: t,
175
- floating: e,
174
+ reference: e,
175
+ floating: t,
176
176
  strategy: o
177
177
  }), {
178
- x: f,
179
- y: u
180
- } = xt(c, i, a), p = i, d = {}, m = 0;
181
- for (let y = 0; y < l.length; y++) {
178
+ x: h,
179
+ y: f
180
+ } = yt(c, i, a), g = i, u = {}, p = 0;
181
+ for (let x = 0; x < l.length; x++) {
182
182
  const {
183
- name: g,
184
- fn: v
185
- } = l[y], {
186
- x: _,
187
- y: h,
188
- data: L,
189
- reset: x
190
- } = yield v({
191
- x: f,
192
- y: u,
183
+ name: m,
184
+ fn: _
185
+ } = l[x], {
186
+ x: b,
187
+ y: d,
188
+ data: v,
189
+ reset: y
190
+ } = yield _({
191
+ x: h,
192
+ y: f,
193
193
  initialPlacement: i,
194
- placement: p,
194
+ placement: g,
195
195
  strategy: o,
196
- middlewareData: d,
196
+ middlewareData: u,
197
197
  rects: c,
198
198
  platform: s,
199
199
  elements: {
200
- reference: t,
201
- floating: e
200
+ reference: e,
201
+ floating: t
202
202
  }
203
203
  });
204
- f = _ != null ? _ : f, u = h != null ? h : u, d = z(O({}, d), {
205
- [g]: O(O({}, d[g]), L)
206
- }), x && m <= 50 && (m++, typeof x == "object" && (x.placement && (p = x.placement), x.rects && (c = x.rects === !0 ? yield s.getElementRects({
207
- reference: t,
208
- floating: e,
204
+ h = b != null ? b : h, f = d != null ? d : f, u = z(L({}, u), {
205
+ [m]: L(L({}, u[m]), v)
206
+ }), y && p <= 50 && (p++, typeof y == "object" && (y.placement && (g = y.placement), y.rects && (c = y.rects === !0 ? yield s.getElementRects({
207
+ reference: e,
208
+ floating: t,
209
209
  strategy: o
210
- }) : x.rects), {
211
- x: f,
212
- y: u
213
- } = xt(c, p, a)), y = -1);
210
+ }) : y.rects), {
211
+ x: h,
212
+ y: f
213
+ } = yt(c, g, a)), x = -1);
214
214
  }
215
215
  return {
216
- x: f,
217
- y: u,
218
- placement: p,
216
+ x: h,
217
+ y: f,
218
+ placement: g,
219
219
  strategy: o,
220
- middlewareData: d
220
+ middlewareData: u
221
221
  };
222
222
  });
223
- function Kt(t, e) {
223
+ function Gt(e, t) {
224
224
  return A(this, null, function* () {
225
225
  var n;
226
- e === void 0 && (e = {});
226
+ t === void 0 && (t = {});
227
227
  const {
228
228
  x: i,
229
229
  y: o,
@@ -231,49 +231,49 @@ function Kt(t, e) {
231
231
  rects: s,
232
232
  elements: l,
233
233
  strategy: a
234
- } = t, {
234
+ } = e, {
235
235
  boundary: c = "clippingAncestors",
236
- rootBoundary: f = "viewport",
237
- elementContext: u = "floating",
238
- altBoundary: p = !1,
239
- padding: d = 0
240
- } = it(e, t), m = Ut(d), g = l[p ? u === "floating" ? "reference" : "floating" : u], v = K(yield r.getClippingRect({
241
- element: (n = yield r.isElement == null ? void 0 : r.isElement(g)) == null || n ? g : g.contextElement || (yield r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
236
+ rootBoundary: h = "viewport",
237
+ elementContext: f = "floating",
238
+ altBoundary: g = !1,
239
+ padding: u = 0
240
+ } = ot(t, e), p = qt(u), m = l[g ? f === "floating" ? "reference" : "floating" : f], _ = K(yield r.getClippingRect({
241
+ element: (n = yield r.isElement == null ? void 0 : r.isElement(m)) == null || n ? m : m.contextElement || (yield r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
242
242
  boundary: c,
243
- rootBoundary: f,
243
+ rootBoundary: h,
244
244
  strategy: a
245
- })), _ = u === "floating" ? {
245
+ })), b = f === "floating" ? {
246
246
  x: i,
247
247
  y: o,
248
248
  width: s.floating.width,
249
249
  height: s.floating.height
250
- } : s.reference, h = yield r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating), L = (yield r.isElement == null ? void 0 : r.isElement(h)) ? (yield r.getScale == null ? void 0 : r.getScale(h)) || {
250
+ } : s.reference, d = yield r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating), v = (yield r.isElement == null ? void 0 : r.isElement(d)) ? (yield r.getScale == null ? void 0 : r.getScale(d)) || {
251
251
  x: 1,
252
252
  y: 1
253
253
  } : {
254
254
  x: 1,
255
255
  y: 1
256
- }, x = K(r.convertOffsetParentRelativeRectToViewportRelativeRect ? yield r.convertOffsetParentRelativeRectToViewportRelativeRect({
256
+ }, y = K(r.convertOffsetParentRelativeRectToViewportRelativeRect ? yield r.convertOffsetParentRelativeRectToViewportRelativeRect({
257
257
  elements: l,
258
- rect: _,
259
- offsetParent: h,
258
+ rect: b,
259
+ offsetParent: d,
260
260
  strategy: a
261
- }) : _);
261
+ }) : b);
262
262
  return {
263
- top: (v.top - x.top + m.top) / L.y,
264
- bottom: (x.bottom - v.bottom + m.bottom) / L.y,
265
- left: (v.left - x.left + m.left) / L.x,
266
- right: (x.right - v.right + m.right) / L.x
263
+ top: (_.top - y.top + p.top) / v.y,
264
+ bottom: (y.bottom - _.bottom + p.bottom) / v.y,
265
+ left: (_.left - y.left + p.left) / v.x,
266
+ right: (y.right - _.right + p.right) / v.x
267
267
  };
268
268
  });
269
269
  }
270
- function Gt(t, e, n) {
271
- return (t ? [...n.filter((o) => D(o) === t), ...n.filter((o) => D(o) !== t)] : n.filter((o) => j(o) === o)).filter((o) => t ? D(o) === t || (e ? jt(o) !== o : !1) : !0);
270
+ function Jt(e, t, n) {
271
+ return (e ? [...n.filter((o) => D(o) === e), ...n.filter((o) => D(o) !== e)] : n.filter((o) => j(o) === o)).filter((o) => e ? D(o) === e || (t ? Xt(o) !== o : !1) : !0);
272
272
  }
273
- const Jt = function(t) {
274
- return t === void 0 && (t = {}), {
273
+ const Qt = function(e) {
274
+ return e === void 0 && (e = {}), {
275
275
  name: "autoPlacement",
276
- options: t,
276
+ options: e,
277
277
  fn(n) {
278
278
  return A(this, null, function* () {
279
279
  var i, o, r;
@@ -282,60 +282,60 @@ const Jt = function(t) {
282
282
  middlewareData: l,
283
283
  placement: a,
284
284
  platform: c,
285
- elements: f
286
- } = n, ut = it(t, n), {
287
- crossAxis: u = !1,
288
- alignment: p,
289
- allowedPlacements: d = gt,
290
- autoAlignment: m = !0
291
- } = ut, y = pt(ut, [
285
+ elements: h
286
+ } = n, ht = ot(e, n), {
287
+ crossAxis: f = !1,
288
+ alignment: g,
289
+ allowedPlacements: u = mt,
290
+ autoAlignment: p = !0
291
+ } = ht, x = gt(ht, [
292
292
  "crossAxis",
293
293
  "alignment",
294
294
  "allowedPlacements",
295
295
  "autoAlignment"
296
- ]), g = p !== void 0 || d === gt ? Gt(p || null, m, d) : d, v = yield Kt(n, y), _ = ((i = l.autoPlacement) == null ? void 0 : i.index) || 0, h = g[_];
297
- if (h == null)
296
+ ]), m = g !== void 0 || u === mt ? Jt(g || null, p, u) : u, _ = yield Gt(n, x), b = ((i = l.autoPlacement) == null ? void 0 : i.index) || 0, d = m[b];
297
+ if (d == null)
298
298
  return {};
299
- const L = Yt(h, s, yield c.isRTL == null ? void 0 : c.isRTL(f.floating));
300
- if (a !== h)
299
+ const v = jt(d, s, yield c.isRTL == null ? void 0 : c.isRTL(h.floating));
300
+ if (a !== d)
301
301
  return {
302
302
  reset: {
303
- placement: g[0]
303
+ placement: m[0]
304
304
  }
305
305
  };
306
- const x = [v[j(h)], v[L[0]], v[L[1]]], k = [...((o = l.autoPlacement) == null ? void 0 : o.overflows) || [], {
307
- placement: h,
308
- overflows: x
309
- }], ct = g[_ + 1];
310
- if (ct)
306
+ const y = [_[j(d)], _[v[0]], _[v[1]]], N = [...((o = l.autoPlacement) == null ? void 0 : o.overflows) || [], {
307
+ placement: d,
308
+ overflows: y
309
+ }], Z = m[b + 1];
310
+ if (Z)
311
311
  return {
312
312
  data: {
313
- index: _ + 1,
314
- overflows: k
313
+ index: b + 1,
314
+ overflows: N
315
315
  },
316
316
  reset: {
317
- placement: ct
317
+ placement: Z
318
318
  }
319
319
  };
320
- const at = k.map((R) => {
321
- const W = D(R.placement);
322
- return [R.placement, W && u ? (
320
+ const at = N.map((T) => {
321
+ const W = D(T.placement);
322
+ return [T.placement, W && f ? (
323
323
  // Check along the mainAxis and main crossAxis side.
324
- R.overflows.slice(0, 2).reduce((Ht, kt) => Ht + kt, 0)
324
+ T.overflows.slice(0, 2).reduce((Bt, Nt) => Bt + Nt, 0)
325
325
  ) : (
326
326
  // Check only the mainAxis.
327
- R.overflows[0]
328
- ), R.overflows];
329
- }).sort((R, W) => R[1] - W[1]), ft = ((r = at.filter((R) => R[2].slice(
327
+ T.overflows[0]
328
+ ), T.overflows];
329
+ }).sort((T, W) => T[1] - W[1]), ft = ((r = at.filter((T) => T[2].slice(
330
330
  0,
331
331
  // Aligned placements should not check their opposite crossAxis
332
332
  // side.
333
- D(R[0]) ? 2 : 3
333
+ D(T[0]) ? 2 : 3
334
334
  ).every((W) => W <= 0))[0]) == null ? void 0 : r[0]) || at[0][0];
335
335
  return ft !== a ? {
336
336
  data: {
337
- index: _ + 1,
338
- overflows: k
337
+ index: b + 1,
338
+ overflows: N
339
339
  },
340
340
  reset: {
341
341
  placement: ft
@@ -345,39 +345,39 @@ const Jt = function(t) {
345
345
  }
346
346
  };
347
347
  };
348
- function Qt(t, e) {
348
+ function Zt(e, t) {
349
349
  return A(this, null, function* () {
350
350
  const {
351
351
  placement: n,
352
352
  platform: i,
353
353
  elements: o
354
- } = t, r = yield i.isRTL == null ? void 0 : i.isRTL(o.floating), s = j(n), l = D(n), a = ot(n) === "y", c = ["left", "top"].includes(s) ? -1 : 1, f = r && a ? -1 : 1, u = it(e, t);
354
+ } = e, r = yield i.isRTL == null ? void 0 : i.isRTL(o.floating), s = j(n), l = D(n), a = st(n) === "y", c = ["left", "top"].includes(s) ? -1 : 1, h = r && a ? -1 : 1, f = ot(t, e);
355
355
  let {
356
- mainAxis: p,
357
- crossAxis: d,
358
- alignmentAxis: m
359
- } = typeof u == "number" ? {
360
- mainAxis: u,
356
+ mainAxis: g,
357
+ crossAxis: u,
358
+ alignmentAxis: p
359
+ } = typeof f == "number" ? {
360
+ mainAxis: f,
361
361
  crossAxis: 0,
362
362
  alignmentAxis: null
363
363
  } : {
364
- mainAxis: u.mainAxis || 0,
365
- crossAxis: u.crossAxis || 0,
366
- alignmentAxis: u.alignmentAxis
364
+ mainAxis: f.mainAxis || 0,
365
+ crossAxis: f.crossAxis || 0,
366
+ alignmentAxis: f.alignmentAxis
367
367
  };
368
- return l && typeof m == "number" && (d = l === "end" ? m * -1 : m), a ? {
369
- x: d * f,
370
- y: p * c
368
+ return l && typeof p == "number" && (u = l === "end" ? p * -1 : p), a ? {
369
+ x: u * h,
370
+ y: g * c
371
371
  } : {
372
- x: p * c,
373
- y: d * f
372
+ x: g * c,
373
+ y: u * h
374
374
  };
375
375
  });
376
376
  }
377
- const Zt = function(t) {
378
- return t === void 0 && (t = 0), {
377
+ const te = function(e) {
378
+ return e === void 0 && (e = 0), {
379
379
  name: "offset",
380
- options: t,
380
+ options: e,
381
381
  fn(n) {
382
382
  return A(this, null, function* () {
383
383
  var i, o;
@@ -386,11 +386,11 @@ const Zt = function(t) {
386
386
  y: s,
387
387
  placement: l,
388
388
  middlewareData: a
389
- } = n, c = yield Qt(n, t);
389
+ } = n, c = yield Zt(n, e);
390
390
  return l === ((i = a.offset) == null ? void 0 : i.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
391
391
  x: r + c.x,
392
392
  y: s + c.y,
393
- data: z(O({}, c), {
393
+ data: z(L({}, c), {
394
394
  placement: l
395
395
  })
396
396
  };
@@ -401,236 +401,236 @@ const Zt = function(t) {
401
401
  function G() {
402
402
  return typeof window != "undefined";
403
403
  }
404
- function F(t) {
405
- return St(t) ? (t.nodeName || "").toLowerCase() : "#document";
404
+ function F(e) {
405
+ return Rt(e) ? (e.nodeName || "").toLowerCase() : "#document";
406
406
  }
407
- function b(t) {
408
- var e;
409
- return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
407
+ function C(e) {
408
+ var t;
409
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
410
410
  }
411
- function $(t) {
412
- var e;
413
- return (e = (St(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
411
+ function $(e) {
412
+ var t;
413
+ return (t = (Rt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
414
414
  }
415
- function St(t) {
416
- return G() ? t instanceof Node || t instanceof b(t).Node : !1;
415
+ function Rt(e) {
416
+ return G() ? e instanceof Node || e instanceof C(e).Node : !1;
417
417
  }
418
- function C(t) {
419
- return G() ? t instanceof Element || t instanceof b(t).Element : !1;
418
+ function S(e) {
419
+ return G() ? e instanceof Element || e instanceof C(e).Element : !1;
420
420
  }
421
- function P(t) {
422
- return G() ? t instanceof HTMLElement || t instanceof b(t).HTMLElement : !1;
421
+ function O(e) {
422
+ return G() ? e instanceof HTMLElement || e instanceof C(e).HTMLElement : !1;
423
423
  }
424
- function vt(t) {
425
- return !G() || typeof ShadowRoot == "undefined" ? !1 : t instanceof ShadowRoot || t instanceof b(t).ShadowRoot;
424
+ function vt(e) {
425
+ return !G() || typeof ShadowRoot == "undefined" ? !1 : e instanceof ShadowRoot || e instanceof C(e).ShadowRoot;
426
426
  }
427
- function X(t) {
427
+ function X(e) {
428
428
  const {
429
- overflow: e,
429
+ overflow: t,
430
430
  overflowX: n,
431
431
  overflowY: i,
432
432
  display: o
433
- } = S(t);
434
- return /auto|scroll|overlay|hidden|clip/.test(e + i + n) && !["inline", "contents"].includes(o);
433
+ } = R(e);
434
+ return /auto|scroll|overlay|hidden|clip/.test(t + i + n) && !["inline", "contents"].includes(o);
435
435
  }
436
- function te(t) {
437
- return ["table", "td", "th"].includes(F(t));
436
+ function ee(e) {
437
+ return ["table", "td", "th"].includes(F(e));
438
438
  }
439
- function J(t) {
440
- return [":popover-open", ":modal"].some((e) => {
439
+ function J(e) {
440
+ return [":popover-open", ":modal"].some((t) => {
441
441
  try {
442
- return t.matches(e);
442
+ return e.matches(t);
443
443
  } catch (n) {
444
444
  return !1;
445
445
  }
446
446
  });
447
447
  }
448
- function st(t) {
449
- const e = rt(), n = C(t) ? S(t) : t;
450
- return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (n.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (n.contain || "").includes(i));
448
+ function rt(e) {
449
+ const t = lt(), n = S(e) ? R(e) : e;
450
+ return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (n.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (n.contain || "").includes(i));
451
451
  }
452
- function ee(t) {
453
- let e = M(t);
454
- for (; P(e) && !V(e); ) {
455
- if (st(e))
456
- return e;
457
- if (J(e))
452
+ function ne(e) {
453
+ let t = M(e);
454
+ for (; O(t) && !V(t); ) {
455
+ if (rt(t))
456
+ return t;
457
+ if (J(t))
458
458
  return null;
459
- e = M(e);
459
+ t = M(t);
460
460
  }
461
461
  return null;
462
462
  }
463
- function rt() {
463
+ function lt() {
464
464
  return typeof CSS == "undefined" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
465
465
  }
466
- function V(t) {
467
- return ["html", "body", "#document"].includes(F(t));
466
+ function V(e) {
467
+ return ["html", "body", "#document"].includes(F(e));
468
468
  }
469
- function S(t) {
470
- return b(t).getComputedStyle(t);
469
+ function R(e) {
470
+ return C(e).getComputedStyle(e);
471
471
  }
472
- function Q(t) {
473
- return C(t) ? {
474
- scrollLeft: t.scrollLeft,
475
- scrollTop: t.scrollTop
472
+ function Q(e) {
473
+ return S(e) ? {
474
+ scrollLeft: e.scrollLeft,
475
+ scrollTop: e.scrollTop
476
476
  } : {
477
- scrollLeft: t.scrollX,
478
- scrollTop: t.scrollY
477
+ scrollLeft: e.scrollX,
478
+ scrollTop: e.scrollY
479
479
  };
480
480
  }
481
- function M(t) {
482
- if (F(t) === "html")
483
- return t;
484
- const e = (
481
+ function M(e) {
482
+ if (F(e) === "html")
483
+ return e;
484
+ const t = (
485
485
  // Step into the shadow DOM of the parent of a slotted node.
486
- t.assignedSlot || // DOM Element detected.
487
- t.parentNode || // ShadowRoot detected.
488
- vt(t) && t.host || // Fallback.
489
- $(t)
486
+ e.assignedSlot || // DOM Element detected.
487
+ e.parentNode || // ShadowRoot detected.
488
+ vt(e) && e.host || // Fallback.
489
+ $(e)
490
490
  );
491
- return vt(e) ? e.host : e;
491
+ return vt(t) ? t.host : t;
492
492
  }
493
- function Rt(t) {
494
- const e = M(t);
495
- return V(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : P(e) && X(e) ? e : Rt(e);
493
+ function Tt(e) {
494
+ const t = M(e);
495
+ return V(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : O(t) && X(t) ? t : Tt(t);
496
496
  }
497
- function et(t, e, n) {
497
+ function nt(e, t, n) {
498
498
  var i;
499
- e === void 0 && (e = []), n === void 0 && (n = !0);
500
- const o = Rt(t), r = o === ((i = t.ownerDocument) == null ? void 0 : i.body), s = b(o);
499
+ t === void 0 && (t = []), n === void 0 && (n = !0);
500
+ const o = Tt(e), r = o === ((i = e.ownerDocument) == null ? void 0 : i.body), s = C(o);
501
501
  if (r) {
502
- const l = nt(s);
503
- return e.concat(s, s.visualViewport || [], X(o) ? o : [], l && n ? et(l) : []);
502
+ const l = it(s);
503
+ return t.concat(s, s.visualViewport || [], X(o) ? o : [], l && n ? nt(l) : []);
504
504
  }
505
- return e.concat(o, et(o, [], n));
505
+ return t.concat(o, nt(o, [], n));
506
506
  }
507
- function nt(t) {
508
- return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
507
+ function it(e) {
508
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
509
509
  }
510
- function Tt(t) {
511
- const e = S(t);
512
- let n = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
513
- const o = P(t), r = o ? t.offsetWidth : n, s = o ? t.offsetHeight : i, l = q(n) !== r || q(i) !== s;
510
+ function Et(e) {
511
+ const t = R(e);
512
+ let n = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
513
+ const o = O(e), r = o ? e.offsetWidth : n, s = o ? e.offsetHeight : i, l = q(n) !== r || q(i) !== s;
514
514
  return l && (n = r, i = s), {
515
515
  width: n,
516
516
  height: i,
517
517
  $: l
518
518
  };
519
519
  }
520
- function Et(t) {
521
- return C(t) ? t : t.contextElement;
520
+ function Pt(e) {
521
+ return S(e) ? e : e.contextElement;
522
522
  }
523
- function N(t) {
524
- const e = Et(t);
525
- if (!P(e))
526
- return E(1);
527
- const n = e.getBoundingClientRect(), {
523
+ function H(e) {
524
+ const t = Pt(e);
525
+ if (!O(t))
526
+ return P(1);
527
+ const n = t.getBoundingClientRect(), {
528
528
  width: i,
529
529
  height: o,
530
530
  $: r
531
- } = Tt(e);
531
+ } = Et(t);
532
532
  let s = (r ? q(n.width) : n.width) / i, l = (r ? q(n.height) : n.height) / o;
533
533
  return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
534
534
  x: s,
535
535
  y: l
536
536
  };
537
537
  }
538
- const ne = /* @__PURE__ */ E(0);
539
- function Pt(t) {
540
- const e = b(t);
541
- return !rt() || !e.visualViewport ? ne : {
542
- x: e.visualViewport.offsetLeft,
543
- y: e.visualViewport.offsetTop
538
+ const ie = /* @__PURE__ */ P(0);
539
+ function Ot(e) {
540
+ const t = C(e);
541
+ return !lt() || !t.visualViewport ? ie : {
542
+ x: t.visualViewport.offsetLeft,
543
+ y: t.visualViewport.offsetTop
544
544
  };
545
545
  }
546
- function ie(t, e, n) {
547
- return e === void 0 && (e = !1), !n || e && n !== b(t) ? !1 : e;
546
+ function oe(e, t, n) {
547
+ return t === void 0 && (t = !1), !n || t && n !== C(e) ? !1 : t;
548
548
  }
549
- function Y(t, e, n, i) {
550
- e === void 0 && (e = !1), n === void 0 && (n = !1);
551
- const o = t.getBoundingClientRect(), r = Et(t);
552
- let s = E(1);
553
- e && (i ? C(i) && (s = N(i)) : s = N(t));
554
- const l = ie(r, n, i) ? Pt(r) : E(0);
555
- let a = (o.left + l.x) / s.x, c = (o.top + l.y) / s.y, f = o.width / s.x, u = o.height / s.y;
549
+ function I(e, t, n, i) {
550
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
551
+ const o = e.getBoundingClientRect(), r = Pt(e);
552
+ let s = P(1);
553
+ t && (i ? S(i) && (s = H(i)) : s = H(e));
554
+ const l = oe(r, n, i) ? Ot(r) : P(0);
555
+ let a = (o.left + l.x) / s.x, c = (o.top + l.y) / s.y, h = o.width / s.x, f = o.height / s.y;
556
556
  if (r) {
557
- const p = b(r), d = i && C(i) ? b(i) : i;
558
- let m = p, y = nt(m);
559
- for (; y && i && d !== m; ) {
560
- const g = N(y), v = y.getBoundingClientRect(), _ = S(y), h = v.left + (y.clientLeft + parseFloat(_.paddingLeft)) * g.x, L = v.top + (y.clientTop + parseFloat(_.paddingTop)) * g.y;
561
- a *= g.x, c *= g.y, f *= g.x, u *= g.y, a += h, c += L, m = b(y), y = nt(m);
557
+ const g = C(r), u = i && S(i) ? C(i) : i;
558
+ let p = g, x = it(p);
559
+ for (; x && i && u !== p; ) {
560
+ const m = H(x), _ = x.getBoundingClientRect(), b = R(x), d = _.left + (x.clientLeft + parseFloat(b.paddingLeft)) * m.x, v = _.top + (x.clientTop + parseFloat(b.paddingTop)) * m.y;
561
+ a *= m.x, c *= m.y, h *= m.x, f *= m.y, a += d, c += v, p = C(x), x = it(p);
562
562
  }
563
563
  }
564
564
  return K({
565
- width: f,
566
- height: u,
565
+ width: h,
566
+ height: f,
567
567
  x: a,
568
568
  y: c
569
569
  });
570
570
  }
571
- function lt(t, e) {
572
- const n = Q(t).scrollLeft;
573
- return e ? e.left + n : Y($(t)).left + n;
571
+ function ct(e, t) {
572
+ const n = Q(e).scrollLeft;
573
+ return t ? t.left + n : I($(e)).left + n;
574
574
  }
575
- function Ot(t, e, n) {
575
+ function $t(e, t, n) {
576
576
  n === void 0 && (n = !1);
577
- const i = t.getBoundingClientRect(), o = i.left + e.scrollLeft - (n ? 0 : (
577
+ const i = e.getBoundingClientRect(), o = i.left + t.scrollLeft - (n ? 0 : (
578
578
  // RTL <body> scrollbar.
579
- lt(t, i)
580
- )), r = i.top + e.scrollTop;
579
+ ct(e, i)
580
+ )), r = i.top + t.scrollTop;
581
581
  return {
582
582
  x: o,
583
583
  y: r
584
584
  };
585
585
  }
586
- function oe(t) {
586
+ function se(e) {
587
587
  let {
588
- elements: e,
588
+ elements: t,
589
589
  rect: n,
590
590
  offsetParent: i,
591
591
  strategy: o
592
- } = t;
593
- const r = o === "fixed", s = $(i), l = e ? J(e.floating) : !1;
592
+ } = e;
593
+ const r = o === "fixed", s = $(i), l = t ? J(t.floating) : !1;
594
594
  if (i === s || l && r)
595
595
  return n;
596
596
  let a = {
597
597
  scrollLeft: 0,
598
598
  scrollTop: 0
599
- }, c = E(1);
600
- const f = E(0), u = P(i);
601
- if ((u || !u && !r) && ((F(i) !== "body" || X(s)) && (a = Q(i)), P(i))) {
602
- const d = Y(i);
603
- c = N(i), f.x = d.x + i.clientLeft, f.y = d.y + i.clientTop;
599
+ }, c = P(1);
600
+ const h = P(0), f = O(i);
601
+ if ((f || !f && !r) && ((F(i) !== "body" || X(s)) && (a = Q(i)), O(i))) {
602
+ const u = I(i);
603
+ c = H(i), h.x = u.x + i.clientLeft, h.y = u.y + i.clientTop;
604
604
  }
605
- const p = s && !u && !r ? Ot(s, a, !0) : E(0);
605
+ const g = s && !f && !r ? $t(s, a, !0) : P(0);
606
606
  return {
607
607
  width: n.width * c.x,
608
608
  height: n.height * c.y,
609
- x: n.x * c.x - a.scrollLeft * c.x + f.x + p.x,
610
- y: n.y * c.y - a.scrollTop * c.y + f.y + p.y
609
+ x: n.x * c.x - a.scrollLeft * c.x + h.x + g.x,
610
+ y: n.y * c.y - a.scrollTop * c.y + h.y + g.y
611
611
  };
612
612
  }
613
- function se(t) {
614
- return Array.from(t.getClientRects());
613
+ function re(e) {
614
+ return Array.from(e.getClientRects());
615
615
  }
616
- function re(t) {
617
- const e = $(t), n = Q(t), i = t.ownerDocument.body, o = I(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), r = I(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
618
- let s = -n.scrollLeft + lt(t);
616
+ function le(e) {
617
+ const t = $(e), n = Q(e), i = e.ownerDocument.body, o = Y(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = Y(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
618
+ let s = -n.scrollLeft + ct(e);
619
619
  const l = -n.scrollTop;
620
- return S(i).direction === "rtl" && (s += I(e.clientWidth, i.clientWidth) - o), {
620
+ return R(i).direction === "rtl" && (s += Y(t.clientWidth, i.clientWidth) - o), {
621
621
  width: o,
622
622
  height: r,
623
623
  x: s,
624
624
  y: l
625
625
  };
626
626
  }
627
- function le(t, e) {
628
- const n = b(t), i = $(t), o = n.visualViewport;
627
+ function ce(e, t) {
628
+ const n = C(e), i = $(e), o = n.visualViewport;
629
629
  let r = i.clientWidth, s = i.clientHeight, l = 0, a = 0;
630
630
  if (o) {
631
631
  r = o.width, s = o.height;
632
- const c = rt();
633
- (!c || c && e === "fixed") && (l = o.offsetLeft, a = o.offsetTop);
632
+ const c = lt();
633
+ (!c || c && t === "fixed") && (l = o.offsetLeft, a = o.offsetTop);
634
634
  }
635
635
  return {
636
636
  width: r,
@@ -639,8 +639,8 @@ function le(t, e) {
639
639
  y: a
640
640
  };
641
641
  }
642
- function ce(t, e) {
643
- const n = Y(t, !0, e === "fixed"), i = n.top + t.clientTop, o = n.left + t.clientLeft, r = P(t) ? N(t) : E(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, a = o * r.x, c = i * r.y;
642
+ function ae(e, t) {
643
+ const n = I(e, !0, t === "fixed"), i = n.top + e.clientTop, o = n.left + e.clientLeft, r = O(e) ? H(e) : P(1), s = e.clientWidth * r.x, l = e.clientHeight * r.y, a = o * r.x, c = i * r.y;
644
644
  return {
645
645
  width: s,
646
646
  height: l,
@@ -648,53 +648,53 @@ function ce(t, e) {
648
648
  y: c
649
649
  };
650
650
  }
651
- function _t(t, e, n) {
651
+ function _t(e, t, n) {
652
652
  let i;
653
- if (e === "viewport")
654
- i = le(t, n);
655
- else if (e === "document")
656
- i = re($(t));
657
- else if (C(e))
653
+ if (t === "viewport")
658
654
  i = ce(e, n);
655
+ else if (t === "document")
656
+ i = le($(e));
657
+ else if (S(t))
658
+ i = ae(t, n);
659
659
  else {
660
- const o = Pt(t);
660
+ const o = Ot(e);
661
661
  i = {
662
- x: e.x - o.x,
663
- y: e.y - o.y,
664
- width: e.width,
665
- height: e.height
662
+ x: t.x - o.x,
663
+ y: t.y - o.y,
664
+ width: t.width,
665
+ height: t.height
666
666
  };
667
667
  }
668
668
  return K(i);
669
669
  }
670
- function $t(t, e) {
671
- const n = M(t);
672
- return n === e || !C(n) || V(n) ? !1 : S(n).position === "fixed" || $t(n, e);
670
+ function At(e, t) {
671
+ const n = M(e);
672
+ return n === t || !S(n) || V(n) ? !1 : R(n).position === "fixed" || At(n, t);
673
673
  }
674
- function ae(t, e) {
675
- const n = e.get(t);
674
+ function fe(e, t) {
675
+ const n = t.get(e);
676
676
  if (n)
677
677
  return n;
678
- let i = et(t, [], !1).filter((l) => C(l) && F(l) !== "body"), o = null;
679
- const r = S(t).position === "fixed";
680
- let s = r ? M(t) : t;
681
- for (; C(s) && !V(s); ) {
682
- const l = S(s), a = st(s);
683
- !a && l.position === "fixed" && (o = null), (r ? !a && !o : !a && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || X(s) && !a && $t(t, s)) ? i = i.filter((f) => f !== s) : o = l, s = M(s);
678
+ let i = nt(e, [], !1).filter((l) => S(l) && F(l) !== "body"), o = null;
679
+ const r = R(e).position === "fixed";
680
+ let s = r ? M(e) : e;
681
+ for (; S(s) && !V(s); ) {
682
+ const l = R(s), a = rt(s);
683
+ !a && l.position === "fixed" && (o = null), (r ? !a && !o : !a && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || X(s) && !a && At(e, s)) ? i = i.filter((h) => h !== s) : o = l, s = M(s);
684
684
  }
685
- return e.set(t, i), i;
685
+ return t.set(e, i), i;
686
686
  }
687
- function fe(t) {
687
+ function he(e) {
688
688
  let {
689
- element: e,
689
+ element: t,
690
690
  boundary: n,
691
691
  rootBoundary: i,
692
692
  strategy: o
693
- } = t;
694
- const s = [...n === "clippingAncestors" ? J(e) ? [] : ae(e, this._c) : [].concat(n), i], l = s[0], a = s.reduce((c, f) => {
695
- const u = _t(e, f, o);
696
- return c.top = I(u.top, c.top), c.right = yt(u.right, c.right), c.bottom = yt(u.bottom, c.bottom), c.left = I(u.left, c.left), c;
697
- }, _t(e, l, o));
693
+ } = e;
694
+ const s = [...n === "clippingAncestors" ? J(t) ? [] : fe(t, this._c) : [].concat(n), i], l = s[0], a = s.reduce((c, h) => {
695
+ const f = _t(t, h, o);
696
+ return c.top = Y(f.top, c.top), c.right = xt(f.right, c.right), c.bottom = xt(f.bottom, c.bottom), c.left = Y(f.left, c.left), c;
697
+ }, _t(t, l, o));
698
698
  return {
699
699
  width: a.right - a.left,
700
700
  height: a.bottom - a.top,
@@ -702,70 +702,70 @@ function fe(t) {
702
702
  y: a.top
703
703
  };
704
704
  }
705
- function ue(t) {
705
+ function ue(e) {
706
706
  const {
707
- width: e,
707
+ width: t,
708
708
  height: n
709
- } = Tt(t);
709
+ } = Et(e);
710
710
  return {
711
- width: e,
711
+ width: t,
712
712
  height: n
713
713
  };
714
714
  }
715
- function de(t, e, n) {
716
- const i = P(e), o = $(e), r = n === "fixed", s = Y(t, !0, r, e);
715
+ function de(e, t, n) {
716
+ const i = O(t), o = $(t), r = n === "fixed", s = I(e, !0, r, t);
717
717
  let l = {
718
718
  scrollLeft: 0,
719
719
  scrollTop: 0
720
720
  };
721
- const a = E(0);
721
+ const a = P(0);
722
722
  if (i || !i && !r)
723
- if ((F(e) !== "body" || X(o)) && (l = Q(e)), i) {
724
- const p = Y(e, !0, r, e);
725
- a.x = p.x + e.clientLeft, a.y = p.y + e.clientTop;
726
- } else o && (a.x = lt(o));
727
- const c = o && !i && !r ? Ot(o, l) : E(0), f = s.left + l.scrollLeft - a.x - c.x, u = s.top + l.scrollTop - a.y - c.y;
723
+ if ((F(t) !== "body" || X(o)) && (l = Q(t)), i) {
724
+ const g = I(t, !0, r, t);
725
+ a.x = g.x + t.clientLeft, a.y = g.y + t.clientTop;
726
+ } else o && (a.x = ct(o));
727
+ const c = o && !i && !r ? $t(o, l) : P(0), h = s.left + l.scrollLeft - a.x - c.x, f = s.top + l.scrollTop - a.y - c.y;
728
728
  return {
729
- x: f,
730
- y: u,
729
+ x: h,
730
+ y: f,
731
731
  width: s.width,
732
732
  height: s.height
733
733
  };
734
734
  }
735
- function tt(t) {
736
- return S(t).position === "static";
735
+ function et(e) {
736
+ return R(e).position === "static";
737
737
  }
738
- function Lt(t, e) {
739
- if (!P(t) || S(t).position === "fixed")
738
+ function bt(e, t) {
739
+ if (!O(e) || R(e).position === "fixed")
740
740
  return null;
741
- if (e)
742
- return e(t);
743
- let n = t.offsetParent;
744
- return $(t) === n && (n = n.ownerDocument.body), n;
745
- }
746
- function At(t, e) {
747
- const n = b(t);
748
- if (J(t))
741
+ if (t)
742
+ return t(e);
743
+ let n = e.offsetParent;
744
+ return $(e) === n && (n = n.ownerDocument.body), n;
745
+ }
746
+ function kt(e, t) {
747
+ const n = C(e);
748
+ if (J(e))
749
749
  return n;
750
- if (!P(t)) {
751
- let o = M(t);
750
+ if (!O(e)) {
751
+ let o = M(e);
752
752
  for (; o && !V(o); ) {
753
- if (C(o) && !tt(o))
753
+ if (S(o) && !et(o))
754
754
  return o;
755
755
  o = M(o);
756
756
  }
757
757
  return n;
758
758
  }
759
- let i = Lt(t, e);
760
- for (; i && te(i) && tt(i); )
761
- i = Lt(i, e);
762
- return i && V(i) && tt(i) && !st(i) ? n : i || ee(t) || n;
759
+ let i = bt(e, t);
760
+ for (; i && ee(i) && et(i); )
761
+ i = bt(i, t);
762
+ return i && V(i) && et(i) && !rt(i) ? n : i || ne(e) || n;
763
763
  }
764
- const he = function(t) {
764
+ const ge = function(e) {
765
765
  return A(this, null, function* () {
766
- const e = this.getOffsetParent || At, n = this.getDimensions, i = yield n(t.floating);
766
+ const t = this.getOffsetParent || kt, n = this.getDimensions, i = yield n(e.floating);
767
767
  return {
768
- reference: de(t.reference, yield e(t.floating), t.strategy),
768
+ reference: de(e.reference, yield t(e.floating), e.strategy),
769
769
  floating: {
770
770
  x: 0,
771
771
  y: 0,
@@ -775,71 +775,71 @@ const he = function(t) {
775
775
  };
776
776
  });
777
777
  };
778
- function pe(t) {
779
- return S(t).direction === "rtl";
778
+ function pe(e) {
779
+ return R(e).direction === "rtl";
780
780
  }
781
781
  const me = {
782
- convertOffsetParentRelativeRectToViewportRelativeRect: oe,
782
+ convertOffsetParentRelativeRectToViewportRelativeRect: se,
783
783
  getDocumentElement: $,
784
- getClippingRect: fe,
785
- getOffsetParent: At,
786
- getElementRects: he,
787
- getClientRects: se,
784
+ getClippingRect: he,
785
+ getOffsetParent: kt,
786
+ getElementRects: ge,
787
+ getClientRects: re,
788
788
  getDimensions: ue,
789
- getScale: N,
790
- isElement: C,
789
+ getScale: H,
790
+ isElement: S,
791
791
  isRTL: pe
792
- }, ge = Zt, ye = Jt, we = (t, e, n) => {
793
- const i = /* @__PURE__ */ new Map(), o = O({
792
+ }, xe = te, we = Qt, ye = (e, t, n) => {
793
+ const i = /* @__PURE__ */ new Map(), o = L({
794
794
  platform: me
795
- }, n), r = z(O({}, o.platform), {
795
+ }, n), r = z(L({}, o.platform), {
796
796
  _c: i
797
797
  });
798
- return qt(t, e, z(O({}, o), {
798
+ return Kt(e, t, z(L({}, o), {
799
799
  platform: r
800
800
  }));
801
801
  };
802
- function H(t) {
803
- return t === null || typeof t == "undefined";
802
+ function B(e) {
803
+ return e === null || typeof e == "undefined";
804
804
  }
805
- function B(t) {
806
- return !H(t);
805
+ function k(e) {
806
+ return !B(e);
807
807
  }
808
- function xe(t) {
809
- return new Promise((e) => setTimeout(e, t));
808
+ function Ct(e) {
809
+ return new Promise((t) => setTimeout(t, e));
810
810
  }
811
- function Dt(t) {
811
+ function Dt(e) {
812
812
  var i;
813
- const e = t.parentElement;
814
- return !e || e.nodeName === "HTML" ? !1 : ((i = document.defaultView) == null ? void 0 : i.getComputedStyle(t, null).getPropertyValue("position")) === "fixed" ? !0 : Dt(e);
813
+ const t = e.parentElement;
814
+ return !t || t.nodeName === "HTML" ? !1 : ((i = document.defaultView) == null ? void 0 : i.getComputedStyle(e, null).getPropertyValue("position")) === "fixed" ? !0 : Dt(t);
815
815
  }
816
- function Mt(t) {
817
- return Dt(t) ? "fixed" : "absolute";
816
+ function Mt(e) {
817
+ return Dt(e) ? "fixed" : "absolute";
818
818
  }
819
819
  class ve {
820
820
  /** @inheritdoc */
821
- renderContent(e, n, i) {
822
- e.querySelector(`.${i.classPrefix}-content`).appendChild(n.node);
821
+ renderContent(t, n, i) {
822
+ t.querySelector(`.${i.classPrefix}-content`).appendChild(n.node);
823
823
  }
824
824
  }
825
- function T(t, e) {
826
- const n = document.createElement(t);
827
- return e && e.length > 0 && (e = e.filter((i) => i), n.classList.add(...e)), n;
825
+ function E(e, t) {
826
+ const n = document.createElement(e);
827
+ return t && t.length > 0 && (t = t.filter((i) => i), n.classList.add(...t)), n;
828
828
  }
829
829
  class _e {
830
830
  /** @inheritdoc */
831
- renderContent(e, n, i) {
831
+ renderContent(t, n, i) {
832
832
  var r, s, l, a;
833
- const o = e.querySelector(`.${i.classPrefix}-content`);
833
+ const o = t.querySelector(`.${i.classPrefix}-content`);
834
834
  if (n.imgSrc) {
835
- const c = T("img", [
835
+ const c = E("img", [
836
836
  `${i.classPrefix}-image`,
837
837
  `${(s = (r = n.customization) == null ? void 0 : r.imageClass) != null ? s : ""}`
838
838
  ]);
839
839
  c.src = n.imgSrc, o.appendChild(c);
840
840
  }
841
841
  if (n.text) {
842
- const c = T("p", [
842
+ const c = E("p", [
843
843
  `${i.classPrefix}-description`,
844
844
  `${(a = (l = n.customization) == null ? void 0 : l.descriptionClass) != null ? a : ""}`
845
845
  ]);
@@ -847,58 +847,58 @@ class _e {
847
847
  }
848
848
  }
849
849
  }
850
- function Le(t, e, n) {
851
- var l, a, c, f, u, p, d, m, y, g, v, _;
852
- t.innerHTML = "", t.className = `${n.config.classPrefix}`, (l = e.customization) != null && l.class && t.classList.add(e.customization.class);
853
- const i = T("div", [
850
+ function be(e, t, n) {
851
+ var l, a, c, h, f, g, u, p, x, m, _, b;
852
+ e.innerHTML = "", e.className = `${n.config.classPrefix} ${n.config.animationClass}`, (l = t.customization) != null && l.class && e.classList.add(t.customization.class);
853
+ const i = E("div", [
854
854
  `${n.config.classPrefix}-header`,
855
- `${(c = (a = e.customization) == null ? void 0 : a.headerClass) != null ? c : ""}`
855
+ `${(c = (a = t.customization) == null ? void 0 : a.headerClass) != null ? c : ""}`
856
856
  ]);
857
- t.appendChild(i);
858
- const o = T("h1", [
857
+ e.appendChild(i);
858
+ const o = E("h1", [
859
859
  `${n.config.classPrefix}-title`,
860
- `${(u = (f = e.customization) == null ? void 0 : f.titleClass) != null ? u : ""}`
860
+ `${(f = (h = t.customization) == null ? void 0 : h.titleClass) != null ? f : ""}`
861
861
  ]);
862
- if (o.innerHTML = (p = e.title) != null ? p : "", i.appendChild(o), n.config.allowClose) {
863
- const h = T("button", [
862
+ if (o.innerHTML = (g = t.title) != null ? g : "", i.appendChild(o), n.config.allowClose) {
863
+ const d = E("button", [
864
864
  `${n.config.classPrefix}-close`,
865
- `${(m = (d = e.customization) == null ? void 0 : d.closeButtonClass) != null ? m : ""}`
865
+ `${(p = (u = t.customization) == null ? void 0 : u.closeButtonClass) != null ? p : ""}`
866
866
  ]);
867
- be(h, n.config.closeIcon), h.onclick = n.complete.bind(n), i.appendChild(h);
867
+ Ce(d, n.config.closeIcon), d.onclick = n.complete.bind(n), i.appendChild(d);
868
868
  }
869
- const r = T("div", [
869
+ const r = E("div", [
870
870
  `${n.config.classPrefix}-content`,
871
- `${(g = (y = e.customization) == null ? void 0 : y.contentClass) != null ? g : ""}`
871
+ `${(m = (x = t.customization) == null ? void 0 : x.contentClass) != null ? m : ""}`
872
872
  ]);
873
- t.appendChild(r);
874
- const s = T("div", [
873
+ e.appendChild(r);
874
+ const s = E("div", [
875
875
  `${n.config.classPrefix}-footer`,
876
- `${(_ = (v = e.customization) == null ? void 0 : v.footerClass) != null ? _ : ""}`
876
+ `${(b = (_ = t.customization) == null ? void 0 : _.footerClass) != null ? b : ""}`
877
877
  ]);
878
- H(e.buttonList) && (e.buttonList = Ce(n)), e.buttonList.forEach((h) => {
879
- var k;
880
- h.action = h.action.bind(n);
881
- const L = [`${n.config.classPrefix}-button`, (k = h.class) != null ? k : ""];
882
- H(h.type) || h.type === "secondary" ? L.push(`${n.config.classPrefix}-button-secondary`) : h.type === "primary" && L.push(`${n.config.classPrefix}-button-primary`), !H(h.class) && h.class !== "" && L.push(h.class);
883
- const x = T("button", L);
884
- x.innerText = h.text, x.onclick = () => {
885
- h.action();
886
- }, s.appendChild(x);
887
- }), t.appendChild(s);
888
- }
889
- function be(t, e) {
890
- e instanceof HTMLElement ? t.appendChild(e) : t.innerHTML = e.innerHTML;
891
- }
892
- function Ce(t) {
878
+ B(t.buttonList) && (t.buttonList = Le(n)), t.buttonList.forEach((d) => {
879
+ var N;
880
+ d.action = d.action.bind(n);
881
+ const v = [`${n.config.classPrefix}-button`, (N = d.class) != null ? N : ""];
882
+ B(d.type) || d.type === "secondary" ? v.push(`${n.config.classPrefix}-button-secondary`) : d.type === "primary" ? v.push(`${n.config.classPrefix}-button-primary`) : d.type === "link" && v.push(`${n.config.classPrefix}-button-link`), !B(d.class) && d.class !== "" && v.push(d.class);
883
+ const y = E("button", v);
884
+ y.innerText = d.text, y.onclick = (Z) => {
885
+ d.action.call(n);
886
+ }, s.appendChild(y);
887
+ }), e.appendChild(s);
888
+ }
889
+ function Ce(e, t) {
890
+ t instanceof HTMLElement ? e.appendChild(t) : e.innerHTML = t.innerHTML;
891
+ }
892
+ function Le(e) {
893
893
  return [
894
894
  {
895
895
  text: "Back",
896
- action: t.prev
896
+ action: e.prev
897
897
  },
898
898
  {
899
899
  text: "Next",
900
900
  type: "primary",
901
- action: t.next
901
+ action: e.next
902
902
  }
903
903
  ];
904
904
  }
@@ -908,35 +908,34 @@ class Se {
908
908
  this.setUpStrategies();
909
909
  }
910
910
  /** @inheritdoc */
911
- render(e, n) {
911
+ render(t, n) {
912
912
  return new Promise((i) => {
913
913
  var o, r;
914
914
  if (!this._renderContentStrategy.has(n.popupData.type))
915
915
  throw new Error("Missing popup creator strategy");
916
- e.style.animation = "none", e.style.opacity = "0", n.hostElement ? e.style.position = Mt(n.hostElement) : e.style.position = "fixed", Le(e, n.popupData, n.tour), (o = this._renderContentStrategy.get(n.popupData.type)) == null || o.renderContent(e, n.popupData, n.tour.config), (r = n.hostElement) == null || r.scrollIntoView(n.tour.config.scrollTo), i();
917
- }).then(() => {
918
- var i, o;
919
- return n.isFirst || !n.hasHost && !((i = n.prevStep) != null && i.hasHost) || !n.hasHost && !((o = n.nextStep) != null && o.hasHost) ? Promise.resolve() : xe(400);
920
- }).then(() => {
921
- this.updatePosition(e, n), e.style.opacity = "1", e.style.animation = "fadeIn 0.3s ease-out";
916
+ t.style.display = "none", t.classList.remove(n.tour.config.animationClass), n.hostElement ? t.style.position = Mt(n.hostElement) : t.style.position = "fixed", be(t, n.popupData, n.tour), (o = this._renderContentStrategy.get(n.popupData.type)) == null || o.renderContent(t, n.popupData, n.tour.config), (r = n.hostElement) == null || r.scrollIntoView(n.tour.config.scrollTo), i();
917
+ }).then(() => n.isFirst && n.direction === "toNext" ? Ct(0) : Ct(400)).then(() => {
918
+ t.style.display = "block", this.updatePosition(t, n), t.classList.add(n.tour.config.animationClass);
922
919
  });
923
920
  }
924
921
  /** @inheritdoc */
925
- updatePosition(e, n) {
926
- const i = e.style.position === "fixed" ? window.scrollY || document.documentElement.scrollTop : 0, o = [], r = B(n.popupData.position) && n.popupData.position !== "auto" ? n.popupData.position : void 0;
927
- (n.popupData.position === "auto" || H(r)) && o.push(ye()), n.hostElement ? we(n.hostElement, e, {
922
+ updatePosition(t, n) {
923
+ const i = t.style.position === "fixed" ? window.scrollY || document.documentElement.scrollTop : 0, o = [], r = k(n.popupData.position) && n.popupData.position !== "auto" ? n.popupData.position : void 0;
924
+ (n.popupData.position === "auto" || B(r)) && o.push(we()), n.hostElement ? ye(n.hostElement, t, {
928
925
  placement: r,
929
- middleware: [...o, ge(20)]
926
+ middleware: [...o, xe(20)]
930
927
  }).then(({ x: s, y: l }) => {
931
- Object.assign(e.style, {
928
+ Object.assign(t.style, {
932
929
  top: `${l - i}px`,
933
930
  left: `${s}px`,
934
- transform: ""
931
+ marginTop: "0",
932
+ marginLeft: "0"
935
933
  });
936
- }) : Object.assign(e.style, {
934
+ }) : Object.assign(t.style, {
937
935
  top: "50%",
938
936
  left: "50%",
939
- transform: "translate(-50%, -50%)"
937
+ marginTop: `-${t.clientHeight / 2}px`,
938
+ marginLeft: `-${t.clientWidth / 2}px`
940
939
  });
941
940
  }
942
941
  setUpStrategies() {
@@ -945,75 +944,82 @@ class Se {
945
944
  }
946
945
  class Re {
947
946
  /** @inheritdoc */
948
- render(e, n) {
947
+ render(t, n) {
949
948
  return new Promise((i) => {
950
- n.hostElement && (e.style.position = Mt(n.hostElement)), i();
949
+ n.hostElement && (t.style.position = Mt(n.hostElement)), i();
951
950
  }).then(() => {
952
- this.updatePosition(e, n);
951
+ this.updatePosition(t, n);
953
952
  });
954
953
  }
955
954
  /** @inheritdoc */
956
- updatePosition(e, n) {
957
- var l, a, c, f;
955
+ updatePosition(t, n) {
956
+ var l, a, c, h;
958
957
  if (!n.hostElement) {
959
- e.style.width = "0", e.style.height = "0", e.style.top = "50%", e.style.left = "50%", e.style.transform = "translate(-50%, -50%)", e.style.borderWidth = "0";
958
+ t.style.width = "0", t.style.height = "0", t.style.top = "50%", t.style.left = "50%", t.style.transform = "translate(-50%, -50%)", t.style.borderWidth = "0";
960
959
  return;
961
960
  }
962
- const i = n.hostElement.getBoundingClientRect(), o = (a = (l = n.tour.config.helperLayout) == null ? void 0 : l.paddingX) != null ? a : 8, r = (f = (c = n.tour.config.helperLayout) == null ? void 0 : c.paddingY) != null ? f : 8, s = e.style.position === "fixed" ? 0 : window.scrollY || document.documentElement.scrollTop;
963
- e.style.transform = "", e.style.borderWidth = "2px", e.style.left = `${i.left - o}px`, e.style.top = `${i.top + s - r}px`, e.style.width = `${i.width + 2 * o}px`, e.style.height = `${i.height + 2 * r}px`;
961
+ const i = n.hostElement.getBoundingClientRect(), o = (a = (l = n.tour.config.highlight) == null ? void 0 : l.paddingX) != null ? a : 8, r = (h = (c = n.tour.config.highlight) == null ? void 0 : c.paddingY) != null ? h : 8, s = t.style.position === "fixed" ? 0 : window.scrollY || document.documentElement.scrollTop;
962
+ t.style.transform = "", t.style.borderWidth = "2px", t.style.left = `${i.left - o}px`, t.style.top = `${i.top + s - r}px`, t.style.width = `${i.width + 2 * o}px`, t.style.height = `${i.height + 2 * r}px`;
964
963
  }
965
964
  }
966
965
  class Te {
967
- constructor(e, n) {
966
+ constructor(t, n) {
968
967
  w(this, "id");
969
968
  w(this, "popupData");
970
969
  w(this, "tour");
970
+ w(this, "index");
971
971
  w(this, "_hostElement", null);
972
+ w(this, "_direction", "toNext");
972
973
  w(this, "_hostData");
973
974
  w(this, "_popupRenderer");
974
- w(this, "_helperRenderer");
975
- this.id = n.id, this.popupData = n.popup, this.tour = e, this._hostData = n.host, this._popupRenderer = e.popupRenderer, this._helperRenderer = e.helperRenderer;
975
+ w(this, "_highlightRenderer");
976
+ var i;
977
+ this.id = n.id, this.popupData = n.popup, this.tour = t, this.index = (i = n.index) != null ? i : null, this._hostData = n.host, this._popupRenderer = t.popupRenderer, this._highlightRenderer = t.highlightRenderer;
976
978
  }
977
979
  get isFirst() {
978
- return this.tour.stepList.indexOf(this) === 0;
980
+ return this.index === 0;
979
981
  }
980
982
  get nextStep() {
981
- var e;
982
- return (e = this.tour.stepList[this.tour.stepList.indexOf(this) + 1]) != null ? e : null;
983
+ var t;
984
+ return (t = this.tour.stepList[this.tour.stepList.indexOf(this) + 1]) != null ? t : null;
983
985
  }
984
986
  get prevStep() {
985
- var e;
986
- return (e = this.tour.stepList[this.tour.stepList.indexOf(this) - 1]) != null ? e : null;
987
+ var t;
988
+ return (t = this.tour.stepList[this.tour.stepList.indexOf(this) - 1]) != null ? t : null;
989
+ }
990
+ get direction() {
991
+ return this._direction;
987
992
  }
988
993
  get hasHost() {
989
- return B(this._hostElement);
994
+ return k(this._hostElement);
990
995
  }
991
996
  get hostElement() {
992
997
  return this._hostElement;
993
998
  }
994
- show() {
999
+ show(t) {
995
1000
  return A(this, null, function* () {
996
- var e;
997
- H(this.tour.popup) || H(this.tour.helperLayout) || (this._hostData && (this._hostElement = this.resolveHostElement(
998
- typeof this._hostData == "function" ? this._hostData() : (e = this._hostData) != null ? e : null
999
- )), yield Promise.all([
1000
- this._helperRenderer.render(this.tour.helperLayout, this),
1001
- this._popupRenderer.render(this.tour.popup, this)
1002
- ]));
1001
+ var i;
1002
+ if (B(this.tour.popup))
1003
+ return;
1004
+ this._direction = t, this._hostData && (this._hostElement = this.resolveHostElement(
1005
+ typeof this._hostData == "function" ? this._hostData() : (i = this._hostData) != null ? i : null
1006
+ ));
1007
+ const n = [this._popupRenderer.render(this.tour.popup, this)];
1008
+ !this.tour.config.highlight.disable && !B(this.tour.highlight) && n.push(this._highlightRenderer.render(this.tour.highlight, this)), yield Promise.all(n);
1003
1009
  });
1004
1010
  }
1005
- resolveHostElement(e) {
1006
- return typeof this._hostData == "string" ? document.querySelector(this._hostData) : e;
1011
+ resolveHostElement(t) {
1012
+ return typeof this._hostData == "string" ? document.querySelector(this._hostData) : t;
1007
1013
  }
1008
1014
  }
1009
- function Ee(t) {
1015
+ function Ee(e) {
1010
1016
  return {
1011
1017
  innerHTML: `
1012
1018
  <svg
1013
1019
  xmlns="http://www.w3.org/2000/svg"
1014
1020
  fill="none"
1015
1021
  viewBox="0 0 162 162"
1016
- class="${t}-close-icon"
1022
+ class="${e}-close-icon"
1017
1023
  >
1018
1024
  <path
1019
1025
  stroke-linecap="round"
@@ -1032,34 +1038,38 @@ function Ee(t) {
1032
1038
  };
1033
1039
  }
1034
1040
  class $e {
1035
- constructor(e) {
1041
+ constructor(t) {
1036
1042
  w(this, "popupRenderer", new Se());
1037
- w(this, "helperRenderer", new Re());
1043
+ w(this, "highlightRenderer", new Re());
1038
1044
  /**
1039
1045
  * TODO remove
1040
1046
  * @deprecated remove later
1041
1047
  */
1042
1048
  w(this, "isStarted", !1);
1043
1049
  w(this, "_popup", null);
1044
- w(this, "_helperLayout", null);
1050
+ w(this, "_highlight", null);
1045
1051
  w(this, "_stepList", []);
1046
1052
  w(this, "_activeStep", null);
1047
1053
  w(this, "_bodyResizeObserver");
1048
1054
  w(this, "_config");
1049
1055
  w(this, "_stepMap", /* @__PURE__ */ new Map());
1050
- var n, i, o, r, s, l, a, c, f;
1056
+ var n, i, o, r, s, l, a, c, h, f, g, u, p, x, m;
1051
1057
  this._bodyResizeObserver = this.getBodyResizeObserver(), this._config = {
1052
- classPrefix: (n = e.classPrefix) != null ? n : "siteguide",
1053
- allowClose: (i = e.allowClose) != null ? i : !0,
1054
- scrollTo: (o = e.scrollTo) != null ? o : {
1058
+ classPrefix: (n = t.classPrefix) != null ? n : "siteguide",
1059
+ animationClass: (i = t.animationClass) != null ? i : "siteguide-animation",
1060
+ allowClose: (o = t.allowClose) != null ? o : !0,
1061
+ scrollTo: (r = t.scrollTo) != null ? r : {
1055
1062
  behavior: "smooth",
1056
1063
  block: "center",
1057
1064
  inline: "center"
1058
1065
  },
1059
- closeIcon: (s = e.closeIcon) != null ? s : Ee((r = e.classPrefix) != null ? r : "siteguide"),
1060
- helperLayout: {
1061
- paddingX: (a = (l = e.helperLayout) == null ? void 0 : l.paddingX) != null ? a : 8,
1062
- paddingY: (f = (c = e.helperLayout) == null ? void 0 : c.paddingY) != null ? f : 8
1066
+ allowClickoutClose: (s = t.allowClickoutClose) != null ? s : !1,
1067
+ closeIcon: (a = t.closeIcon) != null ? a : Ee((l = t.classPrefix) != null ? l : "siteguide"),
1068
+ highlight: {
1069
+ disable: (h = (c = t.highlight) == null ? void 0 : c.disable) != null ? h : !1,
1070
+ paddingX: (g = (f = t.highlight) == null ? void 0 : f.paddingX) != null ? g : 8,
1071
+ paddingY: (p = (u = t.highlight) == null ? void 0 : u.paddingY) != null ? p : 8,
1072
+ class: (m = (x = t.highlight) == null ? void 0 : x.class) != null ? m : "siteguide-highlight"
1063
1073
  }
1064
1074
  };
1065
1075
  }
@@ -1072,52 +1082,57 @@ class $e {
1072
1082
  get popup() {
1073
1083
  return this._popup;
1074
1084
  }
1075
- get helperLayout() {
1076
- return this._helperLayout;
1085
+ get highlight() {
1086
+ return this._highlight;
1077
1087
  }
1078
- addStep(e) {
1079
- if (this._stepMap.has(e.id))
1088
+ addStep(t) {
1089
+ if (this._stepMap.has(t.id))
1080
1090
  throw new Error("Step with provided id has been already registered");
1081
- const n = new Te(this, e);
1082
- this._stepList.push(n), this._stepMap.set(e.id, n);
1091
+ const n = new Te(this, t);
1092
+ k(t.index) ? this._stepList.splice(t.index, 0, n) : this._stepList.push(n), this._stepMap.set(t.id, n);
1083
1093
  }
1084
- addSteps(e) {
1085
- e.forEach((n) => this.addStep(n));
1094
+ addSteps(t) {
1095
+ t.forEach((n) => this.addStep(n));
1086
1096
  }
1087
- removeStep(e) {
1088
- this._stepList = this._stepList.filter((n) => e !== n.id), this._stepMap.delete(e);
1097
+ removeStep(t) {
1098
+ this._stepList = this._stepList.filter((n) => t !== n.id), this._stepMap.delete(t);
1089
1099
  }
1090
1100
  start() {
1091
- this.isStarted = !0, this._popup = T("div", [this._config.classPrefix]), document.body.appendChild(this._popup), this._helperLayout = T("div", [`${this._config.classPrefix}-helper`]), document.body.appendChild(this._helperLayout), this.next();
1101
+ this.isStarted = !0, this._popup = E("div", [this._config.classPrefix]), document.body.appendChild(this._popup), this._config.highlight.disable || (this._highlight = E("div", [
1102
+ k(this._config.highlight.class) ? this._config.highlight.class : `${this._config.classPrefix}-highlight`
1103
+ ]), document.body.appendChild(this._highlight)), this.next();
1092
1104
  }
1093
1105
  complete() {
1094
- this.isStarted = !1, this._popup && document.body.removeChild(this._popup), this._helperLayout && document.body.removeChild(this._helperLayout), this._activeStep = null;
1106
+ this.isStarted = !1, this._popup && document.body.removeChild(this._popup), this._highlight && document.body.removeChild(this._highlight), this._activeStep = null;
1095
1107
  }
1096
1108
  prev() {
1097
- const e = B(this._activeStep) ? this._stepList.indexOf(this._activeStep) - 1 : this._stepList.indexOf(this._stepList[this._stepList.length - 1]);
1098
- if (e < 0) {
1109
+ const t = k(this._activeStep) ? this._stepList.indexOf(this._activeStep) - 1 : this._stepList.indexOf(this._stepList[this._stepList.length - 1]);
1110
+ if (t < 0) {
1099
1111
  this.complete();
1100
1112
  return;
1101
1113
  }
1102
- this._activeStep = this._stepList[e], this._activeStep.show();
1114
+ this._activeStep = this._stepList[t], this._activeStep.show("fromBack");
1103
1115
  }
1104
1116
  next() {
1105
- const e = B(this._activeStep) ? this._stepList.indexOf(this._activeStep) + 1 : this._stepList.indexOf(this._stepList[0]);
1106
- if (e >= this._stepList.length) {
1117
+ const t = k(this._activeStep) ? this._stepList.indexOf(this._activeStep) + 1 : this._stepList.indexOf(this._stepList[0]);
1118
+ if (t >= this._stepList.length) {
1107
1119
  this.complete();
1108
1120
  return;
1109
1121
  }
1110
- this._activeStep = this._stepList[e], this._activeStep.show();
1122
+ this._activeStep = this._stepList[t], this._activeStep.show("toNext");
1123
+ }
1124
+ setConfig(t) {
1125
+ this._config = L(L({}, this._config), t);
1111
1126
  }
1112
1127
  getBodyResizeObserver() {
1113
- const e = new ResizeObserver(() => {
1114
- !this.isStarted || !this._activeStep || (B(this._popup) && this.popupRenderer.updatePosition(this._popup, this._activeStep), B(this._helperLayout) && this.helperRenderer.updatePosition(this._helperLayout, this._activeStep));
1128
+ const t = new ResizeObserver(() => {
1129
+ !this.isStarted || !this._activeStep || (k(this._popup) && this.popupRenderer.updatePosition(this._popup, this._activeStep), k(this._highlight) && !this.config.highlight.disable && this.highlightRenderer.updatePosition(this._highlight, this._activeStep));
1115
1130
  });
1116
- return e.observe(document.body), e;
1131
+ return t.observe(document.body), t;
1117
1132
  }
1118
1133
  }
1119
1134
  export {
1120
1135
  $e as Tour,
1121
1136
  Te as TourStep,
1122
- T as createElement
1137
+ E as createElement
1123
1138
  };