aptechka 0.13.1 → 0.15.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 (113) hide show
  1. package/lib/{Animation-De9aUv3b.cjs → Animation-DI864E0i.cjs} +1 -1
  2. package/lib/{Animation-NAGXiFv5.js → Animation-w6BLTCum.js} +1 -1
  3. package/lib/{Damped-DbJKrUIf.js → Damped-DEHDEq-b.js} +1 -1
  4. package/lib/{Damped-DYJ6Z0xo.cjs → Damped-ipnDc0iX.cjs} +1 -1
  5. package/lib/Store-CDb6RMce.cjs +1 -0
  6. package/lib/Store-OTdcl6SX.js +134 -0
  7. package/lib/{Tweened-BkkD9s4n.cjs → Tweened-B1TfANfR.cjs} +1 -1
  8. package/lib/{Tweened-DOSHLCZa.js → Tweened-C52xXDLY.js} +1 -1
  9. package/lib/{Viewport-Cv4TRGiv.cjs → Viewport-BDPsnAF4.cjs} +1 -1
  10. package/lib/{Viewport-B55BvLsV.js → Viewport-taEXS8Uv.js} +1 -1
  11. package/lib/animation/index.cjs +1 -1
  12. package/lib/animation/index.js +3 -3
  13. package/lib/attribute/index.cjs +1 -1
  14. package/lib/attribute/index.js +13 -13
  15. package/lib/canvas/index.cjs +1 -1
  16. package/lib/canvas/index.js +36 -39
  17. package/lib/class-linked-status/index.cjs +1 -1
  18. package/lib/class-linked-status/index.js +1 -1
  19. package/lib/controls/index.cjs +1 -1
  20. package/lib/controls/index.js +3 -3
  21. package/lib/css-property/index.cjs +1 -1
  22. package/lib/css-property/index.js +4 -4
  23. package/lib/dev/index.cjs +1 -1
  24. package/lib/dev/index.js +1 -1
  25. package/lib/device/index.cjs +1 -1
  26. package/lib/device/index.js +1 -1
  27. package/lib/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
  28. package/lib/element-constructor/index.cjs +1 -1
  29. package/lib/element-constructor/index.js +848 -122
  30. package/lib/element-resizer/index.js +8 -8
  31. package/lib/en3/index.cjs +8 -1
  32. package/lib/en3/index.js +372 -4
  33. package/lib/file-BEr-o55N.js +31 -0
  34. package/lib/file-C9BbxzVU.cjs +1 -0
  35. package/lib/image/index.cjs +1 -1
  36. package/lib/image/index.js +1 -1
  37. package/lib/intersector/index.js +7 -7
  38. package/lib/jss-CjccJC-K.js +21 -0
  39. package/lib/jss-GJLvaNfT.cjs +1 -0
  40. package/lib/ladder/index.cjs +1 -1
  41. package/lib/ladder/index.js +1 -1
  42. package/lib/layout-box/index.js +14 -14
  43. package/lib/media/index.cjs +1 -1
  44. package/lib/media/index.js +1 -1
  45. package/lib/need_redo_tweaker/index.cjs +18 -0
  46. package/lib/need_redo_tweaker/index.js +1337 -0
  47. package/lib/pointer/index.cjs +1 -1
  48. package/lib/pointer/index.js +3 -3
  49. package/lib/popover/index.cjs +1 -1
  50. package/lib/popover/index.js +68 -76
  51. package/lib/scroll/index.cjs +1 -1
  52. package/lib/scroll/index.js +577 -610
  53. package/lib/scroll-entries/index.js +15 -15
  54. package/lib/sequence/index.cjs +1 -1
  55. package/lib/sequence/index.js +1 -1
  56. package/lib/slicer/index.cjs +5 -5
  57. package/lib/slicer/index.js +55 -86
  58. package/lib/source/index.cjs +2 -2
  59. package/lib/source/index.js +154 -62
  60. package/lib/store/index.cjs +1 -1
  61. package/lib/store/index.js +71 -37
  62. package/lib/ticker/index.js +1 -1
  63. package/lib/utils/index.cjs +1 -1
  64. package/lib/utils/index.js +67 -65
  65. package/lib/video/index.cjs +1 -1
  66. package/lib/video/index.js +1 -1
  67. package/package.json +7 -72
  68. package/lib/Composed-C_4slJQ6.cjs +0 -1
  69. package/lib/Composed-CfWa-69I.js +0 -31
  70. package/lib/Derived-BIBU-y7Z.cjs +0 -1
  71. package/lib/Derived-Vo_RsJfi.js +0 -23
  72. package/lib/SourceManager-B6wZpXUZ.js +0 -104
  73. package/lib/SourceManager-CfHcGLUa.cjs +0 -1
  74. package/lib/Store-C46i0nvr.js +0 -137
  75. package/lib/Store-npaZHvX4.cjs +0 -1
  76. package/lib/accordion/index.cjs +0 -1
  77. package/lib/accordion/index.js +0 -167
  78. package/lib/checkbox/index.cjs +0 -1
  79. package/lib/checkbox/index.js +0 -112
  80. package/lib/createStylesheet-COAZH1Mw.js +0 -8
  81. package/lib/createStylesheet-Csfmh-MH.cjs +0 -1
  82. package/lib/createTheme-CHnsCgAr.js +0 -15
  83. package/lib/createTheme-Cfaw9UmV.cjs +0 -1
  84. package/lib/en3/helpers/index.cjs +0 -1
  85. package/lib/en3/helpers/index.js +0 -1870
  86. package/lib/en3/libs/index.cjs +0 -1
  87. package/lib/en3/libs/index.js +0 -200
  88. package/lib/en3/loaders/index.cjs +0 -1
  89. package/lib/en3/loaders/index.js +0 -1742
  90. package/lib/en3/misc/index.cjs +0 -10
  91. package/lib/en3/misc/index.js +0 -110
  92. package/lib/en3/utils/index.cjs +0 -1
  93. package/lib/en3/utils/index.js +0 -20
  94. package/lib/en3-C1fLmsjs.cjs +0 -8
  95. package/lib/en3-x-Ki30MY.js +0 -344
  96. package/lib/events-BGwqaxVW.cjs +0 -1
  97. package/lib/events-CJTUMSLU.js +0 -20
  98. package/lib/file-EevnUtRj.cjs +0 -1
  99. package/lib/file-lxi_oXJf.js +0 -13
  100. package/lib/index-BuAuBz2_.cjs +0 -9
  101. package/lib/index-CenF0JbH.js +0 -261
  102. package/lib/modal/index.cjs +0 -1
  103. package/lib/modal/index.js +0 -133
  104. package/lib/select/index.cjs +0 -1
  105. package/lib/select/index.js +0 -7
  106. package/lib/tags-6_ETuR75.cjs +0 -1
  107. package/lib/tags-BL3kQp9o.js +0 -833
  108. package/lib/theme/index.cjs +0 -1
  109. package/lib/theme/index.js +0 -25
  110. package/lib/traverseMaterials-CD_3_56D.cjs +0 -1
  111. package/lib/traverseMaterials-mGC2_FkG.js +0 -29
  112. package/lib/tweaker/index.cjs +0 -10
  113. package/lib/tweaker/index.js +0 -989
@@ -1 +1 @@
1
- "use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var T=i=>{throw TypeError(i)};var M=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,_=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&M(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&M(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||T("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?T("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,m)=>(k(i,s,"write to private field"),m?m.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-npaZHvX4.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),H=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const R=require("../Damped-DYJ6Z0xo.cjs"),j=require("../element-resizer/index.cjs"),B=require("../window-resizer/index.cjs"),P=require("../css-property/index.cjs");var o,a,l,d,y,u,b,x,f,w,C,p;class O{constructor(s){n(this,o);n(this,a);n(this,l);n(this,d);n(this,y);n(this,u);n(this,b,0);n(this,x,0);n(this,f,s=>{e(this,d).set(1)});n(this,w,s=>{e(this,d).set(0)});n(this,C,s=>{const t=q.getPointerPosition(s,e(this,o).getBoundingClientRect()),m={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,y)){const z=q.screenToCartesian(h,m);h.x=z.x,h.y=z.y}if(e(this,u)){const z=q.normalize(h,m);h.x=H.clamp(z.x*2,-1,1),h.y=H.clamp(z.y*2,-1,1)}e(this,a).set(h.x),e(this,l).set(h.y)});n(this,p,()=>{c(this,b,this.element.clientWidth),c(this,x,this.element.clientHeight);let s=0,t=0,m=0,h=0;e(this,y)?e(this,u)?(s=-1,t=1,m=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,m=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,u)?(s=0,t=1,m=0,h=1):(s=0,t=e(this,b),m=0,h=e(this,x)),e(this,a).min=s,e(this,a).max=t,e(this,l).min=m,e(this,l).max=h});c(this,o,I.getElement(s.element)),c(this,a,new R.Damped(0,s.damped)),c(this,l,new R.Damped(0,s.damped)),c(this,d,new R.Damped(0,_({min:0,max:1},s.damped))),c(this,y,s.cartesian||!1),c(this,u,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,a)}get y(){return e(this,l)}get z(){return e(this,d)}get cartesian(){return e(this,y)}set cartesian(s){c(this,y,s),e(this,p).call(this)}get normalize(){return e(this,u)}set normalize(s){c(this,u,s),e(this,p).call(this)}connect(){e(this,o).addEventListener("pointerenter",e(this,f)),e(this,o).addEventListener("pointerleave",e(this,w)),e(this,o).addEventListener("pointermove",e(this,C)),j.elementResizer.subscribe(e(this,o),e(this,p)),B.windowResizer.subscribe(e(this,p))}disconnect(){e(this,o).removeEventListener("pointerenter",e(this,f)),e(this,o).removeEventListener("pointerleave",e(this,w)),e(this,o).removeEventListener("pointermove",e(this,C)),j.elementResizer.unsubscribe(e(this,p)),B.windowResizer.unsubscribe(e(this,p)),e(this,a).reset(),e(this,l).reset(),e(this,d).reset()}}o=new WeakMap,a=new WeakMap,l=new WeakMap,d=new WeakMap,y=new WeakMap,u=new WeakMap,b=new WeakMap,x=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,p=new WeakMap;var r,g,v,S,E,L;class W extends HTMLElement{constructor(){super();n(this,r);n(this,g,new P.CSSProperty(this,"--damping",20));n(this,v,new P.CSSProperty(this,"--mass",0));n(this,S,new P.CSSProperty(this,"--stiffness",0));n(this,E,new P.CSSProperty(this,"--cartesian",!1));n(this,L,new P.CSSProperty(this,"--normalize",!1));c(this,r,new O({element:this})),e(this,g).subscribe(t=>{e(this,r).x.damping=t.current,e(this,r).y.damping=t.current,e(this,r).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,r).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,r).normalize=t.current}),e(this,v).subscribe(t=>{e(this,r).x.mass=t.current,e(this,r).y.mass=t.current,e(this,r).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,r).x.stiffness=t.current,e(this,r).y.stiffness=t.current,e(this,r).z.stiffness=t.current}),e(this,r).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,r).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,r).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,r)}connectedCallback(){e(this,r).connect(),e(this,g).observe(),e(this,v).observe(),e(this,S).observe()}disconnectedCallback(){e(this,r).disconnect(),e(this,g).unobserve(),e(this,v).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}r=new WeakMap,g=new WeakMap,v=new WeakMap,S=new WeakMap,E=new WeakMap,L=new WeakMap;customElements.get("e-pointer")||customElements.define("e-pointer",W);exports.Pointer=O;exports.PointerElement=W;
1
+ "use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var T=i=>{throw TypeError(i)};var M=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,_=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&M(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&M(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||T("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?T("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,m)=>(k(i,s,"write to private field"),m?m.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-CDb6RMce.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),H=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const R=require("../Damped-ipnDc0iX.cjs"),j=require("../element-resizer/index.cjs"),B=require("../window-resizer/index.cjs"),P=require("../css-property/index.cjs");var o,a,l,d,y,u,b,x,f,w,C,p;class O{constructor(s){n(this,o);n(this,a);n(this,l);n(this,d);n(this,y);n(this,u);n(this,b,0);n(this,x,0);n(this,f,s=>{e(this,d).set(1)});n(this,w,s=>{e(this,d).set(0)});n(this,C,s=>{const t=q.getPointerPosition(s,e(this,o).getBoundingClientRect()),m={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,y)){const z=q.screenToCartesian(h,m);h.x=z.x,h.y=z.y}if(e(this,u)){const z=q.normalize(h,m);h.x=H.clamp(z.x*2,-1,1),h.y=H.clamp(z.y*2,-1,1)}e(this,a).set(h.x),e(this,l).set(h.y)});n(this,p,()=>{c(this,b,this.element.clientWidth),c(this,x,this.element.clientHeight);let s=0,t=0,m=0,h=0;e(this,y)?e(this,u)?(s=-1,t=1,m=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,m=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,u)?(s=0,t=1,m=0,h=1):(s=0,t=e(this,b),m=0,h=e(this,x)),e(this,a).min=s,e(this,a).max=t,e(this,l).min=m,e(this,l).max=h});c(this,o,I.getElement(s.element)),c(this,a,new R.Damped(0,s.damped)),c(this,l,new R.Damped(0,s.damped)),c(this,d,new R.Damped(0,_({min:0,max:1},s.damped))),c(this,y,s.cartesian||!1),c(this,u,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,a)}get y(){return e(this,l)}get z(){return e(this,d)}get cartesian(){return e(this,y)}set cartesian(s){c(this,y,s),e(this,p).call(this)}get normalize(){return e(this,u)}set normalize(s){c(this,u,s),e(this,p).call(this)}connect(){e(this,o).addEventListener("pointerenter",e(this,f)),e(this,o).addEventListener("pointerleave",e(this,w)),e(this,o).addEventListener("pointermove",e(this,C)),j.elementResizer.subscribe(e(this,o),e(this,p)),B.windowResizer.subscribe(e(this,p))}disconnect(){e(this,o).removeEventListener("pointerenter",e(this,f)),e(this,o).removeEventListener("pointerleave",e(this,w)),e(this,o).removeEventListener("pointermove",e(this,C)),j.elementResizer.unsubscribe(e(this,p)),B.windowResizer.unsubscribe(e(this,p)),e(this,a).reset(),e(this,l).reset(),e(this,d).reset()}}o=new WeakMap,a=new WeakMap,l=new WeakMap,d=new WeakMap,y=new WeakMap,u=new WeakMap,b=new WeakMap,x=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,p=new WeakMap;var r,g,v,S,E,L;class W extends HTMLElement{constructor(){super();n(this,r);n(this,g,new P.CSSProperty(this,"--damping",20));n(this,v,new P.CSSProperty(this,"--mass",0));n(this,S,new P.CSSProperty(this,"--stiffness",0));n(this,E,new P.CSSProperty(this,"--cartesian",!1));n(this,L,new P.CSSProperty(this,"--normalize",!1));c(this,r,new O({element:this})),e(this,g).subscribe(t=>{e(this,r).x.damping=t.current,e(this,r).y.damping=t.current,e(this,r).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,r).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,r).normalize=t.current}),e(this,v).subscribe(t=>{e(this,r).x.mass=t.current,e(this,r).y.mass=t.current,e(this,r).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,r).x.stiffness=t.current,e(this,r).y.stiffness=t.current,e(this,r).z.stiffness=t.current}),e(this,r).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,r).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,r).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,r)}connectedCallback(){e(this,r).connect(),e(this,g).observe(),e(this,v).observe(),e(this,S).observe()}disconnectedCallback(){e(this,r).disconnect(),e(this,g).unobserve(),e(this,v).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}r=new WeakMap,g=new WeakMap,v=new WeakMap,S=new WeakMap,E=new WeakMap,L=new WeakMap;customElements.get("e-pointer")||customElements.define("e-pointer",W);exports.Pointer=O;exports.PointerElement=W;
@@ -14,12 +14,12 @@ var D = (i, s, e) => s in i ? q(i, s, { enumerable: !0, configurable: !0, writab
14
14
  };
15
15
  var T = (i, s, e) => s.has(i) || H("Cannot " + e);
16
16
  var t = (i, s, e) => (T(i, s, "read from private field"), e ? e.call(i) : s.get(i)), n = (i, s, e) => s.has(i) ? H("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, e), c = (i, s, e, m) => (T(i, s, "write to private field"), m ? m.call(i, e) : s.set(i, e), e);
17
- import "../Store-C46i0nvr.js";
17
+ import "../Store-OTdcl6SX.js";
18
18
  import { g as G, s as I, n as J } from "../coordinates-CgdGoSYs.js";
19
- import { a as K } from "../dom-P5QbAASX.js";
19
+ import { g as K } from "../dom-0S_WDL4g.js";
20
20
  import { c as B } from "../math-BOBiC4TN.js";
21
21
  import "../ticker/index.js";
22
- import { D as R } from "../Damped-DbJKrUIf.js";
22
+ import { D as R } from "../Damped-DEHDEq-b.js";
23
23
  import { elementResizer as W } from "../element-resizer/index.js";
24
24
  import { windowResizer as j } from "../window-resizer/index.js";
25
25
  import { CSSProperty as P } from "../css-property/index.js";
@@ -1 +1 @@
1
- "use strict";var $=i=>{throw TypeError(i)};var q=(i,o,t)=>o.has(i)||$("Cannot "+t);var e=(i,o,t)=>(q(i,o,"read from private field"),t?t.call(i):o.get(i)),n=(i,o,t)=>o.has(i)?$("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,t),h=(i,o,t,d)=>(q(i,o,"write to private field"),d?d.call(i,t):o.set(i,t),t),A=(i,o,t)=>(q(i,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attribute/index.cjs"),N=require("../Store-npaZHvX4.cjs"),P=require("../style-At6aDoqG.cjs"),B=require("../browser-CpzFX2xg.cjs");require("../ticker/index.cjs");const I=require("../tags-6_ETuR75.cjs");var f,p,b,a,u,v,l,H,y,E,L,M,g;const c=class c extends HTMLElement{constructor(){super();n(this,l);n(this,f);n(this,p);n(this,b);n(this,a);n(this,u);n(this,v);n(this,E);n(this,L);n(this,g);h(this,f,-1),h(this,p,new N.Store(!1)),h(this,a,new x.Attribute(this,"history",!1)),h(this,u,new x.Attribute(this,"single",!1)),h(this,v,!1),this.open=(t=!0)=>{if(e(this,p).current)return;e(this,p).current=!0,e(this,u).current&&(c.__opened.forEach(r=>r.close()),c.__opened=[]),c.__opened.push(this),h(this,f,c.__opened.length-1),e(this,a).current&&e(this,v)&&history.pushState("","",e(this,l,H)),clearTimeout(e(this,b)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const d=()=>{addEventListener("click",e(this,E)),addEventListener("keydown",e(this,L)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};t?setTimeout(d):d()},this.close=()=>{if(e(this,p).current){if(e(this,p).current=!1,c.__opened=c.__opened.filter(t=>t!==this),e(this,a).current){const t=new URL(location.href);t.searchParams.delete(e(this,l,y)),history.replaceState(null,"",t.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,L)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},P.getElementTransitionDurationMS(this)+10)}},h(this,E,t=>{A(this,l,M).call(this,()=>{var O;const r=t.composedPath()[0],S=r instanceof HTMLElement&&(this.contains(r)||((O=this.shadowRoot)==null?void 0:O.contains(r))),m=r instanceof HTMLElement&&r.hasAttribute("outside");(!S||m)&&this.close()})}),h(this,L,t=>{A(this,l,M).call(this,()=>{t.code==="Escape"&&this.close()})}),h(this,g,()=>{h(this,v,!1),e(this,p).current&&e(this,a).current&&!location.search.includes(e(this,l,y))?this.close():!e(this,p).current&&e(this,a).current&&location.search.includes(e(this,l,y))&&this.open(),h(this,v,!0)}),this.setAttribute("popover-target","")}get history(){return e(this,a)}get single(){return e(this,u)}get opened(){return e(this,p)}connectedCallback(){e(this,a).observe(),e(this,u).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",e(this,g)),setTimeout(()=>{e(this,g).call(this)},0)}disconnectedCallback(){e(this,a).unobserve(),e(this,u).unobserve(),c.__opened=c.__opened.filter(t=>t!==this),clearTimeout(e(this,b)),removeEventListener("popstate",e(this,g))}};f=new WeakMap,p=new WeakMap,b=new WeakMap,a=new WeakMap,u=new WeakMap,v=new WeakMap,l=new WeakSet,H=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${e(this,l,y)}`},y=function(){return`modal-${this.id}`},E=new WeakMap,L=new WeakMap,M=function(t){(c.__opened[e(this,f)-1]||c.__opened.length===1)&&t()},g=new WeakMap,c.__opened=[];let _=c;customElements.get("e-popover")||customElements.define("e-popover",_);var s,T,w,C,k;class R extends HTMLElement{constructor(){super();n(this,s);n(this,T,()=>{this.classList.add("triggered")});n(this,w,()=>{this.classList.add("opened")});n(this,C,()=>{this.classList.remove("opened")});n(this,k,()=>{this.classList.remove("triggered")});B.isBrowser&&I.element(this,{tabindex:this.getAttribute("tabindex")||"0",onClick:()=>{if(e(this,s)){const t=this.getAttribute("type")||"open";t==="open"||t==="toggle"&&!e(this,s).opened.current?e(this,s).open():(t==="close"||t==="toggle"&&e(this,s).opened.current)&&e(this,s).close()}},onKeydown:t=>{t.code==="Space"&&t.currentTarget.click()}})}get popoverElement(){return e(this,s)}connectedCallback(){var d;const t=this.getAttribute("target");if(t){let r=null;if(t==="parent"){const S=this.closest("[popover-target]");if(S)r=S;else{const m=this.getRootNode();m instanceof ShadowRoot?r=m.host.closest("[popover-target]"):m instanceof HTMLElement&&(r=m.closest("[popover-target]"))}}else t==="sibling"?r=(d=this.parentElement)==null?void 0:d.querySelector("[popover-target]"):r=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);r instanceof HTMLElement?(h(this,s,r),e(this,s).addEventListener("popoverTriggered",e(this,T)),e(this,s).addEventListener("popoverOpened",e(this,w)),e(this,s).addEventListener("popoverClosing",e(this,C)),e(this,s).addEventListener("popoverClosed",e(this,k))):console.warn(this,`target ${t} not found`)}}disconnectedCallback(){e(this,s)&&(e(this,s).removeEventListener("popoverTriggered",e(this,T)),e(this,s).removeEventListener("popoverOpened",e(this,w)),e(this,s).removeEventListener("popoverClosing",e(this,C)),e(this,s).removeEventListener("popoverClosed",e(this,k)))}}s=new WeakMap,T=new WeakMap,w=new WeakMap,C=new WeakMap,k=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",R);exports.PopoverButtonElement=R;exports.PopoverElement=_;
1
+ "use strict";var O=i=>{throw TypeError(i)};var _=(i,o,t)=>o.has(i)||O("Cannot "+t);var e=(i,o,t)=>(_(i,o,"read from private field"),t?t.call(i):o.get(i)),n=(i,o,t)=>o.has(i)?O("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,t),h=(i,o,t,d)=>(_(i,o,"write to private field"),d?d.call(i,t):o.set(i,t),t),A=(i,o,t)=>(_(i,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attribute/index.cjs"),I=require("../Store-CDb6RMce.cjs"),R=require("../style-At6aDoqG.cjs"),P=require("../browser-CpzFX2xg.cjs");var m,l,y,p,a,u,g,H,E,L,M,v;const c=class c extends HTMLElement{constructor(){super();n(this,g);n(this,m);n(this,l);n(this,y);n(this,p);n(this,a);n(this,u);n(this,E);n(this,L);n(this,v);h(this,m,-1),h(this,l,new I.Store(!1)),h(this,p,new x.Attribute(this,"history",!1)),h(this,a,new x.Attribute(this,"single",!1)),h(this,u,!1),this.open=(t=!0)=>{if(e(this,l).current)return;e(this,l).current=!0,e(this,a).current&&(c.__opened.forEach(r=>r.close()),c.__opened=[]),c.__opened.push(this),h(this,m,c.__opened.length-1),e(this,p).current&&e(this,u)&&history.pushState("","",e(this,g,H)),clearTimeout(e(this,y)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const d=()=>{addEventListener("click",e(this,E)),addEventListener("keydown",e(this,L)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};t?setTimeout(d):d()},this.close=()=>{if(e(this,l).current){if(e(this,l).current=!1,c.__opened=c.__opened.filter(t=>t!==this),e(this,p).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,L)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},R.getElementTransitionDurationMS(this)+10)}},h(this,E,t=>{A(this,g,M).call(this,()=>{var q;const r=t.composedPath()[0],k=r instanceof HTMLElement&&(this.contains(r)||((q=this.shadowRoot)==null?void 0:q.contains(r))),f=r instanceof HTMLElement&&r.hasAttribute("outside");(!k||f)&&this.close()})}),h(this,L,t=>{A(this,g,M).call(this,()=>{t.code==="Escape"&&this.close()})}),h(this,v,()=>{h(this,u,!1),e(this,l).current&&e(this,p).current&&!location.search.includes(this.id)?this.close():!e(this,l).current&&e(this,p).current&&location.search.includes(this.id)&&this.open(),h(this,u,!0)}),this.setAttribute("popover-target","")}get history(){return e(this,p)}get single(){return e(this,a)}get opened(){return e(this,l)}connectedCallback(){e(this,p).observe(),e(this,a).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",e(this,v)),setTimeout(()=>{e(this,v).call(this)},0)}disconnectedCallback(){e(this,p).unobserve(),e(this,a).unobserve(),c.__opened=c.__opened.filter(t=>t!==this),clearTimeout(e(this,y)),removeEventListener("popstate",e(this,v))}};m=new WeakMap,l=new WeakMap,y=new WeakMap,p=new WeakMap,a=new WeakMap,u=new WeakMap,g=new WeakSet,H=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},E=new WeakMap,L=new WeakMap,M=function(t){(c.__opened[e(this,m)-1]||c.__opened.length===1)&&t()},v=new WeakMap,c.__opened=[];let S=c;customElements.get("e-popover")||customElements.define("e-popover",S);var s,b,T,w,C;class $ extends HTMLElement{constructor(){super();n(this,s);n(this,b,()=>{this.classList.add("triggered")});n(this,T,()=>{this.classList.add("opened")});n(this,w,()=>{this.classList.remove("opened")});n(this,C,()=>{this.classList.remove("triggered")});P.isBrowser&&(this.tabIndex=parseInt(this.getAttribute("tabindex")||"0"),this.addEventListener("click",()=>{if(e(this,s)){const t=this.getAttribute("type")||"open";t==="open"||t==="toggle"&&!e(this,s).opened.current?e(this,s).open():(t==="close"||t==="toggle"&&e(this,s).opened.current)&&e(this,s).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get popoverElement(){return e(this,s)}connectedCallback(){var d;const t=this.getAttribute("target");if(t){let r=null;if(t==="parent"){const k=this.closest("[popover-target]");if(k)r=k;else{const f=this.getRootNode();f instanceof ShadowRoot?r=f.host.closest("[popover-target]"):f instanceof HTMLElement&&(r=f.closest("[popover-target]"))}}else t==="sibling"?r=(d=this.parentElement)==null?void 0:d.querySelector("[popover-target]"):r=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);r instanceof HTMLElement?(h(this,s,r),e(this,s).addEventListener("popoverTriggered",e(this,b)),e(this,s).addEventListener("popoverOpened",e(this,T)),e(this,s).addEventListener("popoverClosing",e(this,w)),e(this,s).addEventListener("popoverClosed",e(this,C))):console.warn(this,`target ${t} not found`)}}disconnectedCallback(){e(this,s)&&(e(this,s).removeEventListener("popoverTriggered",e(this,b)),e(this,s).removeEventListener("popoverOpened",e(this,T)),e(this,s).removeEventListener("popoverClosing",e(this,w)),e(this,s).removeEventListener("popoverClosed",e(this,C)))}}s=new WeakMap,b=new WeakMap,T=new WeakMap,w=new WeakMap,C=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",$);exports.PopoverButtonElement=$;exports.PopoverElement=S;
@@ -1,168 +1,160 @@
1
1
  var H = (i) => {
2
2
  throw TypeError(i);
3
3
  };
4
- var _ = (i, o, t) => o.has(i) || H("Cannot " + t);
5
- var e = (i, o, t) => (_(i, o, "read from private field"), t ? t.call(i) : o.get(i)), n = (i, o, t) => o.has(i) ? H("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, t), h = (i, o, t, d) => (_(i, o, "write to private field"), d ? d.call(i, t) : o.set(i, t), t), A = (i, o, t) => (_(i, o, "access private method"), t);
4
+ var S = (i, o, t) => o.has(i) || H("Cannot " + t);
5
+ var e = (i, o, t) => (S(i, o, "read from private field"), t ? t.call(i) : o.get(i)), n = (i, o, t) => o.has(i) ? H("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, t), h = (i, o, t, a) => (S(i, o, "write to private field"), a ? a.call(i, t) : o.set(i, t), t), _ = (i, o, t) => (S(i, o, "access private method"), t);
6
6
  import { Attribute as O } from "../attribute/index.js";
7
- import { S as N } from "../Store-C46i0nvr.js";
8
- import { g as q } from "../style-j2TwriJ_.js";
9
- import { i as I } from "../browser-0zX67oeU.js";
10
- import "../ticker/index.js";
11
- import { e as B } from "../tags-BL3kQp9o.js";
12
- var f, l, T, a, u, v, c, R, y, E, L, $, g;
7
+ import { S as I } from "../Store-OTdcl6SX.js";
8
+ import { g as R } from "../style-j2TwriJ_.js";
9
+ import { i as q } from "../browser-0zX67oeU.js";
10
+ var f, c, y, l, d, u, g, $, E, L, M, v;
13
11
  const p = class p extends HTMLElement {
14
12
  constructor() {
15
13
  super();
16
- n(this, c);
14
+ n(this, g);
17
15
  n(this, f);
16
+ n(this, c);
17
+ n(this, y);
18
18
  n(this, l);
19
- n(this, T);
20
- n(this, a);
19
+ n(this, d);
21
20
  n(this, u);
22
- n(this, v);
23
21
  n(this, E);
24
22
  n(this, L);
25
- n(this, g);
26
- h(this, f, -1), h(this, l, new N(!1)), h(this, a, new O(this, "history", !1)), h(this, u, new O(this, "single", !1)), h(this, v, !1), this.open = (t = !0) => {
27
- if (e(this, l).current)
23
+ n(this, v);
24
+ h(this, f, -1), h(this, c, new I(!1)), h(this, l, new O(this, "history", !1)), h(this, d, new O(this, "single", !1)), h(this, u, !1), this.open = (t = !0) => {
25
+ if (e(this, c).current)
28
26
  return;
29
- e(this, l).current = !0, e(this, u).current && (p.__opened.forEach((r) => r.close()), p.__opened = []), p.__opened.push(this), h(this, f, p.__opened.length - 1), e(this, a).current && e(this, v) && history.pushState("", "", e(this, c, R)), clearTimeout(e(this, T)), this.classList.add("triggered"), this.style.display = "block", this.dispatchEvent(new CustomEvent("popoverTriggered"));
30
- const d = () => {
27
+ e(this, c).current = !0, e(this, d).current && (p.__opened.forEach((r) => r.close()), p.__opened = []), p.__opened.push(this), h(this, f, p.__opened.length - 1), e(this, l).current && e(this, u) && history.pushState("", "", e(this, g, $)), clearTimeout(e(this, y)), this.classList.add("triggered"), this.style.display = "block", this.dispatchEvent(new CustomEvent("popoverTriggered"));
28
+ const a = () => {
31
29
  addEventListener("click", e(this, E)), addEventListener("keydown", e(this, L)), this.style.opacity = "1", this.classList.add("opened"), this.dispatchEvent(new CustomEvent("popoverOpened"));
32
30
  };
33
- t ? setTimeout(d) : d();
31
+ t ? setTimeout(a) : a();
34
32
  }, this.close = () => {
35
- if (e(this, l).current) {
36
- if (e(this, l).current = !1, p.__opened = p.__opened.filter((t) => t !== this), e(this, a).current) {
33
+ if (e(this, c).current) {
34
+ if (e(this, c).current = !1, p.__opened = p.__opened.filter((t) => t !== this), e(this, l).current) {
37
35
  const t = new URL(location.href);
38
- t.searchParams.delete(e(this, c, y)), history.replaceState(null, "", t.href);
36
+ t.searchParams.delete(this.id), history.replaceState(null, "", t.href);
39
37
  }
40
38
  this.classList.remove("opened"), this.style.opacity = "0", this.dispatchEvent(new CustomEvent("popoverClosing")), removeEventListener("click", e(this, E)), removeEventListener("keydown", e(this, L)), setTimeout(() => {
41
39
  this.classList.remove("triggered"), this.style.display = "none", this.dispatchEvent(new CustomEvent("popoverClosed"));
42
- }, q(this) + 10);
40
+ }, R(this) + 10);
43
41
  }
44
42
  }, h(this, E, (t) => {
45
- A(this, c, $).call(this, () => {
43
+ _(this, g, M).call(this, () => {
46
44
  var x;
47
- const r = t.composedPath()[0], S = r instanceof HTMLElement && (this.contains(r) || ((x = this.shadowRoot) == null ? void 0 : x.contains(r))), m = r instanceof HTMLElement && r.hasAttribute("outside");
48
- (!S || m) && this.close();
45
+ const r = t.composedPath()[0], k = r instanceof HTMLElement && (this.contains(r) || ((x = this.shadowRoot) == null ? void 0 : x.contains(r))), m = r instanceof HTMLElement && r.hasAttribute("outside");
46
+ (!k || m) && this.close();
49
47
  });
50
48
  }), h(this, L, (t) => {
51
- A(this, c, $).call(this, () => {
49
+ _(this, g, M).call(this, () => {
52
50
  t.code === "Escape" && this.close();
53
51
  });
54
- }), h(this, g, () => {
55
- h(this, v, !1), e(this, l).current && e(this, a).current && !location.search.includes(e(this, c, y)) ? this.close() : !e(this, l).current && e(this, a).current && location.search.includes(e(this, c, y)) && this.open(), h(this, v, !0);
52
+ }), h(this, v, () => {
53
+ h(this, u, !1), e(this, c).current && e(this, l).current && !location.search.includes(this.id) ? this.close() : !e(this, c).current && e(this, l).current && location.search.includes(this.id) && this.open(), h(this, u, !0);
56
54
  }), this.setAttribute("popover-target", "");
57
55
  }
58
56
  get history() {
59
- return e(this, a);
57
+ return e(this, l);
60
58
  }
61
59
  get single() {
62
- return e(this, u);
60
+ return e(this, d);
63
61
  }
64
62
  get opened() {
65
- return e(this, l);
63
+ return e(this, c);
66
64
  }
67
65
  connectedCallback() {
68
- e(this, a).observe(), e(this, u).observe(), this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", e(this, g)), setTimeout(() => {
69
- e(this, g).call(this);
66
+ e(this, l).observe(), e(this, d).observe(), this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", e(this, v)), setTimeout(() => {
67
+ e(this, v).call(this);
70
68
  }, 0);
71
69
  }
72
70
  disconnectedCallback() {
73
- e(this, a).unobserve(), e(this, u).unobserve(), p.__opened = p.__opened.filter((t) => t !== this), clearTimeout(e(this, T)), removeEventListener("popstate", e(this, g));
71
+ e(this, l).unobserve(), e(this, d).unobserve(), p.__opened = p.__opened.filter((t) => t !== this), clearTimeout(e(this, y)), removeEventListener("popstate", e(this, v));
74
72
  }
75
73
  };
76
- f = new WeakMap(), l = new WeakMap(), T = new WeakMap(), a = new WeakMap(), u = new WeakMap(), v = new WeakMap(), c = new WeakSet(), R = function() {
77
- return `${location.pathname}${location.search ? location.search + "&" : "?"}${e(this, c, y)}`;
78
- }, y = function() {
79
- return `modal-${this.id}`;
80
- }, E = new WeakMap(), L = new WeakMap(), $ = function(t) {
74
+ f = new WeakMap(), c = new WeakMap(), y = new WeakMap(), l = new WeakMap(), d = new WeakMap(), u = new WeakMap(), g = new WeakSet(), $ = function() {
75
+ return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.id}`;
76
+ }, E = new WeakMap(), L = new WeakMap(), M = function(t) {
81
77
  (p.__opened[e(this, f) - 1] || p.__opened.length === 1) && t();
82
- }, g = new WeakMap(), p.__opened = [];
83
- let M = p;
84
- customElements.get("e-popover") || customElements.define("e-popover", M);
85
- var s, b, w, C, k;
86
- class D extends HTMLElement {
78
+ }, v = new WeakMap(), p.__opened = [];
79
+ let A = p;
80
+ customElements.get("e-popover") || customElements.define("e-popover", A);
81
+ var s, T, b, w, C;
82
+ class N extends HTMLElement {
87
83
  constructor() {
88
84
  super();
89
85
  n(this, s);
90
- n(this, b, () => {
86
+ n(this, T, () => {
91
87
  this.classList.add("triggered");
92
88
  });
93
- n(this, w, () => {
89
+ n(this, b, () => {
94
90
  this.classList.add("opened");
95
91
  });
96
- n(this, C, () => {
92
+ n(this, w, () => {
97
93
  this.classList.remove("opened");
98
94
  });
99
- n(this, k, () => {
95
+ n(this, C, () => {
100
96
  this.classList.remove("triggered");
101
97
  });
102
- I && B(this, {
103
- tabindex: this.getAttribute("tabindex") || "0",
104
- onClick: () => {
105
- if (e(this, s)) {
106
- const t = this.getAttribute("type") || "open";
107
- t === "open" || t === "toggle" && !e(this, s).opened.current ? e(this, s).open() : (t === "close" || t === "toggle" && e(this, s).opened.current) && e(this, s).close();
108
- }
109
- },
110
- onKeydown: (t) => {
111
- t.code === "Space" && t.currentTarget.click();
98
+ q && (this.tabIndex = parseInt(this.getAttribute("tabindex") || "0"), this.addEventListener("click", () => {
99
+ if (e(this, s)) {
100
+ const t = this.getAttribute("type") || "open";
101
+ t === "open" || t === "toggle" && !e(this, s).opened.current ? e(this, s).open() : (t === "close" || t === "toggle" && e(this, s).opened.current) && e(this, s).close();
112
102
  }
113
- });
103
+ }), this.addEventListener("keydown", (t) => {
104
+ t.code === "Space" && t.currentTarget.click();
105
+ }));
114
106
  }
115
107
  get popoverElement() {
116
108
  return e(this, s);
117
109
  }
118
110
  connectedCallback() {
119
- var d;
111
+ var a;
120
112
  const t = this.getAttribute("target");
121
113
  if (t) {
122
114
  let r = null;
123
115
  if (t === "parent") {
124
- const S = this.closest("[popover-target]");
125
- if (S)
126
- r = S;
116
+ const k = this.closest("[popover-target]");
117
+ if (k)
118
+ r = k;
127
119
  else {
128
120
  const m = this.getRootNode();
129
121
  m instanceof ShadowRoot ? r = m.host.closest("[popover-target]") : m instanceof HTMLElement && (r = m.closest("[popover-target]"));
130
122
  }
131
- } else t === "sibling" ? r = (d = this.parentElement) == null ? void 0 : d.querySelector("[popover-target]") : r = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
123
+ } else t === "sibling" ? r = (a = this.parentElement) == null ? void 0 : a.querySelector("[popover-target]") : r = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
132
124
  r instanceof HTMLElement ? (h(this, s, r), e(this, s).addEventListener(
133
125
  "popoverTriggered",
134
- e(this, b)
126
+ e(this, T)
135
127
  ), e(this, s).addEventListener(
136
128
  "popoverOpened",
137
- e(this, w)
129
+ e(this, b)
138
130
  ), e(this, s).addEventListener(
139
131
  "popoverClosing",
140
- e(this, C)
132
+ e(this, w)
141
133
  ), e(this, s).addEventListener(
142
134
  "popoverClosed",
143
- e(this, k)
135
+ e(this, C)
144
136
  )) : console.warn(this, `target ${t} not found`);
145
137
  }
146
138
  }
147
139
  disconnectedCallback() {
148
140
  e(this, s) && (e(this, s).removeEventListener(
149
141
  "popoverTriggered",
150
- e(this, b)
142
+ e(this, T)
151
143
  ), e(this, s).removeEventListener(
152
144
  "popoverOpened",
153
- e(this, w)
145
+ e(this, b)
154
146
  ), e(this, s).removeEventListener(
155
147
  "popoverClosing",
156
- e(this, C)
148
+ e(this, w)
157
149
  ), e(this, s).removeEventListener(
158
150
  "popoverClosed",
159
- e(this, k)
151
+ e(this, C)
160
152
  ));
161
153
  }
162
154
  }
163
- s = new WeakMap(), b = new WeakMap(), w = new WeakMap(), C = new WeakMap(), k = new WeakMap();
164
- customElements.get("e-popover-button") || customElements.define("e-popover-button", D);
155
+ s = new WeakMap(), T = new WeakMap(), b = new WeakMap(), w = new WeakMap(), C = new WeakMap();
156
+ customElements.get("e-popover-button") || customElements.define("e-popover-button", N);
165
157
  export {
166
- D as PopoverButtonElement,
167
- M as PopoverElement
158
+ N as PopoverButtonElement,
159
+ A as PopoverElement
168
160
  };
@@ -1 +1 @@
1
- "use strict";var gs=Object.defineProperty;var Ze=Object.getOwnPropertySymbols;var ys=Object.prototype.hasOwnProperty,Cs=Object.prototype.propertyIsEnumerable;var Je=S=>{throw TypeError(S)};var je=(S,n,s)=>n in S?gs(S,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):S[n]=s,Qe=(S,n)=>{for(var s in n||(n={}))ys.call(n,s)&&je(S,s,n[s]);if(Ze)for(var s of Ze(n))Cs.call(n,s)&&je(S,s,n[s]);return S};var Me=(S,n,s)=>n.has(S)||Je("Cannot "+s);var t=(S,n,s)=>(Me(S,n,"read from private field"),s?s.call(S):n.get(S)),i=(S,n,s)=>n.has(S)?Je("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(S):n.set(S,s),r=(S,n,s,e)=>(Me(S,n,"write to private field"),e?e.call(S,s):n.set(S,s),s),o=(S,n,s)=>(Me(S,n,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Rt=require("../Store-npaZHvX4.cjs"),vs=require("../Derived-BIBU-y7Z.cjs"),Ge=require("../browser-CpzFX2xg.cjs"),Ps=require("../easings-DsS5-Kqc.cjs"),kt=require("../layout-8ryRAMGJ.cjs"),Ke=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const be=require("../order/index.cjs"),ts=require("../Damped-DYJ6Z0xo.cjs"),ws=require("../Tweened-BkkD9s4n.cjs"),Oe=require("../controls/index.cjs"),pe=require("../window-resizer/index.cjs"),Yt=require("../scroll-entries/index.cjs"),W=require("../tags-6_ETuR75.cjs"),Ne=require("../createStylesheet-Csfmh-MH.cjs"),Xe=require("../css-unit-parser/index.cjs"),c=require("../css-property/index.cjs"),Es=require("../Viewport-Cv4TRGiv.cjs"),qe=require("../element-resizer/index.cjs"),xs=require("../gestures-DHLrn6Q8.cjs"),Ye=require("../theme/index.cjs"),Ls=require("../dom-JBOkFLTh.cjs"),es=require("../function-MthRj-GJ.cjs");var m,me,v,qt,J,dt;class zs{constructor(n,s,e){i(this,m);i(this,me);i(this,v);i(this,qt,0);i(this,J,0);i(this,dt,null);r(this,m,n),r(this,me,s),r(this,v,e),Yt.scrollEntries.register(t(this,m))}get index(){return t(this,me)}get size(){return t(this,qt)}get position(){return t(this,J)}destroy(){Yt.scrollEntries.unregister(t(this,m)),t(this,m).style.transform="",this.mark(null)}setSize(n){n?(t(this,m).style.setProperty("--size",n+"px"),t(this,v).axisCSSProperty.current==="x"?(t(this,m).style.width=n+"px",t(this,m).style.height=""):(t(this,m).style.height=n+"px",t(this,m).style.width="")):(t(this,m).style.width="",t(this,m).style.height="",t(this,m).style.removeProperty("--size"))}resize(){r(this,qt,t(this,v).vertical?t(this,m).offsetHeight:t(this,m).offsetWidth),r(this,J,t(this,v).vertical?kt.getCumulativeOffsetTop(t(this,m)):kt.getCumulativeOffsetLeft(t(this,m))),r(this,J,t(this,J)-t(this,v).contentPosition)}transform(){let n=0;const s=t(this,v).viewportSize*t(this,v).sectionDistanceScaleCSSProperty.current;t(this,v).loopCSSProperty.current&&t(this,v).overscroll&&t(this,J)+t(this,qt)<t(this,v).currentScrollValue&&(n=t(this,v).distance*-1-t(this,v).gap),Yt.scrollEntries.update(t(this,m),t(this,v).axisCSSProperty.current,n);const e=t(this,v).currentScrollValue+n,h=t(this,J)-t(this,v).viewportSize-s,a=t(this,J)+t(this,qt)+s,g=Ke.clamp(e,h,a);t(this,v).vertical?t(this,m).style.transform=`translate3d(0px, ${g*-1}px, 0px)`:t(this,m).style.transform=`translate3d(${g*-1}px, 0px, 0px)`}mark(n){t(this,dt)!==n&&(t(this,dt)&&t(this,m).classList.remove(t(this,dt)),n&&t(this,m).classList.add(n),r(this,dt,n),t(this,m).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:t(this,dt)}})))}}m=new WeakMap,me=new WeakMap,v=new WeakMap,qt=new WeakMap,J=new WeakMap,dt=new WeakMap;const Vs=Ne.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var d,It,k,Q,X,U,Y,pt,ft,G,R,Tt,Mt,At,Bt,se,K,_t,bt,N,mt,tt,gt,Ht,$t,Wt,b,ge,l,ye,Ce,w,y,I,Z,yt,et,z,C,ie,Ct,Ut,Gt,re,st,u,fe,ee,Ae,Be,_e,He,T,ve,ss,he,Pe,$e,Dt,We;class Ie extends HTMLElement{constructor(){super();i(this,u);i(this,d,null);i(this,It,new c.CSSProperty(this,"--controls",!0));i(this,k,new c.CSSProperty(this,"--axis","y"));i(this,Q,new c.CSSProperty(this,"--direction",0));i(this,X,new c.CSSProperty(this,"--pages",0,{validate:s=>Math.max(0,s-1)}));i(this,U,new c.CSSProperty(this,"--split",!1));i(this,Y,new c.CSSProperty(this,"--sectional",!1));i(this,pt,new c.CSSProperty(this,"--auto-size",!1));i(this,ft,new c.CSSProperty(this,"--wheel-max-delta",!1));i(this,G,new c.CSSProperty(this,"--sections-in-view",1));i(this,R,new c.CSSProperty(this,"--loop",!1));i(this,Tt,new c.CSSProperty(this,"--damping",20));i(this,Mt,new c.CSSProperty(this,"--mass",0));i(this,At,new c.CSSProperty(this,"--stiffness",0));i(this,Bt,new c.CSSProperty(this,"--mouse-drag",!1));i(this,se,new c.CSSProperty(this,"--section-distance-scale",.5));i(this,K,new c.CSSProperty(this,"--autoplay",0));i(this,_t,new c.CSSProperty(this,"--autoplay-pause-duration",0));i(this,bt,new c.CSSProperty(this,"--autoplay-user-direction",!1));i(this,N,new c.CSSProperty(this,"--classes",0));i(this,mt,new c.CSSProperty(this,"--current-index-start-offset",0));i(this,tt,new c.CSSProperty(this,"--current-index-end-offset",0));i(this,gt,new c.CSSProperty(this,"--focus-delay",0));i(this,Ht,new c.CSSProperty(this,"--focus-duration",3e3));i(this,$t,new c.CSSProperty(this,"--disabled",!1));i(this,Wt,new c.CSSProperty(this,"--hibernated",!1));i(this,b,null);i(this,ge,null);i(this,l,[]);i(this,ye,0);i(this,Ce,0);i(this,w,0);i(this,y,0);i(this,I,0);i(this,Z,null);i(this,yt,null);i(this,et,null);i(this,z,null);i(this,C,new Rt.Store(0));i(this,ie,0);i(this,Ct,0);i(this,Ut,!0);i(this,Gt,!0);i(this,re);i(this,st,new ws.Tweened);i(this,T,()=>{t(this,d).unlistenAnimationFrame();const s=this.currentScrollValue/t(this,y)||0,e=t(this,C).current;if(r(this,ye,this.vertical?kt.getCumulativeOffsetTop(this):kt.getCumulativeOffsetLeft(this)),r(this,Ce,this.vertical?kt.getCumulativeOffsetTop(t(this,b)):kt.getCumulativeOffsetLeft(t(this,b))),r(this,w,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,I,Xe.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):r(this,I,Xe.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,pt).current&&t(this,l).length){const h=t(this,G).current,a=(t(this,w)-t(this,I)*(h-1))/h;t(this,l).forEach(g=>{g.setSize(a)})}else t(this,l).forEach(h=>{h.setSize()});if(t(this,l).forEach(h=>{h.resize()}),t(this,X).current){r(this,y,t(this,w)*t(this,X).current);const h=t(this,y)+t(this,w);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%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",r(this,y,t(this,b).offsetHeight-t(this,w))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",r(this,y,t(this,b).offsetWidth-t(this,w)));if(!t(this,R).current){const h=getComputedStyle(this),a=this.vertical?parseFloat(h.paddingBlockStart)+parseFloat(h.paddingBlockEnd):parseFloat(h.paddingInlineStart)+parseFloat(h.paddingInlineEnd);r(this,y,t(this,y)+a),t(this,d).max=t(this,y)}if(t(this,R).current&&t(this,l).length){const h=t(this,l)[t(this,l).length-1],a=h.position+h.size-t(this,w),g=t(this,y)-a;r(this,Ct,h.position+h.size+g)}else r(this,Ct,t(this,y));if(t(this,Y).current&&t(this,l).length){const h=t(this,l)[e];t(this,d).set(h.position,{equalize:!0})}else t(this,d).set(s*t(this,y),{equalize:!0})});i(this,ve,()=>{const s=this.currentScrollValue;if(r(this,ie,Math.max(0,s-t(this,y))),t(this,l).length){let e=0;for(let h=0;h<t(this,l).length;h++){const a=t(this,l)[h];a.transform(),this.targetScrollValue+a.size/2>=a.position&&(e=h)}t(this,C).current=e}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${s*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${s*-1}px, 0px, 0px)`;Yt.scrollEntries.update(this,t(this,k).current,s)});i(this,he,(s,e)=>{t(this,It).current&&(t(this,bt).current&&(t(this,z).pauseAndContinue(t(this,_t).current),t(this,z).direction=Math.sign(e)||1),t(this,Pe).call(this,s,e))});i(this,Pe,(s,e)=>{if(t(this,Q).current){if(t(this,Q).current<0&&e>0)return;if(t(this,Q).current>0&&e<0)return}if(t(this,st).unlistenAnimationFrame(),!t(this,K).current&&t(this,gt).current&&(clearInterval(t(this,re)),r(this,re,setTimeout(()=>{const h=o(this,u,We).call(this);h&&this.scrollToSection(h.index,{tween:{duration:t(this,Ht).current,easing:Ps.easeInOutExpo}})},t(this,gt).current))),!(s==="drag"&&!Es.device.isMobile&&!t(this,Bt).current))if(t(this,Y).current){const h=Math.sign(e);t(this,l).length?this.shiftSections(h):t(this,d).shift(h*t(this,w))}else t(this,d).shift(e)});Ge.isBrowser&&(r(this,d,new ts.Damped(0,{damping:.01,min:0,order:be.TICK_ORDER.SCROLL})),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Vs),W.element(this,{tabIndex:0,children:[W.div({class:"static",children:[W.slot({name:"static"})]}),W.div({class:"content",children:[W.slot({ref:e=>r(this,ge,e)})],style:{flexDirection:new vs.Derived(t(this,k),e=>e==="x"?"row":"column")},ref:e=>r(this,b,e)})]}),r(this,Z,new Oe.WheelControls({element:t(this,b)})),t(this,Z).changeEvent.subscribe(t(this,he)),r(this,yt,new Oe.KeyboardControls({element:this})),t(this,yt).changeEvent.subscribe(t(this,he)),r(this,et,new Oe.DragControls({element:t(this,b)})),t(this,et).changeEvent.subscribe(t(this,he)),r(this,z,new Oe.AutoplayControls({culling:this})),t(this,z).changeEvent.subscribe(t(this,Pe)),t(this,k).subscribe(({current:e})=>{t(this,b).style.flexDirection=e==="x"?"row":"column",t(this,Z).axis=t(this,ft).current?"max":e,t(this,yt).dimension=e==="x"?"width":"height",t(this,et).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,T).call(this)}),t(this,ft).subscribe(e=>{t(this,Z).axis=e.current?"max":t(this,k).current}),t(this,X).subscribe(()=>{this.isConnected&&t(this,T).call(this)}),t(this,U).subscribe(({current:e})=>{this.isConnected&&(e?o(this,u,fe).call(this):o(this,u,ee).call(this))}),t(this,Y).subscribe(e=>{t(this,Z).debounce=e.current,t(this,et).swipe=e.current,t(this,z).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?o(this,u,fe).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,u,ee).call(this))}),t(this,pt).subscribe(e=>{this.isConnected&&(t(this,T).call(this),e.current&&!e.previous&&!t(this,l).length?o(this,u,fe).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,u,ee).call(this))}),t(this,G).subscribe(e=>{this.isConnected&&(t(this,T).call(this),o(this,u,Dt).call(this))}),t(this,R).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,U).current=!0)),t(this,l).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(r(this,ie,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Tt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Mt).subscribe(e=>{t(this,d).mass=e.current}),t(this,At).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,$t).subscribe(e=>{e.current&&!e.previous?o(this,u,Ae).call(this):!e.current&&e.previous&&o(this,u,Be).call(this)}),t(this,Wt).subscribe(e=>{e.current&&!e.previous?o(this,u,_e).call(this):!e.current&&e.previous&&o(this,u,He).call(this)}),t(this,K).subscribe(e=>{t(this,z).speed=e.current,e.current&&!e.previous?t(this,z).connect():!e.current&&e.previous&&t(this,z).disconnect()}),t(this,bt).subscribe(e=>{e.current||(t(this,z).direction=1)}),t(this,N).subscribe(e=>{this.isConnected&&o(this,u,Dt).call(this)}),t(this,mt).subscribe(e=>{this.isConnected&&t(this,N).current&&o(this,u,Dt).call(this)}),t(this,tt).subscribe(e=>{this.isConnected&&t(this,N).current&&o(this,u,Dt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,C).subscribe(e=>{t(this,l).length&&o(this,u,Dt).call(this)}),t(this,st).subscribe(e=>{t(this,st).isRunning.current&&t(this,d).set(e.current)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,It)}get axisCSSProperty(){return t(this,k)}get directionCSSProperty(){return t(this,Q)}get pagesCSSProperty(){return t(this,X)}get splitCSSProperty(){return t(this,U)}get sectionalCSSProperty(){return t(this,Y)}get autoSizeCSSProperty(){return t(this,pt)}get wheelMaxDeltaCSSProperty(){return t(this,ft)}get sectionsInViewCSSProperty(){return t(this,G)}get loopCSSProperty(){return t(this,R)}get dampingCSSProperty(){return t(this,Tt)}get massCSSProperty(){return t(this,Mt)}get stiffnessCSSProperty(){return t(this,At)}get mouseDragCSSProperty(){return t(this,Bt)}get sectionDistanceScaleCSSProperty(){return t(this,se)}get autoplayCSSProperty(){return t(this,K)}get autoplayPauseDurationCSSProperty(){return t(this,_t)}get autoplayUserDirectionCSSProperty(){return t(this,bt)}get classesCSSProperty(){return t(this,N)}get currentIndexStartOffsetCSSProperty(){return t(this,mt)}get currentIndexEndOffsetCSSProperty(){return t(this,tt)}get focusDelayCSSProperty(){return t(this,gt)}get focusDurationCSSProperty(){return t(this,Ht)}get disabledCSSProperty(){return t(this,$t)}get hibernatedCSSProperty(){return t(this,Wt)}get currentScrollValue(){return o(this,u,$e).call(this,"current")}get targetScrollValue(){return o(this,u,$e).call(this,"target")}get contentElement(){return t(this,b)}get sections(){return t(this,l)}get position(){return t(this,ye)}get contentPosition(){return t(this,Ce)}get viewportSize(){return t(this,w)}get scrollSize(){return t(this,y)}get gap(){return t(this,I)}get counter(){return t(this,C)}get limit(){return t(this,l).length-t(this,G).current}get distance(){return t(this,Ct)}get loopDistance(){return t(this,R).current?t(this,Ct)+t(this,I):t(this,Ct)}get overscroll(){return t(this,ie)}get vertical(){return t(this,k).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,k).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,k).current==="x"?0:t(this,d).distance}onScroll(...s){return t(this,d).subscribe(...s)}offScroll(...s){t(this,d).unsubscribe(...s)}range(s,e,h=0){const a=s-h,g=a+e+h*2;return this.currentProgress<a?0:this.currentProgress>g?1:(this.currentProgress-a)/(g-a)}curve(s,e,h=0){return Math.sin(this.range(s,e,h)*Math.PI)}visible(s,e,h=0){const a=s-h,g=a+e+h*2;return this.currentProgress>=a&&this.currentProgress<=g}scrollToSection(s,e){if(!t(this,l).length)return;const h=t(this,C).current;o(this,u,ss).call(this,s);const a=t(this,l)[h],g=t(this,l)[t(this,C).current];if(a&&g){let q=0;const te=o(this,u,We).call(this),ms=te?this.targetScrollValue-te.position:0;t(this,R).current?t(this,C).current===0&&h===t(this,l).length-1?q=t(this,y)+t(this,w)-a.position+t(this,I):t(this,C).current===t(this,l).length-1&&h===0?q=g.position-(t(this,y)+t(this,w)+t(this,I)):q=g.position-a.position:q=g.position-a.position,this.shiftPosition(q-ms,e)}}shiftSections(s,e){t(this,l).length&&this.scrollToSection(t(this,C).current+s,e)}setPosition(s,e){e!=null&&e.tween?(t(this,st).set(t(this,d).current,{equalize:!0}),t(this,st).set(s,Qe({},e.tween))):t(this,d).set(s,{equalize:(e==null?void 0:e.behaviour)==="instant"})}shiftPosition(s,e){this.setPosition(t(this,d).target+s,e)}connectedCallback(){t(this,It).observe(),t(this,k).observe(),t(this,Q).observe(),t(this,X).observe(),t(this,U).observe(),t(this,Y).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,G).observe(),t(this,R).observe(),t(this,Tt).observe(),t(this,Mt).observe(),t(this,At).observe(),t(this,Bt).observe(),t(this,se).observe(),t(this,K).observe(),t(this,K).observe(),t(this,_t).observe(),t(this,bt).observe(),t(this,N).observe(),t(this,mt).observe(),t(this,tt).observe(),t(this,gt).observe(),t(this,Ht).observe(),t(this,$t).observe(),t(this,Wt).observe(),o(this,u,He).call(this)}disconnectedCallback(){t(this,It).unobserve(),t(this,k).unobserve(),t(this,Q).unobserve(),t(this,X).unobserve(),t(this,U).unobserve(),t(this,Y).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,G).unobserve(),t(this,R).unobserve(),t(this,Tt).unobserve(),t(this,Mt).unobserve(),t(this,At).unobserve(),t(this,Bt).unobserve(),t(this,se).unobserve(),t(this,K).unobserve(),t(this,_t).unobserve(),t(this,bt).unobserve(),t(this,N).unobserve(),t(this,mt).unobserve(),t(this,tt).unobserve(),t(this,gt).unobserve(),t(this,Ht).unobserve(),t(this,$t).unobserve(),t(this,Wt).unobserve(),o(this,u,_e).call(this)}}d=new WeakMap,It=new WeakMap,k=new WeakMap,Q=new WeakMap,X=new WeakMap,U=new WeakMap,Y=new WeakMap,pt=new WeakMap,ft=new WeakMap,G=new WeakMap,R=new WeakMap,Tt=new WeakMap,Mt=new WeakMap,At=new WeakMap,Bt=new WeakMap,se=new WeakMap,K=new WeakMap,_t=new WeakMap,bt=new WeakMap,N=new WeakMap,mt=new WeakMap,tt=new WeakMap,gt=new WeakMap,Ht=new WeakMap,$t=new WeakMap,Wt=new WeakMap,b=new WeakMap,ge=new WeakMap,l=new WeakMap,ye=new WeakMap,Ce=new WeakMap,w=new WeakMap,y=new WeakMap,I=new WeakMap,Z=new WeakMap,yt=new WeakMap,et=new WeakMap,z=new WeakMap,C=new WeakMap,ie=new WeakMap,Ct=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,re=new WeakMap,st=new WeakMap,u=new WeakSet,fe=function(){o(this,u,ee).call(this),t(this,ge).assignedElements().forEach((s,e)=>{s instanceof HTMLElement&&t(this,l).push(new zs(s,e,this))}),t(this,b).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,T).call(this),o(this,u,Dt).call(this)},ee=function(){t(this,l).forEach(s=>{s.destroy()}),r(this,l,[]),t(this,C).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))},Ae=function(){t(this,Ut)||(r(this,Ut,!0),t(this,d).unsubscribe(t(this,ve)),t(this,d).unlistenAnimationFrame(),t(this,Z).disconnect(),t(this,yt).disconnect(),t(this,et).disconnect(),t(this,z).disconnect(),clearInterval(t(this,re)),t(this,st).unlistenAnimationFrame())},Be=function(){t(this,Ut)&&(r(this,Ut,!1),t(this,d).subscribe(t(this,ve)),t(this,Z).connect(),t(this,yt).connect(),t(this,et).connect(),t(this,K).current&&t(this,z).connect())},_e=function(){t(this,Gt)||(r(this,Gt,!0),pe.windowResizer.unsubscribe(t(this,T)),qe.elementResizer.unsubscribe(t(this,T)),t(this,d).reset(),o(this,u,Ae).call(this),t(this,b).style.transform="",t(this,U).current&&o(this,u,ee).call(this),Yt.scrollEntries.unregister(this))},He=function(){t(this,Gt)&&(r(this,Gt,!1),t(this,U).current&&o(this,u,fe).call(this),Yt.scrollEntries.register(this),pe.windowResizer.subscribe(t(this,T),be.RESIZE_ORDER.SCROLL),qe.elementResizer.subscribe(this,t(this,T)),o(this,u,Be).call(this))},T=new WeakMap,ve=new WeakMap,ss=function(s){t(this,R).current?(t(this,C).current=s%t(this,l).length,t(this,C).current=t(this,C).current<0?t(this,l).length+t(this,C).current:t(this,C).current):t(this,C).current=Ke.clamp(s,0,this.limit)},he=new WeakMap,Pe=new WeakMap,$e=function(s="current"){if(t(this,R).current&&t(this,l).length){const e=t(this,d)[s]%(t(this,y)+t(this,w)+t(this,I));return e<0?t(this,y)+e+t(this,w)+t(this,I):e}else return t(this,d)[s]},Dt=function(){if(t(this,N).current&&t(this,l).length){const s=t(this,C).current+t(this,mt).current;s===0?this.classList.add("start"):this.classList.remove("start"),s===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,G).current+t(this,tt).current;t(this,l).forEach((h,a)=>{const g=s-this.limit-1+t(this,tt).current,q=s+e,te=this.sections.length-q;a>=s&&a<q||a<=g?h.mark("current"):a>=q&&a<q+te/2||a<=g+e?h.mark("next"):h.mark("previous")})}},We=function(){let s=null,e=1/0;for(let h=0;h<t(this,l).length;h++){const a=Math.abs(t(this,l)[h].position-this.targetScrollValue);a<e&&(e=a,s=h)}return s!==null?t(this,l)[s]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ie);var we;class Te extends HTMLElement{constructor(){super(...arguments);i(this,we,null)}get scrollElement(){return t(this,we)}connectedCallback(){const s=Ls.findParentElement(this,Ie);s instanceof Ie?r(this,we,s):console.error(this,"e-scroll not found")}}we=new WeakMap;const Fs=Ne.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:Ye.aptechkaTheme.colorFont.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:Ye.aptechkaTheme.colorMain.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});var ne,D,it,rt,oe,ce,Kt,Ee,xe,Le;class is extends Te{constructor(){super();i(this,ne,null);i(this,D,null);i(this,it,!1);i(this,rt,0);i(this,oe,0);i(this,ce,0);i(this,Kt,()=>{r(this,it,this.offsetWidth>this.offsetHeight);const s=t(this,it)?this.offsetWidth:this.offsetHeight;r(this,rt,s/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/s)),r(this,rt,Math.max(t(this,rt),30)),t(this,it)?(t(this,D).style.width=t(this,rt)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,rt)+"px"),r(this,oe,s-t(this,rt)),this.scrollElement.scrollSize||(this.style.display="none")});i(this,Ee,()=>{r(this,ce,this.scrollElement.currentProgress*t(this,oe)),t(this,it)?t(this,D).style.transform=`translate3d(${t(this,ce)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,ce)}px, 0px)`});i(this,xe,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,Le,s=>{document.documentElement.classList.add("grabbing"),xs.setupDrag(a=>{const g=t(this,it)?a.x:a.y,q=this.scrollElement.distance/t(this,oe),te=(g-h)*q;this.scrollElement.setPosition(e+te)},()=>{document.documentElement.classList.remove("grabbing")});const e=this.scrollElement.targetScrollValue,h=t(this,it)?s.x:s.y});Ge.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Fs),W.element(this,{slot:"static","drag-dead-zone":"",children:[W.slot({ref:e=>r(this,ne,e),children:W.div({class:"default-thumb"})})]}))}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback();const s=t(this,ne).assignedElements()[0]||t(this,ne).firstElementChild;r(this,D,s),t(this,D).addEventListener("pointerdown",t(this,Le)),pe.windowResizer.subscribe(t(this,Kt),be.RESIZE_ORDER.SCROLL+1),qe.elementResizer.subscribe(this,t(this,Kt)),this.scrollElement.onScroll(t(this,Ee)),this.scrollElement.axisCSSProperty.subscribe(t(this,xe))}disconnectedCallback(){t(this,D).removeEventListener("pointerdown",t(this,Le)),pe.windowResizer.unsubscribe(t(this,Kt)),qe.elementResizer.unsubscribe(t(this,Kt)),this.scrollElement.offScroll(t(this,Ee)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,xe))}}ne=new WeakMap,D=new WeakMap,it=new WeakMap,rt=new WeakMap,oe=new WeakMap,ce=new WeakMap,Kt=new WeakMap,Ee=new WeakMap,xe=new WeakMap,Le=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",is);const ks=Ne.createStylesheet({button:{all:"inherit"}});class rs extends Te{constructor(){super(),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ks),Ge.isBrowser&&W.element(this,{children:[W.button({onClick:()=>{this.handleClick()},children:[W.slot()]})]})}}class hs extends rs{handleClick(){const n=this.getAttribute("index"),s=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:s})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",hs);class ns extends rs{handleClick(){const n=this.getAttribute("step"),s=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:s})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",ns);var ht,vt,le,ze,Ve,ue;class Rs{constructor(n,s,e){i(this,ht);i(this,vt);i(this,le);i(this,ze);i(this,Ve,()=>{t(this,vt).scrollToSection(t(this,le),{behaviour:t(this,ze)})});i(this,ue,()=>{t(this,ht).classList.toggle("current",t(this,vt).counter.current===t(this,le))});r(this,ht,document.createElement("button")),r(this,vt,n),r(this,ze,e),r(this,le,s),t(this,ht).addEventListener("click",t(this,Ve)),t(this,vt).counter.subscribe(t(this,ue)),t(this,ue).call(this)}get element(){return t(this,ht)}destroy(){t(this,ht).removeEventListener("click",t(this,Ve)),t(this,vt).counter.unsubscribe(t(this,ue)),t(this,ht).remove()}}ht=new WeakMap,vt=new WeakMap,le=new WeakMap,ze=new WeakMap,Ve=new WeakMap,ue=new WeakMap;var Pt,ae;class os extends Te{constructor(){super(...arguments);i(this,Pt,[]);i(this,ae,es.debounce(()=>{t(this,Pt).forEach(s=>s.destroy()),r(this,Pt,[]);for(let s=0;s<this.scrollElement.sections.length;s++){const e=new Rs(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");this.appendChild(e.element),t(this,Pt).push(e)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,ae)),t(this,ae).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,ae)),t(this,Pt).forEach(s=>s.destroy()),r(this,Pt,[])}}Pt=new WeakMap,ae=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",os);var Nt,Zt,jt,Jt,wt,Et,xt,Lt,V,M,A,B,zt,E,nt,ot,ct,lt,ut,x,_,H,at,St,j,Fe,p,Qt,Xt,ke,L,Vt,O,F,$,Se,Ft,P,f,ls,us,as,Ss,ds,ps,Re,de,Ot,fs,bs,Ue,De;class cs extends Te{constructor(){super();i(this,f);i(this,Nt,new c.CSSProperty(this,"--damping",20));i(this,Zt,new c.CSSProperty(this,"--mass",0));i(this,jt,new c.CSSProperty(this,"--stiffness",0));i(this,Jt,new c.CSSProperty(this,"--target",""));i(this,wt,new c.CSSProperty(this,"--disabled",!1));i(this,Et,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1}));i(this,xt,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1}));i(this,Lt,new c.CSSProperty(this,"--capture-once",!1));i(this,V,new c.CSSProperty(this,"--captured",""));i(this,M,new c.CSSProperty(this,"--released",""));i(this,A,new c.CSSProperty(this,"--captured-from-start",""));i(this,B,new c.CSSProperty(this,"--captured-from-finish",""));i(this,zt,new c.CSSProperty(this,"--released-from-start",""));i(this,E,new c.CSSProperty(this,"--released-from-finish",""));i(this,nt,new c.CSSProperty(this,"--passed-var",""));i(this,ot,new c.CSSProperty(this,"--progress-var",""));i(this,ct,new c.CSSProperty(this,"--distance-var",""));i(this,lt,new c.CSSProperty(this,"--start-var",""));i(this,ut,new c.CSSProperty(this,"--finish-var",""));i(this,x,new Rt.Store(!1));i(this,_,new Rt.Store(!1));i(this,H,new Rt.Store(!1));i(this,at,new Rt.Store(!1));i(this,St,new Rt.Store(!1));i(this,j,new Rt.Store(!1));i(this,Fe,[]);i(this,p,this);i(this,Qt,0);i(this,Xt,0);i(this,ke,0);i(this,L,new ts.Damped(0,{order:be.TICK_ORDER.SCROLL-1,min:0,max:1}));i(this,Vt,0);i(this,O,0);i(this,F,0);i(this,$,0);i(this,Se,!1);i(this,Ft,!1);i(this,P,!0);i(this,Re,()=>{t(this,P)||(this.resize(),t(this,de).call(this))});i(this,de,()=>{!t(this,P)&&t(this,Se)&&this.tick()});i(this,De,es.debounce(()=>{const s=Yt.scrollEntries.getAll(this).reverse();let e=0;s.forEach((h,a)=>{h.element===this.scrollElement&&(e=a)}),r(this,Fe,s.slice(e+1))},0))}get distanceOffsetCSSProperty(){return t(this,Et)}get startOffsetCSSProperty(){return t(this,xt)}get captureOnceCSSProperty(){return t(this,Lt)}get capturedCSSProperty(){return t(this,V)}get releasedCSSProperty(){return t(this,M)}get capturedFromStartCSSProperty(){return t(this,A)}get capturedFromFinishCSSProperty(){return t(this,B)}get releasedFromStartCSSProperty(){return t(this,zt)}get releasedFromFinishCSSProperty(){return t(this,E)}get passedVarCSSProperty(){return t(this,nt)}get progressVarCSSProperty(){return t(this,ot)}get distanceVarCSSProperty(){return t(this,ct)}get startVarCSSProperty(){return t(this,lt)}get finishVarCSSProperty(){return t(this,ut)}get disabledCSSProperty(){return t(this,wt)}get dampingCSSProperty(){return t(this,Nt)}get massCSSProperty(){return t(this,Zt)}get stiffnessCSSProperty(){return t(this,jt)}get targetCSSProperty(){return t(this,Jt)}get isCaptured(){return t(this,x)}get isReleased(){return t(this,_)}get isCapturedFromStart(){return t(this,H)}get isReleasedFromStart(){return t(this,at)}get isCapturedFromFinish(){return t(this,St)}get isReleasedFromFinish(){return t(this,j)}get directionPosition(){return t(this,Qt)}get directionSize(){return t(this,Xt)}get passed(){return t(this,L)}get progress(){return t(this,Vt)}get start(){return t(this,O)}get finish(){return t(this,$)}get distance(){return t(this,F)}get isCapturedOnce(){return t(this,Ft)}get isDisabled(){return t(this,P)}resize(){r(this,Xt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Qt,this.scrollElement.vertical?kt.getCumulativeOffsetTop(this,this.scrollElement):kt.getCumulativeOffsetLeft(this,this.scrollElement)),r(this,O,this.getStart()),r(this,F,this.getDistance()),r(this,O,t(this,O)+t(this,xt).current),r(this,F,t(this,F)+t(this,Et).current),r(this,$,t(this,O)+t(this,F)),this.scrollElement.currentScrollValue>t(this,$)&&!t(this,x).current&&!t(this,_).current&&(t(this,x).current=!0),this.setVar(t(this,lt).current,t(this,O)),this.setVar(t(this,ut).current,t(this,$)),this.setVar(t(this,ct).current,t(this,F)),t(this,L).max=t(this,F),r(this,Se,!0)}tick(){let s=this.scrollElement.currentScrollValue;t(this,Fe).forEach(h=>{s+=h.value}),t(this,L).set(s-t(this,O));const e=Math.round(s);t(this,x).current&&(e>t(this,O)?t(this,H).current||o(this,f,as).call(this):t(this,H).current&&!t(this,at).current&&o(this,f,ds).call(this),e<t(this,$)?t(this,j).current&&!t(this,St).current&&o(this,f,Ss).call(this):t(this,H).current&&!t(this,j).current&&o(this,f,ps).call(this)),e>t(this,O)&&e<t(this,$)?t(this,x).current||o(this,f,ls).call(this):t(this,x).current&&(t(this,L).set(Ke.step(t(this,F)/2,t(this,L).current,0,t(this,F))),o(this,f,us).call(this)),t(this,Ft)&&t(this,Lt).current&&(t(this,V).current&&t(this,p).classList.add(t(this,V).current),r(this,P,!0))}disable(){this.style.cssText="",r(this,Qt,0),r(this,Xt,0),t(this,L).reset(),r(this,Vt,0),r(this,O,0),r(this,F,0),r(this,$,0),r(this,Se,!1),t(this,x).current=!1,t(this,_).current=!1,t(this,H).current=!1,t(this,at).current=!1,t(this,St).current=!1,t(this,j).current=!1,r(this,Ft,!1),r(this,P,!0),o(this,f,Ue).call(this)}enable(){r(this,P,!1)}connectedCallback(){super.connectedCallback(),t(this,Nt).observe(),t(this,Zt).observe(),t(this,jt).observe(),t(this,Jt).observe(),t(this,wt).observe(),t(this,Et).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,V).observe(),t(this,M).observe(),t(this,A).observe(),t(this,B).observe(),t(this,zt).observe(),t(this,E).observe(),t(this,nt).observe(),t(this,ot).observe(),t(this,ct).observe(),t(this,lt).observe(),t(this,ut).observe();let s=!1;this.scrollElement.addEventListener("sectionsChange",t(this,De)),t(this,De).call(this),t(this,wt).current||this.enable(),t(this,Nt).subscribe(e=>{t(this,L).damping=e.current}),t(this,Zt).subscribe(e=>{t(this,L).mass=e.current}),t(this,jt).subscribe(e=>{t(this,L).stiffness=e.current}),t(this,Jt).subscribe(e=>{e.previous&&o(this,f,Ue).call(this),e.current?e.current==="parent"?r(this,p,this.parentElement||this):r(this,p,document.querySelector(e.current)||this):r(this,p,this)}),t(this,wt).subscribe(e=>{e.current&&!e.previous?this.disable():!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,xt).subscribe(()=>{s&&!t(this,P)&&this.resize()}),t(this,Et).subscribe(()=>{s&&!t(this,P)&&this.resize()}),t(this,V).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,A).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,B).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,M).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,zt).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,E).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,Lt).subscribe(e=>{t(this,P)||!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,nt).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,this.passed.current))}),t(this,ot).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,Vt)))}),t(this,lt).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,O)))}),t(this,ut).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,$)))}),t(this,ct).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,F)))}),t(this,L).subscribe(e=>{r(this,Vt,t(this,L).current/t(this,F)||0),this.setVar(t(this,nt).current,t(this,L).current.toFixed(6)),this.setVar(t(this,ot).current,t(this,Vt).toFixed(6))}),pe.windowResizer.subscribe(t(this,Re),be.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,de)),s=!0}disconnectedCallback(){pe.windowResizer.unsubscribe(t(this,Re)),this.scrollElement.offScroll(t(this,de)),t(this,Nt).close(),t(this,Zt).close(),t(this,jt).close(),t(this,Jt).close(),t(this,wt).close(),t(this,Et).close(),t(this,xt).close(),t(this,Lt).close(),t(this,V).close(),t(this,M).close(),t(this,A).close(),t(this,B).close(),t(this,zt).close(),t(this,E).close(),t(this,nt).close(),t(this,ot).close(),t(this,ct).close(),t(this,lt).close(),t(this,ut).close(),t(this,x).close(),t(this,_).close(),t(this,H).close(),t(this,at).close(),t(this,St).close(),t(this,j).close(),this.disable()}removeVar(s){s&&t(this,p).style.removeProperty(`--${s}`)}setVar(s,e){s&&t(this,p).style.setProperty(`--${s}`,e.toString())}getDistance(){return t(this,Xt)+t(this,ke)}getStart(){return t(this,Qt)-t(this,ke)}}Nt=new WeakMap,Zt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,wt=new WeakMap,Et=new WeakMap,xt=new WeakMap,Lt=new WeakMap,V=new WeakMap,M=new WeakMap,A=new WeakMap,B=new WeakMap,zt=new WeakMap,E=new WeakMap,nt=new WeakMap,ot=new WeakMap,ct=new WeakMap,lt=new WeakMap,ut=new WeakMap,x=new WeakMap,_=new WeakMap,H=new WeakMap,at=new WeakMap,St=new WeakMap,j=new WeakMap,Fe=new WeakMap,p=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,ke=new WeakMap,L=new WeakMap,Vt=new WeakMap,O=new WeakMap,F=new WeakMap,$=new WeakMap,Se=new WeakMap,Ft=new WeakMap,P=new WeakMap,f=new WeakSet,ls=function(){t(this,x).current=!0,t(this,_).current=!1,r(this,Ft,!0),t(this,M).current&&t(this,p).classList.remove(t(this,M).current),t(this,E).current&&t(this,p).classList.remove(t(this,E).current),t(this,E).current&&t(this,p).classList.remove(t(this,E).current),t(this,V).current&&t(this,p).classList.add(t(this,V).current)},us=function(){t(this,_).current=!0,t(this,x).current=!1,r(this,Ft,!0),t(this,V).current&&t(this,p).classList.remove(t(this,V).current),t(this,A).current&&t(this,p).classList.remove(t(this,A).current),t(this,B).current&&t(this,p).classList.remove(t(this,B).current),t(this,M).current&&t(this,p).classList.add(t(this,M).current)},as=function(){t(this,x).current=!0,t(this,H).current=!0,t(this,at).current=!1,t(this,A).current&&t(this,p).classList.add(t(this,A).current)},Ss=function(){t(this,x).current=!0,t(this,St).current=!0,t(this,j).current=!1,t(this,B).current&&t(this,p).classList.add(t(this,B).current)},ds=function(){t(this,_).current=!0,t(this,at).current=!0,t(this,H).current=!1,t(this,E).current&&t(this,p).classList.add(t(this,E).current)},ps=function(){t(this,_).current=!0,t(this,j).current=!0,t(this,St).current=!1,t(this,E).current&&t(this,p).classList.add(t(this,E).current)},Re=new WeakMap,de=new WeakMap,Ot=function(s){if(t(this,P)){s.previous&&t(this,p).classList.remove(s.previous),s.current&&t(this,p).classList.remove(s.current);return}s.current&&t(this,x).current?(s.previous&&t(this,p).classList.remove(s.previous),t(this,p).classList.add(s.current)):!s.current&&s.previous&&t(this,p).classList.remove(s.previous)},fs=function(...s){s.forEach(e=>{e&&t(this,p).classList.remove(e)})},bs=function(...s){s.forEach(e=>{e&&t(this,p).style.removeProperty(`--${e}`)})},Ue=function(){o(this,f,fs).call(this,t(this,V).current,t(this,A).current,t(this,B).current,t(this,M).current,t(this,zt).current,t(this,E).current),o(this,f,bs).call(this,t(this,nt).current,t(this,ot).current,t(this,ct).current,t(this,lt).current,t(this,ut).current)},De=new WeakMap;customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",cs);exports.ScrollBulletButtonsElement=os;exports.ScrollElement=Ie;exports.ScrollSegmentElement=cs;exports.ScrollSetButtonElement=hs;exports.ScrollStepButtonElement=ns;exports.ScrollbarElement=is;
1
+ "use strict";var bs=Object.defineProperty;var Ge=Object.getOwnPropertySymbols;var ms=Object.prototype.hasOwnProperty,gs=Object.prototype.propertyIsEnumerable;var Ze=S=>{throw TypeError(S)};var Ke=(S,h,e)=>h in S?bs(S,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):S[h]=e,je=(S,h)=>{for(var e in h||(h={}))ms.call(h,e)&&Ke(S,e,h[e]);if(Ge)for(var e of Ge(h))gs.call(h,e)&&Ke(S,e,h[e]);return S};var Me=(S,h,e)=>h.has(S)||Ze("Cannot "+e);var t=(S,h,e)=>(Me(S,h,"read from private field"),e?e.call(S):h.get(S)),r=(S,h,e)=>h.has(S)?Ze("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(S):h.set(S,e),n=(S,h,e,s)=>(Me(S,h,"write to private field"),s?s.call(S,e):h.set(S,e),e),o=(S,h,e)=>(Me(S,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Rt=require("../Store-CDb6RMce.cjs"),Te=require("../browser-CpzFX2xg.cjs"),Cs=require("../easings-DsS5-Kqc.cjs"),Qe=require("../jss-GJLvaNfT.cjs"),kt=require("../layout-8ryRAMGJ.cjs"),Ne=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const be=require("../order/index.cjs"),Xe=require("../Damped-ipnDc0iX.cjs"),ys=require("../Tweened-B1TfANfR.cjs"),De=require("../controls/index.cjs"),de=require("../window-resizer/index.cjs"),Yt=require("../scroll-entries/index.cjs"),Je=require("../css-unit-parser/index.cjs"),c=require("../css-property/index.cjs"),vs=require("../Viewport-BDPsnAF4.cjs"),Oe=require("../element-resizer/index.cjs"),Ps=require("../gestures-DHLrn6Q8.cjs"),Es=require("../dom-JBOkFLTh.cjs"),Ye=require("../function-MthRj-GJ.cjs");var m,me,v,It,j,St;class ws{constructor(h,e,s){r(this,m);r(this,me);r(this,v);r(this,It,0);r(this,j,0);r(this,St,null);n(this,m,h),n(this,me,e),n(this,v,s),Yt.scrollEntries.register(t(this,m))}get index(){return t(this,me)}get size(){return t(this,It)}get position(){return t(this,j)}destroy(){Yt.scrollEntries.unregister(t(this,m)),t(this,m).style.transform="",this.mark(null)}setSize(h){h?(t(this,m).style.setProperty("--size",h+"px"),t(this,v).axisCSSProperty.current==="x"?(t(this,m).style.width=h+"px",t(this,m).style.height=""):(t(this,m).style.height=h+"px",t(this,m).style.width="")):(t(this,m).style.width="",t(this,m).style.height="",t(this,m).style.removeProperty("--size"))}resize(){n(this,It,t(this,v).vertical?t(this,m).offsetHeight:t(this,m).offsetWidth),n(this,j,t(this,v).vertical?kt.getCumulativeOffsetTop(t(this,m)):kt.getCumulativeOffsetLeft(t(this,m))),n(this,j,t(this,j)-t(this,v).contentPosition)}transform(){let h=0;const e=t(this,v).viewportSize*t(this,v).sectionDistanceScaleCSSProperty.current;t(this,v).loopCSSProperty.current&&t(this,v).overscroll&&t(this,j)+t(this,It)<t(this,v).currentScrollValue&&(h=t(this,v).distance*-1-t(this,v).gap),Yt.scrollEntries.update(t(this,m),t(this,v).axisCSSProperty.current,h);const s=t(this,v).currentScrollValue+h,i=t(this,j)-t(this,v).viewportSize-e,a=t(this,j)+t(this,It)+e,g=Ne.clamp(s,i,a);t(this,v).vertical?t(this,m).style.transform=`translate3d(0px, ${g*-1}px, 0px)`:t(this,m).style.transform=`translate3d(${g*-1}px, 0px, 0px)`}mark(h){t(this,St)!==h&&(t(this,St)&&t(this,m).classList.remove(t(this,St)),h&&t(this,m).classList.add(h),n(this,St,h),t(this,m).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:t(this,St)}})))}}m=new WeakMap,me=new WeakMap,v=new WeakMap,It=new WeakMap,j=new WeakMap,St=new WeakMap;const xs=Qe.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var p,Tt,I,J,Q,W,X,pt,dt,U,k,qt,Mt,At,Bt,se,N,Ht,ft,G,bt,Y,mt,_t,$t,Wt,d,ie,l,ge,Ce,E,C,T,K,gt,tt,z,y,re,Ct,Ut,Nt,ne,et,u,fe,ee,Ae,Be,He,_e,q,ye,ts,he,ve,$e,Dt,We;class Ie extends HTMLElement{constructor(){super();r(this,u);r(this,p,null);r(this,Tt,new c.CSSProperty(this,"--controls",!0));r(this,I,new c.CSSProperty(this,"--axis","y"));r(this,J,new c.CSSProperty(this,"--direction",0));r(this,Q,new c.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));r(this,W,new c.CSSProperty(this,"--split",!1));r(this,X,new c.CSSProperty(this,"--sectional",!1));r(this,pt,new c.CSSProperty(this,"--auto-size",!1));r(this,dt,new c.CSSProperty(this,"--wheel-max-delta",!1));r(this,U,new c.CSSProperty(this,"--sections-in-view",1));r(this,k,new c.CSSProperty(this,"--loop",!1));r(this,qt,new c.CSSProperty(this,"--damping",20));r(this,Mt,new c.CSSProperty(this,"--mass",0));r(this,At,new c.CSSProperty(this,"--stiffness",0));r(this,Bt,new c.CSSProperty(this,"--mouse-drag",!1));r(this,se,new c.CSSProperty(this,"--section-distance-scale",.5));r(this,N,new c.CSSProperty(this,"--autoplay",0));r(this,Ht,new c.CSSProperty(this,"--autoplay-pause-duration",0));r(this,ft,new c.CSSProperty(this,"--autoplay-user-direction",!1));r(this,G,new c.CSSProperty(this,"--classes",0));r(this,bt,new c.CSSProperty(this,"--current-index-start-offset",0));r(this,Y,new c.CSSProperty(this,"--current-index-end-offset",0));r(this,mt,new c.CSSProperty(this,"--focus-delay",0));r(this,_t,new c.CSSProperty(this,"--focus-duration",3e3));r(this,$t,new c.CSSProperty(this,"--disabled",!1));r(this,Wt,new c.CSSProperty(this,"--hibernated",!1));r(this,d,null);r(this,ie,null);r(this,l,[]);r(this,ge,0);r(this,Ce,0);r(this,E,0);r(this,C,0);r(this,T,0);r(this,K,null);r(this,gt,null);r(this,tt,null);r(this,z,null);r(this,y,new Rt.Store(0));r(this,re,0);r(this,Ct,0);r(this,Ut,!0);r(this,Nt,!0);r(this,ne);r(this,et,new ys.Tweened);r(this,q,()=>{t(this,p).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,C)||0,s=t(this,y).current;if(n(this,ge,this.vertical?kt.getCumulativeOffsetTop(this):kt.getCumulativeOffsetLeft(this)),n(this,Ce,this.vertical?kt.getCumulativeOffsetTop(t(this,d)):kt.getCumulativeOffsetLeft(t(this,d))),n(this,E,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?n(this,T,Je.cssUnitParser.parse(getComputedStyle(t(this,d)).rowGap)):n(this,T,Je.cssUnitParser.parse(getComputedStyle(t(this,d)).columnGap)),t(this,pt).current&&t(this,l).length){const i=t(this,U).current,a=(t(this,E)-t(this,T)*(i-1))/i;t(this,l).forEach(g=>{g.setSize(a)})}else t(this,l).forEach(i=>{i.setSize()});if(t(this,l).forEach(i=>{i.resize()}),t(this,Q).current){n(this,C,t(this,E)*t(this,Q).current);const i=t(this,C)+t(this,E);this.vertical?(t(this,d).style.width=i+"px",t(this,d).style.height="100%"):(t(this,d).style.height=i+"px",t(this,d).style.width="100%")}else this.vertical?(t(this,d).style.width="100%",t(this,d).style.height="max-content",n(this,C,t(this,d).offsetHeight-t(this,E))):(t(this,d).style.width="max-content",t(this,d).style.height="100%",n(this,C,t(this,d).offsetWidth-t(this,E)));if(!t(this,k).current){const i=getComputedStyle(this),a=this.vertical?parseFloat(i.paddingBlockStart)+parseFloat(i.paddingBlockEnd):parseFloat(i.paddingInlineStart)+parseFloat(i.paddingInlineEnd);n(this,C,t(this,C)+a),t(this,p).max=t(this,C)}if(t(this,k).current&&t(this,l).length){const i=t(this,l)[t(this,l).length-1],a=i.position+i.size-t(this,E),g=t(this,C)-a;n(this,Ct,i.position+i.size+g)}else n(this,Ct,t(this,C));if(t(this,X).current&&t(this,l).length){const i=t(this,l)[s];t(this,p).set(i.position,{equalize:!0})}else t(this,p).set(e*t(this,C),{equalize:!0})});r(this,ye,()=>{const e=this.currentScrollValue;if(n(this,re,Math.max(0,e-t(this,C))),t(this,l).length){let s=0;for(let i=0;i<t(this,l).length;i++){const a=t(this,l)[i];a.transform(),this.targetScrollValue+a.size/2>=a.position&&(s=i)}t(this,y).current=s}else this.vertical?t(this,d).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,d).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Yt.scrollEntries.update(this,t(this,I).current,e)});r(this,he,(e,s)=>{t(this,Tt).current&&(t(this,ft).current&&(t(this,z).pauseAndContinue(t(this,Ht).current),t(this,z).direction=Math.sign(s)||1),t(this,ve).call(this,e,s))});r(this,ve,(e,s)=>{if(t(this,J).current){if(t(this,J).current<0&&s>0)return;if(t(this,J).current>0&&s<0)return}if(t(this,et).unlistenAnimationFrame(),!t(this,N).current&&t(this,mt).current&&(clearInterval(t(this,ne)),n(this,ne,setTimeout(()=>{const i=o(this,u,We).call(this);i&&this.scrollToSection(i.index,{tween:{duration:t(this,_t).current,easing:Cs.easeInOutExpo}})},t(this,mt).current))),!(e==="drag"&&!vs.device.isMobile&&!t(this,Bt).current))if(t(this,X).current){const i=Math.sign(s);t(this,l).length?this.shiftSections(i):t(this,p).shift(i*t(this,E))}else t(this,p).shift(s)});if(Te.isBrowser){n(this,p,new Xe.Damped(0,{damping:.01,min:0,order:be.TICK_ORDER.SCROLL}));const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(xs),this.tabIndex=0;const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),n(this,d,document.createElement("div")),t(this,d).className="content",n(this,ie,document.createElement("slot")),t(this,d).appendChild(t(this,ie)),e.appendChild(t(this,d)),n(this,K,new De.WheelControls({element:t(this,d)})),t(this,K).changeEvent.subscribe(t(this,he)),n(this,gt,new De.KeyboardControls({element:this})),t(this,gt).changeEvent.subscribe(t(this,he)),n(this,tt,new De.DragControls({element:t(this,d)})),t(this,tt).changeEvent.subscribe(t(this,he)),n(this,z,new De.AutoplayControls({culling:this})),t(this,z).changeEvent.subscribe(t(this,ve)),t(this,I).subscribe(({current:i})=>{t(this,d).style.flexDirection=i==="x"?"row":"column",t(this,K).axis=t(this,dt).current?"max":i,t(this,gt).dimension=i==="x"?"width":"height",t(this,tt).axis=i,i==="x"?this.style.touchAction="pan-y":i==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,q).call(this)}),t(this,dt).subscribe(i=>{t(this,K).axis=i.current?"max":t(this,I).current}),t(this,Q).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,W).subscribe(({current:i})=>{this.isConnected&&(i?o(this,u,fe).call(this):o(this,u,ee).call(this))}),t(this,X).subscribe(i=>{t(this,K).debounce=i.current,t(this,tt).swipe=i.current,t(this,z).interval=i.current,this.isConnected&&(i.current&&!i.previous&&!t(this,l).length?o(this,u,fe).call(this):!i.current&&i.previous&&t(this,l).length&&o(this,u,ee).call(this))}),t(this,pt).subscribe(i=>{this.isConnected&&(t(this,q).call(this),i.current&&!i.previous&&!t(this,l).length?o(this,u,fe).call(this):!i.current&&i.previous&&t(this,l).length&&o(this,u,ee).call(this))}),t(this,U).subscribe(i=>{this.isConnected&&(t(this,q).call(this),o(this,u,Dt).call(this))}),t(this,k).subscribe(i=>{i.current?(this.isConnected&&(t(this,l).length||(t(this,W).current=!0)),t(this,l).length&&(t(this,p).max=1/0,t(this,p).min=-1/0)):(n(this,re,0),t(this,p).max=t(this,C),t(this,p).min=0)}),t(this,qt).subscribe(i=>{t(this,p).damping=i.current}),t(this,Mt).subscribe(i=>{t(this,p).mass=i.current}),t(this,At).subscribe(i=>{t(this,p).stiffness=i.current}),t(this,$t).subscribe(i=>{i.current&&!i.previous?o(this,u,Ae).call(this):!i.current&&i.previous&&o(this,u,Be).call(this)}),t(this,Wt).subscribe(i=>{i.current&&!i.previous?o(this,u,He).call(this):!i.current&&i.previous&&o(this,u,_e).call(this)}),t(this,N).subscribe(i=>{t(this,z).speed=i.current,i.current&&!i.previous?t(this,z).connect():!i.current&&i.previous&&t(this,z).disconnect()}),t(this,ft).subscribe(i=>{i.current||(t(this,z).direction=1)}),t(this,G).subscribe(i=>{this.isConnected&&o(this,u,Dt).call(this)}),t(this,bt).subscribe(i=>{this.isConnected&&t(this,G).current&&o(this,u,Dt).call(this)}),t(this,Y).subscribe(i=>{this.isConnected&&t(this,G).current&&o(this,u,Dt).call(this)}),t(this,p).isRunning.subscribe(i=>{this.classList.toggle("active",i.current)}),t(this,y).subscribe(i=>{t(this,l).length&&o(this,u,Dt).call(this)}),t(this,et).subscribe(i=>{t(this,et).isRunning.current&&t(this,p).set(i.current)})}}get damped(){return t(this,p)}get controlsCSSProperty(){return t(this,Tt)}get axisCSSProperty(){return t(this,I)}get directionCSSProperty(){return t(this,J)}get pagesCSSProperty(){return t(this,Q)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,X)}get autoSizeCSSProperty(){return t(this,pt)}get wheelMaxDeltaCSSProperty(){return t(this,dt)}get sectionsInViewCSSProperty(){return t(this,U)}get loopCSSProperty(){return t(this,k)}get dampingCSSProperty(){return t(this,qt)}get massCSSProperty(){return t(this,Mt)}get stiffnessCSSProperty(){return t(this,At)}get mouseDragCSSProperty(){return t(this,Bt)}get sectionDistanceScaleCSSProperty(){return t(this,se)}get autoplayCSSProperty(){return t(this,N)}get autoplayPauseDurationCSSProperty(){return t(this,Ht)}get autoplayUserDirectionCSSProperty(){return t(this,ft)}get classesCSSProperty(){return t(this,G)}get currentIndexStartOffsetCSSProperty(){return t(this,bt)}get currentIndexEndOffsetCSSProperty(){return t(this,Y)}get focusDelayCSSProperty(){return t(this,mt)}get focusDurationCSSProperty(){return t(this,_t)}get disabledCSSProperty(){return t(this,$t)}get hibernatedCSSProperty(){return t(this,Wt)}get currentScrollValue(){return o(this,u,$e).call(this,"current")}get targetScrollValue(){return o(this,u,$e).call(this,"target")}get contentElement(){return t(this,d)}get sections(){return t(this,l)}get position(){return t(this,ge)}get contentPosition(){return t(this,Ce)}get viewportSize(){return t(this,E)}get scrollSize(){return t(this,C)}get gap(){return t(this,T)}get counter(){return t(this,y)}get limit(){return t(this,l).length-t(this,U).current}get distance(){return t(this,Ct)}get loopDistance(){return t(this,k).current?t(this,Ct)+t(this,T):t(this,Ct)}get overscroll(){return t(this,re)}get vertical(){return t(this,I).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,I).current==="y"?0:t(this,p).distance}get scrollHeight(){return t(this,I).current==="x"?0:t(this,p).distance}onScroll(...e){return t(this,p).subscribe(...e)}offScroll(...e){t(this,p).unsubscribe(...e)}range(e,s,i=0){const a=e-i,g=a+s+i*2;return this.currentProgress<a?0:this.currentProgress>g?1:(this.currentProgress-a)/(g-a)}curve(e,s,i=0){return Math.sin(this.range(e,s,i)*Math.PI)}visible(e,s,i=0){const a=e-i,g=a+s+i*2;return this.currentProgress>=a&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,l).length)return;const i=t(this,y).current;o(this,u,ts).call(this,e);const a=t(this,l)[i],g=t(this,l)[t(this,y).current];if(a&&g){let O=0;const te=o(this,u,We).call(this),fs=te?this.targetScrollValue-te.position:0;t(this,k).current?t(this,y).current===0&&i===t(this,l).length-1?O=t(this,C)+t(this,E)-a.position+t(this,T):t(this,y).current===t(this,l).length-1&&i===0?O=g.position-(t(this,C)+t(this,E)+t(this,T)):O=g.position-a.position:O=g.position-a.position,this.shiftPosition(O-fs,s)}}shiftSections(e,s){t(this,l).length&&this.scrollToSection(t(this,y).current+e,s)}setPosition(e,s){s!=null&&s.tween?(t(this,et).set(t(this,p).current,{equalize:!0}),t(this,et).set(e,je({},s.tween))):t(this,p).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"})}shiftPosition(e,s){this.setPosition(t(this,p).target+e,s)}connectedCallback(){t(this,Tt).observe(),t(this,I).observe(),t(this,J).observe(),t(this,Q).observe(),t(this,W).observe(),t(this,X).observe(),t(this,pt).observe(),t(this,dt).observe(),t(this,U).observe(),t(this,k).observe(),t(this,qt).observe(),t(this,Mt).observe(),t(this,At).observe(),t(this,Bt).observe(),t(this,se).observe(),t(this,N).observe(),t(this,N).observe(),t(this,Ht).observe(),t(this,ft).observe(),t(this,G).observe(),t(this,bt).observe(),t(this,Y).observe(),t(this,mt).observe(),t(this,_t).observe(),t(this,$t).observe(),t(this,Wt).observe(),o(this,u,_e).call(this)}disconnectedCallback(){t(this,Tt).unobserve(),t(this,I).unobserve(),t(this,J).unobserve(),t(this,Q).unobserve(),t(this,W).unobserve(),t(this,X).unobserve(),t(this,pt).unobserve(),t(this,dt).unobserve(),t(this,U).unobserve(),t(this,k).unobserve(),t(this,qt).unobserve(),t(this,Mt).unobserve(),t(this,At).unobserve(),t(this,Bt).unobserve(),t(this,se).unobserve(),t(this,N).unobserve(),t(this,Ht).unobserve(),t(this,ft).unobserve(),t(this,G).unobserve(),t(this,bt).unobserve(),t(this,Y).unobserve(),t(this,mt).unobserve(),t(this,_t).unobserve(),t(this,$t).unobserve(),t(this,Wt).unobserve(),o(this,u,He).call(this)}}p=new WeakMap,Tt=new WeakMap,I=new WeakMap,J=new WeakMap,Q=new WeakMap,W=new WeakMap,X=new WeakMap,pt=new WeakMap,dt=new WeakMap,U=new WeakMap,k=new WeakMap,qt=new WeakMap,Mt=new WeakMap,At=new WeakMap,Bt=new WeakMap,se=new WeakMap,N=new WeakMap,Ht=new WeakMap,ft=new WeakMap,G=new WeakMap,bt=new WeakMap,Y=new WeakMap,mt=new WeakMap,_t=new WeakMap,$t=new WeakMap,Wt=new WeakMap,d=new WeakMap,ie=new WeakMap,l=new WeakMap,ge=new WeakMap,Ce=new WeakMap,E=new WeakMap,C=new WeakMap,T=new WeakMap,K=new WeakMap,gt=new WeakMap,tt=new WeakMap,z=new WeakMap,y=new WeakMap,re=new WeakMap,Ct=new WeakMap,Ut=new WeakMap,Nt=new WeakMap,ne=new WeakMap,et=new WeakMap,u=new WeakSet,fe=function(){o(this,u,ee).call(this),t(this,ie).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&t(this,l).push(new ws(e,s,this))}),t(this,d).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,q).call(this),o(this,u,Dt).call(this)},ee=function(){t(this,l).forEach(e=>{e.destroy()}),n(this,l,[]),t(this,y).current=0,t(this,p).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))},Ae=function(){t(this,Ut)||(n(this,Ut,!0),t(this,p).unsubscribe(t(this,ye)),t(this,p).unlistenAnimationFrame(),t(this,K).disconnect(),t(this,gt).disconnect(),t(this,tt).disconnect(),t(this,z).disconnect(),clearInterval(t(this,ne)),t(this,et).unlistenAnimationFrame())},Be=function(){t(this,Ut)&&(n(this,Ut,!1),t(this,p).subscribe(t(this,ye)),t(this,K).connect(),t(this,gt).connect(),t(this,tt).connect(),t(this,N).current&&t(this,z).connect())},He=function(){t(this,Nt)||(n(this,Nt,!0),de.windowResizer.unsubscribe(t(this,q)),Oe.elementResizer.unsubscribe(t(this,q)),t(this,p).reset(),o(this,u,Ae).call(this),t(this,d).style.transform="",t(this,W).current&&o(this,u,ee).call(this),Yt.scrollEntries.unregister(this))},_e=function(){t(this,Nt)&&(n(this,Nt,!1),t(this,W).current&&o(this,u,fe).call(this),Yt.scrollEntries.register(this),de.windowResizer.subscribe(t(this,q),be.RESIZE_ORDER.SCROLL),Oe.elementResizer.subscribe(this,t(this,q)),o(this,u,Be).call(this))},q=new WeakMap,ye=new WeakMap,ts=function(e){t(this,k).current?(t(this,y).current=e%t(this,l).length,t(this,y).current=t(this,y).current<0?t(this,l).length+t(this,y).current:t(this,y).current):t(this,y).current=Ne.clamp(e,0,this.limit)},he=new WeakMap,ve=new WeakMap,$e=function(e="current"){if(t(this,k).current&&t(this,l).length){const s=t(this,p)[e]%(t(this,C)+t(this,E)+t(this,T));return s<0?t(this,C)+s+t(this,E)+t(this,T):s}else return t(this,p)[e]},Dt=function(){if(t(this,G).current&&t(this,l).length){const e=t(this,y).current+t(this,bt).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const s=t(this,U).current+t(this,Y).current;t(this,l).forEach((i,a)=>{const g=e-this.limit-1+t(this,Y).current,O=e+s,te=this.sections.length-O;a>=e&&a<O||a<=g?i.mark("current"):a>=O&&a<O+te/2||a<=g+s?i.mark("next"):i.mark("previous")})}},We=function(){let e=null,s=1/0;for(let i=0;i<t(this,l).length;i++){const a=Math.abs(t(this,l)[i].position-this.targetScrollValue);a<s&&(s=a,e=i)}return e!==null?t(this,l)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ie);var Pe;class qe extends HTMLElement{constructor(){super(...arguments);r(this,Pe,null)}get scrollElement(){return t(this,Pe)}connectedCallback(){const e=Es.findParentElement(this,Ie);e instanceof Ie?n(this,Pe,e):console.error(this,"e-scroll not found")}}Pe=new WeakMap;var yt,R,st,it,oe,ce,Gt,Ee,we,xe;class es extends qe{constructor(){super();r(this,yt,null);r(this,R,null);r(this,st,!1);r(this,it,0);r(this,oe,0);r(this,ce,0);r(this,Gt,()=>{n(this,st,this.offsetWidth>this.offsetHeight);const e=t(this,st)?this.offsetWidth:this.offsetHeight;n(this,it,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),n(this,it,Math.max(t(this,it),30)),t(this,st)?(t(this,R).style.width=t(this,it)+"px",t(this,R).style.height="100%"):(t(this,R).style.width="100%",t(this,R).style.height=t(this,it)+"px"),n(this,oe,e-t(this,it)),this.scrollElement.scrollSize||(this.style.display="none")});r(this,Ee,()=>{n(this,ce,this.scrollElement.currentProgress*t(this,oe)),t(this,st)?t(this,R).style.transform=`translate3d(${t(this,ce)}px, 0px, 0px)`:t(this,R).style.transform=`translate3d(0px, ${t(this,ce)}px, 0px)`});r(this,we,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});r(this,xe,e=>{document.documentElement.classList.add("grabbing"),Ps.setupDrag(a=>{const g=t(this,st)?a.x:a.y,O=this.scrollElement.distance/t(this,oe),te=(g-i)*O;this.scrollElement.setPosition(s+te)},()=>{document.documentElement.classList.remove("grabbing")});const s=this.scrollElement.damped.target,i=t(this,st)?e.x:e.y});if(Te.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Qe.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"black",borderRadius:"0.3vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),this.setAttribute("drag-dead-zone",""),n(this,yt,document.createElement("slot")),t(this,yt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,yt))}}get thumbElement(){return t(this,R)}connectedCallback(){super.connectedCallback();const e=t(this,yt).assignedElements()[0]||t(this,yt).firstElementChild;n(this,R,e),t(this,R).addEventListener("pointerdown",t(this,xe)),de.windowResizer.subscribe(t(this,Gt),be.RESIZE_ORDER.SCROLL+1),Oe.elementResizer.subscribe(this,t(this,Gt)),this.scrollElement.onScroll(t(this,Ee)),this.scrollElement.axisCSSProperty.subscribe(t(this,we))}disconnectedCallback(){t(this,R).removeEventListener("pointerdown",t(this,xe)),de.windowResizer.unsubscribe(t(this,Gt)),Oe.elementResizer.unsubscribe(t(this,Gt)),this.scrollElement.offScroll(t(this,Ee)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,we))}}yt=new WeakMap,R=new WeakMap,st=new WeakMap,it=new WeakMap,oe=new WeakMap,ce=new WeakMap,Gt=new WeakMap,Ee=new WeakMap,we=new WeakMap,xe=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",es);class ss extends qe{constructor(){super(),Te.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class is extends ss{handleClick(){const h=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(h||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",is);class rs extends ss{handleClick(){const h=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(h||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",rs);var rt,vt,le,Le,ze,ue;class Ls{constructor(h,e,s){r(this,rt,null);r(this,vt,null);r(this,le,null);r(this,Le,null);r(this,ze,()=>{t(this,vt).scrollToSection(t(this,le),{behaviour:t(this,Le)})});r(this,ue,()=>{t(this,rt).classList.toggle("current",t(this,vt).counter.current===t(this,le))});Te.isBrowser&&(n(this,rt,document.createElement("button")),n(this,vt,h),n(this,Le,s),n(this,le,e),t(this,rt).addEventListener("click",t(this,ze)),t(this,vt).counter.subscribe(t(this,ue)),t(this,ue).call(this))}get element(){return t(this,rt)}destroy(){t(this,rt).removeEventListener("click",t(this,ze)),t(this,vt).counter.unsubscribe(t(this,ue)),t(this,rt).remove()}}rt=new WeakMap,vt=new WeakMap,le=new WeakMap,Le=new WeakMap,ze=new WeakMap,ue=new WeakMap;var Pt,ae;class ns extends qe{constructor(){super(...arguments);r(this,Pt,[]);r(this,ae,Ye.debounce(()=>{t(this,Pt).forEach(e=>e.destroy()),n(this,Pt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const s=new Ls(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(s.element),t(this,Pt).push(s)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,ae)),t(this,ae).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,ae)),t(this,Pt).forEach(e=>e.destroy()),n(this,Pt,[])}}Pt=new WeakMap,ae=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",ns);var Kt,Zt,jt,Jt,Et,wt,xt,Lt,V,M,A,B,zt,w,nt,ht,ot,ct,lt,x,H,_,ut,at,Z,Ve,f,Qt,Xt,Fe,L,Vt,D,F,$,Se,Ft,P,b,os,cs,ls,us,as,Ss,ke,pe,Ot,ps,ds,Ue,Re;class hs extends qe{constructor(){super();r(this,b);r(this,Kt,new c.CSSProperty(this,"--damping",20));r(this,Zt,new c.CSSProperty(this,"--mass",0));r(this,jt,new c.CSSProperty(this,"--stiffness",0));r(this,Jt,new c.CSSProperty(this,"--target",""));r(this,Et,new c.CSSProperty(this,"--disabled",!1));r(this,wt,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1}));r(this,xt,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1}));r(this,Lt,new c.CSSProperty(this,"--capture-once",!1));r(this,V,new c.CSSProperty(this,"--captured",""));r(this,M,new c.CSSProperty(this,"--released",""));r(this,A,new c.CSSProperty(this,"--captured-from-start",""));r(this,B,new c.CSSProperty(this,"--captured-from-finish",""));r(this,zt,new c.CSSProperty(this,"--released-from-start",""));r(this,w,new c.CSSProperty(this,"--released-from-finish",""));r(this,nt,new c.CSSProperty(this,"--passed-var",""));r(this,ht,new c.CSSProperty(this,"--progress-var",""));r(this,ot,new c.CSSProperty(this,"--distance-var",""));r(this,ct,new c.CSSProperty(this,"--start-var",""));r(this,lt,new c.CSSProperty(this,"--finish-var",""));r(this,x,new Rt.Store(!1));r(this,H,new Rt.Store(!1));r(this,_,new Rt.Store(!1));r(this,ut,new Rt.Store(!1));r(this,at,new Rt.Store(!1));r(this,Z,new Rt.Store(!1));r(this,Ve,[]);r(this,f,this);r(this,Qt,0);r(this,Xt,0);r(this,Fe,0);r(this,L,new Xe.Damped(0,{order:be.TICK_ORDER.SCROLL-1,min:0,max:1}));r(this,Vt,0);r(this,D,0);r(this,F,0);r(this,$,0);r(this,Se,!1);r(this,Ft,!1);r(this,P,!0);r(this,ke,()=>{t(this,P)||(this.resize(),t(this,pe).call(this))});r(this,pe,()=>{!t(this,P)&&t(this,Se)&&this.tick()});r(this,Re,Ye.debounce(()=>{const e=Yt.scrollEntries.getAll(this).reverse();let s=0;e.forEach((i,a)=>{i.element===this.scrollElement&&(s=a)}),n(this,Ve,e.slice(s+1))},0))}get distanceOffsetCSSProperty(){return t(this,wt)}get startOffsetCSSProperty(){return t(this,xt)}get captureOnceCSSProperty(){return t(this,Lt)}get capturedCSSProperty(){return t(this,V)}get releasedCSSProperty(){return t(this,M)}get capturedFromStartCSSProperty(){return t(this,A)}get capturedFromFinishCSSProperty(){return t(this,B)}get releasedFromStartCSSProperty(){return t(this,zt)}get releasedFromFinishCSSProperty(){return t(this,w)}get passedVarCSSProperty(){return t(this,nt)}get progressVarCSSProperty(){return t(this,ht)}get distanceVarCSSProperty(){return t(this,ot)}get startVarCSSProperty(){return t(this,ct)}get finishVarCSSProperty(){return t(this,lt)}get disabledCSSProperty(){return t(this,Et)}get dampingCSSProperty(){return t(this,Kt)}get massCSSProperty(){return t(this,Zt)}get stiffnessCSSProperty(){return t(this,jt)}get targetCSSProperty(){return t(this,Jt)}get isCaptured(){return t(this,x)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,_)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,at)}get isReleasedFromFinish(){return t(this,Z)}get directionPosition(){return t(this,Qt)}get directionSize(){return t(this,Xt)}get passed(){return t(this,L)}get progress(){return t(this,Vt)}get start(){return t(this,D)}get finish(){return t(this,$)}get distance(){return t(this,F)}get isCapturedOnce(){return t(this,Ft)}get isDisabled(){return t(this,P)}resize(){n(this,Xt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),n(this,Qt,this.scrollElement.vertical?kt.getCumulativeOffsetTop(this,this.scrollElement):kt.getCumulativeOffsetLeft(this,this.scrollElement)),n(this,D,this.getStart()),n(this,F,this.getDistance()),n(this,D,t(this,D)+t(this,xt).current),n(this,F,t(this,F)+t(this,wt).current),n(this,$,t(this,D)+t(this,F)),this.scrollElement.currentScrollValue>t(this,$)&&!t(this,x).current&&!t(this,H).current&&(t(this,x).current=!0),this.setVar(t(this,ct).current,t(this,D)),this.setVar(t(this,lt).current,t(this,$)),this.setVar(t(this,ot).current,t(this,F)),t(this,L).max=t(this,F),n(this,Se,!0)}tick(){let e=this.scrollElement.currentScrollValue;t(this,Ve).forEach(i=>{e+=i.value}),t(this,L).set(e-t(this,D));const s=Math.round(e);t(this,x).current&&(s>t(this,D)?t(this,_).current||o(this,b,ls).call(this):t(this,_).current&&!t(this,ut).current&&o(this,b,as).call(this),s<t(this,$)?t(this,Z).current&&!t(this,at).current&&o(this,b,us).call(this):t(this,_).current&&!t(this,Z).current&&o(this,b,Ss).call(this)),s>t(this,D)&&s<t(this,$)?t(this,x).current||o(this,b,os).call(this):t(this,x).current&&(t(this,L).set(Ne.step(t(this,F)/2,t(this,L).current,0,t(this,F))),o(this,b,cs).call(this)),t(this,Ft)&&t(this,Lt).current&&(t(this,V).current&&t(this,f).classList.add(t(this,V).current),n(this,P,!0))}disable(){this.style.cssText="",n(this,Qt,0),n(this,Xt,0),t(this,L).reset(),n(this,Vt,0),n(this,D,0),n(this,F,0),n(this,$,0),n(this,Se,!1),t(this,x).current=!1,t(this,H).current=!1,t(this,_).current=!1,t(this,ut).current=!1,t(this,at).current=!1,t(this,Z).current=!1,n(this,Ft,!1),n(this,P,!0),o(this,b,Ue).call(this)}enable(){n(this,P,!1)}connectedCallback(){super.connectedCallback(),t(this,Kt).observe(),t(this,Zt).observe(),t(this,jt).observe(),t(this,Jt).observe(),t(this,Et).observe(),t(this,wt).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,V).observe(),t(this,M).observe(),t(this,A).observe(),t(this,B).observe(),t(this,zt).observe(),t(this,w).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,ct).observe(),t(this,lt).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",t(this,Re)),t(this,Re).call(this),t(this,Et).current||this.enable(),t(this,Kt).subscribe(s=>{t(this,L).damping=s.current}),t(this,Zt).subscribe(s=>{t(this,L).mass=s.current}),t(this,jt).subscribe(s=>{t(this,L).stiffness=s.current}),t(this,Jt).subscribe(s=>{s.previous&&o(this,b,Ue).call(this),s.current?s.current==="parent"?n(this,f,this.parentElement||this):n(this,f,document.querySelector(s.current)||this):n(this,f,this)}),t(this,Et).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,xt).subscribe(()=>{e&&!t(this,P)&&this.resize()}),t(this,wt).subscribe(()=>{e&&!t(this,P)&&this.resize()}),t(this,V).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,A).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,M).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,zt).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,w).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,Lt).subscribe(s=>{t(this,P)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,nt).subscribe(s=>{t(this,P)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ht).subscribe(s=>{t(this,P)||(this.removeVar(s.previous),this.setVar(s.current,t(this,Vt)))}),t(this,ct).subscribe(s=>{t(this,P)||(this.removeVar(s.previous),this.setVar(s.current,t(this,D)))}),t(this,lt).subscribe(s=>{t(this,P)||(this.removeVar(s.previous),this.setVar(s.current,t(this,$)))}),t(this,ot).subscribe(s=>{t(this,P)||(this.removeVar(s.previous),this.setVar(s.current,t(this,F)))}),t(this,L).subscribe(s=>{n(this,Vt,t(this,L).current/t(this,F)||0),this.setVar(t(this,nt).current,t(this,L).current.toFixed(6)),this.setVar(t(this,ht).current,t(this,Vt).toFixed(6))}),de.windowResizer.subscribe(t(this,ke),be.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,pe)),e=!0}disconnectedCallback(){de.windowResizer.unsubscribe(t(this,ke)),this.scrollElement.offScroll(t(this,pe)),t(this,Kt).close(),t(this,Zt).close(),t(this,jt).close(),t(this,Jt).close(),t(this,Et).close(),t(this,wt).close(),t(this,xt).close(),t(this,Lt).close(),t(this,V).close(),t(this,M).close(),t(this,A).close(),t(this,B).close(),t(this,zt).close(),t(this,w).close(),t(this,nt).close(),t(this,ht).close(),t(this,ot).close(),t(this,ct).close(),t(this,lt).close(),t(this,x).close(),t(this,H).close(),t(this,_).close(),t(this,ut).close(),t(this,at).close(),t(this,Z).close(),this.disable()}removeVar(e){e&&t(this,f).style.removeProperty(`--${e}`)}setVar(e,s){e&&t(this,f).style.setProperty(`--${e}`,s.toString())}getDistance(){return t(this,Xt)+t(this,Fe)}getStart(){return t(this,Qt)-t(this,Fe)}}Kt=new WeakMap,Zt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,Et=new WeakMap,wt=new WeakMap,xt=new WeakMap,Lt=new WeakMap,V=new WeakMap,M=new WeakMap,A=new WeakMap,B=new WeakMap,zt=new WeakMap,w=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,ct=new WeakMap,lt=new WeakMap,x=new WeakMap,H=new WeakMap,_=new WeakMap,ut=new WeakMap,at=new WeakMap,Z=new WeakMap,Ve=new WeakMap,f=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,Fe=new WeakMap,L=new WeakMap,Vt=new WeakMap,D=new WeakMap,F=new WeakMap,$=new WeakMap,Se=new WeakMap,Ft=new WeakMap,P=new WeakMap,b=new WeakSet,os=function(){t(this,x).current=!0,t(this,H).current=!1,n(this,Ft,!0),t(this,M).current&&t(this,f).classList.remove(t(this,M).current),t(this,w).current&&t(this,f).classList.remove(t(this,w).current),t(this,w).current&&t(this,f).classList.remove(t(this,w).current),t(this,V).current&&t(this,f).classList.add(t(this,V).current)},cs=function(){t(this,H).current=!0,t(this,x).current=!1,n(this,Ft,!0),t(this,V).current&&t(this,f).classList.remove(t(this,V).current),t(this,A).current&&t(this,f).classList.remove(t(this,A).current),t(this,B).current&&t(this,f).classList.remove(t(this,B).current),t(this,M).current&&t(this,f).classList.add(t(this,M).current)},ls=function(){t(this,x).current=!0,t(this,_).current=!0,t(this,ut).current=!1,t(this,A).current&&t(this,f).classList.add(t(this,A).current)},us=function(){t(this,x).current=!0,t(this,at).current=!0,t(this,Z).current=!1,t(this,B).current&&t(this,f).classList.add(t(this,B).current)},as=function(){t(this,H).current=!0,t(this,ut).current=!0,t(this,_).current=!1,t(this,w).current&&t(this,f).classList.add(t(this,w).current)},Ss=function(){t(this,H).current=!0,t(this,Z).current=!0,t(this,at).current=!1,t(this,w).current&&t(this,f).classList.add(t(this,w).current)},ke=new WeakMap,pe=new WeakMap,Ot=function(e){if(t(this,P)){e.previous&&t(this,f).classList.remove(e.previous),e.current&&t(this,f).classList.remove(e.current);return}e.current&&t(this,x).current?(e.previous&&t(this,f).classList.remove(e.previous),t(this,f).classList.add(e.current)):!e.current&&e.previous&&t(this,f).classList.remove(e.previous)},ps=function(...e){e.forEach(s=>{s&&t(this,f).classList.remove(s)})},ds=function(...e){e.forEach(s=>{s&&t(this,f).style.removeProperty(`--${s}`)})},Ue=function(){o(this,b,ps).call(this,t(this,V).current,t(this,A).current,t(this,B).current,t(this,M).current,t(this,zt).current,t(this,w).current),o(this,b,ds).call(this,t(this,nt).current,t(this,ht).current,t(this,ot).current,t(this,ct).current,t(this,lt).current)},Re=new WeakMap;customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",hs);exports.ScrollBulletButtonsElement=ns;exports.ScrollElement=Ie;exports.ScrollSegmentElement=hs;exports.ScrollSetButtonElement=is;exports.ScrollStepButtonElement=rs;exports.ScrollbarElement=es;