@cfx-dev/ui-components 5.0.22 → 5.0.23

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.
Files changed (187) hide show
  1. package/dist/CarouselControls-CJ3tupLr.js +41 -0
  2. package/dist/Combination-BNueeiCk.js +2227 -0
  3. package/dist/{Combination-N-vN9BB-.js → Combination-DFRGuWx2.js} +50 -48
  4. package/dist/{DropdownContent-BTzahw95.js → DropdownContent-DCqFWnzj.js} +10 -10
  5. package/dist/assets/all_css.css +2 -1
  6. package/dist/assets/css/Button.css +1 -1
  7. package/dist/assets/css/CarouselControls.css +1 -0
  8. package/dist/assets/css/CarouselItem.css +1 -0
  9. package/dist/assets/css/RangeInput.css +1 -1
  10. package/dist/assets/css/Text.css +1 -1
  11. package/dist/assets/general/global.css +1 -1
  12. package/dist/assets/general/themes.css +1 -1
  13. package/dist/cfxIcons-YyDWNxmM.js +110 -0
  14. package/dist/cfxIconsXLarge-Dw37ZSw2.js +110 -0
  15. package/dist/components/Accordion/AccordionShowcase.js +2 -2
  16. package/dist/components/Badge/BadgeShowcase.js +3 -3
  17. package/dist/components/BurgerMenu/BurgerMenuShowcase.js +4 -4
  18. package/dist/components/Carousel/Carousel.d.ts +24 -0
  19. package/dist/components/Carousel/Carousel.js +125 -0
  20. package/dist/components/Carousel/Carousel.types.d.ts +41 -0
  21. package/dist/components/Carousel/Carousel.types.js +1 -0
  22. package/dist/components/Carousel/CarouselControls.d.ts +8 -0
  23. package/dist/components/Carousel/CarouselControls.js +8 -0
  24. package/dist/components/Carousel/CarouselItem.d.ts +11 -0
  25. package/dist/components/Carousel/CarouselItem.js +85 -0
  26. package/dist/components/Carousel/CarouselShowcase.d.ts +6 -0
  27. package/dist/components/Carousel/CarouselShowcase.js +177 -0
  28. package/dist/components/Carousel/index.d.ts +4 -0
  29. package/dist/components/Carousel/index.js +6 -0
  30. package/dist/components/Carousel/playIcon.d.ts +6 -0
  31. package/dist/components/Carousel/playIcon.js +25 -0
  32. package/dist/components/Checkbox/Checkbox.js +7 -7
  33. package/dist/components/Checkbox/CheckboxShowcase.js +5 -5
  34. package/dist/components/ClipboardButton/ClipboardButton.js +9 -9
  35. package/dist/components/ControlBox/ControlBox.js +10 -10
  36. package/dist/components/Decorate/Decorate.js +5 -5
  37. package/dist/components/DropdownContent/DropdownContent.js +1 -1
  38. package/dist/components/DropdownContent/index.js +1 -1
  39. package/dist/components/DropdownMenu/DropdownMenu.js +12 -12
  40. package/dist/components/DropdownSelect/DropdownSelect.js +1 -1
  41. package/dist/components/DropdownSelect/DropdownSelectShowcase.js +4 -4
  42. package/dist/components/Flex/FlexShowcase.js +4 -4
  43. package/dist/components/Flyout/Flyout.js +1 -1
  44. package/dist/components/Flyout/FlyoutShowcase.js +3 -3
  45. package/dist/components/FormField/FormFieldShowcase.js +1 -1
  46. package/dist/components/Icon/Icon.js +2 -2
  47. package/dist/components/Icons/IconsShowcase.js +1 -1
  48. package/dist/components/Icons/cfx-icons/Close.js +2 -2
  49. package/dist/components/Icons/cfx-icons/Copy.js +3 -3
  50. package/dist/components/Icons/cfx-icons/DownChevron.js +2 -2
  51. package/dist/components/Icons/cfx-icons/Filter.js +6 -6
  52. package/dist/components/Icons/cfx-icons/Heart.js +2 -2
  53. package/dist/components/Icons/cfx-icons/HeartFilled.js +2 -2
  54. package/dist/components/Icons/cfx-icons/LeftArrow.js +2 -2
  55. package/dist/components/Icons/cfx-icons/LeftChevron.js +2 -2
  56. package/dist/components/Icons/cfx-icons/MoreInfo.js +4 -4
  57. package/dist/components/Icons/cfx-icons/Play.js +5 -5
  58. package/dist/components/Icons/cfx-icons/Plus.js +2 -2
  59. package/dist/components/Icons/cfx-icons/Refresh.js +3 -3
  60. package/dist/components/Icons/cfx-icons/Search.js +2 -2
  61. package/dist/components/Icons/cfx-icons/ServerList.js +2 -2
  62. package/dist/components/Icons/cfx-icons/ServerReconnect.js +7 -7
  63. package/dist/components/Icons/cfx-icons/Square.js +3 -3
  64. package/dist/components/Icons/cfx-icons/SquareFilled.js +7 -7
  65. package/dist/components/Icons/cfx-icons/Trash.js +2 -2
  66. package/dist/components/Icons/cfx-icons/Undo.js +3 -3
  67. package/dist/components/Icons/cfx-icons/User.js +5 -5
  68. package/dist/components/Icons/cfx-icons/Users.js +3 -3
  69. package/dist/components/Icons/cfx-icons/Verified.js +4 -4
  70. package/dist/components/Icons/cfx-icons/Warning.js +2 -2
  71. package/dist/components/Icons/cfx-iconsXLarge/Close.js +2 -2
  72. package/dist/components/Icons/cfx-iconsXLarge/Copy.js +3 -3
  73. package/dist/components/Icons/cfx-iconsXLarge/DownChevron.js +2 -2
  74. package/dist/components/Icons/cfx-iconsXLarge/Filter.js +2 -2
  75. package/dist/components/Icons/cfx-iconsXLarge/Heart.js +5 -5
  76. package/dist/components/Icons/cfx-iconsXLarge/HeartFilled.js +2 -2
  77. package/dist/components/Icons/cfx-iconsXLarge/LeftArrow.js +2 -2
  78. package/dist/components/Icons/cfx-iconsXLarge/LeftChevron.js +2 -2
  79. package/dist/components/Icons/cfx-iconsXLarge/MoreInfo.js +4 -4
  80. package/dist/components/Icons/cfx-iconsXLarge/Play.js +5 -5
  81. package/dist/components/Icons/cfx-iconsXLarge/Plus.js +2 -2
  82. package/dist/components/Icons/cfx-iconsXLarge/Refresh.js +3 -3
  83. package/dist/components/Icons/cfx-iconsXLarge/Search.js +2 -2
  84. package/dist/components/Icons/cfx-iconsXLarge/ServerList.js +2 -2
  85. package/dist/components/Icons/cfx-iconsXLarge/ServerReconnect.js +7 -7
  86. package/dist/components/Icons/cfx-iconsXLarge/Square.js +3 -3
  87. package/dist/components/Icons/cfx-iconsXLarge/SquareFilled.js +4 -4
  88. package/dist/components/Icons/cfx-iconsXLarge/Trash.js +2 -2
  89. package/dist/components/Icons/cfx-iconsXLarge/Undo.js +4 -4
  90. package/dist/components/Icons/cfx-iconsXLarge/User.js +5 -5
  91. package/dist/components/Icons/cfx-iconsXLarge/Users.js +3 -3
  92. package/dist/components/Icons/cfx-iconsXLarge/Verified.js +4 -4
  93. package/dist/components/Icons/cfx-iconsXLarge/VisibilityOff.js +2 -2
  94. package/dist/components/Icons/cfx-iconsXLarge/Warning.js +2 -2
  95. package/dist/components/Icons/index.js +2 -2
  96. package/dist/components/InfoPanel/InfoPanelShowcase.js +9 -9
  97. package/dist/components/Input/InputShowcase.js +19 -19
  98. package/dist/components/Input/RichInput.js +1 -1
  99. package/dist/components/InputDropzone/InputDropzone.js +340 -304
  100. package/dist/components/Link/LinkShowcase.js +5 -5
  101. package/dist/components/Logos/LogosShowcase.js +2 -2
  102. package/dist/components/Logos/cfx/Icon.js +7 -7
  103. package/dist/components/Logos/cfx/Logo.js +3 -3
  104. package/dist/components/Logos/cfx/Wordmark.js +2 -2
  105. package/dist/components/Logos/discord/Icon.js +5 -5
  106. package/dist/components/Logos/fivem/Icon.js +2 -2
  107. package/dist/components/Logos/fivem/WhiteLogo.js +2 -2
  108. package/dist/components/Logos/github/Icon.js +7 -7
  109. package/dist/components/Logos/google/Icon.js +6 -6
  110. package/dist/components/Logos/google/Wordmark.js +3 -3
  111. package/dist/components/Logos/index.js +7 -7
  112. package/dist/components/Logos/patreon/Icon.js +7 -7
  113. package/dist/components/Logos/patreon/Wordmark.js +5 -5
  114. package/dist/components/Logos/redm/CompositeLogo.js +2 -2
  115. package/dist/components/Logos/rockstar/Icon.js +2 -2
  116. package/dist/components/Logos/tebex/Icon.js +7 -7
  117. package/dist/components/Logos/tebex/Wordmark.js +2 -2
  118. package/dist/components/Logos/x/Icon.js +3 -3
  119. package/dist/components/Modal/Modal.js +1 -1
  120. package/dist/components/Modal/ModalShowcase.js +3 -3
  121. package/dist/components/OnScreenSensor.js +1 -1
  122. package/dist/components/Overlay/Overlay.js +1 -1
  123. package/dist/components/Popover/PopoverShowcase.js +6 -6
  124. package/dist/components/Prose/Prose.js +3 -3
  125. package/dist/components/Range/Range.js +1 -1
  126. package/dist/components/Scrollable/ScrollableShowcase.js +2 -2
  127. package/dist/components/Select/Select.js +109 -109
  128. package/dist/components/Select/SelectShowcase.js +21 -21
  129. package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
  130. package/dist/components/Slider/Slider.js +1 -1
  131. package/dist/components/Switch/Switch.js +14 -14
  132. package/dist/components/TableResponsiveText/TableResponsiveText.js +2 -2
  133. package/dist/components/Tabular/TabularShowcase.js +12 -12
  134. package/dist/{index-CfQtbUfi.js → index-8cuIcSMB.js} +5 -5
  135. package/dist/index-BcJ929FX.js +20 -0
  136. package/dist/{index-kbBuAY0m.js → index-BcnrbBqR.js} +2 -2
  137. package/dist/{index-BgyFvlVL.js → index-Bg26abkD.js} +2 -2
  138. package/dist/{index-9LBuZ7x4.js → index-BzirdFxK.js} +5 -5
  139. package/dist/{index-Cl_RnsqN.js → index-CUyjBl1Y.js} +2 -2
  140. package/dist/index-CZVyC53C.js +20 -0
  141. package/dist/{index-DwfZyjnS.js → index-CaQzR2YA.js} +2 -2
  142. package/dist/{index-D5SMGei3.js → index-CzUzkeQx.js} +9 -9
  143. package/dist/{index-Cy4ZbWBL.js → index-DqqOUOlj.js} +2 -2
  144. package/dist/{index-3ctv5u9o.js → index-DwdZ_SPo.js} +2 -2
  145. package/dist/{index-Bj7QGXdt.js → index-DxFgF-nY.js} +2 -2
  146. package/dist/main.d.ts +11 -2
  147. package/dist/main.js +279 -257
  148. package/dist/utils/contexts/AnalyticsContext/AnalyticsContext.d.ts +12 -0
  149. package/dist/utils/contexts/AnalyticsContext/AnalyticsContext.js +9 -0
  150. package/dist/utils/contexts/AnalyticsContext/AnalyticsProvider.d.ts +9 -0
  151. package/dist/utils/contexts/AnalyticsContext/AnalyticsProvider.js +33 -0
  152. package/dist/utils/contexts/AnalyticsContext/index.d.ts +6 -0
  153. package/dist/utils/contexts/AnalyticsContext/index.js +10 -0
  154. package/dist/utils/contexts/AnalyticsContext/useAnalytics.d.ts +1 -0
  155. package/dist/utils/contexts/AnalyticsContext/useAnalytics.js +8 -0
  156. package/dist/utils/contexts/AnalyticsContext/useSiteLinkClick.d.ts +7 -0
  157. package/dist/utils/contexts/AnalyticsContext/useSiteLinkClick.js +22 -0
  158. package/dist/utils/contexts/MediaQueryContext/MediaQueryContext.d.ts +11 -0
  159. package/dist/utils/contexts/MediaQueryContext/MediaQueryContext.js +11 -0
  160. package/dist/utils/contexts/MediaQueryContext/MediaQueryContextProvider.d.ts +6 -0
  161. package/dist/utils/contexts/MediaQueryContext/MediaQueryContextProvider.js +38 -0
  162. package/dist/utils/contexts/MediaQueryContext/index.d.ts +4 -0
  163. package/dist/utils/contexts/MediaQueryContext/index.js +8 -0
  164. package/dist/utils/contexts/MediaQueryContext/useMediaQuery.d.ts +2 -0
  165. package/dist/utils/contexts/MediaQueryContext/useMediaQuery.js +8 -0
  166. package/dist/utils/contexts/StoreContext/StoreContext.d.ts +15 -0
  167. package/dist/utils/contexts/StoreContext/StoreContext.js +21 -0
  168. package/dist/utils/contexts/StoreContext/index.d.ts +2 -0
  169. package/dist/utils/contexts/StoreContext/index.js +4 -0
  170. package/dist/utils/formatBytes.d.ts +1 -0
  171. package/dist/utils/formatBytes.js +12 -0
  172. package/dist/utils/hooks/useCarousel.d.ts +11 -0
  173. package/dist/utils/hooks/useCarousel.js +1276 -0
  174. package/dist/utils/hooks/useOutlet.js +1 -1
  175. package/dist/utils/truncateWithEllipsis.d.ts +1 -0
  176. package/dist/utils/truncateWithEllipsis.js +6 -0
  177. package/package.json +2 -1
  178. package/dist/Combination-CcTTSYNP.js +0 -2209
  179. package/dist/assets/css/CountryFlag.css +0 -1
  180. package/dist/cfxIcons-0xD_EEXT.js +0 -110
  181. package/dist/cfxIconsXLarge-D0vz6Yd_.js +0 -110
  182. package/dist/components/CountryFlag/CountryFlag.d.ts +0 -12
  183. package/dist/components/CountryFlag/CountryFlag.js +0 -25
  184. package/dist/components/CountryFlag/index.d.ts +0 -2
  185. package/dist/components/CountryFlag/index.js +0 -4
  186. package/dist/index-B_NGoq0d.js +0 -20
  187. package/dist/index-Cn_D8a9-.js +0 -20
@@ -0,0 +1,1276 @@
1
+ import { useRef as Gt, useState as ft, useCallback as Ut, useEffect as ht } from "react";
2
+ function sn(t) {
3
+ return Object.prototype.toString.call(t) === "[object Object]";
4
+ }
5
+ function Ht(t) {
6
+ return sn(t) || Array.isArray(t);
7
+ }
8
+ function cn() {
9
+ return !!(typeof window < "u" && window.document && window.document.createElement);
10
+ }
11
+ function At(t, n) {
12
+ const e = Object.keys(t), s = Object.keys(n);
13
+ if (e.length !== s.length) return !1;
14
+ const c = JSON.stringify(Object.keys(t.breakpoints || {})), r = JSON.stringify(Object.keys(n.breakpoints || {}));
15
+ return c !== r ? !1 : e.every((o) => {
16
+ const f = t[o], i = n[o];
17
+ return typeof f == "function" ? `${f}` == `${i}` : !Ht(f) || !Ht(i) ? f === i : At(f, i);
18
+ });
19
+ }
20
+ function Rt(t) {
21
+ return t.concat().sort((n, e) => n.name > e.name ? 1 : -1).map((n) => n.options);
22
+ }
23
+ function un(t, n) {
24
+ if (t.length !== n.length) return !1;
25
+ const e = Rt(t), s = Rt(n);
26
+ return e.every((c, r) => {
27
+ const o = s[r];
28
+ return At(c, o);
29
+ });
30
+ }
31
+ function Ot(t) {
32
+ return typeof t == "number";
33
+ }
34
+ function Tt(t) {
35
+ return typeof t == "string";
36
+ }
37
+ function yt(t) {
38
+ return typeof t == "boolean";
39
+ }
40
+ function qt(t) {
41
+ return Object.prototype.toString.call(t) === "[object Object]";
42
+ }
43
+ function P(t) {
44
+ return Math.abs(t);
45
+ }
46
+ function Dt(t) {
47
+ return Math.sign(t);
48
+ }
49
+ function at(t, n) {
50
+ return P(t - n);
51
+ }
52
+ function fn(t, n) {
53
+ if (t === 0 || n === 0 || P(t) <= P(n)) return 0;
54
+ const e = at(P(t), P(n));
55
+ return P(e / t);
56
+ }
57
+ function an(t) {
58
+ return Math.round(t * 100) / 100;
59
+ }
60
+ function lt(t) {
61
+ return dt(t).map(Number);
62
+ }
63
+ function z(t) {
64
+ return t[mt(t)];
65
+ }
66
+ function mt(t) {
67
+ return Math.max(0, t.length - 1);
68
+ }
69
+ function Mt(t, n) {
70
+ return n === mt(t);
71
+ }
72
+ function $t(t, n = 0) {
73
+ return Array.from(Array(t), (e, s) => n + s);
74
+ }
75
+ function dt(t) {
76
+ return Object.keys(t);
77
+ }
78
+ function Kt(t, n) {
79
+ return [t, n].reduce((e, s) => (dt(s).forEach((c) => {
80
+ const r = e[c], o = s[c], f = qt(r) && qt(o);
81
+ e[c] = f ? Kt(r, o) : o;
82
+ }), e), {});
83
+ }
84
+ function vt(t, n) {
85
+ return typeof n.MouseEvent < "u" && t instanceof n.MouseEvent;
86
+ }
87
+ function ln(t, n) {
88
+ const e = {
89
+ start: s,
90
+ center: c,
91
+ end: r
92
+ };
93
+ function s() {
94
+ return 0;
95
+ }
96
+ function c(i) {
97
+ return r(i) / 2;
98
+ }
99
+ function r(i) {
100
+ return n - i;
101
+ }
102
+ function o(i, u) {
103
+ return Tt(t) ? e[t](i) : t(n, i, u);
104
+ }
105
+ return {
106
+ measure: o
107
+ };
108
+ }
109
+ function pt() {
110
+ let t = [];
111
+ function n(c, r, o, f = {
112
+ passive: !0
113
+ }) {
114
+ let i;
115
+ if ("addEventListener" in c)
116
+ c.addEventListener(r, o, f), i = () => c.removeEventListener(r, o, f);
117
+ else {
118
+ const u = c;
119
+ u.addListener(o), i = () => u.removeListener(o);
120
+ }
121
+ return t.push(i), s;
122
+ }
123
+ function e() {
124
+ t = t.filter((c) => c());
125
+ }
126
+ const s = {
127
+ add: n,
128
+ clear: e
129
+ };
130
+ return s;
131
+ }
132
+ function dn(t, n, e, s) {
133
+ const c = pt(), r = 1e3 / 60;
134
+ let o = null, f = 0, i = 0;
135
+ function u() {
136
+ c.add(t, "visibilitychange", () => {
137
+ t.hidden && l();
138
+ });
139
+ }
140
+ function h() {
141
+ b(), c.clear();
142
+ }
143
+ function d(g) {
144
+ if (!i) return;
145
+ o || (o = g, e(), e());
146
+ const a = g - o;
147
+ for (o = g, f += a; f >= r; )
148
+ e(), f -= r;
149
+ const S = f / r;
150
+ s(S), i && (i = n.requestAnimationFrame(d));
151
+ }
152
+ function p() {
153
+ i || (i = n.requestAnimationFrame(d));
154
+ }
155
+ function b() {
156
+ n.cancelAnimationFrame(i), o = null, f = 0, i = 0;
157
+ }
158
+ function l() {
159
+ o = null, f = 0;
160
+ }
161
+ return {
162
+ init: u,
163
+ destroy: h,
164
+ start: p,
165
+ stop: b,
166
+ update: e,
167
+ render: s
168
+ };
169
+ }
170
+ function pn(t, n) {
171
+ const e = n === "rtl", s = t === "y", c = s ? "y" : "x", r = s ? "x" : "y", o = !s && e ? -1 : 1, f = h(), i = d();
172
+ function u(l) {
173
+ const {
174
+ height: m,
175
+ width: g
176
+ } = l;
177
+ return s ? m : g;
178
+ }
179
+ function h() {
180
+ return s ? "top" : e ? "right" : "left";
181
+ }
182
+ function d() {
183
+ return s ? "bottom" : e ? "left" : "right";
184
+ }
185
+ function p(l) {
186
+ return l * o;
187
+ }
188
+ return {
189
+ scroll: c,
190
+ cross: r,
191
+ startEdge: f,
192
+ endEdge: i,
193
+ measureSize: u,
194
+ direction: p
195
+ };
196
+ }
197
+ function tt(t = 0, n = 0) {
198
+ const e = P(t - n);
199
+ function s(u) {
200
+ return u < t;
201
+ }
202
+ function c(u) {
203
+ return u > n;
204
+ }
205
+ function r(u) {
206
+ return s(u) || c(u);
207
+ }
208
+ function o(u) {
209
+ return r(u) ? s(u) ? t : n : u;
210
+ }
211
+ function f(u) {
212
+ return e ? u - e * Math.ceil((u - n) / e) : u;
213
+ }
214
+ return {
215
+ length: e,
216
+ max: n,
217
+ min: t,
218
+ constrain: o,
219
+ reachedAny: r,
220
+ reachedMax: c,
221
+ reachedMin: s,
222
+ removeOffset: f
223
+ };
224
+ }
225
+ function Qt(t, n, e) {
226
+ const {
227
+ constrain: s
228
+ } = tt(0, t), c = t + 1;
229
+ let r = o(n);
230
+ function o(p) {
231
+ return e ? P((c + p) % c) : s(p);
232
+ }
233
+ function f() {
234
+ return r;
235
+ }
236
+ function i(p) {
237
+ return r = o(p), d;
238
+ }
239
+ function u(p) {
240
+ return h().set(f() + p);
241
+ }
242
+ function h() {
243
+ return Qt(t, f(), e);
244
+ }
245
+ const d = {
246
+ get: f,
247
+ set: i,
248
+ add: u,
249
+ clone: h
250
+ };
251
+ return d;
252
+ }
253
+ function mn(t, n, e, s, c, r, o, f, i, u, h, d, p, b, l, m, g, a, S) {
254
+ const {
255
+ cross: x,
256
+ direction: I
257
+ } = t, D = ["INPUT", "SELECT", "TEXTAREA"], T = {
258
+ passive: !1
259
+ }, E = pt(), L = pt(), v = tt(50, 225).constrain(b.measure(20)), w = {
260
+ mouse: 300,
261
+ touch: 400
262
+ }, A = {
263
+ mouse: 500,
264
+ touch: 600
265
+ }, N = l ? 43 : 25;
266
+ let j = !1, G = 0, H = 0, _ = !1, X = !1, $ = !1, U = !1;
267
+ function rt(y) {
268
+ if (!S) return;
269
+ function O(k) {
270
+ (yt(S) || S(y, k)) && it(k);
271
+ }
272
+ const C = n;
273
+ E.add(C, "dragstart", (k) => k.preventDefault(), T).add(C, "touchmove", () => {
274
+ }, T).add(C, "touchend", () => {
275
+ }).add(C, "touchstart", O).add(C, "mousedown", O).add(C, "touchcancel", F).add(C, "contextmenu", F).add(C, "click", Q, !0);
276
+ }
277
+ function R() {
278
+ E.clear(), L.clear();
279
+ }
280
+ function nt() {
281
+ const y = U ? e : n;
282
+ L.add(y, "touchmove", B, T).add(y, "touchend", F).add(y, "mousemove", B, T).add(y, "mouseup", F);
283
+ }
284
+ function et(y) {
285
+ const O = y.nodeName || "";
286
+ return D.includes(O);
287
+ }
288
+ function K() {
289
+ return (l ? A : w)[U ? "mouse" : "touch"];
290
+ }
291
+ function st(y, O) {
292
+ const C = d.add(Dt(y) * -1), k = h.byDistance(y, !l).distance;
293
+ return l || P(y) < v ? k : g && O ? k * 0.5 : h.byIndex(C.get(), 0).distance;
294
+ }
295
+ function it(y) {
296
+ const O = vt(y, s);
297
+ U = O, $ = l && O && !y.buttons && j, j = at(c.get(), o.get()) >= 2, !(O && y.button !== 0) && (et(y.target) || (_ = !0, r.pointerDown(y), u.useFriction(0).useDuration(0), c.set(o), nt(), G = r.readPoint(y), H = r.readPoint(y, x), p.emit("pointerDown")));
298
+ }
299
+ function B(y) {
300
+ if (!vt(y, s) && y.touches.length >= 2) return F(y);
301
+ const C = r.readPoint(y), k = r.readPoint(y, x), q = at(C, G), J = at(k, H);
302
+ if (!X && !U && (!y.cancelable || (X = q > J, !X)))
303
+ return F(y);
304
+ const Z = r.pointerMove(y);
305
+ q > m && ($ = !0), u.useFriction(0.3).useDuration(0.75), f.start(), c.add(I(Z)), y.preventDefault();
306
+ }
307
+ function F(y) {
308
+ const C = h.byDistance(0, !1).index !== d.get(), k = r.pointerUp(y) * K(), q = st(I(k), C), J = fn(k, q), Z = N - 10 * J, Y = a + J / 50;
309
+ X = !1, _ = !1, L.clear(), u.useDuration(Z).useFriction(Y), i.distance(q, !l), U = !1, p.emit("pointerUp");
310
+ }
311
+ function Q(y) {
312
+ $ && (y.stopPropagation(), y.preventDefault(), $ = !1);
313
+ }
314
+ function V() {
315
+ return _;
316
+ }
317
+ return {
318
+ init: rt,
319
+ destroy: R,
320
+ pointerDown: V
321
+ };
322
+ }
323
+ function gn(t, n) {
324
+ let s, c;
325
+ function r(d) {
326
+ return d.timeStamp;
327
+ }
328
+ function o(d, p) {
329
+ const l = `client${(p || t.scroll) === "x" ? "X" : "Y"}`;
330
+ return (vt(d, n) ? d : d.touches[0])[l];
331
+ }
332
+ function f(d) {
333
+ return s = d, c = d, o(d);
334
+ }
335
+ function i(d) {
336
+ const p = o(d) - o(c), b = r(d) - r(s) > 170;
337
+ return c = d, b && (s = d), p;
338
+ }
339
+ function u(d) {
340
+ if (!s || !c) return 0;
341
+ const p = o(c) - o(s), b = r(d) - r(s), l = r(d) - r(c) > 170, m = p / b;
342
+ return b && !l && P(m) > 0.1 ? m : 0;
343
+ }
344
+ return {
345
+ pointerDown: f,
346
+ pointerMove: i,
347
+ pointerUp: u,
348
+ readPoint: o
349
+ };
350
+ }
351
+ function hn() {
352
+ function t(e) {
353
+ const {
354
+ offsetTop: s,
355
+ offsetLeft: c,
356
+ offsetWidth: r,
357
+ offsetHeight: o
358
+ } = e;
359
+ return {
360
+ top: s,
361
+ right: c + r,
362
+ bottom: s + o,
363
+ left: c,
364
+ width: r,
365
+ height: o
366
+ };
367
+ }
368
+ return {
369
+ measure: t
370
+ };
371
+ }
372
+ function Sn(t) {
373
+ function n(s) {
374
+ return t * (s / 100);
375
+ }
376
+ return {
377
+ measure: n
378
+ };
379
+ }
380
+ function yn(t, n, e, s, c, r, o) {
381
+ const f = [t].concat(s);
382
+ let i, u, h = [], d = !1;
383
+ function p(g) {
384
+ return c.measureSize(o.measure(g));
385
+ }
386
+ function b(g) {
387
+ if (!r) return;
388
+ u = p(t), h = s.map(p);
389
+ function a(S) {
390
+ for (const x of S) {
391
+ if (d) return;
392
+ const I = x.target === t, D = s.indexOf(x.target), T = I ? u : h[D], E = p(I ? t : s[D]);
393
+ if (P(E - T) >= 0.5) {
394
+ g.reInit(), n.emit("resize");
395
+ break;
396
+ }
397
+ }
398
+ }
399
+ i = new ResizeObserver((S) => {
400
+ (yt(r) || r(g, S)) && a(S);
401
+ }), e.requestAnimationFrame(() => {
402
+ f.forEach((S) => i.observe(S));
403
+ });
404
+ }
405
+ function l() {
406
+ d = !0, i && i.disconnect();
407
+ }
408
+ return {
409
+ init: b,
410
+ destroy: l
411
+ };
412
+ }
413
+ function bn(t, n, e, s, c, r) {
414
+ let o = 0, f = 0, i = c, u = r, h = t.get(), d = 0;
415
+ function p() {
416
+ const T = s.get() - t.get(), E = !i;
417
+ let L = 0;
418
+ return E ? (o = 0, e.set(s), t.set(s), L = T) : (e.set(t), o += T / i, o *= u, h += o, t.add(o), L = h - d), f = Dt(L), d = h, D;
419
+ }
420
+ function b() {
421
+ const T = s.get() - n.get();
422
+ return P(T) < 1e-3;
423
+ }
424
+ function l() {
425
+ return i;
426
+ }
427
+ function m() {
428
+ return f;
429
+ }
430
+ function g() {
431
+ return o;
432
+ }
433
+ function a() {
434
+ return x(c);
435
+ }
436
+ function S() {
437
+ return I(r);
438
+ }
439
+ function x(T) {
440
+ return i = T, D;
441
+ }
442
+ function I(T) {
443
+ return u = T, D;
444
+ }
445
+ const D = {
446
+ direction: m,
447
+ duration: l,
448
+ velocity: g,
449
+ seek: p,
450
+ settled: b,
451
+ useBaseFriction: S,
452
+ useBaseDuration: a,
453
+ useFriction: I,
454
+ useDuration: x
455
+ };
456
+ return D;
457
+ }
458
+ function xn(t, n, e, s, c) {
459
+ const r = c.measure(10), o = c.measure(50), f = tt(0.1, 0.99);
460
+ let i = !1;
461
+ function u() {
462
+ return !(i || !t.reachedAny(e.get()) || !t.reachedAny(n.get()));
463
+ }
464
+ function h(b) {
465
+ if (!u()) return;
466
+ const l = t.reachedMin(n.get()) ? "min" : "max", m = P(t[l] - n.get()), g = e.get() - n.get(), a = f.constrain(m / o);
467
+ e.subtract(g * a), !b && P(g) < r && (e.set(t.constrain(e.get())), s.useDuration(25).useBaseFriction());
468
+ }
469
+ function d(b) {
470
+ i = !b;
471
+ }
472
+ return {
473
+ shouldConstrain: u,
474
+ constrain: h,
475
+ toggleActive: d
476
+ };
477
+ }
478
+ function En(t, n, e, s, c) {
479
+ const r = tt(-n + t, 0), o = d(), f = h(), i = p();
480
+ function u(l, m) {
481
+ return at(l, m) <= 1;
482
+ }
483
+ function h() {
484
+ const l = o[0], m = z(o), g = o.lastIndexOf(l), a = o.indexOf(m) + 1;
485
+ return tt(g, a);
486
+ }
487
+ function d() {
488
+ return e.map((l, m) => {
489
+ const {
490
+ min: g,
491
+ max: a
492
+ } = r, S = r.constrain(l), x = !m, I = Mt(e, m);
493
+ return x ? a : I || u(g, S) ? g : u(a, S) ? a : S;
494
+ }).map((l) => parseFloat(l.toFixed(3)));
495
+ }
496
+ function p() {
497
+ if (n <= t + c) return [r.max];
498
+ if (s === "keepSnaps") return o;
499
+ const {
500
+ min: l,
501
+ max: m
502
+ } = f;
503
+ return o.slice(l, m);
504
+ }
505
+ return {
506
+ snapsContained: i,
507
+ scrollContainLimit: f
508
+ };
509
+ }
510
+ function Ln(t, n, e) {
511
+ const s = n[0], c = e ? s - t : z(n);
512
+ return {
513
+ limit: tt(c, s)
514
+ };
515
+ }
516
+ function In(t, n, e, s) {
517
+ const r = n.min + 0.1, o = n.max + 0.1, {
518
+ reachedMin: f,
519
+ reachedMax: i
520
+ } = tt(r, o);
521
+ function u(p) {
522
+ return p === 1 ? i(e.get()) : p === -1 ? f(e.get()) : !1;
523
+ }
524
+ function h(p) {
525
+ if (!u(p)) return;
526
+ const b = t * (p * -1);
527
+ s.forEach((l) => l.add(b));
528
+ }
529
+ return {
530
+ loop: h
531
+ };
532
+ }
533
+ function Tn(t) {
534
+ const {
535
+ max: n,
536
+ length: e
537
+ } = t;
538
+ function s(r) {
539
+ const o = r - n;
540
+ return e ? o / -e : 0;
541
+ }
542
+ return {
543
+ get: s
544
+ };
545
+ }
546
+ function vn(t, n, e, s, c) {
547
+ const {
548
+ startEdge: r,
549
+ endEdge: o
550
+ } = t, {
551
+ groupSlides: f
552
+ } = c, i = d().map(n.measure), u = p(), h = b();
553
+ function d() {
554
+ return f(s).map((m) => z(m)[o] - m[0][r]).map(P);
555
+ }
556
+ function p() {
557
+ return s.map((m) => e[r] - m[r]).map((m) => -P(m));
558
+ }
559
+ function b() {
560
+ return f(u).map((m) => m[0]).map((m, g) => m + i[g]);
561
+ }
562
+ return {
563
+ snaps: u,
564
+ snapsAligned: h
565
+ };
566
+ }
567
+ function An(t, n, e, s, c, r) {
568
+ const {
569
+ groupSlides: o
570
+ } = c, {
571
+ min: f,
572
+ max: i
573
+ } = s, u = h();
574
+ function h() {
575
+ const p = o(r), b = !t || n === "keepSnaps";
576
+ return e.length === 1 ? [r] : b ? p : p.slice(f, i).map((l, m, g) => {
577
+ const a = !m, S = Mt(g, m);
578
+ if (a) {
579
+ const x = z(g[0]) + 1;
580
+ return $t(x);
581
+ }
582
+ if (S) {
583
+ const x = mt(r) - z(g)[0] + 1;
584
+ return $t(x, z(g)[0]);
585
+ }
586
+ return l;
587
+ });
588
+ }
589
+ return {
590
+ slideRegistry: u
591
+ };
592
+ }
593
+ function On(t, n, e, s, c) {
594
+ const {
595
+ reachedAny: r,
596
+ removeOffset: o,
597
+ constrain: f
598
+ } = s;
599
+ function i(l) {
600
+ return l.concat().sort((m, g) => P(m) - P(g))[0];
601
+ }
602
+ function u(l) {
603
+ const m = t ? o(l) : f(l), g = n.map((S, x) => ({
604
+ diff: h(S - m, 0),
605
+ index: x
606
+ })).sort((S, x) => P(S.diff) - P(x.diff)), {
607
+ index: a
608
+ } = g[0];
609
+ return {
610
+ index: a,
611
+ distance: m
612
+ };
613
+ }
614
+ function h(l, m) {
615
+ const g = [l, l + e, l - e];
616
+ if (!t) return l;
617
+ if (!m) return i(g);
618
+ const a = g.filter((S) => Dt(S) === m);
619
+ return a.length ? i(a) : z(g) - e;
620
+ }
621
+ function d(l, m) {
622
+ const g = n[l] - c.get(), a = h(g, m);
623
+ return {
624
+ index: l,
625
+ distance: a
626
+ };
627
+ }
628
+ function p(l, m) {
629
+ const g = c.get() + l, {
630
+ index: a,
631
+ distance: S
632
+ } = u(g), x = !t && r(g);
633
+ if (!m || x) return {
634
+ index: a,
635
+ distance: l
636
+ };
637
+ const I = n[a] - S, D = l + h(I, 0);
638
+ return {
639
+ index: a,
640
+ distance: D
641
+ };
642
+ }
643
+ return {
644
+ byDistance: p,
645
+ byIndex: d,
646
+ shortcut: h
647
+ };
648
+ }
649
+ function Dn(t, n, e, s, c, r, o) {
650
+ function f(d) {
651
+ const p = d.distance, b = d.index !== n.get();
652
+ r.add(p), p && (s.duration() ? t.start() : (t.update(), t.render(1), t.update())), b && (e.set(n.get()), n.set(d.index), o.emit("select"));
653
+ }
654
+ function i(d, p) {
655
+ const b = c.byDistance(d, p);
656
+ f(b);
657
+ }
658
+ function u(d, p) {
659
+ const b = n.clone().set(d), l = c.byIndex(b.get(), p);
660
+ f(l);
661
+ }
662
+ return {
663
+ distance: i,
664
+ index: u
665
+ };
666
+ }
667
+ function Mn(t, n, e, s, c, r, o, f) {
668
+ const i = {
669
+ passive: !0,
670
+ capture: !0
671
+ };
672
+ let u = 0;
673
+ function h(b) {
674
+ if (!f) return;
675
+ function l(m) {
676
+ if ((/* @__PURE__ */ new Date()).getTime() - u > 10) return;
677
+ o.emit("slideFocusStart"), t.scrollLeft = 0;
678
+ const S = e.findIndex((x) => x.includes(m));
679
+ Ot(S) && (c.useDuration(0), s.index(S, 0), o.emit("slideFocus"));
680
+ }
681
+ r.add(document, "keydown", d, !1), n.forEach((m, g) => {
682
+ r.add(m, "focus", (a) => {
683
+ (yt(f) || f(b, a)) && l(g);
684
+ }, i);
685
+ });
686
+ }
687
+ function d(b) {
688
+ b.code === "Tab" && (u = (/* @__PURE__ */ new Date()).getTime());
689
+ }
690
+ return {
691
+ init: h
692
+ };
693
+ }
694
+ function ut(t) {
695
+ let n = t;
696
+ function e() {
697
+ return n;
698
+ }
699
+ function s(i) {
700
+ n = o(i);
701
+ }
702
+ function c(i) {
703
+ n += o(i);
704
+ }
705
+ function r(i) {
706
+ n -= o(i);
707
+ }
708
+ function o(i) {
709
+ return Ot(i) ? i : i.get();
710
+ }
711
+ return {
712
+ get: e,
713
+ set: s,
714
+ add: c,
715
+ subtract: r
716
+ };
717
+ }
718
+ function Jt(t, n) {
719
+ const e = t.scroll === "x" ? o : f, s = n.style;
720
+ let c = null, r = !1;
721
+ function o(p) {
722
+ return `translate3d(${p}px,0px,0px)`;
723
+ }
724
+ function f(p) {
725
+ return `translate3d(0px,${p}px,0px)`;
726
+ }
727
+ function i(p) {
728
+ if (r) return;
729
+ const b = an(t.direction(p));
730
+ b !== c && (s.transform = e(b), c = b);
731
+ }
732
+ function u(p) {
733
+ r = !p;
734
+ }
735
+ function h() {
736
+ r || (s.transform = "", n.getAttribute("style") || n.removeAttribute("style"));
737
+ }
738
+ return {
739
+ clear: h,
740
+ to: i,
741
+ toggleActive: u
742
+ };
743
+ }
744
+ function Pn(t, n, e, s, c, r, o, f, i) {
745
+ const h = lt(c), d = lt(c).reverse(), p = a().concat(S());
746
+ function b(E, L) {
747
+ return E.reduce((v, w) => v - c[w], L);
748
+ }
749
+ function l(E, L) {
750
+ return E.reduce((v, w) => b(v, L) > 0 ? v.concat([w]) : v, []);
751
+ }
752
+ function m(E) {
753
+ return r.map((L, v) => ({
754
+ start: L - s[v] + 0.5 + E,
755
+ end: L + n - 0.5 + E
756
+ }));
757
+ }
758
+ function g(E, L, v) {
759
+ const w = m(L);
760
+ return E.map((A) => {
761
+ const N = v ? 0 : -e, j = v ? e : 0, G = v ? "end" : "start", H = w[A][G];
762
+ return {
763
+ index: A,
764
+ loopPoint: H,
765
+ slideLocation: ut(-1),
766
+ translate: Jt(t, i[A]),
767
+ target: () => f.get() > H ? N : j
768
+ };
769
+ });
770
+ }
771
+ function a() {
772
+ const E = o[0], L = l(d, E);
773
+ return g(L, e, !1);
774
+ }
775
+ function S() {
776
+ const E = n - o[0] - 1, L = l(h, E);
777
+ return g(L, -e, !0);
778
+ }
779
+ function x() {
780
+ return p.every(({
781
+ index: E
782
+ }) => {
783
+ const L = h.filter((v) => v !== E);
784
+ return b(L, n) <= 0.1;
785
+ });
786
+ }
787
+ function I() {
788
+ p.forEach((E) => {
789
+ const {
790
+ target: L,
791
+ translate: v,
792
+ slideLocation: w
793
+ } = E, A = L();
794
+ A !== w.get() && (v.to(A), w.set(A));
795
+ });
796
+ }
797
+ function D() {
798
+ p.forEach((E) => E.translate.clear());
799
+ }
800
+ return {
801
+ canLoop: x,
802
+ clear: D,
803
+ loop: I,
804
+ loopPoints: p
805
+ };
806
+ }
807
+ function wn(t, n, e) {
808
+ let s, c = !1;
809
+ function r(i) {
810
+ if (!e) return;
811
+ function u(h) {
812
+ for (const d of h)
813
+ if (d.type === "childList") {
814
+ i.reInit(), n.emit("slidesChanged");
815
+ break;
816
+ }
817
+ }
818
+ s = new MutationObserver((h) => {
819
+ c || (yt(e) || e(i, h)) && u(h);
820
+ }), s.observe(t, {
821
+ childList: !0
822
+ });
823
+ }
824
+ function o() {
825
+ s && s.disconnect(), c = !0;
826
+ }
827
+ return {
828
+ init: r,
829
+ destroy: o
830
+ };
831
+ }
832
+ function Cn(t, n, e, s) {
833
+ const c = {};
834
+ let r = null, o = null, f, i = !1;
835
+ function u() {
836
+ f = new IntersectionObserver((l) => {
837
+ i || (l.forEach((m) => {
838
+ const g = n.indexOf(m.target);
839
+ c[g] = m;
840
+ }), r = null, o = null, e.emit("slidesInView"));
841
+ }, {
842
+ root: t.parentElement,
843
+ threshold: s
844
+ }), n.forEach((l) => f.observe(l));
845
+ }
846
+ function h() {
847
+ f && f.disconnect(), i = !0;
848
+ }
849
+ function d(l) {
850
+ return dt(c).reduce((m, g) => {
851
+ const a = parseInt(g), {
852
+ isIntersecting: S
853
+ } = c[a];
854
+ return (l && S || !l && !S) && m.push(a), m;
855
+ }, []);
856
+ }
857
+ function p(l = !0) {
858
+ if (l && r) return r;
859
+ if (!l && o) return o;
860
+ const m = d(l);
861
+ return l && (r = m), l || (o = m), m;
862
+ }
863
+ return {
864
+ init: u,
865
+ destroy: h,
866
+ get: p
867
+ };
868
+ }
869
+ function Fn(t, n, e, s, c, r) {
870
+ const {
871
+ measureSize: o,
872
+ startEdge: f,
873
+ endEdge: i
874
+ } = t, u = e[0] && c, h = l(), d = m(), p = e.map(o), b = g();
875
+ function l() {
876
+ if (!u) return 0;
877
+ const S = e[0];
878
+ return P(n[f] - S[f]);
879
+ }
880
+ function m() {
881
+ if (!u) return 0;
882
+ const S = r.getComputedStyle(z(s));
883
+ return parseFloat(S.getPropertyValue(`margin-${i}`));
884
+ }
885
+ function g() {
886
+ return e.map((S, x, I) => {
887
+ const D = !x, T = Mt(I, x);
888
+ return D ? p[x] + h : T ? p[x] + d : I[x + 1][f] - S[f];
889
+ }).map(P);
890
+ }
891
+ return {
892
+ slideSizes: p,
893
+ slideSizesWithGaps: b,
894
+ startGap: h,
895
+ endGap: d
896
+ };
897
+ }
898
+ function kn(t, n, e, s, c, r, o, f, i) {
899
+ const {
900
+ startEdge: u,
901
+ endEdge: h,
902
+ direction: d
903
+ } = t, p = Ot(e);
904
+ function b(a, S) {
905
+ return lt(a).filter((x) => x % S === 0).map((x) => a.slice(x, x + S));
906
+ }
907
+ function l(a) {
908
+ return a.length ? lt(a).reduce((S, x, I) => {
909
+ const D = z(S) || 0, T = D === 0, E = x === mt(a), L = c[u] - r[D][u], v = c[u] - r[x][h], w = !s && T ? d(o) : 0, A = !s && E ? d(f) : 0, N = P(v - A - (L + w));
910
+ return I && N > n + i && S.push(x), E && S.push(a.length), S;
911
+ }, []).map((S, x, I) => {
912
+ const D = Math.max(I[x - 1] || 0);
913
+ return a.slice(D, S);
914
+ }) : [];
915
+ }
916
+ function m(a) {
917
+ return p ? b(a, e) : l(a);
918
+ }
919
+ return {
920
+ groupSlides: m
921
+ };
922
+ }
923
+ function Nn(t, n, e, s, c, r, o) {
924
+ const {
925
+ align: f,
926
+ axis: i,
927
+ direction: u,
928
+ startIndex: h,
929
+ loop: d,
930
+ duration: p,
931
+ dragFree: b,
932
+ dragThreshold: l,
933
+ inViewThreshold: m,
934
+ slidesToScroll: g,
935
+ skipSnaps: a,
936
+ containScroll: S,
937
+ watchResize: x,
938
+ watchSlides: I,
939
+ watchDrag: D,
940
+ watchFocus: T
941
+ } = r, E = 2, L = hn(), v = L.measure(n), w = e.map(L.measure), A = pn(i, u), N = A.measureSize(v), j = Sn(N), G = ln(f, N), H = !d && !!S, _ = d || !!S, {
942
+ slideSizes: X,
943
+ slideSizesWithGaps: $,
944
+ startGap: U,
945
+ endGap: rt
946
+ } = Fn(A, v, w, e, _, c), R = kn(A, N, g, d, v, w, U, rt, E), {
947
+ snaps: nt,
948
+ snapsAligned: et
949
+ } = vn(A, G, v, w, R), K = -z(nt) + z($), {
950
+ snapsContained: st,
951
+ scrollContainLimit: it
952
+ } = En(N, K, et, S, E), B = H ? st : et, {
953
+ limit: F
954
+ } = Ln(K, B, d), Q = Qt(mt(B), h, d), V = Q.clone(), M = lt(e), y = ({
955
+ dragHandler: ot,
956
+ scrollBody: Lt,
957
+ scrollBounds: It,
958
+ options: {
959
+ loop: gt
960
+ }
961
+ }) => {
962
+ gt || It.constrain(ot.pointerDown()), Lt.seek();
963
+ }, O = ({
964
+ scrollBody: ot,
965
+ translate: Lt,
966
+ location: It,
967
+ offsetLocation: gt,
968
+ previousLocation: _t,
969
+ scrollLooper: Zt,
970
+ slideLooper: Wt,
971
+ dragHandler: tn,
972
+ animation: nn,
973
+ eventHandler: kt,
974
+ scrollBounds: en,
975
+ options: {
976
+ loop: Nt
977
+ }
978
+ }, Bt) => {
979
+ const Vt = ot.settled(), on = !en.shouldConstrain(), zt = Nt ? Vt : Vt && on, jt = zt && !tn.pointerDown();
980
+ jt && nn.stop();
981
+ const rn = It.get() * Bt + _t.get() * (1 - Bt);
982
+ gt.set(rn), Nt && (Zt.loop(ot.direction()), Wt.loop()), Lt.to(gt.get()), jt && kt.emit("settle"), zt || kt.emit("scroll");
983
+ }, C = dn(s, c, () => y(Et), (ot) => O(Et, ot)), k = 0.68, q = B[Q.get()], J = ut(q), Z = ut(q), Y = ut(q), W = ut(q), ct = bn(J, Y, Z, W, p, k), bt = On(d, B, K, F, W), xt = Dn(C, Q, V, ct, bt, W, o), wt = Tn(F), Ct = pt(), Xt = Cn(n, e, o, m), {
984
+ slideRegistry: Ft
985
+ } = An(H, S, B, it, R, M), Yt = Mn(t, e, Ft, xt, ct, Ct, o, T), Et = {
986
+ ownerDocument: s,
987
+ ownerWindow: c,
988
+ eventHandler: o,
989
+ containerRect: v,
990
+ slideRects: w,
991
+ animation: C,
992
+ axis: A,
993
+ dragHandler: mn(A, t, s, c, W, gn(A, c), J, C, xt, ct, bt, Q, o, j, b, l, a, k, D),
994
+ eventStore: Ct,
995
+ percentOfView: j,
996
+ index: Q,
997
+ indexPrevious: V,
998
+ limit: F,
999
+ location: J,
1000
+ offsetLocation: Y,
1001
+ previousLocation: Z,
1002
+ options: r,
1003
+ resizeHandler: yn(n, o, c, e, A, x, L),
1004
+ scrollBody: ct,
1005
+ scrollBounds: xn(F, Y, W, ct, j),
1006
+ scrollLooper: In(K, F, Y, [J, Y, Z, W]),
1007
+ scrollProgress: wt,
1008
+ scrollSnapList: B.map(wt.get),
1009
+ scrollSnaps: B,
1010
+ scrollTarget: bt,
1011
+ scrollTo: xt,
1012
+ slideLooper: Pn(A, N, K, X, $, nt, B, Y, e),
1013
+ slideFocus: Yt,
1014
+ slidesHandler: wn(n, o, I),
1015
+ slidesInView: Xt,
1016
+ slideIndexes: M,
1017
+ slideRegistry: Ft,
1018
+ slidesToScroll: R,
1019
+ target: W,
1020
+ translate: Jt(A, n)
1021
+ };
1022
+ return Et;
1023
+ }
1024
+ function Bn() {
1025
+ let t = {}, n;
1026
+ function e(u) {
1027
+ n = u;
1028
+ }
1029
+ function s(u) {
1030
+ return t[u] || [];
1031
+ }
1032
+ function c(u) {
1033
+ return s(u).forEach((h) => h(n, u)), i;
1034
+ }
1035
+ function r(u, h) {
1036
+ return t[u] = s(u).concat([h]), i;
1037
+ }
1038
+ function o(u, h) {
1039
+ return t[u] = s(u).filter((d) => d !== h), i;
1040
+ }
1041
+ function f() {
1042
+ t = {};
1043
+ }
1044
+ const i = {
1045
+ init: e,
1046
+ emit: c,
1047
+ off: o,
1048
+ on: r,
1049
+ clear: f
1050
+ };
1051
+ return i;
1052
+ }
1053
+ const Vn = {
1054
+ align: "center",
1055
+ axis: "x",
1056
+ container: null,
1057
+ slides: null,
1058
+ containScroll: "trimSnaps",
1059
+ direction: "ltr",
1060
+ slidesToScroll: 1,
1061
+ inViewThreshold: 0,
1062
+ breakpoints: {},
1063
+ dragFree: !1,
1064
+ dragThreshold: 10,
1065
+ loop: !1,
1066
+ skipSnaps: !1,
1067
+ duration: 25,
1068
+ startIndex: 0,
1069
+ active: !0,
1070
+ watchDrag: !0,
1071
+ watchResize: !0,
1072
+ watchSlides: !0,
1073
+ watchFocus: !0
1074
+ };
1075
+ function zn(t) {
1076
+ function n(r, o) {
1077
+ return Kt(r, o || {});
1078
+ }
1079
+ function e(r) {
1080
+ const o = r.breakpoints || {}, f = dt(o).filter((i) => t.matchMedia(i).matches).map((i) => o[i]).reduce((i, u) => n(i, u), {});
1081
+ return n(r, f);
1082
+ }
1083
+ function s(r) {
1084
+ return r.map((o) => dt(o.breakpoints || {})).reduce((o, f) => o.concat(f), []).map(t.matchMedia);
1085
+ }
1086
+ return {
1087
+ mergeOptions: n,
1088
+ optionsAtMedia: e,
1089
+ optionsMediaQueries: s
1090
+ };
1091
+ }
1092
+ function jn(t) {
1093
+ let n = [];
1094
+ function e(r, o) {
1095
+ return n = o.filter(({
1096
+ options: f
1097
+ }) => t.optionsAtMedia(f).active !== !1), n.forEach((f) => f.init(r, t)), o.reduce((f, i) => Object.assign(f, {
1098
+ [i.name]: i
1099
+ }), {});
1100
+ }
1101
+ function s() {
1102
+ n = n.filter((r) => r.destroy());
1103
+ }
1104
+ return {
1105
+ init: e,
1106
+ destroy: s
1107
+ };
1108
+ }
1109
+ function St(t, n, e) {
1110
+ const s = t.ownerDocument, c = s.defaultView, r = zn(c), o = jn(r), f = pt(), i = Bn(), {
1111
+ mergeOptions: u,
1112
+ optionsAtMedia: h,
1113
+ optionsMediaQueries: d
1114
+ } = r, {
1115
+ on: p,
1116
+ off: b,
1117
+ emit: l
1118
+ } = i, m = A;
1119
+ let g = !1, a, S = u(Vn, St.globalOptions), x = u(S), I = [], D, T, E;
1120
+ function L() {
1121
+ const {
1122
+ container: M,
1123
+ slides: y
1124
+ } = x;
1125
+ T = (Tt(M) ? t.querySelector(M) : M) || t.children[0];
1126
+ const C = Tt(y) ? T.querySelectorAll(y) : y;
1127
+ E = [].slice.call(C || T.children);
1128
+ }
1129
+ function v(M) {
1130
+ const y = Nn(t, T, E, s, c, M, i);
1131
+ if (M.loop && !y.slideLooper.canLoop()) {
1132
+ const O = Object.assign({}, M, {
1133
+ loop: !1
1134
+ });
1135
+ return v(O);
1136
+ }
1137
+ return y;
1138
+ }
1139
+ function w(M, y) {
1140
+ g || (S = u(S, M), x = h(S), I = y || I, L(), a = v(x), d([S, ...I.map(({
1141
+ options: O
1142
+ }) => O)]).forEach((O) => f.add(O, "change", A)), x.active && (a.translate.to(a.location.get()), a.animation.init(), a.slidesInView.init(), a.slideFocus.init(V), a.eventHandler.init(V), a.resizeHandler.init(V), a.slidesHandler.init(V), a.options.loop && a.slideLooper.loop(), T.offsetParent && E.length && a.dragHandler.init(V), D = o.init(V, I)));
1143
+ }
1144
+ function A(M, y) {
1145
+ const O = R();
1146
+ N(), w(u({
1147
+ startIndex: O
1148
+ }, M), y), i.emit("reInit");
1149
+ }
1150
+ function N() {
1151
+ a.dragHandler.destroy(), a.eventStore.clear(), a.translate.clear(), a.slideLooper.clear(), a.resizeHandler.destroy(), a.slidesHandler.destroy(), a.slidesInView.destroy(), a.animation.destroy(), o.destroy(), f.clear();
1152
+ }
1153
+ function j() {
1154
+ g || (g = !0, f.clear(), N(), i.emit("destroy"), i.clear());
1155
+ }
1156
+ function G(M, y, O) {
1157
+ !x.active || g || (a.scrollBody.useBaseFriction().useDuration(y === !0 ? 0 : x.duration), a.scrollTo.index(M, O || 0));
1158
+ }
1159
+ function H(M) {
1160
+ const y = a.index.add(1).get();
1161
+ G(y, M, -1);
1162
+ }
1163
+ function _(M) {
1164
+ const y = a.index.add(-1).get();
1165
+ G(y, M, 1);
1166
+ }
1167
+ function X() {
1168
+ return a.index.add(1).get() !== R();
1169
+ }
1170
+ function $() {
1171
+ return a.index.add(-1).get() !== R();
1172
+ }
1173
+ function U() {
1174
+ return a.scrollSnapList;
1175
+ }
1176
+ function rt() {
1177
+ return a.scrollProgress.get(a.offsetLocation.get());
1178
+ }
1179
+ function R() {
1180
+ return a.index.get();
1181
+ }
1182
+ function nt() {
1183
+ return a.indexPrevious.get();
1184
+ }
1185
+ function et() {
1186
+ return a.slidesInView.get();
1187
+ }
1188
+ function K() {
1189
+ return a.slidesInView.get(!1);
1190
+ }
1191
+ function st() {
1192
+ return D;
1193
+ }
1194
+ function it() {
1195
+ return a;
1196
+ }
1197
+ function B() {
1198
+ return t;
1199
+ }
1200
+ function F() {
1201
+ return T;
1202
+ }
1203
+ function Q() {
1204
+ return E;
1205
+ }
1206
+ const V = {
1207
+ canScrollNext: X,
1208
+ canScrollPrev: $,
1209
+ containerNode: F,
1210
+ internalEngine: it,
1211
+ destroy: j,
1212
+ off: b,
1213
+ on: p,
1214
+ emit: l,
1215
+ plugins: st,
1216
+ previousScrollSnap: nt,
1217
+ reInit: m,
1218
+ rootNode: B,
1219
+ scrollNext: H,
1220
+ scrollPrev: _,
1221
+ scrollProgress: rt,
1222
+ scrollSnapList: U,
1223
+ scrollTo: G,
1224
+ selectedScrollSnap: R,
1225
+ slideNodes: Q,
1226
+ slidesInView: et,
1227
+ slidesNotInView: K
1228
+ };
1229
+ return w(n, e), setTimeout(() => i.emit("init"), 0), V;
1230
+ }
1231
+ St.globalOptions = void 0;
1232
+ function Pt(t = {}, n = []) {
1233
+ const e = Gt(t), s = Gt(n), [c, r] = ft(), [o, f] = ft(), i = Ut(() => {
1234
+ c && c.reInit(e.current, s.current);
1235
+ }, [c]);
1236
+ return ht(() => {
1237
+ At(e.current, t) || (e.current = t, i());
1238
+ }, [t, i]), ht(() => {
1239
+ un(s.current, n) || (s.current = n, i());
1240
+ }, [n, i]), ht(() => {
1241
+ if (cn() && o) {
1242
+ St.globalOptions = Pt.globalOptions;
1243
+ const u = St(o, e.current, s.current);
1244
+ return r(u), () => u.destroy();
1245
+ } else
1246
+ r(void 0);
1247
+ }, [o, r]), [f, c];
1248
+ }
1249
+ Pt.globalOptions = void 0;
1250
+ const Hn = ({
1251
+ slidesToScroll: t = 1
1252
+ } = {}) => {
1253
+ const [n, e] = Pt({
1254
+ slidesToScroll: t,
1255
+ containScroll: "trimSnaps",
1256
+ skipSnaps: !0,
1257
+ watchResize: !0
1258
+ }), [s, c] = ft(!1), [r, o] = ft(!1), [f, i] = ft(0), u = Ut(() => {
1259
+ e && (c(e.canScrollPrev()), o(e.canScrollNext()), i(e.selectedScrollSnap()));
1260
+ }, [e]);
1261
+ return ht(() => {
1262
+ if (e)
1263
+ return u(), e.on("select", u), e.on("reInit", u), () => {
1264
+ e.off("select", u), e.off("reInit", u);
1265
+ };
1266
+ }, [e, u]), {
1267
+ carouselRef: n,
1268
+ carouselApi: e,
1269
+ currentPage: f,
1270
+ canScrollNext: r,
1271
+ canScrollPrev: s
1272
+ };
1273
+ };
1274
+ export {
1275
+ Hn as useCarousel
1276
+ };