aptechka 0.11.1 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/client-lib/{ElementConstructor-rValMo8f.js → ElementConstructor-Be8H1POO.js} +42 -36
  2. package/client-lib/ElementConstructor-khLPmQ9V.cjs +1 -0
  3. package/client-lib/canvas/index.cjs +1 -1
  4. package/client-lib/canvas/index.js +2 -2
  5. package/client-lib/checkbox/index.cjs +1 -1
  6. package/client-lib/checkbox/index.js +2 -2
  7. package/client-lib/{createStylesheet-9nksoWW0.cjs → createStylesheet-BBBiyAsF.cjs} +1 -1
  8. package/client-lib/{createStylesheet-BrFGJ8Q7.js → createStylesheet-CE1yXWS_.js} +1 -1
  9. package/client-lib/element-constructor/index.cjs +1 -1
  10. package/client-lib/element-constructor/index.js +3 -3
  11. package/client-lib/{index-3R8YL-P3.js → index-D-RA8KFB.js} +2 -2
  12. package/client-lib/{index-CyQAdqFu.cjs → index-PReYu1AQ.cjs} +1 -1
  13. package/client-lib/{instantiate-D19vO5Ku.js → instantiate-B0Un_kqY.js} +1 -1
  14. package/client-lib/{instantiate-DF1bIAXR.cjs → instantiate-DV6kxhZl.cjs} +1 -1
  15. package/client-lib/jsx/index.cjs +1 -1
  16. package/client-lib/jsx/index.js +4 -4
  17. package/client-lib/modal/index.cjs +1 -1
  18. package/client-lib/modal/index.js +2 -2
  19. package/client-lib/popover/index.cjs +1 -1
  20. package/client-lib/popover/index.js +1 -1
  21. package/client-lib/router/index.cjs +1 -1
  22. package/client-lib/router/index.js +1 -1
  23. package/client-lib/scroll/index.cjs +1 -1
  24. package/client-lib/scroll/index.js +2 -2
  25. package/client-lib/select/index.cjs +1 -1
  26. package/client-lib/select/index.js +1 -1
  27. package/client-lib/{tags-BosXYPYv.cjs → tags-BdW7ATzD.cjs} +1 -1
  28. package/client-lib/{tags-D0kLlFdQ.js → tags-C75owfOo.js} +1 -1
  29. package/client-lib/theme/index.cjs +1 -1
  30. package/client-lib/theme/index.js +1 -1
  31. package/client-lib/tweaker/index.cjs +1 -1
  32. package/client-lib/tweaker/index.js +3 -3
  33. package/package.json +2 -1
  34. package/server-lib/optimizer/index.js +13 -8
  35. package/server-lib/optimizer/types.d.ts +7 -7
  36. package/server-lib/utils/buffer.d.ts +1 -0
  37. package/server-lib/utils/index.d.ts +1 -0
  38. package/server-lib/utils/index.js +7 -0
  39. package/client-lib/ElementConstructor-OK-6OPjh.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";var Is=Object.defineProperty;var Ss=Object.getOwnPropertySymbols;var Ts=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable;var ds=(S,n,s)=>n in S?Is(S,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):S[n]=s,ps=(S,n)=>{for(var s in n||(n={}))Ts.call(n,s)&&ds(S,s,n[s]);if(Ss)for(var s of Ss(n))Ms.call(n,s)&&ds(S,s,n[s]);return S};var es=(S,n,s)=>{if(!n.has(S))throw TypeError("Cannot "+s)};var t=(S,n,s)=>(es(S,n,"read from private field"),s?s.call(S):n.get(S)),i=(S,n,s)=>{if(n.has(S))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(S):n.set(S,s)},r=(S,n,s,e)=>(es(S,n,"write to private field"),e?e.call(S,s):n.set(S,s),s);var o=(S,n,s)=>(es(S,n,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Dt=require("../Store-Cr3VaD9G.cjs"),As=require("../Derived-CNbsNMn_.cjs"),ls=require("../browser-CpzFX2xg.cjs"),Bs=require("../easings-DsS5-Kqc.cjs"),Rt=require("../layout-8ryRAMGJ.cjs"),us=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const ge=require("../order/index.cjs"),ms=require("../Damped-Da3EnNN4.cjs"),_s=require("../Tweened-DksN-Rz6.cjs"),$e=require("../controls/index.cjs"),be=require("../window-resizer/index.cjs"),ee=require("../scroll-entries/index.cjs"),H=require("../tags-BosXYPYv.cjs"),as=require("../createStylesheet-9nksoWW0.cjs"),fs=require("../css-unit-parser/index.cjs"),c=require("../css-property/index.cjs"),Hs=require("../Viewport-BBYt1Ivy.cjs"),We=require("../element-resizer/index.cjs"),$s=require("../gestures-DHLrn6Q8.cjs"),bs=require("../theme/index.cjs"),Ws=require("../dom-JBOkFLTh.cjs"),gs=require("../function-MthRj-GJ.cjs");var f,ye,y,It,Z,dt;class Us{constructor(n,s,e){i(this,f,void 0);i(this,ye,void 0);i(this,y,void 0);i(this,It,0);i(this,Z,0);i(this,dt,null);r(this,f,n),r(this,ye,s),r(this,y,e),ee.scrollEntries.register(t(this,f))}get index(){return t(this,ye)}get size(){return t(this,It)}get position(){return t(this,Z)}destroy(){ee.scrollEntries.unregister(t(this,f)),t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){r(this,It,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),r(this,Z,t(this,y).vertical?Rt.getCumulativeOffsetTop(t(this,f)):Rt.getCumulativeOffsetLeft(t(this,f))),r(this,Z,t(this,Z)-t(this,y).contentPosition)}transform(){let n=0;const s=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,Z)+t(this,It)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),ee.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const e=t(this,y).currentScrollValue+n,h=t(this,Z)-t(this,y).viewportSize-s,u=t(this,Z)+t(this,It)+s,b=us.clamp(e,h,u);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(n){t(this,dt)!==n&&(t(this,dt)&&t(this,f).classList.remove(t(this,dt)),n&&t(this,f).classList.add(n),r(this,dt,n),t(this,f).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:t(this,dt)}})))}}f=new WeakMap,ye=new WeakMap,y=new WeakMap,It=new WeakMap,Z=new WeakMap,dt=new WeakMap;const Gs=as.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Tt,V,j,J,$,Q,pt,ft,W,F,Mt,At,Bt,_t,re,U,Ht,bt,G,mt,X,gt,$t,Wt,Ut,p,Ce,l,ve,Pe,v,m,O,K,yt,Y,x,g,he,Ct,Gt,Kt,ne,tt,Nt,me,vt,ie,we,ss,Ee,is,xe,rs,Le,hs,q,ze,Ge,ys,oe,Ve,Fe,ns,et,Ot,ke,os;class Ue extends HTMLElement{constructor(){super();i(this,Nt);i(this,vt);i(this,we);i(this,Ee);i(this,xe);i(this,Le);i(this,Ge);i(this,Fe);i(this,et);i(this,ke);i(this,a,null);i(this,Tt,new c.CSSProperty(this,"--controls",!0));i(this,V,new c.CSSProperty(this,"--axis","y"));i(this,j,new c.CSSProperty(this,"--direction",0));i(this,J,new c.CSSProperty(this,"--pages",0,{validate:s=>Math.max(0,s-1)}));i(this,$,new c.CSSProperty(this,"--split",!1));i(this,Q,new c.CSSProperty(this,"--sectional",!1));i(this,pt,new c.CSSProperty(this,"--auto-size",!1));i(this,ft,new c.CSSProperty(this,"--wheel-max-delta",!1));i(this,W,new c.CSSProperty(this,"--sections-in-view",1));i(this,F,new c.CSSProperty(this,"--loop",!1));i(this,Mt,new c.CSSProperty(this,"--damping",20));i(this,At,new c.CSSProperty(this,"--mass",0));i(this,Bt,new c.CSSProperty(this,"--stiffness",0));i(this,_t,new c.CSSProperty(this,"--mouse-drag",!1));i(this,re,new c.CSSProperty(this,"--section-distance-scale",.5));i(this,U,new c.CSSProperty(this,"--autoplay",0));i(this,Ht,new c.CSSProperty(this,"--autoplay-pause-duration",0));i(this,bt,new c.CSSProperty(this,"--autoplay-user-direction",!1));i(this,G,new c.CSSProperty(this,"--classes",0));i(this,mt,new c.CSSProperty(this,"--current-index-start-offset",0));i(this,X,new c.CSSProperty(this,"--current-index-end-offset",0));i(this,gt,new c.CSSProperty(this,"--focus-delay",0));i(this,$t,new c.CSSProperty(this,"--focus-duration",3e3));i(this,Wt,new c.CSSProperty(this,"--disabled",!1));i(this,Ut,new c.CSSProperty(this,"--hibernated",!1));i(this,p,null);i(this,Ce,null);i(this,l,[]);i(this,ve,0);i(this,Pe,0);i(this,v,0);i(this,m,0);i(this,O,0);i(this,K,null);i(this,yt,null);i(this,Y,null);i(this,x,null);i(this,g,new Dt.Store(0));i(this,he,0);i(this,Ct,0);i(this,Gt,!0);i(this,Kt,!0);i(this,ne,void 0);i(this,tt,new _s.Tweened);i(this,q,()=>{t(this,a).unlistenAnimationFrame();const s=this.currentScrollValue/t(this,m)||0,e=t(this,g).current;if(r(this,ve,this.vertical?Rt.getCumulativeOffsetTop(this):Rt.getCumulativeOffsetLeft(this)),r(this,Pe,this.vertical?Rt.getCumulativeOffsetTop(t(this,p)):Rt.getCumulativeOffsetLeft(t(this,p))),r(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,O,fs.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):r(this,O,fs.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,pt).current&&t(this,l).length){const h=t(this,W).current,u=(t(this,v)-t(this,O)*(h-1))/h;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(h=>{h.setSize()});if(t(this,l).forEach(h=>{h.resize()}),t(this,J).current){r(this,m,t(this,v)*t(this,J).current);const h=t(this,m)+t(this,v);this.vertical?(t(this,p).style.width=h+"px",t(this,p).style.height="100%"):(t(this,p).style.height=h+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",r(this,m,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",r(this,m,t(this,p).offsetWidth-t(this,v)));if(!t(this,F).current){const h=getComputedStyle(this),u=this.vertical?parseFloat(h.paddingBlockStart)+parseFloat(h.paddingBlockEnd):parseFloat(h.paddingInlineStart)+parseFloat(h.paddingInlineEnd);r(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,F).current&&t(this,l).length){const h=t(this,l)[t(this,l).length-1],u=h.position+h.size-t(this,v),b=t(this,m)-u;r(this,Ct,h.position+h.size+b)}else r(this,Ct,t(this,m));if(t(this,Q).current&&t(this,l).length){const h=t(this,l)[e];t(this,a).set(h.position,{equalize:!0})}else t(this,a).set(s*t(this,m),{equalize:!0})});i(this,ze,()=>{const s=this.currentScrollValue;if(r(this,he,Math.max(0,s-t(this,m))),t(this,l).length){let e=0;for(let h=0;h<t(this,l).length;h++){const u=t(this,l)[h];u.transform(),this.targetScrollValue+u.size/2>=u.position&&(e=h)}t(this,g).current=e}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${s*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${s*-1}px, 0px, 0px)`;ee.scrollEntries.update(this,t(this,V).current,s)});i(this,oe,(s,e)=>{t(this,Tt).current&&(t(this,bt).current&&(t(this,x).pauseAndContinue(t(this,Ht).current),t(this,x).direction=Math.sign(e)||1),t(this,Ve).call(this,s,e))});i(this,Ve,(s,e)=>{if(t(this,j).current){if(t(this,j).current<0&&e>0)return;if(t(this,j).current>0&&e<0)return}if(t(this,tt).unlistenAnimationFrame(),!t(this,U).current&&t(this,gt).current&&(clearInterval(t(this,ne)),r(this,ne,setTimeout(()=>{const h=o(this,ke,os).call(this);h&&this.scrollToSection(h.index,{tween:{duration:t(this,$t).current,easing:Bs.easeInOutExpo}})},t(this,gt).current))),!(s==="drag"&&!Hs.device.isMobile&&!t(this,_t).current))if(t(this,Q).current){const h=Math.sign(e);t(this,l).length?this.shiftSections(h):t(this,a).shift(h*t(this,v))}else t(this,a).shift(e)});ls.isBrowser&&(r(this,a,new ms.Damped(0,{damping:.01,min:0,order:ge.TICK_ORDER.SCROLL})),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Gs),H.element(this,{tabIndex:0,children:[H.div({class:"static",children:[H.slot({name:"static"})]}),H.div({class:"content",children:[H.slot({ref:e=>r(this,Ce,e)})],style:{flexDirection:new As.Derived(t(this,V),e=>e==="x"?"row":"column")},ref:e=>r(this,p,e)})]}),r(this,K,new $e.WheelControls({element:t(this,p)})),t(this,K).changeEvent.subscribe(t(this,oe)),r(this,yt,new $e.KeyboardControls({element:this})),t(this,yt).changeEvent.subscribe(t(this,oe)),r(this,Y,new $e.DragControls({element:t(this,p)})),t(this,Y).changeEvent.subscribe(t(this,oe)),r(this,x,new $e.AutoplayControls({culling:this})),t(this,x).changeEvent.subscribe(t(this,Ve)),t(this,V).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,K).axis=t(this,ft).current?"max":e,t(this,yt).dimension=e==="x"?"width":"height",t(this,Y).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,q).call(this)}),t(this,ft).subscribe(e=>{t(this,K).axis=e.current?"max":t(this,V).current}),t(this,J).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,$).subscribe(({current:e})=>{this.isConnected&&(e?o(this,Nt,me).call(this):o(this,vt,ie).call(this))}),t(this,Q).subscribe(e=>{t(this,K).debounce=e.current,t(this,Y).swipe=e.current,t(this,x).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?o(this,Nt,me).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,vt,ie).call(this))}),t(this,pt).subscribe(e=>{this.isConnected&&(t(this,q).call(this),e.current&&!e.previous&&!t(this,l).length?o(this,Nt,me).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,vt,ie).call(this))}),t(this,W).subscribe(e=>{this.isConnected&&(t(this,q).call(this),o(this,et,Ot).call(this))}),t(this,F).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,$).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(r(this,he,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Mt).subscribe(e=>{t(this,a).damping=e.current}),t(this,At).subscribe(e=>{t(this,a).mass=e.current}),t(this,Bt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,Wt).subscribe(e=>{e.current&&!e.previous?o(this,we,ss).call(this):!e.current&&e.previous&&o(this,Ee,is).call(this)}),t(this,Ut).subscribe(e=>{e.current&&!e.previous?o(this,xe,rs).call(this):!e.current&&e.previous&&o(this,Le,hs).call(this)}),t(this,U).subscribe(e=>{t(this,x).speed=e.current,e.current&&!e.previous?t(this,x).connect():!e.current&&e.previous&&t(this,x).disconnect()}),t(this,bt).subscribe(e=>{e.current||(t(this,x).direction=1)}),t(this,G).subscribe(e=>{this.isConnected&&o(this,et,Ot).call(this)}),t(this,mt).subscribe(e=>{this.isConnected&&t(this,G).current&&o(this,et,Ot).call(this)}),t(this,X).subscribe(e=>{this.isConnected&&t(this,G).current&&o(this,et,Ot).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,l).length&&o(this,et,Ot).call(this)}),t(this,tt).subscribe(e=>{t(this,tt).isRunning.current&&t(this,a).set(e.current)}))}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Tt)}get axisCSSProperty(){return t(this,V)}get directionCSSProperty(){return t(this,j)}get pagesCSSProperty(){return t(this,J)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,Q)}get autoSizeCSSProperty(){return t(this,pt)}get wheelMaxDeltaCSSProperty(){return t(this,ft)}get sectionsInViewCSSProperty(){return t(this,W)}get loopCSSProperty(){return t(this,F)}get dampingCSSProperty(){return t(this,Mt)}get massCSSProperty(){return t(this,At)}get stiffnessCSSProperty(){return t(this,Bt)}get mouseDragCSSProperty(){return t(this,_t)}get sectionDistanceScaleCSSProperty(){return t(this,re)}get autoplayCSSProperty(){return t(this,U)}get autoplayPauseDurationCSSProperty(){return t(this,Ht)}get autoplayUserDirectionCSSProperty(){return t(this,bt)}get classesCSSProperty(){return t(this,G)}get currentIndexStartOffsetCSSProperty(){return t(this,mt)}get currentIndexEndOffsetCSSProperty(){return t(this,X)}get focusDelayCSSProperty(){return t(this,gt)}get focusDurationCSSProperty(){return t(this,$t)}get disabledCSSProperty(){return t(this,Wt)}get hibernatedCSSProperty(){return t(this,Ut)}get currentScrollValue(){return o(this,Fe,ns).call(this,"current")}get targetScrollValue(){return o(this,Fe,ns).call(this,"target")}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,ve)}get contentPosition(){return t(this,Pe)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,m)}get gap(){return t(this,O)}get counter(){return t(this,g)}get limit(){return t(this,l).length-t(this,W).current}get distance(){return t(this,Ct)}get loopDistance(){return t(this,F).current?t(this,Ct)+t(this,O):t(this,Ct)}get overscroll(){return t(this,he)}get vertical(){return t(this,V).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,V).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,V).current==="x"?0:t(this,a).distance}onScroll(...s){return t(this,a).subscribe(...s)}offScroll(...s){t(this,a).unsubscribe(...s)}range(s,e,h=0){const u=s-h,b=u+e+h*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(s,e,h=0){return Math.sin(this.range(s,e,h)*Math.PI)}visible(s,e,h=0){const u=s-h,b=u+e+h*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(s,e){if(!t(this,l).length)return;const h=t(this,g).current;o(this,Ge,ys).call(this,s);const u=t(this,l)[h],b=t(this,l)[t(this,g).current];if(u&&b){let D=0;const se=o(this,ke,os).call(this),qs=se?this.targetScrollValue-se.position:0;t(this,F).current?t(this,g).current===0&&h===t(this,l).length-1?D=t(this,m)+t(this,v)-u.position+t(this,O):t(this,g).current===t(this,l).length-1&&h===0?D=b.position-(t(this,m)+t(this,v)+t(this,O)):D=b.position-u.position:D=b.position-u.position,this.shiftPosition(D-qs,e)}}shiftSections(s,e){t(this,l).length&&this.scrollToSection(t(this,g).current+s,e)}setPosition(s,e){e!=null&&e.tween?(t(this,tt).set(t(this,a).current,{equalize:!0}),t(this,tt).set(s,ps({},e.tween))):t(this,a).set(s,{equalize:(e==null?void 0:e.behaviour)==="instant"})}shiftPosition(s,e){this.setPosition(t(this,a).target+s,e)}connectedCallback(){t(this,Tt).observe(),t(this,V).observe(),t(this,j).observe(),t(this,J).observe(),t(this,$).observe(),t(this,Q).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,W).observe(),t(this,F).observe(),t(this,Mt).observe(),t(this,At).observe(),t(this,Bt).observe(),t(this,_t).observe(),t(this,re).observe(),t(this,U).observe(),t(this,U).observe(),t(this,Ht).observe(),t(this,bt).observe(),t(this,G).observe(),t(this,mt).observe(),t(this,X).observe(),t(this,gt).observe(),t(this,$t).observe(),t(this,Wt).observe(),t(this,Ut).observe(),o(this,Le,hs).call(this)}disconnectedCallback(){t(this,Tt).unobserve(),t(this,V).unobserve(),t(this,j).unobserve(),t(this,J).unobserve(),t(this,$).unobserve(),t(this,Q).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,W).unobserve(),t(this,F).unobserve(),t(this,Mt).unobserve(),t(this,At).unobserve(),t(this,Bt).unobserve(),t(this,_t).unobserve(),t(this,re).unobserve(),t(this,U).unobserve(),t(this,Ht).unobserve(),t(this,bt).unobserve(),t(this,G).unobserve(),t(this,mt).unobserve(),t(this,X).unobserve(),t(this,gt).unobserve(),t(this,$t).unobserve(),t(this,Wt).unobserve(),t(this,Ut).unobserve(),o(this,xe,rs).call(this)}}a=new WeakMap,Tt=new WeakMap,V=new WeakMap,j=new WeakMap,J=new WeakMap,$=new WeakMap,Q=new WeakMap,pt=new WeakMap,ft=new WeakMap,W=new WeakMap,F=new WeakMap,Mt=new WeakMap,At=new WeakMap,Bt=new WeakMap,_t=new WeakMap,re=new WeakMap,U=new WeakMap,Ht=new WeakMap,bt=new WeakMap,G=new WeakMap,mt=new WeakMap,X=new WeakMap,gt=new WeakMap,$t=new WeakMap,Wt=new WeakMap,Ut=new WeakMap,p=new WeakMap,Ce=new WeakMap,l=new WeakMap,ve=new WeakMap,Pe=new WeakMap,v=new WeakMap,m=new WeakMap,O=new WeakMap,K=new WeakMap,yt=new WeakMap,Y=new WeakMap,x=new WeakMap,g=new WeakMap,he=new WeakMap,Ct=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,ne=new WeakMap,tt=new WeakMap,Nt=new WeakSet,me=function(){o(this,vt,ie).call(this),t(this,Ce).assignedElements().forEach((s,e)=>{s instanceof HTMLElement&&t(this,l).push(new Us(s,e,this))}),t(this,p).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,q).call(this),o(this,et,Ot).call(this)},vt=new WeakSet,ie=function(){t(this,l).forEach(s=>{s.destroy()}),r(this,l,[]),t(this,g).current=0,t(this,a).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))},we=new WeakSet,ss=function(){t(this,Gt)||(r(this,Gt,!0),t(this,a).unsubscribe(t(this,ze)),t(this,a).unlistenAnimationFrame(),t(this,K).disconnect(),t(this,yt).disconnect(),t(this,Y).disconnect(),t(this,x).disconnect(),clearInterval(t(this,ne)),t(this,tt).unlistenAnimationFrame())},Ee=new WeakSet,is=function(){t(this,Gt)&&(r(this,Gt,!1),t(this,a).subscribe(t(this,ze)),t(this,K).connect(),t(this,yt).connect(),t(this,Y).connect(),t(this,U).current&&t(this,x).connect())},xe=new WeakSet,rs=function(){t(this,Kt)||(r(this,Kt,!0),be.windowResizer.unsubscribe(t(this,q)),We.elementResizer.unsubscribe(t(this,q)),t(this,a).reset(),o(this,we,ss).call(this),t(this,p).style.transform="",t(this,$).current&&o(this,vt,ie).call(this),ee.scrollEntries.unregister(this))},Le=new WeakSet,hs=function(){t(this,Kt)&&(r(this,Kt,!1),t(this,$).current&&o(this,Nt,me).call(this),ee.scrollEntries.register(this),be.windowResizer.subscribe(t(this,q),ge.RESIZE_ORDER.SCROLL),We.elementResizer.subscribe(this,t(this,q)),o(this,Ee,is).call(this))},q=new WeakMap,ze=new WeakMap,Ge=new WeakSet,ys=function(s){t(this,F).current?(t(this,g).current=s%t(this,l).length,t(this,g).current=t(this,g).current<0?t(this,l).length+t(this,g).current:t(this,g).current):t(this,g).current=us.clamp(s,0,this.limit)},oe=new WeakMap,Ve=new WeakMap,Fe=new WeakSet,ns=function(s="current"){if(t(this,F).current&&t(this,l).length){const e=t(this,a)[s]%(t(this,m)+t(this,v)+t(this,O));return e<0?t(this,m)+e+t(this,v)+t(this,O):e}else return t(this,a)[s]},et=new WeakSet,Ot=function(){if(t(this,G).current&&t(this,l).length){const s=t(this,g).current+t(this,mt).current;s===0?this.classList.add("start"):this.classList.remove("start"),s===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,W).current+t(this,X).current;t(this,l).forEach((h,u)=>{const b=s-this.limit-1+t(this,X).current,D=s+e,se=this.sections.length-D;u>=s&&u<D||u<=b?h.mark("current"):u>=D&&u<D+se/2||u<=b+e?h.mark("next"):h.mark("previous")})}},ke=new WeakSet,os=function(){let s=null,e=1/0;for(let h=0;h<t(this,l).length;h++){const u=Math.abs(t(this,l)[h].position-this.targetScrollValue);u<e&&(e=u,s=h)}return s!==null?t(this,l)[s]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ue);var Re;class ts extends HTMLElement{constructor(){super(...arguments);i(this,Re,null)}get scrollElement(){return t(this,Re)}connectedCallback(){const s=Ws.findParentElement(this,Ue);s instanceof Ue?r(this,Re,s):console.error(this,"e-scroll not found")}}Re=new WeakMap;const Ks=as.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:bs.aptechkaTheme.colorFont.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:bs.aptechkaTheme.colorMain.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});var ce,k,st,it,le,ue,Zt,De,Oe,qe;class Cs extends ts{constructor(){super();i(this,ce,null);i(this,k,null);i(this,st,!1);i(this,it,0);i(this,le,0);i(this,ue,0);i(this,Zt,()=>{r(this,st,this.offsetWidth>this.offsetHeight);const s=t(this,st)?this.offsetWidth:this.offsetHeight;r(this,it,s/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/s)),r(this,it,Math.max(t(this,it),30)),t(this,st)?(t(this,k).style.width=t(this,it)+"px",t(this,k).style.height="100%"):(t(this,k).style.width="100%",t(this,k).style.height=t(this,it)+"px"),r(this,le,s-t(this,it)),this.scrollElement.scrollSize||(this.style.display="none")});i(this,De,()=>{r(this,ue,this.scrollElement.currentProgress*t(this,le)),t(this,st)?t(this,k).style.transform=`translate3d(${t(this,ue)}px, 0px, 0px)`:t(this,k).style.transform=`translate3d(0px, ${t(this,ue)}px, 0px)`});i(this,Oe,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,qe,s=>{document.documentElement.classList.add("grabbing"),$s.setupDrag(u=>{const b=t(this,st)?u.x:u.y,D=this.scrollElement.distance/t(this,le),se=(b-h)*D;this.scrollElement.setPosition(e+se)},()=>{document.documentElement.classList.remove("grabbing")});const e=this.scrollElement.targetScrollValue,h=t(this,st)?s.x:s.y});ls.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ks),H.element(this,{slot:"static","drag-dead-zone":"",children:[H.slot({ref:e=>r(this,ce,e),children:H.div({class:"default-thumb"})})]}))}get thumbElement(){return t(this,k)}connectedCallback(){super.connectedCallback();const s=t(this,ce).assignedElements()[0]||t(this,ce).firstElementChild;r(this,k,s),t(this,k).addEventListener("pointerdown",t(this,qe)),be.windowResizer.subscribe(t(this,Zt),ge.RESIZE_ORDER.SCROLL+1),We.elementResizer.subscribe(this,t(this,Zt)),this.scrollElement.onScroll(t(this,De)),this.scrollElement.axisCSSProperty.subscribe(t(this,Oe))}disconnectedCallback(){t(this,k).removeEventListener("pointerdown",t(this,qe)),be.windowResizer.unsubscribe(t(this,Zt)),We.elementResizer.unsubscribe(t(this,Zt)),this.scrollElement.offScroll(t(this,De)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Oe))}}ce=new WeakMap,k=new WeakMap,st=new WeakMap,it=new WeakMap,le=new WeakMap,ue=new WeakMap,Zt=new WeakMap,De=new WeakMap,Oe=new WeakMap,qe=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Cs);const Ns=as.createStylesheet({button:{all:"inherit"}});class vs extends ts{constructor(){super(),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ns),ls.isBrowser&&H.element(this,{children:[H.button({onClick:()=>{this.handleClick()},children:[H.slot()]})]})}}class Ps extends vs{handleClick(){const n=this.getAttribute("index"),s=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:s})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",Ps);class ws extends vs{handleClick(){const n=this.getAttribute("step"),s=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:s})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",ws);var rt,Pt,ae,Ie,Te,Se;class Zs{constructor(n,s,e){i(this,rt,void 0);i(this,Pt,void 0);i(this,ae,void 0);i(this,Ie,void 0);i(this,Te,()=>{t(this,Pt).scrollToSection(t(this,ae),{behaviour:t(this,Ie)})});i(this,Se,()=>{t(this,rt).classList.toggle("current",t(this,Pt).counter.current===t(this,ae))});r(this,rt,document.createElement("button")),r(this,Pt,n),r(this,Ie,e),r(this,ae,s),t(this,rt).addEventListener("click",t(this,Te)),t(this,Pt).counter.subscribe(t(this,Se)),t(this,Se).call(this)}get element(){return t(this,rt)}destroy(){t(this,rt).removeEventListener("click",t(this,Te)),t(this,Pt).counter.unsubscribe(t(this,Se)),t(this,rt).remove()}}rt=new WeakMap,Pt=new WeakMap,ae=new WeakMap,Ie=new WeakMap,Te=new WeakMap,Se=new WeakMap;var wt,de;class Es extends ts{constructor(){super(...arguments);i(this,wt,[]);i(this,de,gs.debounce(()=>{t(this,wt).forEach(s=>s.destroy()),r(this,wt,[]);for(let s=0;s<this.scrollElement.sections.length;s++){const e=new Zs(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");this.appendChild(e.element),t(this,wt).push(e)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,de)),t(this,de).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,de)),t(this,wt).forEach(s=>s.destroy()),r(this,wt,[])}}wt=new WeakMap,de=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",Es);var jt,Jt,Qt,Xt,Et,xt,Lt,zt,L,I,T,M,Vt,P,ht,nt,ot,ct,lt,w,A,B,ut,at,N,Me,d,Yt,te,Ae,E,Ft,R,z,_,pe,kt,C,Ke,Ls,Ne,zs,Ze,Vs,je,Fs,Je,ks,Qe,Rs,Be,fe,St,qt,Xe,Ds,Ye,Os,_e,cs,He;class xs extends ts{constructor(){super();i(this,Ke);i(this,Ne);i(this,Ze);i(this,je);i(this,Je);i(this,Qe);i(this,St);i(this,Xe);i(this,Ye);i(this,_e);i(this,jt,new c.CSSProperty(this,"--damping",20));i(this,Jt,new c.CSSProperty(this,"--mass",0));i(this,Qt,new c.CSSProperty(this,"--stiffness",0));i(this,Xt,new c.CSSProperty(this,"--target",""));i(this,Et,new c.CSSProperty(this,"--disabled",!1));i(this,xt,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1}));i(this,Lt,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1}));i(this,zt,new c.CSSProperty(this,"--capture-once",!1));i(this,L,new c.CSSProperty(this,"--captured",""));i(this,I,new c.CSSProperty(this,"--released",""));i(this,T,new c.CSSProperty(this,"--captured-from-start",""));i(this,M,new c.CSSProperty(this,"--captured-from-finish",""));i(this,Vt,new c.CSSProperty(this,"--released-from-start",""));i(this,P,new c.CSSProperty(this,"--released-from-finish",""));i(this,ht,new c.CSSProperty(this,"--passed-var",""));i(this,nt,new c.CSSProperty(this,"--progress-var",""));i(this,ot,new c.CSSProperty(this,"--distance-var",""));i(this,ct,new c.CSSProperty(this,"--start-var",""));i(this,lt,new c.CSSProperty(this,"--finish-var",""));i(this,w,new Dt.Store(!1));i(this,A,new Dt.Store(!1));i(this,B,new Dt.Store(!1));i(this,ut,new Dt.Store(!1));i(this,at,new Dt.Store(!1));i(this,N,new Dt.Store(!1));i(this,Me,[]);i(this,d,this);i(this,Yt,0);i(this,te,0);i(this,Ae,0);i(this,E,new ms.Damped(0,{order:ge.TICK_ORDER.SCROLL-1,min:0,max:1}));i(this,Ft,0);i(this,R,0);i(this,z,0);i(this,_,0);i(this,pe,!1);i(this,kt,!1);i(this,C,!0);i(this,Be,()=>{t(this,C)||(this.resize(),t(this,fe).call(this))});i(this,fe,()=>{!t(this,C)&&t(this,pe)&&this.tick()});i(this,He,gs.debounce(()=>{const s=ee.scrollEntries.getAll(this).reverse();let e=0;s.forEach((h,u)=>{h.element===this.scrollElement&&(e=u)}),r(this,Me,s.slice(e+1))},0))}get distanceOffsetCSSProperty(){return t(this,xt)}get startOffsetCSSProperty(){return t(this,Lt)}get captureOnceCSSProperty(){return t(this,zt)}get capturedCSSProperty(){return t(this,L)}get releasedCSSProperty(){return t(this,I)}get capturedFromStartCSSProperty(){return t(this,T)}get capturedFromFinishCSSProperty(){return t(this,M)}get releasedFromStartCSSProperty(){return t(this,Vt)}get releasedFromFinishCSSProperty(){return t(this,P)}get passedVarCSSProperty(){return t(this,ht)}get progressVarCSSProperty(){return t(this,nt)}get distanceVarCSSProperty(){return t(this,ot)}get startVarCSSProperty(){return t(this,ct)}get finishVarCSSProperty(){return t(this,lt)}get disabledCSSProperty(){return t(this,Et)}get dampingCSSProperty(){return t(this,jt)}get massCSSProperty(){return t(this,Jt)}get stiffnessCSSProperty(){return t(this,Qt)}get targetCSSProperty(){return t(this,Xt)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,A)}get isCapturedFromStart(){return t(this,B)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,at)}get isReleasedFromFinish(){return t(this,N)}get directionPosition(){return t(this,Yt)}get directionSize(){return t(this,te)}get passed(){return t(this,E)}get progress(){return t(this,Ft)}get start(){return t(this,R)}get finish(){return t(this,_)}get distance(){return t(this,z)}get isCapturedOnce(){return t(this,kt)}get isDisabled(){return t(this,C)}resize(){r(this,te,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Yt,this.scrollElement.vertical?Rt.getCumulativeOffsetTop(this,this.scrollElement):Rt.getCumulativeOffsetLeft(this,this.scrollElement)),r(this,R,this.getStart()),r(this,z,this.getDistance()),r(this,R,t(this,R)+t(this,Lt).current),r(this,z,t(this,z)+t(this,xt).current),r(this,_,t(this,R)+t(this,z)),this.scrollElement.currentScrollValue>t(this,_)&&!t(this,w).current&&!t(this,A).current&&(t(this,w).current=!0),this.setVar(t(this,ct).current,t(this,R)),this.setVar(t(this,lt).current,t(this,_)),this.setVar(t(this,ot).current,t(this,z)),t(this,E).max=t(this,z),r(this,pe,!0)}tick(){let s=this.scrollElement.currentScrollValue;t(this,Me).forEach(h=>{s+=h.value}),t(this,E).set(s-t(this,R));const e=Math.round(s);t(this,w).current&&(e>t(this,R)?t(this,B).current||o(this,Ze,Vs).call(this):t(this,B).current&&!t(this,ut).current&&o(this,Je,ks).call(this),e<t(this,_)?t(this,N).current&&!t(this,at).current&&o(this,je,Fs).call(this):t(this,B).current&&!t(this,N).current&&o(this,Qe,Rs).call(this)),e>t(this,R)&&e<t(this,_)?t(this,w).current||o(this,Ke,Ls).call(this):t(this,w).current&&(t(this,E).set(us.step(t(this,z)/2,t(this,E).current,0,t(this,z))),o(this,Ne,zs).call(this)),t(this,kt)&&t(this,zt).current&&(t(this,L).current&&t(this,d).classList.add(t(this,L).current),r(this,C,!0))}disable(){this.style.cssText="",r(this,Yt,0),r(this,te,0),t(this,E).reset(),r(this,Ft,0),r(this,R,0),r(this,z,0),r(this,_,0),r(this,pe,!1),t(this,w).current=!1,t(this,A).current=!1,t(this,B).current=!1,t(this,ut).current=!1,t(this,at).current=!1,t(this,N).current=!1,r(this,kt,!1),r(this,C,!0),o(this,_e,cs).call(this)}enable(){r(this,C,!1)}connectedCallback(){super.connectedCallback(),t(this,jt).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,Xt).observe(),t(this,Et).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,L).observe(),t(this,I).observe(),t(this,T).observe(),t(this,M).observe(),t(this,Vt).observe(),t(this,P).observe(),t(this,ht).observe(),t(this,nt).observe(),t(this,ot).observe(),t(this,ct).observe(),t(this,lt).observe();let s=!1;this.scrollElement.addEventListener("sectionsChange",t(this,He)),t(this,He).call(this),t(this,Et).current||this.enable(),t(this,jt).subscribe(e=>{t(this,E).damping=e.current}),t(this,Jt).subscribe(e=>{t(this,E).mass=e.current}),t(this,Qt).subscribe(e=>{t(this,E).stiffness=e.current}),t(this,Xt).subscribe(e=>{e.previous&&o(this,_e,cs).call(this),e.current?e.current==="parent"?r(this,d,this.parentElement||this):r(this,d,document.querySelector(e.current)||this):r(this,d,this)}),t(this,Et).subscribe(e=>{e.current&&!e.previous?this.disable():!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,Lt).subscribe(()=>{s&&!t(this,C)&&this.resize()}),t(this,xt).subscribe(()=>{s&&!t(this,C)&&this.resize()}),t(this,L).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,T).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,M).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,I).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,Vt).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,P).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,zt).subscribe(e=>{t(this,C)||!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,ht).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,this.passed.current))}),t(this,nt).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,Ft)))}),t(this,ct).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,R)))}),t(this,lt).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,_)))}),t(this,ot).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,z)))}),t(this,E).subscribe(e=>{r(this,Ft,t(this,E).current/t(this,z)||0),this.setVar(t(this,ht).current,t(this,E).current.toFixed(6)),this.setVar(t(this,nt).current,t(this,Ft).toFixed(6))}),be.windowResizer.subscribe(t(this,Be),ge.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,fe)),s=!0}disconnectedCallback(){be.windowResizer.unsubscribe(t(this,Be)),this.scrollElement.offScroll(t(this,fe)),t(this,jt).close(),t(this,Jt).close(),t(this,Qt).close(),t(this,Xt).close(),t(this,Et).close(),t(this,xt).close(),t(this,Lt).close(),t(this,zt).close(),t(this,L).close(),t(this,I).close(),t(this,T).close(),t(this,M).close(),t(this,Vt).close(),t(this,P).close(),t(this,ht).close(),t(this,nt).close(),t(this,ot).close(),t(this,ct).close(),t(this,lt).close(),t(this,w).close(),t(this,A).close(),t(this,B).close(),t(this,ut).close(),t(this,at).close(),t(this,N).close(),this.disable()}removeVar(s){s&&t(this,d).style.removeProperty(`--${s}`)}setVar(s,e){s&&t(this,d).style.setProperty(`--${s}`,e.toString())}getDistance(){return t(this,te)+t(this,Ae)}getStart(){return t(this,Yt)-t(this,Ae)}}jt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,Et=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,L=new WeakMap,I=new WeakMap,T=new WeakMap,M=new WeakMap,Vt=new WeakMap,P=new WeakMap,ht=new WeakMap,nt=new WeakMap,ot=new WeakMap,ct=new WeakMap,lt=new WeakMap,w=new WeakMap,A=new WeakMap,B=new WeakMap,ut=new WeakMap,at=new WeakMap,N=new WeakMap,Me=new WeakMap,d=new WeakMap,Yt=new WeakMap,te=new WeakMap,Ae=new WeakMap,E=new WeakMap,Ft=new WeakMap,R=new WeakMap,z=new WeakMap,_=new WeakMap,pe=new WeakMap,kt=new WeakMap,C=new WeakMap,Ke=new WeakSet,Ls=function(){t(this,w).current=!0,t(this,A).current=!1,r(this,kt,!0),t(this,I).current&&t(this,d).classList.remove(t(this,I).current),t(this,P).current&&t(this,d).classList.remove(t(this,P).current),t(this,P).current&&t(this,d).classList.remove(t(this,P).current),t(this,L).current&&t(this,d).classList.add(t(this,L).current)},Ne=new WeakSet,zs=function(){t(this,A).current=!0,t(this,w).current=!1,r(this,kt,!0),t(this,L).current&&t(this,d).classList.remove(t(this,L).current),t(this,T).current&&t(this,d).classList.remove(t(this,T).current),t(this,M).current&&t(this,d).classList.remove(t(this,M).current),t(this,I).current&&t(this,d).classList.add(t(this,I).current)},Ze=new WeakSet,Vs=function(){t(this,w).current=!0,t(this,B).current=!0,t(this,ut).current=!1,t(this,T).current&&t(this,d).classList.add(t(this,T).current)},je=new WeakSet,Fs=function(){t(this,w).current=!0,t(this,at).current=!0,t(this,N).current=!1,t(this,M).current&&t(this,d).classList.add(t(this,M).current)},Je=new WeakSet,ks=function(){t(this,A).current=!0,t(this,ut).current=!0,t(this,B).current=!1,t(this,P).current&&t(this,d).classList.add(t(this,P).current)},Qe=new WeakSet,Rs=function(){t(this,A).current=!0,t(this,N).current=!0,t(this,at).current=!1,t(this,P).current&&t(this,d).classList.add(t(this,P).current)},Be=new WeakMap,fe=new WeakMap,St=new WeakSet,qt=function(s){if(t(this,C)){s.previous&&t(this,d).classList.remove(s.previous),s.current&&t(this,d).classList.remove(s.current);return}s.current&&t(this,w).current?(s.previous&&t(this,d).classList.remove(s.previous),t(this,d).classList.add(s.current)):!s.current&&s.previous&&t(this,d).classList.remove(s.previous)},Xe=new WeakSet,Ds=function(...s){s.forEach(e=>{e&&t(this,d).classList.remove(e)})},Ye=new WeakSet,Os=function(...s){s.forEach(e=>{e&&t(this,d).style.removeProperty(`--${e}`)})},_e=new WeakSet,cs=function(){o(this,Xe,Ds).call(this,t(this,L).current,t(this,T).current,t(this,M).current,t(this,I).current,t(this,Vt).current,t(this,P).current),o(this,Ye,Os).call(this,t(this,ht).current,t(this,nt).current,t(this,ot).current,t(this,ct).current,t(this,lt).current)},He=new WeakMap;customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",xs);exports.ScrollBulletButtonsElement=Es;exports.ScrollElement=Ue;exports.ScrollSegmentElement=xs;exports.ScrollSetButtonElement=Ps;exports.ScrollStepButtonElement=ws;exports.ScrollbarElement=Cs;
1
+ "use strict";var Is=Object.defineProperty;var Ss=Object.getOwnPropertySymbols;var Ts=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable;var ds=(S,n,s)=>n in S?Is(S,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):S[n]=s,ps=(S,n)=>{for(var s in n||(n={}))Ts.call(n,s)&&ds(S,s,n[s]);if(Ss)for(var s of Ss(n))Ms.call(n,s)&&ds(S,s,n[s]);return S};var es=(S,n,s)=>{if(!n.has(S))throw TypeError("Cannot "+s)};var t=(S,n,s)=>(es(S,n,"read from private field"),s?s.call(S):n.get(S)),i=(S,n,s)=>{if(n.has(S))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(S):n.set(S,s)},r=(S,n,s,e)=>(es(S,n,"write to private field"),e?e.call(S,s):n.set(S,s),s);var o=(S,n,s)=>(es(S,n,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Dt=require("../Store-Cr3VaD9G.cjs"),As=require("../Derived-CNbsNMn_.cjs"),ls=require("../browser-CpzFX2xg.cjs"),Bs=require("../easings-DsS5-Kqc.cjs"),Rt=require("../layout-8ryRAMGJ.cjs"),us=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const ge=require("../order/index.cjs"),ms=require("../Damped-Da3EnNN4.cjs"),_s=require("../Tweened-DksN-Rz6.cjs"),$e=require("../controls/index.cjs"),be=require("../window-resizer/index.cjs"),ee=require("../scroll-entries/index.cjs"),H=require("../tags-BdW7ATzD.cjs"),as=require("../createStylesheet-BBBiyAsF.cjs"),fs=require("../css-unit-parser/index.cjs"),c=require("../css-property/index.cjs"),Hs=require("../Viewport-BBYt1Ivy.cjs"),We=require("../element-resizer/index.cjs"),$s=require("../gestures-DHLrn6Q8.cjs"),bs=require("../theme/index.cjs"),Ws=require("../dom-JBOkFLTh.cjs"),gs=require("../function-MthRj-GJ.cjs");var f,ye,y,It,Z,dt;class Us{constructor(n,s,e){i(this,f,void 0);i(this,ye,void 0);i(this,y,void 0);i(this,It,0);i(this,Z,0);i(this,dt,null);r(this,f,n),r(this,ye,s),r(this,y,e),ee.scrollEntries.register(t(this,f))}get index(){return t(this,ye)}get size(){return t(this,It)}get position(){return t(this,Z)}destroy(){ee.scrollEntries.unregister(t(this,f)),t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){r(this,It,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),r(this,Z,t(this,y).vertical?Rt.getCumulativeOffsetTop(t(this,f)):Rt.getCumulativeOffsetLeft(t(this,f))),r(this,Z,t(this,Z)-t(this,y).contentPosition)}transform(){let n=0;const s=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,Z)+t(this,It)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),ee.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const e=t(this,y).currentScrollValue+n,h=t(this,Z)-t(this,y).viewportSize-s,u=t(this,Z)+t(this,It)+s,b=us.clamp(e,h,u);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(n){t(this,dt)!==n&&(t(this,dt)&&t(this,f).classList.remove(t(this,dt)),n&&t(this,f).classList.add(n),r(this,dt,n),t(this,f).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:t(this,dt)}})))}}f=new WeakMap,ye=new WeakMap,y=new WeakMap,It=new WeakMap,Z=new WeakMap,dt=new WeakMap;const Gs=as.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Tt,V,j,J,$,Q,pt,ft,W,F,Mt,At,Bt,_t,re,U,Ht,bt,G,mt,X,gt,$t,Wt,Ut,p,Ce,l,ve,Pe,v,m,O,K,yt,Y,x,g,he,Ct,Gt,Kt,ne,tt,Nt,me,vt,ie,we,ss,Ee,is,xe,rs,Le,hs,q,ze,Ge,ys,oe,Ve,Fe,ns,et,Ot,ke,os;class Ue extends HTMLElement{constructor(){super();i(this,Nt);i(this,vt);i(this,we);i(this,Ee);i(this,xe);i(this,Le);i(this,Ge);i(this,Fe);i(this,et);i(this,ke);i(this,a,null);i(this,Tt,new c.CSSProperty(this,"--controls",!0));i(this,V,new c.CSSProperty(this,"--axis","y"));i(this,j,new c.CSSProperty(this,"--direction",0));i(this,J,new c.CSSProperty(this,"--pages",0,{validate:s=>Math.max(0,s-1)}));i(this,$,new c.CSSProperty(this,"--split",!1));i(this,Q,new c.CSSProperty(this,"--sectional",!1));i(this,pt,new c.CSSProperty(this,"--auto-size",!1));i(this,ft,new c.CSSProperty(this,"--wheel-max-delta",!1));i(this,W,new c.CSSProperty(this,"--sections-in-view",1));i(this,F,new c.CSSProperty(this,"--loop",!1));i(this,Mt,new c.CSSProperty(this,"--damping",20));i(this,At,new c.CSSProperty(this,"--mass",0));i(this,Bt,new c.CSSProperty(this,"--stiffness",0));i(this,_t,new c.CSSProperty(this,"--mouse-drag",!1));i(this,re,new c.CSSProperty(this,"--section-distance-scale",.5));i(this,U,new c.CSSProperty(this,"--autoplay",0));i(this,Ht,new c.CSSProperty(this,"--autoplay-pause-duration",0));i(this,bt,new c.CSSProperty(this,"--autoplay-user-direction",!1));i(this,G,new c.CSSProperty(this,"--classes",0));i(this,mt,new c.CSSProperty(this,"--current-index-start-offset",0));i(this,X,new c.CSSProperty(this,"--current-index-end-offset",0));i(this,gt,new c.CSSProperty(this,"--focus-delay",0));i(this,$t,new c.CSSProperty(this,"--focus-duration",3e3));i(this,Wt,new c.CSSProperty(this,"--disabled",!1));i(this,Ut,new c.CSSProperty(this,"--hibernated",!1));i(this,p,null);i(this,Ce,null);i(this,l,[]);i(this,ve,0);i(this,Pe,0);i(this,v,0);i(this,m,0);i(this,O,0);i(this,K,null);i(this,yt,null);i(this,Y,null);i(this,x,null);i(this,g,new Dt.Store(0));i(this,he,0);i(this,Ct,0);i(this,Gt,!0);i(this,Kt,!0);i(this,ne,void 0);i(this,tt,new _s.Tweened);i(this,q,()=>{t(this,a).unlistenAnimationFrame();const s=this.currentScrollValue/t(this,m)||0,e=t(this,g).current;if(r(this,ve,this.vertical?Rt.getCumulativeOffsetTop(this):Rt.getCumulativeOffsetLeft(this)),r(this,Pe,this.vertical?Rt.getCumulativeOffsetTop(t(this,p)):Rt.getCumulativeOffsetLeft(t(this,p))),r(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,O,fs.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):r(this,O,fs.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,pt).current&&t(this,l).length){const h=t(this,W).current,u=(t(this,v)-t(this,O)*(h-1))/h;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(h=>{h.setSize()});if(t(this,l).forEach(h=>{h.resize()}),t(this,J).current){r(this,m,t(this,v)*t(this,J).current);const h=t(this,m)+t(this,v);this.vertical?(t(this,p).style.width=h+"px",t(this,p).style.height="100%"):(t(this,p).style.height=h+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",r(this,m,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",r(this,m,t(this,p).offsetWidth-t(this,v)));if(!t(this,F).current){const h=getComputedStyle(this),u=this.vertical?parseFloat(h.paddingBlockStart)+parseFloat(h.paddingBlockEnd):parseFloat(h.paddingInlineStart)+parseFloat(h.paddingInlineEnd);r(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,F).current&&t(this,l).length){const h=t(this,l)[t(this,l).length-1],u=h.position+h.size-t(this,v),b=t(this,m)-u;r(this,Ct,h.position+h.size+b)}else r(this,Ct,t(this,m));if(t(this,Q).current&&t(this,l).length){const h=t(this,l)[e];t(this,a).set(h.position,{equalize:!0})}else t(this,a).set(s*t(this,m),{equalize:!0})});i(this,ze,()=>{const s=this.currentScrollValue;if(r(this,he,Math.max(0,s-t(this,m))),t(this,l).length){let e=0;for(let h=0;h<t(this,l).length;h++){const u=t(this,l)[h];u.transform(),this.targetScrollValue+u.size/2>=u.position&&(e=h)}t(this,g).current=e}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${s*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${s*-1}px, 0px, 0px)`;ee.scrollEntries.update(this,t(this,V).current,s)});i(this,oe,(s,e)=>{t(this,Tt).current&&(t(this,bt).current&&(t(this,x).pauseAndContinue(t(this,Ht).current),t(this,x).direction=Math.sign(e)||1),t(this,Ve).call(this,s,e))});i(this,Ve,(s,e)=>{if(t(this,j).current){if(t(this,j).current<0&&e>0)return;if(t(this,j).current>0&&e<0)return}if(t(this,tt).unlistenAnimationFrame(),!t(this,U).current&&t(this,gt).current&&(clearInterval(t(this,ne)),r(this,ne,setTimeout(()=>{const h=o(this,ke,os).call(this);h&&this.scrollToSection(h.index,{tween:{duration:t(this,$t).current,easing:Bs.easeInOutExpo}})},t(this,gt).current))),!(s==="drag"&&!Hs.device.isMobile&&!t(this,_t).current))if(t(this,Q).current){const h=Math.sign(e);t(this,l).length?this.shiftSections(h):t(this,a).shift(h*t(this,v))}else t(this,a).shift(e)});ls.isBrowser&&(r(this,a,new ms.Damped(0,{damping:.01,min:0,order:ge.TICK_ORDER.SCROLL})),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Gs),H.element(this,{tabIndex:0,children:[H.div({class:"static",children:[H.slot({name:"static"})]}),H.div({class:"content",children:[H.slot({ref:e=>r(this,Ce,e)})],style:{flexDirection:new As.Derived(t(this,V),e=>e==="x"?"row":"column")},ref:e=>r(this,p,e)})]}),r(this,K,new $e.WheelControls({element:t(this,p)})),t(this,K).changeEvent.subscribe(t(this,oe)),r(this,yt,new $e.KeyboardControls({element:this})),t(this,yt).changeEvent.subscribe(t(this,oe)),r(this,Y,new $e.DragControls({element:t(this,p)})),t(this,Y).changeEvent.subscribe(t(this,oe)),r(this,x,new $e.AutoplayControls({culling:this})),t(this,x).changeEvent.subscribe(t(this,Ve)),t(this,V).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,K).axis=t(this,ft).current?"max":e,t(this,yt).dimension=e==="x"?"width":"height",t(this,Y).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,q).call(this)}),t(this,ft).subscribe(e=>{t(this,K).axis=e.current?"max":t(this,V).current}),t(this,J).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,$).subscribe(({current:e})=>{this.isConnected&&(e?o(this,Nt,me).call(this):o(this,vt,ie).call(this))}),t(this,Q).subscribe(e=>{t(this,K).debounce=e.current,t(this,Y).swipe=e.current,t(this,x).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?o(this,Nt,me).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,vt,ie).call(this))}),t(this,pt).subscribe(e=>{this.isConnected&&(t(this,q).call(this),e.current&&!e.previous&&!t(this,l).length?o(this,Nt,me).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,vt,ie).call(this))}),t(this,W).subscribe(e=>{this.isConnected&&(t(this,q).call(this),o(this,et,Ot).call(this))}),t(this,F).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,$).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(r(this,he,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Mt).subscribe(e=>{t(this,a).damping=e.current}),t(this,At).subscribe(e=>{t(this,a).mass=e.current}),t(this,Bt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,Wt).subscribe(e=>{e.current&&!e.previous?o(this,we,ss).call(this):!e.current&&e.previous&&o(this,Ee,is).call(this)}),t(this,Ut).subscribe(e=>{e.current&&!e.previous?o(this,xe,rs).call(this):!e.current&&e.previous&&o(this,Le,hs).call(this)}),t(this,U).subscribe(e=>{t(this,x).speed=e.current,e.current&&!e.previous?t(this,x).connect():!e.current&&e.previous&&t(this,x).disconnect()}),t(this,bt).subscribe(e=>{e.current||(t(this,x).direction=1)}),t(this,G).subscribe(e=>{this.isConnected&&o(this,et,Ot).call(this)}),t(this,mt).subscribe(e=>{this.isConnected&&t(this,G).current&&o(this,et,Ot).call(this)}),t(this,X).subscribe(e=>{this.isConnected&&t(this,G).current&&o(this,et,Ot).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,l).length&&o(this,et,Ot).call(this)}),t(this,tt).subscribe(e=>{t(this,tt).isRunning.current&&t(this,a).set(e.current)}))}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Tt)}get axisCSSProperty(){return t(this,V)}get directionCSSProperty(){return t(this,j)}get pagesCSSProperty(){return t(this,J)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,Q)}get autoSizeCSSProperty(){return t(this,pt)}get wheelMaxDeltaCSSProperty(){return t(this,ft)}get sectionsInViewCSSProperty(){return t(this,W)}get loopCSSProperty(){return t(this,F)}get dampingCSSProperty(){return t(this,Mt)}get massCSSProperty(){return t(this,At)}get stiffnessCSSProperty(){return t(this,Bt)}get mouseDragCSSProperty(){return t(this,_t)}get sectionDistanceScaleCSSProperty(){return t(this,re)}get autoplayCSSProperty(){return t(this,U)}get autoplayPauseDurationCSSProperty(){return t(this,Ht)}get autoplayUserDirectionCSSProperty(){return t(this,bt)}get classesCSSProperty(){return t(this,G)}get currentIndexStartOffsetCSSProperty(){return t(this,mt)}get currentIndexEndOffsetCSSProperty(){return t(this,X)}get focusDelayCSSProperty(){return t(this,gt)}get focusDurationCSSProperty(){return t(this,$t)}get disabledCSSProperty(){return t(this,Wt)}get hibernatedCSSProperty(){return t(this,Ut)}get currentScrollValue(){return o(this,Fe,ns).call(this,"current")}get targetScrollValue(){return o(this,Fe,ns).call(this,"target")}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,ve)}get contentPosition(){return t(this,Pe)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,m)}get gap(){return t(this,O)}get counter(){return t(this,g)}get limit(){return t(this,l).length-t(this,W).current}get distance(){return t(this,Ct)}get loopDistance(){return t(this,F).current?t(this,Ct)+t(this,O):t(this,Ct)}get overscroll(){return t(this,he)}get vertical(){return t(this,V).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,V).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,V).current==="x"?0:t(this,a).distance}onScroll(...s){return t(this,a).subscribe(...s)}offScroll(...s){t(this,a).unsubscribe(...s)}range(s,e,h=0){const u=s-h,b=u+e+h*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(s,e,h=0){return Math.sin(this.range(s,e,h)*Math.PI)}visible(s,e,h=0){const u=s-h,b=u+e+h*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(s,e){if(!t(this,l).length)return;const h=t(this,g).current;o(this,Ge,ys).call(this,s);const u=t(this,l)[h],b=t(this,l)[t(this,g).current];if(u&&b){let D=0;const se=o(this,ke,os).call(this),qs=se?this.targetScrollValue-se.position:0;t(this,F).current?t(this,g).current===0&&h===t(this,l).length-1?D=t(this,m)+t(this,v)-u.position+t(this,O):t(this,g).current===t(this,l).length-1&&h===0?D=b.position-(t(this,m)+t(this,v)+t(this,O)):D=b.position-u.position:D=b.position-u.position,this.shiftPosition(D-qs,e)}}shiftSections(s,e){t(this,l).length&&this.scrollToSection(t(this,g).current+s,e)}setPosition(s,e){e!=null&&e.tween?(t(this,tt).set(t(this,a).current,{equalize:!0}),t(this,tt).set(s,ps({},e.tween))):t(this,a).set(s,{equalize:(e==null?void 0:e.behaviour)==="instant"})}shiftPosition(s,e){this.setPosition(t(this,a).target+s,e)}connectedCallback(){t(this,Tt).observe(),t(this,V).observe(),t(this,j).observe(),t(this,J).observe(),t(this,$).observe(),t(this,Q).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,W).observe(),t(this,F).observe(),t(this,Mt).observe(),t(this,At).observe(),t(this,Bt).observe(),t(this,_t).observe(),t(this,re).observe(),t(this,U).observe(),t(this,U).observe(),t(this,Ht).observe(),t(this,bt).observe(),t(this,G).observe(),t(this,mt).observe(),t(this,X).observe(),t(this,gt).observe(),t(this,$t).observe(),t(this,Wt).observe(),t(this,Ut).observe(),o(this,Le,hs).call(this)}disconnectedCallback(){t(this,Tt).unobserve(),t(this,V).unobserve(),t(this,j).unobserve(),t(this,J).unobserve(),t(this,$).unobserve(),t(this,Q).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,W).unobserve(),t(this,F).unobserve(),t(this,Mt).unobserve(),t(this,At).unobserve(),t(this,Bt).unobserve(),t(this,_t).unobserve(),t(this,re).unobserve(),t(this,U).unobserve(),t(this,Ht).unobserve(),t(this,bt).unobserve(),t(this,G).unobserve(),t(this,mt).unobserve(),t(this,X).unobserve(),t(this,gt).unobserve(),t(this,$t).unobserve(),t(this,Wt).unobserve(),t(this,Ut).unobserve(),o(this,xe,rs).call(this)}}a=new WeakMap,Tt=new WeakMap,V=new WeakMap,j=new WeakMap,J=new WeakMap,$=new WeakMap,Q=new WeakMap,pt=new WeakMap,ft=new WeakMap,W=new WeakMap,F=new WeakMap,Mt=new WeakMap,At=new WeakMap,Bt=new WeakMap,_t=new WeakMap,re=new WeakMap,U=new WeakMap,Ht=new WeakMap,bt=new WeakMap,G=new WeakMap,mt=new WeakMap,X=new WeakMap,gt=new WeakMap,$t=new WeakMap,Wt=new WeakMap,Ut=new WeakMap,p=new WeakMap,Ce=new WeakMap,l=new WeakMap,ve=new WeakMap,Pe=new WeakMap,v=new WeakMap,m=new WeakMap,O=new WeakMap,K=new WeakMap,yt=new WeakMap,Y=new WeakMap,x=new WeakMap,g=new WeakMap,he=new WeakMap,Ct=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,ne=new WeakMap,tt=new WeakMap,Nt=new WeakSet,me=function(){o(this,vt,ie).call(this),t(this,Ce).assignedElements().forEach((s,e)=>{s instanceof HTMLElement&&t(this,l).push(new Us(s,e,this))}),t(this,p).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,q).call(this),o(this,et,Ot).call(this)},vt=new WeakSet,ie=function(){t(this,l).forEach(s=>{s.destroy()}),r(this,l,[]),t(this,g).current=0,t(this,a).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))},we=new WeakSet,ss=function(){t(this,Gt)||(r(this,Gt,!0),t(this,a).unsubscribe(t(this,ze)),t(this,a).unlistenAnimationFrame(),t(this,K).disconnect(),t(this,yt).disconnect(),t(this,Y).disconnect(),t(this,x).disconnect(),clearInterval(t(this,ne)),t(this,tt).unlistenAnimationFrame())},Ee=new WeakSet,is=function(){t(this,Gt)&&(r(this,Gt,!1),t(this,a).subscribe(t(this,ze)),t(this,K).connect(),t(this,yt).connect(),t(this,Y).connect(),t(this,U).current&&t(this,x).connect())},xe=new WeakSet,rs=function(){t(this,Kt)||(r(this,Kt,!0),be.windowResizer.unsubscribe(t(this,q)),We.elementResizer.unsubscribe(t(this,q)),t(this,a).reset(),o(this,we,ss).call(this),t(this,p).style.transform="",t(this,$).current&&o(this,vt,ie).call(this),ee.scrollEntries.unregister(this))},Le=new WeakSet,hs=function(){t(this,Kt)&&(r(this,Kt,!1),t(this,$).current&&o(this,Nt,me).call(this),ee.scrollEntries.register(this),be.windowResizer.subscribe(t(this,q),ge.RESIZE_ORDER.SCROLL),We.elementResizer.subscribe(this,t(this,q)),o(this,Ee,is).call(this))},q=new WeakMap,ze=new WeakMap,Ge=new WeakSet,ys=function(s){t(this,F).current?(t(this,g).current=s%t(this,l).length,t(this,g).current=t(this,g).current<0?t(this,l).length+t(this,g).current:t(this,g).current):t(this,g).current=us.clamp(s,0,this.limit)},oe=new WeakMap,Ve=new WeakMap,Fe=new WeakSet,ns=function(s="current"){if(t(this,F).current&&t(this,l).length){const e=t(this,a)[s]%(t(this,m)+t(this,v)+t(this,O));return e<0?t(this,m)+e+t(this,v)+t(this,O):e}else return t(this,a)[s]},et=new WeakSet,Ot=function(){if(t(this,G).current&&t(this,l).length){const s=t(this,g).current+t(this,mt).current;s===0?this.classList.add("start"):this.classList.remove("start"),s===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,W).current+t(this,X).current;t(this,l).forEach((h,u)=>{const b=s-this.limit-1+t(this,X).current,D=s+e,se=this.sections.length-D;u>=s&&u<D||u<=b?h.mark("current"):u>=D&&u<D+se/2||u<=b+e?h.mark("next"):h.mark("previous")})}},ke=new WeakSet,os=function(){let s=null,e=1/0;for(let h=0;h<t(this,l).length;h++){const u=Math.abs(t(this,l)[h].position-this.targetScrollValue);u<e&&(e=u,s=h)}return s!==null?t(this,l)[s]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ue);var Re;class ts extends HTMLElement{constructor(){super(...arguments);i(this,Re,null)}get scrollElement(){return t(this,Re)}connectedCallback(){const s=Ws.findParentElement(this,Ue);s instanceof Ue?r(this,Re,s):console.error(this,"e-scroll not found")}}Re=new WeakMap;const Ks=as.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:bs.aptechkaTheme.colorFont.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:bs.aptechkaTheme.colorMain.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});var ce,k,st,it,le,ue,Zt,De,Oe,qe;class Cs extends ts{constructor(){super();i(this,ce,null);i(this,k,null);i(this,st,!1);i(this,it,0);i(this,le,0);i(this,ue,0);i(this,Zt,()=>{r(this,st,this.offsetWidth>this.offsetHeight);const s=t(this,st)?this.offsetWidth:this.offsetHeight;r(this,it,s/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/s)),r(this,it,Math.max(t(this,it),30)),t(this,st)?(t(this,k).style.width=t(this,it)+"px",t(this,k).style.height="100%"):(t(this,k).style.width="100%",t(this,k).style.height=t(this,it)+"px"),r(this,le,s-t(this,it)),this.scrollElement.scrollSize||(this.style.display="none")});i(this,De,()=>{r(this,ue,this.scrollElement.currentProgress*t(this,le)),t(this,st)?t(this,k).style.transform=`translate3d(${t(this,ue)}px, 0px, 0px)`:t(this,k).style.transform=`translate3d(0px, ${t(this,ue)}px, 0px)`});i(this,Oe,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,qe,s=>{document.documentElement.classList.add("grabbing"),$s.setupDrag(u=>{const b=t(this,st)?u.x:u.y,D=this.scrollElement.distance/t(this,le),se=(b-h)*D;this.scrollElement.setPosition(e+se)},()=>{document.documentElement.classList.remove("grabbing")});const e=this.scrollElement.targetScrollValue,h=t(this,st)?s.x:s.y});ls.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ks),H.element(this,{slot:"static","drag-dead-zone":"",children:[H.slot({ref:e=>r(this,ce,e),children:H.div({class:"default-thumb"})})]}))}get thumbElement(){return t(this,k)}connectedCallback(){super.connectedCallback();const s=t(this,ce).assignedElements()[0]||t(this,ce).firstElementChild;r(this,k,s),t(this,k).addEventListener("pointerdown",t(this,qe)),be.windowResizer.subscribe(t(this,Zt),ge.RESIZE_ORDER.SCROLL+1),We.elementResizer.subscribe(this,t(this,Zt)),this.scrollElement.onScroll(t(this,De)),this.scrollElement.axisCSSProperty.subscribe(t(this,Oe))}disconnectedCallback(){t(this,k).removeEventListener("pointerdown",t(this,qe)),be.windowResizer.unsubscribe(t(this,Zt)),We.elementResizer.unsubscribe(t(this,Zt)),this.scrollElement.offScroll(t(this,De)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Oe))}}ce=new WeakMap,k=new WeakMap,st=new WeakMap,it=new WeakMap,le=new WeakMap,ue=new WeakMap,Zt=new WeakMap,De=new WeakMap,Oe=new WeakMap,qe=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Cs);const Ns=as.createStylesheet({button:{all:"inherit"}});class vs extends ts{constructor(){super(),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ns),ls.isBrowser&&H.element(this,{children:[H.button({onClick:()=>{this.handleClick()},children:[H.slot()]})]})}}class Ps extends vs{handleClick(){const n=this.getAttribute("index"),s=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:s})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",Ps);class ws extends vs{handleClick(){const n=this.getAttribute("step"),s=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:s})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",ws);var rt,Pt,ae,Ie,Te,Se;class Zs{constructor(n,s,e){i(this,rt,void 0);i(this,Pt,void 0);i(this,ae,void 0);i(this,Ie,void 0);i(this,Te,()=>{t(this,Pt).scrollToSection(t(this,ae),{behaviour:t(this,Ie)})});i(this,Se,()=>{t(this,rt).classList.toggle("current",t(this,Pt).counter.current===t(this,ae))});r(this,rt,document.createElement("button")),r(this,Pt,n),r(this,Ie,e),r(this,ae,s),t(this,rt).addEventListener("click",t(this,Te)),t(this,Pt).counter.subscribe(t(this,Se)),t(this,Se).call(this)}get element(){return t(this,rt)}destroy(){t(this,rt).removeEventListener("click",t(this,Te)),t(this,Pt).counter.unsubscribe(t(this,Se)),t(this,rt).remove()}}rt=new WeakMap,Pt=new WeakMap,ae=new WeakMap,Ie=new WeakMap,Te=new WeakMap,Se=new WeakMap;var wt,de;class Es extends ts{constructor(){super(...arguments);i(this,wt,[]);i(this,de,gs.debounce(()=>{t(this,wt).forEach(s=>s.destroy()),r(this,wt,[]);for(let s=0;s<this.scrollElement.sections.length;s++){const e=new Zs(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");this.appendChild(e.element),t(this,wt).push(e)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,de)),t(this,de).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,de)),t(this,wt).forEach(s=>s.destroy()),r(this,wt,[])}}wt=new WeakMap,de=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",Es);var jt,Jt,Qt,Xt,Et,xt,Lt,zt,L,I,T,M,Vt,P,ht,nt,ot,ct,lt,w,A,B,ut,at,N,Me,d,Yt,te,Ae,E,Ft,R,z,_,pe,kt,C,Ke,Ls,Ne,zs,Ze,Vs,je,Fs,Je,ks,Qe,Rs,Be,fe,St,qt,Xe,Ds,Ye,Os,_e,cs,He;class xs extends ts{constructor(){super();i(this,Ke);i(this,Ne);i(this,Ze);i(this,je);i(this,Je);i(this,Qe);i(this,St);i(this,Xe);i(this,Ye);i(this,_e);i(this,jt,new c.CSSProperty(this,"--damping",20));i(this,Jt,new c.CSSProperty(this,"--mass",0));i(this,Qt,new c.CSSProperty(this,"--stiffness",0));i(this,Xt,new c.CSSProperty(this,"--target",""));i(this,Et,new c.CSSProperty(this,"--disabled",!1));i(this,xt,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1}));i(this,Lt,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1}));i(this,zt,new c.CSSProperty(this,"--capture-once",!1));i(this,L,new c.CSSProperty(this,"--captured",""));i(this,I,new c.CSSProperty(this,"--released",""));i(this,T,new c.CSSProperty(this,"--captured-from-start",""));i(this,M,new c.CSSProperty(this,"--captured-from-finish",""));i(this,Vt,new c.CSSProperty(this,"--released-from-start",""));i(this,P,new c.CSSProperty(this,"--released-from-finish",""));i(this,ht,new c.CSSProperty(this,"--passed-var",""));i(this,nt,new c.CSSProperty(this,"--progress-var",""));i(this,ot,new c.CSSProperty(this,"--distance-var",""));i(this,ct,new c.CSSProperty(this,"--start-var",""));i(this,lt,new c.CSSProperty(this,"--finish-var",""));i(this,w,new Dt.Store(!1));i(this,A,new Dt.Store(!1));i(this,B,new Dt.Store(!1));i(this,ut,new Dt.Store(!1));i(this,at,new Dt.Store(!1));i(this,N,new Dt.Store(!1));i(this,Me,[]);i(this,d,this);i(this,Yt,0);i(this,te,0);i(this,Ae,0);i(this,E,new ms.Damped(0,{order:ge.TICK_ORDER.SCROLL-1,min:0,max:1}));i(this,Ft,0);i(this,R,0);i(this,z,0);i(this,_,0);i(this,pe,!1);i(this,kt,!1);i(this,C,!0);i(this,Be,()=>{t(this,C)||(this.resize(),t(this,fe).call(this))});i(this,fe,()=>{!t(this,C)&&t(this,pe)&&this.tick()});i(this,He,gs.debounce(()=>{const s=ee.scrollEntries.getAll(this).reverse();let e=0;s.forEach((h,u)=>{h.element===this.scrollElement&&(e=u)}),r(this,Me,s.slice(e+1))},0))}get distanceOffsetCSSProperty(){return t(this,xt)}get startOffsetCSSProperty(){return t(this,Lt)}get captureOnceCSSProperty(){return t(this,zt)}get capturedCSSProperty(){return t(this,L)}get releasedCSSProperty(){return t(this,I)}get capturedFromStartCSSProperty(){return t(this,T)}get capturedFromFinishCSSProperty(){return t(this,M)}get releasedFromStartCSSProperty(){return t(this,Vt)}get releasedFromFinishCSSProperty(){return t(this,P)}get passedVarCSSProperty(){return t(this,ht)}get progressVarCSSProperty(){return t(this,nt)}get distanceVarCSSProperty(){return t(this,ot)}get startVarCSSProperty(){return t(this,ct)}get finishVarCSSProperty(){return t(this,lt)}get disabledCSSProperty(){return t(this,Et)}get dampingCSSProperty(){return t(this,jt)}get massCSSProperty(){return t(this,Jt)}get stiffnessCSSProperty(){return t(this,Qt)}get targetCSSProperty(){return t(this,Xt)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,A)}get isCapturedFromStart(){return t(this,B)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,at)}get isReleasedFromFinish(){return t(this,N)}get directionPosition(){return t(this,Yt)}get directionSize(){return t(this,te)}get passed(){return t(this,E)}get progress(){return t(this,Ft)}get start(){return t(this,R)}get finish(){return t(this,_)}get distance(){return t(this,z)}get isCapturedOnce(){return t(this,kt)}get isDisabled(){return t(this,C)}resize(){r(this,te,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Yt,this.scrollElement.vertical?Rt.getCumulativeOffsetTop(this,this.scrollElement):Rt.getCumulativeOffsetLeft(this,this.scrollElement)),r(this,R,this.getStart()),r(this,z,this.getDistance()),r(this,R,t(this,R)+t(this,Lt).current),r(this,z,t(this,z)+t(this,xt).current),r(this,_,t(this,R)+t(this,z)),this.scrollElement.currentScrollValue>t(this,_)&&!t(this,w).current&&!t(this,A).current&&(t(this,w).current=!0),this.setVar(t(this,ct).current,t(this,R)),this.setVar(t(this,lt).current,t(this,_)),this.setVar(t(this,ot).current,t(this,z)),t(this,E).max=t(this,z),r(this,pe,!0)}tick(){let s=this.scrollElement.currentScrollValue;t(this,Me).forEach(h=>{s+=h.value}),t(this,E).set(s-t(this,R));const e=Math.round(s);t(this,w).current&&(e>t(this,R)?t(this,B).current||o(this,Ze,Vs).call(this):t(this,B).current&&!t(this,ut).current&&o(this,Je,ks).call(this),e<t(this,_)?t(this,N).current&&!t(this,at).current&&o(this,je,Fs).call(this):t(this,B).current&&!t(this,N).current&&o(this,Qe,Rs).call(this)),e>t(this,R)&&e<t(this,_)?t(this,w).current||o(this,Ke,Ls).call(this):t(this,w).current&&(t(this,E).set(us.step(t(this,z)/2,t(this,E).current,0,t(this,z))),o(this,Ne,zs).call(this)),t(this,kt)&&t(this,zt).current&&(t(this,L).current&&t(this,d).classList.add(t(this,L).current),r(this,C,!0))}disable(){this.style.cssText="",r(this,Yt,0),r(this,te,0),t(this,E).reset(),r(this,Ft,0),r(this,R,0),r(this,z,0),r(this,_,0),r(this,pe,!1),t(this,w).current=!1,t(this,A).current=!1,t(this,B).current=!1,t(this,ut).current=!1,t(this,at).current=!1,t(this,N).current=!1,r(this,kt,!1),r(this,C,!0),o(this,_e,cs).call(this)}enable(){r(this,C,!1)}connectedCallback(){super.connectedCallback(),t(this,jt).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,Xt).observe(),t(this,Et).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,L).observe(),t(this,I).observe(),t(this,T).observe(),t(this,M).observe(),t(this,Vt).observe(),t(this,P).observe(),t(this,ht).observe(),t(this,nt).observe(),t(this,ot).observe(),t(this,ct).observe(),t(this,lt).observe();let s=!1;this.scrollElement.addEventListener("sectionsChange",t(this,He)),t(this,He).call(this),t(this,Et).current||this.enable(),t(this,jt).subscribe(e=>{t(this,E).damping=e.current}),t(this,Jt).subscribe(e=>{t(this,E).mass=e.current}),t(this,Qt).subscribe(e=>{t(this,E).stiffness=e.current}),t(this,Xt).subscribe(e=>{e.previous&&o(this,_e,cs).call(this),e.current?e.current==="parent"?r(this,d,this.parentElement||this):r(this,d,document.querySelector(e.current)||this):r(this,d,this)}),t(this,Et).subscribe(e=>{e.current&&!e.previous?this.disable():!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,Lt).subscribe(()=>{s&&!t(this,C)&&this.resize()}),t(this,xt).subscribe(()=>{s&&!t(this,C)&&this.resize()}),t(this,L).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,T).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,M).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,I).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,Vt).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,P).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,zt).subscribe(e=>{t(this,C)||!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,ht).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,this.passed.current))}),t(this,nt).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,Ft)))}),t(this,ct).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,R)))}),t(this,lt).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,_)))}),t(this,ot).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,z)))}),t(this,E).subscribe(e=>{r(this,Ft,t(this,E).current/t(this,z)||0),this.setVar(t(this,ht).current,t(this,E).current.toFixed(6)),this.setVar(t(this,nt).current,t(this,Ft).toFixed(6))}),be.windowResizer.subscribe(t(this,Be),ge.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,fe)),s=!0}disconnectedCallback(){be.windowResizer.unsubscribe(t(this,Be)),this.scrollElement.offScroll(t(this,fe)),t(this,jt).close(),t(this,Jt).close(),t(this,Qt).close(),t(this,Xt).close(),t(this,Et).close(),t(this,xt).close(),t(this,Lt).close(),t(this,zt).close(),t(this,L).close(),t(this,I).close(),t(this,T).close(),t(this,M).close(),t(this,Vt).close(),t(this,P).close(),t(this,ht).close(),t(this,nt).close(),t(this,ot).close(),t(this,ct).close(),t(this,lt).close(),t(this,w).close(),t(this,A).close(),t(this,B).close(),t(this,ut).close(),t(this,at).close(),t(this,N).close(),this.disable()}removeVar(s){s&&t(this,d).style.removeProperty(`--${s}`)}setVar(s,e){s&&t(this,d).style.setProperty(`--${s}`,e.toString())}getDistance(){return t(this,te)+t(this,Ae)}getStart(){return t(this,Yt)-t(this,Ae)}}jt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,Et=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,L=new WeakMap,I=new WeakMap,T=new WeakMap,M=new WeakMap,Vt=new WeakMap,P=new WeakMap,ht=new WeakMap,nt=new WeakMap,ot=new WeakMap,ct=new WeakMap,lt=new WeakMap,w=new WeakMap,A=new WeakMap,B=new WeakMap,ut=new WeakMap,at=new WeakMap,N=new WeakMap,Me=new WeakMap,d=new WeakMap,Yt=new WeakMap,te=new WeakMap,Ae=new WeakMap,E=new WeakMap,Ft=new WeakMap,R=new WeakMap,z=new WeakMap,_=new WeakMap,pe=new WeakMap,kt=new WeakMap,C=new WeakMap,Ke=new WeakSet,Ls=function(){t(this,w).current=!0,t(this,A).current=!1,r(this,kt,!0),t(this,I).current&&t(this,d).classList.remove(t(this,I).current),t(this,P).current&&t(this,d).classList.remove(t(this,P).current),t(this,P).current&&t(this,d).classList.remove(t(this,P).current),t(this,L).current&&t(this,d).classList.add(t(this,L).current)},Ne=new WeakSet,zs=function(){t(this,A).current=!0,t(this,w).current=!1,r(this,kt,!0),t(this,L).current&&t(this,d).classList.remove(t(this,L).current),t(this,T).current&&t(this,d).classList.remove(t(this,T).current),t(this,M).current&&t(this,d).classList.remove(t(this,M).current),t(this,I).current&&t(this,d).classList.add(t(this,I).current)},Ze=new WeakSet,Vs=function(){t(this,w).current=!0,t(this,B).current=!0,t(this,ut).current=!1,t(this,T).current&&t(this,d).classList.add(t(this,T).current)},je=new WeakSet,Fs=function(){t(this,w).current=!0,t(this,at).current=!0,t(this,N).current=!1,t(this,M).current&&t(this,d).classList.add(t(this,M).current)},Je=new WeakSet,ks=function(){t(this,A).current=!0,t(this,ut).current=!0,t(this,B).current=!1,t(this,P).current&&t(this,d).classList.add(t(this,P).current)},Qe=new WeakSet,Rs=function(){t(this,A).current=!0,t(this,N).current=!0,t(this,at).current=!1,t(this,P).current&&t(this,d).classList.add(t(this,P).current)},Be=new WeakMap,fe=new WeakMap,St=new WeakSet,qt=function(s){if(t(this,C)){s.previous&&t(this,d).classList.remove(s.previous),s.current&&t(this,d).classList.remove(s.current);return}s.current&&t(this,w).current?(s.previous&&t(this,d).classList.remove(s.previous),t(this,d).classList.add(s.current)):!s.current&&s.previous&&t(this,d).classList.remove(s.previous)},Xe=new WeakSet,Ds=function(...s){s.forEach(e=>{e&&t(this,d).classList.remove(e)})},Ye=new WeakSet,Os=function(...s){s.forEach(e=>{e&&t(this,d).style.removeProperty(`--${e}`)})},_e=new WeakSet,cs=function(){o(this,Xe,Ds).call(this,t(this,L).current,t(this,T).current,t(this,M).current,t(this,I).current,t(this,Vt).current,t(this,P).current),o(this,Ye,Os).call(this,t(this,ht).current,t(this,nt).current,t(this,ot).current,t(this,ct).current,t(this,lt).current)},He=new WeakMap;customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",xs);exports.ScrollBulletButtonsElement=Es;exports.ScrollElement=Ue;exports.ScrollSegmentElement=xs;exports.ScrollSetButtonElement=Ps;exports.ScrollStepButtonElement=ws;exports.ScrollbarElement=Cs;
@@ -32,8 +32,8 @@ import { T as $e } from "../Tweened-CjgvoOwL.js";
32
32
  import { WheelControls as Be, KeyboardControls as We, DragControls as qe, AutoplayControls as Ue } from "../controls/index.js";
33
33
  import { windowResizer as ps } from "../window-resizer/index.js";
34
34
  import { scrollEntries as Yt } from "../scroll-entries/index.js";
35
- import { e as ae, D as te, ax as Ws, p as Ge } from "../tags-D0kLlFdQ.js";
36
- import { c as fe } from "../createStylesheet-BrFGJ8Q7.js";
35
+ import { e as ae, D as te, ax as Ws, p as Ge } from "../tags-C75owfOo.js";
36
+ import { c as fe } from "../createStylesheet-CE1yXWS_.js";
37
37
  import { cssUnitParser as me } from "../css-unit-parser/index.js";
38
38
  import { CSSProperty as c } from "../css-property/index.js";
39
39
  import { d as Ne } from "../Viewport-Cgtq2I_K.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-CyQAdqFu.cjs");exports.SelectElement=e.SelectElement;exports.SelectHeadElement=e.SelectHeadElement;exports.SelectOptionElement=e.SelectOptionElement;exports.SelectUserElement=e.SelectUserElement;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-PReYu1AQ.cjs");exports.SelectElement=e.SelectElement;exports.SelectHeadElement=e.SelectHeadElement;exports.SelectOptionElement=e.SelectOptionElement;exports.SelectUserElement=e.SelectUserElement;
@@ -1,4 +1,4 @@
1
- import { S as l, d as a, c, b as m } from "../index-3R8YL-P3.js";
1
+ import { S as l, d as a, c, b as m } from "../index-D-RA8KFB.js";
2
2
  export {
3
3
  l as SelectElement,
4
4
  a as SelectHeadElement,
@@ -1 +1 @@
1
- "use strict";var s=Object.defineProperty,l=Object.defineProperties;var m=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var c=(n,e,r)=>e in n?s(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,o=(n,e)=>{for(var r in e||(e={}))f.call(e,r)&&c(n,r,e[r]);if(u)for(var r of u(e))a.call(e,r)&&c(n,r,e[r]);return n},i=(n,e)=>l(n,m(e));const t=require("./ElementConstructor-OK-6OPjh.cjs");function w(...n){return new t.ElementConstructor(...n)}function C(n){return new t.ElementConstructor("a",n)}function E(n){return new t.ElementConstructor("abbr",n)}function d(n){return new t.ElementConstructor("address",n)}function p(n){return new t.ElementConstructor("area",n)}function b(n){return new t.ElementConstructor("article",n)}function h(n){return new t.ElementConstructor("aside",n)}function g(n){return new t.ElementConstructor("audio",n)}function y(n){return new t.ElementConstructor("b",n)}function k(n){return new t.ElementConstructor("base",n)}function v(n){return new t.ElementConstructor("bdi",n)}function q(n){return new t.ElementConstructor("bdo",n)}function x(n){return new t.ElementConstructor("blockquote",n)}function V(n){return new t.ElementConstructor("body",n)}function D(n){return new t.ElementConstructor("br",n)}function F(n){return new t.ElementConstructor("button",n)}function N(n){return new t.ElementConstructor("canvas",n)}function T(n){return new t.ElementConstructor("caption",n)}function z(n){return new t.ElementConstructor("cite",n)}function A(n){return new t.ElementConstructor("code",n)}function B(n){return new t.ElementConstructor("col",n)}function G(n){return new t.ElementConstructor("colgroup",n)}function H(n){return new t.ElementConstructor("data",n)}function I(n){return new t.ElementConstructor("datalist",n)}function J(n){return new t.ElementConstructor("dd",n)}function K(n){return new t.ElementConstructor("del",n)}function L(n){return new t.ElementConstructor("details",n)}function M(n){return new t.ElementConstructor("dfn",n)}function O(n){return new t.ElementConstructor("dialog",n)}function P(n){return new t.ElementConstructor("div",n)}function Q(n){return new t.ElementConstructor("dl",n)}function R(n){return new t.ElementConstructor("dt",n)}function S(n){return new t.ElementConstructor("em",n)}function U(n){return new t.ElementConstructor("embed",n)}function W(n){return new t.ElementConstructor("fieldset",n)}function X(n){return new t.ElementConstructor("figcaption",n)}function Y(n){return new t.ElementConstructor("figure",n)}function Z(n){return new t.ElementConstructor("footer",n)}function _(n){return new t.ElementConstructor("form",n)}function $(n){return new t.ElementConstructor("h1",n)}function j(n){return new t.ElementConstructor("h2",n)}function nn(n){return new t.ElementConstructor("h3",n)}function tn(n){return new t.ElementConstructor("h4",n)}function en(n){return new t.ElementConstructor("h5",n)}function rn(n){return new t.ElementConstructor("h6",n)}function on(n){return new t.ElementConstructor("head",n)}function un(n){return new t.ElementConstructor("header",n)}function cn(n){return new t.ElementConstructor("hgroup",n)}function sn(n){return new t.ElementConstructor("hr",n)}function ln(n){return new t.ElementConstructor("html",n)}function mn(n){return new t.ElementConstructor("i",n)}function fn(n){return new t.ElementConstructor("iframe",n)}function an(n){return new t.ElementConstructor("img",n)}function wn(n){return new t.ElementConstructor("input",n)}function Cn(n){return new t.ElementConstructor("ins",n)}function En(n){return new t.ElementConstructor("kbd",n)}function dn(n){return new t.ElementConstructor("label",n)}function pn(n){return new t.ElementConstructor("legend",n)}function bn(n){return new t.ElementConstructor("li",n)}function hn(n){return new t.ElementConstructor("link",n)}function gn(n){return new t.ElementConstructor("main",n)}function yn(n){return new t.ElementConstructor("map",n)}function kn(n){return new t.ElementConstructor("mark",n)}function vn(n){return new t.ElementConstructor("menu",n)}function qn(n){return new t.ElementConstructor("meta",n)}function xn(n){return new t.ElementConstructor("meter",n)}function Vn(n){return new t.ElementConstructor("nav",n)}function Dn(n){return new t.ElementConstructor("noscript",n)}function Fn(n){return new t.ElementConstructor("object",n)}function Nn(n){return new t.ElementConstructor("ol",n)}function Tn(n){return new t.ElementConstructor("optgroup",n)}function zn(n){return new t.ElementConstructor("option",n)}function An(n){return new t.ElementConstructor("output",n)}function Bn(n){return new t.ElementConstructor("p",n)}function Gn(n){return new t.ElementConstructor("picture",n)}function Hn(n){return new t.ElementConstructor("pre",n)}function In(n){return new t.ElementConstructor("progress",n)}function Jn(n){return new t.ElementConstructor("q",n)}function Kn(n){return new t.ElementConstructor("rp",n)}function Ln(n){return new t.ElementConstructor("rt",n)}function Mn(n){return new t.ElementConstructor("ruby",n)}function On(n){return new t.ElementConstructor("s",n)}function Pn(n){return new t.ElementConstructor("samp",n)}function Qn(n){return new t.ElementConstructor("script",n)}function Rn(n){return new t.ElementConstructor("search",n)}function Sn(n){return new t.ElementConstructor("section",n)}function Un(n){return new t.ElementConstructor("select",n)}function Wn(n){return new t.ElementConstructor("slot",n)}function Xn(n){return new t.ElementConstructor("small",n)}function Yn(n){return new t.ElementConstructor("source",n)}function Zn(n){return new t.ElementConstructor("span",n)}function _n(n){return new t.ElementConstructor("strong",n)}function $n(n){return new t.ElementConstructor("style",{style:n})}function jn(n){return new t.ElementConstructor("sub",n)}function nt(n){return new t.ElementConstructor("summary",n)}function tt(n){return new t.ElementConstructor("sup",n)}function et(n){return new t.ElementConstructor("table",n)}function rt(n){return new t.ElementConstructor("tbody",n)}function ot(n){return new t.ElementConstructor("td",n)}function ut(n){return new t.ElementConstructor("template",n)}function ct(n){return new t.ElementConstructor("textarea",n)}function it(n){return new t.ElementConstructor("tfoot",n)}function st(n){return new t.ElementConstructor("th",n)}function lt(n){return new t.ElementConstructor("thead",n)}function mt(n){return new t.ElementConstructor("time",n)}function ft(n){return new t.ElementConstructor("title",n)}function at(n){return new t.ElementConstructor("tr",n)}function wt(n){return new t.ElementConstructor("track",n)}function Ct(n){return new t.ElementConstructor("u",n)}function Et(n){return new t.ElementConstructor("ul",n)}function dt(n){return new t.ElementConstructor("var",n)}function pt(n){return new t.ElementConstructor("video",n)}function bt(n){return new t.ElementConstructor("wbr",n)}function ht(n){return new t.ElementConstructor(document.createDocumentFragment(),n)}function gt(n){return new t.ElementConstructor(document.createTextNode(""),n)}function yt(n){return new t.ElementConstructor("div",i(o({},n),{style:o({display:"contents"},n==null?void 0:n.style)}))}exports.a=C;exports.abbr=E;exports.address=d;exports.area=p;exports.article=b;exports.aside=h;exports.audio=g;exports.b=y;exports.base=k;exports.bdi=v;exports.bdo=q;exports.blockquote=x;exports.body=V;exports.br=D;exports.button=F;exports.canvas=N;exports.caption=T;exports.cite=z;exports.code=A;exports.col=B;exports.colgroup=G;exports.contents=yt;exports.data=H;exports.datalist=I;exports.dd=J;exports.del=K;exports.details=L;exports.dfn=M;exports.dialog=O;exports.div=P;exports.dl=Q;exports.dt=R;exports.element=w;exports.em=S;exports.embed=U;exports.empty=gt;exports.fieldset=W;exports.figcaption=X;exports.figure=Y;exports.footer=Z;exports.form=_;exports.fragment=ht;exports.h1=$;exports.h2=j;exports.h3=nn;exports.h4=tn;exports.h5=en;exports.h6=rn;exports.head=on;exports.header=un;exports.hgroup=cn;exports.hr=sn;exports.html=ln;exports.htmlVar=dt;exports.i=mn;exports.iframe=fn;exports.img=an;exports.input=wn;exports.ins=Cn;exports.kbd=En;exports.label=dn;exports.legend=pn;exports.li=bn;exports.link=hn;exports.main=gn;exports.map=yn;exports.mark=kn;exports.menu=vn;exports.meta=qn;exports.meter=xn;exports.nav=Vn;exports.noscript=Dn;exports.object=Fn;exports.ol=Nn;exports.optgroup=Tn;exports.option=zn;exports.output=An;exports.p=Bn;exports.picture=Gn;exports.pre=Hn;exports.progress=In;exports.q=Jn;exports.rp=Kn;exports.rt=Ln;exports.ruby=Mn;exports.s=On;exports.samp=Pn;exports.script=Qn;exports.search=Rn;exports.section=Sn;exports.select=Un;exports.slot=Wn;exports.small=Xn;exports.source=Yn;exports.span=Zn;exports.strong=_n;exports.style=$n;exports.sub=jn;exports.summary=nt;exports.sup=tt;exports.table=et;exports.tbody=rt;exports.td=ot;exports.template=ut;exports.textarea=ct;exports.tfoot=it;exports.th=st;exports.thead=lt;exports.time=mt;exports.title=ft;exports.tr=at;exports.track=wt;exports.u=Ct;exports.ul=Et;exports.video=pt;exports.wbr=bt;
1
+ "use strict";var s=Object.defineProperty,l=Object.defineProperties;var m=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var c=(n,e,r)=>e in n?s(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,o=(n,e)=>{for(var r in e||(e={}))f.call(e,r)&&c(n,r,e[r]);if(u)for(var r of u(e))a.call(e,r)&&c(n,r,e[r]);return n},i=(n,e)=>l(n,m(e));const t=require("./ElementConstructor-khLPmQ9V.cjs");function w(...n){return new t.ElementConstructor(...n)}function C(n){return new t.ElementConstructor("a",n)}function E(n){return new t.ElementConstructor("abbr",n)}function d(n){return new t.ElementConstructor("address",n)}function p(n){return new t.ElementConstructor("area",n)}function b(n){return new t.ElementConstructor("article",n)}function h(n){return new t.ElementConstructor("aside",n)}function g(n){return new t.ElementConstructor("audio",n)}function y(n){return new t.ElementConstructor("b",n)}function k(n){return new t.ElementConstructor("base",n)}function v(n){return new t.ElementConstructor("bdi",n)}function q(n){return new t.ElementConstructor("bdo",n)}function x(n){return new t.ElementConstructor("blockquote",n)}function V(n){return new t.ElementConstructor("body",n)}function D(n){return new t.ElementConstructor("br",n)}function F(n){return new t.ElementConstructor("button",n)}function N(n){return new t.ElementConstructor("canvas",n)}function T(n){return new t.ElementConstructor("caption",n)}function z(n){return new t.ElementConstructor("cite",n)}function A(n){return new t.ElementConstructor("code",n)}function B(n){return new t.ElementConstructor("col",n)}function G(n){return new t.ElementConstructor("colgroup",n)}function H(n){return new t.ElementConstructor("data",n)}function I(n){return new t.ElementConstructor("datalist",n)}function J(n){return new t.ElementConstructor("dd",n)}function K(n){return new t.ElementConstructor("del",n)}function L(n){return new t.ElementConstructor("details",n)}function M(n){return new t.ElementConstructor("dfn",n)}function O(n){return new t.ElementConstructor("dialog",n)}function P(n){return new t.ElementConstructor("div",n)}function Q(n){return new t.ElementConstructor("dl",n)}function R(n){return new t.ElementConstructor("dt",n)}function S(n){return new t.ElementConstructor("em",n)}function U(n){return new t.ElementConstructor("embed",n)}function W(n){return new t.ElementConstructor("fieldset",n)}function X(n){return new t.ElementConstructor("figcaption",n)}function Y(n){return new t.ElementConstructor("figure",n)}function Z(n){return new t.ElementConstructor("footer",n)}function _(n){return new t.ElementConstructor("form",n)}function $(n){return new t.ElementConstructor("h1",n)}function j(n){return new t.ElementConstructor("h2",n)}function nn(n){return new t.ElementConstructor("h3",n)}function tn(n){return new t.ElementConstructor("h4",n)}function en(n){return new t.ElementConstructor("h5",n)}function rn(n){return new t.ElementConstructor("h6",n)}function on(n){return new t.ElementConstructor("head",n)}function un(n){return new t.ElementConstructor("header",n)}function cn(n){return new t.ElementConstructor("hgroup",n)}function sn(n){return new t.ElementConstructor("hr",n)}function ln(n){return new t.ElementConstructor("html",n)}function mn(n){return new t.ElementConstructor("i",n)}function fn(n){return new t.ElementConstructor("iframe",n)}function an(n){return new t.ElementConstructor("img",n)}function wn(n){return new t.ElementConstructor("input",n)}function Cn(n){return new t.ElementConstructor("ins",n)}function En(n){return new t.ElementConstructor("kbd",n)}function dn(n){return new t.ElementConstructor("label",n)}function pn(n){return new t.ElementConstructor("legend",n)}function bn(n){return new t.ElementConstructor("li",n)}function hn(n){return new t.ElementConstructor("link",n)}function gn(n){return new t.ElementConstructor("main",n)}function yn(n){return new t.ElementConstructor("map",n)}function kn(n){return new t.ElementConstructor("mark",n)}function vn(n){return new t.ElementConstructor("menu",n)}function qn(n){return new t.ElementConstructor("meta",n)}function xn(n){return new t.ElementConstructor("meter",n)}function Vn(n){return new t.ElementConstructor("nav",n)}function Dn(n){return new t.ElementConstructor("noscript",n)}function Fn(n){return new t.ElementConstructor("object",n)}function Nn(n){return new t.ElementConstructor("ol",n)}function Tn(n){return new t.ElementConstructor("optgroup",n)}function zn(n){return new t.ElementConstructor("option",n)}function An(n){return new t.ElementConstructor("output",n)}function Bn(n){return new t.ElementConstructor("p",n)}function Gn(n){return new t.ElementConstructor("picture",n)}function Hn(n){return new t.ElementConstructor("pre",n)}function In(n){return new t.ElementConstructor("progress",n)}function Jn(n){return new t.ElementConstructor("q",n)}function Kn(n){return new t.ElementConstructor("rp",n)}function Ln(n){return new t.ElementConstructor("rt",n)}function Mn(n){return new t.ElementConstructor("ruby",n)}function On(n){return new t.ElementConstructor("s",n)}function Pn(n){return new t.ElementConstructor("samp",n)}function Qn(n){return new t.ElementConstructor("script",n)}function Rn(n){return new t.ElementConstructor("search",n)}function Sn(n){return new t.ElementConstructor("section",n)}function Un(n){return new t.ElementConstructor("select",n)}function Wn(n){return new t.ElementConstructor("slot",n)}function Xn(n){return new t.ElementConstructor("small",n)}function Yn(n){return new t.ElementConstructor("source",n)}function Zn(n){return new t.ElementConstructor("span",n)}function _n(n){return new t.ElementConstructor("strong",n)}function $n(n){return new t.ElementConstructor("style",{style:n})}function jn(n){return new t.ElementConstructor("sub",n)}function nt(n){return new t.ElementConstructor("summary",n)}function tt(n){return new t.ElementConstructor("sup",n)}function et(n){return new t.ElementConstructor("table",n)}function rt(n){return new t.ElementConstructor("tbody",n)}function ot(n){return new t.ElementConstructor("td",n)}function ut(n){return new t.ElementConstructor("template",n)}function ct(n){return new t.ElementConstructor("textarea",n)}function it(n){return new t.ElementConstructor("tfoot",n)}function st(n){return new t.ElementConstructor("th",n)}function lt(n){return new t.ElementConstructor("thead",n)}function mt(n){return new t.ElementConstructor("time",n)}function ft(n){return new t.ElementConstructor("title",n)}function at(n){return new t.ElementConstructor("tr",n)}function wt(n){return new t.ElementConstructor("track",n)}function Ct(n){return new t.ElementConstructor("u",n)}function Et(n){return new t.ElementConstructor("ul",n)}function dt(n){return new t.ElementConstructor("var",n)}function pt(n){return new t.ElementConstructor("video",n)}function bt(n){return new t.ElementConstructor("wbr",n)}function ht(n){return new t.ElementConstructor(document.createDocumentFragment(),n)}function gt(n){return new t.ElementConstructor(document.createTextNode(""),n)}function yt(n){return new t.ElementConstructor("div",i(o({},n),{style:o({display:"contents"},n==null?void 0:n.style)}))}exports.a=C;exports.abbr=E;exports.address=d;exports.area=p;exports.article=b;exports.aside=h;exports.audio=g;exports.b=y;exports.base=k;exports.bdi=v;exports.bdo=q;exports.blockquote=x;exports.body=V;exports.br=D;exports.button=F;exports.canvas=N;exports.caption=T;exports.cite=z;exports.code=A;exports.col=B;exports.colgroup=G;exports.contents=yt;exports.data=H;exports.datalist=I;exports.dd=J;exports.del=K;exports.details=L;exports.dfn=M;exports.dialog=O;exports.div=P;exports.dl=Q;exports.dt=R;exports.element=w;exports.em=S;exports.embed=U;exports.empty=gt;exports.fieldset=W;exports.figcaption=X;exports.figure=Y;exports.footer=Z;exports.form=_;exports.fragment=ht;exports.h1=$;exports.h2=j;exports.h3=nn;exports.h4=tn;exports.h5=en;exports.h6=rn;exports.head=on;exports.header=un;exports.hgroup=cn;exports.hr=sn;exports.html=ln;exports.htmlVar=dt;exports.i=mn;exports.iframe=fn;exports.img=an;exports.input=wn;exports.ins=Cn;exports.kbd=En;exports.label=dn;exports.legend=pn;exports.li=bn;exports.link=hn;exports.main=gn;exports.map=yn;exports.mark=kn;exports.menu=vn;exports.meta=qn;exports.meter=xn;exports.nav=Vn;exports.noscript=Dn;exports.object=Fn;exports.ol=Nn;exports.optgroup=Tn;exports.option=zn;exports.output=An;exports.p=Bn;exports.picture=Gn;exports.pre=Hn;exports.progress=In;exports.q=Jn;exports.rp=Kn;exports.rt=Ln;exports.ruby=Mn;exports.s=On;exports.samp=Pn;exports.script=Qn;exports.search=Rn;exports.section=Sn;exports.select=Un;exports.slot=Wn;exports.small=Xn;exports.source=Yn;exports.span=Zn;exports.strong=_n;exports.style=$n;exports.sub=jn;exports.summary=nt;exports.sup=tt;exports.table=et;exports.tbody=rt;exports.td=ot;exports.template=ut;exports.textarea=ct;exports.tfoot=it;exports.th=st;exports.thead=lt;exports.time=mt;exports.title=ft;exports.tr=at;exports.track=wt;exports.u=Ct;exports.ul=Et;exports.video=pt;exports.wbr=bt;
@@ -10,7 +10,7 @@ var o = (n, e, r) => e in n ? s(n, e, { enumerable: !0, configurable: !0, writab
10
10
  d.call(e, r) && o(n, r, e[r]);
11
11
  return n;
12
12
  }, i = (n, e) => c(n, f(e));
13
- import { E as t } from "./ElementConstructor-rValMo8f.js";
13
+ import { E as t } from "./ElementConstructor-Be8H1POO.js";
14
14
  function p(...n) {
15
15
  return new t(...n);
16
16
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-Cr3VaD9G.cjs");const t=require("../browser-CpzFX2xg.cjs");require("../ticker/index.cjs");const o=require("../tags-BosXYPYv.cjs"),a=require("../createTheme-Cfaw9UmV.cjs"),r=a.createTheme({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(t.isBrowser){const e=o.style({":root":r.style}).node;e.setAttribute("data-permanent",""),document.head.appendChild(e)}exports.aptechkaTheme=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-Cr3VaD9G.cjs");const t=require("../browser-CpzFX2xg.cjs");require("../ticker/index.cjs");const o=require("../tags-BdW7ATzD.cjs"),a=require("../createTheme-Cfaw9UmV.cjs"),r=a.createTheme({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(t.isBrowser){const e=o.style({":root":r.style}).node;e.setAttribute("data-permanent",""),document.head.appendChild(e)}exports.aptechkaTheme=r;
@@ -1,7 +1,7 @@
1
1
  import "../Store-Qr3SNOSf.js";
2
2
  import { i as e } from "../browser-0zX67oeU.js";
3
3
  import "../ticker/index.js";
4
- import { aC as r } from "../tags-D0kLlFdQ.js";
4
+ import { aC as r } from "../tags-C75owfOo.js";
5
5
  import { c as t } from "../createTheme-CHnsCgAr.js";
6
6
  const a = t(
7
7
  {
@@ -1,4 +1,4 @@
1
- "use strict";var me=(h,i,e)=>{if(!i.has(h))throw TypeError("Cannot "+e)};var t=(h,i,e)=>(me(h,i,"read from private field"),e?e.call(h):i.get(h)),a=(h,i,e)=>{if(i.has(h))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(h):i.set(h,e)},o=(h,i,e,s)=>(me(h,i,"write to private field"),s?s.call(h,e):i.set(h,e),e);var m=(h,i,e)=>(me(h,i,"access private method"),e);const He=require("../browser-CpzFX2xg.cjs"),p=require("../Store-Cr3VaD9G.cjs"),Ke=require("../file-EevnUtRj.cjs"),Oe=require("../function-MthRj-GJ.cjs"),xe=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const n=require("../tags-BosXYPYv.cjs"),E=require("../createStylesheet-9nksoWW0.cjs"),Ze=require("../Viewport-BBYt1Ivy.cjs"),c=require("../theme/index.cjs"),je=require("../index-CyQAdqFu.cjs"),Je=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const We=require("../math-GDWEqu7y.cjs"),fe=require("../polyfills-CM4SCDTt.cjs"),Se=require("../element-resizer/index.cjs"),Ee='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Ce='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',_e='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',Be='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var L,w,S;class Xe{constructor(){a(this,L,void 0);a(this,w,void 0);a(this,S,void 0);this.scrollValue=0,o(this,L,""),o(this,w,[]),o(this,S,{}),o(this,L,p.storeRegistry.projectName+"-studio")}openPanel(i){t(this,w).includes(i)||t(this,w).push(i)}closePanel(i){o(this,w,t(this,w).filter(e=>e!==i))}isPanelOpened(i){return t(this,w).includes(i)}changedSizes(i){return t(this,S)[i]}changeSize(i,e){e?t(this,S)[i]=e:delete t(this,S)[i]}save(){const i={openedPanels:t(this,w),changedSizes:t(this,S),scrollValue:this.scrollValue};localStorage.setItem(t(this,L),JSON.stringify(i)),p.storeRegistry.saveState()}load(){p.storeRegistry.loadState();const i=localStorage.getItem(t(this,L));if(i)try{const e=JSON.parse(i);e.openedPanels&&o(this,w,e.openedPanels),e.changedSizes&&o(this,S,e.changedSizes),e.scrollValue&&(this.scrollValue=e.scrollValue)}catch(e){console.error(e)}}}L=new WeakMap,w=new WeakMap,S=new WeakMap;const f=new Xe;var T;class O extends HTMLElement{constructor(...e){super();a(this,T,void 0);o(this,T,e)}addStore(e){t(this,T).push(e)}get firstStore(){return t(this,T)[0]}get stores(){return t(this,T)}updateStores(e){t(this,T).forEach(s=>{s.current=e})}}T=new WeakMap;const Ye=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:c.aptechkaTheme.borderRadiusSmall.var}});class ze extends O{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ye),n.element(this,{children:[n.element("e-checkbox",{onChange:s=>{this.updateStores(s.currentTarget.checked)},ref:s=>{this.firstStore.subscribe(r=>{s.checked=r.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",ze);const Ge=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Te extends O{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ge),n.element(this,{children:[n.input({type:"color",value:this.firstStore,onInput:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Te);const Qe=E.createStylesheet({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Re extends O{constructor(...i){var s,r;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Qe),console.log(this.firstStore),n.element(this,{children:[n.a({href:this.firstStore,target:(r=(s=this.firstStore.passport)==null?void 0:s.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",Re);const Ue=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var P,q,N,x,R,j,J,y,I,W,_,F,V,B,we,X,be,$,le,Y;class Fe extends O{constructor(...e){var r,l,d,u,k,M,Z,ke;super(...e);a(this,F);a(this,B);a(this,X);a(this,$);a(this,P,[]);a(this,q,[]);a(this,N,void 0);a(this,x,void 0);a(this,R,void 0);a(this,j,void 0);a(this,J,void 0);a(this,y,void 0);a(this,I,!1);a(this,W,e=>{const s=m(this,F,V).call(this,e);return s.map((r,l)=>{const d=typeof r=="string"?parseFloat(r)||t(this,x):r,u=We.clamp(d,t(this,x),t(this,R)),k=fe.toStep(u,t(this,N));s[l]=k}),t(this,J)==="number"?s[0]:s});a(this,_,()=>{m(this,F,V).call(this).map((e,s)=>{const r=t(this,P)[s];r&&(r.value=(e||0).toString())}),m(this,B,we).call(this)});a(this,Y,()=>{m(this,B,we).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ue),o(this,x,fe.nullishCoalescing((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.min,-1/0)),o(this,R,fe.nullishCoalescing((u=(d=this.firstStore.passport)==null?void 0:d.manager)==null?void 0:u.max,1/0)),o(this,N,((M=(k=this.firstStore.passport)==null?void 0:k.manager)==null?void 0:M.step)||.01),o(this,j,((ke=(Z=this.firstStore.passport)==null?void 0:Z.manager)==null?void 0:ke.ease)||1),o(this,J,Array.isArray(this.firstStore.current)?"array":"number"),o(this,y,isFinite(t(this,R))&&isFinite(t(this,x))),n.element(this,{class:t(this,y)?"":"infinite",children:m(this,F,V).call(this).map((Ie,oe)=>n.div({class:"inputs-wrapper",children:[n.input({type:"number",step:t(this,N),min:t(this,x),max:t(this,R),ref:C=>t(this,P).push(C),value:Ie,onChange:()=>{this.updateStores(t(this,P).map(C=>parseFloat(C.value)))}}),n.div({class:"drag",children:[n.div({class:"drag-knob",ref:C=>t(this,q).push(C),onPointerdown:C=>{C.preventDefault(),o(this,I,!0);const ue=m(this,F,V).call(this),Ve=ue[oe],z=t(this,q)[oe],qe=t(this,P)[oe];if(z&&qe){const pe=z.parentElement,Ne=m(this,X,be).call(this);pe.classList.add("grabbing"),xe.setupDrag(ge=>{const ye=ge.x-C.x,$e=t(this,y)?pe.offsetWidth/(Ne||1):1,Ae=Ve+ye/$e*t(this,j);if(ue[oe]=Ae,!t(this,y)){const De=m(this,$,le).call(this,z,0);z.style.transform=`translateX(${De+ye}px)`}this.updateStores([...ue])},()=>{if(o(this,I,!1),!t(this,y)){const ge=m(this,$,le).call(this,z,0);z.style.transition="transform 0.1s",z.style.transform=`translateX(${ge}px)`,pe.classList.remove("grabbing"),setTimeout(()=>{z.style.transition=""},100)}})}},children:n.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(t(this,W)),this.firstStore.subscribe(t(this,_)),Se.elementResizer.subscribe(this,t(this,Y))}disconnectedCallback(){this.firstStore.removeMiddleware(t(this,W)),this.firstStore.unsubscribe(t(this,_)),Se.elementResizer.unsubscribe(t(this,Y))}}P=new WeakMap,q=new WeakMap,N=new WeakMap,x=new WeakMap,R=new WeakMap,j=new WeakMap,J=new WeakMap,y=new WeakMap,I=new WeakMap,W=new WeakMap,_=new WeakMap,F=new WeakSet,V=function(e=this.firstStore.current){return Array.isArray(e)?e:[e]},B=new WeakSet,we=function(){m(this,F,V).call(this).map((e,s)=>{const r=t(this,q)[s];if(r&&(!t(this,I)||t(this,I)&&t(this,y))){const l=m(this,$,le).call(this,r,e);r.style.transform=`translateX(${l}px)`}})},X=new WeakSet,be=function(){return t(this,y)?t(this,R)-t(this,x):0},$=new WeakSet,le=function(e,s){const r=e.parentElement,l=m(this,X,be).call(this),d=l?s/l:.5;return(r.offsetWidth-e.offsetWidth)*d},Y=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Fe);const et=E.createStylesheet({"e-select":{display:"block",width:"100%","--arrow-color":c.aptechkaTheme.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Me extends O{constructor(...i){var r,l;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(et);const s=((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.variants)||[];n.element(this,{children:n.element("e-select",{value:this.firstStore,onChange:d=>{this.updateStores(d.currentTarget.value)},lightChildren:[n.element("e-select-head",{lightChildren:[n.span({"data-value-holder":""})]}),...s.map((d,u)=>n.element("e-select-option",{lightChildren:d,default:u===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Me);const tt=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var}});class Le extends O{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(tt),n.element(this,{children:[n.input({class:"text-input",type:"string",value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",Le);const st={boolean:ze,color:Te,link:Re,number:Fe,select:Me,string:Le},rt=E.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var b,A,D,H,K,G,Q;class ve extends HTMLElement{constructor(e){var l,d,u,k;super();a(this,b,[]);a(this,A,void 0);a(this,D,void 0);a(this,H,!1);a(this,K,void 0);a(this,G,()=>{p.activeStores.current.find(e=>t(this,b).includes(e))||this.remove()});a(this,Q,e=>{t(this,H)&&((e.metaKey||e.ctrlKey)&&e.code==="KeyC"?navigator.clipboard.writeText(t(this,b)[0].current):(e.metaKey||e.ctrlKey)&&e.code==="KeyR"&&(t(this,b).forEach(s=>{s.reset()}),e.preventDefault()))});o(this,b,[e.store]),o(this,A,e.store.passport.name),o(this,D,t(this,A).split(".").slice(-1).toString());const s=((d=(l=e.store.passport)==null?void 0:l.manager)==null?void 0:d.type)||"string";o(this,K,new st[s](t(this,b)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(rt),n.element(this,{class:{disabled:((k=(u=e.store.passport)==null?void 0:u.manager)==null?void 0:k.disabled)||!1},onPointerleave:()=>{o(this,H,!1)},onPointerenter:()=>{o(this,H,!0)},children:[n.div({class:"head",children:[n.div({class:"name",children:t(this,D)+":"}),n.div({class:"head-buttons",children:[n.button({class:"head-button",children:Ce,onClick:()=>{navigator.clipboard.writeText(t(this,b)[0].current)}}),n.button({class:"head-button",children:Ee,onClick:()=>{t(this,b).forEach(M=>{M.reset()})}})]})]}),t(this,K)]})}get key(){return t(this,A)}get name(){return t(this,D)}get stores(){return t(this,b)}addStore(e){t(this,K).addStore(e)}connectedCallback(){p.activeStores.subscribe(t(this,G)),addEventListener("keydown",t(this,Q)),Je.dispatchSizeChangeEvent(this)}disconnectedCallback(){p.activeStores.unsubscribe(t(this,G)),removeEventListener("keydown",t(this,Q))}}b=new WeakMap,A=new WeakMap,D=new WeakMap,H=new WeakMap,K=new WeakMap,G=new WeakMap,Q=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",ve);const it=E.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var v,U,g,ee,te,se,re,ce;const de=class de extends HTMLElement{constructor(e){super();a(this,v,void 0);a(this,U,new p.Store(null));a(this,g,new p.Store([]));a(this,ee,void 0);a(this,te,null);a(this,se,null);a(this,re,null);a(this,ce,e=>{let s=[],r=[];e.forEach(l=>{s=[...s,...l.removedNodes],r=[...r,...l.addedNodes]}),t(this,g).current=t(this,g).current.filter(l=>!s.includes(l)),t(this,v)&&!t(this,g).current.length&&!r.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(it),o(this,v,e.key),o(this,ee,new MutationObserver(t(this,ce))),n.element(this,{children:[n.div({class:"wrapper",children:[n.div({class:"head",onClick:r=>{this.classList.toggle("opened"),this.classList.contains("opened")?f.openPanel(t(this,v)):f.closePanel(t(this,v))},children:[t(this,v)?n.div({class:"name",children:[t(this,v).split(".").slice(-1).toString()]}):null,t(this,U),n.element(je.arrowIcon,{class:"arrow"})]}),n.div({class:"body",ref:r=>{o(this,te,r)},children:n.div({class:"body-content",children:t(this,g),ref:r=>{o(this,se,r),o(this,re,r.firstElementChild)}})})]})]}),e!=null&&e.storeBox&&this.handleStore(e.storeBox)}get key(){return t(this,v)}get head(){return t(this,U)}get content(){return t(this,g)}get bodyElement(){return t(this,te)}get contentElement(){return t(this,se)}connectedCallback(){f.isPanelOpened(t(this,v))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),t(this,ee).observe(t(this,re),{childList:!0})}handleStore(e){if(e.remainingFolders.length){const r=e.store.passport.name.split("."),l=r.slice(0,r.length-e.remainingFolders.length).join("."),d=t(this,g).current.find(u=>u.key===l);d instanceof de?d.handleStore({store:e.store,remainingFolders:e.remainingFolders.slice(1)}):t(this,g).current=[...t(this,g).current,new de({key:l,storeBox:{store:e.store,remainingFolders:e.remainingFolders.slice(1)}})]}else{const s=t(this,g).current.find(r=>r.key===e.store.passport.name);s instanceof ve?s.addStore(e.store):t(this,g).current=[...t(this,g).current,new ve({store:e.store})]}}};v=new WeakMap,U=new WeakMap,g=new WeakMap,ee=new WeakMap,te=new WeakMap,se=new WeakMap,re=new WeakMap,ce=new WeakMap;let he=de;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",he);const nt=E.createStylesheet({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
1
+ "use strict";var me=(h,i,e)=>{if(!i.has(h))throw TypeError("Cannot "+e)};var t=(h,i,e)=>(me(h,i,"read from private field"),e?e.call(h):i.get(h)),a=(h,i,e)=>{if(i.has(h))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(h):i.set(h,e)},o=(h,i,e,s)=>(me(h,i,"write to private field"),s?s.call(h,e):i.set(h,e),e);var m=(h,i,e)=>(me(h,i,"access private method"),e);const He=require("../browser-CpzFX2xg.cjs"),p=require("../Store-Cr3VaD9G.cjs"),Ke=require("../file-EevnUtRj.cjs"),Oe=require("../function-MthRj-GJ.cjs"),xe=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const n=require("../tags-BdW7ATzD.cjs"),E=require("../createStylesheet-BBBiyAsF.cjs"),Ze=require("../Viewport-BBYt1Ivy.cjs"),c=require("../theme/index.cjs"),je=require("../index-PReYu1AQ.cjs"),Je=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const We=require("../math-GDWEqu7y.cjs"),fe=require("../polyfills-CM4SCDTt.cjs"),Se=require("../element-resizer/index.cjs"),Ee='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Ce='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',_e='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',Be='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var L,w,S;class Xe{constructor(){a(this,L,void 0);a(this,w,void 0);a(this,S,void 0);this.scrollValue=0,o(this,L,""),o(this,w,[]),o(this,S,{}),o(this,L,p.storeRegistry.projectName+"-studio")}openPanel(i){t(this,w).includes(i)||t(this,w).push(i)}closePanel(i){o(this,w,t(this,w).filter(e=>e!==i))}isPanelOpened(i){return t(this,w).includes(i)}changedSizes(i){return t(this,S)[i]}changeSize(i,e){e?t(this,S)[i]=e:delete t(this,S)[i]}save(){const i={openedPanels:t(this,w),changedSizes:t(this,S),scrollValue:this.scrollValue};localStorage.setItem(t(this,L),JSON.stringify(i)),p.storeRegistry.saveState()}load(){p.storeRegistry.loadState();const i=localStorage.getItem(t(this,L));if(i)try{const e=JSON.parse(i);e.openedPanels&&o(this,w,e.openedPanels),e.changedSizes&&o(this,S,e.changedSizes),e.scrollValue&&(this.scrollValue=e.scrollValue)}catch(e){console.error(e)}}}L=new WeakMap,w=new WeakMap,S=new WeakMap;const f=new Xe;var T;class O extends HTMLElement{constructor(...e){super();a(this,T,void 0);o(this,T,e)}addStore(e){t(this,T).push(e)}get firstStore(){return t(this,T)[0]}get stores(){return t(this,T)}updateStores(e){t(this,T).forEach(s=>{s.current=e})}}T=new WeakMap;const Ye=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:c.aptechkaTheme.borderRadiusSmall.var}});class ze extends O{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ye),n.element(this,{children:[n.element("e-checkbox",{onChange:s=>{this.updateStores(s.currentTarget.checked)},ref:s=>{this.firstStore.subscribe(r=>{s.checked=r.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",ze);const Ge=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Te extends O{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ge),n.element(this,{children:[n.input({type:"color",value:this.firstStore,onInput:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Te);const Qe=E.createStylesheet({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Re extends O{constructor(...i){var s,r;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Qe),console.log(this.firstStore),n.element(this,{children:[n.a({href:this.firstStore,target:(r=(s=this.firstStore.passport)==null?void 0:s.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",Re);const Ue=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var P,q,N,x,R,j,J,y,I,W,_,F,V,B,we,X,be,$,le,Y;class Fe extends O{constructor(...e){var r,l,d,u,k,M,Z,ke;super(...e);a(this,F);a(this,B);a(this,X);a(this,$);a(this,P,[]);a(this,q,[]);a(this,N,void 0);a(this,x,void 0);a(this,R,void 0);a(this,j,void 0);a(this,J,void 0);a(this,y,void 0);a(this,I,!1);a(this,W,e=>{const s=m(this,F,V).call(this,e);return s.map((r,l)=>{const d=typeof r=="string"?parseFloat(r)||t(this,x):r,u=We.clamp(d,t(this,x),t(this,R)),k=fe.toStep(u,t(this,N));s[l]=k}),t(this,J)==="number"?s[0]:s});a(this,_,()=>{m(this,F,V).call(this).map((e,s)=>{const r=t(this,P)[s];r&&(r.value=(e||0).toString())}),m(this,B,we).call(this)});a(this,Y,()=>{m(this,B,we).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ue),o(this,x,fe.nullishCoalescing((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.min,-1/0)),o(this,R,fe.nullishCoalescing((u=(d=this.firstStore.passport)==null?void 0:d.manager)==null?void 0:u.max,1/0)),o(this,N,((M=(k=this.firstStore.passport)==null?void 0:k.manager)==null?void 0:M.step)||.01),o(this,j,((ke=(Z=this.firstStore.passport)==null?void 0:Z.manager)==null?void 0:ke.ease)||1),o(this,J,Array.isArray(this.firstStore.current)?"array":"number"),o(this,y,isFinite(t(this,R))&&isFinite(t(this,x))),n.element(this,{class:t(this,y)?"":"infinite",children:m(this,F,V).call(this).map((Ie,oe)=>n.div({class:"inputs-wrapper",children:[n.input({type:"number",step:t(this,N),min:t(this,x),max:t(this,R),ref:C=>t(this,P).push(C),value:Ie,onChange:()=>{this.updateStores(t(this,P).map(C=>parseFloat(C.value)))}}),n.div({class:"drag",children:[n.div({class:"drag-knob",ref:C=>t(this,q).push(C),onPointerdown:C=>{C.preventDefault(),o(this,I,!0);const ue=m(this,F,V).call(this),Ve=ue[oe],z=t(this,q)[oe],qe=t(this,P)[oe];if(z&&qe){const pe=z.parentElement,Ne=m(this,X,be).call(this);pe.classList.add("grabbing"),xe.setupDrag(ge=>{const ye=ge.x-C.x,$e=t(this,y)?pe.offsetWidth/(Ne||1):1,Ae=Ve+ye/$e*t(this,j);if(ue[oe]=Ae,!t(this,y)){const De=m(this,$,le).call(this,z,0);z.style.transform=`translateX(${De+ye}px)`}this.updateStores([...ue])},()=>{if(o(this,I,!1),!t(this,y)){const ge=m(this,$,le).call(this,z,0);z.style.transition="transform 0.1s",z.style.transform=`translateX(${ge}px)`,pe.classList.remove("grabbing"),setTimeout(()=>{z.style.transition=""},100)}})}},children:n.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(t(this,W)),this.firstStore.subscribe(t(this,_)),Se.elementResizer.subscribe(this,t(this,Y))}disconnectedCallback(){this.firstStore.removeMiddleware(t(this,W)),this.firstStore.unsubscribe(t(this,_)),Se.elementResizer.unsubscribe(t(this,Y))}}P=new WeakMap,q=new WeakMap,N=new WeakMap,x=new WeakMap,R=new WeakMap,j=new WeakMap,J=new WeakMap,y=new WeakMap,I=new WeakMap,W=new WeakMap,_=new WeakMap,F=new WeakSet,V=function(e=this.firstStore.current){return Array.isArray(e)?e:[e]},B=new WeakSet,we=function(){m(this,F,V).call(this).map((e,s)=>{const r=t(this,q)[s];if(r&&(!t(this,I)||t(this,I)&&t(this,y))){const l=m(this,$,le).call(this,r,e);r.style.transform=`translateX(${l}px)`}})},X=new WeakSet,be=function(){return t(this,y)?t(this,R)-t(this,x):0},$=new WeakSet,le=function(e,s){const r=e.parentElement,l=m(this,X,be).call(this),d=l?s/l:.5;return(r.offsetWidth-e.offsetWidth)*d},Y=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Fe);const et=E.createStylesheet({"e-select":{display:"block",width:"100%","--arrow-color":c.aptechkaTheme.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Me extends O{constructor(...i){var r,l;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(et);const s=((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.variants)||[];n.element(this,{children:n.element("e-select",{value:this.firstStore,onChange:d=>{this.updateStores(d.currentTarget.value)},lightChildren:[n.element("e-select-head",{lightChildren:[n.span({"data-value-holder":""})]}),...s.map((d,u)=>n.element("e-select-option",{lightChildren:d,default:u===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Me);const tt=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var}});class Le extends O{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(tt),n.element(this,{children:[n.input({class:"text-input",type:"string",value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",Le);const st={boolean:ze,color:Te,link:Re,number:Fe,select:Me,string:Le},rt=E.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var b,A,D,H,K,G,Q;class ve extends HTMLElement{constructor(e){var l,d,u,k;super();a(this,b,[]);a(this,A,void 0);a(this,D,void 0);a(this,H,!1);a(this,K,void 0);a(this,G,()=>{p.activeStores.current.find(e=>t(this,b).includes(e))||this.remove()});a(this,Q,e=>{t(this,H)&&((e.metaKey||e.ctrlKey)&&e.code==="KeyC"?navigator.clipboard.writeText(t(this,b)[0].current):(e.metaKey||e.ctrlKey)&&e.code==="KeyR"&&(t(this,b).forEach(s=>{s.reset()}),e.preventDefault()))});o(this,b,[e.store]),o(this,A,e.store.passport.name),o(this,D,t(this,A).split(".").slice(-1).toString());const s=((d=(l=e.store.passport)==null?void 0:l.manager)==null?void 0:d.type)||"string";o(this,K,new st[s](t(this,b)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(rt),n.element(this,{class:{disabled:((k=(u=e.store.passport)==null?void 0:u.manager)==null?void 0:k.disabled)||!1},onPointerleave:()=>{o(this,H,!1)},onPointerenter:()=>{o(this,H,!0)},children:[n.div({class:"head",children:[n.div({class:"name",children:t(this,D)+":"}),n.div({class:"head-buttons",children:[n.button({class:"head-button",children:Ce,onClick:()=>{navigator.clipboard.writeText(t(this,b)[0].current)}}),n.button({class:"head-button",children:Ee,onClick:()=>{t(this,b).forEach(M=>{M.reset()})}})]})]}),t(this,K)]})}get key(){return t(this,A)}get name(){return t(this,D)}get stores(){return t(this,b)}addStore(e){t(this,K).addStore(e)}connectedCallback(){p.activeStores.subscribe(t(this,G)),addEventListener("keydown",t(this,Q)),Je.dispatchSizeChangeEvent(this)}disconnectedCallback(){p.activeStores.unsubscribe(t(this,G)),removeEventListener("keydown",t(this,Q))}}b=new WeakMap,A=new WeakMap,D=new WeakMap,H=new WeakMap,K=new WeakMap,G=new WeakMap,Q=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",ve);const it=E.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var v,U,g,ee,te,se,re,ce;const de=class de extends HTMLElement{constructor(e){super();a(this,v,void 0);a(this,U,new p.Store(null));a(this,g,new p.Store([]));a(this,ee,void 0);a(this,te,null);a(this,se,null);a(this,re,null);a(this,ce,e=>{let s=[],r=[];e.forEach(l=>{s=[...s,...l.removedNodes],r=[...r,...l.addedNodes]}),t(this,g).current=t(this,g).current.filter(l=>!s.includes(l)),t(this,v)&&!t(this,g).current.length&&!r.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(it),o(this,v,e.key),o(this,ee,new MutationObserver(t(this,ce))),n.element(this,{children:[n.div({class:"wrapper",children:[n.div({class:"head",onClick:r=>{this.classList.toggle("opened"),this.classList.contains("opened")?f.openPanel(t(this,v)):f.closePanel(t(this,v))},children:[t(this,v)?n.div({class:"name",children:[t(this,v).split(".").slice(-1).toString()]}):null,t(this,U),n.element(je.arrowIcon,{class:"arrow"})]}),n.div({class:"body",ref:r=>{o(this,te,r)},children:n.div({class:"body-content",children:t(this,g),ref:r=>{o(this,se,r),o(this,re,r.firstElementChild)}})})]})]}),e!=null&&e.storeBox&&this.handleStore(e.storeBox)}get key(){return t(this,v)}get head(){return t(this,U)}get content(){return t(this,g)}get bodyElement(){return t(this,te)}get contentElement(){return t(this,se)}connectedCallback(){f.isPanelOpened(t(this,v))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),t(this,ee).observe(t(this,re),{childList:!0})}handleStore(e){if(e.remainingFolders.length){const r=e.store.passport.name.split("."),l=r.slice(0,r.length-e.remainingFolders.length).join("."),d=t(this,g).current.find(u=>u.key===l);d instanceof de?d.handleStore({store:e.store,remainingFolders:e.remainingFolders.slice(1)}):t(this,g).current=[...t(this,g).current,new de({key:l,storeBox:{store:e.store,remainingFolders:e.remainingFolders.slice(1)}})]}else{const s=t(this,g).current.find(r=>r.key===e.store.passport.name);s instanceof ve?s.addStore(e.store):t(this,g).current=[...t(this,g).current,new ve({store:e.store})]}}};v=new WeakMap,U=new WeakMap,g=new WeakMap,ee=new WeakMap,te=new WeakMap,se=new WeakMap,re=new WeakMap,ce=new WeakMap;let he=de;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",he);const nt=E.createStylesheet({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
2
2
  100dvh -
3
3
  (
4
4
  var(--tweaker-offset) * 2 +
@@ -14,11 +14,11 @@ import { c as Be } from "../file-lxi_oXJf.js";
14
14
  import { d as Xe } from "../function-C10DGppn.js";
15
15
  import { s as Te } from "../gestures-D2Fdra_G.js";
16
16
  import "../ticker/index.js";
17
- import { e as g, $ as me, a as Ye, D as u, aA as qe, p as B, a2 as Ge } from "../tags-D0kLlFdQ.js";
18
- import { c as E } from "../createStylesheet-BrFGJ8Q7.js";
17
+ import { e as g, $ as me, a as Ye, D as u, aA as qe, p as B, a2 as Ge } from "../tags-C75owfOo.js";
18
+ import { c as E } from "../createStylesheet-CE1yXWS_.js";
19
19
  import { a as Qe } from "../Viewport-Cgtq2I_K.js";
20
20
  import { aptechkaTheme as h } from "../theme/index.js";
21
- import { a as Ue } from "../index-3R8YL-P3.js";
21
+ import { a as Ue } from "../index-D-RA8KFB.js";
22
22
  import { a as _e } from "../events-CJTUMSLU.js";
23
23
  import "../checkbox/index.js";
24
24
  import { c as et } from "../math-BOBiC4TN.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -528,6 +528,7 @@
528
528
  "detect-gpu": "^5.0.38",
529
529
  "favicons": "^7.2.0",
530
530
  "fluent-ffmpeg": "^2.1.3",
531
+ "node-html-parser": "^6.1.13",
531
532
  "sharp": "^0.33.4",
532
533
  "three": "^0.166.1",
533
534
  "urlpattern-polyfill": "^10.0.0"
@@ -1,7 +1,7 @@
1
1
  import { mkdir, readFile, readdir } from "fs/promises";
2
2
  import { dirname, join, sep, extname } from "path";
3
3
  import Ffmpeg from "fluent-ffmpeg";
4
- import { getTmpPath, outputFile, getFolderFiles, removeExtension, clear, replaceExtension, outputFiles } from "../utils/index.js";
4
+ import { getTmpPath, outputFile, getFolderFiles, removeExtension, clear, getBuffer, replaceExtension, outputFiles } from "../utils/index.js";
5
5
  import favicons from "favicons";
6
6
  import { parse } from "node-html-parser";
7
7
  import { statSync } from "fs";
@@ -55,7 +55,8 @@ async function FFmpeg({
55
55
  async function generateFavicon(source) {
56
56
  const output = [];
57
57
  const { settings } = source;
58
- const response = await favicons(source.content, settings);
58
+ const buffer = await getBuffer(source.content);
59
+ const response = await favicons(buffer, settings);
59
60
  output.push(
60
61
  ...[...response.images, ...response.files].map((item) => {
61
62
  return {
@@ -72,10 +73,11 @@ async function generateFavicon(source) {
72
73
  }
73
74
  async function generateSequence(source) {
74
75
  const { settings } = source;
76
+ const buffer = await getBuffer(source.content);
75
77
  return FFmpeg({
76
78
  inputPath: settings.destinationPath,
77
79
  outputPath: `${removeExtension(settings.destinationPath)}/frame-%04d.${settings.frameExtension || "jpg"}`,
78
- fileContent: source.content,
80
+ fileContent: buffer,
79
81
  instructions: (command) => {
80
82
  if (settings.fps) {
81
83
  command.addOutputOption([`-r ${Math.max(1, settings.fps | 0)}`]);
@@ -91,7 +93,8 @@ async function generateSprite(source) {
91
93
  const svgCloseTag = "</svg>";
92
94
  let spriteString = svgOpenTag;
93
95
  for await (const item of source.content) {
94
- const svgString = item.buffer.toString();
96
+ const buffer = await getBuffer(item.data);
97
+ const svgString = buffer.toString();
95
98
  const root = parse(svgString);
96
99
  const icon = root.querySelector("svg");
97
100
  icon.removeAttribute("width");
@@ -163,7 +166,7 @@ async function inputFiles({
163
166
  if (file.ext === ".svg") {
164
167
  content.push({
165
168
  name: file.name,
166
- buffer: file.buffer
169
+ data: file.buffer
167
170
  });
168
171
  }
169
172
  });
@@ -262,8 +265,9 @@ async function inputFiles({
262
265
  }
263
266
  async function optimizeImage(source) {
264
267
  const { settings } = source;
268
+ const content = await getBuffer(source.content);
265
269
  const ext = extname(settings.destinationPath).toLowerCase();
266
- const image = sharp(source.content);
270
+ const image = sharp(content);
267
271
  const meta = await image.metadata();
268
272
  const width = meta.width;
269
273
  const height = meta.height;
@@ -318,9 +322,10 @@ async function optimizeImage(source) {
318
322
  }
319
323
  async function optimizeVideo(source) {
320
324
  const { settings } = source;
325
+ const buffer = await getBuffer(source.content);
321
326
  return FFmpeg({
322
327
  inputPath: settings.destinationPath,
323
- fileContent: source.content,
328
+ fileContent: buffer,
324
329
  instructions: (command) => {
325
330
  command.addOutputOption(
326
331
  `-crf ${Math.round((100 - ((settings == null ? void 0 : settings.quality) || 80)) * 51 / 100)}`
@@ -349,7 +354,7 @@ async function optimize(sources, options) {
349
354
  output.push(...await generateSequence(source));
350
355
  } else {
351
356
  output.push({
352
- data: source.content,
357
+ data: await getBuffer(source.content),
353
358
  destinationPath: source.settings.destinationPath
354
359
  });
355
360
  }
@@ -3,41 +3,41 @@ import { FaviconOptions } from 'favicons';
3
3
  export type SourceSettings = {
4
4
  [key: string]: any;
5
5
  };
6
- export interface Source<B = Buffer, T extends string = string, S extends SourceSettings = {}> {
6
+ export interface Source<B = Buffer | File, T extends string = string, S extends SourceSettings = {}> {
7
7
  content: B;
8
8
  type: T;
9
9
  settings: S;
10
10
  }
11
- export type SkipSource = Source<Buffer, 'skip', {
11
+ export type SkipSource = Source<Buffer | File, 'skip', {
12
12
  destinationPath: string;
13
13
  }>;
14
- export type ImageSource = Source<Buffer, 'image', {
14
+ export type ImageSource = Source<Buffer | File, 'image', {
15
15
  destinationPath: string;
16
16
  quality?: number;
17
17
  scale?: number;
18
18
  placeholder?: boolean;
19
19
  webp?: boolean;
20
20
  }>;
21
- export type VideoSource = Source<Buffer, 'video', {
21
+ export type VideoSource = Source<Buffer | File, 'video', {
22
22
  destinationPath: string;
23
23
  quality?: number;
24
24
  scale?: number;
25
25
  fps?: number;
26
26
  }>;
27
- export type FaviconSource = Source<Buffer, 'favicon', {
27
+ export type FaviconSource = Source<Buffer | File, 'favicon', {
28
28
  destinationPath: string;
29
29
  destinationHtmlPath: string;
30
30
  } & FaviconOptions>;
31
31
  export type SpriteSource = Source<Array<{
32
32
  name: string;
33
- buffer: Buffer;
33
+ data: Buffer | File;
34
34
  }>, 'sprite', {
35
35
  destinationPath: string;
36
36
  name?: string;
37
37
  removeStroke?: boolean;
38
38
  removeFill?: boolean;
39
39
  }>;
40
- export type SequenceSource = Source<Buffer, 'sequence', {
40
+ export type SequenceSource = Source<Buffer | File, 'sequence', {
41
41
  destinationPath: string;
42
42
  fps?: number;
43
43
  frameExtension?: 'png' | 'jpg';
@@ -0,0 +1 @@
1
+ export declare function getBuffer(data: Buffer | File): Promise<Buffer>;
@@ -1,3 +1,4 @@
1
+ export { getBuffer } from './buffer';
1
2
  export { removeExtension, replaceExtension, getTmpPath } from './path';
2
3
  export { outputFile, outputFiles, clear, getFolderFiles } from './fs';
3
4
  export type { WriteFileData, OutputItem, Output } from './types';
@@ -1,6 +1,12 @@
1
1
  import { randomUUID } from "crypto";
2
2
  import { extname, dirname, join } from "path";
3
3
  import { mkdir, writeFile, rm, readdir, readFile } from "fs/promises";
4
+ async function getBuffer(data) {
5
+ if (data instanceof Buffer) {
6
+ return data;
7
+ }
8
+ return Buffer.from(await data.arrayBuffer());
9
+ }
4
10
  function removeExtension(path) {
5
11
  return path.replace(/\.[^/.]+$/, "");
6
12
  }
@@ -45,6 +51,7 @@ async function getFolderFiles(folderPath) {
45
51
  }
46
52
  export {
47
53
  clear,
54
+ getBuffer,
48
55
  getFolderFiles,
49
56
  getTmpPath,
50
57
  outputFile,