aptechka 0.13.0 → 0.14.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-seVC6-fS.cjs → Animation-De9aUv3b.cjs} +1 -1
- package/lib/{Animation-DF5jPON_.js → Animation-NAGXiFv5.js} +1 -1
- package/lib/{Composed-ChlKoJEp.cjs → Composed-C_4slJQ6.cjs} +1 -1
- package/lib/{Composed-CoX1ImVk.js → Composed-CfWa-69I.js} +1 -1
- package/lib/{Damped-C7WAqKPh.cjs → Damped-DYJ6Z0xo.cjs} +1 -1
- package/lib/{Damped-BDO-F13V.js → Damped-DbJKrUIf.js} +1 -1
- package/lib/Derived-BIBU-y7Z.cjs +1 -0
- package/lib/Derived-Vo_RsJfi.js +23 -0
- package/lib/{SourceManager-B8-EMNnd.js → SourceManager-B6wZpXUZ.js} +1 -1
- package/lib/{SourceManager-TzU9Rw08.cjs → SourceManager-CfHcGLUa.cjs} +1 -1
- package/lib/Store-C46i0nvr.js +137 -0
- package/lib/Store-npaZHvX4.cjs +1 -0
- package/lib/{Tweened-DSXD0I0k.cjs → Tweened-BkkD9s4n.cjs} +1 -1
- package/lib/{Tweened-CHhmfvzo.js → Tweened-DOSHLCZa.js} +1 -1
- package/lib/{Viewport-DTlImj28.js → Viewport-B55BvLsV.js} +1 -1
- package/lib/{Viewport-BmLTk_6k.cjs → Viewport-Cv4TRGiv.cjs} +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +13 -13
- package/lib/canvas/index.cjs +7 -1
- package/lib/canvas/index.js +54 -58
- 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/{createStylesheet-DO5t5q-m.js → createStylesheet-C68ja-RS.js} +3 -3
- package/lib/{createStylesheet-CaDI99iu.cjs → createStylesheet-Csfmh-MH.cjs} +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +4 -4
- 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/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +133 -122
- package/lib/element-resizer/index.js +8 -8
- package/lib/en3/helpers/index.cjs +1 -1
- package/lib/en3/helpers/index.js +4 -4
- package/lib/en3/index.js +1 -1
- package/lib/en3/loaders/index.js +1 -1
- package/lib/en3/misc/index.cjs +1 -1
- package/lib/en3/misc/index.js +2 -2
- package/lib/en3/utils/index.js +2 -2
- package/lib/{en3-x-Ki30MY.js → en3-sK9Z-fp2.js} +1 -1
- package/lib/file-BEr-o55N.js +31 -0
- package/lib/file-C9BbxzVU.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/intersector/index.js +7 -7
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/lib/layout-box/index.js +14 -14
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/need_redo_tweaker/index.cjs +18 -0
- package/lib/need_redo_tweaker/index.js +1343 -0
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +3 -3
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +60 -62
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +105 -106
- package/lib/scroll-entries/index.js +15 -15
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +1 -1
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +55 -86
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +38 -112
- package/lib/{tags-v-OSVkiQ.cjs → tags-6_ETuR75.cjs} +1 -1
- package/lib/{tags-4AoxVUe3.js → tags-zft1DGBz.js} +93 -93
- package/lib/ticker/index.js +1 -1
- package/lib/{traverseMaterials-mGC2_FkG.js → traverseMaterials-BlZbRhgW.js} +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +56 -57
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +1 -1
- package/package.json +7 -55
- package/lib/Derived-B-2UXnVE.cjs +0 -1
- package/lib/Derived-CDGpSMKu.js +0 -56
- package/lib/Store-BnA-dJsE.cjs +0 -1
- package/lib/Store-DGtldlBH.js +0 -147
- package/lib/accordion/index.cjs +0 -1
- package/lib/accordion/index.js +0 -167
- package/lib/checkbox/index.cjs +0 -1
- package/lib/checkbox/index.js +0 -112
- package/lib/createTheme-CHnsCgAr.js +0 -15
- package/lib/createTheme-Cfaw9UmV.cjs +0 -1
- package/lib/events-BGwqaxVW.cjs +0 -1
- package/lib/events-CJTUMSLU.js +0 -20
- package/lib/file-EevnUtRj.cjs +0 -1
- package/lib/file-lxi_oXJf.js +0 -13
- package/lib/index-BhbT9PrL.js +0 -261
- package/lib/index-BpsQqM-8.cjs +0 -9
- package/lib/modal/index.cjs +0 -1
- package/lib/modal/index.js +0 -133
- package/lib/select/index.cjs +0 -1
- package/lib/select/index.js +0 -7
- package/lib/svg-path-data/index.cjs +0 -3
- package/lib/svg-path-data/index.js +0 -490
- package/lib/theme/index.cjs +0 -1
- package/lib/theme/index.js +0 -25
- package/lib/tweaker/index.cjs +0 -10
- package/lib/tweaker/index.js +0 -992
|
@@ -1,490 +0,0 @@
|
|
|
1
|
-
// @license
|
|
2
|
-
(!SVGPathElement.prototype.getPathData || !SVGPathElement.prototype.setPathData) && function() {
|
|
3
|
-
var V = {
|
|
4
|
-
Z: "Z",
|
|
5
|
-
M: "M",
|
|
6
|
-
L: "L",
|
|
7
|
-
C: "C",
|
|
8
|
-
Q: "Q",
|
|
9
|
-
A: "A",
|
|
10
|
-
H: "H",
|
|
11
|
-
V: "V",
|
|
12
|
-
S: "S",
|
|
13
|
-
T: "T",
|
|
14
|
-
z: "Z",
|
|
15
|
-
m: "m",
|
|
16
|
-
l: "l",
|
|
17
|
-
c: "c",
|
|
18
|
-
q: "q",
|
|
19
|
-
a: "a",
|
|
20
|
-
h: "h",
|
|
21
|
-
v: "v",
|
|
22
|
-
s: "s",
|
|
23
|
-
t: "t"
|
|
24
|
-
}, M = function(n) {
|
|
25
|
-
this._string = n, this._currentIndex = 0, this._endIndex = this._string.length, this._prevCommand = null, this._skipOptionalSpaces();
|
|
26
|
-
}, E = window.navigator.userAgent.indexOf("MSIE ") !== -1;
|
|
27
|
-
M.prototype = {
|
|
28
|
-
parseSegment: function() {
|
|
29
|
-
var n = this._string[this._currentIndex], t = V[n] ? V[n] : null;
|
|
30
|
-
if (t === null) {
|
|
31
|
-
if (this._prevCommand === null || ((n === "+" || n === "-" || n === "." || n >= "0" && n <= "9") && this._prevCommand !== "Z" ? this._prevCommand === "M" ? t = "L" : this._prevCommand === "m" ? t = "l" : t = this._prevCommand : t = null, t === null))
|
|
32
|
-
return null;
|
|
33
|
-
} else
|
|
34
|
-
this._currentIndex += 1;
|
|
35
|
-
this._prevCommand = t;
|
|
36
|
-
var e = null, s = t.toUpperCase();
|
|
37
|
-
return s === "H" || s === "V" ? e = [this._parseNumber()] : s === "M" || s === "L" || s === "T" ? e = [this._parseNumber(), this._parseNumber()] : s === "S" || s === "Q" ? e = [
|
|
38
|
-
this._parseNumber(),
|
|
39
|
-
this._parseNumber(),
|
|
40
|
-
this._parseNumber(),
|
|
41
|
-
this._parseNumber()
|
|
42
|
-
] : s === "C" ? e = [
|
|
43
|
-
this._parseNumber(),
|
|
44
|
-
this._parseNumber(),
|
|
45
|
-
this._parseNumber(),
|
|
46
|
-
this._parseNumber(),
|
|
47
|
-
this._parseNumber(),
|
|
48
|
-
this._parseNumber()
|
|
49
|
-
] : s === "A" ? e = [
|
|
50
|
-
this._parseNumber(),
|
|
51
|
-
this._parseNumber(),
|
|
52
|
-
this._parseNumber(),
|
|
53
|
-
this._parseArcFlag(),
|
|
54
|
-
this._parseArcFlag(),
|
|
55
|
-
this._parseNumber(),
|
|
56
|
-
this._parseNumber()
|
|
57
|
-
] : s === "Z" && (this._skipOptionalSpaces(), e = []), e === null || e.indexOf(null) >= 0 ? null : { type: t, values: e };
|
|
58
|
-
},
|
|
59
|
-
hasMoreData: function() {
|
|
60
|
-
return this._currentIndex < this._endIndex;
|
|
61
|
-
},
|
|
62
|
-
peekSegmentType: function() {
|
|
63
|
-
var n = this._string[this._currentIndex];
|
|
64
|
-
return V[n] ? V[n] : null;
|
|
65
|
-
},
|
|
66
|
-
initialCommandIsMoveTo: function() {
|
|
67
|
-
if (!this.hasMoreData())
|
|
68
|
-
return !0;
|
|
69
|
-
var n = this.peekSegmentType();
|
|
70
|
-
return n === "M" || n === "m";
|
|
71
|
-
},
|
|
72
|
-
_isCurrentSpace: function() {
|
|
73
|
-
var n = this._string[this._currentIndex];
|
|
74
|
-
return n <= " " && (n === " " || n === `
|
|
75
|
-
` || n === " " || n === "\r" || n === "\f");
|
|
76
|
-
},
|
|
77
|
-
_skipOptionalSpaces: function() {
|
|
78
|
-
for (; this._currentIndex < this._endIndex && this._isCurrentSpace(); )
|
|
79
|
-
this._currentIndex += 1;
|
|
80
|
-
return this._currentIndex < this._endIndex;
|
|
81
|
-
},
|
|
82
|
-
_skipOptionalSpacesOrDelimiter: function() {
|
|
83
|
-
return this._currentIndex < this._endIndex && !this._isCurrentSpace() && this._string[this._currentIndex] !== "," ? !1 : (this._skipOptionalSpaces() && this._currentIndex < this._endIndex && this._string[this._currentIndex] === "," && (this._currentIndex += 1, this._skipOptionalSpaces()), this._currentIndex < this._endIndex);
|
|
84
|
-
},
|
|
85
|
-
// Parse a number from an SVG path. This very closely follows genericParseNumber(...) from
|
|
86
|
-
// Source/core/svg/SVGParserUtilities.cpp.
|
|
87
|
-
// Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-PathDataBNF
|
|
88
|
-
_parseNumber: function() {
|
|
89
|
-
var n = 0, t = 0, e = 1, s = 0, l = 1, u = 1, a = this._currentIndex;
|
|
90
|
-
if (this._skipOptionalSpaces(), this._currentIndex < this._endIndex && this._string[this._currentIndex] === "+" ? this._currentIndex += 1 : this._currentIndex < this._endIndex && this._string[this._currentIndex] === "-" && (this._currentIndex += 1, l = -1), this._currentIndex === this._endIndex || (this._string[this._currentIndex] < "0" || this._string[this._currentIndex] > "9") && this._string[this._currentIndex] !== ".")
|
|
91
|
-
return null;
|
|
92
|
-
for (var p = this._currentIndex; this._currentIndex < this._endIndex && this._string[this._currentIndex] >= "0" && this._string[this._currentIndex] <= "9"; )
|
|
93
|
-
this._currentIndex += 1;
|
|
94
|
-
if (this._currentIndex !== p)
|
|
95
|
-
for (var i = this._currentIndex - 1, r = 1; i >= p; )
|
|
96
|
-
t += r * (this._string[i] - "0"), i -= 1, r *= 10;
|
|
97
|
-
if (this._currentIndex < this._endIndex && this._string[this._currentIndex] === ".") {
|
|
98
|
-
if (this._currentIndex += 1, this._currentIndex >= this._endIndex || this._string[this._currentIndex] < "0" || this._string[this._currentIndex] > "9")
|
|
99
|
-
return null;
|
|
100
|
-
for (; this._currentIndex < this._endIndex && this._string[this._currentIndex] >= "0" && this._string[this._currentIndex] <= "9"; )
|
|
101
|
-
e *= 10, s += (this._string.charAt(this._currentIndex) - "0") / e, this._currentIndex += 1;
|
|
102
|
-
}
|
|
103
|
-
if (this._currentIndex !== a && this._currentIndex + 1 < this._endIndex && (this._string[this._currentIndex] === "e" || this._string[this._currentIndex] === "E") && this._string[this._currentIndex + 1] !== "x" && this._string[this._currentIndex + 1] !== "m") {
|
|
104
|
-
if (this._currentIndex += 1, this._string[this._currentIndex] === "+" ? this._currentIndex += 1 : this._string[this._currentIndex] === "-" && (this._currentIndex += 1, u = -1), this._currentIndex >= this._endIndex || this._string[this._currentIndex] < "0" || this._string[this._currentIndex] > "9")
|
|
105
|
-
return null;
|
|
106
|
-
for (; this._currentIndex < this._endIndex && this._string[this._currentIndex] >= "0" && this._string[this._currentIndex] <= "9"; )
|
|
107
|
-
n *= 10, n += this._string[this._currentIndex] - "0", this._currentIndex += 1;
|
|
108
|
-
}
|
|
109
|
-
var v = t + s;
|
|
110
|
-
return v *= l, n && (v *= Math.pow(10, u * n)), a === this._currentIndex ? null : (this._skipOptionalSpacesOrDelimiter(), v);
|
|
111
|
-
},
|
|
112
|
-
_parseArcFlag: function() {
|
|
113
|
-
if (this._currentIndex >= this._endIndex)
|
|
114
|
-
return null;
|
|
115
|
-
var n = null, t = this._string[this._currentIndex];
|
|
116
|
-
if (this._currentIndex += 1, t === "0")
|
|
117
|
-
n = 0;
|
|
118
|
-
else if (t === "1")
|
|
119
|
-
n = 1;
|
|
120
|
-
else
|
|
121
|
-
return null;
|
|
122
|
-
return this._skipOptionalSpacesOrDelimiter(), n;
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
var A = function(n) {
|
|
126
|
-
if (!n || n.length === 0) return [];
|
|
127
|
-
var t = new M(n), e = [];
|
|
128
|
-
if (t.initialCommandIsMoveTo())
|
|
129
|
-
for (; t.hasMoreData(); ) {
|
|
130
|
-
var s = t.parseSegment();
|
|
131
|
-
if (s === null)
|
|
132
|
-
break;
|
|
133
|
-
e.push(s);
|
|
134
|
-
}
|
|
135
|
-
return e;
|
|
136
|
-
}, P = SVGPathElement.prototype.setAttribute, S = SVGPathElement.prototype.setAttributeNS, _ = SVGPathElement.prototype.removeAttribute, x = SVGPathElement.prototype.removeAttributeNS, y = window.Symbol ? Symbol() : "__cachedPathData", m = window.Symbol ? Symbol() : "__cachedNormalizedPathData", L = function(n, t, e, s, l, u, a, p, i, r) {
|
|
137
|
-
var v = function(X) {
|
|
138
|
-
return Math.PI * X / 180;
|
|
139
|
-
}, h = function(X, tt, Y) {
|
|
140
|
-
var ht = X * Math.cos(Y) - tt * Math.sin(Y), pt = X * Math.sin(Y) + tt * Math.cos(Y);
|
|
141
|
-
return { x: ht, y: pt };
|
|
142
|
-
}, f = v(a), c = [], d, o, I, b;
|
|
143
|
-
if (r)
|
|
144
|
-
d = r[0], o = r[1], I = r[2], b = r[3];
|
|
145
|
-
else {
|
|
146
|
-
var O = h(n, t, -f);
|
|
147
|
-
n = O.x, t = O.y;
|
|
148
|
-
var T = h(e, s, -f);
|
|
149
|
-
e = T.x, s = T.y;
|
|
150
|
-
var w = (n - e) / 2, C = (t - s) / 2, G = w * w / (l * l) + C * C / (u * u);
|
|
151
|
-
G > 1 && (G = Math.sqrt(G), l = G * l, u = G * u);
|
|
152
|
-
var k;
|
|
153
|
-
p === i ? k = -1 : k = 1;
|
|
154
|
-
var z = l * l, H = u * u, et = z * H - z * C * C - H * w * w, at = z * C * C + H * w * w, q = k * Math.sqrt(Math.abs(et / at));
|
|
155
|
-
I = q * l * C / u + (n + e) / 2, b = q * -u * w / l + (t + s) / 2, d = Math.asin(parseFloat(((t - b) / u).toFixed(9))), o = Math.asin(parseFloat(((s - b) / u).toFixed(9))), n < I && (d = Math.PI - d), e < I && (o = Math.PI - o), d < 0 && (d = Math.PI * 2 + d), o < 0 && (o = Math.PI * 2 + o), i && d > o && (d = d - Math.PI * 2), !i && o > d && (o = o - Math.PI * 2);
|
|
156
|
-
}
|
|
157
|
-
var B = o - d;
|
|
158
|
-
if (Math.abs(B) > Math.PI * 120 / 180) {
|
|
159
|
-
var rt = o, st = e, nt = s;
|
|
160
|
-
i && o > d ? o = d + Math.PI * 120 / 180 * 1 : o = d + Math.PI * 120 / 180 * -1, e = I + l * Math.cos(o), s = b + u * Math.sin(o), c = L(
|
|
161
|
-
e,
|
|
162
|
-
s,
|
|
163
|
-
st,
|
|
164
|
-
nt,
|
|
165
|
-
l,
|
|
166
|
-
u,
|
|
167
|
-
a,
|
|
168
|
-
0,
|
|
169
|
-
i,
|
|
170
|
-
[o, rt, I, b]
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
B = o - d;
|
|
174
|
-
var it = Math.cos(d), ut = Math.sin(d), lt = Math.cos(o), vt = Math.sin(o), F = Math.tan(B / 4), j = 4 / 3 * l * F, J = 4 / 3 * u * F, K = [n, t], Z = [n + j * ut, t - J * it], W = [e + j * vt, s - J * lt], U = [e, s];
|
|
175
|
-
if (Z[0] = 2 * K[0] - Z[0], Z[1] = 2 * K[1] - Z[1], r)
|
|
176
|
-
return [Z, W, U].concat(c);
|
|
177
|
-
c = [Z, W, U].concat(c);
|
|
178
|
-
for (var R = [], N = 0; N < c.length; N += 3) {
|
|
179
|
-
var l = h(c[N][0], c[N][1], f), u = h(c[N + 1][0], c[N + 1][1], f), g = h(c[N + 2][0], c[N + 2][1], f);
|
|
180
|
-
R.push([l.x, l.y, u.x, u.y, g.x, g.y]);
|
|
181
|
-
}
|
|
182
|
-
return R;
|
|
183
|
-
}, D = function(n) {
|
|
184
|
-
return n.map(function(t) {
|
|
185
|
-
return {
|
|
186
|
-
type: t.type,
|
|
187
|
-
values: Array.prototype.slice.call(t.values)
|
|
188
|
-
};
|
|
189
|
-
});
|
|
190
|
-
}, $ = function(n) {
|
|
191
|
-
var t = [], e = null, s = null, l = null, u = null;
|
|
192
|
-
return n.forEach(function(a) {
|
|
193
|
-
var p = a.type;
|
|
194
|
-
if (p === "M") {
|
|
195
|
-
var i = a.values[0], r = a.values[1];
|
|
196
|
-
t.push({ type: "M", values: [i, r] }), l = i, u = r, e = i, s = r;
|
|
197
|
-
} else if (p === "m") {
|
|
198
|
-
var i = e + a.values[0], r = s + a.values[1];
|
|
199
|
-
t.push({ type: "M", values: [i, r] }), l = i, u = r, e = i, s = r;
|
|
200
|
-
} else if (p === "L") {
|
|
201
|
-
var i = a.values[0], r = a.values[1];
|
|
202
|
-
t.push({ type: "L", values: [i, r] }), e = i, s = r;
|
|
203
|
-
} else if (p === "l") {
|
|
204
|
-
var i = e + a.values[0], r = s + a.values[1];
|
|
205
|
-
t.push({ type: "L", values: [i, r] }), e = i, s = r;
|
|
206
|
-
} else if (p === "C") {
|
|
207
|
-
var v = a.values[0], h = a.values[1], f = a.values[2], c = a.values[3], i = a.values[4], r = a.values[5];
|
|
208
|
-
t.push({
|
|
209
|
-
type: "C",
|
|
210
|
-
values: [v, h, f, c, i, r]
|
|
211
|
-
}), e = i, s = r;
|
|
212
|
-
} else if (p === "c") {
|
|
213
|
-
var v = e + a.values[0], h = s + a.values[1], f = e + a.values[2], c = s + a.values[3], i = e + a.values[4], r = s + a.values[5];
|
|
214
|
-
t.push({
|
|
215
|
-
type: "C",
|
|
216
|
-
values: [v, h, f, c, i, r]
|
|
217
|
-
}), e = i, s = r;
|
|
218
|
-
} else if (p === "Q") {
|
|
219
|
-
var v = a.values[0], h = a.values[1], i = a.values[2], r = a.values[3];
|
|
220
|
-
t.push({ type: "Q", values: [v, h, i, r] }), e = i, s = r;
|
|
221
|
-
} else if (p === "q") {
|
|
222
|
-
var v = e + a.values[0], h = s + a.values[1], i = e + a.values[2], r = s + a.values[3];
|
|
223
|
-
t.push({ type: "Q", values: [v, h, i, r] }), e = i, s = r;
|
|
224
|
-
} else if (p === "A") {
|
|
225
|
-
var i = a.values[5], r = a.values[6];
|
|
226
|
-
t.push({
|
|
227
|
-
type: "A",
|
|
228
|
-
values: [
|
|
229
|
-
a.values[0],
|
|
230
|
-
a.values[1],
|
|
231
|
-
a.values[2],
|
|
232
|
-
a.values[3],
|
|
233
|
-
a.values[4],
|
|
234
|
-
i,
|
|
235
|
-
r
|
|
236
|
-
]
|
|
237
|
-
}), e = i, s = r;
|
|
238
|
-
} else if (p === "a") {
|
|
239
|
-
var i = e + a.values[5], r = s + a.values[6];
|
|
240
|
-
t.push({
|
|
241
|
-
type: "A",
|
|
242
|
-
values: [
|
|
243
|
-
a.values[0],
|
|
244
|
-
a.values[1],
|
|
245
|
-
a.values[2],
|
|
246
|
-
a.values[3],
|
|
247
|
-
a.values[4],
|
|
248
|
-
i,
|
|
249
|
-
r
|
|
250
|
-
]
|
|
251
|
-
}), e = i, s = r;
|
|
252
|
-
} else if (p === "H") {
|
|
253
|
-
var i = a.values[0];
|
|
254
|
-
t.push({ type: "H", values: [i] }), e = i;
|
|
255
|
-
} else if (p === "h") {
|
|
256
|
-
var i = e + a.values[0];
|
|
257
|
-
t.push({ type: "H", values: [i] }), e = i;
|
|
258
|
-
} else if (p === "V") {
|
|
259
|
-
var r = a.values[0];
|
|
260
|
-
t.push({ type: "V", values: [r] }), s = r;
|
|
261
|
-
} else if (p === "v") {
|
|
262
|
-
var r = s + a.values[0];
|
|
263
|
-
t.push({ type: "V", values: [r] }), s = r;
|
|
264
|
-
} else if (p === "S") {
|
|
265
|
-
var f = a.values[0], c = a.values[1], i = a.values[2], r = a.values[3];
|
|
266
|
-
t.push({ type: "S", values: [f, c, i, r] }), e = i, s = r;
|
|
267
|
-
} else if (p === "s") {
|
|
268
|
-
var f = e + a.values[0], c = s + a.values[1], i = e + a.values[2], r = s + a.values[3];
|
|
269
|
-
t.push({ type: "S", values: [f, c, i, r] }), e = i, s = r;
|
|
270
|
-
} else if (p === "T") {
|
|
271
|
-
var i = a.values[0], r = a.values[1];
|
|
272
|
-
t.push({ type: "T", values: [i, r] }), e = i, s = r;
|
|
273
|
-
} else if (p === "t") {
|
|
274
|
-
var i = e + a.values[0], r = s + a.values[1];
|
|
275
|
-
t.push({ type: "T", values: [i, r] }), e = i, s = r;
|
|
276
|
-
} else (p === "Z" || p === "z") && (t.push({ type: "Z", values: [] }), e = l, s = u);
|
|
277
|
-
}), t;
|
|
278
|
-
}, Q = function(n) {
|
|
279
|
-
var t = [], e = null, s = null, l = null, u = null, a = null, p = null, i = null;
|
|
280
|
-
return n.forEach(function(r) {
|
|
281
|
-
if (r.type === "M") {
|
|
282
|
-
var v = r.values[0], h = r.values[1];
|
|
283
|
-
t.push({ type: "M", values: [v, h] }), p = v, i = h, u = v, a = h;
|
|
284
|
-
} else if (r.type === "C") {
|
|
285
|
-
var f = r.values[0], c = r.values[1], d = r.values[2], o = r.values[3], v = r.values[4], h = r.values[5];
|
|
286
|
-
t.push({ type: "C", values: [f, c, d, o, v, h] }), s = d, l = o, u = v, a = h;
|
|
287
|
-
} else if (r.type === "L") {
|
|
288
|
-
var v = r.values[0], h = r.values[1];
|
|
289
|
-
t.push({ type: "L", values: [v, h] }), u = v, a = h;
|
|
290
|
-
} else if (r.type === "H") {
|
|
291
|
-
var v = r.values[0];
|
|
292
|
-
t.push({ type: "L", values: [v, a] }), u = v;
|
|
293
|
-
} else if (r.type === "V") {
|
|
294
|
-
var h = r.values[0];
|
|
295
|
-
t.push({ type: "L", values: [u, h] }), a = h;
|
|
296
|
-
} else if (r.type === "S") {
|
|
297
|
-
var d = r.values[0], o = r.values[1], v = r.values[2], h = r.values[3], I, b;
|
|
298
|
-
e === "C" || e === "S" ? (I = u + (u - s), b = a + (a - l)) : (I = u, b = a), t.push({ type: "C", values: [I, b, d, o, v, h] }), s = d, l = o, u = v, a = h;
|
|
299
|
-
} else if (r.type === "T") {
|
|
300
|
-
var v = r.values[0], h = r.values[1], f, c;
|
|
301
|
-
e === "Q" || e === "T" ? (f = u + (u - s), c = a + (a - l)) : (f = u, c = a);
|
|
302
|
-
var I = u + 2 * (f - u) / 3, b = a + 2 * (c - a) / 3, O = v + 2 * (f - v) / 3, T = h + 2 * (c - h) / 3;
|
|
303
|
-
t.push({
|
|
304
|
-
type: "C",
|
|
305
|
-
values: [I, b, O, T, v, h]
|
|
306
|
-
}), s = f, l = c, u = v, a = h;
|
|
307
|
-
} else if (r.type === "Q") {
|
|
308
|
-
var f = r.values[0], c = r.values[1], v = r.values[2], h = r.values[3], I = u + 2 * (f - u) / 3, b = a + 2 * (c - a) / 3, O = v + 2 * (f - v) / 3, T = h + 2 * (c - h) / 3;
|
|
309
|
-
t.push({
|
|
310
|
-
type: "C",
|
|
311
|
-
values: [I, b, O, T, v, h]
|
|
312
|
-
}), s = f, l = c, u = v, a = h;
|
|
313
|
-
} else if (r.type === "A") {
|
|
314
|
-
var w = Math.abs(r.values[0]), C = Math.abs(r.values[1]), G = r.values[2], k = r.values[3], z = r.values[4], v = r.values[5], h = r.values[6];
|
|
315
|
-
if (w === 0 || C === 0)
|
|
316
|
-
t.push({
|
|
317
|
-
type: "C",
|
|
318
|
-
values: [u, a, v, h, v, h]
|
|
319
|
-
}), u = v, a = h;
|
|
320
|
-
else if (u !== v || a !== h) {
|
|
321
|
-
var H = L(
|
|
322
|
-
u,
|
|
323
|
-
a,
|
|
324
|
-
v,
|
|
325
|
-
h,
|
|
326
|
-
w,
|
|
327
|
-
C,
|
|
328
|
-
G,
|
|
329
|
-
k,
|
|
330
|
-
z
|
|
331
|
-
);
|
|
332
|
-
H.forEach(function(q) {
|
|
333
|
-
t.push({ type: "C", values: q });
|
|
334
|
-
}), u = v, a = h;
|
|
335
|
-
}
|
|
336
|
-
} else r.type === "Z" && (t.push(r), u = p, a = i);
|
|
337
|
-
e = r.type;
|
|
338
|
-
}), t;
|
|
339
|
-
};
|
|
340
|
-
SVGPathElement.prototype.setAttribute = function(n, t) {
|
|
341
|
-
n === "d" && (this[y] = null, this[m] = null), P.call(this, n, t);
|
|
342
|
-
}, SVGPathElement.prototype.setAttributeNS = function(n, t, e) {
|
|
343
|
-
if (t === "d") {
|
|
344
|
-
var s = "http://www.w3.org/2000/svg";
|
|
345
|
-
if (n)
|
|
346
|
-
for (var l of this.ownerSVGElement.attributes)
|
|
347
|
-
l.name === `xmlns:${n}` && (s = l.value);
|
|
348
|
-
s === "http://www.w3.org/2000/svg" && (this[y] = null, this[m] = null);
|
|
349
|
-
}
|
|
350
|
-
S.call(this, n, t, e);
|
|
351
|
-
}, SVGPathElement.prototype.removeAttribute = function(n, t) {
|
|
352
|
-
n === "d" && (this[y] = null, this[m] = null), _.call(this, n);
|
|
353
|
-
}, SVGPathElement.prototype.removeAttributeNS = function(n, t) {
|
|
354
|
-
if (t === "d") {
|
|
355
|
-
var e = "http://www.w3.org/2000/svg";
|
|
356
|
-
if (n)
|
|
357
|
-
for (var s of this.ownerSVGElement.attributes)
|
|
358
|
-
s.name === `xmlns:${n}` && (e = s.value);
|
|
359
|
-
e === "http://www.w3.org/2000/svg" && (this[y] = null, this[m] = null);
|
|
360
|
-
}
|
|
361
|
-
x.call(this, n, t);
|
|
362
|
-
}, SVGPathElement.prototype.getPathData = function(n) {
|
|
363
|
-
if (n && n.normalize) {
|
|
364
|
-
if (this[m])
|
|
365
|
-
return D(this[m]);
|
|
366
|
-
var t;
|
|
367
|
-
this[y] ? t = D(this[y]) : (t = A(this.getAttribute("d") || ""), this[y] = D(t));
|
|
368
|
-
var e = Q($(t));
|
|
369
|
-
return this[m] = D(e), e;
|
|
370
|
-
} else {
|
|
371
|
-
if (this[y])
|
|
372
|
-
return D(this[y]);
|
|
373
|
-
var t = A(this.getAttribute("d") || "");
|
|
374
|
-
return this[y] = D(t), t;
|
|
375
|
-
}
|
|
376
|
-
}, SVGPathElement.prototype.setPathData = function(n) {
|
|
377
|
-
if (n.length === 0)
|
|
378
|
-
E ? this.setAttribute("d", "") : this.removeAttribute("d");
|
|
379
|
-
else {
|
|
380
|
-
for (var t = "", e = 0, s = n.length; e < s; e += 1) {
|
|
381
|
-
var l = n[e];
|
|
382
|
-
e > 0 && (t += " "), t += l.type, l.values && l.values.length > 0 && (t += " " + l.values.join(" "));
|
|
383
|
-
}
|
|
384
|
-
this.setAttribute("d", t);
|
|
385
|
-
}
|
|
386
|
-
}, SVGRectElement.prototype.getPathData = function(n) {
|
|
387
|
-
var t = this.x.baseVal.value, e = this.y.baseVal.value, s = this.width.baseVal.value, l = this.height.baseVal.value, u = this.hasAttribute("rx") ? this.rx.baseVal.value : this.ry.baseVal.value, a = this.hasAttribute("ry") ? this.ry.baseVal.value : this.rx.baseVal.value;
|
|
388
|
-
u > s / 2 && (u = s / 2), a > l / 2 && (a = l / 2);
|
|
389
|
-
var p = [
|
|
390
|
-
{ type: "M", values: [t + u, e] },
|
|
391
|
-
{ type: "H", values: [t + s - u] },
|
|
392
|
-
{ type: "A", values: [u, a, 0, 0, 1, t + s, e + a] },
|
|
393
|
-
{ type: "V", values: [e + l - a] },
|
|
394
|
-
{ type: "A", values: [u, a, 0, 0, 1, t + s - u, e + l] },
|
|
395
|
-
{ type: "H", values: [t + u] },
|
|
396
|
-
{ type: "A", values: [u, a, 0, 0, 1, t, e + l - a] },
|
|
397
|
-
{ type: "V", values: [e + a] },
|
|
398
|
-
{ type: "A", values: [u, a, 0, 0, 1, t + u, e] },
|
|
399
|
-
{ type: "Z", values: [] }
|
|
400
|
-
];
|
|
401
|
-
return p = p.filter(function(i) {
|
|
402
|
-
return !(i.type === "A" && (i.values[0] === 0 || i.values[1] === 0));
|
|
403
|
-
}), n && n.normalize === !0 && (p = Q(p)), p;
|
|
404
|
-
}, SVGCircleElement.prototype.getPathData = function(n) {
|
|
405
|
-
var t = this.cx.baseVal.value, e = this.cy.baseVal.value, s = this.r.baseVal.value, l = [
|
|
406
|
-
{ type: "M", values: [t + s, e] },
|
|
407
|
-
{ type: "A", values: [s, s, 0, 0, 1, t, e + s] },
|
|
408
|
-
{ type: "A", values: [s, s, 0, 0, 1, t - s, e] },
|
|
409
|
-
{ type: "A", values: [s, s, 0, 0, 1, t, e - s] },
|
|
410
|
-
{ type: "A", values: [s, s, 0, 0, 1, t + s, e] },
|
|
411
|
-
{ type: "Z", values: [] }
|
|
412
|
-
];
|
|
413
|
-
return n && n.normalize === !0 && (l = Q(l)), l;
|
|
414
|
-
}, SVGEllipseElement.prototype.getPathData = function(n) {
|
|
415
|
-
var t = this.cx.baseVal.value, e = this.cy.baseVal.value, s = this.rx.baseVal.value, l = this.ry.baseVal.value, u = [
|
|
416
|
-
{ type: "M", values: [t + s, e] },
|
|
417
|
-
{ type: "A", values: [s, l, 0, 0, 1, t, e + l] },
|
|
418
|
-
{ type: "A", values: [s, l, 0, 0, 1, t - s, e] },
|
|
419
|
-
{ type: "A", values: [s, l, 0, 0, 1, t, e - l] },
|
|
420
|
-
{ type: "A", values: [s, l, 0, 0, 1, t + s, e] },
|
|
421
|
-
{ type: "Z", values: [] }
|
|
422
|
-
];
|
|
423
|
-
return n && n.normalize === !0 && (u = Q(u)), u;
|
|
424
|
-
}, SVGLineElement.prototype.getPathData = function() {
|
|
425
|
-
return [
|
|
426
|
-
{ type: "M", values: [this.x1.baseVal.value, this.y1.baseVal.value] },
|
|
427
|
-
{ type: "L", values: [this.x2.baseVal.value, this.y2.baseVal.value] }
|
|
428
|
-
];
|
|
429
|
-
}, SVGPolylineElement.prototype.getPathData = function() {
|
|
430
|
-
for (var n = [], t = 0; t < this.points.numberOfItems; t += 1) {
|
|
431
|
-
var e = this.points.getItem(t);
|
|
432
|
-
n.push({
|
|
433
|
-
type: t === 0 ? "M" : "L",
|
|
434
|
-
values: [e.x, e.y]
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
return n;
|
|
438
|
-
}, SVGPolygonElement.prototype.getPathData = function() {
|
|
439
|
-
for (var n = [], t = 0; t < this.points.numberOfItems; t += 1) {
|
|
440
|
-
var e = this.points.getItem(t);
|
|
441
|
-
n.push({
|
|
442
|
-
type: t === 0 ? "M" : "L",
|
|
443
|
-
values: [e.x, e.y]
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
return n.push({
|
|
447
|
-
type: "Z",
|
|
448
|
-
values: []
|
|
449
|
-
}), n;
|
|
450
|
-
};
|
|
451
|
-
}();
|
|
452
|
-
function ct(V, { pathSelector: M = "path" } = {}) {
|
|
453
|
-
const E = document.createElement(null);
|
|
454
|
-
E.innerHTML = V;
|
|
455
|
-
const A = E.firstElementChild, S = A.querySelector(M).getPathData(), _ = A.getAttribute("viewBox").split(" ").map((m) => m.trim()), x = {
|
|
456
|
-
x: parseInt(_[0]),
|
|
457
|
-
y: parseInt(_[1]),
|
|
458
|
-
width: parseInt(_[2]),
|
|
459
|
-
height: parseInt(_[3])
|
|
460
|
-
}, y = Math.min(x.width, x.height);
|
|
461
|
-
return S.forEach((m) => {
|
|
462
|
-
m.values = m.values.map((L) => L / y);
|
|
463
|
-
}), S;
|
|
464
|
-
}
|
|
465
|
-
function ot(V, M, E, A, P) {
|
|
466
|
-
const S = [];
|
|
467
|
-
for (let _ = 0; _ <= 1; _ += 1 / P) {
|
|
468
|
-
const x = Math.pow(1 - _, 3) * V.x + 3 * Math.pow(1 - _, 2) * _ * M.x + 3 * (1 - _) * Math.pow(_, 2) * E.x + Math.pow(_, 3) * A.x, y = Math.pow(1 - _, 3) * V.y + 3 * Math.pow(1 - _, 2) * _ * M.y + 3 * (1 - _) * Math.pow(_, 2) * E.y + Math.pow(_, 3) * A.y;
|
|
469
|
-
S.push({ x, y });
|
|
470
|
-
}
|
|
471
|
-
return S;
|
|
472
|
-
}
|
|
473
|
-
function ft(V, M) {
|
|
474
|
-
const E = (M == null ? void 0 : M.segments) || 20, A = ct(V, M);
|
|
475
|
-
let P = [];
|
|
476
|
-
for (let S = 0; S < A.length - 1; S++) {
|
|
477
|
-
const { type: _, values: x } = A[S];
|
|
478
|
-
if (_ === "M" && S === 0)
|
|
479
|
-
P.push({ x: x[0], y: x[1] });
|
|
480
|
-
else if (_ === "C") {
|
|
481
|
-
const y = P[P.length - 1], m = { x: x[0], y: x[1] }, L = { x: x[2], y: x[3] }, D = { x: x[4], y: x[5] }, $ = ot(y, m, L, D, E);
|
|
482
|
-
P = [...P, ...$];
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
return P;
|
|
486
|
-
}
|
|
487
|
-
export {
|
|
488
|
-
ct as getPathData,
|
|
489
|
-
ft as getPoints
|
|
490
|
-
};
|
package/lib/theme/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-BnA-dJsE.cjs");const t=require("../browser-CpzFX2xg.cjs");require("../ticker/index.cjs");const o=require("../tags-v-OSVkiQ.cjs"),a=require("../createTheme-Cfaw9UmV.cjs"),r=a.createTheme({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(t.isBrowser){const e=o.style({":root":r.style}).node;e.setAttribute("data-permanent",""),document.head.appendChild(e)}exports.aptechkaTheme=r;
|
package/lib/theme/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import "../Store-DGtldlBH.js";
|
|
2
|
-
import { i as e } from "../browser-0zX67oeU.js";
|
|
3
|
-
import "../ticker/index.js";
|
|
4
|
-
import { aD as r } from "../tags-4AoxVUe3.js";
|
|
5
|
-
import { c as t } from "../createTheme-CHnsCgAr.js";
|
|
6
|
-
const a = t(
|
|
7
|
-
{
|
|
8
|
-
colorMain: "#1c1c1c",
|
|
9
|
-
colorMainAux: "#282828",
|
|
10
|
-
colorFont: "#ffffff",
|
|
11
|
-
colorActive: "#00E5B0",
|
|
12
|
-
borderRadius: "12px",
|
|
13
|
-
borderRadiusSmall: "4px"
|
|
14
|
-
},
|
|
15
|
-
{ prefix: "aptechka-" }
|
|
16
|
-
);
|
|
17
|
-
if (e) {
|
|
18
|
-
const o = r({
|
|
19
|
-
":root": a.style
|
|
20
|
-
}).node;
|
|
21
|
-
o.setAttribute("data-permanent", ""), document.head.appendChild(o);
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
a as aptechkaTheme
|
|
25
|
-
};
|
package/lib/tweaker/index.cjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";var ve=h=>{throw TypeError(h)};var ue=(h,i,e)=>i.has(h)||ve("Cannot "+e);var t=(h,i,e)=>(ue(h,i,"read from private field"),e?e.call(h):i.get(h)),a=(h,i,e)=>i.has(h)?ve("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(h):i.set(h,e),o=(h,i,e,s)=>(ue(h,i,"write to private field"),s?s.call(h,e):i.set(h,e),e),f=(h,i,e)=>(ue(h,i,"access private method"),e);const Ae=require("../browser-CpzFX2xg.cjs"),g=require("../Store-BnA-dJsE.cjs"),De=require("../file-EevnUtRj.cjs"),He=require("../function-MthRj-GJ.cjs"),ye=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const n=require("../tags-v-OSVkiQ.cjs"),C=require("../createStylesheet-CaDI99iu.cjs"),Ke=require("../Viewport-BmLTk_6k.cjs"),c=require("../theme/index.cjs"),Oe=require("../index-BpsQqM-8.cjs"),Ze=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const je=require("../math-GDWEqu7y.cjs"),pe=require("../polyfills-CM4SCDTt.cjs"),ke=require("../element-resizer/index.cjs"),Se='<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>',xe='<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>',Je='<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>',We='<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 L,b,x;class _e{constructor(){a(this,L);a(this,b);a(this,x);this.scrollValue=0,o(this,L,""),o(this,b,[]),o(this,x,{}),o(this,L,g.storeRegistry.projectName+"-studio")}openPanel(i){t(this,b).includes(i)||t(this,b).push(i)}closePanel(i){o(this,b,t(this,b).filter(e=>e!==i))}isPanelOpened(i){return t(this,b).includes(i)}changedSizes(i){return t(this,x)[i]}changeSize(i,e){e?t(this,x)[i]=e:delete t(this,x)[i]}save(){const i={openedPanels:t(this,b),changedSizes:t(this,x),scrollValue:this.scrollValue};localStorage.setItem(t(this,L),JSON.stringify(i)),g.storeRegistry.saveState()}load(){g.storeRegistry.loadState();const i=localStorage.getItem(t(this,L));if(i)try{const e=JSON.parse(i);e.openedPanels&&o(this,b,e.openedPanels),e.changedSizes&&o(this,x,e.changedSizes),e.scrollValue&&(this.scrollValue=e.scrollValue)}catch(e){console.error(e)}}}L=new WeakMap,b=new WeakMap,x=new WeakMap;const w=new _e;var R;class K extends HTMLElement{constructor(...e){super();a(this,R);o(this,R,e)}addStore(e){t(this,R).push(e)}get firstStore(){return t(this,R)[0]}get stores(){return t(this,R)}updateStores(e){t(this,R).forEach(s=>{s.current=e})}}R=new WeakMap;const Be=C.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:c.aptechkaTheme.borderRadiusSmall.var}});class Ee extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Be),n.element(this,{children:[n.element("e-checkbox",{onChange:s=>{this.updateStores(s.currentTarget.checked)},ref:s=>{this.firstStore.subscribe(r=>{s.checked=r.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",Ee);const Xe=C.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Ce extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Xe),n.element(this,{children:[n.input({type:"color",value:this.firstStore,onInput:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Ce);const Ye=C.createStylesheet({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class ze extends K{constructor(...i){var s,r;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ye),console.log(this.firstStore),n.element(this,{children:[n.a({href:this.firstStore,target:(r=(s=this.firstStore.passport)==null?void 0:s.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",ze);const Ge=C.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var P,q,N,E,F,Z,j,S,I,J,W,u,V,ge,me,ne,_;class Te extends K{constructor(...e){var r,l,d,p,y,M,O,we;super(...e);a(this,u);a(this,P,[]);a(this,q,[]);a(this,N);a(this,E);a(this,F);a(this,Z);a(this,j);a(this,S);a(this,I,!1);a(this,J,e=>{const s=f(this,u,V).call(this,e);return s.map((r,l)=>{const d=typeof r=="string"?parseFloat(r)||t(this,E):r,p=je.clamp(d,t(this,E),t(this,F)),y=pe.toStep(p,t(this,N));s[l]=y}),t(this,j)==="number"?s[0]:s});a(this,W,()=>{f(this,u,V).call(this).map((e,s)=>{const r=t(this,P)[s];r&&(r.value=(e||0).toString())}),f(this,u,ge).call(this)});a(this,_,()=>{f(this,u,ge).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ge),o(this,E,pe.nullishCoalescing((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.min,-1/0)),o(this,F,pe.nullishCoalescing((p=(d=this.firstStore.passport)==null?void 0:d.manager)==null?void 0:p.max,1/0)),o(this,N,((M=(y=this.firstStore.passport)==null?void 0:y.manager)==null?void 0:M.step)||.01),o(this,Z,((we=(O=this.firstStore.passport)==null?void 0:O.manager)==null?void 0:we.ease)||1),o(this,j,Array.isArray(this.firstStore.current)?"array":"number"),o(this,S,isFinite(t(this,F))&&isFinite(t(this,E))),n.element(this,{class:t(this,S)?"":"infinite",children:f(this,u,V).call(this).map((Le,ie)=>n.div({class:"inputs-wrapper",children:[n.input({type:"number",step:t(this,N),min:t(this,E),max:t(this,F),ref:z=>t(this,P).push(z),value:Le,onChange:()=>{this.updateStores(t(this,P).map(z=>parseFloat(z.value)))}}),n.div({class:"drag",children:[n.div({class:"drag-knob",ref:z=>t(this,q).push(z),onPointerdown:z=>{z.preventDefault(),o(this,I,!0);const he=f(this,u,V).call(this),Pe=he[ie],T=t(this,q)[ie],Ie=t(this,P)[ie];if(T&&Ie){const ce=T.parentElement,Ve=f(this,u,me).call(this);ce.classList.add("grabbing"),ye.setupDrag(de=>{const be=de.x-z.x,qe=t(this,S)?ce.offsetWidth/(Ve||1):1,Ne=Pe+be/qe*t(this,Z);if(he[ie]=Ne,!t(this,S)){const $e=f(this,u,ne).call(this,T,0);T.style.transform=`translateX(${$e+be}px)`}this.updateStores([...he])},()=>{if(o(this,I,!1),!t(this,S)){const de=f(this,u,ne).call(this,T,0);T.style.transition="transform 0.1s",T.style.transform=`translateX(${de}px)`,ce.classList.remove("grabbing"),setTimeout(()=>{T.style.transition=""},100)}})}},children:n.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(t(this,J)),this.firstStore.subscribe(t(this,W)),ke.elementResizer.subscribe(this,t(this,_))}disconnectedCallback(){this.firstStore.removeMiddleware(t(this,J)),this.firstStore.unsubscribe(t(this,W)),ke.elementResizer.unsubscribe(t(this,_))}}P=new WeakMap,q=new WeakMap,N=new WeakMap,E=new WeakMap,F=new WeakMap,Z=new WeakMap,j=new WeakMap,S=new WeakMap,I=new WeakMap,J=new WeakMap,W=new WeakMap,u=new WeakSet,V=function(e=this.firstStore.current){return Array.isArray(e)?e:[e]},ge=function(){f(this,u,V).call(this).map((e,s)=>{const r=t(this,q)[s];if(r&&(!t(this,I)||t(this,I)&&t(this,S))){const l=f(this,u,ne).call(this,r,e);r.style.transform=`translateX(${l}px)`}})},me=function(){return t(this,S)?t(this,F)-t(this,E):0},ne=function(e,s){const r=e.parentElement,l=f(this,u,me).call(this),d=l?s/l:.5;return(r.offsetWidth-e.offsetWidth)*d},_=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Te);const Qe=C.createStylesheet({"e-select":{display:"block",width:"100%","--arrow-color":c.aptechkaTheme.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Re extends K{constructor(...i){var r,l;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Qe);const s=((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.variants)||[];n.element(this,{children:n.element("e-select",{value:this.firstStore,onChange:d=>{this.updateStores(d.currentTarget.value)},lightChildren:[n.element("e-select-head",{lightChildren:[n.span({"data-value-holder":""})]}),...s.map((d,p)=>n.element("e-select-option",{lightChildren:d,default:p===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Re);const Ue=C.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var}});class Fe extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ue),n.element(this,{children:[n.input({class:"text-input",type:"string",value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",Fe);const et={boolean:Ee,color:Ce,link:ze,number:Te,select:Re,string:Fe},tt=C.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var v,$,A,D,H,B,X;class fe extends HTMLElement{constructor(e){var l,d,p,y;super();a(this,v,[]);a(this,$);a(this,A);a(this,D,!1);a(this,H);a(this,B,()=>{g.activeStores.current.find(e=>t(this,v).includes(e))||this.remove()});a(this,X,e=>{t(this,D)&&((e.metaKey||e.ctrlKey)&&e.code==="KeyC"?navigator.clipboard.writeText(t(this,v)[0].current):(e.metaKey||e.ctrlKey)&&e.code==="KeyR"&&(t(this,v).forEach(s=>{s.reset()}),e.preventDefault()))});o(this,v,[e.store]),o(this,$,e.store.passport.name),o(this,A,t(this,$).split(".").slice(-1).toString());const s=((d=(l=e.store.passport)==null?void 0:l.manager)==null?void 0:d.type)||"string";o(this,H,new et[s](t(this,v)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(tt),n.element(this,{class:{disabled:((y=(p=e.store.passport)==null?void 0:p.manager)==null?void 0:y.disabled)||!1},onPointerleave:()=>{o(this,D,!1)},onPointerenter:()=>{o(this,D,!0)},children:[n.div({class:"head",children:[n.div({class:"name",children:t(this,A)+":"}),n.div({class:"head-buttons",children:[n.button({class:"head-button",children:xe,onClick:()=>{navigator.clipboard.writeText(t(this,v)[0].current)}}),n.button({class:"head-button",children:Se,onClick:()=>{t(this,v).forEach(M=>{M.reset()})}})]})]}),t(this,H)]})}get key(){return t(this,$)}get name(){return t(this,A)}get stores(){return t(this,v)}addStore(e){t(this,H).addStore(e)}connectedCallback(){g.activeStores.subscribe(t(this,B)),addEventListener("keydown",t(this,X)),Ze.dispatchSizeChangeEvent(this)}disconnectedCallback(){g.activeStores.unsubscribe(t(this,B)),removeEventListener("keydown",t(this,X))}}v=new WeakMap,$=new WeakMap,A=new WeakMap,D=new WeakMap,H=new WeakMap,B=new WeakMap,X=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",fe);const st=C.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var k,Y,m,G,Q,U,ee,oe;const le=class le extends HTMLElement{constructor(e){super();a(this,k);a(this,Y,new g.Store(null));a(this,m,new g.Store([]));a(this,G);a(this,Q,null);a(this,U,null);a(this,ee,null);a(this,oe,e=>{let s=[],r=[];e.forEach(l=>{s=[...s,...l.removedNodes],r=[...r,...l.addedNodes]}),t(this,m).current=t(this,m).current.filter(l=>!s.includes(l)),t(this,k)&&!t(this,m).current.length&&!r.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(st),o(this,k,e.key),o(this,G,new MutationObserver(t(this,oe))),n.element(this,{children:[n.div({class:"wrapper",children:[n.div({class:"head",onClick:r=>{this.classList.toggle("opened"),this.classList.contains("opened")?w.openPanel(t(this,k)):w.closePanel(t(this,k))},children:[t(this,k)?n.div({class:"name",children:[t(this,k).split(".").slice(-1).toString()]}):null,t(this,Y),n.element(Oe.arrowIcon,{class:"arrow"})]}),n.div({class:"body",ref:r=>{o(this,Q,r)},children:n.div({class:"body-content",children:t(this,m),ref:r=>{o(this,U,r),o(this,ee,r.firstElementChild)}})})]})]}),e!=null&&e.storeBox&&this.handleStore(e.storeBox)}get key(){return t(this,k)}get head(){return t(this,Y)}get content(){return t(this,m)}get bodyElement(){return t(this,Q)}get contentElement(){return t(this,U)}connectedCallback(){w.isPanelOpened(t(this,k))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),t(this,G).observe(t(this,ee),{childList:!0})}handleStore(e){if(e.remainingFolders.length){const r=e.store.passport.name.split("."),l=r.slice(0,r.length-e.remainingFolders.length).join("."),d=t(this,m).current.find(p=>p.key===l);d instanceof le?d.handleStore({store:e.store,remainingFolders:e.remainingFolders.slice(1)}):t(this,m).current=[...t(this,m).current,new le({key:l,storeBox:{store:e.store,remainingFolders:e.remainingFolders.slice(1)}})]}else{const s=t(this,m).current.find(r=>r.key===e.store.passport.name);s instanceof fe?s.addStore(e.store):t(this,m).current=[...t(this,m).current,new fe({store:e.store})]}}};k=new WeakMap,Y=new WeakMap,m=new WeakMap,G=new WeakMap,Q=new WeakMap,U=new WeakMap,ee=new WeakMap,oe=new WeakMap;let ae=le;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",ae);const rt=C.createStylesheet({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
2
|
-
100dvh -
|
|
3
|
-
(
|
|
4
|
-
var(--tweaker-offset) * 2 +
|
|
5
|
-
var(--tweaker-folder-height)
|
|
6
|
-
)
|
|
7
|
-
)`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${Ke.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
|
|
8
|
-
100dvh -
|
|
9
|
-
var(--tweaker-folder-height)
|
|
10
|
-
)`}}});var te,se,re;class Me extends ae{constructor(){super({key:""});a(this,te,!1);a(this,se,()=>{w.save()});a(this,re,He.debounce(()=>{g.activeStores.current.forEach(e=>{var s;if(e.passport&&!((s=e.passport.manager)!=null&&s.invisible)){const r=e.passport.name.split(".");this.handleStore({store:e,remainingFolders:r.length>1?r.slice(0,-1):[]})}}),t(this,te)||(o(this,te,!0),this.contentElement.scroll({top:w.scrollValue}),this.contentElement.addEventListener("scroll",()=>{w.scrollValue=this.contentElement.scrollTop}))},10));w.load(),this.shadowRoot.adoptedStyleSheets.push(rt),this.head.current=[n.div({class:"tweaker-buttons",onClick:e=>{e.stopPropagation()},children:[n.button({class:"tweaker-button",children:Se,onClick:()=>{g.storeRegistry.resetState()}}),n.button({class:["tweaker-button"],children:[xe],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(g.storeRegistry.getState()))}}),n.button({class:"tweaker-button",children:Je,onClick:()=>{De.createJSONAndSave(g.storeRegistry.projectName,g.storeRegistry.getState())}}),n.label({class:"tweaker-button",children:[We,n.input({type:"file",style:{display:"none"},onChange:e=>{var l;const r=(l=e.currentTarget.files)==null?void 0:l[0];if(r){const d=new FileReader;d.onload=p=>{var M,O;const y=(O=(M=p.target)==null?void 0:M.result)==null?void 0:O.toString();y&&g.storeRegistry.loadState(y)},d.readAsText(r)}}})]})]})],n.element(this.bodyElement,{children:[n.div({class:"resize",onPointerdown:e=>{e.preventDefault();const s=this.getBoundingClientRect(),r=this.contentElement.scrollTop;ye.setupDrag(l=>{const d=e.x-l.x,p=Math.max(400,s.width+d);this.style.width=p+"px",w.changeSize("tweaker",p)},()=>{setTimeout(()=>{this.contentElement.scroll({top:r})},10)})},onDblclick:()=>{this.style.width="",w.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",t(this,se)),g.activeStores.subscribe(t(this,re)),w.changedSizes("tweaker")&&(this.style.width=w.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",t(this,se)),w.save(),g.activeStores.unsubscribe(t(this,re))}}te=new WeakMap,se=new WeakMap,re=new WeakMap;customElements.get("e-tweaker")||customElements.define("e-tweaker",Me);Ae.isBrowser&&document.body.appendChild(new Me);
|