@thisway/next
Advanced tools
Comparing version 0.12.0-beta.1 to 0.12.0-beta.2
1347
index.js
var Je = Object.defineProperty; | ||
var Qe = (e, t, o) => t in e ? Je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o; | ||
var J = (e, t, o) => (Qe(e, typeof t != "symbol" ? t + "" : t, o), o); | ||
var Qe = (o, t, e) => t in o ? Je(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e; | ||
var Q = (o, t, e) => (Qe(o, typeof t != "symbol" ? t + "" : t, e), e); | ||
import * as $e from "svelte"; | ||
import { onMount as to, onDestroy as Ce, createEventDispatcher as eo } from "svelte"; | ||
import { isValidNumber as Nt, toPx as nt, noop as xt, isElement as ke, isTextInputElement as xe, defaults as Qt, deltaTransform as Te, transformX as oo, transformY as ro, NOOP_TRANSFORM as so, pick$ as F, clamp as gt, finite as te, buildScrollHierarchy as no, getFrameElement as io, computeFrameScrollActions as ao, animationFrameThrottle as lo, observeElementBounding as co, reverseX as ee, reverseY as oe, transformDOMRect as po, transformNestedBounding as ho, getElementsBounding as fo, EMPTY_SIZE as uo, resizeObserver as wo } from "@thisway/utils"; | ||
import { get as I, writable as dt, derived as N, readable as Oe } from "svelte/store"; | ||
import { PRIMARY_COLOR_WHITE as Se, PRIMARY_COLOR_BLACK as Pe, PRIMARY_COLOR_BLUE as go, CLICK_MASK_ACTION_NEXT as _o, CLICK_MASK_ACTION_NONE as mo, EMPTY_POINT as Ee, isNoElement as it, COMPONENT_SLOT_POPOVER as vo, COMPONENT_SLOT_HIGHLIGHT as yo, POSITION_AUTO as Vt, ORIENTATIONS as re, ALIGNMENTS as bo, NO_ELEMENT as Ft, ORIENTATIONS_TO_START_END as se, popoverDefaultValues as $o, highlightDefaultValues as Co, LAYOUT_MODE_1 as kt, LAYOUT_MODE_3 as Ae } from "@thisway/base"; | ||
import { isValidNumber as Nt, toPx as nt, noop as _t, isElement as ke, isTextInputElement as xe, defaults as Qt, deltaTransform as Te, transformX as oo, transformY as ro, NOOP_TRANSFORM as so, pick$ as F, clamp as gt, finite as te, buildScrollHierarchy as no, getFrameElement as io, computeFrameScrollActions as ao, animationFrameThrottle as lo, observeElementBounding as co, reverseX as ee, reverseY as oe, transformDOMRect as po, transformNestedBounding as ho, getElementsBounding as fo, EMPTY_SIZE as uo, resizeObserver as wo } from "@thisway/utils"; | ||
import { get as N, writable as ut, derived as I, readable as Oe } from "svelte/store"; | ||
import { PRIMARY_COLOR_WHITE as Se, PRIMARY_COLOR_BLACK as Pe, PRIMARY_COLOR_BLUE as go, CLICK_MASK_ACTION_NEXT as _o, CLICK_MASK_ACTION_NONE as mo, EMPTY_POINT as Ee, isNoElement as it, COMPONENT_SLOT_POPOVER as vo, COMPONENT_SLOT_HIGHLIGHT as yo, POSITION_AUTO as Vt, ORIENTATIONS as re, ALIGNMENTS as bo, NO_ELEMENT as Ft, ORIENTATIONS_TO_START_END as se, popoverDefaultValues as $o, highlightDefaultValues as Co, LAYOUT_MODE_1 as xt, LAYOUT_MODE_3 as Ae } from "@thisway/base"; | ||
export * from "@thisway/base"; | ||
import { SvelteComponent as bt, init as $t, safe_not_equal as Ct, append_styles as Tt, svg_element as It, attr as k, set_style as B, insert as D, append as W, listen as Ot, noop as at, detach as R, component_subscribe as O, binding_callbacks as Ne, construct_svelte_component as At, element as X, create_component as ht, space as q, mount_component as ft, action_destroyer as Ie, group_outros as ot, transition_out as M, destroy_component as ut, check_outros as rt, transition_in as x, is_function as Me, run_all as ko, text as St, set_data as Pt, create_slot as _t, update_slot_base as mt, get_all_dirty_from_scope as vt, get_slot_changes as yt, compute_slots as xo, empty as Le } from "svelte/internal"; | ||
import { SvelteComponent as $t, init as Ct, safe_not_equal as kt, append_styles as Tt, svg_element as It, attr as k, set_style as H, insert as D, append as G, listen as Ot, noop as at, detach as R, component_subscribe as O, binding_callbacks as Ne, construct_svelte_component as At, element as q, create_component as pt, space as Z, mount_component as ht, action_destroyer as Ie, group_outros as rt, transition_out as L, destroy_component as ft, check_outros as st, transition_in as x, is_function as Me, run_all as ko, text as St, set_data as Pt, create_slot as mt, update_slot_base as vt, get_all_dirty_from_scope as yt, get_slot_changes as bt, compute_slots as xo, empty as Le } from "svelte/internal"; | ||
import "svelte/internal/disclose-version"; | ||
import { cubicOut as jt } from "svelte/easing"; | ||
import { tweened as Gt } from "svelte/motion"; | ||
function Z(e) { | ||
return Symbol(e); | ||
function z(o) { | ||
return Symbol(o); | ||
} | ||
function H(e) { | ||
const t = $e.getContext(e); | ||
function V(o) { | ||
const t = $e.getContext(o); | ||
if (!t) | ||
throw new Error(`Context ${e.description} not exist`); | ||
throw new Error(`Context ${o.description} not exist`); | ||
return t; | ||
} | ||
function Hr(e, t) { | ||
$e.setContext(e, t); | ||
function Hr(o, t) { | ||
$e.setContext(o, t); | ||
} | ||
const Be = (e) => new Map(e), Et = Z("Tour"), Wt = Z("Options"), To = Z("ElementBounding"), Yt = Z("PopoverContainer"), Oo = Z("PopoverSize"), Kt = Z("TotalStepCount"), Xt = Z("PopoverPosition"), Mt = Z("Delegate"), So = Z("ForeignView"), Ut = Z("HighlightBounding"), qt = Z("RenderState"), Lt = Z("StepOptions"); | ||
const Be = (o) => new Map(o), Et = z("Tour"), Wt = z("Options"), To = z("ElementBounding"), Yt = z("PopoverContainer"), Oo = z("PopoverSize"), Kt = z("TotalStepCount"), Xt = z("PopoverPosition"), Mt = z("Delegate"), So = z("ForeignView"), Ut = z("HighlightBounding"), qt = z("RenderState"), Lt = z("StepOptions"); | ||
class Po { | ||
constructor(t) { | ||
J(this, "store"); | ||
Q(this, "store"); | ||
this.store = t; | ||
@@ -38,3 +38,3 @@ } | ||
getAllSteps(t = !1) { | ||
return t ? I(this.store.steps$) : I(this.store.effectiveSteps$); | ||
return t ? N(this.store.steps$) : N(this.store.effectiveSteps$); | ||
} | ||
@@ -46,25 +46,29 @@ /** | ||
getActiveStep() { | ||
return { step: I(this.store.activeStep$), index: I(this.store.activeIndex$) }; | ||
return { step: N(this.store.activeStep$), index: N(this.store.activeIndex$) }; | ||
} | ||
getStepById(t) { | ||
const { steps$: o } = this.store; | ||
return I(o).find((r) => r.id === t); | ||
const { steps$: e } = this.store; | ||
return N(e).find((r) => r.id === t); | ||
} | ||
getStepIndex(t) { | ||
const { steps$: e } = this.store; | ||
return N(e).findIndex((r) => r.id === t); | ||
} | ||
goStep(t) { | ||
const { activeStepId$: o } = this.store; | ||
o.set(t); | ||
const { activeStepId$: e } = this.store; | ||
e.set(t); | ||
} | ||
getFirstStep() { | ||
const { effectiveSteps$: t } = this.store; | ||
return I(t)[0]; | ||
return N(t)[0]; | ||
} | ||
getLastStep() { | ||
const { effectiveSteps$: t } = this.store; | ||
return I(t).at(-1); | ||
return N(t).at(-1); | ||
} | ||
goPrevStep() { | ||
const { effectiveIndex$: t, effectiveSteps$: o } = this.store, r = I(t); | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, r = N(t); | ||
if (!Nt(r) || r < 1) | ||
return; | ||
const n = I(o)[r - 1]; | ||
const n = N(e)[r - 1]; | ||
this.goStep(n.id); | ||
@@ -88,6 +92,6 @@ } | ||
isActive() { | ||
return I(this.store.activeStep$) !== void 0; | ||
return N(this.store.activeStep$) !== void 0; | ||
} | ||
getNextStepId() { | ||
const { effectiveIndex$: t, effectiveSteps$: o } = this.store, r = I(t), n = I(o); | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, r = N(t), n = N(e); | ||
if (!(!Nt(r) || r === n.length - 1)) | ||
@@ -97,13 +101,13 @@ return n[r + 1].id; | ||
} | ||
function Dt([e, t]) { | ||
if (t == null || e.length === 0) | ||
function Dt([o, t]) { | ||
if (t == null || o.length === 0) | ||
return; | ||
const o = e.findIndex((r) => r.id === t); | ||
if (!(o < 0)) | ||
return o; | ||
const e = o.findIndex((r) => r.id === t); | ||
if (!(e < 0)) | ||
return e; | ||
} | ||
const Eo = (e, t) => { | ||
const o = dt(e), r = dt(t), n = N(o, (l) => l.filter((f) => !f.isHidden)), s = N([o, r], Dt), i = N([n, r], Dt), a = N([o, s], ([l, f]) => f != null ? l[f] : void 0); | ||
const Eo = (o, t) => { | ||
const e = ut(o), r = ut(t), n = I(e, (l) => l.filter((f) => !f.isHidden)), s = I([e, r], Dt), i = I([n, r], Dt), a = I([e, s], ([l, f]) => f != null ? l[f] : void 0); | ||
return { | ||
steps$: o, | ||
steps$: e, | ||
activeStepId$: r, | ||
@@ -116,32 +120,32 @@ effectiveSteps$: n, | ||
}; | ||
function He(e) { | ||
return e.container || document.body; | ||
function He(o) { | ||
return o.container || document.body; | ||
} | ||
const Bt = (e) => { | ||
const t = He(e), o = Math.min(t.clientWidth, window.innerWidth), r = Math.min(t.clientHeight, window.innerHeight); | ||
const Bt = (o) => { | ||
const t = He(o), e = Math.min(t.clientWidth, window.innerWidth), r = Math.min(t.clientHeight, window.innerHeight); | ||
return { | ||
width: o, | ||
width: e, | ||
height: r | ||
}; | ||
}, Ao = ({ x: e, y: t }) => Object.assign({ | ||
left: nt(e), | ||
}, Ao = ({ x: o, y: t }) => Object.assign({ | ||
left: nt(o), | ||
top: nt(t) | ||
}); | ||
function Ve(e) { | ||
for (const t of e) | ||
function Ve(o) { | ||
for (const t of o) | ||
try { | ||
t(); | ||
} catch (o) { | ||
console.error(o); | ||
} catch (e) { | ||
console.error(e); | ||
} | ||
} | ||
function Fe(e) { | ||
return !!e && "ownerDocument" in e; | ||
function Fe(o) { | ||
return !!o && "ownerDocument" in o; | ||
} | ||
function Rt(e, t) { | ||
e.signal.addEventListener("abort", t); | ||
function Rt(o, t) { | ||
o.signal.addEventListener("abort", t); | ||
} | ||
function No(e, t, o) { | ||
if (!e) | ||
return xt; | ||
function No(o, t, e) { | ||
if (!o) | ||
return _t; | ||
const r = { | ||
@@ -151,74 +155,74 @@ passive: !0, | ||
}; | ||
return e.addEventListener(t, o, r), () => { | ||
e.removeEventListener(t, o, r); | ||
return o.addEventListener(t, e, r), () => { | ||
o.removeEventListener(t, e, r); | ||
}; | ||
} | ||
function Io(e) { | ||
if (!(Fe(e.target) && ke(e.target) && xe(e.target))) { | ||
if (e.key === "ArrowRight") | ||
function Io(o) { | ||
if (!(Fe(o.target) && ke(o.target) && xe(o.target))) { | ||
if (o.key === "ArrowRight") | ||
return "next"; | ||
if (e.key === "ArrowLeft") | ||
if (o.key === "ArrowLeft") | ||
return "previous"; | ||
} | ||
} | ||
const De = (e, t = e) => e === Se ? Pe : t, Mo = (e, t, o) => { | ||
const r = Qt({ ...t }, e); | ||
return o ? Qt({ ...o }, r) : r; | ||
const De = (o, t = o) => o === Se ? Pe : t, Mo = (o, t, e) => { | ||
const r = Qt({ ...t }, o); | ||
return e ? Qt({ ...e }, r) : r; | ||
}, Re = () => { | ||
const { effectiveSteps$: e } = H(Et).store, t = H(qt); | ||
return N([e, t], ([o, { step: r }]) => Dt([o, r == null ? void 0 : r.id])); | ||
}, je = () => H(Lt).popover, Ge = () => H(Lt).highlight, Lo = (e) => { | ||
const t = (e == null ? void 0 : e.primaryColor) || go, o = (e == null ? void 0 : e.textColor) || De(t, Se), r = (e == null ? void 0 : e.descColor) || Pe; | ||
const { effectiveSteps$: o } = V(Et).store, t = V(qt); | ||
return I([o, t], ([e, { step: r }]) => Dt([e, r == null ? void 0 : r.id])); | ||
}, je = () => V(Lt).popover, Ge = () => V(Lt).highlight, Lo = (o) => { | ||
const t = (o == null ? void 0 : o.primaryColor) || go, e = (o == null ? void 0 : o.textColor) || De(t, Se), r = (o == null ? void 0 : o.descColor) || Pe; | ||
return { | ||
primaryColor: t, | ||
textColor: o, | ||
textColor: e, | ||
descColor: r | ||
}; | ||
}, We = () => H(Lt).theme, Ye = (e, t) => { | ||
const { effectiveSteps$: o } = e; | ||
return N([t, o], ([r, n]) => Nt(r) ? n.at(r + 1) : void 0); | ||
}, { assign: ne } = Object, Ke = (e, t) => (ne(e.style, t), { | ||
update(o) { | ||
ne(e.style, o); | ||
}, We = () => V(Lt).theme, Ye = (o, t) => { | ||
const { effectiveSteps$: e } = o; | ||
return I([t, e], ([r, n]) => Nt(r) ? n.at(r + 1) : void 0); | ||
}, { assign: ne } = Object, Ke = (o, t) => (ne(o.style, t), { | ||
update(e) { | ||
ne(o.style, e); | ||
} | ||
}); | ||
function Zt(e, t) { | ||
const o = Te(t), r = oo(e, 0, o), n = ro(0, e, o); | ||
function Zt(o, t) { | ||
const e = Te(t), r = oo(o, 0, e), n = ro(0, o, e); | ||
return [r, n]; | ||
} | ||
function Xe(e, t, o) { | ||
function Xe(o, t, e) { | ||
const { borderWidth: r, showBorder: n } = t; | ||
let [s, i] = Zt(e, o); | ||
let [s, i] = Zt(o, e); | ||
return n && (s += r, i += r), [s, i]; | ||
} | ||
const Bo = (e, t, o, r) => { | ||
const { x: n, y: s, padding: i } = e, { borderWidth: a } = t, [l, f] = Xe(i, t, r), p = a * 2, y = n - l + p, d = s - f, b = e.width + (l - p) * 2, C = e.height + (f - p) * 2, w = o.width, m = o.height; | ||
return `M${w},0L0,0L0,${m}L${w},${m}L${w},0ZM${y},${d}h${b}a${p},${p} 0 0 1 ${p},${p}v${C}a${p},${p} 0 0 1 -${p},${p}h-${b}a${p},${p} 0 0 1 -${p},-${p}v-${C}a${p},${p} 0 0 1 ${p},-${p}z`; | ||
const Bo = (o, t, e, r) => { | ||
const { x: n, y: s, padding: i } = o, { borderWidth: a } = t, [l, f] = Xe(i, t, r), p = a * 2, y = n - l + p, d = s - f, b = o.width + (l - p) * 2, C = o.height + (f - p) * 2, w = e.width, _ = e.height; | ||
return `M${w},0L0,0L0,${_}L${w},${_}L${w},0ZM${y},${d}h${b}a${p},${p} 0 0 1 ${p},${p}v${C}a${p},${p} 0 0 1 -${p},${p}h-${b}a${p},${p} 0 0 1 -${p},-${p}v-${C}a${p},${p} 0 0 1 ${p},-${p}z`; | ||
}, zt = Oe(so); | ||
function Ho(e) { | ||
Tt(e, "svelte-1j2k49x", ".thisway-mask{position:absolute;top:0;right:0;bottom:0;left:0;display:block}.thisway-mask path{pointer-events:auto}"); | ||
function Ho(o) { | ||
Tt(o, "svelte-1j2k49x", ".thisway-mask{position:absolute;top:0;right:0;bottom:0;left:0;display:block}.thisway-mask path{pointer-events:auto}"); | ||
} | ||
function Vo(e) { | ||
let t, o, r, n, s; | ||
function Vo(o) { | ||
let t, e, r, n, s; | ||
return { | ||
c() { | ||
t = It("svg"), o = It("path"), k( | ||
o, | ||
t = It("svg"), e = It("path"), k( | ||
e, | ||
"d", | ||
/*$maskCommand$*/ | ||
e[2] | ||
), B(o, "fill", "black"), B( | ||
o, | ||
o[2] | ||
), H(e, "fill", "black"), H( | ||
e, | ||
"opacity", | ||
/*$opacity$*/ | ||
e[3] | ||
o[3] | ||
), k(t, "class", "thisway-mask"), k(t, "role", "presentation"), k(t, "width", "100%"), k(t, "height", "100%"), k(t, "display", r = /*$showMask$*/ | ||
e[0] ? "block" : "none"); | ||
o[0] ? "block" : "none"); | ||
}, | ||
m(i, a) { | ||
D(i, t, a), W(t, o), e[9](t), n || (s = Ot( | ||
D(i, t, a), G(t, e), o[9](t), n || (s = Ot( | ||
t, | ||
"click", | ||
/*onMaskClick*/ | ||
e[8] | ||
o[8] | ||
), n = !0); | ||
@@ -229,3 +233,3 @@ }, | ||
4 && k( | ||
o, | ||
e, | ||
"d", | ||
@@ -235,4 +239,4 @@ /*$maskCommand$*/ | ||
), a & /*$opacity$*/ | ||
8 && B( | ||
o, | ||
8 && H( | ||
e, | ||
"opacity", | ||
@@ -248,25 +252,25 @@ /*$opacity$*/ | ||
d(i) { | ||
i && R(t), e[9](null), n = !1, s(); | ||
i && R(t), o[9](null), n = !1, s(); | ||
} | ||
}; | ||
} | ||
function Fo(e, t, o) { | ||
function Fo(o, t, e) { | ||
let r, n, s, i; | ||
const a = H(Et), l = H(Mt), f = H(Ut), p = Ge(), y = F(p, "showMask"); | ||
O(e, y, (c) => o(0, r = c)); | ||
const a = V(Et), l = V(Mt), f = V(Ut), p = Ge(), y = F(p, "showMask"); | ||
O(o, y, (c) => e(0, r = c)); | ||
const d = F(p, "maskOpacity"); | ||
O(e, d, (c) => o(3, i = c)); | ||
O(o, d, (c) => e(3, i = c)); | ||
const b = l.transform$ ?? zt; | ||
let C = dt(); | ||
O(e, C, (c) => o(1, n = c)); | ||
const w = N([f, y, C, p], ([c, h, g, P], E) => { | ||
let C = ut(); | ||
O(o, C, (c) => e(1, n = c)); | ||
const w = I([f, y, C, p], ([c, h, g, P], E) => { | ||
if (!c || !h || !g) | ||
return; | ||
const Y = Bo(c, P, Bt(l), I(b)); | ||
E(Y); | ||
const W = Bo(c, P, Bt(l), N(b)); | ||
E(W); | ||
}); | ||
O(e, w, (c) => o(2, s = c)); | ||
function m() { | ||
O(o, w, (c) => e(2, s = c)); | ||
function _() { | ||
var h; | ||
switch ((h = I(p)) == null ? void 0 : h.clickMask) { | ||
switch ((h = N(p)) == null ? void 0 : h.clickMask) { | ||
case mo: | ||
@@ -298,20 +302,20 @@ break; | ||
w, | ||
m, | ||
_, | ||
$ | ||
]; | ||
} | ||
class Do extends bt { | ||
class Do extends $t { | ||
constructor(t) { | ||
super(), $t(this, t, Fo, Vo, Ct, {}, Ho); | ||
super(), Ct(this, t, Fo, Vo, kt, {}, Ho); | ||
} | ||
} | ||
function Ro(e) { | ||
Tt(e, "svelte-1cl9mhv", ".thisway{--thisway-default-shadow:0 1px 10px rgba(0, 0, 0, 0.4);width:100%;height:100%;top:0;right:0;bottom:0;left:0;max-width:100%;max-height:100%;pointer-events:none}.thisway-popover__container{position:absolute;pointer-events:auto}"); | ||
function Ro(o) { | ||
Tt(o, "svelte-1cl9mhv", ".thisway{--thisway-default-shadow:0 1px 10px rgba(0, 0, 0, 0.4);width:100%;height:100%;top:0;right:0;bottom:0;left:0;max-width:100%;max-height:100%;pointer-events:none}.thisway-popover__container{position:absolute;pointer-events:auto}"); | ||
} | ||
function jo(e) { | ||
let t, o, r, n, s, i, a, l, f, p, y, d, b; | ||
o = new Do({}); | ||
function jo(o) { | ||
let t, e, r, n, s, i, a, l, f, p, y, d, b; | ||
e = new Do({}); | ||
var C = ( | ||
/*$highlightComponent$*/ | ||
e[6] | ||
o[6] | ||
); | ||
@@ -322,5 +326,5 @@ function w(c, h) { | ||
C && (n = At(C, w())); | ||
var m = ( | ||
var _ = ( | ||
/*$popoverComponent$*/ | ||
e[9] | ||
o[9] | ||
); | ||
@@ -330,52 +334,52 @@ function $(c, h) { | ||
} | ||
return m && (a = At(m, $()), a.$on( | ||
return _ && (a = At(_, $()), a.$on( | ||
"close", | ||
/*onClose*/ | ||
e[20] | ||
o[20] | ||
), a.$on( | ||
"previous", | ||
/*onPrev*/ | ||
e[18] | ||
o[18] | ||
), a.$on( | ||
"next", | ||
/*onNext*/ | ||
e[19] | ||
o[19] | ||
)), { | ||
c() { | ||
t = X("div"), ht(o.$$.fragment), r = q(), n && ht(n.$$.fragment), s = q(), i = X("div"), a && ht(a.$$.fragment), k(i, "class", l = "thisway-popover__container " + /*$popoverClassName$*/ | ||
e[7]), k(t, "class", p = "thisway " + /*$className$*/ | ||
e[2]), B( | ||
t = q("div"), pt(e.$$.fragment), r = Z(), n && pt(n.$$.fragment), s = Z(), i = q("div"), a && pt(a.$$.fragment), k(i, "class", l = "thisway-popover__container " + /*$popoverClassName$*/ | ||
o[7]), k(t, "class", p = "thisway " + /*$className$*/ | ||
o[2]), H( | ||
t, | ||
"position", | ||
/*position*/ | ||
e[0] | ||
), B( | ||
o[0] | ||
), H( | ||
t, | ||
"display", | ||
/*$step$*/ | ||
e[3] ? "block" : "none" | ||
), B( | ||
o[3] ? "block" : "none" | ||
), H( | ||
t, | ||
"z-index", | ||
/*$zIndex$*/ | ||
e[4] | ||
), B( | ||
o[4] | ||
), H( | ||
t, | ||
"--thisway-color-primary", | ||
/*$theme$*/ | ||
e[5].primaryColor | ||
), B( | ||
o[5].primaryColor | ||
), H( | ||
t, | ||
"--thisway-color-text", | ||
/*$theme$*/ | ||
e[5].textColor | ||
), B( | ||
o[5].textColor | ||
), H( | ||
t, | ||
"--thisway-color-desc", | ||
/*$theme$*/ | ||
e[5].descColor | ||
o[5].descColor | ||
); | ||
}, | ||
m(c, h) { | ||
D(c, t, h), ft(o, t, null), W(t, r), n && ft(n, t, null), W(t, s), W(t, i), a && ft(a, i, null), e[22](i), y = !0, d || (b = [ | ||
D(c, t, h), ht(e, t, null), G(t, r), n && ht(n, t, null), G(t, s), G(t, i), a && ht(a, i, null), o[22](i), y = !0, d || (b = [ | ||
Ot( | ||
@@ -385,3 +389,3 @@ window, | ||
/*handleKeydown*/ | ||
e[21] | ||
o[21] | ||
), | ||
@@ -392,3 +396,3 @@ Ie(f = Ke.call( | ||
/*$popoverStyle$*/ | ||
e[8] | ||
o[8] | ||
)) | ||
@@ -402,21 +406,21 @@ ], d = !0); | ||
if (n) { | ||
ot(); | ||
rt(); | ||
const g = n; | ||
M(g.$$.fragment, 1, 0, () => { | ||
ut(g, 1); | ||
}), rt(); | ||
L(g.$$.fragment, 1, 0, () => { | ||
ft(g, 1); | ||
}), st(); | ||
} | ||
C ? (n = At(C, w()), ht(n.$$.fragment), x(n.$$.fragment, 1), ft(n, t, s)) : n = null; | ||
C ? (n = At(C, w()), pt(n.$$.fragment), x(n.$$.fragment, 1), ht(n, t, s)) : n = null; | ||
} | ||
if (h[0] & /*$popoverComponent$*/ | ||
512 && m !== (m = /*$popoverComponent$*/ | ||
512 && _ !== (_ = /*$popoverComponent$*/ | ||
c[9])) { | ||
if (a) { | ||
ot(); | ||
rt(); | ||
const g = a; | ||
M(g.$$.fragment, 1, 0, () => { | ||
ut(g, 1); | ||
}), rt(); | ||
L(g.$$.fragment, 1, 0, () => { | ||
ft(g, 1); | ||
}), st(); | ||
} | ||
m ? (a = At(m, $()), a.$on( | ||
_ ? (a = At(_, $()), a.$on( | ||
"close", | ||
@@ -433,3 +437,3 @@ /*onClose*/ | ||
c[19] | ||
), ht(a.$$.fragment), x(a.$$.fragment, 1), ft(a, i, null)) : a = null; | ||
), pt(a.$$.fragment), x(a.$$.fragment, 1), ht(a, i, null)) : a = null; | ||
} | ||
@@ -446,3 +450,3 @@ (!y || h[0] & /*$popoverClassName$*/ | ||
c[2])) && k(t, "class", p), h[0] & /*position*/ | ||
1 && B( | ||
1 && H( | ||
t, | ||
@@ -453,3 +457,3 @@ "position", | ||
), h[0] & /*$step$*/ | ||
8 && B( | ||
8 && H( | ||
t, | ||
@@ -460,3 +464,3 @@ "display", | ||
), h[0] & /*$zIndex$*/ | ||
16 && B( | ||
16 && H( | ||
t, | ||
@@ -467,3 +471,3 @@ "z-index", | ||
), h[0] & /*$theme$*/ | ||
32 && B( | ||
32 && H( | ||
t, | ||
@@ -474,3 +478,3 @@ "--thisway-color-primary", | ||
), h[0] & /*$theme$*/ | ||
32 && B( | ||
32 && H( | ||
t, | ||
@@ -481,3 +485,3 @@ "--thisway-color-text", | ||
), h[0] & /*$theme$*/ | ||
32 && B( | ||
32 && H( | ||
t, | ||
@@ -490,75 +494,80 @@ "--thisway-color-desc", | ||
i(c) { | ||
y || (x(o.$$.fragment, c), n && x(n.$$.fragment, c), a && x(a.$$.fragment, c), y = !0); | ||
y || (x(e.$$.fragment, c), n && x(n.$$.fragment, c), a && x(a.$$.fragment, c), y = !0); | ||
}, | ||
o(c) { | ||
M(o.$$.fragment, c), n && M(n.$$.fragment, c), a && M(a.$$.fragment, c), y = !1; | ||
L(e.$$.fragment, c), n && L(n.$$.fragment, c), a && L(a.$$.fragment, c), y = !1; | ||
}, | ||
d(c) { | ||
c && R(t), ut(o), n && ut(n), a && ut(a), e[22](null), d = !1, ko(b); | ||
c && R(t), ft(e), n && ft(n), a && ft(a), o[22](null), d = !1, ko(b); | ||
} | ||
}; | ||
} | ||
function Go(e, t, o) { | ||
function Go(o, t, e) { | ||
let r, n, s, i, a, l, f, p, { position: y = "fixed" } = t, d; | ||
const b = H(Wt), C = H(Yt), w = H(Mt), m = je(), $ = H(qt), c = F($, "step"); | ||
O(e, c, (_) => o(3, n = _)); | ||
function h(_) { | ||
return N([c, b], ([V, et]) => { | ||
if (V) | ||
return w.getComponent(_, V, et); | ||
const b = V(Wt), C = V(Yt), w = V(Mt), _ = je(), $ = V(qt), c = F($, "step"); | ||
O(o, c, (m) => e(3, n = m)); | ||
function h(m) { | ||
return I([c, b], ([X, U]) => { | ||
if (X) | ||
return w.getComponent(m, X, U); | ||
}); | ||
} | ||
const g = h(vo); | ||
O(e, g, (_) => o(9, p = _)); | ||
O(o, g, (m) => e(9, p = m)); | ||
const P = h(yo); | ||
O(e, P, (_) => o(6, a = _)); | ||
O(o, P, (m) => e(6, a = m)); | ||
const E = F(b, "zIndex", 1e4); | ||
O(e, E, (_) => o(4, s = _)); | ||
const Y = F(b, "className", ""); | ||
O(e, Y, (_) => o(2, r = _)); | ||
const L = F(m, "className", ""); | ||
O(e, L, (_) => o(7, l = _)); | ||
const A = H(Xt); | ||
let S; | ||
const u = N( | ||
O(o, E, (m) => e(4, s = m)); | ||
const W = F(b, "className", ""); | ||
O(o, W, (m) => e(2, r = m)); | ||
const B = F(_, "className", ""); | ||
O(o, B, (m) => e(7, l = m)); | ||
const A = V(Xt); | ||
let S, u; | ||
const T = I( | ||
A, | ||
(_, V) => { | ||
if (!_) { | ||
V(Ee); | ||
return; | ||
(m, X) => { | ||
if (!m) | ||
return X(Ee), _t; | ||
const U = u ? N(u) : void 0; | ||
let M; | ||
if (w.transition && (M = w.transition(m, S, U)), !M) { | ||
if (!U) { | ||
X(m.position); | ||
return; | ||
} | ||
M = Gt(U, { duration: 300, easing: jt }), M.set(m.position); | ||
} | ||
const et = I(u); | ||
let G; | ||
return w.transition ? G = w.transition(_, S, et) : (G = Gt(et, { duration: 300, easing: jt }), G.set(_.position)), S = _, G.subscribe(V); | ||
return S = m, u = M, M.subscribe(X); | ||
}, | ||
void 0 | ||
), T = N(u, (_) => _ ? Ao(_) : { visibility: "hidden" }); | ||
O(e, T, (_) => o(8, f = _)); | ||
const lt = We(); | ||
O(e, lt, (_) => o(5, i = _)); | ||
const st = H(Et), { onPrev: ct, onNext: pt, onClose: K } = st, j = (_) => { | ||
if (!st.isActive() || I(b).keyboardControl === !1) | ||
), lt = I(T, (m) => m ? Ao(m) : { visibility: "hidden" }); | ||
O(o, lt, (m) => e(8, f = m)); | ||
const ct = We(); | ||
O(o, ct, (m) => e(5, i = m)); | ||
const ot = V(Et), { onPrev: dt, onNext: Y, onClose: j } = ot, tt = (m) => { | ||
if (!ot.isActive() || N(b).keyboardControl === !1) | ||
return; | ||
const V = w.onKeydown ? w.onKeydown(_) : Io(_); | ||
st.applyAction(V); | ||
}, Q = N($, ({ element: _ }, V) => { | ||
if (!_ || it(_) || I(b).interactive === !1 || I(m).position === "SCREEN") | ||
return xt; | ||
const et = _.ownerDocument.defaultView; | ||
return No(et, "click", (G) => { | ||
V(G), !(G.target === document.body || !Fe(G.target) || !ke(G.target) || xe(G.target) || !_.contains(G.target)) && pt(); | ||
const X = w.onKeydown ? w.onKeydown(m) : Io(m); | ||
ot.applyAction(X); | ||
}, et = I($, ({ element: m }, X) => { | ||
if (!m || it(m) || N(b).interactive === !1 || N(_).position === "SCREEN") | ||
return _t; | ||
const U = m.ownerDocument.defaultView; | ||
return No(U, "click", (M) => { | ||
X(M), !(M.target === document.body || !Fe(M.target) || !ke(M.target) || xe(M.target) || !m.contains(M.target)) && Y(); | ||
}); | ||
}).subscribe(xt); | ||
}).subscribe(_t); | ||
to(() => { | ||
C.set(d); | ||
}), Ce(() => { | ||
C.set(void 0), Q(); | ||
C.set(void 0), et(); | ||
}); | ||
function tt(_) { | ||
Ne[_ ? "unshift" : "push"](() => { | ||
d = _, o(1, d); | ||
function K(m) { | ||
Ne[m ? "unshift" : "push"](() => { | ||
d = m, e(1, d); | ||
}); | ||
} | ||
return e.$$set = (_) => { | ||
"position" in _ && o(0, y = _.position); | ||
return o.$$set = (m) => { | ||
"position" in m && e(0, y = m.position); | ||
}, [ | ||
@@ -579,37 +588,37 @@ y, | ||
E, | ||
Y, | ||
L, | ||
T, | ||
W, | ||
B, | ||
lt, | ||
ct, | ||
pt, | ||
K, | ||
dt, | ||
Y, | ||
j, | ||
tt | ||
tt, | ||
K | ||
]; | ||
} | ||
class Wo extends bt { | ||
class Wo extends $t { | ||
constructor(t) { | ||
super(), $t(this, t, Go, jo, Ct, { position: 0 }, Ro, [-1, -1]); | ||
super(), Ct(this, t, Go, jo, kt, { position: 0 }, Ro, [-1, -1]); | ||
} | ||
} | ||
const ie = 0.05; | ||
function Ue(e, t, o, r, n, s) { | ||
const i = t.x + t.width, a = t.y + t.height, f = t.y - o.height - n >= 0, y = s.height - (a + o.height) - n >= 0, b = t.x - o.width - r >= 0, w = s.width - (i + o.width) - r >= 0; | ||
if (e === "BOTTOM" && y) | ||
function Ue(o, t, e, r, n, s) { | ||
const i = t.x + t.width, a = t.y + t.height, f = t.y - e.height - n >= 0, y = s.height - (a + e.height) - n >= 0, b = t.x - e.width - r >= 0, w = s.width - (i + e.width) - r >= 0; | ||
if (o === "BOTTOM" && y) | ||
return "BOTTOM"; | ||
if (e === "LEFT" && b) | ||
if (o === "LEFT" && b) | ||
return "LEFT"; | ||
if (e === "TOP" && f) | ||
if (o === "TOP" && f) | ||
return "TOP"; | ||
if (e === "RIGHT" && w) | ||
if (o === "RIGHT" && w) | ||
return "RIGHT"; | ||
const m = s.width * ie, $ = s.height * ie; | ||
const _ = s.width * ie, $ = s.height * ie; | ||
if (t.y < $ && y) | ||
return "BOTTOM"; | ||
if (s.width - i < m && b) | ||
if (s.width - i < _ && b) | ||
return "LEFT"; | ||
if (s.height - a < $ && f) | ||
return "TOP"; | ||
if (t.x < m && w) | ||
if (t.x < _ && w) | ||
return "RIGHT"; | ||
@@ -625,14 +634,14 @@ if (y) | ||
} | ||
function Yo(...e) { | ||
const t = e[0]; | ||
return t === "SCREEN" || t === "OVER" ? t : Ue(...e) ?? "OVER"; | ||
function Yo(...o) { | ||
const t = o[0]; | ||
return t === "SCREEN" || t === "OVER" ? t : Ue(...o) ?? "OVER"; | ||
} | ||
const qe = (e) => { | ||
if (!e || e === Vt) | ||
const qe = (o) => { | ||
if (!o || o === Vt) | ||
return [Vt, void 0]; | ||
if (Array.isArray(e)) | ||
return e; | ||
const t = e.split("_"); | ||
if (Array.isArray(o)) | ||
return o; | ||
const t = o.split("_"); | ||
return t.length === 1 && re.includes(t[0]) ? [t[0], "CENTER"] : t.length === 2 && re.includes(t[0]) && bo.includes(t[1]) ? t : [Vt, void 0]; | ||
}, Ko = (e, t, o, r) => e < o ? o - e : t > r ? t - r : 0, ae = (e = "CENTER", t, o, r, n, s) => { | ||
}, Ko = (o, t, e, r) => o < e ? e - o : t > r ? t - r : 0, ae = (o = "CENTER", t, e, r, n, s) => { | ||
if (!r) | ||
@@ -642,4 +651,4 @@ return { adjustAlignment: "CENTER", value: 0 }; | ||
START: t - s, | ||
CENTER: (t + o - r) / 2, | ||
END: o - r + s | ||
CENTER: (t + e - r) / 2, | ||
END: e - r + s | ||
}, l = ((f, p, y) => { | ||
@@ -655,8 +664,8 @@ let d; | ||
return { | ||
adjustAlignment: (d == null ? void 0 : d.adjustAlignment) || e, | ||
value: i[(d == null ? void 0 : d.adjustAlignment) || e], | ||
adjustAlignment: (d == null ? void 0 : d.adjustAlignment) || o, | ||
value: i[(d == null ? void 0 : d.adjustAlignment) || o], | ||
overflowPx: d == null ? void 0 : d.overflowPx | ||
}; | ||
})( | ||
[e, ...["CENTER", "START", "END"].filter((f) => f !== e)], | ||
[o, ...["CENTER", "START", "END"].filter((f) => f !== o)], | ||
0, | ||
@@ -670,3 +679,3 @@ n | ||
return l; | ||
}, Xo = (e, t, o, r, n, s, i, a) => { | ||
}, Xo = (o, t, e, r, n, s, i, a) => { | ||
const l = { | ||
@@ -676,9 +685,9 @@ ...Ee | ||
let f, p, y; | ||
if (!o || it(o) || e === "SCREEN") | ||
if (!e || it(e) || o === "SCREEN") | ||
p = (s.height - r.height) / 2, y = (s.width - r.width) / 2; | ||
else { | ||
const d = o.x + o.width, b = o.y + o.height, C = s.height - r.height, w = s.width - r.width, m = () => { | ||
const d = e.x + e.width, b = e.y + e.height, C = s.height - r.height, w = s.width - r.width, _ = () => { | ||
const c = ae( | ||
t, | ||
o.x, | ||
e.x, | ||
d, | ||
@@ -693,3 +702,3 @@ r.width, | ||
t, | ||
o.y, | ||
e.y, | ||
b, | ||
@@ -702,17 +711,17 @@ r.height, | ||
}; | ||
switch (e) { | ||
switch (o) { | ||
case "OVER": { | ||
p = o.y + (o.height - r.height) / 2, y = o.x + (o.width - r.width) / 2; | ||
p = e.y + (e.height - r.height) / 2, y = e.x + (e.width - r.width) / 2; | ||
break; | ||
} | ||
case "TOP": { | ||
p = gt(o.y - r.height - a, 0, C), m(); | ||
p = gt(e.y - r.height - a, 0, C), _(); | ||
break; | ||
} | ||
case "BOTTOM": { | ||
p = gt(b + a, n, C), m(); | ||
p = gt(b + a, n, C), _(); | ||
break; | ||
} | ||
case "LEFT": { | ||
y = gt(o.x - r.width - i, 0, w), $(); | ||
y = gt(e.x - r.width - i, 0, w), $(); | ||
break; | ||
@@ -727,10 +736,10 @@ } | ||
return l.x = te(y), l.y = te(p), { position: l, alignment: f || "CENTER" }; | ||
}, Uo = (e, t) => { | ||
let o, r; | ||
}, Uo = (o, t) => { | ||
let e, r; | ||
return ({ step: n }, s, i, a) => { | ||
if (i.width === 0 || i.height === 0 || !s) | ||
return; | ||
const l = I(t.popover), f = l.offset, p = qe(l.position), y = I(t.highlight), { padding: d, borderWidth: b } = y, C = n == null ? void 0 : n.id, w = p[0], m = p[1], $ = Bt(e), [c, h] = Zt(d, a), g = c + f + b, P = h + f + b, E = it(s) ? "SCREEN" : Yo(w, s, i, g, P, $), { position: Y, alignment: L } = Xo( | ||
const l = N(t.popover), f = l.offset, p = qe(l.position), y = N(t.highlight), { padding: d, borderWidth: b } = y, C = n == null ? void 0 : n.id, w = p[0], _ = p[1], $ = Bt(o), [c, h] = Zt(d, a), g = c + f + b, P = h + f + b, E = it(s) ? "SCREEN" : Yo(w, s, i, g, P, $), { position: W, alignment: B } = Xo( | ||
E, | ||
m === o ? r : m, | ||
_ === e ? r : _, | ||
s, | ||
@@ -743,19 +752,21 @@ i, | ||
); | ||
return o = m, r = L, { | ||
return e = _, r = B, { | ||
orientation: E, | ||
alignment: L, | ||
alignment: B, | ||
stepId: C, | ||
preferredOrientation: w, | ||
preferredAlignment: m, | ||
position: Y | ||
preferredAlignment: _, | ||
position: W, | ||
popoverSize: i, | ||
viewportSize: $ | ||
}; | ||
}; | ||
}; | ||
async function qo(e, t) { | ||
e.length !== 0 && await Promise.all( | ||
e.map(({ el: o, top: r, left: n }) => o.scrollTop == r && o.scrollLeft == n ? Promise.resolve() : new Promise((s) => { | ||
const i = Math.max(Math.abs(r - o.scrollTop), Math.abs(n - o.scrollLeft)), a = Gt( | ||
async function qo(o, t) { | ||
o.length !== 0 && await Promise.all( | ||
o.map(({ el: e, top: r, left: n }) => e.scrollTop == r && e.scrollLeft == n ? Promise.resolve() : new Promise((s) => { | ||
const i = Math.max(Math.abs(r - e.scrollTop), Math.abs(n - e.scrollLeft)), a = Gt( | ||
{ | ||
x: o.scrollLeft, | ||
y: o.scrollTop | ||
x: e.scrollLeft, | ||
y: e.scrollTop | ||
}, | ||
@@ -768,3 +779,3 @@ { | ||
), l = a.subscribe(({ x: p, y }) => { | ||
o.scrollLeft = p, o.scrollTop = y, p === n && y === r && f(); | ||
e.scrollLeft = p, e.scrollTop = y, p === n && y === r && f(); | ||
}); | ||
@@ -781,9 +792,9 @@ function f() { | ||
} | ||
function Zo(e, t, o, r, n) { | ||
const s = o.transform$ ?? zt; | ||
function Zo(o, t, e, r, n) { | ||
const s = e.transform$ ?? zt; | ||
let i; | ||
const a = F(r.popover, "position"), l = dt(void 0), f = Uo(o, r); | ||
const a = F(r.popover, "position"), l = ut(void 0), f = Uo(e, r); | ||
return { | ||
elementBounding$: N( | ||
[e, t, s, a], | ||
elementBounding$: I( | ||
[o, t, s, a], | ||
([ | ||
@@ -795,5 +806,5 @@ y, | ||
], C) => { | ||
const { element: w, step: m } = y; | ||
if (!w || !m) | ||
return xt; | ||
const { element: w, step: _ } = y; | ||
if (!w || !_) | ||
return _t; | ||
const $ = new AbortController(); | ||
@@ -812,47 +823,47 @@ return c().then((h) => { | ||
let h = [], g = []; | ||
const P = !w || it(w) ? [] : m != null && m.onlyHighlightChildren ? ( | ||
const P = !w || it(w) ? [] : _ != null && _.onlyHighlightChildren ? ( | ||
// eslint-disable-next-line unicorn/prefer-spread | ||
Array.from(w.children) | ||
) : [w], { highlight: E, popover: Y } = r, L = I(E), A = I(Y), S = qe(A.position), u = S[0], T = S[1], [lt, st] = Xe(L.padding, L, b), ct = () => po(ho(fo(P), g), b); | ||
) : [w], { highlight: E, popover: W } = r, B = N(E), A = N(W), S = qe(A.position), u = S[0], T = S[1], [lt, ct] = Xe(B.padding, B, b), ot = () => po(ho(fo(P), g), b); | ||
if (w && !it(w)) { | ||
[h, g] = no(w, !0, io(o.window)); | ||
const K = pt(), j = ao(h, g, w, K); | ||
[h, g] = no(w, !0, io(e.window)); | ||
const Y = dt(), j = ao(h, g, w, Y); | ||
await qo(j, $); | ||
} | ||
return Oe(i, (K) => { | ||
return Oe(i, (Y) => { | ||
if (!w) | ||
return; | ||
let j; | ||
const Q = lo(() => { | ||
const tt = lo(() => { | ||
if ($.signal.aborted) | ||
return; | ||
if (it(w)) { | ||
j = void 0, K(Ft); | ||
j = void 0, Y(Ft); | ||
return; | ||
} | ||
const _ = ct(), V = _.width === 0 || _.height === 0; | ||
j && _.width === j.width && _.height === j.height && (V || _.x === j.x && _.y === j.y) || (j = _, K(V ? Ft : _)); | ||
}), tt = [ | ||
co(P, g, Q), | ||
n.subscribe(Q) | ||
const K = ot(), m = K.width === 0 || K.height === 0; | ||
j && K.width === j.width && K.height === j.height && (m || K.x === j.x && K.y === j.y) || (j = K, Y(m ? Ft : K)); | ||
}), et = [ | ||
co(P, g, tt), | ||
n.subscribe(tt) | ||
]; | ||
Q(), Rt($, () => { | ||
Ve(tt); | ||
tt(), Rt($, () => { | ||
Ve(et); | ||
}); | ||
}); | ||
function pt() { | ||
const K = (m == null ? void 0 : m.scrollOffset) || {}, j = Ue( | ||
function dt() { | ||
const Y = (_ == null ? void 0 : _.scrollOffset) || {}, j = Ue( | ||
u, | ||
ct(), | ||
ot(), | ||
d, | ||
lt, | ||
st, | ||
Bt(o) | ||
), Q = j ? "if-needed" : "always", tt = j ? se[j] : se[u], _ = T ? T.toLocaleLowerCase() : "nearest", { padding: V, borderWidth: et } = L, G = (A.offset < 10 ? 10 : A.offset) + et, U = { | ||
left: G + (K.left || 0), | ||
right: G + (K.right || 0), | ||
top: G + (K.top || 0), | ||
bottom: G + (K.bottom || 0) | ||
ct, | ||
Bt(e) | ||
), tt = j ? "if-needed" : "always", et = j ? se[j] : se[u], K = T ? T.toLocaleLowerCase() : "nearest", { padding: m, borderWidth: X } = B, U = (A.offset < 10 ? 10 : A.offset) + X, M = { | ||
left: U + (Y.left || 0), | ||
right: U + (Y.right || 0), | ||
top: U + (Y.top || 0), | ||
bottom: U + (Y.bottom || 0) | ||
}; | ||
let v = "nearest", z = "nearest"; | ||
let v = "nearest", J = "nearest"; | ||
switch (u) { | ||
@@ -862,5 +873,5 @@ case "AUTO": | ||
case "BOTTOM": { | ||
v = tt, z = _; | ||
v = et, J = K; | ||
const Ht = u === "AUTO" ? "bottom" : u.toLowerCase(); | ||
U[Ht] += (d == null ? void 0 : d.height) || 0; | ||
M[Ht] += (d == null ? void 0 : d.height) || 0; | ||
break; | ||
@@ -870,3 +881,3 @@ } | ||
case "RIGHT": { | ||
v = _, z = tt, U[u.toLowerCase()] += (d == null ? void 0 : d.width) || 0; | ||
v = K, J = et, M[u.toLowerCase()] += (d == null ? void 0 : d.width) || 0; | ||
break; | ||
@@ -876,7 +887,7 @@ } | ||
const wt = Te(b); | ||
return U.left = ee(U.left, 0, wt) + V, U.right = ee(U.right, 0, wt) + V, U.top = oe(0, U.top, wt) + V, U.bottom = oe(0, U.bottom, wt) + V, { | ||
scrollMode: Q, | ||
return M.left = ee(M.left, 0, wt) + m, M.right = ee(M.right, 0, wt) + m, M.top = oe(0, M.top, wt) + m, M.bottom = oe(0, M.bottom, wt) + m, { | ||
scrollMode: tt, | ||
block: v, | ||
inline: z, | ||
offset: U | ||
inline: J, | ||
offset: M | ||
}; | ||
@@ -890,5 +901,5 @@ } | ||
} | ||
function zo(e, t, o) { | ||
function zo(o, t, e) { | ||
let r; | ||
return N([e, o.highlight], ([n, { padding: s }], i) => { | ||
return I([o, e.highlight], ([n, { padding: s }], i) => { | ||
const a = { | ||
@@ -902,3 +913,3 @@ x: 0, | ||
if (!n || it(n)) { | ||
const f = Bt(t), p = r ? I(r) : { | ||
const f = Bt(t), p = r ? N(r) : { | ||
x: f.width / 2, | ||
@@ -931,9 +942,9 @@ y: f.height / 2, | ||
} | ||
const Jo = (e, t) => { | ||
let o; | ||
const { activeStep$: r, activeIndex$: n } = e; | ||
return N( | ||
const Jo = (o, t) => { | ||
let e; | ||
const { activeStep$: r, activeIndex$: n } = o; | ||
return I( | ||
r, | ||
(s, i) => { | ||
const a = I(n); | ||
const a = N(n); | ||
if (!s || !Nt(a)) | ||
@@ -952,5 +963,5 @@ return; | ||
index: a | ||
}), t.afterStepChanged && t.afterStepChanged(s.id, o == null ? void 0 : o.id)); | ||
}), t.afterStepChanged && t.afterStepChanged(s.id, e == null ? void 0 : e.id)); | ||
}), () => { | ||
o = s, l.abort(); | ||
e = s, l.abort(); | ||
}; | ||
@@ -964,24 +975,24 @@ }, | ||
); | ||
}, Qo = (e) => N(e, (t, o) => t ? wo(t, () => { | ||
o(t.getBoundingClientRect()); | ||
}) : (o(uo), xt)); | ||
}, Qo = (o) => I(o, (t, e) => t ? wo(t, () => { | ||
e(t.getBoundingClientRect()); | ||
}) : (e(uo), _t)); | ||
class tr extends Po { | ||
constructor(o, r, n, s) { | ||
super(o); | ||
J(this, "subscriptions", []); | ||
J(this, "view"); | ||
J(this, "delegate"); | ||
J(this, "updatePositionSignal$", dt(0)); | ||
J(this, "renderState$"); | ||
J(this, "onPrev", () => { | ||
constructor(e, r, n, s) { | ||
super(e); | ||
Q(this, "subscriptions", []); | ||
Q(this, "view"); | ||
Q(this, "delegate"); | ||
Q(this, "updatePositionSignal$", ut(0)); | ||
Q(this, "renderState$"); | ||
Q(this, "onPrev", () => { | ||
this.goPrevStep(); | ||
}); | ||
J(this, "onNext", async () => { | ||
Q(this, "onNext", async () => { | ||
var r, n; | ||
const o = I(Ye(this.store, this.store.effectiveIndex$)); | ||
if (o) { | ||
const e = N(Ye(this.store, this.store.effectiveIndex$)); | ||
if (e) { | ||
const s = (r = this.getActiveStep().step) == null ? void 0 : r.id; | ||
if (this.delegate.beforeStepChange) { | ||
const i = new AbortController(); | ||
if (await this.delegate.beforeStepChange(o.id, s, i).catch(() => { | ||
if (await this.delegate.beforeStepChange(e.id, s, i).catch(() => { | ||
i.abort(); | ||
@@ -995,7 +1006,7 @@ }), i.signal.aborted || ((n = this.getActiveStep().step) == null ? void 0 : n.id) !== s) | ||
}); | ||
J(this, "onClose", () => { | ||
Q(this, "onClose", () => { | ||
this.delegate.onClose ? this.delegate.onClose() : this.dispose(); | ||
}); | ||
this.delegate = r; | ||
const i = He(r), a = [], l = Jo(o, r); | ||
const i = He(r), a = [], l = Jo(e, r); | ||
this.renderState$ = l; | ||
@@ -1005,4 +1016,4 @@ const f = F(l, "step"), p = er(s, f), y = { | ||
highlight: p("highlight", Co), | ||
theme: N(p("theme", {}), Lo) | ||
}, d = dt(void 0), b = Qo(d), { elementBounding$: C, placement$: w } = Zo( | ||
theme: I(p("theme", {}), Lo) | ||
}, d = ut(void 0), b = Qo(d), { elementBounding$: C, placement$: w } = Zo( | ||
l, | ||
@@ -1013,4 +1024,4 @@ b, | ||
this.updatePositionSignal$ | ||
), m = r.getTotalCount(o), $ = zo(C, r, y), c = Be(n); | ||
c.set(Et, this).set(To, C).set(Ut, $).set(Wt, s).set(Yt, d).set(Oo, b).set(Kt, m).set(Mt, r).set(qt, l).set(Lt, y).set(Xt, w), this.subscriptions = a, this.view = new Wo({ | ||
), _ = r.getTotalCount(e), $ = zo(C, r, y), c = Be(n); | ||
c.set(Et, this).set(To, C).set(Ut, $).set(Wt, s).set(Yt, d).set(Oo, b).set(Kt, _).set(Mt, r).set(qt, l).set(Lt, y).set(Xt, w), this.subscriptions = a, this.view = new Wo({ | ||
target: i, | ||
@@ -1024,6 +1035,6 @@ context: c, | ||
updatePosition() { | ||
this.updatePositionSignal$.update((o) => o + 1); | ||
this.updatePositionSignal$.update((e) => e + 1); | ||
} | ||
applyAction(o) { | ||
switch (o) { | ||
applyAction(e) { | ||
switch (e) { | ||
case "previous": { | ||
@@ -1044,63 +1055,63 @@ this.onPrev(); | ||
getCurrentElement() { | ||
const { element: o } = I(this.renderState$); | ||
return it(o) ? void 0 : o; | ||
const { element: e } = N(this.renderState$); | ||
return it(e) ? void 0 : e; | ||
} | ||
dispose() { | ||
var o; | ||
Ve(this.subscriptions), (o = this.view) == null || o.$destroy(); | ||
var e; | ||
Ve(this.subscriptions), (e = this.view) == null || e.$destroy(); | ||
} | ||
} | ||
function er(e, t) { | ||
return (o, r) => { | ||
const n = F(e, o), s = F(t, o); | ||
return N([n, s], (i) => Mo(r, ...i)); | ||
function er(o, t) { | ||
return (e, r) => { | ||
const n = F(o, e), s = F(t, e); | ||
return I([n, s], (i) => Mo(r, ...i)); | ||
}; | ||
} | ||
function or(e) { | ||
Tt(e, "svelte-14sxom4", ".thisway-highlight{position:absolute;overflow:visible;pointer-events:none;border-style:solid;border-color:var(--thisway-highlight-border-color);box-sizing:content-box;border-width:calc(var(--thisway-highlight-border-width) * 1px);border-radius:calc(var(--thisway-highlight-border-width) * 2px)}.thisway-highlight-pulse{position:absolute;animation:hotspot-pulse 1.5s infinite;opacity:0.4;width:100%;height:100%;top:0;left:0;box-sizing:content-box;padding:calc(var(--thisway-highlight-border-width) * 1px);border-radius:calc(var(--thisway-highlight-border-width) * 2px);transform:translate(calc(var(--thisway-highlight-border-width) * -1px), calc(var(--thisway-highlight-border-width) * -1px))}@keyframes hotspot-pulse{0%{box-shadow:0 0 0 0 var(--thisway-highlight-border-color, #3082ed)}50%{box-shadow:0 0 0 10px var(--thisway-highlight-border-color, #3082ed)}100%{box-shadow:0 0 0 0 var(--thisway-highlight-border-color, #3082ed)}}"); | ||
function or(o) { | ||
Tt(o, "svelte-14sxom4", ".thisway-highlight{position:absolute;overflow:visible;pointer-events:none;border-style:solid;border-color:var(--thisway-highlight-border-color);box-sizing:content-box;border-width:calc(var(--thisway-highlight-border-width) * 1px);border-radius:calc(var(--thisway-highlight-border-width) * 2px)}.thisway-highlight-pulse{position:absolute;animation:hotspot-pulse 1.5s infinite;opacity:0.4;width:100%;height:100%;top:0;left:0;box-sizing:content-box;padding:calc(var(--thisway-highlight-border-width) * 1px);border-radius:calc(var(--thisway-highlight-border-width) * 2px);transform:translate(calc(var(--thisway-highlight-border-width) * -1px), calc(var(--thisway-highlight-border-width) * -1px))}@keyframes hotspot-pulse{0%{box-shadow:0 0 0 0 var(--thisway-highlight-border-color, #3082ed)}50%{box-shadow:0 0 0 10px var(--thisway-highlight-border-color, #3082ed)}100%{box-shadow:0 0 0 0 var(--thisway-highlight-border-color, #3082ed)}}"); | ||
} | ||
function le(e) { | ||
function le(o) { | ||
let t; | ||
return { | ||
c() { | ||
t = X("div"), k(t, "class", "thisway-highlight-pulse"); | ||
t = q("div"), k(t, "class", "thisway-highlight-pulse"); | ||
}, | ||
m(o, r) { | ||
D(o, t, r); | ||
m(e, r) { | ||
D(e, t, r); | ||
}, | ||
d(o) { | ||
o && R(t); | ||
d(e) { | ||
e && R(t); | ||
} | ||
}; | ||
} | ||
function rr(e) { | ||
let t, o, r, n, s = ( | ||
function rr(o) { | ||
let t, e, r, n, s = ( | ||
/*$showHeartbeat$*/ | ||
e[4] && le() | ||
o[4] && le() | ||
); | ||
return { | ||
c() { | ||
t = X("div"), s && s.c(), k(t, "class", "thisway-highlight"), B( | ||
t = q("div"), s && s.c(), k(t, "class", "thisway-highlight"), H( | ||
t, | ||
"--thisway-highlight-border-width", | ||
/*$borderWidth$*/ | ||
e[0] | ||
), B( | ||
o[0] | ||
), H( | ||
t, | ||
"--thisway-highlight-border-color", | ||
/*$borderColor$*/ | ||
e[1] | ||
), B( | ||
o[1] | ||
), H( | ||
t, | ||
"display", | ||
/*$showBorder$*/ | ||
e[2] ? "block" : "none" | ||
o[2] ? "block" : "none" | ||
); | ||
}, | ||
m(i, a) { | ||
D(i, t, a), s && s.m(t, null), r || (n = Ie(o = Ke.call( | ||
D(i, t, a), s && s.m(t, null), r || (n = Ie(e = Ke.call( | ||
null, | ||
t, | ||
/*$borderBoundingStyle$*/ | ||
e[3] | ||
o[3] | ||
)), r = !0); | ||
@@ -1110,4 +1121,4 @@ }, | ||
/*$showHeartbeat$*/ | ||
i[4] ? s || (s = le(), s.c(), s.m(t, null)) : s && (s.d(1), s = null), o && Me(o.update) && a & /*$borderBoundingStyle$*/ | ||
8 && o.update.call( | ||
i[4] ? s || (s = le(), s.c(), s.m(t, null)) : s && (s.d(1), s = null), e && Me(e.update) && a & /*$borderBoundingStyle$*/ | ||
8 && e.update.call( | ||
null, | ||
@@ -1117,3 +1128,3 @@ /*$borderBoundingStyle$*/ | ||
), a & /*$borderWidth$*/ | ||
1 && B( | ||
1 && H( | ||
t, | ||
@@ -1124,3 +1135,3 @@ "--thisway-highlight-border-width", | ||
), a & /*$borderColor$*/ | ||
2 && B( | ||
2 && H( | ||
t, | ||
@@ -1131,3 +1142,3 @@ "--thisway-highlight-border-color", | ||
), a & /*$showBorder$*/ | ||
4 && B( | ||
4 && H( | ||
t, | ||
@@ -1146,15 +1157,15 @@ "display", | ||
} | ||
function sr(e, t, o) { | ||
function sr(o, t, e) { | ||
let r, n, s, i, a; | ||
const l = H(Mt), f = H(Ut), p = Ge(), y = We(), d = F(p, "borderWidth"); | ||
O(e, d, (h) => o(0, r = h)); | ||
const b = F(p, "showHeartbeat"), C = N([f, p], ([h, { borderWidth: g, showBorder: P }]) => P && g > 0 && h.width > 0 && h.height > 0); | ||
O(e, C, (h) => o(2, s = h)); | ||
const w = l.transform$ ?? zt, m = N([f, d], ([h, g], P) => { | ||
const l = V(Mt), f = V(Ut), p = Ge(), y = We(), d = F(p, "borderWidth"); | ||
O(o, d, (h) => e(0, r = h)); | ||
const b = F(p, "showHeartbeat"), C = I([f, p], ([h, { borderWidth: g, showBorder: P }]) => P && g > 0 && h.width > 0 && h.height > 0); | ||
O(o, C, (h) => e(2, s = h)); | ||
const w = l.transform$ ?? zt, _ = I([f, d], ([h, g], P) => { | ||
if (!h) | ||
return; | ||
const { x: E, y: Y, padding: L, width: A, height: S } = h, [u, T] = Zt(L, I(w)); | ||
const { x: E, y: W, padding: B, width: A, height: S } = h, [u, T] = Zt(B, N(w)); | ||
P({ | ||
left: nt(E - g - u), | ||
top: nt(Y - g - T), | ||
top: nt(W - g - T), | ||
width: nt(A), | ||
@@ -1165,4 +1176,4 @@ height: nt(S), | ||
}); | ||
O(e, m, (h) => o(3, i = h)); | ||
const $ = N([p, y], ([h, g]) => { | ||
O(o, _, (h) => e(3, i = h)); | ||
const $ = I([p, y], ([h, g]) => { | ||
if (h != null && h.borderColor) | ||
@@ -1173,5 +1184,5 @@ return h.borderColor; | ||
}); | ||
O(e, $, (h) => o(1, n = h)); | ||
const c = N([b, f], ([h, g]) => !!(h && (g != null && g.width) && (g != null && g.height))); | ||
return O(e, c, (h) => o(4, a = h)), [ | ||
O(o, $, (h) => e(1, n = h)); | ||
const c = I([b, f], ([h, g]) => !!(h && (g != null && g.width) && (g != null && g.height))); | ||
return O(o, c, (h) => e(4, a = h)), [ | ||
r, | ||
@@ -1184,3 +1195,3 @@ n, | ||
C, | ||
m, | ||
_, | ||
$, | ||
@@ -1190,21 +1201,21 @@ c | ||
} | ||
class nr extends bt { | ||
class nr extends $t { | ||
constructor(t) { | ||
super(), $t(this, t, sr, rr, Ct, {}, or); | ||
super(), Ct(this, t, sr, rr, kt, {}, or); | ||
} | ||
} | ||
function ir(e) { | ||
Tt(e, "svelte-1fc4ct7", ".thisway-progress{font-size:14px}"); | ||
function ir(o) { | ||
Tt(o, "svelte-1fc4ct7", ".thisway-progress{font-size:14px}"); | ||
} | ||
function ar(e) { | ||
let t, o; | ||
function ar(o) { | ||
let t, e; | ||
return { | ||
c() { | ||
t = X("div"), o = St( | ||
t = q("div"), e = St( | ||
/*$progress$*/ | ||
e[0] | ||
o[0] | ||
), k(t, "class", "thisway-progress"); | ||
}, | ||
m(r, n) { | ||
D(r, t, n), W(t, o); | ||
D(r, t, n), G(t, e); | ||
}, | ||
@@ -1214,3 +1225,3 @@ p(r, [n]) { | ||
1 && Pt( | ||
o, | ||
e, | ||
/*$progress$*/ | ||
@@ -1227,58 +1238,58 @@ r[0] | ||
} | ||
function lr(e, t, o) { | ||
function lr(o, t, e) { | ||
let r; | ||
const n = H(Kt), s = Re(), i = N([s, n], ([a, l]) => l > 1 ? `${a + 1}/${l}` : ""); | ||
return O(e, i, (a) => o(0, r = a)), [r, i]; | ||
const n = V(Kt), s = Re(), i = I([s, n], ([a, l]) => l > 1 ? `${a + 1}/${l}` : ""); | ||
return O(o, i, (a) => e(0, r = a)), [r, i]; | ||
} | ||
class Ze extends bt { | ||
class Ze extends $t { | ||
constructor(t) { | ||
super(), $t(this, t, lr, ar, Ct, {}, ir); | ||
super(), Ct(this, t, lr, ar, kt, {}, ir); | ||
} | ||
} | ||
function cr(e) { | ||
Tt(e, "svelte-yaniy4", "@keyframes reduction{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}.thisway-stretch{margin:auto}.thisway-popover{animation:reduction 200ms linear;display:flex;flex-direction:column;padding:16px;max-width:280px;min-width:280px;border-radius:10px;overflow:visible;background-color:var(--thisway-color-primary);color:var(--thisway-color-text);position:relative;box-shadow:var(--thisway-default-shadow);box-sizing:border-box}.thisway-popover.thisway-popover__mode-1 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text)}.thisway-popover.thisway-popover__mode-1 .thisway-progress{margin-right:auto}.thisway-popover.thisway-popover__mode-2 .thisway-popover-title{order:2}.thisway-popover.thisway-popover__mode-2 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);order:3}.thisway-popover.thisway-popover__mode-2 .thisway-popover-footer{order:4;justify-content:flex-end}.thisway-popover.thisway-popover__mode-2 .thisway-popover-close{top:14px;right:14px}.thisway-popover.thisway-popover__mode-2 .thisway-progress{font-size:20px;order:1}.thisway-popover.thisway-popover__mode-3{padding-top:0;background:linear-gradient(to bottom, var(--thisway-color-primary) 40px, var(--thisway-color-text) 40px)}.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-end,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3 .thisway-popover-title{line-height:40px;height:40px;font-size:18px;order:1;background-color:var(--thisway-color-primary)}.thisway-popover.thisway-popover__mode-3 .thisway-popover-description{color:#333333;order:3}.thisway-popover.thisway-popover__mode-3 .thisway-popover-footer{order:4}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary);flex:0 0 30px;height:30px;border-radius:50%;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev svg{display:inline-block;margin:4px 0 0;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-next{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text);max-width:210px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.thisway-popover.thisway-popover__mode-3 .thisway-popover-close{top:8px;right:10px}.thisway-popover.thisway-popover__mode-3 .thisway-progress{color:#999;margin:10px 0 5px;order:2}.thisway-popover-title{font-size:18px;font-style:normal;font-weight:500;line-height:24px;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}@supports (-webkit-line-clamp: 2){.thisway-popover-title{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.thisway-popover-description{margin-top:5px;margin-bottom:0;white-space:pre-line;font-size:14px;line-height:20px;font-style:normal;word-wrap:break-word}.thisway-popover-description a{text-decoration:underline}.thisway-popover-footer{margin-top:10px;display:flex;align-items:center}.thisway-popover-footer button{text-decoration:none;cursor:pointer;outline:0;height:30px;border-radius:50px;padding:0 18px;font-size:13px;line-height:20px}.thisway-popover-footer button:not(:last-child){margin-right:10px}.thisway-popover-top .thisway-popover__arrow{bottom:0;transform:translate(-50%, 50%) rotate(45deg)}.thisway-popover-bottom .thisway-popover__arrow{top:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover-left .thisway-popover__arrow{right:0;transform:translate(50%, -50%) rotate(45deg)}.thisway-popover-right .thisway-popover__arrow{left:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover__arrow{position:absolute;width:10px;height:10px;display:block;background-color:var(--thisway-color-primary)}.thisway-popover-right .thisway-popover__arrow-start,.thisway-popover-left .thisway-popover__arrow-start{top:20px}.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover-left .thisway-popover__arrow-center{top:50%}.thisway-popover-right .thisway-popover__arrow-end,.thisway-popover-left .thisway-popover__arrow-end{bottom:10px}.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover-bottom .thisway-popover__arrow-start{left:20px}.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover-bottom .thisway-popover__arrow-center{left:50%}.thisway-popover-top .thisway-popover__arrow-end,.thisway-popover-bottom .thisway-popover__arrow-end{right:10px}.thisway-popover-screen .thisway-popover__arrow,.thisway-popover-over .thisway-popover__arrow{display:none}.thisway-popover-prev{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text)}.thisway-popover-next{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary)}.thisway-popover-close{width:24px;height:24px;position:absolute;opacity:0.8;display:flex;align-items:center;justify-content:center;padding:0;border:none;color:var(--thisway-color-text);background-color:transparent;top:8px;right:8px;z-index:1}.thisway-popover-close:hover{opacity:1;border:none}"); | ||
function cr(o) { | ||
Tt(o, "svelte-yaniy4", "@keyframes reduction{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}.thisway-stretch{margin:auto}.thisway-popover{animation:reduction 200ms linear;display:flex;flex-direction:column;padding:16px;max-width:280px;min-width:280px;border-radius:10px;overflow:visible;background-color:var(--thisway-color-primary);color:var(--thisway-color-text);position:relative;box-shadow:var(--thisway-default-shadow);box-sizing:border-box}.thisway-popover.thisway-popover__mode-1 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text)}.thisway-popover.thisway-popover__mode-1 .thisway-progress{margin-right:auto}.thisway-popover.thisway-popover__mode-2 .thisway-popover-title{order:2}.thisway-popover.thisway-popover__mode-2 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);order:3}.thisway-popover.thisway-popover__mode-2 .thisway-popover-footer{order:4;justify-content:flex-end}.thisway-popover.thisway-popover__mode-2 .thisway-popover-close{top:14px;right:14px}.thisway-popover.thisway-popover__mode-2 .thisway-progress{font-size:20px;order:1}.thisway-popover.thisway-popover__mode-3{padding-top:0;background:linear-gradient(to bottom, var(--thisway-color-primary) 40px, var(--thisway-color-text) 40px)}.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-end,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3 .thisway-popover-title{line-height:40px;height:40px;font-size:18px;order:1;background-color:var(--thisway-color-primary)}.thisway-popover.thisway-popover__mode-3 .thisway-popover-description{color:#333333;order:3}.thisway-popover.thisway-popover__mode-3 .thisway-popover-footer{order:4}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary);flex:0 0 30px;height:30px;border-radius:50%;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev svg{display:inline-block;margin:4px 0 0;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-next{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text);max-width:210px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.thisway-popover.thisway-popover__mode-3 .thisway-popover-close{top:8px;right:10px}.thisway-popover.thisway-popover__mode-3 .thisway-progress{color:#999;margin:10px 0 5px;order:2}.thisway-popover-title{font-size:18px;font-style:normal;font-weight:500;line-height:24px;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}@supports (-webkit-line-clamp: 2){.thisway-popover-title{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.thisway-popover-description{margin-top:5px;margin-bottom:0;white-space:pre-line;font-size:14px;line-height:20px;font-style:normal;word-wrap:break-word}.thisway-popover-description a{text-decoration:underline}.thisway-popover-footer{margin-top:10px;display:flex;align-items:center}.thisway-popover-footer button{text-decoration:none;cursor:pointer;outline:0;height:30px;border-radius:50px;padding:0 18px;font-size:13px;line-height:20px}.thisway-popover-footer button:not(:last-child){margin-right:10px}.thisway-popover-top .thisway-popover__arrow{bottom:0;transform:translate(-50%, 50%) rotate(45deg)}.thisway-popover-bottom .thisway-popover__arrow{top:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover-left .thisway-popover__arrow{right:0;transform:translate(50%, -50%) rotate(45deg)}.thisway-popover-right .thisway-popover__arrow{left:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover__arrow{position:absolute;width:10px;height:10px;display:block;background-color:var(--thisway-color-primary)}.thisway-popover-right .thisway-popover__arrow-start,.thisway-popover-left .thisway-popover__arrow-start{top:20px}.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover-left .thisway-popover__arrow-center{top:50%}.thisway-popover-right .thisway-popover__arrow-end,.thisway-popover-left .thisway-popover__arrow-end{bottom:10px}.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover-bottom .thisway-popover__arrow-start{left:20px}.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover-bottom .thisway-popover__arrow-center{left:50%}.thisway-popover-top .thisway-popover__arrow-end,.thisway-popover-bottom .thisway-popover__arrow-end{right:10px}.thisway-popover-screen .thisway-popover__arrow,.thisway-popover-over .thisway-popover__arrow{display:none}.thisway-popover-prev{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text)}.thisway-popover-next{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary)}.thisway-popover-close{width:24px;height:24px;position:absolute;opacity:0.8;display:flex;align-items:center;justify-content:center;padding:0;border:none;color:var(--thisway-color-text);background-color:transparent;top:8px;right:8px;z-index:1}.thisway-popover-close:hover{opacity:1;border:none}"); | ||
} | ||
const pr = (e) => ({}), ce = (e) => ({}), hr = (e) => ({}), pe = (e) => ({}), fr = (e) => ({}), he = (e) => ({}), ur = (e) => ({}), fe = (e) => ({}), dr = (e) => ({}), ue = (e) => ({}); | ||
function de(e) { | ||
let t, o, r; | ||
const pr = (o) => ({}), ce = (o) => ({}), hr = (o) => ({}), pe = (o) => ({}), fr = (o) => ({}), he = (o) => ({}), ur = (o) => ({}), fe = (o) => ({}), dr = (o) => ({}), ue = (o) => ({}); | ||
function de(o) { | ||
let t, e, r; | ||
return { | ||
c() { | ||
t = X("button"), t.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 10.586l-4.293-4.293a1 1 0 0 0-1.414 1.414L10.586 12l-4.293 4.293a1 1 0 1 0 1.414 1.414L12 13.414l4.293 4.293a1 1 0 1 0 1.414-1.414L13.414 12l4.293-4.293a1 1 0 0 0-1.414-1.414L12 10.586z"></path></svg>', k(t, "class", "thisway-popover-close"); | ||
t = q("button"), t.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 10.586l-4.293-4.293a1 1 0 0 0-1.414 1.414L10.586 12l-4.293 4.293a1 1 0 1 0 1.414 1.414L12 13.414l4.293 4.293a1 1 0 1 0 1.414-1.414L13.414 12l4.293-4.293a1 1 0 0 0-1.414-1.414L12 10.586z"></path></svg>', k(t, "class", "thisway-popover-close"); | ||
}, | ||
m(n, s) { | ||
D(n, t, s), o || (r = Ot( | ||
D(n, t, s), e || (r = Ot( | ||
t, | ||
"click", | ||
/*onClose*/ | ||
e[25] | ||
), o = !0); | ||
o[25] | ||
), e = !0); | ||
}, | ||
p: at, | ||
d(n) { | ||
n && R(t), o = !1, r(); | ||
n && R(t), e = !1, r(); | ||
} | ||
}; | ||
} | ||
function we(e) { | ||
let t, o; | ||
function we(o) { | ||
let t, e; | ||
const r = ( | ||
/*#slots*/ | ||
e[30].title | ||
), n = _t( | ||
o[30].title | ||
), n = mt( | ||
r, | ||
e, | ||
o, | ||
/*$$scope*/ | ||
e[29], | ||
o[29], | ||
ue | ||
), s = n || wr(e); | ||
), s = n || wr(o); | ||
return { | ||
c() { | ||
t = X("header"), s && s.c(), k(t, "class", "thisway-popover-title"); | ||
t = q("header"), s && s.c(), k(t, "class", "thisway-popover-title"); | ||
}, | ||
m(i, a) { | ||
D(i, t, a), s && s.m(t, null), o = !0; | ||
D(i, t, a), s && s.m(t, null), e = !0; | ||
}, | ||
p(i, a) { | ||
n ? n.p && (!o || a[0] & /*$$scope*/ | ||
536870912) && mt( | ||
n ? n.p && (!e || a[0] & /*$$scope*/ | ||
536870912) && vt( | ||
n, | ||
@@ -1289,3 +1300,3 @@ r, | ||
i[29], | ||
o ? yt( | ||
e ? bt( | ||
r, | ||
@@ -1296,3 +1307,3 @@ /*$$scope*/ | ||
dr | ||
) : vt( | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1302,10 +1313,10 @@ i[29] | ||
ue | ||
) : s && s.p && (!o || a[0] & /*$title$*/ | ||
8) && s.p(i, o ? a : [-1, -1]); | ||
) : s && s.p && (!e || a[0] & /*$title$*/ | ||
8) && s.p(i, e ? a : [-1, -1]); | ||
}, | ||
i(i) { | ||
o || (x(s, i), o = !0); | ||
e || (x(s, i), e = !0); | ||
}, | ||
o(i) { | ||
M(s, i), o = !1; | ||
L(s, i), e = !1; | ||
}, | ||
@@ -1317,3 +1328,3 @@ d(i) { | ||
} | ||
function wr(e) { | ||
function wr(o) { | ||
let t; | ||
@@ -1324,9 +1335,9 @@ return { | ||
/*$title$*/ | ||
e[3] | ||
o[3] | ||
); | ||
}, | ||
m(o, r) { | ||
D(o, t, r); | ||
m(e, r) { | ||
D(e, t, r); | ||
}, | ||
p(o, r) { | ||
p(e, r) { | ||
r[0] & /*$title$*/ | ||
@@ -1336,32 +1347,32 @@ 8 && Pt( | ||
/*$title$*/ | ||
o[3] | ||
e[3] | ||
); | ||
}, | ||
d(o) { | ||
o && R(t); | ||
d(e) { | ||
e && R(t); | ||
} | ||
}; | ||
} | ||
function ge(e) { | ||
let t, o; | ||
function ge(o) { | ||
let t, e; | ||
const r = ( | ||
/*#slots*/ | ||
e[30].description | ||
), n = _t( | ||
o[30].description | ||
), n = mt( | ||
r, | ||
e, | ||
o, | ||
/*$$scope*/ | ||
e[29], | ||
o[29], | ||
fe | ||
), s = n || gr(e); | ||
), s = n || gr(o); | ||
return { | ||
c() { | ||
t = X("div"), s && s.c(), k(t, "class", "thisway-popover-description"); | ||
t = q("div"), s && s.c(), k(t, "class", "thisway-popover-description"); | ||
}, | ||
m(i, a) { | ||
D(i, t, a), s && s.m(t, null), o = !0; | ||
D(i, t, a), s && s.m(t, null), e = !0; | ||
}, | ||
p(i, a) { | ||
n ? n.p && (!o || a[0] & /*$$scope*/ | ||
536870912) && mt( | ||
n ? n.p && (!e || a[0] & /*$$scope*/ | ||
536870912) && vt( | ||
n, | ||
@@ -1372,3 +1383,3 @@ r, | ||
i[29], | ||
o ? yt( | ||
e ? bt( | ||
r, | ||
@@ -1379,3 +1390,3 @@ /*$$scope*/ | ||
ur | ||
) : vt( | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1385,10 +1396,10 @@ i[29] | ||
fe | ||
) : s && s.p && (!o || a[0] & /*$description$*/ | ||
16) && s.p(i, o ? a : [-1, -1]); | ||
) : s && s.p && (!e || a[0] & /*$description$*/ | ||
16) && s.p(i, e ? a : [-1, -1]); | ||
}, | ||
i(i) { | ||
o || (x(s, i), o = !0); | ||
e || (x(s, i), e = !0); | ||
}, | ||
o(i) { | ||
M(s, i), o = !1; | ||
L(s, i), e = !1; | ||
}, | ||
@@ -1400,3 +1411,3 @@ d(i) { | ||
} | ||
function gr(e) { | ||
function gr(o) { | ||
let t; | ||
@@ -1407,9 +1418,9 @@ return { | ||
/*$description$*/ | ||
e[4] | ||
o[4] | ||
); | ||
}, | ||
m(o, r) { | ||
D(o, t, r); | ||
m(e, r) { | ||
D(e, t, r); | ||
}, | ||
p(o, r) { | ||
p(e, r) { | ||
r[0] & /*$description$*/ | ||
@@ -1419,64 +1430,64 @@ 16 && Pt( | ||
/*$description$*/ | ||
o[4] | ||
e[4] | ||
); | ||
}, | ||
d(o) { | ||
o && R(t); | ||
d(e) { | ||
e && R(t); | ||
} | ||
}; | ||
} | ||
function _e(e) { | ||
let t, o; | ||
function _e(o) { | ||
let t, e; | ||
return t = new Ze({}), { | ||
c() { | ||
ht(t.$$.fragment); | ||
pt(t.$$.fragment); | ||
}, | ||
m(r, n) { | ||
ft(t, r, n), o = !0; | ||
ht(t, r, n), e = !0; | ||
}, | ||
i(r) { | ||
o || (x(t.$$.fragment, r), o = !0); | ||
e || (x(t.$$.fragment, r), e = !0); | ||
}, | ||
o(r) { | ||
M(t.$$.fragment, r), o = !1; | ||
L(t.$$.fragment, r), e = !1; | ||
}, | ||
d(r) { | ||
ut(t, r); | ||
ft(t, r); | ||
} | ||
}; | ||
} | ||
function me(e) { | ||
let t, o; | ||
function me(o) { | ||
let t, e; | ||
return t = new Ze({}), { | ||
c() { | ||
ht(t.$$.fragment); | ||
pt(t.$$.fragment); | ||
}, | ||
m(r, n) { | ||
ft(t, r, n), o = !0; | ||
ht(t, r, n), e = !0; | ||
}, | ||
i(r) { | ||
o || (x(t.$$.fragment, r), o = !0); | ||
e || (x(t.$$.fragment, r), e = !0); | ||
}, | ||
o(r) { | ||
M(t.$$.fragment, r), o = !1; | ||
L(t.$$.fragment, r), e = !1; | ||
}, | ||
d(r) { | ||
ut(t, r); | ||
ft(t, r); | ||
} | ||
}; | ||
} | ||
function ve(e) { | ||
let t, o, r, n = ( | ||
function ve(o) { | ||
let t, e, r, n = ( | ||
/*$previousButtonVisible$*/ | ||
e[9] && ye(e) | ||
o[9] && ye(o) | ||
), s = ( | ||
/*$hasSteps$*/ | ||
e[11] && be(e) | ||
o[11] && be(o) | ||
); | ||
return { | ||
c() { | ||
n && n.c(), t = q(), s && s.c(), o = Le(); | ||
n && n.c(), t = Z(), s && s.c(), e = Le(); | ||
}, | ||
m(i, a) { | ||
n && n.m(i, a), D(i, t, a), s && s.m(i, a), D(i, o, a), r = !0; | ||
n && n.m(i, a), D(i, t, a), s && s.m(i, a), D(i, e, a), r = !0; | ||
}, | ||
@@ -1486,9 +1497,9 @@ p(i, a) { | ||
i[9] ? n ? (n.p(i, a), a[0] & /*$previousButtonVisible$*/ | ||
512 && x(n, 1)) : (n = ye(i), n.c(), x(n, 1), n.m(t.parentNode, t)) : n && (ot(), M(n, 1, 1, () => { | ||
512 && x(n, 1)) : (n = ye(i), n.c(), x(n, 1), n.m(t.parentNode, t)) : n && (rt(), L(n, 1, 1, () => { | ||
n = null; | ||
}), rt()), /*$hasSteps$*/ | ||
}), st()), /*$hasSteps$*/ | ||
i[11] ? s ? (s.p(i, a), a[0] & /*$hasSteps$*/ | ||
2048 && x(s, 1)) : (s = be(i), s.c(), x(s, 1), s.m(o.parentNode, o)) : s && (ot(), M(s, 1, 1, () => { | ||
2048 && x(s, 1)) : (s = be(i), s.c(), x(s, 1), s.m(e.parentNode, e)) : s && (rt(), L(s, 1, 1, () => { | ||
s = null; | ||
}), rt()); | ||
}), st()); | ||
}, | ||
@@ -1499,36 +1510,36 @@ i(i) { | ||
o(i) { | ||
M(n), M(s), r = !1; | ||
L(n), L(s), r = !1; | ||
}, | ||
d(i) { | ||
i && (R(t), R(o)), n && n.d(i), s && s.d(i); | ||
i && (R(t), R(e)), n && n.d(i), s && s.d(i); | ||
} | ||
}; | ||
} | ||
function ye(e) { | ||
let t, o, r, n; | ||
function ye(o) { | ||
let t, e, r, n; | ||
const s = ( | ||
/*#slots*/ | ||
e[30].prevText | ||
), i = _t( | ||
o[30].prevText | ||
), i = mt( | ||
s, | ||
e, | ||
o, | ||
/*$$scope*/ | ||
e[29], | ||
o[29], | ||
pe | ||
), a = i || vr(e); | ||
), a = i || vr(o); | ||
return { | ||
c() { | ||
t = X("button"), a && a.c(), k(t, "class", "thisway-popover-prev"); | ||
t = q("button"), a && a.c(), k(t, "class", "thisway-popover-prev"); | ||
}, | ||
m(l, f) { | ||
D(l, t, f), a && a.m(t, null), o = !0, r || (n = Ot( | ||
D(l, t, f), a && a.m(t, null), e = !0, r || (n = Ot( | ||
t, | ||
"click", | ||
/*onPrevious*/ | ||
e[26] | ||
o[26] | ||
), r = !0); | ||
}, | ||
p(l, f) { | ||
i ? i.p && (!o || f[0] & /*$$scope*/ | ||
536870912) && mt( | ||
i ? i.p && (!e || f[0] & /*$$scope*/ | ||
536870912) && vt( | ||
i, | ||
@@ -1539,3 +1550,3 @@ s, | ||
l[29], | ||
o ? yt( | ||
e ? bt( | ||
s, | ||
@@ -1546,3 +1557,3 @@ /*$$scope*/ | ||
hr | ||
) : vt( | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1552,10 +1563,10 @@ l[29] | ||
pe | ||
) : a && a.p && (!o || f[0] & /*$previousText$, $layout$*/ | ||
1028) && a.p(l, o ? f : [-1, -1]); | ||
) : a && a.p && (!e || f[0] & /*$previousText$, $layout$*/ | ||
1028) && a.p(l, e ? f : [-1, -1]); | ||
}, | ||
i(l) { | ||
o || (x(a, l), o = !0); | ||
e || (x(a, l), e = !0); | ||
}, | ||
o(l) { | ||
M(a, l), o = !1; | ||
L(a, l), e = !1; | ||
}, | ||
@@ -1567,10 +1578,10 @@ d(l) { | ||
} | ||
function _r(e) { | ||
let t, o; | ||
function _r(o) { | ||
let t, e; | ||
return { | ||
c() { | ||
t = It("svg"), o = It("path"), k(o, "d", "M19 12H6M12 5l-7 7 7 7"), B(t, "pointer-events", "none"), k(t, "width", "20"), k(t, "height", "14"), k(t, "xmlns", "http://www.w3.org/2000/svg"), k(t, "viewBox", "0 0 24 24"), k(t, "fill", "none"), k(t, "stroke", "currentColor"), k(t, "stroke-width", "2"), k(t, "stroke-linecap", "round"), k(t, "stroke-linejoin", "round"); | ||
t = It("svg"), e = It("path"), k(e, "d", "M19 12H6M12 5l-7 7 7 7"), H(t, "pointer-events", "none"), k(t, "width", "20"), k(t, "height", "14"), k(t, "xmlns", "http://www.w3.org/2000/svg"), k(t, "viewBox", "0 0 24 24"), k(t, "fill", "none"), k(t, "stroke", "currentColor"), k(t, "stroke-width", "2"), k(t, "stroke-linecap", "round"), k(t, "stroke-linejoin", "round"); | ||
}, | ||
m(r, n) { | ||
D(r, t, n), W(t, o); | ||
D(r, t, n), G(t, e); | ||
}, | ||
@@ -1583,3 +1594,3 @@ p: at, | ||
} | ||
function mr(e) { | ||
function mr(o) { | ||
let t; | ||
@@ -1590,9 +1601,9 @@ return { | ||
/*$previousText$*/ | ||
e[10] | ||
o[10] | ||
); | ||
}, | ||
m(o, r) { | ||
D(o, t, r); | ||
m(e, r) { | ||
D(e, t, r); | ||
}, | ||
p(o, r) { | ||
p(e, r) { | ||
r[0] & /*$previousText$*/ | ||
@@ -1602,13 +1613,13 @@ 1024 && Pt( | ||
/*$previousText$*/ | ||
o[10] | ||
e[10] | ||
); | ||
}, | ||
d(o) { | ||
o && R(t); | ||
d(e) { | ||
e && R(t); | ||
} | ||
}; | ||
} | ||
function vr(e) { | ||
function vr(o) { | ||
let t; | ||
function o(s, i) { | ||
function e(s, i) { | ||
return ( | ||
@@ -1619,3 +1630,3 @@ /*$layout$*/ | ||
} | ||
let r = o(e), n = r(e); | ||
let r = e(o), n = r(o); | ||
return { | ||
@@ -1629,3 +1640,3 @@ c() { | ||
p(s, i) { | ||
r === (r = o(s)) && n ? n.p(s, i) : (n.d(1), n = r(s), n && (n.c(), n.m(t.parentNode, t))); | ||
r === (r = e(s)) && n ? n.p(s, i) : (n.d(1), n = r(s), n && (n.c(), n.m(t.parentNode, t))); | ||
}, | ||
@@ -1637,29 +1648,29 @@ d(s) { | ||
} | ||
function be(e) { | ||
let t, o, r, n; | ||
function be(o) { | ||
let t, e, r, n; | ||
const s = ( | ||
/*#slots*/ | ||
e[30].nextText | ||
), i = _t( | ||
o[30].nextText | ||
), i = mt( | ||
s, | ||
e, | ||
o, | ||
/*$$scope*/ | ||
e[29], | ||
o[29], | ||
ce | ||
), a = i || yr(e); | ||
), a = i || yr(o); | ||
return { | ||
c() { | ||
t = X("button"), a && a.c(), k(t, "class", "thisway-popover-next"); | ||
t = q("button"), a && a.c(), k(t, "class", "thisway-popover-next"); | ||
}, | ||
m(l, f) { | ||
D(l, t, f), a && a.m(t, null), o = !0, r || (n = Ot( | ||
D(l, t, f), a && a.m(t, null), e = !0, r || (n = Ot( | ||
t, | ||
"click", | ||
/*onNext*/ | ||
e[27] | ||
o[27] | ||
), r = !0); | ||
}, | ||
p(l, f) { | ||
i ? i.p && (!o || f[0] & /*$$scope*/ | ||
536870912) && mt( | ||
i ? i.p && (!e || f[0] & /*$$scope*/ | ||
536870912) && vt( | ||
i, | ||
@@ -1670,3 +1681,3 @@ s, | ||
l[29], | ||
o ? yt( | ||
e ? bt( | ||
s, | ||
@@ -1677,3 +1688,3 @@ /*$$scope*/ | ||
pr | ||
) : vt( | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1683,10 +1694,10 @@ l[29] | ||
ce | ||
) : a && a.p && (!o || f[0] & /*$nextButtonText$*/ | ||
4096) && a.p(l, o ? f : [-1, -1]); | ||
) : a && a.p && (!e || f[0] & /*$nextButtonText$*/ | ||
4096) && a.p(l, e ? f : [-1, -1]); | ||
}, | ||
i(l) { | ||
o || (x(a, l), o = !0); | ||
e || (x(a, l), e = !0); | ||
}, | ||
o(l) { | ||
M(a, l), o = !1; | ||
L(a, l), e = !1; | ||
}, | ||
@@ -1698,3 +1709,3 @@ d(l) { | ||
} | ||
function yr(e) { | ||
function yr(o) { | ||
let t; | ||
@@ -1705,9 +1716,9 @@ return { | ||
/*$nextButtonText$*/ | ||
e[12] | ||
o[12] | ||
); | ||
}, | ||
m(o, r) { | ||
D(o, t, r); | ||
m(e, r) { | ||
D(e, t, r); | ||
}, | ||
p(o, r) { | ||
p(e, r) { | ||
r[0] & /*$nextButtonText$*/ | ||
@@ -1717,44 +1728,44 @@ 4096 && Pt( | ||
/*$nextButtonText$*/ | ||
o[12] | ||
e[12] | ||
); | ||
}, | ||
d(o) { | ||
o && R(t); | ||
d(e) { | ||
e && R(t); | ||
} | ||
}; | ||
} | ||
function br(e) { | ||
let t, o, r, n, s, i, a, l, f, p, y, d, b, C, w, m, $ = ( | ||
function br(o) { | ||
let t, e, r, n, s, i, a, l, f, p, y, d, b, C, w, _, $ = ( | ||
/*$showCloseButton$*/ | ||
e[6] && de(e) | ||
o[6] && de(o) | ||
), c = ( | ||
/*$$slots*/ | ||
(e[28].title || /*$title$*/ | ||
e[3]) && we(e) | ||
(o[28].title || /*$title$*/ | ||
o[3]) && we(o) | ||
), h = ( | ||
/*$$slots*/ | ||
(e[28].description || /*$description$*/ | ||
e[4]) && ge(e) | ||
(o[28].description || /*$description$*/ | ||
o[4]) && ge(o) | ||
), g = ( | ||
/*$layout$*/ | ||
e[2] !== kt && /*$showProgress$*/ | ||
e[7] && _e() | ||
o[2] !== xt && /*$showProgress$*/ | ||
o[7] && _e() | ||
); | ||
const P = ( | ||
/*#slots*/ | ||
e[30].default | ||
), E = _t( | ||
o[30].default | ||
), E = mt( | ||
P, | ||
e, | ||
o, | ||
/*$$scope*/ | ||
e[29], | ||
o[29], | ||
null | ||
), Y = ( | ||
), W = ( | ||
/*#slots*/ | ||
e[30].footer | ||
), L = _t( | ||
Y, | ||
e, | ||
o[30].footer | ||
), B = mt( | ||
W, | ||
o, | ||
/*$$scope*/ | ||
e[29], | ||
o[29], | ||
he | ||
@@ -1764,48 +1775,48 @@ ); | ||
/*$layout$*/ | ||
e[2] === kt && /*$showProgress$*/ | ||
e[7] && me() | ||
o[2] === xt && /*$showProgress$*/ | ||
o[7] && me() | ||
), S = ( | ||
/*$showCtrlBtns$*/ | ||
e[8] && ve(e) | ||
o[8] && ve(o) | ||
); | ||
return { | ||
c() { | ||
t = X("div"), o = X("div"), n = q(), $ && $.c(), s = q(), c && c.c(), i = q(), h && h.c(), a = q(), g && g.c(), l = q(), E && E.c(), f = q(), p = X("div"), L && L.c(), y = q(), A && A.c(), d = q(), b = X("div"), C = q(), S && S.c(), k(o, "class", r = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
e[5]), k(b, "class", "thisway-stretch"), k(p, "class", "thisway-popover-footer"), k(t, "class", w = "thisway-popover " + /*$popoverClass$*/ | ||
e[1] + " thisway-popover__" + /*$layout$*/ | ||
e[2] + " " + /*cssClassName*/ | ||
e[0]), B( | ||
t = q("div"), e = q("div"), n = Z(), $ && $.c(), s = Z(), c && c.c(), i = Z(), h && h.c(), a = Z(), g && g.c(), l = Z(), E && E.c(), f = Z(), p = q("div"), B && B.c(), y = Z(), A && A.c(), d = Z(), b = q("div"), C = Z(), S && S.c(), k(e, "class", r = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
o[5]), k(b, "class", "thisway-stretch"), k(p, "class", "thisway-popover-footer"), k(t, "class", w = "thisway-popover " + /*$popoverClass$*/ | ||
o[1] + " thisway-popover__" + /*$layout$*/ | ||
o[2] + " " + /*cssClassName*/ | ||
o[0]), H( | ||
t, | ||
"display", | ||
/*$title$*/ | ||
e[3] || /*$description$*/ | ||
e[4] || /*$$slots*/ | ||
e[28].title || /*$$slots*/ | ||
e[28].description ? "block" : "none" | ||
o[3] || /*$description$*/ | ||
o[4] || /*$$slots*/ | ||
o[28].title || /*$$slots*/ | ||
o[28].description ? "block" : "none" | ||
); | ||
}, | ||
m(u, T) { | ||
D(u, t, T), W(t, o), W(t, n), $ && $.m(t, null), W(t, s), c && c.m(t, null), W(t, i), h && h.m(t, null), W(t, a), g && g.m(t, null), W(t, l), E && E.m(t, null), W(t, f), W(t, p), L && L.m(p, null), W(p, y), A && A.m(p, null), W(p, d), W(p, b), W(p, C), S && S.m(p, null), m = !0; | ||
D(u, t, T), G(t, e), G(t, n), $ && $.m(t, null), G(t, s), c && c.m(t, null), G(t, i), h && h.m(t, null), G(t, a), g && g.m(t, null), G(t, l), E && E.m(t, null), G(t, f), G(t, p), B && B.m(p, null), G(p, y), A && A.m(p, null), G(p, d), G(p, b), G(p, C), S && S.m(p, null), _ = !0; | ||
}, | ||
p(u, T) { | ||
(!m || T[0] & /*$arrowClass$*/ | ||
(!_ || T[0] & /*$arrowClass$*/ | ||
32 && r !== (r = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
u[5])) && k(o, "class", r), /*$showCloseButton$*/ | ||
u[5])) && k(e, "class", r), /*$showCloseButton$*/ | ||
u[6] ? $ ? $.p(u, T) : ($ = de(u), $.c(), $.m(t, s)) : $ && ($.d(1), $ = null), /*$$slots*/ | ||
u[28].title || /*$title$*/ | ||
u[3] ? c ? (c.p(u, T), T[0] & /*$$slots, $title$*/ | ||
268435464 && x(c, 1)) : (c = we(u), c.c(), x(c, 1), c.m(t, i)) : c && (ot(), M(c, 1, 1, () => { | ||
268435464 && x(c, 1)) : (c = we(u), c.c(), x(c, 1), c.m(t, i)) : c && (rt(), L(c, 1, 1, () => { | ||
c = null; | ||
}), rt()), /*$$slots*/ | ||
}), st()), /*$$slots*/ | ||
u[28].description || /*$description$*/ | ||
u[4] ? h ? (h.p(u, T), T[0] & /*$$slots, $description$*/ | ||
268435472 && x(h, 1)) : (h = ge(u), h.c(), x(h, 1), h.m(t, a)) : h && (ot(), M(h, 1, 1, () => { | ||
268435472 && x(h, 1)) : (h = ge(u), h.c(), x(h, 1), h.m(t, a)) : h && (rt(), L(h, 1, 1, () => { | ||
h = null; | ||
}), rt()), /*$layout$*/ | ||
u[2] !== kt && /*$showProgress$*/ | ||
}), st()), /*$layout$*/ | ||
u[2] !== xt && /*$showProgress$*/ | ||
u[7] ? g ? T[0] & /*$layout$, $showProgress$*/ | ||
132 && x(g, 1) : (g = _e(), g.c(), x(g, 1), g.m(t, l)) : g && (ot(), M(g, 1, 1, () => { | ||
132 && x(g, 1) : (g = _e(), g.c(), x(g, 1), g.m(t, l)) : g && (rt(), L(g, 1, 1, () => { | ||
g = null; | ||
}), rt()), E && E.p && (!m || T[0] & /*$$scope*/ | ||
536870912) && mt( | ||
}), st()), E && E.p && (!_ || T[0] & /*$$scope*/ | ||
536870912) && vt( | ||
E, | ||
@@ -1816,3 +1827,3 @@ P, | ||
u[29], | ||
m ? yt( | ||
_ ? bt( | ||
P, | ||
@@ -1823,3 +1834,3 @@ /*$$scope*/ | ||
null | ||
) : vt( | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1829,11 +1840,11 @@ u[29] | ||
null | ||
), L && L.p && (!m || T[0] & /*$$scope*/ | ||
536870912) && mt( | ||
L, | ||
Y, | ||
), B && B.p && (!_ || T[0] & /*$$scope*/ | ||
536870912) && vt( | ||
B, | ||
W, | ||
u, | ||
/*$$scope*/ | ||
u[29], | ||
m ? yt( | ||
Y, | ||
_ ? bt( | ||
W, | ||
/*$$scope*/ | ||
@@ -1843,3 +1854,3 @@ u[29], | ||
fr | ||
) : vt( | ||
) : yt( | ||
/*$$scope*/ | ||
@@ -1850,11 +1861,11 @@ u[29] | ||
), /*$layout$*/ | ||
u[2] === kt && /*$showProgress$*/ | ||
u[2] === xt && /*$showProgress$*/ | ||
u[7] ? A ? T[0] & /*$layout$, $showProgress$*/ | ||
132 && x(A, 1) : (A = me(), A.c(), x(A, 1), A.m(p, d)) : A && (ot(), M(A, 1, 1, () => { | ||
132 && x(A, 1) : (A = me(), A.c(), x(A, 1), A.m(p, d)) : A && (rt(), L(A, 1, 1, () => { | ||
A = null; | ||
}), rt()), /*$showCtrlBtns$*/ | ||
}), st()), /*$showCtrlBtns$*/ | ||
u[8] ? S ? (S.p(u, T), T[0] & /*$showCtrlBtns$*/ | ||
256 && x(S, 1)) : (S = ve(u), S.c(), x(S, 1), S.m(p, null)) : S && (ot(), M(S, 1, 1, () => { | ||
256 && x(S, 1)) : (S = ve(u), S.c(), x(S, 1), S.m(p, null)) : S && (rt(), L(S, 1, 1, () => { | ||
S = null; | ||
}), rt()), (!m || T[0] & /*$popoverClass$, $layout$, cssClassName*/ | ||
}), st()), (!_ || T[0] & /*$popoverClass$, $layout$, cssClassName*/ | ||
7 && w !== (w = "thisway-popover " + /*$popoverClass$*/ | ||
@@ -1864,3 +1875,3 @@ u[1] + " thisway-popover__" + /*$layout$*/ | ||
u[0])) && k(t, "class", w), T[0] & /*$title$, $description$, $$slots*/ | ||
268435480 && B( | ||
268435480 && H( | ||
t, | ||
@@ -1876,48 +1887,48 @@ "display", | ||
i(u) { | ||
m || (x(c), x(h), x(g), x(E, u), x(L, u), x(A), x(S), m = !0); | ||
_ || (x(c), x(h), x(g), x(E, u), x(B, u), x(A), x(S), _ = !0); | ||
}, | ||
o(u) { | ||
M(c), M(h), M(g), M(E, u), M(L, u), M(A), M(S), m = !1; | ||
L(c), L(h), L(g), L(E, u), L(B, u), L(A), L(S), _ = !1; | ||
}, | ||
d(u) { | ||
u && R(t), $ && $.d(), c && c.d(), h && h.d(), g && g.d(), E && E.d(u), L && L.d(u), A && A.d(), S && S.d(); | ||
u && R(t), $ && $.d(), c && c.d(), h && h.d(), g && g.d(), E && E.d(u), B && B.d(u), A && A.d(), S && S.d(); | ||
} | ||
}; | ||
} | ||
function $r(e, t, o) { | ||
let r, n, s, i, a, l, f, p, y, d, b, C, { $$slots: w = {}, $$scope: m } = t; | ||
function $r(o, t, e) { | ||
let r, n, s, i, a, l, f, p, y, d, b, C, { $$slots: w = {}, $$scope: _ } = t; | ||
const $ = xo(w); | ||
let { cssClassName: c = "" } = t; | ||
const h = eo(), g = H(Et), P = Re(), E = H(Kt), Y = H(Xt), L = H(Wt), A = N(Y, (v) => { | ||
var z; | ||
return `thisway-popover-${(z = v == null ? void 0 : v.orientation) == null ? void 0 : z.toLowerCase()}`; | ||
const h = eo(), g = V(Et), P = Re(), E = V(Kt), W = V(Xt), B = V(Wt), A = I(W, (v) => { | ||
var J; | ||
return `thisway-popover-${(J = v == null ? void 0 : v.orientation) == null ? void 0 : J.toLowerCase()}`; | ||
}); | ||
O(e, A, (v) => o(1, r = v)); | ||
const S = N(Y, (v) => `thisway-popover__arrow-${v == null ? void 0 : v.alignment.toLowerCase()}`); | ||
O(e, S, (v) => o(5, a = v)); | ||
const u = je(), T = N(E, (v) => v > 1); | ||
O(e, T, (v) => o(11, b = v)); | ||
const lt = N([T, P], ([v, z]) => v && (z || 0) > 0); | ||
O(e, lt, (v) => o(9, y = v)); | ||
const st = F(u, "title"); | ||
O(e, st, (v) => o(3, s = v)); | ||
const ct = F(u, "description"); | ||
O(e, ct, (v) => o(4, i = v)); | ||
const pt = F(u, "showCloseBtn"); | ||
O(e, pt, (v) => o(6, l = v)); | ||
const K = F(u, "showCtrlBtns"); | ||
O(e, K, (v) => o(8, p = v)); | ||
O(o, A, (v) => e(1, r = v)); | ||
const S = I(W, (v) => `thisway-popover__arrow-${v == null ? void 0 : v.alignment.toLowerCase()}`); | ||
O(o, S, (v) => e(5, a = v)); | ||
const u = je(), T = I(E, (v) => v > 1); | ||
O(o, T, (v) => e(11, b = v)); | ||
const lt = I([T, P], ([v, J]) => v && (J || 0) > 0); | ||
O(o, lt, (v) => e(9, y = v)); | ||
const ct = F(u, "title"); | ||
O(o, ct, (v) => e(3, s = v)); | ||
const ot = F(u, "description"); | ||
O(o, ot, (v) => e(4, i = v)); | ||
const dt = F(u, "showCloseBtn"); | ||
O(o, dt, (v) => e(6, l = v)); | ||
const Y = F(u, "showCtrlBtns"); | ||
O(o, Y, (v) => e(8, p = v)); | ||
const j = F(u, "showProgress", !0); | ||
O(e, j, (v) => o(7, f = v)); | ||
const Q = F(u, "prevBtnText"); | ||
O(e, Q, (v) => o(10, d = v)); | ||
const tt = F(L, "layout", kt); | ||
O(e, tt, (v) => o(2, n = v)); | ||
const _ = Ye(g.store, P), V = N([u, _, P, tt], ([v, z, wt, Ht]) => { | ||
O(o, j, (v) => e(7, f = v)); | ||
const tt = F(u, "prevBtnText"); | ||
O(o, tt, (v) => e(10, d = v)); | ||
const et = F(B, "layout", xt); | ||
O(o, et, (v) => e(2, n = v)); | ||
const K = Ye(g.store, P), m = I([u, K, P, et], ([v, J, wt, Ht]) => { | ||
var Jt; | ||
if (wt === 0) | ||
return v.startBtnText; | ||
if (z) | ||
if (J) | ||
if (Ht === Ae) { | ||
const ze = ((Jt = z.popover) == null ? void 0 : Jt.title) ?? ""; | ||
const ze = ((Jt = J.popover) == null ? void 0 : Jt.title) ?? ""; | ||
return `${v.nextBtnText} ${ze}`; | ||
@@ -1929,6 +1940,6 @@ } else | ||
}); | ||
O(e, V, (v) => o(12, C = v)); | ||
const et = () => h("close"), G = () => h("previous"), U = () => h("next"); | ||
return e.$$set = (v) => { | ||
"cssClassName" in v && o(0, c = v.cssClassName), "$$scope" in v && o(29, m = v.$$scope); | ||
O(o, m, (v) => e(12, C = v)); | ||
const X = () => h("close"), U = () => h("previous"), M = () => h("next"); | ||
return o.$$set = (v) => { | ||
"cssClassName" in v && e(0, c = v.cssClassName), "$$scope" in v && e(29, _ = v.$$scope); | ||
}, [ | ||
@@ -1952,21 +1963,21 @@ c, | ||
lt, | ||
st, | ||
ct, | ||
pt, | ||
K, | ||
ot, | ||
dt, | ||
Y, | ||
j, | ||
Q, | ||
tt, | ||
V, | ||
et, | ||
G, | ||
m, | ||
X, | ||
U, | ||
M, | ||
$, | ||
m, | ||
_, | ||
w | ||
]; | ||
} | ||
class Cr extends bt { | ||
class Cr extends $t { | ||
constructor(t) { | ||
super(), $t(this, t, $r, br, Ct, { cssClassName: 0 }, cr, [-1, -1]); | ||
super(), Ct(this, t, $r, br, kt, { cssClassName: 0 }, cr, [-1, -1]); | ||
} | ||
@@ -1976,7 +1987,7 @@ } | ||
constructor(t) { | ||
J(this, "options$"); | ||
Q(this, "options$"); | ||
this.options$ = t; | ||
} | ||
getTotalCount(t) { | ||
return N(t.effectiveSteps$, (o) => o.length); | ||
return I(t.effectiveSteps$, (e) => e.length); | ||
} | ||
@@ -1987,3 +1998,3 @@ async waitForElement(t) { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
getComponent(t, o, r) { | ||
getComponent(t, e, r) { | ||
switch (t) { | ||
@@ -1999,3 +2010,3 @@ case "popover": | ||
constructor(t) { | ||
const { steps: o } = t, r = dt(t), n = new kr(r); | ||
const { steps: e } = t, r = ut(t), n = new kr(r); | ||
for (const s of [ | ||
@@ -2014,17 +2025,17 @@ "beforeStepChange", | ||
} | ||
super(Eo(Tr(o), void 0), n, Be(), r); | ||
super(Eo(Tr(e), void 0), n, Be(), r); | ||
} | ||
} | ||
const Tr = (e) => { | ||
let t = e.length; | ||
const o = /* @__PURE__ */ new Set(), r = (s) => typeof s == "string" || Number.isFinite(s) && !o.has(s), n = (s) => { | ||
if (!o.has(s)) | ||
return o.add(s), s; | ||
for (; o.has(t); ) | ||
const Tr = (o) => { | ||
let t = o.length; | ||
const e = /* @__PURE__ */ new Set(), r = (s) => typeof s == "string" || Number.isFinite(s) && !e.has(s), n = (s) => { | ||
if (!e.has(s)) | ||
return e.add(s), s; | ||
for (; e.has(t); ) | ||
t++; | ||
return t; | ||
}; | ||
for (const s of e) | ||
r(s.id) && o.add(s.id); | ||
return e.map((s, i) => { | ||
for (const s of o) | ||
r(s.id) && e.add(s.id); | ||
return o.map((s, i) => { | ||
const a = r(s.id) ? s.id : n(i); | ||
@@ -2036,7 +2047,7 @@ return { | ||
}); | ||
}, Vr = (e) => { | ||
}, Vr = (o) => { | ||
const t = new xr({ | ||
steps: [ | ||
{ | ||
...e, | ||
...o, | ||
id: 0 | ||
@@ -2048,5 +2059,5 @@ } | ||
}; | ||
function Or(e) { | ||
const t = H(Yt), { onMount: o, onDestroy: r } = H(So), n = t.subscribe((s) => { | ||
s ? o(s) : r(); | ||
function Or(o) { | ||
const t = V(Yt), { onMount: e, onDestroy: r } = V(So), n = t.subscribe((s) => { | ||
s ? e(s) : r(); | ||
}); | ||
@@ -2057,5 +2068,5 @@ return Ce(() => { | ||
} | ||
class Fr extends bt { | ||
class Fr extends $t { | ||
constructor(t) { | ||
super(), $t(this, t, Or, null, Ct, {}); | ||
super(), Ct(this, t, Or, null, kt, {}); | ||
} | ||
@@ -2086,5 +2097,5 @@ } | ||
Io as defaultKeydownAction, | ||
Z as defineContext, | ||
z as defineContext, | ||
Dt as findStepIndex, | ||
H as getContext, | ||
V as getContext, | ||
Ge as getHighlightOptions, | ||
@@ -2091,0 +2102,0 @@ Ye as getNextStep, |
@@ -1,2 +0,2 @@ | ||
import type { IStepsStore, ITourController, Step, StepIdType } from '@thisway/base'; | ||
import type { IStepsStore, ITourController, MaybeStepId, Step, StepIdType } from '@thisway/base'; | ||
export interface GetActiveStepReturnValue<T extends Step = Step> { | ||
@@ -20,4 +20,5 @@ step: T | undefined; | ||
getActiveStep(): GetActiveStepReturnValue<T>; | ||
getStepById(id: StepIdType): Step | undefined; | ||
goStep(id: string | number | null | undefined): void; | ||
getStepById(id: MaybeStepId): T | undefined; | ||
getStepIndex(id: MaybeStepId): number; | ||
goStep(id: MaybeStepId): void; | ||
getFirstStep(): T | undefined; | ||
@@ -24,0 +25,0 @@ getLastStep(): T | undefined; |
{ | ||
"name": "@thisway/next", | ||
"version": "0.12.0-beta.1", | ||
"version": "0.12.0-beta.2", | ||
"type": "module", | ||
"dependencies": { | ||
"@thisway/base": ">=0.10.0-beta.0", | ||
"@thisway/base": ">=0.10.0-beta.2", | ||
"@thisway/utils": "^0.5.0", | ||
@@ -8,0 +8,0 @@ "svelte": "^4.2.1" |
Sorry, the diff of this file is not supported yet
111794
2426