aptechka 0.36.1 → 0.37.1

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.
@@ -16,7 +16,8 @@ export declare class PopoverElement extends HTMLElement {
16
16
  private static __opened;
17
17
  get history(): CSSProperty<false>;
18
18
  get restore(): CSSProperty<false>;
19
- get dominance(): CSSProperty<number>;
19
+ get dominance(): CSSProperty<0>;
20
+ get group(): CSSProperty<"">;
20
21
  get clickOutside(): CSSProperty<false>;
21
22
  get escape(): CSSProperty<false>;
22
23
  get opened(): Store<boolean>;
@@ -1 +1 @@
1
- "use strict";var W=n=>{throw TypeError(n)};var B=(n,h,t)=>h.has(n)||W("Cannot "+t);var e=(n,h,t)=>(B(n,h,"read from private field"),t?t.call(n):h.get(n)),s=(n,h,t)=>h.has(n)?W("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(n):h.set(n,t),i=(n,h,t,c)=>(B(n,h,"write to private field"),c?c.call(n,t):h.set(n,t),t),_=(n,h,t)=>(B(n,h,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../css-property/index.cjs"),K=require("../Store-CDb6RMce.cjs"),$=require("../events-KVanG9sR.cjs"),Q=require("../function-MthRj-GJ.cjs"),V=require("../style-At6aDoqG.cjs"),F=require("../window-resizer/vanilla/index.cjs"),X=require("../browser-CpzFX2xg.cjs");var A,l,x,b,d,v,p,g,m,f,L,u,G,E,N,w,j,T,C,q,P;const a=class a extends HTMLElement{constructor(){super(...arguments);s(this,u);s(this,A);s(this,l);s(this,x);s(this,b);s(this,d);s(this,v);s(this,p);s(this,g);s(this,m);s(this,f);s(this,L);s(this,E);s(this,w);s(this,T);s(this,C);s(this,q);s(this,P);i(this,A,-1),i(this,l,new K.Store(!1)),i(this,d,new k.CSSProperty(this,"--history",!1)),i(this,v,new k.CSSProperty(this,"--restore",!1)),i(this,p,new k.CSSProperty(this,"--dominance",-1)),i(this,g,new k.CSSProperty(this,"--click-outside",!1)),i(this,m,new k.CSSProperty(this,"--escape",!1)),i(this,f,!1),this.open=t=>{if(e(this,l).current)return;i(this,L,t==null?void 0:t.trigger),e(this,l).current=!0,e(this,p).current&&(a.__opened=a.__opened.filter(o=>o!==this&&o.dominance.current!==0&&this.dominance.current>=o.dominance.current?(o.close(),!1):!0)),a.__opened.push(this),i(this,A,a.__opened.length-1),e(this,d).current&&e(this,f)&&history.pushState("","",e(this,u,G)),clearTimeout(e(this,x)),this.classList.remove("closing"),this.classList.add("triggered"),this.style.display="block",$.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,L)}});const c=()=>{addEventListener("click",e(this,E)),addEventListener("keydown",e(this,w)),e(this,P).call(this),this.style.opacity="1",this.classList.add("opened"),$.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,L)}}),i(this,b,void 0)};t!=null&&t.skipTransition?c():i(this,b,setTimeout(c,10))},this.close=()=>{e(this,l).current&&(removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,w)),e(this,l).current=!1,a.__opened=a.__opened.filter(t=>t===this?!1:e(t,p).current!==0&&e(t,p).current<this.dominance.current&&!e(t,b)?(t.close(),!1):!0),_(this,u,N).call(this),this.classList.remove("opened"),this.classList.add("closing"),this.style.opacity="0",$.dispatchEvent(this,"popoverClosing",{custom:!0}),setTimeout(()=>{this.classList.remove("triggered"),this.classList.remove("closing"),this.style.display="none",$.dispatchEvent(this,"popoverClosed",{custom:!0})},V.getElementTransitionDurationMS(this)+10))},i(this,E,t=>{e(this,g).current&&_(this,u,j).call(this,()=>{var D;const c=t.composedPath();if(c.find(U=>U instanceof HTMLElement&&U.hasAttribute("data-popover-content")))return;const o=c[0],z=o instanceof HTMLElement&&(this.contains(o)||((D=this.shadowRoot)==null?void 0:D.contains(o))),S=o instanceof HTMLElement&&o.hasAttribute("data-outside");(!z||S)&&this.close()})}),i(this,w,t=>{e(this,m).current&&_(this,u,j).call(this,()=>{t.code==="Escape"&&this.close()})}),i(this,T,()=>{i(this,f,!1),e(this,l).current&&e(this,d).current&&!location.search.includes(this.id)?this.close():!e(this,l).current&&e(this,d).current&&location.search.includes(this.id)&&this.open(),i(this,f,!0)}),i(this,C,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,q).call(this)}),i(this,q,Q.debounce(()=>{e(this,P).call(this)},10)),i(this,P,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")})}get history(){return e(this,d)}get restore(){return e(this,v)}get dominance(){return e(this,p)}get clickOutside(){return e(this,g)}get escape(){return e(this,m)}get opened(){return e(this,l)}get lastTrigger(){return e(this,L)}connectedCallback(){e(this,d).observe(),e(this,v).observe(),e(this,p).observe(),e(this,g).observe(),e(this,m).observe(),this.style.opacity="0",this.style.display="none",this.setAttribute("popover-target",""),this.classList.remove("closing"),this.classList.remove("closed"),this.classList.remove("triggered"),this.classList.remove("opened"),addEventListener("popstate",e(this,T)),setTimeout(()=>{e(this,v).current?e(this,T).call(this):(_(this,u,N).call(this),i(this,f,!0))},0),F.windowResizer.subscribe(e(this,C))}disconnectedCallback(){F.windowResizer.unsubscribe(e(this,C)),e(this,d).unobserve(),e(this,v).unobserve(),e(this,p).unobserve(),e(this,g).unobserve(),e(this,m).unobserve(),this.style.opacity="",this.style.display="",this.removeAttribute("popover-target"),a.__opened=a.__opened.filter(t=>t!==this),clearTimeout(e(this,x)),clearTimeout(e(this,b)),removeEventListener("popstate",e(this,T)),removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,w)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height")}};A=new WeakMap,l=new WeakMap,x=new WeakMap,b=new WeakMap,d=new WeakMap,v=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,f=new WeakMap,L=new WeakMap,u=new WeakSet,G=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},E=new WeakMap,N=function(){if(e(this,d).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}},w=new WeakMap,j=function(t){(a.__opened[e(this,A)-1]||a.__opened.length===1||a.__opened.filter(c=>c!==this).every(c=>e(this,p).current>c.dominance.current))&&t()},T=new WeakMap,C=new WeakMap,q=new WeakMap,P=new WeakMap,a.__opened=[];let I=a;customElements.get("e-popover")||customElements.define("e-popover",I);var r,y,M,O,R,H;class J extends HTMLElement{constructor(){super();s(this,r);s(this,y,new k.CSSProperty(this,"--type","open"));s(this,M,()=>{this.classList.add("triggered")});s(this,O,()=>{this.classList.add("opened"),this.setAttribute("aria-expanded","true")});s(this,R,()=>{this.classList.remove("opened")});s(this,H,()=>{this.classList.remove("triggered"),this.setAttribute("aria-expanded","false")});X.isBrowser&&(this.addEventListener("click",()=>{if(e(this,r)){const t=e(this,y).current;t==="open"||t==="toggle"&&!e(this,r).opened.current?e(this,r).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,r).opened.current)&&e(this,r).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get type(){return e(this,y)}get popoverElement(){return e(this,r)}connectedCallback(){var c;e(this,y).subscribe(o=>{e(this,r)&&(o.current!=="close"?(this.setAttribute("aria-has-popup","true"),this.setAttribute("aria-expanded",e(this,r).opened.current?"true":"false"),this.setAttribute("aria-controls",e(this,r).id||"")):(this.removeAttribute("aria-has-popup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let o=null;if(t==="parent"){const z=this.closest("[popover-target]");if(z)o=z;else{const S=this.getRootNode();S instanceof ShadowRoot?o=S.host.closest("[popover-target]"):S instanceof HTMLElement&&(o=S.closest("[popover-target]"))}}else t==="sibling"?o=(c=this.parentElement)==null?void 0:c.querySelector("[popover-target]"):o=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);o instanceof HTMLElement?(i(this,r,o),e(this,r).addEventListener("popoverTriggered",e(this,M)),e(this,r).addEventListener("popoverOpened",e(this,O)),e(this,r).addEventListener("popoverClosing",e(this,R)),e(this,r).addEventListener("popoverClosed",e(this,H))):console.warn(this,`target ${t} not found`)}e(this,y).observe()}disconnectedCallback(){e(this,y).unobserve(),this.removeAttribute("aria-has-popup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),e(this,r)&&(e(this,r).removeEventListener("popoverTriggered",e(this,M)),e(this,r).removeEventListener("popoverOpened",e(this,O)),e(this,r).removeEventListener("popoverClosing",e(this,R)),e(this,r).removeEventListener("popoverClosed",e(this,H)))}}r=new WeakMap,y=new WeakMap,M=new WeakMap,O=new WeakMap,R=new WeakMap,H=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",J);exports.PopoverButtonElement=J;exports.PopoverElement=I;
1
+ "use strict";var G=h=>{throw TypeError(h)};var N=(h,c,t)=>c.has(h)||G("Cannot "+t);var e=(h,c,t)=>(N(h,c,"read from private field"),t?t.call(h):c.get(h)),s=(h,c,t)=>c.has(h)?G("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(h):c.set(h,t),i=(h,c,t,o)=>(N(h,c,"write to private field"),o?o.call(h,t):c.set(h,t),t),b=(h,c,t)=>(N(h,c,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../css-property/index.cjs"),V=require("../Store-CDb6RMce.cjs"),I=require("../events-KVanG9sR.cjs"),X=require("../function-MthRj-GJ.cjs"),Y=require("../style-At6aDoqG.cjs"),J=require("../window-resizer/vanilla/index.cjs"),Z=require("../browser-CpzFX2xg.cjs");var A,d,q,w,p,g,v,u,m,f,y,S,l,K,T,D,k,j,C,_,M,x,U;const a=class a extends HTMLElement{constructor(){super(...arguments);s(this,l);s(this,A);s(this,d);s(this,q);s(this,w);s(this,p);s(this,g);s(this,v);s(this,u);s(this,m);s(this,f);s(this,y);s(this,S);s(this,T);s(this,k);s(this,C);s(this,_);s(this,M);s(this,x);i(this,A,-1),i(this,d,new V.Store(!1)),i(this,p,new E.CSSProperty(this,"--history",!1)),i(this,g,new E.CSSProperty(this,"--restore",!1)),i(this,v,new E.CSSProperty(this,"--dominance",0)),i(this,u,new E.CSSProperty(this,"--group","")),i(this,m,new E.CSSProperty(this,"--click-outside",!1)),i(this,f,new E.CSSProperty(this,"--escape",!1)),i(this,y,!1),this.open=t=>{if(e(this,d).current)return;i(this,S,t==null?void 0:t.trigger),e(this,d).current=!0,e(this,v).current&&(a.__opened=a.__opened.filter(n=>n!==this&&b(this,l,U).call(this,this,n)?(n.close(),!1):!0)),a.__opened.push(this),i(this,A,a.__opened.length-1),e(this,p).current&&e(this,y)&&history.pushState("","",e(this,l,K)),clearTimeout(e(this,q)),this.classList.remove("closing"),this.classList.add("triggered"),this.style.display="block",I.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,S)}});const o=()=>{addEventListener("click",e(this,T)),addEventListener("keydown",e(this,k)),e(this,x).call(this),this.style.opacity="1",this.classList.add("opened"),I.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,S)}}),i(this,w,void 0)};t!=null&&t.skipTransition?o():i(this,w,setTimeout(o,10))},this.close=()=>{e(this,d).current&&(removeEventListener("click",e(this,T)),removeEventListener("keydown",e(this,k)),e(this,d).current=!1,a.__opened=a.__opened.filter(t=>t===this?!1:!e(t,w)&&b(this,l,U).call(this,this,t)?(t.close(),!1):!0),b(this,l,D).call(this),this.classList.remove("opened"),this.classList.add("closing"),this.style.opacity="0",I.dispatchEvent(this,"popoverClosing",{custom:!0}),setTimeout(()=>{this.classList.remove("triggered"),this.classList.remove("closing"),this.style.display="none",I.dispatchEvent(this,"popoverClosed",{custom:!0})},Y.getElementTransitionDurationMS(this)+10))},i(this,T,t=>{e(this,m).current&&b(this,l,j).call(this,()=>{var W;const o=t.composedPath();if(o.find(F=>F instanceof HTMLElement&&F.hasAttribute("data-popover-content")))return;const n=o[0],$=n instanceof HTMLElement&&(this.contains(n)||((W=this.shadowRoot)==null?void 0:W.contains(n))),P=n instanceof HTMLElement&&n.hasAttribute("data-outside");(!$||P)&&this.close()})}),i(this,k,t=>{e(this,f).current&&b(this,l,j).call(this,()=>{t.code==="Escape"&&this.close()})}),i(this,C,()=>{i(this,y,!1),e(this,d).current&&e(this,p).current&&!location.search.includes(this.id)?this.close():!e(this,d).current&&e(this,p).current&&location.search.includes(this.id)&&this.open(),i(this,y,!0)}),i(this,_,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,M).call(this)}),i(this,M,X.debounce(()=>{e(this,x).call(this)},10)),i(this,x,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")})}get history(){return e(this,p)}get restore(){return e(this,g)}get dominance(){return e(this,v)}get group(){return e(this,u)}get clickOutside(){return e(this,m)}get escape(){return e(this,f)}get opened(){return e(this,d)}get lastTrigger(){return e(this,S)}connectedCallback(){e(this,p).observe(),e(this,g).observe(),e(this,v).observe(),e(this,u).observe(),e(this,m).observe(),e(this,f).observe(),this.style.opacity="0",this.style.display="none",this.setAttribute("popover-target",""),this.classList.remove("closing"),this.classList.remove("closed"),this.classList.remove("triggered"),this.classList.remove("opened"),addEventListener("popstate",e(this,C)),setTimeout(()=>{e(this,g).current?e(this,C).call(this):(b(this,l,D).call(this),i(this,y,!0))},0),J.windowResizer.subscribe(e(this,_))}disconnectedCallback(){J.windowResizer.unsubscribe(e(this,_)),e(this,p).close(),e(this,g).close(),e(this,v).close(),e(this,u).close(),e(this,m).close(),e(this,f).close(),this.style.opacity="",this.style.display="",this.removeAttribute("popover-target"),a.__opened=a.__opened.filter(t=>t!==this),clearTimeout(e(this,q)),clearTimeout(e(this,w)),removeEventListener("popstate",e(this,C)),removeEventListener("click",e(this,T)),removeEventListener("keydown",e(this,k)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height")}};A=new WeakMap,d=new WeakMap,q=new WeakMap,w=new WeakMap,p=new WeakMap,g=new WeakMap,v=new WeakMap,u=new WeakMap,m=new WeakMap,f=new WeakMap,y=new WeakMap,S=new WeakMap,l=new WeakSet,K=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},T=new WeakMap,D=function(){if(e(this,p).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}},k=new WeakMap,j=function(t){(a.__opened[e(this,A)-1]||a.__opened.length===1||a.__opened.filter(o=>o!==this).every(o=>e(this,v).current>o.dominance.current))&&t()},C=new WeakMap,_=new WeakMap,M=new WeakMap,x=new WeakMap,U=function(t,o){if(console.log(e(t,u).current,e(o,u).current),e(t,u).current===e(o,u).current&&t.dominance.current>=o.dominance.current)return!0},a.__opened=[];let B=a;customElements.get("e-popover")||customElements.define("e-popover",B);var r,L,O,R,H,z;class Q extends HTMLElement{constructor(){super();s(this,r);s(this,L,new E.CSSProperty(this,"--type","open"));s(this,O,()=>{this.classList.add("triggered")});s(this,R,()=>{this.classList.add("opened"),this.setAttribute("aria-expanded","true")});s(this,H,()=>{this.classList.remove("opened")});s(this,z,()=>{this.classList.remove("triggered"),this.setAttribute("aria-expanded","false")});Z.isBrowser&&(this.addEventListener("click",()=>{if(e(this,r)){const t=e(this,L).current;t==="open"||t==="toggle"&&!e(this,r).opened.current?e(this,r).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,r).opened.current)&&e(this,r).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get type(){return e(this,L)}get popoverElement(){return e(this,r)}connectedCallback(){var o;e(this,L).subscribe(n=>{e(this,r)&&(n.current!=="close"?(this.setAttribute("aria-has-popup","true"),this.setAttribute("aria-expanded",e(this,r).opened.current?"true":"false"),this.setAttribute("aria-controls",e(this,r).id||"")):(this.removeAttribute("aria-has-popup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let n=null;if(t==="parent"){const $=this.closest("[popover-target]");if($)n=$;else{const P=this.getRootNode();P instanceof ShadowRoot?n=P.host.closest("[popover-target]"):P instanceof HTMLElement&&(n=P.closest("[popover-target]"))}}else t==="sibling"?n=(o=this.parentElement)==null?void 0:o.querySelector("[popover-target]"):n=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);n instanceof HTMLElement?(i(this,r,n),e(this,r).addEventListener("popoverTriggered",e(this,O)),e(this,r).addEventListener("popoverOpened",e(this,R)),e(this,r).addEventListener("popoverClosing",e(this,H)),e(this,r).addEventListener("popoverClosed",e(this,z))):console.warn(this,`target ${t} not found`)}e(this,L).observe()}disconnectedCallback(){e(this,L).unobserve(),this.removeAttribute("aria-has-popup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),e(this,r)&&(e(this,r).removeEventListener("popoverTriggered",e(this,O)),e(this,r).removeEventListener("popoverOpened",e(this,R)),e(this,r).removeEventListener("popoverClosing",e(this,H)),e(this,r).removeEventListener("popoverClosed",e(this,z)))}}r=new WeakMap,L=new WeakMap,O=new WeakMap,R=new WeakMap,H=new WeakMap,z=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",Q);exports.PopoverButtonElement=Q;exports.PopoverElement=B;
@@ -1,151 +1,158 @@
1
- var j = (n) => {
2
- throw TypeError(n);
1
+ var G = (h) => {
2
+ throw TypeError(h);
3
3
  };
4
- var q = (n, h, t) => h.has(n) || j("Cannot " + t);
5
- var e = (n, h, t) => (q(n, h, "read from private field"), t ? t.call(n) : h.get(n)), s = (n, h, t) => h.has(n) ? j("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(n) : h.set(n, t), i = (n, h, t, c) => (q(n, h, "write to private field"), c ? c.call(n, t) : h.set(n, t), t), _ = (n, h, t) => (q(n, h, "access private method"), t);
6
- import { CSSProperty as A } from "../css-property/index.js";
7
- import { S as J } from "../Store-OTdcl6SX.js";
8
- import { d as z } from "../events-CsVF98U6.js";
9
- import { d as K } from "../function-C10DGppn.js";
10
- import { g as Q } from "../style-j2TwriJ_.js";
11
- import { windowResizer as F } from "../window-resizer/vanilla/index.js";
12
- import { i as V } from "../browser-0zX67oeU.js";
13
- var S, l, P, y, d, v, p, m, g, f, b, u, G, E, B, T, D, w, x, H, C;
4
+ var N = (h, c, t) => c.has(h) || G("Cannot " + t);
5
+ var e = (h, c, t) => (N(h, c, "read from private field"), t ? t.call(h) : c.get(h)), s = (h, c, t) => c.has(h) ? G("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(h) : c.set(h, t), i = (h, c, t, o) => (N(h, c, "write to private field"), o ? o.call(h, t) : c.set(h, t), t), b = (h, c, t) => (N(h, c, "access private method"), t);
6
+ import { CSSProperty as E } from "../css-property/index.js";
7
+ import { S as Q } from "../Store-OTdcl6SX.js";
8
+ import { d as q } from "../events-CsVF98U6.js";
9
+ import { d as V } from "../function-C10DGppn.js";
10
+ import { g as X } from "../style-j2TwriJ_.js";
11
+ import { windowResizer as J } from "../window-resizer/vanilla/index.js";
12
+ import { i as Y } from "../browser-0zX67oeU.js";
13
+ var C, d, H, T, p, v, g, u, m, f, L, w, l, K, k, D, A, U, S, _, M, P, W;
14
14
  const a = class a extends HTMLElement {
15
15
  constructor() {
16
16
  super(...arguments);
17
- s(this, u);
18
- s(this, S);
19
17
  s(this, l);
20
- s(this, P);
21
- s(this, y);
18
+ s(this, C);
22
19
  s(this, d);
23
- s(this, v);
20
+ s(this, H);
21
+ s(this, T);
24
22
  s(this, p);
25
- s(this, m);
23
+ s(this, v);
26
24
  s(this, g);
25
+ s(this, u);
26
+ s(this, m);
27
27
  s(this, f);
28
- s(this, b);
29
- s(this, E);
30
- s(this, T);
28
+ s(this, L);
31
29
  s(this, w);
32
- s(this, x);
33
- s(this, H);
34
- s(this, C);
35
- i(this, S, -1), i(this, l, new J(!1)), i(this, d, new A(this, "--history", !1)), i(this, v, new A(this, "--restore", !1)), i(this, p, new A(this, "--dominance", -1)), i(this, m, new A(this, "--click-outside", !1)), i(this, g, new A(this, "--escape", !1)), i(this, f, !1), this.open = (t) => {
36
- if (e(this, l).current)
30
+ s(this, k);
31
+ s(this, A);
32
+ s(this, S);
33
+ s(this, _);
34
+ s(this, M);
35
+ s(this, P);
36
+ i(this, C, -1), i(this, d, new Q(!1)), i(this, p, new E(this, "--history", !1)), i(this, v, new E(this, "--restore", !1)), i(this, g, new E(this, "--dominance", 0)), i(this, u, new E(this, "--group", "")), i(this, m, new E(this, "--click-outside", !1)), i(this, f, new E(this, "--escape", !1)), i(this, L, !1), this.open = (t) => {
37
+ if (e(this, d).current)
37
38
  return;
38
- i(this, b, t == null ? void 0 : t.trigger), e(this, l).current = !0, e(this, p).current && (a.__opened = a.__opened.filter((o) => o !== this && o.dominance.current !== 0 && this.dominance.current >= o.dominance.current ? (o.close(), !1) : !0)), a.__opened.push(this), i(this, S, a.__opened.length - 1), e(this, d).current && e(this, f) && history.pushState("", "", e(this, u, G)), clearTimeout(e(this, P)), this.classList.remove("closing"), this.classList.add("triggered"), this.style.display = "block", z(this, "popoverTriggered", {
39
+ i(this, w, t == null ? void 0 : t.trigger), e(this, d).current = !0, e(this, g).current && (a.__opened = a.__opened.filter((n) => n !== this && b(this, l, W).call(this, this, n) ? (n.close(), !1) : !0)), a.__opened.push(this), i(this, C, a.__opened.length - 1), e(this, p).current && e(this, L) && history.pushState("", "", e(this, l, K)), clearTimeout(e(this, H)), this.classList.remove("closing"), this.classList.add("triggered"), this.style.display = "block", q(this, "popoverTriggered", {
39
40
  custom: !0,
40
41
  detail: {
41
- trigger: e(this, b)
42
+ trigger: e(this, w)
42
43
  }
43
44
  });
44
- const c = () => {
45
- addEventListener("click", e(this, E)), addEventListener("keydown", e(this, T)), e(this, C).call(this), this.style.opacity = "1", this.classList.add("opened"), z(this, "popoverOpened", {
45
+ const o = () => {
46
+ addEventListener("click", e(this, k)), addEventListener("keydown", e(this, A)), e(this, P).call(this), this.style.opacity = "1", this.classList.add("opened"), q(this, "popoverOpened", {
46
47
  custom: !0,
47
48
  detail: {
48
- trigger: e(this, b)
49
+ trigger: e(this, w)
49
50
  }
50
- }), i(this, y, void 0);
51
+ }), i(this, T, void 0);
51
52
  };
52
- t != null && t.skipTransition ? c() : i(this, y, setTimeout(c, 10));
53
+ t != null && t.skipTransition ? o() : i(this, T, setTimeout(o, 10));
53
54
  }, this.close = () => {
54
- e(this, l).current && (removeEventListener("click", e(this, E)), removeEventListener("keydown", e(this, T)), e(this, l).current = !1, a.__opened = a.__opened.filter((t) => t === this ? !1 : e(t, p).current !== 0 && e(t, p).current < this.dominance.current && !e(t, y) ? (t.close(), !1) : !0), _(this, u, B).call(this), this.classList.remove("opened"), this.classList.add("closing"), this.style.opacity = "0", z(this, "popoverClosing", {
55
+ e(this, d).current && (removeEventListener("click", e(this, k)), removeEventListener("keydown", e(this, A)), e(this, d).current = !1, a.__opened = a.__opened.filter((t) => t === this ? !1 : !e(t, T) && b(this, l, W).call(this, this, t) ? (t.close(), !1) : !0), b(this, l, D).call(this), this.classList.remove("opened"), this.classList.add("closing"), this.style.opacity = "0", q(this, "popoverClosing", {
55
56
  custom: !0
56
57
  }), setTimeout(() => {
57
- this.classList.remove("triggered"), this.classList.remove("closing"), this.style.display = "none", z(this, "popoverClosed", {
58
+ this.classList.remove("triggered"), this.classList.remove("closing"), this.style.display = "none", q(this, "popoverClosed", {
58
59
  custom: !0
59
60
  });
60
- }, Q(this) + 10));
61
- }, i(this, E, (t) => {
62
- e(this, m).current && _(this, u, D).call(this, () => {
63
- var U;
64
- const c = t.composedPath();
65
- if (c.find(
66
- (W) => W instanceof HTMLElement && W.hasAttribute("data-popover-content")
61
+ }, X(this) + 10));
62
+ }, i(this, k, (t) => {
63
+ e(this, m).current && b(this, l, U).call(this, () => {
64
+ var j;
65
+ const o = t.composedPath();
66
+ if (o.find(
67
+ (F) => F instanceof HTMLElement && F.hasAttribute("data-popover-content")
67
68
  ))
68
69
  return;
69
- const o = c[0], I = o instanceof HTMLElement && (this.contains(o) || ((U = this.shadowRoot) == null ? void 0 : U.contains(o))), k = o instanceof HTMLElement && o.hasAttribute("data-outside");
70
- (!I || k) && this.close();
70
+ const n = o[0], z = n instanceof HTMLElement && (this.contains(n) || ((j = this.shadowRoot) == null ? void 0 : j.contains(n))), x = n instanceof HTMLElement && n.hasAttribute("data-outside");
71
+ (!z || x) && this.close();
71
72
  });
72
- }), i(this, T, (t) => {
73
- e(this, g).current && _(this, u, D).call(this, () => {
73
+ }), i(this, A, (t) => {
74
+ e(this, f).current && b(this, l, U).call(this, () => {
74
75
  t.code === "Escape" && this.close();
75
76
  });
76
- }), i(this, w, () => {
77
- i(this, f, !1), e(this, l).current && e(this, d).current && !location.search.includes(this.id) ? this.close() : !e(this, l).current && e(this, d).current && location.search.includes(this.id) && this.open(), i(this, f, !0);
78
- }), i(this, x, () => {
79
- this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), e(this, H).call(this);
80
- }), i(this, H, K(() => {
81
- e(this, C).call(this);
82
- }, 10)), i(this, C, () => {
77
+ }), i(this, S, () => {
78
+ i(this, L, !1), e(this, d).current && e(this, p).current && !location.search.includes(this.id) ? this.close() : !e(this, d).current && e(this, p).current && location.search.includes(this.id) && this.open(), i(this, L, !0);
79
+ }), i(this, _, () => {
80
+ this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), e(this, M).call(this);
81
+ }), i(this, M, V(() => {
82
+ e(this, P).call(this);
83
+ }, 10)), i(this, P, () => {
83
84
  this.style.setProperty("--content-width", this.scrollWidth + "px"), this.style.setProperty("--content-height", this.scrollHeight + "px");
84
85
  });
85
86
  }
86
87
  get history() {
87
- return e(this, d);
88
+ return e(this, p);
88
89
  }
89
90
  get restore() {
90
91
  return e(this, v);
91
92
  }
92
93
  get dominance() {
93
- return e(this, p);
94
+ return e(this, g);
95
+ }
96
+ get group() {
97
+ return e(this, u);
94
98
  }
95
99
  get clickOutside() {
96
100
  return e(this, m);
97
101
  }
98
102
  get escape() {
99
- return e(this, g);
103
+ return e(this, f);
100
104
  }
101
105
  get opened() {
102
- return e(this, l);
106
+ return e(this, d);
103
107
  }
104
108
  get lastTrigger() {
105
- return e(this, b);
109
+ return e(this, w);
106
110
  }
107
111
  connectedCallback() {
108
- e(this, d).observe(), e(this, v).observe(), e(this, p).observe(), e(this, m).observe(), e(this, g).observe(), this.style.opacity = "0", this.style.display = "none", this.setAttribute("popover-target", ""), this.classList.remove("closing"), this.classList.remove("closed"), this.classList.remove("triggered"), this.classList.remove("opened"), addEventListener("popstate", e(this, w)), setTimeout(() => {
109
- e(this, v).current ? e(this, w).call(this) : (_(this, u, B).call(this), i(this, f, !0));
110
- }, 0), F.subscribe(e(this, x));
112
+ e(this, p).observe(), e(this, v).observe(), e(this, g).observe(), e(this, u).observe(), e(this, m).observe(), e(this, f).observe(), this.style.opacity = "0", this.style.display = "none", this.setAttribute("popover-target", ""), this.classList.remove("closing"), this.classList.remove("closed"), this.classList.remove("triggered"), this.classList.remove("opened"), addEventListener("popstate", e(this, S)), setTimeout(() => {
113
+ e(this, v).current ? e(this, S).call(this) : (b(this, l, D).call(this), i(this, L, !0));
114
+ }, 0), J.subscribe(e(this, _));
111
115
  }
112
116
  disconnectedCallback() {
113
- F.unsubscribe(e(this, x)), e(this, d).unobserve(), e(this, v).unobserve(), e(this, p).unobserve(), e(this, m).unobserve(), e(this, g).unobserve(), this.style.opacity = "", this.style.display = "", this.removeAttribute("popover-target"), a.__opened = a.__opened.filter((t) => t !== this), clearTimeout(e(this, P)), clearTimeout(e(this, y)), removeEventListener("popstate", e(this, w)), removeEventListener("click", e(this, E)), removeEventListener("keydown", e(this, T)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height");
117
+ J.unsubscribe(e(this, _)), e(this, p).close(), e(this, v).close(), e(this, g).close(), e(this, u).close(), e(this, m).close(), e(this, f).close(), this.style.opacity = "", this.style.display = "", this.removeAttribute("popover-target"), a.__opened = a.__opened.filter((t) => t !== this), clearTimeout(e(this, H)), clearTimeout(e(this, T)), removeEventListener("popstate", e(this, S)), removeEventListener("click", e(this, k)), removeEventListener("keydown", e(this, A)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height");
114
118
  }
115
119
  };
116
- S = new WeakMap(), l = new WeakMap(), P = new WeakMap(), y = new WeakMap(), d = new WeakMap(), v = new WeakMap(), p = new WeakMap(), m = new WeakMap(), g = new WeakMap(), f = new WeakMap(), b = new WeakMap(), u = new WeakSet(), G = function() {
120
+ C = new WeakMap(), d = new WeakMap(), H = new WeakMap(), T = new WeakMap(), p = new WeakMap(), v = new WeakMap(), g = new WeakMap(), u = new WeakMap(), m = new WeakMap(), f = new WeakMap(), L = new WeakMap(), w = new WeakMap(), l = new WeakSet(), K = function() {
117
121
  return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.id}`;
118
- }, E = new WeakMap(), B = function() {
119
- if (e(this, d).current) {
122
+ }, k = new WeakMap(), D = function() {
123
+ if (e(this, p).current) {
120
124
  const t = new URL(location.href);
121
125
  t.searchParams.delete(this.id), history.replaceState(null, "", t.href);
122
126
  }
123
- }, T = new WeakMap(), D = function(t) {
124
- (a.__opened[e(this, S) - 1] || a.__opened.length === 1 || a.__opened.filter((c) => c !== this).every((c) => e(this, p).current > c.dominance.current)) && t();
125
- }, w = new WeakMap(), x = new WeakMap(), H = new WeakMap(), C = new WeakMap(), a.__opened = [];
126
- let N = a;
127
- customElements.get("e-popover") || customElements.define("e-popover", N);
128
- var r, L, M, O, R, $;
129
- class X extends HTMLElement {
127
+ }, A = new WeakMap(), U = function(t) {
128
+ (a.__opened[e(this, C) - 1] || a.__opened.length === 1 || a.__opened.filter((o) => o !== this).every((o) => e(this, g).current > o.dominance.current)) && t();
129
+ }, S = new WeakMap(), _ = new WeakMap(), M = new WeakMap(), P = new WeakMap(), W = function(t, o) {
130
+ if (console.log(e(t, u).current, e(o, u).current), e(t, u).current === e(o, u).current && t.dominance.current >= o.dominance.current)
131
+ return !0;
132
+ }, a.__opened = [];
133
+ let B = a;
134
+ customElements.get("e-popover") || customElements.define("e-popover", B);
135
+ var r, y, O, R, $, I;
136
+ class Z extends HTMLElement {
130
137
  constructor() {
131
138
  super();
132
139
  s(this, r);
133
- s(this, L, new A(this, "--type", "open"));
134
- s(this, M, () => {
140
+ s(this, y, new E(this, "--type", "open"));
141
+ s(this, O, () => {
135
142
  this.classList.add("triggered");
136
143
  });
137
- s(this, O, () => {
144
+ s(this, R, () => {
138
145
  this.classList.add("opened"), this.setAttribute("aria-expanded", "true");
139
146
  });
140
- s(this, R, () => {
147
+ s(this, $, () => {
141
148
  this.classList.remove("opened");
142
149
  });
143
- s(this, $, () => {
150
+ s(this, I, () => {
144
151
  this.classList.remove("triggered"), this.setAttribute("aria-expanded", "false");
145
152
  });
146
- V && (this.addEventListener("click", () => {
153
+ Y && (this.addEventListener("click", () => {
147
154
  if (e(this, r)) {
148
- const t = e(this, L).current;
155
+ const t = e(this, y).current;
149
156
  t === "open" || t === "toggle" && !e(this, r).opened.current ? e(this, r).open({ trigger: this }) : (t === "close" || t === "toggle" && e(this, r).opened.current) && e(this, r).close();
150
157
  }
151
158
  }), this.addEventListener("keydown", (t) => {
@@ -153,66 +160,66 @@ class X extends HTMLElement {
153
160
  }));
154
161
  }
155
162
  get type() {
156
- return e(this, L);
163
+ return e(this, y);
157
164
  }
158
165
  get popoverElement() {
159
166
  return e(this, r);
160
167
  }
161
168
  connectedCallback() {
162
- var c;
163
- e(this, L).subscribe((o) => {
164
- e(this, r) && (o.current !== "close" ? (this.setAttribute("aria-has-popup", "true"), this.setAttribute(
169
+ var o;
170
+ e(this, y).subscribe((n) => {
171
+ e(this, r) && (n.current !== "close" ? (this.setAttribute("aria-has-popup", "true"), this.setAttribute(
165
172
  "aria-expanded",
166
173
  e(this, r).opened.current ? "true" : "false"
167
174
  ), this.setAttribute("aria-controls", e(this, r).id || "")) : (this.removeAttribute("aria-has-popup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls")));
168
175
  }), this.hasAttribute("tabindex") || (this.tabIndex = 0);
169
176
  const t = this.getAttribute("target");
170
177
  if (t) {
171
- let o = null;
178
+ let n = null;
172
179
  if (t === "parent") {
173
- const I = this.closest("[popover-target]");
174
- if (I)
175
- o = I;
180
+ const z = this.closest("[popover-target]");
181
+ if (z)
182
+ n = z;
176
183
  else {
177
- const k = this.getRootNode();
178
- k instanceof ShadowRoot ? o = k.host.closest("[popover-target]") : k instanceof HTMLElement && (o = k.closest("[popover-target]"));
184
+ const x = this.getRootNode();
185
+ x instanceof ShadowRoot ? n = x.host.closest("[popover-target]") : x instanceof HTMLElement && (n = x.closest("[popover-target]"));
179
186
  }
180
- } else t === "sibling" ? o = (c = this.parentElement) == null ? void 0 : c.querySelector("[popover-target]") : o = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
181
- o instanceof HTMLElement ? (i(this, r, o), e(this, r).addEventListener(
187
+ } else t === "sibling" ? n = (o = this.parentElement) == null ? void 0 : o.querySelector("[popover-target]") : n = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
188
+ n instanceof HTMLElement ? (i(this, r, n), e(this, r).addEventListener(
182
189
  "popoverTriggered",
183
- e(this, M)
190
+ e(this, O)
184
191
  ), e(this, r).addEventListener(
185
192
  "popoverOpened",
186
- e(this, O)
193
+ e(this, R)
187
194
  ), e(this, r).addEventListener(
188
195
  "popoverClosing",
189
- e(this, R)
196
+ e(this, $)
190
197
  ), e(this, r).addEventListener(
191
198
  "popoverClosed",
192
- e(this, $)
199
+ e(this, I)
193
200
  )) : console.warn(this, `target ${t} not found`);
194
201
  }
195
- e(this, L).observe();
202
+ e(this, y).observe();
196
203
  }
197
204
  disconnectedCallback() {
198
- e(this, L).unobserve(), this.removeAttribute("aria-has-popup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls"), e(this, r) && (e(this, r).removeEventListener(
205
+ e(this, y).unobserve(), this.removeAttribute("aria-has-popup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls"), e(this, r) && (e(this, r).removeEventListener(
199
206
  "popoverTriggered",
200
- e(this, M)
207
+ e(this, O)
201
208
  ), e(this, r).removeEventListener(
202
209
  "popoverOpened",
203
- e(this, O)
210
+ e(this, R)
204
211
  ), e(this, r).removeEventListener(
205
212
  "popoverClosing",
206
- e(this, R)
213
+ e(this, $)
207
214
  ), e(this, r).removeEventListener(
208
215
  "popoverClosed",
209
- e(this, $)
216
+ e(this, I)
210
217
  ));
211
218
  }
212
219
  }
213
- r = new WeakMap(), L = new WeakMap(), M = new WeakMap(), O = new WeakMap(), R = new WeakMap(), $ = new WeakMap();
214
- customElements.get("e-popover-button") || customElements.define("e-popover-button", X);
220
+ r = new WeakMap(), y = new WeakMap(), O = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), I = new WeakMap();
221
+ customElements.get("e-popover-button") || customElements.define("e-popover-button", Z);
215
222
  export {
216
- X as PopoverButtonElement,
217
- N as PopoverElement
223
+ Z as PopoverButtonElement,
224
+ B as PopoverElement
218
225
  };
@@ -1 +1 @@
1
- "use strict";var Be=Object.defineProperty;var Pe=Object.getOwnPropertySymbols;var _e=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var Ee=u=>{throw TypeError(u)};var we=(u,h,e)=>h in u?Be(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,xe=(u,h)=>{for(var e in h||(h={}))_e.call(h,e)&&we(u,e,h[e]);if(Pe)for(var e of Pe(h))He.call(h,e)&&we(u,e,h[e]);return u};var be=(u,h,e)=>h.has(u)||Ee("Cannot "+e);var t=(u,h,e)=>(be(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?Ee("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),r=(u,h,e,i)=>(be(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),c=(u,h,e)=>(be(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const We=require("../../Store-CDb6RMce.cjs"),Se=require("../../browser-CpzFX2xg.cjs"),Fe=require("../../easings-GegIwET5.cjs"),le=require("../../events-KVanG9sR.cjs"),ze=require("../../jss-GJLvaNfT.cjs"),zt=require("../../layout-8ryRAMGJ.cjs"),ke=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const ce=require("../../order/index.cjs"),$e=require("../../Damped-CTsV8tl_.cjs"),Ue=require("../../Tweened-lT5myPAZ.cjs"),oe=require("../../controls/index.cjs"),kt=require("../../window-resizer/vanilla/index.cjs"),bt=require("../../scroll-entries/index.cjs"),Le=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),Ne=require("../../device/index.cjs"),Jt=require("../../element-resizer/vanilla/index.cjs"),Ge=require("../../gestures-DHLrn6Q8.cjs"),Re=require("../../dom-JBOkFLTh.cjs"),Ze=require("../../function-MthRj-GJ.cjs"),je=require("../../scroll-segment/index.cjs");var f,Qt,g,ft,V,Q;class Ke{constructor(h,e,i){s(this,f);s(this,Qt);s(this,g);s(this,ft,0);s(this,V,0);s(this,Q,null);r(this,f,h),r(this,Qt,e),r(this,g,i),bt.scrollEntries.register(t(this,f))}get index(){return t(this,Qt)}get size(){return t(this,ft)}get position(){return t(this,V)}destroy(){bt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null),this.setSize()}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){r(this,ft,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),r(this,V,t(this,g).vertical?zt.getCumulativeOffsetTop(t(this,f)):zt.getCumulativeOffsetLeft(t(this,f))),r(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,ft)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),bt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,n=t(this,V)-t(this,g).viewportSize-e,d=t(this,V)+t(this,ft)+e,b=ke.clamp(i,n,d);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,Q)!==h&&(t(this,Q)&&t(this,f).classList.remove(t(this,Q)),h&&t(this,f).classList.add(h),r(this,Q,h),le.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Q)},custom:!0}))}}f=new WeakMap,Qt=new WeakMap,g=new WeakMap,ft=new WeakMap,V=new WeakMap,Q=new WeakMap;const Je=ze.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".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-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,mt,x,X,B,_,H,T,Y,tt,W,et,gt,D,v,yt,vt,Ct,Pt,Rt,I,wt,st,q,it,F,rt,Et,$,U,nt,p,It,l,Xt,Yt,y,m,z,A,ht,M,P,w,Tt,ot,N,lt,xt,Dt,ct,G,qt,O,E,o,fe,Kt,Lt,ue,ae,me,ge,k,At,Ie,Mt,te,ye,ve,pt,de,ee;class Zt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,mt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,X,new S.CSSProperty(this,"--reverse",!1));s(this,B,new S.CSSProperty(this,"--direction",0));s(this,_,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,H,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,Y,new S.CSSProperty(this,"--tween-easing",!1));s(this,tt,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,et,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,gt,new S.CSSProperty(this,"--drag-inertion",1));s(this,D,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,yt,new S.CSSProperty(this,"--damping",20));s(this,vt,new S.CSSProperty(this,"--mass",0));s(this,Ct,new S.CSSProperty(this,"--stiffness",0));s(this,Pt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Rt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,I,new S.CSSProperty(this,"--autoplay",0));s(this,wt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,st,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,q,new S.CSSProperty(this,"--classes",!1));s(this,it,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,rt,new S.CSSProperty(this,"--focus-delay",0));s(this,Et,new S.CSSProperty(this,"--focus-duration",3e3));s(this,$,new S.CSSProperty(this,"--disabled",!1));s(this,U,new S.CSSProperty(this,"--hibernate",!1));s(this,nt,null);s(this,p,null);s(this,It,null);s(this,l,[]);s(this,Xt,0);s(this,Yt,0);s(this,y,0);s(this,m,0);s(this,z,0);s(this,A,null);s(this,ht,null);s(this,M,null);s(this,P,null);s(this,w,new We.Store(0));s(this,Tt,0);s(this,ot,0);s(this,N,!1);s(this,lt,!0);s(this,xt,!0);s(this,Dt);s(this,ct);s(this,G,new Ue.Tweened);s(this,qt,!1);s(this,O,null);s(this,E,!1);s(this,k,()=>{if(t(this,U).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,w).current;if(r(this,Xt,this.vertical?zt.getCumulativeOffsetTop(this):zt.getCumulativeOffsetLeft(this)),r(this,Yt,this.vertical?zt.getCumulativeOffsetTop(t(this,p)):zt.getCumulativeOffsetLeft(t(this,p))),r(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,z,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):r(this,z,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,l).length){const n=t(this,D).current,d=(t(this,y)-t(this,z)*(n-1))/n;t(this,l).forEach(b=>{b.setSize(d)})}else t(this,l).forEach(n=>{n.setSize()});if(t(this,l).forEach(n=>{n.resize()}),t(this,_).current){r(this,m,t(this,y)*t(this,_).current);const n=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=n+"px",t(this,p).style.height="100%"):(t(this,p).style.height=n+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",r(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",r(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const n=getComputedStyle(this),d=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,m,t(this,m)+d),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const n=t(this,l)[t(this,l).length-1],d=n.position+n.size-t(this,y),b=t(this,m)-d;r(this,ot,n.position+n.size+b)}else r(this,ot,t(this,m));if(t(this,T).current&&t(this,l).length){const n=t(this,l)[i];t(this,a).set(n.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});r(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,$).current||c(this,o,ae).call(this):c(this,o,ue).call(this),t(this,At).call(this)});s(this,At,()=>{if(!t(this,N)||t(this,U).current||t(this,$).current)return;const e=this.currentScrollValue;if(r(this,Tt,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,w).current=c(this,o,de).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;bt.scrollEntries.update(this,t(this,x).current,e)});s(this,Mt,(e,i)=>{t(this,mt).current&&(c(this,o,ye).call(this,Math.sign(i)||1),t(this,te).call(this,e,i))});s(this,te,(e,i)=>{if(t(this,B).current){if(t(this,B).current<0&&i>0)return;if(t(this,B).current>0&&i<0)return}if(t(this,ct)||t(this,G).unlistenAnimationFrame(),!t(this,I).current&&t(this,rt).current&&(clearInterval(t(this,Dt)),r(this,Dt,setTimeout(()=>{const n=t(this,l)[c(this,o,de).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,Et).current,easing:Fe.easeInOutExpo}})},t(this,rt).current))),!(e.includes("drag")&&!Ne.device.isMobile&&!t(this,Pt).current)){if(t(this,T).current&&e!=="drag"){const n=Math.sign(i);if(t(this,l).length){const d={tween:t(this,Y).current||t(this,tt).current?{easing:t(this,Y).current||"easeInOutCubic",duration:t(this,tt).current||500}:void 0};t(this,qt)?this.scrollToSection(t(this,w).current,d):this.shiftSections(n,d)}else t(this,a).shift(n*t(this,y))}else t(this,a).shift(i);r(this,qt,e==="drag")}});s(this,ee,()=>{r(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,ge).call(this)});if(Se.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Je];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),r(this,nt,document.createElement("div")),t(this,nt).className="content-wrapper",r(this,p,document.createElement("div")),t(this,p).className="content",r(this,It,document.createElement("slot")),t(this,p).appendChild(t(this,It)),t(this,nt).appendChild(t(this,p)),e.appendChild(t(this,nt))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,mt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,X)}get directionCSSProperty(){return t(this,B)}get pagesCSSProperty(){return t(this,_)}get splitCSSProperty(){return t(this,H)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,Y)}get durationCSSProperty(){return t(this,tt)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,et)}get dragInertionCSSProperty(){return t(this,gt)}get sectionsInViewCSSProperty(){return t(this,D)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,yt)}get massCSSProperty(){return t(this,vt)}get stiffnessCSSProperty(){return t(this,Ct)}get mouseDragCSSProperty(){return t(this,Pt)}get sectionDistanceScaleCSSProperty(){return t(this,Rt)}get autoplayCSSProperty(){return t(this,I)}get autoplayPauseDurationCSSProperty(){return t(this,wt)}get autoplayUserDirectionCSSProperty(){return t(this,st)}get classesCSSProperty(){return t(this,q)}get currentIndexStartOffsetCSSProperty(){return t(this,it)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get focusDelayCSSProperty(){return t(this,rt)}get focusDurationCSSProperty(){return t(this,Et)}get disabledCSSProperty(){return t(this,$)}get hibernatedCSSProperty(){return t(this,U)}get currentScrollValue(){return c(this,o,ve).call(this,"current")}get targetScrollValue(){return c(this,o,ve).call(this,"target")}get contentWrapperElement(){return t(this,nt)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,Xt)}get contentPosition(){return t(this,Yt)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,z)}get counter(){return t(this,w)}get limit(){return Math.ceil(t(this,l).length-t(this,D).current)}get distance(){return t(this,ot)}get loopDistance(){return t(this,v).current?t(this,ot)+t(this,z):t(this,ot)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,Tt)}get scrollLine(){return t(this,O)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,n=0){const d=e-n,b=d+i+n*2;return this.currentProgress<d?0:this.currentProgress>b?1:(this.currentProgress-d)/(b-d)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const d=e-n,b=d+i+n*2;return this.currentProgress>=d&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const n=t(this,w).current,d=c(this,o,Ie).call(this,e),b=t(this,l)[n],C=t(this,l)[d];if(b&&C){let R=0;const pe=c(this,o,de).call(this),jt=t(this,l)[pe],Ve=jt?this.targetScrollValue-jt.position:0;t(this,v).current?d===0&&n===t(this,l).length-1?R=t(this,m)+t(this,y)-b.position+t(this,z):d===t(this,l).length-1&&n===0?R=C.position-(t(this,m)+t(this,y)+t(this,z)):R=C.position-b.position:R=C.position-b.position,this.shiftPosition(R-Ve,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,w).current+e,i)}setPosition(e,i){c(this,o,ye).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,ct)||(t(this,G).set(t(this,a).current,{equalize:!0}),t(this,G).set(e,xe({},i.tween)),r(this,ct,setTimeout(()=>{r(this,ct,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){bt.scrollEntries.register(this),r(this,a,new $e.Damped(0,{damping:.01,min:0,order:ce.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,A,new oe.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Mt)),r(this,ht,new oe.KeyboardControls({element:this})),t(this,ht).changeEvent.subscribe(t(this,Mt)),r(this,M,new oe.DragControls({element:t(this,p)})),t(this,M).changeEvent.subscribe(t(this,Mt)),r(this,P,new oe.AutoplayControls({culling:this})),t(this,P).changeEvent.subscribe(t(this,te)),t(this,x).subscribe(()=>{c(this,o,fe).call(this)}),t(this,X).subscribe(()=>{c(this,o,fe).call(this)}),t(this,et).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,gt).subscribe(e=>{t(this,M).inertion=typeof e.current=="number"?e.current:1}),t(this,_).subscribe(()=>{t(this,E)&&t(this,k).call(this)}),t(this,H).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,Kt).call(this):c(this,o,Lt).call(this))}),t(this,T).subscribe(e=>{t(this,A).debounce=e.current,t(this,M).swipe=e.current,t(this,P).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,Kt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Lt).call(this))}),t(this,W).subscribe(e=>{t(this,E)&&(t(this,k).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,Kt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Lt).call(this))}),t(this,D).subscribe(e=>{t(this,E)&&(t(this,k).call(this),c(this,o,pt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,l).length||(t(this,H).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(r(this,Tt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,yt).subscribe(e=>{t(this,a).damping=e.current}),t(this,vt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Ct).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,I).subscribe(e=>{t(this,P).speed=e.current,!t(this,lt)&&e.current&&!e.previous?t(this,P).connect():!e.current&&e.previous&&t(this,P).disconnect()}),t(this,st).subscribe(e=>{e.current||(t(this,P).direction=1)}),t(this,q).subscribe(e=>{t(this,E)&&c(this,o,pt).call(this)}),t(this,it).subscribe(e=>{t(this,E)&&t(this,q).current&&c(this,o,pt).call(this)}),t(this,F).subscribe(e=>{t(this,E)&&t(this,q).current&&c(this,o,pt).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,w).subscribe(e=>{t(this,l).length&&c(this,o,pt).call(this)}),t(this,G).subscribe(e=>{t(this,G).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,$).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ue).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,ae).call(this))}),t(this,U).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,ge).call(this))}),t(this,mt).observe(),t(this,x).observe(),t(this,X).observe(),t(this,B).observe(),t(this,_).observe(),t(this,H).observe(),t(this,T).observe(),t(this,Y).observe(),t(this,tt).observe(),t(this,W).observe(),t(this,et).observe(),t(this,gt).observe(),t(this,D).observe(),t(this,v).observe(),t(this,yt).observe(),t(this,vt).observe(),t(this,Ct).observe(),t(this,Pt).observe(),t(this,Rt).observe(),t(this,I).observe(),t(this,I).observe(),t(this,wt).observe(),t(this,st).observe(),t(this,q).observe(),t(this,it).observe(),t(this,F).observe(),t(this,rt).observe(),t(this,Et).observe(),t(this,$).observe(),t(this,U).observe(),kt.windowResizer.subscribe(t(this,ee),ce.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,mt).unobserve(),t(this,x).unobserve(),t(this,X).unobserve(),t(this,B).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,T).unobserve(),t(this,Y).unobserve(),t(this,tt).unobserve(),t(this,W).unobserve(),t(this,et).unobserve(),t(this,gt).unobserve(),t(this,D).unobserve(),t(this,v).unobserve(),t(this,yt).unobserve(),t(this,vt).unobserve(),t(this,Ct).unobserve(),t(this,Pt).unobserve(),t(this,Rt).unobserve(),t(this,I).unobserve(),t(this,wt).unobserve(),t(this,st).unobserve(),t(this,q).unobserve(),t(this,it).unobserve(),t(this,F).unobserve(),t(this,rt).unobserve(),t(this,Et).unobserve(),t(this,$).unobserve(),t(this,U).unobserve(),kt.windowResizer.unsubscribe(t(this,ee)),c(this,o,me).call(this)}}a=new WeakMap,mt=new WeakMap,x=new WeakMap,X=new WeakMap,B=new WeakMap,_=new WeakMap,H=new WeakMap,T=new WeakMap,Y=new WeakMap,tt=new WeakMap,W=new WeakMap,et=new WeakMap,gt=new WeakMap,D=new WeakMap,v=new WeakMap,yt=new WeakMap,vt=new WeakMap,Ct=new WeakMap,Pt=new WeakMap,Rt=new WeakMap,I=new WeakMap,wt=new WeakMap,st=new WeakMap,q=new WeakMap,it=new WeakMap,F=new WeakMap,rt=new WeakMap,Et=new WeakMap,$=new WeakMap,U=new WeakMap,nt=new WeakMap,p=new WeakMap,It=new WeakMap,l=new WeakMap,Xt=new WeakMap,Yt=new WeakMap,y=new WeakMap,m=new WeakMap,z=new WeakMap,A=new WeakMap,ht=new WeakMap,M=new WeakMap,P=new WeakMap,w=new WeakMap,Tt=new WeakMap,ot=new WeakMap,N=new WeakMap,lt=new WeakMap,xt=new WeakMap,Dt=new WeakMap,ct=new WeakMap,G=new WeakMap,qt=new WeakMap,O=new WeakMap,E=new WeakMap,o=new WeakSet,fe=function(){const e=t(this,x).current,i=t(this,X).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,A).axis=t(this,et).current?"max":e,t(this,ht).dimension=e==="x"?"width":"height",t(this,M).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,k).call(this)},Kt=function(){c(this,o,Lt).call(this),t(this,It).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Ke(e,i,this))}),t(this,p).style.transform="",le.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,k).call(this),c(this,o,pt).call(this)},Lt=function(){t(this,l).forEach(e=>{e.destroy()}),r(this,l,[]),t(this,w).reset(),t(this,a).reset(),le.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ue=function(){t(this,lt)||(r(this,lt,!0),t(this,a).unsubscribe(t(this,At)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Dt)),clearInterval(t(this,ct)),t(this,G).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,ht).disconnect(),t(this,M).disconnect(),t(this,P).disconnect(),t(this,N)||this.sections.forEach(e=>{e.unsetTransform()}))},ae=function(){t(this,lt)&&(r(this,lt,!1),t(this,a).subscribe(t(this,At)),t(this,A).connect(),t(this,ht).connect(),t(this,M).connect(),t(this,I).current&&t(this,P).connect())},me=function(){t(this,xt)||(r(this,xt,!0),kt.windowResizer.unsubscribe(t(this,k)),Jt.elementResizer.unsubscribe(t(this,k)),c(this,o,ue).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Lt).call(this):(t(this,w).reset(),t(this,a).reset()),bt.scrollEntries.unregister(this))},ge=function(){t(this,xt)&&(r(this,xt,!1),bt.scrollEntries.register(this),(t(this,v).current||t(this,H).current||t(this,v).current||t(this,W).current||t(this,T).current)&&c(this,o,Kt).call(this),c(this,o,ae).call(this),kt.windowResizer.subscribe(t(this,k),ce.RESIZE_ORDER.SCROLL),Jt.elementResizer.subscribe(this,t(this,k)))},k=new WeakMap,At=new WeakMap,Ie=function(e){let i=t(this,w).current;return t(this,v).current?(i=e%t(this,l).length,i=i<0?t(this,l).length+i:i):i=ke.clamp(e,0,this.limit),i},Mt=new WeakMap,te=new WeakMap,ye=function(e=1){t(this,st).current&&(t(this,P).direction=e),t(this,I).current&&t(this,P).pauseAndContinue(t(this,wt).current,this.sectionalCSSProperty.current)},ve=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,z));return i<0?t(this,m)+i+t(this,y)+t(this,z):i}else return t(this,a)[e]},pt=function(){if(t(this,l).length){const e=t(this,w).current+t(this,it).current;if(e===0?r(this,O,"start"):e===this.limit?r(this,O,"end"):r(this,O,null),le.dispatchEvent(this,"scrollLine",{detail:{line:t(this,O)}}),t(this,q).current){this.classList.remove("end","start"),t(this,O)&&this.classList.add(t(this,O));const i=t(this,D).current+t(this,F).current;t(this,l).forEach((n,d)=>{const b=e-this.limit-1+t(this,F).current,C=e+i,R=this.sections.length-C;d>=e&&d<C||d<=b?n.mark("current"):d>=C&&d<C+R/2||d<=b+i?n.mark("next"):n.mark("previous")})}}},de=function(){let e=this.targetScrollValue,i=1/0,n=0;const d=t(this,a).direction;for(let b=0;b<t(this,l).length;b++){const C=t(this,l)[b];let R=t(this,qt)?C.size*d*-1*.4:0,pe=C.position;const jt=Math.abs(pe+R-e);jt<i&&(i=jt,n=b)}return n},ee=new WeakMap;customElements.get("e-scroll")||customElements.define("e-scroll",Zt);var se;class Ce extends HTMLElement{constructor(){super(...arguments);s(this,se,null)}get scrollElement(){return t(this,se)}connectedCallback(){const e=Re.findParentElement(this,Zt);e instanceof Zt?r(this,se,e):console.error(this,"e-scroll not found")}}se=new WeakMap;var ut,L,Z,j,Ot,Vt,at,Bt,ie,re;class Te extends Ce{constructor(){super();s(this,ut,null);s(this,L,null);s(this,Z,!1);s(this,j,0);s(this,Ot,0);s(this,Vt,0);s(this,at,()=>{r(this,Z,this.offsetWidth>this.offsetHeight);const e=t(this,Z)?this.offsetWidth:this.offsetHeight;r(this,j,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,j,Math.max(t(this,j),30)),t(this,Z)?(t(this,L).style.width=t(this,j)+"px",t(this,L).style.height="100%"):(t(this,L).style.width="100%",t(this,L).style.height=t(this,j)+"px"),r(this,Ot,e-t(this,j)),this.scrollElement.scrollSize?this.style.display="":this.style.display="none",t(this,Bt).call(this)});s(this,Bt,()=>{r(this,Vt,this.scrollElement.currentProgress*t(this,Ot)),t(this,Z)?t(this,L).style.transform=`translate3d(${t(this,Vt)}px, 0px, 0px)`:t(this,L).style.transform=`translate3d(0px, ${t(this,Vt)}px, 0px)`});s(this,ie,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,re,e=>{document.documentElement.classList.add("grabbing"),Ge.setupDrag(d=>{const b=t(this,Z)?d.x:d.y,C=this.scrollElement.distance/t(this,Ot),R=(b-n)*C;this.scrollElement.setPosition(i+R)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,n=t(this,Z)?e.x:e.y});if(Se.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ze.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:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],r(this,ut,document.createElement("slot")),t(this,ut).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,ut))}}get thumbElement(){return t(this,L)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,ut).assignedElements()[0]||t(this,ut).firstElementChild;r(this,L,e),t(this,L).addEventListener("pointerdown",t(this,re)),kt.windowResizer.subscribe(t(this,at),ce.RESIZE_ORDER.SCROLL),Jt.elementResizer.subscribe(this,t(this,at)),Jt.elementResizer.subscribe(this.scrollElement,t(this,at)),this.scrollElement.onScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.subscribe(t(this,ie))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,L).removeEventListener("pointerdown",t(this,re)),kt.windowResizer.unsubscribe(t(this,at)),Jt.elementResizer.unsubscribe(t(this,at)),this.scrollElement.offScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ie))}}ut=new WeakMap,L=new WeakMap,Z=new WeakMap,j=new WeakMap,Ot=new WeakMap,Vt=new WeakMap,at=new WeakMap,Bt=new WeakMap,ie=new WeakMap,re=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Te);var _t,Ht,Wt;class De extends Ce{constructor(){super();s(this,_t,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Ht,new S.CSSProperty(this,"--tween-easing",!1));s(this,Wt,new S.CSSProperty(this,"--tween-duration",0));Se.isBrowser&&this.addEventListener("click",()=>{const e=t(this,_t).current,i=t(this,Ht).current,n=t(this,Wt).current;this.handleClick({behaviour:e,tween:i||n?{easing:i,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,_t).observe(),t(this,Ht).observe(),t(this,Wt).observe()}disconnectedCallback(){t(this,_t).close(),t(this,Ht).close(),t(this,Wt).close()}}_t=new WeakMap,Ht=new WeakMap,Wt=new WeakMap;var Ft;class qe extends De{constructor(){super(...arguments);s(this,Ft,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Ft).current,e)}connectedCallback(){super.connectedCallback(),t(this,Ft).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Ft).close()}}Ft=new WeakMap;customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",qe);var K,$t;class Ae extends De{constructor(){super(...arguments);s(this,K,new S.CSSProperty(this,"--step",1));s(this,$t,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,K).current>0&&this.scrollElement.scrollLine==="end"||t(this,K).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,K).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,K).subscribe(()=>{t(this,$t).call(this)}),t(this,K).observe(),this.scrollElement.addEventListener("scrollLine",t(this,$t)),t(this,$t).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,K).close(),this.removeAttribute("disabled")}}K=new WeakMap,$t=new WeakMap;customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",Ae);var J,dt,Ut,ne,he,Nt;class Qe{constructor(h,e,i){s(this,J,null);s(this,dt,null);s(this,Ut,null);s(this,ne,null);s(this,he,()=>{t(this,dt).scrollToSection(t(this,Ut),{behaviour:t(this,ne)})});s(this,Nt,()=>{t(this,J).classList.toggle("current",t(this,dt).counter.current===t(this,Ut))});Se.isBrowser&&(r(this,J,document.createElement("button")),r(this,dt,h),r(this,ne,i),r(this,Ut,e),t(this,J).addEventListener("click",t(this,he)),t(this,dt).counter.subscribe(t(this,Nt)),t(this,Nt).call(this))}get element(){return t(this,J)}destroy(){t(this,J).removeEventListener("click",t(this,he)),t(this,dt).counter.unsubscribe(t(this,Nt)),t(this,J).remove()}}J=new WeakMap,dt=new WeakMap,Ut=new WeakMap,ne=new WeakMap,he=new WeakMap,Nt=new WeakMap;var St,Gt;class Me extends Ce{constructor(){super(...arguments);s(this,St,[]);s(this,Gt,Ze.debounce(()=>{t(this,St).forEach(e=>e.destroy()),r(this,St,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Qe(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,St).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Gt)),t(this,Gt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Gt)),t(this,St).forEach(e=>e.destroy()),r(this,St,[])}}St=new WeakMap,Gt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",Me);class Oe extends je.ScrollSegmentElement{connectedCallback(){const h=Re.findParentElement(this,Zt);h instanceof Zt?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",Oe);exports.ScrollBulletButtonsElement=Me;exports.ScrollElement=Zt;exports.ScrollSegmentElement=Oe;exports.ScrollSetButtonElement=qe;exports.ScrollStepButtonElement=Ae;exports.ScrollbarElement=Te;
1
+ "use strict";var Be=Object.defineProperty;var Pe=Object.getOwnPropertySymbols;var _e=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var Ee=u=>{throw TypeError(u)};var we=(u,h,e)=>h in u?Be(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,xe=(u,h)=>{for(var e in h||(h={}))_e.call(h,e)&&we(u,e,h[e]);if(Pe)for(var e of Pe(h))He.call(h,e)&&we(u,e,h[e]);return u};var be=(u,h,e)=>h.has(u)||Ee("Cannot "+e);var t=(u,h,e)=>(be(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?Ee("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),r=(u,h,e,i)=>(be(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),c=(u,h,e)=>(be(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const We=require("../../Store-CDb6RMce.cjs"),Se=require("../../browser-CpzFX2xg.cjs"),Fe=require("../../easings-GegIwET5.cjs"),le=require("../../events-KVanG9sR.cjs"),ze=require("../../jss-GJLvaNfT.cjs"),zt=require("../../layout-8ryRAMGJ.cjs"),ke=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const ce=require("../../order/index.cjs"),$e=require("../../Damped-CTsV8tl_.cjs"),Ue=require("../../Tweened-lT5myPAZ.cjs"),oe=require("../../controls/index.cjs"),kt=require("../../window-resizer/vanilla/index.cjs"),bt=require("../../scroll-entries/index.cjs"),Le=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),Ne=require("../../device/index.cjs"),Jt=require("../../element-resizer/vanilla/index.cjs"),Ge=require("../../gestures-DHLrn6Q8.cjs"),Re=require("../../dom-JBOkFLTh.cjs"),Ze=require("../../function-MthRj-GJ.cjs"),je=require("../../scroll-segment/index.cjs");var f,Qt,g,ft,V,Q;class Ke{constructor(h,e,i){s(this,f);s(this,Qt);s(this,g);s(this,ft,0);s(this,V,0);s(this,Q,null);r(this,f,h),r(this,Qt,e),r(this,g,i),bt.scrollEntries.register(t(this,f))}get index(){return t(this,Qt)}get size(){return t(this,ft)}get position(){return t(this,V)}destroy(){bt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null),this.setSize()}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){r(this,ft,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),r(this,V,t(this,g).vertical?zt.getCumulativeOffsetTop(t(this,f)):zt.getCumulativeOffsetLeft(t(this,f))),r(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,ft)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),bt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,n=t(this,V)-t(this,g).viewportSize-e,d=t(this,V)+t(this,ft)+e,b=ke.clamp(i,n,d);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,Q)!==h&&(t(this,Q)&&t(this,f).classList.remove(t(this,Q)),h&&t(this,f).classList.add(h),r(this,Q,h),le.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Q)},custom:!0}))}}f=new WeakMap,Qt=new WeakMap,g=new WeakMap,ft=new WeakMap,V=new WeakMap,Q=new WeakMap;const Je=ze.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".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-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,mt,x,X,B,_,H,T,Y,tt,W,et,gt,D,v,yt,vt,Ct,Pt,Rt,I,wt,st,q,it,F,rt,Et,$,U,nt,p,It,l,Xt,Yt,y,m,z,A,ht,M,P,w,Tt,ot,N,lt,xt,Dt,ct,G,qt,O,E,o,fe,Kt,Lt,ue,ae,me,ge,k,At,Ie,Mt,te,ye,ve,pt,de,ee;class Zt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,mt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,X,new S.CSSProperty(this,"--reverse",!1));s(this,B,new S.CSSProperty(this,"--direction",0));s(this,_,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,H,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,Y,new S.CSSProperty(this,"--tween-easing",!1));s(this,tt,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,et,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,gt,new S.CSSProperty(this,"--drag-inertion",1));s(this,D,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,yt,new S.CSSProperty(this,"--damping",20));s(this,vt,new S.CSSProperty(this,"--mass",0));s(this,Ct,new S.CSSProperty(this,"--stiffness",0));s(this,Pt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Rt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,I,new S.CSSProperty(this,"--autoplay",0));s(this,wt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,st,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,q,new S.CSSProperty(this,"--classes",!1));s(this,it,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,rt,new S.CSSProperty(this,"--focus-delay",0));s(this,Et,new S.CSSProperty(this,"--focus-duration",3e3));s(this,$,new S.CSSProperty(this,"--disabled",!1));s(this,U,new S.CSSProperty(this,"--hibernate",!1));s(this,nt,null);s(this,p,null);s(this,It,null);s(this,l,[]);s(this,Xt,0);s(this,Yt,0);s(this,y,0);s(this,m,0);s(this,z,0);s(this,A,null);s(this,ht,null);s(this,M,null);s(this,P,null);s(this,w,new We.Store(0));s(this,Tt,0);s(this,ot,0);s(this,N,!1);s(this,lt,!0);s(this,xt,!0);s(this,Dt);s(this,ct);s(this,G,new Ue.Tweened);s(this,qt,!1);s(this,O,null);s(this,E,!1);s(this,k,()=>{if(t(this,U).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,w).current;if(r(this,Xt,this.vertical?zt.getCumulativeOffsetTop(this):zt.getCumulativeOffsetLeft(this)),r(this,Yt,this.vertical?zt.getCumulativeOffsetTop(t(this,p)):zt.getCumulativeOffsetLeft(t(this,p))),r(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,z,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):r(this,z,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,l).length){const n=t(this,D).current,d=(t(this,y)-t(this,z)*(n-1))/n;t(this,l).forEach(b=>{b.setSize(d)})}else t(this,l).forEach(n=>{n.setSize()});if(t(this,l).forEach(n=>{n.resize()}),t(this,_).current){r(this,m,t(this,y)*t(this,_).current);const n=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=n+"px",t(this,p).style.height="100%"):(t(this,p).style.height=n+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",r(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",r(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const n=getComputedStyle(this),d=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,m,t(this,m)+d),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const n=t(this,l)[t(this,l).length-1],d=n.position+n.size-t(this,y),b=t(this,m)-d;r(this,ot,n.position+n.size+b)}else r(this,ot,t(this,m));if(t(this,T).current&&t(this,l).length){const n=t(this,l)[i];t(this,a).set(n.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});r(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,$).current||c(this,o,ae).call(this):c(this,o,ue).call(this),t(this,At).call(this)});s(this,At,()=>{if(!t(this,N)||t(this,U).current||t(this,$).current)return;const e=this.currentScrollValue;if(r(this,Tt,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,w).current=c(this,o,de).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;bt.scrollEntries.update(this,t(this,x).current,e)});s(this,Mt,(e,i)=>{t(this,mt).current&&(c(this,o,ye).call(this,Math.sign(i)||1),t(this,te).call(this,e,i))});s(this,te,(e,i)=>{if(t(this,B).current){if(t(this,B).current<0&&i>0)return;if(t(this,B).current>0&&i<0)return}if(t(this,ct)||t(this,G).unlistenAnimationFrame(),!t(this,I).current&&t(this,rt).current&&(clearInterval(t(this,Dt)),r(this,Dt,setTimeout(()=>{const n=t(this,l)[c(this,o,de).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,Et).current,easing:Fe.easeInOutExpo}})},t(this,rt).current))),!(e.includes("drag")&&!Ne.device.isMobile&&!t(this,Pt).current)){if(t(this,T).current&&e!=="drag"){const n=Math.sign(i);if(t(this,l).length){const d={tween:t(this,Y).current||t(this,tt).current?{easing:t(this,Y).current||"easeInOutCubic",duration:t(this,tt).current||500}:void 0};t(this,qt)?this.scrollToSection(t(this,w).current,d):this.shiftSections(n,d)}else t(this,a).shift(n*t(this,y))}else t(this,a).shift(i);r(this,qt,e==="drag")}});s(this,ee,()=>{r(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,ge).call(this)});if(Se.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Je];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),r(this,nt,document.createElement("div")),t(this,nt).className="content-wrapper",r(this,p,document.createElement("div")),t(this,p).className="content",r(this,It,document.createElement("slot")),t(this,p).appendChild(t(this,It)),t(this,nt).appendChild(t(this,p)),e.appendChild(t(this,nt))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,mt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,X)}get directionCSSProperty(){return t(this,B)}get pagesCSSProperty(){return t(this,_)}get splitCSSProperty(){return t(this,H)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,Y)}get durationCSSProperty(){return t(this,tt)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,et)}get dragInertionCSSProperty(){return t(this,gt)}get sectionsInViewCSSProperty(){return t(this,D)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,yt)}get massCSSProperty(){return t(this,vt)}get stiffnessCSSProperty(){return t(this,Ct)}get mouseDragCSSProperty(){return t(this,Pt)}get sectionDistanceScaleCSSProperty(){return t(this,Rt)}get autoplayCSSProperty(){return t(this,I)}get autoplayPauseDurationCSSProperty(){return t(this,wt)}get autoplayUserDirectionCSSProperty(){return t(this,st)}get classesCSSProperty(){return t(this,q)}get currentIndexStartOffsetCSSProperty(){return t(this,it)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get focusDelayCSSProperty(){return t(this,rt)}get focusDurationCSSProperty(){return t(this,Et)}get disabledCSSProperty(){return t(this,$)}get hibernatedCSSProperty(){return t(this,U)}get currentScrollValue(){return c(this,o,ve).call(this,"current")}get targetScrollValue(){return c(this,o,ve).call(this,"target")}get contentWrapperElement(){return t(this,nt)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,Xt)}get contentPosition(){return t(this,Yt)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,z)}get counter(){return t(this,w)}get limit(){return Math.ceil(t(this,l).length-t(this,D).current)}get distance(){return t(this,ot)}get loopDistance(){return t(this,v).current?t(this,ot)+t(this,z):t(this,ot)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,Tt)}get scrollLine(){return t(this,O)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,n=0){const d=e-n,b=d+i+n*2;return this.currentProgress<d?0:this.currentProgress>b?1:(this.currentProgress-d)/(b-d)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const d=e-n,b=d+i+n*2;return this.currentProgress>=d&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const n=t(this,w).current,d=c(this,o,Ie).call(this,e),b=t(this,l)[n],C=t(this,l)[d];if(b&&C){let R=0;const pe=c(this,o,de).call(this),jt=t(this,l)[pe],Ve=jt?this.targetScrollValue-jt.position:0;t(this,v).current?d===0&&n===t(this,l).length-1?R=t(this,m)+t(this,y)-b.position+t(this,z):d===t(this,l).length-1&&n===0?R=C.position-(t(this,m)+t(this,y)+t(this,z)):R=C.position-b.position:R=C.position-b.position,this.shiftPosition(R-Ve,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,w).current+e,i)}setPosition(e,i){c(this,o,ye).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,ct)||(t(this,G).set(t(this,a).current,{equalize:!0}),t(this,G).set(e,xe({},i.tween)),r(this,ct,setTimeout(()=>{r(this,ct,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){bt.scrollEntries.register(this),r(this,a,new $e.Damped(0,{damping:.01,min:0,order:ce.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,A,new oe.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Mt)),r(this,ht,new oe.KeyboardControls({element:this})),t(this,ht).changeEvent.subscribe(t(this,Mt)),r(this,M,new oe.DragControls({element:t(this,p)})),t(this,M).changeEvent.subscribe(t(this,Mt)),r(this,P,new oe.AutoplayControls({culling:this})),t(this,P).changeEvent.subscribe(t(this,te)),t(this,x).subscribe(()=>{c(this,o,fe).call(this)}),t(this,X).subscribe(()=>{c(this,o,fe).call(this)}),t(this,et).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,gt).subscribe(e=>{t(this,M).inertion=typeof e.current=="number"?e.current:1}),t(this,_).subscribe(()=>{t(this,E)&&t(this,k).call(this)}),t(this,H).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,Kt).call(this):c(this,o,Lt).call(this))}),t(this,T).subscribe(e=>{t(this,A).debounce=e.current,t(this,M).swipe=e.current,t(this,P).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,Kt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Lt).call(this))}),t(this,W).subscribe(e=>{t(this,E)&&(t(this,k).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,Kt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Lt).call(this))}),t(this,D).subscribe(e=>{t(this,E)&&(t(this,k).call(this),c(this,o,pt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,l).length||(t(this,H).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(r(this,Tt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,yt).subscribe(e=>{t(this,a).damping=e.current}),t(this,vt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Ct).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,I).subscribe(e=>{t(this,P).speed=e.current,!t(this,lt)&&e.current&&!e.previous?t(this,P).connect():!e.current&&e.previous&&t(this,P).disconnect()}),t(this,st).subscribe(e=>{e.current||(t(this,P).direction=1)}),t(this,q).subscribe(e=>{t(this,E)&&c(this,o,pt).call(this)}),t(this,it).subscribe(e=>{t(this,E)&&t(this,q).current&&c(this,o,pt).call(this)}),t(this,F).subscribe(e=>{t(this,E)&&t(this,q).current&&c(this,o,pt).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,w).subscribe(e=>{t(this,l).length&&c(this,o,pt).call(this)}),t(this,G).subscribe(e=>{t(this,G).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,$).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ue).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,ae).call(this))}),t(this,U).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,ge).call(this))}),t(this,mt).observe(),t(this,x).observe(),t(this,X).observe(),t(this,B).observe(),t(this,_).observe(),t(this,H).observe(),t(this,T).observe(),t(this,Y).observe(),t(this,tt).observe(),t(this,W).observe(),t(this,et).observe(),t(this,gt).observe(),t(this,D).observe(),t(this,v).observe(),t(this,yt).observe(),t(this,vt).observe(),t(this,Ct).observe(),t(this,Pt).observe(),t(this,Rt).observe(),t(this,I).observe(),t(this,I).observe(),t(this,wt).observe(),t(this,st).observe(),t(this,q).observe(),t(this,it).observe(),t(this,F).observe(),t(this,rt).observe(),t(this,Et).observe(),t(this,$).observe(),t(this,U).observe(),kt.windowResizer.subscribe(t(this,ee),ce.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,mt).unobserve(),t(this,x).unobserve(),t(this,X).unobserve(),t(this,B).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,T).unobserve(),t(this,Y).unobserve(),t(this,tt).unobserve(),t(this,W).unobserve(),t(this,et).unobserve(),t(this,gt).unobserve(),t(this,D).unobserve(),t(this,v).unobserve(),t(this,yt).unobserve(),t(this,vt).unobserve(),t(this,Ct).unobserve(),t(this,Pt).unobserve(),t(this,Rt).unobserve(),t(this,I).unobserve(),t(this,wt).unobserve(),t(this,st).unobserve(),t(this,q).unobserve(),t(this,it).unobserve(),t(this,F).unobserve(),t(this,rt).unobserve(),t(this,Et).unobserve(),t(this,$).unobserve(),t(this,U).unobserve(),kt.windowResizer.unsubscribe(t(this,ee)),c(this,o,me).call(this)}}a=new WeakMap,mt=new WeakMap,x=new WeakMap,X=new WeakMap,B=new WeakMap,_=new WeakMap,H=new WeakMap,T=new WeakMap,Y=new WeakMap,tt=new WeakMap,W=new WeakMap,et=new WeakMap,gt=new WeakMap,D=new WeakMap,v=new WeakMap,yt=new WeakMap,vt=new WeakMap,Ct=new WeakMap,Pt=new WeakMap,Rt=new WeakMap,I=new WeakMap,wt=new WeakMap,st=new WeakMap,q=new WeakMap,it=new WeakMap,F=new WeakMap,rt=new WeakMap,Et=new WeakMap,$=new WeakMap,U=new WeakMap,nt=new WeakMap,p=new WeakMap,It=new WeakMap,l=new WeakMap,Xt=new WeakMap,Yt=new WeakMap,y=new WeakMap,m=new WeakMap,z=new WeakMap,A=new WeakMap,ht=new WeakMap,M=new WeakMap,P=new WeakMap,w=new WeakMap,Tt=new WeakMap,ot=new WeakMap,N=new WeakMap,lt=new WeakMap,xt=new WeakMap,Dt=new WeakMap,ct=new WeakMap,G=new WeakMap,qt=new WeakMap,O=new WeakMap,E=new WeakMap,o=new WeakSet,fe=function(){const e=t(this,x).current,i=t(this,X).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,A).axis=t(this,et).current?"max":e,t(this,ht).dimension=e==="x"?"width":"height",t(this,M).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,k).call(this)},Kt=function(){c(this,o,Lt).call(this),t(this,It).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Ke(e,i,this))}),t(this,p).style.transform="",le.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,k).call(this),c(this,o,pt).call(this)},Lt=function(){t(this,l).forEach(e=>{e.destroy()}),r(this,l,[]),t(this,w).reset(),t(this,a).reset(),le.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ue=function(){t(this,lt)||(r(this,lt,!0),t(this,a).unsubscribe(t(this,At)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Dt)),clearInterval(t(this,ct)),t(this,G).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,ht).disconnect(),t(this,M).disconnect(),t(this,P).disconnect(),t(this,N)||this.sections.forEach(e=>{e.unsetTransform()}))},ae=function(){t(this,lt)&&(r(this,lt,!1),t(this,a).subscribe(t(this,At)),t(this,A).connect(),t(this,ht).connect(),t(this,M).connect(),t(this,I).current&&t(this,P).connect())},me=function(){t(this,xt)||(r(this,xt,!0),kt.windowResizer.unsubscribe(t(this,k)),Jt.elementResizer.unsubscribe(t(this,k)),c(this,o,ue).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Lt).call(this):(t(this,w).reset(),t(this,a).reset()),bt.scrollEntries.unregister(this))},ge=function(){t(this,xt)&&(r(this,xt,!1),bt.scrollEntries.register(this),(t(this,v).current||t(this,H).current||t(this,v).current||t(this,W).current||t(this,T).current)&&c(this,o,Kt).call(this),c(this,o,ae).call(this),kt.windowResizer.subscribe(t(this,k),ce.RESIZE_ORDER.SCROLL),Jt.elementResizer.subscribe(this,t(this,k)))},k=new WeakMap,At=new WeakMap,Ie=function(e){let i=t(this,w).current;return t(this,v).current?(i=e%t(this,l).length,i=i<0?t(this,l).length+i:i):i=ke.clamp(e,0,this.limit),i},Mt=new WeakMap,te=new WeakMap,ye=function(e=1){t(this,st).current&&(t(this,P).direction=e),t(this,I).current&&t(this,P).pauseAndContinue(t(this,wt).current,this.sectionalCSSProperty.current)},ve=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,z));return i<0?t(this,m)+i+t(this,y)+t(this,z):i}else return t(this,a)[e]},pt=function(){if(t(this,l).length){const e=t(this,w).current+t(this,it).current;if(e===0?r(this,O,"start"):e===this.limit?r(this,O,"end"):r(this,O,null),le.dispatchEvent(this,"scrollLine",{detail:{line:t(this,O)}}),t(this,q).current){this.classList.remove("end","start"),t(this,O)&&this.classList.add(t(this,O));const i=t(this,D).current+t(this,F).current;t(this,l).forEach((n,d)=>{const b=e-this.limit-1+t(this,F).current,C=e+i,R=this.sections.length-C;d>=e&&d<C||d<=b?n.mark("current"):d>=C&&d<C+R/2||d<=b+i?n.mark("next"):n.mark("previous")})}}},de=function(){let e=this.targetScrollValue,i=1/0,n=0;const d=t(this,a).direction;for(let b=0;b<t(this,l).length;b++){const C=t(this,l)[b];let R=t(this,qt)?C.size*d*-1*.4:0,pe=C.position;const jt=Math.abs(pe+R-e);jt<i&&(i=jt,n=b)}return n},ee=new WeakMap;customElements.get("e-scroll")||customElements.define("e-scroll",Zt);var se;class Ce extends HTMLElement{constructor(){super(...arguments);s(this,se,null)}get scrollElement(){return t(this,se)}connectedCallback(){const e=Re.findParentElement(this,Zt);e instanceof Zt?r(this,se,e):console.error(this,"e-scroll not found")}}se=new WeakMap;var ut,L,Z,j,Ot,Vt,at,Bt,ie,re;class Te extends Ce{constructor(){super();s(this,ut,null);s(this,L,null);s(this,Z,!1);s(this,j,0);s(this,Ot,0);s(this,Vt,0);s(this,at,()=>{r(this,Z,this.offsetWidth>this.offsetHeight);const e=t(this,Z)?this.offsetWidth:this.offsetHeight;r(this,j,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,j,Math.max(t(this,j),30)),t(this,Z)?(t(this,L).style.width=t(this,j)+"px",t(this,L).style.height="100%"):(t(this,L).style.width="100%",t(this,L).style.height=t(this,j)+"px"),r(this,Ot,e-t(this,j)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Bt).call(this)});s(this,Bt,()=>{r(this,Vt,this.scrollElement.currentProgress*t(this,Ot)),t(this,Z)?t(this,L).style.transform=`translate3d(${t(this,Vt)}px, 0px, 0px)`:t(this,L).style.transform=`translate3d(0px, ${t(this,Vt)}px, 0px)`});s(this,ie,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,re,e=>{document.documentElement.classList.add("grabbing"),Ge.setupDrag(d=>{const b=t(this,Z)?d.x:d.y,C=this.scrollElement.distance/t(this,Ot),R=(b-n)*C;this.scrollElement.setPosition(i+R)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,n=t(this,Z)?e.x:e.y});if(Se.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ze.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:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],r(this,ut,document.createElement("slot")),t(this,ut).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,ut))}}get thumbElement(){return t(this,L)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,ut).assignedElements()[0]||t(this,ut).firstElementChild;r(this,L,e),t(this,L).addEventListener("pointerdown",t(this,re)),kt.windowResizer.subscribe(t(this,at),ce.RESIZE_ORDER.SCROLL),Jt.elementResizer.subscribe(this,t(this,at)),Jt.elementResizer.subscribe(this.scrollElement,t(this,at)),this.scrollElement.onScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.subscribe(t(this,ie))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,L).removeEventListener("pointerdown",t(this,re)),kt.windowResizer.unsubscribe(t(this,at)),Jt.elementResizer.unsubscribe(t(this,at)),this.scrollElement.offScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ie))}}ut=new WeakMap,L=new WeakMap,Z=new WeakMap,j=new WeakMap,Ot=new WeakMap,Vt=new WeakMap,at=new WeakMap,Bt=new WeakMap,ie=new WeakMap,re=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Te);var _t,Ht,Wt;class De extends Ce{constructor(){super();s(this,_t,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Ht,new S.CSSProperty(this,"--tween-easing",!1));s(this,Wt,new S.CSSProperty(this,"--tween-duration",0));Se.isBrowser&&this.addEventListener("click",()=>{const e=t(this,_t).current,i=t(this,Ht).current,n=t(this,Wt).current;this.handleClick({behaviour:e,tween:i||n?{easing:i,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,_t).observe(),t(this,Ht).observe(),t(this,Wt).observe()}disconnectedCallback(){t(this,_t).close(),t(this,Ht).close(),t(this,Wt).close()}}_t=new WeakMap,Ht=new WeakMap,Wt=new WeakMap;var Ft;class qe extends De{constructor(){super(...arguments);s(this,Ft,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Ft).current,e)}connectedCallback(){super.connectedCallback(),t(this,Ft).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Ft).close()}}Ft=new WeakMap;customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",qe);var K,$t;class Ae extends De{constructor(){super(...arguments);s(this,K,new S.CSSProperty(this,"--step",1));s(this,$t,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,K).current>0&&this.scrollElement.scrollLine==="end"||t(this,K).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,K).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,K).subscribe(()=>{t(this,$t).call(this)}),t(this,K).observe(),this.scrollElement.addEventListener("scrollLine",t(this,$t)),t(this,$t).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,K).close(),this.removeAttribute("disabled")}}K=new WeakMap,$t=new WeakMap;customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",Ae);var J,dt,Ut,ne,he,Nt;class Qe{constructor(h,e,i){s(this,J,null);s(this,dt,null);s(this,Ut,null);s(this,ne,null);s(this,he,()=>{t(this,dt).scrollToSection(t(this,Ut),{behaviour:t(this,ne)})});s(this,Nt,()=>{t(this,J).classList.toggle("current",t(this,dt).counter.current===t(this,Ut))});Se.isBrowser&&(r(this,J,document.createElement("button")),r(this,dt,h),r(this,ne,i),r(this,Ut,e),t(this,J).addEventListener("click",t(this,he)),t(this,dt).counter.subscribe(t(this,Nt)),t(this,Nt).call(this))}get element(){return t(this,J)}destroy(){t(this,J).removeEventListener("click",t(this,he)),t(this,dt).counter.unsubscribe(t(this,Nt)),t(this,J).remove()}}J=new WeakMap,dt=new WeakMap,Ut=new WeakMap,ne=new WeakMap,he=new WeakMap,Nt=new WeakMap;var St,Gt;class Me extends Ce{constructor(){super(...arguments);s(this,St,[]);s(this,Gt,Ze.debounce(()=>{t(this,St).forEach(e=>e.destroy()),r(this,St,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Qe(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,St).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Gt)),t(this,Gt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Gt)),t(this,St).forEach(e=>e.destroy()),r(this,St,[])}}St=new WeakMap,Gt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",Me);class Oe extends je.ScrollSegmentElement{connectedCallback(){const h=Re.findParentElement(this,Zt);h instanceof Zt?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",Oe);exports.ScrollBulletButtonsElement=Me;exports.ScrollElement=Zt;exports.ScrollSegmentElement=Oe;exports.ScrollSetButtonElement=qe;exports.ScrollStepButtonElement=Ae;exports.ScrollbarElement=Te;
@@ -696,7 +696,7 @@ class Qe extends Ce {
696
696
  s(this, ut, () => {
697
697
  r(this, _, this.offsetWidth > this.offsetHeight);
698
698
  const e = t(this, _) ? this.offsetWidth : this.offsetHeight;
699
- r(this, Z, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), r(this, Z, Math.max(t(this, Z), 30)), t(this, _) ? (t(this, L).style.width = t(this, Z) + "px", t(this, L).style.height = "100%") : (t(this, L).style.width = "100%", t(this, L).style.height = t(this, Z) + "px"), r(this, Ot, e - t(this, Z)), this.scrollElement.scrollSize ? this.style.display = "" : this.style.display = "none", t(this, Ht).call(this);
699
+ r(this, Z, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), r(this, Z, Math.max(t(this, Z), 30)), t(this, _) ? (t(this, L).style.width = t(this, Z) + "px", t(this, L).style.height = "100%") : (t(this, L).style.width = "100%", t(this, L).style.height = t(this, Z) + "px"), r(this, Ot, e - t(this, Z)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Ht).call(this);
700
700
  });
701
701
  s(this, Ht, () => {
702
702
  r(this, Rt, this.scrollElement.currentProgress * t(this, Ot)), t(this, _) ? t(this, L).style.transform = `translate3d(${t(this, Rt)}px, 0px, 0px)` : t(this, L).style.transform = `translate3d(0px, ${t(this, Rt)}px, 0px)`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.36.1",
3
+ "version": "0.37.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"