aptechka 0.5.26 → 0.5.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Damped-DxwUBxOC.cjs +1 -0
- package/lib/{Damped-BJgyFENo.js → Damped-QZAoXO5Z.js} +31 -32
- package/lib/{Derived-BZtlW0bB.cjs → Derived-B-g8dYgh.cjs} +1 -1
- package/lib/{Derived-DH-ouLBq.js → Derived-kPJs5JC5.js} +1 -1
- package/lib/{SourceManager-DmXmmA6z.js → SourceManager-Q-PB-Rkh.js} +3 -4
- package/lib/SourceManager-vSlsMKUE.cjs +1 -0
- package/lib/{Store-Cd-E5W1z.js → Store-BQXXikps.js} +7 -8
- package/lib/Store-C-1ruEIm.cjs +1 -0
- package/lib/{Viewport-CCDNxaDg.js → Viewport-CFFhFKqX.js} +5 -6
- package/lib/Viewport-DMB0dO-s.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +8 -9
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +13 -14
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +15 -16
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +3 -4
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +3 -4
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +28 -29
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +52 -53
- package/lib/{createStylesheet-C8aQQ4hd.cjs → createStylesheet-CqHU9_qv.cjs} +1 -1
- package/lib/{createStylesheet-KMRQhSa-.js → createStylesheet-DBCEbDjI.js} +1 -1
- package/lib/createTheme-CHnsCgAr.js +15 -0
- package/lib/createTheme-Cfaw9UmV.cjs +1 -0
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +9 -10
- package/lib/custom-element/index.cjs +1 -1
- package/lib/custom-element/index.js +15 -16
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +6 -7
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +3 -3
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +22 -23
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +20 -21
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +7 -8
- package/lib/{index-DGr7Qzg3.js → index-BAHHdcp3.js} +3 -4
- package/lib/index-D2XtQX56.cjs +9 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +6 -7
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +3 -4
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +2 -3
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +15 -16
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +5 -6
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +3 -4
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +2 -3
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +2 -3
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +12 -13
- package/lib/resized/index.cjs +1 -1
- package/lib/resized/index.js +7 -8
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +7 -8
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +6 -7
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +1 -2
- package/lib/slicer/index.cjs +2 -2
- package/lib/slicer/index.js +3 -4
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +29 -30
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +12 -13
- package/lib/svg-path-data/index.cjs +3 -0
- package/lib/{utils/svg.d.ts → svg-path-data/index.d.ts} +1 -1
- package/lib/{path-data-polyfill-DgeDWYeI.js → svg-path-data/index.js} +201 -162
- package/lib/{tags-BoPv9fDr.js → tags-CMPg9ETZ.js} +233 -234
- package/lib/tags-Djb6mb1o.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +3 -4
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +12 -13
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +5 -6
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.js +125 -163
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +4 -5
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +6 -7
- package/package.json +9 -1
- package/lib/Damped-CbWlWAbx.cjs +0 -1
- package/lib/SourceManager-BFSCX4Q8.cjs +0 -1
- package/lib/Store-BQGNOHlY.cjs +0 -1
- package/lib/Viewport-DhKPH5nw.cjs +0 -1
- package/lib/createTheme-BSreUYge.cjs +0 -1
- package/lib/createTheme-u3NsrEV6.js +0 -16
- package/lib/index-CWHXGxK7.cjs +0 -9
- package/lib/path-data-polyfill-CXsOR7Oc.cjs +0 -3
- package/lib/tags-CueX-JLX.cjs +0 -1
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(ms(r,e,"read from private field"),i?i.call(r):e.get(r)),V=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},F=(r,e,i,n)=>(ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Et=require("../Store-BQGNOHlY.cjs"),qs=require("../Derived-BZtlW0bB.cjs"),as=require("../browser-CpzFX2xg.cjs"),yt=require("../layout-8ryRAMGJ.cjs"),ls=require("../math-GDWEqu7y.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");require("../ticker/index.cjs");const Pe=require("../order/index.cjs"),ys=require("../Damped-CbWlWAbx.cjs"),xe=require("../controls/index.cjs"),_t=require("../custom-element/index.cjs"),ue=require("../window-resizer/index.cjs"),Gt=require("../scroll-entries/index.cjs"),I=require("../tags-CueX-JLX.cjs"),cs=require("../createStylesheet-C8aQQ4hd.cjs"),ws=require("../css-unit-parser/index.cjs"),u=require("../css-property/index.cjs"),Ts=require("../Viewport-DhKPH5nw.cjs"),Ge=require("../element-resizer/index.cjs"),Bs=require("../gestures-DHLrn6Q8.cjs"),bs=require("../theme/index.cjs"),Is=require("../dom-JBOkFLTh.cjs"),_s=require("../function-MthRj-GJ.cjs");var As=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,Gs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Hs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&As(e,i,h),h},us=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(us(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},C=(r,e,i,n)=>(us(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),v=(r,e,i)=>(us(r,e,"access private method"),i),d,Nt,R,it,rt,Y,nt,kt,Wt,Q,T,Kt,Zt,Jt,Qt,fe,lt,Xt,Mt,X,Rt,vt,Yt,jt,b,Ue,p,Le,ze,W,y,B,j,Bt,mt,$,P,de,xt,pe,Se,oe,_e,It,ae,Ne,ps,Ke,Ss,Ve,Qe,Oe,Xe,A,Ze,Ye,Ps,ve,$e,De,je,ct,qt,ts,Es,g,_,Ht,et,gt;class Us{constructor(e,i){V(this,g,void 0);V(this,_,void 0);V(this,Ht,0);V(this,et,0);V(this,gt,null);F(this,g,e),F(this,_,i),Gt.scrollEntries.register(o(this,g))}get size(){return o(this,Ht)}get position(){return o(this,et)}destroy(){Gt.scrollEntries.unregister(o(this,g)),o(this,g).style.transform="",this.mark(null)}setSize(e){e?(o(this,g).style.setProperty("--size",e+"px"),o(this,_).axisCSSProperty.current==="x"?(o(this,g).style.width=e+"px",o(this,g).style.height=""):(o(this,g).style.height=e+"px",o(this,g).style.width="")):(o(this,g).style.width="",o(this,g).style.height="",o(this,g).style.removeProperty("--size"))}resize(){F(this,Ht,o(this,_).vertical?o(this,g).offsetHeight:o(this,g).offsetWidth),F(this,et,o(this,_).vertical?yt.getCumulativeOffsetTop(o(this,g)):yt.getCumulativeOffsetLeft(o(this,g))),F(this,et,o(this,et)-o(this,_).contentPosition)}transform(){let e=0;const i=o(this,_).viewportSize*o(this,_).sectionDistanceScaleCSSProperty.current;o(this,_).infiniteCSSProperty.current&&o(this,_).overscroll&&o(this,et)+o(this,Ht)<o(this,_).currentScrollValue&&(e=o(this,_).distance*-1-o(this,_).gap),Gt.scrollEntries.update(o(this,g),o(this,_).axisCSSProperty.current,e);const n=o(this,_).currentScrollValue+e,h=o(this,et)-o(this,_).viewportSize-i,c=o(this,et)+o(this,Ht)+i,S=ls.clamp(n,h,c);o(this,_).vertical?o(this,g).style.transform=`translate3d(0px, ${S*-1}px, 0px)`:o(this,g).style.transform=`translate3d(${S*-1}px, 0px, 0px)`}mark(e){o(this,gt)!==e&&(o(this,gt)&&o(this,g).classList.remove(o(this,gt)),e&&o(this,g).classList.add(e),F(this,gt,e),o(this,g).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:o(this,gt)}})))}}g=new WeakMap,_=new WeakMap,Ht=new WeakMap,et=new WeakMap,gt=new WeakMap;const Ns=cs.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"}});exports.ScrollElement=class extends _t.CustomElement{constructor(){super(),a(this,oe),a(this,It),a(this,Ne),a(this,Ke),a(this,Ve),a(this,Oe),a(this,Ye),a(this,De),a(this,ct),a(this,ts),a(this,d,null),a(this,Nt,new u.CSSProperty(this,"--controls",!0)),a(this,R,new u.CSSProperty(this,"--axis","y")),a(this,it,new u.CSSProperty(this,"--direction",0)),a(this,rt,new u.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,Y,new u.CSSProperty(this,"--split",!1)),a(this,nt,new u.CSSProperty(this,"--sectional",!1)),a(this,kt,new u.CSSProperty(this,"--auto-size",!1)),a(this,Wt,new u.CSSProperty(this,"--wheel-max-delta",!1)),a(this,Q,new u.CSSProperty(this,"--sections-in-view",1)),a(this,T,new u.CSSProperty(this,"--infinite",!1)),a(this,Kt,new u.CSSProperty(this,"--damping",20)),a(this,Zt,new u.CSSProperty(this,"--mass",0)),a(this,Jt,new u.CSSProperty(this,"--stiffness",0)),a(this,Qt,new u.CSSProperty(this,"--mouse-drag",!1)),a(this,fe,new u.CSSProperty(this,"--section-distance-scale",.5)),a(this,lt,new u.CSSProperty(this,"--autoplay",0)),a(this,Xt,new u.CSSProperty(this,"--autoplay-pause-duration",0)),a(this,Mt,new u.CSSProperty(this,"--autoplay-user-direction",!1)),a(this,X,new u.CSSProperty(this,"--classes",0)),a(this,Rt,new u.CSSProperty(this,"--current-index-start-offset",0)),a(this,vt,new u.CSSProperty(this,"--current-index-end-offset",0)),a(this,Yt,new u.CSSProperty(this,"--disabled",!1)),a(this,jt,new u.CSSProperty(this,"--hibernated",!1)),a(this,b,null),a(this,Ue,null),a(this,p,[]),a(this,Le,0),a(this,ze,0),a(this,W,0),a(this,y,0),a(this,B,0),a(this,j,null),a(this,Bt,null),a(this,mt,null),a(this,$,null),a(this,P,new Et.Store(0)),a(this,de,0),a(this,xt,0),a(this,pe,!0),a(this,Se,!0),a(this,A,()=>{t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,P).current;if(C(this,Le,this.vertical?yt.getCumulativeOffsetTop(this):yt.getCumulativeOffsetLeft(this)),C(this,ze,this.vertical?yt.getCumulativeOffsetTop(t(this,b)):yt.getCumulativeOffsetLeft(t(this,b))),C(this,W,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,kt).current&&t(this,p).length){const n=t(this,Q).current,h=(t(this,W)-t(this,B)*(n-1))/n;t(this,p).forEach(c=>{c.setSize(h)})}else t(this,p).forEach(n=>{n.setSize()});if(t(this,p).forEach(n=>{n.resize()}),t(this,rt).current){C(this,y,t(this,W)*t(this,rt).current);const n=t(this,y)+t(this,W);this.vertical?(t(this,b).style.width=n+"px",t(this,b).style.height="100%"):(t(this,b).style.height=n+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",C(this,y,t(this,b).offsetHeight-t(this,W))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",C(this,y,t(this,b).offsetWidth-t(this,W)));if(!t(this,T).current){const n=getComputedStyle(this),h=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);C(this,y,t(this,y)+h),t(this,d).max=t(this,y)}if(t(this,T).current&&t(this,p).length){const n=t(this,p)[t(this,p).length-1],h=n.position+n.size-t(this,W),c=t(this,y)-h;C(this,xt,n.position+n.size+c)}else C(this,xt,t(this,y));if(t(this,nt).current&&t(this,p).length){const n=t(this,p)[i];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0})}),a(this,Ze,()=>{const e=this.currentScrollValue;if(C(this,de,Math.max(0,e-t(this,y))),t(this,p).length){let i=0;for(let n=0;n<t(this,p).length;n++){const h=t(this,p)[n];h.transform(),this.targetScrollValue+h.size/2>=h.position&&(i=n)}t(this,P).current=i}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Gt.scrollEntries.update(this,t(this,R).current,e)}),a(this,ve,(e,i)=>{t(this,Nt).current&&(t(this,$).pauseAndContinue(t(this,Xt).current),t(this,Mt).current&&(t(this,$).direction=Math.sign(i)||1),t(this,$e).call(this,e,i))}),a(this,$e,(e,i)=>{if(t(this,it).current){if(t(this,it).current<0&&i>0)return;if(t(this,it).current>0&&i<0)return}if(!(e==="drag"&&!Ts.device.isMobile&&!t(this,Qt).current))if(t(this,nt).current){const n=Math.sign(i);t(this,p).length?this.shiftSections(n):t(this,d).shift(n*t(this,W))}else t(this,d).shift(i)}),as.isBrowser&&(C(this,d,new ys.Damped(0,{damping:.01,min:0,order:Pe.TICK_ORDER.SCROLL})),this.openShadow(Ns),I.element(this,{tabIndex:0,children:[I.div({class:"static",children:[I.slot({name:"static"})]}),I.div({class:"content",children:[I.slot({ref:e=>C(this,Ue,e)})],style:{flexDirection:new qs.Derived(t(this,R),e=>e==="x"?"row":"column")},ref:e=>C(this,b,e)})]}),C(this,j,new xe.WheelControls({element:t(this,b)})),t(this,j).changeEvent.subscribe(t(this,ve)),C(this,Bt,new xe.KeyboardControls({element:this})),t(this,Bt).changeEvent.subscribe(t(this,ve)),C(this,mt,new xe.DragControls({element:t(this,b)})),t(this,mt).changeEvent.subscribe(t(this,ve)),C(this,$,new xe.AutoplayControls),t(this,$).changeEvent.subscribe(t(this,$e)),t(this,R).subscribe(({current:e})=>{t(this,b).style.flexDirection=e==="x"?"row":"column",t(this,j).axis=t(this,Wt).current?"max":e,t(this,Bt).dimension=e==="x"?"width":"height",t(this,mt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,A).call(this)}),t(this,Wt).subscribe(e=>{t(this,j).axis=e.current?"max":t(this,R).current}),t(this,rt).subscribe(()=>{this.isConnected&&t(this,A).call(this)}),t(this,Y).subscribe(({current:e})=>{this.isConnected&&(e?v(this,oe,_e).call(this):v(this,It,ae).call(this))}),t(this,nt).subscribe(e=>{t(this,j).debounce=e.current,t(this,mt).swipe=e.current,t(this,$).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,kt).subscribe(e=>{this.isConnected&&(t(this,A).call(this),e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,Q).subscribe(e=>{this.isConnected&&(t(this,A).call(this),v(this,ct,qt).call(this))}),t(this,T).subscribe(e=>{e.current?(this.isConnected&&(t(this,p).length||(t(this,Y).current=!0)),t(this,p).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(C(this,de,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Kt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Zt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Jt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,Yt).subscribe(e=>{e.current&&!e.previous?v(this,Ne,ps).call(this):!e.current&&e.previous&&v(this,Ke,Ss).call(this)}),t(this,jt).subscribe(e=>{e.current&&!e.previous?v(this,Ve,Qe).call(this):!e.current&&e.previous&&v(this,Oe,Xe).call(this)}),t(this,lt).subscribe(e=>{t(this,$).speed=e.current,e.current&&!e.previous?t(this,$).connect():!e.current&&e.previous&&t(this,$).disconnect()}),t(this,Mt).subscribe(e=>{e.current||(t(this,$).direction=1)}),t(this,X).subscribe(e=>{this.isConnected&&v(this,ct,qt).call(this)}),t(this,Rt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,vt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,p).length&&v(this,ct,qt).call(this)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,Nt)}get axisCSSProperty(){return t(this,R)}get directionCSSProperty(){return t(this,it)}get pagesCSSProperty(){return t(this,rt)}get splitCSSProperty(){return t(this,Y)}get sectionalCSSProperty(){return t(this,nt)}get autoSizeCSSProperty(){return t(this,kt)}get wheelMaxDeltaCSSProperty(){return t(this,Wt)}get sectionsInViewCSSProperty(){return t(this,Q)}get infiniteCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,Kt)}get massCSSProperty(){return t(this,Zt)}get stiffnessCSSProperty(){return t(this,Jt)}get mouseDragCSSProperty(){return t(this,Qt)}get sectionDistanceScaleCSSProperty(){return t(this,fe)}get autoplayCSSProperty(){return t(this,lt)}get autoplayPauseDurationCSSProperty(){return t(this,Xt)}get autoplayUserDirectionCSSProperty(){return t(this,Mt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,Rt)}get currentIndexEndOffsetCSSProperty(){return t(this,vt)}get disabledCSSProperty(){return t(this,Yt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return v(this,De,je).call(this,"current")}get targetScrollValue(){return v(this,De,je).call(this,"target")}get contentElement(){return t(this,b)}get sections(){return t(this,p)}get position(){return t(this,Le)}get contentPosition(){return t(this,ze)}get viewportSize(){return t(this,W)}get scrollSize(){return t(this,y)}get gap(){return t(this,B)}get counter(){return t(this,P)}get limit(){return t(this,p).length-t(this,Q).current}get distance(){return t(this,xt)}get infiniteDistance(){return t(this,T).current?t(this,xt)+t(this,B):t(this,xt)}get overscroll(){return t(this,de)}get vertical(){return t(this,R).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get scrollWidth(){return t(this,R).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,R).current==="x"?0:t(this,d).distance}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!t(this,p).length)return;const n=t(this,P).current;v(this,Ye,Ps).call(this,e);const h=t(this,p)[n],c=t(this,p)[t(this,P).current];if(h&&c){let S=0;const Me=v(this,ts,Es).call(this),Rs=Me?this.targetScrollValue-Me.position:0;t(this,T).current?t(this,P).current===0&&n===t(this,p).length-1?S=t(this,y)+t(this,W)-h.position+t(this,B):t(this,P).current===t(this,p).length-1&&n===0?S=c.position-(t(this,y)+t(this,W)+t(this,B)):S=c.position-h.position:S=c.position-h.position,t(this,d).shift(S-Rs,{equalize:i==="instant"})}}shiftSections(e,i="smooth"){t(this,p).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i="smooth"){t(this,d).set(e,{equalize:i==="instant"})}connectedCallback(){t(this,Nt).observe(),t(this,R).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,Y).observe(),t(this,nt).observe(),t(this,kt).observe(),t(this,Wt).observe(),t(this,Q).observe(),t(this,T).observe(),t(this,Kt).observe(),t(this,Zt).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,fe).observe(),t(this,lt).observe(),t(this,lt).observe(),t(this,Xt).observe(),t(this,Mt).observe(),t(this,X).observe(),t(this,Rt).observe(),t(this,vt).observe(),t(this,Yt).observe(),t(this,jt).observe(),v(this,Oe,Xe).call(this)}disconnectedCallback(){t(this,Nt).unobserve(),t(this,R).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,Y).unobserve(),t(this,nt).unobserve(),t(this,kt).unobserve(),t(this,Wt).unobserve(),t(this,Q).unobserve(),t(this,T).unobserve(),t(this,Kt).unobserve(),t(this,Zt).unobserve(),t(this,Jt).unobserve(),t(this,Qt).unobserve(),t(this,fe).unobserve(),t(this,lt).unobserve(),t(this,Xt).unobserve(),t(this,Mt).unobserve(),t(this,X).unobserve(),t(this,Rt).unobserve(),t(this,vt).unobserve(),t(this,Yt).unobserve(),t(this,jt).unobserve(),v(this,Ve,Qe).call(this)}};d=new WeakMap;Nt=new WeakMap;R=new WeakMap;it=new WeakMap;rt=new WeakMap;Y=new WeakMap;nt=new WeakMap;kt=new WeakMap;Wt=new WeakMap;Q=new WeakMap;T=new WeakMap;Kt=new WeakMap;Zt=new WeakMap;Jt=new WeakMap;Qt=new WeakMap;fe=new WeakMap;lt=new WeakMap;Xt=new WeakMap;Mt=new WeakMap;X=new WeakMap;Rt=new WeakMap;vt=new WeakMap;Yt=new WeakMap;jt=new WeakMap;b=new WeakMap;Ue=new WeakMap;p=new WeakMap;Le=new WeakMap;ze=new WeakMap;W=new WeakMap;y=new WeakMap;B=new WeakMap;j=new WeakMap;Bt=new WeakMap;mt=new WeakMap;$=new WeakMap;P=new WeakMap;de=new WeakMap;xt=new WeakMap;pe=new WeakMap;Se=new WeakMap;oe=new WeakSet;_e=function(){v(this,It,ae).call(this),t(this,Ue).assignedElements().forEach(r=>{r instanceof HTMLElement&&t(this,p).push(new Us(r,this))}),t(this,b).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,A).call(this),v(this,ct,qt).call(this)};It=new WeakSet;ae=function(){t(this,p).forEach(r=>{r.destroy()}),C(this,p,[]),t(this,P).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Ne=new WeakSet;ps=function(){t(this,pe)||(C(this,pe,!0),t(this,d).unsubscribe(t(this,Ze)),t(this,d).unlistenAnimationFrame(),t(this,j).disconnect(),t(this,Bt).disconnect(),t(this,mt).disconnect(),t(this,$).disconnect())};Ke=new WeakSet;Ss=function(){t(this,pe)&&(C(this,pe,!1),t(this,d).subscribe(t(this,Ze)),t(this,j).connect(),t(this,Bt).connect(),t(this,mt).connect(),t(this,lt).current&&t(this,$).connect())};Ve=new WeakSet;Qe=function(){t(this,Se)||(C(this,Se,!0),ue.windowResizer.unsubscribe(t(this,A)),Ge.elementResizer.unsubscribe(t(this,A)),t(this,d).reset(),v(this,Ne,ps).call(this),t(this,b).style.transform="",t(this,Y).current&&v(this,It,ae).call(this),Gt.scrollEntries.unregister(this))};Oe=new WeakSet;Xe=function(){t(this,Se)&&(C(this,Se,!1),t(this,Y).current&&v(this,oe,_e).call(this),Gt.scrollEntries.register(this),ue.windowResizer.subscribe(t(this,A),Pe.RESIZE_ORDER.SCROLL),Ge.elementResizer.subscribe(this,t(this,A)),v(this,Ke,Ss).call(this))};A=new WeakMap;Ze=new WeakMap;Ye=new WeakSet;Ps=function(r){t(this,T).current?(t(this,P).current=r%t(this,p).length,t(this,P).current=t(this,P).current<0?t(this,p).length+t(this,P).current:t(this,P).current):t(this,P).current=ls.clamp(r,0,this.limit)};ve=new WeakMap;$e=new WeakMap;De=new WeakSet;je=function(r="current"){if(t(this,T).current&&t(this,p).length){const e=t(this,d)[r]%(t(this,y)+t(this,W)+t(this,B));return e<0?t(this,y)+e+t(this,W)+t(this,B):e}else return t(this,d)[r]};ct=new WeakSet;qt=function(){if(t(this,X).current&&t(this,p).length){const r=t(this,P).current+t(this,Rt).current;r===0?this.classList.add("start"):this.classList.remove("start"),r===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,Q).current+t(this,vt).current;t(this,p).forEach((i,n)=>{const h=r-this.limit-1+t(this,vt).current,c=r+e,S=this.sections.length-c;n>=r&&n<c||n<=h?i.mark("current"):n>=c&&n<c+S/2||n<=h+e?i.mark("next"):i.mark("previous")})}};ts=new WeakSet;Es=function(){let r=null,e=1/0;for(let i=0;i<t(this,p).length;i++){const n=Math.abs(t(this,p)[i].position-this.targetScrollValue);n<e&&(e=n,r=i)}return r!==null?t(this,p)[r]:null};exports.ScrollElement=Gs([_t.define("e-scroll")],exports.ScrollElement);var Ee;class Je extends _t.CustomElement{constructor(){super(...arguments);V(this,Ee,null)}get scrollElement(){return o(this,Ee)}connectedCallback(){const i=Is.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?F(this,Ee,i):console.error(this,"e-scroll not found")}}Ee=new WeakMap;var Ks=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,Js=(r,e,i,n)=>{for(var h=n>1?void 0:n?Zs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ks(e,i,h),h},ks=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},f=(r,e,i)=>(ks(r,e,"read from private field"),i?i.call(r):e.get(r)),N=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Pt=(r,e,i,n)=>(ks(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),me,q,ht,ot,we,be,te,Fe,Re,qe;const Qs=cs.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:bs.aptechkaTheme.colorLight.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.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Je{constructor(){super(),N(this,me,null),N(this,q,null),N(this,ht,!1),N(this,ot,0),N(this,we,0),N(this,be,0),N(this,te,()=>{Pt(this,ht,this.offsetWidth>this.offsetHeight);const e=f(this,ht)?this.offsetWidth:this.offsetHeight;Pt(this,ot,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),Pt(this,ot,Math.max(f(this,ot),30)),f(this,ht)?(f(this,q).style.width=f(this,ot)+"px",f(this,q).style.height="100%"):(f(this,q).style.width="100%",f(this,q).style.height=f(this,ot)+"px"),Pt(this,we,e-f(this,ot)),this.scrollElement.scrollSize||(this.style.display="none")}),N(this,Fe,()=>{Pt(this,be,this.scrollElement.currentProgress*f(this,we)),f(this,ht)?f(this,q).style.transform=`translate3d(${f(this,be)}px, 0px, 0px)`:f(this,q).style.transform=`translate3d(0px, ${f(this,be)}px, 0px)`}),N(this,Re,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),N(this,qe,e=>{document.documentElement.classList.add("grabbing"),Bs.setupDrag(h=>{const c=f(this,ht)?h.x:h.y,S=this.scrollElement.distance/f(this,we),Me=(c-n)*S;this.scrollElement.setPosition(i+Me)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=f(this,ht)?e.x:e.y}),as.isBrowser&&(this.openShadow(Qs),I.element(this,{slot:"static","drag-dead-zone":"",children:[I.slot({ref:e=>Pt(this,me,e),children:I.div({class:"default-thumb"})})]}))}get thumbElement(){return f(this,q)}connectedCallback(){super.connectedCallback();const e=f(this,me).assignedElements()[0]||f(this,me).firstElementChild;Pt(this,q,e),f(this,q).addEventListener("pointerdown",f(this,qe)),ue.windowResizer.subscribe(f(this,te),Pe.RESIZE_ORDER.SCROLL+1),Ge.elementResizer.subscribe(this,f(this,te)),this.scrollElement.onScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.subscribe(f(this,Re))}disconnectedCallback(){f(this,q).removeEventListener("pointerdown",f(this,qe)),ue.windowResizer.unsubscribe(f(this,te)),Ge.elementResizer.unsubscribe(f(this,te)),this.scrollElement.offScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.unsubscribe(f(this,Re))}};me=new WeakMap;q=new WeakMap;ht=new WeakMap;ot=new WeakMap;we=new WeakMap;be=new WeakMap;te=new WeakMap;Fe=new WeakMap;Re=new WeakMap;qe=new WeakMap;exports.ScrollbarElement=Js([_t.define("e-scrollbar")],exports.ScrollbarElement);const Xs=cs.createStylesheet({button:{all:"inherit"}});class Ws extends Je{constructor(){super(),this.openShadow(Xs),as.isBrowser&&I.element(this,{children:[I.button({onClick:()=>{this.handleClick()},children:[I.slot()]})]})}}var Ys=Object.defineProperty,js=Object.getOwnPropertyDescriptor,ti=(r,e,i,n)=>{for(var h=n>1?void 0:n?js(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ys(e,i,h),h};exports.ScrollSetButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=ti([_t.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var ei=Object.defineProperty,si=Object.getOwnPropertyDescriptor,ii=(r,e,i,n)=>{for(var h=n>1?void 0:n?si(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ei(e,i,h),h};exports.ScrollStepButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=ii([_t.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var ri=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,hi=(r,e,i,n)=>{for(var h=n>1?void 0:n?ni(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ri(e,i,h),h},Ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ut=(r,e,i)=>(Ms(r,e,"read from private field"),i?i.call(r):e.get(r)),gs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Cs=(r,e,i,n)=>(Ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Lt,ge,st,Ct,le,ke,We,ce;class oi{constructor(e,i,n){V(this,st,void 0);V(this,Ct,void 0);V(this,le,void 0);V(this,ke,void 0);V(this,We,()=>{o(this,Ct).scrollToSection(o(this,le),o(this,ke))});V(this,ce,()=>{o(this,st).classList.toggle("current",o(this,Ct).counter.current===o(this,le))});F(this,st,document.createElement("button")),F(this,Ct,e),F(this,ke,n),F(this,le,i),o(this,st).addEventListener("click",o(this,We)),o(this,Ct).counter.subscribe(o(this,ce)),o(this,ce).call(this)}get element(){return o(this,st)}destroy(){o(this,st).removeEventListener("click",o(this,We)),o(this,Ct).counter.unsubscribe(o(this,ce)),o(this,st).remove()}}st=new WeakMap,Ct=new WeakMap,le=new WeakMap,ke=new WeakMap,We=new WeakMap,ce=new WeakMap;exports.ScrollBulletButtonsElement=class extends Je{constructor(){super(...arguments),gs(this,Lt,[]),gs(this,ge,_s.debounce(()=>{Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new oi(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ut(this,Lt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ut(this,ge)),Ut(this,ge).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ut(this,ge)),Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[])}};Lt=new WeakMap;ge=new WeakMap;exports.ScrollBulletButtonsElement=hi([_t.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var ai=Object.defineProperty,li=Object.getOwnPropertyDescriptor,ci=(r,e,i,n)=>{for(var h=n>1?void 0:n?li(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ai(e,i,h),h},fs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(fs(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},w=(r,e,i,n)=>(fs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),k=(r,e,i)=>(fs(r,e,"access private method"),i),ee,se,ie,re,zt,Vt,Ot,$t,D,H,G,U,Tt,x,ut,pt,St,ft,dt,M,J,Z,wt,bt,tt,Te,m,ne,he,Be,L,Dt,O,z,K,Ce,At,E,es,xs,ss,Ls,is,zs,rs,Vs,ns,Os,hs,$s,Ie,ye,at,Ft,ds,Ds,vs,Fs,Ae,os,He;exports.ScrollSegmentElement=class extends Je{constructor(){super(),l(this,es),l(this,ss),l(this,is),l(this,rs),l(this,ns),l(this,hs),l(this,at),l(this,ds),l(this,vs),l(this,Ae),l(this,ee,new u.CSSProperty(this,"--damping",20)),l(this,se,new u.CSSProperty(this,"--mass",0)),l(this,ie,new u.CSSProperty(this,"--stiffness",0)),l(this,re,new u.CSSProperty(this,"--target","")),l(this,zt,new u.CSSProperty(this,"--disabled",!1)),l(this,Vt,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),l(this,Ot,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),l(this,$t,new u.CSSProperty(this,"--capture-once",!1)),l(this,D,new u.CSSProperty(this,"--captured","")),l(this,H,new u.CSSProperty(this,"--released","")),l(this,G,new u.CSSProperty(this,"--captured-from-start","")),l(this,U,new u.CSSProperty(this,"--captured-from-finish","")),l(this,Tt,new u.CSSProperty(this,"--released-from-start","")),l(this,x,new u.CSSProperty(this,"--released-from-finish","")),l(this,ut,new u.CSSProperty(this,"--passed-var","")),l(this,pt,new u.CSSProperty(this,"--progress-var","")),l(this,St,new u.CSSProperty(this,"--distance-var","")),l(this,ft,new u.CSSProperty(this,"--start-var","")),l(this,dt,new u.CSSProperty(this,"--finish-var","")),l(this,M,new Et.Store(!1)),l(this,J,new Et.Store(!1)),l(this,Z,new Et.Store(!1)),l(this,wt,new Et.Store(!1)),l(this,bt,new Et.Store(!1)),l(this,tt,new Et.Store(!1)),l(this,Te,[]),l(this,m,this),l(this,ne,0),l(this,he,0),l(this,Be,0),l(this,L,new ys.Damped(0,{order:Pe.TICK_ORDER.SCROLL-1,min:0,max:1})),l(this,Dt,0),l(this,O,0),l(this,z,0),l(this,K,0),l(this,Ce,!1),l(this,At,!1),l(this,E,!0),l(this,Ie,()=>{s(this,E)||(this.resize(),s(this,ye).call(this))}),l(this,ye,()=>{!s(this,E)&&s(this,Ce)&&this.tick()}),l(this,He,_s.debounce(()=>{const e=Gt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),w(this,Te,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return s(this,Vt)}get startOffsetCSSProperty(){return s(this,Ot)}get captureOnceCSSProperty(){return s(this,$t)}get capturedCSSProperty(){return s(this,D)}get releasedCSSProperty(){return s(this,H)}get capturedFromStartCSSProperty(){return s(this,G)}get capturedFromFinishCSSProperty(){return s(this,U)}get releasedFromStartCSSProperty(){return s(this,Tt)}get releasedFromFinishCSSProperty(){return s(this,x)}get passedVarCSSProperty(){return s(this,ut)}get progressVarCSSProperty(){return s(this,pt)}get distanceVarCSSProperty(){return s(this,St)}get startVarCSSProperty(){return s(this,ft)}get finishVarCSSProperty(){return s(this,dt)}get disabledCSSProperty(){return s(this,zt)}get dampingCSSProperty(){return s(this,ee)}get massCSSProperty(){return s(this,se)}get stiffnessCSSProperty(){return s(this,ie)}get targetCSSProperty(){return s(this,re)}get isCaptured(){return s(this,M)}get isReleased(){return s(this,J)}get isCapturedFromStart(){return s(this,Z)}get isReleasedFromStart(){return s(this,wt)}get isCapturedFromFinish(){return s(this,bt)}get isReleasedFromFinish(){return s(this,tt)}get directionPosition(){return s(this,ne)}get directionSize(){return s(this,he)}get passed(){return s(this,L)}get progress(){return s(this,Dt)}get start(){return s(this,O)}get finish(){return s(this,K)}get distance(){return s(this,z)}get isCapturedOnce(){return s(this,At)}get isDisabled(){return s(this,E)}resize(){w(this,he,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),w(this,ne,this.scrollElement.vertical?yt.getCumulativeOffsetTop(this,this.scrollElement):yt.getCumulativeOffsetLeft(this,this.scrollElement)),w(this,O,this.getStart()),w(this,z,this.getDistance()),w(this,O,s(this,O)+s(this,Ot).current),w(this,z,s(this,z)+s(this,Vt).current),w(this,K,s(this,O)+s(this,z)),this.scrollElement.currentScrollValue>s(this,K)&&!s(this,M).current&&!s(this,J).current&&(s(this,M).current=!0),this.setVar(s(this,ft).current,s(this,O)),this.setVar(s(this,dt).current,s(this,K)),this.setVar(s(this,St).current,s(this,z)),s(this,L).max=s(this,z),w(this,Ce,!0)}tick(){let e=this.scrollElement.currentScrollValue;s(this,Te).forEach(n=>{e+=n.value}),s(this,L).set(e-s(this,O));const i=Math.round(e);s(this,M).current&&(i>s(this,O)?s(this,Z).current||k(this,is,zs).call(this):s(this,Z).current&&!s(this,wt).current&&k(this,ns,Os).call(this),i<s(this,K)?s(this,tt).current&&!s(this,bt).current&&k(this,rs,Vs).call(this):s(this,Z).current&&!s(this,tt).current&&k(this,hs,$s).call(this)),i>s(this,O)&&i<s(this,K)?s(this,M).current||k(this,es,xs).call(this):s(this,M).current&&(s(this,L).set(ls.step(s(this,z)/2,s(this,L).current,0,s(this,z))),k(this,ss,Ls).call(this)),s(this,At)&&s(this,$t).current&&(s(this,D).current&&s(this,m).classList.add(s(this,D).current),w(this,E,!0))}disable(){this.style.cssText="",w(this,ne,0),w(this,he,0),s(this,L).reset(),w(this,Dt,0),w(this,O,0),w(this,z,0),w(this,K,0),w(this,Ce,!1),s(this,M).current=!1,s(this,J).current=!1,s(this,Z).current=!1,s(this,wt).current=!1,s(this,bt).current=!1,s(this,tt).current=!1,w(this,At,!1),w(this,E,!0),k(this,Ae,os).call(this)}enable(){w(this,E,!1)}connectedCallback(){super.connectedCallback(),s(this,ee).observe(),s(this,se).observe(),s(this,ie).observe(),s(this,re).observe(),s(this,zt).observe(),s(this,Vt).observe(),s(this,Ot).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,H).observe(),s(this,G).observe(),s(this,U).observe(),s(this,Tt).observe(),s(this,x).observe(),s(this,ut).observe(),s(this,pt).observe(),s(this,St).observe(),s(this,ft).observe(),s(this,dt).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",s(this,He)),s(this,He).call(this),s(this,zt).current||this.enable(),s(this,ee).subscribe(i=>{s(this,L).damping=i.current}),s(this,se).subscribe(i=>{s(this,L).mass=i.current}),s(this,ie).subscribe(i=>{s(this,L).stiffness=i.current}),s(this,re).subscribe(i=>{i.previous&&k(this,Ae,os).call(this),i.current?i.current==="parent"?w(this,m,this.parentElement||this):w(this,m,document.querySelector(i.current)||this):w(this,m,this)}),s(this,zt).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,Ot).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,Vt).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,D).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,G).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,U).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,H).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,Tt).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,x).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,$t).subscribe(i=>{s(this,E)||!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,ut).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,this.passed.current))}),s(this,pt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,Dt)))}),s(this,ft).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,O)))}),s(this,dt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,K)))}),s(this,St).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,z)))}),s(this,L).subscribe(i=>{w(this,Dt,s(this,L).current/s(this,z)||0),this.setVar(s(this,ut).current,s(this,L).current.toFixed(6)),this.setVar(s(this,pt).current,s(this,Dt).toFixed(6))}),ue.windowResizer.subscribe(s(this,Ie),Pe.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(s(this,ye)),e=!0}disconnectedCallback(){ue.windowResizer.unsubscribe(s(this,Ie)),this.scrollElement.offScroll(s(this,ye)),s(this,ee).close(),s(this,se).close(),s(this,ie).close(),s(this,re).close(),s(this,zt).close(),s(this,Vt).close(),s(this,Ot).close(),s(this,$t).close(),s(this,D).close(),s(this,H).close(),s(this,G).close(),s(this,U).close(),s(this,Tt).close(),s(this,x).close(),s(this,ut).close(),s(this,pt).close(),s(this,St).close(),s(this,ft).close(),s(this,dt).close(),s(this,M).close(),s(this,J).close(),s(this,Z).close(),s(this,wt).close(),s(this,bt).close(),s(this,tt).close(),this.disable()}removeVar(e){e&&s(this,m).style.removeProperty(`--${e}`)}setVar(e,i){e&&s(this,m).style.setProperty(`--${e}`,i.toString())}getDistance(){return s(this,he)+s(this,Be)}getStart(){return s(this,ne)-s(this,Be)}};ee=new WeakMap;se=new WeakMap;ie=new WeakMap;re=new WeakMap;zt=new WeakMap;Vt=new WeakMap;Ot=new WeakMap;$t=new WeakMap;D=new WeakMap;H=new WeakMap;G=new WeakMap;U=new WeakMap;Tt=new WeakMap;x=new WeakMap;ut=new WeakMap;pt=new WeakMap;St=new WeakMap;ft=new WeakMap;dt=new WeakMap;M=new WeakMap;J=new WeakMap;Z=new WeakMap;wt=new WeakMap;bt=new WeakMap;tt=new WeakMap;Te=new WeakMap;m=new WeakMap;ne=new WeakMap;he=new WeakMap;Be=new WeakMap;L=new WeakMap;Dt=new WeakMap;O=new WeakMap;z=new WeakMap;K=new WeakMap;Ce=new WeakMap;At=new WeakMap;E=new WeakMap;es=new WeakSet;xs=function(){s(this,M).current=!0,s(this,J).current=!1,w(this,At,!0),s(this,H).current&&s(this,m).classList.remove(s(this,H).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,D).current&&s(this,m).classList.add(s(this,D).current)};ss=new WeakSet;Ls=function(){s(this,J).current=!0,s(this,M).current=!1,w(this,At,!0),s(this,D).current&&s(this,m).classList.remove(s(this,D).current),s(this,G).current&&s(this,m).classList.remove(s(this,G).current),s(this,U).current&&s(this,m).classList.remove(s(this,U).current),s(this,H).current&&s(this,m).classList.add(s(this,H).current)};is=new WeakSet;zs=function(){s(this,M).current=!0,s(this,Z).current=!0,s(this,wt).current=!1,s(this,G).current&&s(this,m).classList.add(s(this,G).current)};rs=new WeakSet;Vs=function(){s(this,M).current=!0,s(this,bt).current=!0,s(this,tt).current=!1,s(this,U).current&&s(this,m).classList.add(s(this,U).current)};ns=new WeakSet;Os=function(){s(this,J).current=!0,s(this,wt).current=!0,s(this,Z).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};hs=new WeakSet;$s=function(){s(this,J).current=!0,s(this,tt).current=!0,s(this,bt).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};Ie=new WeakMap;ye=new WeakMap;at=new WeakSet;Ft=function(r){if(s(this,E)){r.previous&&s(this,m).classList.remove(r.previous),r.current&&s(this,m).classList.remove(r.current);return}r.current&&s(this,M).current?(r.previous&&s(this,m).classList.remove(r.previous),s(this,m).classList.add(r.current)):!r.current&&r.previous&&s(this,m).classList.remove(r.previous)};ds=new WeakSet;Ds=function(...r){r.forEach(e=>{e&&s(this,m).classList.remove(e)})};vs=new WeakSet;Fs=function(...r){r.forEach(e=>{e&&s(this,m).style.removeProperty(`--${e}`)})};Ae=new WeakSet;os=function(){k(this,ds,Ds).call(this,s(this,D).current,s(this,G).current,s(this,U).current,s(this,H).current,s(this,Tt).current,s(this,x).current),k(this,vs,Fs).call(this,s(this,ut).current,s(this,pt).current,s(this,St).current,s(this,ft).current,s(this,dt).current)};He=new WeakMap;exports.ScrollSegmentElement=ci([_t.define("e-scroll-segment")],exports.ScrollSegmentElement);
|
|
1
|
+
"use strict";var ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(ms(r,e,"read from private field"),i?i.call(r):e.get(r)),V=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},F=(r,e,i,n)=>(ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Et=require("../Store-C-1ruEIm.cjs"),qs=require("../Derived-B-g8dYgh.cjs"),as=require("../browser-CpzFX2xg.cjs"),yt=require("../layout-8ryRAMGJ.cjs"),ls=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Pe=require("../order/index.cjs"),ys=require("../Damped-DxwUBxOC.cjs"),xe=require("../controls/index.cjs"),_t=require("../custom-element/index.cjs"),ue=require("../window-resizer/index.cjs"),Gt=require("../scroll-entries/index.cjs"),I=require("../tags-Djb6mb1o.cjs"),cs=require("../createStylesheet-CqHU9_qv.cjs"),ws=require("../css-unit-parser/index.cjs"),u=require("../css-property/index.cjs"),Ts=require("../Viewport-DMB0dO-s.cjs"),Ge=require("../element-resizer/index.cjs"),Bs=require("../gestures-DHLrn6Q8.cjs"),bs=require("../theme/index.cjs"),Is=require("../dom-JBOkFLTh.cjs"),_s=require("../function-MthRj-GJ.cjs");var As=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,Gs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Hs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&As(e,i,h),h},us=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(us(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},C=(r,e,i,n)=>(us(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),v=(r,e,i)=>(us(r,e,"access private method"),i),d,Nt,R,it,rt,Y,nt,kt,Wt,Q,T,Kt,Zt,Jt,Qt,fe,lt,Xt,Mt,X,Rt,vt,Yt,jt,b,Ue,p,Le,ze,W,y,B,j,Bt,mt,$,P,de,xt,pe,Se,oe,_e,It,ae,Ne,ps,Ke,Ss,Ve,Qe,Oe,Xe,A,Ze,Ye,Ps,ve,$e,De,je,ct,qt,ts,Es,g,_,Ht,et,gt;class Us{constructor(e,i){V(this,g,void 0);V(this,_,void 0);V(this,Ht,0);V(this,et,0);V(this,gt,null);F(this,g,e),F(this,_,i),Gt.scrollEntries.register(o(this,g))}get size(){return o(this,Ht)}get position(){return o(this,et)}destroy(){Gt.scrollEntries.unregister(o(this,g)),o(this,g).style.transform="",this.mark(null)}setSize(e){e?(o(this,g).style.setProperty("--size",e+"px"),o(this,_).axisCSSProperty.current==="x"?(o(this,g).style.width=e+"px",o(this,g).style.height=""):(o(this,g).style.height=e+"px",o(this,g).style.width="")):(o(this,g).style.width="",o(this,g).style.height="",o(this,g).style.removeProperty("--size"))}resize(){F(this,Ht,o(this,_).vertical?o(this,g).offsetHeight:o(this,g).offsetWidth),F(this,et,o(this,_).vertical?yt.getCumulativeOffsetTop(o(this,g)):yt.getCumulativeOffsetLeft(o(this,g))),F(this,et,o(this,et)-o(this,_).contentPosition)}transform(){let e=0;const i=o(this,_).viewportSize*o(this,_).sectionDistanceScaleCSSProperty.current;o(this,_).infiniteCSSProperty.current&&o(this,_).overscroll&&o(this,et)+o(this,Ht)<o(this,_).currentScrollValue&&(e=o(this,_).distance*-1-o(this,_).gap),Gt.scrollEntries.update(o(this,g),o(this,_).axisCSSProperty.current,e);const n=o(this,_).currentScrollValue+e,h=o(this,et)-o(this,_).viewportSize-i,c=o(this,et)+o(this,Ht)+i,S=ls.clamp(n,h,c);o(this,_).vertical?o(this,g).style.transform=`translate3d(0px, ${S*-1}px, 0px)`:o(this,g).style.transform=`translate3d(${S*-1}px, 0px, 0px)`}mark(e){o(this,gt)!==e&&(o(this,gt)&&o(this,g).classList.remove(o(this,gt)),e&&o(this,g).classList.add(e),F(this,gt,e),o(this,g).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:o(this,gt)}})))}}g=new WeakMap,_=new WeakMap,Ht=new WeakMap,et=new WeakMap,gt=new WeakMap;const Ns=cs.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"}});exports.ScrollElement=class extends _t.CustomElement{constructor(){super(),a(this,oe),a(this,It),a(this,Ne),a(this,Ke),a(this,Ve),a(this,Oe),a(this,Ye),a(this,De),a(this,ct),a(this,ts),a(this,d,null),a(this,Nt,new u.CSSProperty(this,"--controls",!0)),a(this,R,new u.CSSProperty(this,"--axis","y")),a(this,it,new u.CSSProperty(this,"--direction",0)),a(this,rt,new u.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,Y,new u.CSSProperty(this,"--split",!1)),a(this,nt,new u.CSSProperty(this,"--sectional",!1)),a(this,kt,new u.CSSProperty(this,"--auto-size",!1)),a(this,Wt,new u.CSSProperty(this,"--wheel-max-delta",!1)),a(this,Q,new u.CSSProperty(this,"--sections-in-view",1)),a(this,T,new u.CSSProperty(this,"--infinite",!1)),a(this,Kt,new u.CSSProperty(this,"--damping",20)),a(this,Zt,new u.CSSProperty(this,"--mass",0)),a(this,Jt,new u.CSSProperty(this,"--stiffness",0)),a(this,Qt,new u.CSSProperty(this,"--mouse-drag",!1)),a(this,fe,new u.CSSProperty(this,"--section-distance-scale",.5)),a(this,lt,new u.CSSProperty(this,"--autoplay",0)),a(this,Xt,new u.CSSProperty(this,"--autoplay-pause-duration",0)),a(this,Mt,new u.CSSProperty(this,"--autoplay-user-direction",!1)),a(this,X,new u.CSSProperty(this,"--classes",0)),a(this,Rt,new u.CSSProperty(this,"--current-index-start-offset",0)),a(this,vt,new u.CSSProperty(this,"--current-index-end-offset",0)),a(this,Yt,new u.CSSProperty(this,"--disabled",!1)),a(this,jt,new u.CSSProperty(this,"--hibernated",!1)),a(this,b,null),a(this,Ue,null),a(this,p,[]),a(this,Le,0),a(this,ze,0),a(this,W,0),a(this,y,0),a(this,B,0),a(this,j,null),a(this,Bt,null),a(this,mt,null),a(this,$,null),a(this,P,new Et.Store(0)),a(this,de,0),a(this,xt,0),a(this,pe,!0),a(this,Se,!0),a(this,A,()=>{t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,P).current;if(C(this,Le,this.vertical?yt.getCumulativeOffsetTop(this):yt.getCumulativeOffsetLeft(this)),C(this,ze,this.vertical?yt.getCumulativeOffsetTop(t(this,b)):yt.getCumulativeOffsetLeft(t(this,b))),C(this,W,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,kt).current&&t(this,p).length){const n=t(this,Q).current,h=(t(this,W)-t(this,B)*(n-1))/n;t(this,p).forEach(c=>{c.setSize(h)})}else t(this,p).forEach(n=>{n.setSize()});if(t(this,p).forEach(n=>{n.resize()}),t(this,rt).current){C(this,y,t(this,W)*t(this,rt).current);const n=t(this,y)+t(this,W);this.vertical?(t(this,b).style.width=n+"px",t(this,b).style.height="100%"):(t(this,b).style.height=n+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",C(this,y,t(this,b).offsetHeight-t(this,W))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",C(this,y,t(this,b).offsetWidth-t(this,W)));if(!t(this,T).current){const n=getComputedStyle(this),h=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);C(this,y,t(this,y)+h),t(this,d).max=t(this,y)}if(t(this,T).current&&t(this,p).length){const n=t(this,p)[t(this,p).length-1],h=n.position+n.size-t(this,W),c=t(this,y)-h;C(this,xt,n.position+n.size+c)}else C(this,xt,t(this,y));if(t(this,nt).current&&t(this,p).length){const n=t(this,p)[i];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0})}),a(this,Ze,()=>{const e=this.currentScrollValue;if(C(this,de,Math.max(0,e-t(this,y))),t(this,p).length){let i=0;for(let n=0;n<t(this,p).length;n++){const h=t(this,p)[n];h.transform(),this.targetScrollValue+h.size/2>=h.position&&(i=n)}t(this,P).current=i}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Gt.scrollEntries.update(this,t(this,R).current,e)}),a(this,ve,(e,i)=>{t(this,Nt).current&&(t(this,$).pauseAndContinue(t(this,Xt).current),t(this,Mt).current&&(t(this,$).direction=Math.sign(i)||1),t(this,$e).call(this,e,i))}),a(this,$e,(e,i)=>{if(t(this,it).current){if(t(this,it).current<0&&i>0)return;if(t(this,it).current>0&&i<0)return}if(!(e==="drag"&&!Ts.device.isMobile&&!t(this,Qt).current))if(t(this,nt).current){const n=Math.sign(i);t(this,p).length?this.shiftSections(n):t(this,d).shift(n*t(this,W))}else t(this,d).shift(i)}),as.isBrowser&&(C(this,d,new ys.Damped(0,{damping:.01,min:0,order:Pe.TICK_ORDER.SCROLL})),this.openShadow(Ns),I.element(this,{tabIndex:0,children:[I.div({class:"static",children:[I.slot({name:"static"})]}),I.div({class:"content",children:[I.slot({ref:e=>C(this,Ue,e)})],style:{flexDirection:new qs.Derived(t(this,R),e=>e==="x"?"row":"column")},ref:e=>C(this,b,e)})]}),C(this,j,new xe.WheelControls({element:t(this,b)})),t(this,j).changeEvent.subscribe(t(this,ve)),C(this,Bt,new xe.KeyboardControls({element:this})),t(this,Bt).changeEvent.subscribe(t(this,ve)),C(this,mt,new xe.DragControls({element:t(this,b)})),t(this,mt).changeEvent.subscribe(t(this,ve)),C(this,$,new xe.AutoplayControls),t(this,$).changeEvent.subscribe(t(this,$e)),t(this,R).subscribe(({current:e})=>{t(this,b).style.flexDirection=e==="x"?"row":"column",t(this,j).axis=t(this,Wt).current?"max":e,t(this,Bt).dimension=e==="x"?"width":"height",t(this,mt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,A).call(this)}),t(this,Wt).subscribe(e=>{t(this,j).axis=e.current?"max":t(this,R).current}),t(this,rt).subscribe(()=>{this.isConnected&&t(this,A).call(this)}),t(this,Y).subscribe(({current:e})=>{this.isConnected&&(e?v(this,oe,_e).call(this):v(this,It,ae).call(this))}),t(this,nt).subscribe(e=>{t(this,j).debounce=e.current,t(this,mt).swipe=e.current,t(this,$).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,kt).subscribe(e=>{this.isConnected&&(t(this,A).call(this),e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,Q).subscribe(e=>{this.isConnected&&(t(this,A).call(this),v(this,ct,qt).call(this))}),t(this,T).subscribe(e=>{e.current?(this.isConnected&&(t(this,p).length||(t(this,Y).current=!0)),t(this,p).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(C(this,de,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Kt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Zt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Jt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,Yt).subscribe(e=>{e.current&&!e.previous?v(this,Ne,ps).call(this):!e.current&&e.previous&&v(this,Ke,Ss).call(this)}),t(this,jt).subscribe(e=>{e.current&&!e.previous?v(this,Ve,Qe).call(this):!e.current&&e.previous&&v(this,Oe,Xe).call(this)}),t(this,lt).subscribe(e=>{t(this,$).speed=e.current,e.current&&!e.previous?t(this,$).connect():!e.current&&e.previous&&t(this,$).disconnect()}),t(this,Mt).subscribe(e=>{e.current||(t(this,$).direction=1)}),t(this,X).subscribe(e=>{this.isConnected&&v(this,ct,qt).call(this)}),t(this,Rt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,vt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,p).length&&v(this,ct,qt).call(this)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,Nt)}get axisCSSProperty(){return t(this,R)}get directionCSSProperty(){return t(this,it)}get pagesCSSProperty(){return t(this,rt)}get splitCSSProperty(){return t(this,Y)}get sectionalCSSProperty(){return t(this,nt)}get autoSizeCSSProperty(){return t(this,kt)}get wheelMaxDeltaCSSProperty(){return t(this,Wt)}get sectionsInViewCSSProperty(){return t(this,Q)}get infiniteCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,Kt)}get massCSSProperty(){return t(this,Zt)}get stiffnessCSSProperty(){return t(this,Jt)}get mouseDragCSSProperty(){return t(this,Qt)}get sectionDistanceScaleCSSProperty(){return t(this,fe)}get autoplayCSSProperty(){return t(this,lt)}get autoplayPauseDurationCSSProperty(){return t(this,Xt)}get autoplayUserDirectionCSSProperty(){return t(this,Mt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,Rt)}get currentIndexEndOffsetCSSProperty(){return t(this,vt)}get disabledCSSProperty(){return t(this,Yt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return v(this,De,je).call(this,"current")}get targetScrollValue(){return v(this,De,je).call(this,"target")}get contentElement(){return t(this,b)}get sections(){return t(this,p)}get position(){return t(this,Le)}get contentPosition(){return t(this,ze)}get viewportSize(){return t(this,W)}get scrollSize(){return t(this,y)}get gap(){return t(this,B)}get counter(){return t(this,P)}get limit(){return t(this,p).length-t(this,Q).current}get distance(){return t(this,xt)}get infiniteDistance(){return t(this,T).current?t(this,xt)+t(this,B):t(this,xt)}get overscroll(){return t(this,de)}get vertical(){return t(this,R).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get scrollWidth(){return t(this,R).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,R).current==="x"?0:t(this,d).distance}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!t(this,p).length)return;const n=t(this,P).current;v(this,Ye,Ps).call(this,e);const h=t(this,p)[n],c=t(this,p)[t(this,P).current];if(h&&c){let S=0;const Me=v(this,ts,Es).call(this),Rs=Me?this.targetScrollValue-Me.position:0;t(this,T).current?t(this,P).current===0&&n===t(this,p).length-1?S=t(this,y)+t(this,W)-h.position+t(this,B):t(this,P).current===t(this,p).length-1&&n===0?S=c.position-(t(this,y)+t(this,W)+t(this,B)):S=c.position-h.position:S=c.position-h.position,t(this,d).shift(S-Rs,{equalize:i==="instant"})}}shiftSections(e,i="smooth"){t(this,p).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i="smooth"){t(this,d).set(e,{equalize:i==="instant"})}connectedCallback(){t(this,Nt).observe(),t(this,R).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,Y).observe(),t(this,nt).observe(),t(this,kt).observe(),t(this,Wt).observe(),t(this,Q).observe(),t(this,T).observe(),t(this,Kt).observe(),t(this,Zt).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,fe).observe(),t(this,lt).observe(),t(this,lt).observe(),t(this,Xt).observe(),t(this,Mt).observe(),t(this,X).observe(),t(this,Rt).observe(),t(this,vt).observe(),t(this,Yt).observe(),t(this,jt).observe(),v(this,Oe,Xe).call(this)}disconnectedCallback(){t(this,Nt).unobserve(),t(this,R).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,Y).unobserve(),t(this,nt).unobserve(),t(this,kt).unobserve(),t(this,Wt).unobserve(),t(this,Q).unobserve(),t(this,T).unobserve(),t(this,Kt).unobserve(),t(this,Zt).unobserve(),t(this,Jt).unobserve(),t(this,Qt).unobserve(),t(this,fe).unobserve(),t(this,lt).unobserve(),t(this,Xt).unobserve(),t(this,Mt).unobserve(),t(this,X).unobserve(),t(this,Rt).unobserve(),t(this,vt).unobserve(),t(this,Yt).unobserve(),t(this,jt).unobserve(),v(this,Ve,Qe).call(this)}};d=new WeakMap;Nt=new WeakMap;R=new WeakMap;it=new WeakMap;rt=new WeakMap;Y=new WeakMap;nt=new WeakMap;kt=new WeakMap;Wt=new WeakMap;Q=new WeakMap;T=new WeakMap;Kt=new WeakMap;Zt=new WeakMap;Jt=new WeakMap;Qt=new WeakMap;fe=new WeakMap;lt=new WeakMap;Xt=new WeakMap;Mt=new WeakMap;X=new WeakMap;Rt=new WeakMap;vt=new WeakMap;Yt=new WeakMap;jt=new WeakMap;b=new WeakMap;Ue=new WeakMap;p=new WeakMap;Le=new WeakMap;ze=new WeakMap;W=new WeakMap;y=new WeakMap;B=new WeakMap;j=new WeakMap;Bt=new WeakMap;mt=new WeakMap;$=new WeakMap;P=new WeakMap;de=new WeakMap;xt=new WeakMap;pe=new WeakMap;Se=new WeakMap;oe=new WeakSet;_e=function(){v(this,It,ae).call(this),t(this,Ue).assignedElements().forEach(r=>{r instanceof HTMLElement&&t(this,p).push(new Us(r,this))}),t(this,b).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,A).call(this),v(this,ct,qt).call(this)};It=new WeakSet;ae=function(){t(this,p).forEach(r=>{r.destroy()}),C(this,p,[]),t(this,P).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Ne=new WeakSet;ps=function(){t(this,pe)||(C(this,pe,!0),t(this,d).unsubscribe(t(this,Ze)),t(this,d).unlistenAnimationFrame(),t(this,j).disconnect(),t(this,Bt).disconnect(),t(this,mt).disconnect(),t(this,$).disconnect())};Ke=new WeakSet;Ss=function(){t(this,pe)&&(C(this,pe,!1),t(this,d).subscribe(t(this,Ze)),t(this,j).connect(),t(this,Bt).connect(),t(this,mt).connect(),t(this,lt).current&&t(this,$).connect())};Ve=new WeakSet;Qe=function(){t(this,Se)||(C(this,Se,!0),ue.windowResizer.unsubscribe(t(this,A)),Ge.elementResizer.unsubscribe(t(this,A)),t(this,d).reset(),v(this,Ne,ps).call(this),t(this,b).style.transform="",t(this,Y).current&&v(this,It,ae).call(this),Gt.scrollEntries.unregister(this))};Oe=new WeakSet;Xe=function(){t(this,Se)&&(C(this,Se,!1),t(this,Y).current&&v(this,oe,_e).call(this),Gt.scrollEntries.register(this),ue.windowResizer.subscribe(t(this,A),Pe.RESIZE_ORDER.SCROLL),Ge.elementResizer.subscribe(this,t(this,A)),v(this,Ke,Ss).call(this))};A=new WeakMap;Ze=new WeakMap;Ye=new WeakSet;Ps=function(r){t(this,T).current?(t(this,P).current=r%t(this,p).length,t(this,P).current=t(this,P).current<0?t(this,p).length+t(this,P).current:t(this,P).current):t(this,P).current=ls.clamp(r,0,this.limit)};ve=new WeakMap;$e=new WeakMap;De=new WeakSet;je=function(r="current"){if(t(this,T).current&&t(this,p).length){const e=t(this,d)[r]%(t(this,y)+t(this,W)+t(this,B));return e<0?t(this,y)+e+t(this,W)+t(this,B):e}else return t(this,d)[r]};ct=new WeakSet;qt=function(){if(t(this,X).current&&t(this,p).length){const r=t(this,P).current+t(this,Rt).current;r===0?this.classList.add("start"):this.classList.remove("start"),r===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,Q).current+t(this,vt).current;t(this,p).forEach((i,n)=>{const h=r-this.limit-1+t(this,vt).current,c=r+e,S=this.sections.length-c;n>=r&&n<c||n<=h?i.mark("current"):n>=c&&n<c+S/2||n<=h+e?i.mark("next"):i.mark("previous")})}};ts=new WeakSet;Es=function(){let r=null,e=1/0;for(let i=0;i<t(this,p).length;i++){const n=Math.abs(t(this,p)[i].position-this.targetScrollValue);n<e&&(e=n,r=i)}return r!==null?t(this,p)[r]:null};exports.ScrollElement=Gs([_t.define("e-scroll")],exports.ScrollElement);var Ee;class Je extends _t.CustomElement{constructor(){super(...arguments);V(this,Ee,null)}get scrollElement(){return o(this,Ee)}connectedCallback(){const i=Is.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?F(this,Ee,i):console.error(this,"e-scroll not found")}}Ee=new WeakMap;var Ks=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,Js=(r,e,i,n)=>{for(var h=n>1?void 0:n?Zs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ks(e,i,h),h},ks=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},f=(r,e,i)=>(ks(r,e,"read from private field"),i?i.call(r):e.get(r)),N=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Pt=(r,e,i,n)=>(ks(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),me,q,ht,ot,we,be,te,Fe,Re,qe;const Qs=cs.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:bs.aptechkaTheme.colorLight.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.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Je{constructor(){super(),N(this,me,null),N(this,q,null),N(this,ht,!1),N(this,ot,0),N(this,we,0),N(this,be,0),N(this,te,()=>{Pt(this,ht,this.offsetWidth>this.offsetHeight);const e=f(this,ht)?this.offsetWidth:this.offsetHeight;Pt(this,ot,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),Pt(this,ot,Math.max(f(this,ot),30)),f(this,ht)?(f(this,q).style.width=f(this,ot)+"px",f(this,q).style.height="100%"):(f(this,q).style.width="100%",f(this,q).style.height=f(this,ot)+"px"),Pt(this,we,e-f(this,ot)),this.scrollElement.scrollSize||(this.style.display="none")}),N(this,Fe,()=>{Pt(this,be,this.scrollElement.currentProgress*f(this,we)),f(this,ht)?f(this,q).style.transform=`translate3d(${f(this,be)}px, 0px, 0px)`:f(this,q).style.transform=`translate3d(0px, ${f(this,be)}px, 0px)`}),N(this,Re,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),N(this,qe,e=>{document.documentElement.classList.add("grabbing"),Bs.setupDrag(h=>{const c=f(this,ht)?h.x:h.y,S=this.scrollElement.distance/f(this,we),Me=(c-n)*S;this.scrollElement.setPosition(i+Me)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=f(this,ht)?e.x:e.y}),as.isBrowser&&(this.openShadow(Qs),I.element(this,{slot:"static","drag-dead-zone":"",children:[I.slot({ref:e=>Pt(this,me,e),children:I.div({class:"default-thumb"})})]}))}get thumbElement(){return f(this,q)}connectedCallback(){super.connectedCallback();const e=f(this,me).assignedElements()[0]||f(this,me).firstElementChild;Pt(this,q,e),f(this,q).addEventListener("pointerdown",f(this,qe)),ue.windowResizer.subscribe(f(this,te),Pe.RESIZE_ORDER.SCROLL+1),Ge.elementResizer.subscribe(this,f(this,te)),this.scrollElement.onScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.subscribe(f(this,Re))}disconnectedCallback(){f(this,q).removeEventListener("pointerdown",f(this,qe)),ue.windowResizer.unsubscribe(f(this,te)),Ge.elementResizer.unsubscribe(f(this,te)),this.scrollElement.offScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.unsubscribe(f(this,Re))}};me=new WeakMap;q=new WeakMap;ht=new WeakMap;ot=new WeakMap;we=new WeakMap;be=new WeakMap;te=new WeakMap;Fe=new WeakMap;Re=new WeakMap;qe=new WeakMap;exports.ScrollbarElement=Js([_t.define("e-scrollbar")],exports.ScrollbarElement);const Xs=cs.createStylesheet({button:{all:"inherit"}});class Ws extends Je{constructor(){super(),this.openShadow(Xs),as.isBrowser&&I.element(this,{children:[I.button({onClick:()=>{this.handleClick()},children:[I.slot()]})]})}}var Ys=Object.defineProperty,js=Object.getOwnPropertyDescriptor,ti=(r,e,i,n)=>{for(var h=n>1?void 0:n?js(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ys(e,i,h),h};exports.ScrollSetButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=ti([_t.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var ei=Object.defineProperty,si=Object.getOwnPropertyDescriptor,ii=(r,e,i,n)=>{for(var h=n>1?void 0:n?si(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ei(e,i,h),h};exports.ScrollStepButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=ii([_t.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var ri=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,hi=(r,e,i,n)=>{for(var h=n>1?void 0:n?ni(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ri(e,i,h),h},Ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ut=(r,e,i)=>(Ms(r,e,"read from private field"),i?i.call(r):e.get(r)),gs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Cs=(r,e,i,n)=>(Ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Lt,ge,st,Ct,le,ke,We,ce;class oi{constructor(e,i,n){V(this,st,void 0);V(this,Ct,void 0);V(this,le,void 0);V(this,ke,void 0);V(this,We,()=>{o(this,Ct).scrollToSection(o(this,le),o(this,ke))});V(this,ce,()=>{o(this,st).classList.toggle("current",o(this,Ct).counter.current===o(this,le))});F(this,st,document.createElement("button")),F(this,Ct,e),F(this,ke,n),F(this,le,i),o(this,st).addEventListener("click",o(this,We)),o(this,Ct).counter.subscribe(o(this,ce)),o(this,ce).call(this)}get element(){return o(this,st)}destroy(){o(this,st).removeEventListener("click",o(this,We)),o(this,Ct).counter.unsubscribe(o(this,ce)),o(this,st).remove()}}st=new WeakMap,Ct=new WeakMap,le=new WeakMap,ke=new WeakMap,We=new WeakMap,ce=new WeakMap;exports.ScrollBulletButtonsElement=class extends Je{constructor(){super(...arguments),gs(this,Lt,[]),gs(this,ge,_s.debounce(()=>{Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new oi(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ut(this,Lt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ut(this,ge)),Ut(this,ge).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ut(this,ge)),Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[])}};Lt=new WeakMap;ge=new WeakMap;exports.ScrollBulletButtonsElement=hi([_t.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var ai=Object.defineProperty,li=Object.getOwnPropertyDescriptor,ci=(r,e,i,n)=>{for(var h=n>1?void 0:n?li(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ai(e,i,h),h},fs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(fs(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},w=(r,e,i,n)=>(fs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),k=(r,e,i)=>(fs(r,e,"access private method"),i),ee,se,ie,re,zt,Vt,Ot,$t,D,H,G,U,Tt,x,ut,pt,St,ft,dt,M,J,Z,wt,bt,tt,Te,m,ne,he,Be,L,Dt,O,z,K,Ce,At,E,es,xs,ss,Ls,is,zs,rs,Vs,ns,Os,hs,$s,Ie,ye,at,Ft,ds,Ds,vs,Fs,Ae,os,He;exports.ScrollSegmentElement=class extends Je{constructor(){super(),l(this,es),l(this,ss),l(this,is),l(this,rs),l(this,ns),l(this,hs),l(this,at),l(this,ds),l(this,vs),l(this,Ae),l(this,ee,new u.CSSProperty(this,"--damping",20)),l(this,se,new u.CSSProperty(this,"--mass",0)),l(this,ie,new u.CSSProperty(this,"--stiffness",0)),l(this,re,new u.CSSProperty(this,"--target","")),l(this,zt,new u.CSSProperty(this,"--disabled",!1)),l(this,Vt,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),l(this,Ot,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),l(this,$t,new u.CSSProperty(this,"--capture-once",!1)),l(this,D,new u.CSSProperty(this,"--captured","")),l(this,H,new u.CSSProperty(this,"--released","")),l(this,G,new u.CSSProperty(this,"--captured-from-start","")),l(this,U,new u.CSSProperty(this,"--captured-from-finish","")),l(this,Tt,new u.CSSProperty(this,"--released-from-start","")),l(this,x,new u.CSSProperty(this,"--released-from-finish","")),l(this,ut,new u.CSSProperty(this,"--passed-var","")),l(this,pt,new u.CSSProperty(this,"--progress-var","")),l(this,St,new u.CSSProperty(this,"--distance-var","")),l(this,ft,new u.CSSProperty(this,"--start-var","")),l(this,dt,new u.CSSProperty(this,"--finish-var","")),l(this,M,new Et.Store(!1)),l(this,J,new Et.Store(!1)),l(this,Z,new Et.Store(!1)),l(this,wt,new Et.Store(!1)),l(this,bt,new Et.Store(!1)),l(this,tt,new Et.Store(!1)),l(this,Te,[]),l(this,m,this),l(this,ne,0),l(this,he,0),l(this,Be,0),l(this,L,new ys.Damped(0,{order:Pe.TICK_ORDER.SCROLL-1,min:0,max:1})),l(this,Dt,0),l(this,O,0),l(this,z,0),l(this,K,0),l(this,Ce,!1),l(this,At,!1),l(this,E,!0),l(this,Ie,()=>{s(this,E)||(this.resize(),s(this,ye).call(this))}),l(this,ye,()=>{!s(this,E)&&s(this,Ce)&&this.tick()}),l(this,He,_s.debounce(()=>{const e=Gt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),w(this,Te,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return s(this,Vt)}get startOffsetCSSProperty(){return s(this,Ot)}get captureOnceCSSProperty(){return s(this,$t)}get capturedCSSProperty(){return s(this,D)}get releasedCSSProperty(){return s(this,H)}get capturedFromStartCSSProperty(){return s(this,G)}get capturedFromFinishCSSProperty(){return s(this,U)}get releasedFromStartCSSProperty(){return s(this,Tt)}get releasedFromFinishCSSProperty(){return s(this,x)}get passedVarCSSProperty(){return s(this,ut)}get progressVarCSSProperty(){return s(this,pt)}get distanceVarCSSProperty(){return s(this,St)}get startVarCSSProperty(){return s(this,ft)}get finishVarCSSProperty(){return s(this,dt)}get disabledCSSProperty(){return s(this,zt)}get dampingCSSProperty(){return s(this,ee)}get massCSSProperty(){return s(this,se)}get stiffnessCSSProperty(){return s(this,ie)}get targetCSSProperty(){return s(this,re)}get isCaptured(){return s(this,M)}get isReleased(){return s(this,J)}get isCapturedFromStart(){return s(this,Z)}get isReleasedFromStart(){return s(this,wt)}get isCapturedFromFinish(){return s(this,bt)}get isReleasedFromFinish(){return s(this,tt)}get directionPosition(){return s(this,ne)}get directionSize(){return s(this,he)}get passed(){return s(this,L)}get progress(){return s(this,Dt)}get start(){return s(this,O)}get finish(){return s(this,K)}get distance(){return s(this,z)}get isCapturedOnce(){return s(this,At)}get isDisabled(){return s(this,E)}resize(){w(this,he,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),w(this,ne,this.scrollElement.vertical?yt.getCumulativeOffsetTop(this,this.scrollElement):yt.getCumulativeOffsetLeft(this,this.scrollElement)),w(this,O,this.getStart()),w(this,z,this.getDistance()),w(this,O,s(this,O)+s(this,Ot).current),w(this,z,s(this,z)+s(this,Vt).current),w(this,K,s(this,O)+s(this,z)),this.scrollElement.currentScrollValue>s(this,K)&&!s(this,M).current&&!s(this,J).current&&(s(this,M).current=!0),this.setVar(s(this,ft).current,s(this,O)),this.setVar(s(this,dt).current,s(this,K)),this.setVar(s(this,St).current,s(this,z)),s(this,L).max=s(this,z),w(this,Ce,!0)}tick(){let e=this.scrollElement.currentScrollValue;s(this,Te).forEach(n=>{e+=n.value}),s(this,L).set(e-s(this,O));const i=Math.round(e);s(this,M).current&&(i>s(this,O)?s(this,Z).current||k(this,is,zs).call(this):s(this,Z).current&&!s(this,wt).current&&k(this,ns,Os).call(this),i<s(this,K)?s(this,tt).current&&!s(this,bt).current&&k(this,rs,Vs).call(this):s(this,Z).current&&!s(this,tt).current&&k(this,hs,$s).call(this)),i>s(this,O)&&i<s(this,K)?s(this,M).current||k(this,es,xs).call(this):s(this,M).current&&(s(this,L).set(ls.step(s(this,z)/2,s(this,L).current,0,s(this,z))),k(this,ss,Ls).call(this)),s(this,At)&&s(this,$t).current&&(s(this,D).current&&s(this,m).classList.add(s(this,D).current),w(this,E,!0))}disable(){this.style.cssText="",w(this,ne,0),w(this,he,0),s(this,L).reset(),w(this,Dt,0),w(this,O,0),w(this,z,0),w(this,K,0),w(this,Ce,!1),s(this,M).current=!1,s(this,J).current=!1,s(this,Z).current=!1,s(this,wt).current=!1,s(this,bt).current=!1,s(this,tt).current=!1,w(this,At,!1),w(this,E,!0),k(this,Ae,os).call(this)}enable(){w(this,E,!1)}connectedCallback(){super.connectedCallback(),s(this,ee).observe(),s(this,se).observe(),s(this,ie).observe(),s(this,re).observe(),s(this,zt).observe(),s(this,Vt).observe(),s(this,Ot).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,H).observe(),s(this,G).observe(),s(this,U).observe(),s(this,Tt).observe(),s(this,x).observe(),s(this,ut).observe(),s(this,pt).observe(),s(this,St).observe(),s(this,ft).observe(),s(this,dt).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",s(this,He)),s(this,He).call(this),s(this,zt).current||this.enable(),s(this,ee).subscribe(i=>{s(this,L).damping=i.current}),s(this,se).subscribe(i=>{s(this,L).mass=i.current}),s(this,ie).subscribe(i=>{s(this,L).stiffness=i.current}),s(this,re).subscribe(i=>{i.previous&&k(this,Ae,os).call(this),i.current?i.current==="parent"?w(this,m,this.parentElement||this):w(this,m,document.querySelector(i.current)||this):w(this,m,this)}),s(this,zt).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,Ot).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,Vt).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,D).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,G).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,U).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,H).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,Tt).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,x).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,$t).subscribe(i=>{s(this,E)||!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,ut).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,this.passed.current))}),s(this,pt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,Dt)))}),s(this,ft).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,O)))}),s(this,dt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,K)))}),s(this,St).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,z)))}),s(this,L).subscribe(i=>{w(this,Dt,s(this,L).current/s(this,z)||0),this.setVar(s(this,ut).current,s(this,L).current.toFixed(6)),this.setVar(s(this,pt).current,s(this,Dt).toFixed(6))}),ue.windowResizer.subscribe(s(this,Ie),Pe.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(s(this,ye)),e=!0}disconnectedCallback(){ue.windowResizer.unsubscribe(s(this,Ie)),this.scrollElement.offScroll(s(this,ye)),s(this,ee).close(),s(this,se).close(),s(this,ie).close(),s(this,re).close(),s(this,zt).close(),s(this,Vt).close(),s(this,Ot).close(),s(this,$t).close(),s(this,D).close(),s(this,H).close(),s(this,G).close(),s(this,U).close(),s(this,Tt).close(),s(this,x).close(),s(this,ut).close(),s(this,pt).close(),s(this,St).close(),s(this,ft).close(),s(this,dt).close(),s(this,M).close(),s(this,J).close(),s(this,Z).close(),s(this,wt).close(),s(this,bt).close(),s(this,tt).close(),this.disable()}removeVar(e){e&&s(this,m).style.removeProperty(`--${e}`)}setVar(e,i){e&&s(this,m).style.setProperty(`--${e}`,i.toString())}getDistance(){return s(this,he)+s(this,Be)}getStart(){return s(this,ne)-s(this,Be)}};ee=new WeakMap;se=new WeakMap;ie=new WeakMap;re=new WeakMap;zt=new WeakMap;Vt=new WeakMap;Ot=new WeakMap;$t=new WeakMap;D=new WeakMap;H=new WeakMap;G=new WeakMap;U=new WeakMap;Tt=new WeakMap;x=new WeakMap;ut=new WeakMap;pt=new WeakMap;St=new WeakMap;ft=new WeakMap;dt=new WeakMap;M=new WeakMap;J=new WeakMap;Z=new WeakMap;wt=new WeakMap;bt=new WeakMap;tt=new WeakMap;Te=new WeakMap;m=new WeakMap;ne=new WeakMap;he=new WeakMap;Be=new WeakMap;L=new WeakMap;Dt=new WeakMap;O=new WeakMap;z=new WeakMap;K=new WeakMap;Ce=new WeakMap;At=new WeakMap;E=new WeakMap;es=new WeakSet;xs=function(){s(this,M).current=!0,s(this,J).current=!1,w(this,At,!0),s(this,H).current&&s(this,m).classList.remove(s(this,H).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,D).current&&s(this,m).classList.add(s(this,D).current)};ss=new WeakSet;Ls=function(){s(this,J).current=!0,s(this,M).current=!1,w(this,At,!0),s(this,D).current&&s(this,m).classList.remove(s(this,D).current),s(this,G).current&&s(this,m).classList.remove(s(this,G).current),s(this,U).current&&s(this,m).classList.remove(s(this,U).current),s(this,H).current&&s(this,m).classList.add(s(this,H).current)};is=new WeakSet;zs=function(){s(this,M).current=!0,s(this,Z).current=!0,s(this,wt).current=!1,s(this,G).current&&s(this,m).classList.add(s(this,G).current)};rs=new WeakSet;Vs=function(){s(this,M).current=!0,s(this,bt).current=!0,s(this,tt).current=!1,s(this,U).current&&s(this,m).classList.add(s(this,U).current)};ns=new WeakSet;Os=function(){s(this,J).current=!0,s(this,wt).current=!0,s(this,Z).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};hs=new WeakSet;$s=function(){s(this,J).current=!0,s(this,tt).current=!0,s(this,bt).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};Ie=new WeakMap;ye=new WeakMap;at=new WeakSet;Ft=function(r){if(s(this,E)){r.previous&&s(this,m).classList.remove(r.previous),r.current&&s(this,m).classList.remove(r.current);return}r.current&&s(this,M).current?(r.previous&&s(this,m).classList.remove(r.previous),s(this,m).classList.add(r.current)):!r.current&&r.previous&&s(this,m).classList.remove(r.previous)};ds=new WeakSet;Ds=function(...r){r.forEach(e=>{e&&s(this,m).classList.remove(e)})};vs=new WeakSet;Fs=function(...r){r.forEach(e=>{e&&s(this,m).style.removeProperty(`--${e}`)})};Ae=new WeakSet;os=function(){k(this,ds,Ds).call(this,s(this,D).current,s(this,G).current,s(this,U).current,s(this,H).current,s(this,Tt).current,s(this,x).current),k(this,vs,Fs).call(this,s(this,ut).current,s(this,pt).current,s(this,St).current,s(this,ft).current,s(this,dt).current)};He=new WeakMap;exports.ScrollSegmentElement=ci([_t.define("e-scroll-segment")],exports.ScrollSegmentElement);
|
package/lib/scroll/index.js
CHANGED
|
@@ -7,24 +7,23 @@ var a = (e, i, r) => (bs(e, i, "read from private field"), r ? r.call(e) : i.get
|
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
i instanceof WeakSet ? i.add(e) : i.set(e, r);
|
|
9
9
|
}, O = (e, i, r, h) => (bs(e, i, "write to private field"), h ? h.call(e, r) : i.set(e, r), r);
|
|
10
|
-
import { S as Ct } from "../Store-
|
|
11
|
-
import { D as Ks } from "../Derived-
|
|
10
|
+
import { S as Ct } from "../Store-BQXXikps.js";
|
|
11
|
+
import { D as Ks } from "../Derived-kPJs5JC5.js";
|
|
12
12
|
import { i as os } from "../browser-0zX67oeU.js";
|
|
13
13
|
import { a as Re, g as Te } from "../layout-HoBT_Da2.js";
|
|
14
14
|
import { c as Es, s as Zs } from "../math-BOBiC4TN.js";
|
|
15
|
-
import "../path-data-polyfill-DgeDWYeI.js";
|
|
16
15
|
import "../ticker/index.js";
|
|
17
16
|
import { TICK_ORDER as xs, RESIZE_ORDER as ls } from "../order/index.js";
|
|
18
|
-
import { D as Ls } from "../Damped-
|
|
17
|
+
import { D as Ls } from "../Damped-QZAoXO5Z.js";
|
|
19
18
|
import { WheelControls as Js, KeyboardControls as Qs, DragControls as Xs, AutoplayControls as Ys } from "../controls/index.js";
|
|
20
19
|
import { CustomElement as Vs, define as ue } from "../custom-element/index.js";
|
|
21
20
|
import { windowResizer as oe } from "../window-resizer/index.js";
|
|
22
21
|
import { scrollEntries as Bt } from "../scroll-entries/index.js";
|
|
23
|
-
import { e as cs, D as Je, ay as Be, p as js } from "../tags-
|
|
24
|
-
import { c as us } from "../createStylesheet-
|
|
22
|
+
import { e as cs, D as Je, ay as Be, p as js } from "../tags-CMPg9ETZ.js";
|
|
23
|
+
import { c as us } from "../createStylesheet-DBCEbDjI.js";
|
|
25
24
|
import { cssUnitParser as gs } from "../css-unit-parser/index.js";
|
|
26
25
|
import { CSSProperty as c } from "../css-property/index.js";
|
|
27
|
-
import { d as ti } from "../Viewport-
|
|
26
|
+
import { d as ti } from "../Viewport-CFFhFKqX.js";
|
|
28
27
|
import { elementResizer as He } from "../element-resizer/index.js";
|
|
29
28
|
import { s as ei } from "../gestures-D2Fdra_G.js";
|
|
30
29
|
import { aptechkaTheme as ws } from "../theme/index.js";
|
package/lib/select/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-D2XtQX56.cjs");Object.defineProperty(exports,"SelectElement",{enumerable:!0,get:()=>e.SelectElement});Object.defineProperty(exports,"SelectHeadElement",{enumerable:!0,get:()=>e.SelectHeadElement});Object.defineProperty(exports,"SelectOptionElement",{enumerable:!0,get:()=>e.SelectOptionElement});exports.SelectUserElement=e.SelectUserElement;
|
package/lib/select/index.js
CHANGED
package/lib/sequence/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var P=(n,s,t)=>new Promise((i,a)=>{var u=r=>{try{d(t.next(r))}catch(w){a(w)}},o=r=>{try{d(t.throw(r))}catch(w){a(w)}},d=r=>r.done?i(r.value):Promise.resolve(r.value).then(u,o);d((t=t.apply(n,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../canvas/index.cjs"),C=require("../css-property/index.cjs"),I=require("../custom-element/index.cjs"),q=require("../element-resizer/index.cjs");require("../window-resizer/index.cjs");require("../Store-
|
|
1
|
+
"use strict";var P=(n,s,t)=>new Promise((i,a)=>{var u=r=>{try{d(t.next(r))}catch(w){a(w)}},o=r=>{try{d(t.throw(r))}catch(w){a(w)}},d=r=>r.done?i(r.value):Promise.resolve(r.value).then(u,o);d((t=t.apply(n,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../canvas/index.cjs"),C=require("../css-property/index.cjs"),I=require("../custom-element/index.cjs"),q=require("../element-resizer/index.cjs");require("../window-resizer/index.cjs");require("../Store-C-1ruEIm.cjs");const L=require("../browser-CpzFX2xg.cjs"),W=require("../canvas-CU5Xjahf.cjs"),R=require("../source/index.cjs");var z=Object.defineProperty,O=Object.getOwnPropertyDescriptor,B=(n,s,t,i)=>{for(var a=i>1?void 0:i?O(s,t):s,u=n.length-1,o;u>=0;u--)(o=n[u])&&(a=(i?o(s,t,a):o(a))||a);return i&&a&&z(s,t,a),a},x=(n,s,t)=>{if(!s.has(n))throw TypeError("Cannot "+t)},e=(n,s,t)=>(x(n,s,"read from private field"),t?t.call(n):s.get(n)),c=(n,s,t)=>{if(s.has(n))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(n):s.set(n,t)},m=(n,s,t,i)=>(x(n,s,"write to private field"),i?i.call(n,t):s.set(n,t),t),h,E,g,p,v,S,_,b,l,f;function D(n){const s=n.match(/\{([\d-]+)\}/);if(s){const t=s[1].split("-");if(t.length===2){const i=parseInt(t[0],10),a=parseInt(t[1],10);return{start:i,end:a}}}return null}exports.SequenceElement=class extends R.SourceElement{constructor(s){super(),c(this,h,[]),c(this,E,new C.CSSProperty(this,"--fit","contain")),c(this,g,new C.CSSProperty(this,"--autoplay",!1)),c(this,p,new C.CSSProperty(this,"--offset-x",.5)),c(this,v,new C.CSSProperty(this,"--offset-y",.5)),c(this,S,null),c(this,_,0),c(this,b,1),c(this,l,()=>{if(e(this,h).length){const t=e(this,h)[0];e(this,E).current==="cover"?m(this,S,W.cover(t.naturalWidth,t.naturalHeight,this.consumerElement.width,this.consumerElement.height,e(this,p).current,e(this,v).current)):m(this,S,W.contain(t.naturalWidth,t.naturalHeight,this.consumerElement.width,this.consumerElement.height,e(this,p).current,e(this,v).current))}}),c(this,f,t=>{if(this.status.isFalse("loaded")||!e(this,S))return;t.detail.context.clearRect(0,0,t.detail.width,t.detail.height);const i=e(this,h)[e(this,_)];i&&t.detail.context.drawImage(i,...e(this,S)),e(this,g).current&&m(this,_,(e(this,_)+1)%e(this,h).length)}),L.isBrowser&&(m(this,b,parseInt(((s==null?void 0:s.pad)||this.getAttribute("pad")||"1").toString())),e(this,E).subscribe(e(this,l)),e(this,p).subscribe(e(this,l)),e(this,v).subscribe(e(this,l)),this.addEventListener("sourceCapture",t=>{this.consumerElement.addEventListener("canvasRender",e(this,f))}),this.addEventListener("sourceRelease",t=>{this.consumerElement.removeEventListener("canvasRender",e(this,f))}))}setProgress(s){e(this,h).length&&m(this,_,Math.floor((e(this,h).length-1)*s))}connectedCallback(){super.connectedCallback(),e(this,g).observe(),e(this,E).observe(),e(this,p).observe(),e(this,v).observe(),q.elementResizer.subscribe(this,e(this,l))}disconnectedCallback(){super.disconnectedCallback(),e(this,g).unobserve(),e(this,E).unobserve(),e(this,p).unobserve(),e(this,v).unobserve(),m(this,h,[]),q.elementResizer.unsubscribe(e(this,l)),this.consumerElement.removeEventListener("canvasRender",e(this,f))}createConsumer(){return new k.CanvasElement}consumeSource(s){return P(this,null,function*(){var t,i,a,u;if(s){this.consumerElement.removeEventListener("canvasRender",e(this,f));const o=[],d=D(s);if(d)for(let r=d.start;r<=d.end;r++){const w=s.replace(/\{([^}]+)\}/,r.toString().padStart(e(this,b),"0")),y=new Image;y.src=w,o.push(y)}else{const r=new Image;r.src=s,o.push(r)}try{yield Promise.all(o.map((r,w)=>new Promise((y,M)=>{r.onload=()=>{y()},r.onerror=T=>{M(`${r.src} Image not found`)}}))),m(this,h,o),e(this,l).call(this),(i=(t=this.consumerElement).onload)==null||i.call(t,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",e(this,f))}catch(r){console.error(r),(u=(a=this.consumerElement).onerror)==null||u.call(a,new Event("error"))}}})}};h=new WeakMap;E=new WeakMap;g=new WeakMap;p=new WeakMap;v=new WeakMap;S=new WeakMap;_=new WeakMap;b=new WeakMap;l=new WeakMap;f=new WeakMap;exports.SequenceElement=B([I.define("e-sequence")],exports.SequenceElement);
|
package/lib/sequence/index.js
CHANGED
|
@@ -19,10 +19,9 @@ import { CSSProperty as C } from "../css-property/index.js";
|
|
|
19
19
|
import { define as L } from "../custom-element/index.js";
|
|
20
20
|
import { elementResizer as W } from "../element-resizer/index.js";
|
|
21
21
|
import "../window-resizer/index.js";
|
|
22
|
-
import "../Store-
|
|
22
|
+
import "../Store-BQXXikps.js";
|
|
23
23
|
import { i as x } from "../browser-0zX67oeU.js";
|
|
24
24
|
import { c as R, a as O } from "../canvas-DeZ0SLUJ.js";
|
|
25
|
-
import "../path-data-polyfill-DgeDWYeI.js";
|
|
26
25
|
import { SourceElement as z } from "../source/index.js";
|
|
27
26
|
var B = Object.defineProperty, D = Object.getOwnPropertyDescriptor, q = (s, t, r, a) => {
|
|
28
27
|
for (var i = a > 1 ? void 0 : a ? D(t, r) : t, o = s.length - 1, u; o >= 0; o--)
|
package/lib/slicer/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var L=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)};var i=(n,t,e)=>(L(n,t,"read from private field"),e?e.call(n):t.get(n)),p=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},d=(n,t,e,s)=>(L(n,t,"write to private field"),s?s.call(n,e):t.set(n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../custom-element/index.cjs"),$=require("../string-DhgS_iFl.cjs");
|
|
1
|
+
"use strict";var L=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)};var i=(n,t,e)=>(L(n,t,"read from private field"),e?e.call(n):t.get(n)),p=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},d=(n,t,e,s)=>(L(n,t,"write to private field"),s?s.call(n,e):t.set(n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../custom-element/index.cjs"),$=require("../string-DhgS_iFl.cjs");var w,h,f;class T{constructor(t){p(this,w,void 0);p(this,h,void 0);p(this,f,void 0);d(this,w,t.index),d(this,h,document.createElement("span")),d(this,f,[]),t.letters&&t.letterConstructor&&t.lettersAcc!==void 0?(d(this,f,t.text.split("").map((e,s)=>new t.letterConstructor({index:t.lettersAcc+s,text:e,clone:t.clone}))),i(this,h).append(...i(this,f).map(e=>e.element))):t.clone?i(this,h).innerHTML=`
|
|
2
2
|
<span class="original">${t.text}</span>
|
|
3
3
|
<span class="clone" aria-hidden>${t.text}</span>
|
|
4
4
|
`:i(this,h).innerHTML=`
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
<span class="clone" aria-hidden>${t.text}</span>
|
|
9
9
|
`:i(this,a).innerHTML=`
|
|
10
10
|
<span class="value">${t.text}</span>
|
|
11
|
-
`}get index(){return i(this,C)}get element(){return i(this,a)}}C=new WeakMap,a=new WeakMap;var D=Object.defineProperty,O=Object.getOwnPropertyDescriptor,W=(n,t,e,s)=>{for(var r=s>1?void 0:s?O(t,e):t,l=n.length-1,u;l>=0;l--)(u=n[l])&&(r=(s?u(t,e,r):u(r))||r);return s&&r&&D(t,e,r),r},A=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)},o=(n,t,e)=>(A(n,t,"read from private field"),e?e.call(n):t.get(n)),_=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},y=(n,t,e,s)=>(A(n,t,"write to private field"),s?s.call(n,e):t.set(n,e),e),g,c,x,E,M;exports.SlicerElement=class extends P.CustomElement{constructor(t){super(),_(this,g,""),_(this,c,[]),_(this,x,[]),_(this,E,void 0),_(this,M,void 0),y(this,E,(t==null?void 0:t.wordConstructor)||T),y(this,M,(t==null?void 0:t.letterConstructor)||S)}get wordsArray(){return o(this,c)}get lettersArray(){return o(this,x)}get originalText(){return o(this,g)}connectedCallback(){var e;y(this,g,((e=this.textContent)==null?void 0:e.trim())||""),this.innerHTML="";let t=0;y(this,c,o(this,g).replace(/ +/g," ").split(" ").map((s,r)=>{const l=new(o(this,E))({index:r,text:s,letters:this.hasAttribute("letters"),lettersAcc:t,letterConstructor:o(this,M),clone:this.hasAttribute("clone")});return t+=l.letters.length,o(this,x).push(...l.letters),l})),this.hasAttribute("index")&&(o(this,c).forEach(s=>{s.element.style.setProperty("--word-index",s.index.toString())}),o(this,x).forEach(s=>{s.element.style.setProperty("--letter-index",s.index.toString())})),o(this,c).forEach((s,r)=>{if(this.appendChild(s.element),r!==o(this,c).length-1){const l=document.createElement("span");l.innerHTML=" ",this.appendChild(l)}}),this.style.setProperty("--words-length",o(this,c).length.toString()),this.style.setProperty("--letters-length",o(this,x).length.toString())}disconnectedCallback(){y(this,c,[]),this.textContent=o(this,g),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")}};g=new WeakMap;c=new WeakMap;x=new WeakMap;E=new WeakMap;M=new WeakMap;exports.SlicerElement=W([P.define("e-slicer")],exports.SlicerElement);var m=Object.defineProperty,H=Object.getOwnPropertyDescriptor,
|
|
11
|
+
`}get index(){return i(this,C)}get element(){return i(this,a)}}C=new WeakMap,a=new WeakMap;var D=Object.defineProperty,O=Object.getOwnPropertyDescriptor,W=(n,t,e,s)=>{for(var r=s>1?void 0:s?O(t,e):t,l=n.length-1,u;l>=0;l--)(u=n[l])&&(r=(s?u(t,e,r):u(r))||r);return s&&r&&D(t,e,r),r},A=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)},o=(n,t,e)=>(A(n,t,"read from private field"),e?e.call(n):t.get(n)),_=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},y=(n,t,e,s)=>(A(n,t,"write to private field"),s?s.call(n,e):t.set(n,e),e),g,c,x,E,M;exports.SlicerElement=class extends P.CustomElement{constructor(t){super(),_(this,g,""),_(this,c,[]),_(this,x,[]),_(this,E,void 0),_(this,M,void 0),y(this,E,(t==null?void 0:t.wordConstructor)||T),y(this,M,(t==null?void 0:t.letterConstructor)||S)}get wordsArray(){return o(this,c)}get lettersArray(){return o(this,x)}get originalText(){return o(this,g)}connectedCallback(){var e;y(this,g,((e=this.textContent)==null?void 0:e.trim())||""),this.innerHTML="";let t=0;y(this,c,o(this,g).replace(/ +/g," ").split(" ").map((s,r)=>{const l=new(o(this,E))({index:r,text:s,letters:this.hasAttribute("letters"),lettersAcc:t,letterConstructor:o(this,M),clone:this.hasAttribute("clone")});return t+=l.letters.length,o(this,x).push(...l.letters),l})),this.hasAttribute("index")&&(o(this,c).forEach(s=>{s.element.style.setProperty("--word-index",s.index.toString())}),o(this,x).forEach(s=>{s.element.style.setProperty("--letter-index",s.index.toString())})),o(this,c).forEach((s,r)=>{if(this.appendChild(s.element),r!==o(this,c).length-1){const l=document.createElement("span");l.innerHTML=" ",this.appendChild(l)}}),this.style.setProperty("--words-length",o(this,c).length.toString()),this.style.setProperty("--letters-length",o(this,x).length.toString())}disconnectedCallback(){y(this,c,[]),this.textContent=o(this,g),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")}};g=new WeakMap;c=new WeakMap;x=new WeakMap;E=new WeakMap;M=new WeakMap;exports.SlicerElement=W([P.define("e-slicer")],exports.SlicerElement);var m=Object.defineProperty,H=Object.getOwnPropertyDescriptor,b=(n,t,e,s)=>{for(var r=s>1?void 0:s?H(t,e):t,l=n.length-1,u;l>=0;l--)(u=n[l])&&(r=(s?u(t,e,r):u(r))||r);return s&&r&&m(t,e,r),r},v;class q extends S{constructor(e){super(e);p(this,v,void 0);d(this,v,$.generateId(2+Math.floor(Math.random()*15),"abcdefghijklmnopqrstuvwxyz0123456789#!%$^&*+=?")+e.text),this.play(0)}play(e){const s=Math.floor(e*(i(this,v).length-1));this.element.textContent=i(this,v)[s]}}v=new WeakMap;exports.DecoderElement=class extends exports.SlicerElement{constructor(){super({letterConstructor:q})}play(t){this.lettersArray.forEach(e=>{e.play(t)})}};exports.DecoderElement=b([P.define("e-decoder")],exports.DecoderElement);exports.Letter=S;exports.Word=T;
|
package/lib/slicer/index.js
CHANGED
|
@@ -9,7 +9,6 @@ var i = (e, t, s) => (A(e, t, "read from private field"), s ? s.call(e) : t.get(
|
|
|
9
9
|
}, c = (e, t, s, n) => (A(e, t, "write to private field"), n ? n.call(e, s) : t.set(e, s), s);
|
|
10
10
|
import { CustomElement as S, define as T } from "../custom-element/index.js";
|
|
11
11
|
import { g as W } from "../string-f0Dnk0L1.js";
|
|
12
|
-
import "../path-data-polyfill-DgeDWYeI.js";
|
|
13
12
|
var y, h, f;
|
|
14
13
|
class D {
|
|
15
14
|
constructor(t) {
|
|
@@ -58,8 +57,8 @@ class $ {
|
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
C = new WeakMap(), a = new WeakMap();
|
|
61
|
-
var H = Object.defineProperty,
|
|
62
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
60
|
+
var H = Object.defineProperty, b = Object.getOwnPropertyDescriptor, m = (e, t, s, n) => {
|
|
61
|
+
for (var r = n > 1 ? void 0 : n ? b(t, s) : t, d = e.length - 1, p; d >= 0; d--)
|
|
63
62
|
(p = e[d]) && (r = (n ? p(t, s, r) : p(r)) || r);
|
|
64
63
|
return n && r && H(t, s, r), r;
|
|
65
64
|
}, O = (e, t, s) => {
|
|
@@ -120,7 +119,7 @@ o = /* @__PURE__ */ new WeakMap();
|
|
|
120
119
|
g = /* @__PURE__ */ new WeakMap();
|
|
121
120
|
M = /* @__PURE__ */ new WeakMap();
|
|
122
121
|
P = /* @__PURE__ */ new WeakMap();
|
|
123
|
-
E =
|
|
122
|
+
E = m([
|
|
124
123
|
T("e-slicer")
|
|
125
124
|
], E);
|
|
126
125
|
var q = Object.defineProperty, z = Object.getOwnPropertyDescriptor, G = (e, t, s, n) => {
|
package/lib/source/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var L=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(L(i,r,"read from private field"),t?t.call(i):r.get(i)),a=(i,r,t)=>{if(r.has(i))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(i):r.set(i,t)},u=(i,r,t,n)=>(L(i,r,"write to private field"),n?n.call(i,t):r.set(i,t),t);var y=(i,r,t)=>(L(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../SourceManager-
|
|
1
|
+
"use strict";var L=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(L(i,r,"read from private field"),t?t.call(i):r.get(i)),a=(i,r,t)=>{if(r.has(i))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(i):r.set(i,t)},u=(i,r,t,n)=>(L(i,r,"write to private field"),n?n.call(i,t):r.set(i,t),t);var y=(i,r,t)=>(L(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../SourceManager-vSlsMKUE.cjs"),k=require("../custom-element/index.cjs"),C=require("../loading/index.cjs"),x=require("../class-linked-status/index.cjs"),M=require("../browser-CpzFX2xg.cjs");let q=0;var h,s,c,f,l,d,o,m,S,w,b,p,E;class A extends k.CustomElement{constructor(){super();a(this,S);a(this,h,null);a(this,s,null);a(this,c,!1);a(this,f,!1);a(this,l,!1);a(this,d,"");a(this,o,new x.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1}));a(this,m,null);a(this,b,t=>{const n=t[0];e(this,l)&&!e(this,f)&&n.isIntersecting&&(e(this,h).current&&e(this,h).current!==e(this,h).previous&&y(this,S,w).call(this,e(this,h).current),u(this,f,!0)),n.isIntersecting?this.dispatchEvent(new CustomEvent("sourceCapture")):this.dispatchEvent(new CustomEvent("sourceRelease"))});a(this,p,()=>{e(this,o).set("loaded",!0),e(this,o).set("error",!1),e(this,o).set("loading",!1),!e(this,l)&&!e(this,c)&&C.loading.setLoaded(e(this,d),1),u(this,c,!0)});a(this,E,t=>{e(this,o).set("loaded",!1),e(this,o).set("error",!0),e(this,o).set("loading",!1),!e(this,l)&&!e(this,c)&&C.loading.setError(e(this,d),t),u(this,c,!0)});M.isBrowser&&(u(this,d,`source-consumer-${++q}`),u(this,m,new IntersectionObserver(e(this,b))))}get consumerElement(){return e(this,s)}get status(){return e(this,o)}get isLazy(){return e(this,l)}connectedCallback(){const t=this.getAttribute("srcset");t&&(u(this,s,this.createConsumer()),e(this,s).style.cssText=`
|
|
2
2
|
display: block;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100%;
|
package/lib/source/index.js
CHANGED
|
@@ -6,44 +6,43 @@ var t = (i, r, s) => (E(i, r, "read from private field"), s ? s.call(i) : r.get(
|
|
|
6
6
|
if (r.has(i))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
r instanceof WeakSet ? r.add(i) : r.set(i, s);
|
|
9
|
-
}, u = (i, r, s,
|
|
9
|
+
}, u = (i, r, s, n) => (E(i, r, "write to private field"), n ? n.call(i, s) : r.set(i, s), s);
|
|
10
10
|
var C = (i, r, s) => (E(i, r, "access private method"), s);
|
|
11
|
-
import { S as y } from "../SourceManager-
|
|
12
|
-
import { a as
|
|
11
|
+
import { S as y } from "../SourceManager-Q-PB-Rkh.js";
|
|
12
|
+
import { a as R, b as V } from "../SourceManager-Q-PB-Rkh.js";
|
|
13
13
|
import { CustomElement as k } from "../custom-element/index.js";
|
|
14
14
|
import { loading as L } from "../loading/index.js";
|
|
15
15
|
import { ClassLinkedStatus as x } from "../class-linked-status/index.js";
|
|
16
16
|
import { i as A } from "../browser-0zX67oeU.js";
|
|
17
|
-
import "../path-data-polyfill-DgeDWYeI.js";
|
|
18
17
|
let z = 0;
|
|
19
|
-
var a, e, c,
|
|
20
|
-
class
|
|
18
|
+
var a, e, c, f, l, d, o, m, g, w, S, b, v;
|
|
19
|
+
class F extends k {
|
|
21
20
|
constructor() {
|
|
22
21
|
super();
|
|
23
22
|
h(this, g);
|
|
24
23
|
h(this, a, null);
|
|
25
24
|
h(this, e, null);
|
|
26
25
|
h(this, c, !1);
|
|
27
|
-
h(this,
|
|
26
|
+
h(this, f, !1);
|
|
28
27
|
h(this, l, !1);
|
|
29
28
|
h(this, d, "");
|
|
30
|
-
h(this,
|
|
29
|
+
h(this, o, new x(this, {
|
|
31
30
|
loading: !1,
|
|
32
31
|
loaded: !1,
|
|
33
32
|
error: !1
|
|
34
33
|
}));
|
|
35
|
-
h(this,
|
|
34
|
+
h(this, m, null);
|
|
36
35
|
h(this, S, (s) => {
|
|
37
|
-
const
|
|
38
|
-
t(this, l) && !t(this,
|
|
36
|
+
const n = s[0];
|
|
37
|
+
t(this, l) && !t(this, f) && n.isIntersecting && (t(this, a).current && t(this, a).current !== t(this, a).previous && C(this, g, w).call(this, t(this, a).current), u(this, f, !0)), n.isIntersecting ? this.dispatchEvent(new CustomEvent("sourceCapture")) : this.dispatchEvent(new CustomEvent("sourceRelease"));
|
|
39
38
|
});
|
|
40
39
|
h(this, b, () => {
|
|
41
|
-
t(this,
|
|
40
|
+
t(this, o).set("loaded", !0), t(this, o).set("error", !1), t(this, o).set("loading", !1), !t(this, l) && !t(this, c) && L.setLoaded(t(this, d), 1), u(this, c, !0);
|
|
42
41
|
});
|
|
43
42
|
h(this, v, (s) => {
|
|
44
|
-
t(this,
|
|
43
|
+
t(this, o).set("loaded", !1), t(this, o).set("error", !0), t(this, o).set("loading", !1), !t(this, l) && !t(this, c) && L.setError(t(this, d), s), u(this, c, !0);
|
|
45
44
|
});
|
|
46
|
-
A && (u(this, d, `source-consumer-${++z}`), u(this,
|
|
45
|
+
A && (u(this, d, `source-consumer-${++z}`), u(this, m, new IntersectionObserver(
|
|
47
46
|
t(this, S)
|
|
48
47
|
)));
|
|
49
48
|
}
|
|
@@ -51,7 +50,7 @@ class K extends k {
|
|
|
51
50
|
return t(this, e);
|
|
52
51
|
}
|
|
53
52
|
get status() {
|
|
54
|
-
return t(this,
|
|
53
|
+
return t(this, o);
|
|
55
54
|
}
|
|
56
55
|
get isLazy() {
|
|
57
56
|
return t(this, l);
|
|
@@ -62,26 +61,26 @@ class K extends k {
|
|
|
62
61
|
display: block;
|
|
63
62
|
width: 100%;
|
|
64
63
|
height: 100%;
|
|
65
|
-
`, t(this, e).classList.add("source-consumer"), Array.from(this.attributes).forEach((
|
|
66
|
-
if (
|
|
67
|
-
const p =
|
|
68
|
-
|
|
64
|
+
`, t(this, e).classList.add("source-consumer"), Array.from(this.attributes).forEach((n) => {
|
|
65
|
+
if (n.name !== "srcset") {
|
|
66
|
+
const p = n.nodeValue || "";
|
|
67
|
+
n.name in t(this, e) && (t(this, e)[n.name] = p || !0);
|
|
69
68
|
}
|
|
70
69
|
}), this.appendChild(t(this, e)), u(this, a, new y({
|
|
71
70
|
srcset: s
|
|
72
|
-
})), u(this, l, this.hasAttribute("lazy")), t(this, a).subscribe((
|
|
73
|
-
(!t(this, l) || t(this, l) && t(this,
|
|
74
|
-
}), t(this,
|
|
71
|
+
})), u(this, l, this.hasAttribute("lazy")), t(this, a).subscribe((n) => {
|
|
72
|
+
(!t(this, l) || t(this, l) && t(this, f)) && C(this, g, w).call(this, n.current);
|
|
73
|
+
}), t(this, m).observe(this), t(this, a).connect());
|
|
75
74
|
}
|
|
76
75
|
disconnectedCallback() {
|
|
77
|
-
t(this,
|
|
76
|
+
t(this, m).disconnect(), t(this, a).close(), t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, t(this, e).remove(), t(this, o).reset();
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
|
-
a = new WeakMap(), e = new WeakMap(), c = new WeakMap(),
|
|
79
|
+
a = new WeakMap(), e = new WeakMap(), c = new WeakMap(), f = new WeakMap(), l = new WeakMap(), d = new WeakMap(), o = new WeakMap(), m = new WeakMap(), g = new WeakSet(), w = function(s) {
|
|
81
80
|
if (t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, s) {
|
|
82
|
-
const
|
|
83
|
-
t(this,
|
|
84
|
-
const p =
|
|
81
|
+
const n = this.hasAttribute("keep-source-parameters");
|
|
82
|
+
t(this, o).set("loaded", !1), t(this, o).set("error", !1), t(this, o).set("loading", !0);
|
|
83
|
+
const p = n ? s.url : s.name + s.extension;
|
|
85
84
|
this.consumeSource(p), !t(this, l) && !t(this, c) && L.setTotal(t(this, d), 1), t(this, e).onloadeddata = () => {
|
|
86
85
|
t(this, b).call(this);
|
|
87
86
|
}, t(this, e).onload = () => {
|
|
@@ -93,8 +92,8 @@ a = new WeakMap(), e = new WeakMap(), c = new WeakMap(), m = new WeakMap(), l =
|
|
|
93
92
|
this.consumeSource(null);
|
|
94
93
|
}, S = new WeakMap(), b = new WeakMap(), v = new WeakMap();
|
|
95
94
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
R as Source,
|
|
96
|
+
F as SourceElement,
|
|
98
97
|
y as SourceManager,
|
|
99
|
-
|
|
98
|
+
V as SourceSet
|
|
100
99
|
};
|
package/lib/store/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var r=(t,s,e)=>(A(t,s,"read from private field"),e?e.call(t):s.get(t)),o=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},h=(t,s,e,c)=>(A(t,s,"write to private field"),c?c.call(t,e):s.set(t,e),e);var D=(t,s,e,c)=>({set _(i){h(t,s,i,e)},get _(){return r(t,s,c)}});var I=(t,s,e)=>new Promise((c,i)=>{var l=u=>{try{n(e.next(u))}catch(b){i(b)}},d=u=>{try{n(e.throw(u))}catch(b){i(b)}},n=u=>u.done?c(u.value):Promise.resolve(u.value).then(l,d);n((e=e.apply(t,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../Store-
|
|
1
|
+
"use strict";var A=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var r=(t,s,e)=>(A(t,s,"read from private field"),e?e.call(t):s.get(t)),o=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},h=(t,s,e,c)=>(A(t,s,"write to private field"),c?c.call(t,e):s.set(t,e),e);var D=(t,s,e,c)=>({set _(i){h(t,s,i,e)},get _(){return r(t,s,c)}});var I=(t,s,e)=>new Promise((c,i)=>{var l=u=>{try{n(e.next(u))}catch(b){i(b)}},d=u=>{try{n(e.throw(u))}catch(b){i(b)}},n=u=>u.done?c(u.value):Promise.resolve(u.value).then(l,d);n((e=e.apply(t,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../Store-C-1ruEIm.cjs"),q=require("../Derived-B-g8dYgh.cjs"),M=require("../function-MthRj-GJ.cjs");var v,a;class P extends p.Store{constructor(e,c,i){super(null,i);o(this,v,void 0);o(this,a,new Map);h(this,v,e.subscribe(l=>{const d=[];l.current.forEach((n,u)=>{var b;if((b=l.previous)!=null&&b.includes(n)&&r(this,a).has(n))d.push(r(this,a).get(n));else{const C=c(n,u);r(this,a).set(n,C),d.push(C)}}),r(this,a).forEach((n,u)=>{l.current.includes(u)||r(this,a).delete(u)}),this.current=d}))}close(){super.close(),r(this,v).call(this)}}v=new WeakMap,a=new WeakMap;var S,f,g;class E extends p.Store{constructor(e,c,i){super(e,i);o(this,S,void 0);o(this,f,void 0);o(this,g,0);h(this,f,new p.Store(!1)),h(this,S,c),i!=null&&i.manualControl||this.refetch()}get isPending(){return r(this,f)}refetch(){r(this,f).current=!0,h(this,g,r(this,g)+1);const e=r(this,g);r(this,S).call(this).then(c=>{e===r(this,g)&&(r(this,f).current=!1,this.current=c)})}}S=new WeakMap,f=new WeakMap,g=new WeakMap;var m,y,R;class k extends E{constructor(e,c,i=100){super(e,c,{manualControl:!0,skipSubscribeNotification:!0});o(this,m,void 0);o(this,y,void 0);o(this,R,0);h(this,y,i)}get step(){return r(this,R)}startAccumulating(){h(this,m,setInterval(()=>I(this,null,function*(){++D(this,R)._,this.refetch()}),r(this,y)))}stopAccumulating(){clearInterval(r(this,m))}close(){super.close(),this.stopAccumulating()}}m=new WeakMap,y=new WeakMap,R=new WeakMap;var x;class w extends p.Store{constructor(e,c,i){super(null,i);o(this,x,[]);const l=M.debounce(()=>{this.current=c()},0);e.forEach(d=>{r(this,x).push(d.subscribe(()=>{l()}))})}close(){super.close(),r(this,x).forEach(e=>e())}}x=new WeakMap;exports.Store=p.Store;exports.activeStores=p.activeStores;exports.storeRegistry=p.storeRegistry;exports.Derived=q.Derived;exports.Composed=w;exports.CumulativeResource=k;exports.DerivedArray=P;exports.Resource=E;
|
package/lib/store/index.js
CHANGED
|
@@ -31,13 +31,12 @@ var S = (e, t, s) => new Promise((c, i) => {
|
|
|
31
31
|
}, n = (u) => u.done ? c(u.value) : Promise.resolve(u.value).then(l, f);
|
|
32
32
|
n((s = s.apply(e, t)).next());
|
|
33
33
|
});
|
|
34
|
-
import { S as A } from "../Store-
|
|
35
|
-
import { a as
|
|
36
|
-
import { D as
|
|
34
|
+
import { S as A } from "../Store-BQXXikps.js";
|
|
35
|
+
import { a as F, s as G } from "../Store-BQXXikps.js";
|
|
36
|
+
import { D as J } from "../Derived-kPJs5JC5.js";
|
|
37
37
|
import { d as D } from "../function-C10DGppn.js";
|
|
38
|
-
import "../path-data-polyfill-DgeDWYeI.js";
|
|
39
38
|
var b, o;
|
|
40
|
-
class
|
|
39
|
+
class N extends A {
|
|
41
40
|
constructor(s, c, i) {
|
|
42
41
|
super(null, i);
|
|
43
42
|
h(this, b, void 0);
|
|
@@ -87,7 +86,7 @@ class k extends A {
|
|
|
87
86
|
}
|
|
88
87
|
g = new WeakMap(), p = new WeakMap(), m = new WeakMap();
|
|
89
88
|
var x, v, I;
|
|
90
|
-
class
|
|
89
|
+
class j extends k {
|
|
91
90
|
constructor(s, c, i = 100) {
|
|
92
91
|
super(s, c, {
|
|
93
92
|
manualControl: !0,
|
|
@@ -115,7 +114,7 @@ class q extends k {
|
|
|
115
114
|
}
|
|
116
115
|
x = new WeakMap(), v = new WeakMap(), I = new WeakMap();
|
|
117
116
|
var y;
|
|
118
|
-
class
|
|
117
|
+
class q extends A {
|
|
119
118
|
constructor(s, c, i) {
|
|
120
119
|
super(null, i);
|
|
121
120
|
h(this, y, []);
|
|
@@ -136,12 +135,12 @@ class z extends A {
|
|
|
136
135
|
}
|
|
137
136
|
y = new WeakMap();
|
|
138
137
|
export {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
138
|
+
q as Composed,
|
|
139
|
+
j as CumulativeResource,
|
|
140
|
+
J as Derived,
|
|
141
|
+
N as DerivedArray,
|
|
143
142
|
k as Resource,
|
|
144
143
|
A as Store,
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
F as activeStores,
|
|
145
|
+
G as storeRegistry
|
|
147
146
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});// @license
|
|
2
|
+
(!SVGPathElement.prototype.getPathData||!SVGPathElement.prototype.setPathData)&&function(){var V={Z:"Z",M:"M",L:"L",C:"C",Q:"Q",A:"A",H:"H",V:"V",S:"S",T:"T",z:"Z",m:"m",l:"l",c:"c",q:"q",a:"a",h:"h",v:"v",s:"s",t:"t"},M=function(n){this._string=n,this._currentIndex=0,this._endIndex=this._string.length,this._prevCommand=null,this._skipOptionalSpaces()},D=window.navigator.userAgent.indexOf("MSIE ")!==-1;M.prototype={parseSegment:function(){var n=this._string[this._currentIndex],t=V[n]?V[n]:null;if(t===null){if(this._prevCommand===null||((n==="+"||n==="-"||n==="."||n>="0"&&n<="9")&&this._prevCommand!=="Z"?this._prevCommand==="M"?t="L":this._prevCommand==="m"?t="l":t=this._prevCommand:t=null,t===null))return null}else this._currentIndex+=1;this._prevCommand=t;var e=null,s=t.toUpperCase();return s==="H"||s==="V"?e=[this._parseNumber()]:s==="M"||s==="L"||s==="T"?e=[this._parseNumber(),this._parseNumber()]:s==="S"||s==="Q"?e=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:s==="C"?e=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:s==="A"?e=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseArcFlag(),this._parseArcFlag(),this._parseNumber(),this._parseNumber()]:s==="Z"&&(this._skipOptionalSpaces(),e=[]),e===null||e.indexOf(null)>=0?null:{type:t,values:e}},hasMoreData:function(){return this._currentIndex<this._endIndex},peekSegmentType:function(){var n=this._string[this._currentIndex];return V[n]?V[n]:null},initialCommandIsMoveTo:function(){if(!this.hasMoreData())return!0;var n=this.peekSegmentType();return n==="M"||n==="m"},_isCurrentSpace:function(){var n=this._string[this._currentIndex];return n<=" "&&(n===" "||n===`
|
|
3
|
+
`||n===" "||n==="\r"||n==="\f")},_skipOptionalSpaces:function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex+=1;return this._currentIndex<this._endIndex},_skipOptionalSpacesOrDelimiter:function(){return this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&this._string[this._currentIndex]!==","?!1:(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&this._string[this._currentIndex]===","&&(this._currentIndex+=1,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},_parseNumber:function(){var n=0,t=0,e=1,s=0,l=1,u=1,a=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&this._string[this._currentIndex]==="+"?this._currentIndex+=1:this._currentIndex<this._endIndex&&this._string[this._currentIndex]==="-"&&(this._currentIndex+=1,l=-1),this._currentIndex===this._endIndex||(this._string[this._currentIndex]<"0"||this._string[this._currentIndex]>"9")&&this._string[this._currentIndex]!==".")return null;for(var p=this._currentIndex;this._currentIndex<this._endIndex&&this._string[this._currentIndex]>="0"&&this._string[this._currentIndex]<="9";)this._currentIndex+=1;if(this._currentIndex!==p)for(var i=this._currentIndex-1,r=1;i>=p;)t+=r*(this._string[i]-"0"),i-=1,r*=10;if(this._currentIndex<this._endIndex&&this._string[this._currentIndex]==="."){if(this._currentIndex+=1,this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||this._string[this._currentIndex]>"9")return null;for(;this._currentIndex<this._endIndex&&this._string[this._currentIndex]>="0"&&this._string[this._currentIndex]<="9";)e*=10,s+=(this._string.charAt(this._currentIndex)-"0")/e,this._currentIndex+=1}if(this._currentIndex!==a&&this._currentIndex+1<this._endIndex&&(this._string[this._currentIndex]==="e"||this._string[this._currentIndex]==="E")&&this._string[this._currentIndex+1]!=="x"&&this._string[this._currentIndex+1]!=="m"){if(this._currentIndex+=1,this._string[this._currentIndex]==="+"?this._currentIndex+=1:this._string[this._currentIndex]==="-"&&(this._currentIndex+=1,u=-1),this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||this._string[this._currentIndex]>"9")return null;for(;this._currentIndex<this._endIndex&&this._string[this._currentIndex]>="0"&&this._string[this._currentIndex]<="9";)n*=10,n+=this._string[this._currentIndex]-"0",this._currentIndex+=1}var v=t+s;return v*=l,n&&(v*=Math.pow(10,u*n)),a===this._currentIndex?null:(this._skipOptionalSpacesOrDelimiter(),v)},_parseArcFlag:function(){if(this._currentIndex>=this._endIndex)return null;var n=null,t=this._string[this._currentIndex];if(this._currentIndex+=1,t==="0")n=0;else if(t==="1")n=1;else return null;return this._skipOptionalSpacesOrDelimiter(),n}};var A=function(n){if(!n||n.length===0)return[];var t=new M(n),e=[];if(t.initialCommandIsMoveTo())for(;t.hasMoreData();){var s=t.parseSegment();if(s===null)break;e.push(s)}return e},P=SVGPathElement.prototype.setAttribute,S=SVGPathElement.prototype.setAttributeNS,_=SVGPathElement.prototype.removeAttribute,x=SVGPathElement.prototype.removeAttributeNS,y=window.Symbol?Symbol():"__cachedPathData",m=window.Symbol?Symbol():"__cachedNormalizedPathData",O=function(n,t,e,s,l,u,a,p,i,r){var v=function(X){return Math.PI*X/180},h=function(X,tt,Y){var pt=X*Math.cos(Y)-tt*Math.sin(Y),ct=X*Math.sin(Y)+tt*Math.cos(Y);return{x:pt,y:ct}},f=v(a),c=[],d,o,I,b;if(r)d=r[0],o=r[1],I=r[2],b=r[3];else{var T=h(n,t,-f);n=T.x,t=T.y;var L=h(e,s,-f);e=L.x,s=L.y;var w=(n-e)/2,C=(t-s)/2,G=w*w/(l*l)+C*C/(u*u);G>1&&(G=Math.sqrt(G),l=G*l,u=G*u);var k;p===i?k=-1:k=1;var z=l*l,H=u*u,at=z*H-z*C*C-H*w*w,rt=z*C*C+H*w*w,q=k*Math.sqrt(Math.abs(at/rt));I=q*l*C/u+(n+e)/2,b=q*-u*w/l+(t+s)/2,d=Math.asin(parseFloat(((t-b)/u).toFixed(9))),o=Math.asin(parseFloat(((s-b)/u).toFixed(9))),n<I&&(d=Math.PI-d),e<I&&(o=Math.PI-o),d<0&&(d=Math.PI*2+d),o<0&&(o=Math.PI*2+o),i&&d>o&&(d=d-Math.PI*2),!i&&o>d&&(o=o-Math.PI*2)}var B=o-d;if(Math.abs(B)>Math.PI*120/180){var st=o,nt=e,it=s;i&&o>d?o=d+Math.PI*120/180*1:o=d+Math.PI*120/180*-1,e=I+l*Math.cos(o),s=b+u*Math.sin(o),c=O(e,s,nt,it,l,u,a,0,i,[o,st,I,b])}B=o-d;var ut=Math.cos(d),lt=Math.sin(d),vt=Math.cos(o),ht=Math.sin(o),F=Math.tan(B/4),j=4/3*l*F,J=4/3*u*F,K=[n,t],Z=[n+j*lt,t-J*ut],W=[e+j*ht,s-J*vt],U=[e,s];if(Z[0]=2*K[0]-Z[0],Z[1]=2*K[1]-Z[1],r)return[Z,W,U].concat(c);c=[Z,W,U].concat(c);for(var R=[],N=0;N<c.length;N+=3){var l=h(c[N][0],c[N][1],f),u=h(c[N+1][0],c[N+1][1],f),g=h(c[N+2][0],c[N+2][1],f);R.push([l.x,l.y,u.x,u.y,g.x,g.y])}return R},E=function(n){return n.map(function(t){return{type:t.type,values:Array.prototype.slice.call(t.values)}})},$=function(n){var t=[],e=null,s=null,l=null,u=null;return n.forEach(function(a){var p=a.type;if(p==="M"){var i=a.values[0],r=a.values[1];t.push({type:"M",values:[i,r]}),l=i,u=r,e=i,s=r}else if(p==="m"){var i=e+a.values[0],r=s+a.values[1];t.push({type:"M",values:[i,r]}),l=i,u=r,e=i,s=r}else if(p==="L"){var i=a.values[0],r=a.values[1];t.push({type:"L",values:[i,r]}),e=i,s=r}else if(p==="l"){var i=e+a.values[0],r=s+a.values[1];t.push({type:"L",values:[i,r]}),e=i,s=r}else if(p==="C"){var v=a.values[0],h=a.values[1],f=a.values[2],c=a.values[3],i=a.values[4],r=a.values[5];t.push({type:"C",values:[v,h,f,c,i,r]}),e=i,s=r}else if(p==="c"){var v=e+a.values[0],h=s+a.values[1],f=e+a.values[2],c=s+a.values[3],i=e+a.values[4],r=s+a.values[5];t.push({type:"C",values:[v,h,f,c,i,r]}),e=i,s=r}else if(p==="Q"){var v=a.values[0],h=a.values[1],i=a.values[2],r=a.values[3];t.push({type:"Q",values:[v,h,i,r]}),e=i,s=r}else if(p==="q"){var v=e+a.values[0],h=s+a.values[1],i=e+a.values[2],r=s+a.values[3];t.push({type:"Q",values:[v,h,i,r]}),e=i,s=r}else if(p==="A"){var i=a.values[5],r=a.values[6];t.push({type:"A",values:[a.values[0],a.values[1],a.values[2],a.values[3],a.values[4],i,r]}),e=i,s=r}else if(p==="a"){var i=e+a.values[5],r=s+a.values[6];t.push({type:"A",values:[a.values[0],a.values[1],a.values[2],a.values[3],a.values[4],i,r]}),e=i,s=r}else if(p==="H"){var i=a.values[0];t.push({type:"H",values:[i]}),e=i}else if(p==="h"){var i=e+a.values[0];t.push({type:"H",values:[i]}),e=i}else if(p==="V"){var r=a.values[0];t.push({type:"V",values:[r]}),s=r}else if(p==="v"){var r=s+a.values[0];t.push({type:"V",values:[r]}),s=r}else if(p==="S"){var f=a.values[0],c=a.values[1],i=a.values[2],r=a.values[3];t.push({type:"S",values:[f,c,i,r]}),e=i,s=r}else if(p==="s"){var f=e+a.values[0],c=s+a.values[1],i=e+a.values[2],r=s+a.values[3];t.push({type:"S",values:[f,c,i,r]}),e=i,s=r}else if(p==="T"){var i=a.values[0],r=a.values[1];t.push({type:"T",values:[i,r]}),e=i,s=r}else if(p==="t"){var i=e+a.values[0],r=s+a.values[1];t.push({type:"T",values:[i,r]}),e=i,s=r}else(p==="Z"||p==="z")&&(t.push({type:"Z",values:[]}),e=l,s=u)}),t},Q=function(n){var t=[],e=null,s=null,l=null,u=null,a=null,p=null,i=null;return n.forEach(function(r){if(r.type==="M"){var v=r.values[0],h=r.values[1];t.push({type:"M",values:[v,h]}),p=v,i=h,u=v,a=h}else if(r.type==="C"){var f=r.values[0],c=r.values[1],d=r.values[2],o=r.values[3],v=r.values[4],h=r.values[5];t.push({type:"C",values:[f,c,d,o,v,h]}),s=d,l=o,u=v,a=h}else if(r.type==="L"){var v=r.values[0],h=r.values[1];t.push({type:"L",values:[v,h]}),u=v,a=h}else if(r.type==="H"){var v=r.values[0];t.push({type:"L",values:[v,a]}),u=v}else if(r.type==="V"){var h=r.values[0];t.push({type:"L",values:[u,h]}),a=h}else if(r.type==="S"){var d=r.values[0],o=r.values[1],v=r.values[2],h=r.values[3],I,b;e==="C"||e==="S"?(I=u+(u-s),b=a+(a-l)):(I=u,b=a),t.push({type:"C",values:[I,b,d,o,v,h]}),s=d,l=o,u=v,a=h}else if(r.type==="T"){var v=r.values[0],h=r.values[1],f,c;e==="Q"||e==="T"?(f=u+(u-s),c=a+(a-l)):(f=u,c=a);var I=u+2*(f-u)/3,b=a+2*(c-a)/3,T=v+2*(f-v)/3,L=h+2*(c-h)/3;t.push({type:"C",values:[I,b,T,L,v,h]}),s=f,l=c,u=v,a=h}else if(r.type==="Q"){var f=r.values[0],c=r.values[1],v=r.values[2],h=r.values[3],I=u+2*(f-u)/3,b=a+2*(c-a)/3,T=v+2*(f-v)/3,L=h+2*(c-h)/3;t.push({type:"C",values:[I,b,T,L,v,h]}),s=f,l=c,u=v,a=h}else if(r.type==="A"){var w=Math.abs(r.values[0]),C=Math.abs(r.values[1]),G=r.values[2],k=r.values[3],z=r.values[4],v=r.values[5],h=r.values[6];if(w===0||C===0)t.push({type:"C",values:[u,a,v,h,v,h]}),u=v,a=h;else if(u!==v||a!==h){var H=O(u,a,v,h,w,C,G,k,z);H.forEach(function(q){t.push({type:"C",values:q})}),u=v,a=h}}else r.type==="Z"&&(t.push(r),u=p,a=i);e=r.type}),t};SVGPathElement.prototype.setAttribute=function(n,t){n==="d"&&(this[y]=null,this[m]=null),P.call(this,n,t)},SVGPathElement.prototype.setAttributeNS=function(n,t,e){if(t==="d"){var s="http://www.w3.org/2000/svg";if(n)for(var l of this.ownerSVGElement.attributes)l.name===`xmlns:${n}`&&(s=l.value);s==="http://www.w3.org/2000/svg"&&(this[y]=null,this[m]=null)}S.call(this,n,t,e)},SVGPathElement.prototype.removeAttribute=function(n,t){n==="d"&&(this[y]=null,this[m]=null),_.call(this,n)},SVGPathElement.prototype.removeAttributeNS=function(n,t){if(t==="d"){var e="http://www.w3.org/2000/svg";if(n)for(var s of this.ownerSVGElement.attributes)s.name===`xmlns:${n}`&&(e=s.value);e==="http://www.w3.org/2000/svg"&&(this[y]=null,this[m]=null)}x.call(this,n,t)},SVGPathElement.prototype.getPathData=function(n){if(n&&n.normalize){if(this[m])return E(this[m]);var t;this[y]?t=E(this[y]):(t=A(this.getAttribute("d")||""),this[y]=E(t));var e=Q($(t));return this[m]=E(e),e}else{if(this[y])return E(this[y]);var t=A(this.getAttribute("d")||"");return this[y]=E(t),t}},SVGPathElement.prototype.setPathData=function(n){if(n.length===0)D?this.setAttribute("d",""):this.removeAttribute("d");else{for(var t="",e=0,s=n.length;e<s;e+=1){var l=n[e];e>0&&(t+=" "),t+=l.type,l.values&&l.values.length>0&&(t+=" "+l.values.join(" "))}this.setAttribute("d",t)}},SVGRectElement.prototype.getPathData=function(n){var t=this.x.baseVal.value,e=this.y.baseVal.value,s=this.width.baseVal.value,l=this.height.baseVal.value,u=this.hasAttribute("rx")?this.rx.baseVal.value:this.ry.baseVal.value,a=this.hasAttribute("ry")?this.ry.baseVal.value:this.rx.baseVal.value;u>s/2&&(u=s/2),a>l/2&&(a=l/2);var p=[{type:"M",values:[t+u,e]},{type:"H",values:[t+s-u]},{type:"A",values:[u,a,0,0,1,t+s,e+a]},{type:"V",values:[e+l-a]},{type:"A",values:[u,a,0,0,1,t+s-u,e+l]},{type:"H",values:[t+u]},{type:"A",values:[u,a,0,0,1,t,e+l-a]},{type:"V",values:[e+a]},{type:"A",values:[u,a,0,0,1,t+u,e]},{type:"Z",values:[]}];return p=p.filter(function(i){return!(i.type==="A"&&(i.values[0]===0||i.values[1]===0))}),n&&n.normalize===!0&&(p=Q(p)),p},SVGCircleElement.prototype.getPathData=function(n){var t=this.cx.baseVal.value,e=this.cy.baseVal.value,s=this.r.baseVal.value,l=[{type:"M",values:[t+s,e]},{type:"A",values:[s,s,0,0,1,t,e+s]},{type:"A",values:[s,s,0,0,1,t-s,e]},{type:"A",values:[s,s,0,0,1,t,e-s]},{type:"A",values:[s,s,0,0,1,t+s,e]},{type:"Z",values:[]}];return n&&n.normalize===!0&&(l=Q(l)),l},SVGEllipseElement.prototype.getPathData=function(n){var t=this.cx.baseVal.value,e=this.cy.baseVal.value,s=this.rx.baseVal.value,l=this.ry.baseVal.value,u=[{type:"M",values:[t+s,e]},{type:"A",values:[s,l,0,0,1,t,e+l]},{type:"A",values:[s,l,0,0,1,t-s,e]},{type:"A",values:[s,l,0,0,1,t,e-l]},{type:"A",values:[s,l,0,0,1,t+s,e]},{type:"Z",values:[]}];return n&&n.normalize===!0&&(u=Q(u)),u},SVGLineElement.prototype.getPathData=function(){return[{type:"M",values:[this.x1.baseVal.value,this.y1.baseVal.value]},{type:"L",values:[this.x2.baseVal.value,this.y2.baseVal.value]}]},SVGPolylineElement.prototype.getPathData=function(){for(var n=[],t=0;t<this.points.numberOfItems;t+=1){var e=this.points.getItem(t);n.push({type:t===0?"M":"L",values:[e.x,e.y]})}return n},SVGPolygonElement.prototype.getPathData=function(){for(var n=[],t=0;t<this.points.numberOfItems;t+=1){var e=this.points.getItem(t);n.push({type:t===0?"M":"L",values:[e.x,e.y]})}return n.push({type:"Z",values:[]}),n}}();function et(V,{pathSelector:M="path"}={}){const D=document.createElement(null);D.innerHTML=V;const A=D.firstElementChild,S=A.querySelector(M).getPathData(),_=A.getAttribute("viewBox").split(" ").map(m=>m.trim()),x={x:parseInt(_[0]),y:parseInt(_[1]),width:parseInt(_[2]),height:parseInt(_[3])},y=Math.min(x.width,x.height);return S.forEach(m=>{m.values=m.values.map(O=>O/y)}),S}function ot(V,M,D,A,P){const S=[];for(let _=0;_<=1;_+=1/P){const x=Math.pow(1-_,3)*V.x+3*Math.pow(1-_,2)*_*M.x+3*(1-_)*Math.pow(_,2)*D.x+Math.pow(_,3)*A.x,y=Math.pow(1-_,3)*V.y+3*Math.pow(1-_,2)*_*M.y+3*(1-_)*Math.pow(_,2)*D.y+Math.pow(_,3)*A.y;S.push({x,y})}return S}function ft(V,M){const D=(M==null?void 0:M.segments)||20,A=et(V,M);let P=[];for(let S=0;S<A.length-1;S++){const{type:_,values:x}=A[S];if(_==="M"&&S===0)P.push({x:x[0],y:x[1]});else if(_==="C"){const y=P[P.length-1],m={x:x[0],y:x[1]},O={x:x[2],y:x[3]},E={x:x[4],y:x[5]},$=ot(y,m,O,E,D);P=[...P,...$]}}return P}exports.getPathData=et;exports.getPoints=ft;
|