aptechka 0.68.8 → 0.68.10
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.
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +72 -72
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +156 -154
- package/package.json +1 -1
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var re=c=>{throw TypeError(c)};var _=(c,n,t)=>n.has(c)||re("Cannot "+t);var e=(c,n,t)=>(_(c,n,"read from private field"),t?t.call(c):n.get(c)),i=(c,n,t)=>n.has(c)?re("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(c):n.set(c,t),o=(c,n,t,s)=>(_(c,n,"write to private field"),s?s.call(c,t):n.set(c,t),t),y=(c,n,t)=>(_(c,n,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ae=require("../element-linked-store/index.cjs"),g=require("../css-property/index.cjs"),se=require("../index-DekP7OZe.cjs"),J=require("../events-KVanG9sR.cjs"),ue=require("../function-MthRj-GJ.cjs"),oe=require("../style-At6aDoqG.cjs");require("construct-style-sheets-polyfill");const ne=require("../url-BT4fssbO.cjs"),he=require("../window-resizer/index.cjs"),K=require("../Viewport-DB0qAZPJ.cjs");var u,b,Z,N;class pe{constructor(){i(this,u,new Map);i(this,b,[]);i(this,Z,n=>{var s;const t=[...e(this,b)].reverse().find(r=>r.clickOutside.current);if(t){const r=n.composedPath();if(r.find(ie=>ie instanceof HTMLElement&&ie.hasAttribute("data-popover-content")))return;const l=r[0],p=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),G=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!p||G)&&t.close()}});i(this,N,n=>{if(n.code==="Escape"){const t=[...e(this,b)].reverse().find(s=>s.escape.current);t&&t.close()}});document.documentElement.addEventListener("click",e(this,Z)),addEventListener("keydown",e(this,N))}get groups(){return e(this,u)}get stack(){return e(this,b)}add(n,t){if(t.closeRest.current)e(this,u).forEach(r=>{r.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let r=e(this,u).get(n);r==null||r.forEach(l=>{l.close()})}let s=e(this,u).get(n);s!=null&&s.length||(s=[],e(this,u).set(n,s)),e(this,b).push(t),s.push(t)}remove(n,t){if(o(this,b,e(this,b).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,u).forEach(r=>{r.forEach(l=>s.push(l))}),e(this,u).clear(),s.forEach(r=>r.close())}else if(t.closeRestInGroup.current){const s=e(this,u).get(n);e(this,u).delete(n),s==null||s.forEach(r=>{r.close()})}else{let s=e(this,u).get(n);s&&(s=s.filter(r=>r!==t),e(this,u).set(n,s))}}}u=new WeakMap,b=new WeakMap,Z=new WeakMap,N=new WeakMap;var f,M,B,C,H,v,w,A,x,m,R,q,L,S,$,a,O,z,P,ce,Q,V,T,U,j,W;const E=class E extends HTMLElement{constructor(){super();i(this,P);i(this,f);i(this,M);i(this,B);i(this,C);i(this,H);i(this,v);i(this,w);i(this,A);i(this,x);i(this,m);i(this,R);i(this,q);i(this,L);i(this,S);i(this,$);i(this,a);i(this,O);i(this,z);i(this,V);i(this,T);i(this,U);i(this,j);i(this,W);this.urlValue="",o(this,f,!1),o(this,v,new g.CSSProperty(this,"--history",!1)),o(this,w,new g.CSSProperty(this,"--restore",!1)),o(this,A,new g.CSSProperty(this,"--close-rest",!1)),o(this,x,new g.CSSProperty(this,"--close-rest-in-group",!1)),o(this,m,new g.CSSProperty(this,"--group","")),o(this,R,new g.CSSProperty(this,"--click-outside",!1)),o(this,q,new g.CSSProperty(this,"--escape",!1)),o(this,L,new g.CSSProperty(this,"--check-viewport-bounds",!1)),o(this,S,!1),o(this,a,new ae.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1,transitionend:!1})),o(this,O,[]),o(this,z,[]),o(this,V,()=>{o(this,S,!1),e(this,f)&&e(this,v).current&&!location.search.includes(this.id)?this.close():!e(this,f)&&e(this,v).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),o(this,S,!0)}),o(this,T,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,U).call(this)}),o(this,U,ue.debounce(()=>{e(this,j).call(this)},10)),o(this,j,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,L).current){const t=this.getBoundingClientRect();let s=0,r=0;t.right>K.viewport.width?s=K.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>K.viewport.height?r=K.viewport.height-t.bottom:t.top<0&&(r=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",r+"px")}}),o(this,W,()=>{this.close()}),e(this,m).subscribe(t=>{t.previous&&(E.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,a).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=E.stack.groups.get(this.group.current),r=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!r)}})}get openClass(){return this.getAttribute("data-open-global-class")}get history(){return e(this,v)}get restore(){return e(this,w)}get closeRest(){return e(this,A)}get closeRestInGroup(){return e(this,x)}get group(){return e(this,m)}get clickOutside(){return e(this,R)}get escape(){return e(this,q)}get opened(){return e(this,f)}get lastTrigger(){return e(this,$)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,f)&&ne.updateSearchParameter(this.id,t)}open(t){if(e(this,f))return;o(this,$,t==null?void 0:t.trigger),clearTimeout(e(this,M)),clearTimeout(e(this,B)),this.openClass&&this.openClass.split(" ").map(r=>{document.documentElement.classList.add(r.trim())}),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),J.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,$)}}),e(this,v).current&&e(this,S)&&history.pushState(history.state,"",e(this,P,ce)),o(this,f,!0);const s=()=>{E.stack.add(e(this,m).current,this),e(this,T).call(this),e(this,a).set("opened",!0),J.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,$)},bubbles:!0}),o(this,C,void 0),o(this,H,setTimeout(()=>{e(this,a).set("transitionend",!0)},oe.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():o(this,C,setTimeout(s,10))}close(){e(this,f)&&(clearTimeout(e(this,C)),clearTimeout(e(this,H)),E.stack.remove(e(this,m).current,this),o(this,f,!1),y(this,P,Q).call(this),this.openClass&&this.openClass.split(" ").map(t=>{document.documentElement.classList.remove(t.trim())}),e(this,a).set("transitionend",!1),o(this,M,setTimeout(()=>{e(this,a).set("opened",!1),e(this,a).set("closing",!0),J.dispatchEvent(this,"popoverClosing",{custom:!0,bubbles:!0}),o(this,B,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("closing",!1),e(this,z).forEach(t=>{t.scroll({top:0,left:0,behavior:"instant"})}),J.dispatchEvent(this,"popoverClosed",{custom:!0,bubbles:!0})},oe.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){o(this,O,[...this.querySelectorAll(`[data-popover-close${this.id?`="${this.id}"`:""}]`)]),e(this,O).forEach(t=>{t.addEventListener("click",e(this,W))}),o(this,z,[...this.querySelectorAll(`[data-popover-reset-scroll${this.id?`="${this.id}"`:""}]`)]),e(this,v).observe(),e(this,w).observe(),e(this,A).observe(),e(this,x).observe(),e(this,m).observe(),e(this,R).observe(),e(this,q).observe(),e(this,L).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,V)),setTimeout(()=>{e(this,w).current?(this.urlValue=ne.parseSearchParameters(location.search)[this.id],e(this,V).call(this)):(y(this,P,Q).call(this),o(this,S,!0))},0),e(this,L).subscribe(()=>{e(this,T).call(this)}),he.windowResizer.subscribe(e(this,T))}disconnectedCallback(){e(this,O).forEach(t=>{t.removeEventListener("click",e(this,W))}),E.stack.remove(e(this,m).current,this),he.windowResizer.unsubscribe(e(this,T)),e(this,a).close(),e(this,v).close(),e(this,w).close(),e(this,A).close(),e(this,x).close(),e(this,m).close(),e(this,R).close(),e(this,q).close(),e(this,L).close(),this.removeAttribute("role"),clearTimeout(e(this,M)),clearTimeout(e(this,B)),clearTimeout(e(this,C)),clearTimeout(e(this,H)),removeEventListener("popstate",e(this,V)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),y(this,P,Q).call(this)}};f=new WeakMap,M=new WeakMap,B=new WeakMap,C=new WeakMap,H=new WeakMap,v=new WeakMap,w=new WeakMap,A=new WeakMap,x=new WeakMap,m=new WeakMap,R=new WeakMap,q=new WeakMap,L=new WeakMap,S=new WeakMap,$=new WeakMap,a=new WeakMap,O=new WeakMap,z=new WeakMap,P=new WeakSet,ce=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},Q=function(){if(e(this,v).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},V=new WeakMap,T=new WeakMap,U=new WeakMap,j=new WeakMap,W=new WeakMap,E.stack=new pe;let D=E;se.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",D);var h,d,k,ee,X,Y,F,I,te;class le extends HTMLElement{constructor(){super();i(this,k);i(this,h);i(this,d,new g.CSSProperty(this,"--type","open"));i(this,X,()=>{e(this,d).current!=="close"&&this.classList.add("triggered")});i(this,Y,()=>{e(this,d).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});i(this,F,()=>{e(this,d).current!=="close"&&this.classList.remove("opened")});i(this,I,()=>{e(this,d).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});se.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,d).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(t.preventDefault(),this.click())}))}get type(){return e(this,d)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(y(this,k,ee).call(this),t){let r=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)r=l;else{const p=this.getRootNode();p instanceof ShadowRoot?r=p.host.closest("[data-popover]"):p instanceof HTMLElement&&(r=p.closest("[data-popover]"))}}else if(t==="sibling")r=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=p=>{if(!p)return null;let G=p.querySelector("[data-popover]");return!G&&(p!=null&&p.parentElement)&&(G=l(p.parentElement)),G};r=l(this.parentElement)||null}else!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),r=document.querySelector(t)||this.getRootNode().querySelector(t);r instanceof HTMLElement?(o(this,h,r),e(this,h).addEventListener("popoverTriggered",e(this,X)),e(this,h).addEventListener("popoverOpened",e(this,Y)),e(this,h).addEventListener("popoverClosing",e(this,F)),e(this,h).addEventListener("popoverClosed",e(this,I))):console.warn(this,`target ${t} not found`)}y(this,k,te).call(this,e(this,d).current)}connectedCallback(){e(this,d).subscribe(s=>{y(this,k,te).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0),this.hasAttribute("role")||this.setAttribute("role","button");const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,d).observe()}disconnectedCallback(){e(this,d).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),this.removeAttribute("role"),this.removeAttribute("tabindex"),y(this,k,ee).call(this)}}h=new WeakMap,d=new WeakMap,k=new WeakSet,ee=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,X)),e(this,h).removeEventListener("popoverOpened",e(this,Y)),e(this,h).removeEventListener("popoverClosing",e(this,F)),e(this,h).removeEventListener("popoverClosed",e(this,I)))},X=new WeakMap,Y=new WeakMap,F=new WeakMap,I=new WeakMap,te=function(t){e(this,h)instanceof D&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};se.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",le);exports.PopoverButtonElement=le;exports.PopoverElement=D;
|
|
1
|
+
"use strict";var re=c=>{throw TypeError(c)};var _=(c,n,t)=>n.has(c)||re("Cannot "+t);var e=(c,n,t)=>(_(c,n,"read from private field"),t?t.call(c):n.get(c)),r=(c,n,t)=>n.has(c)?re("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(c):n.set(c,t),o=(c,n,t,s)=>(_(c,n,"write to private field"),s?s.call(c,t):n.set(c,t),t),y=(c,n,t)=>(_(c,n,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ae=require("../element-linked-store/index.cjs"),g=require("../css-property/index.cjs"),se=require("../index-DekP7OZe.cjs"),J=require("../events-KVanG9sR.cjs"),ue=require("../function-MthRj-GJ.cjs"),oe=require("../style-At6aDoqG.cjs");require("construct-style-sheets-polyfill");const ne=require("../url-BT4fssbO.cjs"),he=require("../window-resizer/index.cjs"),K=require("../Viewport-DB0qAZPJ.cjs");var u,b,Z,N;class pe{constructor(){r(this,u,new Map);r(this,b,[]);r(this,Z,n=>{var s;const t=[...e(this,b)].reverse().find(i=>i.clickOutside.current);if(t){const i=n.composedPath();if(i.find(ie=>ie instanceof HTMLElement&&ie.hasAttribute("data-popover-content")))return;const l=i[0],p=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),G=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!p||G)&&t.close()}});r(this,N,n=>{if(n.code==="Escape"){const t=[...e(this,b)].reverse().find(s=>s.escape.current);t&&t.close()}});document.documentElement.addEventListener("click",e(this,Z)),addEventListener("keydown",e(this,N))}get groups(){return e(this,u)}get stack(){return e(this,b)}add(n,t){if(t.closeRest.current)e(this,u).forEach(i=>{i.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let i=e(this,u).get(n);i==null||i.forEach(l=>{l.close()})}let s=e(this,u).get(n);s!=null&&s.length||(s=[],e(this,u).set(n,s)),e(this,b).push(t),s.push(t)}remove(n,t){if(o(this,b,e(this,b).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,u).forEach(i=>{i.forEach(l=>s.push(l))}),e(this,u).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,u).get(n);e(this,u).delete(n),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,u).get(n);s&&(s=s.filter(i=>i!==t),e(this,u).set(n,s))}}}u=new WeakMap,b=new WeakMap,Z=new WeakMap,N=new WeakMap;var f,M,B,C,H,v,w,A,x,m,R,q,L,S,$,a,O,z,P,ce,Q,V,T,U,j,W;const E=class E extends HTMLElement{constructor(){super();r(this,P);r(this,f);r(this,M);r(this,B);r(this,C);r(this,H);r(this,v);r(this,w);r(this,A);r(this,x);r(this,m);r(this,R);r(this,q);r(this,L);r(this,S);r(this,$);r(this,a);r(this,O);r(this,z);r(this,V);r(this,T);r(this,U);r(this,j);r(this,W);this.urlValue="",o(this,f,!1),o(this,v,new g.CSSProperty(this,"--history",!1)),o(this,w,new g.CSSProperty(this,"--restore",!1)),o(this,A,new g.CSSProperty(this,"--close-rest",!1)),o(this,x,new g.CSSProperty(this,"--close-rest-in-group",!1)),o(this,m,new g.CSSProperty(this,"--group","")),o(this,R,new g.CSSProperty(this,"--click-outside",!1)),o(this,q,new g.CSSProperty(this,"--escape",!1)),o(this,L,new g.CSSProperty(this,"--check-viewport-bounds",!1)),o(this,S,!1),o(this,a,new ae.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1,transitionend:!1})),o(this,O,[]),o(this,z,[]),o(this,V,()=>{o(this,S,!1),e(this,f)&&e(this,v).current&&!location.search.includes(this.id)?this.close():!e(this,f)&&e(this,v).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),o(this,S,!0)}),o(this,T,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,U).call(this)}),o(this,U,ue.debounce(()=>{e(this,j).call(this)},10)),o(this,j,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,L).current){const t=this.getBoundingClientRect();let s=0,i=0;t.right>K.viewport.width?s=K.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>K.viewport.height?i=K.viewport.height-t.bottom:t.top<0&&(i=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",i+"px")}}),o(this,W,()=>{this.close()}),e(this,m).subscribe(t=>{t.previous&&(E.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,a).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=E.stack.groups.get(this.group.current),i=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get openClass(){return this.getAttribute("data-open-global-class")}get history(){return e(this,v)}get restore(){return e(this,w)}get closeRest(){return e(this,A)}get closeRestInGroup(){return e(this,x)}get group(){return e(this,m)}get clickOutside(){return e(this,R)}get escape(){return e(this,q)}get opened(){return e(this,f)}get lastTrigger(){return e(this,$)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,f)&&ne.updateSearchParameter(this.id,t)}open(t){if(e(this,f))return;o(this,$,t==null?void 0:t.trigger),clearTimeout(e(this,M)),clearTimeout(e(this,B)),this.openClass&&this.openClass.split(" ").map(i=>{document.documentElement.classList.add(i.trim())}),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),J.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,$)}}),e(this,v).current&&e(this,S)&&history.pushState(history.state,"",e(this,P,ce)),o(this,f,!0);const s=()=>{E.stack.add(e(this,m).current,this),e(this,z).forEach(i=>{i.scroll({top:0,left:0,behavior:"instant"})}),e(this,T).call(this),e(this,a).set("opened",!0),J.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,$)},bubbles:!0}),o(this,C,void 0),o(this,H,setTimeout(()=>{e(this,a).set("transitionend",!0)},oe.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():o(this,C,setTimeout(s,10))}close(){e(this,f)&&(o(this,f,!1),clearTimeout(e(this,C)),clearTimeout(e(this,H)),E.stack.remove(e(this,m).current,this),y(this,P,Q).call(this),this.openClass&&this.openClass.split(" ").map(t=>{document.documentElement.classList.remove(t.trim())}),e(this,a).set("transitionend",!1),o(this,M,setTimeout(()=>{e(this,a).set("opened",!1),e(this,a).set("closing",!0),J.dispatchEvent(this,"popoverClosing",{custom:!0,bubbles:!0}),o(this,B,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("closing",!1),J.dispatchEvent(this,"popoverClosed",{custom:!0,bubbles:!0})},oe.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){o(this,O,[...this.querySelectorAll(`[data-popover-close${this.id?`="${this.id}"`:""}]`)]),e(this,O).forEach(t=>{t.addEventListener("click",e(this,W))}),o(this,z,[...this.querySelectorAll(`[data-popover-reset-scroll${this.id?`="${this.id}"`:""}]`)]),e(this,v).observe(),e(this,w).observe(),e(this,A).observe(),e(this,x).observe(),e(this,m).observe(),e(this,R).observe(),e(this,q).observe(),e(this,L).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,V)),setTimeout(()=>{e(this,w).current?(this.urlValue=ne.parseSearchParameters(location.search)[this.id],e(this,V).call(this)):(y(this,P,Q).call(this),o(this,S,!0))},0),e(this,L).subscribe(()=>{e(this,T).call(this)}),he.windowResizer.subscribe(e(this,T))}disconnectedCallback(){e(this,O).forEach(t=>{t.removeEventListener("click",e(this,W))}),E.stack.remove(e(this,m).current,this),he.windowResizer.unsubscribe(e(this,T)),e(this,a).close(),e(this,v).close(),e(this,w).close(),e(this,A).close(),e(this,x).close(),e(this,m).close(),e(this,R).close(),e(this,q).close(),e(this,L).close(),this.removeAttribute("role"),clearTimeout(e(this,M)),clearTimeout(e(this,B)),clearTimeout(e(this,C)),clearTimeout(e(this,H)),removeEventListener("popstate",e(this,V)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),y(this,P,Q).call(this)}};f=new WeakMap,M=new WeakMap,B=new WeakMap,C=new WeakMap,H=new WeakMap,v=new WeakMap,w=new WeakMap,A=new WeakMap,x=new WeakMap,m=new WeakMap,R=new WeakMap,q=new WeakMap,L=new WeakMap,S=new WeakMap,$=new WeakMap,a=new WeakMap,O=new WeakMap,z=new WeakMap,P=new WeakSet,ce=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},Q=function(){if(e(this,v).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},V=new WeakMap,T=new WeakMap,U=new WeakMap,j=new WeakMap,W=new WeakMap,E.stack=new pe;let D=E;se.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",D);var h,d,k,ee,X,Y,F,I,te;class le extends HTMLElement{constructor(){super();r(this,k);r(this,h);r(this,d,new g.CSSProperty(this,"--type","open"));r(this,X,()=>{e(this,d).current!=="close"&&this.classList.add("triggered")});r(this,Y,()=>{e(this,d).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});r(this,F,()=>{e(this,d).current!=="close"&&this.classList.remove("opened")});r(this,I,()=>{e(this,d).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});se.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,d).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(t.preventDefault(),this.click())}))}get type(){return e(this,d)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(y(this,k,ee).call(this),t){let i=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)i=l;else{const p=this.getRootNode();p instanceof ShadowRoot?i=p.host.closest("[data-popover]"):p instanceof HTMLElement&&(i=p.closest("[data-popover]"))}}else if(t==="sibling")i=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=p=>{if(!p)return null;let G=p.querySelector("[data-popover]");return!G&&(p!=null&&p.parentElement)&&(G=l(p.parentElement)),G};i=l(this.parentElement)||null}else!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),i=document.querySelector(t)||this.getRootNode().querySelector(t);i instanceof HTMLElement?(o(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,X)),e(this,h).addEventListener("popoverOpened",e(this,Y)),e(this,h).addEventListener("popoverClosing",e(this,F)),e(this,h).addEventListener("popoverClosed",e(this,I))):console.warn(this,`target ${t} not found`)}y(this,k,te).call(this,e(this,d).current)}connectedCallback(){e(this,d).subscribe(s=>{y(this,k,te).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0),this.hasAttribute("role")||this.setAttribute("role","button");const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,d).observe()}disconnectedCallback(){e(this,d).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),this.removeAttribute("role"),this.removeAttribute("tabindex"),y(this,k,ee).call(this)}}h=new WeakMap,d=new WeakMap,k=new WeakSet,ee=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,X)),e(this,h).removeEventListener("popoverOpened",e(this,Y)),e(this,h).removeEventListener("popoverClosing",e(this,F)),e(this,h).removeEventListener("popoverClosed",e(this,I)))},X=new WeakMap,Y=new WeakMap,F=new WeakMap,I=new WeakMap,te=function(t){e(this,h)instanceof D&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};se.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",le);exports.PopoverButtonElement=le;exports.PopoverElement=D;
|
package/lib/popover/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var rt = (c) => {
|
|
|
2
2
|
throw TypeError(c);
|
|
3
3
|
};
|
|
4
4
|
var _ = (c, h, e) => h.has(c) || rt("Cannot " + e);
|
|
5
|
-
var t = (c, h, e) => (_(c, h, "read from private field"), e ? e.call(c) : h.get(c)),
|
|
5
|
+
var t = (c, h, e) => (_(c, h, "read from private field"), e ? e.call(c) : h.get(c)), r = (c, h, e) => h.has(c) ? rt("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(c) : h.set(c, e), o = (c, h, e, s) => (_(c, h, "write to private field"), s ? s.call(c, e) : h.set(c, e), e), E = (c, h, e) => (_(c, h, "access private method"), e);
|
|
6
6
|
import { ElementLinkedStore as ct } from "../element-linked-store/index.js";
|
|
7
7
|
import { CSSProperty as g } from "../css-property/index.js";
|
|
8
8
|
import { i as st } from "../index-Bv9zgfdb.js";
|
|
@@ -16,22 +16,22 @@ import { v as J } from "../Viewport-DA10iWAO.js";
|
|
|
16
16
|
var u, b, Z, N;
|
|
17
17
|
class pt {
|
|
18
18
|
constructor() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
r(this, u, /* @__PURE__ */ new Map());
|
|
20
|
+
r(this, b, []);
|
|
21
|
+
r(this, Z, (h) => {
|
|
22
22
|
var s;
|
|
23
|
-
const e = [...t(this, b)].reverse().find((
|
|
23
|
+
const e = [...t(this, b)].reverse().find((i) => i.clickOutside.current);
|
|
24
24
|
if (e) {
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
25
|
+
const i = h.composedPath();
|
|
26
|
+
if (i.find(
|
|
27
27
|
(it) => it instanceof HTMLElement && it.hasAttribute("data-popover-content")
|
|
28
28
|
))
|
|
29
29
|
return;
|
|
30
|
-
const l =
|
|
30
|
+
const l = i[0], p = l instanceof Node && (e.contains(l) || ((s = e.shadowRoot) == null ? void 0 : s.contains(l))), B = l instanceof HTMLElement && l.hasAttribute("data-outside");
|
|
31
31
|
(!p || B) && e.close();
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
|
|
34
|
+
r(this, N, (h) => {
|
|
35
35
|
if (h.code === "Escape") {
|
|
36
36
|
const e = [...t(this, b)].reverse().find((s) => s.escape.current);
|
|
37
37
|
e && e.close();
|
|
@@ -50,14 +50,14 @@ class pt {
|
|
|
50
50
|
}
|
|
51
51
|
add(h, e) {
|
|
52
52
|
if (e.closeRest.current)
|
|
53
|
-
t(this, u).forEach((
|
|
54
|
-
|
|
53
|
+
t(this, u).forEach((i) => {
|
|
54
|
+
i.forEach((l) => {
|
|
55
55
|
l.close();
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
else if (e.closeRestInGroup.current) {
|
|
59
|
-
let
|
|
60
|
-
|
|
59
|
+
let i = t(this, u).get(h);
|
|
60
|
+
i == null || i.forEach((l) => {
|
|
61
61
|
l.close();
|
|
62
62
|
});
|
|
63
63
|
}
|
|
@@ -67,17 +67,17 @@ class pt {
|
|
|
67
67
|
remove(h, e) {
|
|
68
68
|
if (o(this, b, t(this, b).filter((s) => s !== e)), e.closeRest.current) {
|
|
69
69
|
let s = [];
|
|
70
|
-
t(this, u).forEach((
|
|
71
|
-
|
|
72
|
-
}), t(this, u).clear(), s.forEach((
|
|
70
|
+
t(this, u).forEach((i) => {
|
|
71
|
+
i.forEach((l) => s.push(l));
|
|
72
|
+
}), t(this, u).clear(), s.forEach((i) => i.close());
|
|
73
73
|
} else if (e.closeRestInGroup.current) {
|
|
74
74
|
const s = t(this, u).get(h);
|
|
75
|
-
t(this, u).delete(h), s == null || s.forEach((
|
|
76
|
-
|
|
75
|
+
t(this, u).delete(h), s == null || s.forEach((i) => {
|
|
76
|
+
i.close();
|
|
77
77
|
});
|
|
78
78
|
} else {
|
|
79
79
|
let s = t(this, u).get(h);
|
|
80
|
-
s && (s = s.filter((
|
|
80
|
+
s && (s = s.filter((i) => i !== e), t(this, u).set(h, s));
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -86,30 +86,30 @@ var f, H, q, P, W, m, L, x, S, v, R, $, w, T, O, a, V, G, A, nt, K, M, k, D, U,
|
|
|
86
86
|
const y = class y extends HTMLElement {
|
|
87
87
|
constructor() {
|
|
88
88
|
super();
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
89
|
+
r(this, A);
|
|
90
|
+
r(this, f);
|
|
91
|
+
r(this, H);
|
|
92
|
+
r(this, q);
|
|
93
|
+
r(this, P);
|
|
94
|
+
r(this, W);
|
|
95
|
+
r(this, m);
|
|
96
|
+
r(this, L);
|
|
97
|
+
r(this, x);
|
|
98
|
+
r(this, S);
|
|
99
|
+
r(this, v);
|
|
100
|
+
r(this, R);
|
|
101
|
+
r(this, $);
|
|
102
|
+
r(this, w);
|
|
103
|
+
r(this, T);
|
|
104
|
+
r(this, O);
|
|
105
|
+
r(this, a);
|
|
106
|
+
r(this, V);
|
|
107
|
+
r(this, G);
|
|
108
|
+
r(this, M);
|
|
109
|
+
r(this, k);
|
|
110
|
+
r(this, D);
|
|
111
|
+
r(this, U);
|
|
112
|
+
r(this, z);
|
|
113
113
|
this.urlValue = "", o(this, f, !1), o(this, m, new g(this, "--history", !1)), o(this, L, new g(this, "--restore", !1)), o(this, x, new g(this, "--close-rest", !1)), o(this, S, new g(
|
|
114
114
|
this,
|
|
115
115
|
"--close-rest-in-group",
|
|
@@ -128,8 +128,8 @@ const y = class y extends HTMLElement {
|
|
|
128
128
|
}, 10)), o(this, U, () => {
|
|
129
129
|
if (this.style.setProperty("--content-width", this.scrollWidth + "px"), this.style.setProperty("--content-height", this.scrollHeight + "px"), t(this, w).current) {
|
|
130
130
|
const e = this.getBoundingClientRect();
|
|
131
|
-
let s = 0,
|
|
132
|
-
e.right > J.width ? s = J.width - e.right : e.left < 0 && (s = e.left * -1), e.bottom > J.height ?
|
|
131
|
+
let s = 0, i = 0;
|
|
132
|
+
e.right > J.width ? s = J.width - e.right : e.left < 0 && (s = e.left * -1), e.bottom > J.height ? i = J.height - e.bottom : e.top < 0 && (i = e.top * -1), this.style.setProperty("--viewport-offset-x", s + "px"), this.style.setProperty("--viewport-offset-y", i + "px");
|
|
133
133
|
}
|
|
134
134
|
}), o(this, z, () => {
|
|
135
135
|
this.close();
|
|
@@ -145,10 +145,10 @@ const y = class y extends HTMLElement {
|
|
|
145
145
|
`${this.group.current}-closing`,
|
|
146
146
|
e.current.closing
|
|
147
147
|
);
|
|
148
|
-
const s = y.stack.groups.get(this.group.current),
|
|
148
|
+
const s = y.stack.groups.get(this.group.current), i = s == null ? void 0 : s.find((l) => l.opened);
|
|
149
149
|
document.documentElement.classList.toggle(
|
|
150
150
|
`${this.group.current}-opened`,
|
|
151
|
-
!!
|
|
151
|
+
!!i
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
154
|
});
|
|
@@ -192,8 +192,8 @@ const y = class y extends HTMLElement {
|
|
|
192
192
|
open(e) {
|
|
193
193
|
if (t(this, f))
|
|
194
194
|
return;
|
|
195
|
-
o(this, O, e == null ? void 0 : e.trigger), clearTimeout(t(this, H)), clearTimeout(t(this, q)), this.openClass && this.openClass.split(" ").map((
|
|
196
|
-
document.documentElement.classList.add(
|
|
195
|
+
o(this, O, e == null ? void 0 : e.trigger), clearTimeout(t(this, H)), clearTimeout(t(this, q)), this.openClass && this.openClass.split(" ").map((i) => {
|
|
196
|
+
document.documentElement.classList.add(i.trim());
|
|
197
197
|
}), t(this, a).set("closing", !1), t(this, a).set("triggered", !0), I(this, "popoverTriggered", {
|
|
198
198
|
custom: !0,
|
|
199
199
|
detail: {
|
|
@@ -201,7 +201,13 @@ const y = class y extends HTMLElement {
|
|
|
201
201
|
}
|
|
202
202
|
}), t(this, m).current && t(this, T) && history.pushState(history.state, "", t(this, A, nt)), o(this, f, !0);
|
|
203
203
|
const s = () => {
|
|
204
|
-
y.stack.add(t(this, v).current, this), t(this,
|
|
204
|
+
y.stack.add(t(this, v).current, this), t(this, G).forEach((i) => {
|
|
205
|
+
i.scroll({
|
|
206
|
+
top: 0,
|
|
207
|
+
left: 0,
|
|
208
|
+
behavior: "instant"
|
|
209
|
+
});
|
|
210
|
+
}), t(this, k).call(this), t(this, a).set("opened", !0), I(this, "popoverOpened", {
|
|
205
211
|
custom: !0,
|
|
206
212
|
detail: {
|
|
207
213
|
trigger: t(this, O)
|
|
@@ -214,20 +220,14 @@ const y = class y extends HTMLElement {
|
|
|
214
220
|
e != null && e.skipTransition ? s() : o(this, P, setTimeout(s, 10));
|
|
215
221
|
}
|
|
216
222
|
close() {
|
|
217
|
-
t(this, f) && (clearTimeout(t(this, P)), clearTimeout(t(this, W)), y.stack.remove(t(this, v).current, this),
|
|
223
|
+
t(this, f) && (o(this, f, !1), clearTimeout(t(this, P)), clearTimeout(t(this, W)), y.stack.remove(t(this, v).current, this), E(this, A, K).call(this), this.openClass && this.openClass.split(" ").map((e) => {
|
|
218
224
|
document.documentElement.classList.remove(e.trim());
|
|
219
225
|
}), t(this, a).set("transitionend", !1), o(this, H, setTimeout(() => {
|
|
220
226
|
t(this, a).set("opened", !1), t(this, a).set("closing", !0), I(this, "popoverClosing", {
|
|
221
227
|
custom: !0,
|
|
222
228
|
bubbles: !0
|
|
223
229
|
}), o(this, q, setTimeout(() => {
|
|
224
|
-
t(this, a).set("triggered", !1), t(this, a).set("closing", !1),
|
|
225
|
-
e.scroll({
|
|
226
|
-
top: 0,
|
|
227
|
-
left: 0,
|
|
228
|
-
behavior: "instant"
|
|
229
|
-
});
|
|
230
|
-
}), I(this, "popoverClosed", {
|
|
230
|
+
t(this, a).set("triggered", !1), t(this, a).set("closing", !1), I(this, "popoverClosed", {
|
|
231
231
|
custom: !0,
|
|
232
232
|
bubbles: !0
|
|
233
233
|
});
|
|
@@ -271,19 +271,19 @@ var n, d, C, tt, X, Y, j, F, et;
|
|
|
271
271
|
class dt extends HTMLElement {
|
|
272
272
|
constructor() {
|
|
273
273
|
super();
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
274
|
+
r(this, C);
|
|
275
|
+
r(this, n);
|
|
276
|
+
r(this, d, new g(this, "--type", "open"));
|
|
277
|
+
r(this, X, () => {
|
|
278
278
|
t(this, d).current !== "close" && this.classList.add("triggered");
|
|
279
279
|
});
|
|
280
|
-
|
|
280
|
+
r(this, Y, () => {
|
|
281
281
|
t(this, d).current !== "close" && (this.classList.add("opened"), this.setAttribute("aria-expanded", "true"));
|
|
282
282
|
});
|
|
283
|
-
|
|
283
|
+
r(this, j, () => {
|
|
284
284
|
t(this, d).current !== "close" && this.classList.remove("opened");
|
|
285
285
|
});
|
|
286
|
-
|
|
286
|
+
r(this, F, () => {
|
|
287
287
|
t(this, d).current !== "close" && (this.classList.remove("triggered"), this.setAttribute("aria-expanded", "false"));
|
|
288
288
|
});
|
|
289
289
|
st && (this.addEventListener("click", () => {
|
|
@@ -304,17 +304,17 @@ class dt extends HTMLElement {
|
|
|
304
304
|
changePopover(e) {
|
|
305
305
|
var s;
|
|
306
306
|
if (E(this, C, tt).call(this), e) {
|
|
307
|
-
let
|
|
307
|
+
let i = null;
|
|
308
308
|
if (e === "parent") {
|
|
309
309
|
const l = this.closest("[data-popover]");
|
|
310
310
|
if (l)
|
|
311
|
-
|
|
311
|
+
i = l;
|
|
312
312
|
else {
|
|
313
313
|
const p = this.getRootNode();
|
|
314
|
-
p instanceof ShadowRoot ?
|
|
314
|
+
p instanceof ShadowRoot ? i = p.host.closest("[data-popover]") : p instanceof HTMLElement && (i = p.closest("[data-popover]"));
|
|
315
315
|
}
|
|
316
316
|
} else if (e === "sibling")
|
|
317
|
-
|
|
317
|
+
i = (s = this.parentElement) == null ? void 0 : s.querySelector("[data-popover]");
|
|
318
318
|
else if (e === "ancestor-child") {
|
|
319
319
|
const l = (p) => {
|
|
320
320
|
if (!p)
|
|
@@ -322,10 +322,10 @@ class dt extends HTMLElement {
|
|
|
322
322
|
let B = p.querySelector("[data-popover]");
|
|
323
323
|
return !B && (p != null && p.parentElement) && (B = l(p.parentElement)), B;
|
|
324
324
|
};
|
|
325
|
-
|
|
325
|
+
i = l(this.parentElement) || null;
|
|
326
326
|
} else
|
|
327
|
-
!e.startsWith(".") && !e.startsWith("[") && (e = `#${e}`),
|
|
328
|
-
|
|
327
|
+
!e.startsWith(".") && !e.startsWith("[") && (e = `#${e}`), i = document.querySelector(e) || this.getRootNode().querySelector(e);
|
|
328
|
+
i instanceof HTMLElement ? (o(this, n, i), t(this, n).addEventListener(
|
|
329
329
|
"popoverTriggered",
|
|
330
330
|
t(this, X)
|
|
331
331
|
), t(this, n).addEventListener(
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ui=Object.defineProperty;var qs=Object.getOwnPropertySymbols,ai=Object.getPrototypeOf,di=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable,pi=Reflect.get;var $s=a=>{throw TypeError(a)};var Bs=(a,h,e)=>h in a?ui(a,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[h]=e,Hs=(a,h)=>{for(var e in h||(h={}))di.call(h,e)&&Bs(a,e,h[e]);if(qs)for(var e of qs(h))Si.call(h,e)&&Bs(a,e,h[e]);return a};var zs=(a,h,e)=>h.has(a)||$s("Cannot "+e);var t=(a,h,e)=>(zs(a,h,"read from private field"),e?e.call(a):h.get(a)),i=(a,h,e)=>h.has(a)?$s("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(a):h.set(a,e),r=(a,h,e,s)=>(zs(a,h,"write to private field"),s?s.call(a,e):h.set(a,e),e),o=(a,h,e)=>(zs(a,h,"access private method"),e);var _s=(a,h,e)=>pi(ai(a),e,h);var Ws=(a,h,e)=>new Promise((s,n)=>{var u=v=>{try{y(e.next(v))}catch(le){n(le)}},g=v=>{try{y(e.throw(v))}catch(le){n(le)}},y=v=>v.done?s(v.value):Promise.resolve(v.value).then(u,g);y((e=e.apply(a,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("../Store-Cd1GlEmZ.cjs"),K=require("../index-DekP7OZe.cjs"),fi=require("../easings-GegIwET5.cjs"),bi=require("../element-yhcBhsho.cjs"),tt=require("../events-KVanG9sR.cjs"),ws=require("../function-MthRj-GJ.cjs"),et=require("../layout-Ctc2p3uz.cjs"),Ts=require("../math-GDWEqu7y.cjs"),Us=require("../number-ChAm68cm.cjs"),Gs=require("../stylesheet-HWF2a3nr.cjs");require("../ticker/index.cjs");const Me=require("../order/index.cjs"),Zs=require("../Damped-z9Uaw2MJ.cjs"),mi=require("../Tweened-mvHucL4Y.cjs"),vs=require("../DragControls-CfE2oPAi.cjs"),he=require("../window-resizer/index.cjs"),oe=require("../scroll-entries/index.cjs"),Ns=require("../css-unit-parser/index.cjs"),l=require("../css-property/index.cjs"),gi=require("../Viewport-DB0qAZPJ.cjs");require("construct-style-sheets-polyfill");const ns=require("../element-resizer/index.cjs"),yi=require("../gestures-C7gbKx11.cjs"),Ci=require("../dom-JBOkFLTh.cjs");var p,Fe,E,hs,os,de,pt,Dt,Se,pe,ss;class vi{constructor(h,e,s){i(this,pe);i(this,p);i(this,Fe);i(this,E);i(this,hs,0);i(this,os,0);i(this,de,0);i(this,pt,0);i(this,Dt,null);i(this,Se,0);r(this,p,h),r(this,Fe,e),r(this,E,s),oe.scrollEntries.register(t(this,p)),this.setIndex(t(this,Fe))}get element(){return t(this,p)}get index(){return t(this,Fe)}get size(){return t(this,de)}get width(){return t(this,hs)}get height(){return t(this,os)}get position(){return t(this,pt)}get transformPosition(){return t(this,Se)}destroy(){oe.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(h){h?(t(this,p).style.setProperty("--size",h+"px"),t(this,E).axisCSSProperty.current==="x"?(t(this,p).style.width=h+"px",t(this,p).style.height=""):(t(this,p).style.height=h+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){r(this,hs,t(this,p).offsetWidth),r(this,os,t(this,p).offsetHeight),r(this,de,t(this,E).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),r(this,pt,t(this,E).vertical?et.getCumulativeOffsetTop(t(this,p)):et.getCumulativeOffsetLeft(t(this,p))),r(this,pt,t(this,pt)-t(this,E).contentPosition)}transform(){const h=t(this,E).shiftSectionPositionCSSProperty.current;let e=h;const s=t(this,E).viewportSize*t(this,E).sectionDistanceScaleCSSProperty.current;t(this,E).loopCSSProperty.current&&t(this,pt)+t(this,de)<=t(this,E).currentScrollValue-h/2&&(e=(t(this,E).distance-h)*-1-t(this,E).gap),oe.scrollEntries.update(t(this,p),t(this,E).axisCSSProperty.current,e);const n=t(this,E).currentScrollValue+e,u=t(this,pt)-t(this,E).viewportSize-s,g=t(this,pt)+t(this,de)+s,y=Us.preciseNumber(Ts.clamp(n,u,g),3);r(this,Se,y*-1),t(this,E).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,Se)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,Se)}px, 0px, 0px)`}setMark(h){t(this,Dt)!==h&&(t(this,Dt)&&t(this,p).classList.remove(t(this,Dt)),h&&t(this,p).classList.add(h),r(this,Dt,h),tt.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Dt)},custom:!0}))}setMiddle(h){t(this,p).classList.toggle("middle",h)}setIndex(h){o(this,pe,ss).call(this,"index",h)}setCurrentIndex(h){o(this,pe,ss).call(this,"current-index",h)}setCurrentIndexArc(h){o(this,pe,ss).call(this,"current-index-arc",h)}setCurrentIndexArcAbs(h){o(this,pe,ss).call(this,"current-index-arc-abs",h)}}p=new WeakMap,Fe=new WeakMap,E=new WeakMap,hs=new WeakMap,os=new WeakMap,de=new WeakMap,pt=new WeakMap,Dt=new WeakMap,Se=new WeakMap,pe=new WeakSet,ss=function(h,e){e!==null?(t(this,p).style.setProperty(`--${h}`,e.toString()),t(this,p).setAttribute(`data-${h}`,e.toString())):(t(this,p).style.removeProperty(`--${h}`),t(this,p).removeAttribute(`data-${h}`))};const Pi=Gs.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:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".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 S,fe,F,qt,ft,bt,mt,st,Bt,$t,gt,Ht,be,it,V,me,ge,ye,Ce,Te,ve,j,Pe,_t,J,Wt,yt,Ee,Nt,we,Ut,Gt,Zt,f,Oe,W,d,ls,cs,L,P,N,rt,Kt,nt,I,T,De,Ct,vt,Pt,U,qe,jt,Et,xe,ht,k,Be,wt,Le,$e,c,Vs,is,Ie,Ps,Es,ks,Rs,O,us,Ks,He,as,As,Is,ue,js,ds,rs,Ss;class xs extends HTMLElement{constructor(){super();i(this,c);i(this,S,null);i(this,fe,new l.CSSProperty(this,"--controls",!0));i(this,F,new l.CSSProperty(this,"--axis","y"));i(this,qt,new l.CSSProperty(this,"--reverse",!1));i(this,ft,new l.CSSProperty(this,"--direction",0));i(this,bt,new l.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));i(this,mt,new l.CSSProperty(this,"--split",!1));i(this,st,new l.CSSProperty(this,"--sectional",!1));i(this,Bt,new l.CSSProperty(this,"--tween-easing",!1));i(this,$t,new l.CSSProperty(this,"--tween-duration",!1));i(this,gt,new l.CSSProperty(this,"--auto-size",!1));i(this,Ht,new l.CSSProperty(this,"--wheel-max-delta",!1));i(this,be,new l.CSSProperty(this,"--drag-inertion",1));i(this,it,new l.CSSProperty(this,"--sections-in-view",1));i(this,V,new l.CSSProperty(this,"--loop",!1));i(this,me,new l.CSSProperty(this,"--damping",20));i(this,ge,new l.CSSProperty(this,"--mass",0));i(this,ye,new l.CSSProperty(this,"--stiffness",0));i(this,Ce,new l.CSSProperty(this,"--mouse-drag",!1));i(this,Te,new l.CSSProperty(this,"--section-distance-scale",.5));i(this,ve,new l.CSSProperty(this,"--start-section",0));i(this,j,new l.CSSProperty(this,"--autoplay",0));i(this,Pe,new l.CSSProperty(this,"--autoplay-pause-duration",0));i(this,_t,new l.CSSProperty(this,"--autoplay-user-direction",!1));i(this,J,new l.CSSProperty(this,"--classes",!1));i(this,Wt,new l.CSSProperty(this,"--current-index-start-offset",0));i(this,yt,new l.CSSProperty(this,"--current-index-end-offset",0));i(this,Ee,new l.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));i(this,Nt,new l.CSSProperty(this,"--focus-delay",0));i(this,we,new l.CSSProperty(this,"--focus-duration",3e3));i(this,Ut,new l.CSSProperty(this,"--disabled",!1));i(this,Gt,new l.CSSProperty(this,"--hibernate",!1));i(this,Zt,null);i(this,f,null);i(this,Oe,null);i(this,W,[]);i(this,d,[]);i(this,ls,0);i(this,cs,0);i(this,L,0);i(this,P,0);i(this,N,0);i(this,rt,null);i(this,Kt,null);i(this,nt,null);i(this,I,null);i(this,T,new ce.Store(0));i(this,De,0);i(this,Ct,0);i(this,vt,!1);i(this,Pt,!0);i(this,U,!0);i(this,qe);i(this,jt);i(this,Et,new mi.Tweened);i(this,xe,!1);i(this,ht,null);i(this,k,!1);i(this,Be,null);i(this,wt,[]);i(this,Le,!1);i(this,$e);i(this,O,e=>{if(e&&t(this,Le)){r(this,Le,!1);return}this.resize()});i(this,us,()=>{if(!t(this,vt)||t(this,U)||t(this,Pt))return;const e=this.currentScrollValue;if(r(this,De,Math.max(0,e-t(this,P))),t(this,d).length){for(let s=0;s<t(this,W).length;s++)t(this,W)[s].transform();t(this,T).current=o(this,c,rs).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;o(this,c,js).call(this),oe.scrollEntries.update(this,t(this,F).current,e)});i(this,He,(e,s)=>{t(this,fe).current&&(o(this,c,As).call(this,Math.sign(s)||1),t(this,as).call(this,e,s))});i(this,as,(e,s)=>{if(t(this,ft).current){if(t(this,ft).current<0&&s>0)return;if(t(this,ft).current>0&&s<0)return}if(t(this,jt)||t(this,Et).unlistenAnimationFrame(),!t(this,j).current&&t(this,Nt).current&&(clearInterval(t(this,qe)),r(this,qe,setTimeout(()=>{const n=t(this,d)[o(this,c,rs).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,we).current,easing:fi.easeInOutExpo}})},t(this,Nt).current))),!(e.includes("drag")&&!gi.device.isTouch&&!t(this,Ce).current)){if(t(this,st).current&&e!=="drag"){const n=Math.sign(s);if(t(this,d).length){const u={tween:t(this,Bt).current||t(this,$t).current?{easing:t(this,Bt).current||"easeInOutCubic",duration:t(this,$t).current||500}:void 0};t(this,xe)?this.scrollToSection(o(this,c,rs).call(this,!0),u):this.shiftSections(n,u)}else t(this,S).shift(n*t(this,L))}else t(this,S).shift(s);r(this,xe,e==="drag")}});i(this,ds,ws.debounce(()=>{const e=t(this,wt).reduce((s,n)=>{const u=this.vertical?n.width:n.height;return u>s?u:s},0);clearTimeout(t(this,$e)),r(this,Le,!0),this.style.setProperty("--max-section-size",""),r(this,$e,setTimeout(()=>{r(this,Le,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));i(this,Ss,()=>{r(this,k,!0),this.hibernatedCSSProperty.current||o(this,c,Rs).call(this)});if(K.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Pi];const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),r(this,Zt,document.createElement("div")),t(this,Zt).className="content-wrapper",r(this,f,document.createElement("div")),t(this,f).className="content",r(this,Oe,document.createElement("slot")),t(this,f).appendChild(t(this,Oe)),t(this,Zt).appendChild(t(this,f)),e.appendChild(t(this,Zt)),r(this,Be,new MutationObserver(ws.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,S)}get controlsCSSProperty(){return t(this,fe)}get axisCSSProperty(){return t(this,F)}get reverseCSSProperty(){return t(this,qt)}get directionCSSProperty(){return t(this,ft)}get pagesCSSProperty(){return t(this,bt)}get splitCSSProperty(){return t(this,mt)}get sectionalCSSProperty(){return t(this,st)}get easingCSSProperty(){return t(this,Bt)}get durationCSSProperty(){return t(this,$t)}get autoSizeCSSProperty(){return t(this,gt)}get wheelMaxDeltaCSSProperty(){return t(this,Ht)}get dragInertionCSSProperty(){return t(this,be)}get sectionsInViewCSSProperty(){return t(this,it)}get loopCSSProperty(){return t(this,V)}get dampingCSSProperty(){return t(this,me)}get massCSSProperty(){return t(this,ge)}get stiffnessCSSProperty(){return t(this,ye)}get mouseDragCSSProperty(){return t(this,Ce)}get sectionDistanceScaleCSSProperty(){return t(this,Te)}get startSectionCSSProperty(){return t(this,ve)}get autoplayCSSProperty(){return t(this,j)}get autoplayPauseDurationCSSProperty(){return t(this,Pe)}get autoplayUserDirectionCSSProperty(){return t(this,_t)}get classesCSSProperty(){return t(this,J)}get currentIndexStartOffsetCSSProperty(){return t(this,Wt)}get currentIndexEndOffsetCSSProperty(){return t(this,yt)}get shiftSectionPositionCSSProperty(){return t(this,Ee)}get focusDelayCSSProperty(){return t(this,Nt)}get focusDurationCSSProperty(){return t(this,we)}get disabledCSSProperty(){return t(this,Ut)}get hibernatedCSSProperty(){return t(this,Gt)}get currentScrollValue(){return o(this,c,Is).call(this,"current")}get targetScrollValue(){return o(this,c,Is).call(this,"target")}get contentWrapperElement(){return t(this,Zt)}get contentElement(){return t(this,f)}get sections(){return t(this,W)}get visibleSections(){return t(this,d)}get position(){return t(this,ls)}get contentPosition(){return t(this,cs)}get viewportSize(){return t(this,L)}get scrollSize(){return t(this,P)}get gap(){return t(this,N)}get counter(){return t(this,T)}get limit(){return Math.ceil(t(this,d).length-t(this,it).current)}get distance(){return t(this,Ct)}get loopDistance(){return t(this,V).current?t(this,Ct)+t(this,N):t(this,Ct)}get hasOverflow(){return t(this,vt)}get overscroll(){return t(this,De)}get scrollLine(){return t(this,ht)}get vertical(){return t(this,F).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,F).current==="y"?0:t(this,S).distance}get scrollHeight(){return t(this,F).current==="x"?0:t(this,S).distance}tryResplit(){!t(this,U)&&(t(this,V).current||t(this,mt).current||t(this,V).current||t(this,gt).current||t(this,st).current)&&o(this,c,is).call(this)}onScroll(...e){return t(this,S).subscribe(...e)}offScroll(...e){t(this,S).unsubscribe(...e)}range(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress<u?0:this.currentProgress>g?1:(this.currentProgress-u)/(g-u)}curve(e,s,n=0){return Math.sin(this.range(e,s,n)*Math.PI)}visible(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress>=u&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,d).length||t(this,U))return;const n=t(this,T).current,u=o(this,c,Ks).call(this,e),g=t(this,d)[n],y=t(this,d)[u];if(g&&y){let v=0;const le=o(this,c,rs).call(this),Ae=t(this,d)[le];let es=Ae?this.targetScrollValue-Ae.position:0;t(this,V).current?u===0&&n===t(this,d).length-1?(v=t(this,P)+t(this,L)-g.position+t(this,N),t(this,xe)||(es=0)):u===t(this,d).length-1&&n===0?v=y.position-(t(this,P)+t(this,L)+t(this,N)):v=y.position-g.position:v=y.position-g.position,this.shiftPosition(v-es,s)}}shiftSections(e,s){t(this,d).length&&this.scrollToSection(t(this,T).current+e,s)}setPosition(e,s){t(this,U)||(o(this,c,As).call(this,Math.sign(e)||1),s!=null&&s.tween?t(this,jt)||(t(this,Et).set(t(this,S).current,{equalize:!0}),t(this,Et).set(Math.min(e,this.distance),Hs({},s.tween)),r(this,jt,setTimeout(()=>{r(this,jt,void 0)},s.tween.duration||0))):t(this,S).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"}))}shiftPosition(e,s){this.setPosition(t(this,S).target+e,s)}resize(){if(t(this,Gt).current)return;r(this,d,t(this,W).filter(n=>bi.isElementVisible(n.element))),this.style.setProperty("--sections",t(this,d).length.toString()),t(this,S).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,P)||0,s=t(this,T).current;if(r(this,ls,this.vertical?et.getCumulativeOffsetTop(this):et.getCumulativeOffsetLeft(this)),r(this,cs,this.vertical?et.getCumulativeOffsetTop(t(this,f)):et.getCumulativeOffsetLeft(t(this,f))),r(this,L,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,N,Ns.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):r(this,N,Ns.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,gt).current&&t(this,d).length){const n=t(this,it).current,u=(t(this,L)-t(this,N)*(n-1))/n;t(this,d).forEach(g=>{g.setSize(u)})}else t(this,d).forEach(n=>{n.setSize()});if(t(this,d).forEach(n=>{n.resize()}),t(this,bt).current){r(this,P,t(this,L)*t(this,bt).current);const n=t(this,P)+t(this,L);this.vertical?(t(this,f).style.width=n+"px",t(this,f).style.height="100%"):(t(this,f).style.height=n+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",r(this,P,t(this,f).offsetHeight-t(this,L))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",r(this,P,t(this,f).offsetWidth-t(this,L)));if(!t(this,V).current){const n=getComputedStyle(this),u=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,P,t(this,P)+u),t(this,S).max=t(this,P)}if(t(this,V).current&&t(this,d).length){const n=t(this,d)[t(this,d).length-1],u=n.position+n.size-t(this,L),g=t(this,P)-u;r(this,Ct,n.position+n.size+g)}else r(this,Ct,t(this,P));if(t(this,st).current&&t(this,d).length){const n=t(this,d)[s];t(this,S).set(n.position,{equalize:!0})}else t(this,S).set(e*t(this,P),{equalize:!0});r(this,vt,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,L)),this.classList.toggle("has-overflow",t(this,vt)),t(this,vt)?t(this,Ut).current||o(this,c,Es).call(this):o(this,c,Ps).call(this),t(this,ds).call(this),tt.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,S).notify()}connectedCallback(){oe.scrollEntries.register(this),r(this,S,new Zs.Damped(0,{damping:.01,min:0,order:Me.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,rt,new vs.WheelControls({element:t(this,f)})),t(this,rt).changeEvent.subscribe(t(this,He)),r(this,Kt,new vs.KeyboardControls({element:this})),t(this,Kt).changeEvent.subscribe(t(this,He)),r(this,nt,new vs.DragControls({element:t(this,f),rootElement:this})),t(this,nt).changeEvent.subscribe(t(this,He)),r(this,I,new vs.AutoplayControls({culling:this})),t(this,I).changeEvent.subscribe(t(this,as)),t(this,F).subscribe(()=>{o(this,c,Vs).call(this)}),t(this,qt).subscribe(()=>{o(this,c,Vs).call(this)}),t(this,Ht).subscribe(e=>{t(this,rt).axis=e.current?"max":t(this,F).current}),t(this,be).subscribe(e=>{t(this,nt).inertion=typeof e.current=="number"?e.current:1}),t(this,bt).subscribe(()=>{t(this,k)&&t(this,O).call(this)}),t(this,mt).subscribe(({current:e})=>{t(this,k)&&(e?o(this,c,is).call(this):o(this,c,Ie).call(this))}),t(this,st).subscribe(e=>{t(this,rt).debounce=e.current,t(this,nt).swipe=e.current,t(this,I).interval=e.current,t(this,k)&&(e.current&&!e.previous&&!t(this,d).length?o(this,c,is).call(this):!e.current&&e.previous&&t(this,d).length&&o(this,c,Ie).call(this))}),t(this,gt).subscribe(e=>{t(this,k)&&(t(this,O).call(this),e.current&&!e.previous&&!t(this,d).length?o(this,c,is).call(this):!e.current&&e.previous&&t(this,d).length&&o(this,c,Ie).call(this))}),t(this,it).subscribe(e=>{t(this,k)&&(t(this,O).call(this),o(this,c,ue).call(this))}),t(this,V).subscribe(e=>{e.current?(t(this,k)&&(t(this,d).length||(t(this,mt).current=!0)),t(this,S).max=1/0,t(this,S).min=-1/0):(r(this,De,0),t(this,S).max=t(this,P),t(this,S).min=0)}),t(this,me).subscribe(e=>{t(this,S).damping=e.current}),t(this,ge).subscribe(e=>{t(this,S).mass=e.current}),t(this,ye).subscribe(e=>{t(this,S).stiffness=e.current}),t(this,j).subscribe(e=>{t(this,I).speed=e.current,!t(this,Pt)&&e.current&&!e.previous?t(this,I).connect():!e.current&&e.previous&&t(this,I).disconnect()}),t(this,_t).subscribe(e=>{e.current||(t(this,I).direction=1)}),t(this,J).subscribe(e=>{t(this,k)&&o(this,c,ue).call(this)}),t(this,Wt).subscribe(e=>{t(this,k)&&t(this,J).current&&o(this,c,ue).call(this)}),t(this,yt).subscribe(e=>{t(this,k)&&t(this,J).current&&o(this,c,ue).call(this)}),t(this,Ee).subscribe(e=>{t(this,k)&&t(this,S).notify()}),t(this,S).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,T).subscribe(e=>{t(this,U)||(t(this,d).length&&o(this,c,ue).call(this),this.style.setProperty("--counter",e.current+""))}),t(this,Et).subscribe(e=>{t(this,Et).isRunning.current&&t(this,S).set(e.current,{equalize:!0})}),t(this,Ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),o(this,c,Ps).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),o(this,c,Es).call(this))}),t(this,Gt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),o(this,c,ks).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),o(this,c,Rs).call(this))}),t(this,fe).observe(),t(this,F).observe(),t(this,qt).observe(),t(this,ft).observe(),t(this,bt).observe(),t(this,mt).observe(),t(this,st).observe(),t(this,Bt).observe(),t(this,$t).observe(),t(this,gt).observe(),t(this,Ht).observe(),t(this,be).observe(),t(this,it).observe(),t(this,V).observe(),t(this,me).observe(),t(this,ge).observe(),t(this,ye).observe(),t(this,Ce).observe(),t(this,Te).observe(),t(this,ve).observe(),t(this,j).observe(),t(this,j).observe(),t(this,Pe).observe(),t(this,_t).observe(),t(this,J).observe(),t(this,Wt).observe(),t(this,yt).observe(),t(this,Ee).observe(),t(this,Nt).observe(),t(this,we).observe(),t(this,Ut).observe(),t(this,Gt).observe(),he.windowResizer.subscribe(t(this,Ss),Me.RESIZE_ORDER.LAST),ns.elementResizer.subscribe(this,t(this,O)),t(this,Be).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,fe).unobserve(),t(this,F).unobserve(),t(this,qt).unobserve(),t(this,ft).unobserve(),t(this,bt).unobserve(),t(this,mt).unobserve(),t(this,st).unobserve(),t(this,Bt).unobserve(),t(this,$t).unobserve(),t(this,gt).unobserve(),t(this,Ht).unobserve(),t(this,be).unobserve(),t(this,it).unobserve(),t(this,V).unobserve(),t(this,me).unobserve(),t(this,ge).unobserve(),t(this,ye).unobserve(),t(this,Ce).unobserve(),t(this,Te).unobserve(),t(this,ve).unobserve(),t(this,j).unobserve(),t(this,Pe).unobserve(),t(this,_t).unobserve(),t(this,J).unobserve(),t(this,Wt).unobserve(),t(this,yt).unobserve(),t(this,Ee).unobserve(),t(this,Nt).unobserve(),t(this,we).unobserve(),t(this,Ut).unobserve(),t(this,Gt).unobserve(),he.windowResizer.unsubscribe(t(this,Ss)),ns.elementResizer.unsubscribe(t(this,O)),o(this,c,ks).call(this),t(this,Be).disconnect()}}S=new WeakMap,fe=new WeakMap,F=new WeakMap,qt=new WeakMap,ft=new WeakMap,bt=new WeakMap,mt=new WeakMap,st=new WeakMap,Bt=new WeakMap,$t=new WeakMap,gt=new WeakMap,Ht=new WeakMap,be=new WeakMap,it=new WeakMap,V=new WeakMap,me=new WeakMap,ge=new WeakMap,ye=new WeakMap,Ce=new WeakMap,Te=new WeakMap,ve=new WeakMap,j=new WeakMap,Pe=new WeakMap,_t=new WeakMap,J=new WeakMap,Wt=new WeakMap,yt=new WeakMap,Ee=new WeakMap,Nt=new WeakMap,we=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,Zt=new WeakMap,f=new WeakMap,Oe=new WeakMap,W=new WeakMap,d=new WeakMap,ls=new WeakMap,cs=new WeakMap,L=new WeakMap,P=new WeakMap,N=new WeakMap,rt=new WeakMap,Kt=new WeakMap,nt=new WeakMap,I=new WeakMap,T=new WeakMap,De=new WeakMap,Ct=new WeakMap,vt=new WeakMap,Pt=new WeakMap,U=new WeakMap,qe=new WeakMap,jt=new WeakMap,Et=new WeakMap,xe=new WeakMap,ht=new WeakMap,k=new WeakMap,Be=new WeakMap,wt=new WeakMap,Le=new WeakMap,$e=new WeakMap,c=new WeakSet,Vs=function(){const e=t(this,F).current,s=t(this,qt).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${s}`:`column${s}`,t(this,rt).axis=t(this,Ht).current?"max":e,t(this,Kt).dimension=e==="x"?"width":"height",t(this,nt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,k)&&t(this,O).call(this)},is=function(){o(this,c,Ie).call(this),t(this,Oe).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,W).push(new vi(e,s,this))}),r(this,d,[...t(this,W)]),t(this,f).style.transform="",tt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,O).call(this),o(this,c,ue).call(this)},Ie=function(){t(this,W).forEach(e=>{e.destroy()}),r(this,W,[]),r(this,d,[]),t(this,T).reset(),t(this,S).reset(),this.style.removeProperty("--max-section-size"),tt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ps=function(){t(this,Pt)||(r(this,Pt,!0),t(this,S).unsubscribe(t(this,us)),t(this,S).unlistenAnimationFrame(),clearInterval(t(this,qe)),clearInterval(t(this,jt)),t(this,Et).unlistenAnimationFrame(),t(this,rt).disconnect(),t(this,Kt).disconnect(),t(this,nt).disconnect(),t(this,I).disconnect(),t(this,vt)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,O).call(this)))},Es=function(){t(this,Pt)&&(r(this,Pt,!1),t(this,S).subscribe(t(this,us),-1e4),t(this,S).notify(),t(this,rt).connect(),t(this,Kt).connect(),t(this,nt).connect(),t(this,j).current&&t(this,I).connect())},ks=function(){t(this,U)||(r(this,U,!0),clearTimeout(t(this,$e)),he.windowResizer.unsubscribe(t(this,O)),o(this,c,Ps).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),t(this,W).length?o(this,c,Ie).call(this):(t(this,T).reset(),t(this,S).reset()),oe.scrollEntries.unregister(this))},Rs=function(){t(this,U)&&(r(this,U,!1),oe.scrollEntries.register(this),this.tryResplit(),o(this,c,Es).call(this),this.scrollToSection(t(this,ve).current,{behaviour:"instant"}),he.windowResizer.subscribe(t(this,O),Me.RESIZE_ORDER.SCROLL))},O=new WeakMap,us=new WeakMap,Ks=function(e){let s=t(this,T).current;return t(this,V).current?s=Us.loopNumber(e,t(this,d).length):s=Ts.clamp(e,0,this.limit),s},He=new WeakMap,as=new WeakMap,As=function(e=1){t(this,_t).current&&(t(this,I).direction=e),t(this,j).current&&t(this,I).pauseAndContinue(t(this,Pe).current,this.sectionalCSSProperty.current)},Is=function(e="current"){if(t(this,V).current&&t(this,d).length){const s=t(this,S)[e]%Math.round(t(this,P)+t(this,L)+t(this,N));return s<0?t(this,P)+s+t(this,L)+t(this,N):s}else return t(this,S)[e]},ue=function(){if(t(this,d).length){const e=t(this,T).current+t(this,Wt).current;if(e===0?r(this,ht,"start"):e===this.limit?r(this,ht,"end"):r(this,ht,null),tt.dispatchEvent(this,"scrollLine",{detail:{line:t(this,ht)}}),t(this,J).current){this.classList.remove("end","start"),t(this,ht)&&this.classList.add(t(this,ht));const s=t(this,it).current+t(this,yt).current;r(this,wt,[]),t(this,d).forEach((n,u)=>{n.setCurrentIndex(null),n.setCurrentIndexArc(null),n.setCurrentIndexArcAbs(null),n.setMiddle(!1);const g=e-this.limit-1+t(this,yt).current,y=e+s,v=this.sections.length-y;u>=e&&u<y||u<=g?(n.setMark("current"),t(this,wt).push(n)):u>=y&&u<y+v/2||u<=g+s?n.setMark("next"):n.setMark("previous")}),t(this,ds).call(this)}}},js=function(){if(t(this,J).current){const e=Math.floor(t(this,wt).length/2);t(this,wt).sort((s,n)=>s.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,wt).forEach((s,n)=>{const u=n-e;s.setCurrentIndex(n),s.setCurrentIndexArc(u),s.setCurrentIndexArcAbs(Math.abs(u)),s.setMiddle(n===e)})}},ds=new WeakMap,rs=function(e=!1){let s=this.targetScrollValue,n=1/0,u=0;const g=t(this,S).direction;for(let y=0;y<t(this,d).length;y++){const v=t(this,d)[y];let le=t(this,xe)?v.size*g*-1*.4:0,Ae=v.position;this.overscroll&&Ae===0&&e&&(Ae=t(this,Ct));let es=Math.abs(Ae+le-s);es<=n&&(n=es,u=y)}return u},Ss=new WeakMap;K.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",xs);var ps;class Cs extends HTMLElement{constructor(){super(...arguments);i(this,ps,null)}get scrollElement(){return t(this,ps)}connectedCallback(){const e=Ci.findParentElement(this,xs);e instanceof xs?r(this,ps,e):console.error(this,"e-scroll not found")}}ps=new WeakMap;var Jt,D,xt,Lt,_e,We,Qt,Ne,fs,bs;class Js extends Cs{constructor(){super();i(this,Jt,null);i(this,D,null);i(this,xt,!1);i(this,Lt,0);i(this,_e,0);i(this,We,0);i(this,Qt,()=>{r(this,xt,this.offsetWidth>this.offsetHeight);const e=t(this,xt)?this.offsetWidth:this.offsetHeight;r(this,Lt,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,Lt,Math.max(t(this,Lt),30)),t(this,xt)?(t(this,D).style.width=t(this,Lt)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,Lt)+"px"),r(this,_e,e-t(this,Lt)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ne).call(this)});i(this,Ne,()=>{r(this,We,this.scrollElement.currentProgress*t(this,_e)),t(this,xt)?t(this,D).style.transform=`translate3d(${t(this,We)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,We)}px, 0px)`});i(this,fs,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,bs,e=>{document.documentElement.classList.add("grabbing"),yi.setupDrag(u=>{const g=t(this,xt)?u.x:u.y,y=this.scrollElement.distance/t(this,_e),v=(g-n)*y;this.scrollElement.setPosition(s+v)},()=>{document.documentElement.classList.remove("grabbing")});const s=this.scrollElement.damped.target,n=t(this,xt)?e.x:e.y});if(K.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Gs.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,Jt,document.createElement("slot")),t(this,Jt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Jt))}}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Jt).assignedElements()[0]||t(this,Jt).firstElementChild;r(this,D,e),t(this,D).addEventListener("pointerdown",t(this,bs)),he.windowResizer.subscribe(t(this,Qt),Me.RESIZE_ORDER.SCROLL),ns.elementResizer.subscribe(this,t(this,Qt)),ns.elementResizer.subscribe(this.scrollElement,t(this,Qt)),this.scrollElement.onScroll(t(this,Ne)),this.scrollElement.axisCSSProperty.subscribe(t(this,fs))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,D).removeEventListener("pointerdown",t(this,bs)),he.windowResizer.unsubscribe(t(this,Qt)),ns.elementResizer.unsubscribe(t(this,Qt)),this.scrollElement.offScroll(t(this,Ne)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,fs))}}Jt=new WeakMap,D=new WeakMap,xt=new WeakMap,Lt=new WeakMap,_e=new WeakMap,We=new WeakMap,Qt=new WeakMap,Ne=new WeakMap,fs=new WeakMap,bs=new WeakMap;K.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Js);var Ue,Ge,Ze;class Os extends Cs{constructor(){super();i(this,Ue,new l.CSSProperty(this,"--behaviour","smooth"));i(this,Ge,new l.CSSProperty(this,"--tween-easing",!1));i(this,Ze,new l.CSSProperty(this,"--tween-duration",0));K.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Ue).current,s=t(this,Ge).current,n=t(this,Ze).current;this.handleClick({behaviour:e,tween:s||n?{easing:s,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,Ue).observe(),t(this,Ge).observe(),t(this,Ze).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,Ue).close(),t(this,Ge).close(),t(this,Ze).close()}}Ue=new WeakMap,Ge=new WeakMap,Ze=new WeakMap;var Ke;class Qs extends Os{constructor(){super(...arguments);i(this,Ke,new l.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Ke).current,e)}connectedCallback(){super.connectedCallback(),t(this,Ke).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Ke).close()}}Ke=new WeakMap;K.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Qs);var zt,je;class Xs extends Os{constructor(){super(...arguments);i(this,zt,new l.CSSProperty(this,"--step",1));i(this,je,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,zt).current>0&&this.scrollElement.scrollLine==="end"||t(this,zt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,zt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,zt).subscribe(()=>{t(this,je).call(this)}),t(this,zt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,je)),t(this,je).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,zt).close(),this.removeAttribute("disabled")}}zt=new WeakMap,je=new WeakMap;K.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Xs);var ot,Xt,Je,ms,gs,Qe;class Ei{constructor(h,e,s){i(this,ot,null);i(this,Xt,null);i(this,Je,null);i(this,ms,null);i(this,gs,()=>{t(this,Xt).scrollToSection(t(this,Je),{behaviour:t(this,ms)})});i(this,Qe,()=>{t(this,ot).classList.toggle("current",t(this,Xt).counter.current===t(this,Je))});K.isBrowser&&(r(this,ot,document.createElement("button")),t(this,ot).setAttribute("aria-label",`Go to section ${e+1}`),r(this,Xt,h),r(this,ms,s),r(this,Je,e),t(this,ot).addEventListener("click",t(this,gs)),t(this,Xt).counter.subscribe(t(this,Qe)),t(this,Qe).call(this))}get element(){return t(this,ot)}destroy(){t(this,ot).removeEventListener("click",t(this,gs)),t(this,Xt).counter.unsubscribe(t(this,Qe)),t(this,ot).remove()}}ot=new WeakMap,Xt=new WeakMap,Je=new WeakMap,ms=new WeakMap,gs=new WeakMap,Qe=new WeakMap;var ze,Yt,Vt;class Ys extends Cs{constructor(){super(...arguments);i(this,ze,null);i(this,Yt,[]);i(this,Vt,ws.debounce(()=>{t(this,Yt).forEach(s=>s.destroy()),r(this,Yt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let s=0;s<e;s++){const n=new Ei(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");t(this,ze).appendChild(n.element),t(this,Yt).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",this.scrollElement.addEventListener("scrollSectionsChange",t(this,Vt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,Vt)),this.scrollElement.loopCSSProperty.subscribe(t(this,Vt)),r(this,ze,document.createElement("div")),this.appendChild(t(this,ze))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,Vt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,Vt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,Vt)),t(this,Yt).forEach(e=>e.destroy()),r(this,Yt,[]),t(this,ze).remove()}}ze=new WeakMap,Yt=new WeakMap,Vt=new WeakMap;K.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Ys);var te,ee,se,ie,kt,Rt,At,It,R,q,B,$,Mt,z,lt,ct,Q,Ft,Ve,ut,at,dt,w,H,_,X,Y,G,Xe,m,Tt,re,Ye,x,St,M,A,Z,ke,Ot,C,ne,b,ei,si,ii,ri,ni,hi,ts,Re,Ms,ae,oi,li,Fs;class ti extends Cs{constructor(){super(...arguments);i(this,b);i(this,te);i(this,ee);i(this,se);i(this,ie);i(this,kt);i(this,Rt);i(this,At);i(this,It);i(this,R);i(this,q);i(this,B);i(this,$);i(this,Mt);i(this,z);i(this,lt);i(this,ct);i(this,Q);i(this,Ft);i(this,Ve);i(this,ut);i(this,at);i(this,dt);i(this,w);i(this,H);i(this,_);i(this,X);i(this,Y);i(this,G);i(this,Xe);i(this,m);i(this,Tt);i(this,re);i(this,Ye);i(this,x);i(this,St);i(this,M);i(this,A);i(this,Z);i(this,ke);i(this,Ot);i(this,C);i(this,ne);i(this,ts);i(this,Re);r(this,te,new l.CSSProperty(this,"--damping",20)),r(this,ee,new l.CSSProperty(this,"--mass",0)),r(this,se,new l.CSSProperty(this,"--stiffness",0)),r(this,ie,new l.CSSProperty(this,"--target","")),r(this,kt,new l.CSSProperty(this,"--disabled",!1)),r(this,Rt,new l.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),r(this,At,new l.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),r(this,It,new l.CSSProperty(this,"--capture-once",!1)),r(this,R,new l.CSSProperty(this,"--captured","")),r(this,q,new l.CSSProperty(this,"--released","")),r(this,B,new l.CSSProperty(this,"--captured-from-start","")),r(this,$,new l.CSSProperty(this,"--captured-from-finish","")),r(this,Mt,new l.CSSProperty(this,"--released-from-start","")),r(this,z,new l.CSSProperty(this,"--released-from-finish","")),r(this,lt,new l.CSSProperty(this,"--passed-var","")),r(this,ct,new l.CSSProperty(this,"--progress-var","")),r(this,Q,new l.CSSProperty(this,"--progress-arc-var","")),r(this,Ft,new l.CSSProperty(this,"--progress-arc-mult",1)),r(this,Ve,new l.CSSProperty(this,"--animation-var-type","target")),r(this,ut,new l.CSSProperty(this,"--distance-var","")),r(this,at,new l.CSSProperty(this,"--start-var","")),r(this,dt,new l.CSSProperty(this,"--finish-var","")),r(this,w,new ce.Store(!1)),r(this,H,new ce.Store(!1)),r(this,_,new ce.Store(!1)),r(this,X,new ce.Store(!1)),r(this,Y,new ce.Store(!1)),r(this,G,new ce.Store(!1)),r(this,Xe,[]),r(this,m,this),r(this,Tt,0),r(this,re,0),r(this,Ye,0),r(this,x,new Zs.Damped(0,{order:Me.TICK_ORDER.SEGMENT,min:0,max:1})),r(this,St,0),r(this,M,0),r(this,A,0),r(this,Z,0),r(this,ke,!1),r(this,Ot,!1),r(this,C,!0),r(this,ne,!1),this.resize=()=>{r(this,re,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Tt,this.scrollElement.vertical?et.getCumulativeOffsetTop(this,this.scrollElement):et.getCumulativeOffsetLeft(this,this.scrollElement));const e=et.getStickyOffset(this,this.scrollElement.vertical?"top":"left");r(this,Tt,t(this,Tt)-e),r(this,M,this.getStart()),r(this,A,this.getDistance()),r(this,M,t(this,M)+t(this,At).current),r(this,A,t(this,A)+t(this,Rt).current),r(this,Z,t(this,M)+t(this,A)),this.scrollElement.currentScrollValue>t(this,Z)&&!t(this,w).current&&!t(this,H).current&&(t(this,w).current=!0),this.setVar(t(this,at).current,t(this,M)),this.setVar(t(this,dt).current,t(this,Z)),this.setVar(t(this,ut).current,t(this,A)),t(this,x).max=t(this,A),r(this,ke,!0),t(this,Re).call(this)},this.findAnotherScrollEntries=ws.debounce(()=>{const e=oe.scrollEntries.getAll(this).reverse();let s=0;e.forEach((n,u)=>{n.element===this.scrollElement&&(s=u)}),r(this,Xe,e.slice(s+1)),this.tick()},0),r(this,ts,()=>{t(this,C)||this.resize()}),r(this,Re,()=>{!t(this,C)&&t(this,ke)&&this.tick()})}get distanceOffsetCSSProperty(){return t(this,Rt)}get startOffsetCSSProperty(){return t(this,At)}get captureOnceCSSProperty(){return t(this,It)}get capturedCSSProperty(){return t(this,R)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,B)}get capturedFromFinishCSSProperty(){return t(this,$)}get releasedFromStartCSSProperty(){return t(this,Mt)}get releasedFromFinishCSSProperty(){return t(this,z)}get passedVarCSSProperty(){return t(this,lt)}get progressVarCSSProperty(){return t(this,ct)}get progressArcVarCSSProperty(){return t(this,Q)}get progressArcMultCSSProperty(){return t(this,Ft)}get animationVarTypeCSSProperty(){return t(this,Ve)}get distanceVarCSSProperty(){return t(this,ut)}get startVarCSSProperty(){return t(this,at)}get finishVarCSSProperty(){return t(this,dt)}get disabledCSSProperty(){return t(this,kt)}get dampingCSSProperty(){return t(this,te)}get massCSSProperty(){return t(this,ee)}get stiffnessCSSProperty(){return t(this,se)}get targetCSSProperty(){return t(this,ie)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,_)}get isReleasedFromStart(){return t(this,X)}get isCapturedFromFinish(){return t(this,Y)}get isReleasedFromFinish(){return t(this,G)}get directionPosition(){return t(this,Tt)}get directionSize(){return t(this,re)}get passed(){return t(this,x)}get progress(){return t(this,St)}get progressArc(){return Math.abs(Math.cos(t(this,St)*Math.PI))*t(this,Ft).current}get start(){return t(this,M)}get finish(){return t(this,Z)}get distance(){return t(this,A)}get isCapturedOnce(){return t(this,Ot)}get isDisabled(){return t(this,C)}tick(){let e=this.scrollElement.currentScrollValue;t(this,Xe).forEach(u=>{e+=u.value});const s=e-t(this,M);t(this,ne)||r(this,ne,t(this,x).previous?Math.abs(t(this,x).previous-s)>1e3:!1),t(this,x).set(s);const n=Math.round(e);t(this,w).current&&(n>=t(this,M)?t(this,_).current||o(this,b,ii).call(this):t(this,_).current&&!t(this,X).current&&o(this,b,ni).call(this),n<t(this,Z)?t(this,G).current&&!t(this,Y).current&&o(this,b,ri).call(this):t(this,_).current&&!t(this,G).current&&o(this,b,hi).call(this)),n>=t(this,M)&&n<t(this,Z)?t(this,w).current||o(this,b,ei).call(this):t(this,w).current&&(t(this,x).set(Ts.step(t(this,A)/2,t(this,x).target,0,t(this,A))),o(this,b,si).call(this)),t(this,Ot)&&t(this,It).current&&(t(this,R).current&&t(this,m).classList.add(t(this,R).current),r(this,C,!0))}disable(){this.style.cssText="",r(this,Tt,0),r(this,re,0),t(this,x).reset(),r(this,St,0),r(this,M,0),r(this,A,0),r(this,Z,0),r(this,ke,!1),t(this,w).current=!1,t(this,H).current=!1,t(this,_).current=!1,t(this,X).current=!1,t(this,Y).current=!1,t(this,G).current=!1,r(this,Ot,!1),r(this,C,!0),o(this,b,Fs).call(this)}enable(){r(this,C,!1)}connectedCallback(){super.connectedCallback(),t(this,w).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,_).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,Y).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,H).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,X).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,G).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,te).observe(),t(this,ee).observe(),t(this,se).observe(),t(this,ie).observe(),t(this,kt).observe(),t(this,Rt).observe(),t(this,At).observe(),t(this,It).observe(),t(this,R).observe(),t(this,q).observe(),t(this,B).observe(),t(this,$).observe(),t(this,Mt).observe(),t(this,z).observe(),t(this,lt).observe(),t(this,ct).observe(),t(this,Q).observe(),t(this,Ft).observe(),t(this,Ve).observe(),t(this,ut).observe(),t(this,at).observe(),t(this,dt).observe();let e=!1;this.findAnotherScrollEntries(),t(this,kt).current||this.enable(),t(this,te).subscribe(s=>{t(this,x).damping=s.current}),t(this,ee).subscribe(s=>{t(this,x).mass=s.current}),t(this,se).subscribe(s=>{t(this,x).stiffness=s.current}),t(this,ie).subscribe(s=>{s.previous&&o(this,b,Fs).call(this),s.current?s.current==="parent"?r(this,m,this.parentElement||this):r(this,m,document.querySelector(s.current)||this):r(this,m,this)}),t(this,kt).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,At).subscribe(()=>{e&&!t(this,C)&&this.resize()}),t(this,Rt).subscribe(()=>{e&&!t(this,C)&&this.resize()}),t(this,R).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,$).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,q).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,Mt).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,z).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,It).subscribe(s=>{t(this,C)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,lt).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ct).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,St)))}),t(this,Q).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,Ft).subscribe(s=>{t(this,C)||o(this,b,Ms).call(this)}),t(this,at).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,M)))}),t(this,dt).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,Z)))}),t(this,ut).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,x).subscribe(s=>{if(t(this,ne)){r(this,ne,!1);return}o(this,b,Ms).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),he.windowResizer.subscribe(t(this,ts),Me.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(t(this,Re)),e=!0}disconnectedCallback(){he.windowResizer.unsubscribe(t(this,ts)),this.scrollElement.offScroll(t(this,Re)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),t(this,te).close(),t(this,ee).close(),t(this,se).close(),t(this,ie).close(),t(this,kt).close(),t(this,Rt).close(),t(this,At).close(),t(this,It).close(),t(this,R).close(),t(this,q).close(),t(this,B).close(),t(this,$).close(),t(this,Mt).close(),t(this,z).close(),t(this,lt).close(),t(this,ct).close(),t(this,Q).close(),t(this,Ft).close(),t(this,ut).close(),t(this,at).close(),t(this,dt).close(),t(this,w).close(),t(this,H).close(),t(this,_).close(),t(this,X).close(),t(this,Y).close(),t(this,G).close(),this.disable(),t(this,x).close()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,s){if(e){const n=typeof s=="number"?s.toFixed(6):s;t(this,m).style.setProperty(`--${e}`,n)}}getDistance(){return t(this,re)+t(this,Ye)}getStart(){return t(this,Tt)-t(this,Ye)}}te=new WeakMap,ee=new WeakMap,se=new WeakMap,ie=new WeakMap,kt=new WeakMap,Rt=new WeakMap,At=new WeakMap,It=new WeakMap,R=new WeakMap,q=new WeakMap,B=new WeakMap,$=new WeakMap,Mt=new WeakMap,z=new WeakMap,lt=new WeakMap,ct=new WeakMap,Q=new WeakMap,Ft=new WeakMap,Ve=new WeakMap,ut=new WeakMap,at=new WeakMap,dt=new WeakMap,w=new WeakMap,H=new WeakMap,_=new WeakMap,X=new WeakMap,Y=new WeakMap,G=new WeakMap,Xe=new WeakMap,m=new WeakMap,Tt=new WeakMap,re=new WeakMap,Ye=new WeakMap,x=new WeakMap,St=new WeakMap,M=new WeakMap,A=new WeakMap,Z=new WeakMap,ke=new WeakMap,Ot=new WeakMap,C=new WeakMap,ne=new WeakMap,b=new WeakSet,ei=function(){t(this,w).current=!0,t(this,H).current=!1,r(this,Ot,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,R).current&&t(this,m).classList.add(t(this,R).current)},si=function(){t(this,H).current=!0,t(this,w).current=!1,r(this,Ot,!0),t(this,R).current&&t(this,m).classList.remove(t(this,R).current),t(this,B).current&&t(this,m).classList.remove(t(this,B).current),t(this,$).current&&t(this,m).classList.remove(t(this,$).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)},ii=function(){t(this,w).current=!0,t(this,_).current=!0,t(this,X).current=!1,t(this,B).current&&t(this,m).classList.add(t(this,B).current)},ri=function(){t(this,w).current=!0,t(this,Y).current=!0,t(this,G).current=!1,t(this,$).current&&t(this,m).classList.add(t(this,$).current)},ni=function(){t(this,H).current=!0,t(this,X).current=!0,t(this,_).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},hi=function(){t(this,H).current=!0,t(this,G).current=!0,t(this,Y).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},ts=new WeakMap,Re=new WeakMap,Ms=function(){const e=t(this,x)[t(this,Ve).current];this.setVar(t(this,lt).current,e),r(this,St,e/t(this,A)||0),this.setVar(t(this,ct).current,t(this,St)),t(this,Q).current&&this.setVar(t(this,Q).current,this.progressArc)},ae=function(e){if(t(this,C)){e.previous&&t(this,m).classList.remove(e.previous),e.current&&t(this,m).classList.remove(e.current);return}e.current&&t(this,w).current?(e.previous&&t(this,m).classList.remove(e.previous),t(this,m).classList.add(e.current)):!e.current&&e.previous&&t(this,m).classList.remove(e.previous)},oi=function(...e){e.forEach(s=>{s&&t(this,m).classList.remove(s)})},li=function(...e){e.forEach(s=>{s&&t(this,m).style.removeProperty(`--${s}`)})},Fs=function(){o(this,b,oi).call(this,t(this,R).current,t(this,B).current,t(this,$).current,t(this,q).current,t(this,Mt).current,t(this,z).current),o(this,b,li).call(this,t(this,lt).current,t(this,ct).current,t(this,Q).current,t(this,ut).current,t(this,at).current,t(this,dt).current)};K.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ti);class ci extends Os{handleClick(h){this.scrollElement.setPosition(this.scrollElement.vertical?et.getCumulativeOffsetTop(this):et.getCumulativeOffsetLeft(this),h)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}}K.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",ci);var ys;const Ds=class Ds extends Cs{constructor(){super(...arguments);i(this,ys,()=>{this.textContent=`${this.scrollElement.counter.current+1}`})}connectedCallback(){return Ws(this,null,function*(){_s(Ds.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,ys))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,ys))}};ys=new WeakMap;let Ls=Ds;K.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Ls);exports.ScrollBulletButtonsElement=Ys;exports.ScrollCounterElement=Ls;exports.ScrollElement=xs;exports.ScrollSectionButtonElement=ci;exports.ScrollSegmentElement=ti;exports.ScrollSetButtonElement=Qs;exports.ScrollStepButtonElement=Xs;exports.ScrollbarElement=Js;
|
|
1
|
+
"use strict";var ui=Object.defineProperty;var qs=Object.getOwnPropertySymbols,ai=Object.getPrototypeOf,di=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable,pi=Reflect.get;var $s=a=>{throw TypeError(a)};var Bs=(a,h,e)=>h in a?ui(a,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[h]=e,Hs=(a,h)=>{for(var e in h||(h={}))di.call(h,e)&&Bs(a,e,h[e]);if(qs)for(var e of qs(h))Si.call(h,e)&&Bs(a,e,h[e]);return a};var zs=(a,h,e)=>h.has(a)||$s("Cannot "+e);var t=(a,h,e)=>(zs(a,h,"read from private field"),e?e.call(a):h.get(a)),i=(a,h,e)=>h.has(a)?$s("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(a):h.set(a,e),r=(a,h,e,s)=>(zs(a,h,"write to private field"),s?s.call(a,e):h.set(a,e),e),o=(a,h,e)=>(zs(a,h,"access private method"),e);var _s=(a,h,e)=>pi(ai(a),e,h);var Ws=(a,h,e)=>new Promise((s,n)=>{var u=v=>{try{y(e.next(v))}catch(le){n(le)}},g=v=>{try{y(e.throw(v))}catch(le){n(le)}},y=v=>v.done?s(v.value):Promise.resolve(v.value).then(u,g);y((e=e.apply(a,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("../Store-Cd1GlEmZ.cjs"),K=require("../index-DekP7OZe.cjs"),fi=require("../easings-GegIwET5.cjs"),bi=require("../element-yhcBhsho.cjs"),tt=require("../events-KVanG9sR.cjs"),ws=require("../function-MthRj-GJ.cjs"),et=require("../layout-Ctc2p3uz.cjs"),Ts=require("../math-GDWEqu7y.cjs"),Us=require("../number-ChAm68cm.cjs"),Gs=require("../stylesheet-HWF2a3nr.cjs");require("../ticker/index.cjs");const Me=require("../order/index.cjs"),Zs=require("../Damped-z9Uaw2MJ.cjs"),mi=require("../Tweened-mvHucL4Y.cjs"),vs=require("../DragControls-CfE2oPAi.cjs"),he=require("../window-resizer/index.cjs"),oe=require("../scroll-entries/index.cjs"),Ns=require("../css-unit-parser/index.cjs"),l=require("../css-property/index.cjs"),gi=require("../Viewport-DB0qAZPJ.cjs");require("construct-style-sheets-polyfill");const ns=require("../element-resizer/index.cjs"),yi=require("../gestures-C7gbKx11.cjs"),Ci=require("../dom-JBOkFLTh.cjs");var p,Fe,E,hs,os,de,pt,Ot,Se,pe,ss;class vi{constructor(h,e,s){i(this,pe);i(this,p);i(this,Fe);i(this,E);i(this,hs,0);i(this,os,0);i(this,de,0);i(this,pt,0);i(this,Ot,null);i(this,Se,0);r(this,p,h),r(this,Fe,e),r(this,E,s),oe.scrollEntries.register(t(this,p)),this.setIndex(t(this,Fe))}get element(){return t(this,p)}get index(){return t(this,Fe)}get size(){return t(this,de)}get width(){return t(this,hs)}get height(){return t(this,os)}get position(){return t(this,pt)}get transformPosition(){return t(this,Se)}destroy(){oe.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(h){h?(t(this,p).style.setProperty("--size",h+"px"),t(this,E).axisCSSProperty.current==="x"?(t(this,p).style.width=h+"px",t(this,p).style.height=""):(t(this,p).style.height=h+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){r(this,hs,t(this,p).offsetWidth),r(this,os,t(this,p).offsetHeight),r(this,de,t(this,E).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),r(this,pt,t(this,E).vertical?et.getCumulativeOffsetTop(t(this,p)):et.getCumulativeOffsetLeft(t(this,p))),r(this,pt,t(this,pt)-t(this,E).contentPosition)}transform(){const h=t(this,E).shiftSectionPositionCSSProperty.current;let e=h;const s=t(this,E).viewportSize*t(this,E).sectionDistanceScaleCSSProperty.current;t(this,E).loopCSSProperty.current&&t(this,pt)+t(this,de)<=t(this,E).currentScrollValue-h/2&&(e=(t(this,E).distance-h)*-1-t(this,E).gap),oe.scrollEntries.update(t(this,p),t(this,E).axisCSSProperty.current,e);const n=t(this,E).currentScrollValue+e,u=t(this,pt)-t(this,E).viewportSize-s,g=t(this,pt)+t(this,de)+s,y=Us.preciseNumber(Ts.clamp(n,u,g),3);r(this,Se,y*-1),t(this,E).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,Se)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,Se)}px, 0px, 0px)`}setMark(h){t(this,Ot)!==h&&(t(this,Ot)&&t(this,p).classList.remove(t(this,Ot)),h&&t(this,p).classList.add(h),r(this,Ot,h),tt.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Ot)},custom:!0}))}setMiddle(h){t(this,p).classList.toggle("middle",h)}setIndex(h){o(this,pe,ss).call(this,"index",h)}setCurrentIndex(h){o(this,pe,ss).call(this,"current-index",h)}setCurrentIndexArc(h){o(this,pe,ss).call(this,"current-index-arc",h)}setCurrentIndexArcAbs(h){o(this,pe,ss).call(this,"current-index-arc-abs",h)}}p=new WeakMap,Fe=new WeakMap,E=new WeakMap,hs=new WeakMap,os=new WeakMap,de=new WeakMap,pt=new WeakMap,Ot=new WeakMap,Se=new WeakMap,pe=new WeakSet,ss=function(h,e){e!==null?(t(this,p).style.setProperty(`--${h}`,e.toString()),t(this,p).setAttribute(`data-${h}`,e.toString())):(t(this,p).style.removeProperty(`--${h}`),t(this,p).removeAttribute(`data-${h}`))};const Pi=Gs.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:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".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 S,fe,F,Dt,ft,bt,mt,st,qt,Bt,gt,$t,be,it,V,me,ge,ye,Ce,Te,ve,j,Pe,Ht,J,_t,yt,Ee,Wt,we,Nt,Ut,Gt,f,Oe,W,d,ls,cs,L,P,N,rt,Zt,nt,I,T,De,Ct,vt,Pt,U,qe,Kt,jt,xe,ht,k,Be,Et,Le,$e,c,Vs,is,Ie,Ps,Es,ks,Rs,O,us,Ks,He,as,As,Is,ue,js,ds,rs,Ss;class xs extends HTMLElement{constructor(){super();i(this,c);i(this,S,null);i(this,fe,new l.CSSProperty(this,"--controls",!0));i(this,F,new l.CSSProperty(this,"--axis","y"));i(this,Dt,new l.CSSProperty(this,"--reverse",!1));i(this,ft,new l.CSSProperty(this,"--direction",0));i(this,bt,new l.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));i(this,mt,new l.CSSProperty(this,"--split",!1));i(this,st,new l.CSSProperty(this,"--sectional",!1));i(this,qt,new l.CSSProperty(this,"--tween-easing",!1));i(this,Bt,new l.CSSProperty(this,"--tween-duration",!1));i(this,gt,new l.CSSProperty(this,"--auto-size",!1));i(this,$t,new l.CSSProperty(this,"--wheel-max-delta",!1));i(this,be,new l.CSSProperty(this,"--drag-inertion",1));i(this,it,new l.CSSProperty(this,"--sections-in-view",1));i(this,V,new l.CSSProperty(this,"--loop",!1));i(this,me,new l.CSSProperty(this,"--damping",20));i(this,ge,new l.CSSProperty(this,"--mass",0));i(this,ye,new l.CSSProperty(this,"--stiffness",0));i(this,Ce,new l.CSSProperty(this,"--mouse-drag",!1));i(this,Te,new l.CSSProperty(this,"--section-distance-scale",.5));i(this,ve,new l.CSSProperty(this,"--start-section",0));i(this,j,new l.CSSProperty(this,"--autoplay",0));i(this,Pe,new l.CSSProperty(this,"--autoplay-pause-duration",0));i(this,Ht,new l.CSSProperty(this,"--autoplay-user-direction",!1));i(this,J,new l.CSSProperty(this,"--classes",!1));i(this,_t,new l.CSSProperty(this,"--current-index-start-offset",0));i(this,yt,new l.CSSProperty(this,"--current-index-end-offset",0));i(this,Ee,new l.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));i(this,Wt,new l.CSSProperty(this,"--focus-delay",0));i(this,we,new l.CSSProperty(this,"--focus-duration",3e3));i(this,Nt,new l.CSSProperty(this,"--disabled",!1));i(this,Ut,new l.CSSProperty(this,"--hibernate",!1));i(this,Gt,null);i(this,f,null);i(this,Oe,null);i(this,W,[]);i(this,d,[]);i(this,ls,0);i(this,cs,0);i(this,L,0);i(this,P,0);i(this,N,0);i(this,rt,null);i(this,Zt,null);i(this,nt,null);i(this,I,null);i(this,T,new ce.Store(0));i(this,De,0);i(this,Ct,0);i(this,vt,!1);i(this,Pt,!0);i(this,U,!0);i(this,qe);i(this,Kt);i(this,jt,new mi.Tweened);i(this,xe,!1);i(this,ht,null);i(this,k,!1);i(this,Be,null);i(this,Et,[]);i(this,Le,!1);i(this,$e);i(this,O,e=>{if(e&&t(this,Le)){r(this,Le,!1);return}this.resize()});i(this,us,()=>{if(!t(this,vt)||t(this,U)||t(this,Pt))return;const e=this.currentScrollValue;if(r(this,De,Math.max(0,e-t(this,P))),t(this,d).length){for(let s=0;s<t(this,W).length;s++)t(this,W)[s].transform();t(this,T).current=o(this,c,rs).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;o(this,c,js).call(this),oe.scrollEntries.update(this,t(this,F).current,e)});i(this,He,(e,s)=>{t(this,fe).current&&(o(this,c,As).call(this,Math.sign(s)||1),t(this,as).call(this,e,s))});i(this,as,(e,s)=>{if(!t(this,Kt)){if(t(this,ft).current){if(t(this,ft).current<0&&s>0)return;if(t(this,ft).current>0&&s<0)return}if(!t(this,j).current&&t(this,Wt).current&&(clearInterval(t(this,qe)),r(this,qe,setTimeout(()=>{const n=t(this,d)[o(this,c,rs).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,we).current,easing:fi.easeInOutExpo}})},t(this,Wt).current))),!(e.includes("drag")&&!gi.device.isTouch&&!t(this,Ce).current)){if(t(this,st).current&&e!=="drag"){const n=Math.sign(s);if(t(this,d).length){const u={tween:t(this,qt).current||t(this,Bt).current?{easing:t(this,qt).current||"easeInOutCubic",duration:t(this,Bt).current||500}:void 0};t(this,xe)?this.scrollToSection(o(this,c,rs).call(this,!0),u):this.shiftSections(n,u)}else t(this,S).shift(n*t(this,L))}else t(this,S).shift(s);r(this,xe,e==="drag")}}});i(this,ds,ws.debounce(()=>{const e=t(this,Et).reduce((s,n)=>{const u=this.vertical?n.width:n.height;return u>s?u:s},0);clearTimeout(t(this,$e)),r(this,Le,!0),this.style.setProperty("--max-section-size",""),r(this,$e,setTimeout(()=>{r(this,Le,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));i(this,Ss,()=>{r(this,k,!0),this.hibernatedCSSProperty.current||o(this,c,Rs).call(this)});if(K.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Pi];const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),r(this,Gt,document.createElement("div")),t(this,Gt).className="content-wrapper",r(this,f,document.createElement("div")),t(this,f).className="content",r(this,Oe,document.createElement("slot")),t(this,f).appendChild(t(this,Oe)),t(this,Gt).appendChild(t(this,f)),e.appendChild(t(this,Gt)),r(this,Be,new MutationObserver(ws.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,S)}get controlsCSSProperty(){return t(this,fe)}get axisCSSProperty(){return t(this,F)}get reverseCSSProperty(){return t(this,Dt)}get directionCSSProperty(){return t(this,ft)}get pagesCSSProperty(){return t(this,bt)}get splitCSSProperty(){return t(this,mt)}get sectionalCSSProperty(){return t(this,st)}get easingCSSProperty(){return t(this,qt)}get durationCSSProperty(){return t(this,Bt)}get autoSizeCSSProperty(){return t(this,gt)}get wheelMaxDeltaCSSProperty(){return t(this,$t)}get dragInertionCSSProperty(){return t(this,be)}get sectionsInViewCSSProperty(){return t(this,it)}get loopCSSProperty(){return t(this,V)}get dampingCSSProperty(){return t(this,me)}get massCSSProperty(){return t(this,ge)}get stiffnessCSSProperty(){return t(this,ye)}get mouseDragCSSProperty(){return t(this,Ce)}get sectionDistanceScaleCSSProperty(){return t(this,Te)}get startSectionCSSProperty(){return t(this,ve)}get autoplayCSSProperty(){return t(this,j)}get autoplayPauseDurationCSSProperty(){return t(this,Pe)}get autoplayUserDirectionCSSProperty(){return t(this,Ht)}get classesCSSProperty(){return t(this,J)}get currentIndexStartOffsetCSSProperty(){return t(this,_t)}get currentIndexEndOffsetCSSProperty(){return t(this,yt)}get shiftSectionPositionCSSProperty(){return t(this,Ee)}get focusDelayCSSProperty(){return t(this,Wt)}get focusDurationCSSProperty(){return t(this,we)}get disabledCSSProperty(){return t(this,Nt)}get hibernatedCSSProperty(){return t(this,Ut)}get currentScrollValue(){return o(this,c,Is).call(this,"current")}get targetScrollValue(){return o(this,c,Is).call(this,"target")}get contentWrapperElement(){return t(this,Gt)}get contentElement(){return t(this,f)}get sections(){return t(this,W)}get visibleSections(){return t(this,d)}get position(){return t(this,ls)}get contentPosition(){return t(this,cs)}get viewportSize(){return t(this,L)}get scrollSize(){return t(this,P)}get gap(){return t(this,N)}get counter(){return t(this,T)}get limit(){return Math.ceil(t(this,d).length-t(this,it).current)}get distance(){return t(this,Ct)}get loopDistance(){return t(this,V).current?t(this,Ct)+t(this,N):t(this,Ct)}get hasOverflow(){return t(this,vt)}get overscroll(){return t(this,De)}get scrollLine(){return t(this,ht)}get vertical(){return t(this,F).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,F).current==="y"?0:t(this,S).distance}get scrollHeight(){return t(this,F).current==="x"?0:t(this,S).distance}tryResplit(){!t(this,U)&&(t(this,V).current||t(this,mt).current||t(this,V).current||t(this,gt).current||t(this,st).current)&&o(this,c,is).call(this)}onScroll(...e){return t(this,S).subscribe(...e)}offScroll(...e){t(this,S).unsubscribe(...e)}range(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress<u?0:this.currentProgress>g?1:(this.currentProgress-u)/(g-u)}curve(e,s,n=0){return Math.sin(this.range(e,s,n)*Math.PI)}visible(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress>=u&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,d).length||t(this,U))return;const n=t(this,T).current,u=o(this,c,Ks).call(this,e),g=t(this,d)[n],y=t(this,d)[u];if(g&&y){let v=0;const le=o(this,c,rs).call(this),Ae=t(this,d)[le];let es=Ae?this.targetScrollValue-Ae.position:0;t(this,V).current?u===0&&n===t(this,d).length-1?(v=t(this,P)+t(this,L)-g.position+t(this,N),t(this,xe)||(es=0)):u===t(this,d).length-1&&n===0?v=y.position-(t(this,P)+t(this,L)+t(this,N)):v=y.position-g.position:v=y.position-g.position,this.shiftPosition(v-es,s)}}shiftSections(e,s){t(this,d).length&&this.scrollToSection(t(this,T).current+e,s)}setPosition(e,s){t(this,U)||(o(this,c,As).call(this,Math.sign(e)||1),s!=null&&s.tween?(clearTimeout(t(this,Kt)),t(this,jt).set(t(this,S).current,{equalize:!0}),t(this,jt).set(Math.min(e,this.distance),Hs({},s.tween)),r(this,Kt,setTimeout(()=>{r(this,Kt,void 0)},s.tween.duration||0))):t(this,S).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"}))}shiftPosition(e,s){this.setPosition(t(this,S).target+e,s)}resize(){if(t(this,Ut).current)return;r(this,d,t(this,W).filter(n=>bi.isElementVisible(n.element))),this.style.setProperty("--sections",t(this,d).length.toString()),t(this,S).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,P)||0,s=t(this,T).current;if(r(this,ls,this.vertical?et.getCumulativeOffsetTop(this):et.getCumulativeOffsetLeft(this)),r(this,cs,this.vertical?et.getCumulativeOffsetTop(t(this,f)):et.getCumulativeOffsetLeft(t(this,f))),r(this,L,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,N,Ns.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):r(this,N,Ns.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,gt).current&&t(this,d).length){const n=t(this,it).current,u=(t(this,L)-t(this,N)*(n-1))/n;t(this,d).forEach(g=>{g.setSize(u)})}else t(this,d).forEach(n=>{n.setSize()});if(t(this,d).forEach(n=>{n.resize()}),t(this,bt).current){r(this,P,t(this,L)*t(this,bt).current);const n=t(this,P)+t(this,L);this.vertical?(t(this,f).style.width=n+"px",t(this,f).style.height="100%"):(t(this,f).style.height=n+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",r(this,P,t(this,f).offsetHeight-t(this,L))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",r(this,P,t(this,f).offsetWidth-t(this,L)));if(!t(this,V).current){const n=getComputedStyle(this),u=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,P,t(this,P)+u),t(this,S).max=t(this,P)}if(t(this,V).current&&t(this,d).length){const n=t(this,d)[t(this,d).length-1],u=n.position+n.size-t(this,L),g=t(this,P)-u;r(this,Ct,n.position+n.size+g)}else r(this,Ct,t(this,P));if(t(this,st).current&&t(this,d).length){const n=t(this,d)[s];t(this,S).set(n.position,{equalize:!0})}else t(this,S).set(e*t(this,P),{equalize:!0});r(this,vt,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,L)),this.classList.toggle("has-overflow",t(this,vt)),t(this,vt)?t(this,Nt).current||o(this,c,Es).call(this):o(this,c,Ps).call(this),t(this,ds).call(this),tt.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,S).notify()}connectedCallback(){oe.scrollEntries.register(this),r(this,S,new Zs.Damped(0,{damping:.01,min:0,order:Me.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,rt,new vs.WheelControls({element:t(this,f)})),t(this,rt).changeEvent.subscribe(t(this,He)),r(this,Zt,new vs.KeyboardControls({element:this})),t(this,Zt).changeEvent.subscribe(t(this,He)),r(this,nt,new vs.DragControls({element:t(this,f),rootElement:this})),t(this,nt).changeEvent.subscribe(t(this,He)),r(this,I,new vs.AutoplayControls({culling:this})),t(this,I).changeEvent.subscribe(t(this,as)),t(this,F).subscribe(()=>{o(this,c,Vs).call(this)}),t(this,Dt).subscribe(()=>{o(this,c,Vs).call(this)}),t(this,$t).subscribe(e=>{t(this,rt).axis=e.current?"max":t(this,F).current}),t(this,be).subscribe(e=>{t(this,nt).inertion=typeof e.current=="number"?e.current:1}),t(this,bt).subscribe(()=>{t(this,k)&&t(this,O).call(this)}),t(this,mt).subscribe(({current:e})=>{t(this,k)&&(e?o(this,c,is).call(this):o(this,c,Ie).call(this))}),t(this,st).subscribe(e=>{t(this,rt).debounce=e.current,t(this,nt).swipe=e.current,t(this,I).interval=e.current,t(this,k)&&(e.current&&!e.previous&&!t(this,d).length?o(this,c,is).call(this):!e.current&&e.previous&&t(this,d).length&&o(this,c,Ie).call(this))}),t(this,gt).subscribe(e=>{t(this,k)&&(t(this,O).call(this),e.current&&!e.previous&&!t(this,d).length?o(this,c,is).call(this):!e.current&&e.previous&&t(this,d).length&&o(this,c,Ie).call(this))}),t(this,it).subscribe(e=>{t(this,k)&&(t(this,O).call(this),o(this,c,ue).call(this))}),t(this,V).subscribe(e=>{e.current?(t(this,k)&&(t(this,d).length||(t(this,mt).current=!0)),t(this,S).max=1/0,t(this,S).min=-1/0):(r(this,De,0),t(this,S).max=t(this,P),t(this,S).min=0)}),t(this,me).subscribe(e=>{t(this,S).damping=e.current}),t(this,ge).subscribe(e=>{t(this,S).mass=e.current}),t(this,ye).subscribe(e=>{t(this,S).stiffness=e.current}),t(this,j).subscribe(e=>{t(this,I).speed=e.current,!t(this,Pt)&&e.current&&!e.previous?t(this,I).connect():!e.current&&e.previous&&t(this,I).disconnect()}),t(this,Ht).subscribe(e=>{e.current||(t(this,I).direction=1)}),t(this,J).subscribe(e=>{t(this,k)&&o(this,c,ue).call(this)}),t(this,_t).subscribe(e=>{t(this,k)&&t(this,J).current&&o(this,c,ue).call(this)}),t(this,yt).subscribe(e=>{t(this,k)&&t(this,J).current&&o(this,c,ue).call(this)}),t(this,Ee).subscribe(e=>{t(this,k)&&t(this,S).notify()}),t(this,S).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,T).subscribe(e=>{t(this,U)||(t(this,d).length&&o(this,c,ue).call(this),this.style.setProperty("--counter",e.current+""))}),t(this,jt).subscribe(e=>{t(this,jt).isRunning.current&&t(this,S).set(e.current,{equalize:!0})}),t(this,Nt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),o(this,c,Ps).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),o(this,c,Es).call(this))}),t(this,Ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),o(this,c,ks).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),o(this,c,Rs).call(this))}),t(this,fe).observe(),t(this,F).observe(),t(this,Dt).observe(),t(this,ft).observe(),t(this,bt).observe(),t(this,mt).observe(),t(this,st).observe(),t(this,qt).observe(),t(this,Bt).observe(),t(this,gt).observe(),t(this,$t).observe(),t(this,be).observe(),t(this,it).observe(),t(this,V).observe(),t(this,me).observe(),t(this,ge).observe(),t(this,ye).observe(),t(this,Ce).observe(),t(this,Te).observe(),t(this,ve).observe(),t(this,j).observe(),t(this,j).observe(),t(this,Pe).observe(),t(this,Ht).observe(),t(this,J).observe(),t(this,_t).observe(),t(this,yt).observe(),t(this,Ee).observe(),t(this,Wt).observe(),t(this,we).observe(),t(this,Nt).observe(),t(this,Ut).observe(),he.windowResizer.subscribe(t(this,Ss),Me.RESIZE_ORDER.LAST),ns.elementResizer.subscribe(this,t(this,O)),t(this,Be).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,fe).unobserve(),t(this,F).unobserve(),t(this,Dt).unobserve(),t(this,ft).unobserve(),t(this,bt).unobserve(),t(this,mt).unobserve(),t(this,st).unobserve(),t(this,qt).unobserve(),t(this,Bt).unobserve(),t(this,gt).unobserve(),t(this,$t).unobserve(),t(this,be).unobserve(),t(this,it).unobserve(),t(this,V).unobserve(),t(this,me).unobserve(),t(this,ge).unobserve(),t(this,ye).unobserve(),t(this,Ce).unobserve(),t(this,Te).unobserve(),t(this,ve).unobserve(),t(this,j).unobserve(),t(this,Pe).unobserve(),t(this,Ht).unobserve(),t(this,J).unobserve(),t(this,_t).unobserve(),t(this,yt).unobserve(),t(this,Ee).unobserve(),t(this,Wt).unobserve(),t(this,we).unobserve(),t(this,Nt).unobserve(),t(this,Ut).unobserve(),he.windowResizer.unsubscribe(t(this,Ss)),ns.elementResizer.unsubscribe(t(this,O)),o(this,c,ks).call(this),t(this,Be).disconnect()}}S=new WeakMap,fe=new WeakMap,F=new WeakMap,Dt=new WeakMap,ft=new WeakMap,bt=new WeakMap,mt=new WeakMap,st=new WeakMap,qt=new WeakMap,Bt=new WeakMap,gt=new WeakMap,$t=new WeakMap,be=new WeakMap,it=new WeakMap,V=new WeakMap,me=new WeakMap,ge=new WeakMap,ye=new WeakMap,Ce=new WeakMap,Te=new WeakMap,ve=new WeakMap,j=new WeakMap,Pe=new WeakMap,Ht=new WeakMap,J=new WeakMap,_t=new WeakMap,yt=new WeakMap,Ee=new WeakMap,Wt=new WeakMap,we=new WeakMap,Nt=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,f=new WeakMap,Oe=new WeakMap,W=new WeakMap,d=new WeakMap,ls=new WeakMap,cs=new WeakMap,L=new WeakMap,P=new WeakMap,N=new WeakMap,rt=new WeakMap,Zt=new WeakMap,nt=new WeakMap,I=new WeakMap,T=new WeakMap,De=new WeakMap,Ct=new WeakMap,vt=new WeakMap,Pt=new WeakMap,U=new WeakMap,qe=new WeakMap,Kt=new WeakMap,jt=new WeakMap,xe=new WeakMap,ht=new WeakMap,k=new WeakMap,Be=new WeakMap,Et=new WeakMap,Le=new WeakMap,$e=new WeakMap,c=new WeakSet,Vs=function(){const e=t(this,F).current,s=t(this,Dt).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${s}`:`column${s}`,t(this,rt).axis=t(this,$t).current?"max":e,t(this,Zt).dimension=e==="x"?"width":"height",t(this,nt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,k)&&t(this,O).call(this)},is=function(){o(this,c,Ie).call(this),t(this,Oe).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,W).push(new vi(e,s,this))}),r(this,d,[...t(this,W)]),t(this,f).style.transform="",tt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,O).call(this),o(this,c,ue).call(this)},Ie=function(){t(this,W).forEach(e=>{e.destroy()}),r(this,W,[]),r(this,d,[]),t(this,T).reset(),t(this,S).reset(),this.style.removeProperty("--max-section-size"),tt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ps=function(){t(this,Pt)||(r(this,Pt,!0),t(this,S).unsubscribe(t(this,us)),t(this,S).unlistenAnimationFrame(),clearInterval(t(this,qe)),clearInterval(t(this,Kt)),t(this,jt).unlistenAnimationFrame(),t(this,rt).disconnect(),t(this,Zt).disconnect(),t(this,nt).disconnect(),t(this,I).disconnect(),t(this,vt)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,O).call(this)))},Es=function(){t(this,Pt)&&(r(this,Pt,!1),t(this,S).subscribe(t(this,us),-1e4),t(this,S).notify(),t(this,rt).connect(),t(this,Zt).connect(),t(this,nt).connect(),t(this,j).current&&t(this,I).connect())},ks=function(){t(this,U)||(r(this,U,!0),clearTimeout(t(this,$e)),he.windowResizer.unsubscribe(t(this,O)),o(this,c,Ps).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),t(this,W).length?o(this,c,Ie).call(this):(t(this,T).reset(),t(this,S).reset()),oe.scrollEntries.unregister(this))},Rs=function(){t(this,U)&&(r(this,U,!1),oe.scrollEntries.register(this),this.tryResplit(),o(this,c,Es).call(this),this.scrollToSection(t(this,ve).current,{behaviour:"instant"}),he.windowResizer.subscribe(t(this,O),Me.RESIZE_ORDER.SCROLL))},O=new WeakMap,us=new WeakMap,Ks=function(e){let s=t(this,T).current;return t(this,V).current?s=Us.loopNumber(e,t(this,d).length):s=Ts.clamp(e,0,this.limit),s},He=new WeakMap,as=new WeakMap,As=function(e=1){t(this,Ht).current&&(t(this,I).direction=e),t(this,j).current&&t(this,I).pauseAndContinue(t(this,Pe).current,this.sectionalCSSProperty.current)},Is=function(e="current"){if(t(this,V).current&&t(this,d).length){const s=t(this,S)[e]%Math.round(t(this,P)+t(this,L)+t(this,N));return s<0?t(this,P)+s+t(this,L)+t(this,N):s}else return t(this,S)[e]},ue=function(){if(t(this,d).length){const e=t(this,T).current+t(this,_t).current;if(e===0?r(this,ht,"start"):e===this.limit?r(this,ht,"end"):r(this,ht,null),tt.dispatchEvent(this,"scrollLine",{detail:{line:t(this,ht)}}),t(this,J).current){this.classList.remove("end","start"),t(this,ht)&&this.classList.add(t(this,ht));const s=t(this,it).current+t(this,yt).current;r(this,Et,[]),t(this,d).forEach((n,u)=>{n.setCurrentIndex(null),n.setCurrentIndexArc(null),n.setCurrentIndexArcAbs(null),n.setMiddle(!1);const g=e-this.limit-1+t(this,yt).current,y=e+s,v=this.sections.length-y;u>=e&&u<y||u<=g?(n.setMark("current"),t(this,Et).push(n)):u>=y&&u<y+v/2||u<=g+s?n.setMark("next"):n.setMark("previous")}),t(this,ds).call(this)}}},js=function(){if(t(this,J).current){const e=Math.floor(t(this,Et).length/2);t(this,Et).sort((s,n)=>s.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,Et).forEach((s,n)=>{const u=n-e;s.setCurrentIndex(n),s.setCurrentIndexArc(u),s.setCurrentIndexArcAbs(Math.abs(u)),s.setMiddle(n===e)})}},ds=new WeakMap,rs=function(e=!1){let s=this.targetScrollValue,n=1/0,u=0;const g=t(this,S).direction;for(let y=0;y<t(this,d).length;y++){const v=t(this,d)[y];let le=t(this,xe)?v.size*g*-1*.4:0,Ae=v.position;this.overscroll&&Ae===0&&e&&(Ae=t(this,Ct));let es=Math.abs(Ae+le-s);es<=n&&(n=es,u=y)}return u},Ss=new WeakMap;K.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",xs);var ps;class Cs extends HTMLElement{constructor(){super(...arguments);i(this,ps,null)}get scrollElement(){return t(this,ps)}connectedCallback(){const e=Ci.findParentElement(this,xs);e instanceof xs?r(this,ps,e):console.error(this,"e-scroll not found")}}ps=new WeakMap;var Jt,D,wt,xt,_e,We,Qt,Ne,fs,bs;class Js extends Cs{constructor(){super();i(this,Jt,null);i(this,D,null);i(this,wt,!1);i(this,xt,0);i(this,_e,0);i(this,We,0);i(this,Qt,()=>{r(this,wt,this.offsetWidth>this.offsetHeight);const e=t(this,wt)?this.offsetWidth:this.offsetHeight;r(this,xt,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,xt,Math.max(t(this,xt),30)),t(this,wt)?(t(this,D).style.width=t(this,xt)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,xt)+"px"),r(this,_e,e-t(this,xt)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ne).call(this)});i(this,Ne,()=>{r(this,We,this.scrollElement.currentProgress*t(this,_e)),t(this,wt)?t(this,D).style.transform=`translate3d(${t(this,We)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,We)}px, 0px)`});i(this,fs,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,bs,e=>{document.documentElement.classList.add("grabbing"),yi.setupDrag(u=>{const g=t(this,wt)?u.x:u.y,y=this.scrollElement.distance/t(this,_e),v=(g-n)*y;this.scrollElement.setPosition(s+v)},()=>{document.documentElement.classList.remove("grabbing")});const s=this.scrollElement.damped.target,n=t(this,wt)?e.x:e.y});if(K.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Gs.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,Jt,document.createElement("slot")),t(this,Jt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Jt))}}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Jt).assignedElements()[0]||t(this,Jt).firstElementChild;r(this,D,e),t(this,D).addEventListener("pointerdown",t(this,bs)),he.windowResizer.subscribe(t(this,Qt),Me.RESIZE_ORDER.SCROLL),ns.elementResizer.subscribe(this,t(this,Qt)),ns.elementResizer.subscribe(this.scrollElement,t(this,Qt)),this.scrollElement.onScroll(t(this,Ne)),this.scrollElement.axisCSSProperty.subscribe(t(this,fs))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,D).removeEventListener("pointerdown",t(this,bs)),he.windowResizer.unsubscribe(t(this,Qt)),ns.elementResizer.unsubscribe(t(this,Qt)),this.scrollElement.offScroll(t(this,Ne)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,fs))}}Jt=new WeakMap,D=new WeakMap,wt=new WeakMap,xt=new WeakMap,_e=new WeakMap,We=new WeakMap,Qt=new WeakMap,Ne=new WeakMap,fs=new WeakMap,bs=new WeakMap;K.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Js);var Ue,Ge,Ze;class Os extends Cs{constructor(){super();i(this,Ue,new l.CSSProperty(this,"--behaviour","smooth"));i(this,Ge,new l.CSSProperty(this,"--tween-easing",!1));i(this,Ze,new l.CSSProperty(this,"--tween-duration",0));K.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Ue).current,s=t(this,Ge).current,n=t(this,Ze).current;this.handleClick({behaviour:e,tween:s||n?{easing:s,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,Ue).observe(),t(this,Ge).observe(),t(this,Ze).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,Ue).close(),t(this,Ge).close(),t(this,Ze).close()}}Ue=new WeakMap,Ge=new WeakMap,Ze=new WeakMap;var Ke;class Qs extends Os{constructor(){super(...arguments);i(this,Ke,new l.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Ke).current,e)}connectedCallback(){super.connectedCallback(),t(this,Ke).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Ke).close()}}Ke=new WeakMap;K.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Qs);var Lt,je;class Xs extends Os{constructor(){super(...arguments);i(this,Lt,new l.CSSProperty(this,"--step",1));i(this,je,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Lt).current>0&&this.scrollElement.scrollLine==="end"||t(this,Lt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Lt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Lt).subscribe(()=>{t(this,je).call(this)}),t(this,Lt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,je)),t(this,je).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Lt).close(),this.removeAttribute("disabled")}}Lt=new WeakMap,je=new WeakMap;K.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Xs);var ot,Xt,Je,ms,gs,Qe;class Ei{constructor(h,e,s){i(this,ot,null);i(this,Xt,null);i(this,Je,null);i(this,ms,null);i(this,gs,()=>{t(this,Xt).scrollToSection(t(this,Je),{behaviour:t(this,ms)})});i(this,Qe,()=>{t(this,ot).classList.toggle("current",t(this,Xt).counter.current===t(this,Je))});K.isBrowser&&(r(this,ot,document.createElement("button")),t(this,ot).setAttribute("aria-label",`Go to section ${e+1}`),r(this,Xt,h),r(this,ms,s),r(this,Je,e),t(this,ot).addEventListener("click",t(this,gs)),t(this,Xt).counter.subscribe(t(this,Qe)),t(this,Qe).call(this))}get element(){return t(this,ot)}destroy(){t(this,ot).removeEventListener("click",t(this,gs)),t(this,Xt).counter.unsubscribe(t(this,Qe)),t(this,ot).remove()}}ot=new WeakMap,Xt=new WeakMap,Je=new WeakMap,ms=new WeakMap,gs=new WeakMap,Qe=new WeakMap;var ze,Yt,zt;class Ys extends Cs{constructor(){super(...arguments);i(this,ze,null);i(this,Yt,[]);i(this,zt,ws.debounce(()=>{t(this,Yt).forEach(s=>s.destroy()),r(this,Yt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let s=0;s<e;s++){const n=new Ei(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");t(this,ze).appendChild(n.element),t(this,Yt).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",this.scrollElement.addEventListener("scrollSectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,zt)),this.scrollElement.loopCSSProperty.subscribe(t(this,zt)),r(this,ze,document.createElement("div")),this.appendChild(t(this,ze))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,zt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,zt)),t(this,Yt).forEach(e=>e.destroy()),r(this,Yt,[]),t(this,ze).remove()}}ze=new WeakMap,Yt=new WeakMap,zt=new WeakMap;K.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Ys);var te,ee,se,ie,Vt,kt,Rt,At,R,q,B,$,It,z,lt,ct,Q,Mt,Ve,ut,at,dt,w,H,_,X,Y,G,Xe,m,Ft,re,Ye,x,St,M,A,Z,ke,Tt,C,ne,b,ei,si,ii,ri,ni,hi,ts,Re,Ms,ae,oi,li,Fs;class ti extends Cs{constructor(){super(...arguments);i(this,b);i(this,te);i(this,ee);i(this,se);i(this,ie);i(this,Vt);i(this,kt);i(this,Rt);i(this,At);i(this,R);i(this,q);i(this,B);i(this,$);i(this,It);i(this,z);i(this,lt);i(this,ct);i(this,Q);i(this,Mt);i(this,Ve);i(this,ut);i(this,at);i(this,dt);i(this,w);i(this,H);i(this,_);i(this,X);i(this,Y);i(this,G);i(this,Xe);i(this,m);i(this,Ft);i(this,re);i(this,Ye);i(this,x);i(this,St);i(this,M);i(this,A);i(this,Z);i(this,ke);i(this,Tt);i(this,C);i(this,ne);i(this,ts);i(this,Re);r(this,te,new l.CSSProperty(this,"--damping",20)),r(this,ee,new l.CSSProperty(this,"--mass",0)),r(this,se,new l.CSSProperty(this,"--stiffness",0)),r(this,ie,new l.CSSProperty(this,"--target","")),r(this,Vt,new l.CSSProperty(this,"--disabled",!1)),r(this,kt,new l.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),r(this,Rt,new l.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),r(this,At,new l.CSSProperty(this,"--capture-once",!1)),r(this,R,new l.CSSProperty(this,"--captured","")),r(this,q,new l.CSSProperty(this,"--released","")),r(this,B,new l.CSSProperty(this,"--captured-from-start","")),r(this,$,new l.CSSProperty(this,"--captured-from-finish","")),r(this,It,new l.CSSProperty(this,"--released-from-start","")),r(this,z,new l.CSSProperty(this,"--released-from-finish","")),r(this,lt,new l.CSSProperty(this,"--passed-var","")),r(this,ct,new l.CSSProperty(this,"--progress-var","")),r(this,Q,new l.CSSProperty(this,"--progress-arc-var","")),r(this,Mt,new l.CSSProperty(this,"--progress-arc-mult",1)),r(this,Ve,new l.CSSProperty(this,"--animation-var-type","target")),r(this,ut,new l.CSSProperty(this,"--distance-var","")),r(this,at,new l.CSSProperty(this,"--start-var","")),r(this,dt,new l.CSSProperty(this,"--finish-var","")),r(this,w,new ce.Store(!1)),r(this,H,new ce.Store(!1)),r(this,_,new ce.Store(!1)),r(this,X,new ce.Store(!1)),r(this,Y,new ce.Store(!1)),r(this,G,new ce.Store(!1)),r(this,Xe,[]),r(this,m,this),r(this,Ft,0),r(this,re,0),r(this,Ye,0),r(this,x,new Zs.Damped(0,{order:Me.TICK_ORDER.SEGMENT,min:0,max:1})),r(this,St,0),r(this,M,0),r(this,A,0),r(this,Z,0),r(this,ke,!1),r(this,Tt,!1),r(this,C,!0),r(this,ne,!1),this.resize=()=>{r(this,re,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Ft,this.scrollElement.vertical?et.getCumulativeOffsetTop(this,this.scrollElement):et.getCumulativeOffsetLeft(this,this.scrollElement));const e=et.getStickyOffset(this,this.scrollElement.vertical?"top":"left");r(this,Ft,t(this,Ft)-e),r(this,M,this.getStart()),r(this,A,this.getDistance()),r(this,M,t(this,M)+t(this,Rt).current),r(this,A,t(this,A)+t(this,kt).current),r(this,Z,t(this,M)+t(this,A)),this.scrollElement.currentScrollValue>t(this,Z)&&!t(this,w).current&&!t(this,H).current&&(t(this,w).current=!0),this.setVar(t(this,at).current,t(this,M)),this.setVar(t(this,dt).current,t(this,Z)),this.setVar(t(this,ut).current,t(this,A)),t(this,x).max=t(this,A),r(this,ke,!0),t(this,Re).call(this)},this.findAnotherScrollEntries=ws.debounce(()=>{const e=oe.scrollEntries.getAll(this).reverse();let s=0;e.forEach((n,u)=>{n.element===this.scrollElement&&(s=u)}),r(this,Xe,e.slice(s+1)),this.tick()},0),r(this,ts,()=>{t(this,C)||this.resize()}),r(this,Re,()=>{!t(this,C)&&t(this,ke)&&this.tick()})}get distanceOffsetCSSProperty(){return t(this,kt)}get startOffsetCSSProperty(){return t(this,Rt)}get captureOnceCSSProperty(){return t(this,At)}get capturedCSSProperty(){return t(this,R)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,B)}get capturedFromFinishCSSProperty(){return t(this,$)}get releasedFromStartCSSProperty(){return t(this,It)}get releasedFromFinishCSSProperty(){return t(this,z)}get passedVarCSSProperty(){return t(this,lt)}get progressVarCSSProperty(){return t(this,ct)}get progressArcVarCSSProperty(){return t(this,Q)}get progressArcMultCSSProperty(){return t(this,Mt)}get animationVarTypeCSSProperty(){return t(this,Ve)}get distanceVarCSSProperty(){return t(this,ut)}get startVarCSSProperty(){return t(this,at)}get finishVarCSSProperty(){return t(this,dt)}get disabledCSSProperty(){return t(this,Vt)}get dampingCSSProperty(){return t(this,te)}get massCSSProperty(){return t(this,ee)}get stiffnessCSSProperty(){return t(this,se)}get targetCSSProperty(){return t(this,ie)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,_)}get isReleasedFromStart(){return t(this,X)}get isCapturedFromFinish(){return t(this,Y)}get isReleasedFromFinish(){return t(this,G)}get directionPosition(){return t(this,Ft)}get directionSize(){return t(this,re)}get passed(){return t(this,x)}get progress(){return t(this,St)}get progressArc(){return Math.abs(Math.cos(t(this,St)*Math.PI))*t(this,Mt).current}get start(){return t(this,M)}get finish(){return t(this,Z)}get distance(){return t(this,A)}get isCapturedOnce(){return t(this,Tt)}get isDisabled(){return t(this,C)}tick(){let e=this.scrollElement.currentScrollValue;t(this,Xe).forEach(u=>{e+=u.value});const s=e-t(this,M);t(this,ne)||r(this,ne,t(this,x).previous?Math.abs(t(this,x).previous-s)>1e3:!1),t(this,x).set(s);const n=Math.round(e);t(this,w).current&&(n>=t(this,M)?t(this,_).current||o(this,b,ii).call(this):t(this,_).current&&!t(this,X).current&&o(this,b,ni).call(this),n<t(this,Z)?t(this,G).current&&!t(this,Y).current&&o(this,b,ri).call(this):t(this,_).current&&!t(this,G).current&&o(this,b,hi).call(this)),n>=t(this,M)&&n<t(this,Z)?t(this,w).current||o(this,b,ei).call(this):t(this,w).current&&(t(this,x).set(Ts.step(t(this,A)/2,t(this,x).target,0,t(this,A))),o(this,b,si).call(this)),t(this,Tt)&&t(this,At).current&&(t(this,R).current&&t(this,m).classList.add(t(this,R).current),r(this,C,!0))}disable(){this.style.cssText="",r(this,Ft,0),r(this,re,0),t(this,x).reset(),r(this,St,0),r(this,M,0),r(this,A,0),r(this,Z,0),r(this,ke,!1),t(this,w).current=!1,t(this,H).current=!1,t(this,_).current=!1,t(this,X).current=!1,t(this,Y).current=!1,t(this,G).current=!1,r(this,Tt,!1),r(this,C,!0),o(this,b,Fs).call(this)}enable(){r(this,C,!1)}connectedCallback(){super.connectedCallback(),t(this,w).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,_).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,Y).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,H).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,X).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,G).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,te).observe(),t(this,ee).observe(),t(this,se).observe(),t(this,ie).observe(),t(this,Vt).observe(),t(this,kt).observe(),t(this,Rt).observe(),t(this,At).observe(),t(this,R).observe(),t(this,q).observe(),t(this,B).observe(),t(this,$).observe(),t(this,It).observe(),t(this,z).observe(),t(this,lt).observe(),t(this,ct).observe(),t(this,Q).observe(),t(this,Mt).observe(),t(this,Ve).observe(),t(this,ut).observe(),t(this,at).observe(),t(this,dt).observe();let e=!1;this.findAnotherScrollEntries(),t(this,Vt).current||this.enable(),t(this,te).subscribe(s=>{t(this,x).damping=s.current}),t(this,ee).subscribe(s=>{t(this,x).mass=s.current}),t(this,se).subscribe(s=>{t(this,x).stiffness=s.current}),t(this,ie).subscribe(s=>{s.previous&&o(this,b,Fs).call(this),s.current?s.current==="parent"?r(this,m,this.parentElement||this):r(this,m,document.querySelector(s.current)||this):r(this,m,this)}),t(this,Vt).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,Rt).subscribe(()=>{e&&!t(this,C)&&this.resize()}),t(this,kt).subscribe(()=>{e&&!t(this,C)&&this.resize()}),t(this,R).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,$).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,q).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,It).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,z).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,At).subscribe(s=>{t(this,C)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,lt).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ct).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,St)))}),t(this,Q).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,Mt).subscribe(s=>{t(this,C)||o(this,b,Ms).call(this)}),t(this,at).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,M)))}),t(this,dt).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,Z)))}),t(this,ut).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,x).subscribe(s=>{if(t(this,ne)){r(this,ne,!1);return}o(this,b,Ms).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),he.windowResizer.subscribe(t(this,ts),Me.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(t(this,Re)),e=!0}disconnectedCallback(){he.windowResizer.unsubscribe(t(this,ts)),this.scrollElement.offScroll(t(this,Re)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),t(this,te).close(),t(this,ee).close(),t(this,se).close(),t(this,ie).close(),t(this,Vt).close(),t(this,kt).close(),t(this,Rt).close(),t(this,At).close(),t(this,R).close(),t(this,q).close(),t(this,B).close(),t(this,$).close(),t(this,It).close(),t(this,z).close(),t(this,lt).close(),t(this,ct).close(),t(this,Q).close(),t(this,Mt).close(),t(this,ut).close(),t(this,at).close(),t(this,dt).close(),t(this,w).close(),t(this,H).close(),t(this,_).close(),t(this,X).close(),t(this,Y).close(),t(this,G).close(),this.disable(),t(this,x).close()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,s){if(e){const n=typeof s=="number"?s.toFixed(6):s;t(this,m).style.setProperty(`--${e}`,n)}}getDistance(){return t(this,re)+t(this,Ye)}getStart(){return t(this,Ft)-t(this,Ye)}}te=new WeakMap,ee=new WeakMap,se=new WeakMap,ie=new WeakMap,Vt=new WeakMap,kt=new WeakMap,Rt=new WeakMap,At=new WeakMap,R=new WeakMap,q=new WeakMap,B=new WeakMap,$=new WeakMap,It=new WeakMap,z=new WeakMap,lt=new WeakMap,ct=new WeakMap,Q=new WeakMap,Mt=new WeakMap,Ve=new WeakMap,ut=new WeakMap,at=new WeakMap,dt=new WeakMap,w=new WeakMap,H=new WeakMap,_=new WeakMap,X=new WeakMap,Y=new WeakMap,G=new WeakMap,Xe=new WeakMap,m=new WeakMap,Ft=new WeakMap,re=new WeakMap,Ye=new WeakMap,x=new WeakMap,St=new WeakMap,M=new WeakMap,A=new WeakMap,Z=new WeakMap,ke=new WeakMap,Tt=new WeakMap,C=new WeakMap,ne=new WeakMap,b=new WeakSet,ei=function(){t(this,w).current=!0,t(this,H).current=!1,r(this,Tt,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,R).current&&t(this,m).classList.add(t(this,R).current)},si=function(){t(this,H).current=!0,t(this,w).current=!1,r(this,Tt,!0),t(this,R).current&&t(this,m).classList.remove(t(this,R).current),t(this,B).current&&t(this,m).classList.remove(t(this,B).current),t(this,$).current&&t(this,m).classList.remove(t(this,$).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)},ii=function(){t(this,w).current=!0,t(this,_).current=!0,t(this,X).current=!1,t(this,B).current&&t(this,m).classList.add(t(this,B).current)},ri=function(){t(this,w).current=!0,t(this,Y).current=!0,t(this,G).current=!1,t(this,$).current&&t(this,m).classList.add(t(this,$).current)},ni=function(){t(this,H).current=!0,t(this,X).current=!0,t(this,_).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},hi=function(){t(this,H).current=!0,t(this,G).current=!0,t(this,Y).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},ts=new WeakMap,Re=new WeakMap,Ms=function(){const e=t(this,x)[t(this,Ve).current];this.setVar(t(this,lt).current,e),r(this,St,e/t(this,A)||0),this.setVar(t(this,ct).current,t(this,St)),t(this,Q).current&&this.setVar(t(this,Q).current,this.progressArc)},ae=function(e){if(t(this,C)){e.previous&&t(this,m).classList.remove(e.previous),e.current&&t(this,m).classList.remove(e.current);return}e.current&&t(this,w).current?(e.previous&&t(this,m).classList.remove(e.previous),t(this,m).classList.add(e.current)):!e.current&&e.previous&&t(this,m).classList.remove(e.previous)},oi=function(...e){e.forEach(s=>{s&&t(this,m).classList.remove(s)})},li=function(...e){e.forEach(s=>{s&&t(this,m).style.removeProperty(`--${s}`)})},Fs=function(){o(this,b,oi).call(this,t(this,R).current,t(this,B).current,t(this,$).current,t(this,q).current,t(this,It).current,t(this,z).current),o(this,b,li).call(this,t(this,lt).current,t(this,ct).current,t(this,Q).current,t(this,ut).current,t(this,at).current,t(this,dt).current)};K.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ti);class ci extends Os{handleClick(h){this.scrollElement.setPosition(this.scrollElement.vertical?et.getCumulativeOffsetTop(this):et.getCumulativeOffsetLeft(this),h)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}}K.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",ci);var ys;const Ds=class Ds extends Cs{constructor(){super(...arguments);i(this,ys,()=>{this.textContent=`${this.scrollElement.counter.current+1}`})}connectedCallback(){return Ws(this,null,function*(){_s(Ds.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,ys))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,ys))}};ys=new WeakMap;let Ls=Ds;K.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Ls);exports.ScrollBulletButtonsElement=Ys;exports.ScrollCounterElement=Ls;exports.ScrollElement=xs;exports.ScrollSectionButtonElement=ci;exports.ScrollSegmentElement=ti;exports.ScrollSetButtonElement=Qs;exports.ScrollStepButtonElement=Xs;exports.ScrollbarElement=Js;
|