aptechka 0.4.11 → 0.4.13
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/{Damped-Ceg1a3X8.js → Damped-BZujMwuv.js} +11 -10
- package/lib/Damped-DK3CSBXb.cjs +1 -0
- package/lib/{Derived-B-g8dYgh.cjs → Derived-BZtlW0bB.cjs} +1 -1
- package/lib/{Derived-kPJs5JC5.js → Derived-DH-ouLBq.js} +1 -1
- package/lib/DragControls-CV1YozSr.cjs +1 -0
- package/lib/{DragControls-CZhJHO0_.js → DragControls-Ch_JO2ML.js} +23 -22
- package/lib/SourceManager-Bl_uduSS.cjs +1 -0
- package/lib/{SourceManager-4OHacQoQ.js → SourceManager-D_8MZ3bR.js} +21 -20
- package/lib/Store-BQGNOHlY.cjs +1 -0
- package/lib/{Store-BQXXikps.js → Store-Cd-E5W1z.js} +8 -7
- package/lib/{Viewport-wlgZaIn7.js → Viewport-Bx-VImCe.js} +6 -5
- package/lib/Viewport-_WllZTJ0.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +1 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +6 -5
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +16 -15
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +4 -3
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +4 -3
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/{createStylesheet-CqHU9_qv.cjs → createStylesheet-C8aQQ4hd.cjs} +1 -1
- package/lib/{createStylesheet-DBCEbDjI.js → createStylesheet-KMRQhSa-.js} +1 -1
- package/lib/createTheme-BSreUYge.cjs +1 -0
- package/lib/createTheme-u3NsrEV6.js +16 -0
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +4 -3
- package/lib/custom-element/index.cjs +1 -1
- package/lib/custom-element/index.js +3 -2
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +7 -6
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +3 -3
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +23 -22
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +23 -22
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +8 -7
- package/lib/{index-BUOBDenR.js → index-Fasue6kv.js} +20 -19
- package/lib/index-nxoux28n.cjs +9 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +3 -2
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +11 -10
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +148 -139
- package/lib/libs/path-data-polyfill.d.ts +1 -0
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +16 -15
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +6 -5
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +4 -3
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +21 -20
- package/lib/path-data-polyfill-CXsOR7Oc.cjs +3 -0
- package/lib/path-data-polyfill-DgeDWYeI.js +454 -0
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +14 -13
- package/lib/resized/index.cjs +1 -1
- package/lib/resized/index.js +8 -7
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +8 -7
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +307 -298
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.d.ts +3 -0
- package/lib/scroll-entries/index.js +18 -13
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/slicer/index.cjs +2 -2
- package/lib/slicer/index.js +4 -3
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +13 -12
- package/lib/{tags-CMPg9ETZ.js → tags-BoPv9fDr.js} +234 -233
- package/lib/tags-CueX-JLX.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +7 -6
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +3 -2
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +6 -5
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +164 -127
- package/lib/utils/svg.d.ts +15 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +6 -5
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +7 -6
- package/package.json +1 -1
- package/lib/Damped-BdnkNOcb.cjs +0 -1
- package/lib/DragControls-C7P6P5HO.cjs +0 -1
- package/lib/SourceManager-Bc68GDrb.cjs +0 -1
- package/lib/Store-C-1ruEIm.cjs +0 -1
- package/lib/Viewport-DAjFJF5V.cjs +0 -1
- package/lib/createTheme-CHnsCgAr.js +0 -15
- package/lib/createTheme-Cfaw9UmV.cjs +0 -1
- package/lib/index-Bv5vIuF-.cjs +0 -9
- package/lib/tags-Djb6mb1o.cjs +0 -1
package/lib/layout-box/index.js
CHANGED
|
@@ -1,96 +1,109 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
3
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var K = (i, s, e) => {
|
|
2
|
+
if (!s.has(i))
|
|
3
|
+
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var t = (i,
|
|
6
|
-
if (
|
|
5
|
+
var t = (i, s, e) => (K(i, s, "read from private field"), e ? e.call(i) : s.get(i)), h = (i, s, e) => {
|
|
6
|
+
if (s.has(i))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
}, n = (i,
|
|
10
|
-
var
|
|
11
|
-
import { cssUnitParser as
|
|
12
|
-
import { Ladder as
|
|
13
|
-
import { TICK_ORDER as
|
|
14
|
-
import { scrollEntries as
|
|
15
|
-
import { ticker as
|
|
16
|
-
import { i as
|
|
17
|
-
import { g as
|
|
18
|
-
import { g as
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
s instanceof WeakSet ? s.add(i) : s.set(i, e);
|
|
9
|
+
}, n = (i, s, e, r) => (K(i, s, "write to private field"), r ? r.call(i, e) : s.set(i, e), e);
|
|
10
|
+
var O = (i, s, e) => (K(i, s, "access private method"), e);
|
|
11
|
+
import { cssUnitParser as ct } from "../css-unit-parser/index.js";
|
|
12
|
+
import { Ladder as $ } from "../ladder/index.js";
|
|
13
|
+
import { TICK_ORDER as ut, RESIZE_ORDER as St } from "../order/index.js";
|
|
14
|
+
import { scrollEntries as F } from "../scroll-entries/index.js";
|
|
15
|
+
import { ticker as Q } from "../ticker/index.js";
|
|
16
|
+
import { i as j } from "../browser-0zX67oeU.js";
|
|
17
|
+
import { g as tt } from "../dom-0S_WDL4g.js";
|
|
18
|
+
import { g as G, a as J } from "../layout-HoBT_Da2.js";
|
|
19
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
20
|
+
import { elementResizer as st } from "../element-resizer/index.js";
|
|
21
|
+
import { windowResizer as et } from "../window-resizer/index.js";
|
|
22
|
+
function dt(i) {
|
|
23
|
+
const s = Math.sqrt(
|
|
23
24
|
i.m11 * i.m11 + i.m12 * i.m12 + i.m13 * i.m13
|
|
24
|
-
),
|
|
25
|
+
), e = Math.sqrt(
|
|
25
26
|
i.m21 * i.m21 + i.m22 * i.m22 + i.m23 * i.m23
|
|
26
|
-
),
|
|
27
|
+
), r = Math.sqrt(
|
|
27
28
|
i.m31 * i.m31 + i.m32 * i.m32 + i.m33 * i.m33
|
|
28
|
-
),
|
|
29
|
+
), H = Math.atan2(i.m32, i.m33), T = Math.atan2(
|
|
29
30
|
-i.m31,
|
|
30
31
|
Math.sqrt(i.m32 * i.m32 + i.m33 * i.m33)
|
|
31
|
-
),
|
|
32
|
+
), I = Math.atan2(i.m21, i.m11), u = i.m41, R = i.m42 * -1, C = i.m43;
|
|
32
33
|
return {
|
|
33
|
-
scaleX:
|
|
34
|
-
scaleY:
|
|
35
|
-
scaleZ:
|
|
36
|
-
rotationX:
|
|
37
|
-
rotationY:
|
|
38
|
-
rotationZ:
|
|
34
|
+
scaleX: s,
|
|
35
|
+
scaleY: e,
|
|
36
|
+
scaleZ: r,
|
|
37
|
+
rotationX: H,
|
|
38
|
+
rotationY: T,
|
|
39
|
+
rotationZ: I,
|
|
39
40
|
translationX: u,
|
|
40
|
-
translationY:
|
|
41
|
-
translationZ:
|
|
41
|
+
translationY: R,
|
|
42
|
+
translationZ: C
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
|
-
var a,
|
|
45
|
-
class
|
|
46
|
-
constructor(
|
|
47
|
-
h(this,
|
|
48
|
-
h(this, B);
|
|
45
|
+
var a, f, p, _, Z, P, x, E, A, y, M, L, S, d, v, X, Y, W, m, z, g, c, l, o, b, q, N, D, it, U, ht, k, nt, w, B, V;
|
|
46
|
+
class wt {
|
|
47
|
+
constructor(s, e) {
|
|
48
|
+
h(this, q);
|
|
49
49
|
h(this, D);
|
|
50
|
-
h(this,
|
|
50
|
+
h(this, U);
|
|
51
|
+
h(this, k);
|
|
51
52
|
h(this, a, null);
|
|
52
|
-
h(this,
|
|
53
|
+
h(this, f, null);
|
|
53
54
|
h(this, p, []);
|
|
54
55
|
h(this, _, "auto");
|
|
55
|
-
h(this,
|
|
56
|
-
h(this,
|
|
57
|
-
h(this,
|
|
58
|
-
h(this,
|
|
59
|
-
h(this,
|
|
56
|
+
h(this, Z, "top");
|
|
57
|
+
h(this, P, !1);
|
|
58
|
+
h(this, x, !0);
|
|
59
|
+
h(this, E, !0);
|
|
60
|
+
h(this, A, !0);
|
|
60
61
|
h(this, y, 0);
|
|
61
62
|
h(this, M, 0);
|
|
62
63
|
h(this, L, 0);
|
|
63
64
|
h(this, S, 0);
|
|
64
65
|
h(this, d, 0);
|
|
65
|
-
h(this,
|
|
66
|
-
h(this, P, 0);
|
|
66
|
+
h(this, v, 0);
|
|
67
67
|
h(this, X, 0);
|
|
68
|
-
h(this,
|
|
69
|
-
h(this,
|
|
68
|
+
h(this, Y, 0);
|
|
69
|
+
h(this, W, 0);
|
|
70
|
+
h(this, m, { x: 0, y: 0, z: 0 });
|
|
70
71
|
h(this, z, { x: 0, y: 0, z: 0 });
|
|
71
72
|
h(this, g, { x: 1, y: 1, z: 1 });
|
|
72
|
-
h(this, c, new
|
|
73
|
-
h(this,
|
|
74
|
-
h(this,
|
|
73
|
+
h(this, c, new $({ x: 0, y: 0, z: 0 }));
|
|
74
|
+
h(this, l, new $({ x: 0, y: 0, z: 0 }));
|
|
75
|
+
h(this, o, new $({ x: 0, y: 0, z: 0 }));
|
|
76
|
+
h(this, b, /* @__PURE__ */ new Map());
|
|
75
77
|
h(this, w, () => {
|
|
76
|
-
|
|
78
|
+
j && O(this, U, ht).call(this);
|
|
77
79
|
});
|
|
78
|
-
h(this,
|
|
79
|
-
|
|
80
|
+
h(this, B, () => {
|
|
81
|
+
O(this, k, nt).call(this), O(this, q, N).call(this);
|
|
80
82
|
});
|
|
81
|
-
|
|
83
|
+
h(this, V, () => {
|
|
84
|
+
const s = F.getAll(this.element);
|
|
85
|
+
t(this, b).forEach((e, r) => {
|
|
86
|
+
s.includes(r) || (this.deleteScrollStep(e), t(this, b).delete(r));
|
|
87
|
+
}), s.forEach((e) => {
|
|
88
|
+
if (!t(this, b).has(e)) {
|
|
89
|
+
const r = () => e;
|
|
90
|
+
t(this, b).set(e, r), this.setScrollStep(r);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
j && (n(this, a, tt(s) || document.body), n(this, f, tt(e == null ? void 0 : e.containerElement) || document.body), n(this, _, (e == null ? void 0 : e.scrollAxis) || "auto"), n(this, Z, (e == null ? void 0 : e.frontSide) || "top"), n(this, P, (e == null ? void 0 : e.cartesian) || !1), n(this, x, (e == null ? void 0 : e.sizeStep) !== void 0 ? e.sizeStep : !0), n(this, E, (e == null ? void 0 : e.positionStep) !== void 0 ? e.positionStep : !0), n(this, A, (e == null ? void 0 : e.transformStep) !== void 0 ? e.transformStep : !0), t(this, o).setStep("_size", "+", {
|
|
82
95
|
x: 1,
|
|
83
96
|
y: 1,
|
|
84
97
|
z: 1
|
|
85
|
-
}), t(this,
|
|
98
|
+
}), t(this, l).setStep("_position", "+", {
|
|
86
99
|
x: 0,
|
|
87
100
|
y: 0,
|
|
88
101
|
z: 0
|
|
89
|
-
}), t(this,
|
|
102
|
+
}), t(this, o).setStep("_scale", "*", {
|
|
90
103
|
x: 1,
|
|
91
104
|
y: 1,
|
|
92
105
|
z: 1
|
|
93
|
-
}), t(this,
|
|
106
|
+
}), t(this, l).setStep("_translation", "+", {
|
|
94
107
|
x: 0,
|
|
95
108
|
y: 0,
|
|
96
109
|
z: 0
|
|
@@ -98,29 +111,25 @@ class vt {
|
|
|
98
111
|
x: 0,
|
|
99
112
|
y: 0,
|
|
100
113
|
z: 0
|
|
101
|
-
}),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}), G.subscribe(t(this, q), {
|
|
106
|
-
order: ot.LAYOUT_BOX,
|
|
107
|
-
culling: s != null && s.culling ? this.element : void 0
|
|
108
|
-
}), Q.subscribe(this.element, t(this, w)), j.subscribe(t(this, w), at.LAYOUT_BOX));
|
|
114
|
+
}), F.notifier.subscribe(t(this, V)), Q.subscribe(t(this, B), {
|
|
115
|
+
order: ut.LAYOUT_BOX,
|
|
116
|
+
culling: e != null && e.culling ? this.element : void 0
|
|
117
|
+
}), st.subscribe(this.element, t(this, w)), et.subscribe(t(this, w), St.LAYOUT_BOX));
|
|
109
118
|
}
|
|
110
119
|
get element() {
|
|
111
120
|
return t(this, a);
|
|
112
121
|
}
|
|
113
122
|
get containerElement() {
|
|
114
|
-
return t(this,
|
|
123
|
+
return t(this, f);
|
|
115
124
|
}
|
|
116
125
|
get position() {
|
|
117
|
-
return t(this,
|
|
126
|
+
return t(this, l).current;
|
|
118
127
|
}
|
|
119
128
|
get rotation() {
|
|
120
129
|
return t(this, c).current;
|
|
121
130
|
}
|
|
122
131
|
get scale() {
|
|
123
|
-
return t(this,
|
|
132
|
+
return t(this, o).current;
|
|
124
133
|
}
|
|
125
134
|
get left() {
|
|
126
135
|
return t(this, d);
|
|
@@ -129,7 +138,7 @@ class vt {
|
|
|
129
138
|
return t(this, S);
|
|
130
139
|
}
|
|
131
140
|
get front() {
|
|
132
|
-
return t(this,
|
|
141
|
+
return t(this, v);
|
|
133
142
|
}
|
|
134
143
|
get width() {
|
|
135
144
|
return t(this, y);
|
|
@@ -140,81 +149,81 @@ class vt {
|
|
|
140
149
|
get depth() {
|
|
141
150
|
return t(this, L);
|
|
142
151
|
}
|
|
143
|
-
bindObject(
|
|
144
|
-
|
|
152
|
+
bindObject(s) {
|
|
153
|
+
s.position && t(this, l).bind(s.position), s.rotation && t(this, c).bind(s.rotation), s.scale && t(this, o).bind(s.scale);
|
|
145
154
|
}
|
|
146
|
-
unbindObject(
|
|
147
|
-
|
|
155
|
+
unbindObject(s) {
|
|
156
|
+
s.position && t(this, l).unbind(s.position), s.rotation && t(this, c).unbind(s.rotation), s.scale && t(this, o).unbind(s.scale);
|
|
148
157
|
}
|
|
149
|
-
setScrollStep(
|
|
150
|
-
return t(this, p).includes(
|
|
158
|
+
setScrollStep(s) {
|
|
159
|
+
return t(this, p).includes(s) || t(this, p).push(s), () => this.deleteScrollStep(s);
|
|
151
160
|
}
|
|
152
|
-
deleteScrollStep(
|
|
161
|
+
deleteScrollStep(s) {
|
|
153
162
|
n(this, p, t(this, p).filter(
|
|
154
|
-
(
|
|
163
|
+
(e) => e !== s
|
|
155
164
|
));
|
|
156
165
|
}
|
|
157
166
|
destroy() {
|
|
158
|
-
|
|
167
|
+
Q.unsubscribe(t(this, B)), st.unsubscribe(t(this, w)), et.unsubscribe(t(this, w)), F.notifier.unsubscribe(t(this, V)), t(this, b).clear(), t(this, l).close(), t(this, c).close(), t(this, o).close();
|
|
159
168
|
}
|
|
160
|
-
setPositionStep(...
|
|
161
|
-
t(this,
|
|
169
|
+
setPositionStep(...s) {
|
|
170
|
+
t(this, l).setStep(...s);
|
|
162
171
|
}
|
|
163
|
-
getPositionStep(...
|
|
164
|
-
return t(this,
|
|
172
|
+
getPositionStep(...s) {
|
|
173
|
+
return t(this, l).getStepValue(...s);
|
|
165
174
|
}
|
|
166
|
-
setRotationStep(...
|
|
167
|
-
t(this, c).setStep(...
|
|
175
|
+
setRotationStep(...s) {
|
|
176
|
+
t(this, c).setStep(...s);
|
|
168
177
|
}
|
|
169
|
-
getRotationStep(...
|
|
170
|
-
return t(this, c).getStepValue(...
|
|
178
|
+
getRotationStep(...s) {
|
|
179
|
+
return t(this, c).getStepValue(...s);
|
|
171
180
|
}
|
|
172
|
-
setScaleStep(...
|
|
173
|
-
t(this,
|
|
181
|
+
setScaleStep(...s) {
|
|
182
|
+
t(this, o).setStep(...s);
|
|
174
183
|
}
|
|
175
|
-
getScaleStep(...
|
|
176
|
-
return t(this,
|
|
184
|
+
getScaleStep(...s) {
|
|
185
|
+
return t(this, o).getStepValue(...s);
|
|
177
186
|
}
|
|
178
|
-
deletePositionStep(...
|
|
179
|
-
t(this,
|
|
187
|
+
deletePositionStep(...s) {
|
|
188
|
+
t(this, l).deleteStep(...s);
|
|
180
189
|
}
|
|
181
|
-
deleteRotationStep(...
|
|
182
|
-
t(this, c).deleteStep(...
|
|
190
|
+
deleteRotationStep(...s) {
|
|
191
|
+
t(this, c).deleteStep(...s);
|
|
183
192
|
}
|
|
184
|
-
deleteScaleStep(...
|
|
185
|
-
t(this,
|
|
193
|
+
deleteScaleStep(...s) {
|
|
194
|
+
t(this, o).deleteStep(...s);
|
|
186
195
|
}
|
|
187
196
|
}
|
|
188
|
-
a = new WeakMap(),
|
|
189
|
-
t(this,
|
|
190
|
-
},
|
|
191
|
-
t(this,
|
|
192
|
-
x: t(this,
|
|
193
|
-
y: t(this,
|
|
194
|
-
z: t(this,
|
|
197
|
+
a = new WeakMap(), f = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), Z = new WeakMap(), P = new WeakMap(), x = new WeakMap(), E = new WeakMap(), A = new WeakMap(), y = new WeakMap(), M = new WeakMap(), L = new WeakMap(), S = new WeakMap(), d = new WeakMap(), v = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), m = new WeakMap(), z = new WeakMap(), g = new WeakMap(), c = new WeakMap(), l = new WeakMap(), o = new WeakMap(), b = new WeakMap(), q = new WeakSet(), N = function() {
|
|
198
|
+
t(this, o).calculate(), t(this, l).calculate(), t(this, c).calculate();
|
|
199
|
+
}, D = new WeakSet(), it = function() {
|
|
200
|
+
t(this, o).setStep("_size", "+", {
|
|
201
|
+
x: t(this, x) ? t(this, y) : 1,
|
|
202
|
+
y: t(this, x) ? t(this, M) : 1,
|
|
203
|
+
z: t(this, x) ? t(this, L) : 1
|
|
195
204
|
});
|
|
196
|
-
const
|
|
197
|
-
t(this,
|
|
198
|
-
x:
|
|
199
|
-
y:
|
|
200
|
-
z:
|
|
201
|
-
}), t(this,
|
|
205
|
+
const s = t(this, E) ? t(this, X) : 0, e = t(this, E) ? t(this, Y) : 0, r = t(this, E) ? t(this, W) : 0;
|
|
206
|
+
t(this, l).setStep("_position", "+", {
|
|
207
|
+
x: s,
|
|
208
|
+
y: e,
|
|
209
|
+
z: r
|
|
210
|
+
}), t(this, A) ? (t(this, o).setStep("_scale", "*", {
|
|
202
211
|
x: t(this, g).x,
|
|
203
212
|
y: t(this, g).y,
|
|
204
213
|
z: t(this, g).z
|
|
205
|
-
}), t(this,
|
|
206
|
-
x: t(this,
|
|
207
|
-
y: t(this,
|
|
208
|
-
z: t(this,
|
|
214
|
+
}), t(this, l).setStep("_translation", "+", {
|
|
215
|
+
x: t(this, m).x,
|
|
216
|
+
y: t(this, m).y,
|
|
217
|
+
z: t(this, m).z
|
|
209
218
|
}), t(this, c).setStep("_rotation", "+", {
|
|
210
219
|
x: t(this, z).x,
|
|
211
220
|
y: t(this, z).y,
|
|
212
221
|
z: t(this, z).z
|
|
213
|
-
})) : (t(this,
|
|
222
|
+
})) : (t(this, o).setStep("_scale", "*", {
|
|
214
223
|
x: 1,
|
|
215
224
|
y: 1,
|
|
216
225
|
z: 1
|
|
217
|
-
}), t(this,
|
|
226
|
+
}), t(this, l).setStep("_translation", "+", {
|
|
218
227
|
x: 0,
|
|
219
228
|
y: 0,
|
|
220
229
|
z: 0
|
|
@@ -223,35 +232,35 @@ a = new WeakMap(), m = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), T =
|
|
|
223
232
|
y: 0,
|
|
224
233
|
z: 0
|
|
225
234
|
}));
|
|
226
|
-
},
|
|
227
|
-
const
|
|
235
|
+
}, U = new WeakSet(), ht = function() {
|
|
236
|
+
const s = getComputedStyle(t(this, a));
|
|
228
237
|
n(this, y, Math.max(t(this, a).clientWidth, 1)), n(this, M, Math.max(t(this, a).clientHeight, 1)), n(this, L, Math.max(
|
|
229
|
-
|
|
238
|
+
ct.parse(s.getPropertyValue("--depth") || "0px"),
|
|
230
239
|
1
|
|
231
240
|
));
|
|
232
|
-
const
|
|
233
|
-
if (n(this, d,
|
|
234
|
-
const
|
|
235
|
-
n(this, d, (
|
|
241
|
+
const e = G(t(this, f)), r = J(t(this, f)), H = t(this, f).clientWidth, T = t(this, f).clientHeight;
|
|
242
|
+
if (n(this, d, G(t(this, a)) - e), n(this, S, J(t(this, a)) - r), t(this, _) === "z") {
|
|
243
|
+
const R = t(this, d) / H, C = t(this, S) / T;
|
|
244
|
+
n(this, d, (R - Math.floor(R)) * H), n(this, S, (C - Math.floor(C)) * T), t(this, Z) === "left" ? n(this, v, G(t(this, a)) - e - t(this, d)) : n(this, v, J(t(this, a)) - r - t(this, S));
|
|
236
245
|
}
|
|
237
|
-
if (n(this, d, t(this, d) + t(this, a).clientLeft), n(this, S, t(this, S) + t(this, a).clientTop), t(this,
|
|
238
|
-
const
|
|
239
|
-
n(this,
|
|
246
|
+
if (n(this, d, t(this, d) + t(this, a).clientLeft), n(this, S, t(this, S) + t(this, a).clientTop), t(this, P)) {
|
|
247
|
+
const R = Math.round(H / 2), C = Math.round(T / 2), rt = t(this, y) ? Math.round(t(this, y) / 2) : 0, lt = t(this, M) ? Math.round(t(this, M) / 2) : 0, ot = t(this, d) - R + rt, at = (t(this, S) - C + lt) * -1;
|
|
248
|
+
n(this, X, ot), n(this, Y, at);
|
|
240
249
|
} else
|
|
241
|
-
n(this,
|
|
242
|
-
n(this,
|
|
243
|
-
const
|
|
244
|
-
t(this,
|
|
245
|
-
},
|
|
246
|
-
for (let
|
|
247
|
-
const
|
|
248
|
-
let
|
|
249
|
-
t(this, _) !== "auto" && (
|
|
250
|
-
[
|
|
250
|
+
n(this, X, t(this, d)), n(this, Y, t(this, S));
|
|
251
|
+
n(this, W, t(this, v) * -1);
|
|
252
|
+
const I = new WebKitCSSMatrix(s.transform), u = dt(I);
|
|
253
|
+
t(this, m).x = u.translationX, t(this, m).y = u.translationY, t(this, m).z = u.translationZ, t(this, g).x = u.scaleX, t(this, g).y = u.scaleY, t(this, g).z = u.scaleZ, t(this, z).x = u.rotationX, t(this, z).y = u.rotationY, t(this, z).z = u.rotationZ, O(this, D, it).call(this), O(this, q, N).call(this);
|
|
254
|
+
}, k = new WeakSet(), nt = function() {
|
|
255
|
+
for (let s = 0; s < t(this, p).length; s++) {
|
|
256
|
+
const e = t(this, p)[s]();
|
|
257
|
+
let r = e.axis;
|
|
258
|
+
t(this, _) !== "auto" && (r = t(this, _)), t(this, l).setStep(`_scroll_${s}`, "+", {
|
|
259
|
+
[r]: e.value * (r === "x" ? -1 : t(this, P) ? 1 : -1)
|
|
251
260
|
});
|
|
252
261
|
}
|
|
253
|
-
}, w = new WeakMap(),
|
|
262
|
+
}, w = new WeakMap(), B = new WeakMap(), V = new WeakMap();
|
|
254
263
|
export {
|
|
255
|
-
|
|
256
|
-
|
|
264
|
+
wt as LayoutBox,
|
|
265
|
+
dt as decomposeCSSMatrix
|
|
257
266
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/loading/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty,b=Object.defineProperties;var
|
|
1
|
+
"use strict";var p=Object.defineProperty,b=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var S=(r,t,e)=>t in r?p(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,f=(r,t)=>{for(var e in t||(t={}))C.call(t,e)&&S(r,e,t[e]);if(E)for(var e of E(t))L.call(t,e)&&S(r,e,t[e]);return r},c=(r,t)=>b(r,q(t));var w=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var s=(r,t,e)=>(w(r,t,"read from private field"),e?e.call(r):t.get(r)),l=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},v=(r,t,e,i)=>(w(r,t,"write to private field"),i?i.call(r,e):t.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../notifier/index.cjs"),N=require("../function-MthRj-GJ.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var o,h,a,d,n,u,g;class _{constructor(){l(this,o,new Map);l(this,h,new y.Notifier);l(this,a,new y.Notifier);l(this,d,new y.Notifier);l(this,n,!1);l(this,u,t=>{const{loaded:e,total:i}=this.getStats();s(this,h).notify({progress:e/i,loaded:e,total:i,namespace:t}),s(this,g).call(this)});l(this,g,N.debounce(()=>{const{loaded:t,total:e}=this.getStats();if(t===e){v(this,n,!0);const{total:i}=this.getStats();s(this,a).notify({total:i})}},150))}get progressEvent(){return s(this,h)}get completeEvent(){return s(this,a)}get errorEvent(){return s(this,d)}get _counter(){return s(this,o)}get isComplete(){return s(this,n)}reset(){v(this,n,!1),s(this,o).clear()}setTotal(t,e=1){s(this,n)||s(this,o).set(t,{loaded:0,total:e})}setLoaded(t,e=1){if(!s(this,n)&&s(this,o).has(t)){const i=s(this,o).get(t);i.loaded!==e&&(s(this,o).set(t,c(f({},i),{loaded:e})),s(this,u).call(this,t))}}setError(t,e){if(!s(this,n)&&s(this,o).has(t)){const i=s(this,o).get(t);s(this,o).set(t,c(f({},i),{total:i.total-1})),s(this,d).notify({namespace:t,url:e})}}getStats(){return Array.from(s(this,o)).reduce((t,e)=>({loaded:t.loaded+e[1].loaded,total:t.total+e[1].total}),{loaded:0,total:0})}}o=new WeakMap,h=new WeakMap,a=new WeakMap,d=new WeakMap,n=new WeakMap,u=new WeakMap,g=new WeakMap;const M=new _;exports.loading=M;
|
package/lib/loading/index.js
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
var
|
|
1
|
+
var y = Object.defineProperty, S = Object.defineProperties;
|
|
2
2
|
var C = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var v = Object.getOwnPropertySymbols;
|
|
4
4
|
var L = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var m = (s, t, e) => t in s ? y(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, u = (s, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
L.call(t, e) &&
|
|
7
|
+
L.call(t, e) && m(s, e, t[e]);
|
|
8
8
|
if (v)
|
|
9
9
|
for (var e of v(t))
|
|
10
|
-
b.call(t, e) &&
|
|
10
|
+
b.call(t, e) && m(s, e, t[e]);
|
|
11
11
|
return s;
|
|
12
12
|
}, c = (s, t) => S(s, C(t));
|
|
13
|
-
var
|
|
13
|
+
var w = (s, t, e) => {
|
|
14
14
|
if (!t.has(s))
|
|
15
15
|
throw TypeError("Cannot " + e);
|
|
16
16
|
};
|
|
17
|
-
var r = (s, t, e) => (
|
|
17
|
+
var r = (s, t, e) => (w(s, t, "read from private field"), e ? e.call(s) : t.get(s)), h = (s, t, e) => {
|
|
18
18
|
if (t.has(s))
|
|
19
19
|
throw TypeError("Cannot add the same private member more than once");
|
|
20
20
|
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
21
|
-
},
|
|
22
|
-
import { Notifier as
|
|
21
|
+
}, p = (s, t, e, o) => (w(s, t, "write to private field"), o ? o.call(s, e) : t.set(s, e), e);
|
|
22
|
+
import { Notifier as E } from "../notifier/index.js";
|
|
23
23
|
import { d as x } from "../function-C10DGppn.js";
|
|
24
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
24
25
|
var i, l, a, d, n, g, f;
|
|
25
26
|
class A {
|
|
26
27
|
constructor() {
|
|
27
28
|
h(this, i, /* @__PURE__ */ new Map());
|
|
28
|
-
h(this, l, new
|
|
29
|
-
h(this, a, new
|
|
30
|
-
h(this, d, new
|
|
29
|
+
h(this, l, new E());
|
|
30
|
+
h(this, a, new E());
|
|
31
|
+
h(this, d, new E());
|
|
31
32
|
h(this, n, !1);
|
|
32
33
|
h(this, g, (t) => {
|
|
33
34
|
const { loaded: e, total: o } = this.getStats();
|
|
@@ -41,7 +42,7 @@ class A {
|
|
|
41
42
|
h(this, f, x(() => {
|
|
42
43
|
const { loaded: t, total: e } = this.getStats();
|
|
43
44
|
if (t === e) {
|
|
44
|
-
|
|
45
|
+
p(this, n, !0);
|
|
45
46
|
const { total: o } = this.getStats();
|
|
46
47
|
r(this, a).notify({
|
|
47
48
|
total: o
|
|
@@ -65,7 +66,7 @@ class A {
|
|
|
65
66
|
return r(this, n);
|
|
66
67
|
}
|
|
67
68
|
reset() {
|
|
68
|
-
|
|
69
|
+
p(this, n, !1), r(this, i).clear();
|
|
69
70
|
}
|
|
70
71
|
setTotal(t, e = 1) {
|
|
71
72
|
r(this, n) || r(this, i).set(t, { loaded: 0, total: e });
|
|
@@ -93,7 +94,7 @@ class A {
|
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
i = new WeakMap(), l = new WeakMap(), a = new WeakMap(), d = new WeakMap(), n = new WeakMap(), g = new WeakMap(), f = new WeakMap();
|
|
96
|
-
const
|
|
97
|
+
const j = new A();
|
|
97
98
|
export {
|
|
98
|
-
|
|
99
|
+
j as loading
|
|
99
100
|
};
|
package/lib/media/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var d=(e,r,s)=>{if(!r.has(e))throw TypeError("Cannot "+s)};var o=(e,r,s)=>(d(e,r,"read from private field"),s?s.call(e):r.get(e)),
|
|
1
|
+
"use strict";var d=(e,r,s)=>{if(!r.has(e))throw TypeError("Cannot "+s)};var o=(e,r,s)=>(d(e,r,"read from private field"),s?s.call(e):r.get(e)),u=(e,r,s)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,s)},c=(e,r,s,n)=>(d(e,r,"write to private field"),n?n.call(e,s):r.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../order/index.cjs"),l=require("../window-resizer/index.cjs"),h=require("../Store-BQGNOHlY.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var i,t;class b extends h.Store{constructor(s){super(!1);u(this,i,void 0);u(this,t,void 0);c(this,i,s),c(this,t,l.windowResizer.subscribe(()=>{matchMedia(o(this,i)).matches?this.current=!0:this.current=!1},a.RESIZE_ORDER.MEDIA))}close(){super.close(),o(this,t).call(this)}}i=new WeakMap,t=new WeakMap;exports.Media=b;
|
package/lib/media/index.js
CHANGED
|
@@ -6,17 +6,18 @@ var o = (e, s, r) => (a(e, s, "read from private field"), r ? r.call(e) : s.get(
|
|
|
6
6
|
if (s.has(e))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
s instanceof WeakSet ? s.add(e) : s.set(e, r);
|
|
9
|
-
},
|
|
9
|
+
}, m = (e, s, r, u) => (a(e, s, "write to private field"), u ? u.call(e, r) : s.set(e, r), r);
|
|
10
10
|
import { RESIZE_ORDER as h } from "../order/index.js";
|
|
11
11
|
import { windowResizer as n } from "../window-resizer/index.js";
|
|
12
|
-
import { S as
|
|
12
|
+
import { S as p } from "../Store-Cd-E5W1z.js";
|
|
13
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
13
14
|
var t, i;
|
|
14
|
-
class
|
|
15
|
+
class w extends p {
|
|
15
16
|
constructor(r) {
|
|
16
17
|
super(!1);
|
|
17
18
|
c(this, t, void 0);
|
|
18
19
|
c(this, i, void 0);
|
|
19
|
-
|
|
20
|
+
m(this, t, r), m(this, i, n.subscribe(() => {
|
|
20
21
|
matchMedia(o(this, t)).matches ? this.current = !0 : this.current = !1;
|
|
21
22
|
}, h.MEDIA));
|
|
22
23
|
}
|
|
@@ -26,5 +27,5 @@ class b extends f {
|
|
|
26
27
|
}
|
|
27
28
|
t = new WeakMap(), i = new WeakMap();
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
w as Media
|
|
30
31
|
};
|
package/lib/modal/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-BQGNOHlY.cjs");const b=require("../browser-CpzFX2xg.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const s=require("../tags-CueX-JLX.cjs"),m=require("../createStylesheet-C8aQQ4hd.cjs"),g=require("../popover/index.cjs"),d=require("../theme/index.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,y=(t,e,o,r)=>{for(var n=r>1?void 0:r?_(e,o):e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(n=(r?h(e,o,n):h(n))||n);return r&&n&&w(e,o,n),n},p=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)},l=(t,e,o)=>(p(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},f=(t,e,o,r)=>(p(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),i,a;const C=m.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:d.aptechkaTheme.durationShort.var},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",zIndex:"1",top:"var(--close-button-top, 0.5em)",right:"var(--close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(--close-button-size, 1.5em)",height:"var(--close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:d.aptechkaTheme.durationShort.var,willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(--close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${d.aptechkaTheme.colorDark.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});exports.ModalElement=class extends g.PopoverElement{constructor(){super(),u(this,i,null),u(this,a,null),b.isBrowser&&(this.openShadow(C),s.element(this,{children:s.div({class:"inner",outside:!0,children:s.div({class:"content",children:[s.element("e-popover-button",{type:"close",target:this.id,class:"close-button",lightChildren:[s.slot({name:"close-button",children:s.span({class:"close-button-default"})})]}),s.slot()]}),ref:e=>f(this,a,e)})}),f(this,i,new ResizeObserver(()=>{l(this,a).scrollHeight>l(this,a).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),l(this,i).observe(this)}disconnectedCallback(){super.disconnectedCallback(),l(this,i).disconnect()}};i=new WeakMap;a=new WeakMap;exports.ModalElement=y([v.define("e-modal")],exports.ModalElement);
|
package/lib/modal/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { define as g } from "../custom-element/index.js";
|
|
2
|
-
import "../Store-
|
|
2
|
+
import "../Store-Cd-E5W1z.js";
|
|
3
3
|
import { i as w } from "../browser-0zX67oeU.js";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
5
|
+
import { e as d, D as f, ay as u, aB as _ } from "../tags-BoPv9fDr.js";
|
|
6
|
+
import { c as y } from "../createStylesheet-KMRQhSa-.js";
|
|
6
7
|
import { PopoverElement as C } from "../popover/index.js";
|
|
7
8
|
import { aptechkaTheme as h } from "../theme/index.js";
|
|
8
9
|
var k = Object.defineProperty, x = Object.getOwnPropertyDescriptor, z = (t, e, o, r) => {
|
package/lib/morph/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var V=(s,t)=>(t=Symbol[s])?t:Symbol.for("Symbol."+s);var m=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var i=(s,t,e)=>(m(s,t,"read from private field"),e?e.call(s):t.get(s)),n=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},
|
|
1
|
+
"use strict";var V=(s,t)=>(t=Symbol[s])?t:Symbol.for("Symbol."+s);var m=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var i=(s,t,e)=>(m(s,t,"read from private field"),e?e.call(s):t.get(s)),n=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},o=(s,t,e,r)=>(m(s,t,"write to private field"),r?r.call(s,e):t.set(s,e),e);var f=(s,t,e)=>(m(s,t,"access private method"),e);var T=(s,t,e)=>new Promise((r,c)=>{var l=u=>{try{g(e.next(u))}catch(v){c(v)}},y=u=>{try{g(e.throw(u))}catch(v){c(v)}},g=u=>u.done?r(u.value):Promise.resolve(u.value).then(l,y);g((e=e.apply(s,t)).next())});var X=(s,t,e)=>(t=s[V("asyncIterator")])?t.call(s):(s=s[V("iterator")](),t={},e=(r,c)=>(c=s[r])&&(t[r]=l=>new Promise((y,g,u)=>(l=c.call(s,l),u=l.done,Promise.resolve(l.value).then(v=>y({value:v,done:u}),g)))),e("next"),e("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("../notifier/index.cjs"),st=require("../browser-CpzFX2xg.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var M,d,w,N,P,S;class nt{constructor(t,e){n(this,M,void 0);n(this,d,void 0);n(this,w,void 0);n(this,N,void 0);n(this,P,t=>{t.preventDefault(),i(this,M).navigate(i(this,w),i(this,N))});n(this,S,()=>{i(this,M).prefetch(i(this,w))});o(this,M,e),o(this,d,t),o(this,w,i(this,d).getAttribute("href")||"/"),o(this,N,i(this,d).getAttribute("data-history-action")||"push"),i(this,d).addEventListener("click",i(this,P)),i(this,w)===location.pathname&&i(this,d).classList.add("current"),i(this,d).hasAttribute("data-prefetch")&&i(this,d).addEventListener("pointerenter",i(this,S))}destroy(){i(this,d).removeEventListener("click",i(this,P)),i(this,d).removeEventListener("pointerenter",i(this,S)),i(this,d).classList.remove("current")}}M=new WeakMap,d=new WeakMap,w=new WeakMap,N=new WeakMap,P=new WeakMap,S=new WeakMap;var a,k,A,C,q,j,E,L,H,x,D,R,z,B,$,W,G,F,J,K,p,O,Q,Y;class rt{constructor(t){n(this,R);n(this,B);n(this,W);n(this,F);n(this,K);n(this,O);n(this,a,null);n(this,k,null);n(this,A,null);n(this,C,null);n(this,q,[]);n(this,j,new DOMParser);n(this,E,new Map);n(this,L,void 0);n(this,H,null);n(this,x,new Z.Notifier);n(this,D,new Z.Notifier);n(this,Y,t=>{t.state&&this.navigate(t.state,"none")});st.isBrowser&&(o(this,a,(t==null?void 0:t.base)||"/"),t!=null&&t.base?(o(this,a,t.base),t.base.endsWith("/")||o(this,a,i(this,a)+"/")):o(this,a,"/"),o(this,k,(t==null?void 0:t.waitForHeadToLoad)!==!1),o(this,A,(t==null?void 0:t.cachePages)!==!1),o(this,C,f(this,F,J).call(this,document)),o(this,H,location.pathname),f(this,W,G).call(this),addEventListener("popstate",i(this,Y)))}beforeNavigationEvent(t){return i(this,x).subscribe(t)}afterNavigationEvent(t){return i(this,D).subscribe(t)}prefetch(t){return T(this,null,function*(){return f(this,R,z).call(this,t)})}navigate(t,e="push"){return T(this,null,function*(){var c;if(t=f(this,B,$).call(this,t),i(this,L)===t||i(this,H)===t)return;o(this,L,t);const r=i(this,E).has(t);try{let l=!0;if(this.preprocessor)try{yield new Promise((h,b)=>{var I;(I=this.preprocessor)==null||I.call(this,{pathname:t,resolve:h,reject:b,isCached:r})})}catch(h){h?console.error(h):console.log("Route change canceled"),l=!1}if(i(this,x).notify({pathname:t,isCached:r}),!l||i(this,L)!==t)return;const y=i(this,E).get(t)||(yield f(this,R,z).call(this,t));if(i(this,L)!==t)return;const g=Array.from(document.head.children),u=Array.from(y.head.cloneNode(!0).children),v=f(this,K,p).call(this,g,u),tt=f(this,O,Q).call(this,g,v),U=f(this,O,Q).call(this,u,v);tt.forEach(h=>h.remove()),U.forEach(h=>document.head.appendChild(h));const _=U.filter(h=>h.tagName==="STYLE"||h.tagName==="SCRIPT"||h.tagName==="LINK");i(this,k)&&_.length&&(yield new Promise(h=>T(this,null,function*(){let b=0;try{for(var I=X(_),ct,lt,ut;ct=!(lt=yield I.next()).done;ct=!1){const it=lt.value;it.onload=()=>{b++,b===_.length&&h()}}}catch(lt){ut=[lt]}finally{try{ct&&(lt=I.return)&&(yield lt.call(I))}finally{if(ut)throw ut[0]}}})));const et=f(this,F,J).call(this,y);i(this,C).forEach((h,b)=>{const I=et[b];h.innerHTML=I.innerHTML}),o(this,H,t),e==="push"?history.pushState(t,"",t+location.search):e==="replace"&&history.replaceState(t,"",t+location.search),f(this,W,G).call(this),(c=this.postprocessor)==null||c.call(this,{pathname:t,isCached:r}),i(this,D).notify({pathname:t,isCached:r})}catch(l){console.error(l)}o(this,L,void 0)})}}a=new WeakMap,k=new WeakMap,A=new WeakMap,C=new WeakMap,q=new WeakMap,j=new WeakMap,E=new WeakMap,L=new WeakMap,H=new WeakMap,x=new WeakMap,D=new WeakMap,R=new WeakSet,z=function(t){return T(this,null,function*(){const e=i(this,E).get(t);if(e)return e;const c=yield(yield fetch(t)).text(),l=i(this,j).parseFromString(c,"text/html");return i(this,A)&&i(this,E).set(t,l),l})},B=new WeakSet,$=function(t){return t=t.replace(i(this,a),""),t.startsWith("/")&&(t=t.slice(1)),i(this,a)+t},W=new WeakSet,G=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(e=>{var r;return(r=e.getAttribute("href"))==null?void 0:r.startsWith("/")});i(this,q).forEach(e=>e.destroy()),o(this,q,t.map(e=>new nt(e,this)))},F=new WeakSet,J=function(t){const e=t.querySelectorAll("[data-morph]");return e.length?[...e]:[t.body]},K=new WeakSet,p=function(t,e){return t.filter(r=>e.find(c=>c.outerHTML===r.outerHTML))},O=new WeakSet,Q=function(t,e){return t.filter(r=>!e.find(c=>c.outerHTML===r.outerHTML))},Y=new WeakMap;exports.Morph=rt;
|