aptechka 0.50.27 → 0.51.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/lib/{Animation-FtUeV8dp.js → Animation-eO5_LIJl.js} +1 -1
- package/lib/{Animation-ChZNIOTS.cjs → Animation-rTojHgyz.cjs} +1 -1
- package/lib/{Damped-B1lXa9nb.cjs → Damped-DgAIjXp3.cjs} +1 -1
- package/lib/{Damped-BXsGpI-B.js → Damped-GyAS-U-z.js} +1 -1
- package/lib/Store-GokLe_g-.cjs +1 -0
- package/lib/Store-swP_0ymB.js +134 -0
- package/lib/{Tweened-BhDWLNF0.js → Tweened-BSC-evuL.js} +1 -1
- package/lib/{Tweened-cJ36zq1A.cjs → Tweened-DpJDlbj9.cjs} +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.d.ts +1 -1
- package/lib/attribute/index.js +27 -27
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.d.ts +1 -1
- package/lib/css-property/index.js +28 -28
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +1 -1
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +1 -1
- package/lib/notifier/index.cjs +1 -1
- package/lib/notifier/index.d.ts +6 -0
- package/lib/notifier/index.js +21 -15
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +2 -2
- package/lib/scroll/ScrollElement.d.ts +1 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +285 -273
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.js +3 -3
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +1 -1
- package/lib/store/Store.d.ts +3 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +2 -2
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +1 -1
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +1 -1
- package/package.json +1 -1
- package/lib/Store-D2xCXENW.js +0 -134
- package/lib/Store-DRp_K37w.cjs +0 -1
package/lib/ladder/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty;var S=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var v=t=>{throw TypeError(t)};var k=(t,s,e)=>s in t?M(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,w=(t,s)=>{for(var e in s||(s={}))V.call(s,e)&&k(t,e,s[e]);if(S)for(var e of S(s))q.call(s,e)&&k(t,e,s[e]);return t};var g=(t,s,e)=>s.has(t)||v("Cannot "+e);var o=(t,s,e)=>(g(t,s,"read from private field"),e?e.call(t):s.get(t)),p=(t,s,e)=>s.has(t)?v("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),f=(t,s,e,i)=>(g(t,s,"write to private field"),i?i.call(t,e):s.set(t,e),e),b=(t,s,e)=>(g(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../Store-
|
|
1
|
+
"use strict";var M=Object.defineProperty;var S=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var v=t=>{throw TypeError(t)};var k=(t,s,e)=>s in t?M(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,w=(t,s)=>{for(var e in s||(s={}))V.call(s,e)&&k(t,e,s[e]);if(S)for(var e of S(s))q.call(s,e)&&k(t,e,s[e]);return t};var g=(t,s,e)=>s.has(t)||v("Cannot "+e);var o=(t,s,e)=>(g(t,s,"read from private field"),e?e.call(t):s.get(t)),p=(t,s,e)=>s.has(t)?v("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),f=(t,s,e,i)=>(g(t,s,"write to private field"),i?i.call(t,e):s.set(t,e),e),b=(t,s,e)=>(g(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../Store-GokLe_g-.cjs");require("../index-Cqw2NKev.cjs");var d,u,a,h,y;class x extends m.Store{constructor(e){super(e,{equalityCheck:()=>!1});p(this,h);p(this,d);p(this,u);p(this,a);f(this,d,w({},e)),f(this,u,new Map),f(this,a,new Set)}get base(){return o(this,d)}get steps(){return o(this,u)}close(){super.close(),o(this,a).clear(),o(this,u).clear()}bind(e){o(this,a).add(e)}unbind(e){o(this,a).delete(e)}deleteStep(e){this.steps.delete(e)}getStepValue(e){var i;return(i=this.steps.get(e))==null?void 0:i[1]}getExcludedStepsValue(...e){const i=new Map;return e.map(r=>{const n=this.steps.get(r);n&&i.set(r,n)}),b(this,h,y).call(this,i)}getIncludedStepsValue(...e){const i=new Map(this.steps);return e.map(r=>{this.steps.has(r)&&i.delete(r)}),b(this,h,y).call(this,i)}setStep(e,i,r){const n={};for(const c in this.current)n[c]=r[c]||0;this.steps.set(e,[i,n]),this.calculate()}calculate(){this.current=b(this,h,y).call(this,o(this,u))}}d=new WeakMap,u=new WeakMap,a=new WeakMap,h=new WeakSet,y=function(e){const i={};for(const r in this.base)i[r]=this.base[r];for(const r of e){const n=r[1];if(n[0]==="+")for(const c in this.base){const l=n[1][c];i[c]+=l}else if(n[0]==="*")for(const c in this.base){const l=n[1][c];i[c]*=l}else if(n[0]==="/")for(const c in this.base){const l=n[1][c];i[c]/=l}else if(n[0]==="-")for(const c in this.base){const l=n[1][c];i[c]-=l}}for(const r of o(this,a))for(const n in i)r[n]=i[n];return i};exports.Ladder=x;
|
package/lib/ladder/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var S = (e, s, t) => s in e ? w(e, s, { enumerable: !0, configurable: !0, writab
|
|
|
14
14
|
};
|
|
15
15
|
var g = (e, s, t) => s.has(e) || m("Cannot " + t);
|
|
16
16
|
var r = (e, s, t) => (g(e, s, "read from private field"), t ? t.call(e) : s.get(e)), p = (e, s, t) => s.has(e) ? m("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), d = (e, s, t, i) => (g(e, s, "write to private field"), i ? i.call(e, t) : s.set(e, t), t), b = (e, s, t) => (g(e, s, "access private method"), t);
|
|
17
|
-
import { S as M } from "../Store-
|
|
17
|
+
import { S as M } from "../Store-swP_0ymB.js";
|
|
18
18
|
import "../index-euf5anj6.js";
|
|
19
19
|
var f, h, a, u, y;
|
|
20
20
|
class I extends M {
|
package/lib/media/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var d=e=>{throw TypeError(e)};var a=(e,r,s)=>r.has(e)||d("Cannot "+s);var o=(e,r,s)=>(a(e,r,"read from private field"),s?s.call(e):r.get(e)),u=(e,r,s)=>r.has(e)?d("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,s),c=(e,r,s,n)=>(a(e,r,"write to private field"),n?n.call(e,s):r.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../order/index.cjs"),h=require("../window-resizer/index.cjs"),b=require("../Store-
|
|
1
|
+
"use strict";var d=e=>{throw TypeError(e)};var a=(e,r,s)=>r.has(e)||d("Cannot "+s);var o=(e,r,s)=>(a(e,r,"read from private field"),s?s.call(e):r.get(e)),u=(e,r,s)=>r.has(e)?d("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,s),c=(e,r,s,n)=>(a(e,r,"write to private field"),n?n.call(e,s):r.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../order/index.cjs"),h=require("../window-resizer/index.cjs"),b=require("../Store-GokLe_g-.cjs");require("../index-Cqw2NKev.cjs");var i,t;class w extends b.Store{constructor(s){super(!1);u(this,i);u(this,t);c(this,i,s),c(this,t,h.windowResizer.subscribe(()=>{matchMedia(o(this,i)).matches?this.current=!0:this.current=!1},l.RESIZE_ORDER.MEDIA))}close(){super.close(),o(this,t).call(this)}}i=new WeakMap,t=new WeakMap;exports.Media=w;
|
package/lib/media/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var h = (e, s, r) => s.has(e) || a("Cannot " + r);
|
|
|
5
5
|
var o = (e, s, r) => (h(e, s, "read from private field"), r ? r.call(e) : s.get(e)), c = (e, s, r) => s.has(e) ? a("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, r), m = (e, s, r, u) => (h(e, s, "write to private field"), u ? u.call(e, r) : s.set(e, r), r);
|
|
6
6
|
import { RESIZE_ORDER as n } from "../order/index.js";
|
|
7
7
|
import { windowResizer as p } from "../window-resizer/index.js";
|
|
8
|
-
import { S as f } from "../Store-
|
|
8
|
+
import { S as f } from "../Store-swP_0ymB.js";
|
|
9
9
|
import "../index-euf5anj6.js";
|
|
10
10
|
var t, i;
|
|
11
11
|
class E extends f {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var wt=r=>{throw TypeError(r)};var Ge=(r,s,t)=>s.has(r)||wt("Cannot "+t);var e=(r,s,t)=>(Ge(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?wt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ge(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ge(r,s,"access private method"),t);const p=require("../index-Cqw2NKev.cjs"),m=require("../Store-DRp_K37w.cjs"),Yt=require("../file-DSpfWdd9.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-C7gbKx11.cjs");require("../ticker/index.cjs");const pe=require("../string-DUXXtU8v.cjs"),bt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../device/index.cjs"),Qt=require("../math-GDWEqu7y.cjs"),jt=require("../number-0243DApo.cjs"),vt=require("../polyfills-Df4r-ETT.cjs"),yt=require("../element-resizer/index.cjs"),es=require("../style-At6aDoqG.cjs"),ts=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,B,S,we,I,H,a,kt,Et,xt,Ue,Xe,Ct,Tt,Lt,zt,Qe,je,Rt,et,tt,Mt,st,qe,it,nt,ot,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,B,new Set);o(this,S,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{e(this,B).forEach(t=>{t(s)}),e(this,B).clear()});o(this,Oe,(s,t)=>{e(this,S).forEach(i=>{i(s,t)}),e(this,S).clear(),l(this,a,tt).call(this)});if(p.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,tt).call(this),c(this,d,s),(t=e(this,we))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,et).call(this),l(this,a,Ue).call(this)}};d=new WeakMap,B=new WeakMap,S=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else ts.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,B).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,S).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,Xe).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,e(this,d),g):u==="children"?l(this,a,qe).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,B).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Ue).call(this)},Ue=function(){if(p.isBrowser&&(e(this,S).size||e(this,B).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:e(this,Ke),disconnectCallback:e(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Xe=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,Xe).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,S).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,S).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,Qe).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,S).add(n.subscribe(({current:h})=>{l(this,a,je).call(this,i,h)})):l(this,a,je).call(this,i,n)}},Qe=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,Qe).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,S).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(t)}: ${i};`))}},je=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,et).call(this)}},et=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},tt=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,S).add(i.subscribe(({current:n})=>{l(this,a,st).call(this,t,n)})):l(this,a,st).call(this,t,i)}},st=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,S).add(i.subscribe(({current:u,previous:g})=>{const E=e(this,I)[h];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const L=Array.from(E.childNodes),y=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],De=[],C=[];L.length&&ge.forEach((F,P)=>{y.includes(F)?C.push(F):De.push(L[P])}),y.forEach((F,P)=>{if(C[P]!=null){if(F!==C[P]){const V=l(this,a,nt).call(this,F),Z=L[P];V instanceof Node&&!Z.isEqualNode(V)?E.replaceChild(V,Z):E.removeChild(Z)}}else{const V=l(this,a,nt).call(this,F);V instanceof Node&&n.appendChild(V)}}),De.forEach(F=>{E.removeChild(F)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,it).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,bt.isESClass(i)?new i:i());else{const n=l(this,a,ot).call(this,i);n instanceof Node&&l(this,a,it).call(this,s,n)}}))},it=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,B).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,S).add(()=>{t.remove()})):s.appendChild(t)},nt=function(s){return s instanceof Ze?s.node:typeof s=="function"?bt.isESClass(s)?new s:s():l(this,a,ot).call(this,s)},ot=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ke=new WeakMap,Oe=new WeakMap;let N=Ze;function w(...r){return new N(...r)}function ss(r){return new N("a",r)}function Q(r){return new N("button",r)}function v(r){return new N("div",r)}function He(r){return new N("input",r)}function At(r){return new N("label",r)}function ue(r){return new N("slot",r)}function rt(r){return new N("span",r)}function Nt(r){return new N("style",{style:r})}function x(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function is(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${pe.camelToKebab(n)}`]=r[n];return i}const f=is({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(p.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',$t='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',os='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',Pt=`<svg
|
|
1
|
+
"use strict";var wt=r=>{throw TypeError(r)};var Ge=(r,s,t)=>s.has(r)||wt("Cannot "+t);var e=(r,s,t)=>(Ge(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?wt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ge(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ge(r,s,"access private method"),t);const p=require("../index-Cqw2NKev.cjs"),m=require("../Store-GokLe_g-.cjs"),Yt=require("../file-DSpfWdd9.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-C7gbKx11.cjs");require("../ticker/index.cjs");const pe=require("../string-DUXXtU8v.cjs"),bt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../device/index.cjs"),Qt=require("../math-GDWEqu7y.cjs"),jt=require("../number-0243DApo.cjs"),vt=require("../polyfills-Df4r-ETT.cjs"),yt=require("../element-resizer/index.cjs"),es=require("../style-At6aDoqG.cjs"),ts=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,B,S,we,I,H,a,kt,Et,xt,Ue,Xe,Ct,Tt,Lt,zt,Qe,je,Rt,et,tt,Mt,st,qe,it,nt,ot,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,B,new Set);o(this,S,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{e(this,B).forEach(t=>{t(s)}),e(this,B).clear()});o(this,Oe,(s,t)=>{e(this,S).forEach(i=>{i(s,t)}),e(this,S).clear(),l(this,a,tt).call(this)});if(p.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,tt).call(this),c(this,d,s),(t=e(this,we))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,et).call(this),l(this,a,Ue).call(this)}};d=new WeakMap,B=new WeakMap,S=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else ts.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,B).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,S).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,Xe).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,e(this,d),g):u==="children"?l(this,a,qe).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,B).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Ue).call(this)},Ue=function(){if(p.isBrowser&&(e(this,S).size||e(this,B).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:e(this,Ke),disconnectCallback:e(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Xe=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,Xe).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,S).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,S).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,Qe).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,S).add(n.subscribe(({current:h})=>{l(this,a,je).call(this,i,h)})):l(this,a,je).call(this,i,n)}},Qe=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,Qe).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,S).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(t)}: ${i};`))}},je=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,et).call(this)}},et=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},tt=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,S).add(i.subscribe(({current:n})=>{l(this,a,st).call(this,t,n)})):l(this,a,st).call(this,t,i)}},st=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,S).add(i.subscribe(({current:u,previous:g})=>{const E=e(this,I)[h];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const L=Array.from(E.childNodes),y=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],De=[],C=[];L.length&&ge.forEach((F,P)=>{y.includes(F)?C.push(F):De.push(L[P])}),y.forEach((F,P)=>{if(C[P]!=null){if(F!==C[P]){const V=l(this,a,nt).call(this,F),Z=L[P];V instanceof Node&&!Z.isEqualNode(V)?E.replaceChild(V,Z):E.removeChild(Z)}}else{const V=l(this,a,nt).call(this,F);V instanceof Node&&n.appendChild(V)}}),De.forEach(F=>{E.removeChild(F)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,it).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,bt.isESClass(i)?new i:i());else{const n=l(this,a,ot).call(this,i);n instanceof Node&&l(this,a,it).call(this,s,n)}}))},it=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,B).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,S).add(()=>{t.remove()})):s.appendChild(t)},nt=function(s){return s instanceof Ze?s.node:typeof s=="function"?bt.isESClass(s)?new s:s():l(this,a,ot).call(this,s)},ot=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ke=new WeakMap,Oe=new WeakMap;let N=Ze;function w(...r){return new N(...r)}function ss(r){return new N("a",r)}function Q(r){return new N("button",r)}function v(r){return new N("div",r)}function He(r){return new N("input",r)}function At(r){return new N("label",r)}function ue(r){return new N("slot",r)}function rt(r){return new N("span",r)}function Nt(r){return new N("style",{style:r})}function x(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function is(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${pe.camelToKebab(n)}`]=r[n];return i}const f=is({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(p.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',$t='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',os='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',Pt=`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
|
@@ -4,7 +4,7 @@ var vt = (r) => {
|
|
|
4
4
|
var Xe = (r, s, t) => s.has(r) || vt("Cannot " + t);
|
|
5
5
|
var e = (r, s, t) => (Xe(r, s, "read from private field"), t ? t.call(r) : s.get(r)), o = (r, s, t) => s.has(r) ? vt("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(r) : s.set(r, t), c = (r, s, t, i) => (Xe(r, s, "write to private field"), i ? i.call(r, t) : s.set(r, t), t), l = (r, s, t) => (Xe(r, s, "access private method"), t);
|
|
6
6
|
import { i as p } from "../index-euf5anj6.js";
|
|
7
|
-
import { S as $, s as K, a as j } from "../Store-
|
|
7
|
+
import { S as $, s as K, a as j } from "../Store-swP_0ymB.js";
|
|
8
8
|
import { c as Ut } from "../file-GHShUlue.js";
|
|
9
9
|
import { d as Xt } from "../function-C10DGppn.js";
|
|
10
10
|
import { s as Et } from "../gestures-CcXV6fCp.js";
|
package/lib/notifier/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var o=r=>{throw TypeError(r)};var c=(r,s,t)=>s.has(r)||o("Cannot "+t);var e=(r,s,t)=>(c(r,s,"read from private field"),t?t.call(r):s.get(r)),h=(r,s,t)=>s.has(r)?o("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),b=(r,s,t,u)=>(c(r,s,"write to private field"),u?u.call(r,t):s.set(r,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var i;class f{constructor(){h(this,i,[])}get subscribers(){return e(this,i)}get size(){return e(this,i).length}close(){b(this,i,[])}subscribe(s,t=0){return e(this,i).find(u=>u.callback===s)?()=>{}:(e(this,i).push({callback:s,order:t}),b(this,i,e(this,i).sort((u,n)=>u.order-n.order)),()=>{this.unsubscribe(s)})}unsubscribe(s){b(this,i,e(this,i).filter(t=>t.callback!==s))}notify(...s){for(const t of e(this,i))t.callback(...s)}}i=new WeakMap;exports.Notifier=f;
|
package/lib/notifier/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export type NotifierCallback = (...args: any[]) => void;
|
|
2
|
+
export interface NotifierSubscriber {
|
|
3
|
+
callback: NotifierCallback;
|
|
4
|
+
order: number;
|
|
5
|
+
}
|
|
2
6
|
export declare class Notifier<Callback extends NotifierCallback = NotifierCallback> {
|
|
3
7
|
#private;
|
|
8
|
+
get subscribers(): NotifierSubscriber[];
|
|
9
|
+
get size(): number;
|
|
4
10
|
close(): void;
|
|
5
11
|
subscribe(callback: Callback, order?: number): () => void;
|
|
6
12
|
unsubscribe(callback: Callback): void;
|
package/lib/notifier/index.js
CHANGED
|
@@ -1,33 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var u = (r) => {
|
|
2
|
+
throw TypeError(r);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var c = (r, s, i) => s.has(r) || u("Cannot " + i);
|
|
5
|
+
var e = (r, s, i) => (c(r, s, "read from private field"), i ? i.call(r) : s.get(r)), n = (r, s, i) => s.has(r) ? u("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(r) : s.set(r, i), h = (r, s, i, b) => (c(r, s, "write to private field"), b ? b.call(r, i) : s.set(r, i), i);
|
|
6
6
|
var t;
|
|
7
7
|
class l {
|
|
8
8
|
constructor() {
|
|
9
|
-
|
|
9
|
+
n(this, t, []);
|
|
10
|
+
}
|
|
11
|
+
get subscribers() {
|
|
12
|
+
return e(this, t);
|
|
13
|
+
}
|
|
14
|
+
get size() {
|
|
15
|
+
return e(this, t).length;
|
|
10
16
|
}
|
|
11
17
|
close() {
|
|
12
|
-
|
|
18
|
+
h(this, t, []);
|
|
13
19
|
}
|
|
14
|
-
subscribe(s,
|
|
15
|
-
return
|
|
16
|
-
} : (
|
|
20
|
+
subscribe(s, i = 0) {
|
|
21
|
+
return e(this, t).find((b) => b.callback === s) ? () => {
|
|
22
|
+
} : (e(this, t).push({
|
|
17
23
|
callback: s,
|
|
18
|
-
order:
|
|
19
|
-
}),
|
|
24
|
+
order: i
|
|
25
|
+
}), h(this, t, e(this, t).sort((b, o) => b.order - o.order)), () => {
|
|
20
26
|
this.unsubscribe(s);
|
|
21
27
|
});
|
|
22
28
|
}
|
|
23
29
|
unsubscribe(s) {
|
|
24
|
-
|
|
25
|
-
(
|
|
30
|
+
h(this, t, e(this, t).filter(
|
|
31
|
+
(i) => i.callback !== s
|
|
26
32
|
));
|
|
27
33
|
}
|
|
28
34
|
notify(...s) {
|
|
29
|
-
for (const
|
|
30
|
-
|
|
35
|
+
for (const i of e(this, t))
|
|
36
|
+
i.callback(...s);
|
|
31
37
|
}
|
|
32
38
|
}
|
|
33
39
|
t = new WeakMap();
|
package/lib/pointer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var M=i=>{throw TypeError(i)};var _=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,T=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&_(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&_(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||M("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?M("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,m)=>(k(i,s,"write to private field"),m?m.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-
|
|
1
|
+
"use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var M=i=>{throw TypeError(i)};var _=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,T=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&_(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&_(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||M("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?M("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,m)=>(k(i,s,"write to private field"),m?m.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-GokLe_g-.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),B=require("../math-GDWEqu7y.cjs"),J=require("../index-Cqw2NKev.cjs");require("../ticker/index.cjs");const R=require("../Damped-DgAIjXp3.cjs"),H=require("../element-resizer/index.cjs"),j=require("../window-resizer/index.cjs"),P=require("../css-property/index.cjs");var o,a,u,p,y,l,b,x,f,w,C,d;class O{constructor(s){n(this,o);n(this,a);n(this,u);n(this,p);n(this,y);n(this,l);n(this,b,0);n(this,x,0);n(this,f,s=>{e(this,p).set(1)});n(this,w,s=>{e(this,p).set(0)});n(this,C,s=>{const t=q.getPointerPosition(s,e(this,o).getBoundingClientRect()),m={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,y)){const z=q.screenToCartesian(h,m);h.x=z.x,h.y=z.y}if(e(this,l)){const z=q.normalize(h,m);h.x=B.clamp(z.x*2,-1,1),h.y=B.clamp(z.y*2,-1,1)}e(this,a).set(h.x),e(this,u).set(h.y)});n(this,d,()=>{c(this,b,this.element.clientWidth),c(this,x,this.element.clientHeight);let s=0,t=0,m=0,h=0;e(this,y)?e(this,l)?(s=-1,t=1,m=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,m=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,l)?(s=0,t=1,m=0,h=1):(s=0,t=e(this,b),m=0,h=e(this,x)),e(this,a).min=s,e(this,a).max=t,e(this,u).min=m,e(this,u).max=h});c(this,o,I.getElement(s.element)),c(this,a,new R.Damped(0,s.damped)),c(this,u,new R.Damped(0,s.damped)),c(this,p,new R.Damped(0,T({min:0,max:1},s.damped))),c(this,y,s.cartesian||!1),c(this,l,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,a)}get y(){return e(this,u)}get z(){return e(this,p)}get cartesian(){return e(this,y)}set cartesian(s){c(this,y,s),e(this,d).call(this)}get normalize(){return e(this,l)}set normalize(s){c(this,l,s),e(this,d).call(this)}connect(){e(this,o).addEventListener("pointerenter",e(this,f)),e(this,o).addEventListener("pointerleave",e(this,w)),e(this,o).addEventListener("pointermove",e(this,C)),H.elementResizer.subscribe(e(this,o),e(this,d)),j.windowResizer.subscribe(e(this,d))}disconnect(){e(this,o).removeEventListener("pointerenter",e(this,f)),e(this,o).removeEventListener("pointerleave",e(this,w)),e(this,o).removeEventListener("pointermove",e(this,C)),H.elementResizer.unsubscribe(e(this,d)),j.windowResizer.unsubscribe(e(this,d)),e(this,a).reset(),e(this,u).reset(),e(this,p).reset()}}o=new WeakMap,a=new WeakMap,u=new WeakMap,p=new WeakMap,y=new WeakMap,l=new WeakMap,b=new WeakMap,x=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,d=new WeakMap;var r,g,v,S,E,L;class W extends HTMLElement{constructor(){super();n(this,r);n(this,g,new P.CSSProperty(this,"--damping",20));n(this,v,new P.CSSProperty(this,"--mass",0));n(this,S,new P.CSSProperty(this,"--stiffness",0));n(this,E,new P.CSSProperty(this,"--cartesian",!1));n(this,L,new P.CSSProperty(this,"--normalize",!1));c(this,r,new O({element:this})),e(this,g).subscribe(t=>{e(this,r).x.damping=t.current,e(this,r).y.damping=t.current,e(this,r).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,r).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,r).normalize=t.current}),e(this,v).subscribe(t=>{e(this,r).x.mass=t.current,e(this,r).y.mass=t.current,e(this,r).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,r).x.stiffness=t.current,e(this,r).y.stiffness=t.current,e(this,r).z.stiffness=t.current}),e(this,r).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,r).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,r).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,r)}connectedCallback(){e(this,r).connect(),e(this,g).observe(),e(this,v).observe(),e(this,S).observe()}disconnectedCallback(){e(this,r).disconnect(),e(this,g).unobserve(),e(this,v).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}r=new WeakMap,g=new WeakMap,v=new WeakMap,S=new WeakMap,E=new WeakMap,L=new WeakMap;J.isBrowser&&!customElements.get("e-pointer")&&customElements.define("e-pointer",W);exports.Pointer=O;exports.PointerElement=W;
|
package/lib/pointer/index.js
CHANGED
|
@@ -14,13 +14,13 @@ var B = (i, s, e) => s in i ? q(i, s, { enumerable: !0, configurable: !0, writab
|
|
|
14
14
|
};
|
|
15
15
|
var M = (i, s, e) => s.has(i) || D("Cannot " + e);
|
|
16
16
|
var t = (i, s, e) => (M(i, s, "read from private field"), e ? e.call(i) : s.get(i)), n = (i, s, e) => s.has(i) ? D("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, e), m = (i, s, e, c) => (M(i, s, "write to private field"), c ? c.call(i, e) : s.set(i, e), e);
|
|
17
|
-
import "../Store-
|
|
17
|
+
import "../Store-swP_0ymB.js";
|
|
18
18
|
import { g as G, s as I, n as J } from "../coordinates-CgdGoSYs.js";
|
|
19
19
|
import { g as K } from "../dom-CVWzyXPH.js";
|
|
20
20
|
import { c as T } from "../math-BOBiC4TN.js";
|
|
21
21
|
import { i as N } from "../index-euf5anj6.js";
|
|
22
22
|
import "../ticker/index.js";
|
|
23
|
-
import { D as R } from "../Damped-
|
|
23
|
+
import { D as R } from "../Damped-GyAS-U-z.js";
|
|
24
24
|
import { elementResizer as W } from "../element-resizer/index.js";
|
|
25
25
|
import { windowResizer as j } from "../window-resizer/index.js";
|
|
26
26
|
import { CSSProperty as P } from "../css-property/index.js";
|
|
@@ -48,6 +48,7 @@ export declare class ScrollElement extends HTMLElement {
|
|
|
48
48
|
get classesCSSProperty(): CSSProperty<boolean>;
|
|
49
49
|
get currentIndexStartOffsetCSSProperty(): CSSProperty<number>;
|
|
50
50
|
get currentIndexEndOffsetCSSProperty(): CSSProperty<number>;
|
|
51
|
+
get shiftSectionPositionCSSProperty(): CSSProperty<number>;
|
|
51
52
|
get focusDelayCSSProperty(): CSSProperty<number>;
|
|
52
53
|
get focusDurationCSSProperty(): CSSProperty<number>;
|
|
53
54
|
get disabledCSSProperty(): CSSProperty<boolean>;
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ne=Object.defineProperty;var Ie=Object.getOwnPropertySymbols;var Ue=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable;var Ae=a=>{throw TypeError(a)};var ke=(a,n,e)=>n in a?Ne(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e,Re=(a,n)=>{for(var e in n||(n={}))Ue.call(n,e)&&ke(a,e,n[e]);if(Ie)for(var e of Ie(n))Ge.call(n,e)&&ke(a,e,n[e]);return a};var ve=(a,n,e)=>n.has(a)||Ae("Cannot "+e);var t=(a,n,e)=>(ve(a,n,"read from private field"),e?e.call(a):n.get(a)),s=(a,n,e)=>n.has(a)?Ae("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),h=(a,n,e,i)=>(ve(a,n,"write to private field"),i?i.call(a,e):n.set(a,e),e),l=(a,n,e)=>(ve(a,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ze=require("../Store-DRp_K37w.cjs"),O=require("../index-Cqw2NKev.cjs"),je=require("../easings-GegIwET5.cjs"),te=require("../events-KVanG9sR.cjs"),Te=require("../jss-CRBgdvJ3.cjs"),qt=require("../layout-Ctc2p3uz.cjs"),qe=require("../math-GDWEqu7y.cjs"),Ke=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const me=require("../order/index.cjs"),Je=require("../Damped-B1lXa9nb.cjs"),Qe=require("../Tweened-cJ36zq1A.cjs"),fe=require("../controls/index.cjs"),Dt=require("../window-resizer/index.cjs"),gt=require("../scroll-entries/index.cjs"),Me=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Xe=require("../device/index.cjs"),re=require("../element-resizer/index.cjs"),Ye=require("../gestures-C7gbKx11.cjs"),De=require("../dom-JBOkFLTh.cjs"),ts=require("../function-MthRj-GJ.cjs"),es=require("../scroll-segment/index.cjs");var b,Bt,g,yt,V,Y,Ct,vt,ee;class ss{constructor(n,e,i){s(this,vt);s(this,b);s(this,Bt);s(this,g);s(this,yt,0);s(this,V,0);s(this,Y,null);s(this,Ct,0);h(this,b,n),h(this,Bt,e),h(this,g,i),gt.scrollEntries.register(t(this,b)),this.setIndex(t(this,Bt))}get element(){return t(this,b)}get index(){return t(this,Bt)}get size(){return t(this,yt)}get position(){return t(this,V)}get transformPosition(){return t(this,Ct)}destroy(){gt.scrollEntries.unregister(t(this,b)),this.unsetTransform()}unsetTransform(){t(this,b).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,b).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,b).style.width=n+"px",t(this,b).style.height=""):(t(this,b).style.height=n+"px",t(this,b).style.width="")):(t(this,b).style.width="",t(this,b).style.height="",t(this,b).style.removeProperty("--size"))}resize(){h(this,yt,t(this,g).vertical?t(this,b).offsetHeight:t(this,b).offsetWidth),h(this,V,t(this,g).vertical?qt.getCumulativeOffsetTop(t(this,b)):qt.getCumulativeOffsetLeft(t(this,b))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let n=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,yt)<t(this,g).currentScrollValue&&(n=t(this,g).distance*-1-t(this,g).gap),gt.scrollEntries.update(t(this,b),t(this,g).axisCSSProperty.current,n);const i=t(this,g).currentScrollValue+n,r=t(this,V)-t(this,g).viewportSize-e,u=t(this,V)+t(this,yt)+e,f=qe.clamp(i,r,u);h(this,Ct,f*-1),t(this,g).vertical?t(this,b).style.transform=`translate3d(0px, ${t(this,Ct)}px, 0px)`:t(this,b).style.transform=`translate3d(${t(this,Ct)}px, 0px, 0px)`}setMark(n){t(this,Y)!==n&&(t(this,Y)&&t(this,b).classList.remove(t(this,Y)),n&&t(this,b).classList.add(n),h(this,Y,n),te.dispatchEvent(t(this,b),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Y)},custom:!0}))}setMiddle(n){t(this,b).classList.toggle("middle",n)}setIndex(n){l(this,vt,ee).call(this,"index",n)}setCurrentIndex(n){l(this,vt,ee).call(this,"current-index",n)}setCurrentIndexArc(n){l(this,vt,ee).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){l(this,vt,ee).call(this,"current-index-arc-abs",n)}}b=new WeakMap,Bt=new WeakMap,g=new WeakMap,yt=new WeakMap,V=new WeakMap,Y=new WeakMap,Ct=new WeakMap,vt=new WeakSet,ee=function(n,e){e!==null?(t(this,b).style.setProperty(`--${n}`,e.toString()),t(this,b).setAttribute(`data-${n}`,e.toString())):(t(this,b).style.removeProperty(`--${n}`),t(this,b).removeAttribute(`data-${n}`))};const is=Te.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 d,wt,P,tt,_,H,$,M,et,st,W,it,Et,T,v,Pt,xt,Lt,zt,Ot,A,It,rt,R,nt,F,ht,kt,ot,lt,ct,p,Vt,c,ne,he,y,m,k,q,ut,D,w,x,_t,N,U,G,Z,Ht,at,j,$t,B,E,oe,dt,o,we,se,Tt,ge,ye,Ee,Pe,L,Wt,Be,Ft,le,xe,Le,mt,Oe,ie,ce;class Rt extends HTMLElement{constructor(){super();s(this,o);s(this,d,null);s(this,wt,new S.CSSProperty(this,"--controls",!0));s(this,P,new S.CSSProperty(this,"--axis","y"));s(this,tt,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,$,new S.CSSProperty(this,"--split",!1));s(this,M,new S.CSSProperty(this,"--sectional",!1));s(this,et,new S.CSSProperty(this,"--tween-easing",!1));s(this,st,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,it,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,Et,new S.CSSProperty(this,"--drag-inertion",1));s(this,T,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,Pt,new S.CSSProperty(this,"--damping",20));s(this,xt,new S.CSSProperty(this,"--mass",0));s(this,Lt,new S.CSSProperty(this,"--stiffness",0));s(this,zt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Ot,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,It,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,rt,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,nt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,ht,new S.CSSProperty(this,"--focus-delay",0));s(this,kt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ot,new S.CSSProperty(this,"--disabled",!1));s(this,lt,new S.CSSProperty(this,"--hibernate",!1));s(this,ct,null);s(this,p,null);s(this,Vt,null);s(this,c,[]);s(this,ne,0);s(this,he,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,ut,null);s(this,D,null);s(this,w,null);s(this,x,new Ze.Store(0));s(this,_t,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Ht);s(this,at);s(this,j,new Qe.Tweened);s(this,$t,!1);s(this,B,null);s(this,E,!1);s(this,oe,null);s(this,dt,[]);s(this,L,()=>{if(t(this,lt).current)return;t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,ne,this.vertical?qt.getCumulativeOffsetTop(this):qt.getCumulativeOffsetLeft(this)),h(this,he,this.vertical?qt.getCumulativeOffsetTop(t(this,p)):qt.getCumulativeOffsetLeft(t(this,p))),h(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,Me.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,Me.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,c).length){const r=t(this,T).current,u=(t(this,y)-t(this,k)*(r-1))/r;t(this,c).forEach(f=>{f.setSize(u)})}else t(this,c).forEach(r=>{r.setSize()});if(t(this,c).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,y)*t(this,H).current);const r=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,d).max=t(this,m)}if(t(this,v).current&&t(this,c).length){const r=t(this,c)[t(this,c).length-1],u=r.position+r.size-t(this,y),f=t(this,m)-u;h(this,N,r.position+r.size+f)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,c).length){const r=t(this,c)[i];t(this,d).set(r.position,{equalize:!0})}else t(this,d).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ot).current||l(this,o,ye).call(this):l(this,o,ge).call(this),te.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,Wt).call(this)});s(this,Wt,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,_t,Math.max(0,e-t(this,m))),t(this,c).length){for(let i=0;i<t(this,c).length;i++)t(this,c)[i].transform();t(this,x).current=l(this,o,ie).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)`;l(this,o,Oe).call(this),gt.scrollEntries.update(this,t(this,P).current,e)});s(this,Ft,(e,i)=>{t(this,wt).current&&(l(this,o,xe).call(this,Math.sign(i)||1),t(this,le).call(this,e,i))});s(this,le,(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,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,ht).current&&(clearInterval(t(this,Ht)),h(this,Ht,setTimeout(()=>{const r=t(this,c)[l(this,o,ie).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,kt).current,easing:je.easeInOutExpo}})},t(this,ht).current))),!(e.includes("drag")&&!Xe.device.isTouch&&!t(this,zt).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,c).length){const u={tween:t(this,et).current||t(this,st).current?{easing:t(this,et).current||"easeInOutCubic",duration:t(this,st).current||500}:void 0};t(this,$t)?this.scrollToSection(l(this,o,ie).call(this,!0),u):this.shiftSections(r,u)}else t(this,d).shift(r*t(this,y))}else t(this,d).shift(i);h(this,$t,e==="drag")}});s(this,ce,()=>{h(this,E,!0),this.hibernatedCSSProperty.current||l(this,o,Pe).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[is];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,ct,document.createElement("div")),t(this,ct).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Vt,document.createElement("slot")),t(this,p).appendChild(t(this,Vt)),t(this,ct).appendChild(t(this,p)),e.appendChild(t(this,ct)),h(this,oe,new MutationObserver(r=>{this.tryResplit()}))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,wt)}get axisCSSProperty(){return t(this,P)}get reverseCSSProperty(){return t(this,tt)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,et)}get durationCSSProperty(){return t(this,st)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,it)}get dragInertionCSSProperty(){return t(this,Et)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Pt)}get massCSSProperty(){return t(this,xt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,zt)}get sectionDistanceScaleCSSProperty(){return t(this,Ot)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,It)}get autoplayUserDirectionCSSProperty(){return t(this,rt)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,nt)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get focusDelayCSSProperty(){return t(this,ht)}get focusDurationCSSProperty(){return t(this,kt)}get disabledCSSProperty(){return t(this,ot)}get hibernatedCSSProperty(){return t(this,lt)}get currentScrollValue(){return l(this,o,Le).call(this,"current")}get targetScrollValue(){return l(this,o,Le).call(this,"target")}get contentWrapperElement(){return t(this,ct)}get contentElement(){return t(this,p)}get sections(){return t(this,c)}get position(){return t(this,ne)}get contentPosition(){return t(this,he)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,c).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,_t)}get scrollLine(){return t(this,B)}get vertical(){return t(this,P).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,P).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,P).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&l(this,o,se).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>f?1:(this.currentProgress-u)/(f-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,c).length)return;const r=t(this,x).current,u=l(this,o,Be).call(this,e),f=t(this,c)[r],C=t(this,c)[u];if(f&&C){let I=0;const Ce=l(this,o,ie).call(this),Mt=t(this,c)[Ce],be=Mt?this.targetScrollValue-Mt.position:0;t(this,v).current?u===0&&r===t(this,c).length-1?I=t(this,m)+t(this,y)-f.position+t(this,k):u===t(this,c).length-1&&r===0?I=C.position-(t(this,m)+t(this,y)+t(this,k)):I=C.position-f.position:I=C.position-f.position,this.shiftPosition(I-be,i)}}shiftSections(e,i){t(this,c).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){l(this,o,xe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,j).set(t(this,d).current,{equalize:!0}),t(this,j).set(e,Re({},i.tween)),h(this,at,setTimeout(()=>{h(this,at,void 0)},i.tween.duration||0))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}connectedCallback(){gt.scrollEntries.register(this),h(this,d,new Je.Damped(0,{damping:.01,min:0,order:me.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new fe.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Ft)),h(this,ut,new fe.KeyboardControls({element:this})),t(this,ut).changeEvent.subscribe(t(this,Ft)),h(this,D,new fe.DragControls({element:t(this,p)})),t(this,D).changeEvent.subscribe(t(this,Ft)),h(this,w,new fe.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,le)),t(this,P).subscribe(()=>{l(this,o,we).call(this)}),t(this,tt).subscribe(()=>{l(this,o,we).call(this)}),t(this,it).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,P).current}),t(this,Et).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,E)&&(e?l(this,o,se).call(this):l(this,o,Tt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,c).length?l(this,o,se).call(this):!e.current&&e.previous&&t(this,c).length&&l(this,o,Tt).call(this))}),t(this,W).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,c).length?l(this,o,se).call(this):!e.current&&e.previous&&t(this,c).length&&l(this,o,Tt).call(this))}),t(this,T).subscribe(e=>{t(this,E)&&(t(this,L).call(this),l(this,o,mt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,c).length||(t(this,$).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(h(this,_t,0),t(this,d).max=t(this,m),t(this,d).min=0)}),t(this,Pt).subscribe(e=>{t(this,d).damping=e.current}),t(this,xt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,w).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,rt).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,R).subscribe(e=>{t(this,E)&&l(this,o,mt).call(this)}),t(this,nt).subscribe(e=>{t(this,E)&&t(this,R).current&&l(this,o,mt).call(this)}),t(this,F).subscribe(e=>{t(this,E)&&t(this,R).current&&l(this,o,mt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,c).length&&l(this,o,mt).call(this)}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,ot).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),l(this,o,ge).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),l(this,o,ye).call(this))}),t(this,lt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),l(this,o,Ee).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),l(this,o,Pe).call(this))}),t(this,wt).observe(),t(this,P).observe(),t(this,tt).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,et).observe(),t(this,st).observe(),t(this,W).observe(),t(this,it).observe(),t(this,Et).observe(),t(this,T).observe(),t(this,v).observe(),t(this,Pt).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,Ot).observe(),t(this,A).observe(),t(this,A).observe(),t(this,It).observe(),t(this,rt).observe(),t(this,R).observe(),t(this,nt).observe(),t(this,F).observe(),t(this,ht).observe(),t(this,kt).observe(),t(this,ot).observe(),t(this,lt).observe(),Dt.windowResizer.subscribe(t(this,ce),me.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,wt).unobserve(),t(this,P).unobserve(),t(this,tt).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,et).unobserve(),t(this,st).unobserve(),t(this,W).unobserve(),t(this,it).unobserve(),t(this,Et).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,Pt).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,Ot).unobserve(),t(this,A).unobserve(),t(this,It).unobserve(),t(this,rt).unobserve(),t(this,R).unobserve(),t(this,nt).unobserve(),t(this,F).unobserve(),t(this,ht).unobserve(),t(this,kt).unobserve(),t(this,ot).unobserve(),t(this,lt).unobserve(),Dt.windowResizer.unsubscribe(t(this,ce)),l(this,o,Ee).call(this),t(this,oe).disconnect()}}d=new WeakMap,wt=new WeakMap,P=new WeakMap,tt=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,et=new WeakMap,st=new WeakMap,W=new WeakMap,it=new WeakMap,Et=new WeakMap,T=new WeakMap,v=new WeakMap,Pt=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,Ot=new WeakMap,A=new WeakMap,It=new WeakMap,rt=new WeakMap,R=new WeakMap,nt=new WeakMap,F=new WeakMap,ht=new WeakMap,kt=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap,p=new WeakMap,Vt=new WeakMap,c=new WeakMap,ne=new WeakMap,he=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,ut=new WeakMap,D=new WeakMap,w=new WeakMap,x=new WeakMap,_t=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Ht=new WeakMap,at=new WeakMap,j=new WeakMap,$t=new WeakMap,B=new WeakMap,E=new WeakMap,oe=new WeakMap,dt=new WeakMap,o=new WeakSet,we=function(){const e=t(this,P).current,i=t(this,tt).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,it).current?"max":e,t(this,ut).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},se=function(){l(this,o,Tt).call(this),t(this,Vt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,c).push(new ss(e,i,this))}),t(this,p).style.transform="",te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),l(this,o,mt).call(this)},Tt=function(){t(this,c).forEach(e=>{e.destroy()}),h(this,c,[]),t(this,x).reset(),t(this,d).reset(),te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ge=function(){t(this,G)||(h(this,G,!0),t(this,d).unsubscribe(t(this,Wt)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,Ht)),clearInterval(t(this,at)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,ut).disconnect(),t(this,D).disconnect(),t(this,w).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},ye=function(){t(this,G)&&(h(this,G,!1),t(this,d).subscribe(t(this,Wt)),t(this,q).connect(),t(this,ut).connect(),t(this,D).connect(),t(this,A).current&&t(this,w).connect())},Ee=function(){t(this,Z)||(h(this,Z,!0),Dt.windowResizer.unsubscribe(t(this,L)),re.elementResizer.unsubscribe(t(this,L)),l(this,o,ge).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,c).length?l(this,o,Tt).call(this):(t(this,x).reset(),t(this,d).reset()),gt.scrollEntries.unregister(this))},Pe=function(){t(this,Z)&&(h(this,Z,!1),gt.scrollEntries.register(this),this.tryResplit(),l(this,o,ye).call(this),Dt.windowResizer.subscribe(t(this,L),me.RESIZE_ORDER.SCROLL),re.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Wt=new WeakMap,Be=function(e){let i=t(this,x).current;return t(this,v).current?i=Ke.loopNumber(e,t(this,c).length):i=qe.clamp(e,0,this.limit),i},Ft=new WeakMap,le=new WeakMap,xe=function(e=1){t(this,rt).current&&(t(this,w).direction=e),t(this,A).current&&t(this,w).pauseAndContinue(t(this,It).current,this.sectionalCSSProperty.current)},Le=function(e="current"){if(t(this,v).current&&t(this,c).length){const i=t(this,d)[e]%Math.round(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,d)[e]},mt=function(){if(t(this,c).length){const e=t(this,x).current+t(this,nt).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),te.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,dt,[]),t(this,c).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null);const f=e-this.limit-1+t(this,F).current,C=e+i,I=this.sections.length-C;u>=e&&u<C||u<=f?(r.setMark("current"),t(this,dt).push(r)):u>=C&&u<C+I/2||u<=f+i?r.setMark("next"):r.setMark("previous")})}}},Oe=function(){if(t(this,R).current){const e=Math.floor(t(this,dt).length/2);t(this,dt).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,dt).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},ie=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const f=t(this,d).direction;for(let C=0;C<t(this,c).length;C++){const I=t(this,c)[C];let Ce=t(this,$t)?I.size*f*-1*.4:0,Mt=I.position;this.overscroll&&Mt===0&&e&&(Mt=t(this,N));let be=Math.abs(Mt+Ce-i);be<=r&&(r=be,u=C)}return u},ce=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Rt);var ue;class ze extends HTMLElement{constructor(){super(...arguments);s(this,ue,null)}get scrollElement(){return t(this,ue)}connectedCallback(){const e=De.findParentElement(this,Rt);e instanceof Rt?h(this,ue,e):console.error(this,"e-scroll not found")}}ue=new WeakMap;var St,z,K,J,Nt,Ut,pt,Gt,ae,de;class Ve extends ze{constructor(){super();s(this,St,null);s(this,z,null);s(this,K,!1);s(this,J,0);s(this,Nt,0);s(this,Ut,0);s(this,pt,()=>{h(this,K,this.offsetWidth>this.offsetHeight);const e=t(this,K)?this.offsetWidth:this.offsetHeight;h(this,J,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,J,Math.max(t(this,J),30)),t(this,K)?(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"),h(this,Nt,e-t(this,J)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Gt).call(this)});s(this,Gt,()=>{h(this,Ut,this.scrollElement.currentProgress*t(this,Nt)),t(this,K)?t(this,z).style.transform=`translate3d(${t(this,Ut)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Ut)}px, 0px)`});s(this,ae,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,de,e=>{document.documentElement.classList.add("grabbing"),Ye.setupDrag(u=>{const f=t(this,K)?u.x:u.y,C=this.scrollElement.distance/t(this,Nt),I=(f-r)*C;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,K)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Te.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"}})],h(this,St,document.createElement("slot")),t(this,St).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,St))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,St).assignedElements()[0]||t(this,St).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,de)),Dt.windowResizer.subscribe(t(this,pt),me.RESIZE_ORDER.SCROLL),re.elementResizer.subscribe(this,t(this,pt)),re.elementResizer.subscribe(this.scrollElement,t(this,pt)),this.scrollElement.onScroll(t(this,Gt)),this.scrollElement.axisCSSProperty.subscribe(t(this,ae))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,de)),Dt.windowResizer.unsubscribe(t(this,pt)),re.elementResizer.unsubscribe(t(this,pt)),this.scrollElement.offScroll(t(this,Gt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ae))}}St=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,Nt=new WeakMap,Ut=new WeakMap,pt=new WeakMap,Gt=new WeakMap,ae=new WeakMap,de=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Ve);var Zt,jt,Kt;class _e extends ze{constructor(){super();s(this,Zt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,jt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Kt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Zt).current,i=t(this,jt).current,r=t(this,Kt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Zt).observe(),t(this,jt).observe(),t(this,Kt).observe()}disconnectedCallback(){t(this,Zt).close(),t(this,jt).close(),t(this,Kt).close()}}Zt=new WeakMap,jt=new WeakMap,Kt=new WeakMap;var Jt;class He extends _e{constructor(){super(...arguments);s(this,Jt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Jt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Jt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Jt).close()}}Jt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",He);var Q,Qt;class $e extends _e{constructor(){super(...arguments);s(this,Q,new S.CSSProperty(this,"--step",1));s(this,Qt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Q).current>0&&this.scrollElement.scrollLine==="end"||t(this,Q).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Q).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Q).subscribe(()=>{t(this,Qt).call(this)}),t(this,Q).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Qt)),t(this,Qt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Q).close(),this.removeAttribute("disabled")}}Q=new WeakMap,Qt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",$e);var X,bt,Xt,Se,pe,Yt;class rs{constructor(n,e,i){s(this,X,null);s(this,bt,null);s(this,Xt,null);s(this,Se,null);s(this,pe,()=>{t(this,bt).scrollToSection(t(this,Xt),{behaviour:t(this,Se)})});s(this,Yt,()=>{t(this,X).classList.toggle("current",t(this,bt).counter.current===t(this,Xt))});O.isBrowser&&(h(this,X,document.createElement("button")),h(this,bt,n),h(this,Se,i),h(this,Xt,e),t(this,X).addEventListener("click",t(this,pe)),t(this,bt).counter.subscribe(t(this,Yt)),t(this,Yt).call(this))}get element(){return t(this,X)}destroy(){t(this,X).removeEventListener("click",t(this,pe)),t(this,bt).counter.unsubscribe(t(this,Yt)),t(this,X).remove()}}X=new WeakMap,bt=new WeakMap,Xt=new WeakMap,Se=new WeakMap,pe=new WeakMap,Yt=new WeakMap;var ft,At;class We extends ze{constructor(){super(...arguments);s(this,ft,[]);s(this,At,ts.debounce(()=>{t(this,ft).forEach(i=>i.destroy()),h(this,ft,[]);const e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new rs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");this.appendChild(r.element),t(this,ft).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,At)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,At))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,At)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,At)),t(this,ft).forEach(e=>e.destroy()),h(this,ft,[])}}ft=new WeakMap,At=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",We);class Fe extends es.ScrollSegmentElement{connectedCallback(){const n=De.findParentElement(this,Rt);n instanceof Rt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Rt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Fe);exports.ScrollBulletButtonsElement=We;exports.ScrollElement=Rt;exports.ScrollSegmentElement=Fe;exports.ScrollSetButtonElement=He;exports.ScrollStepButtonElement=$e;exports.ScrollbarElement=Ve;
|
|
1
|
+
"use strict";var Ue=Object.defineProperty;var ke=Object.getOwnPropertySymbols;var Ge=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable;var Re=d=>{throw TypeError(d)};var Ae=(d,n,e)=>n in d?Ue(d,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[n]=e,Me=(d,n)=>{for(var e in n||(n={}))Ge.call(n,e)&&Ae(d,e,n[e]);if(ke)for(var e of ke(n))Ze.call(n,e)&&Ae(d,e,n[e]);return d};var Pe=(d,n,e)=>n.has(d)||Re("Cannot "+e);var t=(d,n,e)=>(Pe(d,n,"read from private field"),e?e.call(d):n.get(d)),s=(d,n,e)=>n.has(d)?Re("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(d):n.set(d,e),h=(d,n,e,i)=>(Pe(d,n,"write to private field"),i?i.call(d,e):n.set(d,e),e),l=(d,n,e)=>(Pe(d,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const je=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),Ke=require("../easings-GegIwET5.cjs"),te=require("../events-KVanG9sR.cjs"),qe=require("../jss-CRBgdvJ3.cjs"),Dt=require("../layout-Ctc2p3uz.cjs"),De=require("../math-GDWEqu7y.cjs"),Je=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ge=require("../order/index.cjs"),Qe=require("../Damped-DgAIjXp3.cjs"),Xe=require("../Tweened-DpJDlbj9.cjs"),me=require("../controls/index.cjs"),Bt=require("../window-resizer/index.cjs"),gt=require("../scroll-entries/index.cjs"),Te=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ye=require("../device/index.cjs"),re=require("../element-resizer/index.cjs"),ts=require("../gestures-C7gbKx11.cjs"),Be=require("../dom-JBOkFLTh.cjs"),es=require("../function-MthRj-GJ.cjs"),ss=require("../scroll-segment/index.cjs");var f,Ot,g,yt,V,Y,Ct,vt,ee;class is{constructor(n,e,i){s(this,vt);s(this,f);s(this,Ot);s(this,g);s(this,yt,0);s(this,V,0);s(this,Y,null);s(this,Ct,0);h(this,f,n),h(this,Ot,e),h(this,g,i),gt.scrollEntries.register(t(this,f)),this.setIndex(t(this,Ot))}get element(){return t(this,f)}get index(){return t(this,Ot)}get size(){return t(this,yt)}get position(){return t(this,V)}get transformPosition(){return t(this,Ct)}destroy(){gt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,yt,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,V,t(this,g).vertical?Dt.getCumulativeOffsetTop(t(this,f)):Dt.getCumulativeOffsetLeft(t(this,f))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,yt)<t(this,g).currentScrollValue-n&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),gt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,b=t(this,V)+t(this,yt)+i,y=De.clamp(r,u,b);h(this,Ct,y*-1),t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${t(this,Ct)}px, 0px)`:t(this,f).style.transform=`translate3d(${t(this,Ct)}px, 0px, 0px)`}setMark(n){t(this,Y)!==n&&(t(this,Y)&&t(this,f).classList.remove(t(this,Y)),n&&t(this,f).classList.add(n),h(this,Y,n),te.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Y)},custom:!0}))}setMiddle(n){t(this,f).classList.toggle("middle",n)}setIndex(n){l(this,vt,ee).call(this,"index",n)}setCurrentIndex(n){l(this,vt,ee).call(this,"current-index",n)}setCurrentIndexArc(n){l(this,vt,ee).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){l(this,vt,ee).call(this,"current-index-arc-abs",n)}}f=new WeakMap,Ot=new WeakMap,g=new WeakMap,yt=new WeakMap,V=new WeakMap,Y=new WeakMap,Ct=new WeakMap,vt=new WeakSet,ee=function(n,e){e!==null?(t(this,f).style.setProperty(`--${n}`,e.toString()),t(this,f).setAttribute(`data-${n}`,e.toString())):(t(this,f).style.removeProperty(`--${n}`),t(this,f).removeAttribute(`data-${n}`))};const rs=qe.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,Pt,E,tt,_,H,$,M,et,st,W,it,wt,T,v,Et,xt,Lt,zt,Vt,A,It,rt,R,nt,F,kt,ht,At,ot,lt,ct,p,_t,c,ne,he,C,m,k,q,ut,D,w,x,Ht,N,U,G,Z,$t,at,j,Wt,B,P,oe,dt,o,we,se,qt,ye,Ce,Ee,xe,L,le,Oe,Ft,ce,Le,ze,mt,Ve,ie,ue;class Mt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,Pt,new S.CSSProperty(this,"--controls",!0));s(this,E,new S.CSSProperty(this,"--axis","y"));s(this,tt,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,$,new S.CSSProperty(this,"--split",!1));s(this,M,new S.CSSProperty(this,"--sectional",!1));s(this,et,new S.CSSProperty(this,"--tween-easing",!1));s(this,st,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,it,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new S.CSSProperty(this,"--drag-inertion",1));s(this,T,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,Et,new S.CSSProperty(this,"--damping",20));s(this,xt,new S.CSSProperty(this,"--mass",0));s(this,Lt,new S.CSSProperty(this,"--stiffness",0));s(this,zt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Vt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,It,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,rt,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,nt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,kt,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,ht,new S.CSSProperty(this,"--focus-delay",0));s(this,At,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ot,new S.CSSProperty(this,"--disabled",!1));s(this,lt,new S.CSSProperty(this,"--hibernate",!1));s(this,ct,null);s(this,p,null);s(this,_t,null);s(this,c,[]);s(this,ne,0);s(this,he,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,ut,null);s(this,D,null);s(this,w,null);s(this,x,new je.Store(0));s(this,Ht,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,$t);s(this,at);s(this,j,new Xe.Tweened);s(this,Wt,!1);s(this,B,null);s(this,P,!1);s(this,oe,null);s(this,dt,[]);s(this,L,()=>{if(t(this,lt).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,ne,this.vertical?Dt.getCumulativeOffsetTop(this):Dt.getCumulativeOffsetLeft(this)),h(this,he,this.vertical?Dt.getCumulativeOffsetTop(t(this,p)):Dt.getCumulativeOffsetLeft(t(this,p))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,Te.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,Te.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,c).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,c).forEach(b=>{b.setSize(u)})}else t(this,c).forEach(r=>{r.setSize()});if(t(this,c).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,m,t(this,p).offsetHeight-t(this,C))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,c).length){const r=t(this,c)[t(this,c).length-1],u=r.position+r.size-t(this,C),b=t(this,m)-u;h(this,N,r.position+r.size+b)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,c).length){const r=t(this,c)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ot).current||l(this,o,Ce).call(this):l(this,o,ye).call(this),te.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()});s(this,le,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,Ht,Math.max(0,e-t(this,m))),t(this,c).length){for(let i=0;i<t(this,c).length;i++)t(this,c)[i].transform();t(this,x).current=l(this,o,ie).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)`;l(this,o,Ve).call(this),gt.scrollEntries.update(this,t(this,E).current,e)});s(this,Ft,(e,i)=>{t(this,Pt).current&&(l(this,o,Le).call(this,Math.sign(i)||1),t(this,ce).call(this,e,i))});s(this,ce,(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,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,ht).current&&(clearInterval(t(this,$t)),h(this,$t,setTimeout(()=>{const r=t(this,c)[l(this,o,ie).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,At).current,easing:Ke.easeInOutExpo}})},t(this,ht).current))),!(e.includes("drag")&&!Ye.device.isTouch&&!t(this,zt).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,c).length){const u={tween:t(this,et).current||t(this,st).current?{easing:t(this,et).current||"easeInOutCubic",duration:t(this,st).current||500}:void 0};t(this,Wt)?this.scrollToSection(l(this,o,ie).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Wt,e==="drag")}});s(this,ue,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||l(this,o,xe).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[rs];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,ct,document.createElement("div")),t(this,ct).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,_t,document.createElement("slot")),t(this,p).appendChild(t(this,_t)),t(this,ct).appendChild(t(this,p)),e.appendChild(t(this,ct)),h(this,oe,new MutationObserver(r=>{this.tryResplit()}))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Pt)}get axisCSSProperty(){return t(this,E)}get reverseCSSProperty(){return t(this,tt)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,et)}get durationCSSProperty(){return t(this,st)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,it)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Et)}get massCSSProperty(){return t(this,xt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,zt)}get sectionDistanceScaleCSSProperty(){return t(this,Vt)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,It)}get autoplayUserDirectionCSSProperty(){return t(this,rt)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,nt)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,kt)}get focusDelayCSSProperty(){return t(this,ht)}get focusDurationCSSProperty(){return t(this,At)}get disabledCSSProperty(){return t(this,ot)}get hibernatedCSSProperty(){return t(this,lt)}get currentScrollValue(){return l(this,o,ze).call(this,"current")}get targetScrollValue(){return l(this,o,ze).call(this,"target")}get contentWrapperElement(){return t(this,ct)}get contentElement(){return t(this,p)}get sections(){return t(this,c)}get position(){return t(this,ne)}get contentPosition(){return t(this,he)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,c).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,Ht)}get scrollLine(){return t(this,B)}get vertical(){return t(this,E).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,E).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,E).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&l(this,o,se).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,c).length)return;const r=t(this,x).current,u=l(this,o,Oe).call(this,e),b=t(this,c)[r],y=t(this,c)[u];if(b&&y){let I=0;const ve=l(this,o,ie).call(this),Tt=t(this,c)[ve],be=Tt?this.targetScrollValue-Tt.position:0;t(this,v).current?u===0&&r===t(this,c).length-1?I=t(this,m)+t(this,C)-b.position+t(this,k):u===t(this,c).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-b.position:I=y.position-b.position,this.shiftPosition(I-be,i)}}shiftSections(e,i){t(this,c).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){l(this,o,Le).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,Me({},i.tween)),h(this,at,setTimeout(()=>{h(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(){gt.scrollEntries.register(this),h(this,a,new Qe.Damped(0,{damping:.01,min:0,order:ge.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new me.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Ft)),h(this,ut,new me.KeyboardControls({element:this})),t(this,ut).changeEvent.subscribe(t(this,Ft)),h(this,D,new me.DragControls({element:t(this,p)})),t(this,D).changeEvent.subscribe(t(this,Ft)),h(this,w,new me.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,ce)),t(this,E).subscribe(()=>{l(this,o,we).call(this)}),t(this,tt).subscribe(()=>{l(this,o,we).call(this)}),t(this,it).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,E).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?l(this,o,se).call(this):l(this,o,qt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,w).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,c).length?l(this,o,se).call(this):!e.current&&e.previous&&t(this,c).length&&l(this,o,qt).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,c).length?l(this,o,se).call(this):!e.current&&e.previous&&t(this,c).length&&l(this,o,qt).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,L).call(this),l(this,o,mt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,c).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,Ht,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Et).subscribe(e=>{t(this,a).damping=e.current}),t(this,xt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,w).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,rt).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&l(this,o,mt).call(this)}),t(this,nt).subscribe(e=>{t(this,P)&&t(this,R).current&&l(this,o,mt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&l(this,o,mt).call(this)}),t(this,kt).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,c).length&&l(this,o,mt).call(this)}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ot).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),l(this,o,ye).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),l(this,o,Ce).call(this))}),t(this,lt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),l(this,o,Ee).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),l(this,o,xe).call(this))}),t(this,Pt).observe(),t(this,E).observe(),t(this,tt).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,et).observe(),t(this,st).observe(),t(this,W).observe(),t(this,it).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,Et).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,Vt).observe(),t(this,A).observe(),t(this,A).observe(),t(this,It).observe(),t(this,rt).observe(),t(this,R).observe(),t(this,nt).observe(),t(this,F).observe(),t(this,kt).observe(),t(this,ht).observe(),t(this,At).observe(),t(this,ot).observe(),t(this,lt).observe(),Bt.windowResizer.subscribe(t(this,ue),ge.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Pt).unobserve(),t(this,E).unobserve(),t(this,tt).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,et).unobserve(),t(this,st).unobserve(),t(this,W).unobserve(),t(this,it).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,Et).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,Vt).unobserve(),t(this,A).unobserve(),t(this,It).unobserve(),t(this,rt).unobserve(),t(this,R).unobserve(),t(this,nt).unobserve(),t(this,F).unobserve(),t(this,kt).unobserve(),t(this,ht).unobserve(),t(this,At).unobserve(),t(this,ot).unobserve(),t(this,lt).unobserve(),Bt.windowResizer.unsubscribe(t(this,ue)),l(this,o,Ee).call(this),t(this,oe).disconnect()}}a=new WeakMap,Pt=new WeakMap,E=new WeakMap,tt=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,et=new WeakMap,st=new WeakMap,W=new WeakMap,it=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,Et=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,Vt=new WeakMap,A=new WeakMap,It=new WeakMap,rt=new WeakMap,R=new WeakMap,nt=new WeakMap,F=new WeakMap,kt=new WeakMap,ht=new WeakMap,At=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap,p=new WeakMap,_t=new WeakMap,c=new WeakMap,ne=new WeakMap,he=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,ut=new WeakMap,D=new WeakMap,w=new WeakMap,x=new WeakMap,Ht=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,$t=new WeakMap,at=new WeakMap,j=new WeakMap,Wt=new WeakMap,B=new WeakMap,P=new WeakMap,oe=new WeakMap,dt=new WeakMap,o=new WeakSet,we=function(){const e=t(this,E).current,i=t(this,tt).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,it).current?"max":e,t(this,ut).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,L).call(this)},se=function(){l(this,o,qt).call(this),t(this,_t).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,c).push(new is(e,i,this))}),t(this,p).style.transform="",te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),l(this,o,mt).call(this)},qt=function(){t(this,c).forEach(e=>{e.destroy()}),h(this,c,[]),t(this,x).reset(),t(this,a).reset(),te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ye=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,le)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,$t)),clearInterval(t(this,at)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,ut).disconnect(),t(this,D).disconnect(),t(this,w).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},Ce=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,le),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,ut).connect(),t(this,D).connect(),t(this,A).current&&t(this,w).connect())},Ee=function(){t(this,Z)||(h(this,Z,!0),Bt.windowResizer.unsubscribe(t(this,L)),re.elementResizer.unsubscribe(t(this,L)),l(this,o,ye).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,c).length?l(this,o,qt).call(this):(t(this,x).reset(),t(this,a).reset()),gt.scrollEntries.unregister(this))},xe=function(){t(this,Z)&&(h(this,Z,!1),gt.scrollEntries.register(this),this.tryResplit(),l(this,o,Ce).call(this),Bt.windowResizer.subscribe(t(this,L),ge.RESIZE_ORDER.SCROLL),re.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,le=new WeakMap,Oe=function(e){let i=t(this,x).current;return t(this,v).current?i=Je.loopNumber(e,t(this,c).length):i=De.clamp(e,0,this.limit),i},Ft=new WeakMap,ce=new WeakMap,Le=function(e=1){t(this,rt).current&&(t(this,w).direction=e),t(this,A).current&&t(this,w).pauseAndContinue(t(this,It).current,this.sectionalCSSProperty.current)},ze=function(e="current"){if(t(this,v).current&&t(this,c).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},mt=function(){if(t(this,c).length){const e=t(this,x).current+t(this,nt).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),te.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,dt,[]),t(this,c).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null);const b=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=b?(r.setMark("current"),t(this,dt).push(r)):u>=y&&u<y+I/2||u<=b+i?r.setMark("next"):r.setMark("previous")})}}},Ve=function(){if(t(this,R).current){const e=Math.floor(t(this,dt).length/2);t(this,dt).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,dt).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},ie=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const b=t(this,a).direction;for(let y=0;y<t(this,c).length;y++){const I=t(this,c)[y];let ve=t(this,Wt)?I.size*b*-1*.4:0,Tt=I.position;this.overscroll&&Tt===0&&e&&(Tt=t(this,N));let be=Math.abs(Tt+ve-i);be<=r&&(r=be,u=y)}return u},ue=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Mt);var ae;class Ie extends HTMLElement{constructor(){super(...arguments);s(this,ae,null)}get scrollElement(){return t(this,ae)}connectedCallback(){const e=Be.findParentElement(this,Mt);e instanceof Mt?h(this,ae,e):console.error(this,"e-scroll not found")}}ae=new WeakMap;var St,z,K,J,Nt,Ut,pt,Gt,de,Se;class _e extends Ie{constructor(){super();s(this,St,null);s(this,z,null);s(this,K,!1);s(this,J,0);s(this,Nt,0);s(this,Ut,0);s(this,pt,()=>{h(this,K,this.offsetWidth>this.offsetHeight);const e=t(this,K)?this.offsetWidth:this.offsetHeight;h(this,J,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,J,Math.max(t(this,J),30)),t(this,K)?(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"),h(this,Nt,e-t(this,J)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Gt).call(this)});s(this,Gt,()=>{h(this,Ut,this.scrollElement.currentProgress*t(this,Nt)),t(this,K)?t(this,z).style.transform=`translate3d(${t(this,Ut)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Ut)}px, 0px)`});s(this,de,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Se,e=>{document.documentElement.classList.add("grabbing"),ts.setupDrag(u=>{const b=t(this,K)?u.x:u.y,y=this.scrollElement.distance/t(this,Nt),I=(b-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,K)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[qe.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"}})],h(this,St,document.createElement("slot")),t(this,St).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,St))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,St).assignedElements()[0]||t(this,St).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,Se)),Bt.windowResizer.subscribe(t(this,pt),ge.RESIZE_ORDER.SCROLL),re.elementResizer.subscribe(this,t(this,pt)),re.elementResizer.subscribe(this.scrollElement,t(this,pt)),this.scrollElement.onScroll(t(this,Gt)),this.scrollElement.axisCSSProperty.subscribe(t(this,de))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,Se)),Bt.windowResizer.unsubscribe(t(this,pt)),re.elementResizer.unsubscribe(t(this,pt)),this.scrollElement.offScroll(t(this,Gt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,de))}}St=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,Nt=new WeakMap,Ut=new WeakMap,pt=new WeakMap,Gt=new WeakMap,de=new WeakMap,Se=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",_e);var Zt,jt,Kt;class He extends Ie{constructor(){super();s(this,Zt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,jt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Kt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Zt).current,i=t(this,jt).current,r=t(this,Kt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Zt).observe(),t(this,jt).observe(),t(this,Kt).observe()}disconnectedCallback(){t(this,Zt).close(),t(this,jt).close(),t(this,Kt).close()}}Zt=new WeakMap,jt=new WeakMap,Kt=new WeakMap;var Jt;class $e extends He{constructor(){super(...arguments);s(this,Jt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Jt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Jt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Jt).close()}}Jt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",$e);var Q,Qt;class We extends He{constructor(){super(...arguments);s(this,Q,new S.CSSProperty(this,"--step",1));s(this,Qt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Q).current>0&&this.scrollElement.scrollLine==="end"||t(this,Q).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Q).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Q).subscribe(()=>{t(this,Qt).call(this)}),t(this,Q).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Qt)),t(this,Qt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Q).close(),this.removeAttribute("disabled")}}Q=new WeakMap,Qt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",We);var X,ft,Xt,pe,fe,Yt;class ns{constructor(n,e,i){s(this,X,null);s(this,ft,null);s(this,Xt,null);s(this,pe,null);s(this,fe,()=>{t(this,ft).scrollToSection(t(this,Xt),{behaviour:t(this,pe)})});s(this,Yt,()=>{t(this,X).classList.toggle("current",t(this,ft).counter.current===t(this,Xt))});O.isBrowser&&(h(this,X,document.createElement("button")),h(this,ft,n),h(this,pe,i),h(this,Xt,e),t(this,X).addEventListener("click",t(this,fe)),t(this,ft).counter.subscribe(t(this,Yt)),t(this,Yt).call(this))}get element(){return t(this,X)}destroy(){t(this,X).removeEventListener("click",t(this,fe)),t(this,ft).counter.unsubscribe(t(this,Yt)),t(this,X).remove()}}X=new WeakMap,ft=new WeakMap,Xt=new WeakMap,pe=new WeakMap,fe=new WeakMap,Yt=new WeakMap;var bt,Rt;class Fe extends Ie{constructor(){super(...arguments);s(this,bt,[]);s(this,Rt,es.debounce(()=>{t(this,bt).forEach(i=>i.destroy()),h(this,bt,[]);const e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new ns(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");this.appendChild(r.element),t(this,bt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Rt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,Rt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Rt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,Rt)),t(this,bt).forEach(e=>e.destroy()),h(this,bt,[])}}bt=new WeakMap,Rt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Fe);class Ne extends ss.ScrollSegmentElement{connectedCallback(){const n=Be.findParentElement(this,Mt);n instanceof Mt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Mt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ne);exports.ScrollBulletButtonsElement=Fe;exports.ScrollElement=Mt;exports.ScrollSegmentElement=Ne;exports.ScrollSetButtonElement=$e;exports.ScrollStepButtonElement=We;exports.ScrollbarElement=_e;
|