aptechka 0.1.6 → 0.1.7
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/Animated-Bf-gPIQM.cjs +1 -0
- package/lib/{Animated-CJcYqJzq.js → Animated-Br_4OSth.js} +36 -35
- package/lib/Composed-C2Vv1xxR.cjs +1 -0
- package/lib/Composed-DhtYBEmo.js +79 -0
- package/lib/{Damped-AHRBHNEQ.cjs → Damped-BwpMU9Gi.cjs} +1 -1
- package/lib/{Damped-Csj-9_gH.js → Damped-urvryQLo.js} +1 -1
- package/lib/abstract-elements/index.cjs +1 -1
- package/lib/abstract-elements/index.js +2 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +2 -2
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +8 -8
- package/lib/createStylesheet-BSXZrWW6.js +8 -0
- package/lib/createStylesheet-C1rimcGc.cjs +1 -0
- package/lib/element-constructor/ElementConstructor.d.ts +16 -27
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.d.ts +1 -2
- package/lib/element-constructor/index.js +120 -639
- package/lib/element-constructor/knownSvgTags.d.ts +1 -0
- package/lib/element-constructor/tags.d.ts +117 -0
- package/lib/{index-DgtdcBEI.js → index-dBwVZz_v.js} +25 -25
- package/lib/index-vI4hmrI8.cjs +9 -0
- package/lib/jsx/h.d.ts +2 -2
- package/lib/jsx/hooks/animation-frame.d.ts +5 -0
- package/lib/jsx/hooks/animation.d.ts +3 -0
- package/lib/jsx/hooks/basic.d.ts +4 -0
- package/lib/jsx/hooks/element-resize.d.ts +3 -0
- package/lib/jsx/hooks/intersection.d.ts +3 -0
- package/lib/jsx/hooks/store.d.ts +6 -0
- package/lib/jsx/hooks/style.d.ts +2 -0
- package/lib/jsx/hooks/utils.d.ts +4 -0
- package/lib/jsx/hooks/window-resize.d.ts +2 -0
- package/lib/jsx/index.cjs +1 -1
- package/lib/jsx/index.d.ts +8 -1
- package/lib/jsx/index.js +164 -87
- package/lib/jsx/type.d.ts +1 -0
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +7 -7
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +21 -22
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/store/Derived.d.ts +1 -1
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +48 -111
- package/lib/studio/index.cjs +3 -3
- package/lib/studio/index.js +41 -41
- package/lib/tags-D-lzPz_v.js +748 -0
- package/lib/tags-DkAbVUQP.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +6 -6
- package/package.json +1 -1
- package/lib/Animated-DyZuTEQE.cjs +0 -1
- package/lib/ElementConstructor-9f-12v7T.cjs +0 -1
- package/lib/ElementConstructor-CoKM2CTK.js +0 -228
- package/lib/createStylesheet-BON7aJYs.js +0 -10
- package/lib/createStylesheet-uicRVW05.cjs +0 -1
- package/lib/element-constructor/htmlTags.d.ts +0 -115
- package/lib/element-constructor/svgTags.d.ts +0 -64
- package/lib/htmlTags-BCNUG7oK.js +0 -683
- package/lib/htmlTags-BSQys9wH.cjs +0 -1
- package/lib/index-i_Ki9M-w.cjs +0 -9
- package/lib/jsx/hooks.d.ts +0 -25
package/lib/store/index.js
CHANGED
|
@@ -1,138 +1,75 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
3
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var v = (t, s, e) => {
|
|
2
|
+
if (!s.has(t))
|
|
3
|
+
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
if (
|
|
5
|
+
var i = (t, s, e) => (v(t, s, "read from private field"), e ? e.call(t) : s.get(t)), n = (t, s, e) => {
|
|
6
|
+
if (s.has(t))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
var
|
|
11
|
-
set _(
|
|
12
|
-
|
|
8
|
+
s instanceof WeakSet ? s.add(t) : s.set(t, e);
|
|
9
|
+
}, p = (t, s, e, r) => (v(t, s, "write to private field"), r ? r.call(t, e) : s.set(t, e), e);
|
|
10
|
+
var f = (t, s, e, r) => ({
|
|
11
|
+
set _(a) {
|
|
12
|
+
p(t, s, a, e);
|
|
13
13
|
},
|
|
14
14
|
get _() {
|
|
15
|
-
return
|
|
15
|
+
return i(t, s, r);
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
var
|
|
19
|
-
var
|
|
18
|
+
var d = (t, s, e) => new Promise((r, a) => {
|
|
19
|
+
var g = (o) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
22
|
-
} catch (
|
|
23
|
-
|
|
21
|
+
m(e.next(o));
|
|
22
|
+
} catch (h) {
|
|
23
|
+
a(h);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, x = (o) => {
|
|
26
26
|
try {
|
|
27
|
-
|
|
28
|
-
} catch (
|
|
29
|
-
|
|
27
|
+
m(e.throw(o));
|
|
28
|
+
} catch (h) {
|
|
29
|
+
a(h);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
|
|
31
|
+
}, m = (o) => o.done ? r(o.value) : Promise.resolve(o.value).then(g, x);
|
|
32
|
+
m((e = e.apply(t, s)).next());
|
|
33
33
|
});
|
|
34
|
-
import { S as
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
var
|
|
39
|
-
class
|
|
40
|
-
constructor(
|
|
41
|
-
super(
|
|
42
|
-
n(this, m, void 0);
|
|
43
|
-
h(this, m, s.subscribe((o) => {
|
|
44
|
-
const a = [];
|
|
45
|
-
o.current.forEach((d, i) => {
|
|
46
|
-
var f;
|
|
47
|
-
o.current[i] === ((f = o.previous) == null ? void 0 : f[i]) && this.current[i] ? a.push(this.current[i]) : a.push(r(d));
|
|
48
|
-
}), this.current = a;
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
close() {
|
|
52
|
-
super.close(), u(this, m).call(this);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
m = new WeakMap();
|
|
56
|
-
var b, l, p;
|
|
57
|
-
class E extends A {
|
|
58
|
-
constructor(s, r, c) {
|
|
59
|
-
super(s, c);
|
|
60
|
-
n(this, b, void 0);
|
|
61
|
-
n(this, l, void 0);
|
|
62
|
-
n(this, p, 0);
|
|
63
|
-
h(this, l, new A(!1)), h(this, b, r), c != null && c.manualControl || this.refetch();
|
|
64
|
-
}
|
|
65
|
-
get isPending() {
|
|
66
|
-
return u(this, l);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Calls fetcher again and sets isPending to true.
|
|
70
|
-
*/
|
|
71
|
-
refetch() {
|
|
72
|
-
u(this, l).current = !0, h(this, p, u(this, p) + 1);
|
|
73
|
-
const s = u(this, p);
|
|
74
|
-
u(this, b).call(this).then((r) => {
|
|
75
|
-
s === u(this, p) && (u(this, l).current = !1, this.current = r);
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
b = new WeakMap(), l = new WeakMap(), p = new WeakMap();
|
|
80
|
-
var v, x, g;
|
|
81
|
-
class N extends E {
|
|
82
|
-
constructor(s, r, c = 100) {
|
|
83
|
-
super(s, r, {
|
|
34
|
+
import { S as I, a as b, s as k } from "../Store-JOKrNVEr.js";
|
|
35
|
+
import { D as j } from "../Derived-Bc88XJ8J.js";
|
|
36
|
+
import { R as A } from "../Composed-DhtYBEmo.js";
|
|
37
|
+
import { C as w, D as z } from "../Composed-DhtYBEmo.js";
|
|
38
|
+
var c, u, l;
|
|
39
|
+
class R extends A {
|
|
40
|
+
constructor(e, r, a = 100) {
|
|
41
|
+
super(e, r, {
|
|
84
42
|
manualControl: !0,
|
|
85
43
|
skipSubscribeNotification: !0
|
|
86
44
|
});
|
|
87
|
-
n(this,
|
|
88
|
-
n(this,
|
|
89
|
-
n(this,
|
|
90
|
-
|
|
45
|
+
n(this, c, void 0);
|
|
46
|
+
n(this, u, void 0);
|
|
47
|
+
n(this, l, 0);
|
|
48
|
+
p(this, u, a);
|
|
91
49
|
}
|
|
92
50
|
get step() {
|
|
93
|
-
return
|
|
51
|
+
return i(this, l);
|
|
94
52
|
}
|
|
95
53
|
startAccumulating() {
|
|
96
|
-
|
|
97
|
-
++
|
|
98
|
-
}),
|
|
54
|
+
p(this, c, setInterval(() => d(this, null, function* () {
|
|
55
|
+
++f(this, l)._, this.refetch();
|
|
56
|
+
}), i(this, u)));
|
|
99
57
|
}
|
|
100
58
|
stopAccumulating() {
|
|
101
|
-
clearInterval(
|
|
59
|
+
clearInterval(i(this, c));
|
|
102
60
|
}
|
|
103
61
|
close() {
|
|
104
62
|
super.close(), this.stopAccumulating();
|
|
105
63
|
}
|
|
106
64
|
}
|
|
107
|
-
|
|
108
|
-
var I;
|
|
109
|
-
class j extends A {
|
|
110
|
-
constructor(s, r, c) {
|
|
111
|
-
super(null, c);
|
|
112
|
-
n(this, I, []);
|
|
113
|
-
const o = D(() => {
|
|
114
|
-
this.current = r();
|
|
115
|
-
}, 0);
|
|
116
|
-
s.forEach((a) => {
|
|
117
|
-
u(this, I).push(
|
|
118
|
-
a.subscribe(() => {
|
|
119
|
-
o();
|
|
120
|
-
})
|
|
121
|
-
);
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
close() {
|
|
125
|
-
super.close(), u(this, I).forEach((s) => s());
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
I = new WeakMap();
|
|
65
|
+
c = new WeakMap(), u = new WeakMap(), l = new WeakMap();
|
|
129
66
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
67
|
+
w as Composed,
|
|
68
|
+
R as CumulativeResource,
|
|
69
|
+
j as Derived,
|
|
70
|
+
z as DerivedArray,
|
|
71
|
+
A as Resource,
|
|
72
|
+
I as Store,
|
|
73
|
+
b as activeStores,
|
|
74
|
+
k as storeRegistry
|
|
138
75
|
};
|
package/lib/studio/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";var ce=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var v=(t,e,r)=>(ce(t,e,"read from private field"),r?r.call(t):e.get(t)),z=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},P=(t,e,r,n)=>(ce(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const me=require("../browser-CpzFX2xg.cjs"),p=require("../custom-element/index.cjs"),b=require("../ElementConstructor-9f-12v7T.cjs"),m=require("../createStylesheet-uicRVW05.cjs"),d=require("../Store-D0_rDIsE.cjs"),be=require("../file-EevnUtRj.cjs"),ke=require("../function-MthRj-GJ.cjs"),h=require("../htmlTags-BSQys9wH.cjs"),_e=require("../Animated-DyZuTEQE.cjs"),Se=require("../Viewport-COsaberc.cjs"),ye=require("../accordion/index.cjs"),Te=require("../index-i_Ki9M-w.cjs"),Ce=require("../events-D68xg4dy.cjs"),i=require("../theme/index.cjs"),xe=require("../math-GDWEqu7y.cjs"),pe='<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>',ue='<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>',$e='<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>',Pe='<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>';var $,w;class Oe{constructor(){z(this,$,"");z(this,w,[]);P(this,$,d.storeRegistry.projectName+"-studio")}openPanel(e){v(this,w).includes(e)||v(this,w).push(e)}closePanel(e){P(this,w,v(this,w).filter(r=>r!==e))}isPanelOpened(e){return v(this,w).includes(e)}save(){const e={openedPanels:v(this,w)};localStorage.setItem(v(this,$),JSON.stringify(e)),d.storeRegistry.saveState()}load(){d.storeRegistry.loadState();const e=localStorage.getItem(v(this,$));if(e)try{const r=JSON.parse(e);r.openedPanels&&P(this,w,r.openedPanels)}catch(r){console.error(r)}}}$=new WeakMap,w=new WeakMap;const x=new Oe;var S;class I extends p.CustomElement{constructor(...r){super();z(this,S,void 0);P(this,S,r)}addStore(r){v(this,S).push(r)}get firstStore(){return v(this,S)[0]}get stores(){return v(this,S)}updateStores(r){v(this,S).forEach(n=>{n.current=r})}}S=new WeakMap;var Ee=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Re=(t,e,r,n)=>{for(var a=n>1?void 0:n?Me(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&Ee(e,r,a),a};const De=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{padding:"0",margin:"0",width:`calc(${i.aptechkaTheme.heightInput.var} * 0.5)`,height:`calc(${i.aptechkaTheme.heightInput.var} * 0.5)`,borderRadius:i.aptechkaTheme.borderRadius.var,overflow:"hidden",accentColor:i.aptechkaTheme.colorLight.var}});let re=class extends I{constructor(...t){super(...t),this.openShadow(De),b.element(this,{shadowChildren:[h.input({attributes:{type:"checkbox"},events:{change:e=>{this.updateStores(e.currentTarget.checked)}},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};re=Re([p.define("e-tweaker-boolean-manager")],re);var We=Object.defineProperty,Le=Object.getOwnPropertyDescriptor,Fe=(t,e,r,n)=>{for(var a=n>1?void 0:n?Le(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&We(e,r,a),a};const Ae=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:i.aptechkaTheme.heightInput.var,padding:"0",background:"none",borderRadius:i.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:i.aptechkaTheme.borderRadius.var,height:`calc(${i.aptechkaTheme.heightInput.var} * 0.93)`}});let ae=class extends I{constructor(...t){super(...t),this.openShadow(Ae),b.element(this,{shadowChildren:[h.input({attributes:{type:"color",value:this.firstStore},events:{input:e=>{this.updateStores(e.currentTarget.value)}}})]})}};ae=Fe([p.define("e-tweaker-color-manager")],ae);var Ie=Object.defineProperty,qe=Object.getOwnPropertyDescriptor,ze=(t,e,r,n)=>{for(var a=n>1?void 0:n?qe(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&Ie(e,r,a),a};const Ne=m.createStylesheet({a:{color:"inherit"}});let ne=class extends I{constructor(...t){var e,r;super(...t),this.openShadow(Ne),b.element(this,{shadowChildren:[h.a({attributes:{href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank"},children:this.firstStore})]})}};ne=ze([p.define("e-tweaker-link-manager")],ne);var He=Object.defineProperty,Ze=Object.getOwnPropertyDescriptor,Ge=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ze(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&He(e,r,a),a},Ke=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},j=(t,e,r)=>(Ke(t,e,"read from private field"),r?r.call(t):e.get(t)),Ve=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},O;const Je=m.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:i.aptechkaTheme.fontSizeSmall.var},".text-input":{height:i.aptechkaTheme.heightInput.var,width:"100%",margin:"0",padding:`0 ${i.aptechkaTheme.gapSmall.var}`,backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:i.aptechkaTheme.borderRadius.var}});let Q=class extends I{constructor(...t){super(...t),Ve(this,O,new d.Store([])),this.openShadow(Je),b.element(this,{shadowChildren:[h.input({class:"text-input",attributes:{type:"string",value:this.firstStore},events:{change:e=>{this.updateStores(e.currentTarget.value)}}}),j(this,O)]})}appendContent(t){j(this,O).current=[...j(this,O).current,t]}};O=new WeakMap;Q=Ge([p.define("e-tweaker-string-manager")],Q);var Ye=Object.defineProperty,Be=Object.getOwnPropertyDescriptor,Qe=(t,e,r,n)=>{for(var a=n>1?void 0:n?Be(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&Ye(e,r,a),a},ve=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},_=(t,e,r)=>(ve(t,e,"read from private field"),r?r.call(t):e.get(t)),N=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ee=(t,e,r,n)=>(ve(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),E,M,R,H;let U=class extends Q{constructor(...t){var e,r,n,a,o,s;super(...t),N(this,E,void 0),N(this,M,void 0),N(this,R,void 0),N(this,H,k=>{const q=typeof k=="string"?parseFloat(k)||this.min:k,we=xe.clamp(q,_(this,M),_(this,R));return this.toFixed(we)}),ee(this,M,((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min)||0),ee(this,R,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.max)||1),ee(this,E,((s=(o=this.firstStore.passport)==null?void 0:o.manager)==null?void 0:s.step)||.01)}get min(){return _(this,M)}get max(){return _(this,R)}get step(){return _(this,E)}toFixed(t){var r;const e=((r=_(this,E).toString().split(".")[1])==null?void 0:r.length)||0;return e?+t.toFixed(e):Math.ceil(t)}connectedCallback(){this.firstStore.addMiddleware(_(this,H))}disconnectedCallback(){this.firstStore.removeMiddleware(_(this,H))}};E=new WeakMap;M=new WeakMap;R=new WeakMap;H=new WeakMap;U=Qe([p.define("e-tweaker-number-manager")],U);var Ue=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,je=(t,e,r,n)=>{for(var a=n>1?void 0:n?Xe(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&Ue(e,r,a),a};const et=m.createStylesheet({":host":{width:"100%"},".text-input":{width:"60px",marginRight:i.aptechkaTheme.gapLarge.var,textAlign:"center"},".range-input":{boxSizing:"border-box","-webkit-appearance":"none",height:"8px",width:"100%",margin:"0",padding:"0",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:i.aptechkaTheme.borderRadius.var},".range-input::-webkit-slider-thumb":{"-webkit-appearance":"none",height:`calc(${i.aptechkaTheme.heightInput.var} * 0.7)`,width:i.aptechkaTheme.borderRadius.var,borderRadius:i.aptechkaTheme.borderRadius.var,backgroundColor:i.aptechkaTheme.colorLight.var,transitionProperty:"background-color",transitionDuration:i.aptechkaTheme.durationShort.var},".range-input:focus::-webkit-slider-thumb":{backgroundColor:i.aptechkaTheme.colorActive.var},".range-input::-webkit-slider-runnable-track":{"-webkit-appearance":"none","box-shadow":"none",border:"none",background:"transparent"}});let se=class extends U{constructor(...t){super(...t),this.addStylesheet(et),this.appendContent(h.input({class:"range-input",attributes:{type:"range",min:this.min,max:this.max,step:this.step,value:this.firstStore},events:{input:e=>{this.updateStores(parseFloat(e.currentTarget.value))}}}))}};se=je([p.define("e-tweaker-range-manager")],se);var tt=Object.defineProperty,rt=Object.getOwnPropertyDescriptor,at=(t,e,r,n)=>{for(var a=n>1?void 0:n?rt(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&tt(e,r,a),a};const nt=m.createStylesheet({"e-select":{width:"100%","--arrow-color":i.aptechkaTheme.colorLight.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:i.aptechkaTheme.durationShort.var,transitionProperty:"color"},"e-select-option:hover":{color:i.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:i.aptechkaTheme.colorLight.var,transitionProperty:"transform",transitionDuration:i.aptechkaTheme.durationShort.var},".opened svg":{transform:"scaleY(-1)"}});let ie=class extends I{constructor(...t){var r,n;super(...t),this.openShadow(nt);const e=((n=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:n.variants)||[];b.element(this,{shadowChildren:h.custom("e-select",{attributes:{value:this.firstStore},events:{change:a=>{this.updateStores(a.currentTarget.value)}},children:[h.custom("e-select-head",{children:[h.span({attributes:{"data-value-holder":""}})]}),...e.map((a,o)=>h.custom("e-select-option",{children:a,attributes:{default:o===0?!0:null}}))]})})}};ie=at([p.define("e-tweaker-select-manager")],ie);const st={boolean:re,color:ae,link:ne,number:U,range:se,select:ie,string:Q};var it=Object.defineProperty,ot=Object.getOwnPropertyDescriptor,ht=(t,e,r,n)=>{for(var a=n>1?void 0:n?ot(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&it(e,r,a),a},ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(ge(t,e,"read from private field"),r?r.call(t):e.get(t)),y=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},T=(t,e,r,n)=>(ge(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),g,D,W,L,F,Z,G;const ct=m.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.3fr 1fr",alignItems:"center",color:i.aptechkaTheme.colorLight.var,gap:i.aptechkaTheme.gapMedium.var},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:i.aptechkaTheme.fontSizeMedium.var,display:"flex",alignItems:"center",gap:i.aptechkaTheme.gapExtraSmall.var},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:i.aptechkaTheme.colorLight.var,transitionDuration:i.aptechkaTheme.durationShort.var,transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:i.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let X=class extends p.CustomElement{constructor(t){var r,n,a,o;super(),y(this,g,[]),y(this,D,void 0),y(this,W,void 0),y(this,L,!1),y(this,F,void 0),y(this,Z,()=>{d.activeStores.current.find(s=>l(this,g).includes(s))||this.remove()}),y(this,G,s=>{l(this,L)&&((s.metaKey||s.ctrlKey)&&s.code==="KeyC"?navigator.clipboard.writeText(l(this,g)[0].current):(s.metaKey||s.ctrlKey)&&s.code==="KeyR"&&(l(this,g).forEach(k=>{k.reset()}),s.preventDefault()))}),T(this,g,[t.store]),T(this,D,t.store.passport.name),T(this,W,l(this,D).split(".").slice(-1).toString());const e=((n=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:n.type)||"string";T(this,F,new st[e](l(this,g)[0])),this.openShadow(ct),b.element(this,{class:{disabled:((o=(a=t.store.passport)==null?void 0:a.manager)==null?void 0:o.disabled)||!1},events:{pointerleave:()=>{T(this,L,!1)},pointerenter:()=>{T(this,L,!0)}},shadowChildren:[h.div({class:"head",children:[h.div({class:"name",children:l(this,W)+":"}),h.div({class:"head-buttons",children:[h.button({class:"head-button",children:ue,events:{click:()=>{navigator.clipboard.writeText(l(this,g)[0].current)}}}),h.button({class:"head-button",children:pe,events:{click:()=>{l(this,g).forEach(s=>{s.reset()})}}})]})]}),l(this,F)]})}get key(){return l(this,D)}get name(){return l(this,W)}get stores(){return l(this,g)}addStore(t){l(this,F).addStore(t)}connectedCallback(){d.activeStores.subscribe(l(this,Z)),addEventListener("keydown",l(this,G)),Ce.dispatchSizeChangeEvent(this)}disconnectedCallback(){d.activeStores.unsubscribe(l(this,Z)),removeEventListener("keydown",l(this,G))}};g=new WeakMap;D=new WeakMap;W=new WeakMap;L=new WeakMap;F=new WeakMap;Z=new WeakMap;G=new WeakMap;X=ht([p.define("e-tweaker-field")],X);var lt=Object.defineProperty,dt=Object.getOwnPropertyDescriptor,pt=(t,e,r,n)=>{for(var a=n>1?void 0:n?dt(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&<(e,r,a),a},fe=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},c=(t,e,r)=>(fe(t,e,"read from private field"),r?r.call(t):e.get(t)),C=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},te=(t,e,r,n)=>(fe(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),f,K,u,V,J,oe;const ut=m.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:i.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:i.aptechkaTheme.tweakerFolderHeight.var,paddingLeft:i.aptechkaTheme.gapMedium.var,paddingRight:i.aptechkaTheme.gapMedium.var,display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:i.aptechkaTheme.colorDarkAux.var,borderRadius:i.aptechkaTheme.borderRadius.var},".name":{fontSize:i.aptechkaTheme.fontSizeLarge.var,color:i.aptechkaTheme.colorLight.var},".body":{transitionProperty:"height",transitionDuration:i.aptechkaTheme.durationShort.var,overflow:"hidden",height:"0px"},".body-content":{boxSizing:"border-box",padding:i.aptechkaTheme.gapLarge.var,display:"grid",gap:i.aptechkaTheme.gapMedium.var},".arrow":{width:"20px",height:"20px",fill:i.aptechkaTheme.colorLight.var,transition:`transform ${i.aptechkaTheme.durationShort.var}`},".opened .arrow":{transform:"scaleY(-1)"}});let A=class extends ye.AccordionElement{constructor(t){super(),C(this,f,void 0),C(this,K,new d.Store(null)),C(this,u,new d.Store([])),C(this,V,void 0),C(this,J,null),C(this,oe,e=>{let r=[],n=[];e.forEach(a=>{r=[...r,...a.removedNodes],n=[...n,...a.addedNodes]}),c(this,u).current=c(this,u).current.filter(a=>!r.includes(a)),c(this,f)&&!c(this,u).current.length&&!n.length&&this.remove()}),this.openShadow(ut),te(this,f,t.key),te(this,V,new MutationObserver(c(this,oe))),b.element(this,{events:{"e-accordion-item-toggle":e=>{e.stopPropagation(),e.detail.opened?x.openPanel(c(this,f)):x.closePanel(c(this,f))}},shadowChildren:[h.div({class:"wrapper",children:[h.div({class:"head",children:[c(this,f)?h.div({class:"name",children:[c(this,f).split(".").slice(-1).toString()]}):null,c(this,K),b.element(Te.arrowIcon,{class:"arrow"})]}),h.div({class:"body",children:h.div({class:"body-content",children:c(this,u),ref:e=>te(this,J,e.firstElementChild)})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return c(this,f)}get head(){return c(this,K)}get content(){return c(this,u)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{x.isPanelOpened(c(this,f))&&this.openAll({skipTransition:!0})},50),c(this,V).observe(c(this,J),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),n=r.slice(0,r.length-t.remainingFolders.length).join("."),a=c(this,u).current.find(o=>o.key===n);a instanceof A?a.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):c(this,u).current=[...c(this,u).current,new A({key:n,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=c(this,u).current.find(r=>r.key===t.store.passport.name);e instanceof X?e.addStore(t.store):c(this,u).current=[...c(this,u).current,new X({store:t.store})]}}};f=new WeakMap;K=new WeakMap;u=new WeakMap;V=new WeakMap;J=new WeakMap;oe=new WeakMap;A=pt([p.define("e-tweaker-folder")],A);var vt=Object.defineProperty,gt=Object.getOwnPropertyDescriptor,ft=(t,e,r,n)=>{for(var a=n>1?void 0:n?gt(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&vt(e,r,a),a},wt=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},le=(t,e,r)=>(wt(t,e,"read from private field"),r?r.call(t):e.get(t)),mt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Y;const bt=m.createStylesheet({":host":{position:"absolute",top:i.aptechkaTheme.tweakerOffset.var,right:i.aptechkaTheme.tweakerOffset.var,width:i.aptechkaTheme.tweakerWidth.var,backgroundColor:i.aptechkaTheme.colorDark.var,borderRadius:i.aptechkaTheme.borderRadius.var,transition:"opacity 0.2s"},":host(:hover)":{opacity:"1 !important"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:i.aptechkaTheme.gapExtraSmall.var},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:i.aptechkaTheme.colorLight.var,transitionProperty:"fill"},".tweaker-button:hover":{fill:i.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
1
|
+
"use strict";var he=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var v=(t,e,r)=>(he(t,e,"read from private field"),r?r.call(t):e.get(t)),z=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$=(t,e,r,n)=>(he(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../browser-CpzFX2xg.cjs"),p=require("../custom-element/index.cjs"),d=require("../Store-D0_rDIsE.cjs"),h=require("../tags-DkAbVUQP.cjs"),m=require("../createStylesheet-C1rimcGc.cjs"),me=require("../file-EevnUtRj.cjs"),be=require("../function-MthRj-GJ.cjs"),ke=require("../Animated-Bf-gPIQM.cjs"),_e=require("../Viewport-COsaberc.cjs"),Se=require("../accordion/index.cjs"),ye=require("../index-vI4hmrI8.cjs"),Te=require("../events-D68xg4dy.cjs"),i=require("../theme/index.cjs"),Ce=require("../math-GDWEqu7y.cjs"),de='<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>',pe='<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>',xe='<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>',$e='<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>';var x,w;class Pe{constructor(){z(this,x,"");z(this,w,[]);$(this,x,d.storeRegistry.projectName+"-studio")}openPanel(e){v(this,w).includes(e)||v(this,w).push(e)}closePanel(e){$(this,w,v(this,w).filter(r=>r!==e))}isPanelOpened(e){return v(this,w).includes(e)}save(){const e={openedPanels:v(this,w)};localStorage.setItem(v(this,x),JSON.stringify(e)),d.storeRegistry.saveState()}load(){d.storeRegistry.loadState();const e=localStorage.getItem(v(this,x));if(e)try{const r=JSON.parse(e);r.openedPanels&&$(this,w,r.openedPanels)}catch(r){console.error(r)}}}x=new WeakMap,w=new WeakMap;const C=new Pe;var _;class A extends p.CustomElement{constructor(...r){super();z(this,_,void 0);$(this,_,r)}addStore(r){v(this,_).push(r)}get firstStore(){return v(this,_)[0]}get stores(){return v(this,_)}updateStores(r){v(this,_).forEach(n=>{n.current=r})}}_=new WeakMap;var Oe=Object.defineProperty,Ee=Object.getOwnPropertyDescriptor,Me=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ee(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&Oe(e,r,a),a};const Re=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{padding:"0",margin:"0",width:`calc(${i.aptechkaTheme.heightInput.var} * 0.5)`,height:`calc(${i.aptechkaTheme.heightInput.var} * 0.5)`,borderRadius:i.aptechkaTheme.borderRadius.var,overflow:"hidden",accentColor:i.aptechkaTheme.colorLight.var}});let te=class extends A{constructor(...t){super(...t),this.openShadow(Re),h.element(this,{shadowChildren:[h.input({attributes:{type:"checkbox"},events:{change:e=>{this.updateStores(e.currentTarget.checked)}},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};te=Me([p.define("e-tweaker-boolean-manager")],te);var De=Object.defineProperty,We=Object.getOwnPropertyDescriptor,Le=(t,e,r,n)=>{for(var a=n>1?void 0:n?We(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&De(e,r,a),a};const Fe=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:i.aptechkaTheme.heightInput.var,padding:"0",background:"none",borderRadius:i.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:i.aptechkaTheme.borderRadius.var,height:`calc(${i.aptechkaTheme.heightInput.var} * 0.93)`}});let re=class extends A{constructor(...t){super(...t),this.openShadow(Fe),h.element(this,{shadowChildren:[h.input({attributes:{type:"color",value:this.firstStore},events:{input:e=>{this.updateStores(e.currentTarget.value)}}})]})}};re=Le([p.define("e-tweaker-color-manager")],re);var Ae=Object.defineProperty,Ie=Object.getOwnPropertyDescriptor,ze=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ie(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&Ae(e,r,a),a};const qe=m.createStylesheet({a:{color:"inherit"}});let ae=class extends A{constructor(...t){var e,r;super(...t),this.openShadow(qe),h.element(this,{shadowChildren:[h.a({attributes:{href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank"},children:this.firstStore})]})}};ae=ze([p.define("e-tweaker-link-manager")],ae);var Ne=Object.defineProperty,He=Object.getOwnPropertyDescriptor,Ze=(t,e,r,n)=>{for(var a=n>1?void 0:n?He(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&Ne(e,r,a),a},Ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},X=(t,e,r)=>(Ge(t,e,"read from private field"),r?r.call(t):e.get(t)),Ke=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},P;const Ve=m.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:i.aptechkaTheme.fontSizeSmall.var},".text-input":{height:i.aptechkaTheme.heightInput.var,width:"100%",margin:"0",padding:`0 ${i.aptechkaTheme.gapSmall.var}`,backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:i.aptechkaTheme.borderRadius.var}});let B=class extends A{constructor(...t){super(...t),Ke(this,P,new d.Store([])),this.openShadow(Ve),h.element(this,{shadowChildren:[h.input({class:"text-input",attributes:{type:"string",value:this.firstStore},events:{change:e=>{this.updateStores(e.currentTarget.value)}}}),X(this,P)]})}appendContent(t){X(this,P).current=[...X(this,P).current,t]}};P=new WeakMap;B=Ze([p.define("e-tweaker-string-manager")],B);var Je=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,Be=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ye(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&Je(e,r,a),a},ue=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},k=(t,e,r)=>(ue(t,e,"read from private field"),r?r.call(t):e.get(t)),q=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},j=(t,e,r,n)=>(ue(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),O,E,M,N;let Q=class extends B{constructor(...t){var e,r,n,a,o,s;super(...t),q(this,O,void 0),q(this,E,void 0),q(this,M,void 0),q(this,N,b=>{const I=typeof b=="string"?parseFloat(b)||this.min:b,fe=Ce.clamp(I,k(this,E),k(this,M));return this.toFixed(fe)}),j(this,E,((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min)||0),j(this,M,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.max)||1),j(this,O,((s=(o=this.firstStore.passport)==null?void 0:o.manager)==null?void 0:s.step)||.01)}get min(){return k(this,E)}get max(){return k(this,M)}get step(){return k(this,O)}toFixed(t){var r;const e=((r=k(this,O).toString().split(".")[1])==null?void 0:r.length)||0;return e?+t.toFixed(e):Math.ceil(t)}connectedCallback(){this.firstStore.addMiddleware(k(this,N))}disconnectedCallback(){this.firstStore.removeMiddleware(k(this,N))}};O=new WeakMap;E=new WeakMap;M=new WeakMap;N=new WeakMap;Q=Be([p.define("e-tweaker-number-manager")],Q);var Qe=Object.defineProperty,Ue=Object.getOwnPropertyDescriptor,Xe=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ue(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&Qe(e,r,a),a};const je=m.createStylesheet({":host":{width:"100%"},".text-input":{width:"60px",marginRight:i.aptechkaTheme.gapLarge.var,textAlign:"center"},".range-input":{boxSizing:"border-box","-webkit-appearance":"none",height:"8px",width:"100%",margin:"0",padding:"0",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:i.aptechkaTheme.borderRadius.var},".range-input::-webkit-slider-thumb":{"-webkit-appearance":"none",height:`calc(${i.aptechkaTheme.heightInput.var} * 0.7)`,width:i.aptechkaTheme.borderRadius.var,borderRadius:i.aptechkaTheme.borderRadius.var,backgroundColor:i.aptechkaTheme.colorLight.var,transitionProperty:"background-color",transitionDuration:i.aptechkaTheme.durationShort.var},".range-input:focus::-webkit-slider-thumb":{backgroundColor:i.aptechkaTheme.colorActive.var},".range-input::-webkit-slider-runnable-track":{"-webkit-appearance":"none","box-shadow":"none",border:"none",background:"transparent"}});let ne=class extends Q{constructor(...t){super(...t),this.addStylesheet(je),this.appendContent(h.input({class:"range-input",attributes:{type:"range",min:this.min,max:this.max,step:this.step,value:this.firstStore},events:{input:e=>{this.updateStores(parseFloat(e.currentTarget.value))}}}))}};ne=Xe([p.define("e-tweaker-range-manager")],ne);var et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,rt=(t,e,r,n)=>{for(var a=n>1?void 0:n?tt(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&et(e,r,a),a};const at=m.createStylesheet({"e-select":{width:"100%","--arrow-color":i.aptechkaTheme.colorLight.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:i.aptechkaTheme.durationShort.var,transitionProperty:"color"},"e-select-option:hover":{color:i.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:i.aptechkaTheme.colorLight.var,transitionProperty:"transform",transitionDuration:i.aptechkaTheme.durationShort.var},".opened svg":{transform:"scaleY(-1)"}});let se=class extends A{constructor(...t){var r,n;super(...t),this.openShadow(at);const e=((n=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:n.variants)||[];h.element(this,{shadowChildren:h.custom("e-select",{attributes:{value:this.firstStore},events:{change:a=>{this.updateStores(a.currentTarget.value)}},children:[h.custom("e-select-head",{children:[h.span({attributes:{"data-value-holder":""}})]}),...e.map((a,o)=>h.custom("e-select-option",{children:a,attributes:{default:o===0?!0:null}}))]})})}};se=rt([p.define("e-tweaker-select-manager")],se);const nt={boolean:te,color:re,link:ae,number:Q,range:ne,select:se,string:B};var st=Object.defineProperty,it=Object.getOwnPropertyDescriptor,ot=(t,e,r,n)=>{for(var a=n>1?void 0:n?it(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&st(e,r,a),a},ve=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(ve(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},y=(t,e,r,n)=>(ve(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),g,R,D,W,L,H,Z;const ht=m.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.3fr 1fr",alignItems:"center",color:i.aptechkaTheme.colorLight.var,gap:i.aptechkaTheme.gapMedium.var},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:i.aptechkaTheme.fontSizeMedium.var,display:"flex",alignItems:"center",gap:i.aptechkaTheme.gapExtraSmall.var},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:i.aptechkaTheme.colorLight.var,transitionDuration:i.aptechkaTheme.durationShort.var,transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:i.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let U=class extends p.CustomElement{constructor(t){var r,n,a,o;super(),S(this,g,[]),S(this,R,void 0),S(this,D,void 0),S(this,W,!1),S(this,L,void 0),S(this,H,()=>{d.activeStores.current.find(s=>l(this,g).includes(s))||this.remove()}),S(this,Z,s=>{l(this,W)&&((s.metaKey||s.ctrlKey)&&s.code==="KeyC"?navigator.clipboard.writeText(l(this,g)[0].current):(s.metaKey||s.ctrlKey)&&s.code==="KeyR"&&(l(this,g).forEach(b=>{b.reset()}),s.preventDefault()))}),y(this,g,[t.store]),y(this,R,t.store.passport.name),y(this,D,l(this,R).split(".").slice(-1).toString());const e=((n=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:n.type)||"string";y(this,L,new nt[e](l(this,g)[0])),this.openShadow(ht),h.element(this,{class:{disabled:((o=(a=t.store.passport)==null?void 0:a.manager)==null?void 0:o.disabled)||!1},events:{pointerleave:()=>{y(this,W,!1)},pointerenter:()=>{y(this,W,!0)}},shadowChildren:[h.div({class:"head",children:[h.div({class:"name",children:l(this,D)+":"}),h.div({class:"head-buttons",children:[h.button({class:"head-button",children:pe,events:{click:()=>{navigator.clipboard.writeText(l(this,g)[0].current)}}}),h.button({class:"head-button",children:de,events:{click:()=>{l(this,g).forEach(s=>{s.reset()})}}})]})]}),l(this,L)]})}get key(){return l(this,R)}get name(){return l(this,D)}get stores(){return l(this,g)}addStore(t){l(this,L).addStore(t)}connectedCallback(){d.activeStores.subscribe(l(this,H)),addEventListener("keydown",l(this,Z)),Te.dispatchSizeChangeEvent(this)}disconnectedCallback(){d.activeStores.unsubscribe(l(this,H)),removeEventListener("keydown",l(this,Z))}};g=new WeakMap;R=new WeakMap;D=new WeakMap;W=new WeakMap;L=new WeakMap;H=new WeakMap;Z=new WeakMap;U=ot([p.define("e-tweaker-field")],U);var ct=Object.defineProperty,lt=Object.getOwnPropertyDescriptor,dt=(t,e,r,n)=>{for(var a=n>1?void 0:n?lt(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&ct(e,r,a),a},ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},c=(t,e,r)=>(ge(t,e,"read from private field"),r?r.call(t):e.get(t)),T=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ee=(t,e,r,n)=>(ge(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),f,G,u,K,V,ie;const pt=m.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:i.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:i.aptechkaTheme.tweakerFolderHeight.var,paddingLeft:i.aptechkaTheme.gapMedium.var,paddingRight:i.aptechkaTheme.gapMedium.var,display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:i.aptechkaTheme.colorDarkAux.var,borderRadius:i.aptechkaTheme.borderRadius.var},".name":{fontSize:i.aptechkaTheme.fontSizeLarge.var,color:i.aptechkaTheme.colorLight.var},".body":{transitionProperty:"height",transitionDuration:i.aptechkaTheme.durationShort.var,overflow:"hidden",height:"0px"},".body-content":{boxSizing:"border-box",padding:i.aptechkaTheme.gapLarge.var,display:"grid",gap:i.aptechkaTheme.gapMedium.var},".arrow":{width:"20px",height:"20px",fill:i.aptechkaTheme.colorLight.var,transition:`transform ${i.aptechkaTheme.durationShort.var}`},".opened .arrow":{transform:"scaleY(-1)"}});let F=class extends Se.AccordionElement{constructor(t){super(),T(this,f,void 0),T(this,G,new d.Store(null)),T(this,u,new d.Store([])),T(this,K,void 0),T(this,V,null),T(this,ie,e=>{let r=[],n=[];e.forEach(a=>{r=[...r,...a.removedNodes],n=[...n,...a.addedNodes]}),c(this,u).current=c(this,u).current.filter(a=>!r.includes(a)),c(this,f)&&!c(this,u).current.length&&!n.length&&this.remove()}),this.openShadow(pt),ee(this,f,t.key),ee(this,K,new MutationObserver(c(this,ie))),h.element(this,{events:{"e-accordion-item-toggle":e=>{e.stopPropagation(),e.detail.opened?C.openPanel(c(this,f)):C.closePanel(c(this,f))}},shadowChildren:[h.div({class:"wrapper",children:[h.div({class:"head",children:[c(this,f)?h.div({class:"name",children:[c(this,f).split(".").slice(-1).toString()]}):null,c(this,G),h.element(ye.arrowIcon,{class:"arrow"})]}),h.div({class:"body",children:h.div({class:"body-content",children:c(this,u),ref:e=>ee(this,V,e.firstElementChild)})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return c(this,f)}get head(){return c(this,G)}get content(){return c(this,u)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{C.isPanelOpened(c(this,f))&&this.openAll({skipTransition:!0})},50),c(this,K).observe(c(this,V),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),n=r.slice(0,r.length-t.remainingFolders.length).join("."),a=c(this,u).current.find(o=>o.key===n);a instanceof F?a.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):c(this,u).current=[...c(this,u).current,new F({key:n,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=c(this,u).current.find(r=>r.key===t.store.passport.name);e instanceof U?e.addStore(t.store):c(this,u).current=[...c(this,u).current,new U({store:t.store})]}}};f=new WeakMap;G=new WeakMap;u=new WeakMap;K=new WeakMap;V=new WeakMap;ie=new WeakMap;F=dt([p.define("e-tweaker-folder")],F);var ut=Object.defineProperty,vt=Object.getOwnPropertyDescriptor,gt=(t,e,r,n)=>{for(var a=n>1?void 0:n?vt(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&ut(e,r,a),a},ft=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},ce=(t,e,r)=>(ft(t,e,"read from private field"),r?r.call(t):e.get(t)),wt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},J;const mt=m.createStylesheet({":host":{position:"absolute",top:i.aptechkaTheme.tweakerOffset.var,right:i.aptechkaTheme.tweakerOffset.var,width:i.aptechkaTheme.tweakerWidth.var,backgroundColor:i.aptechkaTheme.colorDark.var,borderRadius:i.aptechkaTheme.borderRadius.var,transition:"opacity 0.2s",zIndex:"100"},":host(:hover)":{opacity:"1 !important"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:i.aptechkaTheme.gapExtraSmall.var},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:i.aptechkaTheme.colorLight.var,transitionProperty:"fill"},".tweaker-button:hover":{fill:i.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
2
2
|
100dvh -
|
|
3
3
|
(
|
|
4
4
|
${i.aptechkaTheme.tweakerOffset.var} * 2 +
|
|
5
5
|
${i.aptechkaTheme.tweakerFolderHeight.var}
|
|
6
6
|
)
|
|
7
|
-
)`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${
|
|
7
|
+
)`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${_e.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100%",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
|
|
8
8
|
100dvh -
|
|
9
9
|
${i.aptechkaTheme.tweakerFolderHeight.var}
|
|
10
|
-
)`}}});let
|
|
10
|
+
)`}}});let oe=class extends F{constructor(){super({key:""}),wt(this,J,be.debounce(()=>{d.activeStores.current.forEach(t=>{if(!(t instanceof ke.Animated)){const e=t.passport.name.split(".");this.handleStore({store:t,remainingFolders:e.length>1?e.slice(0,-1):[]})}})},10)),this.addStylesheet(mt),this.head.current=[h.div({class:"tweaker-buttons",events:{click:t=>{t.stopPropagation()}},children:[h.button({class:"tweaker-button",children:de,events:{click:()=>{d.storeRegistry.resetState()}}}),h.button({class:["tweaker-button"],children:[pe],events:{click:()=>{navigator.clipboard.writeText(JSON.stringify(d.storeRegistry.getState()))}}}),h.button({class:"tweaker-button",children:xe,events:{click:()=>{me.createJSONAndSave(d.storeRegistry.projectName,d.storeRegistry.getState())}}}),h.label({class:"tweaker-button",children:[$e,h.input({attributes:{type:"file"},style:{display:"none"},events:{change:t=>{const e=t.currentTarget;e.onchange=()=>{var n;const r=(n=e.files)==null?void 0:n[0];if(r){const a=new FileReader;a.onload=o=>{var b,I;const s=(I=(b=o.target)==null?void 0:b.result)==null?void 0:I.toString();s&&d.storeRegistry.loadState(s)},a.readAsText(r)}e.onchange=null},e.click()}}})],events:{click:()=>{}}})]})],this.addEventListener("e-accordion-item-toggle",t=>{t.detail.opened?this.style.opacity="1":this.style.opacity="0.1"})}connectedCallback(){super.connectedCallback(),d.activeStores.subscribe(ce(this,J))}disconnectedCallback(){super.disconnectedCallback(),d.activeStores.unsubscribe(ce(this,J))}};J=new WeakMap;oe=gt([p.define("e-tweaker")],oe);var bt=Object.defineProperty,kt=Object.getOwnPropertyDescriptor,_t=(t,e,r,n)=>{for(var a=n>1?void 0:n?kt(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(a=(n?s(e,r,a):s(a))||a);return n&&a&&bt(e,r,a),a},St=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},le=(t,e,r)=>(St(t,e,"read from private field"),r?r.call(t):e.get(t)),yt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Y;const Tt=m.createStylesheet({":host":{fontFamily:"sans-serif"}});exports.StudioElement=class extends p.CustomElement{constructor(){super(),yt(this,Y,()=>{C.save()}),this.openShadow(Tt),C.load(),h.element(this,{shadowChildren:[new oe]})}connectedCallback(){window.addEventListener("beforeunload",le(this,Y))}disconnectedCallback(){window.removeEventListener("beforeunload",le(this,Y)),C.save()}};Y=new WeakMap;exports.StudioElement=_t([p.define("e-studio")],exports.StudioElement);we.isBrowser&&document.body.appendChild(new exports.StudioElement);
|
package/lib/studio/index.js
CHANGED
|
@@ -9,16 +9,15 @@ var d = (t, e, r) => (fe(t, e, "read from private field"), r ? r.call(t) : e.get
|
|
|
9
9
|
}, M = (t, e, r, s) => (fe(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
|
|
10
10
|
import { i as xe } from "../browser-0zX67oeU.js";
|
|
11
11
|
import { CustomElement as ge, define as p } from "../custom-element/index.js";
|
|
12
|
-
import { e as m } from "../ElementConstructor-CoKM2CTK.js";
|
|
13
|
-
import { c as f } from "../createStylesheet-BON7aJYs.js";
|
|
14
12
|
import { s as S, S as ie, a as $ } from "../Store-JOKrNVEr.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
13
|
+
import { e as m, a0 as N, a as $e, aY as re, aB as Pe, D as w, p as I, a3 as Oe } from "../tags-D-lzPz_v.js";
|
|
14
|
+
import { c as f } from "../createStylesheet-BSXZrWW6.js";
|
|
15
|
+
import { c as Me } from "../file-lxi_oXJf.js";
|
|
16
|
+
import { d as Ee } from "../function-C10DGppn.js";
|
|
17
|
+
import { A as Te } from "../Animated-Br_4OSth.js";
|
|
19
18
|
import { a as De } from "../Viewport-CXY5xcGJ.js";
|
|
20
|
-
import { AccordionElement as
|
|
21
|
-
import { a as
|
|
19
|
+
import { AccordionElement as Re } from "../accordion/index.js";
|
|
20
|
+
import { a as We } from "../index-dBwVZz_v.js";
|
|
22
21
|
import { d as Le } from "../events-CoqmkUxo.js";
|
|
23
22
|
import { aptechkaTheme as i } from "../theme/index.js";
|
|
24
23
|
import { c as Fe } from "../math-BOBiC4TN.js";
|
|
@@ -179,10 +178,10 @@ let le = class extends H {
|
|
|
179
178
|
le = Ve([
|
|
180
179
|
p("e-tweaker-color-manager")
|
|
181
180
|
], le);
|
|
182
|
-
var
|
|
183
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
181
|
+
var Be = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, Qe = (t, e, r, s) => {
|
|
182
|
+
for (var a = s > 1 ? void 0 : s ? qe(e, r) : e, o = t.length - 1, n; o >= 0; o--)
|
|
184
183
|
(n = t[o]) && (a = (s ? n(e, r, a) : n(a)) || a);
|
|
185
|
-
return s && a &&
|
|
184
|
+
return s && a && Be(e, r, a), a;
|
|
186
185
|
};
|
|
187
186
|
const Ue = f({
|
|
188
187
|
a: {
|
|
@@ -194,7 +193,7 @@ let he = class extends H {
|
|
|
194
193
|
var e, r;
|
|
195
194
|
super(...t), this.openShadow(Ue), m(this, {
|
|
196
195
|
shadowChildren: [
|
|
197
|
-
|
|
196
|
+
$e({
|
|
198
197
|
attributes: {
|
|
199
198
|
href: this.firstStore,
|
|
200
199
|
target: (r = (e = this.firstStore.passport) == null ? void 0 : e.manager) != null && r.sameWindow ? "_self" : "_blank"
|
|
@@ -285,20 +284,20 @@ var st = Object.defineProperty, nt = Object.getOwnPropertyDescriptor, it = (t, e
|
|
|
285
284
|
if (e.has(t))
|
|
286
285
|
throw TypeError("Cannot add the same private member more than once");
|
|
287
286
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
288
|
-
}, se = (t, e, r, s) => (Se(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r), T, D,
|
|
287
|
+
}, se = (t, e, r, s) => (Se(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r), T, D, R, J;
|
|
289
288
|
let ee = class extends j {
|
|
290
289
|
constructor(...t) {
|
|
291
290
|
var e, r, s, a, o, n;
|
|
292
|
-
super(...t), K(this, T, void 0), K(this, D, void 0), K(this,
|
|
293
|
-
const Z = typeof b == "string" ? parseFloat(b) || this.min : b, ke = Fe(Z, _(this, D), _(this,
|
|
291
|
+
super(...t), K(this, T, void 0), K(this, D, void 0), K(this, R, void 0), K(this, J, (b) => {
|
|
292
|
+
const Z = typeof b == "string" ? parseFloat(b) || this.min : b, ke = Fe(Z, _(this, D), _(this, R));
|
|
294
293
|
return this.toFixed(ke);
|
|
295
|
-
}), se(this, D, ((r = (e = this.firstStore.passport) == null ? void 0 : e.manager) == null ? void 0 : r.min) || 0), se(this,
|
|
294
|
+
}), se(this, D, ((r = (e = this.firstStore.passport) == null ? void 0 : e.manager) == null ? void 0 : r.min) || 0), se(this, R, ((a = (s = this.firstStore.passport) == null ? void 0 : s.manager) == null ? void 0 : a.max) || 1), se(this, T, ((n = (o = this.firstStore.passport) == null ? void 0 : o.manager) == null ? void 0 : n.step) || 0.01);
|
|
296
295
|
}
|
|
297
296
|
get min() {
|
|
298
297
|
return _(this, D);
|
|
299
298
|
}
|
|
300
299
|
get max() {
|
|
301
|
-
return _(this,
|
|
300
|
+
return _(this, R);
|
|
302
301
|
}
|
|
303
302
|
get step() {
|
|
304
303
|
return _(this, T);
|
|
@@ -317,7 +316,7 @@ let ee = class extends j {
|
|
|
317
316
|
};
|
|
318
317
|
T = /* @__PURE__ */ new WeakMap();
|
|
319
318
|
D = /* @__PURE__ */ new WeakMap();
|
|
320
|
-
|
|
319
|
+
R = /* @__PURE__ */ new WeakMap();
|
|
321
320
|
J = /* @__PURE__ */ new WeakMap();
|
|
322
321
|
ee = it([
|
|
323
322
|
p("e-tweaker-number-manager")
|
|
@@ -443,7 +442,7 @@ let de = class extends H {
|
|
|
443
442
|
children: [
|
|
444
443
|
re("e-select-head", {
|
|
445
444
|
children: [
|
|
446
|
-
|
|
445
|
+
Pe({
|
|
447
446
|
attributes: {
|
|
448
447
|
"data-value-holder": ""
|
|
449
448
|
}
|
|
@@ -486,7 +485,7 @@ var ft = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, mt = (t, e
|
|
|
486
485
|
if (e.has(t))
|
|
487
486
|
throw TypeError("Cannot add the same private member more than once");
|
|
488
487
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
489
|
-
}, k = (t, e, r, s) => (ye(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r), u,
|
|
488
|
+
}, k = (t, e, r, s) => (ye(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r), u, W, L, F, A, V, Y;
|
|
490
489
|
const bt = f({
|
|
491
490
|
":host": {
|
|
492
491
|
display: "grid",
|
|
@@ -535,13 +534,13 @@ const bt = f({
|
|
|
535
534
|
let te = class extends ge {
|
|
536
535
|
constructor(t) {
|
|
537
536
|
var r, s, a, o;
|
|
538
|
-
super(), C(this, u, []), C(this,
|
|
537
|
+
super(), C(this, u, []), C(this, W, void 0), C(this, L, void 0), C(this, F, !1), C(this, A, void 0), C(this, V, () => {
|
|
539
538
|
$.current.find((n) => h(this, u).includes(n)) || this.remove();
|
|
540
539
|
}), C(this, Y, (n) => {
|
|
541
540
|
h(this, F) && ((n.metaKey || n.ctrlKey) && n.code === "KeyC" ? navigator.clipboard.writeText(h(this, u)[0].current) : (n.metaKey || n.ctrlKey) && n.code === "KeyR" && (h(this, u).forEach((b) => {
|
|
542
541
|
b.reset();
|
|
543
542
|
}), n.preventDefault()));
|
|
544
|
-
}), k(this, u, [t.store]), k(this,
|
|
543
|
+
}), k(this, u, [t.store]), k(this, W, t.store.passport.name), k(this, L, h(this, W).split(".").slice(-1).toString());
|
|
545
544
|
const e = ((s = (r = t.store.passport) == null ? void 0 : r.manager) == null ? void 0 : s.type) || "string";
|
|
546
545
|
k(this, A, new gt[e](h(this, u)[0])), this.openShadow(bt), m(this, {
|
|
547
546
|
class: {
|
|
@@ -592,7 +591,7 @@ let te = class extends ge {
|
|
|
592
591
|
});
|
|
593
592
|
}
|
|
594
593
|
get key() {
|
|
595
|
-
return h(this,
|
|
594
|
+
return h(this, W);
|
|
596
595
|
}
|
|
597
596
|
get name() {
|
|
598
597
|
return h(this, L);
|
|
@@ -611,7 +610,7 @@ let te = class extends ge {
|
|
|
611
610
|
}
|
|
612
611
|
};
|
|
613
612
|
u = /* @__PURE__ */ new WeakMap();
|
|
614
|
-
|
|
613
|
+
W = /* @__PURE__ */ new WeakMap();
|
|
615
614
|
L = /* @__PURE__ */ new WeakMap();
|
|
616
615
|
F = /* @__PURE__ */ new WeakMap();
|
|
617
616
|
A = /* @__PURE__ */ new WeakMap();
|
|
@@ -631,7 +630,7 @@ var _t = Object.defineProperty, St = Object.getOwnPropertyDescriptor, yt = (t, e
|
|
|
631
630
|
if (e.has(t))
|
|
632
631
|
throw TypeError("Cannot add the same private member more than once");
|
|
633
632
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
634
|
-
}, ne = (t, e, r, s) => (Ce(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r), v,
|
|
633
|
+
}, ne = (t, e, r, s) => (Ce(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r), v, B, c, q, Q, pe;
|
|
635
634
|
const Ct = f({
|
|
636
635
|
".wrapper": {
|
|
637
636
|
boxSizing: "border-box",
|
|
@@ -676,16 +675,16 @@ const Ct = f({
|
|
|
676
675
|
transform: "scaleY(-1)"
|
|
677
676
|
}
|
|
678
677
|
});
|
|
679
|
-
let z = class extends
|
|
678
|
+
let z = class extends Re {
|
|
680
679
|
constructor(t) {
|
|
681
|
-
super(), x(this, v, void 0), x(this,
|
|
680
|
+
super(), x(this, v, void 0), x(this, B, new ie(null)), x(this, c, new ie([])), x(this, q, void 0), x(this, Q, null), x(this, pe, (e) => {
|
|
682
681
|
let r = [], s = [];
|
|
683
682
|
e.forEach((a) => {
|
|
684
683
|
r = [...r, ...a.removedNodes], s = [...s, ...a.addedNodes];
|
|
685
684
|
}), l(this, c).current = l(this, c).current.filter(
|
|
686
685
|
(a) => !r.includes(a)
|
|
687
686
|
), l(this, v) && !l(this, c).current.length && !s.length && this.remove();
|
|
688
|
-
}), this.openShadow(Ct), ne(this, v, t.key), ne(this,
|
|
687
|
+
}), this.openShadow(Ct), ne(this, v, t.key), ne(this, q, new MutationObserver(l(this, pe))), m(this, {
|
|
689
688
|
events: {
|
|
690
689
|
"e-accordion-item-toggle": (e) => {
|
|
691
690
|
e.stopPropagation(), e.detail.opened ? P.openPanel(l(this, v)) : P.closePanel(l(this, v));
|
|
@@ -702,8 +701,8 @@ let z = class extends We {
|
|
|
702
701
|
class: "name",
|
|
703
702
|
children: [l(this, v).split(".").slice(-1).toString()]
|
|
704
703
|
}) : null,
|
|
705
|
-
l(this,
|
|
706
|
-
m(
|
|
704
|
+
l(this, B),
|
|
705
|
+
m(We, {
|
|
707
706
|
class: "arrow"
|
|
708
707
|
})
|
|
709
708
|
]
|
|
@@ -725,7 +724,7 @@ let z = class extends We {
|
|
|
725
724
|
return l(this, v);
|
|
726
725
|
}
|
|
727
726
|
get head() {
|
|
728
|
-
return l(this,
|
|
727
|
+
return l(this, B);
|
|
729
728
|
}
|
|
730
729
|
get content() {
|
|
731
730
|
return l(this, c);
|
|
@@ -733,7 +732,7 @@ let z = class extends We {
|
|
|
733
732
|
connectedCallback() {
|
|
734
733
|
super.connectedCallback(), setTimeout(() => {
|
|
735
734
|
P.isPanelOpened(l(this, v)) && this.openAll({ skipTransition: !0 });
|
|
736
|
-
}, 50), l(this,
|
|
735
|
+
}, 50), l(this, q).observe(l(this, Q), {
|
|
737
736
|
childList: !0
|
|
738
737
|
});
|
|
739
738
|
}
|
|
@@ -767,9 +766,9 @@ let z = class extends We {
|
|
|
767
766
|
}
|
|
768
767
|
};
|
|
769
768
|
v = /* @__PURE__ */ new WeakMap();
|
|
770
|
-
q = /* @__PURE__ */ new WeakMap();
|
|
771
|
-
c = /* @__PURE__ */ new WeakMap();
|
|
772
769
|
B = /* @__PURE__ */ new WeakMap();
|
|
770
|
+
c = /* @__PURE__ */ new WeakMap();
|
|
771
|
+
q = /* @__PURE__ */ new WeakMap();
|
|
773
772
|
Q = /* @__PURE__ */ new WeakMap();
|
|
774
773
|
pe = /* @__PURE__ */ new WeakMap();
|
|
775
774
|
z = yt([
|
|
@@ -795,7 +794,8 @@ const Mt = f({
|
|
|
795
794
|
width: i.tweakerWidth.var,
|
|
796
795
|
backgroundColor: i.colorDark.var,
|
|
797
796
|
borderRadius: i.borderRadius.var,
|
|
798
|
-
transition: "opacity 0.2s"
|
|
797
|
+
transition: "opacity 0.2s",
|
|
798
|
+
zIndex: "100"
|
|
799
799
|
},
|
|
800
800
|
":host(:hover)": {
|
|
801
801
|
opacity: "1 !important"
|
|
@@ -858,7 +858,7 @@ let ue = class extends z {
|
|
|
858
858
|
constructor() {
|
|
859
859
|
super({
|
|
860
860
|
key: ""
|
|
861
|
-
}), Ot(this, U,
|
|
861
|
+
}), Ot(this, U, Ee(() => {
|
|
862
862
|
$.current.forEach((t) => {
|
|
863
863
|
if (!(t instanceof Te)) {
|
|
864
864
|
const e = t.passport.name.split(".");
|
|
@@ -902,14 +902,14 @@ let ue = class extends z {
|
|
|
902
902
|
children: Ae,
|
|
903
903
|
events: {
|
|
904
904
|
click: () => {
|
|
905
|
-
|
|
905
|
+
Me(
|
|
906
906
|
S.projectName,
|
|
907
907
|
S.getState()
|
|
908
908
|
);
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
911
|
}),
|
|
912
|
-
|
|
912
|
+
Oe({
|
|
913
913
|
class: "tweaker-button",
|
|
914
914
|
children: [
|
|
915
915
|
Ie,
|
|
@@ -966,10 +966,10 @@ var Et = Object.defineProperty, Tt = Object.getOwnPropertyDescriptor, Dt = (t, e
|
|
|
966
966
|
for (var a = s > 1 ? void 0 : s ? Tt(e, r) : e, o = t.length - 1, n; o >= 0; o--)
|
|
967
967
|
(n = t[o]) && (a = (s ? n(e, r, a) : n(a)) || a);
|
|
968
968
|
return s && a && Et(e, r, a), a;
|
|
969
|
-
},
|
|
969
|
+
}, Rt = (t, e, r) => {
|
|
970
970
|
if (!e.has(t))
|
|
971
971
|
throw TypeError("Cannot " + r);
|
|
972
|
-
}, me = (t, e, r) => (
|
|
972
|
+
}, me = (t, e, r) => (Rt(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Wt = (t, e, r) => {
|
|
973
973
|
if (e.has(t))
|
|
974
974
|
throw TypeError("Cannot add the same private member more than once");
|
|
975
975
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
@@ -981,7 +981,7 @@ const Lt = f({
|
|
|
981
981
|
});
|
|
982
982
|
let ve = class extends ge {
|
|
983
983
|
constructor() {
|
|
984
|
-
super(),
|
|
984
|
+
super(), Wt(this, X, () => {
|
|
985
985
|
P.save();
|
|
986
986
|
}), this.openShadow(Lt), P.load(), m(this, {
|
|
987
987
|
shadowChildren: [new ue()]
|