aptechka 0.47.12 → 0.49.0
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/README.md +1 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +1 -1
- package/lib/jss-BXAMRO12.cjs +1 -0
- package/lib/{jss-BQSxj7Ls.js → jss-Chm3yE5y.js} +5 -3
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +1 -1
- package/lib/pixel-perfect/index.cjs +47 -0
- package/lib/pixel-perfect/index.d.ts +11 -0
- package/lib/pixel-perfect/index.js +96 -0
- package/lib/radio/index.cjs +1 -0
- package/lib/radio/index.d.ts +19 -0
- package/lib/radio/index.js +67 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/jss.d.ts +1 -1
- package/package.json +17 -1
- package/lib/jss-B_mh4mIw.cjs +0 -1
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Инари
|
package/lib/canvas/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var f=i=>{throw TypeError(i)};var R=(i,s,e)=>s.has(i)||f("Cannot "+e);var t=(i,s,e)=>(R(i,s,"read from private field"),e?e.call(i):s.get(i)),n=(i,s,e)=>s.has(i)?f("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,e),c=(i,s,e,d)=>(R(i,s,"write to private field"),d?d.call(i,e):s.set(i,e),e),o=(i,s,e)=>(R(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../css-property/index.cjs"),C=require("../element-resizer/index.cjs"),w=require("../ticker/index.cjs"),y=require("../index-Cqw2NKev.cjs"),B=require("../jss-
|
|
1
|
+
"use strict";var f=i=>{throw TypeError(i)};var R=(i,s,e)=>s.has(i)||f("Cannot "+e);var t=(i,s,e)=>(R(i,s,"read from private field"),e?e.call(i):s.get(i)),n=(i,s,e)=>s.has(i)?f("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,e),c=(i,s,e,d)=>(R(i,s,"write to private field"),d?d.call(i,e):s.set(i,e),e),o=(i,s,e)=>(R(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../css-property/index.cjs"),C=require("../element-resizer/index.cjs"),w=require("../ticker/index.cjs"),y=require("../index-Cqw2NKev.cjs"),B=require("../jss-BXAMRO12.cjs"),F=require("../math-GDWEqu7y.cjs");var a,r,m,l,u,p,b,x,h,E,P,g,v,S,q;class k extends HTMLElement{constructor(){super();n(this,h);n(this,a,new z.CSSProperty(this,"--fps",0));n(this,r,null);n(this,m,null);n(this,l,0);n(this,u,0);n(this,p,1);n(this,b,0);n(this,x,1);n(this,g,e=>{c(this,p,F.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,u,e.contentRect.height),t(this,r).width=t(this,l)*this.pixelRatio,t(this,r).height=t(this,u)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),o(this,h,q).call(this),o(this,h,S).call(this)});n(this,v,e=>{c(this,b,e.timestamp),c(this,x,e.timeBetweenFrames),o(this,h,S).call(this)});if(y.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[B.createStylesheet({" :host, canvas":{display:"block",width:"100%",height:"100%"}})],c(this,r,document.createElement("canvas")),c(this,m,t(this,r).getContext("2d")),e.appendChild(t(this,r)),t(this,a).subscribe(d=>{typeof d.previous!="undefined"&&d.current!==d.previous&&o(this,h,E).call(this)})}}get fpsCSSProperty(){return t(this,a)}get canvasElement(){return t(this,r)}get context(){return t(this,m)}get pixelRatio(){return t(this,p)}get width(){return t(this,l)}get height(){return t(this,u)}get detail(){return{width:t(this,l),height:t(this,u),element:this,canvasElement:t(this,r),pixelRatio:t(this,p),context:t(this,m),timestamp:t(this,b),timeBetweenFrames:t(this,x)}}connectedCallback(){t(this,a).observe(),C.elementResizer.subscribe(this,t(this,g)),o(this,h,E).call(this)}disconnectedCallback(){t(this,a).unobserve(),C.elementResizer.unsubscribe(t(this,g)),o(this,h,P).call(this)}}a=new WeakMap,r=new WeakMap,m=new WeakMap,l=new WeakMap,u=new WeakMap,p=new WeakMap,b=new WeakMap,x=new WeakMap,h=new WeakSet,E=function(){w.ticker.unsubscribe(t(this,v)),this.hasAttribute("static")||w.ticker.subscribe(t(this,v),{culling:this,maxFPS:t(this,a).current})},P=function(){w.ticker.unsubscribe(t(this,v))},g=new WeakMap,v=new WeakMap,S=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))},q=function(){this.dispatchEvent(new CustomEvent("canvasResize",{composed:!0,detail:this.detail}))};y.isBrowser&&!customElements.get("e-canvas")&&customElements.define("e-canvas",k);exports.CanvasElement=k;
|
package/lib/canvas/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { CSSProperty as z } from "../css-property/index.js";
|
|
|
7
7
|
import { elementResizer as C } from "../element-resizer/index.js";
|
|
8
8
|
import { ticker as w } from "../ticker/index.js";
|
|
9
9
|
import { i as y } from "../index-euf5anj6.js";
|
|
10
|
-
import { c as B } from "../jss-
|
|
10
|
+
import { c as B } from "../jss-Chm3yE5y.js";
|
|
11
11
|
import { c as F } from "../math-BOBiC4TN.js";
|
|
12
12
|
var o, r, d, m, l, u, b, f, n, R, k, g, v, E, P;
|
|
13
13
|
class L extends HTMLElement {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./index-Cqw2NKev.cjs"),o=require("./string-DhgS_iFl.cjs");function s(t){let e="";for(const r in t){const n=t[r];typeof n=="object"?(e+=`${r} {`,e+=s(n),e+="}"):e+=`${o.camelToKebab(r)}: ${n};`}return e}function c(t){if(i.isBrowser){const e=new CSSStyleSheet;return e.replaceSync(typeof t=="string"?t:s(t)),e}return null}exports.createStylesheet=c;exports.styleToString=s;
|
|
@@ -8,14 +8,16 @@ function o(t) {
|
|
|
8
8
|
}
|
|
9
9
|
return e;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function l(t) {
|
|
12
12
|
if (s) {
|
|
13
13
|
const e = new CSSStyleSheet();
|
|
14
|
-
return e.replaceSync(
|
|
14
|
+
return e.replaceSync(
|
|
15
|
+
typeof t == "string" ? t : o(t)
|
|
16
|
+
), e;
|
|
15
17
|
}
|
|
16
18
|
return null;
|
|
17
19
|
}
|
|
18
20
|
export {
|
|
19
|
-
|
|
21
|
+
l as c,
|
|
20
22
|
o as s
|
|
21
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var L=t=>{throw TypeError(t)};var m=(t,s,e)=>s.has(t)||L("Cannot "+e);var o=(t,s,e)=>(m(t,s,"read from private field"),e?e.call(t):s.get(t)),r=(t,s,e)=>s.has(t)?L("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),y=(t,s,e,i)=>(m(t,s,"write to private field"),i?i.call(t,e):s.set(t,e),e),p=(t,s,e)=>(m(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../css-property/index.cjs"),w=require("../index-Cqw2NKev.cjs"),E=require("../jss-
|
|
1
|
+
"use strict";var L=t=>{throw TypeError(t)};var m=(t,s,e)=>s.has(t)||L("Cannot "+e);var o=(t,s,e)=>(m(t,s,"read from private field"),e?e.call(t):s.get(t)),r=(t,s,e)=>s.has(t)?L("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),y=(t,s,e,i)=>(m(t,s,"write to private field"),i?i.call(t,e):s.set(t,e),e),p=(t,s,e)=>(m(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../css-property/index.cjs"),w=require("../index-Cqw2NKev.cjs"),E=require("../jss-BXAMRO12.cjs");var n,a,c,h,d,b;class g extends HTMLElement{constructor(){super();r(this,d);r(this,n,new v.CSSProperty(this,"--columns",2));r(this,a,[]);r(this,c,null);r(this,h,()=>{p(this,d,b).call(this)});const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[E.createStylesheet({":host":{display:"grid",gridTemplateColumns:"repeat(var(--columns), 1fr)"},".column":{display:"grid",width:"100%",gap:"var(--gap, 0rem)",gridAutoRows:"max-content"}})]}connectedCallback(){y(this,c,new MutationObserver(o(this,h))),o(this,c).observe(this,{childList:!0}),o(this,n).subscribe(e=>{var i;this.shadowRoot.innerHTML="",y(this,a,[]);for(let l=0;l<e.current;l++){const u=document.createElement("div");u.classList.add("column"),u.innerHTML=`<slot name="col-${l}"></slot>`,o(this,a).push(u),(i=this.shadowRoot)==null||i.appendChild(u)}p(this,d,b).call(this)}),o(this,n).observe()}disconnectedCallback(){o(this,n).close(),o(this,c).disconnect(),this.classList.remove("distributed")}}n=new WeakMap,a=new WeakMap,c=new WeakMap,h=new WeakMap,d=new WeakSet,b=function(){[...this.children].forEach((i,l)=>{i.slot=`col-${l%o(this,n).current}`}),this.classList.add("distributed")};w.isBrowser&&!customElements.get("e-masonry-layout")&&customElements.define("e-masonry-layout",g);exports.MasonryLayoutElement=g;
|
|
@@ -5,7 +5,7 @@ var u = (t, s, e) => s.has(t) || L("Cannot " + e);
|
|
|
5
5
|
var o = (t, s, e) => (u(t, s, "read from private field"), e ? e.call(t) : s.get(t)), n = (t, s, e) => s.has(t) ? L("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), p = (t, s, e, i) => (u(t, s, "write to private field"), i ? i.call(t, e) : s.set(t, e), e), b = (t, s, e) => (u(t, s, "access private method"), e);
|
|
6
6
|
import { CSSProperty as f } from "../css-property/index.js";
|
|
7
7
|
import { i as v } from "../index-euf5anj6.js";
|
|
8
|
-
import { c as w } from "../jss-
|
|
8
|
+
import { c as w } from "../jss-Chm3yE5y.js";
|
|
9
9
|
var r, a, c, m, d, y;
|
|
10
10
|
class g extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";var u=t=>{throw TypeError(t)};var m=(t,n,e)=>n.has(t)||u("Cannot "+e);var i=(t,n,e)=>(m(t,n,"read from private field"),e?e.call(t):n.get(t)),r=(t,n,e)=>n.has(t)?u("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,e),p=(t,n,e,l)=>(m(t,n,"write to private field"),l?l.call(t,e):n.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../dom-JBOkFLTh.cjs"),v=require("../jss-BXAMRO12.cjs");require("../index-Cqw2NKev.cjs");const x=v.createStylesheet(`
|
|
2
|
+
:host {
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
z-index: 12345;
|
|
7
|
+
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
|
|
13
|
+
user-select: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
::slotted(img),
|
|
17
|
+
::slotted(picture) {
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: max-content;
|
|
20
|
+
object-fit: cover;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
input {
|
|
24
|
+
position: fixed;
|
|
25
|
+
z-index: 1;
|
|
26
|
+
top: 2vmin;
|
|
27
|
+
left: 2vmin;
|
|
28
|
+
|
|
29
|
+
width: 10vmin;
|
|
30
|
+
|
|
31
|
+
accent-color: var(--range-input-color, black);
|
|
32
|
+
|
|
33
|
+
pointer-events: auto;
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
opacity: 0.1;
|
|
37
|
+
|
|
38
|
+
transition: opacity 0.4s;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
input:hover {
|
|
42
|
+
opacity: 1
|
|
43
|
+
}
|
|
44
|
+
`);var s,o,c,a,h;class f extends HTMLElement{constructor(){super();r(this,s,null);r(this,o,null);r(this,c);r(this,a,()=>{if(!i(this,o))return;const e=i(this,s).scrollLeft*-1,l=i(this,s).scrollTop*-1;i(this,o).style.transform=`translate3d(${e}px, ${l}px, 0px)`});r(this,h,()=>{i(this,o)&&(i(this,o).style.opacity=i(this,c).value)});const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,x],e.innerHTML=`
|
|
45
|
+
<slot></slot>
|
|
46
|
+
<input type="range" min="0" max="1" step="0.01" value="${this.getAttribute("opacity")||0}"/>
|
|
47
|
+
`,p(this,c,e.querySelector("input")),i(this,c).addEventListener("input",i(this,h))}connectedCallback(){var l,d;p(this,s,y.findScrollParentElement(this)),(l=i(this,s))==null||l.addEventListener("scroll",i(this,a));const e=(d=this.shadowRoot.querySelector("slot"))==null?void 0:d.assignedElements()[0];e instanceof HTMLElement&&p(this,o,e),i(this,h).call(this)}disconnectedCallback(){var e;(e=i(this,s))==null||e.removeEventListener("scroll",i(this,a))}}s=new WeakMap,o=new WeakMap,c=new WeakMap,a=new WeakMap,h=new WeakMap;customElements.get("e-pixel-perfect")||customElements.define("e-pixel-perfect",f);exports.PixelPerfectElement=f;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class PixelPerfectElement extends HTMLElement {
|
|
2
|
+
#private;
|
|
3
|
+
constructor();
|
|
4
|
+
protected connectedCallback(): void;
|
|
5
|
+
protected disconnectedCallback(): void;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'e-pixel-perfect': PixelPerfectElement;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
var d = (e) => {
|
|
2
|
+
throw TypeError(e);
|
|
3
|
+
};
|
|
4
|
+
var u = (e, s, t) => s.has(e) || d("Cannot " + t);
|
|
5
|
+
var i = (e, s, t) => (u(e, s, "read from private field"), t ? t.call(e) : s.get(e)), r = (e, s, t) => s.has(e) ? d("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), p = (e, s, t, l) => (u(e, s, "write to private field"), l ? l.call(e, t) : s.set(e, t), t);
|
|
6
|
+
import { f } from "../dom-CVWzyXPH.js";
|
|
7
|
+
import { c as x } from "../jss-Chm3yE5y.js";
|
|
8
|
+
import "../index-euf5anj6.js";
|
|
9
|
+
const y = x(
|
|
10
|
+
/*css*/
|
|
11
|
+
`
|
|
12
|
+
:host {
|
|
13
|
+
position: fixed;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
z-index: 12345;
|
|
17
|
+
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
|
|
23
|
+
user-select: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
::slotted(img),
|
|
27
|
+
::slotted(picture) {
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: max-content;
|
|
30
|
+
object-fit: cover;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
input {
|
|
34
|
+
position: fixed;
|
|
35
|
+
z-index: 1;
|
|
36
|
+
top: 2vmin;
|
|
37
|
+
left: 2vmin;
|
|
38
|
+
|
|
39
|
+
width: 10vmin;
|
|
40
|
+
|
|
41
|
+
accent-color: var(--range-input-color, black);
|
|
42
|
+
|
|
43
|
+
pointer-events: auto;
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
opacity: 0.1;
|
|
47
|
+
|
|
48
|
+
transition: opacity 0.4s;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
input:hover {
|
|
52
|
+
opacity: 1
|
|
53
|
+
}
|
|
54
|
+
`
|
|
55
|
+
);
|
|
56
|
+
var n, o, c, a, h;
|
|
57
|
+
class v extends HTMLElement {
|
|
58
|
+
constructor() {
|
|
59
|
+
super();
|
|
60
|
+
r(this, n, null);
|
|
61
|
+
r(this, o, null);
|
|
62
|
+
r(this, c);
|
|
63
|
+
r(this, a, () => {
|
|
64
|
+
if (!i(this, o))
|
|
65
|
+
return;
|
|
66
|
+
const t = i(this, n).scrollLeft * -1, l = i(this, n).scrollTop * -1;
|
|
67
|
+
i(this, o).style.transform = `translate3d(${t}px, ${l}px, 0px)`;
|
|
68
|
+
});
|
|
69
|
+
r(this, h, () => {
|
|
70
|
+
i(this, o) && (i(this, o).style.opacity = i(this, c).value);
|
|
71
|
+
});
|
|
72
|
+
const t = this.attachShadow({ mode: "open" });
|
|
73
|
+
t.adoptedStyleSheets = [...t.adoptedStyleSheets, y], t.innerHTML = `
|
|
74
|
+
<slot></slot>
|
|
75
|
+
<input type="range" min="0" max="1" step="0.01" value="${this.getAttribute("opacity") || 0}"/>
|
|
76
|
+
`, p(this, c, t.querySelector("input")), i(this, c).addEventListener("input", i(this, h));
|
|
77
|
+
}
|
|
78
|
+
connectedCallback() {
|
|
79
|
+
var l, m;
|
|
80
|
+
p(this, n, f(this)), (l = i(this, n)) == null || l.addEventListener("scroll", i(this, a));
|
|
81
|
+
const t = (m = this.shadowRoot.querySelector("slot")) == null ? void 0 : m.assignedElements()[0];
|
|
82
|
+
t instanceof HTMLElement && p(this, o, t), i(this, h).call(this);
|
|
83
|
+
}
|
|
84
|
+
disconnectedCallback() {
|
|
85
|
+
var t;
|
|
86
|
+
(t = i(this, n)) == null || t.removeEventListener(
|
|
87
|
+
"scroll",
|
|
88
|
+
i(this, a)
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
n = new WeakMap(), o = new WeakMap(), c = new WeakMap(), a = new WeakMap(), h = new WeakMap();
|
|
93
|
+
customElements.get("e-pixel-perfect") || customElements.define("e-pixel-perfect", v);
|
|
94
|
+
export {
|
|
95
|
+
v as PixelPerfectElement
|
|
96
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var E=e=>{throw TypeError(e)};var b=(e,a,t)=>a.has(e)||E("Cannot "+t);var i=(e,a,t)=>(b(e,a,"read from private field"),t?t.call(e):a.get(e)),r=(e,a,t)=>a.has(e)?E("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(e):a.set(e,t),l=(e,a,t,s)=>(b(e,a,"write to private field"),s?s.call(e,t):a.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../events-KVanG9sR.cjs");require("../index-Cqw2NKev.cjs");var d,n,o,c,u,h;class g extends HTMLElement{constructor(){super(...arguments);r(this,d,[]);r(this,n);r(this,o,null);r(this,c,()=>{this.isConnected&&(document.documentElement.addEventListener("radioChange",i(this,h)),i(this,d).forEach(t=>{t.addEventListener("click",i(this,u)),t.hasAttribute("data-checked")&&this.setValue(t.getAttribute("data-value"))}))});r(this,u,t=>{const m=t.currentTarget.getAttribute("data-value");m&&this.setValue(m)});r(this,h,t=>{const s=t.target;s!==this&&s.name===this.name&&this.setValue(t.detail)})}get value(){return i(this,n)}get name(){return this.getAttribute("name")}get currentButtonElement(){return i(this,o)}setValue(t){t&&t!==i(this,n)&&(l(this,n,t),i(this,d).forEach(s=>{s.getAttribute("data-value")===i(this,n)?(s.setAttribute("data-checked",""),l(this,o,s)):s.removeAttribute("data-checked")}),v.dispatchEvent(this,"radioChange",{detail:i(this,n),bubbles:!0}))}connectedCallback(){l(this,d,[...this.querySelectorAll("[data-radio-button]")]),document.readyState==="complete"?i(this,c).call(this):addEventListener("load",i(this,c))}disconnectedCallback(){i(this,d).forEach(t=>{t.removeEventListener("click",i(this,u))}),removeEventListener("load",i(this,c)),document.documentElement.removeEventListener("radioChange",i(this,h))}}d=new WeakMap,n=new WeakMap,o=new WeakMap,c=new WeakMap,u=new WeakMap,h=new WeakMap;customElements.get("e-radio")||customElements.define("e-radio",g);exports.RadioElement=g;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface RadioEvents {
|
|
2
|
+
radioChange: CustomEvent<string | undefined>;
|
|
3
|
+
}
|
|
4
|
+
export declare class RadioElement<T extends string = string> extends HTMLElement {
|
|
5
|
+
#private;
|
|
6
|
+
get value(): T | undefined;
|
|
7
|
+
get name(): string | null;
|
|
8
|
+
get currentButtonElement(): HTMLElement | null;
|
|
9
|
+
setValue(value: T | undefined): void;
|
|
10
|
+
protected connectedCallback(): void;
|
|
11
|
+
protected disconnectedCallback(): void;
|
|
12
|
+
}
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
'e-radio': RadioElement;
|
|
16
|
+
}
|
|
17
|
+
interface HTMLElementEventMap extends RadioEvents {
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var E = (e) => {
|
|
2
|
+
throw TypeError(e);
|
|
3
|
+
};
|
|
4
|
+
var b = (e, a, t) => a.has(e) || E("Cannot " + t);
|
|
5
|
+
var i = (e, a, t) => (b(e, a, "read from private field"), t ? t.call(e) : a.get(e)), r = (e, a, t) => a.has(e) ? E("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, t), l = (e, a, t, s) => (b(e, a, "write to private field"), s ? s.call(e, t) : a.set(e, t), t);
|
|
6
|
+
import { d as g } from "../events-CsVF98U6.js";
|
|
7
|
+
import "../index-euf5anj6.js";
|
|
8
|
+
var d, n, c, o, h, u;
|
|
9
|
+
class v extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
r(this, d, []);
|
|
13
|
+
r(this, n);
|
|
14
|
+
r(this, c, null);
|
|
15
|
+
r(this, o, () => {
|
|
16
|
+
this.isConnected && (document.documentElement.addEventListener(
|
|
17
|
+
"radioChange",
|
|
18
|
+
i(this, u)
|
|
19
|
+
), i(this, d).forEach((t) => {
|
|
20
|
+
t.addEventListener("click", i(this, h)), t.hasAttribute("data-checked") && this.setValue(t.getAttribute("data-value"));
|
|
21
|
+
}));
|
|
22
|
+
});
|
|
23
|
+
r(this, h, (t) => {
|
|
24
|
+
const m = t.currentTarget.getAttribute("data-value");
|
|
25
|
+
m && this.setValue(m);
|
|
26
|
+
});
|
|
27
|
+
r(this, u, (t) => {
|
|
28
|
+
const s = t.target;
|
|
29
|
+
s !== this && s.name === this.name && this.setValue(t.detail);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
get value() {
|
|
33
|
+
return i(this, n);
|
|
34
|
+
}
|
|
35
|
+
get name() {
|
|
36
|
+
return this.getAttribute("name");
|
|
37
|
+
}
|
|
38
|
+
get currentButtonElement() {
|
|
39
|
+
return i(this, c);
|
|
40
|
+
}
|
|
41
|
+
setValue(t) {
|
|
42
|
+
t && t !== i(this, n) && (l(this, n, t), i(this, d).forEach((s) => {
|
|
43
|
+
s.getAttribute("data-value") === i(this, n) ? (s.setAttribute("data-checked", ""), l(this, c, s)) : s.removeAttribute("data-checked");
|
|
44
|
+
}), g(this, "radioChange", {
|
|
45
|
+
detail: i(this, n),
|
|
46
|
+
bubbles: !0
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
connectedCallback() {
|
|
50
|
+
l(this, d, [
|
|
51
|
+
...this.querySelectorAll("[data-radio-button]")
|
|
52
|
+
]), document.readyState === "complete" ? i(this, o).call(this) : addEventListener("load", i(this, o));
|
|
53
|
+
}
|
|
54
|
+
disconnectedCallback() {
|
|
55
|
+
i(this, d).forEach((t) => {
|
|
56
|
+
t.removeEventListener("click", i(this, h));
|
|
57
|
+
}), removeEventListener("load", i(this, o)), document.documentElement.removeEventListener(
|
|
58
|
+
"radioChange",
|
|
59
|
+
i(this, u)
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
d = new WeakMap(), n = new WeakMap(), c = new WeakMap(), o = new WeakMap(), h = new WeakMap(), u = new WeakMap();
|
|
64
|
+
customElements.get("e-radio") || customElements.define("e-radio", v);
|
|
65
|
+
export {
|
|
66
|
+
v as RadioElement
|
|
67
|
+
};
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ve=Object.defineProperty;var we=Object.getOwnPropertySymbols;var _e=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var Ee=u=>{throw TypeError(u)};var Pe=(u,h,e)=>h in u?Ve(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,xe=(u,h)=>{for(var e in h||(h={}))_e.call(h,e)&&Pe(u,e,h[e]);if(we)for(var e of we(h))He.call(h,e)&&Pe(u,e,h[e]);return u};var be=(u,h,e)=>h.has(u)||Ee("Cannot "+e);var t=(u,h,e)=>(be(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?Ee("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),r=(u,h,e,i)=>(be(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),c=(u,h,e)=>(be(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const We=require("../Store-DRp_K37w.cjs"),O=require("../index-Cqw2NKev.cjs"),Fe=require("../easings-GegIwET5.cjs"),ce=require("../events-KVanG9sR.cjs"),ze=require("../jss-B_mh4mIw.cjs"),kt=require("../layout-Ctc2p3uz.cjs"),ke=require("../math-GDWEqu7y.cjs"),$e=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ue=require("../order/index.cjs"),Ne=require("../Damped-DbaLw6w1.cjs"),Ue=require("../Tweened-Dm6Avip9.cjs"),le=require("../controls/index.cjs"),Rt=require("../window-resizer/index.cjs"),mt=require("../scroll-entries/index.cjs"),Le=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ge=require("../device/index.cjs"),Qt=require("../element-resizer/index.cjs"),Ze=require("../gestures-DHLrn6Q8.cjs"),Re=require("../dom-JBOkFLTh.cjs"),je=require("../function-MthRj-GJ.cjs"),Ke=require("../scroll-segment/index.cjs");var f,Xt,g,gt,V,Q;class Je{constructor(h,e,i){s(this,f);s(this,Xt);s(this,g);s(this,gt,0);s(this,V,0);s(this,Q,null);r(this,f,h),r(this,Xt,e),r(this,g,i),mt.scrollEntries.register(t(this,f))}get index(){return t(this,Xt)}get size(){return t(this,gt)}get position(){return t(this,V)}destroy(){mt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null),this.setSize()}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){r(this,gt,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),r(this,V,t(this,g).vertical?kt.getCumulativeOffsetTop(t(this,f)):kt.getCumulativeOffsetLeft(t(this,f))),r(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,gt)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),mt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,n=t(this,V)-t(this,g).viewportSize-e,d=t(this,V)+t(this,gt)+e,b=ke.clamp(i,n,d);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,Q)!==h&&(t(this,Q)&&t(this,f).classList.remove(t(this,Q)),h&&t(this,f).classList.add(h),r(this,Q,h),ce.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Q)},custom:!0}))}}f=new WeakMap,Xt=new WeakMap,g=new WeakMap,gt=new WeakMap,V=new WeakMap,Q=new WeakMap;const Qe=ze.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,yt,x,X,_,H,W,T,Y,tt,F,et,vt,q,v,Ct,wt,Pt,Et,It,I,xt,st,D,it,$,rt,Lt,nt,ht,ot,p,Tt,l,Yt,te,y,m,k,A,lt,B,w,P,qt,ct,N,U,ut,Dt,at,G,At,M,E,o,fe,Jt,zt,ae,de,me,ge,L,Bt,Ie,Mt,ee,ye,ve,ft,Se,se;class jt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,yt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,X,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,W,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,Y,new S.CSSProperty(this,"--tween-easing",!1));s(this,tt,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,et,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,vt,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,Ct,new S.CSSProperty(this,"--damping",20));s(this,wt,new S.CSSProperty(this,"--mass",0));s(this,Pt,new S.CSSProperty(this,"--stiffness",0));s(this,Et,new S.CSSProperty(this,"--mouse-drag",!1));s(this,It,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,I,new S.CSSProperty(this,"--autoplay",0));s(this,xt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,st,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,D,new S.CSSProperty(this,"--classes",!1));s(this,it,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,rt,new S.CSSProperty(this,"--focus-delay",0));s(this,Lt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,nt,new S.CSSProperty(this,"--disabled",!1));s(this,ht,new S.CSSProperty(this,"--hibernate",!1));s(this,ot,null);s(this,p,null);s(this,Tt,null);s(this,l,[]);s(this,Yt,0);s(this,te,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,A,null);s(this,lt,null);s(this,B,null);s(this,w,null);s(this,P,new We.Store(0));s(this,qt,0);s(this,ct,0);s(this,N,!1);s(this,U,!0);s(this,ut,!0);s(this,Dt);s(this,at);s(this,G,new Ue.Tweened);s(this,At,!1);s(this,M,null);s(this,E,!1);s(this,L,()=>{if(t(this,ht).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,P).current;if(r(this,Yt,this.vertical?kt.getCumulativeOffsetTop(this):kt.getCumulativeOffsetLeft(this)),r(this,te,this.vertical?kt.getCumulativeOffsetTop(t(this,p)):kt.getCumulativeOffsetLeft(t(this,p))),r(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,k,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):r(this,k,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,F).current&&t(this,l).length){const n=t(this,q).current,d=(t(this,y)-t(this,k)*(n-1))/n;t(this,l).forEach(b=>{b.setSize(d)})}else t(this,l).forEach(n=>{n.setSize()});if(t(this,l).forEach(n=>{n.resize()}),t(this,H).current){r(this,m,t(this,y)*t(this,H).current);const n=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=n+"px",t(this,p).style.height="100%"):(t(this,p).style.height=n+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",r(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",r(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const n=getComputedStyle(this),d=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,m,t(this,m)+d),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const n=t(this,l)[t(this,l).length-1],d=n.position+n.size-t(this,y),b=t(this,m)-d;r(this,ct,n.position+n.size+b)}else r(this,ct,t(this,m));if(t(this,T).current&&t(this,l).length){const n=t(this,l)[i];t(this,a).set(n.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});r(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,nt).current||c(this,o,de).call(this):c(this,o,ae).call(this),t(this,Bt).call(this)});s(this,Bt,()=>{if(!t(this,N)||t(this,ut)||t(this,U))return;const e=this.currentScrollValue;if(r(this,qt,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,P).current=c(this,o,Se).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;mt.scrollEntries.update(this,t(this,x).current,e)});s(this,Mt,(e,i)=>{t(this,yt).current&&(c(this,o,ye).call(this,Math.sign(i)||1),t(this,ee).call(this,e,i))});s(this,ee,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,at)||t(this,G).unlistenAnimationFrame(),!t(this,I).current&&t(this,rt).current&&(clearInterval(t(this,Dt)),r(this,Dt,setTimeout(()=>{const n=t(this,l)[c(this,o,Se).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,Lt).current,easing:Fe.easeInOutExpo}})},t(this,rt).current))),!(e.includes("drag")&&!Ge.device.isTouch&&!t(this,Et).current)){if(t(this,T).current&&e!=="drag"){const n=Math.sign(i);if(t(this,l).length){const d={tween:t(this,Y).current||t(this,tt).current?{easing:t(this,Y).current||"easeInOutCubic",duration:t(this,tt).current||500}:void 0};t(this,At)?this.scrollToSection(t(this,P).current,d):this.shiftSections(n,d)}else t(this,a).shift(n*t(this,y))}else t(this,a).shift(i);r(this,At,e==="drag")}});s(this,se,()=>{r(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,ge).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Qe];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),r(this,ot,document.createElement("div")),t(this,ot).className="content-wrapper",r(this,p,document.createElement("div")),t(this,p).className="content",r(this,Tt,document.createElement("slot")),t(this,p).appendChild(t(this,Tt)),t(this,ot).appendChild(t(this,p)),e.appendChild(t(this,ot))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,yt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,X)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,Y)}get durationCSSProperty(){return t(this,tt)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,et)}get dragInertionCSSProperty(){return t(this,vt)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Ct)}get massCSSProperty(){return t(this,wt)}get stiffnessCSSProperty(){return t(this,Pt)}get mouseDragCSSProperty(){return t(this,Et)}get sectionDistanceScaleCSSProperty(){return t(this,It)}get autoplayCSSProperty(){return t(this,I)}get autoplayPauseDurationCSSProperty(){return t(this,xt)}get autoplayUserDirectionCSSProperty(){return t(this,st)}get classesCSSProperty(){return t(this,D)}get currentIndexStartOffsetCSSProperty(){return t(this,it)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,rt)}get focusDurationCSSProperty(){return t(this,Lt)}get disabledCSSProperty(){return t(this,nt)}get hibernatedCSSProperty(){return t(this,ht)}get currentScrollValue(){return c(this,o,ve).call(this,"current")}get targetScrollValue(){return c(this,o,ve).call(this,"target")}get contentWrapperElement(){return t(this,ot)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,Yt)}get contentPosition(){return t(this,te)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,P)}get limit(){return Math.ceil(t(this,l).length-t(this,q).current)}get distance(){return t(this,ct)}get loopDistance(){return t(this,v).current?t(this,ct)+t(this,k):t(this,ct)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,qt)}get scrollLine(){return t(this,M)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,n=0){const d=e-n,b=d+i+n*2;return this.currentProgress<d?0:this.currentProgress>b?1:(this.currentProgress-d)/(b-d)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const d=e-n,b=d+i+n*2;return this.currentProgress>=d&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const n=t(this,P).current,d=c(this,o,Ie).call(this,e),b=t(this,l)[n],C=t(this,l)[d];if(b&&C){let R=0;const pe=c(this,o,Se).call(this),Kt=t(this,l)[pe],Oe=Kt?this.targetScrollValue-Kt.position:0;t(this,v).current?d===0&&n===t(this,l).length-1?R=t(this,m)+t(this,y)-b.position+t(this,k):d===t(this,l).length-1&&n===0?R=C.position-(t(this,m)+t(this,y)+t(this,k)):R=C.position-b.position:R=C.position-b.position,this.shiftPosition(R-Oe,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){c(this,o,ye).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,G).set(t(this,a).current,{equalize:!0}),t(this,G).set(e,xe({},i.tween)),r(this,at,setTimeout(()=>{r(this,at,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){mt.scrollEntries.register(this),r(this,a,new Ne.Damped(0,{damping:.01,min:0,order:ue.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,A,new le.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Mt)),r(this,lt,new le.KeyboardControls({element:this})),t(this,lt).changeEvent.subscribe(t(this,Mt)),r(this,B,new le.DragControls({element:t(this,p)})),t(this,B).changeEvent.subscribe(t(this,Mt)),r(this,w,new le.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,ee)),t(this,x).subscribe(()=>{c(this,o,fe).call(this)}),t(this,X).subscribe(()=>{c(this,o,fe).call(this)}),t(this,et).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,vt).subscribe(e=>{t(this,B).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,Jt).call(this):c(this,o,zt).call(this))}),t(this,T).subscribe(e=>{t(this,A).debounce=e.current,t(this,B).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,zt).call(this))}),t(this,F).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,zt).call(this))}),t(this,q).subscribe(e=>{t(this,E)&&(t(this,L).call(this),c(this,o,ft).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,l).length||(t(this,W).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(r(this,qt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Ct).subscribe(e=>{t(this,a).damping=e.current}),t(this,wt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Pt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,I).subscribe(e=>{t(this,w).speed=e.current,!t(this,U)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,st).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,D).subscribe(e=>{t(this,E)&&c(this,o,ft).call(this)}),t(this,it).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,$).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,l).length&&c(this,o,ft).call(this)}),t(this,G).subscribe(e=>{t(this,G).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,nt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ae).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,de).call(this))}),t(this,ht).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,ge).call(this))}),t(this,yt).observe(),t(this,x).observe(),t(this,X).observe(),t(this,_).observe(),t(this,H).observe(),t(this,W).observe(),t(this,T).observe(),t(this,Y).observe(),t(this,tt).observe(),t(this,F).observe(),t(this,et).observe(),t(this,vt).observe(),t(this,q).observe(),t(this,v).observe(),t(this,Ct).observe(),t(this,wt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,It).observe(),t(this,I).observe(),t(this,I).observe(),t(this,xt).observe(),t(this,st).observe(),t(this,D).observe(),t(this,it).observe(),t(this,$).observe(),t(this,rt).observe(),t(this,Lt).observe(),t(this,nt).observe(),t(this,ht).observe(),Rt.windowResizer.subscribe(t(this,se),ue.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,yt).unobserve(),t(this,x).unobserve(),t(this,X).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,W).unobserve(),t(this,T).unobserve(),t(this,Y).unobserve(),t(this,tt).unobserve(),t(this,F).unobserve(),t(this,et).unobserve(),t(this,vt).unobserve(),t(this,q).unobserve(),t(this,v).unobserve(),t(this,Ct).unobserve(),t(this,wt).unobserve(),t(this,Pt).unobserve(),t(this,Et).unobserve(),t(this,It).unobserve(),t(this,I).unobserve(),t(this,xt).unobserve(),t(this,st).unobserve(),t(this,D).unobserve(),t(this,it).unobserve(),t(this,$).unobserve(),t(this,rt).unobserve(),t(this,Lt).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),Rt.windowResizer.unsubscribe(t(this,se)),c(this,o,me).call(this)}}a=new WeakMap,yt=new WeakMap,x=new WeakMap,X=new WeakMap,_=new WeakMap,H=new WeakMap,W=new WeakMap,T=new WeakMap,Y=new WeakMap,tt=new WeakMap,F=new WeakMap,et=new WeakMap,vt=new WeakMap,q=new WeakMap,v=new WeakMap,Ct=new WeakMap,wt=new WeakMap,Pt=new WeakMap,Et=new WeakMap,It=new WeakMap,I=new WeakMap,xt=new WeakMap,st=new WeakMap,D=new WeakMap,it=new WeakMap,$=new WeakMap,rt=new WeakMap,Lt=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,p=new WeakMap,Tt=new WeakMap,l=new WeakMap,Yt=new WeakMap,te=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,A=new WeakMap,lt=new WeakMap,B=new WeakMap,w=new WeakMap,P=new WeakMap,qt=new WeakMap,ct=new WeakMap,N=new WeakMap,U=new WeakMap,ut=new WeakMap,Dt=new WeakMap,at=new WeakMap,G=new WeakMap,At=new WeakMap,M=new WeakMap,E=new WeakMap,o=new WeakSet,fe=function(){const e=t(this,x).current,i=t(this,X).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,A).axis=t(this,et).current?"max":e,t(this,lt).dimension=e==="x"?"width":"height",t(this,B).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},Jt=function(){c(this,o,zt).call(this),t(this,Tt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Je(e,i,this))}),t(this,p).style.transform="",ce.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,ft).call(this)},zt=function(){t(this,l).forEach(e=>{e.destroy()}),r(this,l,[]),t(this,P).reset(),t(this,a).reset(),ce.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ae=function(){t(this,U)||(r(this,U,!0),t(this,a).unsubscribe(t(this,Bt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Dt)),clearInterval(t(this,at)),t(this,G).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,lt).disconnect(),t(this,B).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},de=function(){t(this,U)&&(r(this,U,!1),t(this,a).subscribe(t(this,Bt)),t(this,A).connect(),t(this,lt).connect(),t(this,B).connect(),t(this,I).current&&t(this,w).connect())},me=function(){t(this,ut)||(r(this,ut,!0),Rt.windowResizer.unsubscribe(t(this,L)),Qt.elementResizer.unsubscribe(t(this,L)),c(this,o,ae).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,zt).call(this):(t(this,P).reset(),t(this,a).reset()),mt.scrollEntries.unregister(this))},ge=function(){t(this,ut)&&(r(this,ut,!1),mt.scrollEntries.register(this),(t(this,v).current||t(this,W).current||t(this,v).current||t(this,F).current||t(this,T).current)&&c(this,o,Jt).call(this),c(this,o,de).call(this),Rt.windowResizer.subscribe(t(this,L),ue.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Bt=new WeakMap,Ie=function(e){let i=t(this,P).current;return t(this,v).current?i=$e.loopNumber(e,t(this,l).length):i=ke.clamp(e,0,this.limit),i},Mt=new WeakMap,ee=new WeakMap,ye=function(e=1){t(this,st).current&&(t(this,w).direction=e),t(this,I).current&&t(this,w).pauseAndContinue(t(this,xt).current,this.sectionalCSSProperty.current)},ve=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,k));return i<0?t(this,m)+i+t(this,y)+t(this,k):i}else return t(this,a)[e]},ft=function(){if(t(this,l).length){const e=t(this,P).current+t(this,it).current;if(e===0?r(this,M,"start"):e===this.limit?r(this,M,"end"):r(this,M,null),ce.dispatchEvent(this,"scrollLine",{detail:{line:t(this,M)}}),t(this,D).current){this.classList.remove("end","start"),t(this,M)&&this.classList.add(t(this,M));const i=t(this,q).current+t(this,$).current;t(this,l).forEach((n,d)=>{const b=e-this.limit-1+t(this,$).current,C=e+i,R=this.sections.length-C;d>=e&&d<C||d<=b?n.mark("current"):d>=C&&d<C+R/2||d<=b+i?n.mark("next"):n.mark("previous")})}}},Se=function(){let e=this.targetScrollValue,i=1/0,n=0;const d=t(this,a).direction;for(let b=0;b<t(this,l).length;b++){const C=t(this,l)[b];let R=t(this,At)?C.size*d*-1*.4:0,pe=C.position;const Kt=Math.abs(pe+R-e);Kt<i&&(i=Kt,n=b)}return n},se=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",jt);var ie;class Ce extends HTMLElement{constructor(){super(...arguments);s(this,ie,null)}get scrollElement(){return t(this,ie)}connectedCallback(){const e=Re.findParentElement(this,jt);e instanceof jt?r(this,ie,e):console.error(this,"e-scroll not found")}}ie=new WeakMap;var dt,z,Z,j,Ot,Vt,St,_t,re,ne;class Te extends Ce{constructor(){super();s(this,dt,null);s(this,z,null);s(this,Z,!1);s(this,j,0);s(this,Ot,0);s(this,Vt,0);s(this,St,()=>{r(this,Z,this.offsetWidth>this.offsetHeight);const e=t(this,Z)?this.offsetWidth:this.offsetHeight;r(this,j,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,j,Math.max(t(this,j),30)),t(this,Z)?(t(this,z).style.width=t(this,j)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,j)+"px"),r(this,Ot,e-t(this,j)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,_t).call(this)});s(this,_t,()=>{r(this,Vt,this.scrollElement.currentProgress*t(this,Ot)),t(this,Z)?t(this,z).style.transform=`translate3d(${t(this,Vt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Vt)}px, 0px)`});s(this,re,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ne,e=>{document.documentElement.classList.add("grabbing"),Ze.setupDrag(d=>{const b=t(this,Z)?d.x:d.y,C=this.scrollElement.distance/t(this,Ot),R=(b-n)*C;this.scrollElement.setPosition(i+R)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,n=t(this,Z)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ze.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],r(this,dt,document.createElement("slot")),t(this,dt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,dt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,dt).assignedElements()[0]||t(this,dt).firstElementChild;r(this,z,e),t(this,z).addEventListener("pointerdown",t(this,ne)),Rt.windowResizer.subscribe(t(this,St),ue.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,St)),Qt.elementResizer.subscribe(this.scrollElement,t(this,St)),this.scrollElement.onScroll(t(this,_t)),this.scrollElement.axisCSSProperty.subscribe(t(this,re))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,ne)),Rt.windowResizer.unsubscribe(t(this,St)),Qt.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,_t)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,re))}}dt=new WeakMap,z=new WeakMap,Z=new WeakMap,j=new WeakMap,Ot=new WeakMap,Vt=new WeakMap,St=new WeakMap,_t=new WeakMap,re=new WeakMap,ne=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Te);var Ht,Wt,Ft;class qe extends Ce{constructor(){super();s(this,Ht,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Wt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Ft,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Ht).current,i=t(this,Wt).current,n=t(this,Ft).current;this.handleClick({behaviour:e,tween:i||n?{easing:i,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Ht).observe(),t(this,Wt).observe(),t(this,Ft).observe()}disconnectedCallback(){t(this,Ht).close(),t(this,Wt).close(),t(this,Ft).close()}}Ht=new WeakMap,Wt=new WeakMap,Ft=new WeakMap;var $t;class De extends qe{constructor(){super(...arguments);s(this,$t,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,$t).current,e)}connectedCallback(){super.connectedCallback(),t(this,$t).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,$t).close()}}$t=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",De);var K,Nt;class Ae extends qe{constructor(){super(...arguments);s(this,K,new S.CSSProperty(this,"--step",1));s(this,Nt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,K).current>0&&this.scrollElement.scrollLine==="end"||t(this,K).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,K).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,K).subscribe(()=>{t(this,Nt).call(this)}),t(this,K).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Nt)),t(this,Nt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,K).close(),this.removeAttribute("disabled")}}K=new WeakMap,Nt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ae);var J,pt,Ut,he,oe,Gt;class Xe{constructor(h,e,i){s(this,J,null);s(this,pt,null);s(this,Ut,null);s(this,he,null);s(this,oe,()=>{t(this,pt).scrollToSection(t(this,Ut),{behaviour:t(this,he)})});s(this,Gt,()=>{t(this,J).classList.toggle("current",t(this,pt).counter.current===t(this,Ut))});O.isBrowser&&(r(this,J,document.createElement("button")),r(this,pt,h),r(this,he,i),r(this,Ut,e),t(this,J).addEventListener("click",t(this,oe)),t(this,pt).counter.subscribe(t(this,Gt)),t(this,Gt).call(this))}get element(){return t(this,J)}destroy(){t(this,J).removeEventListener("click",t(this,oe)),t(this,pt).counter.unsubscribe(t(this,Gt)),t(this,J).remove()}}J=new WeakMap,pt=new WeakMap,Ut=new WeakMap,he=new WeakMap,oe=new WeakMap,Gt=new WeakMap;var bt,Zt;class Be extends Ce{constructor(){super(...arguments);s(this,bt,[]);s(this,Zt,je.debounce(()=>{t(this,bt).forEach(e=>e.destroy()),r(this,bt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Xe(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,bt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Zt)),t(this,Zt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Zt)),t(this,bt).forEach(e=>e.destroy()),r(this,bt,[])}}bt=new WeakMap,Zt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Be);class Me extends Ke.ScrollSegmentElement{connectedCallback(){const h=Re.findParentElement(this,jt);h instanceof jt?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Me);exports.ScrollBulletButtonsElement=Be;exports.ScrollElement=jt;exports.ScrollSegmentElement=Me;exports.ScrollSetButtonElement=De;exports.ScrollStepButtonElement=Ae;exports.ScrollbarElement=Te;
|
|
1
|
+
"use strict";var Ve=Object.defineProperty;var we=Object.getOwnPropertySymbols;var _e=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var Ee=u=>{throw TypeError(u)};var Pe=(u,h,e)=>h in u?Ve(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,xe=(u,h)=>{for(var e in h||(h={}))_e.call(h,e)&&Pe(u,e,h[e]);if(we)for(var e of we(h))He.call(h,e)&&Pe(u,e,h[e]);return u};var be=(u,h,e)=>h.has(u)||Ee("Cannot "+e);var t=(u,h,e)=>(be(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?Ee("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),r=(u,h,e,i)=>(be(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),c=(u,h,e)=>(be(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const We=require("../Store-DRp_K37w.cjs"),O=require("../index-Cqw2NKev.cjs"),Fe=require("../easings-GegIwET5.cjs"),ce=require("../events-KVanG9sR.cjs"),ze=require("../jss-BXAMRO12.cjs"),kt=require("../layout-Ctc2p3uz.cjs"),ke=require("../math-GDWEqu7y.cjs"),$e=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ue=require("../order/index.cjs"),Ne=require("../Damped-DbaLw6w1.cjs"),Ue=require("../Tweened-Dm6Avip9.cjs"),le=require("../controls/index.cjs"),Rt=require("../window-resizer/index.cjs"),mt=require("../scroll-entries/index.cjs"),Le=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ge=require("../device/index.cjs"),Qt=require("../element-resizer/index.cjs"),Ze=require("../gestures-DHLrn6Q8.cjs"),Re=require("../dom-JBOkFLTh.cjs"),je=require("../function-MthRj-GJ.cjs"),Ke=require("../scroll-segment/index.cjs");var f,Xt,g,gt,V,Q;class Je{constructor(h,e,i){s(this,f);s(this,Xt);s(this,g);s(this,gt,0);s(this,V,0);s(this,Q,null);r(this,f,h),r(this,Xt,e),r(this,g,i),mt.scrollEntries.register(t(this,f))}get index(){return t(this,Xt)}get size(){return t(this,gt)}get position(){return t(this,V)}destroy(){mt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null),this.setSize()}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){r(this,gt,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),r(this,V,t(this,g).vertical?kt.getCumulativeOffsetTop(t(this,f)):kt.getCumulativeOffsetLeft(t(this,f))),r(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,gt)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),mt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,n=t(this,V)-t(this,g).viewportSize-e,d=t(this,V)+t(this,gt)+e,b=ke.clamp(i,n,d);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,Q)!==h&&(t(this,Q)&&t(this,f).classList.remove(t(this,Q)),h&&t(this,f).classList.add(h),r(this,Q,h),ce.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Q)},custom:!0}))}}f=new WeakMap,Xt=new WeakMap,g=new WeakMap,gt=new WeakMap,V=new WeakMap,Q=new WeakMap;const Qe=ze.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,yt,x,X,_,H,W,T,Y,tt,F,et,vt,q,v,Ct,wt,Pt,Et,It,I,xt,st,D,it,$,rt,Lt,nt,ht,ot,p,Tt,l,Yt,te,y,m,k,A,lt,B,w,P,qt,ct,N,U,ut,Dt,at,G,At,M,E,o,fe,Jt,zt,ae,de,me,ge,L,Bt,Ie,Mt,ee,ye,ve,ft,Se,se;class jt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,yt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,X,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,W,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,Y,new S.CSSProperty(this,"--tween-easing",!1));s(this,tt,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,et,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,vt,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,Ct,new S.CSSProperty(this,"--damping",20));s(this,wt,new S.CSSProperty(this,"--mass",0));s(this,Pt,new S.CSSProperty(this,"--stiffness",0));s(this,Et,new S.CSSProperty(this,"--mouse-drag",!1));s(this,It,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,I,new S.CSSProperty(this,"--autoplay",0));s(this,xt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,st,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,D,new S.CSSProperty(this,"--classes",!1));s(this,it,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,rt,new S.CSSProperty(this,"--focus-delay",0));s(this,Lt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,nt,new S.CSSProperty(this,"--disabled",!1));s(this,ht,new S.CSSProperty(this,"--hibernate",!1));s(this,ot,null);s(this,p,null);s(this,Tt,null);s(this,l,[]);s(this,Yt,0);s(this,te,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,A,null);s(this,lt,null);s(this,B,null);s(this,w,null);s(this,P,new We.Store(0));s(this,qt,0);s(this,ct,0);s(this,N,!1);s(this,U,!0);s(this,ut,!0);s(this,Dt);s(this,at);s(this,G,new Ue.Tweened);s(this,At,!1);s(this,M,null);s(this,E,!1);s(this,L,()=>{if(t(this,ht).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,P).current;if(r(this,Yt,this.vertical?kt.getCumulativeOffsetTop(this):kt.getCumulativeOffsetLeft(this)),r(this,te,this.vertical?kt.getCumulativeOffsetTop(t(this,p)):kt.getCumulativeOffsetLeft(t(this,p))),r(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,k,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):r(this,k,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,F).current&&t(this,l).length){const n=t(this,q).current,d=(t(this,y)-t(this,k)*(n-1))/n;t(this,l).forEach(b=>{b.setSize(d)})}else t(this,l).forEach(n=>{n.setSize()});if(t(this,l).forEach(n=>{n.resize()}),t(this,H).current){r(this,m,t(this,y)*t(this,H).current);const n=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=n+"px",t(this,p).style.height="100%"):(t(this,p).style.height=n+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",r(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",r(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const n=getComputedStyle(this),d=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,m,t(this,m)+d),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const n=t(this,l)[t(this,l).length-1],d=n.position+n.size-t(this,y),b=t(this,m)-d;r(this,ct,n.position+n.size+b)}else r(this,ct,t(this,m));if(t(this,T).current&&t(this,l).length){const n=t(this,l)[i];t(this,a).set(n.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});r(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,nt).current||c(this,o,de).call(this):c(this,o,ae).call(this),t(this,Bt).call(this)});s(this,Bt,()=>{if(!t(this,N)||t(this,ut)||t(this,U))return;const e=this.currentScrollValue;if(r(this,qt,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,P).current=c(this,o,Se).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;mt.scrollEntries.update(this,t(this,x).current,e)});s(this,Mt,(e,i)=>{t(this,yt).current&&(c(this,o,ye).call(this,Math.sign(i)||1),t(this,ee).call(this,e,i))});s(this,ee,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,at)||t(this,G).unlistenAnimationFrame(),!t(this,I).current&&t(this,rt).current&&(clearInterval(t(this,Dt)),r(this,Dt,setTimeout(()=>{const n=t(this,l)[c(this,o,Se).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,Lt).current,easing:Fe.easeInOutExpo}})},t(this,rt).current))),!(e.includes("drag")&&!Ge.device.isTouch&&!t(this,Et).current)){if(t(this,T).current&&e!=="drag"){const n=Math.sign(i);if(t(this,l).length){const d={tween:t(this,Y).current||t(this,tt).current?{easing:t(this,Y).current||"easeInOutCubic",duration:t(this,tt).current||500}:void 0};t(this,At)?this.scrollToSection(t(this,P).current,d):this.shiftSections(n,d)}else t(this,a).shift(n*t(this,y))}else t(this,a).shift(i);r(this,At,e==="drag")}});s(this,se,()=>{r(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,ge).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Qe];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),r(this,ot,document.createElement("div")),t(this,ot).className="content-wrapper",r(this,p,document.createElement("div")),t(this,p).className="content",r(this,Tt,document.createElement("slot")),t(this,p).appendChild(t(this,Tt)),t(this,ot).appendChild(t(this,p)),e.appendChild(t(this,ot))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,yt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,X)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,Y)}get durationCSSProperty(){return t(this,tt)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,et)}get dragInertionCSSProperty(){return t(this,vt)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Ct)}get massCSSProperty(){return t(this,wt)}get stiffnessCSSProperty(){return t(this,Pt)}get mouseDragCSSProperty(){return t(this,Et)}get sectionDistanceScaleCSSProperty(){return t(this,It)}get autoplayCSSProperty(){return t(this,I)}get autoplayPauseDurationCSSProperty(){return t(this,xt)}get autoplayUserDirectionCSSProperty(){return t(this,st)}get classesCSSProperty(){return t(this,D)}get currentIndexStartOffsetCSSProperty(){return t(this,it)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,rt)}get focusDurationCSSProperty(){return t(this,Lt)}get disabledCSSProperty(){return t(this,nt)}get hibernatedCSSProperty(){return t(this,ht)}get currentScrollValue(){return c(this,o,ve).call(this,"current")}get targetScrollValue(){return c(this,o,ve).call(this,"target")}get contentWrapperElement(){return t(this,ot)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,Yt)}get contentPosition(){return t(this,te)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,P)}get limit(){return Math.ceil(t(this,l).length-t(this,q).current)}get distance(){return t(this,ct)}get loopDistance(){return t(this,v).current?t(this,ct)+t(this,k):t(this,ct)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,qt)}get scrollLine(){return t(this,M)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,n=0){const d=e-n,b=d+i+n*2;return this.currentProgress<d?0:this.currentProgress>b?1:(this.currentProgress-d)/(b-d)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const d=e-n,b=d+i+n*2;return this.currentProgress>=d&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const n=t(this,P).current,d=c(this,o,Ie).call(this,e),b=t(this,l)[n],C=t(this,l)[d];if(b&&C){let R=0;const pe=c(this,o,Se).call(this),Kt=t(this,l)[pe],Oe=Kt?this.targetScrollValue-Kt.position:0;t(this,v).current?d===0&&n===t(this,l).length-1?R=t(this,m)+t(this,y)-b.position+t(this,k):d===t(this,l).length-1&&n===0?R=C.position-(t(this,m)+t(this,y)+t(this,k)):R=C.position-b.position:R=C.position-b.position,this.shiftPosition(R-Oe,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){c(this,o,ye).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,G).set(t(this,a).current,{equalize:!0}),t(this,G).set(e,xe({},i.tween)),r(this,at,setTimeout(()=>{r(this,at,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){mt.scrollEntries.register(this),r(this,a,new Ne.Damped(0,{damping:.01,min:0,order:ue.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,A,new le.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Mt)),r(this,lt,new le.KeyboardControls({element:this})),t(this,lt).changeEvent.subscribe(t(this,Mt)),r(this,B,new le.DragControls({element:t(this,p)})),t(this,B).changeEvent.subscribe(t(this,Mt)),r(this,w,new le.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,ee)),t(this,x).subscribe(()=>{c(this,o,fe).call(this)}),t(this,X).subscribe(()=>{c(this,o,fe).call(this)}),t(this,et).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,vt).subscribe(e=>{t(this,B).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,Jt).call(this):c(this,o,zt).call(this))}),t(this,T).subscribe(e=>{t(this,A).debounce=e.current,t(this,B).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,zt).call(this))}),t(this,F).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,zt).call(this))}),t(this,q).subscribe(e=>{t(this,E)&&(t(this,L).call(this),c(this,o,ft).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,l).length||(t(this,W).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(r(this,qt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Ct).subscribe(e=>{t(this,a).damping=e.current}),t(this,wt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Pt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,I).subscribe(e=>{t(this,w).speed=e.current,!t(this,U)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,st).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,D).subscribe(e=>{t(this,E)&&c(this,o,ft).call(this)}),t(this,it).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,$).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,l).length&&c(this,o,ft).call(this)}),t(this,G).subscribe(e=>{t(this,G).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,nt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ae).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,de).call(this))}),t(this,ht).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,ge).call(this))}),t(this,yt).observe(),t(this,x).observe(),t(this,X).observe(),t(this,_).observe(),t(this,H).observe(),t(this,W).observe(),t(this,T).observe(),t(this,Y).observe(),t(this,tt).observe(),t(this,F).observe(),t(this,et).observe(),t(this,vt).observe(),t(this,q).observe(),t(this,v).observe(),t(this,Ct).observe(),t(this,wt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,It).observe(),t(this,I).observe(),t(this,I).observe(),t(this,xt).observe(),t(this,st).observe(),t(this,D).observe(),t(this,it).observe(),t(this,$).observe(),t(this,rt).observe(),t(this,Lt).observe(),t(this,nt).observe(),t(this,ht).observe(),Rt.windowResizer.subscribe(t(this,se),ue.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,yt).unobserve(),t(this,x).unobserve(),t(this,X).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,W).unobserve(),t(this,T).unobserve(),t(this,Y).unobserve(),t(this,tt).unobserve(),t(this,F).unobserve(),t(this,et).unobserve(),t(this,vt).unobserve(),t(this,q).unobserve(),t(this,v).unobserve(),t(this,Ct).unobserve(),t(this,wt).unobserve(),t(this,Pt).unobserve(),t(this,Et).unobserve(),t(this,It).unobserve(),t(this,I).unobserve(),t(this,xt).unobserve(),t(this,st).unobserve(),t(this,D).unobserve(),t(this,it).unobserve(),t(this,$).unobserve(),t(this,rt).unobserve(),t(this,Lt).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),Rt.windowResizer.unsubscribe(t(this,se)),c(this,o,me).call(this)}}a=new WeakMap,yt=new WeakMap,x=new WeakMap,X=new WeakMap,_=new WeakMap,H=new WeakMap,W=new WeakMap,T=new WeakMap,Y=new WeakMap,tt=new WeakMap,F=new WeakMap,et=new WeakMap,vt=new WeakMap,q=new WeakMap,v=new WeakMap,Ct=new WeakMap,wt=new WeakMap,Pt=new WeakMap,Et=new WeakMap,It=new WeakMap,I=new WeakMap,xt=new WeakMap,st=new WeakMap,D=new WeakMap,it=new WeakMap,$=new WeakMap,rt=new WeakMap,Lt=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,p=new WeakMap,Tt=new WeakMap,l=new WeakMap,Yt=new WeakMap,te=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,A=new WeakMap,lt=new WeakMap,B=new WeakMap,w=new WeakMap,P=new WeakMap,qt=new WeakMap,ct=new WeakMap,N=new WeakMap,U=new WeakMap,ut=new WeakMap,Dt=new WeakMap,at=new WeakMap,G=new WeakMap,At=new WeakMap,M=new WeakMap,E=new WeakMap,o=new WeakSet,fe=function(){const e=t(this,x).current,i=t(this,X).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,A).axis=t(this,et).current?"max":e,t(this,lt).dimension=e==="x"?"width":"height",t(this,B).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},Jt=function(){c(this,o,zt).call(this),t(this,Tt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Je(e,i,this))}),t(this,p).style.transform="",ce.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,ft).call(this)},zt=function(){t(this,l).forEach(e=>{e.destroy()}),r(this,l,[]),t(this,P).reset(),t(this,a).reset(),ce.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ae=function(){t(this,U)||(r(this,U,!0),t(this,a).unsubscribe(t(this,Bt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Dt)),clearInterval(t(this,at)),t(this,G).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,lt).disconnect(),t(this,B).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},de=function(){t(this,U)&&(r(this,U,!1),t(this,a).subscribe(t(this,Bt)),t(this,A).connect(),t(this,lt).connect(),t(this,B).connect(),t(this,I).current&&t(this,w).connect())},me=function(){t(this,ut)||(r(this,ut,!0),Rt.windowResizer.unsubscribe(t(this,L)),Qt.elementResizer.unsubscribe(t(this,L)),c(this,o,ae).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,zt).call(this):(t(this,P).reset(),t(this,a).reset()),mt.scrollEntries.unregister(this))},ge=function(){t(this,ut)&&(r(this,ut,!1),mt.scrollEntries.register(this),(t(this,v).current||t(this,W).current||t(this,v).current||t(this,F).current||t(this,T).current)&&c(this,o,Jt).call(this),c(this,o,de).call(this),Rt.windowResizer.subscribe(t(this,L),ue.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Bt=new WeakMap,Ie=function(e){let i=t(this,P).current;return t(this,v).current?i=$e.loopNumber(e,t(this,l).length):i=ke.clamp(e,0,this.limit),i},Mt=new WeakMap,ee=new WeakMap,ye=function(e=1){t(this,st).current&&(t(this,w).direction=e),t(this,I).current&&t(this,w).pauseAndContinue(t(this,xt).current,this.sectionalCSSProperty.current)},ve=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,k));return i<0?t(this,m)+i+t(this,y)+t(this,k):i}else return t(this,a)[e]},ft=function(){if(t(this,l).length){const e=t(this,P).current+t(this,it).current;if(e===0?r(this,M,"start"):e===this.limit?r(this,M,"end"):r(this,M,null),ce.dispatchEvent(this,"scrollLine",{detail:{line:t(this,M)}}),t(this,D).current){this.classList.remove("end","start"),t(this,M)&&this.classList.add(t(this,M));const i=t(this,q).current+t(this,$).current;t(this,l).forEach((n,d)=>{const b=e-this.limit-1+t(this,$).current,C=e+i,R=this.sections.length-C;d>=e&&d<C||d<=b?n.mark("current"):d>=C&&d<C+R/2||d<=b+i?n.mark("next"):n.mark("previous")})}}},Se=function(){let e=this.targetScrollValue,i=1/0,n=0;const d=t(this,a).direction;for(let b=0;b<t(this,l).length;b++){const C=t(this,l)[b];let R=t(this,At)?C.size*d*-1*.4:0,pe=C.position;const Kt=Math.abs(pe+R-e);Kt<i&&(i=Kt,n=b)}return n},se=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",jt);var ie;class Ce extends HTMLElement{constructor(){super(...arguments);s(this,ie,null)}get scrollElement(){return t(this,ie)}connectedCallback(){const e=Re.findParentElement(this,jt);e instanceof jt?r(this,ie,e):console.error(this,"e-scroll not found")}}ie=new WeakMap;var dt,z,Z,j,Ot,Vt,St,_t,re,ne;class Te extends Ce{constructor(){super();s(this,dt,null);s(this,z,null);s(this,Z,!1);s(this,j,0);s(this,Ot,0);s(this,Vt,0);s(this,St,()=>{r(this,Z,this.offsetWidth>this.offsetHeight);const e=t(this,Z)?this.offsetWidth:this.offsetHeight;r(this,j,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,j,Math.max(t(this,j),30)),t(this,Z)?(t(this,z).style.width=t(this,j)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,j)+"px"),r(this,Ot,e-t(this,j)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,_t).call(this)});s(this,_t,()=>{r(this,Vt,this.scrollElement.currentProgress*t(this,Ot)),t(this,Z)?t(this,z).style.transform=`translate3d(${t(this,Vt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Vt)}px, 0px)`});s(this,re,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ne,e=>{document.documentElement.classList.add("grabbing"),Ze.setupDrag(d=>{const b=t(this,Z)?d.x:d.y,C=this.scrollElement.distance/t(this,Ot),R=(b-n)*C;this.scrollElement.setPosition(i+R)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,n=t(this,Z)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ze.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],r(this,dt,document.createElement("slot")),t(this,dt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,dt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,dt).assignedElements()[0]||t(this,dt).firstElementChild;r(this,z,e),t(this,z).addEventListener("pointerdown",t(this,ne)),Rt.windowResizer.subscribe(t(this,St),ue.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,St)),Qt.elementResizer.subscribe(this.scrollElement,t(this,St)),this.scrollElement.onScroll(t(this,_t)),this.scrollElement.axisCSSProperty.subscribe(t(this,re))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,ne)),Rt.windowResizer.unsubscribe(t(this,St)),Qt.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,_t)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,re))}}dt=new WeakMap,z=new WeakMap,Z=new WeakMap,j=new WeakMap,Ot=new WeakMap,Vt=new WeakMap,St=new WeakMap,_t=new WeakMap,re=new WeakMap,ne=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Te);var Ht,Wt,Ft;class qe extends Ce{constructor(){super();s(this,Ht,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Wt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Ft,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Ht).current,i=t(this,Wt).current,n=t(this,Ft).current;this.handleClick({behaviour:e,tween:i||n?{easing:i,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Ht).observe(),t(this,Wt).observe(),t(this,Ft).observe()}disconnectedCallback(){t(this,Ht).close(),t(this,Wt).close(),t(this,Ft).close()}}Ht=new WeakMap,Wt=new WeakMap,Ft=new WeakMap;var $t;class De extends qe{constructor(){super(...arguments);s(this,$t,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,$t).current,e)}connectedCallback(){super.connectedCallback(),t(this,$t).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,$t).close()}}$t=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",De);var K,Nt;class Ae extends qe{constructor(){super(...arguments);s(this,K,new S.CSSProperty(this,"--step",1));s(this,Nt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,K).current>0&&this.scrollElement.scrollLine==="end"||t(this,K).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,K).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,K).subscribe(()=>{t(this,Nt).call(this)}),t(this,K).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Nt)),t(this,Nt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,K).close(),this.removeAttribute("disabled")}}K=new WeakMap,Nt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ae);var J,pt,Ut,he,oe,Gt;class Xe{constructor(h,e,i){s(this,J,null);s(this,pt,null);s(this,Ut,null);s(this,he,null);s(this,oe,()=>{t(this,pt).scrollToSection(t(this,Ut),{behaviour:t(this,he)})});s(this,Gt,()=>{t(this,J).classList.toggle("current",t(this,pt).counter.current===t(this,Ut))});O.isBrowser&&(r(this,J,document.createElement("button")),r(this,pt,h),r(this,he,i),r(this,Ut,e),t(this,J).addEventListener("click",t(this,oe)),t(this,pt).counter.subscribe(t(this,Gt)),t(this,Gt).call(this))}get element(){return t(this,J)}destroy(){t(this,J).removeEventListener("click",t(this,oe)),t(this,pt).counter.unsubscribe(t(this,Gt)),t(this,J).remove()}}J=new WeakMap,pt=new WeakMap,Ut=new WeakMap,he=new WeakMap,oe=new WeakMap,Gt=new WeakMap;var bt,Zt;class Be extends Ce{constructor(){super(...arguments);s(this,bt,[]);s(this,Zt,je.debounce(()=>{t(this,bt).forEach(e=>e.destroy()),r(this,bt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Xe(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,bt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Zt)),t(this,Zt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Zt)),t(this,bt).forEach(e=>e.destroy()),r(this,bt,[])}}bt=new WeakMap,Zt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Be);class Me extends Ke.ScrollSegmentElement{connectedCallback(){const h=Re.findParentElement(this,jt);h instanceof jt?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Me);exports.ScrollBulletButtonsElement=Be;exports.ScrollElement=jt;exports.ScrollSegmentElement=Me;exports.ScrollSetButtonElement=De;exports.ScrollStepButtonElement=Ae;exports.ScrollbarElement=Te;
|
package/lib/scroll/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import { S as Re } from "../Store-D2xCXENW.js";
|
|
|
18
18
|
import { i as H } from "../index-euf5anj6.js";
|
|
19
19
|
import { a as He } from "../easings-Bni3YAAW.js";
|
|
20
20
|
import { d as oe } from "../events-CsVF98U6.js";
|
|
21
|
-
import { c as ke } from "../jss-
|
|
21
|
+
import { c as ke } from "../jss-Chm3yE5y.js";
|
|
22
22
|
import { a as pe, g as fe } from "../layout-DpZo-I0y.js";
|
|
23
23
|
import { c as ze } from "../math-BOBiC4TN.js";
|
|
24
24
|
import { l as Be } from "../number-DwCxt_Ck.js";
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-Bf2svn4j.cjs"),y=require("../index-Cqw2NKev.cjs"),d=require("../canvas-CU5Xjahf.cjs"),g=require("../coordinates-D8Np3cPD.cjs"),p=require("../dom-JBOkFLTh.cjs"),r=require("../easings-GegIwET5.cjs"),q=require("../events-KVanG9sR.cjs"),C=require("../file-DSpfWdd9.cjs"),I=require("../function-MthRj-GJ.cjs"),w=require("../gestures-DHLrn6Q8.cjs"),O=require("../jss-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-Bf2svn4j.cjs"),y=require("../index-Cqw2NKev.cjs"),d=require("../canvas-CU5Xjahf.cjs"),g=require("../coordinates-D8Np3cPD.cjs"),p=require("../dom-JBOkFLTh.cjs"),r=require("../easings-GegIwET5.cjs"),q=require("../events-KVanG9sR.cjs"),C=require("../file-DSpfWdd9.cjs"),I=require("../function-MthRj-GJ.cjs"),w=require("../gestures-DHLrn6Q8.cjs"),O=require("../jss-BXAMRO12.cjs"),m=require("../layout-Ctc2p3uz.cjs"),i=require("../math-GDWEqu7y.cjs"),f=require("../number-0243DApo.cjs"),c=require("../object-CCiXnER2.cjs"),T=require("../polyfills-Df4r-ETT.cjs"),Q=require("../scroll-H9zqFeML.cjs"),l=require("../string-DhgS_iFl.cjs"),S=require("../style-At6aDoqG.cjs"),u=require("../url-CLvdjbII.cjs");function B(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function D(t,e){const n=t.length;e=e%n;const o=new Array(n);for(let s=0;s<n;s++){const a=(s+e)%n;o[a]=t[s]}return o}function A(t,e=2){if(!+t)return"0 Bytes";const n=1024,o=e<0?0:e,s=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],a=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,a)).toFixed(o))} ${s[a]}`}function R(t){if(navigator.clipboard)navigator.clipboard.writeText(t).then(()=>{console.log("Text copied to clipboard successfully!")}).catch(e=>{console.error("Failed to copy text to clipboard:",e)});else{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.top="0",e.style.left="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")?console.log("Text copied to clipboard successfully!"):console.error("Failed to copy text to clipboard.")}catch(n){console.error("Failed to copy text to clipboard:",n)}document.body.removeChild(e)}}function N(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function z(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function x(t,e){const n=t.style.getPropertyValue(e);if(n){const o=n.toString();return o.startsWith("var")?x(t,o.slice(4,-1)):o}}function M(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(o=>{o instanceof CSSStyleRule&&o.selectorText===":root"&&t.forEach(s=>{const a=x(o,s);a&&(e[s]=a)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function j(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function k(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function V(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}function U(t,e){if(t){const o=t.content.cloneNode(!0).firstElementChild;return o&&(e==null||e(o)),o}return null}function F(t,e,n,o){let s,a=!1,b=0;const v=()=>{clearInterval(s),o!=null&&o.restartCounter&&(b=0),a&&(s=setInterval(()=>{n(b++)},e))},E=y.intersector.subscribe(t,P=>{a=P.isIntersecting,v()});return()=>{E(),clearInterval(s)}}exports.parseAttribute=h.parseAttribute;exports.parseAttributeValue=h.parseAttributeValue;exports.isBrowser=y.isBrowser;exports.contain=d.contain;exports.cover=d.cover;exports.fixPosition=d.fixPosition;exports.measureText=d.measureText;exports.getPointerPosition=g.getPointerPosition;exports.normalize=g.normalize;exports.screenToCartesian=g.screenToCartesian;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getAllParentElements=p.getAllParentElements;exports.getElement=p.getElement;exports.easeInCubic=r.easeInCubic;exports.easeInExpo=r.easeInExpo;exports.easeInOutCubic=r.easeInOutCubic;exports.easeInOutExpo=r.easeInOutExpo;exports.easeInOutQuad=r.easeInOutQuad;exports.easeInOutQuart=r.easeInOutQuart;exports.easeInOutQuint=r.easeInOutQuint;exports.easeInQuad=r.easeInQuad;exports.easeInQuart=r.easeInQuart;exports.easeInQuint=r.easeInQuint;exports.easeOutCubic=r.easeOutCubic;exports.easeOutExpo=r.easeOutExpo;exports.easeOutQuad=r.easeOutQuad;exports.easeOutQuart=r.easeOutQuart;exports.easeOutQuint=r.easeOutQuint;exports.linear=r.linear;exports.dispatchEvent=q.dispatchEvent;exports.createJSONAndSave=C.createJSONAndSave;exports.downloadURI=C.downloadURI;exports.debounce=I.debounce;exports.throttle=I.throttle;exports.setupDrag=w.setupDrag;exports.createStylesheet=O.createStylesheet;exports.styleToString=O.styleToString;exports.getCumulativeOffsetLeft=m.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=m.getCumulativeOffsetTop;exports.getCumulativePosition=m.getCumulativePosition;exports.getStickyOffset=m.getStickyOffset;exports.calculateDistance=i.calculateDistance;exports.calculateDistanceWithRadius=i.calculateDistanceWithRadius;exports.clamp=i.clamp;exports.damp=i.damp;exports.lerp=i.lerp;exports.mapRange=i.mapRange;exports.round=i.round;exports.smootherstep=i.smootherstep;exports.smoothstep=i.smoothstep;exports.step=i.step;exports.loopNumber=f.loopNumber;exports.preciseNumber=f.preciseNumber;exports.roundNumberTo=f.roundNumberTo;exports.toStep=f.toStep;exports.cloneDeep=c.cloneDeep;exports.compareObjects=c.compareObjects;exports.isESClass=c.isESClass;exports.isNullish=c.isNullish;exports.isObject=c.isObject;exports.mergeDeep=c.mergeDeep;exports.mixin=c.mixin;exports.omit=c.omit;exports.pick=c.pick;exports.nullishCoalescing=T.nullishCoalescing;exports.requestIdleCallback=T.requestIdleCallback;exports.scrollToElement=Q.scrollToElement;exports.camelToKebab=l.camelToKebab;exports.capitalize=l.capitalize;exports.generateId=l.generateId;exports.isUppercase=l.isUppercase;exports.kebabToCamel=l.kebabToCamel;exports.snakeToDotted=l.snakeToDotted;exports.toPascalCase=l.toPascalCase;exports.uncapitalize=l.uncapitalize;exports.getElementTransitionDurationMS=S.getElementTransitionDurationMS;exports.getElementTransitionDurationS=S.getElementTransitionDurationS;exports.changeHistory=u.changeHistory;exports.normalizeBase=u.normalizeBase;exports.parseSearchParameters=u.parseSearchParameters;exports.splitPath=u.splitPath;exports.updateSearchParameter=u.updateSearchParameter;exports.cloneTemplateContent=U;exports.copyTextToClipboard=R;exports.decode=k;exports.dotCircleCollision=z;exports.dotRectCollision=N;exports.encode=j;exports.formatBytes=A;exports.getRootVariables=M;exports.insert=B;exports.setIntervalOnIntersection=F;exports.shiftArray=D;exports.wait=V;
|
package/lib/utils/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { d as le } from "../events-CsVF98U6.js";
|
|
|
9
9
|
import { c as fe, d as pe } from "../file-GHShUlue.js";
|
|
10
10
|
import { d as me, t as xe } from "../function-C10DGppn.js";
|
|
11
11
|
import { s as be } from "../gestures-D2Fdra_G.js";
|
|
12
|
-
import { c as ye, s as Ce } from "../jss-
|
|
12
|
+
import { c as ye, s as Ce } from "../jss-Chm3yE5y.js";
|
|
13
13
|
import { g as ve, a as Te, b as Se, c as we } from "../layout-DpZo-I0y.js";
|
|
14
14
|
import { e as Oe, f as Pe, c as Be, d as Ae, l as Qe, m as Re, r as De, b as Me, a as Ne, s as ze } from "../math-BOBiC4TN.js";
|
|
15
15
|
import { l as Ve, p as je, r as ke, t as Ue } from "../number-DwCxt_Ck.js";
|
package/lib/utils/jss.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export type Style = StyleAttribute | {
|
|
|
9
9
|
[key: string]: StyleWrapper | StyleAttribute;
|
|
10
10
|
};
|
|
11
11
|
export declare function styleToString(object: Style): string;
|
|
12
|
-
export declare function createStylesheet(
|
|
12
|
+
export declare function createStylesheet(value: Style | string): CSSStyleSheet;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aptechka",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/denisavitski/aptechka.git"
|
|
@@ -153,6 +153,11 @@
|
|
|
153
153
|
"require": "./lib/order/index.cjs",
|
|
154
154
|
"default": "./lib/order/index.js"
|
|
155
155
|
},
|
|
156
|
+
"./pixel-perfect": {
|
|
157
|
+
"types": "./lib/pixel-perfect/index.d.ts",
|
|
158
|
+
"require": "./lib/pixel-perfect/index.cjs",
|
|
159
|
+
"default": "./lib/pixel-perfect/index.js"
|
|
160
|
+
},
|
|
156
161
|
"./pointer": {
|
|
157
162
|
"types": "./lib/pointer/index.d.ts",
|
|
158
163
|
"require": "./lib/pointer/index.cjs",
|
|
@@ -163,6 +168,11 @@
|
|
|
163
168
|
"require": "./lib/popover/index.cjs",
|
|
164
169
|
"default": "./lib/popover/index.js"
|
|
165
170
|
},
|
|
171
|
+
"./radio": {
|
|
172
|
+
"types": "./lib/radio/index.d.ts",
|
|
173
|
+
"require": "./lib/radio/index.cjs",
|
|
174
|
+
"default": "./lib/radio/index.js"
|
|
175
|
+
},
|
|
166
176
|
"./router": {
|
|
167
177
|
"types": "./lib/router/index.d.ts",
|
|
168
178
|
"require": "./lib/router/index.cjs",
|
|
@@ -325,12 +335,18 @@
|
|
|
325
335
|
"order": [
|
|
326
336
|
"lib/order/index.d.ts"
|
|
327
337
|
],
|
|
338
|
+
"pixel-perfect": [
|
|
339
|
+
"lib/pixel-perfect/index.d.ts"
|
|
340
|
+
],
|
|
328
341
|
"pointer": [
|
|
329
342
|
"lib/pointer/index.d.ts"
|
|
330
343
|
],
|
|
331
344
|
"popover": [
|
|
332
345
|
"lib/popover/index.d.ts"
|
|
333
346
|
],
|
|
347
|
+
"radio": [
|
|
348
|
+
"lib/radio/index.d.ts"
|
|
349
|
+
],
|
|
334
350
|
"router": [
|
|
335
351
|
"lib/router/index.d.ts"
|
|
336
352
|
],
|
package/lib/jss-B_mh4mIw.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("./index-Cqw2NKev.cjs"),i=require("./string-DhgS_iFl.cjs");function s(t){let e="";for(const r in t){const n=t[r];typeof n=="object"?(e+=`${r} {`,e+=s(n),e+="}"):e+=`${i.camelToKebab(r)}: ${n};`}return e}function o(t){if(c.isBrowser){const e=new CSSStyleSheet;return e.replaceSync(s(t)),e}return null}exports.createStylesheet=o;exports.styleToString=s;
|