aptechka 0.5.40 → 0.5.42

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 (43) hide show
  1. package/lib/Animation-DDHjrbtL.cjs +1 -0
  2. package/lib/{Animation-AkD1vhRW.js → Animation-Dq_05jlR.js} +16 -16
  3. package/lib/{Damped-CH96byE8.js → Damped-P4MkCGoY.js} +4 -5
  4. package/lib/Damped-l0mnlhar.cjs +1 -0
  5. package/lib/{Tweened-DzckT3pw.js → Tweened-CwDC2zl8.js} +9 -10
  6. package/lib/Tweened-DIt9j9B-.cjs +1 -0
  7. package/lib/animation/index.cjs +1 -1
  8. package/lib/animation/index.js +3 -3
  9. package/lib/checkbox/index.cjs +1 -1
  10. package/lib/checkbox/index.js +29 -29
  11. package/lib/controls/index.cjs +1 -1
  12. package/lib/controls/index.js +125 -114
  13. package/lib/en3/index.cjs +1 -1
  14. package/lib/en3/index.js +1 -1
  15. package/lib/{index-BAHHdcp3.js → index-BtsOv9u0.js} +85 -85
  16. package/lib/index-Buf76Qoq.cjs +9 -0
  17. package/lib/modal/index.cjs +1 -1
  18. package/lib/modal/index.js +30 -30
  19. package/lib/pointer/index.cjs +1 -1
  20. package/lib/pointer/index.js +1 -1
  21. package/lib/polyfills-BA-CL_HF.js +27 -0
  22. package/lib/polyfills-DHs2SNbz.cjs +1 -0
  23. package/lib/scroll/ScrollElement.d.ts +16 -5
  24. package/lib/scroll/index.cjs +1 -1
  25. package/lib/scroll/index.js +538 -494
  26. package/lib/select/index.cjs +1 -1
  27. package/lib/select/index.js +1 -1
  28. package/lib/theme/index.cjs +1 -1
  29. package/lib/theme/index.d.ts +9 -84
  30. package/lib/theme/index.js +12 -27
  31. package/lib/tweaker/index.cjs +6 -6
  32. package/lib/tweaker/index.js +207 -199
  33. package/lib/utils/index.cjs +1 -1
  34. package/lib/utils/index.js +26 -27
  35. package/package.json +1 -1
  36. package/lib/Animation-BIRIzLIL.cjs +0 -1
  37. package/lib/Damped-3daHRLIW.cjs +0 -1
  38. package/lib/Tweened-Bv9mgPvl.cjs +0 -1
  39. package/lib/index-D2XtQX56.cjs +0 -9
  40. package/lib/number-Bo5RdrA1.js +0 -23
  41. package/lib/number-yVpzMdbQ.cjs +0 -1
  42. package/lib/polyfills-CrcS4RcO.cjs +0 -1
  43. package/lib/polyfills-DJUYczFm.js +0 -6
@@ -1,202 +1,213 @@
1
- var N = (a, r, e) => {
2
- if (!r.has(a))
1
+ var S = (a, n, e) => {
2
+ if (!n.has(a))
3
3
  throw TypeError("Cannot " + e);
4
4
  };
5
- var t = (a, r, e) => (N(a, r, "read from private field"), e ? e.call(a) : r.get(a)), s = (a, r, e) => {
6
- if (r.has(a))
5
+ var t = (a, n, e) => (S(a, n, "read from private field"), e ? e.call(a) : n.get(a)), s = (a, n, e) => {
6
+ if (n.has(a))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- r instanceof WeakSet ? r.add(a) : r.set(a, e);
9
- }, i = (a, r, e, n) => (N(a, r, "write to private field"), n ? n.call(a, e) : r.set(a, e), e);
10
- import { Notifier as S } from "../notifier/index.js";
8
+ n instanceof WeakSet ? n.add(a) : n.set(a, e);
9
+ }, i = (a, n, e, r) => (S(a, n, "write to private field"), r ? r.call(a, e) : n.set(a, e), e);
10
+ var L = (a, n, e) => (S(a, n, "access private method"), e);
11
+ import { Notifier as j } from "../notifier/index.js";
11
12
  import { i as m } from "../browser-0zX67oeU.js";
12
- import { g as F } from "../dom-0S_WDL4g.js";
13
- import { ticker as x } from "../ticker/index.js";
14
- import { s as U } from "../gestures-D2Fdra_G.js";
15
- import { p as z } from "../number-Bo5RdrA1.js";
16
- import { TICK_ORDER as V } from "../order/index.js";
17
- var R;
18
- class W {
13
+ import { g as Q } from "../dom-0S_WDL4g.js";
14
+ import { ticker as M } from "../ticker/index.js";
15
+ import "../Store-BQXXikps.js";
16
+ import { e as G } from "../easings-BKi40vHz.js";
17
+ import { T as J } from "../Tweened-CwDC2zl8.js";
18
+ import { s as Z } from "../gestures-D2Fdra_G.js";
19
+ import { p as $ } from "../polyfills-BA-CL_HF.js";
20
+ import { TICK_ORDER as p } from "../order/index.js";
21
+ var B;
22
+ class F {
19
23
  constructor() {
20
- s(this, R, new S());
24
+ s(this, B, new j());
21
25
  }
22
26
  get changeEvent() {
23
- return t(this, R);
27
+ return t(this, B);
24
28
  }
25
29
  }
26
- R = new WeakMap();
27
- var u, d, c, T;
28
- class p extends W {
30
+ B = new WeakMap();
31
+ var w, c, f, P;
32
+ class ce extends F {
29
33
  constructor(e) {
30
34
  super();
31
- s(this, u, null);
32
- s(this, d, null);
33
- s(this, c, "offsetHeight");
34
- s(this, T, (e) => {
35
- const n = e.shiftKey ? -1 : 1;
35
+ s(this, w, null);
36
+ s(this, c, null);
37
+ s(this, f, "offsetHeight");
38
+ s(this, P, (e) => {
39
+ const r = e.shiftKey ? -1 : 1;
36
40
  let h;
37
- e.code === "Space" ? h = n * t(this, d)[t(this, c)] * 0.4 : e.code === "ArrowLeft" ? h = -1 * t(this, d)[t(this, c)] * 0.2 : e.code === "ArrowRight" ? h = 1 * t(this, d)[t(this, c)] * 0.2 : e.code === "ArrowUp" ? h = -1 * t(this, d)[t(this, c)] * 0.2 : e.code === "ArrowDown" ? h = 1 * t(this, d)[t(this, c)] * 0.2 : e.code === "PageUp" ? h = -1 * t(this, d)[t(this, c)] : e.code === "PageDown" ? h = 1 * t(this, d)[t(this, c)] : e.code === "Home" ? h = 0 : e.code === "End" && (h = t(this, c) === "offsetWidth" ? t(this, d).scrollWidth : t(this, d).scrollHeight), h && (e.stopPropagation(), this.changeEvent.notify("keyboard", h));
41
+ e.code === "Space" ? h = r * t(this, c)[t(this, f)] * 0.4 : e.code === "ArrowLeft" ? h = -1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowRight" ? h = 1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowUp" ? h = -1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowDown" ? h = 1 * t(this, c)[t(this, f)] * 0.2 : e.code === "PageUp" ? h = -1 * t(this, c)[t(this, f)] : e.code === "PageDown" ? h = 1 * t(this, c)[t(this, f)] : e.code === "Home" ? h = 0 : e.code === "End" && (h = t(this, f) === "offsetWidth" ? t(this, c).scrollWidth : t(this, c).scrollHeight), h && (e.stopPropagation(), this.changeEvent.notify("keyboard", h));
38
42
  });
39
- m && (i(this, u, e != null && e.element && F(e.element) || window), i(this, d, t(this, u) instanceof HTMLElement ? t(this, u) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
43
+ m && (i(this, w, e != null && e.element && Q(e.element) || window), i(this, c, t(this, w) instanceof HTMLElement ? t(this, w) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
40
44
  }
41
45
  set dimension(e) {
42
- i(this, c, e === "width" ? "offsetWidth" : "offsetHeight");
46
+ i(this, f, e === "width" ? "offsetWidth" : "offsetHeight");
43
47
  }
44
48
  connect() {
45
- m && t(this, u).addEventListener(
49
+ m && t(this, w).addEventListener(
46
50
  "keydown",
47
- t(this, T)
51
+ t(this, P)
48
52
  );
49
53
  }
50
54
  disconnect() {
51
- m && t(this, u).removeEventListener(
55
+ m && t(this, w).removeEventListener(
52
56
  "keydown",
53
- t(this, T)
57
+ t(this, P)
54
58
  );
55
59
  }
56
60
  }
57
- u = new WeakMap(), d = new WeakMap(), c = new WeakMap(), T = new WeakMap();
58
- var b, g, D, H, f, L, M, P, k;
59
- class ee extends W {
61
+ w = new WeakMap(), c = new WeakMap(), f = new WeakMap(), P = new WeakMap();
62
+ var b, E, X, Y, l, I, u, T, q, R, U, k, W, C;
63
+ class fe extends F {
60
64
  constructor(e) {
61
65
  super();
66
+ s(this, T);
67
+ s(this, R);
62
68
  s(this, b, void 0);
63
- s(this, g, void 0);
64
- s(this, D, void 0);
65
- s(this, H, void 0);
66
- s(this, f, void 0);
67
- s(this, L, void 0);
68
- s(this, M, void 0);
69
- s(this, P, void 0);
69
+ s(this, E, void 0);
70
+ s(this, X, void 0);
71
+ s(this, Y, void 0);
72
+ s(this, l, void 0);
73
+ s(this, I, void 0);
74
+ s(this, u, void 0);
70
75
  s(this, k, void 0);
71
- this.direction = 1, i(this, f, !1), i(this, M, (n) => {
72
- t(this, f) || this.changeEvent.notify(
76
+ s(this, W, void 0);
77
+ s(this, C, void 0);
78
+ this.direction = 1, i(this, l, new J(0, { easing: G })), i(this, u, !1), i(this, k, (r) => {
79
+ t(this, l).current !== 1 && this.changeEvent.notify(
73
80
  "autoplay",
74
- n.timeBetweenFrames * t(this, b) * this.direction
81
+ r.timeBetweenFrames * t(this, b) * this.direction * (1 - t(this, l).current)
75
82
  );
76
- }), i(this, P, () => {
77
- t(this, f) || this.changeEvent.notify(
83
+ }), i(this, W, () => {
84
+ t(this, l).current !== 1 && this.changeEvent.notify(
78
85
  "autoplay",
79
- Math.sign(t(this, b)) * this.direction
86
+ Math.sign(t(this, b)) * this.direction * (1 - t(this, l).current)
80
87
  );
81
- }), i(this, k, () => {
82
- t(this, g) && (document.hidden ? i(this, f, !0) : i(this, f, !1));
83
- }), i(this, b, (e == null ? void 0 : e.speed) || 1), i(this, g, (e == null ? void 0 : e.interval) || !1), i(this, D, e);
88
+ }), i(this, C, () => {
89
+ t(this, E) && (document.hidden ? t(this, l).set(1, { equalize: !0 }) : t(this, l).set(0, { equalize: !0 }));
90
+ }), i(this, b, (e == null ? void 0 : e.speed) || 1), i(this, E, (e == null ? void 0 : e.interval) || !1), i(this, X, e);
84
91
  }
85
92
  set interval(e) {
86
- i(this, g, e), this.connect();
93
+ i(this, E, e), t(this, u) && L(this, T, q).call(this);
87
94
  }
88
95
  set speed(e) {
89
- i(this, b, e), this.connect();
96
+ i(this, b, e), t(this, u) && L(this, T, q).call(this);
90
97
  }
91
98
  connect() {
92
- this.disconnect(), t(this, g) ? i(this, H, setInterval(
93
- t(this, P),
94
- Math.abs(t(this, b))
95
- )) : x.subscribe(t(this, M), t(this, D)), document.addEventListener(
96
- "visibilitychange",
97
- t(this, k)
98
- );
99
+ t(this, u) || (i(this, u, !0), L(this, T, q).call(this));
99
100
  }
100
101
  disconnect() {
101
- clearInterval(t(this, H)), x.unsubscribe(t(this, M)), clearInterval(t(this, L)), i(this, f, !1), document.removeEventListener(
102
- "visibilitychange",
103
- t(this, k)
104
- );
102
+ t(this, u) && (i(this, u, !1), L(this, R, U).call(this));
105
103
  }
106
104
  pauseAndContinue(e) {
107
- e && !t(this, f) && (clearInterval(t(this, L)), i(this, f, !0), i(this, L, setTimeout(() => {
108
- i(this, f, !1);
109
- }, 3e3)));
105
+ e && !t(this, l).target && (clearInterval(t(this, I)), t(this, l).set(1, { duration: Math.min(e, 1e3) }), i(this, I, setTimeout(() => {
106
+ t(this, l).set(0, { duration: Math.min(e, 5e3) });
107
+ }, e)));
110
108
  }
111
109
  }
112
- b = new WeakMap(), g = new WeakMap(), D = new WeakMap(), H = new WeakMap(), f = new WeakMap(), L = new WeakMap(), M = new WeakMap(), P = new WeakMap(), k = new WeakMap();
113
- var C, E, I, X;
114
- class te extends W {
110
+ b = new WeakMap(), E = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), l = new WeakMap(), I = new WeakMap(), u = new WeakMap(), T = new WeakSet(), q = function() {
111
+ L(this, R, U).call(this), t(this, E) ? i(this, Y, setInterval(
112
+ t(this, W),
113
+ Math.abs(t(this, b))
114
+ )) : M.subscribe(t(this, k), t(this, X)), document.addEventListener(
115
+ "visibilitychange",
116
+ t(this, C)
117
+ );
118
+ }, R = new WeakSet(), U = function() {
119
+ clearInterval(t(this, Y)), M.unsubscribe(t(this, k)), clearInterval(t(this, I)), t(this, l).close(), document.removeEventListener(
120
+ "visibilitychange",
121
+ t(this, C)
122
+ );
123
+ }, k = new WeakMap(), W = new WeakMap(), C = new WeakMap();
124
+ var A, y, D, z;
125
+ class ue extends F {
115
126
  constructor(e) {
116
127
  super();
117
- s(this, C, null);
118
- s(this, E, void 0);
119
- s(this, I, void 0);
120
- s(this, X, (e) => {
121
- let n = 0;
128
+ s(this, A, null);
129
+ s(this, y, void 0);
130
+ s(this, D, void 0);
131
+ s(this, z, (e) => {
132
+ let r = 0;
122
133
  if (e.preventDefault(), !(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) * 0.5 || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY) * 0.5))
123
- if (n = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), this.debounce) {
134
+ if (r = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), this.debounce) {
124
135
  const h = Date.now();
125
- if (h - t(this, I) > 40 && (n = 100 * Math.sign(n)), i(this, I, h), Math.abs(n) < 100 || t(this, E))
136
+ if (h - t(this, D) > 40 && (r = 100 * Math.sign(r)), i(this, D, h), Math.abs(r) < 100 || t(this, y))
126
137
  return;
127
- this.changeEvent.notify("wheel", n), i(this, E, setTimeout(() => {
128
- i(this, E, void 0);
138
+ this.changeEvent.notify("wheel", r), i(this, y, setTimeout(() => {
139
+ i(this, y, void 0);
129
140
  }, 80));
130
141
  } else
131
- this.changeEvent.notify("wheel", n);
142
+ this.changeEvent.notify("wheel", r);
132
143
  });
133
- this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this, I, Date.now()), m && i(this, C, e != null && e.element && F(e.element) || window);
144
+ this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this, D, Date.now()), m && i(this, A, e != null && e.element && Q(e.element) || window);
134
145
  }
135
146
  connect() {
136
- m && t(this, C).addEventListener(
147
+ m && t(this, A).addEventListener(
137
148
  "wheel",
138
- t(this, X),
149
+ t(this, z),
139
150
  {
140
151
  passive: !1
141
152
  }
142
153
  );
143
154
  }
144
155
  disconnect() {
145
- m && (t(this, C).removeEventListener(
156
+ m && (t(this, A).removeEventListener(
146
157
  "wheel",
147
- t(this, X)
148
- ), clearTimeout(t(this, E)));
158
+ t(this, z)
159
+ ), clearTimeout(t(this, y)));
149
160
  }
150
161
  }
151
- C = new WeakMap(), E = new WeakMap(), I = new WeakMap(), X = new WeakMap();
152
- var y, w, A, l, Y, v;
153
- const o = class o extends W {
162
+ A = new WeakMap(), y = new WeakMap(), D = new WeakMap(), z = new WeakMap();
163
+ var v, o, H, d, K, x;
164
+ const g = class g extends F {
154
165
  constructor(e) {
155
166
  super();
156
- s(this, w, null);
157
- s(this, A, !1);
158
- s(this, l, 0);
159
- s(this, Y, (e) => {
167
+ s(this, o, null);
168
+ s(this, H, !1);
169
+ s(this, d, 0);
170
+ s(this, K, (e) => {
160
171
  if (e.composedPath().find(
161
172
  (h) => h instanceof HTMLElement && h.hasAttribute("drag-dead-zone")
162
173
  ))
163
174
  return;
164
- this.swipe || x.unsubscribe(t(this, v));
165
- let n = e;
166
- i(this, l, 0), document.documentElement.classList.add("grabbing"), U(
175
+ this.swipe || M.unsubscribe(t(this, x));
176
+ let r = e;
177
+ i(this, d, 0), document.documentElement.classList.add("grabbing"), Z(
167
178
  (h) => {
168
- if (t(this, A) || t(o, y) && t(o, y) !== t(this, w))
179
+ if (t(this, H) || t(g, v) && t(g, v) !== t(this, o))
169
180
  return;
170
- this.swipe && i(this, A, !0);
171
- const K = n.x - h.x, B = n.y - h.y;
172
- this.axis === "x" ? i(this, l, K) : i(this, l, B), n = h, (this.axis === "x" && Math.abs(K) > Math.abs(B) || this.axis === "y" && Math.abs(B) > Math.abs(K)) && (i(o, y, t(this, w)), this.changeEvent.notify("drag", t(this, l)));
181
+ this.swipe && i(this, H, !0);
182
+ const N = r.x - h.x, O = r.y - h.y;
183
+ this.axis === "x" ? i(this, d, N) : i(this, d, O), r = h, (this.axis === "x" && Math.abs(N) > Math.abs(O) || this.axis === "y" && Math.abs(O) > Math.abs(N)) && (i(g, v, t(this, o)), this.changeEvent.notify("drag", t(this, d)));
173
184
  },
174
185
  () => {
175
- i(o, y, null), this.swipe || (i(this, l, t(this, l) * 3), x.subscribe(t(this, v), { order: V.SCROLL - 1 })), document.documentElement.classList.remove("grabbing"), i(this, A, !1);
186
+ i(g, v, null), this.swipe || (i(this, d, t(this, d) * 3), M.subscribe(t(this, x), { order: p.SCROLL - 1 })), document.documentElement.classList.remove("grabbing"), i(this, H, !1);
176
187
  }
177
188
  );
178
189
  });
179
- s(this, v, () => {
180
- Math.floor(t(this, l)) || x.unsubscribe(t(this, v)), i(this, l, t(this, l) * 0.95), i(this, l, z(t(this, l), 3)), this.changeEvent.notify("drag", t(this, l));
190
+ s(this, x, () => {
191
+ Math.floor(t(this, d)) || M.unsubscribe(t(this, x)), i(this, d, t(this, d) * 0.95), i(this, d, $(t(this, d), 3)), this.changeEvent.notify("drag", t(this, d));
181
192
  });
182
- this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, m && i(this, w, e != null && e.element && F(e.element) || document.documentElement);
193
+ this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, m && i(this, o, e != null && e.element && Q(e.element) || document.documentElement);
183
194
  }
184
195
  connect() {
185
- m && t(this, w).addEventListener("pointerdown", t(this, Y));
196
+ m && t(this, o).addEventListener("pointerdown", t(this, K));
186
197
  }
187
198
  disconnect() {
188
- m && (t(this, w).removeEventListener(
199
+ m && (t(this, o).removeEventListener(
189
200
  "pointerdown",
190
- t(this, Y)
191
- ), x.unsubscribe(t(this, v)));
201
+ t(this, K)
202
+ ), M.unsubscribe(t(this, x)));
192
203
  }
193
204
  };
194
- y = new WeakMap(), w = new WeakMap(), A = new WeakMap(), l = new WeakMap(), Y = new WeakMap(), v = new WeakMap(), s(o, y, null);
195
- let O = o;
205
+ v = new WeakMap(), o = new WeakMap(), H = new WeakMap(), d = new WeakMap(), K = new WeakMap(), x = new WeakMap(), s(g, v, null);
206
+ let V = g;
196
207
  export {
197
- ee as AutoplayControls,
198
- W as Controls,
199
- O as DragControls,
200
- p as KeyboardControls,
201
- te as WheelControls
208
+ fe as AutoplayControls,
209
+ F as Controls,
210
+ V as DragControls,
211
+ ce as KeyboardControls,
212
+ ue as WheelControls
202
213
  };
package/lib/en3/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Fs=Object.defineProperty,Gs=Object.defineProperties;var ms=Object.getOwnPropertyDescriptors;var bt=Object.getOwnPropertySymbols;var Rs=Object.prototype.hasOwnProperty,ws=Object.prototype.propertyIsEnumerable;var Nt=(C,A,e)=>A in C?Fs(C,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):C[A]=e,eA=(C,A)=>{for(var e in A||(A={}))Rs.call(A,e)&&Nt(C,e,A[e]);if(bt)for(var e of bt(A))ws.call(A,e)&&Nt(C,e,A[e]);return C},Fe=(C,A)=>Gs(C,ms(A));var at=(C,A,e)=>{if(!A.has(C))throw TypeError("Cannot "+e)};var o=(C,A,e)=>(at(C,A,"read from private field"),e?e.call(C):A.get(C)),d=(C,A,e)=>{if(A.has(C))throw TypeError("Cannot add the same private member more than once");A instanceof WeakSet?A.add(C):A.set(C,e)},D=(C,A,e,s)=>(at(C,A,"write to private field"),s?s.call(C,e):A.set(C,e),e);var tA=(C,A,e)=>(at(C,A,"access private method"),e);var YA=(C,A,e)=>new Promise((s,t)=>{var n=r=>{try{a(e.next(r))}catch(I){t(I)}},i=r=>{try{a(e.throw(r))}catch(I){t(I)}},a=r=>r.done?s(r.value):Promise.resolve(r.value).then(n,i);a((e=e.apply(C,A)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../order/index.cjs"),wA=require("../window-resizer/index.cjs"),yA=require("../ticker/index.cjs"),Zt=require("../dom-JBOkFLTh.cjs"),B=require("three"),mt=require("../layout-box/index.cjs"),Ct=require("../loading/index.cjs"),ys=require("../SourceManager-vSlsMKUE.cjs"),J=require("../Store-C-1ruEIm.cjs"),Ms=require("../easings-DsS5-Kqc.cjs"),Ss=require("../function-MthRj-GJ.cjs"),Ls=require("../Tweened-Bv9mgPvl.cjs"),Ts=require("../Viewport-DMB0dO-s.cjs"),zt=require("../custom-element/index.cjs");function xs(C){const A=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(C){for(const e in C)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(C,e);Object.defineProperty(A,e,s.get?s:{enumerable:!0,get:()=>C[e]})}}return A.default=C,Object.freeze(A)}const It=xs(B);function vA(C){const A=e=>{e.dispose();for(const s of Object.keys(e)){const t=e[s];t&&typeof t=="object"&&"minFilter"in t&&t.dispose()}};C.traverse(e=>{if(e instanceof B.Mesh){if(e.geometry.dispose(),!Array.isArray(e.material)&&e.material.isMaterial)A(e.material);else if(Array.isArray(e.material))for(const s of e.material)A(s)}})}var ye,H,TA,EA,QA,XA,lA,hA;class Rt{constructor(A,e){d(this,ye,void 0);d(this,H,void 0);d(this,TA,void 0);d(this,EA,void 0);d(this,QA,void 0);d(this,XA,void 0);d(this,lA,void 0);d(this,hA,void 0);D(this,ye,A),D(this,H,(e==null?void 0:e.cameraType)==="orthographic"?new B.OrthographicCamera:new B.PerspectiveCamera),D(this,TA,new B.Scene),D(this,EA,[]),D(this,QA,(e==null?void 0:e.cameraDistance)||1e3),o(this,H).near=(e==null?void 0:e.cameraNear)||1,o(this,H).far=(e==null?void 0:e.cameraFar)||11e3,D(this,XA,(e==null?void 0:e.cameraFov)||"auto"),D(this,lA,Zt.getElement(e==null?void 0:e.sizeElement)||document.documentElement),this.beforeRenderCallback=e==null?void 0:e.beforeRender,D(this,hA,new mt.LayoutBox(o(this,lA))),o(this,hA).onScale(()=>{this.resize()})}get name(){return o(this,ye)}get camera(){return o(this,H)}get scene(){return o(this,TA)}get box(){return o(this,hA)}get cameraDistance(){return o(this,QA)}set cameraDistance(A){D(this,QA,A),this.resize()}get sizeElement(){return o(this,lA)}get isClipped(){return o(this,lA)!==w.containerElement}resize(){const{width:A,height:e}=o(this,hA);o(this,H).position.z=o(this,QA),o(this,H)instanceof B.PerspectiveCamera?(o(this,H).aspect=A/e,o(this,H).fov=o(this,XA)==="auto"?2*Math.atan(e/2/o(this,QA))*(180/Math.PI):o(this,XA)):o(this,H)instanceof B.OrthographicCamera&&(o(this,H).left=A/-2,o(this,H).right=A/2,o(this,H).top=e/2,o(this,H).bottom=e/-2),o(this,H).updateProjectionMatrix()}destroy(){o(this,EA).forEach(A=>{A.userData.box.destroy()}),o(this,TA).clear(),vA(o(this,TA)),w.destroyView(this.name),o(this,hA).destroy()}attachToHTMLElement(A,e,s){const t=new mt.LayoutBox(A,Fe(eA({},s),{containerElement:o(this,lA),cartesian:!0,scrollStep:!this.isClipped}));return t.bindObject(e),e.userData.box=t,o(this,EA).push(e),e}detachFromHTMLElement(A){D(this,EA,o(this,EA).filter(e=>e===A?(A.userData.box.destroy(),!1):!0))}add(...A){const e=A[0],s=A[1],t=A[2];return this.scene.add(e),s?this.attachToHTMLElement(s,e,t):e}remove(A,e){this.scene.remove(A),e&&this.detachFromHTMLElement(A)}}ye=new WeakMap,H=new WeakMap,TA=new WeakMap,EA=new WeakMap,QA=new WeakMap,XA=new WeakMap,lA=new WeakMap,hA=new WeakMap;const Y=new Map;var nt,iA,T,k,VA,WA,jA,Me,xA,Se,Le,Te;class Hs{constructor(){d(this,nt,`https://unpkg.com/three@0.${B.REVISION}.x`);d(this,iA,null);d(this,T,null);d(this,k,new Map);d(this,VA,0);d(this,WA,0);d(this,jA,0);d(this,Me,2);d(this,xA,!1);d(this,Se,!1);d(this,Le,()=>{var A;D(this,VA,o(this,iA).clientWidth),D(this,WA,o(this,iA).clientHeight),D(this,jA,Math.min(o(this,Me),devicePixelRatio||1)),o(this,T).setPixelRatio(o(this,jA)),o(this,T).setSize(o(this,VA),o(this,WA)),(A=this.onResize)==null||A.call(this)});d(this,Te,()=>{o(this,T).setRenderTarget(null),o(this,k).forEach(A=>{this.render(A)})})}get CDNVersion(){return o(this,nt)}get containerElement(){return o(this,iA)}get webglRenderer(){return o(this,T)}get views(){return o(this,k)}get view(){return this.getView("default")}get width(){return o(this,VA)}get height(){return o(this,WA)}get pixelRatio(){return o(this,jA)}get cacheAssets(){return o(this,Se)}setup(A){if(o(this,xA)){console.warn("[en3.setup]: You are trying to setup en3 again.");return}D(this,iA,Zt.getElement(A==null?void 0:A.containerElement)||document.body),D(this,Me,(A==null?void 0:A.maxPixelRatio)||2),D(this,T,new B.WebGLRenderer(A==null?void 0:A.webGLRendererParameters)),o(this,T).domElement.style.cssText=`
1
+ "use strict";var Fs=Object.defineProperty,Gs=Object.defineProperties;var ms=Object.getOwnPropertyDescriptors;var bt=Object.getOwnPropertySymbols;var Rs=Object.prototype.hasOwnProperty,ws=Object.prototype.propertyIsEnumerable;var Nt=(C,A,e)=>A in C?Fs(C,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):C[A]=e,eA=(C,A)=>{for(var e in A||(A={}))Rs.call(A,e)&&Nt(C,e,A[e]);if(bt)for(var e of bt(A))ws.call(A,e)&&Nt(C,e,A[e]);return C},Fe=(C,A)=>Gs(C,ms(A));var at=(C,A,e)=>{if(!A.has(C))throw TypeError("Cannot "+e)};var o=(C,A,e)=>(at(C,A,"read from private field"),e?e.call(C):A.get(C)),d=(C,A,e)=>{if(A.has(C))throw TypeError("Cannot add the same private member more than once");A instanceof WeakSet?A.add(C):A.set(C,e)},D=(C,A,e,s)=>(at(C,A,"write to private field"),s?s.call(C,e):A.set(C,e),e);var tA=(C,A,e)=>(at(C,A,"access private method"),e);var YA=(C,A,e)=>new Promise((s,t)=>{var n=r=>{try{a(e.next(r))}catch(I){t(I)}},i=r=>{try{a(e.throw(r))}catch(I){t(I)}},a=r=>r.done?s(r.value):Promise.resolve(r.value).then(n,i);a((e=e.apply(C,A)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../order/index.cjs"),wA=require("../window-resizer/index.cjs"),yA=require("../ticker/index.cjs"),Zt=require("../dom-JBOkFLTh.cjs"),B=require("three"),mt=require("../layout-box/index.cjs"),Ct=require("../loading/index.cjs"),ys=require("../SourceManager-vSlsMKUE.cjs"),J=require("../Store-C-1ruEIm.cjs"),Ms=require("../easings-DsS5-Kqc.cjs"),Ss=require("../function-MthRj-GJ.cjs"),Ls=require("../Tweened-DIt9j9B-.cjs"),Ts=require("../Viewport-DMB0dO-s.cjs"),zt=require("../custom-element/index.cjs");function xs(C){const A=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(C){for(const e in C)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(C,e);Object.defineProperty(A,e,s.get?s:{enumerable:!0,get:()=>C[e]})}}return A.default=C,Object.freeze(A)}const It=xs(B);function vA(C){const A=e=>{e.dispose();for(const s of Object.keys(e)){const t=e[s];t&&typeof t=="object"&&"minFilter"in t&&t.dispose()}};C.traverse(e=>{if(e instanceof B.Mesh){if(e.geometry.dispose(),!Array.isArray(e.material)&&e.material.isMaterial)A(e.material);else if(Array.isArray(e.material))for(const s of e.material)A(s)}})}var ye,H,TA,EA,QA,XA,lA,hA;class Rt{constructor(A,e){d(this,ye,void 0);d(this,H,void 0);d(this,TA,void 0);d(this,EA,void 0);d(this,QA,void 0);d(this,XA,void 0);d(this,lA,void 0);d(this,hA,void 0);D(this,ye,A),D(this,H,(e==null?void 0:e.cameraType)==="orthographic"?new B.OrthographicCamera:new B.PerspectiveCamera),D(this,TA,new B.Scene),D(this,EA,[]),D(this,QA,(e==null?void 0:e.cameraDistance)||1e3),o(this,H).near=(e==null?void 0:e.cameraNear)||1,o(this,H).far=(e==null?void 0:e.cameraFar)||11e3,D(this,XA,(e==null?void 0:e.cameraFov)||"auto"),D(this,lA,Zt.getElement(e==null?void 0:e.sizeElement)||document.documentElement),this.beforeRenderCallback=e==null?void 0:e.beforeRender,D(this,hA,new mt.LayoutBox(o(this,lA))),o(this,hA).onScale(()=>{this.resize()})}get name(){return o(this,ye)}get camera(){return o(this,H)}get scene(){return o(this,TA)}get box(){return o(this,hA)}get cameraDistance(){return o(this,QA)}set cameraDistance(A){D(this,QA,A),this.resize()}get sizeElement(){return o(this,lA)}get isClipped(){return o(this,lA)!==w.containerElement}resize(){const{width:A,height:e}=o(this,hA);o(this,H).position.z=o(this,QA),o(this,H)instanceof B.PerspectiveCamera?(o(this,H).aspect=A/e,o(this,H).fov=o(this,XA)==="auto"?2*Math.atan(e/2/o(this,QA))*(180/Math.PI):o(this,XA)):o(this,H)instanceof B.OrthographicCamera&&(o(this,H).left=A/-2,o(this,H).right=A/2,o(this,H).top=e/2,o(this,H).bottom=e/-2),o(this,H).updateProjectionMatrix()}destroy(){o(this,EA).forEach(A=>{A.userData.box.destroy()}),o(this,TA).clear(),vA(o(this,TA)),w.destroyView(this.name),o(this,hA).destroy()}attachToHTMLElement(A,e,s){const t=new mt.LayoutBox(A,Fe(eA({},s),{containerElement:o(this,lA),cartesian:!0,scrollStep:!this.isClipped}));return t.bindObject(e),e.userData.box=t,o(this,EA).push(e),e}detachFromHTMLElement(A){D(this,EA,o(this,EA).filter(e=>e===A?(A.userData.box.destroy(),!1):!0))}add(...A){const e=A[0],s=A[1],t=A[2];return this.scene.add(e),s?this.attachToHTMLElement(s,e,t):e}remove(A,e){this.scene.remove(A),e&&this.detachFromHTMLElement(A)}}ye=new WeakMap,H=new WeakMap,TA=new WeakMap,EA=new WeakMap,QA=new WeakMap,XA=new WeakMap,lA=new WeakMap,hA=new WeakMap;const Y=new Map;var nt,iA,T,k,VA,WA,jA,Me,xA,Se,Le,Te;class Hs{constructor(){d(this,nt,`https://unpkg.com/three@0.${B.REVISION}.x`);d(this,iA,null);d(this,T,null);d(this,k,new Map);d(this,VA,0);d(this,WA,0);d(this,jA,0);d(this,Me,2);d(this,xA,!1);d(this,Se,!1);d(this,Le,()=>{var A;D(this,VA,o(this,iA).clientWidth),D(this,WA,o(this,iA).clientHeight),D(this,jA,Math.min(o(this,Me),devicePixelRatio||1)),o(this,T).setPixelRatio(o(this,jA)),o(this,T).setSize(o(this,VA),o(this,WA)),(A=this.onResize)==null||A.call(this)});d(this,Te,()=>{o(this,T).setRenderTarget(null),o(this,k).forEach(A=>{this.render(A)})})}get CDNVersion(){return o(this,nt)}get containerElement(){return o(this,iA)}get webglRenderer(){return o(this,T)}get views(){return o(this,k)}get view(){return this.getView("default")}get width(){return o(this,VA)}get height(){return o(this,WA)}get pixelRatio(){return o(this,jA)}get cacheAssets(){return o(this,Se)}setup(A){if(o(this,xA)){console.warn("[en3.setup]: You are trying to setup en3 again.");return}D(this,iA,Zt.getElement(A==null?void 0:A.containerElement)||document.body),D(this,Me,(A==null?void 0:A.maxPixelRatio)||2),D(this,T,new B.WebGLRenderer(A==null?void 0:A.webGLRendererParameters)),o(this,T).domElement.style.cssText=`
2
2
  position: fixed;
3
3
  left: 0;
4
4
  top: 0;
package/lib/en3/index.js CHANGED
@@ -48,7 +48,7 @@ import { S as Di } from "../SourceManager-Q-PB-Rkh.js";
48
48
  import { S as T } from "../Store-BQXXikps.js";
49
49
  import { f as Fi } from "../easings-BKi40vHz.js";
50
50
  import { d as pi } from "../function-C10DGppn.js";
51
- import { T as Gi } from "../Tweened-DzckT3pw.js";
51
+ import { T as Gi } from "../Tweened-CwDC2zl8.js";
52
52
  import { d as mi } from "../Viewport-CFFhFKqX.js";
53
53
  import { CustomElement as Ri, define as wi } from "../custom-element/index.js";
54
54
  function Me(a) {