aptechka 0.50.14 → 0.50.16
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/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +1 -1
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/{jss-BXAMRO12.cjs → jss-CRBgdvJ3.cjs} +1 -1
- package/lib/{jss-Chm3yE5y.js → jss-DtnXPEnq.js} +1 -1
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +1 -1
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +1 -1
- package/lib/pixel-perfect/index.cjs +1 -1
- package/lib/pixel-perfect/index.js +1 -1
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +1 -1
- package/lib/string-BlMQbe8b.js +70 -0
- package/lib/string-DUXXtU8v.cjs +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +66 -64
- package/lib/utils/string.d.ts +2 -0
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +1 -1
- package/package.json +1 -1
- package/lib/string-DhgS_iFl.cjs +0 -1
- package/lib/string-f0Dnk0L1.js +0 -55
package/lib/canvas/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var f=i=>{throw TypeError(i)};var R=(i,s,e)=>s.has(i)||f("Cannot "+e);var t=(i,s,e)=>(R(i,s,"read from private field"),e?e.call(i):s.get(i)),n=(i,s,e)=>s.has(i)?f("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,e),c=(i,s,e,d)=>(R(i,s,"write to private field"),d?d.call(i,e):s.set(i,e),e),o=(i,s,e)=>(R(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../css-property/index.cjs"),C=require("../element-resizer/index.cjs"),w=require("../ticker/index.cjs"),y=require("../index-Cqw2NKev.cjs"),B=require("../jss-
|
|
1
|
+
"use strict";var f=i=>{throw TypeError(i)};var R=(i,s,e)=>s.has(i)||f("Cannot "+e);var t=(i,s,e)=>(R(i,s,"read from private field"),e?e.call(i):s.get(i)),n=(i,s,e)=>s.has(i)?f("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,e),c=(i,s,e,d)=>(R(i,s,"write to private field"),d?d.call(i,e):s.set(i,e),e),o=(i,s,e)=>(R(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../css-property/index.cjs"),C=require("../element-resizer/index.cjs"),w=require("../ticker/index.cjs"),y=require("../index-Cqw2NKev.cjs"),B=require("../jss-CRBgdvJ3.cjs"),F=require("../math-GDWEqu7y.cjs");var a,r,m,l,u,p,b,x,h,E,P,g,v,S,q;class k extends HTMLElement{constructor(){super();n(this,h);n(this,a,new z.CSSProperty(this,"--fps",0));n(this,r,null);n(this,m,null);n(this,l,0);n(this,u,0);n(this,p,1);n(this,b,0);n(this,x,1);n(this,g,e=>{c(this,p,F.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,u,e.contentRect.height),t(this,r).width=t(this,l)*this.pixelRatio,t(this,r).height=t(this,u)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),o(this,h,q).call(this),o(this,h,S).call(this)});n(this,v,e=>{c(this,b,e.timestamp),c(this,x,e.timeBetweenFrames),o(this,h,S).call(this)});if(y.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[B.createStylesheet({" :host, canvas":{display:"block",width:"100%",height:"100%"}})],c(this,r,document.createElement("canvas")),c(this,m,t(this,r).getContext("2d")),e.appendChild(t(this,r)),t(this,a).subscribe(d=>{typeof d.previous!="undefined"&&d.current!==d.previous&&o(this,h,E).call(this)})}}get fpsCSSProperty(){return t(this,a)}get canvasElement(){return t(this,r)}get context(){return t(this,m)}get pixelRatio(){return t(this,p)}get width(){return t(this,l)}get height(){return t(this,u)}get detail(){return{width:t(this,l),height:t(this,u),element:this,canvasElement:t(this,r),pixelRatio:t(this,p),context:t(this,m),timestamp:t(this,b),timeBetweenFrames:t(this,x)}}connectedCallback(){t(this,a).observe(),C.elementResizer.subscribe(this,t(this,g)),o(this,h,E).call(this)}disconnectedCallback(){t(this,a).unobserve(),C.elementResizer.unsubscribe(t(this,g)),o(this,h,P).call(this)}}a=new WeakMap,r=new WeakMap,m=new WeakMap,l=new WeakMap,u=new WeakMap,p=new WeakMap,b=new WeakMap,x=new WeakMap,h=new WeakSet,E=function(){w.ticker.unsubscribe(t(this,v)),this.hasAttribute("static")||w.ticker.subscribe(t(this,v),{culling:this,maxFPS:t(this,a).current})},P=function(){w.ticker.unsubscribe(t(this,v))},g=new WeakMap,v=new WeakMap,S=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))},q=function(){this.dispatchEvent(new CustomEvent("canvasResize",{composed:!0,detail:this.detail}))};y.isBrowser&&!customElements.get("e-canvas")&&customElements.define("e-canvas",k);exports.CanvasElement=k;
|
package/lib/canvas/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { CSSProperty as z } from "../css-property/index.js";
|
|
|
7
7
|
import { elementResizer as C } from "../element-resizer/index.js";
|
|
8
8
|
import { ticker as w } from "../ticker/index.js";
|
|
9
9
|
import { i as y } from "../index-euf5anj6.js";
|
|
10
|
-
import { c as B } from "../jss-
|
|
10
|
+
import { c as B } from "../jss-DtnXPEnq.js";
|
|
11
11
|
import { c as F } from "../math-BOBiC4TN.js";
|
|
12
12
|
var o, r, d, m, l, u, b, f, n, R, k, g, v, E, P;
|
|
13
13
|
class L extends HTMLElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var S=Object.defineProperty,p=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var h=s=>{throw TypeError(s)};var o=(s,e,t)=>e in s?S(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,l=(s,e)=>{for(var t in e||(e={}))L.call(e,t)&&o(s,t,e[t]);if(c)for(var t of c(e))T.call(e,t)&&o(s,t,e[t]);return s},d=(s,e)=>p(s,E(e));var f=(s,e,t)=>e.has(s)||h("Cannot "+t);var a=(s,e,t)=>(f(s,e,"read from private field"),t?t.call(s):e.get(s)),b=(s,e,t)=>e.has(s)?h("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t),u=(s,e,t,r)=>(f(s,e,"write to private field"),r?r.call(s,t):e.set(s,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../Store-DRp_K37w.cjs"),m=require("../string-
|
|
1
|
+
"use strict";var S=Object.defineProperty,p=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var h=s=>{throw TypeError(s)};var o=(s,e,t)=>e in s?S(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,l=(s,e)=>{for(var t in e||(e={}))L.call(e,t)&&o(s,t,e[t]);if(c)for(var t of c(e))T.call(e,t)&&o(s,t,e[t]);return s},d=(s,e)=>p(s,E(e));var f=(s,e,t)=>e.has(s)||h("Cannot "+t);var a=(s,e,t)=>(f(s,e,"read from private field"),t?t.call(s):e.get(s)),b=(s,e,t)=>e.has(s)?h("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t),u=(s,e,t,r)=>(f(s,e,"write to private field"),r?r.call(s,t):e.set(s,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../Store-DRp_K37w.cjs"),m=require("../string-DUXXtU8v.cjs");require("../index-Cqw2NKev.cjs");var i;class q extends g.Store{constructor(t,r){super(r);b(this,i);u(this,i,Array.isArray(t)?t:[t])}addElement(t){a(this,i).push(t)}removeElement(t){u(this,i,a(this,i).filter(r=>r!==t))}isTrue(t){return this.current[t]===!0}isFalse(t){return this.current[t]===!1}reset(){super.reset();for(const t in this.initial)this.set(t,this.initial[t])}set(t,r=!0){this.current=d(l({},this.current),{[t]:r}),r?a(this,i).forEach(n=>n.classList.add(m.camelToKebab(t))):a(this,i).forEach(n=>n.classList.remove(m.camelToKebab(t)))}}i=new WeakMap;exports.ClassLinkedStatus=q;
|
|
@@ -16,7 +16,7 @@ var n = (t, r, s) => r in t ? E(t, r, { enumerable: !0, configurable: !0, writab
|
|
|
16
16
|
var f = (t, r, s) => r.has(t) || u("Cannot " + s);
|
|
17
17
|
var a = (t, r, s) => (f(t, r, "read from private field"), s ? s.call(t) : r.get(t)), p = (t, r, s) => r.has(t) ? u("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, s), o = (t, r, s, e) => (f(t, r, "write to private field"), e ? e.call(t, s) : r.set(t, s), s);
|
|
18
18
|
import { S as A } from "../Store-D2xCXENW.js";
|
|
19
|
-
import { c as d } from "../string-
|
|
19
|
+
import { c as d } from "../string-BlMQbe8b.js";
|
|
20
20
|
import "../index-euf5anj6.js";
|
|
21
21
|
var i;
|
|
22
22
|
class F extends A {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./index-Cqw2NKev.cjs"),o=require("./string-
|
|
1
|
+
"use strict";const i=require("./index-Cqw2NKev.cjs"),o=require("./string-DUXXtU8v.cjs");function s(t){let e="";for(const r in t){const n=t[r];typeof n=="object"?(e+=`${r} {`,e+=s(n),e+="}"):e+=`${o.camelToKebab(r)}: ${n};`}return e}function c(t){if(i.isBrowser){const e=new CSSStyleSheet;return e.replaceSync(typeof t=="string"?t:s(t)),e}return null}exports.createStylesheet=c;exports.styleToString=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var L=t=>{throw TypeError(t)};var m=(t,s,e)=>s.has(t)||L("Cannot "+e);var o=(t,s,e)=>(m(t,s,"read from private field"),e?e.call(t):s.get(t)),r=(t,s,e)=>s.has(t)?L("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),y=(t,s,e,i)=>(m(t,s,"write to private field"),i?i.call(t,e):s.set(t,e),e),p=(t,s,e)=>(m(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../css-property/index.cjs"),w=require("../index-Cqw2NKev.cjs"),E=require("../jss-
|
|
1
|
+
"use strict";var L=t=>{throw TypeError(t)};var m=(t,s,e)=>s.has(t)||L("Cannot "+e);var o=(t,s,e)=>(m(t,s,"read from private field"),e?e.call(t):s.get(t)),r=(t,s,e)=>s.has(t)?L("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),y=(t,s,e,i)=>(m(t,s,"write to private field"),i?i.call(t,e):s.set(t,e),e),p=(t,s,e)=>(m(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../css-property/index.cjs"),w=require("../index-Cqw2NKev.cjs"),E=require("../jss-CRBgdvJ3.cjs");var n,a,c,h,d,b;class g extends HTMLElement{constructor(){super();r(this,d);r(this,n,new v.CSSProperty(this,"--columns",2));r(this,a,[]);r(this,c,null);r(this,h,()=>{p(this,d,b).call(this)});const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[E.createStylesheet({":host":{display:"grid",gridTemplateColumns:"repeat(var(--columns), 1fr)"},".column":{display:"grid",width:"100%",gap:"var(--gap, 0rem)",gridAutoRows:"max-content"}})]}connectedCallback(){y(this,c,new MutationObserver(o(this,h))),o(this,c).observe(this,{childList:!0}),o(this,n).subscribe(e=>{var i;this.shadowRoot.innerHTML="",y(this,a,[]);for(let l=0;l<e.current;l++){const u=document.createElement("div");u.classList.add("column"),u.innerHTML=`<slot name="col-${l}"></slot>`,o(this,a).push(u),(i=this.shadowRoot)==null||i.appendChild(u)}p(this,d,b).call(this)}),o(this,n).observe()}disconnectedCallback(){o(this,n).close(),o(this,c).disconnect(),this.classList.remove("distributed")}}n=new WeakMap,a=new WeakMap,c=new WeakMap,h=new WeakMap,d=new WeakSet,b=function(){[...this.children].forEach((i,l)=>{i.slot=`col-${l%o(this,n).current}`}),this.classList.add("distributed")};w.isBrowser&&!customElements.get("e-masonry-layout")&&customElements.define("e-masonry-layout",g);exports.MasonryLayoutElement=g;
|
|
@@ -5,7 +5,7 @@ var u = (t, s, e) => s.has(t) || L("Cannot " + e);
|
|
|
5
5
|
var o = (t, s, e) => (u(t, s, "read from private field"), e ? e.call(t) : s.get(t)), n = (t, s, e) => s.has(t) ? L("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), p = (t, s, e, i) => (u(t, s, "write to private field"), i ? i.call(t, e) : s.set(t, e), e), b = (t, s, e) => (u(t, s, "access private method"), e);
|
|
6
6
|
import { CSSProperty as f } from "../css-property/index.js";
|
|
7
7
|
import { i as v } from "../index-euf5anj6.js";
|
|
8
|
-
import { c as w } from "../jss-
|
|
8
|
+
import { c as w } from "../jss-DtnXPEnq.js";
|
|
9
9
|
var r, a, c, m, d, y;
|
|
10
10
|
class g extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
@@ -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-DhgS_iFl.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-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
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
|
@@ -9,7 +9,7 @@ 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";
|
|
11
11
|
import "../ticker/index.js";
|
|
12
|
-
import { c as Oe, u as Qt } from "../string-
|
|
12
|
+
import { c as Oe, u as Qt } from "../string-BlMQbe8b.js";
|
|
13
13
|
import { i as yt } from "../object-D6MVWB4l.js";
|
|
14
14
|
import { connector as jt } from "../connector/index.js";
|
|
15
15
|
import { ViewportMediaRules as es } from "../device/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var u=t=>{throw TypeError(t)};var y=(t,s,e)=>s.has(t)||u("Cannot "+e);var i=(t,s,e)=>(y(t,s,"read from private field"),e?e.call(t):s.get(t)),r=(t,s,e)=>s.has(t)?u("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),a=(t,s,e,l)=>(y(t,s,"write to private field"),l?l.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../dom-JBOkFLTh.cjs"),x=require("../jss-
|
|
1
|
+
"use strict";var u=t=>{throw TypeError(t)};var y=(t,s,e)=>s.has(t)||u("Cannot "+e);var i=(t,s,e)=>(y(t,s,"read from private field"),e?e.call(t):s.get(t)),r=(t,s,e)=>s.has(t)?u("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),a=(t,s,e,l)=>(y(t,s,"write to private field"),l?l.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../dom-JBOkFLTh.cjs"),x=require("../jss-CRBgdvJ3.cjs");require("../index-Cqw2NKev.cjs");const v=x.createStylesheet(`
|
|
2
2
|
:host {
|
|
3
3
|
position: fixed;
|
|
4
4
|
top: 0;
|
|
@@ -4,7 +4,7 @@ var u = (e) => {
|
|
|
4
4
|
var f = (e, s, t) => s.has(e) || u("Cannot " + t);
|
|
5
5
|
var i = (e, s, t) => (f(e, s, "read from private field"), t ? t.call(e) : s.get(e)), c = (e, s, t) => s.has(e) ? u("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), a = (e, s, t, l) => (f(e, s, "write to private field"), l ? l.call(e, t) : s.set(e, t), t);
|
|
6
6
|
import { f as y } from "../dom-CVWzyXPH.js";
|
|
7
|
-
import { c as x } from "../jss-
|
|
7
|
+
import { c as x } from "../jss-DtnXPEnq.js";
|
|
8
8
|
import "../index-euf5anj6.js";
|
|
9
9
|
const g = x(
|
|
10
10
|
/*css*/
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _e=Object.defineProperty;var Pe=Object.getOwnPropertySymbols;var He=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable;var xe=u=>{throw TypeError(u)};var Ee=(u,h,e)=>h in u?_e(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,Le=(u,h)=>{for(var e in h||(h={}))He.call(h,e)&&Ee(u,e,h[e]);if(Pe)for(var e of Pe(h))We.call(h,e)&&Ee(u,e,h[e]);return u};var fe=(u,h,e)=>h.has(u)||xe("Cannot "+e);var t=(u,h,e)=>(fe(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?xe("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),n=(u,h,e,i)=>(fe(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),c=(u,h,e)=>(fe(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fe=require("../Store-DRp_K37w.cjs"),B=require("../index-Cqw2NKev.cjs"),$e=require("../easings-GegIwET5.cjs"),ue=require("../events-KVanG9sR.cjs"),ke=require("../jss-BXAMRO12.cjs"),Rt=require("../layout-Ctc2p3uz.cjs"),Re=require("../math-GDWEqu7y.cjs"),Ne=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ae=require("../order/index.cjs"),Ue=require("../Damped-B1lXa9nb.cjs"),Ge=require("../Tweened-cJ36zq1A.cjs"),ce=require("../controls/index.cjs"),It=require("../window-resizer/index.cjs"),mt=require("../scroll-entries/index.cjs"),ze=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ze=require("../device/index.cjs"),Qt=require("../element-resizer/index.cjs"),je=require("../gestures-C7gbKx11.cjs"),Ie=require("../dom-JBOkFLTh.cjs"),Ke=require("../function-MthRj-GJ.cjs"),Je=require("../scroll-segment/index.cjs");var f,Xt,g,gt,V,X;class Qe{constructor(h,e,i){s(this,f);s(this,Xt);s(this,g);s(this,gt,0);s(this,V,0);s(this,X,null);n(this,f,h),n(this,Xt,e),n(this,g,i),mt.scrollEntries.register(t(this,f))}get index(){return t(this,Xt)}get size(){return t(this,gt)}get position(){return t(this,V)}destroy(){mt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null),this.setSize()}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){n(this,gt,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),n(this,V,t(this,g).vertical?Rt.getCumulativeOffsetTop(t(this,f)):Rt.getCumulativeOffsetLeft(t(this,f))),n(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,gt)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),mt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,r=t(this,V)-t(this,g).viewportSize-e,d=t(this,V)+t(this,gt)+e,b=Re.clamp(i,r,d);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,X)!==h&&(t(this,X)&&t(this,f).classList.remove(t(this,X)),h&&t(this,f).classList.add(h),n(this,X,h),ue.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,X)},custom:!0}))}}f=new WeakMap,Xt=new WeakMap,g=new WeakMap,gt=new WeakMap,V=new WeakMap,X=new WeakMap;const Xe=ke.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,yt,x,Y,_,H,W,T,tt,et,F,st,vt,q,v,Ct,wt,Pt,Et,Tt,I,xt,it,D,rt,$,nt,Lt,ht,ot,lt,p,qt,l,Yt,te,y,m,k,A,ct,M,w,P,Dt,ut,N,U,G,At,at,Z,Mt,O,E,ee,o,me,Jt,kt,de,Se,ge,ye,L,Ot,Te,Bt,se,ve,Ce,ft,pe,ie;class jt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,yt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,Y,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,W,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,tt,new S.CSSProperty(this,"--tween-easing",!1));s(this,et,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,st,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,vt,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,Ct,new S.CSSProperty(this,"--damping",20));s(this,wt,new S.CSSProperty(this,"--mass",0));s(this,Pt,new S.CSSProperty(this,"--stiffness",0));s(this,Et,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Tt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,I,new S.CSSProperty(this,"--autoplay",0));s(this,xt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,it,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,D,new S.CSSProperty(this,"--classes",!1));s(this,rt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,nt,new S.CSSProperty(this,"--focus-delay",0));s(this,Lt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ht,new S.CSSProperty(this,"--disabled",!1));s(this,ot,new S.CSSProperty(this,"--hibernate",!1));s(this,lt,null);s(this,p,null);s(this,qt,null);s(this,l,[]);s(this,Yt,0);s(this,te,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,A,null);s(this,ct,null);s(this,M,null);s(this,w,null);s(this,P,new Fe.Store(0));s(this,Dt,0);s(this,ut,0);s(this,N,!1);s(this,U,!0);s(this,G,!0);s(this,At);s(this,at);s(this,Z,new Ge.Tweened);s(this,Mt,!1);s(this,O,null);s(this,E,!1);s(this,ee,null);s(this,L,()=>{if(t(this,ot).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,P).current;if(n(this,Yt,this.vertical?Rt.getCumulativeOffsetTop(this):Rt.getCumulativeOffsetLeft(this)),n(this,te,this.vertical?Rt.getCumulativeOffsetTop(t(this,p)):Rt.getCumulativeOffsetLeft(t(this,p))),n(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?n(this,k,ze.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):n(this,k,ze.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,F).current&&t(this,l).length){const r=t(this,q).current,d=(t(this,y)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(d)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){n(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",n(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",n(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const r=getComputedStyle(this),d=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);n(this,m,t(this,m)+d),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],d=r.position+r.size-t(this,y),b=t(this,m)-d;n(this,ut,r.position+r.size+b)}else n(this,ut,t(this,m));if(t(this,T).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});n(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,ht).current||c(this,o,Se).call(this):c(this,o,de).call(this),t(this,Ot).call(this)});s(this,Ot,()=>{if(!t(this,N)||t(this,G)||t(this,U))return;const e=this.currentScrollValue;if(n(this,Dt,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,P).current=c(this,o,pe).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;mt.scrollEntries.update(this,t(this,x).current,e)});s(this,Bt,(e,i)=>{t(this,yt).current&&(c(this,o,ve).call(this,Math.sign(i)||1),t(this,se).call(this,e,i))});s(this,se,(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,Z).unlistenAnimationFrame(),!t(this,I).current&&t(this,nt).current&&(clearInterval(t(this,At)),n(this,At,setTimeout(()=>{const r=t(this,l)[c(this,o,pe).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Lt).current,easing:$e.easeInOutExpo}})},t(this,nt).current))),!(e.includes("drag")&&!Ze.device.isTouch&&!t(this,Et).current)){if(t(this,T).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const d={tween:t(this,tt).current||t(this,et).current?{easing:t(this,tt).current||"easeInOutCubic",duration:t(this,et).current||500}:void 0};t(this,Mt)?this.scrollToSection(t(this,P).current,d):this.shiftSections(r,d)}else t(this,a).shift(r*t(this,y))}else t(this,a).shift(i);n(this,Mt,e==="drag")}});s(this,ie,()=>{n(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,ye).call(this)});if(B.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Xe];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),n(this,lt,document.createElement("div")),t(this,lt).className="content-wrapper",n(this,p,document.createElement("div")),t(this,p).className="content",n(this,qt,document.createElement("slot")),t(this,p).appendChild(t(this,qt)),t(this,lt).appendChild(t(this,p)),e.appendChild(t(this,lt)),n(this,ee,new MutationObserver(r=>{this.tryResplit()}))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,yt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,Y)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,tt)}get durationCSSProperty(){return t(this,et)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,st)}get dragInertionCSSProperty(){return t(this,vt)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Ct)}get massCSSProperty(){return t(this,wt)}get stiffnessCSSProperty(){return t(this,Pt)}get mouseDragCSSProperty(){return t(this,Et)}get sectionDistanceScaleCSSProperty(){return t(this,Tt)}get autoplayCSSProperty(){return t(this,I)}get autoplayPauseDurationCSSProperty(){return t(this,xt)}get autoplayUserDirectionCSSProperty(){return t(this,it)}get classesCSSProperty(){return t(this,D)}get currentIndexStartOffsetCSSProperty(){return t(this,rt)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,nt)}get focusDurationCSSProperty(){return t(this,Lt)}get disabledCSSProperty(){return t(this,ht)}get hibernatedCSSProperty(){return t(this,ot)}get currentScrollValue(){return c(this,o,Ce).call(this,"current")}get targetScrollValue(){return c(this,o,Ce).call(this,"target")}get contentWrapperElement(){return t(this,lt)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,Yt)}get contentPosition(){return t(this,te)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,P)}get limit(){return Math.ceil(t(this,l).length-t(this,q).current)}get distance(){return t(this,ut)}get loopDistance(){return t(this,v).current?t(this,ut)+t(this,k):t(this,ut)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,Dt)}get scrollLine(){return t(this,O)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,G)&&(t(this,v).current||t(this,W).current||t(this,v).current||t(this,F).current||t(this,T).current)&&c(this,o,Jt).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress<d?0:this.currentProgress>b?1:(this.currentProgress-d)/(b-d)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress>=d&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,P).current,d=c(this,o,Te).call(this,e),b=t(this,l)[r],C=t(this,l)[d];if(b&&C){let R=0;const be=c(this,o,pe).call(this),Kt=t(this,l)[be],Ve=Kt?this.targetScrollValue-Kt.position:0;t(this,v).current?d===0&&r===t(this,l).length-1?R=t(this,m)+t(this,y)-b.position+t(this,k):d===t(this,l).length-1&&r===0?R=C.position-(t(this,m)+t(this,y)+t(this,k)):R=C.position-b.position:R=C.position-b.position,this.shiftPosition(R-Ve,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){c(this,o,ve).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,Z).set(t(this,a).current,{equalize:!0}),t(this,Z).set(e,Le({},i.tween)),n(this,at,setTimeout(()=>{n(this,at,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){mt.scrollEntries.register(this),n(this,a,new Ue.Damped(0,{damping:.01,min:0,order:ae.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),n(this,A,new ce.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Bt)),n(this,ct,new ce.KeyboardControls({element:this})),t(this,ct).changeEvent.subscribe(t(this,Bt)),n(this,M,new ce.DragControls({element:t(this,p)})),t(this,M).changeEvent.subscribe(t(this,Bt)),n(this,w,new ce.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,se)),t(this,x).subscribe(()=>{c(this,o,me).call(this)}),t(this,Y).subscribe(()=>{c(this,o,me).call(this)}),t(this,st).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,vt).subscribe(e=>{t(this,M).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,Jt).call(this):c(this,o,kt).call(this))}),t(this,T).subscribe(e=>{t(this,A).debounce=e.current,t(this,M).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,kt).call(this))}),t(this,F).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,kt).call(this))}),t(this,q).subscribe(e=>{t(this,E)&&(t(this,L).call(this),c(this,o,ft).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,l).length||(t(this,W).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(n(this,Dt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Ct).subscribe(e=>{t(this,a).damping=e.current}),t(this,wt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Pt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,I).subscribe(e=>{t(this,w).speed=e.current,!t(this,U)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,it).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,D).subscribe(e=>{t(this,E)&&c(this,o,ft).call(this)}),t(this,rt).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,$).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,l).length&&c(this,o,ft).call(this)}),t(this,Z).subscribe(e=>{t(this,Z).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ht).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,de).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Se).call(this))}),t(this,ot).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,ge).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,ye).call(this))}),t(this,yt).observe(),t(this,x).observe(),t(this,Y).observe(),t(this,_).observe(),t(this,H).observe(),t(this,W).observe(),t(this,T).observe(),t(this,tt).observe(),t(this,et).observe(),t(this,F).observe(),t(this,st).observe(),t(this,vt).observe(),t(this,q).observe(),t(this,v).observe(),t(this,Ct).observe(),t(this,wt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,Tt).observe(),t(this,I).observe(),t(this,I).observe(),t(this,xt).observe(),t(this,it).observe(),t(this,D).observe(),t(this,rt).observe(),t(this,$).observe(),t(this,nt).observe(),t(this,Lt).observe(),t(this,ht).observe(),t(this,ot).observe(),It.windowResizer.subscribe(t(this,ie),ae.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,yt).unobserve(),t(this,x).unobserve(),t(this,Y).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,W).unobserve(),t(this,T).unobserve(),t(this,tt).unobserve(),t(this,et).unobserve(),t(this,F).unobserve(),t(this,st).unobserve(),t(this,vt).unobserve(),t(this,q).unobserve(),t(this,v).unobserve(),t(this,Ct).unobserve(),t(this,wt).unobserve(),t(this,Pt).unobserve(),t(this,Et).unobserve(),t(this,Tt).unobserve(),t(this,I).unobserve(),t(this,xt).unobserve(),t(this,it).unobserve(),t(this,D).unobserve(),t(this,rt).unobserve(),t(this,$).unobserve(),t(this,nt).unobserve(),t(this,Lt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),It.windowResizer.unsubscribe(t(this,ie)),c(this,o,ge).call(this),t(this,ee).disconnect()}}a=new WeakMap,yt=new WeakMap,x=new WeakMap,Y=new WeakMap,_=new WeakMap,H=new WeakMap,W=new WeakMap,T=new WeakMap,tt=new WeakMap,et=new WeakMap,F=new WeakMap,st=new WeakMap,vt=new WeakMap,q=new WeakMap,v=new WeakMap,Ct=new WeakMap,wt=new WeakMap,Pt=new WeakMap,Et=new WeakMap,Tt=new WeakMap,I=new WeakMap,xt=new WeakMap,it=new WeakMap,D=new WeakMap,rt=new WeakMap,$=new WeakMap,nt=new WeakMap,Lt=new WeakMap,ht=new WeakMap,ot=new WeakMap,lt=new WeakMap,p=new WeakMap,qt=new WeakMap,l=new WeakMap,Yt=new WeakMap,te=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,A=new WeakMap,ct=new WeakMap,M=new WeakMap,w=new WeakMap,P=new WeakMap,Dt=new WeakMap,ut=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,At=new WeakMap,at=new WeakMap,Z=new WeakMap,Mt=new WeakMap,O=new WeakMap,E=new WeakMap,ee=new WeakMap,o=new WeakSet,me=function(){const e=t(this,x).current,i=t(this,Y).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,A).axis=t(this,st).current?"max":e,t(this,ct).dimension=e==="x"?"width":"height",t(this,M).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},Jt=function(){c(this,o,kt).call(this),t(this,qt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Qe(e,i,this))}),t(this,p).style.transform="",ue.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,ft).call(this)},kt=function(){t(this,l).forEach(e=>{e.destroy()}),n(this,l,[]),t(this,P).reset(),t(this,a).reset(),ue.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},de=function(){t(this,U)||(n(this,U,!0),t(this,a).unsubscribe(t(this,Ot)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,At)),clearInterval(t(this,at)),t(this,Z).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,ct).disconnect(),t(this,M).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},Se=function(){t(this,U)&&(n(this,U,!1),t(this,a).subscribe(t(this,Ot)),t(this,A).connect(),t(this,ct).connect(),t(this,M).connect(),t(this,I).current&&t(this,w).connect())},ge=function(){t(this,G)||(n(this,G,!0),It.windowResizer.unsubscribe(t(this,L)),Qt.elementResizer.unsubscribe(t(this,L)),c(this,o,de).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,kt).call(this):(t(this,P).reset(),t(this,a).reset()),mt.scrollEntries.unregister(this))},ye=function(){t(this,G)&&(n(this,G,!1),mt.scrollEntries.register(this),this.tryResplit(),c(this,o,Se).call(this),It.windowResizer.subscribe(t(this,L),ae.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Ot=new WeakMap,Te=function(e){let i=t(this,P).current;return t(this,v).current?i=Ne.loopNumber(e,t(this,l).length):i=Re.clamp(e,0,this.limit),i},Bt=new WeakMap,se=new WeakMap,ve=function(e=1){t(this,it).current&&(t(this,w).direction=e),t(this,I).current&&t(this,w).pauseAndContinue(t(this,xt).current,this.sectionalCSSProperty.current)},Ce=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,k));return i<0?t(this,m)+i+t(this,y)+t(this,k):i}else return t(this,a)[e]},ft=function(){if(t(this,l).length){const e=t(this,P).current+t(this,rt).current;if(e===0?n(this,O,"start"):e===this.limit?n(this,O,"end"):n(this,O,null),ue.dispatchEvent(this,"scrollLine",{detail:{line:t(this,O)}}),t(this,D).current){this.classList.remove("end","start"),t(this,O)&&this.classList.add(t(this,O));const i=t(this,q).current+t(this,$).current;t(this,l).forEach((r,d)=>{const b=e-this.limit-1+t(this,$).current,C=e+i,R=this.sections.length-C;d>=e&&d<C||d<=b?r.mark("current"):d>=C&&d<C+R/2||d<=b+i?r.mark("next"):r.mark("previous")})}}},pe=function(){let e=this.targetScrollValue,i=1/0,r=0;const d=t(this,a).direction;for(let b=0;b<t(this,l).length;b++){const C=t(this,l)[b];let R=t(this,Mt)?C.size*d*-1*.4:0,be=C.position;const Kt=Math.abs(be+R-e);Kt<i&&(i=Kt,r=b)}return r},ie=new WeakMap;B.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",jt);var re;class we extends HTMLElement{constructor(){super(...arguments);s(this,re,null)}get scrollElement(){return t(this,re)}connectedCallback(){const e=Ie.findParentElement(this,jt);e instanceof jt?n(this,re,e):console.error(this,"e-scroll not found")}}re=new WeakMap;var dt,z,j,K,Vt,_t,St,Ht,ne,he;class qe extends we{constructor(){super();s(this,dt,null);s(this,z,null);s(this,j,!1);s(this,K,0);s(this,Vt,0);s(this,_t,0);s(this,St,()=>{n(this,j,this.offsetWidth>this.offsetHeight);const e=t(this,j)?this.offsetWidth:this.offsetHeight;n(this,K,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),n(this,K,Math.max(t(this,K),30)),t(this,j)?(t(this,z).style.width=t(this,K)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,K)+"px"),n(this,Vt,e-t(this,K)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ht).call(this)});s(this,Ht,()=>{n(this,_t,this.scrollElement.currentProgress*t(this,Vt)),t(this,j)?t(this,z).style.transform=`translate3d(${t(this,_t)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,_t)}px, 0px)`});s(this,ne,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,he,e=>{document.documentElement.classList.add("grabbing"),je.setupDrag(d=>{const b=t(this,j)?d.x:d.y,C=this.scrollElement.distance/t(this,Vt),R=(b-r)*C;this.scrollElement.setPosition(i+R)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,j)?e.x:e.y});if(B.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ke.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"}})],n(this,dt,document.createElement("slot")),t(this,dt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,dt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,dt).assignedElements()[0]||t(this,dt).firstElementChild;n(this,z,e),t(this,z).addEventListener("pointerdown",t(this,he)),It.windowResizer.subscribe(t(this,St),ae.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,St)),Qt.elementResizer.subscribe(this.scrollElement,t(this,St)),this.scrollElement.onScroll(t(this,Ht)),this.scrollElement.axisCSSProperty.subscribe(t(this,ne))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,he)),It.windowResizer.unsubscribe(t(this,St)),Qt.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Ht)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ne))}}dt=new WeakMap,z=new WeakMap,j=new WeakMap,K=new WeakMap,Vt=new WeakMap,_t=new WeakMap,St=new WeakMap,Ht=new WeakMap,ne=new WeakMap,he=new WeakMap;B.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",qe);var Wt,Ft,$t;class De extends we{constructor(){super();s(this,Wt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Ft,new S.CSSProperty(this,"--tween-easing",!1));s(this,$t,new S.CSSProperty(this,"--tween-duration",0));B.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Wt).current,i=t(this,Ft).current,r=t(this,$t).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Wt).observe(),t(this,Ft).observe(),t(this,$t).observe()}disconnectedCallback(){t(this,Wt).close(),t(this,Ft).close(),t(this,$t).close()}}Wt=new WeakMap,Ft=new WeakMap,$t=new WeakMap;var Nt;class Ae extends De{constructor(){super(...arguments);s(this,Nt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Nt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Nt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Nt).close()}}Nt=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Ae);var J,Ut;class Me extends De{constructor(){super(...arguments);s(this,J,new S.CSSProperty(this,"--step",1));s(this,Ut,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,J).current>0&&this.scrollElement.scrollLine==="end"||t(this,J).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,J).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,J).subscribe(()=>{t(this,Ut).call(this)}),t(this,J).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Ut)),t(this,Ut).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,J).close(),this.removeAttribute("disabled")}}J=new WeakMap,Ut=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Me);var Q,pt,Gt,oe,le,Zt;class Ye{constructor(h,e,i){s(this,Q,null);s(this,pt,null);s(this,Gt,null);s(this,oe,null);s(this,le,()=>{t(this,pt).scrollToSection(t(this,Gt),{behaviour:t(this,oe)})});s(this,Zt,()=>{t(this,Q).classList.toggle("current",t(this,pt).counter.current===t(this,Gt))});B.isBrowser&&(n(this,Q,document.createElement("button")),n(this,pt,h),n(this,oe,i),n(this,Gt,e),t(this,Q).addEventListener("click",t(this,le)),t(this,pt).counter.subscribe(t(this,Zt)),t(this,Zt).call(this))}get element(){return t(this,Q)}destroy(){t(this,Q).removeEventListener("click",t(this,le)),t(this,pt).counter.unsubscribe(t(this,Zt)),t(this,Q).remove()}}Q=new WeakMap,pt=new WeakMap,Gt=new WeakMap,oe=new WeakMap,le=new WeakMap,Zt=new WeakMap;var bt,zt;class Oe extends we{constructor(){super(...arguments);s(this,bt,[]);s(this,zt,Ke.debounce(()=>{t(this,bt).forEach(i=>i.destroy()),n(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 Ye(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,zt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,zt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,zt)),t(this,bt).forEach(e=>e.destroy()),n(this,bt,[])}}bt=new WeakMap,zt=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Oe);class Be extends Je.ScrollSegmentElement{connectedCallback(){const h=Ie.findParentElement(this,jt);h instanceof jt?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}B.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Be);exports.ScrollBulletButtonsElement=Oe;exports.ScrollElement=jt;exports.ScrollSegmentElement=Be;exports.ScrollSetButtonElement=Ae;exports.ScrollStepButtonElement=Me;exports.ScrollbarElement=qe;
|
|
1
|
+
"use strict";var _e=Object.defineProperty;var Pe=Object.getOwnPropertySymbols;var He=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable;var xe=u=>{throw TypeError(u)};var Ee=(u,h,e)=>h in u?_e(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,Le=(u,h)=>{for(var e in h||(h={}))He.call(h,e)&&Ee(u,e,h[e]);if(Pe)for(var e of Pe(h))We.call(h,e)&&Ee(u,e,h[e]);return u};var fe=(u,h,e)=>h.has(u)||xe("Cannot "+e);var t=(u,h,e)=>(fe(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?xe("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),n=(u,h,e,i)=>(fe(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),c=(u,h,e)=>(fe(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fe=require("../Store-DRp_K37w.cjs"),B=require("../index-Cqw2NKev.cjs"),$e=require("../easings-GegIwET5.cjs"),ue=require("../events-KVanG9sR.cjs"),ke=require("../jss-CRBgdvJ3.cjs"),Rt=require("../layout-Ctc2p3uz.cjs"),Re=require("../math-GDWEqu7y.cjs"),Ne=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ae=require("../order/index.cjs"),Ue=require("../Damped-B1lXa9nb.cjs"),Ge=require("../Tweened-cJ36zq1A.cjs"),ce=require("../controls/index.cjs"),It=require("../window-resizer/index.cjs"),mt=require("../scroll-entries/index.cjs"),ze=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ze=require("../device/index.cjs"),Qt=require("../element-resizer/index.cjs"),je=require("../gestures-C7gbKx11.cjs"),Ie=require("../dom-JBOkFLTh.cjs"),Ke=require("../function-MthRj-GJ.cjs"),Je=require("../scroll-segment/index.cjs");var f,Xt,g,gt,V,X;class Qe{constructor(h,e,i){s(this,f);s(this,Xt);s(this,g);s(this,gt,0);s(this,V,0);s(this,X,null);n(this,f,h),n(this,Xt,e),n(this,g,i),mt.scrollEntries.register(t(this,f))}get index(){return t(this,Xt)}get size(){return t(this,gt)}get position(){return t(this,V)}destroy(){mt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null),this.setSize()}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){n(this,gt,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),n(this,V,t(this,g).vertical?Rt.getCumulativeOffsetTop(t(this,f)):Rt.getCumulativeOffsetLeft(t(this,f))),n(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,gt)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),mt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,r=t(this,V)-t(this,g).viewportSize-e,d=t(this,V)+t(this,gt)+e,b=Re.clamp(i,r,d);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,X)!==h&&(t(this,X)&&t(this,f).classList.remove(t(this,X)),h&&t(this,f).classList.add(h),n(this,X,h),ue.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,X)},custom:!0}))}}f=new WeakMap,Xt=new WeakMap,g=new WeakMap,gt=new WeakMap,V=new WeakMap,X=new WeakMap;const Xe=ke.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,yt,x,Y,_,H,W,T,tt,et,F,st,vt,q,v,Ct,wt,Pt,Et,Tt,I,xt,it,D,rt,$,nt,Lt,ht,ot,lt,p,qt,l,Yt,te,y,m,k,A,ct,M,w,P,Dt,ut,N,U,G,At,at,Z,Mt,O,E,ee,o,me,Jt,kt,de,Se,ge,ye,L,Ot,Te,Bt,se,ve,Ce,ft,pe,ie;class jt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,yt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,Y,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,W,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,tt,new S.CSSProperty(this,"--tween-easing",!1));s(this,et,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,st,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,vt,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,Ct,new S.CSSProperty(this,"--damping",20));s(this,wt,new S.CSSProperty(this,"--mass",0));s(this,Pt,new S.CSSProperty(this,"--stiffness",0));s(this,Et,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Tt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,I,new S.CSSProperty(this,"--autoplay",0));s(this,xt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,it,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,D,new S.CSSProperty(this,"--classes",!1));s(this,rt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,nt,new S.CSSProperty(this,"--focus-delay",0));s(this,Lt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ht,new S.CSSProperty(this,"--disabled",!1));s(this,ot,new S.CSSProperty(this,"--hibernate",!1));s(this,lt,null);s(this,p,null);s(this,qt,null);s(this,l,[]);s(this,Yt,0);s(this,te,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,A,null);s(this,ct,null);s(this,M,null);s(this,w,null);s(this,P,new Fe.Store(0));s(this,Dt,0);s(this,ut,0);s(this,N,!1);s(this,U,!0);s(this,G,!0);s(this,At);s(this,at);s(this,Z,new Ge.Tweened);s(this,Mt,!1);s(this,O,null);s(this,E,!1);s(this,ee,null);s(this,L,()=>{if(t(this,ot).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,P).current;if(n(this,Yt,this.vertical?Rt.getCumulativeOffsetTop(this):Rt.getCumulativeOffsetLeft(this)),n(this,te,this.vertical?Rt.getCumulativeOffsetTop(t(this,p)):Rt.getCumulativeOffsetLeft(t(this,p))),n(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?n(this,k,ze.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):n(this,k,ze.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,F).current&&t(this,l).length){const r=t(this,q).current,d=(t(this,y)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(d)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){n(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",n(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",n(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const r=getComputedStyle(this),d=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);n(this,m,t(this,m)+d),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],d=r.position+r.size-t(this,y),b=t(this,m)-d;n(this,ut,r.position+r.size+b)}else n(this,ut,t(this,m));if(t(this,T).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});n(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,ht).current||c(this,o,Se).call(this):c(this,o,de).call(this),t(this,Ot).call(this)});s(this,Ot,()=>{if(!t(this,N)||t(this,G)||t(this,U))return;const e=this.currentScrollValue;if(n(this,Dt,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,P).current=c(this,o,pe).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;mt.scrollEntries.update(this,t(this,x).current,e)});s(this,Bt,(e,i)=>{t(this,yt).current&&(c(this,o,ve).call(this,Math.sign(i)||1),t(this,se).call(this,e,i))});s(this,se,(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,Z).unlistenAnimationFrame(),!t(this,I).current&&t(this,nt).current&&(clearInterval(t(this,At)),n(this,At,setTimeout(()=>{const r=t(this,l)[c(this,o,pe).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Lt).current,easing:$e.easeInOutExpo}})},t(this,nt).current))),!(e.includes("drag")&&!Ze.device.isTouch&&!t(this,Et).current)){if(t(this,T).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const d={tween:t(this,tt).current||t(this,et).current?{easing:t(this,tt).current||"easeInOutCubic",duration:t(this,et).current||500}:void 0};t(this,Mt)?this.scrollToSection(t(this,P).current,d):this.shiftSections(r,d)}else t(this,a).shift(r*t(this,y))}else t(this,a).shift(i);n(this,Mt,e==="drag")}});s(this,ie,()=>{n(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,ye).call(this)});if(B.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Xe];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),n(this,lt,document.createElement("div")),t(this,lt).className="content-wrapper",n(this,p,document.createElement("div")),t(this,p).className="content",n(this,qt,document.createElement("slot")),t(this,p).appendChild(t(this,qt)),t(this,lt).appendChild(t(this,p)),e.appendChild(t(this,lt)),n(this,ee,new MutationObserver(r=>{this.tryResplit()}))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,yt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,Y)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,tt)}get durationCSSProperty(){return t(this,et)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,st)}get dragInertionCSSProperty(){return t(this,vt)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Ct)}get massCSSProperty(){return t(this,wt)}get stiffnessCSSProperty(){return t(this,Pt)}get mouseDragCSSProperty(){return t(this,Et)}get sectionDistanceScaleCSSProperty(){return t(this,Tt)}get autoplayCSSProperty(){return t(this,I)}get autoplayPauseDurationCSSProperty(){return t(this,xt)}get autoplayUserDirectionCSSProperty(){return t(this,it)}get classesCSSProperty(){return t(this,D)}get currentIndexStartOffsetCSSProperty(){return t(this,rt)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,nt)}get focusDurationCSSProperty(){return t(this,Lt)}get disabledCSSProperty(){return t(this,ht)}get hibernatedCSSProperty(){return t(this,ot)}get currentScrollValue(){return c(this,o,Ce).call(this,"current")}get targetScrollValue(){return c(this,o,Ce).call(this,"target")}get contentWrapperElement(){return t(this,lt)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,Yt)}get contentPosition(){return t(this,te)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,P)}get limit(){return Math.ceil(t(this,l).length-t(this,q).current)}get distance(){return t(this,ut)}get loopDistance(){return t(this,v).current?t(this,ut)+t(this,k):t(this,ut)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,Dt)}get scrollLine(){return t(this,O)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,G)&&(t(this,v).current||t(this,W).current||t(this,v).current||t(this,F).current||t(this,T).current)&&c(this,o,Jt).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress<d?0:this.currentProgress>b?1:(this.currentProgress-d)/(b-d)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress>=d&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,P).current,d=c(this,o,Te).call(this,e),b=t(this,l)[r],C=t(this,l)[d];if(b&&C){let R=0;const be=c(this,o,pe).call(this),Kt=t(this,l)[be],Ve=Kt?this.targetScrollValue-Kt.position:0;t(this,v).current?d===0&&r===t(this,l).length-1?R=t(this,m)+t(this,y)-b.position+t(this,k):d===t(this,l).length-1&&r===0?R=C.position-(t(this,m)+t(this,y)+t(this,k)):R=C.position-b.position:R=C.position-b.position,this.shiftPosition(R-Ve,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){c(this,o,ve).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,Z).set(t(this,a).current,{equalize:!0}),t(this,Z).set(e,Le({},i.tween)),n(this,at,setTimeout(()=>{n(this,at,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){mt.scrollEntries.register(this),n(this,a,new Ue.Damped(0,{damping:.01,min:0,order:ae.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),n(this,A,new ce.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Bt)),n(this,ct,new ce.KeyboardControls({element:this})),t(this,ct).changeEvent.subscribe(t(this,Bt)),n(this,M,new ce.DragControls({element:t(this,p)})),t(this,M).changeEvent.subscribe(t(this,Bt)),n(this,w,new ce.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,se)),t(this,x).subscribe(()=>{c(this,o,me).call(this)}),t(this,Y).subscribe(()=>{c(this,o,me).call(this)}),t(this,st).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,vt).subscribe(e=>{t(this,M).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,Jt).call(this):c(this,o,kt).call(this))}),t(this,T).subscribe(e=>{t(this,A).debounce=e.current,t(this,M).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,kt).call(this))}),t(this,F).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,kt).call(this))}),t(this,q).subscribe(e=>{t(this,E)&&(t(this,L).call(this),c(this,o,ft).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,l).length||(t(this,W).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(n(this,Dt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Ct).subscribe(e=>{t(this,a).damping=e.current}),t(this,wt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Pt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,I).subscribe(e=>{t(this,w).speed=e.current,!t(this,U)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,it).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,D).subscribe(e=>{t(this,E)&&c(this,o,ft).call(this)}),t(this,rt).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,$).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,l).length&&c(this,o,ft).call(this)}),t(this,Z).subscribe(e=>{t(this,Z).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ht).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,de).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Se).call(this))}),t(this,ot).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,ge).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,ye).call(this))}),t(this,yt).observe(),t(this,x).observe(),t(this,Y).observe(),t(this,_).observe(),t(this,H).observe(),t(this,W).observe(),t(this,T).observe(),t(this,tt).observe(),t(this,et).observe(),t(this,F).observe(),t(this,st).observe(),t(this,vt).observe(),t(this,q).observe(),t(this,v).observe(),t(this,Ct).observe(),t(this,wt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,Tt).observe(),t(this,I).observe(),t(this,I).observe(),t(this,xt).observe(),t(this,it).observe(),t(this,D).observe(),t(this,rt).observe(),t(this,$).observe(),t(this,nt).observe(),t(this,Lt).observe(),t(this,ht).observe(),t(this,ot).observe(),It.windowResizer.subscribe(t(this,ie),ae.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,yt).unobserve(),t(this,x).unobserve(),t(this,Y).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,W).unobserve(),t(this,T).unobserve(),t(this,tt).unobserve(),t(this,et).unobserve(),t(this,F).unobserve(),t(this,st).unobserve(),t(this,vt).unobserve(),t(this,q).unobserve(),t(this,v).unobserve(),t(this,Ct).unobserve(),t(this,wt).unobserve(),t(this,Pt).unobserve(),t(this,Et).unobserve(),t(this,Tt).unobserve(),t(this,I).unobserve(),t(this,xt).unobserve(),t(this,it).unobserve(),t(this,D).unobserve(),t(this,rt).unobserve(),t(this,$).unobserve(),t(this,nt).unobserve(),t(this,Lt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),It.windowResizer.unsubscribe(t(this,ie)),c(this,o,ge).call(this),t(this,ee).disconnect()}}a=new WeakMap,yt=new WeakMap,x=new WeakMap,Y=new WeakMap,_=new WeakMap,H=new WeakMap,W=new WeakMap,T=new WeakMap,tt=new WeakMap,et=new WeakMap,F=new WeakMap,st=new WeakMap,vt=new WeakMap,q=new WeakMap,v=new WeakMap,Ct=new WeakMap,wt=new WeakMap,Pt=new WeakMap,Et=new WeakMap,Tt=new WeakMap,I=new WeakMap,xt=new WeakMap,it=new WeakMap,D=new WeakMap,rt=new WeakMap,$=new WeakMap,nt=new WeakMap,Lt=new WeakMap,ht=new WeakMap,ot=new WeakMap,lt=new WeakMap,p=new WeakMap,qt=new WeakMap,l=new WeakMap,Yt=new WeakMap,te=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,A=new WeakMap,ct=new WeakMap,M=new WeakMap,w=new WeakMap,P=new WeakMap,Dt=new WeakMap,ut=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,At=new WeakMap,at=new WeakMap,Z=new WeakMap,Mt=new WeakMap,O=new WeakMap,E=new WeakMap,ee=new WeakMap,o=new WeakSet,me=function(){const e=t(this,x).current,i=t(this,Y).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,A).axis=t(this,st).current?"max":e,t(this,ct).dimension=e==="x"?"width":"height",t(this,M).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},Jt=function(){c(this,o,kt).call(this),t(this,qt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Qe(e,i,this))}),t(this,p).style.transform="",ue.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,ft).call(this)},kt=function(){t(this,l).forEach(e=>{e.destroy()}),n(this,l,[]),t(this,P).reset(),t(this,a).reset(),ue.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},de=function(){t(this,U)||(n(this,U,!0),t(this,a).unsubscribe(t(this,Ot)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,At)),clearInterval(t(this,at)),t(this,Z).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,ct).disconnect(),t(this,M).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},Se=function(){t(this,U)&&(n(this,U,!1),t(this,a).subscribe(t(this,Ot)),t(this,A).connect(),t(this,ct).connect(),t(this,M).connect(),t(this,I).current&&t(this,w).connect())},ge=function(){t(this,G)||(n(this,G,!0),It.windowResizer.unsubscribe(t(this,L)),Qt.elementResizer.unsubscribe(t(this,L)),c(this,o,de).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,kt).call(this):(t(this,P).reset(),t(this,a).reset()),mt.scrollEntries.unregister(this))},ye=function(){t(this,G)&&(n(this,G,!1),mt.scrollEntries.register(this),this.tryResplit(),c(this,o,Se).call(this),It.windowResizer.subscribe(t(this,L),ae.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Ot=new WeakMap,Te=function(e){let i=t(this,P).current;return t(this,v).current?i=Ne.loopNumber(e,t(this,l).length):i=Re.clamp(e,0,this.limit),i},Bt=new WeakMap,se=new WeakMap,ve=function(e=1){t(this,it).current&&(t(this,w).direction=e),t(this,I).current&&t(this,w).pauseAndContinue(t(this,xt).current,this.sectionalCSSProperty.current)},Ce=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,k));return i<0?t(this,m)+i+t(this,y)+t(this,k):i}else return t(this,a)[e]},ft=function(){if(t(this,l).length){const e=t(this,P).current+t(this,rt).current;if(e===0?n(this,O,"start"):e===this.limit?n(this,O,"end"):n(this,O,null),ue.dispatchEvent(this,"scrollLine",{detail:{line:t(this,O)}}),t(this,D).current){this.classList.remove("end","start"),t(this,O)&&this.classList.add(t(this,O));const i=t(this,q).current+t(this,$).current;t(this,l).forEach((r,d)=>{const b=e-this.limit-1+t(this,$).current,C=e+i,R=this.sections.length-C;d>=e&&d<C||d<=b?r.mark("current"):d>=C&&d<C+R/2||d<=b+i?r.mark("next"):r.mark("previous")})}}},pe=function(){let e=this.targetScrollValue,i=1/0,r=0;const d=t(this,a).direction;for(let b=0;b<t(this,l).length;b++){const C=t(this,l)[b];let R=t(this,Mt)?C.size*d*-1*.4:0,be=C.position;const Kt=Math.abs(be+R-e);Kt<i&&(i=Kt,r=b)}return r},ie=new WeakMap;B.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",jt);var re;class we extends HTMLElement{constructor(){super(...arguments);s(this,re,null)}get scrollElement(){return t(this,re)}connectedCallback(){const e=Ie.findParentElement(this,jt);e instanceof jt?n(this,re,e):console.error(this,"e-scroll not found")}}re=new WeakMap;var dt,z,j,K,Vt,_t,St,Ht,ne,he;class qe extends we{constructor(){super();s(this,dt,null);s(this,z,null);s(this,j,!1);s(this,K,0);s(this,Vt,0);s(this,_t,0);s(this,St,()=>{n(this,j,this.offsetWidth>this.offsetHeight);const e=t(this,j)?this.offsetWidth:this.offsetHeight;n(this,K,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),n(this,K,Math.max(t(this,K),30)),t(this,j)?(t(this,z).style.width=t(this,K)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,K)+"px"),n(this,Vt,e-t(this,K)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ht).call(this)});s(this,Ht,()=>{n(this,_t,this.scrollElement.currentProgress*t(this,Vt)),t(this,j)?t(this,z).style.transform=`translate3d(${t(this,_t)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,_t)}px, 0px)`});s(this,ne,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,he,e=>{document.documentElement.classList.add("grabbing"),je.setupDrag(d=>{const b=t(this,j)?d.x:d.y,C=this.scrollElement.distance/t(this,Vt),R=(b-r)*C;this.scrollElement.setPosition(i+R)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,j)?e.x:e.y});if(B.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ke.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"}})],n(this,dt,document.createElement("slot")),t(this,dt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,dt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,dt).assignedElements()[0]||t(this,dt).firstElementChild;n(this,z,e),t(this,z).addEventListener("pointerdown",t(this,he)),It.windowResizer.subscribe(t(this,St),ae.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,St)),Qt.elementResizer.subscribe(this.scrollElement,t(this,St)),this.scrollElement.onScroll(t(this,Ht)),this.scrollElement.axisCSSProperty.subscribe(t(this,ne))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,he)),It.windowResizer.unsubscribe(t(this,St)),Qt.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Ht)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ne))}}dt=new WeakMap,z=new WeakMap,j=new WeakMap,K=new WeakMap,Vt=new WeakMap,_t=new WeakMap,St=new WeakMap,Ht=new WeakMap,ne=new WeakMap,he=new WeakMap;B.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",qe);var Wt,Ft,$t;class De extends we{constructor(){super();s(this,Wt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Ft,new S.CSSProperty(this,"--tween-easing",!1));s(this,$t,new S.CSSProperty(this,"--tween-duration",0));B.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Wt).current,i=t(this,Ft).current,r=t(this,$t).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Wt).observe(),t(this,Ft).observe(),t(this,$t).observe()}disconnectedCallback(){t(this,Wt).close(),t(this,Ft).close(),t(this,$t).close()}}Wt=new WeakMap,Ft=new WeakMap,$t=new WeakMap;var Nt;class Ae extends De{constructor(){super(...arguments);s(this,Nt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Nt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Nt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Nt).close()}}Nt=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Ae);var J,Ut;class Me extends De{constructor(){super(...arguments);s(this,J,new S.CSSProperty(this,"--step",1));s(this,Ut,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,J).current>0&&this.scrollElement.scrollLine==="end"||t(this,J).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,J).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,J).subscribe(()=>{t(this,Ut).call(this)}),t(this,J).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Ut)),t(this,Ut).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,J).close(),this.removeAttribute("disabled")}}J=new WeakMap,Ut=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Me);var Q,pt,Gt,oe,le,Zt;class Ye{constructor(h,e,i){s(this,Q,null);s(this,pt,null);s(this,Gt,null);s(this,oe,null);s(this,le,()=>{t(this,pt).scrollToSection(t(this,Gt),{behaviour:t(this,oe)})});s(this,Zt,()=>{t(this,Q).classList.toggle("current",t(this,pt).counter.current===t(this,Gt))});B.isBrowser&&(n(this,Q,document.createElement("button")),n(this,pt,h),n(this,oe,i),n(this,Gt,e),t(this,Q).addEventListener("click",t(this,le)),t(this,pt).counter.subscribe(t(this,Zt)),t(this,Zt).call(this))}get element(){return t(this,Q)}destroy(){t(this,Q).removeEventListener("click",t(this,le)),t(this,pt).counter.unsubscribe(t(this,Zt)),t(this,Q).remove()}}Q=new WeakMap,pt=new WeakMap,Gt=new WeakMap,oe=new WeakMap,le=new WeakMap,Zt=new WeakMap;var bt,zt;class Oe extends we{constructor(){super(...arguments);s(this,bt,[]);s(this,zt,Ke.debounce(()=>{t(this,bt).forEach(i=>i.destroy()),n(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 Ye(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,zt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,zt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,zt)),t(this,bt).forEach(e=>e.destroy()),n(this,bt,[])}}bt=new WeakMap,zt=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Oe);class Be extends Je.ScrollSegmentElement{connectedCallback(){const h=Ie.findParentElement(this,jt);h instanceof jt?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}B.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Be);exports.ScrollBulletButtonsElement=Oe;exports.ScrollElement=jt;exports.ScrollSegmentElement=Be;exports.ScrollSetButtonElement=Ae;exports.ScrollStepButtonElement=Me;exports.ScrollbarElement=qe;
|
package/lib/scroll/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import { S as He } from "../Store-D2xCXENW.js";
|
|
|
18
18
|
import { i as H } from "../index-euf5anj6.js";
|
|
19
19
|
import { a as Be } from "../easings-Bni3YAAW.js";
|
|
20
20
|
import { d as le } from "../events-CsVF98U6.js";
|
|
21
|
-
import { c as ze } from "../jss-
|
|
21
|
+
import { c as ze } from "../jss-DtnXPEnq.js";
|
|
22
22
|
import { a as fe, g as me } from "../layout-DpZo-I0y.js";
|
|
23
23
|
import { c as Ie } from "../math-BOBiC4TN.js";
|
|
24
24
|
import { l as We } from "../number-DwCxt_Ck.js";
|
package/lib/source/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Z=h=>{throw TypeError(h)};var G=(h,r,e)=>r.has(h)||Z("Cannot "+e);var t=(h,r,e)=>(G(h,r,"read from private field"),e?e.call(h):r.get(h)),i=(h,r,e)=>r.has(h)?Z("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(h):r.set(h,e),s=(h,r,e,o)=>(G(h,r,"write to private field"),o?o.call(h,e):r.set(h,e),e),P=(h,r,e)=>(G(h,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("../class-linked-status/index.cjs"),tt=require("../index-Cqw2NKev.cjs"),U=require("../events-KVanG9sR.cjs"),et=require("../string-
|
|
1
|
+
"use strict";var Z=h=>{throw TypeError(h)};var G=(h,r,e)=>r.has(h)||Z("Cannot "+e);var t=(h,r,e)=>(G(h,r,"read from private field"),e?e.call(h):r.get(h)),i=(h,r,e)=>r.has(h)?Z("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(h):r.set(h,e),s=(h,r,e,o)=>(G(h,r,"write to private field"),o?o.call(h,e):r.set(h,e),e),P=(h,r,e)=>(G(h,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("../class-linked-status/index.cjs"),tt=require("../index-Cqw2NKev.cjs"),U=require("../events-KVanG9sR.cjs"),et=require("../string-DUXXtU8v.cjs"),K=require("../loading/index.cjs"),st=require("../order/index.cjs"),J=require("../window-resizer/index.cjs"),it=require("../Store-DRp_K37w.cjs");var $,w,O,S,u,f,M;class Q{constructor(r){i(this,$);i(this,w);i(this,O);i(this,S);i(this,u);i(this,f);i(this,M);s(this,$,r);let e=r.split(".");const o=/\b\d{1,2}x\b/g,d=e.find(p=>p.match(o)&&parseInt(p));s(this,O,d?parseInt(d):1),d&&(e=e.slice(0,-1)),s(this,w,e.length>1?e.slice(0,-1).join("."):e.join("."));const l=/\d+max/g,x=/\d+min/g,B=/\d+mar/g,_=/\d+mir/g,H=e.find(p=>p.match(l)),n=e.find(p=>p.match(x)),b=e.find(p=>p.match(B)),W=e.find(p=>p.match(_));b?(s(this,u,parseInt(b)),s(this,f,"max"),s(this,S,`(max-aspect-ratio: ${t(this,u)})`)):W?(s(this,u,parseInt(W)),s(this,f,"max"),s(this,S,`(min-aspect-ratio: ${t(this,u)})`)):H?(s(this,u,parseInt(H)),s(this,f,"max"),s(this,S,`(max-width: ${t(this,u)}px)`)):n?(s(this,u,parseInt(n)),s(this,S,`(min-width: ${t(this,u)}px)`),s(this,f,"min")):(s(this,u,0),s(this,S,`(min-width: ${t(this,u)}px)`),s(this,f,"min")),s(this,w,t(this,w).replace(`.${t(this,u)}${t(this,f)}`,"")),s(this,M,e[e.length-1]===t(this,w)?"":"."+e[e.length-1]),s(this,M,t(this,M).replace(`.${t(this,u)}${t(this,f)}`,""))}get url(){return t(this,$)}get name(){return t(this,w)}get density(){return t(this,O)}get query(){return t(this,S)}get extension(){return t(this,M)}get queryType(){return t(this,f)}get queryValue(){return t(this,u)}}$=new WeakMap,w=new WeakMap,O=new WeakMap,S=new WeakMap,u=new WeakMap,f=new WeakMap,M=new WeakMap;let rt=0;var m,a,y,q,g,z,R,c,v,A,E,C,I,j,D,V,F;class nt extends HTMLElement{constructor(e){super();i(this,I);i(this,m,null);i(this,a,null);i(this,y,!1);i(this,q,!1);i(this,g,!1);i(this,z,"");i(this,R,"");i(this,c,new Y.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1,clear:!1}));i(this,v,null);i(this,A);i(this,E,null);i(this,C);i(this,D,e=>{const o=e[0];t(this,g)&&(!t(this,q)||this.hasAttribute("reload-source"))&&o.isIntersecting&&this.triggerLazyLoad(),o.isIntersecting?U.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&(P(this,I,j).call(this,void 0),s(this,q,!1)),U.dispatchEvent(this,"sourceRelease",{custom:!0}))});i(this,V,()=>{t(this,c).set("loaded",!0),t(this,c).set("error",!1),t(this,c).set("loading",!1),!t(this,g)&&!t(this,y)&&K.loading.complete(t(this,R)),U.dispatchEvent(this,"sourceLoaded",{custom:!0});const e=getComputedStyle(this).getPropertyValue("--clear-duration");e?s(this,A,setTimeout(()=>{t(this,c).set("clear",!0)},parseFloat(e)*1e3)):t(this,c).set("clear",!0),s(this,y,!0)});i(this,F,e=>{t(this,c).set("loaded",!1),t(this,c).set("error",!0),t(this,c).set("loading",!1),!t(this,g)&&!t(this,y)&&K.loading.error(t(this,R)),U.dispatchEvent(this,"sourceError",{custom:!0}),s(this,y,!0)});s(this,C,e==null?void 0:e.sourceSetOptions),tt.isBrowser&&window.IntersectionObserver&&s(this,v,new IntersectionObserver(t(this,D)))}get consumerElement(){return t(this,a)}get sourceManager(){return t(this,m)}get status(){return t(this,c)}get isLazy(){return t(this,g)}get currentURL(){return t(this,E)}get isFirstLoadHappened(){return t(this,y)}triggerLazyLoad(){!t(this,q)&&t(this,m).current&&t(this,m).current!==t(this,m).previous&&(s(this,q,!0),P(this,I,j).call(this,t(this,m).current))}connectedCallback(){s(this,z,`source-consumer-${++rt}`);const e=this.getAttribute("srcset")||"",o=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;o&&t(this,c).addElement(o),s(this,a,this.createConsumer()),t(this,a).style.cssText=`
|
|
2
2
|
display: block;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100%;
|
package/lib/source/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var t = (n, r, e) => (G(n, r, "read from private field"), e ? e.call(n) : r.get(
|
|
|
6
6
|
import { ClassLinkedStatus as Q } from "../class-linked-status/index.js";
|
|
7
7
|
import { i as X } from "../index-euf5anj6.js";
|
|
8
8
|
import { d as D } from "../events-CsVF98U6.js";
|
|
9
|
-
import { k as Y } from "../string-
|
|
9
|
+
import { k as Y } from "../string-BlMQbe8b.js";
|
|
10
10
|
import { loading as K } from "../loading/index.js";
|
|
11
11
|
import { RESIZE_ORDER as tt } from "../order/index.js";
|
|
12
12
|
import { windowResizer as Z } from "../window-resizer/index.js";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function f(e, t = !1) {
|
|
2
|
+
let n = "";
|
|
3
|
+
return e.split("-").forEach((r, a) => {
|
|
4
|
+
if (a === 0 && !t)
|
|
5
|
+
n += r;
|
|
6
|
+
else {
|
|
7
|
+
const i = r[0], u = r.slice(1), l = i.toUpperCase() + u;
|
|
8
|
+
n += l;
|
|
9
|
+
}
|
|
10
|
+
}), n;
|
|
11
|
+
}
|
|
12
|
+
function p(e) {
|
|
13
|
+
return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
14
|
+
}
|
|
15
|
+
function d(e) {
|
|
16
|
+
return e.split("_").join(".");
|
|
17
|
+
}
|
|
18
|
+
function z(e) {
|
|
19
|
+
return /^[a-z\d]+$/i.test(e) ? e.charAt(0).toUpperCase() + e.slice(1) : e.replace(
|
|
20
|
+
/([a-z\d])([a-z\d]*)/gi,
|
|
21
|
+
(t, n, r) => n.toUpperCase() + r.toLowerCase()
|
|
22
|
+
).replace(/[^a-z\d]/gi, "");
|
|
23
|
+
}
|
|
24
|
+
function o(e, t) {
|
|
25
|
+
return e.slice(0, 1)[t]() + e.slice(1);
|
|
26
|
+
}
|
|
27
|
+
function c(e, t = !1, n) {
|
|
28
|
+
return t ? e.split(" ").map((r) => o(r, n)).join(" ") : o(e, n);
|
|
29
|
+
}
|
|
30
|
+
function C(e, t = !1) {
|
|
31
|
+
return c(e, t, "toUpperCase");
|
|
32
|
+
}
|
|
33
|
+
function g(e, t = !1) {
|
|
34
|
+
return c(e, t, "toLowerCase");
|
|
35
|
+
}
|
|
36
|
+
function L(e, t = "abcdefghijklmnopqrstuvwxyz0123456789") {
|
|
37
|
+
const n = t.length, r = crypto.getRandomValues(new Uint8Array(e));
|
|
38
|
+
let a = "";
|
|
39
|
+
for (let i = 0; i < e; i++)
|
|
40
|
+
a += t.charAt(r[i] % n);
|
|
41
|
+
return a;
|
|
42
|
+
}
|
|
43
|
+
function y(e) {
|
|
44
|
+
return new RegExp("^\\p{Lu}", "u").test(e);
|
|
45
|
+
}
|
|
46
|
+
let s;
|
|
47
|
+
function m(e) {
|
|
48
|
+
return s || (s = document.createElement("textarea")), s.innerHTML = e, s.value;
|
|
49
|
+
}
|
|
50
|
+
function A(e, t, n, r) {
|
|
51
|
+
const a = typeof e == "string" ? parseInt(e) : e;
|
|
52
|
+
if (a === 1)
|
|
53
|
+
return t;
|
|
54
|
+
if (a % 100 >= 11 && a % 100 <= 14)
|
|
55
|
+
return r;
|
|
56
|
+
const i = a % 10;
|
|
57
|
+
return i === 1 ? t : i >= 2 && i <= 4 ? n : r;
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
C as a,
|
|
61
|
+
A as b,
|
|
62
|
+
p as c,
|
|
63
|
+
m as d,
|
|
64
|
+
L as g,
|
|
65
|
+
y as i,
|
|
66
|
+
f as k,
|
|
67
|
+
d as s,
|
|
68
|
+
z as t,
|
|
69
|
+
g as u
|
|
70
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function f(e,t=!1){let n="";return e.split("-").forEach((a,r)=>{if(r===0&&!t)n+=a;else{const i=a[0],l=a.slice(1),u=i.toUpperCase()+l;n+=u}}),n}function p(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function d(e){return e.split("_").join(".")}function z(e){return/^[a-z\d]+$/i.test(e)?e.charAt(0).toUpperCase()+e.slice(1):e.replace(/([a-z\d])([a-z\d]*)/gi,(t,n,a)=>n.toUpperCase()+a.toLowerCase()).replace(/[^a-z\d]/gi,"")}function o(e,t){return e.slice(0,1)[t]()+e.slice(1)}function s(e,t=!1,n){return t?e.split(" ").map(a=>o(a,n)).join(" "):o(e,n)}function C(e,t=!1){return s(e,t,"toUpperCase")}function m(e,t=!1){return s(e,t,"toLowerCase")}function g(e,t="abcdefghijklmnopqrstuvwxyz0123456789"){const n=t.length,a=crypto.getRandomValues(new Uint8Array(e));let r="";for(let i=0;i<e;i++)r+=t.charAt(a[i]%n);return r}function L(e){return new RegExp("^\\p{Lu}","u").test(e)}let c;function b(e){return c||(c=document.createElement("textarea")),c.innerHTML=e,c.value}function y(e,t,n,a){const r=typeof e=="string"?parseInt(e):e;if(r===1)return t;if(r%100>=11&&r%100<=14)return a;const i=r%10;return i===1?t:i>=2&&i<=4?n:a}exports.camelToKebab=p;exports.capitalize=C;exports.declension=y;exports.decodeHtmlEntities=b;exports.generateId=g;exports.isUppercase=L;exports.kebabToCamel=f;exports.snakeToDotted=d;exports.toPascalCase=z;exports.uncapitalize=m;
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-Bf2svn4j.cjs"),y=require("../index-Cqw2NKev.cjs"),d=require("../canvas-CU5Xjahf.cjs"),g=require("../coordinates-D8Np3cPD.cjs"),p=require("../dom-JBOkFLTh.cjs"),r=require("../easings-GegIwET5.cjs"),q=require("../events-KVanG9sR.cjs"),C=require("../file-DSpfWdd9.cjs"),I=require("../function-MthRj-GJ.cjs"),w=require("../gestures-C7gbKx11.cjs"),O=require("../jss-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-Bf2svn4j.cjs"),y=require("../index-Cqw2NKev.cjs"),d=require("../canvas-CU5Xjahf.cjs"),g=require("../coordinates-D8Np3cPD.cjs"),p=require("../dom-JBOkFLTh.cjs"),r=require("../easings-GegIwET5.cjs"),q=require("../events-KVanG9sR.cjs"),C=require("../file-DSpfWdd9.cjs"),I=require("../function-MthRj-GJ.cjs"),w=require("../gestures-C7gbKx11.cjs"),O=require("../jss-CRBgdvJ3.cjs"),m=require("../layout-Ctc2p3uz.cjs"),i=require("../math-GDWEqu7y.cjs"),f=require("../number-0243DApo.cjs"),l=require("../object-CCiXnER2.cjs"),T=require("../polyfills-Df4r-ETT.cjs"),Q=require("../scroll-H9zqFeML.cjs"),c=require("../string-DUXXtU8v.cjs"),S=require("../style-At6aDoqG.cjs"),u=require("../url-CLvdjbII.cjs");function B(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function D(t,e){const n=t.length;e=e%n;const o=new Array(n);for(let s=0;s<n;s++){const a=(s+e)%n;o[a]=t[s]}return o}function A(t,e=2){if(!+t)return"0 Bytes";const n=1024,o=e<0?0:e,s=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],a=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,a)).toFixed(o))} ${s[a]}`}function R(t){if(navigator.clipboard)navigator.clipboard.writeText(t).then(()=>{console.log("Text copied to clipboard successfully!")}).catch(e=>{console.error("Failed to copy text to clipboard:",e)});else{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.top="0",e.style.left="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")?console.log("Text copied to clipboard successfully!"):console.error("Failed to copy text to clipboard.")}catch(n){console.error("Failed to copy text to clipboard:",n)}document.body.removeChild(e)}}function N(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function z(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function E(t,e){const n=t.style.getPropertyValue(e);if(n){const o=n.toString();return o.startsWith("var")?E(t,o.slice(4,-1)):o}}function M(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(o=>{o instanceof CSSStyleRule&&o.selectorText===":root"&&t.forEach(s=>{const a=E(o,s);a&&(e[s]=a)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function j(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function k(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function V(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}function U(t,e){if(t){const o=t.content.cloneNode(!0).firstElementChild;return o&&(e==null||e(o)),o}return null}function F(t,e,n,o){let s,a=!1,b=0;const x=()=>{clearInterval(s),o!=null&&o.restartCounter&&(b=0),a&&(s=setInterval(()=>{n(b++)},e))},v=y.intersector.subscribe(t,P=>{a=P.isIntersecting,x()});return()=>{v(),clearInterval(s)}}exports.parseAttribute=h.parseAttribute;exports.parseAttributeValue=h.parseAttributeValue;exports.isBrowser=y.isBrowser;exports.contain=d.contain;exports.cover=d.cover;exports.fixPosition=d.fixPosition;exports.measureText=d.measureText;exports.getPointerPosition=g.getPointerPosition;exports.normalize=g.normalize;exports.screenToCartesian=g.screenToCartesian;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getAllParentElements=p.getAllParentElements;exports.getElement=p.getElement;exports.easeInCubic=r.easeInCubic;exports.easeInExpo=r.easeInExpo;exports.easeInOutCubic=r.easeInOutCubic;exports.easeInOutExpo=r.easeInOutExpo;exports.easeInOutQuad=r.easeInOutQuad;exports.easeInOutQuart=r.easeInOutQuart;exports.easeInOutQuint=r.easeInOutQuint;exports.easeInQuad=r.easeInQuad;exports.easeInQuart=r.easeInQuart;exports.easeInQuint=r.easeInQuint;exports.easeOutCubic=r.easeOutCubic;exports.easeOutExpo=r.easeOutExpo;exports.easeOutQuad=r.easeOutQuad;exports.easeOutQuart=r.easeOutQuart;exports.easeOutQuint=r.easeOutQuint;exports.linear=r.linear;exports.dispatchEvent=q.dispatchEvent;exports.createJSONAndSave=C.createJSONAndSave;exports.downloadURI=C.downloadURI;exports.debounce=I.debounce;exports.throttle=I.throttle;exports.setupDrag=w.setupDrag;exports.createStylesheet=O.createStylesheet;exports.styleToString=O.styleToString;exports.getCumulativeOffsetLeft=m.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=m.getCumulativeOffsetTop;exports.getCumulativePosition=m.getCumulativePosition;exports.getStickyOffset=m.getStickyOffset;exports.calculateDistance=i.calculateDistance;exports.calculateDistanceWithRadius=i.calculateDistanceWithRadius;exports.clamp=i.clamp;exports.damp=i.damp;exports.lerp=i.lerp;exports.mapRange=i.mapRange;exports.round=i.round;exports.smootherstep=i.smootherstep;exports.smoothstep=i.smoothstep;exports.step=i.step;exports.loopNumber=f.loopNumber;exports.preciseNumber=f.preciseNumber;exports.roundNumberTo=f.roundNumberTo;exports.toStep=f.toStep;exports.cloneDeep=l.cloneDeep;exports.compareObjects=l.compareObjects;exports.isESClass=l.isESClass;exports.isNullish=l.isNullish;exports.isObject=l.isObject;exports.mergeDeep=l.mergeDeep;exports.mixin=l.mixin;exports.omit=l.omit;exports.pick=l.pick;exports.nullishCoalescing=T.nullishCoalescing;exports.requestIdleCallback=T.requestIdleCallback;exports.scrollToElement=Q.scrollToElement;exports.camelToKebab=c.camelToKebab;exports.capitalize=c.capitalize;exports.declension=c.declension;exports.decodeHtmlEntities=c.decodeHtmlEntities;exports.generateId=c.generateId;exports.isUppercase=c.isUppercase;exports.kebabToCamel=c.kebabToCamel;exports.snakeToDotted=c.snakeToDotted;exports.toPascalCase=c.toPascalCase;exports.uncapitalize=c.uncapitalize;exports.getElementTransitionDurationMS=S.getElementTransitionDurationMS;exports.getElementTransitionDurationS=S.getElementTransitionDurationS;exports.changeHistory=u.changeHistory;exports.normalizeBase=u.normalizeBase;exports.parseSearchParameters=u.parseSearchParameters;exports.splitPath=u.splitPath;exports.updateSearchParameter=u.updateSearchParameter;exports.cloneTemplateContent=U;exports.copyTextToClipboard=R;exports.decode=k;exports.dotCircleCollision=z;exports.dotRectCollision=N;exports.encode=j;exports.formatBytes=A;exports.getRootVariables=M;exports.insert=B;exports.setIntervalOnIntersection=F;exports.shiftArray=D;exports.wait=V;
|
package/lib/utils/index.js
CHANGED
|
@@ -3,38 +3,38 @@ import { a as f } from "../index-euf5anj6.js";
|
|
|
3
3
|
import { i as A } from "../index-euf5anj6.js";
|
|
4
4
|
import { a as R, c as D, f as M, m as N } from "../canvas-DeZ0SLUJ.js";
|
|
5
5
|
import { g as F, n as V, s as j } from "../coordinates-CgdGoSYs.js";
|
|
6
|
-
import { b as U, f as q, a as $, g as
|
|
7
|
-
import { f as
|
|
6
|
+
import { b as U, f as q, a as $, g as H } from "../dom-CVWzyXPH.js";
|
|
7
|
+
import { f as W, p as G, h as J, a as L, d as Y, k as Z, o as X, b as _, i as ee, m as te, g as se, q as ae, c as oe, j as re, n as ne, l as ie } from "../easings-Bni3YAAW.js";
|
|
8
8
|
import { d as le } from "../events-CsVF98U6.js";
|
|
9
9
|
import { c as fe, d as pe } from "../file-GHShUlue.js";
|
|
10
10
|
import { d as me, t as xe } from "../function-C10DGppn.js";
|
|
11
11
|
import { s as be } from "../gestures-CcXV6fCp.js";
|
|
12
|
-
import { c as ye, s as Ce } from "../jss-
|
|
13
|
-
import { g as ve, a as Te, b as
|
|
12
|
+
import { c as ye, s as Ce } from "../jss-DtnXPEnq.js";
|
|
13
|
+
import { g as ve, a as Te, b as Ee, c as Se } from "../layout-DpZo-I0y.js";
|
|
14
14
|
import { e as Oe, f as Pe, c as Be, d as Ae, l as Qe, m as Re, r as De, b as Me, a as Ne, s as ze } from "../math-BOBiC4TN.js";
|
|
15
15
|
import { l as Ve, p as je, r as ke, t as Ue } from "../number-DwCxt_Ck.js";
|
|
16
|
-
import { c as $e, d as
|
|
16
|
+
import { c as $e, d as He, i as Ke, b as We, a as Ge, m as Je, e as Le, o as Ye, p as Ze } from "../object-D6MVWB4l.js";
|
|
17
17
|
import { n as _e, r as et } from "../polyfills-DJrTJQky.js";
|
|
18
|
-
import { s as
|
|
19
|
-
import { c as ot, a as rt,
|
|
20
|
-
import { g as
|
|
21
|
-
import { c as
|
|
22
|
-
function d(t, e, ...
|
|
23
|
-
return [...t.slice(0, e), ...
|
|
18
|
+
import { s as st } from "../scroll-myLAt-Tq.js";
|
|
19
|
+
import { c as ot, a as rt, b as nt, d as it, g as ct, i as lt, k as ut, s as ft, t as pt, u as dt } from "../string-BlMQbe8b.js";
|
|
20
|
+
import { g as xt, a as gt } from "../style-j2TwriJ_.js";
|
|
21
|
+
import { c as ht, n as yt, p as Ct, s as It, u as vt } from "../url-CfcHdBT6.js";
|
|
22
|
+
function d(t, e, ...s) {
|
|
23
|
+
return [...t.slice(0, e), ...s, ...t.slice(e)];
|
|
24
24
|
}
|
|
25
25
|
function m(t, e) {
|
|
26
|
-
const
|
|
27
|
-
e = e %
|
|
28
|
-
const
|
|
29
|
-
for (let o = 0; o <
|
|
30
|
-
const r = (o + e) %
|
|
31
|
-
|
|
26
|
+
const s = t.length;
|
|
27
|
+
e = e % s;
|
|
28
|
+
const a = new Array(s);
|
|
29
|
+
for (let o = 0; o < s; o++) {
|
|
30
|
+
const r = (o + e) % s;
|
|
31
|
+
a[r] = t[o];
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return a;
|
|
34
34
|
}
|
|
35
35
|
function x(t, e = 2) {
|
|
36
36
|
if (!+t) return "0 Bytes";
|
|
37
|
-
const
|
|
37
|
+
const s = 1024, a = e < 0 ? 0 : e, o = [
|
|
38
38
|
"Bytes",
|
|
39
39
|
"KiB",
|
|
40
40
|
"MiB",
|
|
@@ -44,8 +44,8 @@ function x(t, e = 2) {
|
|
|
44
44
|
"EiB",
|
|
45
45
|
"ZiB",
|
|
46
46
|
"YiB"
|
|
47
|
-
], r = Math.floor(Math.log(t) / Math.log(
|
|
48
|
-
return `${parseFloat((t / Math.pow(
|
|
47
|
+
], r = Math.floor(Math.log(t) / Math.log(s));
|
|
48
|
+
return `${parseFloat((t / Math.pow(s, r)).toFixed(a))} ${o[r]}`;
|
|
49
49
|
}
|
|
50
50
|
function g(t) {
|
|
51
51
|
if (navigator.clipboard)
|
|
@@ -59,8 +59,8 @@ function g(t) {
|
|
|
59
59
|
e.value = t, e.style.position = "fixed", e.style.top = "0", e.style.left = "0", document.body.appendChild(e), e.select();
|
|
60
60
|
try {
|
|
61
61
|
document.execCommand("copy") ? console.log("Text copied to clipboard successfully!") : console.error("Failed to copy text to clipboard.");
|
|
62
|
-
} catch (
|
|
63
|
-
console.error("Failed to copy text to clipboard:",
|
|
62
|
+
} catch (s) {
|
|
63
|
+
console.error("Failed to copy text to clipboard:", s);
|
|
64
64
|
}
|
|
65
65
|
document.body.removeChild(e);
|
|
66
66
|
}
|
|
@@ -72,23 +72,23 @@ function h(t, e) {
|
|
|
72
72
|
return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2) < e.radius;
|
|
73
73
|
}
|
|
74
74
|
function i(t, e) {
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
return
|
|
75
|
+
const s = t.style.getPropertyValue(e);
|
|
76
|
+
if (s) {
|
|
77
|
+
const a = s.toString();
|
|
78
|
+
return a.startsWith("var") ? i(t, a.slice(4, -1)) : a;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
function y(...t) {
|
|
82
82
|
const e = {};
|
|
83
|
-
return Array.from(document.styleSheets).forEach((
|
|
84
|
-
Array.from(
|
|
85
|
-
|
|
86
|
-
const r = i(
|
|
83
|
+
return Array.from(document.styleSheets).forEach((s) => {
|
|
84
|
+
Array.from(s.cssRules).forEach((a) => {
|
|
85
|
+
a instanceof CSSStyleRule && a.selectorText === ":root" && t.forEach((o) => {
|
|
86
|
+
const r = i(a, o);
|
|
87
87
|
r && (e[o] = r);
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
|
-
}), t.forEach((
|
|
91
|
-
e[
|
|
90
|
+
}), t.forEach((s) => {
|
|
91
|
+
e[s] || console.warn(`variable named ${s} not found`);
|
|
92
92
|
}), e;
|
|
93
93
|
}
|
|
94
94
|
function C(t) {
|
|
@@ -108,16 +108,16 @@ function v(t) {
|
|
|
108
108
|
}
|
|
109
109
|
function T(t, e) {
|
|
110
110
|
if (t) {
|
|
111
|
-
const
|
|
112
|
-
return
|
|
111
|
+
const a = t.content.cloneNode(!0).firstElementChild;
|
|
112
|
+
return a && (e == null || e(a)), a;
|
|
113
113
|
}
|
|
114
114
|
return null;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function E(t, e, s, a) {
|
|
117
117
|
let o, r = !1, n = 0;
|
|
118
118
|
const c = () => {
|
|
119
|
-
clearInterval(o),
|
|
120
|
-
|
|
119
|
+
clearInterval(o), a != null && a.restartCounter && (n = 0), r && (o = setInterval(() => {
|
|
120
|
+
s(n++);
|
|
121
121
|
}, e));
|
|
122
122
|
}, l = f.subscribe(t, (u) => {
|
|
123
123
|
r = u.isIntersecting, c();
|
|
@@ -131,11 +131,11 @@ export {
|
|
|
131
131
|
Pe as calculateDistanceWithRadius,
|
|
132
132
|
ot as camelToKebab,
|
|
133
133
|
rt as capitalize,
|
|
134
|
-
|
|
134
|
+
ht as changeHistory,
|
|
135
135
|
Be as clamp,
|
|
136
136
|
$e as cloneDeep,
|
|
137
137
|
T as cloneTemplateContent,
|
|
138
|
-
|
|
138
|
+
He as compareObjects,
|
|
139
139
|
R as contain,
|
|
140
140
|
g as copyTextToClipboard,
|
|
141
141
|
D as cover,
|
|
@@ -143,13 +143,15 @@ export {
|
|
|
143
143
|
ye as createStylesheet,
|
|
144
144
|
Ae as damp,
|
|
145
145
|
me as debounce,
|
|
146
|
+
nt as declension,
|
|
146
147
|
I as decode,
|
|
148
|
+
it as decodeHtmlEntities,
|
|
147
149
|
le as dispatchEvent,
|
|
148
150
|
h as dotCircleCollision,
|
|
149
151
|
b as dotRectCollision,
|
|
150
152
|
pe as downloadURI,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
+
W as easeInCubic,
|
|
154
|
+
G as easeInExpo,
|
|
153
155
|
J as easeInOutCubic,
|
|
154
156
|
L as easeInOutExpo,
|
|
155
157
|
Y as easeInOutQuad,
|
|
@@ -158,8 +160,8 @@ export {
|
|
|
158
160
|
_ as easeInQuad,
|
|
159
161
|
ee as easeInQuart,
|
|
160
162
|
te as easeInQuint,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
se as easeOutCubic,
|
|
164
|
+
ae as easeOutExpo,
|
|
163
165
|
oe as easeOutQuad,
|
|
164
166
|
re as easeOutQuart,
|
|
165
167
|
ne as easeOutQuint,
|
|
@@ -168,24 +170,24 @@ export {
|
|
|
168
170
|
q as findScrollParentElement,
|
|
169
171
|
M as fixPosition,
|
|
170
172
|
x as formatBytes,
|
|
171
|
-
|
|
173
|
+
ct as generateId,
|
|
172
174
|
$ as getAllParentElements,
|
|
173
175
|
ve as getCumulativeOffsetLeft,
|
|
174
176
|
Te as getCumulativeOffsetTop,
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
Ee as getCumulativePosition,
|
|
178
|
+
H as getElement,
|
|
179
|
+
xt as getElementTransitionDurationMS,
|
|
180
|
+
gt as getElementTransitionDurationS,
|
|
179
181
|
F as getPointerPosition,
|
|
180
182
|
y as getRootVariables,
|
|
181
|
-
|
|
183
|
+
Se as getStickyOffset,
|
|
182
184
|
d as insert,
|
|
183
185
|
A as isBrowser,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
Ke as isESClass,
|
|
187
|
+
We as isNullish,
|
|
188
|
+
Ge as isObject,
|
|
189
|
+
lt as isUppercase,
|
|
190
|
+
ut as kebabToCamel,
|
|
189
191
|
Qe as lerp,
|
|
190
192
|
ie as linear,
|
|
191
193
|
Ve as loopNumber,
|
|
@@ -194,32 +196,32 @@ export {
|
|
|
194
196
|
Je as mergeDeep,
|
|
195
197
|
Le as mixin,
|
|
196
198
|
V as normalize,
|
|
197
|
-
|
|
199
|
+
yt as normalizeBase,
|
|
198
200
|
_e as nullishCoalescing,
|
|
199
201
|
Ye as omit,
|
|
200
202
|
O as parseAttribute,
|
|
201
203
|
P as parseAttributeValue,
|
|
202
|
-
|
|
204
|
+
Ct as parseSearchParameters,
|
|
203
205
|
Ze as pick,
|
|
204
206
|
je as preciseNumber,
|
|
205
207
|
et as requestIdleCallback,
|
|
206
208
|
De as round,
|
|
207
209
|
ke as roundNumberTo,
|
|
208
210
|
j as screenToCartesian,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
+
st as scrollToElement,
|
|
212
|
+
E as setIntervalOnIntersection,
|
|
211
213
|
be as setupDrag,
|
|
212
214
|
m as shiftArray,
|
|
213
215
|
Me as smootherstep,
|
|
214
216
|
Ne as smoothstep,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
+
ft as snakeToDotted,
|
|
218
|
+
It as splitPath,
|
|
217
219
|
ze as step,
|
|
218
220
|
Ce as styleToString,
|
|
219
221
|
xe as throttle,
|
|
220
|
-
|
|
222
|
+
pt as toPascalCase,
|
|
221
223
|
Ue as toStep,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
+
dt as uncapitalize,
|
|
225
|
+
vt as updateSearchParameter,
|
|
224
226
|
v as wait
|
|
225
227
|
};
|
package/lib/utils/string.d.ts
CHANGED
|
@@ -6,3 +6,5 @@ export declare function capitalize(string: string, everyWord?: boolean): string;
|
|
|
6
6
|
export declare function uncapitalize(string: string, everyWord?: boolean): string;
|
|
7
7
|
export declare function generateId(length: number, characters?: string): string;
|
|
8
8
|
export declare function isUppercase(string: string): boolean;
|
|
9
|
+
export declare function decodeHtmlEntities(html: string): string;
|
|
10
|
+
export declare function declension(number: number | string, one: string, few: string, many: string): string;
|
package/lib/youtube/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var v=s=>{throw TypeError(s)};var E=(s,r,t)=>r.has(s)||v("Cannot "+t);var e=(s,r,t)=>(E(s,r,"read from private field"),t?t.call(s):r.get(s)),o=(s,r,t)=>r.has(s)?v("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),u=(s,r,t,a)=>(E(s,r,"write to private field"),a?a.call(s,t):r.set(s,t),t),w=(s,r,t)=>(E(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-DRp_K37w.cjs");const L=require("../index-Cqw2NKev.cjs"),T=require("../events-KVanG9sR.cjs"),_=require("../string-
|
|
1
|
+
"use strict";var v=s=>{throw TypeError(s)};var E=(s,r,t)=>r.has(s)||v("Cannot "+t);var e=(s,r,t)=>(E(s,r,"read from private field"),t?t.call(s):r.get(s)),o=(s,r,t)=>r.has(s)?v("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),u=(s,r,t,a)=>(E(s,r,"write to private field"),a?a.call(s,t):r.set(s,t),t),w=(s,r,t)=>(E(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-DRp_K37w.cjs");const L=require("../index-Cqw2NKev.cjs"),T=require("../events-KVanG9sR.cjs"),_=require("../string-DUXXtU8v.cjs");var i,c,n,y,l,f,b,R,p,I;const d=class d extends A.SourceElement{constructor(){super();o(this,p);o(this,i);o(this,c);o(this,n,!1);o(this,y,!1);o(this,l,()=>{u(this,n,e(this,n)||this.hasAttribute("autoplay")&&!this.hasAttribute("capture-autoplay")),u(this,i,new window.YT.Player(e(this,c),{playerVars:{mute:this.hasAttribute("muted")?1:0,controls:this.hasAttribute("controls")?1:0},events:{onReady:e(this,f),onError:e(this,b),onStateChange:e(this,R)}}))});o(this,f,()=>{u(this,y,!0),w(this,p,I).call(this)});o(this,b,t=>{var a,h;console.error("YouTube: Ошибка при загрузке видео:",this.currentURL,t),(h=(a=this.consumerElement).onerror)==null||h.call(a,new Event("error"))});o(this,R,()=>{});u(this,c,"yt-"+_.generateId(10)),d.__apiReady||(window.onYouTubeIframeAPIReady=()=>{d.__apiReady=!0,T.dispatchEvent(window,"youTubeIframeAPIReady")}),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&(e(this,y)?e(this,i).playVideo():u(this,n,!0))}),this.addEventListener("sourceRelease",()=>{e(this,i)&&this.hasAttribute("capture-autoplay")&&(e(this,i).pauseVideo(),this.hasAttribute("replay")&&e(this,i).seekTo(0))})}static __onYouTubeIframeAPIReady(){this.__apiReady=!0}createConsumer(){const t=document.createElement("div");return t.id=e(this,c),t}consumeSource(t){var a;if(t){if(!document.getElementById("youtube-script")){const h=document.createElement("script");h.id,h.src="https://www.youtube.com/iframe_api";const g=document.getElementsByTagName("script")[0];(a=g.parentNode)==null||a.insertBefore(h,g)}e(this,i)?w(this,p,I).call(this):d.__apiReady?e(this,l).call(this):addEventListener("youTubeIframeAPIReady",e(this,l))}else e(this,i)&&e(this,i).stopVideo()}disconnectedCallback(){super.disconnectedCallback(),e(this,i)&&e(this,i).destroy(),removeEventListener("youTubeIframeAPIReady",e(this,l))}};i=new WeakMap,c=new WeakMap,n=new WeakMap,y=new WeakMap,l=new WeakMap,f=new WeakMap,b=new WeakMap,R=new WeakMap,p=new WeakSet,I=function(){var t,a;this.currentURL&&(this.currentURL.startsWith("http")?e(this,i).loadVideoByUrl(this.currentURL):e(this,i).loadVideoById(this.currentURL)),e(this,n)?e(this,i).playVideo():e(this,i).stopVideo(),u(this,n,!1),(a=(t=this.consumerElement).onload)==null||a.call(t,new Event("load"))},d.__apiReady=!1;let m=d;L.isBrowser&&!customElements.get("e-youtube")&&customElements.define("e-youtube",m);exports.YouTubeElement=m;
|
package/lib/youtube/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import "../window-resizer/index.js";
|
|
|
8
8
|
import "../Store-D2xCXENW.js";
|
|
9
9
|
import { i as v } from "../index-euf5anj6.js";
|
|
10
10
|
import { d as T } from "../events-CsVF98U6.js";
|
|
11
|
-
import { g as V } from "../string-
|
|
11
|
+
import { g as V } from "../string-BlMQbe8b.js";
|
|
12
12
|
var i, c, n, p, l, m, f, R, y, I;
|
|
13
13
|
const d = class d extends g {
|
|
14
14
|
constructor() {
|
package/package.json
CHANGED
package/lib/string-DhgS_iFl.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function u(e,t=!1){let a="";return e.split("-").forEach((n,i)=>{if(i===0&&!t)a+=n;else{const r=n[0],s=n.slice(1),l=r.toUpperCase()+s;a+=l}}),a}function p(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function f(e){return e.split("_").join(".")}function d(e){return/^[a-z\d]+$/i.test(e)?e.charAt(0).toUpperCase()+e.slice(1):e.replace(/([a-z\d])([a-z\d]*)/gi,(t,a,n)=>a.toUpperCase()+n.toLowerCase()).replace(/[^a-z\d]/gi,"")}function o(e,t){return e.slice(0,1)[t]()+e.slice(1)}function c(e,t=!1,a){return t?e.split(" ").map(n=>o(n,a)).join(" "):o(e,a)}function z(e,t=!1){return c(e,t,"toUpperCase")}function C(e,t=!1){return c(e,t,"toLowerCase")}function b(e,t="abcdefghijklmnopqrstuvwxyz0123456789"){const a=t.length,n=crypto.getRandomValues(new Uint8Array(e));let i="";for(let r=0;r<e;r++)i+=t.charAt(n[r]%a);return i}function g(e){return new RegExp("^\\p{Lu}","u").test(e)}exports.camelToKebab=p;exports.capitalize=z;exports.generateId=b;exports.isUppercase=g;exports.kebabToCamel=u;exports.snakeToDotted=f;exports.toPascalCase=d;exports.uncapitalize=C;
|
package/lib/string-f0Dnk0L1.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
function u(e, t = !1) {
|
|
2
|
-
let a = "";
|
|
3
|
-
return e.split("-").forEach((n, s) => {
|
|
4
|
-
if (s === 0 && !t)
|
|
5
|
-
a += n;
|
|
6
|
-
else {
|
|
7
|
-
const r = n[0], c = n.slice(1), l = r.toUpperCase() + c;
|
|
8
|
-
a += l;
|
|
9
|
-
}
|
|
10
|
-
}), a;
|
|
11
|
-
}
|
|
12
|
-
function f(e) {
|
|
13
|
-
return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
14
|
-
}
|
|
15
|
-
function p(e) {
|
|
16
|
-
return e.split("_").join(".");
|
|
17
|
-
}
|
|
18
|
-
function d(e) {
|
|
19
|
-
return /^[a-z\d]+$/i.test(e) ? e.charAt(0).toUpperCase() + e.slice(1) : e.replace(
|
|
20
|
-
/([a-z\d])([a-z\d]*)/gi,
|
|
21
|
-
(t, a, n) => a.toUpperCase() + n.toLowerCase()
|
|
22
|
-
).replace(/[^a-z\d]/gi, "");
|
|
23
|
-
}
|
|
24
|
-
function i(e, t) {
|
|
25
|
-
return e.slice(0, 1)[t]() + e.slice(1);
|
|
26
|
-
}
|
|
27
|
-
function o(e, t = !1, a) {
|
|
28
|
-
return t ? e.split(" ").map((n) => i(n, a)).join(" ") : i(e, a);
|
|
29
|
-
}
|
|
30
|
-
function z(e, t = !1) {
|
|
31
|
-
return o(e, t, "toUpperCase");
|
|
32
|
-
}
|
|
33
|
-
function C(e, t = !1) {
|
|
34
|
-
return o(e, t, "toLowerCase");
|
|
35
|
-
}
|
|
36
|
-
function g(e, t = "abcdefghijklmnopqrstuvwxyz0123456789") {
|
|
37
|
-
const a = t.length, n = crypto.getRandomValues(new Uint8Array(e));
|
|
38
|
-
let s = "";
|
|
39
|
-
for (let r = 0; r < e; r++)
|
|
40
|
-
s += t.charAt(n[r] % a);
|
|
41
|
-
return s;
|
|
42
|
-
}
|
|
43
|
-
function y(e) {
|
|
44
|
-
return new RegExp("^\\p{Lu}", "u").test(e);
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
z as a,
|
|
48
|
-
f as c,
|
|
49
|
-
g,
|
|
50
|
-
y as i,
|
|
51
|
-
u as k,
|
|
52
|
-
p as s,
|
|
53
|
-
d as t,
|
|
54
|
-
C as u
|
|
55
|
-
};
|