aptechka 0.4.12 → 0.4.13
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-Ceg1a3X8.js → Damped-BZujMwuv.js} +11 -10
- package/lib/Damped-DK3CSBXb.cjs +1 -0
- package/lib/{Derived-B-g8dYgh.cjs → Derived-BZtlW0bB.cjs} +1 -1
- package/lib/{Derived-kPJs5JC5.js → Derived-DH-ouLBq.js} +1 -1
- package/lib/DragControls-CV1YozSr.cjs +1 -0
- package/lib/{DragControls-BbznoEAb.js → DragControls-Ch_JO2ML.js} +5 -4
- package/lib/SourceManager-Bl_uduSS.cjs +1 -0
- package/lib/{SourceManager-4OHacQoQ.js → SourceManager-D_8MZ3bR.js} +21 -20
- package/lib/Store-BQGNOHlY.cjs +1 -0
- package/lib/{Store-BQXXikps.js → Store-Cd-E5W1z.js} +8 -7
- package/lib/{Viewport-wlgZaIn7.js → Viewport-Bx-VImCe.js} +6 -5
- package/lib/Viewport-_WllZTJ0.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +1 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +6 -5
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +16 -15
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +4 -3
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +4 -3
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/{createStylesheet-CqHU9_qv.cjs → createStylesheet-C8aQQ4hd.cjs} +1 -1
- package/lib/{createStylesheet-DBCEbDjI.js → createStylesheet-KMRQhSa-.js} +1 -1
- package/lib/createTheme-BSreUYge.cjs +1 -0
- package/lib/createTheme-u3NsrEV6.js +16 -0
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +4 -3
- package/lib/custom-element/index.cjs +1 -1
- package/lib/custom-element/index.js +3 -2
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +7 -6
- 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 +23 -22
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +23 -22
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +8 -7
- package/lib/{index-BUOBDenR.js → index-Fasue6kv.js} +20 -19
- package/lib/index-nxoux28n.cjs +9 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +3 -2
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +11 -10
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +3 -2
- package/lib/libs/path-data-polyfill.d.ts +1 -0
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +16 -15
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +6 -5
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +4 -3
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +21 -20
- package/lib/path-data-polyfill-CXsOR7Oc.cjs +3 -0
- package/lib/path-data-polyfill-DgeDWYeI.js +454 -0
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +14 -13
- package/lib/resized/index.cjs +1 -1
- package/lib/resized/index.js +8 -7
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +8 -7
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +8 -7
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/slicer/index.cjs +2 -2
- package/lib/slicer/index.js +4 -3
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +13 -12
- package/lib/{tags-CMPg9ETZ.js → tags-BoPv9fDr.js} +234 -233
- package/lib/tags-CueX-JLX.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +7 -6
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +3 -2
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +6 -5
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +164 -127
- package/lib/utils/svg.d.ts +15 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +6 -5
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +7 -6
- package/package.json +1 -1
- package/lib/Damped-BdnkNOcb.cjs +0 -1
- package/lib/DragControls-CdRWoO3y.cjs +0 -1
- package/lib/SourceManager-Bc68GDrb.cjs +0 -1
- package/lib/Store-C-1ruEIm.cjs +0 -1
- package/lib/Viewport-DAjFJF5V.cjs +0 -1
- package/lib/createTheme-CHnsCgAr.js +0 -15
- package/lib/createTheme-Cfaw9UmV.cjs +0 -1
- package/lib/index-Bv5vIuF-.cjs +0 -9
- package/lib/tags-Djb6mb1o.cjs +0 -1
package/lib/router/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import { URLPattern as tt } from "urlpattern-polyfill";
|
|
|
30
30
|
import { Notifier as et } from "../notifier/index.js";
|
|
31
31
|
import { i as X } from "../browser-0zX67oeU.js";
|
|
32
32
|
import { d as st } from "../function-C10DGppn.js";
|
|
33
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
33
34
|
import { i as it } from "../object-D6MVWB4l.js";
|
|
34
35
|
var R, U, b, m, l, w, A, v, P, E, B, Z;
|
|
35
36
|
class nt {
|
|
@@ -214,18 +215,18 @@ const Y = class Y {
|
|
|
214
215
|
y.close();
|
|
215
216
|
}), o(this, q, t);
|
|
216
217
|
try {
|
|
217
|
-
for (var T = F(u),
|
|
218
|
-
const y =
|
|
218
|
+
for (var T = F(u), gt, pt, wt; gt = !(pt = yield T.next()).done; gt = !1) {
|
|
219
|
+
const y = pt.value;
|
|
219
220
|
yield y.render(((f = e(this, C)) == null ? void 0 : f.nest) || e(this, k), t), o(this, C, y);
|
|
220
221
|
}
|
|
221
|
-
} catch (
|
|
222
|
-
|
|
222
|
+
} catch (pt) {
|
|
223
|
+
wt = [pt];
|
|
223
224
|
} finally {
|
|
224
225
|
try {
|
|
225
|
-
|
|
226
|
+
gt && (pt = T.return) && (yield pt.call(T));
|
|
226
227
|
} finally {
|
|
227
|
-
if (
|
|
228
|
-
throw
|
|
228
|
+
if (wt)
|
|
229
|
+
throw wt[0];
|
|
229
230
|
}
|
|
230
231
|
}
|
|
231
232
|
const c = e(this, N) + t + location.search;
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var es=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var a=(r,e,i)=>(es(r,e,"read from private field"),i?i.call(r):e.get(r)),$=(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)},R=(r,e,i,n)=>(es(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _s=require("../Damped-BdnkNOcb.cjs"),Ze=require("../browser-CpzFX2xg.cjs"),St=require("../layout-8ryRAMGJ.cjs"),It=require("../math-GDWEqu7y.cjs"),gt=require("../Store-C-1ruEIm.cjs"),Cs=require("../Derived-B-g8dYgh.cjs");require("../ticker/index.cjs");const $e=require("../DragControls-CdRWoO3y.cjs"),mt=require("../custom-element/index.cjs"),Le=require("../order/index.cjs"),Zt=require("../window-resizer/index.cjs"),Lt=require("../scroll-entries/index.cjs"),B=require("../tags-Djb6mb1o.cjs"),Ke=require("../createStylesheet-CqHU9_qv.cjs"),ss=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),ys=require("../Viewport-DAjFJF5V.cjs"),Ps=require("../gestures-DHLrn6Q8.cjs"),Es=require("../dom-JBOkFLTh.cjs"),is=require("../theme/index.cjs"),rs=require("../element-resizer/index.cjs"),os=require("../function-MthRj-GJ.cjs");var ks=Object.defineProperty,Ws=Object.getOwnPropertyDescriptor,Ms=(r,e,i,n)=>{for(var h=n>1?void 0:n?Ws(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&ks(e,i,h),h},Ne=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(Ne(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)},g=(r,e,i,n)=>(Ne(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),C=(r,e,i)=>(Ne(r,e,"access private method"),i),f,z,tt,N,et,$t,D,wt,ce,ue,zt,Ft,Dt,w,ke,m,pe,fe,L,b,U,J,Mt,at,E,Jt,bt,Kt,Nt,re,We,Ht,ne,Me,Je,xe,Qe,de,ze,Se,Fe,Vt,Ve,De,as,Qt,me,Re,V,P,ft,Y;class xs{constructor(e,i){$(this,V,void 0);$(this,P,void 0);$(this,ft,0);$(this,Y,0);R(this,V,e),R(this,P,i),Lt.scrollEntries.register(a(this,V))}get size(){return a(this,ft)}get position(){return a(this,Y)}destroy(){Lt.scrollEntries.unregister(a(this,V)),a(this,V).style.transform=""}resize(){R(this,ft,a(this,P).vertical?a(this,V).offsetHeight:a(this,V).offsetWidth),R(this,Y,a(this,P).vertical?St.getCumulativeOffsetTop(a(this,V)):St.getCumulativeOffsetLeft(a(this,V))),R(this,Y,a(this,Y)-a(this,P).contentPosition)}transform(){let e=0;const i=a(this,P).viewportSize-a(this,ft);a(this,P).infiniteCSSProperty.current&&a(this,P).overscroll&&a(this,Y)+a(this,ft)<a(this,P).currentScrollValue&&(e=a(this,P).distance*-1-a(this,P).gap),Lt.scrollEntries.update(a(this,V),a(this,P).axisAttibute.current,e);const n=a(this,P).currentScrollValue+e,h=a(this,Y)-a(this,P).viewportSize-i,c=a(this,Y)+a(this,ft)+i,u=It.clamp(n,h,c);a(this,P).vertical?a(this,V).style.transform=`translate3d(0px, ${u*-1}px, 0px)`:a(this,V).style.transform=`translate3d(${u*-1}px, 0px, 0px)`}}V=new WeakMap,P=new WeakMap,ft=new WeakMap,Y=new WeakMap;const Ls=Ke.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends mt.CustomElement{constructor(){super(),l(this,re),l(this,Ht),l(this,Me),l(this,xe),l(this,de),l(this,Se),l(this,De),l(this,me),l(this,f,null),l(this,z,new S.CSSProperty(this,"--axis","y")),l(this,tt,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),l(this,N,new S.CSSProperty(this,"--split",!1)),l(this,et,new S.CSSProperty(this,"--sectional",!1)),l(this,$t,new S.CSSProperty(this,"--wheel-max-delta",!1)),l(this,D,new S.CSSProperty(this,"--infinite",!1)),l(this,wt,new S.CSSProperty(this,"--damping",20)),l(this,ce,new S.CSSProperty(this,"--mass",0)),l(this,ue,new S.CSSProperty(this,"--stiffness",0)),l(this,zt,new S.CSSProperty(this,"--mouse-drag",!1)),l(this,Ft,new S.CSSProperty(this,"--disabled",!1)),l(this,Dt,new S.CSSProperty(this,"--hibernated",!1)),l(this,w,null),l(this,ke,null),l(this,m,[]),l(this,pe,0),l(this,fe,0),l(this,L,0),l(this,b,0),l(this,U,0),l(this,J,null),l(this,Mt,null),l(this,at,null),l(this,E,new gt.Store(0)),l(this,Jt,0),l(this,bt,0),l(this,Kt,!0),l(this,Nt,!0),l(this,Vt,()=>{const e=this.currentScrollValue/s(this,b)||0;if(g(this,pe,this.vertical?St.getCumulativeOffsetTop(this):St.getCumulativeOffsetLeft(this)),g(this,fe,this.vertical?St.getCumulativeOffsetTop(s(this,w)):St.getCumulativeOffsetLeft(s(this,w))),g(this,L,this.vertical?this.offsetHeight:this.offsetWidth),s(this,tt).current){g(this,b,s(this,L)*s(this,tt).current);const i=s(this,b)+s(this,L);this.vertical?(s(this,w).style.width=i+"px",s(this,w).style.height="100%"):(s(this,w).style.height=i+"px",s(this,w).style.width="100%")}else this.vertical?(s(this,w).style.width="100%",s(this,w).style.height="max-content",g(this,b,s(this,w).offsetHeight-s(this,L))):(s(this,w).style.width="max-content",s(this,w).style.height="100%",g(this,b,s(this,w).offsetWidth-s(this,L)));if(this.vertical?g(this,U,ss.cssUnitParser.parse(getComputedStyle(s(this,w)).rowGap)):g(this,U,ss.cssUnitParser.parse(getComputedStyle(s(this,w)).columnGap)),!s(this,D).current){const i=getComputedStyle(this);g(this,b,s(this,b)+(this.vertical?parseFloat(i.paddingBlockStart)+parseFloat(i.paddingBlockEnd):parseFloat(i.paddingInlineStart)+parseFloat(i.paddingInlineEnd))),s(this,f).max=s(this,b)}if(s(this,m).forEach(i=>{i.resize(),i.transform()}),s(this,D).current&&s(this,m).length){const i=s(this,m)[s(this,m).length-1],n=i.position+i.size-s(this,L),h=s(this,b)-n;g(this,bt,i.position+i.size+h)}else g(this,bt,s(this,b));if(s(this,et).current&&s(this,m).length){const i=s(this,m)[s(this,E).current];s(this,f).set(i.position,!0)}else s(this,f).set(e*s(this,b),!0)}),l(this,Ve,()=>{const e=this.currentScrollValue;if(g(this,Jt,Math.max(0,e-s(this,b))),s(this,m).length){let i=0;for(let n=0;n<s(this,m).length;n++){const h=s(this,m)[n];h.transform(),this.targetScrollValue+this.viewportSize/2>=h.position&&(i=n)}s(this,E).current=i}else this.vertical?s(this,w).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:s(this,w).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Lt.scrollEntries.update(this,s(this,z).current,e)}),l(this,Qt,(e,i)=>{if(!(e==="drag"&&!ys.device.isMobile&&!s(this,zt).current))if(s(this,et).current){const n=Math.sign(i);s(this,m).length?this.shiftSections(n):s(this,f).shift(n*s(this,L))}else s(this,f).shift(i)}),Ze.isBrowser&&(g(this,f,new _s.Damped(0,{damping:.01,min:0,order:Le.TICK_ORDER.SCROLL})),this.openShadow(Ls),B.element(this,{tabIndex:0,children:[B.div({class:"static",children:[B.slot({name:"static"})]}),B.div({class:"content",children:[B.slot({ref:e=>g(this,ke,e)})],style:{flexDirection:new Cs.Derived(s(this,z),e=>e==="x"?"row":"column")},ref:e=>g(this,w,e)})]}),g(this,J,new $e.WheelControls({element:this})),s(this,J).changeEvent.subscribe(s(this,Qt)),g(this,Mt,new $e.KeyboardControls({element:this})),s(this,Mt).changeEvent.subscribe(s(this,Qt)),g(this,at,new $e.DragControls({element:this})),s(this,at).changeEvent.subscribe(s(this,Qt)),s(this,z).subscribe(({current:e})=>{s(this,w).style.flexDirection=e==="x"?"row":"column",s(this,J).axis=s(this,$t).current?"max":e,s(this,Mt).dimension=e==="x"?"width":"height",s(this,at).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&s(this,Vt).call(this)}),s(this,$t).subscribe(e=>{s(this,J).axis=e.current?"max":s(this,z).current}),s(this,tt).subscribe(()=>{this.isConnected&&s(this,Vt).call(this)}),s(this,N).subscribe(({current:e})=>{this.isConnected&&(e?C(this,re,We).call(this):C(this,Ht,ne).call(this))}),s(this,et).subscribe(e=>{s(this,E).current=0,s(this,J).debounce=e.current,s(this,at).swipe=e.current,s(this,f).reset(),this.isConnected&&(e.current&&!e.previous?C(this,re,We).call(this):!e.current&&e.previous&&C(this,Ht,ne).call(this))}),s(this,D).subscribe(e=>{e.current?(this.isConnected&&(s(this,m).length||(s(this,N).current=!0)),s(this,m).length&&(s(this,f).max=1/0,s(this,f).min=-1/0)):(g(this,Jt,0),s(this,f).max=s(this,b),s(this,f).min=0)}),s(this,wt).subscribe(e=>{s(this,f).damping=e.current}),s(this,ce).subscribe(e=>{s(this,f).mass=e.current}),s(this,ue).subscribe(e=>{s(this,f).stiffness=e.current}),s(this,Ft).subscribe(e=>{e.current&&!e.previous?C(this,Me,Je).call(this):!e.current&&e.previous&&C(this,xe,Qe).call(this)}),s(this,Dt).subscribe(e=>{e.current&&!e.previous?C(this,de,ze).call(this):!e.current&&e.previous&&C(this,Se,Fe).call(this)}),s(this,f).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}))}get dampingCSSProperty(){return s(this,wt)}get maxxCSSProperty(){return s(this,ce)}get stiffnessCSSProperty(){return s(this,ue)}get mouseDragCSSProperty(){return s(this,zt)}get axisAttibute(){return s(this,z)}get pagesAttibute(){return s(this,tt)}get splitAttibute(){return s(this,N)}get sectionalAttibute(){return s(this,et)}get infiniteCSSProperty(){return s(this,D)}get dampingAttibute(){return s(this,wt)}get disabledAttibute(){return s(this,Ft)}get hibernatedAttibute(){return s(this,Dt)}get currentScrollValue(){return C(this,me,Re).call(this,"current")}get targetScrollValue(){return C(this,me,Re).call(this,"target")}get contentElement(){return s(this,w)}get sections(){return s(this,m)}get position(){return s(this,pe)}get contentPosition(){return s(this,fe)}get viewportSize(){return s(this,L)}get scrollSize(){return s(this,b)}get gap(){return s(this,U)}get counter(){return s(this,E)}get distance(){return s(this,bt)}get infiniteDistance(){return s(this,D).current?s(this,bt)+s(this,U):s(this,bt)}get overscroll(){return s(this,Jt)}get vertical(){return s(this,z).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get speed(){return s(this,f).speed}get direction(){return s(this,f).direction}get isRunning(){return s(this,f).isRunning}get scrollWidth(){return s(this,z).current==="y"?0:s(this,f).length}get scrollHeight(){return s(this,z).current==="x"?0:s(this,f).length}onScroll(...e){return s(this,f).subscribe(...e)}offScroll(...e){s(this,f).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(!s(this,m).length)return;const n=s(this,E).current;C(this,De,as).call(this,e);const h=s(this,m)[n],c=s(this,m)[s(this,E).current];if(h&&c){let u=0;const le=s(this,m).length-1;s(this,D).current?s(this,E).current===0&&n===le?u=s(this,b)+s(this,L)-h.position+s(this,U):s(this,E).current===le&&n===0?u=c.position-(s(this,b)+s(this,L)+s(this,U)):u=c.position-h.position:u=c.position-h.position,s(this,f).shift(u,i==="instant")}}shiftSections(e,i="smooth"){s(this,m).length&&this.scrollToSection(s(this,E).current+e,i)}setPosition(e,i="smooth"){s(this,f).set(e,i==="instant")}connectedCallback(){s(this,z).observe(),s(this,tt).observe(),s(this,N).observe(),s(this,et).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,wt).observe(),s(this,zt).observe(),s(this,Ft).observe(),s(this,Dt).observe(),C(this,Se,Fe).call(this)}disconnectedCallback(){s(this,z).unobserve(),s(this,tt).unobserve(),s(this,N).unobserve(),s(this,et).unobserve(),s(this,$t).unobserve(),s(this,D).unobserve(),s(this,wt).unobserve(),s(this,zt).unobserve(),s(this,Ft).unobserve(),s(this,Dt).unobserve(),C(this,de,ze).call(this)}};f=new WeakMap;z=new WeakMap;tt=new WeakMap;N=new WeakMap;et=new WeakMap;$t=new WeakMap;D=new WeakMap;wt=new WeakMap;ce=new WeakMap;ue=new WeakMap;zt=new WeakMap;Ft=new WeakMap;Dt=new WeakMap;w=new WeakMap;ke=new WeakMap;m=new WeakMap;pe=new WeakMap;fe=new WeakMap;L=new WeakMap;b=new WeakMap;U=new WeakMap;J=new WeakMap;Mt=new WeakMap;at=new WeakMap;E=new WeakMap;Jt=new WeakMap;bt=new WeakMap;Kt=new WeakMap;Nt=new WeakMap;re=new WeakSet;We=function(){C(this,Ht,ne).call(this),s(this,ke).assignedElements().forEach(r=>{r instanceof HTMLElement&&s(this,m).push(new xs(r,this))}),s(this,w).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),s(this,Vt).call(this)};Ht=new WeakSet;ne=function(){s(this,m).forEach(r=>{r.destroy()}),g(this,m,[]),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Me=new WeakSet;Je=function(){s(this,Kt)||(g(this,Kt,!0),s(this,f).unsubscribe(s(this,Ve)),s(this,f).unlistenAnimationFrame(),s(this,J).disconnect(),s(this,Mt).disconnect(),s(this,at).disconnect())};xe=new WeakSet;Qe=function(){s(this,Kt)&&(g(this,Kt,!1),s(this,f).subscribe(s(this,Ve)),s(this,J).connect(),s(this,Mt).connect(),s(this,at).connect())};de=new WeakSet;ze=function(){s(this,Nt)||(g(this,Nt,!0),Zt.windowResizer.unsubscribe(s(this,Vt)),s(this,f).reset(),C(this,Me,Je).call(this),s(this,w).style.transform="",s(this,N).current&&C(this,Ht,ne).call(this),Lt.scrollEntries.unregister(this))};Se=new WeakSet;Fe=function(){s(this,Nt)&&(g(this,Nt,!1),s(this,N).current&&C(this,re,We).call(this),Lt.scrollEntries.register(this),Zt.windowResizer.subscribe(s(this,Vt),Le.RESIZE_ORDER.SCROLL),C(this,xe,Qe).call(this))};Vt=new WeakMap;Ve=new WeakMap;De=new WeakSet;as=function(r){s(this,D).current?(s(this,E).current=r%s(this,m).length,s(this,E).current=s(this,E).current<0?s(this,m).length+s(this,E).current:s(this,E).current):s(this,E).current=It.clamp(r,0,s(this,m).length-1)};Qt=new WeakMap;me=new WeakSet;Re=function(r="current"){if(s(this,D).current&&s(this,m).length){const e=s(this,f)[r]%(s(this,b)+s(this,L)+s(this,U));return e<0?s(this,b)+e+s(this,L)+s(this,U):e}else return s(this,f)[r]};exports.ScrollElement=Ms([mt.define("e-scroll")],exports.ScrollElement);var he;class Oe extends mt.CustomElement{constructor(){super(...arguments);$(this,he,null)}get scrollElement(){return a(this,he)}connectedCallback(){const i=Es.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?R(this,he,i):console.error(this,"e-scroll not found")}}he=new WeakMap;var Vs=Object.defineProperty,Os=Object.getOwnPropertyDescriptor,$s=(r,e,i,n)=>{for(var h=n>1?void 0:n?Os(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Vs(e,i,h),h},ls=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},p=(r,e,i)=>(ls(r,e,"read from private field"),i?i.call(r):e.get(r)),G=(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)},vt=(r,e,i,n)=>(ls(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Xt,F,st,it,Yt,jt,Rt,ve,ge,we;const zs=Ke.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:is.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:is.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Oe{constructor(){super(),G(this,Xt,null),G(this,F,null),G(this,st,!1),G(this,it,0),G(this,Yt,0),G(this,jt,0),G(this,Rt,()=>{vt(this,st,this.offsetWidth>this.offsetHeight);const e=p(this,st)?this.offsetWidth:this.offsetHeight;vt(this,it,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),vt(this,it,Math.max(p(this,it),30)),p(this,st)?(p(this,F).style.width=p(this,it)+"px",p(this,F).style.height="100%"):(p(this,F).style.width="100%",p(this,F).style.height=p(this,it)+"px"),vt(this,Yt,e-p(this,it)),this.scrollElement.scrollSize||(this.style.display="none")}),G(this,ve,()=>{vt(this,jt,this.scrollElement.currentProgress*p(this,Yt)),p(this,st)?p(this,F).style.transform=`translate3d(${p(this,jt)}px, 0px, 0px)`:p(this,F).style.transform=`translate3d(0px, ${p(this,jt)}px, 0px)`}),G(this,ge,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),G(this,we,e=>{document.documentElement.classList.add("grabbing"),Ps.setupDrag(h=>{const c=p(this,st)?h.x:h.y,u=this.scrollElement.distance/p(this,Yt),le=(c-n)*u;this.scrollElement.setPosition(i+le)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=p(this,st)?e.x:e.y}),Ze.isBrowser&&(this.openShadow(zs),B.element(this,{slot:"static","drag-dead-zone":"",children:[B.slot({ref:e=>vt(this,Xt,e),children:B.div({class:"default-thumb"})})]}))}get thumbElement(){return p(this,F)}connectedCallback(){super.connectedCallback();const e=p(this,Xt).assignedElements()[0]||p(this,Xt).firstElementChild;vt(this,F,e),p(this,F).addEventListener("pointerdown",p(this,we)),Zt.windowResizer.subscribe(p(this,Rt),Le.RESIZE_ORDER.SCROLL+1),rs.elementResizer.subscribe(this,p(this,Rt)),this.scrollElement.onScroll(p(this,ve)),this.scrollElement.axisAttibute.subscribe(p(this,ge))}disconnectedCallback(){p(this,F).removeEventListener("pointerdown",p(this,we)),Zt.windowResizer.unsubscribe(p(this,Rt)),rs.elementResizer.unsubscribe(p(this,Rt)),this.scrollElement.offScroll(p(this,ve)),this.scrollElement.axisAttibute.unsubscribe(p(this,ge))}};Xt=new WeakMap;F=new WeakMap;st=new WeakMap;it=new WeakMap;Yt=new WeakMap;jt=new WeakMap;Rt=new WeakMap;ve=new WeakMap;ge=new WeakMap;we=new WeakMap;exports.ScrollbarElement=$s([mt.define("e-scrollbar")],exports.ScrollbarElement);const Fs=Ke.createStylesheet({button:{all:"inherit"}});class cs extends Oe{constructor(){super(),this.openShadow(Fs),Ze.isBrowser&&B.element(this,{children:[B.button({onClick:()=>{this.handleClick()},children:[B.slot()]})]})}}var Ds=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,As=(r,e,i,n)=>{for(var h=n>1?void 0:n?Rs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ds(e,i,h),h};exports.ScrollSetButtonElement=class extends cs{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=As([mt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var Ts=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,qs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Bs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ts(e,i,h),h};exports.ScrollStepButtonElement=class extends cs{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=qs([mt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var Is=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,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Is(e,i,h),h},us=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ot=(r,e,i)=>(us(r,e,"read from private field"),i?i.call(r):e.get(r)),ns=(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)},hs=(r,e,i,n)=>(us(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),_t,te,j,dt,Gt,oe,ae,Ut;class Us{constructor(e,i,n){$(this,j,void 0);$(this,dt,void 0);$(this,Gt,void 0);$(this,oe,void 0);$(this,ae,()=>{a(this,dt).scrollToSection(a(this,Gt),a(this,oe))});$(this,Ut,()=>{a(this,j).classList.toggle("current",a(this,dt).counter.current===a(this,Gt))});R(this,j,document.createElement("button")),R(this,dt,e),R(this,oe,n),R(this,Gt,i),a(this,j).addEventListener("click",a(this,ae)),a(this,dt).counter.subscribe(a(this,Ut)),a(this,Ut).call(this)}get element(){return a(this,j)}destroy(){a(this,j).removeEventListener("click",a(this,ae)),a(this,dt).counter.unsubscribe(a(this,Ut)),a(this,j).remove()}}j=new WeakMap,dt=new WeakMap,Gt=new WeakMap,oe=new WeakMap,ae=new WeakMap,Ut=new WeakMap;exports.ScrollBulletButtonsElement=class extends Oe{constructor(){super(...arguments),ns(this,_t,[]),ns(this,te,os.debounce(()=>{Ot(this,_t).forEach(e=>e.destroy()),hs(this,_t,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Us(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ot(this,_t).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ot(this,te)),Ot(this,te).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ot(this,te)),Ot(this,_t).forEach(e=>e.destroy()),hs(this,_t,[])}};_t=new WeakMap;te=new WeakMap;exports.ScrollBulletButtonsElement=Gs([mt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var Zs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Ns=(r,e,i,n)=>{for(var h=n>1?void 0:n?Ks(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Zs(e,i,h),h},Xe=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(Xe(r,e,"read from private field"),i?i.call(r):e.get(r)),o=(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)},d=(r,e,i,n)=>(Xe(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),_=(r,e,i)=>(Xe(r,e,"access private method"),i),At,Ct,yt,Pt,Et,O,q,I,H,Wt,M,lt,ct,nt,ht,ot,Tt,ee,W,K,Z,ut,pt,Q,be,v,Bt,qt,_e,T,X,x,k,A,se,xt,y,Ce,Ae,Ye,ps,Te,fs,Be,ds,qe,Ss,Ie,ms,He,vs,Ge,gs,ye,ie,rt,kt,je,ws,ts,bs,Pe,Ue,Ee;exports.ScrollSegmentElement=class extends Oe{constructor(){super(...arguments),o(this,Ce),o(this,Ye),o(this,Te),o(this,Be),o(this,qe),o(this,Ie),o(this,He),o(this,Ge),o(this,rt),o(this,je),o(this,ts),o(this,Pe),o(this,At,new S.CSSProperty(this,"--target","")),o(this,Ct,new S.CSSProperty(this,"--disabled",!1)),o(this,yt,new S.CSSProperty(this,"--distance-offset",0)),o(this,Pt,new S.CSSProperty(this,"--start-offset",0)),o(this,Et,new S.CSSProperty(this,"--capture-once",!1)),o(this,O,new S.CSSProperty(this,"--captured","")),o(this,q,new S.CSSProperty(this,"--released","")),o(this,I,new S.CSSProperty(this,"--captured-from-start","")),o(this,H,new S.CSSProperty(this,"--captured-from-finish","")),o(this,Wt,new S.CSSProperty(this,"--released-from-start","")),o(this,M,new S.CSSProperty(this,"--released-from-finish","")),o(this,lt,new S.CSSProperty(this,"--passed-var","")),o(this,ct,new S.CSSProperty(this,"--progress-var","")),o(this,nt,new S.CSSProperty(this,"--distance-var","")),o(this,ht,new S.CSSProperty(this,"--start-var","")),o(this,ot,new S.CSSProperty(this,"--finish-var","")),o(this,Tt,new S.CSSProperty(this,"--smoothstep",!1)),o(this,ee,new S.CSSProperty(this,"--smootherstep",!1)),o(this,W,new gt.Store(!1)),o(this,K,new gt.Store(!1)),o(this,Z,new gt.Store(!1)),o(this,ut,new gt.Store(!1)),o(this,pt,new gt.Store(!1)),o(this,Q,new gt.Store(!1)),o(this,be,[]),o(this,v,this),o(this,Bt,0),o(this,qt,0),o(this,_e,0),o(this,T,0),o(this,X,0),o(this,x,0),o(this,k,0),o(this,A,0),o(this,se,!1),o(this,xt,!1),o(this,y,!0),o(this,ye,()=>{t(this,y)||(this.resize(),t(this,ie).call(this))}),o(this,ie,()=>{!t(this,y)&&t(this,se)&&this.tick()}),o(this,Ee,os.debounce(()=>{const e=Lt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),d(this,be,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return t(this,yt)}get startOffsetCSSProperty(){return t(this,Pt)}get captureOnceCSSProperty(){return t(this,Et)}get capturedCSSProperty(){return t(this,O)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,I)}get capturedFromFinishCSSProperty(){return t(this,H)}get releasedFromStartCSSProperty(){return t(this,Wt)}get releasedFromFinishCSSProperty(){return t(this,M)}get passedVarCSSProperty(){return t(this,lt)}get progressVarCSSProperty(){return t(this,ct)}get distanceVarCSSProperty(){return t(this,nt)}get startVarCSSProperty(){return t(this,ht)}get finishVarCSSProperty(){return t(this,ot)}get smoothstepCSSProperty(){return t(this,Tt)}get smootherstepCSSProperty(){return t(this,ee)}get disabledCSSProperty(){return t(this,Ct)}get targetCSSProperty(){return t(this,At)}get isCaptured(){return t(this,W)}get isReleased(){return t(this,K)}get isCapturedFromStart(){return t(this,Z)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,pt)}get isReleasedFromFinish(){return t(this,Q)}get directionPosition(){return t(this,Bt)}get directionSize(){return t(this,qt)}get passed(){return t(this,T)}get progress(){return t(this,X)}get start(){return t(this,x)}get finish(){return t(this,A)}get distance(){return t(this,k)}get isCapturedOnce(){return t(this,xt)}get isDisabled(){return t(this,y)}resize(){d(this,qt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),d(this,Bt,this.scrollElement.vertical?St.getCumulativeOffsetTop(this,this.scrollElement):St.getCumulativeOffsetLeft(this,this.scrollElement)),d(this,x,this.getStart()),d(this,k,this.getDistance()),d(this,x,t(this,x)+t(this,Pt).current),d(this,k,t(this,k)+t(this,yt).current),d(this,A,t(this,x)+t(this,k)),this.scrollElement.currentScrollValue>t(this,A)&&!t(this,W).current&&!t(this,K).current&&(t(this,W).current=!0),this.setVar(t(this,ht).current,t(this,x)),this.setVar(t(this,ot).current,t(this,A)),this.setVar(t(this,nt).current,t(this,k)),d(this,se,!0)}tick(){let e=this.scrollElement.currentScrollValue;t(this,be).forEach(n=>{e+=n.value}),d(this,T,this.updateValue(e-t(this,x),0,t(this,k))||0),d(this,X,t(this,T)/t(this,k)||0);const i=Math.round(e);t(this,W).current&&(i>t(this,x)?t(this,Z).current||_(this,qe,Ss).call(this):t(this,Z).current&&!t(this,ut).current&&_(this,He,vs).call(this),i<t(this,A)?t(this,Q).current&&!t(this,pt).current&&_(this,Ie,ms).call(this):t(this,Z).current&&!t(this,Q).current&&_(this,Ge,gs).call(this)),i>t(this,x)&&i<t(this,A)?(_(this,Ce,Ae).call(this),t(this,W).current||_(this,Te,fs).call(this)):t(this,W).current&&(d(this,T,It.step(t(this,k)/2,t(this,T),0,t(this,k))),d(this,X,t(this,T)/t(this,k)),_(this,Ce,Ae).call(this),_(this,Be,ds).call(this)),t(this,xt)&&t(this,Et).current&&(t(this,O).current&&t(this,v).classList.add(t(this,O).current),d(this,y,!0))}disable(){this.style.cssText="",d(this,Bt,0),d(this,qt,0),d(this,T,0),d(this,X,0),d(this,x,0),d(this,k,0),d(this,A,0),d(this,se,!1),t(this,W).current=!1,t(this,K).current=!1,t(this,Z).current=!1,t(this,ut).current=!1,t(this,pt).current=!1,t(this,Q).current=!1,d(this,xt,!1),d(this,y,!0),_(this,Pe,Ue).call(this)}enable(){d(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,At).observe(),t(this,Ct).observe(),t(this,yt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,O).observe(),t(this,q).observe(),t(this,I).observe(),t(this,H).observe(),t(this,Wt).observe(),t(this,M).observe(),t(this,lt).observe(),t(this,ct).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,Tt).observe(),t(this,ee).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",t(this,Ee)),t(this,Ee).call(this),t(this,Ct).current||this.enable(),t(this,At).subscribe(i=>{i.previous&&_(this,Pe,Ue).call(this),i.current?i.current==="parent"?d(this,v,this.parentElement||this):d(this,v,document.querySelector(i.current)||this):d(this,v,this)}),t(this,Ct).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,Pt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,yt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,O).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,I).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,H).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,q).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,Wt).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,M).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,Et).subscribe(i=>{t(this,y)||!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,lt).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,this.passed))}),t(this,ct).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,X)))}),t(this,ht).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,x)))}),t(this,ot).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,A)))}),t(this,nt).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,k)))}),Zt.windowResizer.subscribe(t(this,ye),Le.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,ie)),e=!0}disconnectedCallback(){Zt.windowResizer.unsubscribe(t(this,ye)),this.scrollElement.offScroll(t(this,ie)),t(this,At).close(),t(this,Ct).close(),t(this,yt).close(),t(this,Pt).close(),t(this,Et).close(),t(this,O).close(),t(this,q).close(),t(this,I).close(),t(this,H).close(),t(this,Wt).close(),t(this,M).close(),t(this,lt).close(),t(this,ct).close(),t(this,nt).close(),t(this,ht).close(),t(this,ot).close(),t(this,Tt).close(),t(this,ee).close(),t(this,W).close(),t(this,K).close(),t(this,Z).close(),t(this,ut).close(),t(this,pt).close(),t(this,Q).close(),this.disable()}removeVar(e){e&&t(this,v).style.removeProperty(`--${e}`)}setVar(e,i){e&&t(this,v).style.setProperty(`--${e}`,i.toString())}updateValue(e,i=0,n=1){return this.smootherstepCSSProperty.current?It.smootherstep(e,i,n)*n:t(this,Tt).current?It.smoothstep(e,i,n)*n:It.clamp(e,i,n)}getDistance(){return t(this,qt)+t(this,_e)}getStart(){return t(this,Bt)-t(this,_e)}};At=new WeakMap;Ct=new WeakMap;yt=new WeakMap;Pt=new WeakMap;Et=new WeakMap;O=new WeakMap;q=new WeakMap;I=new WeakMap;H=new WeakMap;Wt=new WeakMap;M=new WeakMap;lt=new WeakMap;ct=new WeakMap;nt=new WeakMap;ht=new WeakMap;ot=new WeakMap;Tt=new WeakMap;ee=new WeakMap;W=new WeakMap;K=new WeakMap;Z=new WeakMap;ut=new WeakMap;pt=new WeakMap;Q=new WeakMap;be=new WeakMap;v=new WeakMap;Bt=new WeakMap;qt=new WeakMap;_e=new WeakMap;T=new WeakMap;X=new WeakMap;x=new WeakMap;k=new WeakMap;A=new WeakMap;se=new WeakMap;xt=new WeakMap;y=new WeakMap;Ce=new WeakSet;Ae=function(){_(this,Ye,ps).call(this),this.setVar(t(this,lt).current,t(this,T)),this.setVar(t(this,ct).current,t(this,X))};Ye=new WeakSet;ps=function(){this.dispatchEvent(new CustomEvent("segmentPass",{detail:{distance:t(this,k),start:t(this,x),finish:t(this,A),passed:t(this,T),progress:t(this,X)}}))};Te=new WeakSet;fs=function(){t(this,W).current=!0,t(this,K).current=!1,d(this,xt,!0),t(this,q).current&&t(this,v).classList.remove(t(this,q).current),t(this,M).current&&t(this,v).classList.remove(t(this,M).current),t(this,M).current&&t(this,v).classList.remove(t(this,M).current),t(this,O).current&&t(this,v).classList.add(t(this,O).current)};Be=new WeakSet;ds=function(){t(this,K).current=!0,t(this,W).current=!1,d(this,xt,!0),t(this,O).current&&t(this,v).classList.remove(t(this,O).current),t(this,I).current&&t(this,v).classList.remove(t(this,I).current),t(this,H).current&&t(this,v).classList.remove(t(this,H).current),t(this,q).current&&t(this,v).classList.add(t(this,q).current)};qe=new WeakSet;Ss=function(){t(this,W).current=!0,t(this,Z).current=!0,t(this,ut).current=!1,t(this,I).current&&t(this,v).classList.add(t(this,I).current)};Ie=new WeakSet;ms=function(){t(this,W).current=!0,t(this,pt).current=!0,t(this,Q).current=!1,t(this,H).current&&t(this,v).classList.add(t(this,H).current)};He=new WeakSet;vs=function(){t(this,K).current=!0,t(this,ut).current=!0,t(this,Z).current=!1,t(this,M).current&&t(this,v).classList.add(t(this,M).current)};Ge=new WeakSet;gs=function(){t(this,K).current=!0,t(this,Q).current=!0,t(this,pt).current=!1,t(this,M).current&&t(this,v).classList.add(t(this,M).current)};ye=new WeakMap;ie=new WeakMap;rt=new WeakSet;kt=function(r){if(t(this,y)){r.previous&&t(this,v).classList.remove(r.previous),r.current&&t(this,v).classList.remove(r.current);return}r.current&&t(this,W).current?(r.previous&&t(this,v).classList.remove(r.previous),t(this,v).classList.add(r.current)):!r.current&&r.previous&&t(this,v).classList.remove(r.previous)};je=new WeakSet;ws=function(...r){r.forEach(e=>{e&&t(this,v).classList.remove(e)})};ts=new WeakSet;bs=function(...r){r.forEach(e=>{e&&t(this,v).style.removeProperty(`--${e}`)})};Pe=new WeakSet;Ue=function(){_(this,je,ws).call(this,t(this,O).current,t(this,I).current,t(this,H).current,t(this,q).current,t(this,Wt).current,t(this,M).current),_(this,ts,bs).call(this,t(this,lt).current,t(this,ct).current,t(this,nt).current,t(this,ht).current,t(this,ot).current)};Ee=new WeakMap;exports.ScrollSegmentElement=Ns([mt.define("e-scroll-segment")],exports.ScrollSegmentElement);
|
|
1
|
+
"use strict";var es=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var a=(r,e,i)=>(es(r,e,"read from private field"),i?i.call(r):e.get(r)),$=(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)},R=(r,e,i,n)=>(es(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _s=require("../Damped-DK3CSBXb.cjs"),Ze=require("../browser-CpzFX2xg.cjs"),St=require("../layout-8ryRAMGJ.cjs"),It=require("../math-GDWEqu7y.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const gt=require("../Store-BQGNOHlY.cjs"),Cs=require("../Derived-BZtlW0bB.cjs");require("../ticker/index.cjs");const $e=require("../DragControls-CV1YozSr.cjs"),mt=require("../custom-element/index.cjs"),Le=require("../order/index.cjs"),Zt=require("../window-resizer/index.cjs"),Lt=require("../scroll-entries/index.cjs"),q=require("../tags-CueX-JLX.cjs"),Ke=require("../createStylesheet-C8aQQ4hd.cjs"),ss=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),ys=require("../Viewport-_WllZTJ0.cjs"),Ps=require("../gestures-DHLrn6Q8.cjs"),Es=require("../dom-JBOkFLTh.cjs"),is=require("../theme/index.cjs"),rs=require("../element-resizer/index.cjs"),os=require("../function-MthRj-GJ.cjs");var ks=Object.defineProperty,Ws=Object.getOwnPropertyDescriptor,Ms=(r,e,i,n)=>{for(var h=n>1?void 0:n?Ws(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&ks(e,i,h),h},Ne=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(Ne(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)},g=(r,e,i,n)=>(Ne(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),C=(r,e,i)=>(Ne(r,e,"access private method"),i),f,z,tt,N,et,$t,D,wt,ce,ue,zt,Ft,Dt,w,ke,m,pe,fe,L,b,U,J,Mt,at,E,Jt,bt,Kt,Nt,re,We,Ht,ne,Me,Je,xe,Qe,de,ze,Se,Fe,Vt,Ve,De,as,Qt,me,Re,V,P,ft,Y;class xs{constructor(e,i){$(this,V,void 0);$(this,P,void 0);$(this,ft,0);$(this,Y,0);R(this,V,e),R(this,P,i),Lt.scrollEntries.register(a(this,V))}get size(){return a(this,ft)}get position(){return a(this,Y)}destroy(){Lt.scrollEntries.unregister(a(this,V)),a(this,V).style.transform=""}resize(){R(this,ft,a(this,P).vertical?a(this,V).offsetHeight:a(this,V).offsetWidth),R(this,Y,a(this,P).vertical?St.getCumulativeOffsetTop(a(this,V)):St.getCumulativeOffsetLeft(a(this,V))),R(this,Y,a(this,Y)-a(this,P).contentPosition)}transform(){let e=0;const i=a(this,P).viewportSize-a(this,ft);a(this,P).infiniteCSSProperty.current&&a(this,P).overscroll&&a(this,Y)+a(this,ft)<a(this,P).currentScrollValue&&(e=a(this,P).distance*-1-a(this,P).gap),Lt.scrollEntries.update(a(this,V),a(this,P).axisAttibute.current,e);const n=a(this,P).currentScrollValue+e,h=a(this,Y)-a(this,P).viewportSize-i,c=a(this,Y)+a(this,ft)+i,u=It.clamp(n,h,c);a(this,P).vertical?a(this,V).style.transform=`translate3d(0px, ${u*-1}px, 0px)`:a(this,V).style.transform=`translate3d(${u*-1}px, 0px, 0px)`}}V=new WeakMap,P=new WeakMap,ft=new WeakMap,Y=new WeakMap;const Ls=Ke.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends mt.CustomElement{constructor(){super(),l(this,re),l(this,Ht),l(this,Me),l(this,xe),l(this,de),l(this,Se),l(this,De),l(this,me),l(this,f,null),l(this,z,new S.CSSProperty(this,"--axis","y")),l(this,tt,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),l(this,N,new S.CSSProperty(this,"--split",!1)),l(this,et,new S.CSSProperty(this,"--sectional",!1)),l(this,$t,new S.CSSProperty(this,"--wheel-max-delta",!1)),l(this,D,new S.CSSProperty(this,"--infinite",!1)),l(this,wt,new S.CSSProperty(this,"--damping",20)),l(this,ce,new S.CSSProperty(this,"--mass",0)),l(this,ue,new S.CSSProperty(this,"--stiffness",0)),l(this,zt,new S.CSSProperty(this,"--mouse-drag",!1)),l(this,Ft,new S.CSSProperty(this,"--disabled",!1)),l(this,Dt,new S.CSSProperty(this,"--hibernated",!1)),l(this,w,null),l(this,ke,null),l(this,m,[]),l(this,pe,0),l(this,fe,0),l(this,L,0),l(this,b,0),l(this,U,0),l(this,J,null),l(this,Mt,null),l(this,at,null),l(this,E,new gt.Store(0)),l(this,Jt,0),l(this,bt,0),l(this,Kt,!0),l(this,Nt,!0),l(this,Vt,()=>{const e=this.currentScrollValue/s(this,b)||0;if(g(this,pe,this.vertical?St.getCumulativeOffsetTop(this):St.getCumulativeOffsetLeft(this)),g(this,fe,this.vertical?St.getCumulativeOffsetTop(s(this,w)):St.getCumulativeOffsetLeft(s(this,w))),g(this,L,this.vertical?this.offsetHeight:this.offsetWidth),s(this,tt).current){g(this,b,s(this,L)*s(this,tt).current);const i=s(this,b)+s(this,L);this.vertical?(s(this,w).style.width=i+"px",s(this,w).style.height="100%"):(s(this,w).style.height=i+"px",s(this,w).style.width="100%")}else this.vertical?(s(this,w).style.width="100%",s(this,w).style.height="max-content",g(this,b,s(this,w).offsetHeight-s(this,L))):(s(this,w).style.width="max-content",s(this,w).style.height="100%",g(this,b,s(this,w).offsetWidth-s(this,L)));if(this.vertical?g(this,U,ss.cssUnitParser.parse(getComputedStyle(s(this,w)).rowGap)):g(this,U,ss.cssUnitParser.parse(getComputedStyle(s(this,w)).columnGap)),!s(this,D).current){const i=getComputedStyle(this);g(this,b,s(this,b)+(this.vertical?parseFloat(i.paddingBlockStart)+parseFloat(i.paddingBlockEnd):parseFloat(i.paddingInlineStart)+parseFloat(i.paddingInlineEnd))),s(this,f).max=s(this,b)}if(s(this,m).forEach(i=>{i.resize(),i.transform()}),s(this,D).current&&s(this,m).length){const i=s(this,m)[s(this,m).length-1],n=i.position+i.size-s(this,L),h=s(this,b)-n;g(this,bt,i.position+i.size+h)}else g(this,bt,s(this,b));if(s(this,et).current&&s(this,m).length){const i=s(this,m)[s(this,E).current];s(this,f).set(i.position,!0)}else s(this,f).set(e*s(this,b),!0)}),l(this,Ve,()=>{const e=this.currentScrollValue;if(g(this,Jt,Math.max(0,e-s(this,b))),s(this,m).length){let i=0;for(let n=0;n<s(this,m).length;n++){const h=s(this,m)[n];h.transform(),this.targetScrollValue+this.viewportSize/2>=h.position&&(i=n)}s(this,E).current=i}else this.vertical?s(this,w).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:s(this,w).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Lt.scrollEntries.update(this,s(this,z).current,e)}),l(this,Qt,(e,i)=>{if(!(e==="drag"&&!ys.device.isMobile&&!s(this,zt).current))if(s(this,et).current){const n=Math.sign(i);s(this,m).length?this.shiftSections(n):s(this,f).shift(n*s(this,L))}else s(this,f).shift(i)}),Ze.isBrowser&&(g(this,f,new _s.Damped(0,{damping:.01,min:0,order:Le.TICK_ORDER.SCROLL})),this.openShadow(Ls),q.element(this,{tabIndex:0,children:[q.div({class:"static",children:[q.slot({name:"static"})]}),q.div({class:"content",children:[q.slot({ref:e=>g(this,ke,e)})],style:{flexDirection:new Cs.Derived(s(this,z),e=>e==="x"?"row":"column")},ref:e=>g(this,w,e)})]}),g(this,J,new $e.WheelControls({element:this})),s(this,J).changeEvent.subscribe(s(this,Qt)),g(this,Mt,new $e.KeyboardControls({element:this})),s(this,Mt).changeEvent.subscribe(s(this,Qt)),g(this,at,new $e.DragControls({element:this})),s(this,at).changeEvent.subscribe(s(this,Qt)),s(this,z).subscribe(({current:e})=>{s(this,w).style.flexDirection=e==="x"?"row":"column",s(this,J).axis=s(this,$t).current?"max":e,s(this,Mt).dimension=e==="x"?"width":"height",s(this,at).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&s(this,Vt).call(this)}),s(this,$t).subscribe(e=>{s(this,J).axis=e.current?"max":s(this,z).current}),s(this,tt).subscribe(()=>{this.isConnected&&s(this,Vt).call(this)}),s(this,N).subscribe(({current:e})=>{this.isConnected&&(e?C(this,re,We).call(this):C(this,Ht,ne).call(this))}),s(this,et).subscribe(e=>{s(this,E).current=0,s(this,J).debounce=e.current,s(this,at).swipe=e.current,s(this,f).reset(),this.isConnected&&(e.current&&!e.previous?C(this,re,We).call(this):!e.current&&e.previous&&C(this,Ht,ne).call(this))}),s(this,D).subscribe(e=>{e.current?(this.isConnected&&(s(this,m).length||(s(this,N).current=!0)),s(this,m).length&&(s(this,f).max=1/0,s(this,f).min=-1/0)):(g(this,Jt,0),s(this,f).max=s(this,b),s(this,f).min=0)}),s(this,wt).subscribe(e=>{s(this,f).damping=e.current}),s(this,ce).subscribe(e=>{s(this,f).mass=e.current}),s(this,ue).subscribe(e=>{s(this,f).stiffness=e.current}),s(this,Ft).subscribe(e=>{e.current&&!e.previous?C(this,Me,Je).call(this):!e.current&&e.previous&&C(this,xe,Qe).call(this)}),s(this,Dt).subscribe(e=>{e.current&&!e.previous?C(this,de,ze).call(this):!e.current&&e.previous&&C(this,Se,Fe).call(this)}),s(this,f).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}))}get dampingCSSProperty(){return s(this,wt)}get maxxCSSProperty(){return s(this,ce)}get stiffnessCSSProperty(){return s(this,ue)}get mouseDragCSSProperty(){return s(this,zt)}get axisAttibute(){return s(this,z)}get pagesAttibute(){return s(this,tt)}get splitAttibute(){return s(this,N)}get sectionalAttibute(){return s(this,et)}get infiniteCSSProperty(){return s(this,D)}get dampingAttibute(){return s(this,wt)}get disabledAttibute(){return s(this,Ft)}get hibernatedAttibute(){return s(this,Dt)}get currentScrollValue(){return C(this,me,Re).call(this,"current")}get targetScrollValue(){return C(this,me,Re).call(this,"target")}get contentElement(){return s(this,w)}get sections(){return s(this,m)}get position(){return s(this,pe)}get contentPosition(){return s(this,fe)}get viewportSize(){return s(this,L)}get scrollSize(){return s(this,b)}get gap(){return s(this,U)}get counter(){return s(this,E)}get distance(){return s(this,bt)}get infiniteDistance(){return s(this,D).current?s(this,bt)+s(this,U):s(this,bt)}get overscroll(){return s(this,Jt)}get vertical(){return s(this,z).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get speed(){return s(this,f).speed}get direction(){return s(this,f).direction}get isRunning(){return s(this,f).isRunning}get scrollWidth(){return s(this,z).current==="y"?0:s(this,f).length}get scrollHeight(){return s(this,z).current==="x"?0:s(this,f).length}onScroll(...e){return s(this,f).subscribe(...e)}offScroll(...e){s(this,f).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(!s(this,m).length)return;const n=s(this,E).current;C(this,De,as).call(this,e);const h=s(this,m)[n],c=s(this,m)[s(this,E).current];if(h&&c){let u=0;const le=s(this,m).length-1;s(this,D).current?s(this,E).current===0&&n===le?u=s(this,b)+s(this,L)-h.position+s(this,U):s(this,E).current===le&&n===0?u=c.position-(s(this,b)+s(this,L)+s(this,U)):u=c.position-h.position:u=c.position-h.position,s(this,f).shift(u,i==="instant")}}shiftSections(e,i="smooth"){s(this,m).length&&this.scrollToSection(s(this,E).current+e,i)}setPosition(e,i="smooth"){s(this,f).set(e,i==="instant")}connectedCallback(){s(this,z).observe(),s(this,tt).observe(),s(this,N).observe(),s(this,et).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,wt).observe(),s(this,zt).observe(),s(this,Ft).observe(),s(this,Dt).observe(),C(this,Se,Fe).call(this)}disconnectedCallback(){s(this,z).unobserve(),s(this,tt).unobserve(),s(this,N).unobserve(),s(this,et).unobserve(),s(this,$t).unobserve(),s(this,D).unobserve(),s(this,wt).unobserve(),s(this,zt).unobserve(),s(this,Ft).unobserve(),s(this,Dt).unobserve(),C(this,de,ze).call(this)}};f=new WeakMap;z=new WeakMap;tt=new WeakMap;N=new WeakMap;et=new WeakMap;$t=new WeakMap;D=new WeakMap;wt=new WeakMap;ce=new WeakMap;ue=new WeakMap;zt=new WeakMap;Ft=new WeakMap;Dt=new WeakMap;w=new WeakMap;ke=new WeakMap;m=new WeakMap;pe=new WeakMap;fe=new WeakMap;L=new WeakMap;b=new WeakMap;U=new WeakMap;J=new WeakMap;Mt=new WeakMap;at=new WeakMap;E=new WeakMap;Jt=new WeakMap;bt=new WeakMap;Kt=new WeakMap;Nt=new WeakMap;re=new WeakSet;We=function(){C(this,Ht,ne).call(this),s(this,ke).assignedElements().forEach(r=>{r instanceof HTMLElement&&s(this,m).push(new xs(r,this))}),s(this,w).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),s(this,Vt).call(this)};Ht=new WeakSet;ne=function(){s(this,m).forEach(r=>{r.destroy()}),g(this,m,[]),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Me=new WeakSet;Je=function(){s(this,Kt)||(g(this,Kt,!0),s(this,f).unsubscribe(s(this,Ve)),s(this,f).unlistenAnimationFrame(),s(this,J).disconnect(),s(this,Mt).disconnect(),s(this,at).disconnect())};xe=new WeakSet;Qe=function(){s(this,Kt)&&(g(this,Kt,!1),s(this,f).subscribe(s(this,Ve)),s(this,J).connect(),s(this,Mt).connect(),s(this,at).connect())};de=new WeakSet;ze=function(){s(this,Nt)||(g(this,Nt,!0),Zt.windowResizer.unsubscribe(s(this,Vt)),s(this,f).reset(),C(this,Me,Je).call(this),s(this,w).style.transform="",s(this,N).current&&C(this,Ht,ne).call(this),Lt.scrollEntries.unregister(this))};Se=new WeakSet;Fe=function(){s(this,Nt)&&(g(this,Nt,!1),s(this,N).current&&C(this,re,We).call(this),Lt.scrollEntries.register(this),Zt.windowResizer.subscribe(s(this,Vt),Le.RESIZE_ORDER.SCROLL),C(this,xe,Qe).call(this))};Vt=new WeakMap;Ve=new WeakMap;De=new WeakSet;as=function(r){s(this,D).current?(s(this,E).current=r%s(this,m).length,s(this,E).current=s(this,E).current<0?s(this,m).length+s(this,E).current:s(this,E).current):s(this,E).current=It.clamp(r,0,s(this,m).length-1)};Qt=new WeakMap;me=new WeakSet;Re=function(r="current"){if(s(this,D).current&&s(this,m).length){const e=s(this,f)[r]%(s(this,b)+s(this,L)+s(this,U));return e<0?s(this,b)+e+s(this,L)+s(this,U):e}else return s(this,f)[r]};exports.ScrollElement=Ms([mt.define("e-scroll")],exports.ScrollElement);var he;class Oe extends mt.CustomElement{constructor(){super(...arguments);$(this,he,null)}get scrollElement(){return a(this,he)}connectedCallback(){const i=Es.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?R(this,he,i):console.error(this,"e-scroll not found")}}he=new WeakMap;var Vs=Object.defineProperty,Os=Object.getOwnPropertyDescriptor,$s=(r,e,i,n)=>{for(var h=n>1?void 0:n?Os(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Vs(e,i,h),h},ls=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},p=(r,e,i)=>(ls(r,e,"read from private field"),i?i.call(r):e.get(r)),G=(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)},vt=(r,e,i,n)=>(ls(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Xt,F,st,it,Yt,jt,Rt,ve,ge,we;const zs=Ke.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:is.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:is.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Oe{constructor(){super(),G(this,Xt,null),G(this,F,null),G(this,st,!1),G(this,it,0),G(this,Yt,0),G(this,jt,0),G(this,Rt,()=>{vt(this,st,this.offsetWidth>this.offsetHeight);const e=p(this,st)?this.offsetWidth:this.offsetHeight;vt(this,it,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),vt(this,it,Math.max(p(this,it),30)),p(this,st)?(p(this,F).style.width=p(this,it)+"px",p(this,F).style.height="100%"):(p(this,F).style.width="100%",p(this,F).style.height=p(this,it)+"px"),vt(this,Yt,e-p(this,it)),this.scrollElement.scrollSize||(this.style.display="none")}),G(this,ve,()=>{vt(this,jt,this.scrollElement.currentProgress*p(this,Yt)),p(this,st)?p(this,F).style.transform=`translate3d(${p(this,jt)}px, 0px, 0px)`:p(this,F).style.transform=`translate3d(0px, ${p(this,jt)}px, 0px)`}),G(this,ge,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),G(this,we,e=>{document.documentElement.classList.add("grabbing"),Ps.setupDrag(h=>{const c=p(this,st)?h.x:h.y,u=this.scrollElement.distance/p(this,Yt),le=(c-n)*u;this.scrollElement.setPosition(i+le)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=p(this,st)?e.x:e.y}),Ze.isBrowser&&(this.openShadow(zs),q.element(this,{slot:"static","drag-dead-zone":"",children:[q.slot({ref:e=>vt(this,Xt,e),children:q.div({class:"default-thumb"})})]}))}get thumbElement(){return p(this,F)}connectedCallback(){super.connectedCallback();const e=p(this,Xt).assignedElements()[0]||p(this,Xt).firstElementChild;vt(this,F,e),p(this,F).addEventListener("pointerdown",p(this,we)),Zt.windowResizer.subscribe(p(this,Rt),Le.RESIZE_ORDER.SCROLL+1),rs.elementResizer.subscribe(this,p(this,Rt)),this.scrollElement.onScroll(p(this,ve)),this.scrollElement.axisAttibute.subscribe(p(this,ge))}disconnectedCallback(){p(this,F).removeEventListener("pointerdown",p(this,we)),Zt.windowResizer.unsubscribe(p(this,Rt)),rs.elementResizer.unsubscribe(p(this,Rt)),this.scrollElement.offScroll(p(this,ve)),this.scrollElement.axisAttibute.unsubscribe(p(this,ge))}};Xt=new WeakMap;F=new WeakMap;st=new WeakMap;it=new WeakMap;Yt=new WeakMap;jt=new WeakMap;Rt=new WeakMap;ve=new WeakMap;ge=new WeakMap;we=new WeakMap;exports.ScrollbarElement=$s([mt.define("e-scrollbar")],exports.ScrollbarElement);const Fs=Ke.createStylesheet({button:{all:"inherit"}});class cs extends Oe{constructor(){super(),this.openShadow(Fs),Ze.isBrowser&&q.element(this,{children:[q.button({onClick:()=>{this.handleClick()},children:[q.slot()]})]})}}var Ds=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,As=(r,e,i,n)=>{for(var h=n>1?void 0:n?Rs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ds(e,i,h),h};exports.ScrollSetButtonElement=class extends cs{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=As([mt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var Ts=Object.defineProperty,qs=Object.getOwnPropertyDescriptor,Bs=(r,e,i,n)=>{for(var h=n>1?void 0:n?qs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ts(e,i,h),h};exports.ScrollStepButtonElement=class extends cs{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=Bs([mt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var Is=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,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Is(e,i,h),h},us=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ot=(r,e,i)=>(us(r,e,"read from private field"),i?i.call(r):e.get(r)),ns=(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)},hs=(r,e,i,n)=>(us(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),_t,te,j,dt,Gt,oe,ae,Ut;class Us{constructor(e,i,n){$(this,j,void 0);$(this,dt,void 0);$(this,Gt,void 0);$(this,oe,void 0);$(this,ae,()=>{a(this,dt).scrollToSection(a(this,Gt),a(this,oe))});$(this,Ut,()=>{a(this,j).classList.toggle("current",a(this,dt).counter.current===a(this,Gt))});R(this,j,document.createElement("button")),R(this,dt,e),R(this,oe,n),R(this,Gt,i),a(this,j).addEventListener("click",a(this,ae)),a(this,dt).counter.subscribe(a(this,Ut)),a(this,Ut).call(this)}get element(){return a(this,j)}destroy(){a(this,j).removeEventListener("click",a(this,ae)),a(this,dt).counter.unsubscribe(a(this,Ut)),a(this,j).remove()}}j=new WeakMap,dt=new WeakMap,Gt=new WeakMap,oe=new WeakMap,ae=new WeakMap,Ut=new WeakMap;exports.ScrollBulletButtonsElement=class extends Oe{constructor(){super(...arguments),ns(this,_t,[]),ns(this,te,os.debounce(()=>{Ot(this,_t).forEach(e=>e.destroy()),hs(this,_t,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Us(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ot(this,_t).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ot(this,te)),Ot(this,te).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ot(this,te)),Ot(this,_t).forEach(e=>e.destroy()),hs(this,_t,[])}};_t=new WeakMap;te=new WeakMap;exports.ScrollBulletButtonsElement=Gs([mt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var Zs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Ns=(r,e,i,n)=>{for(var h=n>1?void 0:n?Ks(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Zs(e,i,h),h},Xe=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(Xe(r,e,"read from private field"),i?i.call(r):e.get(r)),o=(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)},d=(r,e,i,n)=>(Xe(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),_=(r,e,i)=>(Xe(r,e,"access private method"),i),At,Ct,yt,Pt,Et,O,B,I,H,Wt,M,lt,ct,nt,ht,ot,Tt,ee,W,K,Z,ut,pt,Q,be,v,qt,Bt,_e,T,X,x,k,A,se,xt,y,Ce,Ae,Ye,ps,Te,fs,qe,ds,Be,Ss,Ie,ms,He,vs,Ge,gs,ye,ie,rt,kt,je,ws,ts,bs,Pe,Ue,Ee;exports.ScrollSegmentElement=class extends Oe{constructor(){super(...arguments),o(this,Ce),o(this,Ye),o(this,Te),o(this,qe),o(this,Be),o(this,Ie),o(this,He),o(this,Ge),o(this,rt),o(this,je),o(this,ts),o(this,Pe),o(this,At,new S.CSSProperty(this,"--target","")),o(this,Ct,new S.CSSProperty(this,"--disabled",!1)),o(this,yt,new S.CSSProperty(this,"--distance-offset",0)),o(this,Pt,new S.CSSProperty(this,"--start-offset",0)),o(this,Et,new S.CSSProperty(this,"--capture-once",!1)),o(this,O,new S.CSSProperty(this,"--captured","")),o(this,B,new S.CSSProperty(this,"--released","")),o(this,I,new S.CSSProperty(this,"--captured-from-start","")),o(this,H,new S.CSSProperty(this,"--captured-from-finish","")),o(this,Wt,new S.CSSProperty(this,"--released-from-start","")),o(this,M,new S.CSSProperty(this,"--released-from-finish","")),o(this,lt,new S.CSSProperty(this,"--passed-var","")),o(this,ct,new S.CSSProperty(this,"--progress-var","")),o(this,nt,new S.CSSProperty(this,"--distance-var","")),o(this,ht,new S.CSSProperty(this,"--start-var","")),o(this,ot,new S.CSSProperty(this,"--finish-var","")),o(this,Tt,new S.CSSProperty(this,"--smoothstep",!1)),o(this,ee,new S.CSSProperty(this,"--smootherstep",!1)),o(this,W,new gt.Store(!1)),o(this,K,new gt.Store(!1)),o(this,Z,new gt.Store(!1)),o(this,ut,new gt.Store(!1)),o(this,pt,new gt.Store(!1)),o(this,Q,new gt.Store(!1)),o(this,be,[]),o(this,v,this),o(this,qt,0),o(this,Bt,0),o(this,_e,0),o(this,T,0),o(this,X,0),o(this,x,0),o(this,k,0),o(this,A,0),o(this,se,!1),o(this,xt,!1),o(this,y,!0),o(this,ye,()=>{t(this,y)||(this.resize(),t(this,ie).call(this))}),o(this,ie,()=>{!t(this,y)&&t(this,se)&&this.tick()}),o(this,Ee,os.debounce(()=>{const e=Lt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),d(this,be,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return t(this,yt)}get startOffsetCSSProperty(){return t(this,Pt)}get captureOnceCSSProperty(){return t(this,Et)}get capturedCSSProperty(){return t(this,O)}get releasedCSSProperty(){return t(this,B)}get capturedFromStartCSSProperty(){return t(this,I)}get capturedFromFinishCSSProperty(){return t(this,H)}get releasedFromStartCSSProperty(){return t(this,Wt)}get releasedFromFinishCSSProperty(){return t(this,M)}get passedVarCSSProperty(){return t(this,lt)}get progressVarCSSProperty(){return t(this,ct)}get distanceVarCSSProperty(){return t(this,nt)}get startVarCSSProperty(){return t(this,ht)}get finishVarCSSProperty(){return t(this,ot)}get smoothstepCSSProperty(){return t(this,Tt)}get smootherstepCSSProperty(){return t(this,ee)}get disabledCSSProperty(){return t(this,Ct)}get targetCSSProperty(){return t(this,At)}get isCaptured(){return t(this,W)}get isReleased(){return t(this,K)}get isCapturedFromStart(){return t(this,Z)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,pt)}get isReleasedFromFinish(){return t(this,Q)}get directionPosition(){return t(this,qt)}get directionSize(){return t(this,Bt)}get passed(){return t(this,T)}get progress(){return t(this,X)}get start(){return t(this,x)}get finish(){return t(this,A)}get distance(){return t(this,k)}get isCapturedOnce(){return t(this,xt)}get isDisabled(){return t(this,y)}resize(){d(this,Bt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),d(this,qt,this.scrollElement.vertical?St.getCumulativeOffsetTop(this,this.scrollElement):St.getCumulativeOffsetLeft(this,this.scrollElement)),d(this,x,this.getStart()),d(this,k,this.getDistance()),d(this,x,t(this,x)+t(this,Pt).current),d(this,k,t(this,k)+t(this,yt).current),d(this,A,t(this,x)+t(this,k)),this.scrollElement.currentScrollValue>t(this,A)&&!t(this,W).current&&!t(this,K).current&&(t(this,W).current=!0),this.setVar(t(this,ht).current,t(this,x)),this.setVar(t(this,ot).current,t(this,A)),this.setVar(t(this,nt).current,t(this,k)),d(this,se,!0)}tick(){let e=this.scrollElement.currentScrollValue;t(this,be).forEach(n=>{e+=n.value}),d(this,T,this.updateValue(e-t(this,x),0,t(this,k))||0),d(this,X,t(this,T)/t(this,k)||0);const i=Math.round(e);t(this,W).current&&(i>t(this,x)?t(this,Z).current||_(this,Be,Ss).call(this):t(this,Z).current&&!t(this,ut).current&&_(this,He,vs).call(this),i<t(this,A)?t(this,Q).current&&!t(this,pt).current&&_(this,Ie,ms).call(this):t(this,Z).current&&!t(this,Q).current&&_(this,Ge,gs).call(this)),i>t(this,x)&&i<t(this,A)?(_(this,Ce,Ae).call(this),t(this,W).current||_(this,Te,fs).call(this)):t(this,W).current&&(d(this,T,It.step(t(this,k)/2,t(this,T),0,t(this,k))),d(this,X,t(this,T)/t(this,k)),_(this,Ce,Ae).call(this),_(this,qe,ds).call(this)),t(this,xt)&&t(this,Et).current&&(t(this,O).current&&t(this,v).classList.add(t(this,O).current),d(this,y,!0))}disable(){this.style.cssText="",d(this,qt,0),d(this,Bt,0),d(this,T,0),d(this,X,0),d(this,x,0),d(this,k,0),d(this,A,0),d(this,se,!1),t(this,W).current=!1,t(this,K).current=!1,t(this,Z).current=!1,t(this,ut).current=!1,t(this,pt).current=!1,t(this,Q).current=!1,d(this,xt,!1),d(this,y,!0),_(this,Pe,Ue).call(this)}enable(){d(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,At).observe(),t(this,Ct).observe(),t(this,yt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,O).observe(),t(this,B).observe(),t(this,I).observe(),t(this,H).observe(),t(this,Wt).observe(),t(this,M).observe(),t(this,lt).observe(),t(this,ct).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,Tt).observe(),t(this,ee).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",t(this,Ee)),t(this,Ee).call(this),t(this,Ct).current||this.enable(),t(this,At).subscribe(i=>{i.previous&&_(this,Pe,Ue).call(this),i.current?i.current==="parent"?d(this,v,this.parentElement||this):d(this,v,document.querySelector(i.current)||this):d(this,v,this)}),t(this,Ct).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,Pt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,yt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,O).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,I).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,H).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,B).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,Wt).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,M).subscribe(i=>{_(this,rt,kt).call(this,i)}),t(this,Et).subscribe(i=>{t(this,y)||!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,lt).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,this.passed))}),t(this,ct).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,X)))}),t(this,ht).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,x)))}),t(this,ot).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,A)))}),t(this,nt).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,k)))}),Zt.windowResizer.subscribe(t(this,ye),Le.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,ie)),e=!0}disconnectedCallback(){Zt.windowResizer.unsubscribe(t(this,ye)),this.scrollElement.offScroll(t(this,ie)),t(this,At).close(),t(this,Ct).close(),t(this,yt).close(),t(this,Pt).close(),t(this,Et).close(),t(this,O).close(),t(this,B).close(),t(this,I).close(),t(this,H).close(),t(this,Wt).close(),t(this,M).close(),t(this,lt).close(),t(this,ct).close(),t(this,nt).close(),t(this,ht).close(),t(this,ot).close(),t(this,Tt).close(),t(this,ee).close(),t(this,W).close(),t(this,K).close(),t(this,Z).close(),t(this,ut).close(),t(this,pt).close(),t(this,Q).close(),this.disable()}removeVar(e){e&&t(this,v).style.removeProperty(`--${e}`)}setVar(e,i){e&&t(this,v).style.setProperty(`--${e}`,i.toString())}updateValue(e,i=0,n=1){return this.smootherstepCSSProperty.current?It.smootherstep(e,i,n)*n:t(this,Tt).current?It.smoothstep(e,i,n)*n:It.clamp(e,i,n)}getDistance(){return t(this,Bt)+t(this,_e)}getStart(){return t(this,qt)-t(this,_e)}};At=new WeakMap;Ct=new WeakMap;yt=new WeakMap;Pt=new WeakMap;Et=new WeakMap;O=new WeakMap;B=new WeakMap;I=new WeakMap;H=new WeakMap;Wt=new WeakMap;M=new WeakMap;lt=new WeakMap;ct=new WeakMap;nt=new WeakMap;ht=new WeakMap;ot=new WeakMap;Tt=new WeakMap;ee=new WeakMap;W=new WeakMap;K=new WeakMap;Z=new WeakMap;ut=new WeakMap;pt=new WeakMap;Q=new WeakMap;be=new WeakMap;v=new WeakMap;qt=new WeakMap;Bt=new WeakMap;_e=new WeakMap;T=new WeakMap;X=new WeakMap;x=new WeakMap;k=new WeakMap;A=new WeakMap;se=new WeakMap;xt=new WeakMap;y=new WeakMap;Ce=new WeakSet;Ae=function(){_(this,Ye,ps).call(this),this.setVar(t(this,lt).current,t(this,T)),this.setVar(t(this,ct).current,t(this,X))};Ye=new WeakSet;ps=function(){this.dispatchEvent(new CustomEvent("segmentPass",{detail:{distance:t(this,k),start:t(this,x),finish:t(this,A),passed:t(this,T),progress:t(this,X)}}))};Te=new WeakSet;fs=function(){t(this,W).current=!0,t(this,K).current=!1,d(this,xt,!0),t(this,B).current&&t(this,v).classList.remove(t(this,B).current),t(this,M).current&&t(this,v).classList.remove(t(this,M).current),t(this,M).current&&t(this,v).classList.remove(t(this,M).current),t(this,O).current&&t(this,v).classList.add(t(this,O).current)};qe=new WeakSet;ds=function(){t(this,K).current=!0,t(this,W).current=!1,d(this,xt,!0),t(this,O).current&&t(this,v).classList.remove(t(this,O).current),t(this,I).current&&t(this,v).classList.remove(t(this,I).current),t(this,H).current&&t(this,v).classList.remove(t(this,H).current),t(this,B).current&&t(this,v).classList.add(t(this,B).current)};Be=new WeakSet;Ss=function(){t(this,W).current=!0,t(this,Z).current=!0,t(this,ut).current=!1,t(this,I).current&&t(this,v).classList.add(t(this,I).current)};Ie=new WeakSet;ms=function(){t(this,W).current=!0,t(this,pt).current=!0,t(this,Q).current=!1,t(this,H).current&&t(this,v).classList.add(t(this,H).current)};He=new WeakSet;vs=function(){t(this,K).current=!0,t(this,ut).current=!0,t(this,Z).current=!1,t(this,M).current&&t(this,v).classList.add(t(this,M).current)};Ge=new WeakSet;gs=function(){t(this,K).current=!0,t(this,Q).current=!0,t(this,pt).current=!1,t(this,M).current&&t(this,v).classList.add(t(this,M).current)};ye=new WeakMap;ie=new WeakMap;rt=new WeakSet;kt=function(r){if(t(this,y)){r.previous&&t(this,v).classList.remove(r.previous),r.current&&t(this,v).classList.remove(r.current);return}r.current&&t(this,W).current?(r.previous&&t(this,v).classList.remove(r.previous),t(this,v).classList.add(r.current)):!r.current&&r.previous&&t(this,v).classList.remove(r.previous)};je=new WeakSet;ws=function(...r){r.forEach(e=>{e&&t(this,v).classList.remove(e)})};ts=new WeakSet;bs=function(...r){r.forEach(e=>{e&&t(this,v).style.removeProperty(`--${e}`)})};Pe=new WeakSet;Ue=function(){_(this,je,ws).call(this,t(this,O).current,t(this,I).current,t(this,H).current,t(this,B).current,t(this,Wt).current,t(this,M).current),_(this,ts,bs).call(this,t(this,lt).current,t(this,ct).current,t(this,nt).current,t(this,ht).current,t(this,ot).current)};Ee=new WeakMap;exports.ScrollSegmentElement=Ns([mt.define("e-scroll-segment")],exports.ScrollSegmentElement);
|
package/lib/scroll/index.js
CHANGED
|
@@ -7,23 +7,24 @@ var o = (e, i, r) => (is(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
|
}, A = (e, i, r, h) => (is(e, i, "write to private field"), h ? h.call(e, r) : i.set(e, r), r);
|
|
10
|
-
import { D as xs } from "../Damped-
|
|
10
|
+
import { D as xs } from "../Damped-BZujMwuv.js";
|
|
11
11
|
import { i as Ue } from "../browser-0zX67oeU.js";
|
|
12
12
|
import { a as Ce, g as ye } from "../layout-HoBT_Da2.js";
|
|
13
13
|
import { c as qe, s as Ls, b as Vs, a as $s } from "../math-BOBiC4TN.js";
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
14
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
15
|
+
import { S as mt } from "../Store-Cd-E5W1z.js";
|
|
16
|
+
import { D as Fs } from "../Derived-DH-ouLBq.js";
|
|
16
17
|
import "../ticker/index.js";
|
|
17
|
-
import { W as Os, K as zs, D as Ds } from "../DragControls-
|
|
18
|
+
import { W as Os, K as zs, D as Ds } from "../DragControls-Ch_JO2ML.js";
|
|
18
19
|
import { CustomElement as ds, define as Ut } from "../custom-element/index.js";
|
|
19
20
|
import { TICK_ORDER as As, RESIZE_ORDER as Ne } from "../order/index.js";
|
|
20
21
|
import { windowResizer as Ht } from "../window-resizer/index.js";
|
|
21
22
|
import { scrollEntries as Et } from "../scroll-entries/index.js";
|
|
22
|
-
import { e as Ze, D as $e, ay as ke, p as Rs } from "../tags-
|
|
23
|
-
import { c as Je } from "../createStylesheet-
|
|
23
|
+
import { e as Ze, D as $e, ay as ke, p as Rs } from "../tags-BoPv9fDr.js";
|
|
24
|
+
import { c as Je } from "../createStylesheet-KMRQhSa-.js";
|
|
24
25
|
import { cssUnitParser as rs } from "../css-unit-parser/index.js";
|
|
25
26
|
import { CSSProperty as m } from "../css-property/index.js";
|
|
26
|
-
import { d as Ts } from "../Viewport-
|
|
27
|
+
import { d as Ts } from "../Viewport-Bx-VImCe.js";
|
|
27
28
|
import { s as Is } from "../gestures-D2Fdra_G.js";
|
|
28
29
|
import { f as Bs } from "../dom-0S_WDL4g.js";
|
|
29
30
|
import { aptechkaTheme as hs } 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-nxoux28n.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/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");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=`
|
|
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");require("../path-data-polyfill-CXsOR7Oc.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,q=(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 b 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:b})}play(t){this.lettersArray.forEach(e=>{e.play(t)})}};exports.DecoderElement=q([P.define("e-decoder")],exports.DecoderElement);exports.Letter=S;exports.Word=T;
|
package/lib/slicer/index.js
CHANGED
|
@@ -9,6 +9,7 @@ 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";
|
|
12
13
|
var y, h, f;
|
|
13
14
|
class D {
|
|
14
15
|
constructor(t) {
|
|
@@ -57,8 +58,8 @@ class $ {
|
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
C = new WeakMap(), a = new WeakMap();
|
|
60
|
-
var H = Object.defineProperty,
|
|
61
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
61
|
+
var H = Object.defineProperty, m = Object.getOwnPropertyDescriptor, b = (e, t, s, n) => {
|
|
62
|
+
for (var r = n > 1 ? void 0 : n ? m(t, s) : t, d = e.length - 1, p; d >= 0; d--)
|
|
62
63
|
(p = e[d]) && (r = (n ? p(t, s, r) : p(r)) || r);
|
|
63
64
|
return n && r && H(t, s, r), r;
|
|
64
65
|
}, O = (e, t, s) => {
|
|
@@ -119,7 +120,7 @@ o = /* @__PURE__ */ new WeakMap();
|
|
|
119
120
|
g = /* @__PURE__ */ new WeakMap();
|
|
120
121
|
M = /* @__PURE__ */ new WeakMap();
|
|
121
122
|
P = /* @__PURE__ */ new WeakMap();
|
|
122
|
-
E =
|
|
123
|
+
E = b([
|
|
123
124
|
T("e-slicer")
|
|
124
125
|
], E);
|
|
125
126
|
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 v=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(v(i,r,"read from private field"),t?t.call(i):r.get(i)),n=(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)},l=(i,r,t,a)=>(v(i,r,"write to private field"),a?a.call(i,t):r.set(i,t),t);var E=(i,r,t)=>(v(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../SourceManager-
|
|
1
|
+
"use strict";var v=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(v(i,r,"read from private field"),t?t.call(i):r.get(i)),n=(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)},l=(i,r,t,a)=>(v(i,r,"write to private field"),a?a.call(i,t):r.set(i,t),t);var E=(i,r,t)=>(v(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../SourceManager-Bl_uduSS.cjs"),C=require("../custom-element/index.cjs"),A=require("../intersector/index.cjs"),y=require("../loading/index.cjs"),M=require("../notifier/index.cjs");let N=0;var o,s,h,m,c,u,f,g,b,x,p;class k extends C.CustomElement{constructor(){super();n(this,b);n(this,o,null);n(this,s,null);n(this,h,!1);n(this,m,!1);n(this,c,!1);n(this,u,void 0);n(this,f,new M.Notifier);n(this,g,new M.Notifier);n(this,p,t=>{e(this,c)&&!e(this,m)&&t.isIntersecting&&(e(this,o).current&&e(this,o).current!==e(this,o).previous&&E(this,b,x).call(this,e(this,o).current),l(this,m,!0)),t.isIntersecting?e(this,f).notify():e(this,g).notify()});l(this,u,`source-consumer-${++N}`)}get consumerElement(){return e(this,s)}get captureEvent(){return e(this,f)}get releaseEvent(){return e(this,g)}connectedCallback(){const t=this.getAttribute("srcset");t&&(l(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
|
@@ -8,8 +8,8 @@ var t = (i, r, s) => (v(i, r, "read from private field"), s ? s.call(i) : r.get(
|
|
|
8
8
|
r instanceof WeakSet ? r.add(i) : r.set(i, s);
|
|
9
9
|
}, l = (i, r, s, h) => (v(i, r, "write to private field"), h ? h.call(i, s) : r.set(i, s), s);
|
|
10
10
|
var E = (i, r, s) => (v(i, r, "access private method"), s);
|
|
11
|
-
import { S as k } from "../SourceManager-
|
|
12
|
-
import { a as W, b as $ } from "../SourceManager-
|
|
11
|
+
import { S as k } from "../SourceManager-D_8MZ3bR.js";
|
|
12
|
+
import { a as W, b as $ } from "../SourceManager-D_8MZ3bR.js";
|
|
13
13
|
import { CustomElement as w } from "../custom-element/index.js";
|
|
14
14
|
import { intersector as A } from "../intersector/index.js";
|
|
15
15
|
import { loading as S } from "../loading/index.js";
|
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-BQGNOHlY.cjs"),E=require("../Derived-BZtlW0bB.cjs"),M=require("../function-MthRj-GJ.cjs");require("../path-data-polyfill-CXsOR7Oc.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 q 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 q{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=E.Derived;exports.Composed=w;exports.CumulativeResource=k;exports.DerivedArray=P;exports.Resource=q;
|
package/lib/store/index.js
CHANGED
|
@@ -31,12 +31,13 @@ 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-Cd-E5W1z.js";
|
|
35
|
+
import { a as G, s as H } from "../Store-Cd-E5W1z.js";
|
|
36
|
+
import { D as K } from "../Derived-DH-ouLBq.js";
|
|
37
37
|
import { d as D } from "../function-C10DGppn.js";
|
|
38
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
38
39
|
var b, o;
|
|
39
|
-
class
|
|
40
|
+
class j extends A {
|
|
40
41
|
constructor(s, c, i) {
|
|
41
42
|
super(null, i);
|
|
42
43
|
h(this, b, void 0);
|
|
@@ -86,7 +87,7 @@ class k extends A {
|
|
|
86
87
|
}
|
|
87
88
|
g = new WeakMap(), p = new WeakMap(), m = new WeakMap();
|
|
88
89
|
var x, v, I;
|
|
89
|
-
class
|
|
90
|
+
class q extends k {
|
|
90
91
|
constructor(s, c, i = 100) {
|
|
91
92
|
super(s, c, {
|
|
92
93
|
manualControl: !0,
|
|
@@ -114,7 +115,7 @@ class j extends k {
|
|
|
114
115
|
}
|
|
115
116
|
x = new WeakMap(), v = new WeakMap(), I = new WeakMap();
|
|
116
117
|
var y;
|
|
117
|
-
class
|
|
118
|
+
class z extends A {
|
|
118
119
|
constructor(s, c, i) {
|
|
119
120
|
super(null, i);
|
|
120
121
|
h(this, y, []);
|
|
@@ -135,12 +136,12 @@ class q extends A {
|
|
|
135
136
|
}
|
|
136
137
|
y = new WeakMap();
|
|
137
138
|
export {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
z as Composed,
|
|
140
|
+
q as CumulativeResource,
|
|
141
|
+
K as Derived,
|
|
142
|
+
j as DerivedArray,
|
|
142
143
|
k as Resource,
|
|
143
144
|
A as Store,
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
G as activeStores,
|
|
146
|
+
H as storeRegistry
|
|
146
147
|
};
|