aptechka 0.5.44 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Animation-6Na1MCtM.cjs +1 -0
- package/lib/Animation-CELiTw3n.js +132 -0
- package/lib/Composed-DmLYTh1b.js +35 -0
- package/lib/Composed-Dx2hs-va.cjs +1 -0
- package/lib/{Damped-P4MkCGoY.js → Damped-Mx_FNNVz.js} +2 -5
- package/lib/Damped-loFiBsBy.cjs +1 -0
- package/lib/{Derived-kPJs5JC5.js → Derived-DlCvc0xQ.js} +1 -1
- package/lib/{Derived-B-g8dYgh.cjs → Derived-a6MDQEPY.cjs} +1 -1
- package/lib/ElementConstructor-CAZ2ra8m.cjs +1 -0
- package/lib/ElementConstructor-OYlPJf2L.js +366 -0
- package/lib/Resource-D3TQormz.cjs +1 -0
- package/lib/Resource-DIcoALGo.js +64 -0
- package/lib/{SourceManager-Q-PB-Rkh.js → SourceManager-Bz329f90.js} +1 -1
- package/lib/{SourceManager-vSlsMKUE.cjs → SourceManager-kxr5eUyL.cjs} +1 -1
- package/lib/Store-6s0YXK4o.cjs +1 -0
- package/lib/{Store-BQXXikps.js → Store-BI2xxXOA.js} +42 -42
- package/lib/Tweened-B_mclQ61.cjs +1 -0
- package/lib/Tweened-NE8M9onF.js +48 -0
- package/lib/{Viewport-DMB0dO-s.cjs → Viewport-CJeKnL5V.cjs} +1 -1
- package/lib/{Viewport-CFFhFKqX.js → Viewport-D9IL7kUQ.js} +1 -1
- package/lib/_createStore-Cf1MyeHa.cjs +1 -0
- package/lib/_createStore-Ck9bHolX.js +12 -0
- package/lib/accordion/AccordionElement.d.ts +3 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +140 -104
- package/lib/animation/Animation.d.ts +10 -18
- package/lib/animation/Damped.d.ts +3 -5
- package/lib/animation/Tweened.d.ts +0 -2
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +31 -31
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +3 -3
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +3 -3
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +3 -3
- package/lib/counter/index.d.ts +8 -0
- package/lib/{createStylesheet-DBCEbDjI.js → createStylesheet-CR_yi5tp.js} +1 -1
- package/lib/{createStylesheet-CqHU9_qv.cjs → createStylesheet-p23sZ7Ey.cjs} +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.d.ts +1 -0
- package/lib/css-property/index.js +36 -32
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +114 -113
- package/lib/en3/core/En3Raycaster.d.ts +20 -0
- package/lib/en3/core/En3View.d.ts +1 -1
- package/lib/en3/core/en3.d.ts +5 -1
- package/lib/en3/helpers/En3Controls.d.ts +5 -0
- package/lib/en3/helpers/En3GridHelper.d.ts +8 -0
- package/lib/en3/helpers/En3Object3dManager.d.ts +12 -0
- package/lib/en3/helpers/En3OrbitControls.d.ts +8 -0
- package/lib/en3/helpers/En3TransformControls.d.ts +8 -0
- package/lib/en3/helpers/index.cjs +1 -0
- package/lib/en3/helpers/index.d.ts +2 -0
- package/lib/en3/helpers/index.js +1165 -0
- package/lib/en3/index.cjs +1 -213
- package/lib/en3/index.d.ts +1 -19
- package/lib/en3/index.js +4 -3305
- package/lib/en3/libs/index.d.ts +1 -0
- package/lib/en3/loaders/{en3GLTFLoader.d.ts → _En3GLTFLoader.d.ts} +2 -4
- package/lib/en3/loaders/_En3TextureLoader.d.ts +8 -0
- package/lib/en3/loaders/index.cjs +1 -0
- package/lib/en3/loaders/index.d.ts +3 -0
- package/lib/en3/loaders/index.js +1757 -0
- package/lib/en3/loaders/loaders.d.ts +13 -0
- package/lib/en3/misc/index.cjs +10 -0
- package/lib/en3/misc/index.d.ts +2 -0
- package/lib/en3/misc/index.js +115 -0
- package/lib/en3/objects/En3Clip.d.ts +1 -1
- package/lib/en3/objects/En3GLTF.d.ts +2 -1
- package/lib/en3/objects/En3ImageLike.d.ts +2 -1
- package/lib/en3/objects/En3SourceConsumer.d.ts +1 -1
- package/lib/en3/objects/fluid/index.d.ts +0 -3
- package/lib/en3/objects/index.d.ts +7 -0
- package/lib/en3/utils/index.cjs +1 -0
- package/lib/en3/utils/index.d.ts +5 -0
- package/lib/en3/utils/index.js +43 -0
- package/lib/en3-C4mzaF6q.cjs +8 -0
- package/lib/en3-hbkN1OPu.js +343 -0
- package/lib/globals-DMjysUXI.js +8 -0
- package/lib/globals-bYKki-b9.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/{index-BN9X-l9M.js → index-BAH_fO2N.js} +3 -3
- package/lib/{index-BbgmbQ-5.cjs → index-D1LQUR-R.cjs} +1 -1
- package/lib/instantiate-D19Uvc31.js +125 -0
- package/lib/instantiate-Db5gGSYG.cjs +1 -0
- package/lib/jsx/ComponentElement.d.ts +18 -0
- package/lib/jsx/globals.d.ts +13 -0
- package/lib/jsx/h.d.ts +7 -0
- package/lib/jsx/hooks/basic/_createStore.d.ts +4 -0
- package/lib/jsx/hooks/basic/attachInternals.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachShadow.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachStylesheet.d.ts +3 -0
- package/lib/jsx/hooks/basic/createContext.d.ts +2 -0
- package/lib/jsx/hooks/basic/onConnect.d.ts +3 -0
- package/lib/jsx/hooks/basic/onDisconnect.d.ts +3 -0
- package/lib/jsx/hooks/onAnimationFrame.cjs +1 -0
- package/lib/jsx/hooks/onAnimationFrame.d.ts +6 -0
- package/lib/jsx/hooks/onAnimationFrame.js +22 -0
- package/lib/jsx/hooks/onElementResize.cjs +1 -0
- package/lib/jsx/hooks/onElementResize.d.ts +5 -0
- package/lib/jsx/hooks/onElementResize.js +11 -0
- package/lib/jsx/hooks/onIntersection.cjs +1 -0
- package/lib/jsx/hooks/onIntersection.d.ts +5 -0
- package/lib/jsx/hooks/onIntersection.js +11 -0
- package/lib/jsx/hooks/onWindowResize.cjs +1 -0
- package/lib/jsx/hooks/onWindowResize.d.ts +3 -0
- package/lib/jsx/hooks/onWindowResize.js +8 -0
- package/lib/jsx/hooks/store/createArrayStore.d.ts +3 -0
- package/lib/jsx/hooks/store/createComposed.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerived.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedArray.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedComponent.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedComponents.d.ts +3 -0
- package/lib/jsx/hooks/store/createResource.d.ts +3 -0
- package/lib/jsx/hooks/store/createStore.d.ts +3 -0
- package/lib/jsx/hooks/store/index.cjs +1 -0
- package/lib/jsx/hooks/store/index.d.ts +7 -0
- package/lib/jsx/hooks/store/index.js +49 -0
- package/lib/jsx/hooks/watchAttribute.cjs +1 -0
- package/lib/jsx/hooks/watchAttribute.d.ts +6 -0
- package/lib/jsx/hooks/watchAttribute.js +17 -0
- package/lib/jsx/hooks/watchCSSProperty.cjs +1 -0
- package/lib/jsx/hooks/watchCSSProperty.d.ts +7 -0
- package/lib/jsx/hooks/watchCSSProperty.js +17 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +13 -0
- package/lib/jsx/index.js +91 -0
- package/lib/jsx/instantiate.d.ts +5 -0
- package/lib/jsx/register.d.ts +1 -0
- package/lib/jsx/render.d.ts +6 -0
- package/lib/jsx/type.d.ts +188 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.d.ts +2 -0
- package/lib/ladder/index.js +84 -66
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +9 -0
- package/lib/layout-box/index.js +190 -164
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +7 -7
- package/lib/morph/Morph.d.ts +2 -2
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.d.ts +1 -1
- package/lib/morph/index.js +135 -143
- package/lib/notifier/index.d.ts +2 -2
- package/lib/notifier/index.js +3 -1
- package/lib/onConnect-DGP866cj.cjs +1 -0
- package/lib/onConnect-y5DrxJ9P.js +7 -0
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +2 -2
- package/lib/polyfills-CM4SCDTt.cjs +1 -0
- package/lib/polyfills-X6KXuHg-.js +33 -0
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/router/Router.d.ts +11 -3
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.d.ts +1 -1
- package/lib/router/index.js +185 -165
- package/lib/scroll/ScrollElement.d.ts +2 -19
- package/lib/scroll/ScrollSection.d.ts +23 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +81 -77
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/ArrayStore.d.ts +21 -0
- package/lib/store/Store.d.ts +1 -7
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -2
- package/lib/store/index.js +65 -139
- package/lib/tags-BqJKcIve.js +485 -0
- package/lib/tags-ld5jemJw.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/tweaker/TweakerBooleanManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerColorManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerFolderElement.d.ts +2 -0
- package/lib/tweaker/TweakerLinkManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerNumberManagerElement.d.ts +4 -8
- package/lib/tweaker/TweakerSelectManagerElement.d.ts +1 -1
- package/lib/tweaker/TweakerStoreManagerElement.d.ts +7 -7
- package/lib/tweaker/TweakerStringManagerElement.d.ts +3 -5
- package/lib/tweaker/index.cjs +3 -3
- package/lib/tweaker/index.js +535 -412
- package/lib/tweaker/tweakerManagerConstructors.d.ts +2 -2
- package/lib/tweaker/tweakerStorage.d.ts +8 -1
- package/lib/url-C3dWnJQg.cjs +1 -0
- package/lib/url-DMNfW7uN.js +22 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +39 -34
- package/lib/utils/number.d.ts +1 -0
- package/lib/utils/url.d.ts +9 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +1 -1
- package/package.json +107 -3
- package/lib/Animation-DDHjrbtL.cjs +0 -1
- package/lib/Animation-Dq_05jlR.js +0 -217
- package/lib/DRACOLoader-C2CFpMGS.cjs +0 -2
- package/lib/DRACOLoader-D2KY2dku.js +0 -241
- package/lib/Damped-l0mnlhar.cjs +0 -1
- package/lib/KTX2Loader-DdUl1XiY.cjs +0 -2
- package/lib/KTX2Loader-DqpAffDj.js +0 -536
- package/lib/Store-C-1ruEIm.cjs +0 -1
- package/lib/Tweened-CwDC2zl8.js +0 -51
- package/lib/Tweened-DIt9j9B-.cjs +0 -1
- package/lib/animation/AnimationLink.d.ts +0 -13
- package/lib/en3/loaders/en3TextureLoader.d.ts +0 -3
- package/lib/en3/test/En3HTML.d.ts +0 -10
- package/lib/polyfills-BA-CL_HF.js +0 -27
- package/lib/polyfills-DHs2SNbz.cjs +0 -1
- package/lib/store/CumulativeResource.d.ts +0 -13
- package/lib/tags-CMPg9ETZ.js +0 -848
- package/lib/tags-Djb6mb1o.cjs +0 -1
- package/lib/tweaker/TweakerRangeManagerElement.d.ts +0 -11
- /package/lib/en3/{loaders → core}/en3Cache.d.ts +0 -0
- /package/lib/{MeshoptDecoder-CMeN3oU0.cjs → en3/libs/index.cjs} +0 -0
- /package/lib/{MeshoptDecoder-6XfTpOG2.js → en3/libs/index.js} +0 -0
- /package/lib/en3/{test → misc}/En3ModifiedMaterial.d.ts +0 -0
- /package/lib/en3/{attachments → misc}/En3SourceManager.d.ts +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var w = (s, t, e) => {
|
|
2
|
+
if (!t.has(s))
|
|
3
|
+
throw TypeError("Cannot " + e);
|
|
4
|
+
};
|
|
5
|
+
var r = (s, t, e) => (w(s, t, "read from private field"), e ? e.call(s) : t.get(s)), a = (s, t, e) => {
|
|
6
|
+
if (t.has(s))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
9
|
+
}, f = (s, t, e, c) => (w(s, t, "write to private field"), c ? c.call(s, e) : t.set(s, e), e);
|
|
10
|
+
import { S as g } from "./Store-BI2xxXOA.js";
|
|
11
|
+
var d, h;
|
|
12
|
+
class E extends g {
|
|
13
|
+
constructor(e, c, n) {
|
|
14
|
+
super(null, n);
|
|
15
|
+
a(this, d, void 0);
|
|
16
|
+
a(this, h, /* @__PURE__ */ new Map());
|
|
17
|
+
f(this, d, e.subscribe((p) => {
|
|
18
|
+
const x = [];
|
|
19
|
+
p.current.forEach((u, b) => {
|
|
20
|
+
var m;
|
|
21
|
+
if ((m = p.previous) != null && m.includes(u) && r(this, h).has(u))
|
|
22
|
+
x.push(r(this, h).get(u));
|
|
23
|
+
else {
|
|
24
|
+
const R = c(u, b);
|
|
25
|
+
r(this, h).set(u, R), x.push(R);
|
|
26
|
+
}
|
|
27
|
+
}), r(this, h).forEach((u, b) => {
|
|
28
|
+
p.current.includes(b) || r(this, h).delete(b);
|
|
29
|
+
}), this.current = x;
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
close() {
|
|
33
|
+
super.close(), r(this, d).call(this);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
d = new WeakMap(), h = new WeakMap();
|
|
37
|
+
var o, i, l;
|
|
38
|
+
class I extends g {
|
|
39
|
+
constructor(e, c, n) {
|
|
40
|
+
super(e, n);
|
|
41
|
+
a(this, o, void 0);
|
|
42
|
+
a(this, i, void 0);
|
|
43
|
+
a(this, l, 0);
|
|
44
|
+
f(this, i, new g(!1)), f(this, o, c), n != null && n.manualControl || this.refetch();
|
|
45
|
+
}
|
|
46
|
+
get isPending() {
|
|
47
|
+
return r(this, i);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Calls fetcher again and sets isPending to true.
|
|
51
|
+
*/
|
|
52
|
+
refetch() {
|
|
53
|
+
r(this, i).current = !0, f(this, l, r(this, l) + 1);
|
|
54
|
+
const e = r(this, l);
|
|
55
|
+
r(this, o).call(this).then((c) => {
|
|
56
|
+
e === r(this, l) && (r(this, i).current = !1, this.current = c);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
o = new WeakMap(), i = new WeakMap(), l = new WeakMap();
|
|
61
|
+
export {
|
|
62
|
+
E as D,
|
|
63
|
+
I as R
|
|
64
|
+
};
|
|
@@ -9,7 +9,7 @@ var r = (a, e, t) => ($(a, e, "read from private field"), t ? t.call(a) : e.get(
|
|
|
9
9
|
}, i = (a, e, t, n) => ($(a, e, "write to private field"), n ? n.call(a, t) : e.set(a, t), t);
|
|
10
10
|
import { RESIZE_ORDER as A } from "./order/index.js";
|
|
11
11
|
import { windowResizer as k } from "./window-resizer/index.js";
|
|
12
|
-
import { S as B } from "./Store-
|
|
12
|
+
import { S as B } from "./Store-BI2xxXOA.js";
|
|
13
13
|
var y, g, q, u, c, d, w;
|
|
14
14
|
class T {
|
|
15
15
|
constructor(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var b=(c,e,t)=>{if(!e.has(c))throw TypeError("Cannot "+t)};var r=(c,e,t)=>(b(c,e,"read from private field"),t?t.call(c):e.get(c)),o=(c,e,t)=>{if(e.has(c))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(c):e.set(c,t)},i=(c,e,t,n)=>(b(c,e,"write to private field"),n?n.call(c,t):e.set(c,t),t);const B=require("./order/index.cjs"),k=require("./window-resizer/index.cjs"),T=require("./Store-
|
|
1
|
+
"use strict";var b=(c,e,t)=>{if(!e.has(c))throw TypeError("Cannot "+t)};var r=(c,e,t)=>(b(c,e,"read from private field"),t?t.call(c):e.get(c)),o=(c,e,t)=>{if(e.has(c))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(c):e.set(c,t)},i=(c,e,t,n)=>(b(c,e,"write to private field"),n?n.call(c,t):e.set(c,t),t);const B=require("./order/index.cjs"),k=require("./window-resizer/index.cjs"),T=require("./Store-6s0YXK4o.cjs");var y,g,q,m,a,d,w;class z{constructor(e){o(this,y,void 0);o(this,g,void 0);o(this,q,void 0);o(this,m,void 0);o(this,a,void 0);o(this,d,void 0);o(this,w,void 0);i(this,y,e);const t=e.indexOf("?");t>=0&&(e=e.slice(0,t));const n=e.split(".");i(this,g,n[0]);const x=/\d+x/g,h=n.find(u=>u.match(x));i(this,q,h?parseInt(h):1);const f=/\d+max/g,M=/\d+min/g,s=/\d+mar/g,l=/\d+mir/g,S=n.find(u=>u.match(f)),I=n.find(u=>u.match(M)),V=n.find(u=>u.match(s)),$=n.find(u=>u.match(l));V?(i(this,a,parseInt(V)),i(this,d,"max"),i(this,m,`(max-aspect-ratio: ${r(this,a)})`)):$?(i(this,a,parseInt($)),i(this,d,"max"),i(this,m,`(min-aspect-ratio: ${r(this,a)})`)):S?(i(this,a,parseInt(S)),i(this,d,"max"),i(this,m,`(max-width: ${r(this,a)}px)`)):I?(i(this,a,parseInt(I)),i(this,m,`(min-width: ${r(this,a)}px)`),i(this,d,"min")):(i(this,a,0),i(this,m,`(min-width: ${r(this,a)}px)`),i(this,d,"min")),i(this,w,"."+n[n.length-1])}get url(){return r(this,y)}get name(){return r(this,g)}get density(){return r(this,q)}get query(){return r(this,m)}get extension(){return r(this,w)}get queryType(){return r(this,d)}get queryValue(){return r(this,a)}}y=new WeakMap,g=new WeakMap,q=new WeakMap,m=new WeakMap,a=new WeakMap,d=new WeakMap,w=new WeakMap;var p;class A{constructor(e){o(this,p,void 0);i(this,p,new Map);const t=typeof e=="string"?e.trim().split(",").map(s=>s.trim()).filter(s=>!!s):e,n=[];t.forEach(s=>{const l=new z(s);n.push([l.query,l])});const x=n.filter(s=>s[1].queryType.includes("max")).sort((s,l)=>l[1].queryValue-s[1].queryValue),h=n.filter(s=>s[1].queryType.includes("min")&&s[1].queryValue!==0).sort((s,l)=>s[1].queryValue-l[1].queryValue),f=n.filter(s=>s[0]==="(min-width: 0px)");(f?[...f,...x,...h]:[...x,...h]).forEach(s=>{r(this,p).has(s[0])||r(this,p).set(s[0],[]),r(this,p).get(s[0]).push(s[1])})}get mediaBuckets(){return r(this,p)}}p=new WeakMap;var R,E;class _ extends T.Store{constructor(t){super(void 0);o(this,R,void 0);o(this,E,()=>{let t;r(this,R).mediaBuckets.forEach((h,f)=>{matchMedia(f).matches&&(t=h)});let n,x=0;t==null||t.forEach(h=>{h.density>x&&h.density<=Math.max(devicePixelRatio,1)&&(x=h.density,n=h)}),t!=null&&t.length&&!n&&(n=t[0]),this.current=n});i(this,R,new A(t.srcset))}close(){super.close(),this.disconnect()}connect(){k.windowResizer.subscribe(r(this,E),B.RESIZE_ORDER.SOURCE_MANAGER)}disconnect(){k.windowResizer.unsubscribe(r(this,E))}}R=new WeakMap,E=new WeakMap;exports.Source=z;exports.SourceManager=_;exports.SourceSet=A;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var R=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var r=(i,t,e)=>(R(i,t,"read from private field"),e?e.call(i):t.get(i)),a=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},s=(i,t,e,h)=>(R(i,t,"write to private field"),h?h.call(i,e):t.set(i,e),e);var p=(i,t,e)=>(R(i,t,"access private method"),e);const M=require("./browser-CpzFX2xg.cjs");var f,d,S;class I{constructor(){a(this,f,null);a(this,d,"");a(this,S,"");M.isBrowser&&(s(this,d,document.documentElement.getAttribute("data-project")||"unnamed"),s(this,S,r(this,d)?r(this,d)+"-store-registry":"store-registry"))}get projectName(){return r(this,d)}get localStoreRegistryName(){return r(this,S)}get loadedState(){return r(this,f)}saveState(){const t=this.getState(),e=JSON.stringify(t);localStorage.setItem(r(this,S),e)}loadState(t=localStorage.getItem(r(this,S))){t&&(typeof t=="string"?s(this,f,JSON.parse(t)):s(this,f,t),n.current.forEach(e=>{e.passport&&this.updateStore(e)}))}resetState(){n.current.forEach(t=>{t.passport&&t.reset()}),this.saveState()}updateStore(t){var h,N;if(!Array.isArray((h=r(this,f))==null?void 0:h.stores))return t;const e=t.passport;if(e){const k=(N=r(this,f))==null?void 0:N.stores.find(z=>z.name===e.name);k&&(t.current=k.value)}return t}getState(){const t={stores:[]};return n.current.forEach(e=>{e.passport&&(t.stores.find(h=>h.name===e.passport.name)||t.stores.push({value:e.current,name:e.passport.name}))}),t}}f=new WeakMap,d=new WeakMap,S=new WeakMap;const E=new I;var y,m,g,l,o,u,b,c,v,w,A,q;class j{constructor(t,e){a(this,A);a(this,y,void 0);a(this,m,void 0);a(this,g,void 0);a(this,l,void 0);a(this,o,void 0);a(this,u,new Set);a(this,b,void 0);a(this,c,void 0);a(this,v,void 0);a(this,w,void 0);s(this,y,e==null?void 0:e.passport),s(this,m,t),s(this,g,void 0),s(this,l,t),s(this,o,(e==null?void 0:e.equalityCheck)||((h,N)=>h===N)),e!=null&&e.validate&&this.addMiddleware(e.validate),s(this,v,(e==null?void 0:e.notifyAndClose)||!1),s(this,w,(e==null?void 0:e.invisible)||!1),s(this,b,(e==null?void 0:e.skipSubscribeNotification)||!1),r(this,y)&&E.updateStore(this)}get passport(){return r(this,y)}get initial(){return r(this,m)}get previous(){return r(this,g)}get current(){return r(this,l)}set current(t){if(!r(this,o).call(this,r(this,l),t)){if(s(this,g,r(this,l)),r(this,c))for(const e of r(this,c))t=e(t);s(this,l,t),p(this,A,q).call(this),r(this,v)&&this.close()}}get subscribers(){return r(this,u)}get entry(){return{current:r(this,l),previous:r(this,g)}}addMiddleware(t){r(this,c)||s(this,c,new Set),r(this,c).add(t)}removeMiddleware(t){var e,h;(e=r(this,c))==null||e.delete(t),(h=r(this,c))!=null&&h.size||s(this,c,void 0)}subscribe(t){return!r(this,w)&&!r(this,u).size&&J(this),r(this,u).add(t),r(this,b)||t(this.entry),()=>{this.unsubscribe(t)}}unsubscribe(t){r(this,u).delete(t),r(this,u).size||C(this)}reset(){this.current=Array.isArray(this.initial)?[...this.initial]:this.initial}close(){r(this,u).clear(),C(this)}}y=new WeakMap,m=new WeakMap,g=new WeakMap,l=new WeakMap,o=new WeakMap,u=new WeakMap,b=new WeakMap,c=new WeakMap,v=new WeakMap,w=new WeakMap,A=new WeakSet,q=function(){for(const t of r(this,u))t(this.entry)};const n=new j([],{invisible:!0});function J(i){n.current.includes(i)||(n.current=[...n.current,i])}function C(i){n.current.includes(i)&&(n.current=n.current.filter(t=>t!==i))}exports.Store=j;exports.activeStores=n;exports.storeRegistry=E;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!t.has(
|
|
1
|
+
var p = (i, t, e) => {
|
|
2
|
+
if (!t.has(i))
|
|
3
3
|
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var r = (
|
|
6
|
-
if (t.has(
|
|
5
|
+
var r = (i, t, e) => (p(i, t, "read from private field"), e ? e.call(i) : t.get(i)), a = (i, t, e) => {
|
|
6
|
+
if (t.has(i))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
t instanceof WeakSet ? t.add(
|
|
9
|
-
},
|
|
10
|
-
var C = (
|
|
8
|
+
t instanceof WeakSet ? t.add(i) : t.set(i, e);
|
|
9
|
+
}, s = (i, t, e, h) => (p(i, t, "write to private field"), h ? h.call(i, e) : t.set(i, e), e);
|
|
10
|
+
var C = (i, t, e) => (p(i, t, "access private method"), e);
|
|
11
11
|
import { i as z } from "./browser-0zX67oeU.js";
|
|
12
|
-
var
|
|
12
|
+
var f, d, S;
|
|
13
13
|
class M {
|
|
14
14
|
constructor() {
|
|
15
|
-
a(this,
|
|
15
|
+
a(this, f, null);
|
|
16
16
|
a(this, d, "");
|
|
17
17
|
a(this, S, "");
|
|
18
|
-
z && (
|
|
18
|
+
z && (s(this, d, document.documentElement.getAttribute("data-project") || "unnamed"), s(this, S, r(this, d) ? r(this, d) + "-store-registry" : "store-registry"));
|
|
19
19
|
}
|
|
20
20
|
get projectName() {
|
|
21
21
|
return r(this, d);
|
|
@@ -24,7 +24,7 @@ class M {
|
|
|
24
24
|
return r(this, S);
|
|
25
25
|
}
|
|
26
26
|
get loadedState() {
|
|
27
|
-
return r(this,
|
|
27
|
+
return r(this, f);
|
|
28
28
|
}
|
|
29
29
|
saveState() {
|
|
30
30
|
const t = this.getState(), e = JSON.stringify(t);
|
|
@@ -33,22 +33,22 @@ class M {
|
|
|
33
33
|
loadState(t = localStorage.getItem(
|
|
34
34
|
r(this, S)
|
|
35
35
|
)) {
|
|
36
|
-
t && (typeof t == "string" ?
|
|
36
|
+
t && (typeof t == "string" ? s(this, f, JSON.parse(t)) : s(this, f, t), l.current.forEach((e) => {
|
|
37
37
|
e.passport && this.updateStore(e);
|
|
38
38
|
}));
|
|
39
39
|
}
|
|
40
40
|
resetState() {
|
|
41
|
-
|
|
41
|
+
l.current.forEach((t) => {
|
|
42
42
|
t.passport && t.reset();
|
|
43
43
|
}), this.saveState();
|
|
44
44
|
}
|
|
45
45
|
updateStore(t) {
|
|
46
46
|
var h, N;
|
|
47
|
-
if (!Array.isArray((h = r(this,
|
|
47
|
+
if (!Array.isArray((h = r(this, f)) == null ? void 0 : h.stores))
|
|
48
48
|
return t;
|
|
49
49
|
const e = t.passport;
|
|
50
50
|
if (e) {
|
|
51
|
-
const k = (N = r(this,
|
|
51
|
+
const k = (N = r(this, f)) == null ? void 0 : N.stores.find(
|
|
52
52
|
(j) => j.name === e.name
|
|
53
53
|
);
|
|
54
54
|
k && (t.current = k.value);
|
|
@@ -59,7 +59,7 @@ class M {
|
|
|
59
59
|
const t = {
|
|
60
60
|
stores: []
|
|
61
61
|
};
|
|
62
|
-
return
|
|
62
|
+
return l.current.forEach((e) => {
|
|
63
63
|
e.passport && (t.stores.find((h) => h.name === e.passport.name) || t.stores.push({
|
|
64
64
|
value: e.current,
|
|
65
65
|
name: e.passport.name
|
|
@@ -67,23 +67,23 @@ class M {
|
|
|
67
67
|
}), t;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
f = new WeakMap(), d = new WeakMap(), S = new WeakMap();
|
|
71
71
|
const q = new M();
|
|
72
|
-
var m, y, g,
|
|
72
|
+
var m, y, g, u, b, n, o, c, v, w, A, R;
|
|
73
73
|
class I {
|
|
74
74
|
constructor(t, e) {
|
|
75
|
-
a(this,
|
|
75
|
+
a(this, A);
|
|
76
76
|
a(this, m, void 0);
|
|
77
77
|
a(this, y, void 0);
|
|
78
78
|
a(this, g, void 0);
|
|
79
|
-
a(this,
|
|
79
|
+
a(this, u, void 0);
|
|
80
80
|
a(this, b, void 0);
|
|
81
|
-
a(this,
|
|
81
|
+
a(this, n, /* @__PURE__ */ new Set());
|
|
82
82
|
a(this, o, void 0);
|
|
83
83
|
a(this, c, void 0);
|
|
84
84
|
a(this, v, void 0);
|
|
85
85
|
a(this, w, void 0);
|
|
86
|
-
|
|
86
|
+
s(this, m, e == null ? void 0 : e.passport), s(this, y, t), s(this, g, void 0), s(this, u, t), s(this, b, (e == null ? void 0 : e.equalityCheck) || ((h, N) => h === N)), e != null && e.validate && this.addMiddleware(e.validate), s(this, v, (e == null ? void 0 : e.notifyAndClose) || !1), s(this, w, (e == null ? void 0 : e.invisible) || !1), s(this, o, (e == null ? void 0 : e.skipSubscribeNotification) || !1), r(this, m) && q.updateStore(this);
|
|
87
87
|
}
|
|
88
88
|
get passport() {
|
|
89
89
|
return r(this, m);
|
|
@@ -95,62 +95,62 @@ class I {
|
|
|
95
95
|
return r(this, g);
|
|
96
96
|
}
|
|
97
97
|
get current() {
|
|
98
|
-
return r(this,
|
|
98
|
+
return r(this, u);
|
|
99
99
|
}
|
|
100
100
|
set current(t) {
|
|
101
|
-
if (!r(this, b).call(this, r(this,
|
|
102
|
-
if (
|
|
101
|
+
if (!r(this, b).call(this, r(this, u), t)) {
|
|
102
|
+
if (s(this, g, r(this, u)), r(this, c))
|
|
103
103
|
for (const e of r(this, c))
|
|
104
104
|
t = e(t);
|
|
105
|
-
|
|
105
|
+
s(this, u, t), C(this, A, R).call(this), r(this, v) && this.close();
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
get subscribers() {
|
|
109
|
-
return r(this,
|
|
109
|
+
return r(this, n);
|
|
110
110
|
}
|
|
111
111
|
get entry() {
|
|
112
112
|
return {
|
|
113
|
-
current: r(this,
|
|
113
|
+
current: r(this, u),
|
|
114
114
|
previous: r(this, g)
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
addMiddleware(t) {
|
|
118
|
-
r(this, c) ||
|
|
118
|
+
r(this, c) || s(this, c, /* @__PURE__ */ new Set()), r(this, c).add(t);
|
|
119
119
|
}
|
|
120
120
|
removeMiddleware(t) {
|
|
121
121
|
var e, h;
|
|
122
|
-
(e = r(this, c)) == null || e.delete(t), (h = r(this, c)) != null && h.size ||
|
|
122
|
+
(e = r(this, c)) == null || e.delete(t), (h = r(this, c)) != null && h.size || s(this, c, void 0);
|
|
123
123
|
}
|
|
124
124
|
subscribe(t) {
|
|
125
|
-
return !r(this, w) && !r(this,
|
|
125
|
+
return !r(this, w) && !r(this, n).size && J(this), r(this, n).add(t), r(this, o) || t(this.entry), () => {
|
|
126
126
|
this.unsubscribe(t);
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
unsubscribe(t) {
|
|
130
|
-
r(this,
|
|
130
|
+
r(this, n).delete(t), r(this, n).size || E(this);
|
|
131
131
|
}
|
|
132
132
|
reset() {
|
|
133
|
-
this.current = this.initial;
|
|
133
|
+
this.current = Array.isArray(this.initial) ? [...this.initial] : this.initial;
|
|
134
134
|
}
|
|
135
135
|
close() {
|
|
136
|
-
r(this,
|
|
136
|
+
r(this, n).clear(), E(this);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
m = new WeakMap(), y = new WeakMap(), g = new WeakMap(),
|
|
140
|
-
for (const t of r(this,
|
|
139
|
+
m = new WeakMap(), y = new WeakMap(), g = new WeakMap(), u = new WeakMap(), b = new WeakMap(), n = new WeakMap(), o = new WeakMap(), c = new WeakMap(), v = new WeakMap(), w = new WeakMap(), A = new WeakSet(), R = function() {
|
|
140
|
+
for (const t of r(this, n))
|
|
141
141
|
t(this.entry);
|
|
142
142
|
};
|
|
143
|
-
const
|
|
143
|
+
const l = new I([], {
|
|
144
144
|
invisible: !0
|
|
145
145
|
});
|
|
146
|
-
function J(
|
|
147
|
-
|
|
146
|
+
function J(i) {
|
|
147
|
+
l.current.includes(i) || (l.current = [...l.current, i]);
|
|
148
148
|
}
|
|
149
|
-
function E(
|
|
150
|
-
|
|
149
|
+
function E(i) {
|
|
150
|
+
l.current.includes(i) && (l.current = l.current.filter((t) => t !== i));
|
|
151
151
|
}
|
|
152
152
|
export {
|
|
153
153
|
I as S,
|
|
154
|
-
|
|
154
|
+
l as a,
|
|
155
155
|
q as s
|
|
156
156
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var f=Object.defineProperty,F=Object.defineProperties;var o=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var m=(t,i,e)=>i in t?f(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,d=(t,i)=>{for(var e in i||(i={}))O.call(i,e)&&m(t,e,i[e]);if(c)for(var e of c(i))b.call(i,e)&&m(t,e,i[e]);return t},g=(t,i)=>F(t,o(i));var A=(t,i,e)=>{if(!i.has(t))throw TypeError("Cannot "+e)};var a=(t,i,e)=>(A(t,i,"read from private field"),e?e.call(t):i.get(t)),u=(t,i,e)=>{if(i.has(t))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(t):i.set(t,e)},h=(t,i,e,s)=>(A(t,i,"write to private field"),s?s.call(t,e):i.set(t,e),e);const p=require("./easings-DsS5-Kqc.cjs"),w=require("./math-GDWEqu7y.cjs"),l=require("./polyfills-CM4SCDTt.cjs"),C=require("./Animation-6Na1MCtM.cjs");var n,r;class S extends C.Animation{constructor(e,s){super(e||0,s);u(this,n,p.linear);u(this,r,1e3);this.updateOptions(g(d({},s),{equalize:!0}))}updateOptions(e){super.updateOptions(e),h(this,n,l.nullishCoalescing(e==null?void 0:e.easing,a(this,n))),h(this,r,l.nullishCoalescing(e==null?void 0:e.duration,a(this,r)))}handleAnimationFrame(e){const s=e.timeElapsedSinceSubscription/1e3/(a(this,r)/1e3),q=a(this,n).call(this,w.clamp(s,0,1));this.current=l.preciseNumber(this.from+(this.target-this.from)*q,6),s>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}n=new WeakMap,r=new WeakMap;exports.Tweened=S;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var o = Object.defineProperty, g = Object.defineProperties;
|
|
2
|
+
var F = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var u = Object.getOwnPropertySymbols;
|
|
4
|
+
var O = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var l = (i, e, t) => e in i ? o(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, c = (i, e) => {
|
|
6
|
+
for (var t in e || (e = {}))
|
|
7
|
+
O.call(e, t) && l(i, t, e[t]);
|
|
8
|
+
if (u)
|
|
9
|
+
for (var t of u(e))
|
|
10
|
+
b.call(e, t) && l(i, t, e[t]);
|
|
11
|
+
return i;
|
|
12
|
+
}, d = (i, e) => g(i, F(e));
|
|
13
|
+
var f = (i, e, t) => {
|
|
14
|
+
if (!e.has(i))
|
|
15
|
+
throw TypeError("Cannot " + t);
|
|
16
|
+
};
|
|
17
|
+
var n = (i, e, t) => (f(i, e, "read from private field"), t ? t.call(i) : e.get(i)), m = (i, e, t) => {
|
|
18
|
+
if (e.has(i))
|
|
19
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
+
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
21
|
+
}, h = (i, e, t, a) => (f(i, e, "write to private field"), a ? a.call(i, t) : e.set(i, t), t);
|
|
22
|
+
import { l as x } from "./easings-BKi40vHz.js";
|
|
23
|
+
import { c as S } from "./math-BOBiC4TN.js";
|
|
24
|
+
import { n as p, p as T } from "./polyfills-X6KXuHg-.js";
|
|
25
|
+
import { A as q } from "./Animation-CELiTw3n.js";
|
|
26
|
+
var s, r;
|
|
27
|
+
class j extends q {
|
|
28
|
+
constructor(t, a) {
|
|
29
|
+
super(t || 0, a);
|
|
30
|
+
m(this, s, x);
|
|
31
|
+
m(this, r, 1e3);
|
|
32
|
+
this.updateOptions(d(c({}, a), { equalize: !0 }));
|
|
33
|
+
}
|
|
34
|
+
updateOptions(t) {
|
|
35
|
+
super.updateOptions(t), h(this, s, p(t == null ? void 0 : t.easing, n(this, s))), h(this, r, p(t == null ? void 0 : t.duration, n(this, r)));
|
|
36
|
+
}
|
|
37
|
+
handleAnimationFrame(t) {
|
|
38
|
+
const a = t.timeElapsedSinceSubscription / 1e3 / (n(this, r) / 1e3), A = n(this, s).call(this, S(a, 0, 1));
|
|
39
|
+
this.current = T(this.from + (this.target - this.from) * A, 6), a > 1 && this.unlistenAnimationFrame();
|
|
40
|
+
}
|
|
41
|
+
start() {
|
|
42
|
+
this.unlistenAnimationFrame(), this.listenAnimationFrame();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
s = new WeakMap(), r = new WeakMap();
|
|
46
|
+
export {
|
|
47
|
+
j as T
|
|
48
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var W=(e,s,o)=>{if(!s.has(e))throw TypeError("Cannot "+o)};var i=(e,s,o)=>(W(e,s,"read from private field"),o?o.call(e):s.get(e)),n=(e,s,o)=>{if(s.has(e))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(e):s.set(e,o)},t=(e,s,o,v)=>(W(e,s,"write to private field"),v?v.call(e,o):s.set(e,o),o);const k=require("./order/index.cjs"),z=require("./window-resizer/index.cjs"),A=require("./browser-CpzFX2xg.cjs"),T=require("detect-gpu"),q=require("./Store-
|
|
1
|
+
"use strict";var W=(e,s,o)=>{if(!s.has(e))throw TypeError("Cannot "+o)};var i=(e,s,o)=>(W(e,s,"read from private field"),o?o.call(e):s.get(e)),n=(e,s,o)=>{if(s.has(e))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(e):s.set(e,o)},t=(e,s,o,v)=>(W(e,s,"write to private field"),v?v.call(e,o):s.set(e,o),o);const k=require("./order/index.cjs"),z=require("./window-resizer/index.cjs"),A=require("./browser-CpzFX2xg.cjs"),T=require("detect-gpu"),q=require("./Store-6s0YXK4o.cjs");var r,l,m,c,g,u,w,x,d;class I{constructor(){n(this,r,void 0);n(this,l,void 0);n(this,m,void 0);n(this,c,void 0);n(this,g,void 0);n(this,u,void 0);n(this,w,void 0);n(this,x,void 0);n(this,d,void 0);var s,o;if(t(this,r,"unknown"),t(this,l,"unknown"),t(this,m,0),t(this,c,null),t(this,g,!1),t(this,u,!1),t(this,w,!1),t(this,x,!1),t(this,d,!1),this.resize=()=>{t(this,g,/Mobi|Android/i.test(navigator.userAgent)),t(this,u,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{t(this,u,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},A.isBrowser){t(this,c,T.getGPUTier()),i(this,c).then(a=>{t(this,l,a.gpu||"unknown"),t(this,m,a.tier)}),this.resize(),z.windowResizer.subscribe(this.resize,k.RESIZE_ORDER.DEVICE);{const a=document.createElement("canvas"),P=a.getContext("webgl")||a.getContext("experimental-webgl");t(this,w,P&&P instanceof WebGLRenderingContext||!1)}{const a=document.createElement("canvas");a.getContext("2d")&&t(this,x,a.toDataURL("image/webp").indexOf("data:image/webp")==0)}const v=window.navigator.userAgent,E=((o=(s=window.navigator)==null?void 0:s.userAgentData)==null?void 0:o.platform)||window.navigator.platform,C=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],O=["Win32","Win64","Windows","WinCE"],R=["iPhone","iPad","iPod"];C.includes(E)?(t(this,r,"macOS"),t(this,d,!0)):R.includes(E)?(t(this,r,"iOS"),t(this,d,!0)):O.includes(E)?t(this,r,"Windows"):/Android/.test(v)?t(this,r,"Android"):/Linux/.test(E)?t(this,r,"Linux"):t(this,r,"unknown")}}get OS(){return i(this,r)}get gpu(){return i(this,l)}get gpuTier(){return i(this,m)}get gpuDetection(){return i(this,c)}get isMobile(){return i(this,g)}get isTouch(){return i(this,u)}get isWebgl(){return i(this,w)}get isWebp(){return i(this,x)}get isApple(){return i(this,d)}}r=new WeakMap,l=new WeakMap,m=new WeakMap,c=new WeakMap,g=new WeakMap,u=new WeakMap,w=new WeakMap,x=new WeakMap,d=new WeakMap;const M=new I;var D=(e=>(e.mobile="600px",e.tablet="1024px",e.notebook="1280px",e.desktop="1281px",e))(D||{}),S=(e=>(e["<=mobile"]="(max-width: 600px)",e[">=mobile"]="(min-width: 601px)",e["<=tablet"]="(max-width: 1024px)",e[">=tablet"]="(min-width: 1025px)",e["<=notebook"]="(max-width: 1280px)",e[">=notebook"]="(min-width: 1281px)",e["<=desktop"]="(max-width: 1280px)",e[">=desktop"]="(min-width: 1281px)",e))(S||{}),p,b,f,h;class L{constructor(){n(this,p,void 0);n(this,b,void 0);n(this,f,void 0);n(this,h,void 0);t(this,p,0),t(this,b,0),t(this,f,0),t(this,h,new q.Store(void 0)),this.resize=()=>{t(this,p,document.documentElement.clientWidth),t(this,b,innerHeight),t(this,f,devicePixelRatio),matchMedia("(max-width: 600px)").matches?i(this,h).current="mobile":matchMedia("(max-width: 1024px)").matches?i(this,h).current="tablet":matchMedia("(max-width: 1280px)").matches?i(this,h).current="notebook":matchMedia("(min-width: 1281px)").matches&&(i(this,h).current="desktop")},A.isBrowser&&(this.resize(),z.windowResizer.subscribe(this.resize,k.RESIZE_ORDER.DEVICE))}get width(){return i(this,p)}get height(){return i(this,b)}get type(){return i(this,h)}get pixelRatio(){return i(this,f)}}p=new WeakMap,b=new WeakMap,f=new WeakMap,h=new WeakMap;const _=new L;exports.ViewportBreakpoints=D;exports.ViewportMediaRules=S;exports.device=M;exports.viewport=_;
|
|
@@ -11,7 +11,7 @@ import { RESIZE_ORDER as k } from "./order/index.js";
|
|
|
11
11
|
import { windowResizer as A } from "./window-resizer/index.js";
|
|
12
12
|
import { i as C } from "./browser-0zX67oeU.js";
|
|
13
13
|
import { getGPUTier as z } from "detect-gpu";
|
|
14
|
-
import { S as O } from "./Store-
|
|
14
|
+
import { S as O } from "./Store-BI2xxXOA.js";
|
|
15
15
|
var h, d, l, c, g, m, p, x, u;
|
|
16
16
|
class I {
|
|
17
17
|
constructor() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./globals-bYKki-b9.cjs");function o(e){n.currentComponentElement.value.addDisconnectCallback(e)}function c(e){const t=typeof e=="function"?e(n.currentComponentElement.value):e;return n.currentComponentElement&&o(()=>t.close()),t}exports._createStore=c;exports.onDisconnect=o;
|
package/lib/accordion/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var R=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var t=(s,e,i)=>(R(s,e,"read from private field"),i?i.call(s):e.get(s)),h=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},d=(s,e,i,n)=>(R(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i);var o=(s,e,i)=>(R(s,e,"access private method"),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("../custom-element/index.cjs"),F=require("../attribute/index.cjs"),V=require("../browser-CpzFX2xg.cjs"),X=require("../dom-JBOkFLTh.cjs"),Y=require("../events-Crwi8fz6.cjs"),Z=require("../style-At6aDoqG.cjs");var j=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,te=(s,e,i,n)=>{for(var b=n>1?void 0:n?ee(e,i):e,H=s.length-1,P;H>=0;H--)(P=s[H])&&(b=(n?P(e,i,b):P(b))||b);return n&&b&&j(e,i,b),b},Q=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},c=(s,e,i)=>(Q(s,e,"read from private field"),i?i.call(s):e.get(s)),L=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},D=(s,e,i,n)=>(Q(s,e,"write to private field"),e.set(s,i),i),N,B,m,y,I,G,a,r,v,l,A,O,T,u,_,W,U,w,S,x,C,q,z,f,g,E,p,M,$,k;class J{constructor(e,i){h(this,W);h(this,w);h(this,f);h(this,E);h(this,M);h(this,a,null);h(this,r,null);h(this,v,null);h(this,l,null);h(this,A,null);h(this,O,!1);h(this,T,void 0);h(this,u,!1);h(this,_,[]);h(this,x,()=>{t(this,u)?this.close():this.open()});h(this,C,()=>{t(this,u)&&(o(this,f,g).call(this,0,!0),o(this,f,g).call(this,t(this,w,S)))});h(this,q,()=>{o(this,E,p).call(this,"size-change")});h(this,z,e=>{t(this,u)&&(o(this,f,g).call(this,0,!0),o(this,f,g).call(this,t(this,w,S)),t(this,_).forEach(i=>{i.element.scroll({left:t(this,a).axisAttribute.current==="x"?i.scroll:0,top:t(this,a).axisAttribute.current==="y"?i.scroll:0})}))});h(this,k,()=>{const e=X.getAllParentElements(t(this,r));d(this,_,e.map(i=>({element:i,scroll:t(this,a).axisAttribute.current==="y"?i.scrollTop:i.scrollLeft})))});i.firstElementChild instanceof HTMLElement&&i.lastElementChild instanceof HTMLElement?(d(this,a,e),d(this,r,i),d(this,v,i.firstElementChild),d(this,l,i.lastElementChild),t(this,v).style.cursor="default",t(this,l).style.overflow="hidden",t(this,a).axisAttribute.current==="y"?t(this,l).style.height="0px":t(this,l).style.width="0px",d(this,A,new ResizeObserver(t(this,q))),addEventListener("resize",t(this,C)),t(this,v).addEventListener("click",t(this,x)),t(this,r).addEventListener("sizeChange",t(this,z)),t(this,r).addEventListener("beforeAccordionItemToggle",t(this,k)),t(this,r).hasAttribute("data-opened")&&this.open({skipTransition:!0})):e.removeItem(t(this,r))}get element(){return t(this,r)}destroy(){t(this,v)&&(t(this,r).classList.remove("opened","triggered"),t(this,v).style.cursor="",o(this,f,g).call(this,void 0),t(this,A).disconnect(),removeEventListener("resize",t(this,C)),t(this,v).removeEventListener("click",t(this,x)),t(this,r).removeEventListener("sizeChange",t(this,z)),t(this,r).removeEventListener("beforeAccordionItemToggle",t(this,k)),clearTimeout(t(this,T)))}open(e){o(this,E,p).call(this,"before-toggle"),e!=null&&e.skipTransition&&o(this,M,$).call(this),t(this,a).multipleAttribute.current||t(this,a).closeAll({exclude:t(this,r)}),t(this,O)||t(this,A).observe(t(this,l)),d(this,u,!0),clearTimeout(t(this,T)),t(this,r).classList.add("triggered"),o(this,f,g).call(this,t(this,w,S)),setTimeout(()=>{t(this,r).classList.add("opened")},0),o(this,E,p).call(this,"toggle")}close(e){o(this,E,p).call(this,"before-toggle"),e!=null&&e.skipTransition&&o(this,M,$).call(this),d(this,u,!1),t(this,r).classList.remove("opened"),o(this,f,g).call(this,0),d(this,T,setTimeout(()=>{t(this,r).classList.remove("triggered")},Z.getElementTransitionDurationMS(t(this,l)))),o(this,E,p).call(this,"toggle")}}a=new WeakMap,r=new WeakMap,v=new WeakMap,l=new WeakMap,A=new WeakMap,O=new WeakMap,T=new WeakMap,u=new WeakMap,_=new WeakMap,W=new WeakSet,U=function(){return t(this,r).parentElement||t(this,r).getRootNode()},w=new WeakSet,S=function(){return t(this,a).axisAttribute.current==="x"?t(this,l).scrollWidth:t(this,l).scrollHeight},x=new WeakMap,C=new WeakMap,q=new WeakMap,z=new WeakMap,f=new WeakSet,g=function(e,i=!1){i&&(t(this,l).style.transition="all 0s",setTimeout(()=>{t(this,l).style.transition=""}));const n=t(this,a).axisAttribute.current==="x"?"width":"height";e!=null?t(this,l).style[n]=`${e}px`:t(this,l).style[n]=""},E=new WeakSet,p=function(e){e==="before-toggle"?t(this,r).dispatchEvent(new CustomEvent("beforeAccordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:t(this,u)}})):e==="toggle"?t(this,r).dispatchEvent(new CustomEvent("accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:t(this,u)}})):e==="size-change"&&Y.dispatchSizeChangeEvent(t(this,W,U))},M=new WeakSet,$=function(){t(this,l).style.transition="all 0s",setTimeout(()=>{t(this,l).style.transition=""},50)},k=new WeakMap;exports.AccordionElement=class extends K.CustomElement{constructor(){super(),L(this,I),L(this,N,new F.Attribute(this,"axis","y")),L(this,B,new F.Attribute(this,"multiple",!1)),L(this,m,[]),L(this,y,null),V.isBrowser&&D(this,y,new MutationObserver(e=>{e.forEach(i=>{i.removedNodes.forEach(n=>{n instanceof HTMLElement&&this.removeItem(n)}),i.addedNodes.forEach(n=>{n instanceof HTMLElement&&this.createItem(n)})})}))}get axisAttribute(){return c(this,N)}get multipleAttribute(){return c(this,B)}createItem(e){c(this,m).find(i=>i.element===e)||c(this,m).push(new J(this,e))}removeItem(e){D(this,m,c(this,m).filter(i=>{if(i.element!==e)return!0;i.destroy()}))}closeAll(e){c(this,m).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.close(e)})}openAll(e){c(this,m).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.open(e)})}connectedCallback(){c(this,y).observe(c(this,I,G),{childList:!0}),D(this,m,[...c(this,I,G).children].map(e=>{if(e instanceof HTMLElement)return new J(this,e)}).filter(e=>!!e))}disconnectedCallback(){c(this,y).disconnect()}};N=new WeakMap;B=new WeakMap;m=new WeakMap;y=new WeakMap;I=new WeakSet;G=function(){return this.shadowRoot?this.shadowRoot:this};exports.AccordionElement=te([K.define("e-accordion")],exports.AccordionElement);
|