aptechka 0.37.0 → 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.
@@ -1 +1 @@
1
- "use strict";var G=n=>{throw TypeError(n)};var N=(n,c,t)=>c.has(n)||G("Cannot "+t);var e=(n,c,t)=>(N(n,c,"read from private field"),t?t.call(n):c.get(n)),s=(n,c,t)=>c.has(n)?G("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(n):c.set(n,t),i=(n,c,t,h)=>(N(n,c,"write to private field"),h?h.call(n,t):c.set(n,t),t),b=(n,c,t)=>(N(n,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,u,v,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,u);s(this,v);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,u,new E.CSSProperty(this,"--dominance",0)),i(this,v,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,u).current&&(a.__opened=a.__opened.filter(o=>o!==this&&b(this,l,U).call(this,this,o)?(o.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 h=()=>{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?h():i(this,w,setTimeout(h,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 h=t.composedPath();if(h.find(F=>F instanceof HTMLElement&&F.hasAttribute("data-popover-content")))return;const o=h[0],$=o instanceof HTMLElement&&(this.contains(o)||((W=this.shadowRoot)==null?void 0:W.contains(o))),P=o instanceof HTMLElement&&o.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,u)}get group(){return e(this,v)}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,u).observe(),e(this,v).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,u).close(),e(this,v).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,u=new WeakMap,v=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(h=>h!==this).every(h=>e(this,u).current>h.dominance.current))&&t()},C=new WeakMap,_=new WeakMap,M=new WeakMap,x=new WeakMap,U=function(t,h){if(e(t,v).current===e(h,v).current&&t.dominance.current>=h.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 h;e(this,L).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 $=this.closest("[popover-target]");if($)o=$;else{const P=this.getRootNode();P instanceof ShadowRoot?o=P.host.closest("[popover-target]"):P instanceof HTMLElement&&(o=P.closest("[popover-target]"))}}else t==="sibling"?o=(h=this.parentElement)==null?void 0:h.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,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
+ "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,8 +1,8 @@
1
- var G = (n) => {
2
- throw TypeError(n);
1
+ var G = (h) => {
2
+ throw TypeError(h);
3
3
  };
4
- var N = (n, c, t) => c.has(n) || G("Cannot " + t);
5
- var e = (n, c, t) => (N(n, c, "read from private field"), t ? t.call(n) : c.get(n)), s = (n, c, t) => c.has(n) ? G("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(n) : c.set(n, t), i = (n, c, t, h) => (N(n, c, "write to private field"), h ? h.call(n, t) : c.set(n, t), t), b = (n, c, t) => (N(n, c, "access private method"), t);
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
6
  import { CSSProperty as E } from "../css-property/index.js";
7
7
  import { S as Q } from "../Store-OTdcl6SX.js";
8
8
  import { d as q } from "../events-CsVF98U6.js";
@@ -10,7 +10,7 @@ import { d as V } from "../function-C10DGppn.js";
10
10
  import { g as X } from "../style-j2TwriJ_.js";
11
11
  import { windowResizer as J } from "../window-resizer/vanilla/index.js";
12
12
  import { i as Y } from "../browser-0zX67oeU.js";
13
- var C, d, H, T, p, g, u, v, m, f, L, w, l, K, k, D, A, U, S, _, M, P, W;
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);
@@ -20,9 +20,9 @@ const a = class a extends HTMLElement {
20
20
  s(this, H);
21
21
  s(this, T);
22
22
  s(this, p);
23
+ s(this, v);
23
24
  s(this, g);
24
25
  s(this, u);
25
- s(this, v);
26
26
  s(this, m);
27
27
  s(this, f);
28
28
  s(this, L);
@@ -33,16 +33,16 @@ const a = class a extends HTMLElement {
33
33
  s(this, _);
34
34
  s(this, M);
35
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, g, new E(this, "--restore", !1)), i(this, u, new E(this, "--dominance", 0)), i(this, v, 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) => {
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
37
  if (e(this, d).current)
38
38
  return;
39
- i(this, w, t == null ? void 0 : t.trigger), e(this, d).current = !0, e(this, u).current && (a.__opened = a.__opened.filter((o) => o !== this && b(this, l, W).call(this, this, o) ? (o.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
+ 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", {
40
40
  custom: !0,
41
41
  detail: {
42
42
  trigger: e(this, w)
43
43
  }
44
44
  });
45
- const h = () => {
45
+ const o = () => {
46
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", {
47
47
  custom: !0,
48
48
  detail: {
@@ -50,7 +50,7 @@ const a = class a extends HTMLElement {
50
50
  }
51
51
  }), i(this, T, void 0);
52
52
  };
53
- t != null && t.skipTransition ? h() : i(this, T, setTimeout(h, 10));
53
+ t != null && t.skipTransition ? o() : i(this, T, setTimeout(o, 10));
54
54
  }, this.close = () => {
55
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", {
56
56
  custom: !0
@@ -62,12 +62,12 @@ const a = class a extends HTMLElement {
62
62
  }, i(this, k, (t) => {
63
63
  e(this, m).current && b(this, l, U).call(this, () => {
64
64
  var j;
65
- const h = t.composedPath();
66
- if (h.find(
65
+ const o = t.composedPath();
66
+ if (o.find(
67
67
  (F) => F instanceof HTMLElement && F.hasAttribute("data-popover-content")
68
68
  ))
69
69
  return;
70
- const o = h[0], z = o instanceof HTMLElement && (this.contains(o) || ((j = this.shadowRoot) == null ? void 0 : j.contains(o))), x = o instanceof HTMLElement && o.hasAttribute("data-outside");
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
71
  (!z || x) && this.close();
72
72
  });
73
73
  }), i(this, A, (t) => {
@@ -88,13 +88,13 @@ const a = class a extends HTMLElement {
88
88
  return e(this, p);
89
89
  }
90
90
  get restore() {
91
- return e(this, g);
91
+ return e(this, v);
92
92
  }
93
93
  get dominance() {
94
- return e(this, u);
94
+ return e(this, g);
95
95
  }
96
96
  get group() {
97
- return e(this, v);
97
+ return e(this, u);
98
98
  }
99
99
  get clickOutside() {
100
100
  return e(this, m);
@@ -109,15 +109,15 @@ const a = class a extends HTMLElement {
109
109
  return e(this, w);
110
110
  }
111
111
  connectedCallback() {
112
- e(this, p).observe(), e(this, g).observe(), e(this, u).observe(), e(this, v).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, g).current ? e(this, S).call(this) : (b(this, l, D).call(this), i(this, L, !0));
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
114
  }, 0), J.subscribe(e(this, _));
115
115
  }
116
116
  disconnectedCallback() {
117
- J.unsubscribe(e(this, _)), e(this, p).close(), e(this, g).close(), e(this, u).close(), e(this, v).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");
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");
118
118
  }
119
119
  };
120
- C = new WeakMap(), d = new WeakMap(), H = new WeakMap(), T = new WeakMap(), p = new WeakMap(), g = new WeakMap(), u = new WeakMap(), v = new WeakMap(), m = new WeakMap(), f = new WeakMap(), L = new WeakMap(), w = new WeakMap(), l = new WeakSet(), K = 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() {
121
121
  return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.id}`;
122
122
  }, k = new WeakMap(), D = function() {
123
123
  if (e(this, p).current) {
@@ -125,9 +125,9 @@ C = new WeakMap(), d = new WeakMap(), H = new WeakMap(), T = new WeakMap(), p =
125
125
  t.searchParams.delete(this.id), history.replaceState(null, "", t.href);
126
126
  }
127
127
  }, A = new WeakMap(), U = function(t) {
128
- (a.__opened[e(this, C) - 1] || a.__opened.length === 1 || a.__opened.filter((h) => h !== this).every((h) => e(this, u).current > h.dominance.current)) && t();
129
- }, S = new WeakMap(), _ = new WeakMap(), M = new WeakMap(), P = new WeakMap(), W = function(t, h) {
130
- if (e(t, v).current === e(h, v).current && t.dominance.current >= h.dominance.current)
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
131
  return !0;
132
132
  }, a.__opened = [];
133
133
  let B = a;
@@ -166,26 +166,26 @@ class Z extends HTMLElement {
166
166
  return e(this, r);
167
167
  }
168
168
  connectedCallback() {
169
- var h;
170
- e(this, y).subscribe((o) => {
171
- 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(
172
172
  "aria-expanded",
173
173
  e(this, r).opened.current ? "true" : "false"
174
174
  ), this.setAttribute("aria-controls", e(this, r).id || "")) : (this.removeAttribute("aria-has-popup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls")));
175
175
  }), this.hasAttribute("tabindex") || (this.tabIndex = 0);
176
176
  const t = this.getAttribute("target");
177
177
  if (t) {
178
- let o = null;
178
+ let n = null;
179
179
  if (t === "parent") {
180
180
  const z = this.closest("[popover-target]");
181
181
  if (z)
182
- o = z;
182
+ n = z;
183
183
  else {
184
184
  const x = this.getRootNode();
185
- x instanceof ShadowRoot ? o = x.host.closest("[popover-target]") : x instanceof HTMLElement && (o = x.closest("[popover-target]"));
185
+ x instanceof ShadowRoot ? n = x.host.closest("[popover-target]") : x instanceof HTMLElement && (n = x.closest("[popover-target]"));
186
186
  }
187
- } else t === "sibling" ? o = (h = this.parentElement) == null ? void 0 : h.querySelector("[popover-target]") : o = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
188
- 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(
189
189
  "popoverTriggered",
190
190
  e(this, O)
191
191
  ), e(this, r).addEventListener(
@@ -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.37.0",
3
+ "version": "0.37.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"