aptechka 0.37.1 → 0.37.3
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-DN95L7Xo.js → Animation-DRQRcOQg.js} +1 -1
- package/lib/{Animation-B9m8bw96.cjs → Animation-DgE_dc5D.cjs} +1 -1
- package/lib/{Damped-CTsV8tl_.cjs → Damped-DbVDDRZi.cjs} +1 -1
- package/lib/{Damped-Chu29wn-.js → Damped-GT4z9D9j.js} +2 -2
- package/lib/{Tweened-lT5myPAZ.cjs → Tweened-DEqfwKKF.cjs} +1 -1
- package/lib/{Tweened-DJzAFsVZ.js → Tweened-YkiLB0BU.js} +2 -2
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/media-elements/index.cjs +2 -2
- package/lib/media-elements/index.js +135 -128
- package/lib/media-elements/source/index.d.ts +1 -0
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +1 -1
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +1 -1
- package/lib/polyfills-BANSrI_m.cjs +1 -0
- package/lib/polyfills-CxfUK5OU.js +37 -0
- package/lib/scroll/vanilla/index.cjs +1 -1
- package/lib/scroll/vanilla/index.js +39 -38
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.js +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +34 -33
- package/lib/utils/number.d.ts +1 -0
- package/package.json +1 -1
- package/lib/polyfills-CM4SCDTt.cjs +0 -1
- package/lib/polyfills-X6KXuHg-.js +0 -33
|
@@ -1,138 +1,145 @@
|
|
|
1
|
-
var
|
|
1
|
+
var G = (r) => {
|
|
2
2
|
throw TypeError(r);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var e = (r,
|
|
6
|
-
var
|
|
4
|
+
var U = (r, i, t) => i.has(r) || G("Cannot " + t);
|
|
5
|
+
var e = (r, i, t) => (U(r, i, "read from private field"), t ? t.call(r) : i.get(r)), s = (r, i, t) => i.has(r) ? G("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(r) : i.set(r, t), o = (r, i, t, n) => (U(r, i, "write to private field"), n ? n.call(r, t) : i.set(r, t), t), B = (r, i, t) => (U(r, i, "access private method"), t);
|
|
6
|
+
var J = (r, i, t) => new Promise((n, l) => {
|
|
7
7
|
var S = (m) => {
|
|
8
8
|
try {
|
|
9
9
|
b(t.next(m));
|
|
10
|
-
} catch (
|
|
11
|
-
l(
|
|
10
|
+
} catch (c) {
|
|
11
|
+
l(c);
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, W = (m) => {
|
|
14
14
|
try {
|
|
15
15
|
b(t.throw(m));
|
|
16
|
-
} catch (
|
|
17
|
-
l(
|
|
16
|
+
} catch (c) {
|
|
17
|
+
l(c);
|
|
18
18
|
}
|
|
19
|
-
}, b = (m) => m.done ? n(m.value) : Promise.resolve(m.value).then(S,
|
|
20
|
-
b((t = t.apply(r,
|
|
19
|
+
}, b = (m) => m.done ? n(m.value) : Promise.resolve(m.value).then(S, W);
|
|
20
|
+
b((t = t.apply(r, i)).next());
|
|
21
21
|
});
|
|
22
|
-
import { device as
|
|
23
|
-
import { SourceManager as
|
|
24
|
-
import { ClassLinkedStatus as
|
|
25
|
-
import { i as
|
|
26
|
-
import { d as
|
|
27
|
-
import { k as
|
|
22
|
+
import { device as ee } from "../device/index.js";
|
|
23
|
+
import { SourceManager as te } from "../source/index.js";
|
|
24
|
+
import { ClassLinkedStatus as se } from "../class-linked-status/index.js";
|
|
25
|
+
import { i as Z } from "../browser-0zX67oeU.js";
|
|
26
|
+
import { d as N } from "../events-CsVF98U6.js";
|
|
27
|
+
import { k as ie } from "../string-f0Dnk0L1.js";
|
|
28
28
|
import { loading as j } from "../loading/index.js";
|
|
29
|
-
import { CSSProperty as
|
|
30
|
-
import { elementResizer as
|
|
31
|
-
import { c as
|
|
32
|
-
import { CanvasElement as
|
|
33
|
-
import { ticker as
|
|
34
|
-
let
|
|
35
|
-
var u,
|
|
36
|
-
class
|
|
29
|
+
import { CSSProperty as F } from "../css-property/index.js";
|
|
30
|
+
import { elementResizer as Q } from "../element-resizer/vanilla/index.js";
|
|
31
|
+
import { c as re, a as ne } from "../canvas-DeZ0SLUJ.js";
|
|
32
|
+
import { CanvasElement as oe } from "../canvas/index.js";
|
|
33
|
+
import { ticker as K } from "../ticker/vanilla/index.js";
|
|
34
|
+
let ae = 0;
|
|
35
|
+
var u, a, g, x, d, M, C, h, A, R, P, O, V, $, D;
|
|
36
|
+
class X extends HTMLElement {
|
|
37
37
|
constructor() {
|
|
38
38
|
super();
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
s(this, P);
|
|
40
|
+
s(this, u, null);
|
|
41
|
+
s(this, a, null);
|
|
42
|
+
s(this, g, !1);
|
|
43
|
+
s(this, x, !1);
|
|
44
|
+
s(this, d, !1);
|
|
45
|
+
s(this, M, "");
|
|
46
|
+
s(this, C, "");
|
|
47
|
+
s(this, h, new se(this, {
|
|
48
48
|
loading: !1,
|
|
49
49
|
loaded: !1,
|
|
50
|
-
error: !1
|
|
50
|
+
error: !1,
|
|
51
|
+
clear: !1
|
|
51
52
|
}));
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
s(this, A, null);
|
|
54
|
+
s(this, R);
|
|
55
|
+
s(this, V, (t) => {
|
|
54
56
|
const n = t[0];
|
|
55
|
-
e(this, d) && (!e(this, x) || this.hasAttribute("reload-source")) && n.isIntersecting && this.triggerLazyLoad(), n.isIntersecting ?
|
|
57
|
+
e(this, d) && (!e(this, x) || this.hasAttribute("reload-source")) && n.isIntersecting && this.triggerLazyLoad(), n.isIntersecting ? N(this, "sourceCapture", { custom: !0 }) : (this.hasAttribute("reload-source") && B(this, P, O).call(this, void 0), N(this, "sourceRelease", { custom: !0 }));
|
|
56
58
|
});
|
|
57
|
-
|
|
58
|
-
e(this,
|
|
59
|
+
s(this, $, () => {
|
|
60
|
+
e(this, h).set("loaded", !0), e(this, h).set("error", !1), e(this, h).set("loading", !1), !e(this, d) && !e(this, g) && j.complete(e(this, C));
|
|
61
|
+
const t = getComputedStyle(this).getPropertyValue("--clear-duration");
|
|
62
|
+
t && o(this, R, setTimeout(
|
|
63
|
+
() => e(this, h).set("clear", !0),
|
|
64
|
+
parseFloat(t) * 1e3
|
|
65
|
+
)), o(this, g, !0);
|
|
59
66
|
});
|
|
60
|
-
|
|
61
|
-
e(this,
|
|
67
|
+
s(this, D, (t) => {
|
|
68
|
+
e(this, h).set("loaded", !1), e(this, h).set("error", !0), e(this, h).set("loading", !1), !e(this, d) && !e(this, g) && j.error(e(this, C)), o(this, g, !0);
|
|
62
69
|
});
|
|
63
|
-
|
|
64
|
-
e(this,
|
|
70
|
+
Z && window.IntersectionObserver && (o(this, M, `source-consumer-${++ae}`), o(this, A, new IntersectionObserver(
|
|
71
|
+
e(this, V)
|
|
65
72
|
)));
|
|
66
73
|
}
|
|
67
74
|
get consumerElement() {
|
|
68
|
-
return e(this,
|
|
75
|
+
return e(this, a);
|
|
69
76
|
}
|
|
70
77
|
get sourceManager() {
|
|
71
78
|
return e(this, u);
|
|
72
79
|
}
|
|
73
80
|
get status() {
|
|
74
|
-
return e(this,
|
|
81
|
+
return e(this, h);
|
|
75
82
|
}
|
|
76
83
|
get isLazy() {
|
|
77
84
|
return e(this, d);
|
|
78
85
|
}
|
|
79
86
|
triggerLazyLoad() {
|
|
80
|
-
e(this, u).current && e(this, u).current !== e(this, u).previous &&
|
|
87
|
+
e(this, u).current && e(this, u).current !== e(this, u).previous && B(this, P, O).call(this, e(this, u).current), o(this, x, !0);
|
|
81
88
|
}
|
|
82
89
|
connectedCallback() {
|
|
83
90
|
const t = this.getAttribute("srcset");
|
|
84
|
-
t && (
|
|
91
|
+
t && (o(this, a, this.createConsumer()), e(this, a).style.cssText = `
|
|
85
92
|
display: block;
|
|
86
93
|
width: 100%;
|
|
87
94
|
height: 100%;
|
|
88
|
-
`, e(this,
|
|
95
|
+
`, e(this, a).classList.add("source-consumer"), Array.from(this.attributes).forEach((n) => {
|
|
89
96
|
if (n.name !== "srcset") {
|
|
90
|
-
const l = n.nodeValue || "", S =
|
|
91
|
-
S in e(this,
|
|
97
|
+
const l = n.nodeValue || "", S = ie(n.name);
|
|
98
|
+
S in e(this, a) && (e(this, a)[S] = l || !0);
|
|
92
99
|
}
|
|
93
|
-
}), this.appendChild(e(this,
|
|
100
|
+
}), this.appendChild(e(this, a)), o(this, u, new te({
|
|
94
101
|
srcset: t
|
|
95
|
-
})),
|
|
96
|
-
(!e(this, d) || e(this, d) && e(this, x)) &&
|
|
102
|
+
})), o(this, d, this.hasAttribute("lazy")), e(this, u).subscribe((n) => {
|
|
103
|
+
(!e(this, d) || e(this, d) && e(this, x)) && B(this, P, O).call(this, n.current);
|
|
97
104
|
}), e(this, A).observe(this), e(this, u).connect());
|
|
98
105
|
}
|
|
99
106
|
disconnectedCallback() {
|
|
100
|
-
e(this, A).disconnect(), e(this, u).close(), e(this,
|
|
107
|
+
e(this, A).disconnect(), e(this, u).close(), e(this, a).onloadeddata = null, e(this, a).onload = null, e(this, a).onerror = null, e(this, a).remove(), e(this, h).reset(), clearTimeout(e(this, R));
|
|
101
108
|
}
|
|
102
109
|
}
|
|
103
|
-
u = new WeakMap(),
|
|
104
|
-
if (e(this,
|
|
105
|
-
|
|
110
|
+
u = new WeakMap(), a = new WeakMap(), g = new WeakMap(), x = new WeakMap(), d = new WeakMap(), M = new WeakMap(), C = new WeakMap(), h = new WeakMap(), A = new WeakMap(), R = new WeakMap(), P = new WeakSet(), O = function(t) {
|
|
111
|
+
if (clearTimeout(e(this, R)), e(this, a).onloadeddata = null, e(this, a).onload = null, e(this, a).onerror = null, e(this, h).set("loaded", !1), e(this, h).set("error", !1), e(this, h).set("loading", !1), e(this, h).set("clear", !1), t) {
|
|
112
|
+
o(this, C, `${e(this, M)}-${t.url}`);
|
|
106
113
|
const n = this.hasAttribute("keep-source-parameters");
|
|
107
|
-
e(this,
|
|
114
|
+
e(this, h).set("loading", !0);
|
|
108
115
|
const l = n ? t.url : t.name + t.extension;
|
|
109
|
-
this.consumeSource(l), !e(this, d) && !e(this, g) && j.add(e(this, C)), e(this,
|
|
116
|
+
this.consumeSource(l), !e(this, d) && !e(this, g) && j.add(e(this, C)), e(this, a).onloadeddata = () => {
|
|
110
117
|
e(this, $).call(this);
|
|
111
|
-
}, e(this,
|
|
118
|
+
}, e(this, a).onload = () => {
|
|
112
119
|
e(this, $).call(this);
|
|
113
|
-
}, e(this,
|
|
114
|
-
e(this,
|
|
120
|
+
}, e(this, a).onerror = () => {
|
|
121
|
+
e(this, D).call(this, l);
|
|
115
122
|
};
|
|
116
123
|
} else
|
|
117
124
|
this.consumeSource(null);
|
|
118
|
-
},
|
|
119
|
-
class
|
|
125
|
+
}, V = new WeakMap(), $ = new WeakMap(), D = new WeakMap();
|
|
126
|
+
class he extends X {
|
|
120
127
|
createConsumer() {
|
|
121
128
|
return document.createElement("img");
|
|
122
129
|
}
|
|
123
|
-
consumeSource(
|
|
124
|
-
if (
|
|
125
|
-
const t =
|
|
130
|
+
consumeSource(i) {
|
|
131
|
+
if (i && this.hasAttribute("webp") && ee.isWebp) {
|
|
132
|
+
const t = i.split(".").slice(0, -1).join(".") + ".webp";
|
|
126
133
|
this.consumerElement.src = t;
|
|
127
134
|
} else
|
|
128
|
-
this.consumerElement.src =
|
|
135
|
+
this.consumerElement.src = i || "";
|
|
129
136
|
}
|
|
130
137
|
}
|
|
131
|
-
customElements.get("e-image") || customElements.define("e-image",
|
|
132
|
-
function
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
const t =
|
|
138
|
+
customElements.get("e-image") || customElements.define("e-image", he);
|
|
139
|
+
function ce(r) {
|
|
140
|
+
const i = r.match(/\{([\d-]+)\}/);
|
|
141
|
+
if (i) {
|
|
142
|
+
const t = i[1].split("-");
|
|
136
143
|
if (t.length === 2) {
|
|
137
144
|
const n = parseInt(t[0], 10), l = parseInt(t[1], 10);
|
|
138
145
|
return { start: n, end: l };
|
|
@@ -140,33 +147,33 @@ function he(r) {
|
|
|
140
147
|
}
|
|
141
148
|
return null;
|
|
142
149
|
}
|
|
143
|
-
var f, w,
|
|
144
|
-
class
|
|
150
|
+
var f, w, z, E, v, L, k, H, p, y;
|
|
151
|
+
class le extends X {
|
|
145
152
|
constructor(t) {
|
|
146
153
|
super();
|
|
147
|
-
|
|
148
|
-
|
|
154
|
+
s(this, f, []);
|
|
155
|
+
s(this, w, new F(
|
|
149
156
|
this,
|
|
150
157
|
"--fit",
|
|
151
158
|
"contain"
|
|
152
159
|
));
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
s(this, z, new F(this, "--autoplay", !1));
|
|
161
|
+
s(this, E, new F(this, "--offset-x", 0.5));
|
|
162
|
+
s(this, v, new F(this, "--offset-y", 0.5));
|
|
163
|
+
s(this, L, null);
|
|
164
|
+
s(this, k, 0);
|
|
165
|
+
s(this, H, 1);
|
|
166
|
+
s(this, p, () => {
|
|
160
167
|
if (e(this, f).length) {
|
|
161
168
|
const t = e(this, f)[0];
|
|
162
|
-
e(this, w).current === "cover" ?
|
|
169
|
+
e(this, w).current === "cover" ? o(this, L, re(
|
|
163
170
|
t.naturalWidth,
|
|
164
171
|
t.naturalHeight,
|
|
165
172
|
this.consumerElement.width,
|
|
166
173
|
this.consumerElement.height,
|
|
167
174
|
e(this, E).current,
|
|
168
175
|
e(this, v).current
|
|
169
|
-
)) :
|
|
176
|
+
)) : o(this, L, ne(
|
|
170
177
|
t.naturalWidth,
|
|
171
178
|
t.naturalHeight,
|
|
172
179
|
this.consumerElement.width,
|
|
@@ -176,14 +183,14 @@ class ce extends N {
|
|
|
176
183
|
));
|
|
177
184
|
}
|
|
178
185
|
});
|
|
179
|
-
|
|
186
|
+
s(this, y, (t) => {
|
|
180
187
|
if (this.status.isFalse("loaded") || !e(this, L))
|
|
181
188
|
return;
|
|
182
189
|
t.detail.context.clearRect(0, 0, t.detail.width, t.detail.height);
|
|
183
190
|
const n = e(this, f)[e(this, k)];
|
|
184
|
-
n && t.detail.context.drawImage(n, ...e(this, L)), e(this,
|
|
191
|
+
n && t.detail.context.drawImage(n, ...e(this, L)), e(this, z).current && o(this, k, (e(this, k) + 1) % e(this, f).length);
|
|
185
192
|
});
|
|
186
|
-
|
|
193
|
+
Z && (o(this, H, parseInt(
|
|
187
194
|
((t == null ? void 0 : t.pad) || this.getAttribute("pad") || "1").toString()
|
|
188
195
|
)), e(this, w).subscribe(e(this, p)), e(this, E).subscribe(e(this, p)), e(this, v).subscribe(e(this, p)), this.addEventListener("sourceCapture", (n) => {
|
|
189
196
|
this.consumerElement.addEventListener(
|
|
@@ -198,82 +205,82 @@ class ce extends N {
|
|
|
198
205
|
}));
|
|
199
206
|
}
|
|
200
207
|
setProgress(t) {
|
|
201
|
-
e(this, f).length &&
|
|
208
|
+
e(this, f).length && o(this, k, Math.floor((e(this, f).length - 1) * t));
|
|
202
209
|
}
|
|
203
210
|
connectedCallback() {
|
|
204
|
-
super.connectedCallback(), e(this,
|
|
211
|
+
super.connectedCallback(), e(this, z).observe(), e(this, w).observe(), e(this, E).observe(), e(this, v).observe(), Q.subscribe(this, e(this, p));
|
|
205
212
|
}
|
|
206
213
|
disconnectedCallback() {
|
|
207
|
-
super.disconnectedCallback(), e(this,
|
|
214
|
+
super.disconnectedCallback(), e(this, z).unobserve(), e(this, w).unobserve(), e(this, E).unobserve(), e(this, v).unobserve(), o(this, f, []), Q.unsubscribe(e(this, p)), this.consumerElement.removeEventListener(
|
|
208
215
|
"canvasRender",
|
|
209
216
|
e(this, y)
|
|
210
217
|
);
|
|
211
218
|
}
|
|
212
219
|
createConsumer() {
|
|
213
|
-
return new
|
|
220
|
+
return new oe();
|
|
214
221
|
}
|
|
215
222
|
consumeSource(t) {
|
|
216
|
-
return
|
|
217
|
-
var n, l, S,
|
|
223
|
+
return J(this, null, function* () {
|
|
224
|
+
var n, l, S, W;
|
|
218
225
|
if (t) {
|
|
219
226
|
this.consumerElement.removeEventListener(
|
|
220
227
|
"canvasRender",
|
|
221
228
|
e(this, y)
|
|
222
229
|
);
|
|
223
|
-
const b = [], m =
|
|
230
|
+
const b = [], m = ce(t);
|
|
224
231
|
if (m)
|
|
225
|
-
for (let
|
|
226
|
-
const
|
|
232
|
+
for (let c = m.start; c <= m.end; c++) {
|
|
233
|
+
const Y = t.replace(
|
|
227
234
|
/\{([^}]+)\}/,
|
|
228
|
-
|
|
229
|
-
),
|
|
230
|
-
|
|
235
|
+
c.toString().padStart(e(this, H), "0")
|
|
236
|
+
), q = new Image();
|
|
237
|
+
q.src = Y, b.push(q);
|
|
231
238
|
}
|
|
232
239
|
else {
|
|
233
|
-
const
|
|
234
|
-
|
|
240
|
+
const c = new Image();
|
|
241
|
+
c.src = t, b.push(c);
|
|
235
242
|
}
|
|
236
243
|
try {
|
|
237
244
|
yield Promise.all(
|
|
238
|
-
b.map((
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
},
|
|
242
|
-
|
|
245
|
+
b.map((c, Y) => new Promise((q, _) => {
|
|
246
|
+
c.onload = () => {
|
|
247
|
+
q();
|
|
248
|
+
}, c.onerror = (me) => {
|
|
249
|
+
_(`${c.src} Image not found`);
|
|
243
250
|
};
|
|
244
251
|
}))
|
|
245
|
-
),
|
|
252
|
+
), o(this, f, b), e(this, p).call(this), (l = (n = this.consumerElement).onload) == null || l.call(n, new Event("load")), this.isLazy || this.consumerElement.addEventListener(
|
|
246
253
|
"canvasRender",
|
|
247
254
|
e(this, y)
|
|
248
255
|
);
|
|
249
|
-
} catch (
|
|
250
|
-
console.error(
|
|
256
|
+
} catch (c) {
|
|
257
|
+
console.error(c), (W = (S = this.consumerElement).onerror) == null || W.call(S, new Event("error"));
|
|
251
258
|
}
|
|
252
259
|
}
|
|
253
260
|
});
|
|
254
261
|
}
|
|
255
262
|
}
|
|
256
|
-
f = new WeakMap(), w = new WeakMap(),
|
|
257
|
-
customElements.get("e-sequence") || customElements.define("e-sequence",
|
|
258
|
-
var I,
|
|
259
|
-
class
|
|
263
|
+
f = new WeakMap(), w = new WeakMap(), z = new WeakMap(), E = new WeakMap(), v = new WeakMap(), L = new WeakMap(), k = new WeakMap(), H = new WeakMap(), p = new WeakMap(), y = new WeakMap();
|
|
264
|
+
customElements.get("e-sequence") || customElements.define("e-sequence", le);
|
|
265
|
+
var I, T;
|
|
266
|
+
class ue extends X {
|
|
260
267
|
constructor() {
|
|
261
268
|
super(...arguments);
|
|
262
|
-
|
|
263
|
-
|
|
269
|
+
s(this, I, 0);
|
|
270
|
+
s(this, T, () => {
|
|
264
271
|
this.classList.add(`state-${this.consumerElement.readyState}`);
|
|
265
272
|
const t = this.consumerElement.readyState / 4;
|
|
266
|
-
t > e(this, I) &&
|
|
273
|
+
t > e(this, I) && o(this, I, t), N(this, "videoReadyStateChange", {
|
|
267
274
|
detail: {
|
|
268
275
|
readyState: this.consumerElement.readyState,
|
|
269
276
|
progress: e(this, I)
|
|
270
277
|
}
|
|
271
|
-
}), this.consumerElement.readyState === 4 &&
|
|
278
|
+
}), this.consumerElement.readyState === 4 && K.unsubscribe(e(this, T));
|
|
272
279
|
});
|
|
273
280
|
}
|
|
274
281
|
connectedCallback() {
|
|
275
282
|
super.connectedCallback(), this.addEventListener("sourceCapture", () => {
|
|
276
|
-
|
|
283
|
+
K.subscribe(e(this, T)), this.hasAttribute("capture-autoplay") && this.consumerElement.play();
|
|
277
284
|
}), this.addEventListener("sourceRelease", () => {
|
|
278
285
|
this.hasAttribute("capture-autoplay") && (this.consumerElement.pause(), this.hasAttribute("replay") && (this.consumerElement.currentTime = 0)), this.hasAttribute("reload-source") && this.classList.remove(
|
|
279
286
|
"state-0",
|
|
@@ -285,7 +292,7 @@ class le extends N {
|
|
|
285
292
|
});
|
|
286
293
|
}
|
|
287
294
|
disconnectedCallback() {
|
|
288
|
-
super.disconnectedCallback(),
|
|
295
|
+
super.disconnectedCallback(), K.unsubscribe(e(this, T)), o(this, I, 0);
|
|
289
296
|
}
|
|
290
297
|
createConsumer() {
|
|
291
298
|
return document.createElement("video");
|
|
@@ -294,11 +301,11 @@ class le extends N {
|
|
|
294
301
|
this.consumerElement.src = t || "", this.consumerElement.autoplay = !0;
|
|
295
302
|
}
|
|
296
303
|
}
|
|
297
|
-
I = new WeakMap(),
|
|
298
|
-
customElements.get("e-video") || customElements.define("e-video",
|
|
304
|
+
I = new WeakMap(), T = new WeakMap();
|
|
305
|
+
customElements.get("e-video") || customElements.define("e-video", ue);
|
|
299
306
|
export {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
307
|
+
he as ImageElement,
|
|
308
|
+
le as SequenceElement,
|
|
309
|
+
X as SourceElement,
|
|
310
|
+
ue as VideoElement
|
|
304
311
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var bt=r=>{throw TypeError(r)};var Ge=(r,s,t)=>s.has(r)||bt("Cannot "+t);var e=(r,s,t)=>(Ge(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?bt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ge(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ge(r,s,"access private method"),t);const U=require("../browser-CpzFX2xg.cjs"),m=require("../Store-CDb6RMce.cjs"),Yt=require("../file-EevnUtRj.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-DHLrn6Q8.cjs");require("../ticker/vanilla/index.cjs");const pe=require("../string-DhgS_iFl.cjs"),vt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../device/index.cjs"),Qt=require("../math-GDWEqu7y.cjs"),Ue=require("../polyfills-CM4SCDTt.cjs"),yt=require("../element-resizer/vanilla/index.cjs"),jt=require("../style-At6aDoqG.cjs"),es=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,$,y,we,I,H,a,kt,Et,xt,Xe,Qe,Ct,Tt,Lt,zt,je,et,Rt,tt,st,Mt,it,qe,nt,ot,rt,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,Oe,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,st).call(this)});if(U.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,st).call(this),c(this,d,s),(t=e(this,we))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,tt).call(this),l(this,a,Xe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else es.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,Qe).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,e(this,d),g):u==="children"?l(this,a,qe).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Xe).call(this)},Xe=function(){if(U.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:e(this,Ke),disconnectCallback:e(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Qe=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,Qe).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,je).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,et).call(this,i,h)})):l(this,a,et).call(this,i,n)}},je=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,je).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(t)}: ${i};`))}},et=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,tt).call(this)}},tt=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,it).call(this,t,n)})):l(this,a,it).call(this,t,i)}},it=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],Ve=[],x=[];T.length&&ge.forEach((N,P)=>{v.includes(N)?x.push(N):Ve.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,ot).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,ot).call(this,N);q instanceof Node&&n.appendChild(q)}}),Ve.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,nt).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,vt.isESClass(i)?new i:i());else{const n=l(this,a,rt).call(this,i);n instanceof Node&&l(this,a,nt).call(this,s,n)}}))},nt=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},ot=function(s){return s instanceof Ze?s.node:typeof s=="function"?vt.isESClass(s)?new s:s():l(this,a,rt).call(this,s)},rt=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ke=new WeakMap,Oe=new WeakMap;let A=Ze;function p(...r){return new A(...r)}function ts(r){return new A("a",r)}function Q(r){return new A("button",r)}function b(r){return new A("div",r)}function De(r){return new A("input",r)}function At(r){return new A("label",r)}function ue(r){return new A("slot",r)}function at(r){return new A("span",r)}function Nt(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function ss(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${pe.camelToKebab(n)}`]=r[n];return i}const f=ss({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(U.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Pt='<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>',is='<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>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 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>',$t=`<svg
|
|
1
|
+
"use strict";var bt=r=>{throw TypeError(r)};var Ge=(r,s,t)=>s.has(r)||bt("Cannot "+t);var e=(r,s,t)=>(Ge(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?bt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ge(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ge(r,s,"access private method"),t);const U=require("../browser-CpzFX2xg.cjs"),m=require("../Store-CDb6RMce.cjs"),Yt=require("../file-EevnUtRj.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-DHLrn6Q8.cjs");require("../ticker/vanilla/index.cjs");const pe=require("../string-DhgS_iFl.cjs"),vt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../device/index.cjs"),Qt=require("../math-GDWEqu7y.cjs"),Ue=require("../polyfills-BANSrI_m.cjs"),yt=require("../element-resizer/vanilla/index.cjs"),jt=require("../style-At6aDoqG.cjs"),es=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,$,y,we,I,H,a,kt,Et,xt,Xe,Qe,Ct,Tt,Lt,zt,je,et,Rt,tt,st,Mt,it,qe,nt,ot,rt,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,Oe,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,st).call(this)});if(U.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,st).call(this),c(this,d,s),(t=e(this,we))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,tt).call(this),l(this,a,Xe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else es.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,Qe).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,e(this,d),g):u==="children"?l(this,a,qe).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Xe).call(this)},Xe=function(){if(U.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:e(this,Ke),disconnectCallback:e(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Qe=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,Qe).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,je).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,et).call(this,i,h)})):l(this,a,et).call(this,i,n)}},je=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,je).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(t)}: ${i};`))}},et=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,tt).call(this)}},tt=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,it).call(this,t,n)})):l(this,a,it).call(this,t,i)}},it=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],Ve=[],x=[];T.length&&ge.forEach((N,P)=>{v.includes(N)?x.push(N):Ve.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,ot).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,ot).call(this,N);q instanceof Node&&n.appendChild(q)}}),Ve.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,nt).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,vt.isESClass(i)?new i:i());else{const n=l(this,a,rt).call(this,i);n instanceof Node&&l(this,a,nt).call(this,s,n)}}))},nt=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},ot=function(s){return s instanceof Ze?s.node:typeof s=="function"?vt.isESClass(s)?new s:s():l(this,a,rt).call(this,s)},rt=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ke=new WeakMap,Oe=new WeakMap;let A=Ze;function p(...r){return new A(...r)}function ts(r){return new A("a",r)}function Q(r){return new A("button",r)}function b(r){return new A("div",r)}function De(r){return new A("input",r)}function At(r){return new A("label",r)}function ue(r){return new A("slot",r)}function at(r){return new A("span",r)}function Nt(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function ss(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${pe.camelToKebab(n)}`]=r[n];return i}const f=ss({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(U.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Pt='<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>',is='<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>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 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>',$t=`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
|
@@ -14,7 +14,7 @@ import { i as yt } from "../object-D6MVWB4l.js";
|
|
|
14
14
|
import { connector as jt } from "../connector/index.js";
|
|
15
15
|
import { ViewportMediaRules as es } from "../device/index.js";
|
|
16
16
|
import { c as ts } from "../math-BOBiC4TN.js";
|
|
17
|
-
import { n as St, t as ss } from "../polyfills-
|
|
17
|
+
import { n as St, t as ss } from "../polyfills-CxfUK5OU.js";
|
|
18
18
|
import { elementResizer as kt } from "../element-resizer/vanilla/index.js";
|
|
19
19
|
import { g as is } from "../style-j2TwriJ_.js";
|
|
20
20
|
const ns = /* @__PURE__ */ new Set([
|
package/lib/pointer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty;var _=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var M=i=>{throw TypeError(i)};var D=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,T=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&D(i,t,s[t]);if(_)for(var t of _(s))G.call(s,t)&&D(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||M("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?M("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,a)=>(k(i,s,"write to private field"),a?a.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-CDb6RMce.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),H=require("../math-GDWEqu7y.cjs");require("../ticker/vanilla/index.cjs");const R=require("../Damped-
|
|
1
|
+
"use strict";var A=Object.defineProperty;var _=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var M=i=>{throw TypeError(i)};var D=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,T=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&D(i,t,s[t]);if(_)for(var t of _(s))G.call(s,t)&&D(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||M("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?M("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,a)=>(k(i,s,"write to private field"),a?a.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-CDb6RMce.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),H=require("../math-GDWEqu7y.cjs");require("../ticker/vanilla/index.cjs");const R=require("../Damped-DbVDDRZi.cjs"),j=require("../element-resizer/vanilla/index.cjs"),B=require("../window-resizer/vanilla/index.cjs"),P=require("../css-property/index.cjs");var o,l,m,d,y,u,b,v,f,w,C,p;class O{constructor(s){n(this,o);n(this,l);n(this,m);n(this,d);n(this,y);n(this,u);n(this,b,0);n(this,v,0);n(this,f,s=>{e(this,d).set(1)});n(this,w,s=>{e(this,d).set(0)});n(this,C,s=>{const t=q.getPointerPosition(s,e(this,o).getBoundingClientRect()),a={width:e(this,b),height:e(this,v)},h={x:t.x,y:t.y};if(e(this,y)){const z=q.screenToCartesian(h,a);h.x=z.x,h.y=z.y}if(e(this,u)){const z=q.normalize(h,a);h.x=H.clamp(z.x*2,-1,1),h.y=H.clamp(z.y*2,-1,1)}e(this,l).set(h.x),e(this,m).set(h.y)});n(this,p,()=>{c(this,b,this.element.clientWidth),c(this,v,this.element.clientHeight);let s=0,t=0,a=0,h=0;e(this,y)?e(this,u)?(s=-1,t=1,a=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,a=e(this,v)/2*-1,h=e(this,v)/2*1):e(this,u)?(s=0,t=1,a=0,h=1):(s=0,t=e(this,b),a=0,h=e(this,v)),e(this,l).min=s,e(this,l).max=t,e(this,m).min=a,e(this,m).max=h});c(this,o,I.getElement(s.element)),c(this,l,new R.Damped(0,s.damped)),c(this,m,new R.Damped(0,s.damped)),c(this,d,new R.Damped(0,T({min:0,max:1},s.damped))),c(this,y,s.cartesian||!1),c(this,u,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,l)}get y(){return e(this,m)}get z(){return e(this,d)}get cartesian(){return e(this,y)}set cartesian(s){c(this,y,s),e(this,p).call(this)}get normalize(){return e(this,u)}set normalize(s){c(this,u,s),e(this,p).call(this)}connect(){e(this,o).addEventListener("pointerenter",e(this,f)),e(this,o).addEventListener("pointerleave",e(this,w)),e(this,o).addEventListener("pointermove",e(this,C)),j.elementResizer.subscribe(e(this,o),e(this,p)),B.windowResizer.subscribe(e(this,p))}disconnect(){e(this,o).removeEventListener("pointerenter",e(this,f)),e(this,o).removeEventListener("pointerleave",e(this,w)),e(this,o).removeEventListener("pointermove",e(this,C)),j.elementResizer.unsubscribe(e(this,p)),B.windowResizer.unsubscribe(e(this,p)),e(this,l).reset(),e(this,m).reset(),e(this,d).reset()}}o=new WeakMap,l=new WeakMap,m=new WeakMap,d=new WeakMap,y=new WeakMap,u=new WeakMap,b=new WeakMap,v=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,p=new WeakMap;var r,x,g,S,E,L;class W extends HTMLElement{constructor(){super();n(this,r);n(this,x,new P.CSSProperty(this,"--damping",20));n(this,g,new P.CSSProperty(this,"--mass",0));n(this,S,new P.CSSProperty(this,"--stiffness",0));n(this,E,new P.CSSProperty(this,"--cartesian",!1));n(this,L,new P.CSSProperty(this,"--normalize",!1));c(this,r,new O({element:this})),e(this,x).subscribe(t=>{e(this,r).x.damping=t.current,e(this,r).y.damping=t.current,e(this,r).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,r).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,r).normalize=t.current}),e(this,g).subscribe(t=>{e(this,r).x.mass=t.current,e(this,r).y.mass=t.current,e(this,r).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,r).x.stiffness=t.current,e(this,r).y.stiffness=t.current,e(this,r).z.stiffness=t.current}),e(this,r).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,r).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,r).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,r)}connectedCallback(){e(this,r).connect(),e(this,x).observe(),e(this,g).observe(),e(this,S).observe()}disconnectedCallback(){e(this,r).disconnect(),e(this,x).unobserve(),e(this,g).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}r=new WeakMap,x=new WeakMap,g=new WeakMap,S=new WeakMap,E=new WeakMap,L=new WeakMap;customElements.get("e-pointer")||customElements.define("e-pointer",W);exports.Pointer=O;exports.PointerElement=W;
|
package/lib/pointer/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import { g as G, s as I, n as J } from "../coordinates-CgdGoSYs.js";
|
|
|
19
19
|
import { g as K } from "../dom-0S_WDL4g.js";
|
|
20
20
|
import { c as B } from "../math-BOBiC4TN.js";
|
|
21
21
|
import "../ticker/vanilla/index.js";
|
|
22
|
-
import { D as R } from "../Damped-
|
|
22
|
+
import { D as R } from "../Damped-GT4z9D9j.js";
|
|
23
23
|
import { elementResizer as W } from "../element-resizer/vanilla/index.js";
|
|
24
24
|
import { windowResizer as j } from "../window-resizer/vanilla/index.js";
|
|
25
25
|
import { CSSProperty as P } from "../css-property/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10];function i(e,n=5){return Math.round(e*o[n])/o[n]}function u(e,n){return Math.round(e/n)*n}function c(e,n){var t;const r=((t=n.toString().split(".")[1])==null?void 0:t.length)||0;return r?+e.toFixed(r):Math.ceil(e)}function s(e,n){return e=e%n,e=e<0?n+e:e,e}function p(e,n){return typeof e=="undefined"?n:e}exports.loopNumber=s;exports.nullishCoalescing=p;exports.preciseNumber=i;exports.roundNumberTo=u;exports.toStep=c;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const o = [
|
|
2
|
+
1,
|
|
3
|
+
10,
|
|
4
|
+
100,
|
|
5
|
+
1e3,
|
|
6
|
+
1e4,
|
|
7
|
+
1e5,
|
|
8
|
+
1e6,
|
|
9
|
+
1e7,
|
|
10
|
+
1e8,
|
|
11
|
+
1e9,
|
|
12
|
+
1e10
|
|
13
|
+
];
|
|
14
|
+
function i(n, t = 5) {
|
|
15
|
+
return Math.round(n * o[t]) / o[t];
|
|
16
|
+
}
|
|
17
|
+
function s(n, t) {
|
|
18
|
+
return Math.round(n / t) * t;
|
|
19
|
+
}
|
|
20
|
+
function c(n, t) {
|
|
21
|
+
var r;
|
|
22
|
+
const e = ((r = t.toString().split(".")[1]) == null ? void 0 : r.length) || 0;
|
|
23
|
+
return e ? +n.toFixed(e) : Math.ceil(n);
|
|
24
|
+
}
|
|
25
|
+
function u(n, t) {
|
|
26
|
+
return n = n % t, n = n < 0 ? t + n : n, n;
|
|
27
|
+
}
|
|
28
|
+
function f(n, t) {
|
|
29
|
+
return typeof n == "undefined" ? t : n;
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
u as l,
|
|
33
|
+
f as n,
|
|
34
|
+
i as p,
|
|
35
|
+
s as r,
|
|
36
|
+
c as t
|
|
37
|
+
};
|