@bigplay/tree-view 0.5.0 → 0.6.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.js CHANGED
@@ -1,7 +1,7 @@
1
- import { defineComponent as D, openBlock as s, createElementBlock as d, createElementVNode as C, toDisplayString as _, withModifiers as Q, createCommentVNode as z, ref as g, watch as O, onBeforeUnmount as P, computed as f, onMounted as V, nextTick as U, normalizeStyle as S, normalizeClass as E, unref as j, Fragment as I, renderList as M, renderSlot as R, createVNode as K, createTextVNode as q } from "vue";
2
- import { IDENTITY_TRANSFORM as J, PanZoomController as X, toTree as ee, applyCollapsed as te, layoutTree as oe, toggleCollapsed as ne, estimateVisibleRect as ae, measureVisibleRect as re, DEFAULT_OVERSCAN as ie, visibleLayout as le, toCssTransform as se, DEFAULT_SCALE_LIMITS as de, buildBracketCard as ce, MOBILE_MEDIA_QUERY as ve, resolveOptions as ue, DEFAULT_OPTIONS as pe, levelGapForWidth as fe, buildBracketRounds as he, SWIPE_ELBOW_OFFSET as be, roundSiblingGap as we, watchMedia as me, watchWidth as ge, watchChildren as ke, hideRoundsBefore as xe, roundOfDepth as _e, roundAtScroll as ye, findScrollParent as Ce, nodesInColumn as Te, horizontalBox as ze, offsetWithin as Se, smoothScrollLeft as Ee, roundScrollLeft as $e, injectStyles as Be } from "@bigplay/tree-view-core";
3
- import { DEFAULT_OPTIONS as at, MOBILE_MEDIA_QUERY as rt, bracketCardHeight as it, buildBracketCard as lt, buildBracketRounds as st } from "@bigplay/tree-view-core";
4
- const Le = { class: "tree-view-card" }, Ie = { class: "tree-view-card__label" }, Oe = ["aria-label"], Y = /* @__PURE__ */ D({
1
+ import { defineComponent as P, openBlock as d, createElementBlock as c, createElementVNode as y, toDisplayString as E, withModifiers as ee, createCommentVNode as L, ref as g, watch as F, onBeforeUnmount as Y, computed as p, onMounted as Z, inject as re, nextTick as q, normalizeStyle as S, normalizeClass as M, unref as J, Fragment as R, renderList as N, renderSlot as V, createVNode as le, provide as ie, createTextVNode as se } from "vue";
2
+ import { IDENTITY_TRANSFORM as de, PanZoomController as ce, toTree as ue, applyCollapsed as ve, layoutTree as pe, toggleCollapsed as fe, estimateVisibleRect as he, measureVisibleRect as be, DEFAULT_OVERSCAN as me, visibleLayout as ge, resolveOptions as te, roundContentHeight as we, toCssTransform as ke, DEFAULT_SCALE_LIMITS as _e, buildBracketCard as xe, MOBILE_MEDIA_QUERY as ye, DEFAULT_OPTIONS as Ce, levelGapForWidth as Te, buildBracketRounds as Ee, SWIPE_ELBOW_OFFSET as Se, roundSiblingGap as ze, watchMedia as $e, watchWidth as Be, watchChildren as Le, hideRoundsBefore as Ie, roundOfDepth as Oe, roundAtScroll as Me, findScrollParent as Re, nodesInColumn as De, horizontalBox as Ne, offsetWithin as He, smoothScrollLeft as Ae, roundScrollLeft as We, afterScrollEnd as X, injectStyles as Fe } from "@bigplay/tree-view-core";
3
+ import { DEFAULT_OPTIONS as ht, MOBILE_MEDIA_QUERY as bt, bracketCardHeight as mt, buildBracketCard as gt, buildBracketRounds as wt } from "@bigplay/tree-view-core";
4
+ const oe = /* @__PURE__ */ Symbol("tv-active-round"), Ve = { class: "tree-view-card" }, Pe = { class: "tree-view-card__label" }, Ge = ["aria-label"], ne = /* @__PURE__ */ P({
5
5
  __name: "TreeNodeCard",
6
6
  props: {
7
7
  label: {},
@@ -9,70 +9,70 @@ const Le = { class: "tree-view-card" }, Ie = { class: "tree-view-card__label" },
9
9
  collapsed: { type: Boolean }
10
10
  },
11
11
  emits: ["toggle"],
12
- setup(o, { emit: c }) {
13
- const i = c;
14
- return (e, a) => (s(), d("div", Le, [
15
- C("span", Ie, _(o.label), 1),
16
- o.hasChildren ? (s(), d("button", {
12
+ setup(t, { emit: f }) {
13
+ const s = f;
14
+ return (e, r) => (d(), c("div", Ve, [
15
+ y("span", Pe, E(t.label), 1),
16
+ t.hasChildren ? (d(), c("button", {
17
17
  key: 0,
18
18
  type: "button",
19
19
  class: "tree-view-card__toggle",
20
20
  "data-tv-no-pan": "",
21
- "aria-label": o.collapsed ? "Развернуть" : "Свернуть",
22
- onClick: a[0] || (a[0] = Q((u) => i("toggle"), ["stop"]))
23
- }, _(o.collapsed ? "+" : "−"), 9, Oe)) : z("", !0)
21
+ "aria-label": t.collapsed ? "Развернуть" : "Свернуть",
22
+ onClick: r[0] || (r[0] = ee((h) => s("toggle"), ["stop"]))
23
+ }, E(t.collapsed ? "+" : "−"), 9, Ge)) : L("", !0)
24
24
  ]));
25
25
  }
26
26
  });
27
- function Me(o) {
28
- const c = g({ ...J }), i = new X({
29
- pannable: o.pannable,
30
- zoomable: o.zoomable,
31
- limits: o.limits,
27
+ function Ue(t) {
28
+ const f = g({ ...de }), s = new ce({
29
+ pannable: t.pannable,
30
+ zoomable: t.zoomable,
31
+ limits: t.limits,
32
32
  onChange: (e) => {
33
- c.value = e;
33
+ f.value = e;
34
34
  }
35
35
  });
36
- return O(
37
- o.element,
38
- (e, a, u) => {
39
- e && (i.attach(e), u(() => i.detach()));
36
+ return F(
37
+ t.element,
38
+ (e, r, h) => {
39
+ e && (s.attach(e), h(() => s.detach()));
40
40
  },
41
41
  { immediate: !0 }
42
- ), P(() => i.detach()), {
43
- transform: c,
44
- fit: (e, a) => i.fit(e, a),
45
- zoomIn: () => i.zoomIn(),
46
- zoomOut: () => i.zoomOut(),
47
- reset: () => i.reset(),
48
- setTransform: (e) => i.set(e)
42
+ ), Y(() => s.detach()), {
43
+ transform: f,
44
+ fit: (e, r) => s.fit(e, r),
45
+ zoomIn: () => s.zoomIn(),
46
+ zoomOut: () => s.zoomOut(),
47
+ reset: () => s.reset(),
48
+ setTransform: (e) => s.set(e)
49
49
  };
50
50
  }
51
- function Re(o) {
52
- const c = g(/* @__PURE__ */ new Set()), i = f(() => ee(o.data(), o.accessors())), e = f(() => te(i.value, c.value)), a = f(() => oe(e.value, o.options()));
53
- function u(b) {
54
- return c.value.has(b);
51
+ function je(t) {
52
+ const f = g(/* @__PURE__ */ new Set()), s = p(() => ue(t.data(), t.accessors())), e = p(() => ve(s.value, f.value)), r = p(() => pe(e.value, t.options()));
53
+ function h(b) {
54
+ return f.value.has(b);
55
55
  }
56
- function m(b) {
57
- c.value = ne(c.value, b);
56
+ function _(b) {
57
+ f.value = fe(f.value, b);
58
58
  }
59
59
  function l() {
60
- c.value = /* @__PURE__ */ new Set();
60
+ f.value = /* @__PURE__ */ new Set();
61
61
  }
62
- return { layout: a, isCollapsed: u, toggle: m, expandAll: l };
62
+ return { layout: r, isCollapsed: h, toggle: _, expandAll: l };
63
63
  }
64
- function De(o, c, i) {
65
- const e = g(i() ? ae() : null);
66
- function a() {
67
- e.value = i() ? re(o.value, c()) : null;
64
+ function Qe(t, f, s) {
65
+ const e = g(s() ? he() : null);
66
+ function r() {
67
+ e.value = s() ? be(t.value, f()) : null;
68
68
  }
69
- return V(() => {
70
- a(), window.addEventListener("scroll", a, { passive: !0, capture: !0 }), window.addEventListener("resize", a, { passive: !0 });
71
- }), P(() => {
72
- window.removeEventListener("scroll", a, { capture: !0 }), window.removeEventListener("resize", a);
73
- }), { rect: e, update: a };
69
+ return Z(() => {
70
+ r(), window.addEventListener("scroll", r, { passive: !0, capture: !0 }), window.addEventListener("resize", r, { passive: !0 });
71
+ }), Y(() => {
72
+ window.removeEventListener("scroll", r, { capture: !0 }), window.removeEventListener("resize", r);
73
+ }), { rect: e, update: r };
74
74
  }
75
- const Ne = ["width", "height"], We = ["data-depth"], Fe = ["d"], He = ["data-depth", "onClick"], Ae = /* @__PURE__ */ D({
75
+ const Ye = ["width", "height"], Ze = ["data-depth"], Ke = ["d"], qe = ["data-depth", "onClick"], Je = /* @__PURE__ */ P({
76
76
  __name: "TreeView",
77
77
  props: {
78
78
  data: {},
@@ -88,11 +88,11 @@ const Ne = ["width", "height"], We = ["data-depth"], Fe = ["d"], He = ["data-dep
88
88
  scaleLimits: { default: void 0 },
89
89
  nodeClass: { type: [String, Function], default: void 0 },
90
90
  virtualize: { type: Boolean, default: !0 },
91
- overscan: { default: ie }
91
+ overscan: { default: me }
92
92
  },
93
93
  emits: ["node-click", "toggle", "transform"],
94
- setup(o, { expose: c, emit: i }) {
95
- const e = o, a = i, u = g(null), m = g(null), { layout: l, isCollapsed: b, toggle: r, expandAll: w } = Re({
94
+ setup(t, { expose: f, emit: s }) {
95
+ const e = t, r = s, h = g(null), _ = g(null), { layout: l, isCollapsed: b, toggle: u, expandAll: z } = je({
96
96
  data: () => e.data,
97
97
  options: () => e.options,
98
98
  accessors: () => ({
@@ -100,135 +100,143 @@ const Ne = ["width", "height"], We = ["data-depth"], Fe = ["d"], He = ["data-dep
100
100
  getChildren: e.getChildren,
101
101
  getParentId: e.getParentId
102
102
  })
103
- }), p = Me({
104
- element: u,
103
+ }), v = Ue({
104
+ element: h,
105
105
  pannable: () => e.pannable,
106
106
  zoomable: () => e.zoomable,
107
- limits: () => e.scaleLimits ?? de
108
- }), T = De(
109
- m,
110
- () => p.transform.value.scale,
107
+ limits: () => e.scaleLimits ?? _e
108
+ }), m = Qe(
109
+ _,
110
+ () => v.transform.value.scale,
111
111
  () => e.virtualize
112
- ), $ = f(
113
- () => e.virtualize ? le(l.value, T.rect.value, e.overscan) : l.value
114
- ), k = f(() => ({
112
+ ), C = p(
113
+ () => e.virtualize ? ge(l.value, m.rect.value, e.overscan) : l.value
114
+ ), H = re(oe, g(null)), A = p(() => {
115
+ const o = te(e.options).direction;
116
+ return o === "right-to-left" || o === "bottom-to-top";
117
+ }), w = p(() => {
118
+ const o = H.value;
119
+ if (o === null) return l.value.height;
120
+ const x = l.value.nodes.reduce((B, Q) => Math.max(B, Q.depth), 0) + 1;
121
+ return we(l.value.nodes, o, x, A.value) || l.value.height;
122
+ }), G = p(() => ({
115
123
  width: `${l.value.width}px`,
116
- height: `${l.value.height}px`,
117
- transform: se(p.transform.value)
118
- })), N = f(() => {
124
+ height: `${w.value}px`,
125
+ transform: ke(v.transform.value)
126
+ })), U = p(() => {
119
127
  if (e.size !== "content") return;
120
- const { scale: n } = p.transform.value;
128
+ const { scale: o } = v.transform.value;
121
129
  return {
122
- width: `${l.value.width * n}px`,
123
- height: `${l.value.height * n}px`,
130
+ width: `${l.value.width * o}px`,
131
+ height: `${w.value * o}px`,
124
132
  overflow: "visible"
125
133
  };
126
134
  });
127
- function W(n) {
135
+ function W(o) {
128
136
  return {
129
- left: `${n.x}px`,
130
- top: `${n.y}px`,
131
- width: `${n.width}px`,
132
- height: `${n.height}px`
137
+ left: `${o.x}px`,
138
+ top: `${o.y}px`,
139
+ width: `${o.width}px`,
140
+ height: `${o.height}px`
133
141
  };
134
142
  }
135
- function F(n) {
136
- return typeof e.nodeClass == "function" ? e.nodeClass(n) : e.nodeClass;
143
+ function j(o) {
144
+ return typeof e.nodeClass == "function" ? e.nodeClass(o) : e.nodeClass;
137
145
  }
138
- function H(n) {
139
- const x = n.data;
140
- return x?.name ?? x?.title ?? x?.label ?? n.id;
146
+ function D(o) {
147
+ const x = o.data;
148
+ return x?.name ?? x?.title ?? x?.label ?? o.id;
141
149
  }
142
- function y(n) {
143
- r(n.id), a("toggle", n, b(n.id));
150
+ function $(o) {
151
+ u(o.id), r("toggle", o, b(o.id));
144
152
  }
145
- function A(n, x) {
146
- a("node-click", n, x), e.collapsible && n.hasChildren && y(n);
153
+ function I(o, x) {
154
+ r("node-click", o, x), e.collapsible && o.hasChildren && $(o);
147
155
  }
148
- function B(n) {
149
- p.fit({ width: l.value.width, height: l.value.height }, n);
156
+ function O(o) {
157
+ v.fit({ width: l.value.width, height: l.value.height }, o);
150
158
  }
151
- return V(() => {
152
- e.fitOnMount && U(() => B());
153
- }), O(
154
- () => p.transform.value,
155
- (n) => {
156
- T.update(), a("transform", n);
159
+ return Z(() => {
160
+ e.fitOnMount && q(() => O());
161
+ }), F(
162
+ () => v.transform.value,
163
+ (o) => {
164
+ m.update(), r("transform", o);
157
165
  }
158
- ), O(l, () => {
159
- U(() => T.update());
160
- }), c({
161
- fit: B,
162
- zoomIn: p.zoomIn,
163
- zoomOut: p.zoomOut,
164
- resetTransform: p.reset,
165
- setTransform: p.setTransform,
166
- expandAll: w,
167
- toggle: r,
166
+ ), F(l, () => {
167
+ q(() => m.update());
168
+ }), f({
169
+ fit: O,
170
+ zoomIn: v.zoomIn,
171
+ zoomOut: v.zoomOut,
172
+ resetTransform: v.reset,
173
+ setTransform: v.setTransform,
174
+ expandAll: z,
175
+ toggle: u,
168
176
  layout: l,
169
- transform: p.transform
170
- }), (n, x) => (s(), d("div", {
177
+ transform: v.transform
178
+ }), (o, x) => (d(), c("div", {
171
179
  ref_key: "rootElement",
172
- ref: u,
173
- class: E(["tree-view", { "tree-view--pannable": o.pannable, "tree-view--content": o.size === "content" }]),
174
- style: S(N.value)
180
+ ref: h,
181
+ class: M(["tree-view", { "tree-view--pannable": t.pannable, "tree-view--content": t.size === "content" }]),
182
+ style: S(U.value)
175
183
  }, [
176
- C("div", {
184
+ y("div", {
177
185
  ref_key: "canvasElement",
178
- ref: m,
186
+ ref: _,
179
187
  class: "tree-view__canvas",
180
- style: S(k.value)
188
+ style: S(G.value)
181
189
  }, [
182
- (s(), d("svg", {
190
+ (d(), c("svg", {
183
191
  class: "tree-view__links",
184
- width: j(l).width,
185
- height: j(l).height
192
+ width: J(l).width,
193
+ height: J(l).height
186
194
  }, [
187
- (s(!0), d(I, null, M($.value.links, (t) => (s(), d("g", {
188
- key: t.id,
189
- "data-depth": t.target.depth
195
+ (d(!0), c(R, null, N(C.value.links, (i) => (d(), c("g", {
196
+ key: i.id,
197
+ "data-depth": i.target.depth
190
198
  }, [
191
- R(n.$slots, "link", { link: t }, () => [
192
- C("path", {
199
+ V(o.$slots, "link", { link: i }, () => [
200
+ y("path", {
193
201
  class: "tree-view__link",
194
- d: t.path
195
- }, null, 8, Fe)
202
+ d: i.path
203
+ }, null, 8, Ke)
196
204
  ])
197
- ], 8, We))), 128))
198
- ], 8, Ne)),
199
- (s(!0), d(I, null, M($.value.nodes, (t) => (s(), d("div", {
200
- key: t.id,
201
- class: E(["tree-view__node", F(t)]),
202
- style: S(W(t)),
203
- "data-depth": t.depth,
204
- onClick: (h) => A(t, h)
205
+ ], 8, Ze))), 128))
206
+ ], 8, Ye)),
207
+ (d(!0), c(R, null, N(C.value.nodes, (i) => (d(), c("div", {
208
+ key: i.id,
209
+ class: M(["tree-view__node", j(i)]),
210
+ style: S(W(i)),
211
+ "data-depth": i.depth,
212
+ onClick: (B) => I(i, B)
205
213
  }, [
206
- R(n.$slots, "node", {
207
- node: t,
208
- data: t.data,
209
- depth: t.depth,
210
- collapsed: t.collapsed,
211
- hasChildren: t.hasChildren,
212
- toggle: () => y(t)
214
+ V(o.$slots, "node", {
215
+ node: i,
216
+ data: i.data,
217
+ depth: i.depth,
218
+ collapsed: i.collapsed,
219
+ hasChildren: i.hasChildren,
220
+ toggle: () => $(i)
213
221
  }, () => [
214
- K(Y, {
215
- label: H(t),
216
- "has-children": t.hasChildren,
217
- collapsed: t.collapsed,
218
- onToggle: (h) => y(t)
222
+ le(ne, {
223
+ label: D(i),
224
+ "has-children": i.hasChildren,
225
+ collapsed: i.collapsed,
226
+ onToggle: (B) => $(i)
219
227
  }, null, 8, ["label", "has-children", "collapsed", "onToggle"])
220
228
  ])
221
- ], 14, He))), 128))
229
+ ], 14, qe))), 128))
222
230
  ], 4)
223
231
  ], 6));
224
232
  }
225
- }), Pe = {
233
+ }), Xe = {
226
234
  key: 0,
227
235
  class: "tv-bracket__hint"
228
- }, Ve = ["title", "aria-label", "aria-expanded"], Ge = { class: "tv-bracket__rows" }, Ue = ["title", "onClick", "onMouseenter"], je = {
236
+ }, et = ["title", "aria-label", "aria-expanded"], tt = { class: "tv-bracket__rows" }, ot = ["title", "onClick", "onMouseenter"], nt = {
229
237
  key: 0,
230
238
  class: "tv-bracket__tooltip"
231
- }, Qe = { class: "tv-bracket__name" }, Ye = { class: "tv-bracket__score" }, Ze = /* @__PURE__ */ D({
239
+ }, at = { class: "tv-bracket__name" }, rt = { class: "tv-bracket__score" }, lt = /* @__PURE__ */ P({
232
240
  __name: "BracketCard",
233
241
  props: {
234
242
  match: {},
@@ -242,51 +250,51 @@ const Ne = ["width", "height"], We = ["data-depth"], Fe = ["d"], He = ["data-dep
242
250
  expandHint: { default: "Показать предыдущие матчи" }
243
251
  },
244
252
  emits: ["select", "toggle"],
245
- setup(o, { emit: c }) {
246
- const i = o, e = c, a = g(null), u = f(
247
- () => ce(i.match, { rows: i.rows, techDefeatLabel: i.techDefeatLabel })
253
+ setup(t, { emit: f }) {
254
+ const s = t, e = f, r = g(null), h = p(
255
+ () => xe(s.match, { rows: s.rows, techDefeatLabel: s.techDefeatLabel })
248
256
  );
249
- function m(l) {
257
+ function _(l) {
250
258
  l.team && e("select", l.team, l);
251
259
  }
252
- return (l, b) => (s(), d("div", {
253
- class: E(["tv-bracket", { "tv-bracket--my-team": u.value.hasMyTeam }])
260
+ return (l, b) => (d(), c("div", {
261
+ class: M(["tv-bracket", { "tv-bracket--my-team": h.value.hasMyTeam }])
254
262
  }, [
255
- u.value.hasMyTeam && o.myTeamHint ? (s(), d("div", Pe, _(o.myTeamHint), 1)) : z("", !0),
256
- o.hasChildren ? (s(), d("button", {
263
+ h.value.hasMyTeam && t.myTeamHint ? (d(), c("div", Xe, E(t.myTeamHint), 1)) : L("", !0),
264
+ t.hasChildren ? (d(), c("button", {
257
265
  key: 1,
258
266
  type: "button",
259
- class: E(["tv-bracket__toggle", { "tv-bracket__toggle--collapsed": o.collapsed }]),
260
- title: o.collapsed ? o.expandHint : o.collapseHint,
261
- "aria-label": o.collapsed ? o.expandHint : o.collapseHint,
262
- "aria-expanded": !o.collapsed,
267
+ class: M(["tv-bracket__toggle", { "tv-bracket__toggle--collapsed": t.collapsed }]),
268
+ title: t.collapsed ? t.expandHint : t.collapseHint,
269
+ "aria-label": t.collapsed ? t.expandHint : t.collapseHint,
270
+ "aria-expanded": !t.collapsed,
263
271
  "data-tv-no-pan": "",
264
- onClick: b[0] || (b[0] = Q((r) => e("toggle"), ["stop"]))
265
- }, _(o.collapsed ? "+" : "−"), 11, Ve)) : z("", !0),
266
- C("div", Ge, [
267
- (s(!0), d(I, null, M(u.value.rows, (r) => (s(), d("div", {
268
- key: r.key,
269
- class: E(["tv-bracket__row", {
270
- "tv-bracket__row--winner": r.isWinner,
271
- "tv-bracket__row--loser": r.isLoser && !r.isEmpty,
272
- "tv-bracket__row--my": r.isMyTeam,
273
- "tv-bracket__row--empty": r.isEmpty
272
+ onClick: b[0] || (b[0] = ee((u) => e("toggle"), ["stop"]))
273
+ }, E(t.collapsed ? "+" : "−"), 11, et)) : L("", !0),
274
+ y("div", tt, [
275
+ (d(!0), c(R, null, N(h.value.rows, (u) => (d(), c("div", {
276
+ key: u.key,
277
+ class: M(["tv-bracket__row", {
278
+ "tv-bracket__row--winner": u.isWinner,
279
+ "tv-bracket__row--loser": u.isLoser && !u.isEmpty,
280
+ "tv-bracket__row--my": u.isMyTeam,
281
+ "tv-bracket__row--empty": u.isEmpty
274
282
  }]),
275
- title: r.isMyTeam ? "Моя команда" : void 0,
276
- onClick: (w) => m(r),
277
- onMouseenter: (w) => a.value = r.key,
278
- onMouseleave: b[1] || (b[1] = (w) => a.value = null)
283
+ title: u.isMyTeam ? "Моя команда" : void 0,
284
+ onClick: (z) => _(u),
285
+ onMouseenter: (z) => r.value = u.key,
286
+ onMouseleave: b[1] || (b[1] = (z) => r.value = null)
279
287
  }, [
280
- r.team ? (s(), d(I, { key: 0 }, [
281
- r.isTechDefeat && a.value === r.key ? (s(), d("span", je, _(o.techDefeatHint), 1)) : z("", !0),
282
- C("span", Qe, _(r.team.name), 1),
283
- C("span", Ye, _(r.score), 1)
284
- ], 64)) : z("", !0)
285
- ], 42, Ue))), 128))
288
+ u.team ? (d(), c(R, { key: 0 }, [
289
+ u.isTechDefeat && r.value === u.key ? (d(), c("span", nt, E(t.techDefeatHint), 1)) : L("", !0),
290
+ y("span", at, E(u.team.name), 1),
291
+ y("span", rt, E(u.score), 1)
292
+ ], 64)) : L("", !0)
293
+ ], 42, ot))), 128))
286
294
  ])
287
295
  ], 2));
288
296
  }
289
- }), Ke = ["onClick"], qe = /* @__PURE__ */ D({
297
+ }), it = ["onClick"], st = /* @__PURE__ */ P({
290
298
  __name: "BracketRounds",
291
299
  props: {
292
300
  rounds: {},
@@ -295,131 +303,174 @@ const Ne = ["width", "height"], We = ["data-depth"], Fe = ["d"], He = ["data-dep
295
303
  swipeSiblingGap: { default: 12 },
296
304
  hidePassed: { type: Boolean, default: !0 },
297
305
  swipe: { type: Boolean, default: void 0 },
298
- mobileQuery: { default: ve }
306
+ mobileQuery: { default: ye }
299
307
  },
300
308
  emits: ["select", "round"],
301
- setup(o, { expose: c, emit: i }) {
302
- const e = o, a = i, u = g(null), m = g(null), l = g(!1), b = g(0), r = g(0), w = f(() => e.isShow && (e.swipe ?? l.value)), p = f(() => ue(e.options)), T = f(
303
- () => typeof p.value.nodeWidth == "number" ? p.value.nodeWidth : pe.nodeWidth
304
- ), $ = f(
305
- () => w.value ? fe(b.value, T.value) : p.value.levelGap
306
- ), k = f(
307
- () => he(e.rounds, { nodeWidth: T.value, levelGap: $.value })
308
- ), N = f(
309
- () => p.value.direction === "right-to-left" || p.value.direction === "bottom-to-top"
310
- ), W = f(
311
- () => w.value ? {
309
+ setup(t, { expose: f, emit: s }) {
310
+ const e = t, r = s, h = g(null), _ = g(null), l = g(null), b = g(null), u = g(!1), z = g(0), v = g(0), m = p(() => e.isShow && (e.swipe ?? u.value)), C = p(() => te(e.options)), H = p(
311
+ () => typeof C.value.nodeWidth == "number" ? C.value.nodeWidth : Ce.nodeWidth
312
+ ), A = p(
313
+ () => m.value ? Te(z.value, H.value) : C.value.levelGap
314
+ ), w = p(
315
+ () => Ee(e.rounds, { nodeWidth: H.value, levelGap: A.value })
316
+ ), G = p(
317
+ () => C.value.direction === "right-to-left" || C.value.direction === "bottom-to-top"
318
+ ), U = p(
319
+ () => m.value ? {
312
320
  ...e.options,
313
- levelGap: $.value,
321
+ levelGap: A.value,
314
322
  levelLayout: "stack",
315
323
  siblingGap: e.swipeSiblingGap,
316
- groupGap: (t, h) => we(h, e.swipeSiblingGap),
324
+ groupGap: (n, k) => ze(k, e.swipeSiblingGap),
317
325
  linkStyle: "bracket",
318
- elbowOffset: e.options?.elbowOffset ?? be
326
+ elbowOffset: e.options?.elbowOffset ?? Se
319
327
  } : { ...e.options }
320
- ), F = f(() => ({ width: `${k.value.width}px` })), H = f(
321
- () => e.isShow ? { paddingLeft: `${k.value.offset}px` } : void 0
322
328
  );
323
- function y() {
324
- const t = m.value;
325
- if (!t) return;
326
- const h = w.value && e.hidePassed ? r.value : 0, v = k.value.columns.length;
327
- xe(t, h, (L) => _e(L, v, N.value));
329
+ ie(
330
+ oe,
331
+ p(() => m.value ? v.value : null)
332
+ );
333
+ const W = p(() => ({ width: `${w.value.width}px` })), j = p(
334
+ () => e.isShow ? { paddingLeft: `${w.value.offset}px` } : void 0
335
+ );
336
+ function D() {
337
+ const n = b.value;
338
+ if (!n) return;
339
+ const k = m.value && e.hidePassed ? v.value : 0, a = w.value.columns.length;
340
+ Ie(n, k, (T) => Oe(T, a, G.value));
328
341
  }
329
- function A() {
330
- const t = u.value;
331
- if (!t || !w.value) return;
332
- const h = k.value.columns[0]?.width ?? 0, v = ye(t.scrollLeft, h, k.value.columns.length);
333
- v !== r.value && (r.value = v, a("round", v));
342
+ let $ = !1, I = 0, O = !1;
343
+ function o(n) {
344
+ O || (O = !0, X(n, () => {
345
+ O = !1, I = v.value;
346
+ }));
334
347
  }
335
- O([r, w, k], () => y());
336
- const B = [];
337
- V(() => {
338
- B.push(
339
- me(e.mobileQuery, (t) => {
340
- l.value = t;
348
+ function x() {
349
+ const n = l.value;
350
+ if (!n || !m.value) return;
351
+ _.value && (_.value.scrollLeft = n.scrollLeft);
352
+ const k = w.value.columns[0]?.width ?? 0;
353
+ let a = Me(n.scrollLeft, k, w.value.columns.length);
354
+ if (!$ && k > 0) {
355
+ const T = Math.min(Math.max(a, I - 1), I + 1);
356
+ T !== a && (a = T, n.scrollLeft = a * k), o(n);
357
+ }
358
+ a !== v.value && (v.value = a, r("round", a));
359
+ }
360
+ F([v, m, w], () => D());
361
+ const i = [];
362
+ Z(() => {
363
+ i.push(
364
+ $e(e.mobileQuery, (n) => {
365
+ u.value = n;
341
366
  }),
342
- ge(u.value?.parentElement, (t) => {
343
- b.value = t;
367
+ Be(h.value?.parentElement, (n) => {
368
+ z.value = n;
344
369
  }),
345
370
  // Сетка перерисовывает карточки — скрытое расставляем заново.
346
- ke(m.value, y)
347
- ), y();
348
- }), P(() => B.forEach((t) => t()));
349
- function n(t) {
350
- const h = u.value;
351
- if (!h) return;
352
- const v = w.value ? h : Ce(h);
353
- if (!v) return;
354
- const L = m.value, G = L ? Te(L, t.index, t.width, k.value.offset)[0] : void 0, Z = G ? ze(G, v) : { left: Se(h, v) + t.index * t.width, width: t.width };
355
- Ee(
356
- v,
357
- $e({
358
- ...Z,
359
- viewport: v.clientWidth,
360
- scrollWidth: v.scrollWidth
371
+ Le(b.value, D)
372
+ ), D();
373
+ }), Y(() => i.forEach((n) => n()));
374
+ function B(n) {
375
+ const k = h.value;
376
+ if (!k) return;
377
+ const a = m.value ? l.value : Re(k);
378
+ if (!a) return;
379
+ const T = b.value, K = T ? De(T, n.index, n.width, w.value.offset)[0] : void 0, ae = K ? Ne(K, a) : { left: He(k, a) + n.index * n.width, width: n.width };
380
+ $ = !0, Ae(
381
+ a,
382
+ We({
383
+ ...ae,
384
+ viewport: a.clientWidth,
385
+ scrollWidth: a.scrollWidth
361
386
  })
362
- );
387
+ ), X(a, () => {
388
+ $ = !1, I = v.value;
389
+ });
363
390
  }
364
- function x(t) {
365
- a("select", t), n(t);
391
+ function Q(n) {
392
+ r("select", n), B(n);
366
393
  }
367
- return c({ scrollToRound: n }), (t, h) => (s(), d("div", {
394
+ return f({ scrollToRound: B }), (n, k) => (d(), c("div", {
368
395
  ref_key: "rootElement",
369
- ref: u,
370
- class: E(["tv-rounds", { "tv-rounds--swipe": w.value }]),
371
- onScroll: A
396
+ ref: h,
397
+ class: M(["tv-rounds", { "tv-rounds--swipe": m.value }])
372
398
  }, [
373
- o.isShow ? (s(), d("div", {
399
+ t.isShow ? (d(), c("div", {
374
400
  key: 0,
375
- class: "tv-rounds__bar",
376
- style: S(F.value)
401
+ ref_key: "headElement",
402
+ ref: _,
403
+ class: "tv-rounds__head"
377
404
  }, [
378
- (s(!0), d(I, null, M(k.value.columns, (v) => (s(), d("div", {
379
- key: v.key,
380
- class: "tv-rounds__item",
381
- style: S({ width: `${v.width}px` }),
382
- onClick: (L) => x(v)
405
+ y("div", {
406
+ class: "tv-rounds__bar",
407
+ style: S(W.value)
383
408
  }, [
384
- R(t.$slots, "round", { round: v }, () => [
385
- q(_(v.name), 1)
386
- ])
387
- ], 12, Ke))), 128))
388
- ], 4)) : z("", !0),
389
- C("div", {
390
- ref_key: "contentElement",
391
- ref: m,
392
- class: "tv-rounds__content",
393
- style: S(H.value)
409
+ (d(!0), c(R, null, N(w.value.columns, (a) => (d(), c("div", {
410
+ key: a.key,
411
+ class: "tv-rounds__item",
412
+ style: S({ width: `${a.width}px` }),
413
+ onClick: (T) => Q(a)
414
+ }, [
415
+ V(n.$slots, "round", { round: a }, () => [
416
+ se(E(a.name), 1)
417
+ ])
418
+ ], 12, it))), 128))
419
+ ], 4)
420
+ ], 512)) : L("", !0),
421
+ y("div", {
422
+ ref_key: "scrollElement",
423
+ ref: l,
424
+ class: "tv-rounds__scroll",
425
+ onScroll: x
394
426
  }, [
395
- R(t.$slots, "default", {
396
- options: W.value,
397
- isSwipe: w.value,
398
- round: r.value
399
- })
400
- ], 4)
401
- ], 34));
427
+ m.value ? (d(), c("div", {
428
+ key: 0,
429
+ class: "tv-rounds__snap",
430
+ style: S(W.value),
431
+ "aria-hidden": "true"
432
+ }, [
433
+ (d(!0), c(R, null, N(w.value.columns, (a) => (d(), c("i", {
434
+ key: a.key,
435
+ class: "tv-rounds__snap-item",
436
+ style: S({ width: `${a.width}px` })
437
+ }, null, 4))), 128))
438
+ ], 4)) : L("", !0),
439
+ y("div", {
440
+ ref_key: "contentElement",
441
+ ref: b,
442
+ class: "tv-rounds__content",
443
+ style: S(j.value)
444
+ }, [
445
+ V(n.$slots, "default", {
446
+ options: U.value,
447
+ isSwipe: m.value,
448
+ round: v.value
449
+ })
450
+ ], 4)
451
+ ], 544)
452
+ ], 2));
402
453
  }
403
- }), Je = ".tree-view{--tv-link-color: #cbd5e1;--tv-link-width: 2px;--tv-node-bg: #ffffff;--tv-node-color: #0f172a;--tv-node-border: 1px solid #e2e8f0;--tv-node-radius: 10px;--tv-node-shadow: 0 1px 2px rgb(15 23 42 / 8%);--tv-node-padding: 8px 12px;--tv-accent: #2563eb;position:relative;width:100%;height:100%;overflow:hidden}.tree-view--pannable{cursor:grab;touch-action:none}.tree-view--content{width:auto;height:auto;overflow:visible}.tree-view__canvas{position:absolute;top:0;left:0;transform-origin:0 0}.tree-view__links{position:absolute;top:0;left:0;overflow:visible;pointer-events:none}.tree-view__link{fill:none;stroke:var(--tv-link-color);stroke-width:var(--tv-link-width)}.tree-view__node{position:absolute;box-sizing:border-box;display:flex;align-items:stretch;justify-content:stretch}.tree-view-card{box-sizing:border-box;display:flex;gap:8px;align-items:center;justify-content:space-between;width:100%;height:100%;padding:var(--tv-node-padding);overflow:hidden;color:var(--tv-node-color);background:var(--tv-node-bg);border:var(--tv-node-border);border-radius:var(--tv-node-radius);box-shadow:var(--tv-node-shadow)}.tree-view-card__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tree-view-card__toggle{flex:none;width:20px;height:20px;padding:0;font:inherit;line-height:1;color:var(--tv-accent);cursor:pointer;background:none;border:none}.tv-bracket{--tv-bracket-winner-bg: #0427c4;--tv-bracket-winner-color: #ffffff;--tv-bracket-loser-bg: #e5e5e5;--tv-bracket-loser-color: #7d7d8d;--tv-bracket-my-bg: #00146c;--tv-bracket-my-color: #ffffff;--tv-bracket-radius: 6px;--tv-bracket-shadow: 0 0 0 1px rgb(15 23 42 / 8%), 0 1px 3px rgb(15 23 42 / 10%);position:relative;box-sizing:border-box;display:flex;flex-direction:column;width:100%;height:100%;font-size:12px}.tv-bracket__rows{box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden;border-radius:var(--tv-bracket-radius);box-shadow:var(--tv-bracket-shadow)}.tv-bracket--my-team .tv-bracket__rows{outline:2px solid var(--tv-bracket-my-bg)}.tv-bracket__hint{position:absolute;right:0;bottom:100%;left:0;padding:3px 8px;overflow:hidden;font-size:11px;font-weight:600;line-height:1.2;color:var(--tv-bracket-my-color);text-align:center;text-overflow:ellipsis;white-space:nowrap;background:var(--tv-bracket-my-bg);border-radius:var(--tv-bracket-radius) var(--tv-bracket-radius) 0 0}.tv-bracket__row{position:relative;box-sizing:border-box;display:flex;flex:1 1 0;align-items:center;justify-content:space-between;min-height:0;padding:4px 8px;cursor:pointer;transition:all 75ms}.tv-bracket__row--winner{font-weight:700;color:var(--tv-bracket-winner-color);background:var(--tv-bracket-winner-bg)}.tv-bracket__row--loser{color:var(--tv-bracket-loser-color);background:var(--tv-bracket-loser-bg)}.tv-bracket__row--my{color:var(--tv-bracket-my-color);background:var(--tv-bracket-my-bg)}.tv-bracket__row--empty{cursor:default;background:var(--tv-bracket-loser-bg)}.tv-bracket__toggle{position:absolute;top:50%;left:-11px;z-index:1;display:flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;font:inherit;font-size:13px;font-weight:700;line-height:1;color:var(--tv-bracket-winner-bg);cursor:pointer;background:#fff;border:1px solid #d1d5db;border-radius:50%;box-shadow:0 1px 3px #0f172a2e;transform:translateY(-50%)}.tv-bracket__toggle:hover{border-color:var(--tv-bracket-winner-bg)}.tv-bracket__toggle--collapsed{color:var(--tv-bracket-winner-color);background:var(--tv-bracket-winner-bg);border-color:var(--tv-bracket-winner-bg)}.tv-bracket__name{max-width:120px;overflow:hidden;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.tv-bracket__score{display:flex;flex:none;align-items:center;justify-content:center;width:20px;height:20px;font-weight:700;font-variant-numeric:tabular-nums}.tv-bracket__tooltip{position:absolute;top:-26px;left:6px;z-index:5000;padding:4px 8px;font-weight:400;color:var(--tv-bracket-loser-color);white-space:nowrap;background:#fff;border:1px solid #d1d5db;border-radius:4px;box-shadow:0 4px 10px #0f172a26}.tv-rounds{--tv-rounds-bg: #f5f5f7;--tv-rounds-color: #9ca3af;--tv-rounds-border: 2px solid #e5e7eb;--tv-rounds-gap: 20px;--tv-rounds-fade: .22s;--tv-rounds-collapse-scale: .86;--tv-rounds-collapse-ease: cubic-bezier(.4, 0, .2, 1);--tv-rounds-link-color: #94a3b8;--tv-rounds-link-width: 3px;display:flex;flex-direction:column;width:max-content;min-width:100%}.tv-rounds__bar{display:flex;min-width:100%;margin-bottom:var(--tv-rounds-gap);background:var(--tv-rounds-bg);border-bottom:var(--tv-rounds-border)}.tv-rounds__item{flex:none;box-sizing:border-box;padding:10px 20px;font:inherit;font-size:14px;font-weight:600;color:var(--tv-rounds-color);text-align:center;text-transform:uppercase;white-space:nowrap;background:none;border:none;border-right:var(--tv-rounds-border)}.tv-rounds--swipe .tv-bracket__hint{display:none}.tv-rounds--swipe .tree-view{--tv-link-color: var(--tv-rounds-link-color);--tv-link-width: var(--tv-rounds-link-width)}.tv-rounds--swipe{width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none}.tv-rounds--swipe::-webkit-scrollbar{display:none}.tv-rounds--swipe .tv-rounds__item{scroll-snap-align:start;scroll-snap-stop:always}.tv-rounds--swipe [data-depth]{transition:opacity var(--tv-rounds-fade, .22s) ease,transform var(--tv-rounds-fade, .22s) var(--tv-rounds-collapse-ease)}.tv-rounds--swipe [data-depth].tv-hidden{visibility:hidden;opacity:0;transition:opacity var(--tv-rounds-fade, .22s) ease,transform var(--tv-rounds-fade, .22s) var(--tv-rounds-collapse-ease),visibility 0s linear var(--tv-rounds-fade, .22s)}.tv-rounds--swipe .tree-view__node.tv-hidden{transform:scale(var(--tv-rounds-collapse-scale));transform-origin:right center}.tv-hidden{visibility:hidden}@media(prefers-reduced-motion:reduce){.tv-rounds--swipe [data-depth],.tv-rounds--swipe [data-depth].tv-hidden{transition:none}.tv-rounds--swipe .tree-view__node.tv-hidden{transform:none}}";
404
- Be(Je);
405
- const tt = {
406
- install(o) {
407
- o.component("TreeView", Ae), o.component("TreeNodeCard", Y), o.component("BracketCard", Ze), o.component("BracketRounds", qe);
454
+ }), dt = ".tree-view{--tv-link-color: #cbd5e1;--tv-link-width: 2px;--tv-node-bg: #ffffff;--tv-node-color: #0f172a;--tv-node-border: 1px solid #e2e8f0;--tv-node-radius: 10px;--tv-node-shadow: 0 1px 2px rgb(15 23 42 / 8%);--tv-node-padding: 8px 12px;--tv-accent: #2563eb;position:relative;width:100%;height:100%;overflow:hidden}.tree-view--pannable{cursor:grab;touch-action:none}.tree-view--content{width:auto;height:auto;overflow:visible}.tree-view__canvas{position:absolute;top:0;left:0;transform-origin:0 0}.tree-view__links{position:absolute;top:0;left:0;overflow:visible;pointer-events:none}.tree-view__link{fill:none;stroke:var(--tv-link-color);stroke-width:var(--tv-link-width)}.tree-view__node{position:absolute;box-sizing:border-box;display:flex;align-items:stretch;justify-content:stretch}.tree-view-card{box-sizing:border-box;display:flex;gap:8px;align-items:center;justify-content:space-between;width:100%;height:100%;padding:var(--tv-node-padding);overflow:hidden;color:var(--tv-node-color);background:var(--tv-node-bg);border:var(--tv-node-border);border-radius:var(--tv-node-radius);box-shadow:var(--tv-node-shadow)}.tree-view-card__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tree-view-card__toggle{flex:none;width:20px;height:20px;padding:0;font:inherit;line-height:1;color:var(--tv-accent);cursor:pointer;background:none;border:none}.tv-bracket{--tv-bracket-winner-bg: #0427c4;--tv-bracket-winner-color: #ffffff;--tv-bracket-loser-bg: #e5e5e5;--tv-bracket-loser-color: #7d7d8d;--tv-bracket-my-bg: #00146c;--tv-bracket-my-color: #ffffff;--tv-bracket-radius: 6px;--tv-bracket-shadow: 0 0 0 1px rgb(15 23 42 / 8%), 0 1px 3px rgb(15 23 42 / 10%);position:relative;box-sizing:border-box;display:flex;flex-direction:column;width:100%;height:100%;font-size:12px}.tv-bracket__rows{box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden;border-radius:var(--tv-bracket-radius);box-shadow:var(--tv-bracket-shadow)}.tv-bracket--my-team .tv-bracket__rows{outline:2px solid var(--tv-bracket-my-bg)}.tv-bracket__hint{position:absolute;right:0;bottom:100%;left:0;padding:3px 8px;overflow:hidden;font-size:11px;font-weight:600;line-height:1.2;color:var(--tv-bracket-my-color);text-align:center;text-overflow:ellipsis;white-space:nowrap;background:var(--tv-bracket-my-bg);border-radius:var(--tv-bracket-radius) var(--tv-bracket-radius) 0 0}.tv-bracket__row{position:relative;box-sizing:border-box;display:flex;flex:1 1 0;align-items:center;justify-content:space-between;min-height:0;padding:4px 8px;cursor:pointer;transition:all 75ms}.tv-bracket__row--winner{font-weight:700;color:var(--tv-bracket-winner-color);background:var(--tv-bracket-winner-bg)}.tv-bracket__row--loser{color:var(--tv-bracket-loser-color);background:var(--tv-bracket-loser-bg)}.tv-bracket__row--my{color:var(--tv-bracket-my-color);background:var(--tv-bracket-my-bg)}.tv-bracket__row--empty{cursor:default;background:var(--tv-bracket-loser-bg)}.tv-bracket__toggle{position:absolute;top:50%;left:-11px;z-index:1;display:flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;font:inherit;font-size:13px;font-weight:700;line-height:1;color:var(--tv-bracket-winner-bg);cursor:pointer;background:#fff;border:1px solid #d1d5db;border-radius:50%;box-shadow:0 1px 3px #0f172a2e;transform:translateY(-50%)}.tv-bracket__toggle:hover{border-color:var(--tv-bracket-winner-bg)}.tv-bracket__toggle--collapsed{color:var(--tv-bracket-winner-color);background:var(--tv-bracket-winner-bg);border-color:var(--tv-bracket-winner-bg)}.tv-bracket__name{max-width:120px;overflow:hidden;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.tv-bracket__score{display:flex;flex:none;align-items:center;justify-content:center;width:20px;height:20px;font-weight:700;font-variant-numeric:tabular-nums}.tv-bracket__tooltip{position:absolute;top:-26px;left:6px;z-index:5000;padding:4px 8px;font-weight:400;color:var(--tv-bracket-loser-color);white-space:nowrap;background:#fff;border:1px solid #d1d5db;border-radius:4px;box-shadow:0 4px 10px #0f172a26}.tv-rounds{--tv-rounds-bg: #f5f5f7;--tv-rounds-color: #9ca3af;--tv-rounds-border: 2px solid #e5e7eb;--tv-rounds-gap: 20px;--tv-rounds-fade: .22s;--tv-rounds-collapse-scale: .86;--tv-rounds-collapse-ease: cubic-bezier(.4, 0, .2, 1);--tv-rounds-link-color: #94a3b8;--tv-rounds-link-width: 3px;display:flex;flex-direction:column;width:max-content;min-width:100%}.tv-rounds__head{position:sticky;top:0;z-index:2;overflow:hidden;margin-bottom:var(--tv-rounds-gap);background:var(--tv-rounds-bg);border-bottom:var(--tv-rounds-border)}.tv-rounds__bar{display:flex;min-width:100%}.tv-rounds__scroll{position:relative}.tv-rounds__snap{display:flex;height:1px;margin-bottom:-1px}.tv-rounds__snap-item{flex:none;display:block}.tv-rounds__item{flex:none;box-sizing:border-box;padding:10px 20px;font:inherit;font-size:14px;font-weight:600;color:var(--tv-rounds-color);text-align:center;text-transform:uppercase;white-space:nowrap;background:none;border:none;border-right:var(--tv-rounds-border)}.tv-rounds--swipe .tv-bracket__hint{display:none}.tv-rounds--swipe .tree-view{--tv-link-color: var(--tv-rounds-link-color);--tv-link-width: var(--tv-rounds-link-width)}.tv-rounds--swipe{width:100%;min-width:0}.tv-rounds--swipe .tv-rounds__scroll{overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none}.tv-rounds--swipe .tv-rounds__scroll::-webkit-scrollbar{display:none}.tv-rounds--swipe .tv-rounds__snap-item{scroll-snap-align:start;scroll-snap-stop:always}.tv-rounds--swipe [data-depth]{transition:none}.tv-rounds--swipe [data-depth].tv-hidden{visibility:hidden;opacity:0;transition:opacity var(--tv-rounds-fade, .22s) ease,transform var(--tv-rounds-fade, .22s) var(--tv-rounds-collapse-ease),visibility 0s linear var(--tv-rounds-fade, .22s)}.tv-rounds--swipe .tree-view__node.tv-hidden{transform:scale(var(--tv-rounds-collapse-scale));transform-origin:right center}.tv-hidden{visibility:hidden}@media(prefers-reduced-motion:reduce){.tv-rounds--swipe [data-depth],.tv-rounds--swipe [data-depth].tv-hidden{transition:none}.tv-rounds--swipe .tree-view__node.tv-hidden{transform:none}}";
455
+ Fe(dt);
456
+ const vt = {
457
+ install(t) {
458
+ t.component("TreeView", Je), t.component("TreeNodeCard", ne), t.component("BracketCard", lt), t.component("BracketRounds", st);
408
459
  }
409
460
  };
410
461
  export {
411
- Ze as BracketCard,
412
- qe as BracketRounds,
413
- at as DEFAULT_OPTIONS,
414
- rt as MOBILE_MEDIA_QUERY,
415
- Y as TreeNodeCard,
416
- Ae as TreeView,
417
- tt as TreeViewPlugin,
418
- it as bracketCardHeight,
419
- lt as buildBracketCard,
420
- st as buildBracketRounds,
421
- tt as default,
422
- Me as usePanZoom,
423
- Re as useTreeLayout
462
+ lt as BracketCard,
463
+ st as BracketRounds,
464
+ ht as DEFAULT_OPTIONS,
465
+ bt as MOBILE_MEDIA_QUERY,
466
+ ne as TreeNodeCard,
467
+ Je as TreeView,
468
+ vt as TreeViewPlugin,
469
+ mt as bracketCardHeight,
470
+ gt as buildBracketCard,
471
+ wt as buildBracketRounds,
472
+ vt as default,
473
+ Ue as usePanZoom,
474
+ je as useTreeLayout
424
475
  };
425
476
  //# sourceMappingURL=index.js.map