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.
Files changed (108) hide show
  1. package/lib/{Animation-seVC6-fS.cjs → Animation-De9aUv3b.cjs} +1 -1
  2. package/lib/{Animation-DF5jPON_.js → Animation-NAGXiFv5.js} +1 -1
  3. package/lib/{Composed-ChlKoJEp.cjs → Composed-C_4slJQ6.cjs} +1 -1
  4. package/lib/{Composed-CoX1ImVk.js → Composed-CfWa-69I.js} +1 -1
  5. package/lib/{Damped-C7WAqKPh.cjs → Damped-DYJ6Z0xo.cjs} +1 -1
  6. package/lib/{Damped-BDO-F13V.js → Damped-DbJKrUIf.js} +1 -1
  7. package/lib/Derived-BIBU-y7Z.cjs +1 -0
  8. package/lib/Derived-Vo_RsJfi.js +23 -0
  9. package/lib/{SourceManager-B8-EMNnd.js → SourceManager-B6wZpXUZ.js} +1 -1
  10. package/lib/{SourceManager-TzU9Rw08.cjs → SourceManager-CfHcGLUa.cjs} +1 -1
  11. package/lib/Store-C46i0nvr.js +137 -0
  12. package/lib/Store-npaZHvX4.cjs +1 -0
  13. package/lib/{Tweened-DSXD0I0k.cjs → Tweened-BkkD9s4n.cjs} +1 -1
  14. package/lib/{Tweened-CHhmfvzo.js → Tweened-DOSHLCZa.js} +1 -1
  15. package/lib/{Viewport-DTlImj28.js → Viewport-B55BvLsV.js} +1 -1
  16. package/lib/{Viewport-BmLTk_6k.cjs → Viewport-Cv4TRGiv.cjs} +1 -1
  17. package/lib/animation/index.cjs +1 -1
  18. package/lib/animation/index.js +3 -3
  19. package/lib/attribute/index.cjs +1 -1
  20. package/lib/attribute/index.js +13 -13
  21. package/lib/canvas/index.cjs +7 -1
  22. package/lib/canvas/index.js +54 -58
  23. package/lib/class-linked-status/index.cjs +1 -1
  24. package/lib/class-linked-status/index.js +1 -1
  25. package/lib/controls/index.cjs +1 -1
  26. package/lib/controls/index.js +3 -3
  27. package/lib/{createStylesheet-DO5t5q-m.js → createStylesheet-C68ja-RS.js} +3 -3
  28. package/lib/{createStylesheet-CaDI99iu.cjs → createStylesheet-Csfmh-MH.cjs} +1 -1
  29. package/lib/css-property/index.cjs +1 -1
  30. package/lib/css-property/index.js +4 -4
  31. package/lib/dev/index.cjs +1 -1
  32. package/lib/dev/index.js +1 -1
  33. package/lib/device/index.cjs +1 -1
  34. package/lib/device/index.js +1 -1
  35. package/lib/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
  36. package/lib/element-constructor/index.cjs +1 -1
  37. package/lib/element-constructor/index.js +133 -122
  38. package/lib/element-resizer/index.js +8 -8
  39. package/lib/en3/helpers/index.cjs +1 -1
  40. package/lib/en3/helpers/index.js +4 -4
  41. package/lib/en3/index.js +1 -1
  42. package/lib/en3/loaders/index.js +1 -1
  43. package/lib/en3/misc/index.cjs +1 -1
  44. package/lib/en3/misc/index.js +2 -2
  45. package/lib/en3/utils/index.js +2 -2
  46. package/lib/{en3-x-Ki30MY.js → en3-sK9Z-fp2.js} +1 -1
  47. package/lib/file-BEr-o55N.js +31 -0
  48. package/lib/file-C9BbxzVU.cjs +1 -0
  49. package/lib/image/index.cjs +1 -1
  50. package/lib/image/index.js +1 -1
  51. package/lib/intersector/index.js +7 -7
  52. package/lib/ladder/index.cjs +1 -1
  53. package/lib/ladder/index.js +1 -1
  54. package/lib/layout-box/index.js +14 -14
  55. package/lib/media/index.cjs +1 -1
  56. package/lib/media/index.js +1 -1
  57. package/lib/need_redo_tweaker/index.cjs +18 -0
  58. package/lib/need_redo_tweaker/index.js +1343 -0
  59. package/lib/pointer/index.cjs +1 -1
  60. package/lib/pointer/index.js +3 -3
  61. package/lib/popover/index.cjs +1 -1
  62. package/lib/popover/index.js +60 -62
  63. package/lib/scroll/index.cjs +1 -1
  64. package/lib/scroll/index.js +105 -106
  65. package/lib/scroll-entries/index.js +15 -15
  66. package/lib/sequence/index.cjs +1 -1
  67. package/lib/sequence/index.js +1 -1
  68. package/lib/slicer/index.cjs +5 -5
  69. package/lib/slicer/index.js +55 -86
  70. package/lib/source/index.cjs +1 -1
  71. package/lib/source/index.js +2 -2
  72. package/lib/store/index.cjs +1 -1
  73. package/lib/store/index.js +38 -112
  74. package/lib/{tags-v-OSVkiQ.cjs → tags-6_ETuR75.cjs} +1 -1
  75. package/lib/{tags-4AoxVUe3.js → tags-zft1DGBz.js} +93 -93
  76. package/lib/ticker/index.js +1 -1
  77. package/lib/{traverseMaterials-mGC2_FkG.js → traverseMaterials-BlZbRhgW.js} +1 -1
  78. package/lib/utils/index.cjs +1 -1
  79. package/lib/utils/index.js +56 -57
  80. package/lib/video/index.cjs +1 -1
  81. package/lib/video/index.js +1 -1
  82. package/package.json +7 -55
  83. package/lib/Derived-B-2UXnVE.cjs +0 -1
  84. package/lib/Derived-CDGpSMKu.js +0 -56
  85. package/lib/Store-BnA-dJsE.cjs +0 -1
  86. package/lib/Store-DGtldlBH.js +0 -147
  87. package/lib/accordion/index.cjs +0 -1
  88. package/lib/accordion/index.js +0 -167
  89. package/lib/checkbox/index.cjs +0 -1
  90. package/lib/checkbox/index.js +0 -112
  91. package/lib/createTheme-CHnsCgAr.js +0 -15
  92. package/lib/createTheme-Cfaw9UmV.cjs +0 -1
  93. package/lib/events-BGwqaxVW.cjs +0 -1
  94. package/lib/events-CJTUMSLU.js +0 -20
  95. package/lib/file-EevnUtRj.cjs +0 -1
  96. package/lib/file-lxi_oXJf.js +0 -13
  97. package/lib/index-BhbT9PrL.js +0 -261
  98. package/lib/index-BpsQqM-8.cjs +0 -9
  99. package/lib/modal/index.cjs +0 -1
  100. package/lib/modal/index.js +0 -133
  101. package/lib/select/index.cjs +0 -1
  102. package/lib/select/index.js +0 -7
  103. package/lib/svg-path-data/index.cjs +0 -3
  104. package/lib/svg-path-data/index.js +0 -490
  105. package/lib/theme/index.cjs +0 -1
  106. package/lib/theme/index.js +0 -25
  107. package/lib/tweaker/index.cjs +0 -10
  108. package/lib/tweaker/index.js +0 -992
@@ -0,0 +1,1343 @@
1
+ var Xe = (a) => {
2
+ throw TypeError(a);
3
+ };
4
+ var Ve = (a, r, t) => r.has(a) || Xe("Cannot " + t);
5
+ var e = (a, r, t) => (Ve(a, r, "read from private field"), t ? t.call(a) : r.get(a)), i = (a, r, t) => r.has(a) ? Xe("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, t), o = (a, r, t, s) => (Ve(a, r, "write to private field"), s ? s.call(a, t) : r.set(a, t), t), d = (a, r, t) => (Ve(a, r, "access private method"), t);
6
+ import { i as Ce } from "../browser-0zX67oeU.js";
7
+ import { s as R, a as O, S as Ue } from "../Store-C46i0nvr.js";
8
+ import { d as _e, a as yt, c as kt } from "../file-BEr-o55N.js";
9
+ import { d as St } from "../function-C10DGppn.js";
10
+ import { s as et } from "../gestures-D2Fdra_G.js";
11
+ import "../ticker/index.js";
12
+ import { s as xt, e as u, l as tt, c as He, a as te, i as ze, f as Et, d as m, b as Z } from "../tags-zft1DGBz.js";
13
+ import { c as w } from "../createStylesheet-C68ja-RS.js";
14
+ import { a as Ct } from "../Viewport-B55BvLsV.js";
15
+ import { createTheme as zt } from "../element-constructor/index.js";
16
+ import { c as Tt } from "../math-BOBiC4TN.js";
17
+ import { n as Ge, t as Lt } from "../polyfills-X6KXuHg-.js";
18
+ import { elementResizer as Qe } from "../element-resizer/index.js";
19
+ import { g as Rt } from "../style-j2TwriJ_.js";
20
+ const l = zt(
21
+ {
22
+ colorMain: "#1c1c1c",
23
+ colorMainAux: "#282828",
24
+ colorFont: "#ffffff",
25
+ colorActive: "#00E5B0",
26
+ borderRadius: "12px",
27
+ borderRadiusSmall: "4px"
28
+ },
29
+ { prefix: "aptechka-" }
30
+ );
31
+ if (Ce) {
32
+ const a = xt({
33
+ ":root": l.style
34
+ }).node;
35
+ a.setAttribute("data-permanent", ""), document.head.appendChild(a);
36
+ }
37
+ const st = '<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>', it = '<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>', Mt = '<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>', Ft = '<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>', nt = `<svg
38
+ xmlns="http://www.w3.org/2000/svg"
39
+ width="32"
40
+ height="32"
41
+ viewBox="0 0 24 24"
42
+ >
43
+ <path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
44
+ </svg>
45
+ `;
46
+ var P, b, C;
47
+ class It {
48
+ constructor() {
49
+ i(this, P);
50
+ i(this, b);
51
+ i(this, C);
52
+ this.scrollValue = 0, o(this, P, ""), o(this, b, []), o(this, C, {}), o(this, P, R.name + "-tweaker");
53
+ }
54
+ openPanel(r) {
55
+ e(this, b).includes(r) || e(this, b).push(r);
56
+ }
57
+ closePanel(r) {
58
+ o(this, b, e(this, b).filter((t) => t !== r));
59
+ }
60
+ isPanelOpened(r) {
61
+ return e(this, b).includes(r);
62
+ }
63
+ changedSizes(r) {
64
+ return e(this, C)[r];
65
+ }
66
+ changeSize(r, t) {
67
+ t ? e(this, C)[r] = t : delete e(this, C)[r];
68
+ }
69
+ save() {
70
+ const r = {
71
+ openedPanels: e(this, b),
72
+ changedSizes: e(this, C),
73
+ scrollValue: this.scrollValue
74
+ };
75
+ localStorage.setItem(e(this, P), JSON.stringify(r)), R.saveState();
76
+ }
77
+ load() {
78
+ R.loadState();
79
+ const r = localStorage.getItem(e(this, P));
80
+ if (r)
81
+ try {
82
+ const t = JSON.parse(r);
83
+ t.openedPanels && o(this, b, t.openedPanels), t.changedSizes && o(this, C, t.changedSizes), t.scrollValue && (this.scrollValue = t.scrollValue);
84
+ } catch (t) {
85
+ console.error(t);
86
+ }
87
+ }
88
+ }
89
+ P = new WeakMap(), b = new WeakMap(), C = new WeakMap();
90
+ const v = new It(), At = '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>', Pt = w({
91
+ ":host": {
92
+ position: "relative",
93
+ display: "inline-block",
94
+ width: "30px",
95
+ height: "30px",
96
+ borderRadius: l.borderRadiusSmall.var,
97
+ overflow: "hidden"
98
+ },
99
+ "label, .fake": {
100
+ display: "block"
101
+ },
102
+ "label, .fake, .default": {
103
+ width: "100%",
104
+ height: "100%"
105
+ },
106
+ ".real": {
107
+ position: "absolute",
108
+ top: "0",
109
+ left: "0",
110
+ width: "0px",
111
+ height: "0px",
112
+ visibility: "hidden",
113
+ margin: "0"
114
+ },
115
+ ".default": {
116
+ display: "flex",
117
+ alignItems: "center",
118
+ justifyContent: "center",
119
+ backgroundColor: l.colorMainAux.var
120
+ },
121
+ ".default svg": {
122
+ width: "60%",
123
+ height: "60%",
124
+ fill: l.colorFont.var,
125
+ opacity: 0,
126
+ transition: "var(--duration-short)"
127
+ },
128
+ ":host(.checked) .default svg": {
129
+ opacity: 1
130
+ }
131
+ });
132
+ var M, K, $, ne;
133
+ const We = class We extends HTMLElement {
134
+ constructor() {
135
+ super();
136
+ i(this, $);
137
+ i(this, M, null);
138
+ i(this, K);
139
+ this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Pt), o(this, K, this.attachInternals()), u(this, {
140
+ children: tt({
141
+ children: [
142
+ He({
143
+ class: "fake",
144
+ children: te({
145
+ children: [
146
+ He({
147
+ class: "default",
148
+ children: [At]
149
+ })
150
+ ]
151
+ })
152
+ }),
153
+ ze({
154
+ ref: (s) => {
155
+ o(this, M, s), s.required = this.hasAttribute("required"), s.value = this.getAttribute("value") || "", s.checked = this.hasAttribute("checked"), s.name = this.getAttribute("name") || "", d(this, $, ne).call(this);
156
+ },
157
+ class: "real",
158
+ type: "checkbox",
159
+ onChange: () => {
160
+ d(this, $, ne).call(this), this.dispatchEvent(
161
+ new Event("change", {
162
+ composed: !0
163
+ })
164
+ );
165
+ }
166
+ })
167
+ ]
168
+ })
169
+ });
170
+ }
171
+ get checked() {
172
+ return e(this, M).checked;
173
+ }
174
+ set checked(t) {
175
+ e(this, M).checked = t, d(this, $, ne).call(this);
176
+ }
177
+ get value() {
178
+ return e(this, M).value;
179
+ }
180
+ set value(t) {
181
+ e(this, M).value = t, d(this, $, ne).call(this);
182
+ }
183
+ };
184
+ M = new WeakMap(), K = new WeakMap(), $ = new WeakSet(), ne = function() {
185
+ this.checked ? e(this, K).setFormValue(this.value) : e(this, K).setFormValue(null), this.classList.toggle("checked", this.checked);
186
+ }, We.formAssociated = !0;
187
+ let Ne = We;
188
+ customElements.get("e-checkbox") || customElements.define("e-checkbox", Ne);
189
+ var F;
190
+ class se extends HTMLElement {
191
+ constructor(...t) {
192
+ super();
193
+ i(this, F);
194
+ o(this, F, t);
195
+ }
196
+ addStore(t) {
197
+ e(this, F).push(t);
198
+ }
199
+ get firstStore() {
200
+ return e(this, F)[0];
201
+ }
202
+ get stores() {
203
+ return e(this, F);
204
+ }
205
+ updateStores(t) {
206
+ e(this, F).forEach((s) => {
207
+ s.current = t;
208
+ });
209
+ }
210
+ }
211
+ F = new WeakMap();
212
+ const $t = w({
213
+ ":host": {
214
+ width: "100%",
215
+ display: "inline-flex",
216
+ height: "max-content"
217
+ },
218
+ "e-checkbox": {
219
+ "--size": "calc(var(--height-input) * 0.8)",
220
+ width: "var(--size)",
221
+ height: "var(--size)",
222
+ borderRadius: l.borderRadiusSmall.var
223
+ }
224
+ });
225
+ class rt extends se {
226
+ constructor(...r) {
227
+ super(...r), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push($t), u(this, {
228
+ children: [
229
+ u("e-checkbox", {
230
+ onChange: (s) => {
231
+ this.updateStores(s.currentTarget.checked);
232
+ },
233
+ ref: (s) => {
234
+ this.firstStore.subscribe((n) => {
235
+ s.checked = n.current;
236
+ });
237
+ }
238
+ })
239
+ ]
240
+ });
241
+ }
242
+ }
243
+ customElements.get("e-tweaker-boolean-manager") || customElements.define(
244
+ "e-tweaker-boolean-manager",
245
+ rt
246
+ );
247
+ const Vt = w({
248
+ ":host": {
249
+ width: "100%",
250
+ display: "inline-flex",
251
+ height: "max-content"
252
+ },
253
+ input: {
254
+ width: "100%",
255
+ height: "var(--height-input)",
256
+ padding: "0",
257
+ background: "none",
258
+ borderRadius: l.borderRadius.var,
259
+ border: "none",
260
+ blockSize: "unset"
261
+ },
262
+ "input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper": {
263
+ boxSizing: "border-box",
264
+ padding: "0px",
265
+ border: "none",
266
+ borderRadius: l.borderRadius.var,
267
+ height: "calc(var(--height-input) * 0.93)"
268
+ }
269
+ });
270
+ class ot extends se {
271
+ constructor(...r) {
272
+ super(...r), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Vt), u(this, {
273
+ children: [
274
+ ze({
275
+ type: "color",
276
+ value: this.firstStore,
277
+ onInput: (s) => {
278
+ this.updateStores(s.currentTarget.value);
279
+ }
280
+ })
281
+ ]
282
+ });
283
+ }
284
+ }
285
+ customElements.get("e-tweaker-color-manager") || customElements.define("e-tweaker-color-manager", ot);
286
+ const Ht = w({
287
+ a: {
288
+ color: "inherit",
289
+ fontSize: "var(--font-size-small)"
290
+ }
291
+ });
292
+ class at extends se {
293
+ constructor(...r) {
294
+ var s, n;
295
+ super(...r), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Ht), u(this, {
296
+ children: [
297
+ Et({
298
+ href: this.firstStore,
299
+ target: (n = (s = this.firstStore.passport) == null ? void 0 : s.manager) != null && n.sameWindow ? "_self" : "_blank",
300
+ children: this.firstStore
301
+ })
302
+ ]
303
+ });
304
+ }
305
+ }
306
+ customElements.get("e-tweaker-link-manager") || customElements.define("e-tweaker-link-manager", at);
307
+ const Nt = w({
308
+ ":host": {
309
+ width: "100%",
310
+ display: "flex",
311
+ alignItems: "center",
312
+ gap: "var(--gap-small)"
313
+ },
314
+ ".inputs-wrapper": {
315
+ display: "grid",
316
+ gap: "var(--gap-small)",
317
+ width: "100%"
318
+ },
319
+ input: {
320
+ boxSizing: "border-box",
321
+ outline: "none",
322
+ fontVariantNumeric: "tabular-nums",
323
+ fontFamily: "inherit",
324
+ color: "inherit",
325
+ border: "none",
326
+ fontSize: "var(--font-size-small)",
327
+ width: "100%",
328
+ height: "var(--height-input)",
329
+ margin: "0",
330
+ padding: "0 var(--gap-small)",
331
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
332
+ borderRadius: l.borderRadius.var
333
+ },
334
+ ".drag": {
335
+ position: "relative",
336
+ width: "100%",
337
+ height: "calc(var(--height-input) * 0.2)",
338
+ display: "flex",
339
+ alignItems: "center"
340
+ },
341
+ ".drag::before": {
342
+ content: '""',
343
+ position: "absolute",
344
+ left: "0",
345
+ width: "100%",
346
+ zIndex: "-1",
347
+ height: "1px",
348
+ borderBottom: `1px solid ${l.colorFont.var}`,
349
+ transform: "translateY(-50%)",
350
+ opacity: "0.3"
351
+ },
352
+ ":host(.infinite) .drag::before": {
353
+ borderBottom: `1px dashed ${l.colorFont.var}`
354
+ },
355
+ ".drag-knob": {
356
+ "--size": "calc(var(--height-input) * 0.4)",
357
+ width: "var(--size)",
358
+ height: "var(--size)"
359
+ },
360
+ ".drag-knob-inner": {
361
+ width: "100%",
362
+ height: "100%",
363
+ backgroundColor: l.colorFont.var,
364
+ borderRadius: l.borderRadiusSmall.var,
365
+ transition: "opacity var(--duration-short)"
366
+ },
367
+ ":host(.infinite) .grabbing .drag-knob-inner": {
368
+ opacity: 0.3
369
+ }
370
+ });
371
+ var V, B, j, z, I, re, oe, E, H, ae, le, p, D, De, Oe, Le, he;
372
+ class lt extends se {
373
+ constructor(...t) {
374
+ var n, h, c, g, x, A, ie, Je;
375
+ super(...t);
376
+ i(this, p);
377
+ i(this, V, []);
378
+ i(this, B, []);
379
+ i(this, j);
380
+ i(this, z);
381
+ i(this, I);
382
+ i(this, re);
383
+ i(this, oe);
384
+ i(this, E);
385
+ i(this, H, !1);
386
+ i(this, ae, (t) => {
387
+ const s = d(this, p, D).call(this, t);
388
+ return s.map((n, h) => {
389
+ const c = typeof n == "string" ? parseFloat(n) || e(this, z) : n, g = Tt(c, e(this, z), e(this, I)), x = Lt(g, e(this, j));
390
+ s[h] = x;
391
+ }), e(this, oe) === "number" ? s[0] : s;
392
+ });
393
+ i(this, le, () => {
394
+ d(this, p, D).call(this).map((t, s) => {
395
+ const n = e(this, V)[s];
396
+ n && (n.value = (t || 0).toString());
397
+ }), d(this, p, De).call(this);
398
+ });
399
+ i(this, he, () => {
400
+ d(this, p, De).call(this);
401
+ });
402
+ this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Nt), o(this, z, Ge(
403
+ (h = (n = this.firstStore.passport) == null ? void 0 : n.manager) == null ? void 0 : h.min,
404
+ -1 / 0
405
+ )), o(this, I, Ge(
406
+ (g = (c = this.firstStore.passport) == null ? void 0 : c.manager) == null ? void 0 : g.max,
407
+ 1 / 0
408
+ )), o(this, j, ((A = (x = this.firstStore.passport) == null ? void 0 : x.manager) == null ? void 0 : A.step) || 0.01), o(this, re, ((Je = (ie = this.firstStore.passport) == null ? void 0 : ie.manager) == null ? void 0 : Je.ease) || 1), o(this, oe, Array.isArray(this.firstStore.current) ? "array" : "number"), o(this, E, isFinite(e(this, I)) && isFinite(e(this, z))), u(this, {
409
+ class: e(this, E) ? "" : "infinite",
410
+ children: d(this, p, D).call(this).map((pt, Te) => m({
411
+ class: "inputs-wrapper",
412
+ children: [
413
+ ze({
414
+ type: "number",
415
+ step: e(this, j),
416
+ min: e(this, z),
417
+ max: e(this, I),
418
+ ref: (T) => e(this, V).push(T),
419
+ value: pt,
420
+ onChange: () => {
421
+ this.updateStores(
422
+ e(this, V).map((T) => parseFloat(T.value))
423
+ );
424
+ }
425
+ }),
426
+ m({
427
+ class: "drag",
428
+ children: [
429
+ m({
430
+ class: "drag-knob",
431
+ ref: (T) => e(this, B).push(T),
432
+ onPointerdown: (T) => {
433
+ T.preventDefault(), o(this, H, !0);
434
+ const Ae = d(this, p, D).call(this), gt = Ae[Te], L = e(this, B)[Te], mt = e(this, V)[Te];
435
+ if (L && mt) {
436
+ const Pe = L.parentElement, ft = d(this, p, Oe).call(this);
437
+ Pe.classList.add("grabbing"), et(
438
+ ($e) => {
439
+ const Ye = $e.x - T.x, wt = e(this, E) ? Pe.offsetWidth / (ft || 1) : 1, vt = gt + Ye / wt * e(this, re);
440
+ if (Ae[Te] = vt, !e(this, E)) {
441
+ const bt = d(this, p, Le).call(this, L, 0);
442
+ L.style.transform = `translateX(${bt + Ye}px)`;
443
+ }
444
+ this.updateStores([...Ae]);
445
+ },
446
+ () => {
447
+ if (o(this, H, !1), !e(this, E)) {
448
+ const $e = d(this, p, Le).call(this, L, 0);
449
+ L.style.transition = "transform 0.1s", L.style.transform = `translateX(${$e}px)`, Pe.classList.remove("grabbing"), setTimeout(() => {
450
+ L.style.transition = "";
451
+ }, 100);
452
+ }
453
+ }
454
+ );
455
+ }
456
+ },
457
+ children: m({
458
+ class: "drag-knob-inner"
459
+ })
460
+ })
461
+ ]
462
+ })
463
+ ]
464
+ }))
465
+ });
466
+ }
467
+ connectedCallback() {
468
+ this.firstStore.addMiddleware(e(this, ae)), this.firstStore.subscribe(e(this, le)), Qe.subscribe(this, e(this, he));
469
+ }
470
+ disconnectedCallback() {
471
+ this.firstStore.removeMiddleware(e(this, ae)), this.firstStore.unsubscribe(e(this, le)), Qe.unsubscribe(e(this, he));
472
+ }
473
+ }
474
+ V = new WeakMap(), B = new WeakMap(), j = new WeakMap(), z = new WeakMap(), I = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), E = new WeakMap(), H = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), p = new WeakSet(), D = function(t = this.firstStore.current) {
475
+ return Array.isArray(t) ? t : [t];
476
+ }, De = function() {
477
+ d(this, p, D).call(this).map((t, s) => {
478
+ const n = e(this, B)[s];
479
+ if (n && (!e(this, H) || e(this, H) && e(this, E))) {
480
+ const h = d(this, p, Le).call(this, n, t);
481
+ n.style.transform = `translateX(${h}px)`;
482
+ }
483
+ });
484
+ }, Oe = function() {
485
+ return e(this, E) ? e(this, I) - e(this, z) : 0;
486
+ }, Le = function(t, s) {
487
+ const n = t.parentElement, h = d(this, p, Oe).call(this), c = h ? s / h : 0.5;
488
+ return (n.offsetWidth - t.offsetWidth) * c;
489
+ }, he = new WeakMap();
490
+ customElements.get("e-tweaker-number-manager") || customElements.define("e-tweaker-number-manager", lt);
491
+ const Dt = w({
492
+ ":host": {
493
+ position: "relative"
494
+ },
495
+ ".head": {
496
+ width: "100%",
497
+ cursor: "default",
498
+ background: "none",
499
+ border: "none",
500
+ color: "inherit",
501
+ fontFamily: "inherit",
502
+ fontSize: "inherit",
503
+ fontWeight: "inherit",
504
+ textAlign: "start",
505
+ padding: "0",
506
+ margin: "0"
507
+ },
508
+ ".body": {
509
+ boxSizing: "border-box",
510
+ position: "var(--position, unset)",
511
+ top: "100%",
512
+ left: "0",
513
+ width: "100%",
514
+ overflow: "hidden",
515
+ transitionDuration: "var(--duration, var(--duration-short))",
516
+ transitionProperty: "height",
517
+ cursor: "default"
518
+ },
519
+ ".body-inner": {
520
+ display: "grid",
521
+ gap: "var(--gap, 0px)",
522
+ width: "100%",
523
+ paddingTop: "var(--gap, 0px)"
524
+ }
525
+ });
526
+ var W, q, y, N, J, Y, Me, ce, Ke;
527
+ const qe = class qe extends HTMLElement {
528
+ constructor() {
529
+ super();
530
+ i(this, ce);
531
+ i(this, W, null);
532
+ i(this, q, "");
533
+ i(this, y, null);
534
+ i(this, N, !1);
535
+ i(this, J);
536
+ i(this, Y, null);
537
+ i(this, Me, () => {
538
+ _e(this);
539
+ });
540
+ Ce && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Dt), o(this, W, this.attachInternals()), o(this, Y, new ResizeObserver(e(this, Me))), u(this, {
541
+ children: [
542
+ Z({
543
+ class: "head",
544
+ children: te({ name: "head" }),
545
+ onClick: () => {
546
+ this.opened ? this.close() : this.open();
547
+ }
548
+ }),
549
+ m({
550
+ class: "body",
551
+ style: {
552
+ height: "0px"
553
+ },
554
+ children: m({
555
+ class: "body-inner",
556
+ children: te()
557
+ }),
558
+ ref: (s) => {
559
+ o(this, y, s);
560
+ }
561
+ })
562
+ ]
563
+ }));
564
+ }
565
+ get value() {
566
+ return e(this, q);
567
+ }
568
+ set value(t) {
569
+ o(this, q, t), this.dispatchEvent(
570
+ new Event("change", {
571
+ bubbles: !0,
572
+ composed: !0
573
+ })
574
+ ), e(this, W).setFormValue(e(this, q));
575
+ }
576
+ get internals() {
577
+ return e(this, W);
578
+ }
579
+ get opened() {
580
+ return e(this, N);
581
+ }
582
+ open() {
583
+ clearTimeout(e(this, J)), o(this, N, !0), e(this, y).style.display = "grid", this.classList.add("triggered"), setTimeout(() => {
584
+ this.classList.add("opened"), e(this, y).style.height = e(this, y).scrollHeight + "px", d(this, ce, Ke).call(this);
585
+ }, 0);
586
+ }
587
+ close() {
588
+ o(this, N, !1), e(this, y).style.height = "0px", this.classList.remove("opened"), d(this, ce, Ke).call(this), o(this, J, setTimeout(() => {
589
+ this.classList.remove("triggered"), e(this, y).style.display = "none";
590
+ }, Rt(e(this, y))));
591
+ }
592
+ connectedCallback() {
593
+ e(this, Y).observe(e(this, y));
594
+ }
595
+ disconnectedCallback() {
596
+ clearTimeout(e(this, J)), e(this, Y).disconnect();
597
+ }
598
+ };
599
+ W = new WeakMap(), q = new WeakMap(), y = new WeakMap(), N = new WeakMap(), J = new WeakMap(), Y = new WeakMap(), Me = new WeakMap(), ce = new WeakSet(), Ke = function() {
600
+ yt(this), this.dispatchEvent(
601
+ new CustomEvent("selectToggle", {
602
+ bubbles: !0,
603
+ composed: !0,
604
+ detail: {
605
+ opened: e(this, N)
606
+ }
607
+ })
608
+ );
609
+ }, qe.formAssociated = !0;
610
+ let Ze = qe;
611
+ customElements.get("e-select") || customElements.define("e-select", Ze);
612
+ var de;
613
+ class ht extends HTMLElement {
614
+ constructor() {
615
+ super(...arguments);
616
+ i(this, de, null);
617
+ }
618
+ get selectElement() {
619
+ return e(this, de);
620
+ }
621
+ connectedCallback() {
622
+ var s, n;
623
+ const t = (n = (s = this.assignedSlot) == null ? void 0 : s.getRootNode()) == null ? void 0 : n.host;
624
+ t ? o(this, de, t) : console.log(this, "e-select not found");
625
+ }
626
+ }
627
+ de = new WeakMap();
628
+ const Ot = w({
629
+ ":host": {
630
+ width: "100%",
631
+ height: "40px",
632
+ display: "inline-flex",
633
+ alignItems: "center"
634
+ }
635
+ });
636
+ var X, ue, Be;
637
+ class Zt extends ht {
638
+ constructor() {
639
+ super();
640
+ i(this, ue);
641
+ i(this, X, () => {
642
+ this.selectElement.value === this.value ? this.style.display = "none" : this.style.display = "";
643
+ });
644
+ Ce && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Ot), u(this, {
645
+ tabindex: 0,
646
+ onClick: () => {
647
+ d(this, ue, Be).call(this);
648
+ },
649
+ onKeydown: (s) => {
650
+ s.code === "Space" && d(this, ue, Be).call(this);
651
+ },
652
+ children: te()
653
+ }));
654
+ }
655
+ get value() {
656
+ return (this.hasAttribute("value") ? this.getAttribute("value") : this.innerText) || "";
657
+ }
658
+ connectedCallback() {
659
+ super.connectedCallback(), this.hasAttribute("default") && (this.selectElement.value || (this.selectElement.value = this.value)), this.selectElement.addEventListener("change", e(this, X)), setTimeout(() => {
660
+ e(this, X).call(this);
661
+ });
662
+ }
663
+ disconnectedCallback() {
664
+ this.selectElement.removeEventListener("change", e(this, X));
665
+ }
666
+ }
667
+ X = new WeakMap(), ue = new WeakSet(), Be = function() {
668
+ this.selectElement.value = this.value, this.selectElement.close();
669
+ };
670
+ customElements.get("e-select-option") || customElements.define("e-select-option", Zt);
671
+ const Kt = w({
672
+ ":host": {
673
+ width: "100%",
674
+ height: "40px",
675
+ display: "inline-flex",
676
+ alignItems: "center",
677
+ justifyContent: "space-between"
678
+ },
679
+ ".default-arrow": {
680
+ flexShrink: "0",
681
+ width: "var(--arrow-size, 1em)",
682
+ height: "var(--arrow-size, 1em)",
683
+ fill: `var(--arrow-color, ${l.colorMain.var})`,
684
+ transitionProperty: "transform",
685
+ transitionDuration: "var(--duration, var(--duration-short))"
686
+ },
687
+ ":host(.opened) .default-arrow": {
688
+ transform: "scaleY(-1)"
689
+ }
690
+ });
691
+ var pe, U, ge;
692
+ class Bt extends ht {
693
+ constructor() {
694
+ super();
695
+ i(this, pe, null);
696
+ i(this, U, () => {
697
+ const s = this.selectElement.shadowRoot.querySelector(
698
+ ".body slot"
699
+ ).assignedElements().find((n) => n.value === this.selectElement.value);
700
+ s && (e(this, pe).innerHTML = s.innerHTML);
701
+ });
702
+ i(this, ge, () => {
703
+ this.classList.toggle("opened", this.selectElement.opened);
704
+ });
705
+ Ce && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Kt), u(this, {
706
+ children: [
707
+ te(),
708
+ te({
709
+ name: "arrow",
710
+ children: u(nt, { class: "default-arrow" })
711
+ })
712
+ ]
713
+ }), this.slot = "head");
714
+ }
715
+ connectedCallback() {
716
+ super.connectedCallback(), o(this, pe, this.querySelector("[data-value-holder]") || this), this.selectElement.addEventListener("change", e(this, U)), e(this, U).call(this), this.selectElement.addEventListener("selectToggle", e(this, ge));
717
+ }
718
+ disconnectedCallback() {
719
+ this.selectElement.removeEventListener("change", e(this, U)), this.selectElement.removeEventListener("selectToggle", e(this, ge));
720
+ }
721
+ }
722
+ pe = new WeakMap(), U = new WeakMap(), ge = new WeakMap();
723
+ customElements.get("e-select-head") || customElements.define("e-select-head", Bt);
724
+ const jt = w({
725
+ "e-select": {
726
+ display: "block",
727
+ width: "100%",
728
+ "--arrow-color": l.colorFont.var
729
+ },
730
+ "e-select-head": {
731
+ width: "100%",
732
+ height: "var(--height-input)",
733
+ display: "flex",
734
+ alignItems: "center",
735
+ justifyContent: "space-between",
736
+ fontSize: "var(--font-size-small)"
737
+ },
738
+ "e-select-option": {
739
+ height: "var(--height-input)",
740
+ transitionDuration: "var(--duration-short)",
741
+ transitionProperty: "color",
742
+ fontSize: "var(--font-size-small)"
743
+ },
744
+ "e-select-option:hover": {
745
+ color: l.colorActive.var
746
+ },
747
+ svg: {
748
+ width: "16px",
749
+ height: "16px",
750
+ fill: l.colorFont.var,
751
+ transitionProperty: "transform",
752
+ transitionDuration: "var(--duration-short)"
753
+ },
754
+ ".opened svg": {
755
+ transform: "scaleY(-1)"
756
+ }
757
+ });
758
+ class ct extends se {
759
+ constructor(...r) {
760
+ var n, h;
761
+ super(...r), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(jt);
762
+ const s = ((h = (n = this.firstStore.passport) == null ? void 0 : n.manager) == null ? void 0 : h.variants) || [];
763
+ u(this, {
764
+ children: u("e-select", {
765
+ value: this.firstStore,
766
+ onChange: (c) => {
767
+ this.updateStores(c.currentTarget.value);
768
+ },
769
+ lightChildren: [
770
+ u("e-select-head", {
771
+ lightChildren: [
772
+ He({
773
+ "data-value-holder": ""
774
+ })
775
+ ]
776
+ }),
777
+ ...s.map(
778
+ (c, g) => u("e-select-option", {
779
+ lightChildren: c,
780
+ default: g === 0 ? !0 : null
781
+ })
782
+ )
783
+ ]
784
+ })
785
+ });
786
+ }
787
+ }
788
+ customElements.get("e-tweaker-select-manager") || customElements.define("e-tweaker-select-manager", ct);
789
+ const Wt = w({
790
+ ":host": {
791
+ width: "100%",
792
+ display: "flex",
793
+ alignItems: "center"
794
+ },
795
+ input: {
796
+ boxSizing: "border-box",
797
+ outline: "none",
798
+ fontVariantNumeric: "tabular-nums",
799
+ fontFamily: "inherit",
800
+ color: "inherit",
801
+ border: "none",
802
+ fontSize: "var(--font-size-small)",
803
+ height: "var(--height-input)",
804
+ width: "100%",
805
+ margin: "0",
806
+ padding: "0 var(--gap-small)",
807
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
808
+ borderRadius: l.borderRadius.var
809
+ }
810
+ });
811
+ class dt extends se {
812
+ constructor(...r) {
813
+ super(...r), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Wt), u(this, {
814
+ children: [
815
+ ze({
816
+ class: "text-input",
817
+ type: "string",
818
+ value: this.firstStore,
819
+ onChange: (s) => {
820
+ this.updateStores(
821
+ s.currentTarget.value
822
+ );
823
+ }
824
+ })
825
+ ]
826
+ });
827
+ }
828
+ }
829
+ customElements.get("e-tweaker-string-manager") || customElements.define("e-tweaker-string-manager", dt);
830
+ const qt = {
831
+ boolean: rt,
832
+ color: ot,
833
+ link: at,
834
+ number: lt,
835
+ select: ct,
836
+ string: dt
837
+ }, Jt = w({
838
+ ":host": {
839
+ display: "grid",
840
+ gridAutoFlow: "column",
841
+ gridTemplateColumns: "0.5fr 1fr",
842
+ alignItems: "center",
843
+ color: l.colorFont.var,
844
+ gap: "var(--gap-medium)"
845
+ },
846
+ ":host(.disabled)": {
847
+ pointerEvents: "none",
848
+ opacity: 0.5
849
+ },
850
+ ".head": {
851
+ fontSize: "var(--font-size-medium)",
852
+ display: "flex",
853
+ alignItems: "center",
854
+ gap: "var(--gap-extra-small)"
855
+ },
856
+ ".head-buttons": {
857
+ display: "flex"
858
+ },
859
+ ".head-button": {
860
+ width: "14px",
861
+ height: "14px",
862
+ padding: "0",
863
+ margin: "0",
864
+ border: "none",
865
+ background: "none",
866
+ fill: l.colorFont.var,
867
+ transitionDuration: "var(--duration-short)",
868
+ transitionProperty: "fill, opacity",
869
+ opacity: "0"
870
+ },
871
+ ":host(:hover) .head-button": {
872
+ opacity: "1"
873
+ },
874
+ ".head-button:hover": {
875
+ fill: l.colorActive.var
876
+ },
877
+ ".head-button svg": {
878
+ width: "100%",
879
+ height: "100%"
880
+ }
881
+ });
882
+ var k, G, Q, _, ee, me, fe;
883
+ class je extends HTMLElement {
884
+ constructor(t) {
885
+ var h, c, g, x;
886
+ super();
887
+ i(this, k, []);
888
+ i(this, G);
889
+ i(this, Q);
890
+ i(this, _, !1);
891
+ i(this, ee);
892
+ i(this, me, () => {
893
+ O.current.find((t) => e(this, k).includes(t)) || this.remove();
894
+ });
895
+ i(this, fe, (t) => {
896
+ e(this, _) && ((t.metaKey || t.ctrlKey) && t.code === "KeyC" ? navigator.clipboard.writeText(e(this, k)[0].current) : (t.metaKey || t.ctrlKey) && t.code === "KeyR" && (e(this, k).forEach((s) => {
897
+ s.reset();
898
+ }), t.preventDefault()));
899
+ });
900
+ o(this, k, [t.store]), o(this, G, t.store.passport.name), o(this, Q, e(this, G).split(".").slice(-1).toString());
901
+ const s = ((c = (h = t.store.passport) == null ? void 0 : h.manager) == null ? void 0 : c.type) || "string";
902
+ o(this, ee, new qt[s](e(this, k)[0])), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Jt), u(this, {
903
+ class: {
904
+ disabled: ((x = (g = t.store.passport) == null ? void 0 : g.manager) == null ? void 0 : x.disabled) || !1
905
+ },
906
+ onPointerleave: () => {
907
+ o(this, _, !1);
908
+ },
909
+ onPointerenter: () => {
910
+ o(this, _, !0);
911
+ },
912
+ children: [
913
+ m({
914
+ class: "head",
915
+ children: [
916
+ m({ class: "name", children: e(this, Q) + ":" }),
917
+ m({
918
+ class: "head-buttons",
919
+ children: [
920
+ Z({
921
+ class: "head-button",
922
+ children: it,
923
+ onClick: () => {
924
+ navigator.clipboard.writeText(e(this, k)[0].current);
925
+ }
926
+ }),
927
+ Z({
928
+ class: "head-button",
929
+ children: st,
930
+ onClick: () => {
931
+ e(this, k).forEach((A) => {
932
+ A.reset();
933
+ });
934
+ }
935
+ })
936
+ ]
937
+ })
938
+ ]
939
+ }),
940
+ e(this, ee)
941
+ ]
942
+ });
943
+ }
944
+ get key() {
945
+ return e(this, G);
946
+ }
947
+ get name() {
948
+ return e(this, Q);
949
+ }
950
+ get stores() {
951
+ return e(this, k);
952
+ }
953
+ addStore(t) {
954
+ e(this, ee).addStore(t);
955
+ }
956
+ connectedCallback() {
957
+ O.subscribe(e(this, me)), addEventListener("keydown", e(this, fe)), _e(this);
958
+ }
959
+ disconnectedCallback() {
960
+ O.unsubscribe(e(this, me)), removeEventListener("keydown", e(this, fe));
961
+ }
962
+ }
963
+ k = new WeakMap(), G = new WeakMap(), Q = new WeakMap(), _ = new WeakMap(), ee = new WeakMap(), me = new WeakMap(), fe = new WeakMap();
964
+ customElements.get("e-tweaker-field") || customElements.define("e-tweaker-field", je);
965
+ const Yt = w({
966
+ ".wrapper": {
967
+ boxSizing: "border-box",
968
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
969
+ borderRadius: l.borderRadius.var
970
+ },
971
+ ".head": {
972
+ boxSizing: "border-box",
973
+ width: "100%",
974
+ height: "var(--tweaker-folder-height)",
975
+ paddingLeft: "var(--gap-medium)",
976
+ paddingRight: "var(--gap-medium)",
977
+ display: "flex",
978
+ alignItems: "center",
979
+ justifyContent: "space-between",
980
+ backgroundColor: l.colorMainAux.var,
981
+ borderRadius: l.borderRadius.var
982
+ },
983
+ ".name": {
984
+ fontSize: "var(--font-size-large)",
985
+ color: l.colorFont.var
986
+ },
987
+ ".body": {
988
+ display: "none",
989
+ overflow: "hidden",
990
+ "@supports (height: calc-size(auto))": {
991
+ height: "0"
992
+ }
993
+ },
994
+ ":host(.transition-allowed) .body": {
995
+ transition: "height var(--duration-short), display var(--duration-short) allow-discrete"
996
+ },
997
+ ":host(.opened) .body": {
998
+ height: "calc-size(auto)",
999
+ display: "block",
1000
+ "@starting-style": {
1001
+ height: "0"
1002
+ }
1003
+ },
1004
+ ".body-content": {
1005
+ boxSizing: "border-box",
1006
+ padding: "var(--gap-large)",
1007
+ display: "grid",
1008
+ gap: "var(--gap-medium)"
1009
+ },
1010
+ ".arrow": {
1011
+ width: "20px",
1012
+ height: "20px",
1013
+ fill: l.colorFont.var,
1014
+ transition: "transform var(--duration-short)"
1015
+ },
1016
+ ".opened .arrow": {
1017
+ transform: "scaleY(-1)"
1018
+ }
1019
+ });
1020
+ var S, we, f, ve, be, ye, ke, Fe;
1021
+ const Ie = class Ie extends HTMLElement {
1022
+ constructor(t) {
1023
+ super();
1024
+ i(this, S);
1025
+ i(this, we, new Ue(null));
1026
+ i(this, f, new Ue([]));
1027
+ i(this, ve);
1028
+ i(this, be, null);
1029
+ i(this, ye, null);
1030
+ i(this, ke, null);
1031
+ i(this, Fe, (t) => {
1032
+ let s = [], n = [];
1033
+ t.forEach((h) => {
1034
+ s = [...s, ...h.removedNodes], n = [...n, ...h.addedNodes];
1035
+ }), e(this, f).current = e(this, f).current.filter(
1036
+ (h) => !s.includes(h)
1037
+ ), e(this, S) && !e(this, f).current.length && !n.length && this.remove();
1038
+ });
1039
+ this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Yt), o(this, S, t.key), o(this, ve, new MutationObserver(e(this, Fe))), u(this, {
1040
+ children: [
1041
+ m({
1042
+ class: "wrapper",
1043
+ children: [
1044
+ m({
1045
+ class: "head",
1046
+ onClick: (n) => {
1047
+ this.classList.toggle("opened"), this.classList.contains("opened") ? v.openPanel(e(this, S)) : v.closePanel(e(this, S));
1048
+ },
1049
+ children: [
1050
+ e(this, S) ? m({
1051
+ class: "name",
1052
+ children: [e(this, S).split(".").slice(-1).toString()]
1053
+ }) : null,
1054
+ e(this, we),
1055
+ u(nt, {
1056
+ class: "arrow"
1057
+ })
1058
+ ]
1059
+ }),
1060
+ m({
1061
+ class: "body",
1062
+ ref: (n) => {
1063
+ o(this, be, n);
1064
+ },
1065
+ children: m({
1066
+ class: "body-content",
1067
+ children: e(this, f),
1068
+ ref: (n) => {
1069
+ o(this, ye, n), o(this, ke, n.firstElementChild);
1070
+ }
1071
+ })
1072
+ })
1073
+ ]
1074
+ })
1075
+ ]
1076
+ }), t != null && t.storeBox && this.handleStore(t.storeBox);
1077
+ }
1078
+ get key() {
1079
+ return e(this, S);
1080
+ }
1081
+ get head() {
1082
+ return e(this, we);
1083
+ }
1084
+ get content() {
1085
+ return e(this, f);
1086
+ }
1087
+ get bodyElement() {
1088
+ return e(this, be);
1089
+ }
1090
+ get contentElement() {
1091
+ return e(this, ye);
1092
+ }
1093
+ connectedCallback() {
1094
+ v.isPanelOpened(e(this, S)) && this.classList.add("opened"), setTimeout(() => {
1095
+ this.classList.add("transition-allowed");
1096
+ }), e(this, ve).observe(e(this, ke), {
1097
+ childList: !0
1098
+ });
1099
+ }
1100
+ handleStore(t) {
1101
+ if (t.remainingFolders.length) {
1102
+ const n = t.store.passport.name.split("."), h = n.slice(0, n.length - t.remainingFolders.length).join("."), c = e(this, f).current.find((g) => g.key === h);
1103
+ c instanceof Ie ? c.handleStore({
1104
+ store: t.store,
1105
+ remainingFolders: t.remainingFolders.slice(1)
1106
+ }) : e(this, f).current = [
1107
+ ...e(this, f).current,
1108
+ new Ie({
1109
+ key: h,
1110
+ storeBox: {
1111
+ store: t.store,
1112
+ remainingFolders: t.remainingFolders.slice(1)
1113
+ }
1114
+ })
1115
+ ];
1116
+ } else {
1117
+ const s = e(this, f).current.find(
1118
+ (n) => n.key === t.store.passport.name
1119
+ );
1120
+ s instanceof je ? s.addStore(t.store) : e(this, f).current = [
1121
+ ...e(this, f).current,
1122
+ new je({
1123
+ store: t.store
1124
+ })
1125
+ ];
1126
+ }
1127
+ }
1128
+ };
1129
+ S = new WeakMap(), we = new WeakMap(), f = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), ke = new WeakMap(), Fe = new WeakMap();
1130
+ let Re = Ie;
1131
+ customElements.get("e-tweaker-folder") || customElements.define("e-tweaker-folder", Re);
1132
+ const Xt = w({
1133
+ ":host": {
1134
+ "--tweaker-width": "550px",
1135
+ "--tweaker-offset": "20px",
1136
+ "--tweaker-folder-height": "35px",
1137
+ "--height-input": "25px",
1138
+ "--gap-large": "12px",
1139
+ "--gap-medium": "10px",
1140
+ "--gap-small": "8px",
1141
+ "--gap-extra-small": "4px",
1142
+ "--font-size-large": "16px",
1143
+ "--font-size-medium": "14px",
1144
+ "--font-size-small": "12px",
1145
+ "--duration-short": "0.2s",
1146
+ fontFamily: "sans-serif",
1147
+ position: "absolute",
1148
+ top: "var(--tweaker-offset)",
1149
+ right: "var(--tweaker-offset)",
1150
+ width: "var(--tweaker-width)",
1151
+ backgroundColor: l.colorMain.var,
1152
+ borderRadius: l.borderRadius.var,
1153
+ transition: "opacity 0.1s",
1154
+ zIndex: "100",
1155
+ opacity: "0.1"
1156
+ },
1157
+ ":host(:hover)": {
1158
+ opacity: "1 !important"
1159
+ },
1160
+ ".resize": {
1161
+ position: "absolute",
1162
+ left: "0",
1163
+ top: "0",
1164
+ width: "calc(var(--tweaker-width) * 0.025)",
1165
+ height: "100%",
1166
+ zIndex: "1",
1167
+ cursor: "ew-resize"
1168
+ },
1169
+ ".tweaker-buttons": {
1170
+ display: "flex",
1171
+ alignItems: "center",
1172
+ gap: "var(--gap-extra-small)"
1173
+ },
1174
+ ".tweaker-button": {
1175
+ width: "18px",
1176
+ height: "18px",
1177
+ padding: "0",
1178
+ margin: "0",
1179
+ background: "none",
1180
+ border: "none",
1181
+ fill: l.colorFont.var,
1182
+ transitionProperty: "fill",
1183
+ transitionDuration: "var(--duration-short)"
1184
+ },
1185
+ ".tweaker-button:hover": {
1186
+ fill: l.colorActive.var
1187
+ },
1188
+ ".tweaker-button svg": {
1189
+ width: "100%",
1190
+ height: "100%"
1191
+ },
1192
+ ":host .body-content": {
1193
+ maxHeight: `calc(
1194
+ 100dvh -
1195
+ (
1196
+ var(--tweaker-offset) * 2 +
1197
+ var(--tweaker-folder-height)
1198
+ )
1199
+ )`,
1200
+ overflow: "hidden auto",
1201
+ "-ms-overflow-style": "none",
1202
+ "scrollbar-width": "none"
1203
+ },
1204
+ ":host .body-content::-webkit-scrollbar": {
1205
+ display: "none"
1206
+ },
1207
+ [`@media ${Ct["<=mobile"]}`]: {
1208
+ ":host": {
1209
+ position: "absolute",
1210
+ top: "0",
1211
+ right: "0",
1212
+ width: "100% !important",
1213
+ borderTopLeftRadius: "0",
1214
+ borderTopRightRadius: "0"
1215
+ },
1216
+ ":host .body-content": {
1217
+ maxHeight: `calc(
1218
+ 100dvh -
1219
+ var(--tweaker-folder-height)
1220
+ )`
1221
+ }
1222
+ }
1223
+ });
1224
+ var Se, xe, Ee;
1225
+ class ut extends Re {
1226
+ constructor() {
1227
+ super({
1228
+ key: ""
1229
+ });
1230
+ i(this, Se, !1);
1231
+ i(this, xe, () => {
1232
+ v.save();
1233
+ });
1234
+ i(this, Ee, St(() => {
1235
+ O.current.forEach((t) => {
1236
+ var s;
1237
+ if (t.passport && !((s = t.passport.manager) != null && s.invisible)) {
1238
+ const n = t.passport.name.split(".");
1239
+ this.handleStore({
1240
+ store: t,
1241
+ remainingFolders: n.length > 1 ? n.slice(0, -1) : []
1242
+ });
1243
+ }
1244
+ }), e(this, Se) || (o(this, Se, !0), this.contentElement.scroll({
1245
+ top: v.scrollValue
1246
+ }), this.contentElement.addEventListener("scroll", () => {
1247
+ v.scrollValue = this.contentElement.scrollTop;
1248
+ }));
1249
+ }, 10));
1250
+ v.load(), this.shadowRoot.adoptedStyleSheets.push(Xt), this.head.current = [
1251
+ m({
1252
+ class: "tweaker-buttons",
1253
+ onClick: (t) => {
1254
+ t.stopPropagation();
1255
+ },
1256
+ children: [
1257
+ Z({
1258
+ class: "tweaker-button",
1259
+ children: st,
1260
+ onClick: () => {
1261
+ R.resetState();
1262
+ }
1263
+ }),
1264
+ Z({
1265
+ class: ["tweaker-button"],
1266
+ children: [it],
1267
+ onClick: () => {
1268
+ navigator.clipboard.writeText(
1269
+ JSON.stringify(R.getState())
1270
+ );
1271
+ }
1272
+ }),
1273
+ Z({
1274
+ class: "tweaker-button",
1275
+ children: Mt,
1276
+ onClick: () => {
1277
+ kt(R.name, R.getState());
1278
+ }
1279
+ }),
1280
+ tt({
1281
+ class: "tweaker-button",
1282
+ children: [
1283
+ Ft,
1284
+ ze({
1285
+ type: "file",
1286
+ style: {
1287
+ display: "none"
1288
+ },
1289
+ onChange: (t) => {
1290
+ var h;
1291
+ const n = (h = t.currentTarget.files) == null ? void 0 : h[0];
1292
+ if (n) {
1293
+ const c = new FileReader();
1294
+ c.onload = (g) => {
1295
+ var A, ie;
1296
+ const x = (ie = (A = g.target) == null ? void 0 : A.result) == null ? void 0 : ie.toString();
1297
+ x && R.loadState(x);
1298
+ }, c.readAsText(n);
1299
+ }
1300
+ }
1301
+ })
1302
+ ]
1303
+ })
1304
+ ]
1305
+ })
1306
+ ], u(this.bodyElement, {
1307
+ children: [
1308
+ m({
1309
+ class: "resize",
1310
+ onPointerdown: (t) => {
1311
+ t.preventDefault();
1312
+ const s = this.getBoundingClientRect(), n = this.contentElement.scrollTop;
1313
+ et(
1314
+ (h) => {
1315
+ const c = t.x - h.x, g = Math.max(400, s.width + c);
1316
+ this.style.width = g + "px", v.changeSize("tweaker", g);
1317
+ },
1318
+ () => {
1319
+ setTimeout(() => {
1320
+ this.contentElement.scroll({
1321
+ top: n
1322
+ });
1323
+ }, 10);
1324
+ }
1325
+ );
1326
+ },
1327
+ onDblclick: () => {
1328
+ this.style.width = "", v.changeSize("tweaker", null);
1329
+ }
1330
+ })
1331
+ ]
1332
+ });
1333
+ }
1334
+ connectedCallback() {
1335
+ super.connectedCallback(), window.addEventListener("beforeunload", e(this, xe)), O.subscribe(e(this, Ee)), v.changedSizes("tweaker") && (this.style.width = v.changedSizes("tweaker") + "px");
1336
+ }
1337
+ disconnectedCallback() {
1338
+ window.removeEventListener("beforeunload", e(this, xe)), v.save(), O.unsubscribe(e(this, Ee));
1339
+ }
1340
+ }
1341
+ Se = new WeakMap(), xe = new WeakMap(), Ee = new WeakMap();
1342
+ customElements.get("e-tweaker") || customElements.define("e-tweaker", ut);
1343
+ Ce && document.body.appendChild(new ut());