aptechka 0.83.1 → 0.84.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.
Files changed (285) hide show
  1. package/lib/Animation-BAiM6_n1.js +111 -0
  2. package/lib/Animation-DMWabSR0.cjs +1 -0
  3. package/lib/Composed-B0fvCtZz.cjs +1 -0
  4. package/lib/Composed-CgA9lLWA.js +75 -0
  5. package/lib/Damped-BLo-OAVb.cjs +1 -0
  6. package/lib/Damped-Dcz5UdMH.js +57 -0
  7. package/lib/DerivedArray-DFhxap_z.js +63 -0
  8. package/lib/DerivedArray-DYtWMW0n.cjs +1 -0
  9. package/lib/DragControls-BPHsDeH6.cjs +1 -0
  10. package/lib/DragControls-D2a1Cifp.js +234 -0
  11. package/lib/LocalLinks-BWFJYhGX.cjs +1 -0
  12. package/lib/LocalLinks-Dwgf3No6.js +65 -0
  13. package/lib/PageAnnouncerElement-DPMlVJZG.cjs +1 -0
  14. package/lib/PageAnnouncerElement-DV9pm_od.js +28 -0
  15. package/lib/PageScroll-BAatKJx6.cjs +1 -0
  16. package/lib/PageScroll-m3TsHnzR.js +65 -0
  17. package/lib/SourceElement-941MrYpq.js +265 -0
  18. package/lib/SourceElement-DBLZ7b5k.cjs +5 -0
  19. package/lib/Store-BCW70G3Z.cjs +1 -0
  20. package/lib/Store-uLDYY9ed.js +158 -0
  21. package/lib/Tweened-BvtjLCa3.js +48 -0
  22. package/lib/Tweened-DdXm1dbF.cjs +1 -0
  23. package/lib/Viewport-BiDoiU8M.js +113 -0
  24. package/lib/Viewport-CXGKUyDy.cjs +1 -0
  25. package/lib/accordion/index.cjs +1 -1
  26. package/lib/accordion/index.js +97 -93
  27. package/lib/animation/index.cjs +1 -1
  28. package/lib/animation/index.js +6 -6
  29. package/lib/api-fetcher/index.cjs +1 -1
  30. package/lib/api-fetcher/index.js +67 -66
  31. package/lib/attribute/index.cjs +1 -1
  32. package/lib/attribute/index.js +37 -34
  33. package/lib/attributes-BADnRZpK.cjs +1 -0
  34. package/lib/attributes-FObgMNCf.js +36 -0
  35. package/lib/billboard/index.cjs +1 -1
  36. package/lib/billboard/index.js +240 -232
  37. package/lib/cache/index.cjs +1 -1
  38. package/lib/cache/index.js +26 -23
  39. package/lib/canvas/index.cjs +1 -1
  40. package/lib/canvas/index.js +62 -59
  41. package/lib/canvas-BP1ceie3.cjs +1 -0
  42. package/lib/canvas-DsglKco1.js +40 -0
  43. package/lib/connector/index.cjs +1 -1
  44. package/lib/connector/index.js +44 -41
  45. package/lib/controls/index.cjs +1 -1
  46. package/lib/controls/index.js +6 -6
  47. package/lib/coordinates--JG1U6kQ.js +29 -0
  48. package/lib/coordinates-DQ9XV9M1.cjs +1 -0
  49. package/lib/css-property/index.cjs +1 -1
  50. package/lib/css-property/index.d.ts +1 -1
  51. package/lib/css-property/index.js +40 -37
  52. package/lib/css-unit-parser/index.cjs +2 -2
  53. package/lib/css-unit-parser/index.js +22 -19
  54. package/lib/css-value-parser/index.cjs +1 -1
  55. package/lib/css-value-parser/index.js +13 -11
  56. package/lib/custom-elements-BfZCJde6.cjs +1 -0
  57. package/lib/custom-elements-HEMuF7yH.js +27 -0
  58. package/lib/dev/index.cjs +2 -1
  59. package/lib/dev/index.d.ts +1 -0
  60. package/lib/dev/index.js +25 -10
  61. package/lib/device/index.cjs +1 -1
  62. package/lib/device/index.js +5 -5
  63. package/lib/dom-B40i6NXw.cjs +1 -0
  64. package/lib/dom-D8D-_9ty.js +108 -0
  65. package/lib/easings-BSGJFMAo.js +40 -0
  66. package/lib/easings-BWq0pPLq.cjs +1 -0
  67. package/lib/element-CqD0jqBJ.cjs +1 -0
  68. package/lib/element-DKw5H-Tu.js +10 -0
  69. package/lib/element-linked-store/index.cjs +1 -1
  70. package/lib/element-linked-store/index.js +53 -52
  71. package/lib/element-resizer/index.cjs +1 -1
  72. package/lib/element-resizer/index.js +47 -44
  73. package/lib/en3/index.cjs +4 -4
  74. package/lib/en3/index.js +192 -185
  75. package/lib/events-Ds-TuvYW.js +9 -0
  76. package/lib/events-UlGk63iC.cjs +1 -0
  77. package/lib/file-DwQs6bB6.js +28 -0
  78. package/lib/file-RHfA3OS-.cjs +1 -0
  79. package/lib/function-H4b_gTg6.cjs +1 -0
  80. package/lib/function-UmbPrOHm.js +19 -0
  81. package/lib/gestures-DmKKNnh4.js +14 -0
  82. package/lib/gestures-DtYbQr49.cjs +1 -0
  83. package/lib/history/index.cjs +1 -1
  84. package/lib/history/index.js +24 -21
  85. package/lib/iframe/index.cjs +1 -1
  86. package/lib/iframe/index.js +27 -24
  87. package/lib/image/index.cjs +1 -1
  88. package/lib/image/index.js +17 -13
  89. package/lib/index-BpO2RJ__.cjs +1 -0
  90. package/lib/index-DpKsHe97.js +68 -0
  91. package/lib/intersector/index.cjs +1 -1
  92. package/lib/intersector/index.js +3 -3
  93. package/lib/jsx/ComponentElement.d.ts +4 -0
  94. package/lib/jsx/h.d.ts +7 -16
  95. package/lib/jsx/hooks/component/useStylesheet.d.ts +1 -1
  96. package/lib/jsx/hooks/cssProperty.d.ts +6 -0
  97. package/lib/jsx/hooks/resize.d.ts +4 -0
  98. package/lib/jsx/hooks/store.d.ts +1 -2
  99. package/lib/jsx/hooks/ticker.d.ts +5 -0
  100. package/lib/jsx/index.cjs +1 -1
  101. package/lib/jsx/index.d.ts +4 -4
  102. package/lib/jsx/index.js +171 -349
  103. package/lib/jsx/plugins/vite/index.cjs +49 -0
  104. package/lib/jsx/plugins/vite/index.d.ts +38 -0
  105. package/lib/jsx/plugins/vite/index.js +104 -0
  106. package/lib/jsx/render.d.ts +2 -0
  107. package/lib/jsx/type.d.ts +228 -190
  108. package/lib/ladder/index.cjs +1 -1
  109. package/lib/ladder/index.js +86 -84
  110. package/lib/layout-C26zkY7D.js +35 -0
  111. package/lib/layout-CnGLl7oe.cjs +1 -0
  112. package/lib/layout-box/index.cjs +1 -1
  113. package/lib/layout-box/index.js +221 -217
  114. package/lib/loading/index.cjs +1 -1
  115. package/lib/loading/index.js +48 -45
  116. package/lib/local-links/index.cjs +1 -1
  117. package/lib/local-links/index.js +2 -2
  118. package/lib/masonry-layout/index.cjs +1 -1
  119. package/lib/masonry-layout/index.js +48 -45
  120. package/lib/math-C-knY2TL.cjs +1 -0
  121. package/lib/math-r8V23YFe.js +57 -0
  122. package/lib/media/index.cjs +1 -1
  123. package/lib/media/index.js +28 -25
  124. package/lib/metadata-BNdkmeeD.js +15 -0
  125. package/lib/metadata-BrHUfpV9.cjs +1 -0
  126. package/lib/morph/index.cjs +1 -1
  127. package/lib/morph/index.js +561 -556
  128. package/lib/morph-BtgB1YQP.js +256 -0
  129. package/lib/morph-Buhxq-X0.cjs +1 -0
  130. package/lib/need_redo_tweaker/index.cjs +4 -4
  131. package/lib/need_redo_tweaker/index.js +862 -834
  132. package/lib/notifier/index.cjs +1 -1
  133. package/lib/notifier/index.js +29 -26
  134. package/lib/number-Bu4sGvW7.cjs +1 -0
  135. package/lib/number-DiVt2xnh.js +47 -0
  136. package/lib/object-CiIdEmJx.js +98 -0
  137. package/lib/object-DTY_W6xG.cjs +1 -0
  138. package/lib/order/index.cjs +1 -1
  139. package/lib/order/index.js +3 -3
  140. package/lib/page-announcer/index.cjs +1 -1
  141. package/lib/page-announcer/index.js +2 -2
  142. package/lib/page-scroll/index.cjs +1 -1
  143. package/lib/page-scroll/index.js +2 -2
  144. package/lib/pixel-perfect/index.cjs +4 -4
  145. package/lib/pixel-perfect/index.js +43 -40
  146. package/lib/pointer/index.cjs +1 -1
  147. package/lib/pointer/index.js +125 -122
  148. package/lib/polyfills-CG1XJNia.js +28 -0
  149. package/lib/polyfills-DZCuDBkA.cjs +1 -0
  150. package/lib/popover/index.cjs +1 -1
  151. package/lib/popover/index.js +249 -245
  152. package/lib/radio/index.cjs +1 -1
  153. package/lib/radio/index.js +58 -55
  154. package/lib/render-DLcWVnuH.js +355 -0
  155. package/lib/render-DdomypCo.cjs +1 -0
  156. package/lib/router/index.cjs +1 -1
  157. package/lib/router/index.js +196 -194
  158. package/lib/scroll/index.cjs +1 -1
  159. package/lib/scroll/index.js +890 -877
  160. package/lib/scroll-BvIWh1xB.js +41 -0
  161. package/lib/scroll-CT0lpyRZ.cjs +1 -0
  162. package/lib/scroll-entries/index.cjs +1 -1
  163. package/lib/scroll-entries/index.js +37 -34
  164. package/lib/scroll-kit/index.cjs +1 -1
  165. package/lib/scroll-kit/index.js +214 -209
  166. package/lib/sequence/index.cjs +1 -1
  167. package/lib/sequence/index.js +102 -98
  168. package/lib/size-element/index.cjs +1 -1
  169. package/lib/size-element/index.js +29 -26
  170. package/lib/slicer/index.cjs +1 -1
  171. package/lib/slicer/index.js +118 -113
  172. package/lib/source/index.cjs +1 -1
  173. package/lib/source/index.js +5 -5
  174. package/lib/spa/index.cjs +1 -1
  175. package/lib/spa/index.js +94 -94
  176. package/lib/store/index.cjs +1 -1
  177. package/lib/store/index.d.ts +2 -2
  178. package/lib/store/index.js +10 -8
  179. package/lib/string-B3lm2b7v.js +84 -0
  180. package/lib/string-CbRNzmd9.cjs +1 -0
  181. package/lib/style-DBoQWK0d.js +14 -0
  182. package/lib/style-IDJ6db6n.cjs +1 -0
  183. package/lib/stylesheet-CHvuef16.js +28 -0
  184. package/lib/stylesheet-CQdBaIAA.cjs +1 -0
  185. package/lib/ticker/index.cjs +1 -1
  186. package/lib/ticker/index.js +96 -92
  187. package/lib/url-CPCO10Sy.cjs +1 -0
  188. package/lib/url-CWCY_qe_.js +124 -0
  189. package/lib/utils/attributes.d.ts +2 -0
  190. package/lib/utils/dom.d.ts +1 -0
  191. package/lib/utils/index.cjs +1 -1
  192. package/lib/utils/index.js +245 -226
  193. package/lib/utils/polyfills.d.ts +1 -1
  194. package/lib/video/index.cjs +1 -1
  195. package/lib/video/index.js +36 -33
  196. package/lib/window-resizer/index.cjs +1 -1
  197. package/lib/window-resizer/index.js +27 -24
  198. package/lib/youtube/index.cjs +1 -1
  199. package/lib/youtube/index.js +56 -54
  200. package/package.json +11 -24
  201. package/lib/Animation-BzTjZIE-.js +0 -108
  202. package/lib/Animation-C39Ah-LM.cjs +0 -1
  203. package/lib/Composed-C-TV9te3.cjs +0 -1
  204. package/lib/Composed-DyAWjEXE.js +0 -121
  205. package/lib/Damped-CRusiRIV.js +0 -56
  206. package/lib/Damped-Prr0iKu1.cjs +0 -1
  207. package/lib/DragControls-8rNZwQrs.cjs +0 -1
  208. package/lib/DragControls-DBNdMBA4.js +0 -228
  209. package/lib/LocalLinks-BxhSFv_Q.cjs +0 -1
  210. package/lib/LocalLinks-DFZFpbjs.js +0 -62
  211. package/lib/PageAnnouncerElement-0LxZjtVH.js +0 -24
  212. package/lib/PageAnnouncerElement-AQ0Ja6HM.cjs +0 -1
  213. package/lib/PageScroll-0LxFblry.js +0 -62
  214. package/lib/PageScroll-BXJUQwG7.cjs +0 -1
  215. package/lib/SourceElement-BHqPFbna.cjs +0 -5
  216. package/lib/SourceElement-DjbHjynf.js +0 -260
  217. package/lib/Store-Blf4msDz.cjs +0 -1
  218. package/lib/Store-ZThXYBQd.js +0 -152
  219. package/lib/Tweened-Bw1Cn1PJ.js +0 -47
  220. package/lib/Tweened-DWtk9E-O.cjs +0 -1
  221. package/lib/Viewport-BxCr0GlB.cjs +0 -1
  222. package/lib/Viewport-Dt-d9DPi.js +0 -109
  223. package/lib/attributes-69we3byR.js +0 -10
  224. package/lib/attributes-Bf2svn4j.cjs +0 -1
  225. package/lib/canvas-CU5Xjahf.cjs +0 -1
  226. package/lib/canvas-DeZ0SLUJ.js +0 -34
  227. package/lib/coordinates-CgdGoSYs.js +0 -24
  228. package/lib/coordinates-D8Np3cPD.cjs +0 -1
  229. package/lib/custom-elements-DBnCK7Zx.js +0 -24
  230. package/lib/custom-elements-Dh4TWRDJ.cjs +0 -1
  231. package/lib/dom-BETkVSSZ.js +0 -82
  232. package/lib/dom-CBLlqORw.cjs +0 -1
  233. package/lib/easings-BEmRlrDd.js +0 -38
  234. package/lib/easings-GegIwET5.cjs +0 -1
  235. package/lib/element-CGVl1jA-.js +0 -7
  236. package/lib/element-yhcBhsho.cjs +0 -1
  237. package/lib/events-CsVF98U6.js +0 -6
  238. package/lib/events-KVanG9sR.cjs +0 -1
  239. package/lib/file-DSpfWdd9.cjs +0 -1
  240. package/lib/file-GHShUlue.js +0 -24
  241. package/lib/function-C10DGppn.js +0 -17
  242. package/lib/function-MthRj-GJ.cjs +0 -1
  243. package/lib/gestures-C7gbKx11.cjs +0 -1
  244. package/lib/gestures-CcXV6fCp.js +0 -11
  245. package/lib/index-OE2INULi.cjs +0 -1
  246. package/lib/index-e9eDuagL.js +0 -65
  247. package/lib/jsx/hydrate.d.ts +0 -1
  248. package/lib/jsx/integrations/astro/client.cjs +0 -1
  249. package/lib/jsx/integrations/astro/client.d.ts +0 -2
  250. package/lib/jsx/integrations/astro/client.js +0 -50
  251. package/lib/jsx/integrations/astro/index.cjs +0 -1
  252. package/lib/jsx/integrations/astro/index.d.ts +0 -2
  253. package/lib/jsx/integrations/astro/index.js +0 -54
  254. package/lib/jsx/integrations/astro/server.cjs +0 -1
  255. package/lib/jsx/integrations/astro/server.d.ts +0 -3
  256. package/lib/jsx/integrations/astro/server.js +0 -35
  257. package/lib/jsx/plugins/vite.d.ts +0 -21
  258. package/lib/layout-BSMtwCga.js +0 -29
  259. package/lib/layout-Ctc2p3uz.cjs +0 -1
  260. package/lib/math-BOBiC4TN.js +0 -45
  261. package/lib/math-GDWEqu7y.cjs +0 -1
  262. package/lib/metadata-BcYZ5w3T.cjs +0 -1
  263. package/lib/metadata-jfowcCyz.js +0 -12
  264. package/lib/morph-B6sGhLCi.cjs +0 -1
  265. package/lib/morph-BQErz7qP.js +0 -242
  266. package/lib/number-ChAm68cm.cjs +0 -1
  267. package/lib/number-CumqY64S.js +0 -40
  268. package/lib/object-CcMK4y_r.js +0 -87
  269. package/lib/object-baN9pgbU.cjs +0 -1
  270. package/lib/polyfills-DJrTJQky.js +0 -24
  271. package/lib/polyfills-Df4r-ETT.cjs +0 -1
  272. package/lib/render-DQs7rIoN.cjs +0 -1
  273. package/lib/render-D_0FCWEu.js +0 -18
  274. package/lib/scroll-BA2WnUrb.cjs +0 -1
  275. package/lib/scroll-DY5senkF.js +0 -37
  276. package/lib/string-BlMQbe8b.js +0 -70
  277. package/lib/string-DUXXtU8v.cjs +0 -1
  278. package/lib/style-At6aDoqG.cjs +0 -1
  279. package/lib/style-j2TwriJ_.js +0 -10
  280. package/lib/stylesheet-5_o7PFzM.cjs +0 -1
  281. package/lib/stylesheet-DdBzowZY.js +0 -24
  282. package/lib/url-CHgcNwJ1.cjs +0 -1
  283. package/lib/url-CYgo5vrG.js +0 -113
  284. package/lib/vite-C-i3hVDL.js +0 -75
  285. package/lib/vite-DzanPumM.cjs +0 -44
@@ -1,151 +1,153 @@
1
- var li = Object.defineProperty;
2
- var qs = Object.getOwnPropertySymbols, ci = Object.getPrototypeOf, ui = Object.prototype.hasOwnProperty, ai = Object.prototype.propertyIsEnumerable, di = Reflect.get;
3
- var Us = (d) => {
4
- throw TypeError(d);
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __propIsEnum = Object.prototype.propertyIsEnumerable, __reflectGet = Reflect.get;
3
+ var __typeError = (msg) => {
4
+ throw TypeError(msg);
5
5
  };
6
- var Gs = (d, n, e) => n in d ? li(d, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[n] = e, Ks = (d, n) => {
7
- for (var e in n || (n = {}))
8
- ui.call(n, e) && Gs(d, e, n[e]);
9
- if (qs)
10
- for (var e of qs(n))
11
- ai.call(n, e) && Gs(d, e, n[e]);
12
- return d;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
9
+ if (__getOwnPropSymbols)
10
+ for (var prop of __getOwnPropSymbols(b))
11
+ __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
12
+ return a;
13
13
  };
14
- var ks = (d, n, e) => n.has(d) || Us("Cannot " + e);
15
- var t = (d, n, e) => (ks(d, n, "read from private field"), e ? e.call(d) : n.get(d)), i = (d, n, e) => n.has(d) ? Us("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(d) : n.set(d, e), r = (d, n, e, s) => (ks(d, n, "write to private field"), s ? s.call(d, e) : n.set(d, e), e), o = (d, n, e) => (ks(d, n, "access private method"), e);
16
- var Vs = (d, n, e) => di(ci(d), e, n);
17
- var zs = (d, n, e) => new Promise((s, h) => {
18
- var u = (C) => {
14
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
15
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
16
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value), __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
17
+ var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
18
+ var __async = (__this, __arguments, generator) => new Promise((resolve, reject) => {
19
+ var fulfilled = (value) => {
19
20
  try {
20
- v(e.next(C));
21
- } catch (ue) {
22
- h(ue);
21
+ step2(generator.next(value));
22
+ } catch (e) {
23
+ reject(e);
23
24
  }
24
- }, g = (C) => {
25
+ }, rejected = (value) => {
25
26
  try {
26
- v(e.throw(C));
27
- } catch (ue) {
28
- h(ue);
27
+ step2(generator.throw(value));
28
+ } catch (e) {
29
+ reject(e);
29
30
  }
30
- }, v = (C) => C.done ? s(C.value) : Promise.resolve(C.value).then(u, g);
31
- v((e = e.apply(d, n)).next());
31
+ }, step2 = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
32
+ step2((generator = generator.apply(__this, __arguments)).next());
32
33
  });
33
- import { S as ae } from "../Store-ZThXYBQd.js";
34
- import { i as q } from "../index-e9eDuagL.js";
35
- import { q as fi } from "../easings-BEmRlrDd.js";
36
- import { i as pi } from "../element-CGVl1jA-.js";
37
- import { d as st } from "../events-CsVF98U6.js";
38
- import { d as xs } from "../function-C10DGppn.js";
39
- import { a as ls, g as cs, b as bi } from "../layout-BSMtwCga.js";
40
- import { c as js, s as mi } from "../math-BOBiC4TN.js";
41
- import { p as Si, l as gi } from "../number-CumqY64S.js";
42
- import { c as Js } from "../stylesheet-DdBzowZY.js";
34
+ import { S as Store } from "../Store-uLDYY9ed.js";
35
+ import { i as isBrowser } from "../index-DpKsHe97.js";
36
+ import { q as easeInOutExpo } from "../easings-BSGJFMAo.js";
37
+ import { i as isElementVisible } from "../element-DKw5H-Tu.js";
38
+ import { d as dispatchEvent } from "../events-Ds-TuvYW.js";
39
+ import { d as debounce } from "../function-UmbPrOHm.js";
40
+ import { a as getCumulativeOffsetTop, g as getCumulativeOffsetLeft, b as getStickyOffset } from "../layout-C26zkY7D.js";
41
+ import { c as clamp, s as step } from "../math-r8V23YFe.js";
42
+ import { p as preciseNumber, l as loopNumber } from "../number-DiVt2xnh.js";
43
+ import { c as createStylesheet } from "../stylesheet-CHvuef16.js";
43
44
  import "../ticker/index.js";
44
- import { TICK_ORDER as Qs, RESIZE_ORDER as Ls } from "../order/index.js";
45
- import { D as Xs } from "../Damped-CRusiRIV.js";
46
- import { T as vi } from "../Tweened-Bw1Cn1PJ.js";
47
- import { W as yi, K as Ci, D as Pi, A as Ei } from "../DragControls-DBNdMBA4.js";
48
- import { windowResizer as pt } from "../window-resizer/index.js";
49
- import { scrollEntries as ce } from "../scroll-entries/index.js";
50
- import { cssUnitParser as Zs } from "../css-unit-parser/index.js";
51
- import { CSSProperty as l } from "../css-property/index.js";
52
- import { d as wi } from "../Viewport-Dt-d9DPi.js";
45
+ import { TICK_ORDER, RESIZE_ORDER } from "../order/index.js";
46
+ import { D as Damped } from "../Damped-Dcz5UdMH.js";
47
+ import { T as Tweened } from "../Tweened-BvtjLCa3.js";
48
+ import { W as WheelControls, K as KeyboardControls, D as DragControls, A as AutoplayControls } from "../DragControls-D2a1Cifp.js";
49
+ import { windowResizer } from "../window-resizer/index.js";
50
+ import { scrollEntries } from "../scroll-entries/index.js";
51
+ import { cssUnitParser } from "../css-unit-parser/index.js";
52
+ import { CSSProperty } from "../css-property/index.js";
53
+ import { d as device } from "../Viewport-BiDoiU8M.js";
53
54
  import "construct-style-sheets-polyfill";
54
- import { elementResizer as os } from "../element-resizer/index.js";
55
- import { s as xi } from "../gestures-CcXV6fCp.js";
56
- import { b as Li } from "../dom-BETkVSSZ.js";
57
- var p, Re, E, us, as, pe, bt, $t, be, Bt, Fe;
58
- class ki {
59
- constructor(n, e, s) {
60
- i(this, Bt);
61
- i(this, p);
62
- i(this, Re);
63
- i(this, E);
64
- i(this, us, 0);
65
- i(this, as, 0);
66
- i(this, pe, 0);
67
- i(this, bt, 0);
68
- i(this, $t, null);
69
- i(this, be, 0);
70
- r(this, p, n), r(this, Re, e), r(this, E, s), ce.register(t(this, p)), this.setIndex(t(this, Re));
55
+ import { elementResizer } from "../element-resizer/index.js";
56
+ import { s as setupDrag } from "../gestures-DmKKNnh4.js";
57
+ import { b as findParentElement } from "../dom-D8D-_9ty.js";
58
+ var _element, _index, _scrollElement, _width, _height, _size, _position, _currentMark, _transformPosition, _ScrollSection_instances, setVar_fn;
59
+ const _ScrollSection = class _ScrollSection {
60
+ constructor(element, index, scrollElement) {
61
+ __privateAdd(this, _ScrollSection_instances);
62
+ __privateAdd(this, _element);
63
+ __privateAdd(this, _index);
64
+ __privateAdd(this, _scrollElement);
65
+ __privateAdd(this, _width, 0);
66
+ __privateAdd(this, _height, 0);
67
+ __privateAdd(this, _size, 0);
68
+ __privateAdd(this, _position, 0);
69
+ __privateAdd(this, _currentMark, null);
70
+ __privateAdd(this, _transformPosition, 0);
71
+ __privateSet(this, _element, element), __privateSet(this, _index, index), __privateSet(this, _scrollElement, scrollElement), scrollEntries.register(__privateGet(this, _element)), this.setIndex(__privateGet(this, _index));
71
72
  }
72
73
  get element() {
73
- return t(this, p);
74
+ return __privateGet(this, _element);
74
75
  }
75
76
  get index() {
76
- return t(this, Re);
77
+ return __privateGet(this, _index);
77
78
  }
78
79
  get size() {
79
- return t(this, pe);
80
+ return __privateGet(this, _size);
80
81
  }
81
82
  get width() {
82
- return t(this, us);
83
+ return __privateGet(this, _width);
83
84
  }
84
85
  get height() {
85
- return t(this, as);
86
+ return __privateGet(this, _height);
86
87
  }
87
88
  get position() {
88
- return t(this, bt);
89
+ return __privateGet(this, _position);
89
90
  }
90
91
  get transformPosition() {
91
- return t(this, be);
92
+ return __privateGet(this, _transformPosition);
92
93
  }
93
94
  destroy() {
94
- ce.unregister(t(this, p)), this.unsetTransform();
95
+ scrollEntries.unregister(__privateGet(this, _element)), this.unsetTransform();
95
96
  }
96
97
  unsetTransform() {
97
- t(this, p).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setCurrentIndexArcAbs(null), this.setOffsetIndex(null), this.setMiddle(!1), this.setSize();
98
+ __privateGet(this, _element).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setCurrentIndexArcAbs(null), this.setOffsetIndex(null), this.setMiddle(!1), this.setSize();
98
99
  }
99
- setSize(n) {
100
- n ? (t(this, p).style.setProperty("--size", n + "px"), t(this, E).axisCSSProperty.current === "x" ? (t(this, p).style.width = n + "px", t(this, p).style.height = "") : (t(this, p).style.height = n + "px", t(this, p).style.width = "")) : (t(this, p).style.width = "", t(this, p).style.height = "", t(this, p).style.removeProperty("--size"));
100
+ setSize(value) {
101
+ value ? (__privateGet(this, _element).style.setProperty("--size", value + "px"), __privateGet(this, _scrollElement).axisCSSProperty.current === "x" ? (__privateGet(this, _element).style.width = value + "px", __privateGet(this, _element).style.height = "") : (__privateGet(this, _element).style.height = value + "px", __privateGet(this, _element).style.width = "")) : (__privateGet(this, _element).style.width = "", __privateGet(this, _element).style.height = "", __privateGet(this, _element).style.removeProperty("--size"));
101
102
  }
102
103
  resize() {
103
- r(this, us, t(this, p).offsetWidth), r(this, as, t(this, p).offsetHeight), r(this, pe, t(this, E).vertical ? t(this, p).offsetHeight : t(this, p).offsetWidth), r(this, bt, t(this, E).vertical ? ls(t(this, p)) : cs(t(this, p))), r(this, bt, t(this, bt) - t(this, E).contentPosition);
104
+ __privateSet(this, _width, __privateGet(this, _element).offsetWidth), __privateSet(this, _height, __privateGet(this, _element).offsetHeight), __privateSet(this, _size, __privateGet(this, _scrollElement).vertical ? __privateGet(this, _element).offsetHeight : __privateGet(this, _element).offsetWidth), __privateSet(this, _position, __privateGet(this, _scrollElement).vertical ? getCumulativeOffsetTop(__privateGet(this, _element)) : getCumulativeOffsetLeft(__privateGet(this, _element))), __privateSet(this, _position, __privateGet(this, _position) - __privateGet(this, _scrollElement).contentPosition);
104
105
  }
105
106
  transform() {
106
- const n = t(this, E).shiftSectionPositionCSSProperty.current;
107
- let e = n;
108
- const s = t(this, E).viewportSize * t(this, E).sectionDistanceScaleCSSProperty.current;
109
- t(this, E).loopCSSProperty.current && t(this, bt) + t(this, pe) <= t(this, E).currentScrollValue - n / 2 && (e = (t(this, E).distance - n) * -1 - t(this, E).gap), ce.update(
110
- t(this, p),
111
- t(this, E).axisCSSProperty.current,
112
- e
107
+ const cssOffset = __privateGet(this, _scrollElement).shiftSectionPositionCSSProperty.current;
108
+ let offset = cssOffset;
109
+ const distanceAddition = __privateGet(this, _scrollElement).viewportSize * __privateGet(this, _scrollElement).sectionDistanceScaleCSSProperty.current;
110
+ __privateGet(this, _scrollElement).loopCSSProperty.current && __privateGet(this, _position) + __privateGet(this, _size) <= __privateGet(this, _scrollElement).currentScrollValue - cssOffset / 2 && (offset = (__privateGet(this, _scrollElement).distance - cssOffset) * -1 - __privateGet(this, _scrollElement).gap), scrollEntries.update(
111
+ __privateGet(this, _element),
112
+ __privateGet(this, _scrollElement).axisCSSProperty.current,
113
+ offset
113
114
  );
114
- const h = t(this, E).currentScrollValue + e, u = t(this, bt) - t(this, E).viewportSize - s, g = t(this, bt) + t(this, pe) + s, v = Si(js(h, u, g), 3);
115
- r(this, be, v * -1), t(this, E).vertical ? t(this, p).style.transform = `translate3d(0px, ${t(this, be)}px, 0px)` : t(this, p).style.transform = `translate3d(${t(this, be)}px, 0px, 0px)`;
115
+ const valueToClamp = __privateGet(this, _scrollElement).currentScrollValue + offset, min = __privateGet(this, _position) - __privateGet(this, _scrollElement).viewportSize - distanceAddition, max = __privateGet(this, _position) + __privateGet(this, _size) + distanceAddition, value = preciseNumber(clamp(valueToClamp, min, max), 3);
116
+ __privateSet(this, _transformPosition, value * -1), __privateGet(this, _scrollElement).vertical ? __privateGet(this, _element).style.transform = `translate3d(0px, ${__privateGet(this, _transformPosition)}px, 0px)` : __privateGet(this, _element).style.transform = `translate3d(${__privateGet(this, _transformPosition)}px, 0px, 0px)`;
116
117
  }
117
- setMark(n) {
118
- t(this, $t) !== n && (t(this, $t) && t(this, p).classList.remove(t(this, $t)), n && t(this, p).classList.add(n), r(this, $t, n), st(t(this, p), "scrollSectionMarkChange", {
118
+ setMark(mark) {
119
+ __privateGet(this, _currentMark) !== mark && (__privateGet(this, _currentMark) && __privateGet(this, _element).classList.remove(__privateGet(this, _currentMark)), mark && __privateGet(this, _element).classList.add(mark), __privateSet(this, _currentMark, mark), dispatchEvent(__privateGet(this, _element), "scrollSectionMarkChange", {
119
120
  composed: !0,
120
121
  detail: {
121
- mark: t(this, $t)
122
+ mark: __privateGet(this, _currentMark)
122
123
  },
123
124
  custom: !0
124
125
  }));
125
126
  }
126
- setMiddle(n) {
127
- t(this, p).classList.toggle("middle", n);
127
+ setMiddle(bool) {
128
+ __privateGet(this, _element).classList.toggle("middle", bool);
128
129
  }
129
- setIndex(n) {
130
- o(this, Bt, Fe).call(this, "index", n);
130
+ setIndex(value) {
131
+ __privateMethod(this, _ScrollSection_instances, setVar_fn).call(this, "index", value);
131
132
  }
132
- setCurrentIndex(n) {
133
- o(this, Bt, Fe).call(this, "current-index", n);
133
+ setCurrentIndex(value) {
134
+ __privateMethod(this, _ScrollSection_instances, setVar_fn).call(this, "current-index", value);
134
135
  }
135
- setCurrentIndexArc(n) {
136
- o(this, Bt, Fe).call(this, "current-index-arc", n);
136
+ setCurrentIndexArc(value) {
137
+ __privateMethod(this, _ScrollSection_instances, setVar_fn).call(this, "current-index-arc", value);
137
138
  }
138
- setOffsetIndex(n) {
139
- o(this, Bt, Fe).call(this, "offset-index", n);
139
+ setOffsetIndex(value) {
140
+ __privateMethod(this, _ScrollSection_instances, setVar_fn).call(this, "offset-index", value);
140
141
  }
141
- setCurrentIndexArcAbs(n) {
142
- o(this, Bt, Fe).call(this, "current-index-arc-abs", n);
142
+ setCurrentIndexArcAbs(value) {
143
+ __privateMethod(this, _ScrollSection_instances, setVar_fn).call(this, "current-index-arc-abs", value);
143
144
  }
144
- }
145
- p = new WeakMap(), Re = new WeakMap(), E = new WeakMap(), us = new WeakMap(), as = new WeakMap(), pe = new WeakMap(), bt = new WeakMap(), $t = new WeakMap(), be = new WeakMap(), Bt = new WeakSet(), Fe = function(n, e) {
146
- e !== null ? (t(this, p).style.setProperty(`--${n}`, e.toString()), t(this, p).setAttribute(`data-${n}`, e.toString())) : (t(this, p).style.removeProperty(`--${n}`), t(this, p).removeAttribute(`data-${n}`));
147
145
  };
148
- const Vi = Js({
146
+ _element = new WeakMap(), _index = new WeakMap(), _scrollElement = new WeakMap(), _width = new WeakMap(), _height = new WeakMap(), _size = new WeakMap(), _position = new WeakMap(), _currentMark = new WeakMap(), _transformPosition = new WeakMap(), _ScrollSection_instances = new WeakSet(), setVar_fn = /* @__PURE__ */ __name(function(name, value) {
147
+ value !== null ? (__privateGet(this, _element).style.setProperty(`--${name}`, value.toString()), __privateGet(this, _element).setAttribute(`data-${name}`, value.toString())) : (__privateGet(this, _element).style.removeProperty(`--${name}`), __privateGet(this, _element).removeAttribute(`data-${name}`));
148
+ }, "#setVar"), __name(_ScrollSection, "ScrollSection");
149
+ let ScrollSection = _ScrollSection;
150
+ const stylesheet = createStylesheet({
149
151
  ":host": {
150
152
  position: "relative",
151
153
  width: "100%",
@@ -184,358 +186,358 @@ const Vi = Js({
184
186
  flexShrink: "0"
185
187
  }
186
188
  });
187
- var f, me, D, Wt, mt, St, gt, J, Nt, qt, vt, Gt, Se, Q, V, ge, ve, ye, Ce, De, Pe, X, Ee, Ut, Y, yt, Ct, we, Kt, xe, Le, Zt, jt, Jt, b, Oe, G, a, ds, fs, L, P, U, it, Qt, rt, F, z, He, Pt, Et, wt, K, $e, xt, Xt, Lt, ht, A, Be, kt, ke, We, c, Is, hs, Te, Es, ws, Ms, Fs, T, ps, Ys, Ne, bs, Ts, Rs, de, _s, ms, ns, qe;
188
- class As extends HTMLElement {
189
+ var _damped, _controlsCSSProperty, _axisCSSProperty, _reverseCSSProperty, _directionCSSProperty, _pagesCSSProperty, _splitCSSProperty, _sectionalCSSProperty, _easingCSSProperty, _durationCSSProperty, _autoSizeCSSProperty, _wheelMaxDeltaCSSProperty, _dragInertionCSSProperty, _sectionsInViewCSSProperty, _loopCSSProperty, _dampingCSSProperty, _massCSSProperty, _stiffnessCSSProperty, _mouseDragCSSProperty, _sectionDistanceScaleCSSProperty, _startSectionCSSProperty, _autoplayCSSProperty, _autoplayPauseDurationCSSProperty, _autoplayUserDirectionCSSProperty, _classesCSSProperty, _currentIndexStartOffsetCSSProperty, _currentIndexEndOffsetCSSProperty, _shiftSectionPositionCSSProperty, _focusDelayCSSProperty, _focusDurationCSSProperty, _shiftLimitCSSProperty, _disabledCSSProperty, _hibernatedCSSProperty, _contentWrapperElement, _contentElement, _slotElement, _sections, _visibleSections, _position2, _contentPosition, _viewportSize, _scrollSize, _gap, _wheelControls, _keyboardControls, _dragControls, _autoplayControls, _counter, _overscroll, _distance, _hasOverflow, _disabled, _hibernated, _focusTimeoutId, _tweenTimeoutId, _setTween, _isGrabbing, _scrollLine, _isConnected, _mutationObserver, _currentSections, _skipNextResize, _maxSectionSizeTimeoutId, _ScrollElement_instances, updateAxis_fn, split_fn, unsplit_fn, disable_fn, enable_fn, hibernate_fn, awake_fn, _resizeListener, _animatedChangeListener, clampCounter_fn, _notAutoplayControlListener, _controlsListener, processAutoplay_fn, getScrollValue_fn, updateMarks_fn, updateIndexes_fn, _updateMaxSectionsSize, getNearestSectionIndex_fn, _connectListener;
190
+ const _ScrollElement = class _ScrollElement extends HTMLElement {
189
191
  constructor() {
190
192
  super();
191
- i(this, c);
192
- i(this, f, null);
193
- i(this, me, new l(this, "--controls", !0));
194
- i(this, D, new l(this, "--axis", "y"));
195
- i(this, Wt, new l(this, "--reverse", !1));
196
- i(this, mt, new l(this, "--direction", 0));
197
- i(this, St, new l(this, "--pages", 0, {
198
- validate: (e) => Math.max(0, e - 1)
193
+ __privateAdd(this, _ScrollElement_instances);
194
+ __privateAdd(this, _damped, null);
195
+ __privateAdd(this, _controlsCSSProperty, new CSSProperty(this, "--controls", !0));
196
+ __privateAdd(this, _axisCSSProperty, new CSSProperty(this, "--axis", "y"));
197
+ __privateAdd(this, _reverseCSSProperty, new CSSProperty(this, "--reverse", !1));
198
+ __privateAdd(this, _directionCSSProperty, new CSSProperty(this, "--direction", 0));
199
+ __privateAdd(this, _pagesCSSProperty, new CSSProperty(this, "--pages", 0, {
200
+ validate: /* @__PURE__ */ __name((v) => Math.max(0, v - 1), "validate")
199
201
  }));
200
- i(this, gt, new l(this, "--split", !1));
201
- i(this, J, new l(this, "--sectional", !1));
202
- i(this, Nt, new l(
202
+ __privateAdd(this, _splitCSSProperty, new CSSProperty(this, "--split", !1));
203
+ __privateAdd(this, _sectionalCSSProperty, new CSSProperty(this, "--sectional", !1));
204
+ __privateAdd(this, _easingCSSProperty, new CSSProperty(
203
205
  this,
204
206
  "--tween-easing",
205
207
  !1
206
208
  ));
207
- i(this, qt, new l(
209
+ __privateAdd(this, _durationCSSProperty, new CSSProperty(
208
210
  this,
209
211
  "--tween-duration",
210
212
  !1
211
213
  ));
212
- i(this, vt, new l(this, "--auto-size", !1));
213
- i(this, Gt, new l(
214
+ __privateAdd(this, _autoSizeCSSProperty, new CSSProperty(this, "--auto-size", !1));
215
+ __privateAdd(this, _wheelMaxDeltaCSSProperty, new CSSProperty(
214
216
  this,
215
217
  "--wheel-max-delta",
216
218
  !1
217
219
  ));
218
- i(this, Se, new l(this, "--drag-inertion", 1));
219
- i(this, Q, new l(
220
+ __privateAdd(this, _dragInertionCSSProperty, new CSSProperty(this, "--drag-inertion", 1));
221
+ __privateAdd(this, _sectionsInViewCSSProperty, new CSSProperty(
220
222
  this,
221
223
  "--sections-in-view",
222
224
  1
223
225
  ));
224
- i(this, V, new l(this, "--loop", !1));
225
- i(this, ge, new l(this, "--damping", 20));
226
- i(this, ve, new l(this, "--mass", 0));
227
- i(this, ye, new l(this, "--stiffness", 0));
228
- i(this, Ce, new l(this, "--mouse-drag", !1));
229
- i(this, De, new l(
226
+ __privateAdd(this, _loopCSSProperty, new CSSProperty(this, "--loop", !1));
227
+ __privateAdd(this, _dampingCSSProperty, new CSSProperty(this, "--damping", 20));
228
+ __privateAdd(this, _massCSSProperty, new CSSProperty(this, "--mass", 0));
229
+ __privateAdd(this, _stiffnessCSSProperty, new CSSProperty(this, "--stiffness", 0));
230
+ __privateAdd(this, _mouseDragCSSProperty, new CSSProperty(this, "--mouse-drag", !1));
231
+ __privateAdd(this, _sectionDistanceScaleCSSProperty, new CSSProperty(
230
232
  this,
231
233
  "--section-distance-scale",
232
234
  0.5
233
235
  ));
234
- i(this, Pe, new l(this, "--start-section", 0));
235
- i(this, X, new l(this, "--autoplay", 0));
236
- i(this, Ee, new l(
236
+ __privateAdd(this, _startSectionCSSProperty, new CSSProperty(this, "--start-section", 0));
237
+ __privateAdd(this, _autoplayCSSProperty, new CSSProperty(this, "--autoplay", 0));
238
+ __privateAdd(this, _autoplayPauseDurationCSSProperty, new CSSProperty(
237
239
  this,
238
240
  "--autoplay-pause-duration",
239
241
  0
240
242
  ));
241
- i(this, Ut, new l(
243
+ __privateAdd(this, _autoplayUserDirectionCSSProperty, new CSSProperty(
242
244
  this,
243
245
  "--autoplay-user-direction",
244
246
  !1
245
247
  ));
246
- i(this, Y, new l(this, "--classes", !1));
247
- i(this, yt, new l(
248
+ __privateAdd(this, _classesCSSProperty, new CSSProperty(this, "--classes", !1));
249
+ __privateAdd(this, _currentIndexStartOffsetCSSProperty, new CSSProperty(
248
250
  this,
249
251
  "--current-index-start-offset",
250
252
  0
251
253
  ));
252
- i(this, Ct, new l(
254
+ __privateAdd(this, _currentIndexEndOffsetCSSProperty, new CSSProperty(
253
255
  this,
254
256
  "--current-index-end-offset",
255
257
  0
256
258
  ));
257
- i(this, we, new l(
259
+ __privateAdd(this, _shiftSectionPositionCSSProperty, new CSSProperty(
258
260
  this,
259
261
  "--shift-section-position",
260
262
  0,
261
263
  { rawValueCheck: !1 }
262
264
  ));
263
- i(this, Kt, new l(this, "--focus-delay", 0));
264
- i(this, xe, new l(
265
+ __privateAdd(this, _focusDelayCSSProperty, new CSSProperty(this, "--focus-delay", 0));
266
+ __privateAdd(this, _focusDurationCSSProperty, new CSSProperty(
265
267
  this,
266
268
  "--focus-duration",
267
269
  3e3
268
270
  ));
269
- i(this, Le, new l(this, "--shift-limit", 0));
270
- i(this, Zt, new l(this, "--disabled", !1));
271
- i(this, jt, new l(this, "--hibernate", !1));
272
- i(this, Jt, null);
273
- i(this, b, null);
274
- i(this, Oe, null);
275
- i(this, G, []);
276
- i(this, a, []);
277
- i(this, ds, 0);
278
- i(this, fs, 0);
279
- i(this, L, 0);
280
- i(this, P, 0);
281
- i(this, U, 0);
282
- i(this, it, null);
283
- i(this, Qt, null);
284
- i(this, rt, null);
285
- i(this, F, null);
286
- i(this, z, new ae(0));
287
- i(this, He, 0);
288
- i(this, Pt, 0);
289
- i(this, Et, !1);
290
- i(this, wt, !0);
291
- i(this, K, !0);
292
- i(this, $e);
293
- i(this, xt);
294
- i(this, Xt, new vi());
295
- i(this, Lt, !1);
296
- i(this, ht, null);
297
- i(this, A, !1);
298
- i(this, Be, null);
299
- i(this, kt, []);
300
- i(this, ke, !1);
301
- i(this, We);
302
- i(this, T, (e) => {
303
- if (e && t(this, ke)) {
304
- r(this, ke, !1);
271
+ __privateAdd(this, _shiftLimitCSSProperty, new CSSProperty(this, "--shift-limit", 0));
272
+ __privateAdd(this, _disabledCSSProperty, new CSSProperty(this, "--disabled", !1));
273
+ __privateAdd(this, _hibernatedCSSProperty, new CSSProperty(this, "--hibernate", !1));
274
+ __privateAdd(this, _contentWrapperElement, null);
275
+ __privateAdd(this, _contentElement, null);
276
+ __privateAdd(this, _slotElement, null);
277
+ __privateAdd(this, _sections, []);
278
+ __privateAdd(this, _visibleSections, []);
279
+ __privateAdd(this, _position2, 0);
280
+ __privateAdd(this, _contentPosition, 0);
281
+ __privateAdd(this, _viewportSize, 0);
282
+ __privateAdd(this, _scrollSize, 0);
283
+ __privateAdd(this, _gap, 0);
284
+ __privateAdd(this, _wheelControls, null);
285
+ __privateAdd(this, _keyboardControls, null);
286
+ __privateAdd(this, _dragControls, null);
287
+ __privateAdd(this, _autoplayControls, null);
288
+ __privateAdd(this, _counter, new Store(0));
289
+ __privateAdd(this, _overscroll, 0);
290
+ __privateAdd(this, _distance, 0);
291
+ __privateAdd(this, _hasOverflow, !1);
292
+ __privateAdd(this, _disabled, !0);
293
+ __privateAdd(this, _hibernated, !0);
294
+ __privateAdd(this, _focusTimeoutId);
295
+ __privateAdd(this, _tweenTimeoutId);
296
+ __privateAdd(this, _setTween, new Tweened());
297
+ __privateAdd(this, _isGrabbing, !1);
298
+ __privateAdd(this, _scrollLine, null);
299
+ __privateAdd(this, _isConnected, !1);
300
+ __privateAdd(this, _mutationObserver, null);
301
+ __privateAdd(this, _currentSections, []);
302
+ __privateAdd(this, _skipNextResize, !1);
303
+ __privateAdd(this, _maxSectionSizeTimeoutId);
304
+ __privateAdd(this, _resizeListener, /* @__PURE__ */ __name((e) => {
305
+ if (e && __privateGet(this, _skipNextResize)) {
306
+ __privateSet(this, _skipNextResize, !1);
305
307
  return;
306
308
  }
307
309
  this.resize();
308
- });
309
- i(this, ps, () => {
310
- if (!t(this, Et) || t(this, K) || t(this, wt))
310
+ }, "#resizeListener"));
311
+ __privateAdd(this, _animatedChangeListener, /* @__PURE__ */ __name(() => {
312
+ if (!__privateGet(this, _hasOverflow) || __privateGet(this, _hibernated) || __privateGet(this, _disabled))
311
313
  return;
312
- const e = this.currentScrollValue;
313
- if (r(this, He, Math.max(0, e - t(this, P))), t(this, a).length) {
314
- for (let s = 0; s < t(this, G).length; s++)
315
- t(this, G)[s].transform();
316
- (t(this, Lt) || !t(this, J).current) && (t(this, z).current = o(this, c, ns).call(this));
314
+ const currentScrollValue = this.currentScrollValue;
315
+ if (__privateSet(this, _overscroll, Math.max(0, currentScrollValue - __privateGet(this, _scrollSize))), __privateGet(this, _visibleSections).length) {
316
+ for (let i = 0; i < __privateGet(this, _sections).length; i++)
317
+ __privateGet(this, _sections)[i].transform();
318
+ (__privateGet(this, _isGrabbing) || !__privateGet(this, _sectionalCSSProperty).current) && (__privateGet(this, _counter).current = __privateMethod(this, _ScrollElement_instances, getNearestSectionIndex_fn).call(this));
317
319
  } else
318
- this.vertical ? t(this, b).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, b).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
319
- o(this, c, _s).call(this), ce.update(
320
+ this.vertical ? __privateGet(this, _contentElement).style.transform = `translate3d(0px, ${currentScrollValue * -1}px, 0px)` : __privateGet(this, _contentElement).style.transform = `translate3d(${currentScrollValue * -1}px, 0px, 0px)`;
321
+ __privateMethod(this, _ScrollElement_instances, updateIndexes_fn).call(this), scrollEntries.update(
320
322
  this,
321
- t(this, D).current,
322
- e
323
+ __privateGet(this, _axisCSSProperty).current,
324
+ currentScrollValue
323
325
  );
324
- });
325
- i(this, Ne, (e, s) => {
326
- t(this, me).current && (o(this, c, Ts).call(this, Math.sign(s) || 1), t(this, bs).call(this, e, s));
327
- });
328
- i(this, bs, (e, s) => {
329
- if (!t(this, xt)) {
330
- if (t(this, mt).current) {
331
- if (t(this, mt).current < 0 && s > 0)
326
+ }, "#animatedChangeListener"));
327
+ __privateAdd(this, _notAutoplayControlListener, /* @__PURE__ */ __name((type, value) => {
328
+ __privateGet(this, _controlsCSSProperty).current && (__privateMethod(this, _ScrollElement_instances, processAutoplay_fn).call(this, Math.sign(value) || 1), __privateGet(this, _controlsListener).call(this, type, value));
329
+ }, "#notAutoplayControlListener"));
330
+ __privateAdd(this, _controlsListener, /* @__PURE__ */ __name((type, value) => {
331
+ if (!__privateGet(this, _tweenTimeoutId)) {
332
+ if (__privateGet(this, _directionCSSProperty).current) {
333
+ if (__privateGet(this, _directionCSSProperty).current < 0 && value > 0)
332
334
  return;
333
- if (t(this, mt).current > 0 && s < 0)
335
+ if (__privateGet(this, _directionCSSProperty).current > 0 && value < 0)
334
336
  return;
335
337
  }
336
- if (!t(this, X).current && t(this, Kt).current && (clearInterval(t(this, $e)), r(this, $e, setTimeout(() => {
337
- const h = t(this, a)[o(this, c, ns).call(this)];
338
- h && this.scrollToSection(h.index, {
338
+ if (!__privateGet(this, _autoplayCSSProperty).current && __privateGet(this, _focusDelayCSSProperty).current && (clearInterval(__privateGet(this, _focusTimeoutId)), __privateSet(this, _focusTimeoutId, setTimeout(() => {
339
+ const section = __privateGet(this, _visibleSections)[__privateMethod(this, _ScrollElement_instances, getNearestSectionIndex_fn).call(this)];
340
+ section && this.scrollToSection(section.index, {
339
341
  tween: {
340
- duration: t(this, xe).current,
341
- easing: fi
342
+ duration: __privateGet(this, _focusDurationCSSProperty).current,
343
+ easing: easeInOutExpo
342
344
  }
343
345
  });
344
- }, t(this, Kt).current))), !(e.includes("drag") && !wi.isTouch && !t(this, Ce).current)) {
345
- if (t(this, J).current && e !== "drag") {
346
- const h = Math.sign(s);
347
- t(this, a).length ? t(this, Lt) ? this.scrollToSection(o(this, c, ns).call(this, !0)) : this.shiftSections(h, {
348
- tween: t(this, Nt).current || t(this, qt).current ? {
349
- easing: t(this, Nt).current || "easeInOutCubic",
350
- duration: t(this, qt).current || 500
346
+ }, __privateGet(this, _focusDelayCSSProperty).current))), !(type.includes("drag") && !device.isTouch && !__privateGet(this, _mouseDragCSSProperty).current)) {
347
+ if (__privateGet(this, _sectionalCSSProperty).current && type !== "drag") {
348
+ const direction = Math.sign(value);
349
+ __privateGet(this, _visibleSections).length ? __privateGet(this, _isGrabbing) ? this.scrollToSection(__privateMethod(this, _ScrollElement_instances, getNearestSectionIndex_fn).call(this, !0)) : this.shiftSections(direction, {
350
+ tween: __privateGet(this, _easingCSSProperty).current || __privateGet(this, _durationCSSProperty).current ? {
351
+ easing: __privateGet(this, _easingCSSProperty).current || "easeInOutCubic",
352
+ duration: __privateGet(this, _durationCSSProperty).current || 500
351
353
  } : void 0
352
- }) : t(this, f).shift(h * t(this, L));
354
+ }) : __privateGet(this, _damped).shift(direction * __privateGet(this, _viewportSize));
353
355
  } else
354
- t(this, f).shift(s);
355
- r(this, Lt, e === "drag");
356
+ __privateGet(this, _damped).shift(value);
357
+ __privateSet(this, _isGrabbing, type === "drag");
356
358
  }
357
359
  }
358
- });
359
- i(this, ms, xs(() => {
360
- const e = t(this, kt).reduce((s, h) => {
361
- const u = this.vertical ? h.width : h.height;
362
- return u > s ? u : s;
360
+ }, "#controlsListener"));
361
+ __privateAdd(this, _updateMaxSectionsSize, debounce(() => {
362
+ const maxSectionSize = __privateGet(this, _currentSections).reduce((p, c) => {
363
+ const s = this.vertical ? c.width : c.height;
364
+ return s > p ? s : p;
363
365
  }, 0);
364
- clearTimeout(t(this, We)), r(this, ke, !0), this.style.setProperty("--max-section-size", ""), r(this, We, setTimeout(() => {
365
- r(this, ke, !0), this.style.setProperty("--max-section-size", e + "px");
366
+ clearTimeout(__privateGet(this, _maxSectionSizeTimeoutId)), __privateSet(this, _skipNextResize, !0), this.style.setProperty("--max-section-size", ""), __privateSet(this, _maxSectionSizeTimeoutId, setTimeout(() => {
367
+ __privateSet(this, _skipNextResize, !0), this.style.setProperty("--max-section-size", maxSectionSize + "px");
366
368
  }, 10));
367
369
  }, 20));
368
- i(this, qe, () => {
369
- r(this, A, !0), this.hibernatedCSSProperty.current || o(this, c, Fs).call(this), os.subscribe(this, t(this, T)), pt.unsubscribe(t(this, qe));
370
- });
371
- if (q) {
372
- const e = this.attachShadow({ mode: "open" });
373
- e.adoptedStyleSheets = [Vi];
374
- const s = document.createElement("div");
375
- s.className = "static", s.innerHTML = '<slot name="static"></slot>', e.appendChild(s), r(this, Jt, document.createElement("div")), t(this, Jt).className = "content-wrapper", r(this, b, document.createElement("div")), t(this, b).className = "content", r(this, Oe, document.createElement("slot")), t(this, b).appendChild(t(this, Oe)), t(this, Jt).appendChild(t(this, b)), e.appendChild(t(this, Jt)), r(this, Be, new MutationObserver(
376
- xs(() => {
370
+ __privateAdd(this, _connectListener, /* @__PURE__ */ __name(() => {
371
+ __privateSet(this, _isConnected, !0), this.hibernatedCSSProperty.current || __privateMethod(this, _ScrollElement_instances, awake_fn).call(this), elementResizer.subscribe(this, __privateGet(this, _resizeListener)), windowResizer.unsubscribe(__privateGet(this, _connectListener));
372
+ }, "#connectListener"));
373
+ if (isBrowser) {
374
+ const shadow = this.attachShadow({ mode: "open" });
375
+ shadow.adoptedStyleSheets = [stylesheet];
376
+ const staticElement = document.createElement("div");
377
+ staticElement.className = "static", staticElement.innerHTML = '<slot name="static"></slot>', shadow.appendChild(staticElement), __privateSet(this, _contentWrapperElement, document.createElement("div")), __privateGet(this, _contentWrapperElement).className = "content-wrapper", __privateSet(this, _contentElement, document.createElement("div")), __privateGet(this, _contentElement).className = "content", __privateSet(this, _slotElement, document.createElement("slot")), __privateGet(this, _contentElement).appendChild(__privateGet(this, _slotElement)), __privateGet(this, _contentWrapperElement).appendChild(__privateGet(this, _contentElement)), shadow.appendChild(__privateGet(this, _contentWrapperElement)), __privateSet(this, _mutationObserver, new MutationObserver(
378
+ debounce(() => {
377
379
  this.tryResplit();
378
380
  }, 10)
379
381
  ));
380
382
  }
381
383
  }
382
384
  get damped() {
383
- return t(this, f);
385
+ return __privateGet(this, _damped);
384
386
  }
385
387
  get controlsCSSProperty() {
386
- return t(this, me);
388
+ return __privateGet(this, _controlsCSSProperty);
387
389
  }
388
390
  get axisCSSProperty() {
389
- return t(this, D);
391
+ return __privateGet(this, _axisCSSProperty);
390
392
  }
391
393
  get reverseCSSProperty() {
392
- return t(this, Wt);
394
+ return __privateGet(this, _reverseCSSProperty);
393
395
  }
394
396
  get directionCSSProperty() {
395
- return t(this, mt);
397
+ return __privateGet(this, _directionCSSProperty);
396
398
  }
397
399
  get pagesCSSProperty() {
398
- return t(this, St);
400
+ return __privateGet(this, _pagesCSSProperty);
399
401
  }
400
402
  get splitCSSProperty() {
401
- return t(this, gt);
403
+ return __privateGet(this, _splitCSSProperty);
402
404
  }
403
405
  get sectionalCSSProperty() {
404
- return t(this, J);
406
+ return __privateGet(this, _sectionalCSSProperty);
405
407
  }
406
408
  get easingCSSProperty() {
407
- return t(this, Nt);
409
+ return __privateGet(this, _easingCSSProperty);
408
410
  }
409
411
  get durationCSSProperty() {
410
- return t(this, qt);
412
+ return __privateGet(this, _durationCSSProperty);
411
413
  }
412
414
  get autoSizeCSSProperty() {
413
- return t(this, vt);
415
+ return __privateGet(this, _autoSizeCSSProperty);
414
416
  }
415
417
  get wheelMaxDeltaCSSProperty() {
416
- return t(this, Gt);
418
+ return __privateGet(this, _wheelMaxDeltaCSSProperty);
417
419
  }
418
420
  get dragInertionCSSProperty() {
419
- return t(this, Se);
421
+ return __privateGet(this, _dragInertionCSSProperty);
420
422
  }
421
423
  get sectionsInViewCSSProperty() {
422
- return t(this, Q);
424
+ return __privateGet(this, _sectionsInViewCSSProperty);
423
425
  }
424
426
  get loopCSSProperty() {
425
- return t(this, V);
427
+ return __privateGet(this, _loopCSSProperty);
426
428
  }
427
429
  get dampingCSSProperty() {
428
- return t(this, ge);
430
+ return __privateGet(this, _dampingCSSProperty);
429
431
  }
430
432
  get massCSSProperty() {
431
- return t(this, ve);
433
+ return __privateGet(this, _massCSSProperty);
432
434
  }
433
435
  get stiffnessCSSProperty() {
434
- return t(this, ye);
436
+ return __privateGet(this, _stiffnessCSSProperty);
435
437
  }
436
438
  get mouseDragCSSProperty() {
437
- return t(this, Ce);
439
+ return __privateGet(this, _mouseDragCSSProperty);
438
440
  }
439
441
  get sectionDistanceScaleCSSProperty() {
440
- return t(this, De);
442
+ return __privateGet(this, _sectionDistanceScaleCSSProperty);
441
443
  }
442
444
  get startSectionCSSProperty() {
443
- return t(this, Pe);
445
+ return __privateGet(this, _startSectionCSSProperty);
444
446
  }
445
447
  get autoplayCSSProperty() {
446
- return t(this, X);
448
+ return __privateGet(this, _autoplayCSSProperty);
447
449
  }
448
450
  get autoplayPauseDurationCSSProperty() {
449
- return t(this, Ee);
451
+ return __privateGet(this, _autoplayPauseDurationCSSProperty);
450
452
  }
451
453
  get autoplayUserDirectionCSSProperty() {
452
- return t(this, Ut);
454
+ return __privateGet(this, _autoplayUserDirectionCSSProperty);
453
455
  }
454
456
  get classesCSSProperty() {
455
- return t(this, Y);
457
+ return __privateGet(this, _classesCSSProperty);
456
458
  }
457
459
  get currentIndexStartOffsetCSSProperty() {
458
- return t(this, yt);
460
+ return __privateGet(this, _currentIndexStartOffsetCSSProperty);
459
461
  }
460
462
  get currentIndexEndOffsetCSSProperty() {
461
- return t(this, Ct);
463
+ return __privateGet(this, _currentIndexEndOffsetCSSProperty);
462
464
  }
463
465
  get shiftSectionPositionCSSProperty() {
464
- return t(this, we);
466
+ return __privateGet(this, _shiftSectionPositionCSSProperty);
465
467
  }
466
468
  get focusDelayCSSProperty() {
467
- return t(this, Kt);
469
+ return __privateGet(this, _focusDelayCSSProperty);
468
470
  }
469
471
  get focusDurationCSSProperty() {
470
- return t(this, xe);
472
+ return __privateGet(this, _focusDurationCSSProperty);
471
473
  }
472
474
  get shiftLimitCSSProperty() {
473
- return t(this, Le);
475
+ return __privateGet(this, _shiftLimitCSSProperty);
474
476
  }
475
477
  get disabledCSSProperty() {
476
- return t(this, Zt);
478
+ return __privateGet(this, _disabledCSSProperty);
477
479
  }
478
480
  get hibernatedCSSProperty() {
479
- return t(this, jt);
481
+ return __privateGet(this, _hibernatedCSSProperty);
480
482
  }
481
483
  get currentScrollValue() {
482
- return o(this, c, Rs).call(this, "current");
484
+ return __privateMethod(this, _ScrollElement_instances, getScrollValue_fn).call(this, "current");
483
485
  }
484
486
  get targetScrollValue() {
485
- return o(this, c, Rs).call(this, "target");
487
+ return __privateMethod(this, _ScrollElement_instances, getScrollValue_fn).call(this, "target");
486
488
  }
487
489
  get contentWrapperElement() {
488
- return t(this, Jt);
490
+ return __privateGet(this, _contentWrapperElement);
489
491
  }
490
492
  get contentElement() {
491
- return t(this, b);
493
+ return __privateGet(this, _contentElement);
492
494
  }
493
495
  get sections() {
494
- return t(this, G);
496
+ return __privateGet(this, _sections);
495
497
  }
496
498
  get visibleSections() {
497
- return t(this, a);
499
+ return __privateGet(this, _visibleSections);
498
500
  }
499
501
  get position() {
500
- return t(this, ds);
502
+ return __privateGet(this, _position2);
501
503
  }
502
504
  get contentPosition() {
503
- return t(this, fs);
505
+ return __privateGet(this, _contentPosition);
504
506
  }
505
507
  get viewportSize() {
506
- return t(this, L);
508
+ return __privateGet(this, _viewportSize);
507
509
  }
508
510
  get scrollSize() {
509
- return t(this, P);
511
+ return __privateGet(this, _scrollSize);
510
512
  }
511
513
  get gap() {
512
- return t(this, U);
514
+ return __privateGet(this, _gap);
513
515
  }
514
516
  get counter() {
515
- return t(this, z);
517
+ return __privateGet(this, _counter);
516
518
  }
517
519
  get limit() {
518
520
  return Math.ceil(
519
- t(this, a).length - t(this, Q).current + t(this, Le).current
521
+ __privateGet(this, _visibleSections).length - __privateGet(this, _sectionsInViewCSSProperty).current + __privateGet(this, _shiftLimitCSSProperty).current
520
522
  );
521
523
  }
522
524
  get distance() {
523
- return t(this, Pt);
525
+ return __privateGet(this, _distance);
524
526
  }
525
527
  get loopDistance() {
526
- return t(this, V).current ? t(this, Pt) + t(this, U) : t(this, Pt);
528
+ return __privateGet(this, _loopCSSProperty).current ? __privateGet(this, _distance) + __privateGet(this, _gap) : __privateGet(this, _distance);
527
529
  }
528
530
  get hasOverflow() {
529
- return t(this, Et);
531
+ return __privateGet(this, _hasOverflow);
530
532
  }
531
533
  get overscroll() {
532
- return t(this, He);
534
+ return __privateGet(this, _overscroll);
533
535
  }
534
536
  get scrollLine() {
535
- return t(this, ht);
537
+ return __privateGet(this, _scrollLine);
536
538
  }
537
539
  get vertical() {
538
- return t(this, D).current === "y";
540
+ return __privateGet(this, _axisCSSProperty).current === "y";
539
541
  }
540
542
  get currentProgress() {
541
543
  return this.currentScrollValue / this.loopDistance || 0;
@@ -544,307 +546,309 @@ class As extends HTMLElement {
544
546
  return this.targetScrollValue / this.loopDistance || 0;
545
547
  }
546
548
  get scrollWidth() {
547
- return t(this, D).current === "y" ? 0 : t(this, f).distance;
549
+ return __privateGet(this, _axisCSSProperty).current === "y" ? 0 : __privateGet(this, _damped).distance;
548
550
  }
549
551
  get scrollHeight() {
550
- return t(this, D).current === "x" ? 0 : t(this, f).distance;
552
+ return __privateGet(this, _axisCSSProperty).current === "x" ? 0 : __privateGet(this, _damped).distance;
551
553
  }
552
554
  tryResplit() {
553
- !t(this, K) && (t(this, V).current || t(this, gt).current || t(this, V).current || t(this, vt).current || t(this, J).current) && o(this, c, hs).call(this);
555
+ !__privateGet(this, _hibernated) && (__privateGet(this, _loopCSSProperty).current || __privateGet(this, _splitCSSProperty).current || __privateGet(this, _loopCSSProperty).current || __privateGet(this, _autoSizeCSSProperty).current || __privateGet(this, _sectionalCSSProperty).current) && __privateMethod(this, _ScrollElement_instances, split_fn).call(this);
554
556
  }
555
- onScroll(...e) {
556
- return t(this, f).subscribe(...e);
557
+ onScroll(...parameters) {
558
+ return __privateGet(this, _damped).subscribe(...parameters);
557
559
  }
558
- offScroll(...e) {
559
- t(this, f).unsubscribe(...e);
560
+ offScroll(...parameters) {
561
+ __privateGet(this, _damped).unsubscribe(...parameters);
560
562
  }
561
563
  //https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
562
- range(e, s, h = 0) {
563
- const u = e - h, g = u + s + h * 2;
564
- return this.currentProgress < u ? 0 : this.currentProgress > g ? 1 : (this.currentProgress - u) / (g - u);
564
+ range(from, distance, margin = 0) {
565
+ const start = from - margin, end = start + distance + margin * 2;
566
+ return this.currentProgress < start ? 0 : this.currentProgress > end ? 1 : (this.currentProgress - start) / (end - start);
565
567
  }
566
- curve(e, s, h = 0) {
567
- return Math.sin(this.range(e, s, h) * Math.PI);
568
+ curve(from, distance, margin = 0) {
569
+ return Math.sin(this.range(from, distance, margin) * Math.PI);
568
570
  }
569
- visible(e, s, h = 0) {
570
- const u = e - h, g = u + s + h * 2;
571
- return this.currentProgress >= u && this.currentProgress <= g;
571
+ visible(from, distance, margin = 0) {
572
+ const start = from - margin, end = start + distance + margin * 2;
573
+ return this.currentProgress >= start && this.currentProgress <= end;
572
574
  }
573
- scrollToSection(e, s) {
574
- if (!t(this, a).length || t(this, K) || t(this, xt))
575
+ scrollToSection(sectionIndex, options) {
576
+ if (!__privateGet(this, _visibleSections).length || __privateGet(this, _hibernated) || __privateGet(this, _tweenTimeoutId))
575
577
  return;
576
- const h = t(this, z).current, u = o(this, c, Ys).call(this, e);
577
- t(this, Lt) || (t(this, z).current = u);
578
- const g = t(this, a)[h], v = t(this, a)[u];
579
- if (g && v) {
580
- let C = 0;
581
- const ue = o(this, c, ns).call(this), Me = t(this, a)[ue];
582
- let rs = Me ? this.targetScrollValue - Me.position : 0;
583
- t(this, V).current ? u === 0 && h === t(this, a).length - 1 ? (C = t(this, P) + t(this, L) - g.position + t(this, U), t(this, Lt) || (rs = 0)) : u === t(this, a).length - 1 && h === 0 ? C = v.position - (t(this, P) + t(this, L) + t(this, U)) : C = v.position - g.position : C = v.position - g.position, this.shiftPosition(C - rs, s);
578
+ const previousCounter = __privateGet(this, _counter).current, newCounterValue = __privateMethod(this, _ScrollElement_instances, clampCounter_fn).call(this, sectionIndex);
579
+ __privateGet(this, _isGrabbing) || (__privateGet(this, _counter).current = newCounterValue);
580
+ const previousSection = __privateGet(this, _visibleSections)[previousCounter], currentSection = __privateGet(this, _visibleSections)[newCounterValue];
581
+ if (previousSection && currentSection) {
582
+ let shiftValue = 0;
583
+ const nearestSectionIndex = __privateMethod(this, _ScrollElement_instances, getNearestSectionIndex_fn).call(this), nearestSection = __privateGet(this, _visibleSections)[nearestSectionIndex];
584
+ let scrolledFromNearestSection = nearestSection ? this.targetScrollValue - nearestSection.position : 0;
585
+ __privateGet(this, _loopCSSProperty).current ? newCounterValue === 0 && previousCounter === __privateGet(this, _visibleSections).length - 1 ? (shiftValue = __privateGet(this, _scrollSize) + __privateGet(this, _viewportSize) - previousSection.position + __privateGet(this, _gap), __privateGet(this, _isGrabbing) || (scrolledFromNearestSection = 0)) : newCounterValue === __privateGet(this, _visibleSections).length - 1 && previousCounter === 0 ? shiftValue = currentSection.position - (__privateGet(this, _scrollSize) + __privateGet(this, _viewportSize) + __privateGet(this, _gap)) : shiftValue = currentSection.position - previousSection.position : shiftValue = currentSection.position - previousSection.position, this.shiftPosition(shiftValue - scrolledFromNearestSection, options);
584
586
  }
585
587
  }
586
- shiftSections(e, s) {
587
- t(this, a).length && this.scrollToSection(t(this, z).current + e, s);
588
+ shiftSections(step2, options) {
589
+ __privateGet(this, _visibleSections).length && this.scrollToSection(__privateGet(this, _counter).current + step2, options);
588
590
  }
589
- setPosition(e, s) {
590
- t(this, K) || (o(this, c, Ts).call(this, Math.sign(e) || 1), s != null && s.tween ? (clearTimeout(t(this, xt)), t(this, Xt).set(t(this, f).current, { equalize: !0 }), t(this, Xt).set(e, Ks({}, s.tween)), r(this, xt, setTimeout(() => {
591
- r(this, xt, void 0);
592
- }, s.tween.duration || 0))) : t(this, f).set(e, {
593
- equalize: (s == null ? void 0 : s.behaviour) === "instant"
591
+ setPosition(value, options) {
592
+ __privateGet(this, _hibernated) || (__privateMethod(this, _ScrollElement_instances, processAutoplay_fn).call(this, Math.sign(value) || 1), options != null && options.tween ? (clearTimeout(__privateGet(this, _tweenTimeoutId)), __privateGet(this, _setTween).set(__privateGet(this, _damped).current, { equalize: !0 }), __privateGet(this, _setTween).set(value, __spreadValues({}, options.tween)), __privateSet(this, _tweenTimeoutId, setTimeout(() => {
593
+ __privateSet(this, _tweenTimeoutId, void 0);
594
+ }, options.tween.duration || 0))) : __privateGet(this, _damped).set(value, {
595
+ equalize: (options == null ? void 0 : options.behaviour) === "instant"
594
596
  }));
595
597
  }
596
- shiftPosition(e, s) {
597
- this.setPosition(t(this, f).target + e, s);
598
+ shiftPosition(value, options) {
599
+ this.setPosition(__privateGet(this, _damped).target + value, options);
598
600
  }
599
601
  resize() {
600
- if (t(this, jt).current)
602
+ if (__privateGet(this, _hibernatedCSSProperty).current)
601
603
  return;
602
- r(this, a, t(this, G).filter(
603
- (h) => pi(h.element)
604
+ __privateSet(this, _visibleSections, __privateGet(this, _sections).filter(
605
+ (s) => isElementVisible(s.element)
604
606
  )), this.style.setProperty(
605
607
  "--sections",
606
- t(this, a).length.toString()
607
- ), t(this, f).unlistenAnimationFrame();
608
- const e = this.currentScrollValue / t(this, P) || 0, s = t(this, z).current;
609
- if (r(this, ds, this.vertical ? ls(this) : cs(this)), r(this, fs, this.vertical ? ls(t(this, b)) : cs(t(this, b))), r(this, L, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? r(this, U, Zs.parse(
610
- getComputedStyle(t(this, b)).rowGap
611
- )) : r(this, U, Zs.parse(
612
- getComputedStyle(t(this, b)).columnGap
613
- )), t(this, vt).current && t(this, a).length) {
614
- const h = t(this, Q).current, u = (t(this, L) - t(this, U) * (h - 1)) / h;
615
- t(this, a).forEach((g) => {
616
- g.setSize(u);
608
+ __privateGet(this, _visibleSections).length.toString()
609
+ ), __privateGet(this, _damped).unlistenAnimationFrame();
610
+ const prevProgress = this.currentScrollValue / __privateGet(this, _scrollSize) || 0, prevCounter = __privateGet(this, _counter).current;
611
+ if (__privateSet(this, _position2, this.vertical ? getCumulativeOffsetTop(this) : getCumulativeOffsetLeft(this)), __privateSet(this, _contentPosition, this.vertical ? getCumulativeOffsetTop(__privateGet(this, _contentElement)) : getCumulativeOffsetLeft(__privateGet(this, _contentElement))), __privateSet(this, _viewportSize, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? __privateSet(this, _gap, cssUnitParser.parse(
612
+ getComputedStyle(__privateGet(this, _contentElement)).rowGap
613
+ )) : __privateSet(this, _gap, cssUnitParser.parse(
614
+ getComputedStyle(__privateGet(this, _contentElement)).columnGap
615
+ )), __privateGet(this, _autoSizeCSSProperty).current && __privateGet(this, _visibleSections).length) {
616
+ const ivc = __privateGet(this, _sectionsInViewCSSProperty).current, sectionSize = (__privateGet(this, _viewportSize) - __privateGet(this, _gap) * (ivc - 1)) / ivc;
617
+ __privateGet(this, _visibleSections).forEach((section) => {
618
+ section.setSize(sectionSize);
617
619
  });
618
620
  } else
619
- t(this, a).forEach((h) => {
620
- h.setSize();
621
+ __privateGet(this, _visibleSections).forEach((section) => {
622
+ section.setSize();
621
623
  });
622
- if (t(this, a).forEach((h) => {
623
- h.resize();
624
- }), t(this, St).current) {
625
- r(this, P, t(this, L) * t(this, St).current);
626
- const h = t(this, P) + t(this, L);
627
- this.vertical ? (t(this, b).style.width = h + "px", t(this, b).style.height = "100%") : (t(this, b).style.height = h + "px", t(this, b).style.width = "100%");
624
+ if (__privateGet(this, _visibleSections).forEach((section) => {
625
+ section.resize();
626
+ }), __privateGet(this, _pagesCSSProperty).current) {
627
+ __privateSet(this, _scrollSize, __privateGet(this, _viewportSize) * __privateGet(this, _pagesCSSProperty).current);
628
+ const contentSize = __privateGet(this, _scrollSize) + __privateGet(this, _viewportSize);
629
+ this.vertical ? (__privateGet(this, _contentElement).style.width = contentSize + "px", __privateGet(this, _contentElement).style.height = "100%") : (__privateGet(this, _contentElement).style.height = contentSize + "px", __privateGet(this, _contentElement).style.width = "100%");
628
630
  } else
629
- this.vertical ? (t(this, b).style.width = "100%", t(this, b).style.height = "max-content", r(this, P, t(this, b).offsetHeight - t(this, L))) : (t(this, b).style.width = "max-content", t(this, b).style.height = "100%", r(this, P, t(this, b).offsetWidth - t(this, L)));
630
- if (!t(this, V).current) {
631
- const h = getComputedStyle(this), u = this.vertical ? parseFloat(h.paddingBlockStart) + parseFloat(h.paddingBlockEnd) : parseFloat(h.paddingInlineStart) + parseFloat(h.paddingInlineEnd);
632
- r(this, P, t(this, P) + u), t(this, f).max = t(this, P);
631
+ this.vertical ? (__privateGet(this, _contentElement).style.width = "100%", __privateGet(this, _contentElement).style.height = "max-content", __privateSet(this, _scrollSize, __privateGet(this, _contentElement).offsetHeight - __privateGet(this, _viewportSize))) : (__privateGet(this, _contentElement).style.width = "max-content", __privateGet(this, _contentElement).style.height = "100%", __privateSet(this, _scrollSize, __privateGet(this, _contentElement).offsetWidth - __privateGet(this, _viewportSize)));
632
+ if (!__privateGet(this, _loopCSSProperty).current) {
633
+ const cs = getComputedStyle(this), padding = this.vertical ? parseFloat(cs.paddingBlockStart) + parseFloat(cs.paddingBlockEnd) : parseFloat(cs.paddingInlineStart) + parseFloat(cs.paddingInlineEnd);
634
+ __privateSet(this, _scrollSize, __privateGet(this, _scrollSize) + padding), __privateGet(this, _damped).max = __privateGet(this, _scrollSize);
633
635
  }
634
- if (t(this, V).current && t(this, a).length) {
635
- const h = t(this, a)[t(this, a).length - 1], u = h.position + h.size - t(this, L), g = t(this, P) - u;
636
- r(this, Pt, h.position + h.size + g);
636
+ if (__privateGet(this, _loopCSSProperty).current && __privateGet(this, _visibleSections).length) {
637
+ const lastSection = __privateGet(this, _visibleSections)[__privateGet(this, _visibleSections).length - 1], lastSectionMax = lastSection.position + lastSection.size - __privateGet(this, _viewportSize), lastSectionMargin = __privateGet(this, _scrollSize) - lastSectionMax;
638
+ __privateSet(this, _distance, lastSection.position + lastSection.size + lastSectionMargin);
637
639
  } else
638
- r(this, Pt, t(this, P));
639
- if (t(this, J).current && t(this, a).length) {
640
- const h = t(this, a)[s];
641
- t(this, f).set(h.position, {
640
+ __privateSet(this, _distance, __privateGet(this, _scrollSize));
641
+ if (__privateGet(this, _sectionalCSSProperty).current && __privateGet(this, _visibleSections).length) {
642
+ const section = __privateGet(this, _visibleSections)[prevCounter];
643
+ __privateGet(this, _damped).set(section.position, {
642
644
  equalize: !0
643
645
  });
644
646
  } else
645
- t(this, f).set(e * t(this, P), {
647
+ __privateGet(this, _damped).set(prevProgress * __privateGet(this, _scrollSize), {
646
648
  equalize: !0
647
649
  });
648
- r(this, Et, (this.vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth) > t(this, L)), this.classList.toggle("has-overflow", t(this, Et)), t(this, Et) ? t(this, Zt).current || o(this, c, ws).call(this) : o(this, c, Es).call(this), t(this, ms).call(this), st(this, "scrollResize", { custom: !0 }), t(this, f).notify();
650
+ __privateSet(this, _hasOverflow, (this.vertical ? __privateGet(this, _contentElement).offsetHeight : __privateGet(this, _contentElement).offsetWidth) > __privateGet(this, _viewportSize)), this.classList.toggle("has-overflow", __privateGet(this, _hasOverflow)), __privateGet(this, _hasOverflow) ? __privateGet(this, _disabledCSSProperty).current || __privateMethod(this, _ScrollElement_instances, enable_fn).call(this) : __privateMethod(this, _ScrollElement_instances, disable_fn).call(this), __privateGet(this, _updateMaxSectionsSize).call(this), dispatchEvent(this, "scrollResize", { custom: !0 }), __privateGet(this, _damped).notify();
649
651
  }
650
652
  connectedCallback() {
651
- ce.register(this), r(this, f, new Xs(0, {
653
+ scrollEntries.register(this), __privateSet(this, _damped, new Damped(0, {
652
654
  damping: 0.01,
653
655
  min: 0,
654
- order: Qs.SCROLL
655
- })), this.setAttribute("tabindex", "0"), r(this, it, new yi({ element: t(this, b) })), t(this, it).changeEvent.subscribe(t(this, Ne)), r(this, Qt, new Ci({
656
+ order: TICK_ORDER.SCROLL
657
+ })), this.setAttribute("tabindex", "0"), __privateSet(this, _wheelControls, new WheelControls({ element: __privateGet(this, _contentElement) })), __privateGet(this, _wheelControls).changeEvent.subscribe(__privateGet(this, _notAutoplayControlListener)), __privateSet(this, _keyboardControls, new KeyboardControls({
656
658
  element: this
657
- })), t(this, Qt).changeEvent.subscribe(
658
- t(this, Ne)
659
- ), r(this, rt, new Pi({
660
- element: t(this, b),
659
+ })), __privateGet(this, _keyboardControls).changeEvent.subscribe(
660
+ __privateGet(this, _notAutoplayControlListener)
661
+ ), __privateSet(this, _dragControls, new DragControls({
662
+ element: __privateGet(this, _contentElement),
661
663
  rootElement: this
662
- })), t(this, rt).changeEvent.subscribe(t(this, Ne)), r(this, F, new Ei({
664
+ })), __privateGet(this, _dragControls).changeEvent.subscribe(__privateGet(this, _notAutoplayControlListener)), __privateSet(this, _autoplayControls, new AutoplayControls({
663
665
  culling: this
664
- })), t(this, F).changeEvent.subscribe(t(this, bs)), t(this, D).subscribe(() => {
665
- o(this, c, Is).call(this);
666
- }), t(this, Wt).subscribe(() => {
667
- o(this, c, Is).call(this);
668
- }), t(this, Gt).subscribe((e) => {
669
- t(this, it).axis = e.current ? "max" : t(this, D).current;
670
- }), t(this, Se).subscribe((e) => {
671
- t(this, rt).inertion = typeof e.current == "number" ? e.current : 1;
672
- }), t(this, St).subscribe(() => {
673
- t(this, A) && t(this, T).call(this);
674
- }), t(this, gt).subscribe(({ current: e }) => {
675
- t(this, A) && (e ? o(this, c, hs).call(this) : o(this, c, Te).call(this));
676
- }), t(this, J).subscribe((e) => {
677
- t(this, it).debounce = e.current, t(this, rt).swipe = e.current, t(this, F).interval = e.current, t(this, A) && (e.current && !e.previous && !t(this, a).length ? o(this, c, hs).call(this) : !e.current && e.previous && t(this, a).length && o(this, c, Te).call(this));
678
- }), t(this, vt).subscribe((e) => {
679
- t(this, A) && (t(this, T).call(this), e.current && !e.previous && !t(this, a).length ? o(this, c, hs).call(this) : !e.current && e.previous && t(this, a).length && o(this, c, Te).call(this));
680
- }), t(this, Q).subscribe((e) => {
681
- t(this, A) && (t(this, T).call(this), o(this, c, de).call(this));
682
- }), t(this, V).subscribe((e) => {
683
- e.current ? (t(this, A) && (t(this, a).length || (t(this, gt).current = !0)), t(this, f).max = 1 / 0, t(this, f).min = -1 / 0) : (r(this, He, 0), t(this, f).max = t(this, P), t(this, f).min = 0), this.classList.toggle("loop", !!e.current);
684
- }), t(this, ge).subscribe((e) => {
685
- t(this, f).damping = e.current;
686
- }), t(this, ve).subscribe((e) => {
687
- t(this, f).mass = e.current;
688
- }), t(this, ye).subscribe((e) => {
689
- t(this, f).stiffness = e.current;
690
- }), t(this, X).subscribe((e) => {
691
- t(this, F).speed = e.current, !t(this, wt) && e.current && !e.previous ? t(this, F).connect() : !e.current && e.previous && t(this, F).disconnect();
692
- }), t(this, Ut).subscribe((e) => {
693
- e.current || (t(this, F).direction = 1);
694
- }), t(this, Y).subscribe((e) => {
695
- t(this, A) && o(this, c, de).call(this);
696
- }), t(this, yt).subscribe((e) => {
697
- t(this, A) && t(this, Y).current && o(this, c, de).call(this);
698
- }), t(this, Ct).subscribe((e) => {
699
- t(this, A) && t(this, Y).current && o(this, c, de).call(this);
700
- }), t(this, we).subscribe((e) => {
701
- t(this, A) && t(this, f).notify();
702
- }), t(this, f).isRunning.subscribe((e) => {
666
+ })), __privateGet(this, _autoplayControls).changeEvent.subscribe(__privateGet(this, _controlsListener)), __privateGet(this, _axisCSSProperty).subscribe(() => {
667
+ __privateMethod(this, _ScrollElement_instances, updateAxis_fn).call(this);
668
+ }), __privateGet(this, _reverseCSSProperty).subscribe(() => {
669
+ __privateMethod(this, _ScrollElement_instances, updateAxis_fn).call(this);
670
+ }), __privateGet(this, _wheelMaxDeltaCSSProperty).subscribe((e) => {
671
+ __privateGet(this, _wheelControls).axis = e.current ? "max" : __privateGet(this, _axisCSSProperty).current;
672
+ }), __privateGet(this, _dragInertionCSSProperty).subscribe((e) => {
673
+ __privateGet(this, _dragControls).inertion = typeof e.current == "number" ? e.current : 1;
674
+ }), __privateGet(this, _pagesCSSProperty).subscribe(() => {
675
+ __privateGet(this, _isConnected) && __privateGet(this, _resizeListener).call(this);
676
+ }), __privateGet(this, _splitCSSProperty).subscribe(({ current }) => {
677
+ __privateGet(this, _isConnected) && (current ? __privateMethod(this, _ScrollElement_instances, split_fn).call(this) : __privateMethod(this, _ScrollElement_instances, unsplit_fn).call(this));
678
+ }), __privateGet(this, _sectionalCSSProperty).subscribe((e) => {
679
+ __privateGet(this, _wheelControls).debounce = e.current, __privateGet(this, _dragControls).swipe = e.current, __privateGet(this, _autoplayControls).interval = e.current, __privateGet(this, _isConnected) && (e.current && !e.previous && !__privateGet(this, _visibleSections).length ? __privateMethod(this, _ScrollElement_instances, split_fn).call(this) : !e.current && e.previous && __privateGet(this, _visibleSections).length && __privateMethod(this, _ScrollElement_instances, unsplit_fn).call(this));
680
+ }), __privateGet(this, _autoSizeCSSProperty).subscribe((e) => {
681
+ __privateGet(this, _isConnected) && (__privateGet(this, _resizeListener).call(this), e.current && !e.previous && !__privateGet(this, _visibleSections).length ? __privateMethod(this, _ScrollElement_instances, split_fn).call(this) : !e.current && e.previous && __privateGet(this, _visibleSections).length && __privateMethod(this, _ScrollElement_instances, unsplit_fn).call(this));
682
+ }), __privateGet(this, _sectionsInViewCSSProperty).subscribe((e) => {
683
+ __privateGet(this, _isConnected) && (__privateGet(this, _resizeListener).call(this), __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this));
684
+ }), __privateGet(this, _loopCSSProperty).subscribe((e) => {
685
+ e.current ? (__privateGet(this, _isConnected) && (__privateGet(this, _visibleSections).length || (__privateGet(this, _splitCSSProperty).current = !0)), __privateGet(this, _damped).max = 1 / 0, __privateGet(this, _damped).min = -1 / 0) : (__privateSet(this, _overscroll, 0), __privateGet(this, _damped).max = __privateGet(this, _scrollSize), __privateGet(this, _damped).min = 0), this.classList.toggle("loop", !!e.current);
686
+ }), __privateGet(this, _dampingCSSProperty).subscribe((e) => {
687
+ __privateGet(this, _damped).damping = e.current;
688
+ }), __privateGet(this, _massCSSProperty).subscribe((e) => {
689
+ __privateGet(this, _damped).mass = e.current;
690
+ }), __privateGet(this, _stiffnessCSSProperty).subscribe((e) => {
691
+ __privateGet(this, _damped).stiffness = e.current;
692
+ }), __privateGet(this, _autoplayCSSProperty).subscribe((e) => {
693
+ __privateGet(this, _autoplayControls).speed = e.current, !__privateGet(this, _disabled) && e.current && !e.previous ? __privateGet(this, _autoplayControls).connect() : !e.current && e.previous && __privateGet(this, _autoplayControls).disconnect();
694
+ }), __privateGet(this, _autoplayUserDirectionCSSProperty).subscribe((e) => {
695
+ e.current || (__privateGet(this, _autoplayControls).direction = 1);
696
+ }), __privateGet(this, _classesCSSProperty).subscribe((e) => {
697
+ __privateGet(this, _isConnected) && __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this);
698
+ }), __privateGet(this, _currentIndexStartOffsetCSSProperty).subscribe((e) => {
699
+ __privateGet(this, _isConnected) && __privateGet(this, _classesCSSProperty).current && __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this);
700
+ }), __privateGet(this, _currentIndexEndOffsetCSSProperty).subscribe((e) => {
701
+ __privateGet(this, _isConnected) && __privateGet(this, _classesCSSProperty).current && __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this);
702
+ }), __privateGet(this, _shiftSectionPositionCSSProperty).subscribe((e) => {
703
+ __privateGet(this, _isConnected) && __privateGet(this, _damped).notify();
704
+ }), __privateGet(this, _damped).isRunning.subscribe((e) => {
703
705
  this.classList.toggle("active", e.current);
704
- }), t(this, z).subscribe((e) => {
705
- t(this, K) || (t(this, a).length && o(this, c, de).call(this), this.style.setProperty("--counter", e.current + ""));
706
- }), t(this, Xt).subscribe((e) => {
707
- t(this, Xt).isRunning.current && t(this, f).set(e.current, { equalize: !0 });
708
- }), t(this, Zt).subscribe((e) => {
709
- e.current && !e.previous ? (this.classList.add("disabled"), o(this, c, Es).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), o(this, c, ws).call(this));
710
- }), t(this, jt).subscribe((e) => {
711
- e.current && !e.previous ? (this.classList.add("hibernated"), o(this, c, Ms).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), o(this, c, Fs).call(this));
712
- }), t(this, me).observe(), t(this, D).observe(), t(this, Wt).observe(), t(this, mt).observe(), t(this, St).observe(), t(this, gt).observe(), t(this, J).observe(), t(this, Nt).observe(), t(this, qt).observe(), t(this, vt).observe(), t(this, Gt).observe(), t(this, Se).observe(), t(this, Q).observe(), t(this, V).observe(), t(this, ge).observe(), t(this, ve).observe(), t(this, ye).observe(), t(this, Ce).observe(), t(this, De).observe(), t(this, Pe).observe(), t(this, X).observe(), t(this, X).observe(), t(this, Ee).observe(), t(this, Ut).observe(), t(this, Y).observe(), t(this, yt).observe(), t(this, Ct).observe(), t(this, we).observe(), t(this, Kt).observe(), t(this, xe).observe(), t(this, Le).observe(), t(this, Zt).observe(), t(this, jt).observe(), pt.subscribe(t(this, qe), Ls.LAST), t(this, Be).observe(this, { childList: !0 });
706
+ }), __privateGet(this, _counter).subscribe((e) => {
707
+ __privateGet(this, _hibernated) || (__privateGet(this, _visibleSections).length && __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this), this.style.setProperty("--counter", e.current + ""));
708
+ }), __privateGet(this, _setTween).subscribe((e) => {
709
+ __privateGet(this, _setTween).isRunning.current && __privateGet(this, _damped).set(e.current, { equalize: !0 });
710
+ }), __privateGet(this, _disabledCSSProperty).subscribe((e) => {
711
+ e.current && !e.previous ? (this.classList.add("disabled"), __privateMethod(this, _ScrollElement_instances, disable_fn).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), __privateMethod(this, _ScrollElement_instances, enable_fn).call(this));
712
+ }), __privateGet(this, _hibernatedCSSProperty).subscribe((e) => {
713
+ e.current && !e.previous ? (this.classList.add("hibernated"), __privateMethod(this, _ScrollElement_instances, hibernate_fn).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), __privateMethod(this, _ScrollElement_instances, awake_fn).call(this));
714
+ }), __privateGet(this, _controlsCSSProperty).observe(), __privateGet(this, _axisCSSProperty).observe(), __privateGet(this, _reverseCSSProperty).observe(), __privateGet(this, _directionCSSProperty).observe(), __privateGet(this, _pagesCSSProperty).observe(), __privateGet(this, _splitCSSProperty).observe(), __privateGet(this, _sectionalCSSProperty).observe(), __privateGet(this, _easingCSSProperty).observe(), __privateGet(this, _durationCSSProperty).observe(), __privateGet(this, _autoSizeCSSProperty).observe(), __privateGet(this, _wheelMaxDeltaCSSProperty).observe(), __privateGet(this, _dragInertionCSSProperty).observe(), __privateGet(this, _sectionsInViewCSSProperty).observe(), __privateGet(this, _loopCSSProperty).observe(), __privateGet(this, _dampingCSSProperty).observe(), __privateGet(this, _massCSSProperty).observe(), __privateGet(this, _stiffnessCSSProperty).observe(), __privateGet(this, _mouseDragCSSProperty).observe(), __privateGet(this, _sectionDistanceScaleCSSProperty).observe(), __privateGet(this, _startSectionCSSProperty).observe(), __privateGet(this, _autoplayCSSProperty).observe(), __privateGet(this, _autoplayCSSProperty).observe(), __privateGet(this, _autoplayPauseDurationCSSProperty).observe(), __privateGet(this, _autoplayUserDirectionCSSProperty).observe(), __privateGet(this, _classesCSSProperty).observe(), __privateGet(this, _currentIndexStartOffsetCSSProperty).observe(), __privateGet(this, _currentIndexEndOffsetCSSProperty).observe(), __privateGet(this, _shiftSectionPositionCSSProperty).observe(), __privateGet(this, _focusDelayCSSProperty).observe(), __privateGet(this, _focusDurationCSSProperty).observe(), __privateGet(this, _shiftLimitCSSProperty).observe(), __privateGet(this, _disabledCSSProperty).observe(), __privateGet(this, _hibernatedCSSProperty).observe(), windowResizer.subscribe(__privateGet(this, _connectListener), RESIZE_ORDER.LAST), __privateGet(this, _mutationObserver).observe(this, { childList: !0 });
713
715
  }
714
716
  disconnectedCallback() {
715
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, me).unobserve(), t(this, D).unobserve(), t(this, Wt).unobserve(), t(this, mt).unobserve(), t(this, St).unobserve(), t(this, gt).unobserve(), t(this, J).unobserve(), t(this, Nt).unobserve(), t(this, qt).unobserve(), t(this, vt).unobserve(), t(this, Gt).unobserve(), t(this, Se).unobserve(), t(this, Q).unobserve(), t(this, V).unobserve(), t(this, ge).unobserve(), t(this, ve).unobserve(), t(this, ye).unobserve(), t(this, Ce).unobserve(), t(this, De).unobserve(), t(this, Pe).unobserve(), t(this, X).unobserve(), t(this, Ee).unobserve(), t(this, Ut).unobserve(), t(this, Y).unobserve(), t(this, yt).unobserve(), t(this, Ct).unobserve(), t(this, we).unobserve(), t(this, Kt).unobserve(), t(this, xe).unobserve(), t(this, Le).unobserve(), t(this, Zt).unobserve(), t(this, jt).unobserve(), pt.unsubscribe(t(this, qe)), pt.unsubscribe(t(this, T)), os.unsubscribe(t(this, T)), o(this, c, Ms).call(this), t(this, Be).disconnect();
716
- }
717
- }
718
- f = new WeakMap(), me = new WeakMap(), D = new WeakMap(), Wt = new WeakMap(), mt = new WeakMap(), St = new WeakMap(), gt = new WeakMap(), J = new WeakMap(), Nt = new WeakMap(), qt = new WeakMap(), vt = new WeakMap(), Gt = new WeakMap(), Se = new WeakMap(), Q = new WeakMap(), V = new WeakMap(), ge = new WeakMap(), ve = new WeakMap(), ye = new WeakMap(), Ce = new WeakMap(), De = new WeakMap(), Pe = new WeakMap(), X = new WeakMap(), Ee = new WeakMap(), Ut = new WeakMap(), Y = new WeakMap(), yt = new WeakMap(), Ct = new WeakMap(), we = new WeakMap(), Kt = new WeakMap(), xe = new WeakMap(), Le = new WeakMap(), Zt = new WeakMap(), jt = new WeakMap(), Jt = new WeakMap(), b = new WeakMap(), Oe = new WeakMap(), G = new WeakMap(), a = new WeakMap(), ds = new WeakMap(), fs = new WeakMap(), L = new WeakMap(), P = new WeakMap(), U = new WeakMap(), it = new WeakMap(), Qt = new WeakMap(), rt = new WeakMap(), F = new WeakMap(), z = new WeakMap(), He = new WeakMap(), Pt = new WeakMap(), Et = new WeakMap(), wt = new WeakMap(), K = new WeakMap(), $e = new WeakMap(), xt = new WeakMap(), Xt = new WeakMap(), Lt = new WeakMap(), ht = new WeakMap(), A = new WeakMap(), Be = new WeakMap(), kt = new WeakMap(), ke = new WeakMap(), We = new WeakMap(), c = new WeakSet(), Is = function() {
719
- const e = t(this, D).current, s = t(this, Wt).current ? "-reverse" : "";
720
- t(this, b).style.flexDirection = e === "x" ? `row${s}` : `column${s}`, t(this, it).axis = t(this, Gt).current ? "max" : e, t(this, Qt).dimension = e === "x" ? "width" : "height", t(this, rt).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, A) && t(this, T).call(this);
721
- }, hs = function() {
722
- o(this, c, Te).call(this), t(this, Oe).assignedElements().forEach((e, s) => {
723
- e instanceof HTMLElement && e.tagName !== "SCRIPT" && t(this, G).push(new ki(e, s, this));
724
- }), r(this, a, [...t(this, G)]), t(this, b).style.transform = "", st(this, "scrollSectionsChange", {
717
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), __privateGet(this, _controlsCSSProperty).unobserve(), __privateGet(this, _axisCSSProperty).unobserve(), __privateGet(this, _reverseCSSProperty).unobserve(), __privateGet(this, _directionCSSProperty).unobserve(), __privateGet(this, _pagesCSSProperty).unobserve(), __privateGet(this, _splitCSSProperty).unobserve(), __privateGet(this, _sectionalCSSProperty).unobserve(), __privateGet(this, _easingCSSProperty).unobserve(), __privateGet(this, _durationCSSProperty).unobserve(), __privateGet(this, _autoSizeCSSProperty).unobserve(), __privateGet(this, _wheelMaxDeltaCSSProperty).unobserve(), __privateGet(this, _dragInertionCSSProperty).unobserve(), __privateGet(this, _sectionsInViewCSSProperty).unobserve(), __privateGet(this, _loopCSSProperty).unobserve(), __privateGet(this, _dampingCSSProperty).unobserve(), __privateGet(this, _massCSSProperty).unobserve(), __privateGet(this, _stiffnessCSSProperty).unobserve(), __privateGet(this, _mouseDragCSSProperty).unobserve(), __privateGet(this, _sectionDistanceScaleCSSProperty).unobserve(), __privateGet(this, _startSectionCSSProperty).unobserve(), __privateGet(this, _autoplayCSSProperty).unobserve(), __privateGet(this, _autoplayPauseDurationCSSProperty).unobserve(), __privateGet(this, _autoplayUserDirectionCSSProperty).unobserve(), __privateGet(this, _classesCSSProperty).unobserve(), __privateGet(this, _currentIndexStartOffsetCSSProperty).unobserve(), __privateGet(this, _currentIndexEndOffsetCSSProperty).unobserve(), __privateGet(this, _shiftSectionPositionCSSProperty).unobserve(), __privateGet(this, _focusDelayCSSProperty).unobserve(), __privateGet(this, _focusDurationCSSProperty).unobserve(), __privateGet(this, _shiftLimitCSSProperty).unobserve(), __privateGet(this, _disabledCSSProperty).unobserve(), __privateGet(this, _hibernatedCSSProperty).unobserve(), windowResizer.unsubscribe(__privateGet(this, _connectListener)), windowResizer.unsubscribe(__privateGet(this, _resizeListener)), elementResizer.unsubscribe(__privateGet(this, _resizeListener)), __privateMethod(this, _ScrollElement_instances, hibernate_fn).call(this), __privateGet(this, _mutationObserver).disconnect();
718
+ }
719
+ };
720
+ _damped = new WeakMap(), _controlsCSSProperty = new WeakMap(), _axisCSSProperty = new WeakMap(), _reverseCSSProperty = new WeakMap(), _directionCSSProperty = new WeakMap(), _pagesCSSProperty = new WeakMap(), _splitCSSProperty = new WeakMap(), _sectionalCSSProperty = new WeakMap(), _easingCSSProperty = new WeakMap(), _durationCSSProperty = new WeakMap(), _autoSizeCSSProperty = new WeakMap(), _wheelMaxDeltaCSSProperty = new WeakMap(), _dragInertionCSSProperty = new WeakMap(), _sectionsInViewCSSProperty = new WeakMap(), _loopCSSProperty = new WeakMap(), _dampingCSSProperty = new WeakMap(), _massCSSProperty = new WeakMap(), _stiffnessCSSProperty = new WeakMap(), _mouseDragCSSProperty = new WeakMap(), _sectionDistanceScaleCSSProperty = new WeakMap(), _startSectionCSSProperty = new WeakMap(), _autoplayCSSProperty = new WeakMap(), _autoplayPauseDurationCSSProperty = new WeakMap(), _autoplayUserDirectionCSSProperty = new WeakMap(), _classesCSSProperty = new WeakMap(), _currentIndexStartOffsetCSSProperty = new WeakMap(), _currentIndexEndOffsetCSSProperty = new WeakMap(), _shiftSectionPositionCSSProperty = new WeakMap(), _focusDelayCSSProperty = new WeakMap(), _focusDurationCSSProperty = new WeakMap(), _shiftLimitCSSProperty = new WeakMap(), _disabledCSSProperty = new WeakMap(), _hibernatedCSSProperty = new WeakMap(), _contentWrapperElement = new WeakMap(), _contentElement = new WeakMap(), _slotElement = new WeakMap(), _sections = new WeakMap(), _visibleSections = new WeakMap(), _position2 = new WeakMap(), _contentPosition = new WeakMap(), _viewportSize = new WeakMap(), _scrollSize = new WeakMap(), _gap = new WeakMap(), _wheelControls = new WeakMap(), _keyboardControls = new WeakMap(), _dragControls = new WeakMap(), _autoplayControls = new WeakMap(), _counter = new WeakMap(), _overscroll = new WeakMap(), _distance = new WeakMap(), _hasOverflow = new WeakMap(), _disabled = new WeakMap(), _hibernated = new WeakMap(), _focusTimeoutId = new WeakMap(), _tweenTimeoutId = new WeakMap(), _setTween = new WeakMap(), _isGrabbing = new WeakMap(), _scrollLine = new WeakMap(), _isConnected = new WeakMap(), _mutationObserver = new WeakMap(), _currentSections = new WeakMap(), _skipNextResize = new WeakMap(), _maxSectionSizeTimeoutId = new WeakMap(), _ScrollElement_instances = new WeakSet(), updateAxis_fn = /* @__PURE__ */ __name(function() {
721
+ const axis = __privateGet(this, _axisCSSProperty).current, reverse = __privateGet(this, _reverseCSSProperty).current ? "-reverse" : "";
722
+ __privateGet(this, _contentElement).style.flexDirection = axis === "x" ? `row${reverse}` : `column${reverse}`, __privateGet(this, _wheelControls).axis = __privateGet(this, _wheelMaxDeltaCSSProperty).current ? "max" : axis, __privateGet(this, _keyboardControls).dimension = axis === "x" ? "width" : "height", __privateGet(this, _dragControls).axis = axis, axis === "x" ? this.style.touchAction = "pan-y" : axis === "y" && (this.style.touchAction = "pan-x"), __privateGet(this, _isConnected) && __privateGet(this, _resizeListener).call(this);
723
+ }, "#updateAxis"), split_fn = /* @__PURE__ */ __name(function() {
724
+ __privateMethod(this, _ScrollElement_instances, unsplit_fn).call(this), __privateGet(this, _slotElement).assignedElements().forEach((element, i) => {
725
+ element instanceof HTMLElement && element.tagName !== "SCRIPT" && __privateGet(this, _sections).push(new ScrollSection(element, i, this));
726
+ }), __privateSet(this, _visibleSections, [...__privateGet(this, _sections)]), __privateGet(this, _contentElement).style.transform = "", dispatchEvent(this, "scrollSectionsChange", {
725
727
  custom: !0,
726
728
  composed: !0
727
- }), t(this, T).call(this), o(this, c, de).call(this);
728
- }, Te = function() {
729
- t(this, G).forEach((e) => {
730
- e.destroy();
731
- }), r(this, G, []), r(this, a, []), t(this, z).reset(), t(this, f).reset(), this.style.removeProperty("--max-section-size"), st(this, "scrollSectionsChange", {
729
+ }), __privateGet(this, _resizeListener).call(this), __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this);
730
+ }, "#split"), unsplit_fn = /* @__PURE__ */ __name(function() {
731
+ __privateGet(this, _sections).forEach((section) => {
732
+ section.destroy();
733
+ }), __privateSet(this, _sections, []), __privateSet(this, _visibleSections, []), __privateGet(this, _counter).reset(), __privateGet(this, _damped).reset(), this.style.removeProperty("--max-section-size"), dispatchEvent(this, "scrollSectionsChange", {
732
734
  custom: !0,
733
735
  composed: !0
734
736
  });
735
- }, Es = function() {
736
- t(this, wt) || (r(this, wt, !0), t(this, f).unsubscribe(t(this, ps)), t(this, f).unlistenAnimationFrame(), clearInterval(t(this, $e)), clearInterval(t(this, xt)), t(this, Xt).unlistenAnimationFrame(), t(this, it).disconnect(), t(this, Qt).disconnect(), t(this, rt).disconnect(), t(this, F).disconnect(), t(this, Et) || (this.sections.forEach((e) => {
737
- e.unsetTransform();
738
- }), t(this, T).call(this)));
739
- }, ws = function() {
740
- t(this, wt) && (r(this, wt, !1), t(this, f).subscribe(t(this, ps), -1e4), t(this, f).notify(), t(this, it).connect(), t(this, Qt).connect(), t(this, rt).connect(), t(this, X).current && t(this, F).connect());
741
- }, Ms = function() {
742
- t(this, K) || (r(this, K, !0), clearTimeout(t(this, We)), pt.unsubscribe(t(this, T)), o(this, c, Es).call(this), t(this, b).style.transform = "", t(this, b).style.height = "", t(this, b).style.width = "", this.classList.remove("has-overflow", "start", "end"), this.style.removeProperty("--counter"), t(this, G).length ? o(this, c, Te).call(this) : (t(this, z).reset(), t(this, f).reset()), ce.unregister(this));
743
- }, Fs = function() {
744
- t(this, K) && (r(this, K, !1), ce.register(this), this.tryResplit(), o(this, c, ws).call(this), this.scrollToSection(t(this, Pe).current, {
737
+ }, "#unsplit"), disable_fn = /* @__PURE__ */ __name(function() {
738
+ __privateGet(this, _disabled) || (__privateSet(this, _disabled, !0), __privateGet(this, _damped).unsubscribe(__privateGet(this, _animatedChangeListener)), __privateGet(this, _damped).unlistenAnimationFrame(), clearInterval(__privateGet(this, _focusTimeoutId)), clearInterval(__privateGet(this, _tweenTimeoutId)), __privateGet(this, _setTween).unlistenAnimationFrame(), __privateGet(this, _wheelControls).disconnect(), __privateGet(this, _keyboardControls).disconnect(), __privateGet(this, _dragControls).disconnect(), __privateGet(this, _autoplayControls).disconnect(), __privateGet(this, _hasOverflow) || (this.sections.forEach((section) => {
739
+ section.unsetTransform();
740
+ }), __privateGet(this, _resizeListener).call(this)));
741
+ }, "#disable"), enable_fn = /* @__PURE__ */ __name(function() {
742
+ __privateGet(this, _disabled) && (__privateSet(this, _disabled, !1), __privateGet(this, _damped).subscribe(__privateGet(this, _animatedChangeListener), -1e4), __privateGet(this, _damped).notify(), __privateGet(this, _wheelControls).connect(), __privateGet(this, _keyboardControls).connect(), __privateGet(this, _dragControls).connect(), __privateGet(this, _autoplayCSSProperty).current && __privateGet(this, _autoplayControls).connect());
743
+ }, "#enable"), hibernate_fn = /* @__PURE__ */ __name(function() {
744
+ __privateGet(this, _hibernated) || (__privateSet(this, _hibernated, !0), clearTimeout(__privateGet(this, _maxSectionSizeTimeoutId)), windowResizer.unsubscribe(__privateGet(this, _resizeListener)), __privateMethod(this, _ScrollElement_instances, disable_fn).call(this), __privateGet(this, _contentElement).style.transform = "", __privateGet(this, _contentElement).style.height = "", __privateGet(this, _contentElement).style.width = "", this.classList.remove("has-overflow", "start", "end"), this.style.removeProperty("--counter"), __privateGet(this, _sections).length ? __privateMethod(this, _ScrollElement_instances, unsplit_fn).call(this) : (__privateGet(this, _counter).reset(), __privateGet(this, _damped).reset()), scrollEntries.unregister(this));
745
+ }, "#hibernate"), awake_fn = /* @__PURE__ */ __name(function() {
746
+ __privateGet(this, _hibernated) && (__privateSet(this, _hibernated, !1), scrollEntries.register(this), this.tryResplit(), __privateMethod(this, _ScrollElement_instances, enable_fn).call(this), this.scrollToSection(__privateGet(this, _startSectionCSSProperty).current, {
745
747
  behaviour: "instant"
746
- }), pt.subscribe(t(this, T), Ls.SCROLL));
747
- }, T = new WeakMap(), ps = new WeakMap(), Ys = function(e) {
748
- let s = t(this, z).current;
749
- return t(this, V).current ? s = gi(e, t(this, a).length) : s = js(e, 0, this.limit), s;
750
- }, Ne = new WeakMap(), bs = new WeakMap(), Ts = function(e = 1) {
751
- t(this, Ut).current && (t(this, F).direction = e), t(this, X).current && t(this, F).pauseAndContinue(
752
- t(this, Ee).current,
748
+ }), windowResizer.subscribe(__privateGet(this, _resizeListener), RESIZE_ORDER.SCROLL));
749
+ }, "#awake"), _resizeListener = new WeakMap(), _animatedChangeListener = new WeakMap(), clampCounter_fn = /* @__PURE__ */ __name(function(value) {
750
+ let counter = __privateGet(this, _counter).current;
751
+ return __privateGet(this, _loopCSSProperty).current ? counter = loopNumber(value, __privateGet(this, _visibleSections).length) : counter = clamp(value, 0, this.limit), counter;
752
+ }, "#clampCounter"), _notAutoplayControlListener = new WeakMap(), _controlsListener = new WeakMap(), processAutoplay_fn = /* @__PURE__ */ __name(function(direction = 1) {
753
+ __privateGet(this, _autoplayUserDirectionCSSProperty).current && (__privateGet(this, _autoplayControls).direction = direction), __privateGet(this, _autoplayCSSProperty).current && __privateGet(this, _autoplayControls).pauseAndContinue(
754
+ __privateGet(this, _autoplayPauseDurationCSSProperty).current,
753
755
  this.sectionalCSSProperty.current
754
756
  );
755
- }, Rs = function(e = "current") {
756
- if (t(this, V).current && t(this, a).length) {
757
- const s = Math.floor(t(this, f)[e]) % Math.floor(t(this, P) + t(this, L) + t(this, U));
758
- return s < 0 ? t(this, P) + s + t(this, L) + t(this, U) : s;
757
+ }, "#processAutoplay"), getScrollValue_fn = /* @__PURE__ */ __name(function(type = "current") {
758
+ if (__privateGet(this, _loopCSSProperty).current && __privateGet(this, _visibleSections).length) {
759
+ const mod = Math.floor(__privateGet(this, _damped)[type]) % Math.floor(__privateGet(this, _scrollSize) + __privateGet(this, _viewportSize) + __privateGet(this, _gap));
760
+ return mod < 0 ? __privateGet(this, _scrollSize) + mod + __privateGet(this, _viewportSize) + __privateGet(this, _gap) : mod;
759
761
  } else
760
- return t(this, f)[e];
761
- }, de = function() {
762
- if (t(this, a).length) {
763
- const e = t(this, z).current + t(this, yt).current;
764
- if (e === t(this, yt).current ? r(this, ht, "start") : e === this.limit ? r(this, ht, "end") : r(this, ht, null), st(this, "scrollLine", {
765
- detail: { line: t(this, ht) }
766
- }), t(this, Y).current) {
767
- this.classList.remove("end", "start"), t(this, ht) && this.classList.add(t(this, ht));
768
- const s = t(this, Q).current + t(this, Ct).current;
769
- r(this, kt, []), t(this, a).forEach((h, u) => {
770
- h.setCurrentIndex(null), h.setCurrentIndexArc(null), h.setCurrentIndexArcAbs(null), h.setMiddle(!1);
771
- const g = e - this.limit - 1 + t(this, Ct).current, v = e + s, C = this.sections.length - v;
772
- u >= e && u < v || u <= g ? (h.setMark("current"), t(this, kt).push(h)) : u >= v && u < v + C / 2 || u <= g + s ? h.setMark("next") : h.setMark("previous");
773
- }), t(this, ms).call(this);
762
+ return __privateGet(this, _damped)[type];
763
+ }, "#getScrollValue"), updateMarks_fn = /* @__PURE__ */ __name(function() {
764
+ if (__privateGet(this, _visibleSections).length) {
765
+ const counter = __privateGet(this, _counter).current + __privateGet(this, _currentIndexStartOffsetCSSProperty).current;
766
+ if (counter === __privateGet(this, _currentIndexStartOffsetCSSProperty).current ? __privateSet(this, _scrollLine, "start") : counter === this.limit ? __privateSet(this, _scrollLine, "end") : __privateSet(this, _scrollLine, null), dispatchEvent(this, "scrollLine", {
767
+ detail: { line: __privateGet(this, _scrollLine) }
768
+ }), __privateGet(this, _classesCSSProperty).current) {
769
+ this.classList.remove("end", "start"), __privateGet(this, _scrollLine) && this.classList.add(__privateGet(this, _scrollLine));
770
+ const sectionsInView = __privateGet(this, _sectionsInViewCSSProperty).current + __privateGet(this, _currentIndexEndOffsetCSSProperty).current;
771
+ __privateSet(this, _currentSections, []), __privateGet(this, _visibleSections).forEach((section, index) => {
772
+ section.setCurrentIndex(null), section.setCurrentIndexArc(null), section.setCurrentIndexArcAbs(null), section.setMiddle(!1);
773
+ const overflow = counter - this.limit - 1 + __privateGet(this, _currentIndexEndOffsetCSSProperty).current, currentRange = counter + sectionsInView, vv = this.sections.length - currentRange;
774
+ index >= counter && index < currentRange || index <= overflow ? (section.setMark("current"), __privateGet(this, _currentSections).push(section)) : index >= currentRange && index < currentRange + vv / 2 || index <= overflow + sectionsInView ? section.setMark("next") : section.setMark("previous");
775
+ }), __privateGet(this, _updateMaxSectionsSize).call(this);
774
776
  }
775
777
  }
776
- }, _s = function() {
777
- if (t(this, Y).current) {
778
- const e = Math.floor(t(this, kt).length / 2);
779
- t(this, kt).sort((s, h) => s.element.getBoundingClientRect().left - h.element.getBoundingClientRect().left), t(this, kt).forEach((s, h) => {
780
- const u = h - e;
781
- s.setCurrentIndex(h), s.setCurrentIndexArc(u), s.setCurrentIndexArcAbs(Math.abs(u)), s.setMiddle(h === e);
782
- }), t(this, a).forEach((s, h) => {
783
- s.setOffsetIndex(
784
- h - (t(this, z).current + t(this, Q).current)
778
+ }, "#updateMarks"), updateIndexes_fn = /* @__PURE__ */ __name(function() {
779
+ if (__privateGet(this, _classesCSSProperty).current) {
780
+ const middle = Math.floor(__privateGet(this, _currentSections).length / 2);
781
+ __privateGet(this, _currentSections).sort((a, b) => a.element.getBoundingClientRect().left - b.element.getBoundingClientRect().left), __privateGet(this, _currentSections).forEach((section, i) => {
782
+ const arcIndex = i - middle;
783
+ section.setCurrentIndex(i), section.setCurrentIndexArc(arcIndex), section.setCurrentIndexArcAbs(Math.abs(arcIndex)), section.setMiddle(i === middle);
784
+ }), __privateGet(this, _visibleSections).forEach((section, i) => {
785
+ section.setOffsetIndex(
786
+ i - (__privateGet(this, _counter).current + __privateGet(this, _sectionsInViewCSSProperty).current)
785
787
  );
786
788
  });
787
789
  }
788
- }, ms = new WeakMap(), ns = function(e = !1) {
789
- let s = this.targetScrollValue, h = 1 / 0, u = 0;
790
- const g = t(this, f).direction;
791
- for (let v = 0; v < t(this, a).length; v++) {
792
- const C = t(this, a)[v];
793
- let ue = t(this, Lt) ? C.size * g * -1 * 0.4 : 0, Me = C.position;
794
- this.overscroll && Me === 0 && e && (Me = t(this, Pt));
795
- let rs = Math.abs(Me + ue - s);
796
- rs <= h && (h = rs, u = v);
797
- }
798
- return u;
799
- }, qe = new WeakMap();
800
- q && !customElements.get("e-scroll") && customElements.define("e-scroll", As);
801
- var Ss;
802
- class is extends HTMLElement {
790
+ }, "#updateIndexes"), _updateMaxSectionsSize = new WeakMap(), getNearestSectionIndex_fn = /* @__PURE__ */ __name(function(NAMEIT = !1) {
791
+ let scrollValue = this.targetScrollValue, minDiff = 1 / 0, nearestIndex = 0;
792
+ const dir = __privateGet(this, _damped).direction;
793
+ for (let i = 0; i < __privateGet(this, _visibleSections).length; i++) {
794
+ const section = __privateGet(this, _visibleSections)[i];
795
+ let offset = __privateGet(this, _isGrabbing) ? section.size * dir * -1 * 0.4 : 0, position = section.position;
796
+ this.overscroll && position === 0 && NAMEIT && (position = __privateGet(this, _distance));
797
+ let diff = Math.abs(position + offset - scrollValue);
798
+ diff <= minDiff && (minDiff = diff, nearestIndex = i);
799
+ }
800
+ return nearestIndex;
801
+ }, "#getNearestSectionIndex"), _connectListener = new WeakMap(), __name(_ScrollElement, "ScrollElement");
802
+ let ScrollElement = _ScrollElement;
803
+ isBrowser && !customElements.get("e-scroll") && customElements.define("e-scroll", ScrollElement);
804
+ var _scrollElement2;
805
+ const _ScrollUserElement = class _ScrollUserElement extends HTMLElement {
803
806
  constructor() {
804
807
  super(...arguments);
805
- i(this, Ss, null);
808
+ __privateAdd(this, _scrollElement2, null);
806
809
  }
807
810
  get scrollElement() {
808
- return t(this, Ss);
811
+ return __privateGet(this, _scrollElement2);
809
812
  }
810
813
  connectedCallback() {
811
- const e = Li(this, As);
812
- e instanceof As ? r(this, Ss, e) : console.error(this, "e-scroll not found");
814
+ const scrollElement = findParentElement(this, ScrollElement);
815
+ scrollElement instanceof ScrollElement ? __privateSet(this, _scrollElement2, scrollElement) : console.error(this, "e-scroll not found");
813
816
  }
814
- }
815
- Ss = new WeakMap();
816
- var Yt, O, Vt, zt, Ge, Ue, _t, Ke, gs, vs;
817
- class zi extends is {
817
+ };
818
+ _scrollElement2 = new WeakMap(), __name(_ScrollUserElement, "ScrollUserElement");
819
+ let ScrollUserElement = _ScrollUserElement;
820
+ var _slotElement2, _thumbElement, _isHorisontal, _thumbSize, _thumbScrollSize, _position3, _resizeListener2, _scrollListener, _axisListener, _grabListener;
821
+ const _ScrollScrollbarElement = class _ScrollScrollbarElement extends ScrollUserElement {
818
822
  constructor() {
819
823
  super();
820
- i(this, Yt, null);
821
- i(this, O, null);
822
- i(this, Vt, !1);
823
- i(this, zt, 0);
824
- i(this, Ge, 0);
825
- i(this, Ue, 0);
826
- i(this, _t, () => {
827
- r(this, Vt, this.offsetWidth > this.offsetHeight);
828
- const e = t(this, Vt) ? this.offsetWidth : this.offsetHeight;
829
- r(this, zt, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), r(this, zt, Math.max(t(this, zt), 30)), t(this, Vt) ? (t(this, O).style.width = t(this, zt) + "px", t(this, O).style.height = "100%") : (t(this, O).style.width = "100%", t(this, O).style.height = t(this, zt) + "px"), r(this, Ge, e - t(this, zt)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Ke).call(this);
830
- });
831
- i(this, Ke, () => {
832
- r(this, Ue, this.scrollElement.currentProgress * t(this, Ge)), t(this, Vt) ? t(this, O).style.transform = `translate3d(${t(this, Ue)}px, 0px, 0px)` : t(this, O).style.transform = `translate3d(0px, ${t(this, Ue)}px, 0px)`;
833
- });
834
- i(this, gs, () => {
824
+ __privateAdd(this, _slotElement2, null);
825
+ __privateAdd(this, _thumbElement, null);
826
+ __privateAdd(this, _isHorisontal, !1);
827
+ __privateAdd(this, _thumbSize, 0);
828
+ __privateAdd(this, _thumbScrollSize, 0);
829
+ __privateAdd(this, _position3, 0);
830
+ __privateAdd(this, _resizeListener2, /* @__PURE__ */ __name(() => {
831
+ __privateSet(this, _isHorisontal, this.offsetWidth > this.offsetHeight);
832
+ const barSize = __privateGet(this, _isHorisontal) ? this.offsetWidth : this.offsetHeight;
833
+ __privateSet(this, _thumbSize, barSize / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / barSize)), __privateSet(this, _thumbSize, Math.max(__privateGet(this, _thumbSize), 30)), __privateGet(this, _isHorisontal) ? (__privateGet(this, _thumbElement).style.width = __privateGet(this, _thumbSize) + "px", __privateGet(this, _thumbElement).style.height = "100%") : (__privateGet(this, _thumbElement).style.width = "100%", __privateGet(this, _thumbElement).style.height = __privateGet(this, _thumbSize) + "px"), __privateSet(this, _thumbScrollSize, barSize - __privateGet(this, _thumbSize)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", __privateGet(this, _scrollListener).call(this);
834
+ }, "#resizeListener"));
835
+ __privateAdd(this, _scrollListener, /* @__PURE__ */ __name(() => {
836
+ __privateSet(this, _position3, this.scrollElement.currentProgress * __privateGet(this, _thumbScrollSize)), __privateGet(this, _isHorisontal) ? __privateGet(this, _thumbElement).style.transform = `translate3d(${__privateGet(this, _position3)}px, 0px, 0px)` : __privateGet(this, _thumbElement).style.transform = `translate3d(0px, ${__privateGet(this, _position3)}px, 0px)`;
837
+ }, "#scrollListener"));
838
+ __privateAdd(this, _axisListener, /* @__PURE__ */ __name(() => {
835
839
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
836
- });
837
- i(this, vs, (e) => {
838
- xi((u) => {
839
- const g = t(this, Vt) ? u.x : u.y, v = this.scrollElement.distance / t(this, Ge), C = (g - h) * v;
840
- this.scrollElement.setPosition(s + C);
840
+ }, "#axisListener"));
841
+ __privateAdd(this, _grabListener, /* @__PURE__ */ __name((grabEvent) => {
842
+ setupDrag((moveEvent) => {
843
+ const moveCursor = __privateGet(this, _isHorisontal) ? moveEvent.x : moveEvent.y, mult = this.scrollElement.distance / __privateGet(this, _thumbScrollSize), delta = (moveCursor - grabCursor) * mult;
844
+ this.scrollElement.setPosition(startValue + delta);
841
845
  });
842
- const s = this.scrollElement.damped.target, h = t(this, Vt) ? e.x : e.y;
843
- });
844
- if (q) {
845
- const e = this.attachShadow({ mode: "open" });
846
- e.adoptedStyleSheets = [
847
- Js({
846
+ const startValue = this.scrollElement.damped.target, grabCursor = __privateGet(this, _isHorisontal) ? grabEvent.x : grabEvent.y;
847
+ }, "#grabListener"));
848
+ if (isBrowser) {
849
+ const shadow = this.attachShadow({ mode: "open" });
850
+ shadow.adoptedStyleSheets = [
851
+ createStylesheet({
848
852
  ":host": {
849
853
  display: "inline-block",
850
854
  zIndex: "1",
@@ -873,562 +877,569 @@ class zi extends is {
873
877
  touchAction: "none"
874
878
  }
875
879
  })
876
- ], r(this, Yt, document.createElement("slot")), t(this, Yt).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, Yt));
880
+ ], __privateSet(this, _slotElement2, document.createElement("slot")), __privateGet(this, _slotElement2).innerHTML = '<div class="default-thumb"></div>', shadow.appendChild(__privateGet(this, _slotElement2));
877
881
  }
878
882
  }
879
883
  get thumbElement() {
880
- return t(this, O);
884
+ return __privateGet(this, _thumbElement);
881
885
  }
882
886
  connectedCallback() {
883
887
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
884
- const e = t(this, Yt).assignedElements()[0] || t(this, Yt).firstElementChild;
885
- r(this, O, e), t(this, O).addEventListener("pointerdown", t(this, vs)), pt.subscribe(t(this, _t), Ls.SCROLL), os.subscribe(this, t(this, _t)), os.subscribe(this.scrollElement, t(this, _t)), this.scrollElement.onScroll(t(this, Ke)), this.scrollElement.axisCSSProperty.subscribe(t(this, gs));
888
+ const slottedThumb = __privateGet(this, _slotElement2).assignedElements()[0] || __privateGet(this, _slotElement2).firstElementChild;
889
+ __privateSet(this, _thumbElement, slottedThumb), __privateGet(this, _thumbElement).addEventListener("pointerdown", __privateGet(this, _grabListener)), windowResizer.subscribe(__privateGet(this, _resizeListener2), RESIZE_ORDER.SCROLL), elementResizer.subscribe(this, __privateGet(this, _resizeListener2)), elementResizer.subscribe(this.scrollElement, __privateGet(this, _resizeListener2)), this.scrollElement.onScroll(__privateGet(this, _scrollListener)), this.scrollElement.axisCSSProperty.subscribe(__privateGet(this, _axisListener));
886
890
  }
887
891
  disconnectedCallback() {
888
- this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, O).removeEventListener("pointerdown", t(this, vs)), pt.unsubscribe(t(this, _t)), os.unsubscribe(t(this, _t)), this.scrollElement.offScroll(t(this, Ke)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, gs));
892
+ this.removeAttribute("drag-dead-zone"), this.style.display = "", __privateGet(this, _thumbElement).removeEventListener("pointerdown", __privateGet(this, _grabListener)), windowResizer.unsubscribe(__privateGet(this, _resizeListener2)), elementResizer.unsubscribe(__privateGet(this, _resizeListener2)), this.scrollElement.offScroll(__privateGet(this, _scrollListener)), this.scrollElement.axisCSSProperty.unsubscribe(__privateGet(this, _axisListener));
889
893
  }
890
- }
891
- Yt = new WeakMap(), O = new WeakMap(), Vt = new WeakMap(), zt = new WeakMap(), Ge = new WeakMap(), Ue = new WeakMap(), _t = new WeakMap(), Ke = new WeakMap(), gs = new WeakMap(), vs = new WeakMap();
892
- q && !customElements.get("e-scroll-scrollbar") && customElements.define("e-scroll-scrollbar", zi);
893
- var Ze, je, Je;
894
- class Bs extends is {
894
+ };
895
+ _slotElement2 = new WeakMap(), _thumbElement = new WeakMap(), _isHorisontal = new WeakMap(), _thumbSize = new WeakMap(), _thumbScrollSize = new WeakMap(), _position3 = new WeakMap(), _resizeListener2 = new WeakMap(), _scrollListener = new WeakMap(), _axisListener = new WeakMap(), _grabListener = new WeakMap(), __name(_ScrollScrollbarElement, "ScrollScrollbarElement");
896
+ let ScrollScrollbarElement = _ScrollScrollbarElement;
897
+ isBrowser && !customElements.get("e-scroll-scrollbar") && customElements.define("e-scroll-scrollbar", ScrollScrollbarElement);
898
+ var _behaviour, _easing, _duration;
899
+ const _ScrollButtonElement = class _ScrollButtonElement extends ScrollUserElement {
895
900
  constructor() {
896
901
  super();
897
- i(this, Ze, new l(this, "--behaviour", "smooth"));
898
- i(this, je, new l(
902
+ __privateAdd(this, _behaviour, new CSSProperty(this, "--behaviour", "smooth"));
903
+ __privateAdd(this, _easing, new CSSProperty(
899
904
  this,
900
905
  "--tween-easing",
901
906
  !1
902
907
  ));
903
- i(this, Je, new l(this, "--tween-duration", 0));
904
- q && this.addEventListener("click", () => {
905
- const e = t(this, Ze).current, s = t(this, je).current, h = t(this, Je).current;
908
+ __privateAdd(this, _duration, new CSSProperty(this, "--tween-duration", 0));
909
+ isBrowser && this.addEventListener("click", () => {
910
+ const behaviour = __privateGet(this, _behaviour).current, easing = __privateGet(this, _easing).current, duration = __privateGet(this, _duration).current;
906
911
  this.handleClick({
907
- behaviour: e,
908
- tween: s || h ? { easing: s, duration: h } : void 0
912
+ behaviour,
913
+ tween: easing || duration ? { easing, duration } : void 0
909
914
  });
910
915
  });
911
916
  }
912
917
  connectedCallback() {
913
- super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), t(this, Ze).observe(), t(this, je).observe(), t(this, Je).observe();
918
+ super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), __privateGet(this, _behaviour).observe(), __privateGet(this, _easing).observe(), __privateGet(this, _duration).observe();
914
919
  }
915
920
  disconnectedCallback() {
916
- this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this, Ze).close(), t(this, je).close(), t(this, Je).close();
921
+ this.removeAttribute("tabindex"), this.removeAttribute("role"), __privateGet(this, _behaviour).close(), __privateGet(this, _easing).close(), __privateGet(this, _duration).close();
917
922
  }
918
- }
919
- Ze = new WeakMap(), je = new WeakMap(), Je = new WeakMap();
920
- var Qe;
921
- class Ai extends Bs {
923
+ };
924
+ _behaviour = new WeakMap(), _easing = new WeakMap(), _duration = new WeakMap(), __name(_ScrollButtonElement, "ScrollButtonElement");
925
+ let ScrollButtonElement = _ScrollButtonElement;
926
+ var _set;
927
+ const _ScrollSetButtonElement = class _ScrollSetButtonElement extends ScrollButtonElement {
922
928
  constructor() {
923
929
  super(...arguments);
924
- i(this, Qe, new l(this, "--set", 1));
930
+ __privateAdd(this, _set, new CSSProperty(this, "--set", 1));
925
931
  }
926
- handleClick(e) {
927
- this.scrollElement.scrollToSection(t(this, Qe).current, e);
932
+ handleClick(options) {
933
+ this.scrollElement.scrollToSection(__privateGet(this, _set).current, options);
928
934
  }
929
935
  connectedCallback() {
930
- super.connectedCallback(), t(this, Qe).observe();
936
+ super.connectedCallback(), __privateGet(this, _set).observe();
931
937
  }
932
938
  disconnectedCallback() {
933
- super.disconnectedCallback(), t(this, Qe).close();
939
+ super.disconnectedCallback(), __privateGet(this, _set).close();
934
940
  }
935
- }
936
- Qe = new WeakMap();
937
- q && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", Ai);
938
- var At, Xe;
939
- class Ii extends Bs {
941
+ };
942
+ _set = new WeakMap(), __name(_ScrollSetButtonElement, "ScrollSetButtonElement");
943
+ let ScrollSetButtonElement = _ScrollSetButtonElement;
944
+ isBrowser && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ScrollSetButtonElement);
945
+ var _step, _scrollLineListener;
946
+ const _ScrollStepButtonElement = class _ScrollStepButtonElement extends ScrollButtonElement {
940
947
  constructor() {
941
948
  super(...arguments);
942
- i(this, At, new l(this, "--step", 1));
943
- i(this, Xe, () => {
944
- this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, At).current > 0 && this.scrollElement.scrollLine === "end" || t(this, At).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
945
- });
949
+ __privateAdd(this, _step, new CSSProperty(this, "--step", 1));
950
+ __privateAdd(this, _scrollLineListener, /* @__PURE__ */ __name(() => {
951
+ this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : __privateGet(this, _step).current > 0 && this.scrollElement.scrollLine === "end" || __privateGet(this, _step).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
952
+ }, "#scrollLineListener"));
946
953
  }
947
- handleClick(e) {
948
- this.scrollElement.shiftSections(t(this, At).current, e);
954
+ handleClick(options) {
955
+ this.scrollElement.shiftSections(__privateGet(this, _step).current, options);
949
956
  }
950
957
  connectedCallback() {
951
- super.connectedCallback(), this.scrollElement && (t(this, At).subscribe(() => {
952
- t(this, Xe).call(this);
953
- }), t(this, At).observe(), this.scrollElement.addEventListener(
958
+ super.connectedCallback(), this.scrollElement && (__privateGet(this, _step).subscribe(() => {
959
+ __privateGet(this, _scrollLineListener).call(this);
960
+ }), __privateGet(this, _step).observe(), this.scrollElement.addEventListener(
954
961
  "scrollLine",
955
- t(this, Xe)
956
- ), t(this, Xe).call(this));
962
+ __privateGet(this, _scrollLineListener)
963
+ ), __privateGet(this, _scrollLineListener).call(this));
957
964
  }
958
965
  disconnectedCallback() {
959
- super.disconnectedCallback(), t(this, At).close(), this.removeAttribute("disabled");
960
- }
961
- }
962
- At = new WeakMap(), Xe = new WeakMap();
963
- q && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", Ii);
964
- var nt, te, Ye, ys, Cs, _e;
965
- class Mi {
966
- constructor(n, e, s) {
967
- i(this, nt, null);
968
- i(this, te, null);
969
- i(this, Ye, null);
970
- i(this, ys, null);
971
- i(this, Cs, () => {
972
- t(this, te).scrollToSection(t(this, Ye), {
973
- behaviour: t(this, ys)
966
+ super.disconnectedCallback(), __privateGet(this, _step).close(), this.removeAttribute("disabled");
967
+ }
968
+ };
969
+ _step = new WeakMap(), _scrollLineListener = new WeakMap(), __name(_ScrollStepButtonElement, "ScrollStepButtonElement");
970
+ let ScrollStepButtonElement = _ScrollStepButtonElement;
971
+ isBrowser && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", ScrollStepButtonElement);
972
+ var _element2, _scrollElement3, _index2, _behaviour2, _clickListener, _counterChangeListener;
973
+ const _BulletButton = class _BulletButton {
974
+ constructor(scrollElement, index, behaviour) {
975
+ __privateAdd(this, _element2, null);
976
+ __privateAdd(this, _scrollElement3, null);
977
+ __privateAdd(this, _index2, null);
978
+ __privateAdd(this, _behaviour2, null);
979
+ __privateAdd(this, _clickListener, /* @__PURE__ */ __name(() => {
980
+ __privateGet(this, _scrollElement3).scrollToSection(__privateGet(this, _index2), {
981
+ behaviour: __privateGet(this, _behaviour2)
974
982
  });
975
- });
976
- i(this, _e, () => {
977
- t(this, nt).classList.toggle(
983
+ }, "#clickListener"));
984
+ __privateAdd(this, _counterChangeListener, /* @__PURE__ */ __name(() => {
985
+ __privateGet(this, _element2).classList.toggle(
978
986
  "current",
979
- t(this, te).counter.current === t(this, Ye)
987
+ __privateGet(this, _scrollElement3).counter.current === __privateGet(this, _index2)
980
988
  );
981
- });
982
- q && (r(this, nt, document.createElement("button")), t(this, nt).setAttribute("aria-label", `Go to section ${e + 1}`), r(this, te, n), r(this, ys, s), r(this, Ye, e), t(this, nt).addEventListener("click", t(this, Cs)), t(this, te).counter.subscribe(t(this, _e)), t(this, _e).call(this));
989
+ }, "#counterChangeListener"));
990
+ isBrowser && (__privateSet(this, _element2, document.createElement("button")), __privateGet(this, _element2).setAttribute("aria-label", `Go to section ${index + 1}`), __privateSet(this, _scrollElement3, scrollElement), __privateSet(this, _behaviour2, behaviour), __privateSet(this, _index2, index), __privateGet(this, _element2).addEventListener("click", __privateGet(this, _clickListener)), __privateGet(this, _scrollElement3).counter.subscribe(__privateGet(this, _counterChangeListener)), __privateGet(this, _counterChangeListener).call(this));
983
991
  }
984
992
  get element() {
985
- return t(this, nt);
993
+ return __privateGet(this, _element2);
986
994
  }
987
995
  destroy() {
988
- t(this, nt).removeEventListener("click", t(this, Cs)), t(this, te).counter.unsubscribe(t(this, _e)), t(this, nt).remove();
996
+ __privateGet(this, _element2).removeEventListener("click", __privateGet(this, _clickListener)), __privateGet(this, _scrollElement3).counter.unsubscribe(__privateGet(this, _counterChangeListener)), __privateGet(this, _element2).remove();
989
997
  }
990
- }
991
- nt = new WeakMap(), te = new WeakMap(), Ye = new WeakMap(), ys = new WeakMap(), Cs = new WeakMap(), _e = new WeakMap();
992
- var Ve, ee, ot;
993
- class Fi extends is {
998
+ };
999
+ _element2 = new WeakMap(), _scrollElement3 = new WeakMap(), _index2 = new WeakMap(), _behaviour2 = new WeakMap(), _clickListener = new WeakMap(), _counterChangeListener = new WeakMap(), __name(_BulletButton, "BulletButton");
1000
+ let BulletButton = _BulletButton;
1001
+ var _contentElement2, _buttons, _sectionsChangeListener;
1002
+ const _ScrollBulletButtonsElement = class _ScrollBulletButtonsElement extends ScrollUserElement {
994
1003
  constructor() {
995
1004
  super(...arguments);
996
- i(this, Ve, null);
997
- i(this, ee, []);
998
- i(this, ot, xs(() => {
999
- t(this, ee).forEach((s) => s.destroy()), r(this, ee, []);
1000
- let e = 0;
1001
- this.scrollElement.loopCSSProperty.current ? e = this.scrollElement.visibleSections.length : e = this.scrollElement.visibleSections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
1002
- for (let s = 0; s < e; s++) {
1003
- const h = new Mi(
1005
+ __privateAdd(this, _contentElement2, null);
1006
+ __privateAdd(this, _buttons, []);
1007
+ __privateAdd(this, _sectionsChangeListener, debounce(() => {
1008
+ __privateGet(this, _buttons).forEach((b) => b.destroy()), __privateSet(this, _buttons, []);
1009
+ let length = 0;
1010
+ this.scrollElement.loopCSSProperty.current ? length = this.scrollElement.visibleSections.length : length = this.scrollElement.visibleSections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
1011
+ for (let index = 0; index < length; index++) {
1012
+ const button = new BulletButton(
1004
1013
  this.scrollElement,
1005
- s,
1014
+ index,
1006
1015
  this.getAttribute("behaviour") || "smooth"
1007
1016
  );
1008
- t(this, Ve).appendChild(h.element), t(this, ee).push(h);
1017
+ __privateGet(this, _contentElement2).appendChild(button.element), __privateGet(this, _buttons).push(button);
1009
1018
  }
1010
1019
  }, 0));
1011
1020
  }
1012
1021
  connectedCallback() {
1013
- super.connectedCallback(), this.innerHTML = "", r(this, Ve, document.createElement("div")), this.appendChild(t(this, Ve)), this.scrollElement.addEventListener(
1022
+ super.connectedCallback(), this.innerHTML = "", __privateSet(this, _contentElement2, document.createElement("div")), this.appendChild(__privateGet(this, _contentElement2)), this.scrollElement.addEventListener(
1014
1023
  "scrollSectionsChange",
1015
- t(this, ot)
1024
+ __privateGet(this, _sectionsChangeListener)
1016
1025
  ), this.scrollElement.sectionsInViewCSSProperty.subscribe(
1017
- t(this, ot)
1018
- ), this.scrollElement.loopCSSProperty.subscribe(t(this, ot)), t(this, ot).call(this);
1026
+ __privateGet(this, _sectionsChangeListener)
1027
+ ), this.scrollElement.loopCSSProperty.subscribe(__privateGet(this, _sectionsChangeListener)), __privateGet(this, _sectionsChangeListener).call(this);
1019
1028
  }
1020
1029
  disconnectedCallback() {
1021
1030
  this.scrollElement.removeEventListener(
1022
1031
  "scrollSectionsChange",
1023
- t(this, ot)
1032
+ __privateGet(this, _sectionsChangeListener)
1024
1033
  ), this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
1025
- t(this, ot)
1026
- ), this.scrollElement.loopCSSProperty.unsubscribe(t(this, ot)), t(this, ee).forEach((e) => e.destroy()), r(this, ee, []), t(this, Ve).remove();
1027
- }
1028
- }
1029
- Ve = new WeakMap(), ee = new WeakMap(), ot = new WeakMap();
1030
- q && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", Fi);
1031
- var se, ie, re, he, It, Mt, Ft, Tt, I, H, $, B, Rt, k, lt, ct, _, Dt, ze, ut, at, dt, w, W, N, tt, et, Z, ts, S, Ot, ne, es, x, ft, R, M, j, Ae, Ht, y, oe, m, ti, ei, si, ii, ri, hi, ss, Ie, Ds, fe, ni, oi, Os;
1032
- class Ti extends is {
1034
+ __privateGet(this, _sectionsChangeListener)
1035
+ ), this.scrollElement.loopCSSProperty.unsubscribe(__privateGet(this, _sectionsChangeListener)), __privateGet(this, _buttons).forEach((b) => b.destroy()), __privateSet(this, _buttons, []), __privateGet(this, _contentElement2).remove();
1036
+ }
1037
+ };
1038
+ _contentElement2 = new WeakMap(), _buttons = new WeakMap(), _sectionsChangeListener = new WeakMap(), __name(_ScrollBulletButtonsElement, "ScrollBulletButtonsElement");
1039
+ let ScrollBulletButtonsElement = _ScrollBulletButtonsElement;
1040
+ isBrowser && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", ScrollBulletButtonsElement);
1041
+ var _dampingCSSProperty2, _massCSSProperty2, _stiffnessCSSProperty2, _targetCSSProperty, _disabledCSSProperty2, _distanceOffsetCSSProperty, _startOffsetCSSProperty, _captureOnceCSSProperty, _capturedCSSProperty, _releasedCSSProperty, _capturedFromStartCSSProperty, _capturedFromFinishCSSProperty, _releasedFromStartCSSProperty, _releasedFromFinishCSSProperty, _passedVarCSSProperty, _progressVarCSSProperty, _progressArcVarCSSProperty, _progressArcMultCSSProperty, _animationVarTypeCSSProperty, _distanceVarCSSProperty, _startVarCSSProperty, _finishVarCSSProperty, _isCaptured, _isReleased, _isCapturedFromStart, _isReleasedFromStart, _isCapturedFromFinish, _isReleasedFromFinish, _anotherScrollEntries, _targetElement, _directionPosition, _directionSize, _moverDirectionSize, _passed, _progress, _start, _distance2, _finish, _isResized, _isCapturedOnce, _isDisabled, _skipPassNotification, _ScrollSegmentElement_instances, captureListener_fn, releaseListener_fn, captureFromStartListener_fn, captureFromFinishListener_fn, releaseFromStartListener_fn, releaseFromFinishListener_fn, _resizeListener3, _tickListener, updateProgress_fn, handleClassSetting_fn, removeClasses_fn, removeVars_fn, removeCurrentMarks_fn;
1042
+ const _ScrollSegmentElement = class _ScrollSegmentElement extends ScrollUserElement {
1033
1043
  constructor() {
1034
1044
  super(...arguments);
1035
- i(this, m);
1036
- i(this, se);
1037
- i(this, ie);
1038
- i(this, re);
1039
- i(this, he);
1040
- i(this, It);
1041
- i(this, Mt);
1042
- i(this, Ft);
1043
- i(this, Tt);
1044
- i(this, I);
1045
- i(this, H);
1046
- i(this, $);
1047
- i(this, B);
1048
- i(this, Rt);
1049
- i(this, k);
1050
- i(this, lt);
1051
- i(this, ct);
1052
- i(this, _);
1053
- i(this, Dt);
1054
- i(this, ze);
1055
- i(this, ut);
1056
- i(this, at);
1057
- i(this, dt);
1058
- i(this, w);
1059
- i(this, W);
1060
- i(this, N);
1061
- i(this, tt);
1062
- i(this, et);
1063
- i(this, Z);
1064
- i(this, ts);
1065
- i(this, S);
1066
- i(this, Ot);
1067
- i(this, ne);
1068
- i(this, es);
1069
- i(this, x);
1070
- i(this, ft);
1071
- i(this, R);
1072
- i(this, M);
1073
- i(this, j);
1074
- i(this, Ae);
1075
- i(this, Ht);
1076
- i(this, y);
1077
- i(this, oe);
1078
- i(this, ss);
1079
- i(this, Ie);
1080
- r(this, se, new l(this, "--damping", 20)), r(this, ie, new l(this, "--mass", 0)), r(this, re, new l(this, "--stiffness", 0)), r(this, he, new l(this, "--target", "")), r(this, It, new l(this, "--disabled", !1)), r(this, Mt, new l(
1045
+ __privateAdd(this, _ScrollSegmentElement_instances);
1046
+ __privateAdd(this, _dampingCSSProperty2);
1047
+ __privateAdd(this, _massCSSProperty2);
1048
+ __privateAdd(this, _stiffnessCSSProperty2);
1049
+ __privateAdd(this, _targetCSSProperty);
1050
+ __privateAdd(this, _disabledCSSProperty2);
1051
+ __privateAdd(this, _distanceOffsetCSSProperty);
1052
+ __privateAdd(this, _startOffsetCSSProperty);
1053
+ __privateAdd(this, _captureOnceCSSProperty);
1054
+ __privateAdd(this, _capturedCSSProperty);
1055
+ __privateAdd(this, _releasedCSSProperty);
1056
+ __privateAdd(this, _capturedFromStartCSSProperty);
1057
+ __privateAdd(this, _capturedFromFinishCSSProperty);
1058
+ __privateAdd(this, _releasedFromStartCSSProperty);
1059
+ __privateAdd(this, _releasedFromFinishCSSProperty);
1060
+ __privateAdd(this, _passedVarCSSProperty);
1061
+ __privateAdd(this, _progressVarCSSProperty);
1062
+ __privateAdd(this, _progressArcVarCSSProperty);
1063
+ __privateAdd(this, _progressArcMultCSSProperty);
1064
+ __privateAdd(this, _animationVarTypeCSSProperty);
1065
+ __privateAdd(this, _distanceVarCSSProperty);
1066
+ __privateAdd(this, _startVarCSSProperty);
1067
+ __privateAdd(this, _finishVarCSSProperty);
1068
+ __privateAdd(this, _isCaptured);
1069
+ __privateAdd(this, _isReleased);
1070
+ __privateAdd(this, _isCapturedFromStart);
1071
+ __privateAdd(this, _isReleasedFromStart);
1072
+ __privateAdd(this, _isCapturedFromFinish);
1073
+ __privateAdd(this, _isReleasedFromFinish);
1074
+ __privateAdd(this, _anotherScrollEntries);
1075
+ __privateAdd(this, _targetElement);
1076
+ __privateAdd(this, _directionPosition);
1077
+ __privateAdd(this, _directionSize);
1078
+ __privateAdd(this, _moverDirectionSize);
1079
+ __privateAdd(this, _passed);
1080
+ __privateAdd(this, _progress);
1081
+ __privateAdd(this, _start);
1082
+ __privateAdd(this, _distance2);
1083
+ __privateAdd(this, _finish);
1084
+ __privateAdd(this, _isResized);
1085
+ __privateAdd(this, _isCapturedOnce);
1086
+ __privateAdd(this, _isDisabled);
1087
+ __privateAdd(this, _skipPassNotification);
1088
+ __privateAdd(this, _resizeListener3);
1089
+ __privateAdd(this, _tickListener);
1090
+ __privateSet(this, _dampingCSSProperty2, new CSSProperty(this, "--damping", 20)), __privateSet(this, _massCSSProperty2, new CSSProperty(this, "--mass", 0)), __privateSet(this, _stiffnessCSSProperty2, new CSSProperty(this, "--stiffness", 0)), __privateSet(this, _targetCSSProperty, new CSSProperty(this, "--target", "")), __privateSet(this, _disabledCSSProperty2, new CSSProperty(this, "--disabled", !1)), __privateSet(this, _distanceOffsetCSSProperty, new CSSProperty(
1081
1091
  this,
1082
1092
  "--distance-offset",
1083
1093
  0,
1084
1094
  { rawValueCheck: !1 }
1085
- )), r(this, Ft, new l(this, "--start-offset", 0, {
1095
+ )), __privateSet(this, _startOffsetCSSProperty, new CSSProperty(this, "--start-offset", 0, {
1086
1096
  rawValueCheck: !1
1087
- })), r(this, Tt, new l(
1097
+ })), __privateSet(this, _captureOnceCSSProperty, new CSSProperty(
1088
1098
  this,
1089
1099
  "--capture-once",
1090
1100
  !1
1091
- )), r(this, I, new l(this, "--captured", "")), r(this, H, new l(this, "--released", "")), r(this, $, new l(
1101
+ )), __privateSet(this, _capturedCSSProperty, new CSSProperty(this, "--captured", "")), __privateSet(this, _releasedCSSProperty, new CSSProperty(this, "--released", "")), __privateSet(this, _capturedFromStartCSSProperty, new CSSProperty(
1092
1102
  this,
1093
1103
  "--captured-from-start",
1094
1104
  ""
1095
- )), r(this, B, new l(
1105
+ )), __privateSet(this, _capturedFromFinishCSSProperty, new CSSProperty(
1096
1106
  this,
1097
1107
  "--captured-from-finish",
1098
1108
  ""
1099
- )), r(this, Rt, new l(
1109
+ )), __privateSet(this, _releasedFromStartCSSProperty, new CSSProperty(
1100
1110
  this,
1101
1111
  "--released-from-start",
1102
1112
  ""
1103
- )), r(this, k, new l(
1113
+ )), __privateSet(this, _releasedFromFinishCSSProperty, new CSSProperty(
1104
1114
  this,
1105
1115
  "--released-from-finish",
1106
1116
  ""
1107
- )), r(this, lt, new l(this, "--passed-var", "")), r(this, ct, new l(this, "--progress-var", "")), r(this, _, new l(
1117
+ )), __privateSet(this, _passedVarCSSProperty, new CSSProperty(this, "--passed-var", "")), __privateSet(this, _progressVarCSSProperty, new CSSProperty(this, "--progress-var", "")), __privateSet(this, _progressArcVarCSSProperty, new CSSProperty(
1108
1118
  this,
1109
1119
  "--progress-arc-var",
1110
1120
  ""
1111
- )), r(this, Dt, new l(
1121
+ )), __privateSet(this, _progressArcMultCSSProperty, new CSSProperty(
1112
1122
  this,
1113
1123
  "--progress-arc-mult",
1114
1124
  1
1115
- )), r(this, ze, new l(
1125
+ )), __privateSet(this, _animationVarTypeCSSProperty, new CSSProperty(
1116
1126
  this,
1117
1127
  "--animation-var-type",
1118
1128
  "target"
1119
- )), r(this, ut, new l(this, "--distance-var", "")), r(this, at, new l(this, "--start-var", "")), r(this, dt, new l(this, "--finish-var", "")), r(this, w, new ae(!1)), r(this, W, new ae(!1)), r(this, N, new ae(!1)), r(this, tt, new ae(!1)), r(this, et, new ae(!1)), r(this, Z, new ae(!1)), r(this, ts, []), r(this, S, this), r(this, Ot, 0), r(this, ne, 0), r(this, es, 0), r(this, x, new Xs(0, { order: Qs.SEGMENT, min: 0, max: 1 })), r(this, ft, 0), r(this, R, 0), r(this, M, 0), r(this, j, 0), r(this, Ae, !1), r(this, Ht, !1), r(this, y, !0), r(this, oe, !1), this.resize = () => {
1120
- r(this, ne, this.scrollElement.vertical ? this.offsetHeight : this.offsetWidth), r(this, Ot, this.scrollElement.vertical ? ls(this, this.scrollElement) : cs(this, this.scrollElement));
1121
- const e = bi(
1129
+ )), __privateSet(this, _distanceVarCSSProperty, new CSSProperty(this, "--distance-var", "")), __privateSet(this, _startVarCSSProperty, new CSSProperty(this, "--start-var", "")), __privateSet(this, _finishVarCSSProperty, new CSSProperty(this, "--finish-var", "")), __privateSet(this, _isCaptured, new Store(!1)), __privateSet(this, _isReleased, new Store(!1)), __privateSet(this, _isCapturedFromStart, new Store(!1)), __privateSet(this, _isReleasedFromStart, new Store(!1)), __privateSet(this, _isCapturedFromFinish, new Store(!1)), __privateSet(this, _isReleasedFromFinish, new Store(!1)), __privateSet(this, _anotherScrollEntries, []), __privateSet(this, _targetElement, this), __privateSet(this, _directionPosition, 0), __privateSet(this, _directionSize, 0), __privateSet(this, _moverDirectionSize, 0), __privateSet(this, _passed, new Damped(0, { order: TICK_ORDER.SEGMENT, min: 0, max: 1 })), __privateSet(this, _progress, 0), __privateSet(this, _start, 0), __privateSet(this, _distance2, 0), __privateSet(this, _finish, 0), __privateSet(this, _isResized, !1), __privateSet(this, _isCapturedOnce, !1), __privateSet(this, _isDisabled, !0), __privateSet(this, _skipPassNotification, !1), this.resize = () => {
1130
+ __privateSet(this, _directionSize, this.scrollElement.vertical ? this.offsetHeight : this.offsetWidth), __privateSet(this, _directionPosition, this.scrollElement.vertical ? getCumulativeOffsetTop(this, this.scrollElement) : getCumulativeOffsetLeft(this, this.scrollElement));
1131
+ const stickyOffset = getStickyOffset(
1122
1132
  this,
1123
1133
  this.scrollElement.vertical ? "top" : "left"
1124
1134
  );
1125
- r(this, Ot, t(this, Ot) - e), r(this, R, this.getStart()), r(this, M, this.getDistance()), r(this, R, t(this, R) + t(this, Ft).current), r(this, M, t(this, M) + t(this, Mt).current), r(this, j, t(this, R) + t(this, M)), this.scrollElement.currentScrollValue > t(this, j) && !t(this, w).current && !t(this, W).current && (t(this, w).current = !0), this.setVar(t(this, at).current, t(this, R)), this.setVar(t(this, dt).current, t(this, j)), this.setVar(t(this, ut).current, t(this, M)), t(this, x).max = t(this, M), r(this, Ae, !0), t(this, Ie).call(this);
1126
- }, this.findAnotherScrollEntries = xs(() => {
1127
- const e = ce.getAll(this).reverse();
1128
- let s = 0;
1129
- e.forEach((h, u) => {
1130
- h.element === this.scrollElement && (s = u);
1131
- }), r(this, ts, e.slice(s + 1)), this.tick();
1132
- }, 0), r(this, ss, () => {
1133
- t(this, y) || this.resize();
1134
- }), r(this, Ie, () => {
1135
- !t(this, y) && t(this, Ae) && this.tick();
1135
+ __privateSet(this, _directionPosition, __privateGet(this, _directionPosition) - stickyOffset), __privateSet(this, _start, this.getStart()), __privateSet(this, _distance2, this.getDistance()), __privateSet(this, _start, __privateGet(this, _start) + __privateGet(this, _startOffsetCSSProperty).current), __privateSet(this, _distance2, __privateGet(this, _distance2) + __privateGet(this, _distanceOffsetCSSProperty).current), __privateSet(this, _finish, __privateGet(this, _start) + __privateGet(this, _distance2)), this.scrollElement.currentScrollValue > __privateGet(this, _finish) && !__privateGet(this, _isCaptured).current && !__privateGet(this, _isReleased).current && (__privateGet(this, _isCaptured).current = !0), this.setVar(__privateGet(this, _startVarCSSProperty).current, __privateGet(this, _start)), this.setVar(__privateGet(this, _finishVarCSSProperty).current, __privateGet(this, _finish)), this.setVar(__privateGet(this, _distanceVarCSSProperty).current, __privateGet(this, _distance2)), __privateGet(this, _passed).max = __privateGet(this, _distance2), __privateSet(this, _isResized, !0), __privateGet(this, _tickListener).call(this);
1136
+ }, this.findAnotherScrollEntries = debounce(() => {
1137
+ const allScrollEntriesAbove = scrollEntries.getAll(this).reverse();
1138
+ let scrollIndex = 0;
1139
+ allScrollEntriesAbove.forEach((entry, i) => {
1140
+ entry.element === this.scrollElement && (scrollIndex = i);
1141
+ }), __privateSet(this, _anotherScrollEntries, allScrollEntriesAbove.slice(scrollIndex + 1)), this.tick();
1142
+ }, 0), __privateSet(this, _resizeListener3, () => {
1143
+ __privateGet(this, _isDisabled) || this.resize();
1144
+ }), __privateSet(this, _tickListener, () => {
1145
+ !__privateGet(this, _isDisabled) && __privateGet(this, _isResized) && this.tick();
1136
1146
  });
1137
1147
  }
1138
1148
  get distanceOffsetCSSProperty() {
1139
- return t(this, Mt);
1149
+ return __privateGet(this, _distanceOffsetCSSProperty);
1140
1150
  }
1141
1151
  get startOffsetCSSProperty() {
1142
- return t(this, Ft);
1152
+ return __privateGet(this, _startOffsetCSSProperty);
1143
1153
  }
1144
1154
  get captureOnceCSSProperty() {
1145
- return t(this, Tt);
1155
+ return __privateGet(this, _captureOnceCSSProperty);
1146
1156
  }
1147
1157
  get capturedCSSProperty() {
1148
- return t(this, I);
1158
+ return __privateGet(this, _capturedCSSProperty);
1149
1159
  }
1150
1160
  get releasedCSSProperty() {
1151
- return t(this, H);
1161
+ return __privateGet(this, _releasedCSSProperty);
1152
1162
  }
1153
1163
  get capturedFromStartCSSProperty() {
1154
- return t(this, $);
1164
+ return __privateGet(this, _capturedFromStartCSSProperty);
1155
1165
  }
1156
1166
  get capturedFromFinishCSSProperty() {
1157
- return t(this, B);
1167
+ return __privateGet(this, _capturedFromFinishCSSProperty);
1158
1168
  }
1159
1169
  get releasedFromStartCSSProperty() {
1160
- return t(this, Rt);
1170
+ return __privateGet(this, _releasedFromStartCSSProperty);
1161
1171
  }
1162
1172
  get releasedFromFinishCSSProperty() {
1163
- return t(this, k);
1173
+ return __privateGet(this, _releasedFromFinishCSSProperty);
1164
1174
  }
1165
1175
  get passedVarCSSProperty() {
1166
- return t(this, lt);
1176
+ return __privateGet(this, _passedVarCSSProperty);
1167
1177
  }
1168
1178
  get progressVarCSSProperty() {
1169
- return t(this, ct);
1179
+ return __privateGet(this, _progressVarCSSProperty);
1170
1180
  }
1171
1181
  get progressArcVarCSSProperty() {
1172
- return t(this, _);
1182
+ return __privateGet(this, _progressArcVarCSSProperty);
1173
1183
  }
1174
1184
  get progressArcMultCSSProperty() {
1175
- return t(this, Dt);
1185
+ return __privateGet(this, _progressArcMultCSSProperty);
1176
1186
  }
1177
1187
  get animationVarTypeCSSProperty() {
1178
- return t(this, ze);
1188
+ return __privateGet(this, _animationVarTypeCSSProperty);
1179
1189
  }
1180
1190
  get distanceVarCSSProperty() {
1181
- return t(this, ut);
1191
+ return __privateGet(this, _distanceVarCSSProperty);
1182
1192
  }
1183
1193
  get startVarCSSProperty() {
1184
- return t(this, at);
1194
+ return __privateGet(this, _startVarCSSProperty);
1185
1195
  }
1186
1196
  get finishVarCSSProperty() {
1187
- return t(this, dt);
1197
+ return __privateGet(this, _finishVarCSSProperty);
1188
1198
  }
1189
1199
  get disabledCSSProperty() {
1190
- return t(this, It);
1200
+ return __privateGet(this, _disabledCSSProperty2);
1191
1201
  }
1192
1202
  get dampingCSSProperty() {
1193
- return t(this, se);
1203
+ return __privateGet(this, _dampingCSSProperty2);
1194
1204
  }
1195
1205
  get massCSSProperty() {
1196
- return t(this, ie);
1206
+ return __privateGet(this, _massCSSProperty2);
1197
1207
  }
1198
1208
  get stiffnessCSSProperty() {
1199
- return t(this, re);
1209
+ return __privateGet(this, _stiffnessCSSProperty2);
1200
1210
  }
1201
1211
  get targetCSSProperty() {
1202
- return t(this, he);
1212
+ return __privateGet(this, _targetCSSProperty);
1203
1213
  }
1204
1214
  get isCaptured() {
1205
- return t(this, w);
1215
+ return __privateGet(this, _isCaptured);
1206
1216
  }
1207
1217
  get isReleased() {
1208
- return t(this, W);
1218
+ return __privateGet(this, _isReleased);
1209
1219
  }
1210
1220
  get isCapturedFromStart() {
1211
- return t(this, N);
1221
+ return __privateGet(this, _isCapturedFromStart);
1212
1222
  }
1213
1223
  get isReleasedFromStart() {
1214
- return t(this, tt);
1224
+ return __privateGet(this, _isReleasedFromStart);
1215
1225
  }
1216
1226
  get isCapturedFromFinish() {
1217
- return t(this, et);
1227
+ return __privateGet(this, _isCapturedFromFinish);
1218
1228
  }
1219
1229
  get isReleasedFromFinish() {
1220
- return t(this, Z);
1230
+ return __privateGet(this, _isReleasedFromFinish);
1221
1231
  }
1222
1232
  get directionPosition() {
1223
- return t(this, Ot);
1233
+ return __privateGet(this, _directionPosition);
1224
1234
  }
1225
1235
  get directionSize() {
1226
- return t(this, ne);
1236
+ return __privateGet(this, _directionSize);
1227
1237
  }
1228
1238
  get passed() {
1229
- return t(this, x);
1239
+ return __privateGet(this, _passed);
1230
1240
  }
1231
1241
  get progress() {
1232
- return t(this, ft);
1242
+ return __privateGet(this, _progress);
1233
1243
  }
1234
1244
  get progressArc() {
1235
- return Math.abs(Math.cos(t(this, ft) * Math.PI)) * t(this, Dt).current;
1245
+ return Math.abs(Math.cos(__privateGet(this, _progress) * Math.PI)) * __privateGet(this, _progressArcMultCSSProperty).current;
1236
1246
  }
1237
1247
  get start() {
1238
- return t(this, R);
1248
+ return __privateGet(this, _start);
1239
1249
  }
1240
1250
  get finish() {
1241
- return t(this, j);
1251
+ return __privateGet(this, _finish);
1242
1252
  }
1243
1253
  get distance() {
1244
- return t(this, M);
1254
+ return __privateGet(this, _distance2);
1245
1255
  }
1246
1256
  get isCapturedOnce() {
1247
- return t(this, Ht);
1257
+ return __privateGet(this, _isCapturedOnce);
1248
1258
  }
1249
1259
  get isDisabled() {
1250
- return t(this, y);
1260
+ return __privateGet(this, _isDisabled);
1251
1261
  }
1252
1262
  tick() {
1253
- let e = this.scrollElement.currentScrollValue;
1254
- t(this, ts).forEach((u) => {
1255
- e += u.value;
1263
+ let scrollValue = this.scrollElement.currentScrollValue;
1264
+ __privateGet(this, _anotherScrollEntries).forEach((se) => {
1265
+ scrollValue += se.value;
1256
1266
  });
1257
- const s = e - t(this, R);
1258
- t(this, oe) || r(this, oe, t(this, x).previous ? Math.abs(t(this, x).previous - s) > 1e3 : !1), t(this, x).set(s);
1259
- const h = Math.round(e);
1260
- t(this, w).current && (h >= t(this, R) ? t(this, N).current || o(this, m, si).call(this) : t(this, N).current && !t(this, tt).current && o(this, m, ri).call(this), h < t(this, j) ? t(this, Z).current && !t(this, et).current && o(this, m, ii).call(this) : t(this, N).current && !t(this, Z).current && o(this, m, hi).call(this)), h >= t(this, R) && h < t(this, j) ? t(this, w).current || o(this, m, ti).call(this) : t(this, w).current && (t(this, x).set(
1261
- mi(t(this, M) / 2, t(this, x).target, 0, t(this, M))
1262
- ), o(this, m, ei).call(this)), t(this, Ht) && t(this, Tt).current && (t(this, I).current && t(this, S).classList.add(t(this, I).current), r(this, y, !0));
1267
+ const delta = scrollValue - __privateGet(this, _start);
1268
+ __privateGet(this, _skipPassNotification) || __privateSet(this, _skipPassNotification, __privateGet(this, _passed).previous ? Math.abs(__privateGet(this, _passed).previous - delta) > 1e3 : !1), __privateGet(this, _passed).set(delta);
1269
+ const fscrollValue = Math.round(scrollValue);
1270
+ __privateGet(this, _isCaptured).current && (fscrollValue >= __privateGet(this, _start) ? __privateGet(this, _isCapturedFromStart).current || __privateMethod(this, _ScrollSegmentElement_instances, captureFromStartListener_fn).call(this) : __privateGet(this, _isCapturedFromStart).current && !__privateGet(this, _isReleasedFromStart).current && __privateMethod(this, _ScrollSegmentElement_instances, releaseFromStartListener_fn).call(this), fscrollValue < __privateGet(this, _finish) ? __privateGet(this, _isReleasedFromFinish).current && !__privateGet(this, _isCapturedFromFinish).current && __privateMethod(this, _ScrollSegmentElement_instances, captureFromFinishListener_fn).call(this) : __privateGet(this, _isCapturedFromStart).current && !__privateGet(this, _isReleasedFromFinish).current && __privateMethod(this, _ScrollSegmentElement_instances, releaseFromFinishListener_fn).call(this)), fscrollValue >= __privateGet(this, _start) && fscrollValue < __privateGet(this, _finish) ? __privateGet(this, _isCaptured).current || __privateMethod(this, _ScrollSegmentElement_instances, captureListener_fn).call(this) : __privateGet(this, _isCaptured).current && (__privateGet(this, _passed).set(
1271
+ step(__privateGet(this, _distance2) / 2, __privateGet(this, _passed).target, 0, __privateGet(this, _distance2))
1272
+ ), __privateMethod(this, _ScrollSegmentElement_instances, releaseListener_fn).call(this)), __privateGet(this, _isCapturedOnce) && __privateGet(this, _captureOnceCSSProperty).current && (__privateGet(this, _capturedCSSProperty).current && __privateGet(this, _targetElement).classList.add(__privateGet(this, _capturedCSSProperty).current), __privateSet(this, _isDisabled, !0));
1263
1273
  }
1264
1274
  disable() {
1265
- this.style.cssText = "", r(this, Ot, 0), r(this, ne, 0), t(this, x).reset(), r(this, ft, 0), r(this, R, 0), r(this, M, 0), r(this, j, 0), r(this, Ae, !1), t(this, w).current = !1, t(this, W).current = !1, t(this, N).current = !1, t(this, tt).current = !1, t(this, et).current = !1, t(this, Z).current = !1, r(this, Ht, !1), r(this, y, !0), o(this, m, Os).call(this);
1275
+ this.style.cssText = "", __privateSet(this, _directionPosition, 0), __privateSet(this, _directionSize, 0), __privateGet(this, _passed).reset(), __privateSet(this, _progress, 0), __privateSet(this, _start, 0), __privateSet(this, _distance2, 0), __privateSet(this, _finish, 0), __privateSet(this, _isResized, !1), __privateGet(this, _isCaptured).current = !1, __privateGet(this, _isReleased).current = !1, __privateGet(this, _isCapturedFromStart).current = !1, __privateGet(this, _isReleasedFromStart).current = !1, __privateGet(this, _isCapturedFromFinish).current = !1, __privateGet(this, _isReleasedFromFinish).current = !1, __privateSet(this, _isCapturedOnce, !1), __privateSet(this, _isDisabled, !0), __privateMethod(this, _ScrollSegmentElement_instances, removeCurrentMarks_fn).call(this);
1266
1276
  }
1267
1277
  enable() {
1268
- r(this, y, !1);
1278
+ __privateSet(this, _isDisabled, !1);
1269
1279
  }
1270
1280
  connectedCallback() {
1271
- super.connectedCallback(), t(this, w).subscribe((s) => {
1272
- s.current && st(this, "scrollSegmentCapture", {
1281
+ super.connectedCallback(), __privateGet(this, _isCaptured).subscribe((state) => {
1282
+ state.current && dispatchEvent(this, "scrollSegmentCapture", {
1273
1283
  composed: !0,
1274
1284
  custom: !0
1275
1285
  });
1276
- }), t(this, N).subscribe((s) => {
1277
- s.current && st(this, "scrollSegmentCaptureFromStart", {
1286
+ }), __privateGet(this, _isCapturedFromStart).subscribe((state) => {
1287
+ state.current && dispatchEvent(this, "scrollSegmentCaptureFromStart", {
1278
1288
  composed: !0,
1279
1289
  custom: !0
1280
1290
  });
1281
- }), t(this, et).subscribe((s) => {
1282
- s.current && st(this, "scrollSegmentCaptureFromFinish", {
1291
+ }), __privateGet(this, _isCapturedFromFinish).subscribe((state) => {
1292
+ state.current && dispatchEvent(this, "scrollSegmentCaptureFromFinish", {
1283
1293
  composed: !0,
1284
1294
  custom: !0
1285
1295
  });
1286
- }), t(this, W).subscribe((s) => {
1287
- s.current && st(this, "scrollSegmentRelease", {
1296
+ }), __privateGet(this, _isReleased).subscribe((state) => {
1297
+ state.current && dispatchEvent(this, "scrollSegmentRelease", {
1288
1298
  composed: !0,
1289
1299
  custom: !0
1290
1300
  });
1291
- }), t(this, tt).subscribe((s) => {
1292
- s.current && st(this, "scrollSegmentReleaseFromStart", {
1301
+ }), __privateGet(this, _isReleasedFromStart).subscribe((state) => {
1302
+ state.current && dispatchEvent(this, "scrollSegmentReleaseFromStart", {
1293
1303
  composed: !0,
1294
1304
  custom: !0
1295
1305
  });
1296
- }), t(this, Z).subscribe((s) => {
1297
- s.current && st(this, "scrollSegmentReleaseFromFinish", {
1306
+ }), __privateGet(this, _isReleasedFromFinish).subscribe((state) => {
1307
+ state.current && dispatchEvent(this, "scrollSegmentReleaseFromFinish", {
1298
1308
  composed: !0,
1299
1309
  custom: !0
1300
1310
  });
1301
- }), t(this, se).observe(), t(this, ie).observe(), t(this, re).observe(), t(this, he).observe(), t(this, It).observe(), t(this, Mt).observe(), t(this, Ft).observe(), t(this, Tt).observe(), t(this, I).observe(), t(this, H).observe(), t(this, $).observe(), t(this, B).observe(), t(this, Rt).observe(), t(this, k).observe(), t(this, lt).observe(), t(this, ct).observe(), t(this, _).observe(), t(this, Dt).observe(), t(this, ze).observe(), t(this, ut).observe(), t(this, at).observe(), t(this, dt).observe();
1302
- let e = !1;
1303
- this.findAnotherScrollEntries(), t(this, It).current || this.enable(), t(this, se).subscribe((s) => {
1304
- t(this, x).damping = s.current;
1305
- }), t(this, ie).subscribe((s) => {
1306
- t(this, x).mass = s.current;
1307
- }), t(this, re).subscribe((s) => {
1308
- t(this, x).stiffness = s.current;
1309
- }), t(this, he).subscribe((s) => {
1310
- s.previous && o(this, m, Os).call(this), s.current ? s.current === "parent" ? r(this, S, this.parentElement || this) : r(this, S, document.querySelector(s.current) || this) : r(this, S, this);
1311
- }), t(this, It).subscribe((s) => {
1312
- s.current && !s.previous ? this.disable() : !s.current && s.previous && (this.resize(), this.enable());
1313
- }), t(this, Ft).subscribe(() => {
1314
- e && !t(this, y) && this.resize();
1315
- }), t(this, Mt).subscribe(() => {
1316
- e && !t(this, y) && this.resize();
1317
- }), t(this, I).subscribe((s) => {
1318
- o(this, m, fe).call(this, s);
1319
- }), t(this, $).subscribe((s) => {
1320
- o(this, m, fe).call(this, s);
1321
- }), t(this, B).subscribe((s) => {
1322
- o(this, m, fe).call(this, s);
1323
- }), t(this, H).subscribe((s) => {
1324
- o(this, m, fe).call(this, s);
1325
- }), t(this, Rt).subscribe((s) => {
1326
- o(this, m, fe).call(this, s);
1327
- }), t(this, k).subscribe((s) => {
1328
- o(this, m, fe).call(this, s);
1329
- }), t(this, Tt).subscribe((s) => {
1330
- t(this, y) || !s.current && s.previous && (this.resize(), this.enable());
1331
- }), t(this, lt).subscribe((s) => {
1332
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
1333
- }), t(this, ct).subscribe((s) => {
1334
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, ft)));
1335
- }), t(this, _).subscribe((s) => {
1336
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, this.progressArc));
1337
- }), t(this, Dt).subscribe((s) => {
1338
- t(this, y) || o(this, m, Ds).call(this);
1339
- }), t(this, at).subscribe((s) => {
1340
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, R)));
1341
- }), t(this, dt).subscribe((s) => {
1342
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, j)));
1343
- }), t(this, ut).subscribe((s) => {
1344
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, M)));
1345
- }), t(this, x).subscribe((s) => {
1346
- if (t(this, oe)) {
1347
- r(this, oe, !1);
1311
+ }), __privateGet(this, _dampingCSSProperty2).observe(), __privateGet(this, _massCSSProperty2).observe(), __privateGet(this, _stiffnessCSSProperty2).observe(), __privateGet(this, _targetCSSProperty).observe(), __privateGet(this, _disabledCSSProperty2).observe(), __privateGet(this, _distanceOffsetCSSProperty).observe(), __privateGet(this, _startOffsetCSSProperty).observe(), __privateGet(this, _captureOnceCSSProperty).observe(), __privateGet(this, _capturedCSSProperty).observe(), __privateGet(this, _releasedCSSProperty).observe(), __privateGet(this, _capturedFromStartCSSProperty).observe(), __privateGet(this, _capturedFromFinishCSSProperty).observe(), __privateGet(this, _releasedFromStartCSSProperty).observe(), __privateGet(this, _releasedFromFinishCSSProperty).observe(), __privateGet(this, _passedVarCSSProperty).observe(), __privateGet(this, _progressVarCSSProperty).observe(), __privateGet(this, _progressArcVarCSSProperty).observe(), __privateGet(this, _progressArcMultCSSProperty).observe(), __privateGet(this, _animationVarTypeCSSProperty).observe(), __privateGet(this, _distanceVarCSSProperty).observe(), __privateGet(this, _startVarCSSProperty).observe(), __privateGet(this, _finishVarCSSProperty).observe();
1312
+ let isConnected = !1;
1313
+ this.findAnotherScrollEntries(), __privateGet(this, _disabledCSSProperty2).current || this.enable(), __privateGet(this, _dampingCSSProperty2).subscribe((e) => {
1314
+ __privateGet(this, _passed).damping = e.current;
1315
+ }), __privateGet(this, _massCSSProperty2).subscribe((e) => {
1316
+ __privateGet(this, _passed).mass = e.current;
1317
+ }), __privateGet(this, _stiffnessCSSProperty2).subscribe((e) => {
1318
+ __privateGet(this, _passed).stiffness = e.current;
1319
+ }), __privateGet(this, _targetCSSProperty).subscribe((e) => {
1320
+ e.previous && __privateMethod(this, _ScrollSegmentElement_instances, removeCurrentMarks_fn).call(this), e.current ? e.current === "parent" ? __privateSet(this, _targetElement, this.parentElement || this) : __privateSet(this, _targetElement, document.querySelector(e.current) || this) : __privateSet(this, _targetElement, this);
1321
+ }), __privateGet(this, _disabledCSSProperty2).subscribe((e) => {
1322
+ e.current && !e.previous ? this.disable() : !e.current && e.previous && (this.resize(), this.enable());
1323
+ }), __privateGet(this, _startOffsetCSSProperty).subscribe(() => {
1324
+ isConnected && !__privateGet(this, _isDisabled) && this.resize();
1325
+ }), __privateGet(this, _distanceOffsetCSSProperty).subscribe(() => {
1326
+ isConnected && !__privateGet(this, _isDisabled) && this.resize();
1327
+ }), __privateGet(this, _capturedCSSProperty).subscribe((e) => {
1328
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1329
+ }), __privateGet(this, _capturedFromStartCSSProperty).subscribe((e) => {
1330
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1331
+ }), __privateGet(this, _capturedFromFinishCSSProperty).subscribe((e) => {
1332
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1333
+ }), __privateGet(this, _releasedCSSProperty).subscribe((e) => {
1334
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1335
+ }), __privateGet(this, _releasedFromStartCSSProperty).subscribe((e) => {
1336
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1337
+ }), __privateGet(this, _releasedFromFinishCSSProperty).subscribe((e) => {
1338
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1339
+ }), __privateGet(this, _captureOnceCSSProperty).subscribe((v) => {
1340
+ __privateGet(this, _isDisabled) || !v.current && v.previous && (this.resize(), this.enable());
1341
+ }), __privateGet(this, _passedVarCSSProperty).subscribe((v) => {
1342
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, this.passed.current));
1343
+ }), __privateGet(this, _progressVarCSSProperty).subscribe((v) => {
1344
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, __privateGet(this, _progress)));
1345
+ }), __privateGet(this, _progressArcVarCSSProperty).subscribe((v) => {
1346
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, this.progressArc));
1347
+ }), __privateGet(this, _progressArcMultCSSProperty).subscribe((v) => {
1348
+ __privateGet(this, _isDisabled) || __privateMethod(this, _ScrollSegmentElement_instances, updateProgress_fn).call(this);
1349
+ }), __privateGet(this, _startVarCSSProperty).subscribe((v) => {
1350
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, __privateGet(this, _start)));
1351
+ }), __privateGet(this, _finishVarCSSProperty).subscribe((v) => {
1352
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, __privateGet(this, _finish)));
1353
+ }), __privateGet(this, _distanceVarCSSProperty).subscribe((v) => {
1354
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, __privateGet(this, _distance2)));
1355
+ }), __privateGet(this, _passed).subscribe((e) => {
1356
+ if (__privateGet(this, _skipPassNotification)) {
1357
+ __privateSet(this, _skipPassNotification, !1);
1348
1358
  return;
1349
1359
  }
1350
- o(this, m, Ds).call(this);
1360
+ __privateMethod(this, _ScrollSegmentElement_instances, updateProgress_fn).call(this);
1351
1361
  }), this.scrollElement.addEventListener(
1352
1362
  "scrollSectionsChange",
1353
1363
  this.findAnotherScrollEntries
1354
- ), this.scrollElement.addEventListener("scrollResize", this.resize), pt.subscribe(t(this, ss), Ls.SCROLL + 1), this.scrollElement.onScroll(t(this, Ie)), e = !0;
1364
+ ), this.scrollElement.addEventListener("scrollResize", this.resize), windowResizer.subscribe(__privateGet(this, _resizeListener3), RESIZE_ORDER.SCROLL + 1), this.scrollElement.onScroll(__privateGet(this, _tickListener)), isConnected = !0;
1355
1365
  }
1356
1366
  disconnectedCallback() {
1357
- pt.unsubscribe(t(this, ss)), this.scrollElement.offScroll(t(this, Ie)), this.scrollElement.removeEventListener(
1367
+ windowResizer.unsubscribe(__privateGet(this, _resizeListener3)), this.scrollElement.offScroll(__privateGet(this, _tickListener)), this.scrollElement.removeEventListener(
1358
1368
  "scrollSectionsChange",
1359
1369
  this.findAnotherScrollEntries
1360
- ), this.scrollElement.removeEventListener("scrollResize", this.resize), t(this, se).close(), t(this, ie).close(), t(this, re).close(), t(this, he).close(), t(this, It).close(), t(this, Mt).close(), t(this, Ft).close(), t(this, Tt).close(), t(this, I).close(), t(this, H).close(), t(this, $).close(), t(this, B).close(), t(this, Rt).close(), t(this, k).close(), t(this, lt).close(), t(this, ct).close(), t(this, _).close(), t(this, Dt).close(), t(this, ut).close(), t(this, at).close(), t(this, dt).close(), t(this, w).close(), t(this, W).close(), t(this, N).close(), t(this, tt).close(), t(this, et).close(), t(this, Z).close(), this.disable(), t(this, x).close();
1370
+ ), this.scrollElement.removeEventListener("scrollResize", this.resize), __privateGet(this, _dampingCSSProperty2).close(), __privateGet(this, _massCSSProperty2).close(), __privateGet(this, _stiffnessCSSProperty2).close(), __privateGet(this, _targetCSSProperty).close(), __privateGet(this, _disabledCSSProperty2).close(), __privateGet(this, _distanceOffsetCSSProperty).close(), __privateGet(this, _startOffsetCSSProperty).close(), __privateGet(this, _captureOnceCSSProperty).close(), __privateGet(this, _capturedCSSProperty).close(), __privateGet(this, _releasedCSSProperty).close(), __privateGet(this, _capturedFromStartCSSProperty).close(), __privateGet(this, _capturedFromFinishCSSProperty).close(), __privateGet(this, _releasedFromStartCSSProperty).close(), __privateGet(this, _releasedFromFinishCSSProperty).close(), __privateGet(this, _passedVarCSSProperty).close(), __privateGet(this, _progressVarCSSProperty).close(), __privateGet(this, _progressArcVarCSSProperty).close(), __privateGet(this, _progressArcMultCSSProperty).close(), __privateGet(this, _distanceVarCSSProperty).close(), __privateGet(this, _startVarCSSProperty).close(), __privateGet(this, _finishVarCSSProperty).close(), __privateGet(this, _isCaptured).close(), __privateGet(this, _isReleased).close(), __privateGet(this, _isCapturedFromStart).close(), __privateGet(this, _isReleasedFromStart).close(), __privateGet(this, _isCapturedFromFinish).close(), __privateGet(this, _isReleasedFromFinish).close(), this.disable(), __privateGet(this, _passed).close();
1361
1371
  }
1362
- removeVar(e) {
1363
- e && t(this, S).style.removeProperty(`--${e}`);
1372
+ removeVar(name) {
1373
+ name && __privateGet(this, _targetElement).style.removeProperty(`--${name}`);
1364
1374
  }
1365
- setVar(e, s) {
1366
- if (e) {
1367
- const h = typeof s == "number" ? s.toFixed(6) : s;
1368
- t(this, S).style.setProperty(`--${e}`, h);
1375
+ setVar(name, value) {
1376
+ if (name) {
1377
+ const v = typeof value == "number" ? value.toFixed(6) : value;
1378
+ __privateGet(this, _targetElement).style.setProperty(`--${name}`, v);
1369
1379
  }
1370
1380
  }
1371
1381
  getDistance() {
1372
- return t(this, ne) + t(this, es);
1382
+ return __privateGet(this, _directionSize) + __privateGet(this, _moverDirectionSize);
1373
1383
  }
1374
1384
  getStart() {
1375
- return t(this, Ot) - t(this, es);
1376
- }
1377
- }
1378
- se = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), he = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), Ft = new WeakMap(), Tt = new WeakMap(), I = new WeakMap(), H = new WeakMap(), $ = new WeakMap(), B = new WeakMap(), Rt = new WeakMap(), k = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), _ = new WeakMap(), Dt = new WeakMap(), ze = new WeakMap(), ut = new WeakMap(), at = new WeakMap(), dt = new WeakMap(), w = new WeakMap(), W = new WeakMap(), N = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Z = new WeakMap(), ts = new WeakMap(), S = new WeakMap(), Ot = new WeakMap(), ne = new WeakMap(), es = new WeakMap(), x = new WeakMap(), ft = new WeakMap(), R = new WeakMap(), M = new WeakMap(), j = new WeakMap(), Ae = new WeakMap(), Ht = new WeakMap(), y = new WeakMap(), oe = new WeakMap(), m = new WeakSet(), ti = function() {
1379
- t(this, w).current = !0, t(this, W).current = !1, r(this, Ht, !0), t(this, H).current && t(this, S).classList.remove(t(this, H).current), t(this, k).current && t(this, S).classList.remove(
1380
- t(this, k).current
1381
- ), t(this, k).current && t(this, S).classList.remove(
1382
- t(this, k).current
1383
- ), t(this, I).current && t(this, S).classList.add(t(this, I).current);
1384
- }, ei = function() {
1385
- t(this, W).current = !0, t(this, w).current = !1, r(this, Ht, !0), t(this, I).current && t(this, S).classList.remove(t(this, I).current), t(this, $).current && t(this, S).classList.remove(
1386
- t(this, $).current
1387
- ), t(this, B).current && t(this, S).classList.remove(
1388
- t(this, B).current
1389
- ), t(this, H).current && t(this, S).classList.add(t(this, H).current);
1390
- }, si = function() {
1391
- t(this, w).current = !0, t(this, N).current = !0, t(this, tt).current = !1, t(this, $).current && t(this, S).classList.add(
1392
- t(this, $).current
1385
+ return __privateGet(this, _directionPosition) - __privateGet(this, _moverDirectionSize);
1386
+ }
1387
+ };
1388
+ _dampingCSSProperty2 = new WeakMap(), _massCSSProperty2 = new WeakMap(), _stiffnessCSSProperty2 = new WeakMap(), _targetCSSProperty = new WeakMap(), _disabledCSSProperty2 = new WeakMap(), _distanceOffsetCSSProperty = new WeakMap(), _startOffsetCSSProperty = new WeakMap(), _captureOnceCSSProperty = new WeakMap(), _capturedCSSProperty = new WeakMap(), _releasedCSSProperty = new WeakMap(), _capturedFromStartCSSProperty = new WeakMap(), _capturedFromFinishCSSProperty = new WeakMap(), _releasedFromStartCSSProperty = new WeakMap(), _releasedFromFinishCSSProperty = new WeakMap(), _passedVarCSSProperty = new WeakMap(), _progressVarCSSProperty = new WeakMap(), _progressArcVarCSSProperty = new WeakMap(), _progressArcMultCSSProperty = new WeakMap(), _animationVarTypeCSSProperty = new WeakMap(), _distanceVarCSSProperty = new WeakMap(), _startVarCSSProperty = new WeakMap(), _finishVarCSSProperty = new WeakMap(), _isCaptured = new WeakMap(), _isReleased = new WeakMap(), _isCapturedFromStart = new WeakMap(), _isReleasedFromStart = new WeakMap(), _isCapturedFromFinish = new WeakMap(), _isReleasedFromFinish = new WeakMap(), _anotherScrollEntries = new WeakMap(), _targetElement = new WeakMap(), _directionPosition = new WeakMap(), _directionSize = new WeakMap(), _moverDirectionSize = new WeakMap(), _passed = new WeakMap(), _progress = new WeakMap(), _start = new WeakMap(), _distance2 = new WeakMap(), _finish = new WeakMap(), _isResized = new WeakMap(), _isCapturedOnce = new WeakMap(), _isDisabled = new WeakMap(), _skipPassNotification = new WeakMap(), _ScrollSegmentElement_instances = new WeakSet(), captureListener_fn = /* @__PURE__ */ __name(function() {
1389
+ __privateGet(this, _isCaptured).current = !0, __privateGet(this, _isReleased).current = !1, __privateSet(this, _isCapturedOnce, !0), __privateGet(this, _releasedCSSProperty).current && __privateGet(this, _targetElement).classList.remove(__privateGet(this, _releasedCSSProperty).current), __privateGet(this, _releasedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.remove(
1390
+ __privateGet(this, _releasedFromFinishCSSProperty).current
1391
+ ), __privateGet(this, _releasedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.remove(
1392
+ __privateGet(this, _releasedFromFinishCSSProperty).current
1393
+ ), __privateGet(this, _capturedCSSProperty).current && __privateGet(this, _targetElement).classList.add(__privateGet(this, _capturedCSSProperty).current);
1394
+ }, "#captureListener"), releaseListener_fn = /* @__PURE__ */ __name(function() {
1395
+ __privateGet(this, _isReleased).current = !0, __privateGet(this, _isCaptured).current = !1, __privateSet(this, _isCapturedOnce, !0), __privateGet(this, _capturedCSSProperty).current && __privateGet(this, _targetElement).classList.remove(__privateGet(this, _capturedCSSProperty).current), __privateGet(this, _capturedFromStartCSSProperty).current && __privateGet(this, _targetElement).classList.remove(
1396
+ __privateGet(this, _capturedFromStartCSSProperty).current
1397
+ ), __privateGet(this, _capturedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.remove(
1398
+ __privateGet(this, _capturedFromFinishCSSProperty).current
1399
+ ), __privateGet(this, _releasedCSSProperty).current && __privateGet(this, _targetElement).classList.add(__privateGet(this, _releasedCSSProperty).current);
1400
+ }, "#releaseListener"), captureFromStartListener_fn = /* @__PURE__ */ __name(function() {
1401
+ __privateGet(this, _isCaptured).current = !0, __privateGet(this, _isCapturedFromStart).current = !0, __privateGet(this, _isReleasedFromStart).current = !1, __privateGet(this, _capturedFromStartCSSProperty).current && __privateGet(this, _targetElement).classList.add(
1402
+ __privateGet(this, _capturedFromStartCSSProperty).current
1393
1403
  );
1394
- }, ii = function() {
1395
- t(this, w).current = !0, t(this, et).current = !0, t(this, Z).current = !1, t(this, B).current && t(this, S).classList.add(
1396
- t(this, B).current
1404
+ }, "#captureFromStartListener"), captureFromFinishListener_fn = /* @__PURE__ */ __name(function() {
1405
+ __privateGet(this, _isCaptured).current = !0, __privateGet(this, _isCapturedFromFinish).current = !0, __privateGet(this, _isReleasedFromFinish).current = !1, __privateGet(this, _capturedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.add(
1406
+ __privateGet(this, _capturedFromFinishCSSProperty).current
1397
1407
  );
1398
- }, ri = function() {
1399
- t(this, W).current = !0, t(this, tt).current = !0, t(this, N).current = !1, t(this, k).current && t(this, S).classList.add(
1400
- t(this, k).current
1408
+ }, "#captureFromFinishListener"), releaseFromStartListener_fn = /* @__PURE__ */ __name(function() {
1409
+ __privateGet(this, _isReleased).current = !0, __privateGet(this, _isReleasedFromStart).current = !0, __privateGet(this, _isCapturedFromStart).current = !1, __privateGet(this, _releasedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.add(
1410
+ __privateGet(this, _releasedFromFinishCSSProperty).current
1401
1411
  );
1402
- }, hi = function() {
1403
- t(this, W).current = !0, t(this, Z).current = !0, t(this, et).current = !1, t(this, k).current && t(this, S).classList.add(
1404
- t(this, k).current
1412
+ }, "#releaseFromStartListener"), releaseFromFinishListener_fn = /* @__PURE__ */ __name(function() {
1413
+ __privateGet(this, _isReleased).current = !0, __privateGet(this, _isReleasedFromFinish).current = !0, __privateGet(this, _isCapturedFromFinish).current = !1, __privateGet(this, _releasedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.add(
1414
+ __privateGet(this, _releasedFromFinishCSSProperty).current
1405
1415
  );
1406
- }, ss = new WeakMap(), Ie = new WeakMap(), Ds = function() {
1407
- const e = t(this, x)[t(this, ze).current];
1408
- this.setVar(t(this, lt).current, e), r(this, ft, e / t(this, M) || 0), this.setVar(t(this, ct).current, t(this, ft)), t(this, _).current && this.setVar(t(this, _).current, this.progressArc);
1409
- }, fe = function(e) {
1410
- if (t(this, y)) {
1411
- e.previous && t(this, S).classList.remove(e.previous), e.current && t(this, S).classList.remove(e.current);
1416
+ }, "#releaseFromFinishListener"), _resizeListener3 = new WeakMap(), _tickListener = new WeakMap(), updateProgress_fn = /* @__PURE__ */ __name(function() {
1417
+ const passedValue = __privateGet(this, _passed)[__privateGet(this, _animationVarTypeCSSProperty).current];
1418
+ this.setVar(__privateGet(this, _passedVarCSSProperty).current, passedValue), __privateSet(this, _progress, passedValue / __privateGet(this, _distance2) || 0), this.setVar(__privateGet(this, _progressVarCSSProperty).current, __privateGet(this, _progress)), __privateGet(this, _progressArcVarCSSProperty).current && this.setVar(__privateGet(this, _progressArcVarCSSProperty).current, this.progressArc);
1419
+ }, "#updateProgress"), handleClassSetting_fn = /* @__PURE__ */ __name(function(e) {
1420
+ if (__privateGet(this, _isDisabled)) {
1421
+ e.previous && __privateGet(this, _targetElement).classList.remove(e.previous), e.current && __privateGet(this, _targetElement).classList.remove(e.current);
1412
1422
  return;
1413
1423
  }
1414
- e.current && t(this, w).current ? (e.previous && t(this, S).classList.remove(e.previous), t(this, S).classList.add(e.current)) : !e.current && e.previous && t(this, S).classList.remove(e.previous);
1415
- }, ni = function(...e) {
1416
- e.forEach((s) => {
1417
- s && t(this, S).classList.remove(s);
1424
+ e.current && __privateGet(this, _isCaptured).current ? (e.previous && __privateGet(this, _targetElement).classList.remove(e.previous), __privateGet(this, _targetElement).classList.add(e.current)) : !e.current && e.previous && __privateGet(this, _targetElement).classList.remove(e.previous);
1425
+ }, "#handleClassSetting"), removeClasses_fn = /* @__PURE__ */ __name(function(...className) {
1426
+ className.forEach((c) => {
1427
+ c && __privateGet(this, _targetElement).classList.remove(c);
1418
1428
  });
1419
- }, oi = function(...e) {
1420
- e.forEach((s) => {
1421
- s && t(this, S).style.removeProperty(`--${s}`);
1429
+ }, "#removeClasses"), removeVars_fn = /* @__PURE__ */ __name(function(...vars) {
1430
+ vars.forEach((v) => {
1431
+ v && __privateGet(this, _targetElement).style.removeProperty(`--${v}`);
1422
1432
  });
1423
- }, Os = function() {
1424
- o(this, m, ni).call(this, t(this, I).current, t(this, $).current, t(this, B).current, t(this, H).current, t(this, Rt).current, t(this, k).current), o(this, m, oi).call(this, t(this, lt).current, t(this, ct).current, t(this, _).current, t(this, ut).current, t(this, at).current, t(this, dt).current);
1425
- };
1426
- q && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", Ti);
1427
- class Ri extends Bs {
1428
- handleClick(n) {
1433
+ }, "#removeVars"), removeCurrentMarks_fn = /* @__PURE__ */ __name(function() {
1434
+ __privateMethod(this, _ScrollSegmentElement_instances, removeClasses_fn).call(this, __privateGet(this, _capturedCSSProperty).current, __privateGet(this, _capturedFromStartCSSProperty).current, __privateGet(this, _capturedFromFinishCSSProperty).current, __privateGet(this, _releasedCSSProperty).current, __privateGet(this, _releasedFromStartCSSProperty).current, __privateGet(this, _releasedFromFinishCSSProperty).current), __privateMethod(this, _ScrollSegmentElement_instances, removeVars_fn).call(this, __privateGet(this, _passedVarCSSProperty).current, __privateGet(this, _progressVarCSSProperty).current, __privateGet(this, _progressArcVarCSSProperty).current, __privateGet(this, _distanceVarCSSProperty).current, __privateGet(this, _startVarCSSProperty).current, __privateGet(this, _finishVarCSSProperty).current);
1435
+ }, "#removeCurrentMarks"), __name(_ScrollSegmentElement, "ScrollSegmentElement");
1436
+ let ScrollSegmentElement = _ScrollSegmentElement;
1437
+ isBrowser && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", ScrollSegmentElement);
1438
+ const _ScrollSectionButtonElement = class _ScrollSectionButtonElement extends ScrollButtonElement {
1439
+ handleClick(options) {
1429
1440
  this.scrollElement.setPosition(
1430
- this.scrollElement.vertical ? ls(this) : cs(this),
1431
- n
1441
+ this.scrollElement.vertical ? getCumulativeOffsetTop(this) : getCumulativeOffsetLeft(this),
1442
+ options
1432
1443
  );
1433
1444
  }
1434
1445
  connectedCallback() {
@@ -1437,68 +1448,70 @@ class Ri extends Bs {
1437
1448
  disconnectedCallback() {
1438
1449
  super.disconnectedCallback();
1439
1450
  }
1440
- }
1441
- q && !customElements.get("e-scroll-section-button") && customElements.define("e-scroll-section-button", Ri);
1442
- var Ps;
1443
- const Ws = class Ws extends is {
1451
+ };
1452
+ __name(_ScrollSectionButtonElement, "ScrollSectionButtonElement");
1453
+ let ScrollSectionButtonElement = _ScrollSectionButtonElement;
1454
+ isBrowser && !customElements.get("e-scroll-section-button") && customElements.define("e-scroll-section-button", ScrollSectionButtonElement);
1455
+ var _counterChangeListener2;
1456
+ const _ScrollCounterElement = class _ScrollCounterElement extends ScrollUserElement {
1444
1457
  constructor() {
1445
1458
  super(...arguments);
1446
- i(this, Ps, () => {
1447
- const e = this.scrollElement.counter.current + 1, s = parseInt(this.getAttribute("pad") || "0");
1448
- this.textContent = e.toString().padStart(s, "0");
1449
- });
1459
+ __privateAdd(this, _counterChangeListener2, /* @__PURE__ */ __name(() => {
1460
+ const value = this.scrollElement.counter.current + 1, pad = parseInt(this.getAttribute("pad") || "0");
1461
+ this.textContent = value.toString().padStart(pad, "0");
1462
+ }, "#counterChangeListener"));
1450
1463
  }
1451
1464
  connectedCallback() {
1452
- return zs(this, null, function* () {
1453
- Vs(Ws.prototype, this, "connectedCallback").call(this), this.scrollElement.counter.subscribe(t(this, Ps));
1465
+ return __async(this, null, function* () {
1466
+ __superGet(_ScrollCounterElement.prototype, this, "connectedCallback").call(this), this.scrollElement.counter.subscribe(__privateGet(this, _counterChangeListener2));
1454
1467
  });
1455
1468
  }
1456
1469
  disconnectedCallback() {
1457
- this.scrollElement.counter.unsubscribe(t(this, Ps));
1470
+ this.scrollElement.counter.unsubscribe(__privateGet(this, _counterChangeListener2));
1458
1471
  }
1459
1472
  };
1460
- Ps = new WeakMap();
1461
- let Hs = Ws;
1462
- q && !customElements.get("e-scroll-counter") && customElements.define("e-scroll-counter", Hs);
1463
- var le;
1464
- const Ns = class Ns extends is {
1473
+ _counterChangeListener2 = new WeakMap(), __name(_ScrollCounterElement, "ScrollCounterElement");
1474
+ let ScrollCounterElement = _ScrollCounterElement;
1475
+ isBrowser && !customElements.get("e-scroll-counter") && customElements.define("e-scroll-counter", ScrollCounterElement);
1476
+ var _sectionsChangeListener2;
1477
+ const _ScrollTotalElement = class _ScrollTotalElement extends ScrollUserElement {
1465
1478
  constructor() {
1466
1479
  super(...arguments);
1467
- i(this, le, () => {
1468
- const e = this.scrollElement.limit + 1, s = parseInt(this.getAttribute("pad") || "0");
1469
- this.textContent = e.toString().padStart(s, "0");
1470
- });
1480
+ __privateAdd(this, _sectionsChangeListener2, /* @__PURE__ */ __name(() => {
1481
+ const value = this.scrollElement.limit + 1, pad = parseInt(this.getAttribute("pad") || "0");
1482
+ this.textContent = value.toString().padStart(pad, "0");
1483
+ }, "#sectionsChangeListener"));
1471
1484
  }
1472
1485
  connectedCallback() {
1473
- return zs(this, null, function* () {
1474
- Vs(Ns.prototype, this, "connectedCallback").call(this), this.scrollElement.sectionsInViewCSSProperty.subscribe(
1475
- t(this, le)
1486
+ return __async(this, null, function* () {
1487
+ __superGet(_ScrollTotalElement.prototype, this, "connectedCallback").call(this), this.scrollElement.sectionsInViewCSSProperty.subscribe(
1488
+ __privateGet(this, _sectionsChangeListener2)
1476
1489
  ), this.scrollElement.addEventListener(
1477
1490
  "scrollSectionsChange",
1478
- t(this, le)
1479
- ), t(this, le).call(this);
1491
+ __privateGet(this, _sectionsChangeListener2)
1492
+ ), __privateGet(this, _sectionsChangeListener2).call(this);
1480
1493
  });
1481
1494
  }
1482
1495
  disconnectedCallback() {
1483
1496
  this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
1484
- t(this, le)
1497
+ __privateGet(this, _sectionsChangeListener2)
1485
1498
  ), this.scrollElement.removeEventListener(
1486
1499
  "scrollSectionsChange",
1487
- t(this, le)
1500
+ __privateGet(this, _sectionsChangeListener2)
1488
1501
  );
1489
1502
  }
1490
1503
  };
1491
- le = new WeakMap();
1492
- let $s = Ns;
1493
- q && !customElements.get("e-scroll-total") && customElements.define("e-scroll-total", $s);
1504
+ _sectionsChangeListener2 = new WeakMap(), __name(_ScrollTotalElement, "ScrollTotalElement");
1505
+ let ScrollTotalElement = _ScrollTotalElement;
1506
+ isBrowser && !customElements.get("e-scroll-total") && customElements.define("e-scroll-total", ScrollTotalElement);
1494
1507
  export {
1495
- Fi as ScrollBulletButtonsElement,
1496
- Hs as ScrollCounterElement,
1497
- As as ScrollElement,
1498
- zi as ScrollScrollbarElement,
1499
- Ri as ScrollSectionButtonElement,
1500
- Ti as ScrollSegmentElement,
1501
- Ai as ScrollSetButtonElement,
1502
- Ii as ScrollStepButtonElement,
1503
- $s as ScrollTotalElement
1508
+ ScrollBulletButtonsElement,
1509
+ ScrollCounterElement,
1510
+ ScrollElement,
1511
+ ScrollScrollbarElement,
1512
+ ScrollSectionButtonElement,
1513
+ ScrollSegmentElement,
1514
+ ScrollSetButtonElement,
1515
+ ScrollStepButtonElement,
1516
+ ScrollTotalElement
1504
1517
  };