aptechka 0.41.6 → 0.42.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 (181) hide show
  1. package/lib/Animation-CMiBKrwE.cjs +1 -0
  2. package/lib/{Animation-CSexZn4M.js → Animation-DPRlQfW2.js} +1 -1
  3. package/lib/{Damped-BMr6Toib.cjs → Damped-CHZ314Rn.cjs} +1 -1
  4. package/lib/{Damped-Bcngr1kp.js → Damped-DxylD27S.js} +1 -1
  5. package/lib/{Tweened-D-vlLZdS.cjs → Tweened-Dn6CMA-p.cjs} +1 -1
  6. package/lib/{Tweened-sqOQu9Gf.js → Tweened-p5hYr6lL.js} +2 -2
  7. package/lib/animation/Animation.d.ts +2 -2
  8. package/lib/animation/Damped.d.ts +1 -1
  9. package/lib/animation/Tweened.d.ts +1 -1
  10. package/lib/animation/index.cjs +1 -1
  11. package/lib/animation/index.js +3 -3
  12. package/lib/attribute/index.d.ts +1 -1
  13. package/lib/attribute/index.js +1 -1
  14. package/lib/canvas/index.cjs +1 -1
  15. package/lib/canvas/index.js +2 -2
  16. package/lib/class-linked-status/index.d.ts +1 -1
  17. package/lib/connector/index.cjs +1 -1
  18. package/lib/connector/index.js +1 -1
  19. package/lib/controls/AutoplayControls.d.ts +1 -1
  20. package/lib/controls/index.cjs +1 -1
  21. package/lib/controls/index.js +4 -4
  22. package/lib/css-property/index.cjs +1 -1
  23. package/lib/css-property/index.d.ts +1 -1
  24. package/lib/css-property/index.js +2 -2
  25. package/lib/custom-scrollbar/index.cjs +1 -0
  26. package/lib/custom-scrollbar/index.d.ts +13 -0
  27. package/lib/custom-scrollbar/index.js +60 -0
  28. package/lib/dev/index.cjs +1 -1
  29. package/lib/dev/index.js +1 -1
  30. package/lib/device/Viewport.d.ts +1 -1
  31. package/lib/device/index.cjs +1 -1
  32. package/lib/device/index.js +1 -1
  33. package/lib/{dom-0S_WDL4g.js → dom-CVWzyXPH.js} +2 -2
  34. package/lib/{easings-BEmRlrDd.js → easings-Bni3YAAW.js} +15 -15
  35. package/lib/element-resizer/index.cjs +1 -0
  36. package/lib/element-resizer/{vanilla/index.d.ts → index.d.ts} +1 -1
  37. package/lib/element-resizer/{vanilla/index.js → index.js} +2 -2
  38. package/lib/en3/index.cjs +1 -1
  39. package/lib/en3/index.js +3 -3
  40. package/lib/iframe/index.cjs +1 -0
  41. package/lib/iframe/index.js +38 -0
  42. package/lib/image/index.cjs +1 -0
  43. package/lib/image/index.js +20 -0
  44. package/lib/intersector/index.cjs +1 -0
  45. package/lib/intersector/{vanilla/index.d.ts → index.d.ts} +1 -1
  46. package/lib/intersector/{vanilla/index.js → index.js} +2 -2
  47. package/lib/ladder/index.d.ts +1 -1
  48. package/lib/layout-Ctc2p3uz.cjs +1 -0
  49. package/lib/layout-DpZo-I0y.js +29 -0
  50. package/lib/layout-box/index.cjs +1 -1
  51. package/lib/layout-box/index.d.ts +1 -1
  52. package/lib/layout-box/index.js +5 -5
  53. package/lib/masonry-layout/index.cjs +1 -0
  54. package/lib/masonry-layout/index.d.ts +11 -0
  55. package/lib/masonry-layout/index.js +60 -0
  56. package/lib/media/index.cjs +1 -1
  57. package/lib/media/index.d.ts +1 -1
  58. package/lib/media/index.js +1 -1
  59. package/lib/morph/index.cjs +1 -1
  60. package/lib/morph/index.js +68 -68
  61. package/lib/need_redo_tweaker/TweakerBooleanManagerElement.d.ts +1 -1
  62. package/lib/need_redo_tweaker/TweakerColorManagerElement.d.ts +1 -1
  63. package/lib/need_redo_tweaker/TweakerElement.d.ts +1 -1
  64. package/lib/need_redo_tweaker/TweakerFieldElement.d.ts +1 -1
  65. package/lib/need_redo_tweaker/TweakerFolderElement.d.ts +1 -1
  66. package/lib/need_redo_tweaker/TweakerLinkManagerElement.d.ts +1 -1
  67. package/lib/need_redo_tweaker/TweakerNumberManagerElement.d.ts +1 -1
  68. package/lib/need_redo_tweaker/TweakerSelectManagerElement.d.ts +1 -1
  69. package/lib/need_redo_tweaker/TweakerStoreManagerElement.d.ts +1 -1
  70. package/lib/need_redo_tweaker/TweakerStringManagerElement.d.ts +1 -1
  71. package/lib/need_redo_tweaker/element-constructor/ElementConstructor.d.ts +1 -1
  72. package/lib/need_redo_tweaker/index.cjs +1 -1
  73. package/lib/need_redo_tweaker/index.js +2 -2
  74. package/lib/pointer/index.cjs +1 -1
  75. package/lib/pointer/index.js +5 -5
  76. package/lib/popover/PopoverElement.d.ts +1 -1
  77. package/lib/popover/index.cjs +1 -1
  78. package/lib/popover/index.js +1 -1
  79. package/lib/scroll/{vanilla/ScrollElement.d.ts → ScrollElement.d.ts} +4 -4
  80. package/lib/scroll/{vanilla/ScrollSegmentElement.d.ts → ScrollSegmentElement.d.ts} +1 -1
  81. package/lib/scroll/index.cjs +1 -0
  82. package/lib/scroll/{vanilla/index.js → index.js} +50 -50
  83. package/lib/scroll-entries/index.js +1 -1
  84. package/lib/scroll-segment/index.cjs +1 -1
  85. package/lib/scroll-segment/index.d.ts +1 -1
  86. package/lib/scroll-segment/index.js +4 -4
  87. package/lib/sequence/index.cjs +1 -0
  88. package/lib/{media-elements/sequence → sequence}/index.d.ts +2 -3
  89. package/lib/sequence/index.js +158 -0
  90. package/lib/size-element/index.cjs +1 -0
  91. package/lib/size-element/index.d.ts +10 -0
  92. package/lib/size-element/index.js +32 -0
  93. package/lib/{media-elements/source/index.d.ts → source/SourceElement.d.ts} +3 -3
  94. package/lib/source/SourceManager.d.ts +1 -1
  95. package/lib/source/index.cjs +5 -1
  96. package/lib/source/index.d.ts +1 -0
  97. package/lib/source/index.js +173 -67
  98. package/lib/store/index.cjs +1 -0
  99. package/lib/store/{vanilla/index.js → index.js} +3 -3
  100. package/lib/ticker/index.cjs +1 -0
  101. package/lib/ticker/{vanilla/index.d.ts → index.d.ts} +1 -1
  102. package/lib/ticker/{vanilla/index.js → index.js} +2 -2
  103. package/lib/utils/clipboard.d.ts +1 -0
  104. package/lib/utils/index.cjs +1 -1
  105. package/lib/utils/index.d.ts +3 -1
  106. package/lib/utils/index.js +190 -144
  107. package/lib/utils/layout.d.ts +4 -3
  108. package/lib/utils/scroll.d.ts +6 -0
  109. package/lib/utils/template.d.ts +1 -0
  110. package/lib/video/index.cjs +1 -0
  111. package/lib/video/index.js +54 -0
  112. package/lib/window-resizer/index.cjs +1 -0
  113. package/lib/window-resizer/{vanilla/index.d.ts → index.d.ts} +1 -1
  114. package/lib/window-resizer/{vanilla/index.js → index.js} +3 -3
  115. package/lib/youtube/index.cjs +1 -0
  116. package/lib/youtube/index.js +81 -0
  117. package/package.json +101 -99
  118. package/lib/Animation-esZH7swx.cjs +0 -1
  119. package/lib/element-resizer/react/index.cjs +0 -1
  120. package/lib/element-resizer/react/index.d.ts +0 -2
  121. package/lib/element-resizer/react/index.js +0 -8
  122. package/lib/element-resizer/vanilla/index.cjs +0 -1
  123. package/lib/intersector/react/index.cjs +0 -1
  124. package/lib/intersector/react/index.d.ts +0 -4
  125. package/lib/intersector/react/index.js +0 -12
  126. package/lib/intersector/vanilla/index.cjs +0 -1
  127. package/lib/layout-8ryRAMGJ.cjs +0 -1
  128. package/lib/layout-HoBT_Da2.js +0 -12
  129. package/lib/media-elements/index.cjs +0 -5
  130. package/lib/media-elements/index.d.ts +0 -6
  131. package/lib/media-elements/index.js +0 -416
  132. package/lib/scroll/react/Scroll.d.ts +0 -13
  133. package/lib/scroll/react/ScrollBulletButtons.d.ts +0 -11
  134. package/lib/scroll/react/ScrollSegment.d.ts +0 -18
  135. package/lib/scroll/react/ScrollSetButton.d.ts +0 -14
  136. package/lib/scroll/react/ScrollStepButton.d.ts +0 -14
  137. package/lib/scroll/react/Scrollbar.d.ts +0 -11
  138. package/lib/scroll/react/index.cjs +0 -30
  139. package/lib/scroll/react/index.d.ts +0 -6
  140. package/lib/scroll/react/index.js +0 -761
  141. package/lib/scroll/vanilla/index.cjs +0 -1
  142. package/lib/store/react/index.cjs +0 -1
  143. package/lib/store/react/index.d.ts +0 -1
  144. package/lib/store/react/index.js +0 -14
  145. package/lib/store/react/useStore.d.ts +0 -2
  146. package/lib/store/vanilla/index.cjs +0 -1
  147. package/lib/studio/Outliner/File/index.d.ts +0 -8
  148. package/lib/studio/Outliner/Folder/index.d.ts +0 -9
  149. package/lib/studio/Outliner/index.d.ts +0 -2
  150. package/lib/studio/Studio/index.d.ts +0 -2
  151. package/lib/studio/Tweaker/index.d.ts +0 -4
  152. package/lib/studio/index.d.ts +0 -1
  153. package/lib/studio/store.d.ts +0 -2
  154. package/lib/ticker/react/index.cjs +0 -1
  155. package/lib/ticker/react/index.d.ts +0 -5
  156. package/lib/ticker/react/index.js +0 -19
  157. package/lib/ticker/vanilla/index.cjs +0 -1
  158. package/lib/utils/ts-react-utility.d.ts +0 -12
  159. package/lib/window-resizer/react/index.cjs +0 -1
  160. package/lib/window-resizer/react/index.d.ts +0 -2
  161. package/lib/window-resizer/react/index.js +0 -8
  162. package/lib/window-resizer/vanilla/index.cjs +0 -1
  163. /package/lib/{media-elements/iframe → iframe}/index.d.ts +0 -0
  164. /package/lib/{media-elements/image → image}/index.d.ts +0 -0
  165. /package/lib/scroll/{vanilla/ScrollBulletButtonsElement.d.ts → ScrollBulletButtonsElement.d.ts} +0 -0
  166. /package/lib/scroll/{vanilla/ScrollButtonElement.d.ts → ScrollButtonElement.d.ts} +0 -0
  167. /package/lib/scroll/{vanilla/ScrollSection.d.ts → ScrollSection.d.ts} +0 -0
  168. /package/lib/scroll/{vanilla/ScrollSetButtonElement.d.ts → ScrollSetButtonElement.d.ts} +0 -0
  169. /package/lib/scroll/{vanilla/ScrollStepButtonElement.d.ts → ScrollStepButtonElement.d.ts} +0 -0
  170. /package/lib/scroll/{vanilla/ScrollUserElement.d.ts → ScrollUserElement.d.ts} +0 -0
  171. /package/lib/scroll/{vanilla/ScrollbarElement.d.ts → ScrollbarElement.d.ts} +0 -0
  172. /package/lib/scroll/{vanilla/index.d.ts → index.d.ts} +0 -0
  173. /package/lib/store/{vanilla/Composed.d.ts → Composed.d.ts} +0 -0
  174. /package/lib/store/{vanilla/Derived.d.ts → Derived.d.ts} +0 -0
  175. /package/lib/store/{vanilla/DerivedArray.d.ts → DerivedArray.d.ts} +0 -0
  176. /package/lib/store/{vanilla/Resource.d.ts → Resource.d.ts} +0 -0
  177. /package/lib/store/{vanilla/Store.d.ts → Store.d.ts} +0 -0
  178. /package/lib/store/{vanilla/StoreRegistry.d.ts → StoreRegistry.d.ts} +0 -0
  179. /package/lib/store/{vanilla/index.d.ts → index.d.ts} +0 -0
  180. /package/lib/{media-elements/video → video}/index.d.ts +0 -0
  181. /package/lib/{media-elements/youtube → youtube}/index.d.ts +0 -0
@@ -14,29 +14,29 @@ var Ee = (a, h, e) => h in a ? Me(a, h, { enumerable: !0, configurable: !0, writ
14
14
  };
15
15
  var de = (a, h, e) => h.has(a) || xe("Cannot " + e);
16
16
  var t = (a, h, e) => (de(a, h, "read from private field"), e ? e.call(a) : h.get(a)), s = (a, h, e) => h.has(a) ? xe("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(a) : h.set(a, e), r = (a, h, e, i) => (de(a, h, "write to private field"), i ? i.call(a, e) : h.set(a, e), e), c = (a, h, e) => (de(a, h, "access private method"), e);
17
- import { S as Re } from "../../Store-Cm3LPXlx.js";
18
- import { i as ae } from "../../browser-0zX67oeU.js";
19
- import { q as He } from "../../easings-BEmRlrDd.js";
20
- import { d as he } from "../../events-CsVF98U6.js";
21
- import { c as ke } from "../../jss-CjccJC-K.js";
22
- import { a as pe, g as fe } from "../../layout-HoBT_Da2.js";
23
- import { c as ze } from "../../math-BOBiC4TN.js";
24
- import { l as Be } from "../../polyfills-CxfUK5OU.js";
25
- import "../../ticker/vanilla/index.js";
26
- import { TICK_ORDER as We, RESIZE_ORDER as me } from "../../order/index.js";
27
- import { D as Fe } from "../../Damped-Bcngr1kp.js";
28
- import { T as $e } from "../../Tweened-sqOQu9Gf.js";
29
- import { WheelControls as qe, KeyboardControls as Ne, DragControls as Ue, AutoplayControls as Ge } from "../../controls/index.js";
30
- import { windowResizer as kt } from "../../window-resizer/vanilla/index.js";
31
- import { scrollEntries as bt } from "../../scroll-entries/index.js";
32
- import { cssUnitParser as Le } from "../../css-unit-parser/index.js";
33
- import { CSSProperty as p } from "../../css-property/index.js";
34
- import { device as Ke } from "../../device/index.js";
35
- import { elementResizer as Zt } from "../../element-resizer/vanilla/index.js";
36
- import { s as _e } from "../../gestures-D2Fdra_G.js";
37
- import { f as Ie } from "../../dom-0S_WDL4g.js";
38
- import { d as Ze } from "../../function-C10DGppn.js";
39
- import { ScrollSegmentElement as je } from "../../scroll-segment/index.js";
17
+ import { S as Re } from "../Store-Cm3LPXlx.js";
18
+ import { i as ae } from "../browser-0zX67oeU.js";
19
+ import { a as He } from "../easings-Bni3YAAW.js";
20
+ import { d as he } from "../events-CsVF98U6.js";
21
+ import { c as ke } from "../jss-CjccJC-K.js";
22
+ import { a as pe, g as fe } from "../layout-DpZo-I0y.js";
23
+ import { c as ze } from "../math-BOBiC4TN.js";
24
+ import { l as Be } from "../polyfills-CxfUK5OU.js";
25
+ import "../ticker/index.js";
26
+ import { TICK_ORDER as We, RESIZE_ORDER as me } from "../order/index.js";
27
+ import { D as Fe } from "../Damped-DxylD27S.js";
28
+ import { T as $e } from "../Tweened-p5hYr6lL.js";
29
+ import { WheelControls as Ne, KeyboardControls as qe, DragControls as Ue, AutoplayControls as Ge } from "../controls/index.js";
30
+ import { windowResizer as kt } from "../window-resizer/index.js";
31
+ import { scrollEntries as bt } from "../scroll-entries/index.js";
32
+ import { cssUnitParser as Le } from "../css-unit-parser/index.js";
33
+ import { CSSProperty as p } from "../css-property/index.js";
34
+ import { device as Ke } from "../device/index.js";
35
+ import { elementResizer as Zt } from "../element-resizer/index.js";
36
+ import { s as _e } from "../gestures-D2Fdra_G.js";
37
+ import { b as Ie } from "../dom-CVWzyXPH.js";
38
+ import { d as Ze } from "../function-C10DGppn.js";
39
+ import { ScrollSegmentElement as je } from "../scroll-segment/index.js";
40
40
  var b, Jt, g, St, H, J;
41
41
  class Je {
42
42
  constructor(h, e, i) {
@@ -129,7 +129,7 @@ const Qe = ke({
129
129
  flexShrink: "0"
130
130
  }
131
131
  });
132
- var u, gt, P, Q, B, W, F, D, X, Y, $, tt, vt, T, y, yt, Ct, wt, Et, zt, A, xt, et, M, st, q, it, Pt, rt, nt, ht, f, It, l, Qt, Xt, v, S, k, V, ot, O, w, E, At, lt, N, U, ct, Dt, at, G, Tt, R, x, o, be, _t, Lt, oe, le, Se, ge, z, Mt, Ae, Vt, Yt, ve, ye, mt, ce, te;
132
+ var u, gt, P, Q, B, W, F, D, X, Y, $, tt, vt, T, y, yt, Ct, wt, Et, zt, A, xt, et, M, st, N, it, Pt, rt, nt, ht, f, It, l, Qt, Xt, v, S, k, V, ot, O, w, E, At, lt, q, U, ct, Dt, at, G, Tt, R, x, o, be, _t, Lt, oe, le, Se, ge, z, Mt, Ae, Vt, Yt, ve, ye, mt, ce, te;
133
133
  class jt extends HTMLElement {
134
134
  constructor() {
135
135
  super();
@@ -193,7 +193,7 @@ class jt extends HTMLElement {
193
193
  "--current-index-start-offset",
194
194
  0
195
195
  ));
196
- s(this, q, new p(
196
+ s(this, N, new p(
197
197
  this,
198
198
  "--current-index-end-offset",
199
199
  0
@@ -222,7 +222,7 @@ class jt extends HTMLElement {
222
222
  s(this, E, new Re(0));
223
223
  s(this, At, 0);
224
224
  s(this, lt, 0);
225
- s(this, N, !1);
225
+ s(this, q, !1);
226
226
  s(this, U, !0);
227
227
  s(this, ct, !0);
228
228
  s(this, Dt);
@@ -275,10 +275,10 @@ class jt extends HTMLElement {
275
275
  t(this, u).set(e * t(this, S), {
276
276
  equalize: !0
277
277
  });
278
- r(this, N, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, N)), t(this, N) ? t(this, rt).current || c(this, o, le).call(this) : c(this, o, oe).call(this), t(this, Mt).call(this);
278
+ r(this, q, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, q)), t(this, q) ? t(this, rt).current || c(this, o, le).call(this) : c(this, o, oe).call(this), t(this, Mt).call(this);
279
279
  });
280
280
  s(this, Mt, () => {
281
- if (!t(this, N) || t(this, ct) || t(this, U))
281
+ if (!t(this, q) || t(this, ct) || t(this, U))
282
282
  return;
283
283
  const e = this.currentScrollValue;
284
284
  if (r(this, At, Math.max(0, e - t(this, S))), t(this, l).length) {
@@ -415,7 +415,7 @@ class jt extends HTMLElement {
415
415
  return t(this, st);
416
416
  }
417
417
  get currentIndexEndOffsetCSSProperty() {
418
- return t(this, q);
418
+ return t(this, N);
419
419
  }
420
420
  get focusDelayCSSProperty() {
421
421
  return t(this, it);
@@ -474,7 +474,7 @@ class jt extends HTMLElement {
474
474
  return t(this, y).current ? t(this, lt) + t(this, k) : t(this, lt);
475
475
  }
476
476
  get hasOverflow() {
477
- return t(this, N);
477
+ return t(this, q);
478
478
  }
479
479
  get overscroll() {
480
480
  return t(this, At);
@@ -543,7 +543,7 @@ class jt extends HTMLElement {
543
543
  damping: 0.01,
544
544
  min: 0,
545
545
  order: We.SCROLL
546
- })), this.setAttribute("tabindex", "0"), r(this, V, new qe({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, Vt)), r(this, ot, new Ne({
546
+ })), this.setAttribute("tabindex", "0"), r(this, V, new Ne({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, Vt)), r(this, ot, new qe({
547
547
  element: this
548
548
  })), t(this, ot).changeEvent.subscribe(
549
549
  t(this, Vt)
@@ -583,7 +583,7 @@ class jt extends HTMLElement {
583
583
  t(this, x) && c(this, o, mt).call(this);
584
584
  }), t(this, st).subscribe((e) => {
585
585
  t(this, x) && t(this, M).current && c(this, o, mt).call(this);
586
- }), t(this, q).subscribe((e) => {
586
+ }), t(this, N).subscribe((e) => {
587
587
  t(this, x) && t(this, M).current && c(this, o, mt).call(this);
588
588
  }), t(this, u).isRunning.subscribe((e) => {
589
589
  this.classList.toggle("active", e.current);
@@ -595,13 +595,13 @@ class jt extends HTMLElement {
595
595
  e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, oe).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, le).call(this));
596
596
  }), t(this, nt).subscribe((e) => {
597
597
  e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o, Se).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), c(this, o, ge).call(this));
598
- }), t(this, gt).observe(), t(this, P).observe(), t(this, Q).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, D).observe(), t(this, X).observe(), t(this, Y).observe(), t(this, $).observe(), t(this, tt).observe(), t(this, vt).observe(), t(this, T).observe(), t(this, y).observe(), t(this, yt).observe(), t(this, Ct).observe(), t(this, wt).observe(), t(this, Et).observe(), t(this, zt).observe(), t(this, A).observe(), t(this, A).observe(), t(this, xt).observe(), t(this, et).observe(), t(this, M).observe(), t(this, st).observe(), t(this, q).observe(), t(this, it).observe(), t(this, Pt).observe(), t(this, rt).observe(), t(this, nt).observe(), kt.subscribe(t(this, te), me.LAST);
598
+ }), t(this, gt).observe(), t(this, P).observe(), t(this, Q).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, D).observe(), t(this, X).observe(), t(this, Y).observe(), t(this, $).observe(), t(this, tt).observe(), t(this, vt).observe(), t(this, T).observe(), t(this, y).observe(), t(this, yt).observe(), t(this, Ct).observe(), t(this, wt).observe(), t(this, Et).observe(), t(this, zt).observe(), t(this, A).observe(), t(this, A).observe(), t(this, xt).observe(), t(this, et).observe(), t(this, M).observe(), t(this, st).observe(), t(this, N).observe(), t(this, it).observe(), t(this, Pt).observe(), t(this, rt).observe(), t(this, nt).observe(), kt.subscribe(t(this, te), me.LAST);
599
599
  }
600
600
  disconnectedCallback() {
601
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, gt).unobserve(), t(this, P).unobserve(), t(this, Q).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, D).unobserve(), t(this, X).unobserve(), t(this, Y).unobserve(), t(this, $).unobserve(), t(this, tt).unobserve(), t(this, vt).unobserve(), t(this, T).unobserve(), t(this, y).unobserve(), t(this, yt).unobserve(), t(this, Ct).unobserve(), t(this, wt).unobserve(), t(this, Et).unobserve(), t(this, zt).unobserve(), t(this, A).unobserve(), t(this, xt).unobserve(), t(this, et).unobserve(), t(this, M).unobserve(), t(this, st).unobserve(), t(this, q).unobserve(), t(this, it).unobserve(), t(this, Pt).unobserve(), t(this, rt).unobserve(), t(this, nt).unobserve(), kt.unsubscribe(t(this, te)), c(this, o, Se).call(this);
601
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, gt).unobserve(), t(this, P).unobserve(), t(this, Q).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, D).unobserve(), t(this, X).unobserve(), t(this, Y).unobserve(), t(this, $).unobserve(), t(this, tt).unobserve(), t(this, vt).unobserve(), t(this, T).unobserve(), t(this, y).unobserve(), t(this, yt).unobserve(), t(this, Ct).unobserve(), t(this, wt).unobserve(), t(this, Et).unobserve(), t(this, zt).unobserve(), t(this, A).unobserve(), t(this, xt).unobserve(), t(this, et).unobserve(), t(this, M).unobserve(), t(this, st).unobserve(), t(this, N).unobserve(), t(this, it).unobserve(), t(this, Pt).unobserve(), t(this, rt).unobserve(), t(this, nt).unobserve(), kt.unsubscribe(t(this, te)), c(this, o, Se).call(this);
602
602
  }
603
603
  }
604
- u = new WeakMap(), gt = new WeakMap(), P = new WeakMap(), Q = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), D = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), vt = new WeakMap(), T = new WeakMap(), y = new WeakMap(), yt = new WeakMap(), Ct = new WeakMap(), wt = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), A = new WeakMap(), xt = new WeakMap(), et = new WeakMap(), M = new WeakMap(), st = new WeakMap(), q = new WeakMap(), it = new WeakMap(), Pt = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), f = new WeakMap(), It = new WeakMap(), l = new WeakMap(), Qt = new WeakMap(), Xt = new WeakMap(), v = new WeakMap(), S = new WeakMap(), k = new WeakMap(), V = new WeakMap(), ot = new WeakMap(), O = new WeakMap(), w = new WeakMap(), E = new WeakMap(), At = new WeakMap(), lt = new WeakMap(), N = new WeakMap(), U = new WeakMap(), ct = new WeakMap(), Dt = new WeakMap(), at = new WeakMap(), G = new WeakMap(), Tt = new WeakMap(), R = new WeakMap(), x = new WeakMap(), o = new WeakSet(), be = function() {
604
+ u = new WeakMap(), gt = new WeakMap(), P = new WeakMap(), Q = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), D = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), vt = new WeakMap(), T = new WeakMap(), y = new WeakMap(), yt = new WeakMap(), Ct = new WeakMap(), wt = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), A = new WeakMap(), xt = new WeakMap(), et = new WeakMap(), M = new WeakMap(), st = new WeakMap(), N = new WeakMap(), it = new WeakMap(), Pt = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), f = new WeakMap(), It = new WeakMap(), l = new WeakMap(), Qt = new WeakMap(), Xt = new WeakMap(), v = new WeakMap(), S = new WeakMap(), k = new WeakMap(), V = new WeakMap(), ot = new WeakMap(), O = new WeakMap(), w = new WeakMap(), E = new WeakMap(), At = new WeakMap(), lt = new WeakMap(), q = new WeakMap(), U = new WeakMap(), ct = new WeakMap(), Dt = new WeakMap(), at = new WeakMap(), G = new WeakMap(), Tt = new WeakMap(), R = new WeakMap(), x = new WeakMap(), o = new WeakSet(), be = function() {
605
605
  const e = t(this, P).current, i = t(this, Q).current ? "-reverse" : "";
606
606
  t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, tt).current ? "max" : e, t(this, ot).dimension = e === "x" ? "width" : "height", t(this, O).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, x) && t(this, z).call(this);
607
607
  }, _t = function() {
@@ -619,7 +619,7 @@ u = new WeakMap(), gt = new WeakMap(), P = new WeakMap(), Q = new WeakMap(), B =
619
619
  composed: !0
620
620
  });
621
621
  }, oe = function() {
622
- t(this, U) || (r(this, U, !0), t(this, u).unsubscribe(t(this, Mt)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Dt)), clearInterval(t(this, at)), t(this, G).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, ot).disconnect(), t(this, O).disconnect(), t(this, w).disconnect(), t(this, N) || this.sections.forEach((e) => {
622
+ t(this, U) || (r(this, U, !0), t(this, u).unsubscribe(t(this, Mt)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Dt)), clearInterval(t(this, at)), t(this, G).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, ot).disconnect(), t(this, O).disconnect(), t(this, w).disconnect(), t(this, q) || this.sections.forEach((e) => {
623
623
  e.unsetTransform();
624
624
  }));
625
625
  }, le = function() {
@@ -649,9 +649,9 @@ u = new WeakMap(), gt = new WeakMap(), P = new WeakMap(), Q = new WeakMap(), B =
649
649
  detail: { line: t(this, R) }
650
650
  }), t(this, M).current) {
651
651
  this.classList.remove("end", "start"), t(this, R) && this.classList.add(t(this, R));
652
- const i = t(this, T).current + t(this, q).current;
652
+ const i = t(this, T).current + t(this, N).current;
653
653
  t(this, l).forEach((n, d) => {
654
- const m = e - this.limit - 1 + t(this, q).current, C = e + i, I = this.sections.length - C;
654
+ const m = e - this.limit - 1 + t(this, N).current, C = e + i, I = this.sections.length - C;
655
655
  d >= e && d < C || d <= m ? n.mark("current") : d >= C && d < C + I / 2 || d <= m + i ? n.mark("next") : n.mark("previous");
656
656
  });
657
657
  }
@@ -811,12 +811,12 @@ class Ye extends De {
811
811
  }
812
812
  $t = new WeakMap();
813
813
  customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", Ye);
814
- var Z, qt;
814
+ var Z, Nt;
815
815
  class ts extends De {
816
816
  constructor() {
817
817
  super(...arguments);
818
818
  s(this, Z, new p(this, "--step", 1));
819
- s(this, qt, () => {
819
+ s(this, Nt, () => {
820
820
  this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, Z).current > 0 && this.scrollElement.scrollLine === "end" || t(this, Z).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
821
821
  });
822
822
  }
@@ -825,37 +825,37 @@ class ts extends De {
825
825
  }
826
826
  connectedCallback() {
827
827
  super.connectedCallback(), this.scrollElement && (t(this, Z).subscribe(() => {
828
- t(this, qt).call(this);
828
+ t(this, Nt).call(this);
829
829
  }), t(this, Z).observe(), this.scrollElement.addEventListener(
830
830
  "scrollLine",
831
- t(this, qt)
832
- ), t(this, qt).call(this));
831
+ t(this, Nt)
832
+ ), t(this, Nt).call(this));
833
833
  }
834
834
  disconnectedCallback() {
835
835
  super.disconnectedCallback(), t(this, Z).close(), this.removeAttribute("disabled");
836
836
  }
837
837
  }
838
- Z = new WeakMap(), qt = new WeakMap();
838
+ Z = new WeakMap(), Nt = new WeakMap();
839
839
  customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", ts);
840
- var j, pt, Nt, re, ne, Ut;
840
+ var j, pt, qt, re, ne, Ut;
841
841
  class es {
842
842
  constructor(h, e, i) {
843
843
  s(this, j, null);
844
844
  s(this, pt, null);
845
- s(this, Nt, null);
845
+ s(this, qt, null);
846
846
  s(this, re, null);
847
847
  s(this, ne, () => {
848
- t(this, pt).scrollToSection(t(this, Nt), {
848
+ t(this, pt).scrollToSection(t(this, qt), {
849
849
  behaviour: t(this, re)
850
850
  });
851
851
  });
852
852
  s(this, Ut, () => {
853
853
  t(this, j).classList.toggle(
854
854
  "current",
855
- t(this, pt).counter.current === t(this, Nt)
855
+ t(this, pt).counter.current === t(this, qt)
856
856
  );
857
857
  });
858
- ae && (r(this, j, document.createElement("button")), r(this, pt, h), r(this, re, i), r(this, Nt, e), t(this, j).addEventListener("click", t(this, ne)), t(this, pt).counter.subscribe(t(this, Ut)), t(this, Ut).call(this));
858
+ ae && (r(this, j, document.createElement("button")), r(this, pt, h), r(this, re, i), r(this, qt, e), t(this, j).addEventListener("click", t(this, ne)), t(this, pt).counter.subscribe(t(this, Ut)), t(this, Ut).call(this));
859
859
  }
860
860
  get element() {
861
861
  return t(this, j);
@@ -864,7 +864,7 @@ class es {
864
864
  t(this, j).removeEventListener("click", t(this, ne)), t(this, pt).counter.unsubscribe(t(this, Ut)), t(this, j).remove();
865
865
  }
866
866
  }
867
- j = new WeakMap(), pt = new WeakMap(), Nt = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), Ut = new WeakMap();
867
+ j = new WeakMap(), pt = new WeakMap(), qt = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), Ut = new WeakMap();
868
868
  var ft, Gt;
869
869
  class ss extends Ce {
870
870
  constructor() {
@@ -4,7 +4,7 @@ var f = (s) => {
4
4
  var u = (s, t, i) => t.has(s) || f("Cannot " + i);
5
5
  var e = (s, t, i) => (u(s, t, "read from private field"), i ? i.call(s) : t.get(s)), l = (s, t, i) => t.has(s) ? f("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, i);
6
6
  import { Notifier as g } from "../notifier/index.js";
7
- import { a as c } from "../dom-0S_WDL4g.js";
7
+ import { a as c } from "../dom-CVWzyXPH.js";
8
8
  var h, r, a;
9
9
  class p {
10
10
  constructor() {
@@ -1 +1 @@
1
- "use strict";var ot=a=>{throw TypeError(a)};var rt=(a,f,r)=>f.has(a)||ot("Cannot "+r);var t=(a,f,r)=>(rt(a,f,"read from private field"),r?r.call(a):f.get(a)),i=(a,f,r)=>f.has(a)?ot("Cannot add the same private member more than once"):f instanceof WeakSet?f.add(a):f.set(a,r),e=(a,f,r,s)=>(rt(a,f,"write to private field"),s?s.call(a,r):f.set(a,r),r),c=(a,f,r)=>(rt(a,f,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../css-property/index.cjs"),ut=require("../order/index.cjs"),at=require("../window-resizer/vanilla/index.cjs"),U=require("../events-KVanG9sR.cjs"),wt=require("../function-MthRj-GJ.cjs"),lt=require("../layout-8ryRAMGJ.cjs"),Ft=require("../math-GDWEqu7y.cjs"),X=require("../Store-C2J4Q87x.cjs"),Vt=require("../scroll-entries/index.cjs");require("../ticker/vanilla/index.cjs");const Et=require("../Damped-BMr6Toib.cjs");var S,j,G,K,N,T,D,_,M,d,y,g,v,A,p,R,O,B,k,z,q,l,P,w,E,L,F,Y,n,$,W,tt,m,H,C,b,V,J,I,u,h,ft,it,ht,dt,mt,bt,Ct,yt,gt,st,Q,Z,vt,Pt,nt,St;let pt=(St=class extends HTMLElement{constructor(){super();i(this,h);i(this,S);i(this,j);i(this,G);i(this,K);i(this,N);i(this,T);i(this,D);i(this,_);i(this,M);i(this,d);i(this,y);i(this,g);i(this,v);i(this,A);i(this,p);i(this,R);i(this,O);i(this,B);i(this,k);i(this,z);i(this,q);i(this,l);i(this,P);i(this,w);i(this,E);i(this,L);i(this,F);i(this,Y);i(this,n);i(this,$);i(this,W);i(this,tt);i(this,m);i(this,H);i(this,C);i(this,b);i(this,V);i(this,J);i(this,I);i(this,u);i(this,st);i(this,Q);e(this,S,null),e(this,j,new o.CSSProperty(this,"--damping",20)),e(this,G,new o.CSSProperty(this,"--mass",0)),e(this,K,new o.CSSProperty(this,"--stiffness",0)),e(this,N,new o.CSSProperty(this,"--target","")),e(this,T,new o.CSSProperty(this,"--disabled",!1)),e(this,D,new o.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,_,new o.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,M,new o.CSSProperty(this,"--capture-once",!1)),e(this,d,new o.CSSProperty(this,"--captured","")),e(this,y,new o.CSSProperty(this,"--released","")),e(this,g,new o.CSSProperty(this,"--captured-from-start","")),e(this,v,new o.CSSProperty(this,"--captured-from-finish","")),e(this,A,new o.CSSProperty(this,"--released-from-start","")),e(this,p,new o.CSSProperty(this,"--released-from-finish","")),e(this,R,new o.CSSProperty(this,"--passed-var","")),e(this,O,new o.CSSProperty(this,"--progress-var","")),e(this,B,new o.CSSProperty(this,"--animation-var-type","current")),e(this,k,new o.CSSProperty(this,"--distance-var","")),e(this,z,new o.CSSProperty(this,"--start-var","")),e(this,q,new o.CSSProperty(this,"--finish-var","")),e(this,l,new X.Store(!1)),e(this,P,new X.Store(!1)),e(this,w,new X.Store(!1)),e(this,E,new X.Store(!1)),e(this,L,new X.Store(!1)),e(this,F,new X.Store(!1)),e(this,Y,[]),e(this,n,this),e(this,$,0),e(this,W,0),e(this,tt,0),e(this,m,new Et.Damped(0,{order:ut.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,H,0),e(this,C,0),e(this,b,0),e(this,V,0),e(this,J,!1),e(this,I,!1),e(this,u,!0),this.findAnotherScrollEntries=wt.debounce(()=>{const r=Vt.scrollEntries.getAll(this).reverse();let s=0;r.forEach((x,et)=>{x.element===t(this,S)&&(s=et)}),e(this,Y,r.slice(s+1))},0),e(this,st,()=>{t(this,u)||(this.resize(),t(this,Q).call(this))}),e(this,Q,()=>{!t(this,u)&&t(this,J)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){c(this,h,ht).call(this),e(this,S,r),c(this,h,it).call(this)}get distanceOffsetCSSProperty(){return t(this,D)}get startOffsetCSSProperty(){return t(this,_)}get captureOnceCSSProperty(){return t(this,M)}get capturedCSSProperty(){return t(this,d)}get releasedCSSProperty(){return t(this,y)}get capturedFromStartCSSProperty(){return t(this,g)}get capturedFromFinishCSSProperty(){return t(this,v)}get releasedFromStartCSSProperty(){return t(this,A)}get releasedFromFinishCSSProperty(){return t(this,p)}get passedVarCSSProperty(){return t(this,R)}get progressVarCSSProperty(){return t(this,O)}get animationVarTypeCSSProperty(){return t(this,B)}get distanceVarCSSProperty(){return t(this,k)}get startVarCSSProperty(){return t(this,z)}get finishVarCSSProperty(){return t(this,q)}get disabledCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,j)}get massCSSProperty(){return t(this,G)}get stiffnessCSSProperty(){return t(this,K)}get targetCSSProperty(){return t(this,N)}get isCaptured(){return t(this,l)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,w)}get isReleasedFromStart(){return t(this,E)}get isCapturedFromFinish(){return t(this,L)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,$)}get directionSize(){return t(this,W)}get passed(){return t(this,m)}get progress(){return t(this,H)}get start(){return t(this,C)}get finish(){return t(this,V)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,I)}get isDisabled(){return t(this,u)}resize(){e(this,W,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,$,t(this,S).vertical?lt.getCumulativeOffsetTop(this,r):lt.getCumulativeOffsetLeft(this,r));const x=c(this,h,ft).call(this).reduce((et,ct)=>et+(t(this,S).vertical?ct.offsetTop:ct.offsetLeft),0);e(this,$,t(this,$)-x),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,_).current),e(this,b,t(this,b)+t(this,D).current),e(this,V,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,V)&&!t(this,l).current&&!t(this,P).current&&(t(this,l).current=!0),this.setVar(t(this,z).current,t(this,C)),this.setVar(t(this,q).current,t(this,V)),this.setVar(t(this,k).current,t(this,b)),t(this,m).max=t(this,b),e(this,J,!0)}tick(){let r=t(this,S).currentScrollValue;t(this,Y).forEach(x=>{r+=x.value}),t(this,m).set(r-t(this,C));const s=Math.round(r);t(this,l).current&&(s>=t(this,C)?t(this,w).current||c(this,h,bt).call(this):t(this,w).current&&!t(this,E).current&&c(this,h,yt).call(this),s<t(this,V)?t(this,F).current&&!t(this,L).current&&c(this,h,Ct).call(this):t(this,w).current&&!t(this,F).current&&c(this,h,gt).call(this)),s>=t(this,C)&&s<t(this,V)?t(this,l).current||c(this,h,dt).call(this):t(this,l).current&&(t(this,m).set(Ft.step(t(this,b)/2,t(this,m).target,0,t(this,b))),c(this,h,mt).call(this)),t(this,I)&&t(this,M).current&&(t(this,d).current&&t(this,n).classList.add(t(this,d).current),e(this,u,!0))}disable(){this.style.cssText="",e(this,$,0),e(this,W,0),t(this,m).reset(),e(this,H,0),e(this,C,0),e(this,b,0),e(this,V,0),e(this,J,!1),t(this,l).current=!1,t(this,P).current=!1,t(this,w).current=!1,t(this,E).current=!1,t(this,L).current=!1,t(this,F).current=!1,e(this,I,!1),e(this,u,!0),c(this,h,nt).call(this)}enable(){e(this,u,!1)}connectedCallback(){c(this,h,it).call(this)}disconnectedCallback(){c(this,h,ht).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){r&&t(this,n).style.setProperty(`--${r}`,s.toString())}getDistance(){return t(this,W)+t(this,tt)}getStart(){return t(this,$)-t(this,tt)}},S=new WeakMap,j=new WeakMap,G=new WeakMap,K=new WeakMap,N=new WeakMap,T=new WeakMap,D=new WeakMap,_=new WeakMap,M=new WeakMap,d=new WeakMap,y=new WeakMap,g=new WeakMap,v=new WeakMap,A=new WeakMap,p=new WeakMap,R=new WeakMap,O=new WeakMap,B=new WeakMap,k=new WeakMap,z=new WeakMap,q=new WeakMap,l=new WeakMap,P=new WeakMap,w=new WeakMap,E=new WeakMap,L=new WeakMap,F=new WeakMap,Y=new WeakMap,n=new WeakMap,$=new WeakMap,W=new WeakMap,tt=new WeakMap,m=new WeakMap,H=new WeakMap,C=new WeakMap,b=new WeakMap,V=new WeakMap,J=new WeakMap,I=new WeakMap,u=new WeakMap,h=new WeakSet,ft=function(){const r=[];let s=this.parentElement;for(;s;)window.getComputedStyle(s).position==="sticky"&&r.push(s),s=s.parentElement;return r},it=function(){if(!t(this,S))return;t(this,l).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,w).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,L).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,E).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,j).observe(),t(this,G).observe(),t(this,K).observe(),t(this,N).observe(),t(this,T).observe(),t(this,D).observe(),t(this,_).observe(),t(this,M).observe(),t(this,d).observe(),t(this,y).observe(),t(this,g).observe(),t(this,v).observe(),t(this,A).observe(),t(this,p).observe(),t(this,R).observe(),t(this,O).observe(),t(this,B).observe(),t(this,k).observe(),t(this,z).observe(),t(this,q).observe();let r=!1;this.findAnotherScrollEntries(),t(this,T).current||this.enable(),t(this,j).subscribe(s=>{t(this,m).damping=s.current}),t(this,G).subscribe(s=>{t(this,m).mass=s.current}),t(this,K).subscribe(s=>{t(this,m).stiffness=s.current}),t(this,N).subscribe(s=>{s.previous&&c(this,h,nt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,T).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,_).subscribe(()=>{r&&!t(this,u)&&this.resize()}),t(this,D).subscribe(()=>{r&&!t(this,u)&&this.resize()}),t(this,d).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,g).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,v).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,y).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,A).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,p).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,M).subscribe(s=>{t(this,u)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,R).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,O).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,H)))}),t(this,z).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,q).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,V)))}),t(this,k).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,m).subscribe(s=>{const x=t(this,m)[t(this,B).current];e(this,H,x/t(this,b)||0),this.setVar(t(this,R).current,x.toFixed(6)),this.setVar(t(this,O).current,t(this,H).toFixed(6))}),at.windowResizer.subscribe(t(this,st),ut.RESIZE_ORDER.SCROLL),this.scrollContainer.onScroll(t(this,Q)),r=!0},ht=function(){t(this,S)&&(at.windowResizer.unsubscribe(t(this,st)),this.scrollContainer.offScroll(t(this,Q)),t(this,j).close(),t(this,G).close(),t(this,K).close(),t(this,N).close(),t(this,T).close(),t(this,D).close(),t(this,_).close(),t(this,M).close(),t(this,d).close(),t(this,y).close(),t(this,g).close(),t(this,v).close(),t(this,A).close(),t(this,p).close(),t(this,R).close(),t(this,O).close(),t(this,k).close(),t(this,z).close(),t(this,q).close(),t(this,l).close(),t(this,P).close(),t(this,w).close(),t(this,E).close(),t(this,L).close(),t(this,F).close(),this.disable())},dt=function(){t(this,l).current=!0,t(this,P).current=!1,e(this,I,!0),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,d).current&&t(this,n).classList.add(t(this,d).current)},mt=function(){t(this,P).current=!0,t(this,l).current=!1,e(this,I,!0),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,y).current&&t(this,n).classList.add(t(this,y).current)},bt=function(){t(this,l).current=!0,t(this,w).current=!0,t(this,E).current=!1,t(this,g).current&&t(this,n).classList.add(t(this,g).current)},Ct=function(){t(this,l).current=!0,t(this,L).current=!0,t(this,F).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},yt=function(){t(this,P).current=!0,t(this,E).current=!0,t(this,w).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},gt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,L).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},st=new WeakMap,Q=new WeakMap,Z=function(r){if(t(this,u)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,l).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},vt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},Pt=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},nt=function(){c(this,h,vt).call(this,t(this,d).current,t(this,g).current,t(this,v).current,t(this,y).current,t(this,A).current,t(this,p).current),c(this,h,Pt).call(this,t(this,R).current,t(this,O).current,t(this,k).current,t(this,z).current,t(this,q).current)},St);customElements.get("scroll-segment")||customElements.define("scroll-segment",pt);exports.ScrollSegmentElement=pt;
1
+ "use strict";var ot=a=>{throw TypeError(a)};var rt=(a,f,r)=>f.has(a)||ot("Cannot "+r);var t=(a,f,r)=>(rt(a,f,"read from private field"),r?r.call(a):f.get(a)),i=(a,f,r)=>f.has(a)?ot("Cannot add the same private member more than once"):f instanceof WeakSet?f.add(a):f.set(a,r),e=(a,f,r,s)=>(rt(a,f,"write to private field"),s?s.call(a,r):f.set(a,r),r),c=(a,f,r)=>(rt(a,f,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../css-property/index.cjs"),ut=require("../order/index.cjs"),at=require("../window-resizer/index.cjs"),U=require("../events-KVanG9sR.cjs"),wt=require("../function-MthRj-GJ.cjs"),lt=require("../layout-Ctc2p3uz.cjs"),Ft=require("../math-GDWEqu7y.cjs"),X=require("../Store-C2J4Q87x.cjs"),Vt=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Et=require("../Damped-CHZ314Rn.cjs");var S,j,G,K,N,T,D,_,M,d,y,g,v,A,p,R,O,B,k,z,q,l,P,w,E,L,F,Y,n,$,W,tt,m,H,C,b,V,J,I,u,h,ft,it,ht,dt,mt,bt,Ct,yt,gt,st,Q,Z,vt,Pt,nt,St;let pt=(St=class extends HTMLElement{constructor(){super();i(this,h);i(this,S);i(this,j);i(this,G);i(this,K);i(this,N);i(this,T);i(this,D);i(this,_);i(this,M);i(this,d);i(this,y);i(this,g);i(this,v);i(this,A);i(this,p);i(this,R);i(this,O);i(this,B);i(this,k);i(this,z);i(this,q);i(this,l);i(this,P);i(this,w);i(this,E);i(this,L);i(this,F);i(this,Y);i(this,n);i(this,$);i(this,W);i(this,tt);i(this,m);i(this,H);i(this,C);i(this,b);i(this,V);i(this,J);i(this,I);i(this,u);i(this,st);i(this,Q);e(this,S,null),e(this,j,new o.CSSProperty(this,"--damping",20)),e(this,G,new o.CSSProperty(this,"--mass",0)),e(this,K,new o.CSSProperty(this,"--stiffness",0)),e(this,N,new o.CSSProperty(this,"--target","")),e(this,T,new o.CSSProperty(this,"--disabled",!1)),e(this,D,new o.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,_,new o.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,M,new o.CSSProperty(this,"--capture-once",!1)),e(this,d,new o.CSSProperty(this,"--captured","")),e(this,y,new o.CSSProperty(this,"--released","")),e(this,g,new o.CSSProperty(this,"--captured-from-start","")),e(this,v,new o.CSSProperty(this,"--captured-from-finish","")),e(this,A,new o.CSSProperty(this,"--released-from-start","")),e(this,p,new o.CSSProperty(this,"--released-from-finish","")),e(this,R,new o.CSSProperty(this,"--passed-var","")),e(this,O,new o.CSSProperty(this,"--progress-var","")),e(this,B,new o.CSSProperty(this,"--animation-var-type","current")),e(this,k,new o.CSSProperty(this,"--distance-var","")),e(this,z,new o.CSSProperty(this,"--start-var","")),e(this,q,new o.CSSProperty(this,"--finish-var","")),e(this,l,new X.Store(!1)),e(this,P,new X.Store(!1)),e(this,w,new X.Store(!1)),e(this,E,new X.Store(!1)),e(this,L,new X.Store(!1)),e(this,F,new X.Store(!1)),e(this,Y,[]),e(this,n,this),e(this,$,0),e(this,W,0),e(this,tt,0),e(this,m,new Et.Damped(0,{order:ut.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,H,0),e(this,C,0),e(this,b,0),e(this,V,0),e(this,J,!1),e(this,I,!1),e(this,u,!0),this.findAnotherScrollEntries=wt.debounce(()=>{const r=Vt.scrollEntries.getAll(this).reverse();let s=0;r.forEach((x,et)=>{x.element===t(this,S)&&(s=et)}),e(this,Y,r.slice(s+1))},0),e(this,st,()=>{t(this,u)||(this.resize(),t(this,Q).call(this))}),e(this,Q,()=>{!t(this,u)&&t(this,J)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){c(this,h,ht).call(this),e(this,S,r),c(this,h,it).call(this)}get distanceOffsetCSSProperty(){return t(this,D)}get startOffsetCSSProperty(){return t(this,_)}get captureOnceCSSProperty(){return t(this,M)}get capturedCSSProperty(){return t(this,d)}get releasedCSSProperty(){return t(this,y)}get capturedFromStartCSSProperty(){return t(this,g)}get capturedFromFinishCSSProperty(){return t(this,v)}get releasedFromStartCSSProperty(){return t(this,A)}get releasedFromFinishCSSProperty(){return t(this,p)}get passedVarCSSProperty(){return t(this,R)}get progressVarCSSProperty(){return t(this,O)}get animationVarTypeCSSProperty(){return t(this,B)}get distanceVarCSSProperty(){return t(this,k)}get startVarCSSProperty(){return t(this,z)}get finishVarCSSProperty(){return t(this,q)}get disabledCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,j)}get massCSSProperty(){return t(this,G)}get stiffnessCSSProperty(){return t(this,K)}get targetCSSProperty(){return t(this,N)}get isCaptured(){return t(this,l)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,w)}get isReleasedFromStart(){return t(this,E)}get isCapturedFromFinish(){return t(this,L)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,$)}get directionSize(){return t(this,W)}get passed(){return t(this,m)}get progress(){return t(this,H)}get start(){return t(this,C)}get finish(){return t(this,V)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,I)}get isDisabled(){return t(this,u)}resize(){e(this,W,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,$,t(this,S).vertical?lt.getCumulativeOffsetTop(this,r):lt.getCumulativeOffsetLeft(this,r));const x=c(this,h,ft).call(this).reduce((et,ct)=>et+(t(this,S).vertical?ct.offsetTop:ct.offsetLeft),0);e(this,$,t(this,$)-x),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,_).current),e(this,b,t(this,b)+t(this,D).current),e(this,V,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,V)&&!t(this,l).current&&!t(this,P).current&&(t(this,l).current=!0),this.setVar(t(this,z).current,t(this,C)),this.setVar(t(this,q).current,t(this,V)),this.setVar(t(this,k).current,t(this,b)),t(this,m).max=t(this,b),e(this,J,!0)}tick(){let r=t(this,S).currentScrollValue;t(this,Y).forEach(x=>{r+=x.value}),t(this,m).set(r-t(this,C));const s=Math.round(r);t(this,l).current&&(s>=t(this,C)?t(this,w).current||c(this,h,bt).call(this):t(this,w).current&&!t(this,E).current&&c(this,h,yt).call(this),s<t(this,V)?t(this,F).current&&!t(this,L).current&&c(this,h,Ct).call(this):t(this,w).current&&!t(this,F).current&&c(this,h,gt).call(this)),s>=t(this,C)&&s<t(this,V)?t(this,l).current||c(this,h,dt).call(this):t(this,l).current&&(t(this,m).set(Ft.step(t(this,b)/2,t(this,m).target,0,t(this,b))),c(this,h,mt).call(this)),t(this,I)&&t(this,M).current&&(t(this,d).current&&t(this,n).classList.add(t(this,d).current),e(this,u,!0))}disable(){this.style.cssText="",e(this,$,0),e(this,W,0),t(this,m).reset(),e(this,H,0),e(this,C,0),e(this,b,0),e(this,V,0),e(this,J,!1),t(this,l).current=!1,t(this,P).current=!1,t(this,w).current=!1,t(this,E).current=!1,t(this,L).current=!1,t(this,F).current=!1,e(this,I,!1),e(this,u,!0),c(this,h,nt).call(this)}enable(){e(this,u,!1)}connectedCallback(){c(this,h,it).call(this)}disconnectedCallback(){c(this,h,ht).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){r&&t(this,n).style.setProperty(`--${r}`,s.toString())}getDistance(){return t(this,W)+t(this,tt)}getStart(){return t(this,$)-t(this,tt)}},S=new WeakMap,j=new WeakMap,G=new WeakMap,K=new WeakMap,N=new WeakMap,T=new WeakMap,D=new WeakMap,_=new WeakMap,M=new WeakMap,d=new WeakMap,y=new WeakMap,g=new WeakMap,v=new WeakMap,A=new WeakMap,p=new WeakMap,R=new WeakMap,O=new WeakMap,B=new WeakMap,k=new WeakMap,z=new WeakMap,q=new WeakMap,l=new WeakMap,P=new WeakMap,w=new WeakMap,E=new WeakMap,L=new WeakMap,F=new WeakMap,Y=new WeakMap,n=new WeakMap,$=new WeakMap,W=new WeakMap,tt=new WeakMap,m=new WeakMap,H=new WeakMap,C=new WeakMap,b=new WeakMap,V=new WeakMap,J=new WeakMap,I=new WeakMap,u=new WeakMap,h=new WeakSet,ft=function(){const r=[];let s=this.parentElement;for(;s;)window.getComputedStyle(s).position==="sticky"&&r.push(s),s=s.parentElement;return r},it=function(){if(!t(this,S))return;t(this,l).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,w).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,L).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,E).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&U.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,j).observe(),t(this,G).observe(),t(this,K).observe(),t(this,N).observe(),t(this,T).observe(),t(this,D).observe(),t(this,_).observe(),t(this,M).observe(),t(this,d).observe(),t(this,y).observe(),t(this,g).observe(),t(this,v).observe(),t(this,A).observe(),t(this,p).observe(),t(this,R).observe(),t(this,O).observe(),t(this,B).observe(),t(this,k).observe(),t(this,z).observe(),t(this,q).observe();let r=!1;this.findAnotherScrollEntries(),t(this,T).current||this.enable(),t(this,j).subscribe(s=>{t(this,m).damping=s.current}),t(this,G).subscribe(s=>{t(this,m).mass=s.current}),t(this,K).subscribe(s=>{t(this,m).stiffness=s.current}),t(this,N).subscribe(s=>{s.previous&&c(this,h,nt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,T).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,_).subscribe(()=>{r&&!t(this,u)&&this.resize()}),t(this,D).subscribe(()=>{r&&!t(this,u)&&this.resize()}),t(this,d).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,g).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,v).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,y).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,A).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,p).subscribe(s=>{c(this,h,Z).call(this,s)}),t(this,M).subscribe(s=>{t(this,u)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,R).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,O).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,H)))}),t(this,z).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,q).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,V)))}),t(this,k).subscribe(s=>{t(this,u)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,m).subscribe(s=>{const x=t(this,m)[t(this,B).current];e(this,H,x/t(this,b)||0),this.setVar(t(this,R).current,x.toFixed(6)),this.setVar(t(this,O).current,t(this,H).toFixed(6))}),at.windowResizer.subscribe(t(this,st),ut.RESIZE_ORDER.SCROLL),this.scrollContainer.onScroll(t(this,Q)),r=!0},ht=function(){t(this,S)&&(at.windowResizer.unsubscribe(t(this,st)),this.scrollContainer.offScroll(t(this,Q)),t(this,j).close(),t(this,G).close(),t(this,K).close(),t(this,N).close(),t(this,T).close(),t(this,D).close(),t(this,_).close(),t(this,M).close(),t(this,d).close(),t(this,y).close(),t(this,g).close(),t(this,v).close(),t(this,A).close(),t(this,p).close(),t(this,R).close(),t(this,O).close(),t(this,k).close(),t(this,z).close(),t(this,q).close(),t(this,l).close(),t(this,P).close(),t(this,w).close(),t(this,E).close(),t(this,L).close(),t(this,F).close(),this.disable())},dt=function(){t(this,l).current=!0,t(this,P).current=!1,e(this,I,!0),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,d).current&&t(this,n).classList.add(t(this,d).current)},mt=function(){t(this,P).current=!0,t(this,l).current=!1,e(this,I,!0),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,y).current&&t(this,n).classList.add(t(this,y).current)},bt=function(){t(this,l).current=!0,t(this,w).current=!0,t(this,E).current=!1,t(this,g).current&&t(this,n).classList.add(t(this,g).current)},Ct=function(){t(this,l).current=!0,t(this,L).current=!0,t(this,F).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},yt=function(){t(this,P).current=!0,t(this,E).current=!0,t(this,w).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},gt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,L).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},st=new WeakMap,Q=new WeakMap,Z=function(r){if(t(this,u)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,l).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},vt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},Pt=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},nt=function(){c(this,h,vt).call(this,t(this,d).current,t(this,g).current,t(this,v).current,t(this,y).current,t(this,A).current,t(this,p).current),c(this,h,Pt).call(this,t(this,R).current,t(this,O).current,t(this,k).current,t(this,z).current,t(this,q).current)},St);customElements.get("scroll-segment")||customElements.define("scroll-segment",pt);exports.ScrollSegmentElement=pt;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperty } from '../css-property';
2
- import { Store } from '../store/vanilla';
2
+ import { Store } from '../store';
3
3
  import { Damped } from '../animation';
4
4
  export interface ScrollSegmentEvents {
5
5
  scrollSegmentCapture: CustomEvent;
@@ -5,15 +5,15 @@ var rt = (a, S, r) => S.has(a) || ot("Cannot " + r);
5
5
  var t = (a, S, r) => (rt(a, S, "read from private field"), r ? r.call(a) : S.get(a)), i = (a, S, r) => S.has(a) ? ot("Cannot add the same private member more than once") : S instanceof WeakSet ? S.add(a) : S.set(a, r), e = (a, S, r, s) => (rt(a, S, "write to private field"), s ? s.call(a, r) : S.set(a, r), r), c = (a, S, r) => (rt(a, S, "access private method"), r);
6
6
  import { CSSProperty as o } from "../css-property/index.js";
7
7
  import { TICK_ORDER as vt, RESIZE_ORDER as yt } from "../order/index.js";
8
- import { windowResizer as ut } from "../window-resizer/vanilla/index.js";
8
+ import { windowResizer as ut } from "../window-resizer/index.js";
9
9
  import { d as U } from "../events-CsVF98U6.js";
10
10
  import { d as Pt } from "../function-C10DGppn.js";
11
- import { a as Ft, g as Vt } from "../layout-HoBT_Da2.js";
11
+ import { a as Ft, g as Vt } from "../layout-DpZo-I0y.js";
12
12
  import { s as wt } from "../math-BOBiC4TN.js";
13
13
  import { S as X } from "../Store-Cm3LPXlx.js";
14
14
  import { scrollEntries as Lt } from "../scroll-entries/index.js";
15
- import "../ticker/vanilla/index.js";
16
- import { D as Et } from "../Damped-Bcngr1kp.js";
15
+ import "../ticker/index.js";
16
+ import { D as Et } from "../Damped-DxylD27S.js";
17
17
  var f, G, K, N, W, x, M, A, $, m, C, v, y, H, p, R, k, B, O, z, D, l, P, F, L, E, V, Y, n, I, Z, tt, d, _, g, b, w, J, q, u, h, lt, it, ht, ft, pt, St, mt, dt, bt, st, Q, j, gt, Ct, nt, at;
18
18
  let Rt = (at = class extends HTMLElement {
19
19
  constructor() {
@@ -0,0 +1 @@
1
+ "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),B=require("../browser-CpzFX2xg.cjs"),z=require("../canvas-CU5Xjahf.cjs"),H=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-C2J4Q87x.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,b,S,m,d,g,E,p,a,v;class k extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,b,new P.CSSProperty(this,"--fit","contain"));c(this,S,new P.CSSProperty(this,"--autoplay",!1));c(this,m,new P.CSSProperty(this,"--offset-x",.5));c(this,d,new P.CSSProperty(this,"--offset-y",.5));c(this,g,null);c(this,E,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,b).current==="cover"?l(this,g,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current)):l(this,g,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,g))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,E)];i&&e.detail.context.drawImage(i,...t(this,g)),t(this,S).current&&l(this,E,(t(this,E)+1)%t(this,h).length)});B.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,b).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,E,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,b).observe(),t(this,m).observe(),t(this,d).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,b).unobserve(),t(this,m).unobserve(),t(this,d).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const q=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=q,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,q)=>new Promise((C,_)=>{r.onload=()=>{C()},r.onerror=j=>{_(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,b=new WeakMap,S=new WeakMap,m=new WeakMap,d=new WeakMap,g=new WeakMap,E=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;customElements.get("e-sequence")||customElements.define("e-sequence",k);exports.SequenceElement=k;
@@ -1,6 +1,5 @@
1
- import { SourceManagerSourceSet } from '../../source';
2
- import { CanvasElement } from '../../canvas';
3
- import { SourceElement } from '../source';
1
+ import { SourceElement, SourceManagerSourceSet } from '../source';
2
+ import { CanvasElement } from '../canvas';
4
3
  export interface SequenceElementParameters {
5
4
  srcset: SourceManagerSourceSet;
6
5
  pad?: number;
@@ -0,0 +1,158 @@
1
+ var x = (s) => {
2
+ throw TypeError(s);
3
+ };
4
+ var P = (s, n, e) => n.has(s) || x("Cannot " + e);
5
+ var t = (s, n, e) => (P(s, n, "read from private field"), e ? e.call(s) : n.get(s)), h = (s, n, e) => n.has(s) ? x("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(s) : n.set(s, e), u = (s, n, e, i) => (P(s, n, "write to private field"), i ? i.call(s, e) : n.set(s, e), e);
6
+ var R = (s, n, e) => new Promise((i, p) => {
7
+ var S = (o) => {
8
+ try {
9
+ m(e.next(o));
10
+ } catch (r) {
11
+ p(r);
12
+ }
13
+ }, C = (o) => {
14
+ try {
15
+ m(e.throw(o));
16
+ } catch (r) {
17
+ p(r);
18
+ }
19
+ }, m = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(S, C);
20
+ m((e = e.apply(s, n)).next());
21
+ });
22
+ import { CSSProperty as I } from "../css-property/index.js";
23
+ import { elementResizer as k } from "../element-resizer/index.js";
24
+ import { i as z } from "../browser-0zX67oeU.js";
25
+ import { c as B, a as H } from "../canvas-DeZ0SLUJ.js";
26
+ import { SourceElement as W } from "../source/index.js";
27
+ import "../window-resizer/index.js";
28
+ import "../Store-Cm3LPXlx.js";
29
+ import { CanvasElement as A } from "../canvas/index.js";
30
+ function D(s) {
31
+ const n = s.match(/\{([\d-]+)\}/);
32
+ if (n) {
33
+ const e = n[1].split("-");
34
+ if (e.length === 2) {
35
+ const i = parseInt(e[0], 10), p = parseInt(e[1], 10);
36
+ return { start: i, end: p };
37
+ }
38
+ }
39
+ return null;
40
+ }
41
+ var c, v, g, l, d, E, b, w, a, f;
42
+ class F extends W {
43
+ constructor(e) {
44
+ super();
45
+ h(this, c, []);
46
+ h(this, v, new I(
47
+ this,
48
+ "--fit",
49
+ "contain"
50
+ ));
51
+ h(this, g, new I(this, "--autoplay", !1));
52
+ h(this, l, new I(this, "--offset-x", 0.5));
53
+ h(this, d, new I(this, "--offset-y", 0.5));
54
+ h(this, E, null);
55
+ h(this, b, 0);
56
+ h(this, w, 1);
57
+ h(this, a, () => {
58
+ if (t(this, c).length) {
59
+ const e = t(this, c)[0];
60
+ t(this, v).current === "cover" ? u(this, E, B(
61
+ e.naturalWidth,
62
+ e.naturalHeight,
63
+ this.consumerElement.width,
64
+ this.consumerElement.height,
65
+ t(this, l).current,
66
+ t(this, d).current
67
+ )) : u(this, E, H(
68
+ e.naturalWidth,
69
+ e.naturalHeight,
70
+ this.consumerElement.width,
71
+ this.consumerElement.height,
72
+ t(this, l).current,
73
+ t(this, d).current
74
+ ));
75
+ }
76
+ });
77
+ h(this, f, (e) => {
78
+ if (this.status.isFalse("loaded") || !t(this, E))
79
+ return;
80
+ e.detail.context.clearRect(0, 0, e.detail.width, e.detail.height);
81
+ const i = t(this, c)[t(this, b)];
82
+ i && e.detail.context.drawImage(i, ...t(this, E)), t(this, g).current && u(this, b, (t(this, b) + 1) % t(this, c).length);
83
+ });
84
+ z && (u(this, w, parseInt(
85
+ ((e == null ? void 0 : e.pad) || this.getAttribute("pad") || "1").toString()
86
+ )), t(this, v).subscribe(t(this, a)), t(this, l).subscribe(t(this, a)), t(this, d).subscribe(t(this, a)), this.addEventListener("sourceCapture", (i) => {
87
+ this.consumerElement.addEventListener(
88
+ "canvasRender",
89
+ t(this, f)
90
+ );
91
+ }), this.addEventListener("sourceRelease", (i) => {
92
+ this.consumerElement.removeEventListener(
93
+ "canvasRender",
94
+ t(this, f)
95
+ );
96
+ }));
97
+ }
98
+ setProgress(e) {
99
+ t(this, c).length && u(this, b, Math.floor((t(this, c).length - 1) * e));
100
+ }
101
+ connectedCallback() {
102
+ super.connectedCallback(), t(this, g).observe(), t(this, v).observe(), t(this, l).observe(), t(this, d).observe(), k.subscribe(this, t(this, a));
103
+ }
104
+ disconnectedCallback() {
105
+ super.disconnectedCallback(), t(this, g).unobserve(), t(this, v).unobserve(), t(this, l).unobserve(), t(this, d).unobserve(), u(this, c, []), k.unsubscribe(t(this, a)), this.consumerElement.removeEventListener(
106
+ "canvasRender",
107
+ t(this, f)
108
+ );
109
+ }
110
+ createConsumer() {
111
+ return new A();
112
+ }
113
+ consumeSource(e) {
114
+ return R(this, null, function* () {
115
+ var i, p, S, C;
116
+ if (e) {
117
+ this.consumerElement.removeEventListener(
118
+ "canvasRender",
119
+ t(this, f)
120
+ );
121
+ const m = [], o = D(e);
122
+ if (o)
123
+ for (let r = o.start; r <= o.end; r++) {
124
+ const L = e.replace(
125
+ /\{([^}]+)\}/,
126
+ r.toString().padStart(t(this, w), "0")
127
+ ), y = new Image();
128
+ y.src = L, m.push(y);
129
+ }
130
+ else {
131
+ const r = new Image();
132
+ r.src = e, m.push(r);
133
+ }
134
+ try {
135
+ yield Promise.all(
136
+ m.map((r, L) => new Promise((y, q) => {
137
+ r.onload = () => {
138
+ y();
139
+ }, r.onerror = (M) => {
140
+ q(`${r.src} Image not found`);
141
+ };
142
+ }))
143
+ ), u(this, c, m), t(this, a).call(this), (p = (i = this.consumerElement).onload) == null || p.call(i, new Event("load")), this.isLazy || this.consumerElement.addEventListener(
144
+ "canvasRender",
145
+ t(this, f)
146
+ );
147
+ } catch (r) {
148
+ console.error(r), (C = (S = this.consumerElement).onerror) == null || C.call(S, new Event("error"));
149
+ }
150
+ }
151
+ });
152
+ }
153
+ }
154
+ c = new WeakMap(), v = new WeakMap(), g = new WeakMap(), l = new WeakMap(), d = new WeakMap(), E = new WeakMap(), b = new WeakMap(), w = new WeakMap(), a = new WeakMap(), f = new WeakMap();
155
+ customElements.get("e-sequence") || customElements.define("e-sequence", F);
156
+ export {
157
+ F as SequenceElement
158
+ };
@@ -0,0 +1 @@
1
+ "use strict";var m=e=>{throw TypeError(e)};var c=(e,s,t)=>s.has(e)||m("Cannot "+t);var r=(e,s,t)=>(c(e,s,"read from private field"),t?t.call(e):s.get(e)),l=(e,s,t)=>s.has(e)?m("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),o=(e,s,t,h)=>(c(e,s,"write to private field"),h?h.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../element-resizer/index.cjs");var i,n;class d extends HTMLElement{constructor(){super(...arguments);l(this,i,this);l(this,n,()=>{r(this,i).style.removeProperty("--width"),r(this,i).style.removeProperty("--height"),setTimeout(()=>{const t=this.offsetWidth,h=this.offsetHeight;r(this,i).style.setProperty("--width",t+"px"),r(this,i).style.setProperty("--height",h+"px")},0)})}connectedCallback(){var h;const t=(h=this.getAttribute("target"))==null?void 0:h.trim();t&&(t==="parent"?o(this,i,this.parentElement||this):o(this,i,document.querySelector(t)||this)),y.elementResizer.subscribe(this,r(this,n))}disconnectedCallback(){y.elementResizer.unsubscribe(r(this,n)),r(this,i).style.removeProperty("--width"),r(this,i).style.removeProperty("--height")}}i=new WeakMap,n=new WeakMap;customElements.get("e-size-element")||customElements.define("e-size-element",d);exports.SizeElement=d;
@@ -0,0 +1,10 @@
1
+ export declare class SizeElement extends HTMLElement {
2
+ #private;
3
+ protected connectedCallback(): void;
4
+ protected disconnectedCallback(): void;
5
+ }
6
+ declare global {
7
+ interface HTMLElementTagNameMap {
8
+ 'e-size-element': SizeElement;
9
+ }
10
+ }
@@ -0,0 +1,32 @@
1
+ var m = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var c = (e, s, t) => s.has(e) || m("Cannot " + t);
5
+ var r = (e, s, t) => (c(e, s, "read from private field"), t ? t.call(e) : s.get(e)), n = (e, s, t) => s.has(e) ? m("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), l = (e, s, t, h) => (c(e, s, "write to private field"), h ? h.call(e, t) : s.set(e, t), t);
6
+ import { elementResizer as y } from "../element-resizer/index.js";
7
+ var i, o;
8
+ class p extends HTMLElement {
9
+ constructor() {
10
+ super(...arguments);
11
+ n(this, i, this);
12
+ n(this, o, () => {
13
+ r(this, i).style.removeProperty("--width"), r(this, i).style.removeProperty("--height"), setTimeout(() => {
14
+ const t = this.offsetWidth, h = this.offsetHeight;
15
+ r(this, i).style.setProperty("--width", t + "px"), r(this, i).style.setProperty("--height", h + "px");
16
+ }, 0);
17
+ });
18
+ }
19
+ connectedCallback() {
20
+ var h;
21
+ const t = (h = this.getAttribute("target")) == null ? void 0 : h.trim();
22
+ t && (t === "parent" ? l(this, i, this.parentElement || this) : l(this, i, document.querySelector(t) || this)), y.subscribe(this, r(this, o));
23
+ }
24
+ disconnectedCallback() {
25
+ y.unsubscribe(r(this, o)), r(this, i).style.removeProperty("--width"), r(this, i).style.removeProperty("--height");
26
+ }
27
+ }
28
+ i = new WeakMap(), o = new WeakMap();
29
+ customElements.get("e-size-element") || customElements.define("e-size-element", p);
30
+ export {
31
+ p as SizeElement
32
+ };
@@ -1,6 +1,6 @@
1
- import { SourceManager } from '../../source';
2
- import { ClassLinkedStatus } from '../../class-linked-status';
3
- import { SourceSetOptions } from '../../source/SourceSet';
1
+ import { SourceManager } from '.';
2
+ import { ClassLinkedStatus } from '../class-linked-status';
3
+ import { SourceSetOptions } from './SourceSet';
4
4
  export interface SourceEvents {
5
5
  sourceCapture: CustomEvent;
6
6
  sourceRelease: CustomEvent;
@@ -1,4 +1,4 @@
1
- import { Store } from '../store/vanilla';
1
+ import { Store } from '../store';
2
2
  import { Source } from './SourceClass';
3
3
  import { SourceSetOptions } from './SourceSet';
4
4
  export type SourceManagerSourceSet = string | Array<string>;