aptechka 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/animation/Animation.d.ts +34 -0
- package/lib/animation/Damped.d.ts +18 -0
- package/lib/animation/Tweened.d.ts +14 -0
- package/lib/animation/index.d.ts +3 -0
- package/lib/attribute/index.d.ts +14 -0
- package/lib/canvas/index.d.ts +34 -0
- package/lib/class-linked-status/index.d.ts +11 -0
- package/lib/connector/index.d.ts +15 -0
- package/lib/controls/AutoplayControls.d.ts +16 -0
- package/lib/controls/Controls.d.ts +8 -0
- package/lib/controls/DragControls.d.ts +15 -0
- package/lib/controls/KeyboardControls.d.ts +13 -0
- package/lib/controls/WheelControls.d.ts +18 -0
- package/lib/controls/index.d.ts +5 -0
- package/lib/css-property/index.d.ts +16 -0
- package/lib/css-unit-parser/index.d.ts +6 -0
- package/lib/css-value-parser/index.d.ts +6 -0
- package/lib/dev/index.d.ts +1 -0
- package/lib/device/Device.d.ts +18 -0
- package/lib/device/Viewport.d.ts +28 -0
- package/lib/device/index.d.ts +2 -0
- package/lib/element-resizer/index.d.ts +9 -0
- package/lib/image/index.d.ts +10 -0
- package/lib/intersector/index.d.ts +9 -0
- package/lib/ladder/index.d.ts +23 -0
- package/lib/layout-box/index.d.ts +95 -0
- package/lib/loading/index.d.ts +38 -0
- package/lib/media/index.d.ts +11 -0
- package/lib/need_redo_tweaker/CheckboxElement.d.ts +14 -0
- package/lib/need_redo_tweaker/TweakerBooleanManagerElement.d.ts +10 -0
- package/lib/need_redo_tweaker/TweakerColorManagerElement.d.ts +10 -0
- package/lib/need_redo_tweaker/TweakerElement.d.ts +17 -0
- package/lib/need_redo_tweaker/TweakerFieldElement.d.ts +19 -0
- package/lib/need_redo_tweaker/TweakerFolderElement.d.ts +23 -0
- package/lib/need_redo_tweaker/TweakerLinkManagerElement.d.ts +10 -0
- package/lib/need_redo_tweaker/TweakerNumberManagerElement.d.ts +13 -0
- package/lib/need_redo_tweaker/TweakerSelectManagerElement.d.ts +10 -0
- package/lib/need_redo_tweaker/TweakerStoreManagerElement.d.ts +9 -0
- package/lib/need_redo_tweaker/TweakerStringManagerElement.d.ts +10 -0
- package/lib/need_redo_tweaker/element-constructor/ElementConstructor.d.ts +74 -0
- package/lib/need_redo_tweaker/element-constructor/createStylesheet.d.ts +2 -0
- package/lib/need_redo_tweaker/element-constructor/createTheme.d.ts +12 -0
- package/lib/need_redo_tweaker/element-constructor/index.d.ts +4 -0
- package/lib/need_redo_tweaker/element-constructor/knownSvgTags.d.ts +1 -0
- package/lib/need_redo_tweaker/element-constructor/tags.d.ts +118 -0
- package/lib/need_redo_tweaker/index.cjs +4 -4
- package/lib/need_redo_tweaker/index.d.ts +1 -0
- package/lib/need_redo_tweaker/index.js +1 -2
- package/lib/need_redo_tweaker/select/SelectElement.d.ts +24 -0
- package/lib/need_redo_tweaker/select/SelectHeadElement.d.ts +12 -0
- package/lib/need_redo_tweaker/select/SelectOptionElement.d.ts +13 -0
- package/lib/need_redo_tweaker/select/SelectUserElement.d.ts +6 -0
- package/lib/need_redo_tweaker/select/index.d.ts +4 -0
- package/lib/need_redo_tweaker/theme/index.d.ts +35 -0
- package/lib/need_redo_tweaker/tweakerManagerConstructors.d.ts +14 -0
- package/lib/need_redo_tweaker/tweakerStorage.d.ts +23 -0
- package/lib/notifier/index.d.ts +8 -0
- package/lib/object-DOa0yKM9.js +114 -0
- package/lib/object-HBC5QlzO.cjs +1 -0
- package/lib/order/index.d.ts +22 -0
- package/lib/pointer/Pointer.d.ts +22 -0
- package/lib/pointer/PointerElement.d.ts +13 -0
- package/lib/pointer/index.d.ts +2 -0
- package/lib/popover/PopoverButtonElement.d.ts +14 -0
- package/lib/popover/PopoverElement.d.ts +25 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/scroll/ScrollBulletButtonsElement.d.ts +11 -0
- package/lib/scroll/ScrollButtonElement.d.ts +5 -0
- package/lib/scroll/ScrollElement.d.ts +81 -0
- package/lib/scroll/ScrollSection.d.ts +22 -0
- package/lib/scroll/ScrollSegmentElement.d.ts +62 -0
- package/lib/scroll/ScrollSetButtonElement.d.ts +9 -0
- package/lib/scroll/ScrollStepButtonElement.d.ts +9 -0
- package/lib/scroll/ScrollUserElement.d.ts +6 -0
- package/lib/scroll/ScrollbarElement.d.ts +13 -0
- package/lib/scroll/index.d.ts +6 -0
- package/lib/scroll-entries/index.d.ts +20 -0
- package/lib/sequence/index.d.ts +20 -0
- package/lib/slicer/Letter.d.ts +11 -0
- package/lib/slicer/SlicerElement.d.ts +20 -0
- package/lib/slicer/Word.d.ts +16 -0
- package/lib/slicer/index.d.ts +3 -0
- package/lib/source/SourceClass.d.ts +11 -0
- package/lib/source/SourceElement.d.ts +24 -0
- package/lib/source/SourceManager.d.ts +13 -0
- package/lib/source/SourceSet.d.ts +8 -0
- package/lib/source/index.d.ts +4 -0
- package/lib/store/Composed.d.ts +7 -0
- package/lib/store/Derived.d.ts +7 -0
- package/lib/store/DerivedArray.d.ts +7 -0
- package/lib/store/Resource.d.ts +11 -0
- package/lib/store/Store.d.ts +35 -0
- package/lib/store/StoreRegistry.d.ts +22 -0
- package/lib/store/index.d.ts +6 -0
- package/lib/test/starting-style/index.d.ts +1 -0
- package/lib/ticker/index.d.ts +21 -0
- package/lib/utils/array.d.ts +2 -0
- package/lib/utils/attributes.d.ts +2 -0
- package/lib/utils/browser.d.ts +1 -0
- package/lib/utils/bytes.d.ts +1 -0
- package/lib/utils/canvas.d.ts +7 -0
- package/lib/utils/collisions.d.ts +3 -0
- package/lib/utils/coordinates.d.ts +13 -0
- package/lib/utils/cssom.d.ts +5 -0
- package/lib/utils/decoding.d.ts +2 -0
- package/lib/utils/dom.d.ts +5 -0
- package/lib/utils/easings.d.ts +17 -0
- package/lib/utils/events.d.ts +8 -0
- package/lib/utils/file.d.ts +1 -0
- package/lib/utils/function.d.ts +2 -0
- package/lib/utils/gestures.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +27 -0
- package/lib/utils/index.js +155 -140
- package/lib/utils/jss.d.ts +12 -0
- package/lib/utils/layout.d.ts +3 -0
- package/lib/utils/math.d.ts +11 -0
- package/lib/utils/number.d.ts +3 -0
- package/lib/utils/object.d.ts +9 -0
- package/lib/utils/polyfills.d.ts +1 -0
- package/lib/utils/promises.d.ts +1 -0
- package/lib/utils/string.d.ts +8 -0
- package/lib/utils/style.d.ts +2 -0
- package/lib/utils/ts-shape.d.ts +20 -0
- package/lib/utils/ts-utility.d.ts +26 -0
- package/lib/utils/url.d.ts +9 -0
- package/lib/video/index.d.ts +21 -0
- package/lib/window-resizer/index.d.ts +9 -0
- package/package.json +3 -47
- package/lib/en3/index.cjs +0 -8
- package/lib/en3/index.js +0 -374
- package/lib/file-BEr-o55N.js +0 -31
- package/lib/file-C9BbxzVU.cjs +0 -1
- package/lib/morph/index.cjs +0 -1
- package/lib/morph/index.js +0 -225
- package/lib/object-CCiXnER2.cjs +0 -1
- package/lib/object-D6MVWB4l.js +0 -85
- package/lib/router/index.cjs +0 -1
- package/lib/router/index.js +0 -266
- package/lib/url-C3dWnJQg.cjs +0 -1
- package/lib/url-DMNfW7uN.js +0 -22
package/lib/en3/index.js
DELETED
|
@@ -1,374 +0,0 @@
|
|
|
1
|
-
var me = Object.defineProperty, fe = Object.defineProperties;
|
|
2
|
-
var ge = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var Q = Object.getOwnPropertySymbols;
|
|
4
|
-
var Ee = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var te = (s) => {
|
|
6
|
-
throw TypeError(s);
|
|
7
|
-
};
|
|
8
|
-
var ee = (s, e, i) => e in s ? me(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i, k = (s, e) => {
|
|
9
|
-
for (var i in e || (e = {}))
|
|
10
|
-
Ee.call(e, i) && ee(s, i, e[i]);
|
|
11
|
-
if (Q)
|
|
12
|
-
for (var i of Q(e))
|
|
13
|
-
be.call(e, i) && ee(s, i, e[i]);
|
|
14
|
-
return s;
|
|
15
|
-
}, ie = (s, e) => fe(s, ge(e));
|
|
16
|
-
var se = (s, e, i) => e.has(s) || te("Cannot " + i);
|
|
17
|
-
var t = (s, e, i) => (se(s, e, "read from private field"), i ? i.call(s) : e.get(s)), r = (s, e, i) => e.has(s) ? te("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, i), a = (s, e, i, h) => (se(s, e, "write to private field"), h ? h.call(s, i) : e.set(s, i), i);
|
|
18
|
-
import { RESIZE_ORDER as ye, TICK_ORDER as xe } from "../order/index.js";
|
|
19
|
-
import { windowResizer as re } from "../window-resizer/index.js";
|
|
20
|
-
import { ticker as ae } from "../ticker/index.js";
|
|
21
|
-
import { g as oe } from "../dom-0S_WDL4g.js";
|
|
22
|
-
import { Mesh as q, OrthographicCamera as X, PerspectiveCamera as he, Scene as we, Vector2 as pe, Raycaster as De, REVISION as Re, WebGLRenderer as ve, Vector3 as J } from "three";
|
|
23
|
-
import { LayoutBox as ne } from "../layout-box/index.js";
|
|
24
|
-
function ze(s) {
|
|
25
|
-
const e = (i) => {
|
|
26
|
-
i.dispose();
|
|
27
|
-
for (const h of Object.keys(i)) {
|
|
28
|
-
const n = i[h];
|
|
29
|
-
n && typeof n == "object" && "minFilter" in n && n.dispose();
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
s.traverse((i) => {
|
|
33
|
-
if (i instanceof q) {
|
|
34
|
-
if (i.geometry.dispose(), !Array.isArray(i.material) && i.material.isMaterial)
|
|
35
|
-
e(i.material);
|
|
36
|
-
else if (Array.isArray(i.material))
|
|
37
|
-
for (const h of i.material) e(h);
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
var S, o, L, p, x, P, D, R;
|
|
42
|
-
class ce {
|
|
43
|
-
constructor(e, i) {
|
|
44
|
-
r(this, S);
|
|
45
|
-
r(this, o);
|
|
46
|
-
r(this, L);
|
|
47
|
-
r(this, p);
|
|
48
|
-
r(this, x);
|
|
49
|
-
r(this, P);
|
|
50
|
-
r(this, D);
|
|
51
|
-
r(this, R);
|
|
52
|
-
a(this, S, e), a(this, o, (i == null ? void 0 : i.cameraType) === "orthographic" ? new X() : new he()), a(this, L, new we()), a(this, p, []), a(this, x, (i == null ? void 0 : i.cameraDistance) || 1e3), t(this, o).near = (i == null ? void 0 : i.cameraNear) || 1, t(this, o).far = (i == null ? void 0 : i.cameraFar) || 11e3, a(this, P, (i == null ? void 0 : i.cameraFov) || "auto"), t(this, o).position.z = t(this, x), t(this, o).name = `Cameras.${t(this, S)}`, a(this, D, oe(i == null ? void 0 : i.sizeElement) || document.documentElement), this.beforeRenderCallback = i == null ? void 0 : i.beforeRender, a(this, R, new ne(t(this, D))), t(this, R).onResize(() => {
|
|
53
|
-
this.resize();
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
get name() {
|
|
57
|
-
return t(this, S);
|
|
58
|
-
}
|
|
59
|
-
get camera() {
|
|
60
|
-
return t(this, o);
|
|
61
|
-
}
|
|
62
|
-
get scene() {
|
|
63
|
-
return t(this, L);
|
|
64
|
-
}
|
|
65
|
-
get box() {
|
|
66
|
-
return t(this, R);
|
|
67
|
-
}
|
|
68
|
-
get cameraDistance() {
|
|
69
|
-
return t(this, x);
|
|
70
|
-
}
|
|
71
|
-
set cameraDistance(e) {
|
|
72
|
-
a(this, x, e), this.resize();
|
|
73
|
-
}
|
|
74
|
-
get sizeElement() {
|
|
75
|
-
return t(this, D);
|
|
76
|
-
}
|
|
77
|
-
get isClipped() {
|
|
78
|
-
return t(this, D) !== u.containerElement;
|
|
79
|
-
}
|
|
80
|
-
resize() {
|
|
81
|
-
const { width: e, height: i } = t(this, R);
|
|
82
|
-
t(this, o).userData.controlled || (t(this, o).position.z = t(this, x)), t(this, o) instanceof he ? (t(this, o).aspect = e / i, t(this, o).fov = t(this, P) === "auto" ? 2 * Math.atan(i / 2 / t(this, x)) * (180 / Math.PI) : t(this, o).userData.controlled ? t(this, o).fov : t(this, P)) : t(this, o) instanceof X && (t(this, o).left = e / -2, t(this, o).right = e / 2, t(this, o).top = i / 2, t(this, o).bottom = i / -2), t(this, o).updateProjectionMatrix();
|
|
83
|
-
}
|
|
84
|
-
destroy() {
|
|
85
|
-
t(this, p).forEach((e) => {
|
|
86
|
-
e.userData.box.destroy();
|
|
87
|
-
}), t(this, L).clear(), ze(t(this, L)), u.destroyView(this.name), t(this, R).destroy();
|
|
88
|
-
}
|
|
89
|
-
attachToHTMLElement(e, i, h) {
|
|
90
|
-
const n = new ne(e, ie(k({}, h), {
|
|
91
|
-
containerElement: t(this, D),
|
|
92
|
-
cartesian: !0,
|
|
93
|
-
scrollStep: !this.isClipped
|
|
94
|
-
}));
|
|
95
|
-
return n.bindObject(i), i.userData.box = n, t(this, p).push(i), i;
|
|
96
|
-
}
|
|
97
|
-
detachFromHTMLElement(e) {
|
|
98
|
-
a(this, p, t(this, p).filter((i) => i === e ? (e.userData.box.destroy(), !1) : !0));
|
|
99
|
-
}
|
|
100
|
-
add(...e) {
|
|
101
|
-
const i = e[0], h = e[1], n = e[2];
|
|
102
|
-
return h && this.attachToHTMLElement(h, i, n), this.scene.add(i), i;
|
|
103
|
-
}
|
|
104
|
-
remove(e, i) {
|
|
105
|
-
this.scene.remove(e), i && this.detachFromHTMLElement(e);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
S = new WeakMap(), o = new WeakMap(), L = new WeakMap(), p = new WeakMap(), x = new WeakMap(), P = new WeakMap(), D = new WeakMap(), R = new WeakMap();
|
|
109
|
-
var H, A, F, v, I;
|
|
110
|
-
class Le {
|
|
111
|
-
constructor(e) {
|
|
112
|
-
r(this, H);
|
|
113
|
-
r(this, A);
|
|
114
|
-
r(this, F);
|
|
115
|
-
r(this, v);
|
|
116
|
-
r(this, I);
|
|
117
|
-
a(this, H, e.targetName || void 0), a(this, A, e.eventDispatcher || e.object3D), a(this, F, e.propagation || !1), a(this, v, e.object3D), a(this, I, t(this, H) ? () => t(this, v).getObjectByName(t(this, H)) || t(this, v) : () => t(this, v));
|
|
118
|
-
}
|
|
119
|
-
get object3D() {
|
|
120
|
-
return t(this, v);
|
|
121
|
-
}
|
|
122
|
-
get eventDispatcher() {
|
|
123
|
-
return t(this, A);
|
|
124
|
-
}
|
|
125
|
-
get propagation() {
|
|
126
|
-
return t(this, F);
|
|
127
|
-
}
|
|
128
|
-
get target() {
|
|
129
|
-
return t(this, I).call(this);
|
|
130
|
-
}
|
|
131
|
-
dispatch(e, i) {
|
|
132
|
-
this.eventDispatcher.dispatchEvent(k({
|
|
133
|
-
originalEvent: i,
|
|
134
|
-
type: e
|
|
135
|
-
}, this.intersection));
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
H = new WeakMap(), A = new WeakMap(), F = new WeakMap(), v = new WeakMap(), I = new WeakMap();
|
|
139
|
-
var b, d, O, N, W, Y, _;
|
|
140
|
-
class Te {
|
|
141
|
-
constructor() {
|
|
142
|
-
r(this, b, []);
|
|
143
|
-
r(this, d, []);
|
|
144
|
-
r(this, O, new pe());
|
|
145
|
-
r(this, N, new De());
|
|
146
|
-
r(this, W, (e) => {
|
|
147
|
-
for (let i = 0; i < t(this, d).length; i++)
|
|
148
|
-
t(this, d)[i].dispatch("pointerDown", e);
|
|
149
|
-
});
|
|
150
|
-
r(this, Y, (e) => {
|
|
151
|
-
for (let i = 0; i < t(this, d).length; i++)
|
|
152
|
-
t(this, d)[i].dispatch("pointerUp", e);
|
|
153
|
-
});
|
|
154
|
-
r(this, _, (e) => {
|
|
155
|
-
if (!t(this, b).length)
|
|
156
|
-
return;
|
|
157
|
-
t(this, O).x = e.clientX / u.width * 2 - 1, t(this, O).y = -(e.clientY / u.height) * 2 + 1, u.camera && t(this, N).setFromCamera(t(this, O), u.camera);
|
|
158
|
-
const i = [];
|
|
159
|
-
for (const c of t(this, b)) {
|
|
160
|
-
const m = t(this, N).intersectObject(c.target);
|
|
161
|
-
m.length && (c.intersection = m[0], i.push(c));
|
|
162
|
-
}
|
|
163
|
-
let h = !1;
|
|
164
|
-
const n = t(this, d).filter(
|
|
165
|
-
(c) => !i.find((m) => m.object3D.uuid === c.object3D.uuid)
|
|
166
|
-
), E = i.sort(
|
|
167
|
-
(c, m) => m.object3D.position.z - c.object3D.position.z
|
|
168
|
-
).filter((c, m) => h ? (n.push(c), !1) : (h = !c.propagation, !0)), w = E.filter(
|
|
169
|
-
(c) => !t(this, d).find((m) => m.object3D.uuid === c.object3D.uuid)
|
|
170
|
-
);
|
|
171
|
-
for (let c = 0; c < n.length; c++)
|
|
172
|
-
n[c].dispatch("pointerLeave", e);
|
|
173
|
-
for (let c = 0; c < w.length; c++)
|
|
174
|
-
w[c].dispatch("pointerEnter", e);
|
|
175
|
-
a(this, d, E);
|
|
176
|
-
for (let c = 0; c < t(this, d).length; c++)
|
|
177
|
-
t(this, d)[c].dispatch("pointerMove", e);
|
|
178
|
-
});
|
|
179
|
-
u.containerElement.addEventListener(
|
|
180
|
-
"pointerdown",
|
|
181
|
-
t(this, W)
|
|
182
|
-
), u.containerElement.addEventListener("pointerup", t(this, Y)), u.containerElement.addEventListener(
|
|
183
|
-
"pointermove",
|
|
184
|
-
t(this, _)
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
destroy() {
|
|
188
|
-
u.containerElement.removeEventListener(
|
|
189
|
-
"pointerdown",
|
|
190
|
-
t(this, W)
|
|
191
|
-
), u.containerElement.removeEventListener(
|
|
192
|
-
"pointerup",
|
|
193
|
-
t(this, Y)
|
|
194
|
-
), u.containerElement.removeEventListener(
|
|
195
|
-
"pointermove",
|
|
196
|
-
t(this, _)
|
|
197
|
-
), a(this, b, []), a(this, d, []);
|
|
198
|
-
}
|
|
199
|
-
add(e, i) {
|
|
200
|
-
if (t(this, b).find((n) => n.object3D.uuid === e.uuid))
|
|
201
|
-
return;
|
|
202
|
-
const h = new Le(k({
|
|
203
|
-
object3D: e
|
|
204
|
-
}, i));
|
|
205
|
-
t(this, b).push(h);
|
|
206
|
-
}
|
|
207
|
-
remove(e) {
|
|
208
|
-
a(this, b, t(this, b).filter(
|
|
209
|
-
(i) => i.object3D.uuid !== e.uuid
|
|
210
|
-
)), a(this, d, t(this, d).filter((i) => i.object3D.uuid !== e.uuid));
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
b = new WeakMap(), d = new WeakMap(), O = new WeakMap(), N = new WeakMap(), W = new WeakMap(), Y = new WeakMap(), _ = new WeakMap();
|
|
214
|
-
var U, y, l, j, f, T, V, M, $, C, Z, g, B, G;
|
|
215
|
-
class Ve {
|
|
216
|
-
constructor() {
|
|
217
|
-
r(this, U, `https://unpkg.com/three@0.${Re}.x`);
|
|
218
|
-
r(this, y, null);
|
|
219
|
-
r(this, l, null);
|
|
220
|
-
r(this, j, null);
|
|
221
|
-
r(this, f, /* @__PURE__ */ new Map());
|
|
222
|
-
r(this, T, 0);
|
|
223
|
-
r(this, V, 0);
|
|
224
|
-
r(this, M, 0);
|
|
225
|
-
r(this, $, 2);
|
|
226
|
-
r(this, C, !1);
|
|
227
|
-
r(this, Z, !1);
|
|
228
|
-
r(this, g, null);
|
|
229
|
-
r(this, B, () => {
|
|
230
|
-
a(this, T, t(this, y).clientWidth), a(this, V, t(this, y).clientHeight), a(this, M, Math.min(t(this, $), devicePixelRatio || 1)), t(this, l).setPixelRatio(t(this, M)), t(this, l).setSize(t(this, T), t(this, V)), t(this, g) && (t(this, g).setPixelRatio(t(this, M)), t(this, g).setSize(t(this, T), t(this, V)));
|
|
231
|
-
});
|
|
232
|
-
r(this, G, () => {
|
|
233
|
-
t(this, l).setRenderTarget(null), t(this, f).forEach((e) => {
|
|
234
|
-
this.render(e);
|
|
235
|
-
});
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
get CDNVersion() {
|
|
239
|
-
return t(this, U);
|
|
240
|
-
}
|
|
241
|
-
get containerElement() {
|
|
242
|
-
return t(this, y);
|
|
243
|
-
}
|
|
244
|
-
get webglRenderer() {
|
|
245
|
-
return t(this, l);
|
|
246
|
-
}
|
|
247
|
-
get raycaster() {
|
|
248
|
-
return t(this, j);
|
|
249
|
-
}
|
|
250
|
-
get views() {
|
|
251
|
-
return t(this, f);
|
|
252
|
-
}
|
|
253
|
-
get view() {
|
|
254
|
-
return this.getView("default");
|
|
255
|
-
}
|
|
256
|
-
get camera() {
|
|
257
|
-
return this.getView("default").camera;
|
|
258
|
-
}
|
|
259
|
-
get scene() {
|
|
260
|
-
return this.getView("default").scene;
|
|
261
|
-
}
|
|
262
|
-
get width() {
|
|
263
|
-
return t(this, T);
|
|
264
|
-
}
|
|
265
|
-
get height() {
|
|
266
|
-
return t(this, V);
|
|
267
|
-
}
|
|
268
|
-
get pixelRatio() {
|
|
269
|
-
return t(this, M);
|
|
270
|
-
}
|
|
271
|
-
get composer() {
|
|
272
|
-
return t(this, g);
|
|
273
|
-
}
|
|
274
|
-
setup(e) {
|
|
275
|
-
if (t(this, C)) {
|
|
276
|
-
console.warn("[en3.setup]: You are trying to setup en3 again.");
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
a(this, y, oe(e == null ? void 0 : e.containerElement) || document.body), a(this, $, (e == null ? void 0 : e.maxPixelRatio) || 2), a(this, l, new ve(e == null ? void 0 : e.webGLRendererParameters)), t(this, l).domElement.style.cssText = `
|
|
280
|
-
position: fixed;
|
|
281
|
-
left: 0;
|
|
282
|
-
top: 0;
|
|
283
|
-
width: 100%;
|
|
284
|
-
height: 100%;
|
|
285
|
-
z-index: ${(e == null ? void 0 : e.zIndex) || 0};
|
|
286
|
-
`, (t(this, y).shadowRoot || t(this, y)).append(t(this, l).domElement), t(this, f).set(
|
|
287
|
-
"default",
|
|
288
|
-
new ce("default", k({
|
|
289
|
-
sizeElement: t(this, y)
|
|
290
|
-
}, e == null ? void 0 : e.view))
|
|
291
|
-
), a(this, j, new Te()), e != null && e.composer && (a(this, g, new e.composer(t(this, l))), this.render = () => {
|
|
292
|
-
t(this, g).render();
|
|
293
|
-
}), a(this, C, !0), re.subscribe(t(this, B), ye.EN3), ae.subscribe(t(this, G), { order: xe.EN3 });
|
|
294
|
-
}
|
|
295
|
-
destroy() {
|
|
296
|
-
if (!t(this, C)) {
|
|
297
|
-
console.warn(
|
|
298
|
-
"[en3.setup]: You are trying to destory en3 but it has not been initialized."
|
|
299
|
-
);
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
re.unsubscribe(t(this, B)), ae.unsubscribe(t(this, G)), t(this, j).destroy(), t(this, f).forEach((e) => {
|
|
303
|
-
e.destroy();
|
|
304
|
-
}), t(this, l).dispose(), t(this, l).domElement.remove(), a(this, l, null), t(this, g).dispose(), a(this, g, null), a(this, C, !1);
|
|
305
|
-
}
|
|
306
|
-
createView(e, i) {
|
|
307
|
-
const h = t(this, f).size, n = new ce(e, i);
|
|
308
|
-
return t(this, f).set(e, n), h === 1 && t(this, l).setScissorTest(!0), n;
|
|
309
|
-
}
|
|
310
|
-
getView(e) {
|
|
311
|
-
return t(this, f).get(e);
|
|
312
|
-
}
|
|
313
|
-
destroyView(e) {
|
|
314
|
-
const i = t(this, f).get(e);
|
|
315
|
-
i && (t(this, f).delete(e), i.destroy(), t(this, f).size <= 1 && t(this, l).setScissorTest(!1));
|
|
316
|
-
}
|
|
317
|
-
render(e) {
|
|
318
|
-
var i;
|
|
319
|
-
if (t(this, f).size > 1 || this.view.isClipped) {
|
|
320
|
-
const h = e.box.left + e.box.CSSTranslation.x + e.box.scrollValue.x, n = u.height - e.box.height - e.box.top + e.box.CSSTranslation.y + e.box.scrollValue.y * -1;
|
|
321
|
-
t(this, l).setScissor(h, n, e.box.width, e.box.height), t(this, l).setViewport(
|
|
322
|
-
h,
|
|
323
|
-
n,
|
|
324
|
-
e.box.width,
|
|
325
|
-
e.box.height
|
|
326
|
-
);
|
|
327
|
-
}
|
|
328
|
-
(i = e.beforeRenderCallback) == null || i.call(e), t(this, l).render(e.scene, e.camera);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
U = new WeakMap(), y = new WeakMap(), l = new WeakMap(), j = new WeakMap(), f = new WeakMap(), T = new WeakMap(), V = new WeakMap(), M = new WeakMap(), $ = new WeakMap(), C = new WeakMap(), Z = new WeakMap(), g = new WeakMap(), B = new WeakMap(), G = new WeakMap();
|
|
332
|
-
const u = new Ve();
|
|
333
|
-
function Ae(s, e, i) {
|
|
334
|
-
const h = e.x, n = e.y, z = i || s.image.width / s.image.height;
|
|
335
|
-
let E = 0, w = 0, c = s.offset.x, m = s.offset.y, le = s.rotation, de = s.center.x, ue = s.center.y;
|
|
336
|
-
h / n > z ? (E = 1, w = n / h * z) : (w = 1, E = h / n / z), s.matrix.setUvTransform(c, m, E, w, le, de, ue);
|
|
337
|
-
}
|
|
338
|
-
const K = new J(), Me = new J();
|
|
339
|
-
function Fe(s, e = "default") {
|
|
340
|
-
const i = u.getView(e), { width: h, height: n } = u, z = h / n;
|
|
341
|
-
s instanceof J ? K.copy(s) : K.set(...s);
|
|
342
|
-
const E = i.camera.getWorldPosition(Me).distanceTo(K);
|
|
343
|
-
if (i.camera instanceof X)
|
|
344
|
-
return {
|
|
345
|
-
width: h / i.camera.zoom,
|
|
346
|
-
height: n / i.camera.zoom,
|
|
347
|
-
factor: 1,
|
|
348
|
-
distance: E,
|
|
349
|
-
aspect: z
|
|
350
|
-
};
|
|
351
|
-
{
|
|
352
|
-
const w = i.camera.fov * Math.PI / 180, c = 2 * Math.tan(w / 2) * E, m = c * (h / n);
|
|
353
|
-
return { width: m, height: c, factor: h / m, distance: E, aspect: z };
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
function Ie(s, e) {
|
|
357
|
-
s.traverse((i) => {
|
|
358
|
-
i instanceof q && i.material && (Array.isArray(i.material) ? i.material : [i.material]).forEach(e);
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
function Ne(s, e) {
|
|
362
|
-
s.traverse((i) => {
|
|
363
|
-
i instanceof q && e(i);
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
export {
|
|
367
|
-
ce as En3View,
|
|
368
|
-
Ae as coverTexture,
|
|
369
|
-
ze as dispose,
|
|
370
|
-
u as en3,
|
|
371
|
-
Fe as getCurrentViewport,
|
|
372
|
-
Ie as traverseMaterials,
|
|
373
|
-
Ne as traverseMeshes
|
|
374
|
-
};
|
package/lib/file-BEr-o55N.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
function c(n) {
|
|
2
|
-
n.dispatchEvent(
|
|
3
|
-
new CustomEvent("sizeChange", {
|
|
4
|
-
bubbles: !0,
|
|
5
|
-
composed: !0
|
|
6
|
-
})
|
|
7
|
-
);
|
|
8
|
-
}
|
|
9
|
-
function s(n) {
|
|
10
|
-
n.dispatchEvent(
|
|
11
|
-
new CustomEvent("beforeSizeChange", {
|
|
12
|
-
bubbles: !0,
|
|
13
|
-
composed: !0
|
|
14
|
-
})
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
function i(n, t) {
|
|
18
|
-
const o = new Blob([JSON.stringify(t)], { type: "application/json" }), e = document.createElement("a");
|
|
19
|
-
e.download = n + ".json", e.href = window.URL.createObjectURL(o), e.dataset.downloadurl = ["application/json", e.download, e.href].join(":");
|
|
20
|
-
const a = new MouseEvent("click", {
|
|
21
|
-
view: window,
|
|
22
|
-
bubbles: !0,
|
|
23
|
-
cancelable: !0
|
|
24
|
-
});
|
|
25
|
-
e.dispatchEvent(a), e.remove();
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
s as a,
|
|
29
|
-
i as c,
|
|
30
|
-
c as d
|
|
31
|
-
};
|
package/lib/file-C9BbxzVU.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function i(n){n.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}function c(n){n.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}function s(n,t){const o=new Blob([JSON.stringify(t)],{type:"application/json"}),e=document.createElement("a");e.download=n+".json",e.href=window.URL.createObjectURL(o),e.dataset.downloadurl=["application/json",e.download,e.href].join(":");const a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(a),e.remove()}exports.createJSONAndSave=s;exports.dispatchBeforeSizeChangeEvent=c;exports.dispatchSizeChangeEvent=i;
|
package/lib/morph/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var it=(s,t)=>(t=Symbol[s])?t:Symbol.for("Symbol."+s),st=s=>{throw TypeError(s)};var _=(s,t,i)=>t.has(s)||st("Cannot "+i);var e=(s,t,i)=>(_(s,t,"read from private field"),i?i.call(s):t.get(s)),o=(s,t,i)=>t.has(s)?st("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),c=(s,t,i,r)=>(_(s,t,"write to private field"),r?r.call(s,i):t.set(s,i),i),m=(s,t,i)=>(_(s,t,"access private method"),i);var k=(s,t,i)=>new Promise((r,n)=>{var d=u=>{try{p(i.next(u))}catch(E){n(E)}},g=u=>{try{p(i.throw(u))}catch(E){n(E)}},p=u=>u.done?r(u.value):Promise.resolve(u.value).then(d,g);p((i=i.apply(s,t)).next())});var nt=(s,t,i)=>(t=s[it("asyncIterator")])?t.call(s):(s=s[it("iterator")](),t={},i=(r,n)=>(n=s[r])&&(t[r]=d=>new Promise((g,p,u)=>(d=n.call(s,d),u=d.done,Promise.resolve(d.value).then(E=>g({value:E,done:u}),p)))),i("next"),i("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const rt=require("../notifier/index.cjs"),lt=require("../browser-CpzFX2xg.cjs"),G=require("../url-C3dWnJQg.cjs");var y,h,f,C,A,S,M;class ut{constructor(t,i){o(this,y);o(this,h);o(this,f);o(this,C);o(this,A);o(this,S,t=>{t.preventDefault(),e(this,y).links.forEach(i=>{var r;e(this,f)===e(i,f)||(r=e(i,A))!=null&&r.includes(e(this,f))?e(i,h).classList.add("clicked"):e(i,h).classList.remove("clicked")}),e(this,y).navigate(e(this,f),e(this,C))});o(this,M,()=>{e(this,y).prefetch(e(this,f)),e(this,h).removeEventListener("pointerenter",e(this,M))});var d,g;c(this,y,i),c(this,h,t),c(this,f,e(this,h).getAttribute("href")||"/"),c(this,C,e(this,h).getAttribute("data-history-action")||"push"),e(this,h).addEventListener("click",e(this,S));const r=i.normalizePath(e(this,f)),n=i.normalizePath(location.pathname);c(this,A,(d=e(this,h).getAttribute("data-match-paths"))==null?void 0:d.split(",").map(p=>i.normalizePath(p.trim()).pathname)),e(this,h).hasAttribute("data-include")?n.pathname.includes(r.pathname)&&e(this,h).classList.add("current"):r.pathname===n.pathname||(g=e(this,A))!=null&&g.includes(n.pathname)?(e(this,h).classList.add("current"),e(this,h).classList.add("clicked")):e(this,h).classList.remove("clicked"),e(this,h).hasAttribute("data-prefetch")&&e(this,h).addEventListener("pointerenter",e(this,M))}destroy(){e(this,h).removeEventListener("click",e(this,S)),e(this,h).removeEventListener("pointerenter",e(this,M)),e(this,h).classList.remove("current")}}y=new WeakMap,h=new WeakMap,f=new WeakMap,C=new WeakMap,A=new WeakMap,S=new WeakMap,M=new WeakMap;var H,z,q,x,N,B,P,L,w,D,R,l,J,Q,U,at,V,W;class dt{constructor(t){o(this,l);o(this,H,null);o(this,z,null);o(this,q,null);o(this,x,null);o(this,N,[]);o(this,B,new DOMParser);o(this,P,new Map);o(this,L);o(this,w,null);o(this,D,new rt.Notifier);o(this,R,new rt.Notifier);o(this,W,t=>{t.state&&this.navigate(t.state,"none")});if(lt.isBrowser){t!=null&&t.base?c(this,H,G.normalizeBase(t.base)):c(this,H,"/"),c(this,z,(t==null?void 0:t.waitForHeadToLoad)!==!1),c(this,q,(t==null?void 0:t.cachePages)!==!1),c(this,x,m(this,l,U).call(this,document.body));const i=this.normalizePath(location.pathname);c(this,w,i.pathname),document.documentElement.setAttribute("data-current-pathname",e(this,w)),document.documentElement.setAttribute("data-current-leaf",i.leaf),m(this,l,Q).call(this),addEventListener("popstate",e(this,W))}}get currentPathname(){return e(this,w)}get links(){return e(this,N)}normalizePath(t){return G.splitPath(t,e(this,H))}beforeNavigationEvent(t){return e(this,D).subscribe(t)}afterNavigationEvent(t){return e(this,R).subscribe(t)}prefetch(t){return k(this,null,function*(){const i=this.normalizePath(t);return m(this,l,J).call(this,i.pathname)})}navigate(t,i="push"){return k(this,null,function*(){var E;const r=this.normalizePath(t);let{pathname:n,hash:d,parameters:g,leaf:p}=r;if(e(this,L)===n||e(this,w)===n)return;c(this,L,n);const u=e(this,P).has(n);try{let F=!0;if(e(this,D).notify({pathname:n,isCached:u}),this.preprocessor)try{yield new Promise((a,b)=>{var v;(v=this.preprocessor)==null||v.call(this,{pathname:n,resolve:a,reject:b,isCached:u})})}catch(a){a?console.error(a):console.log("Route change canceled"),F=!1}if(!F||e(this,L)!==n)return;const X=e(this,P).get(n)||(yield m(this,l,J).call(this,n));if(e(this,L)!==n)return;const Z=Array.from(document.head.children),$=Array.from(X.head.cloneNode(!0).children),tt=m(this,l,at).call(this,Z,$),ot=m(this,l,V).call(this,Z,tt),I=m(this,l,V).call(this,$,tt);I.forEach((a,b)=>{if(a.tagName==="SCRIPT"&&a.getAttribute("src")){const v=document.createElement("script");v.type="module",v.src=a.getAttribute("src"),I[b]=v}}),I.forEach(a=>{document.head.appendChild(a)});const j=I.filter(a=>(a.tagName==="STYLE"||a.tagName==="SCRIPT"||a.tagName==="LINK")&&a.getAttribute("rel")!=="canonical");e(this,z)&&j.length&&(yield new Promise(a=>k(this,null,function*(){let b=0;try{for(var v=nt(j),ct,K,O;ct=!(K=yield v.next()).done;ct=!1){const T=K.value;T.onload=()=>{b++,b===j.length&&a()}}}catch(K){O=[K]}finally{try{ct&&(K=v.return)&&(yield K.call(v))}finally{if(O)throw O[0]}}}))),ot.forEach(a=>{a.hasAttribute("data-permanent")||a.remove()}),c(this,w,n),G.changeHistory(i,n,g,d);const ht=m(this,l,U).call(this,X.body.cloneNode(!0));e(this,x).forEach((a,b)=>{const v=ht[b];let ct=[...a.childNodes],K=[...v.childNodes];ct.forEach(O=>{if(O instanceof HTMLElement){const T=O.getAttribute("data-remain");let et;K=K.filter(Y=>Y instanceof HTMLElement&&T&&Y.getAttribute("data-remain")===T?(et=Y,!1):!0),T&&et||O.remove()}else O.remove()}),a.append(...K)}),m(this,l,Q).call(this),document.documentElement.setAttribute("data-current-pathname",n),document.documentElement.setAttribute("data-current-leaf",p),(E=this.postprocessor)==null||E.call(this,{pathname:n,isCached:u}),e(this,R).notify({pathname:n,isCached:u})}catch(F){console.error(F)}c(this,L,void 0)})}}H=new WeakMap,z=new WeakMap,q=new WeakMap,x=new WeakMap,N=new WeakMap,B=new WeakMap,P=new WeakMap,L=new WeakMap,w=new WeakMap,D=new WeakMap,R=new WeakMap,l=new WeakSet,J=function(t){return k(this,null,function*(){const i=e(this,P).get(t);if(i)return i;const n=yield(yield fetch(t)).text(),d=e(this,B).parseFromString(n,"text/html");return e(this,q)&&e(this,P).set(t,d),d})},Q=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(i=>{var r;return(r=i.getAttribute("href"))==null?void 0:r.startsWith("/")});e(this,N).forEach(i=>i.destroy()),c(this,N,t.map(i=>new ut(i,this)))},U=function(t){return[...t.querySelectorAll("[data-morph]")]},at=function(t,i){return t.filter(r=>i.find(n=>n.outerHTML===r.outerHTML))},V=function(t,i){return t.filter(r=>!i.find(n=>n.outerHTML===r.outerHTML))},W=new WeakMap;exports.Morph=dt;
|
package/lib/morph/index.js
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
var et = (s, t) => (t = Symbol[s]) ? t : Symbol.for("Symbol." + s), it = (s) => {
|
|
2
|
-
throw TypeError(s);
|
|
3
|
-
};
|
|
4
|
-
var G = (s, t, i) => t.has(s) || it("Cannot " + i);
|
|
5
|
-
var e = (s, t, i) => (G(s, t, "read from private field"), i ? i.call(s) : t.get(s)), o = (s, t, i) => t.has(s) ? it("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, i), c = (s, t, i, a) => (G(s, t, "write to private field"), a ? a.call(s, i) : t.set(s, i), i), m = (s, t, i) => (G(s, t, "access private method"), i);
|
|
6
|
-
var k = (s, t, i) => new Promise((a, n) => {
|
|
7
|
-
var d = (u) => {
|
|
8
|
-
try {
|
|
9
|
-
p(i.next(u));
|
|
10
|
-
} catch (E) {
|
|
11
|
-
n(E);
|
|
12
|
-
}
|
|
13
|
-
}, g = (u) => {
|
|
14
|
-
try {
|
|
15
|
-
p(i.throw(u));
|
|
16
|
-
} catch (E) {
|
|
17
|
-
n(E);
|
|
18
|
-
}
|
|
19
|
-
}, p = (u) => u.done ? a(u.value) : Promise.resolve(u.value).then(d, g);
|
|
20
|
-
p((i = i.apply(s, t)).next());
|
|
21
|
-
});
|
|
22
|
-
var st = (s, t, i) => (t = s[et("asyncIterator")]) ? t.call(s) : (s = s[et("iterator")](), t = {}, i = (a, n) => (n = s[a]) && (t[a] = (d) => new Promise((g, p, u) => (d = n.call(s, d), u = d.done, Promise.resolve(d.value).then((E) => g({ value: E, done: u }), p)))), i("next"), i("return"), t);
|
|
23
|
-
import { Notifier as nt } from "../notifier/index.js";
|
|
24
|
-
import { i as ct } from "../browser-0zX67oeU.js";
|
|
25
|
-
import { n as lt, s as ut, c as dt } from "../url-DMNfW7uN.js";
|
|
26
|
-
var A, h, f, C, y, z, H;
|
|
27
|
-
class mt {
|
|
28
|
-
constructor(t, i) {
|
|
29
|
-
o(this, A);
|
|
30
|
-
o(this, h);
|
|
31
|
-
o(this, f);
|
|
32
|
-
o(this, C);
|
|
33
|
-
o(this, y);
|
|
34
|
-
o(this, z, (t) => {
|
|
35
|
-
t.preventDefault(), e(this, A).links.forEach((i) => {
|
|
36
|
-
var a;
|
|
37
|
-
e(this, f) === e(i, f) || (a = e(i, y)) != null && a.includes(e(this, f)) ? e(i, h).classList.add("clicked") : e(i, h).classList.remove("clicked");
|
|
38
|
-
}), e(this, A).navigate(e(this, f), e(this, C));
|
|
39
|
-
});
|
|
40
|
-
o(this, H, () => {
|
|
41
|
-
e(this, A).prefetch(e(this, f)), e(this, h).removeEventListener("pointerenter", e(this, H));
|
|
42
|
-
});
|
|
43
|
-
var d, g;
|
|
44
|
-
c(this, A, i), c(this, h, t), c(this, f, e(this, h).getAttribute("href") || "/"), c(this, C, e(this, h).getAttribute(
|
|
45
|
-
"data-history-action"
|
|
46
|
-
) || "push"), e(this, h).addEventListener("click", e(this, z));
|
|
47
|
-
const a = i.normalizePath(e(this, f)), n = i.normalizePath(location.pathname);
|
|
48
|
-
c(this, y, (d = e(this, h).getAttribute("data-match-paths")) == null ? void 0 : d.split(",").map((p) => i.normalizePath(p.trim()).pathname)), e(this, h).hasAttribute("data-include") ? n.pathname.includes(a.pathname) && e(this, h).classList.add("current") : a.pathname === n.pathname || (g = e(this, y)) != null && g.includes(n.pathname) ? (e(this, h).classList.add("current"), e(this, h).classList.add("clicked")) : e(this, h).classList.remove("clicked"), e(this, h).hasAttribute("data-prefetch") && e(this, h).addEventListener("pointerenter", e(this, H));
|
|
49
|
-
}
|
|
50
|
-
destroy() {
|
|
51
|
-
e(this, h).removeEventListener("click", e(this, z)), e(this, h).removeEventListener("pointerenter", e(this, H)), e(this, h).classList.remove("current");
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
A = new WeakMap(), h = new WeakMap(), f = new WeakMap(), C = new WeakMap(), y = new WeakMap(), z = new WeakMap(), H = new WeakMap();
|
|
55
|
-
var M, S, x, D, N, O, P, b, w, R, F, l, J, Q, U, at, V, W;
|
|
56
|
-
class Lt {
|
|
57
|
-
constructor(t) {
|
|
58
|
-
o(this, l);
|
|
59
|
-
o(this, M, null);
|
|
60
|
-
o(this, S, null);
|
|
61
|
-
o(this, x, null);
|
|
62
|
-
o(this, D, null);
|
|
63
|
-
o(this, N, []);
|
|
64
|
-
o(this, O, new DOMParser());
|
|
65
|
-
o(this, P, /* @__PURE__ */ new Map());
|
|
66
|
-
o(this, b);
|
|
67
|
-
o(this, w, null);
|
|
68
|
-
o(this, R, new nt());
|
|
69
|
-
o(this, F, new nt());
|
|
70
|
-
o(this, W, (t) => {
|
|
71
|
-
t.state && this.navigate(t.state, "none");
|
|
72
|
-
});
|
|
73
|
-
if (ct) {
|
|
74
|
-
t != null && t.base ? c(this, M, lt(t.base)) : c(this, M, "/"), c(this, S, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), c(this, x, (t == null ? void 0 : t.cachePages) !== !1), c(this, D, m(this, l, U).call(this, document.body));
|
|
75
|
-
const i = this.normalizePath(location.pathname);
|
|
76
|
-
c(this, w, i.pathname), document.documentElement.setAttribute(
|
|
77
|
-
"data-current-pathname",
|
|
78
|
-
e(this, w)
|
|
79
|
-
), document.documentElement.setAttribute(
|
|
80
|
-
"data-current-leaf",
|
|
81
|
-
i.leaf
|
|
82
|
-
), m(this, l, Q).call(this), addEventListener("popstate", e(this, W));
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
get currentPathname() {
|
|
86
|
-
return e(this, w);
|
|
87
|
-
}
|
|
88
|
-
get links() {
|
|
89
|
-
return e(this, N);
|
|
90
|
-
}
|
|
91
|
-
normalizePath(t) {
|
|
92
|
-
return ut(t, e(this, M));
|
|
93
|
-
}
|
|
94
|
-
beforeNavigationEvent(t) {
|
|
95
|
-
return e(this, R).subscribe(t);
|
|
96
|
-
}
|
|
97
|
-
afterNavigationEvent(t) {
|
|
98
|
-
return e(this, F).subscribe(t);
|
|
99
|
-
}
|
|
100
|
-
prefetch(t) {
|
|
101
|
-
return k(this, null, function* () {
|
|
102
|
-
const i = this.normalizePath(t);
|
|
103
|
-
return m(this, l, J).call(this, i.pathname);
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
navigate(t, i = "push") {
|
|
107
|
-
return k(this, null, function* () {
|
|
108
|
-
var E;
|
|
109
|
-
const a = this.normalizePath(t);
|
|
110
|
-
let { pathname: n, hash: d, parameters: g, leaf: p } = a;
|
|
111
|
-
if (e(this, b) === n || e(this, w) === n)
|
|
112
|
-
return;
|
|
113
|
-
c(this, b, n);
|
|
114
|
-
const u = e(this, P).has(n);
|
|
115
|
-
try {
|
|
116
|
-
let I = !0;
|
|
117
|
-
if (e(this, R).notify({
|
|
118
|
-
pathname: n,
|
|
119
|
-
isCached: u
|
|
120
|
-
}), this.preprocessor)
|
|
121
|
-
try {
|
|
122
|
-
yield new Promise((r, L) => {
|
|
123
|
-
var v;
|
|
124
|
-
(v = this.preprocessor) == null || v.call(this, { pathname: n, resolve: r, reject: L, isCached: u });
|
|
125
|
-
});
|
|
126
|
-
} catch (r) {
|
|
127
|
-
r ? console.error(r) : console.log("Route change canceled"), I = !1;
|
|
128
|
-
}
|
|
129
|
-
if (!I || e(this, b) !== n)
|
|
130
|
-
return;
|
|
131
|
-
const X = e(this, P).get(n) || (yield m(this, l, J).call(this, n));
|
|
132
|
-
if (e(this, b) !== n)
|
|
133
|
-
return;
|
|
134
|
-
const Z = Array.from(document.head.children), _ = Array.from(
|
|
135
|
-
X.head.cloneNode(!0).children
|
|
136
|
-
), $ = m(this, l, at).call(this, Z, _), rt = m(this, l, V).call(this, Z, $), q = m(this, l, V).call(this, _, $);
|
|
137
|
-
q.forEach((r, L) => {
|
|
138
|
-
if (r.tagName === "SCRIPT" && r.getAttribute("src")) {
|
|
139
|
-
const v = document.createElement("script");
|
|
140
|
-
v.type = "module", v.src = r.getAttribute("src"), q[L] = v;
|
|
141
|
-
}
|
|
142
|
-
}), q.forEach((r) => {
|
|
143
|
-
document.head.appendChild(r);
|
|
144
|
-
});
|
|
145
|
-
const K = q.filter(
|
|
146
|
-
(r) => (r.tagName === "STYLE" || r.tagName === "SCRIPT" || r.tagName === "LINK") && r.getAttribute("rel") !== "canonical"
|
|
147
|
-
);
|
|
148
|
-
e(this, S) && K.length && (yield new Promise((r) => k(this, null, function* () {
|
|
149
|
-
let L = 0;
|
|
150
|
-
try {
|
|
151
|
-
for (var v = st(K), ht, Y, B; ht = !(Y = yield v.next()).done; ht = !1) {
|
|
152
|
-
const T = Y.value;
|
|
153
|
-
T.onload = () => {
|
|
154
|
-
L++, L === K.length && r();
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
} catch (Y) {
|
|
158
|
-
B = [Y];
|
|
159
|
-
} finally {
|
|
160
|
-
try {
|
|
161
|
-
ht && (Y = v.return) && (yield Y.call(v));
|
|
162
|
-
} finally {
|
|
163
|
-
if (B)
|
|
164
|
-
throw B[0];
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}))), rt.forEach((r) => {
|
|
168
|
-
r.hasAttribute("data-permanent") || r.remove();
|
|
169
|
-
}), c(this, w, n), dt(i, n, g, d);
|
|
170
|
-
const ot = m(this, l, U).call(this, X.body.cloneNode(!0));
|
|
171
|
-
e(this, D).forEach((r, L) => {
|
|
172
|
-
const v = ot[L];
|
|
173
|
-
let ht = [...r.childNodes], Y = [...v.childNodes];
|
|
174
|
-
ht.forEach((B) => {
|
|
175
|
-
if (B instanceof HTMLElement) {
|
|
176
|
-
const T = B.getAttribute("data-remain");
|
|
177
|
-
let tt;
|
|
178
|
-
Y = Y.filter(
|
|
179
|
-
(j) => j instanceof HTMLElement && T && j.getAttribute("data-remain") === T ? (tt = j, !1) : !0
|
|
180
|
-
), T && tt || B.remove();
|
|
181
|
-
} else
|
|
182
|
-
B.remove();
|
|
183
|
-
}), r.append(...Y);
|
|
184
|
-
}), m(this, l, Q).call(this), document.documentElement.setAttribute("data-current-pathname", n), document.documentElement.setAttribute("data-current-leaf", p), (E = this.postprocessor) == null || E.call(this, { pathname: n, isCached: u }), e(this, F).notify({ pathname: n, isCached: u });
|
|
185
|
-
} catch (I) {
|
|
186
|
-
console.error(I);
|
|
187
|
-
}
|
|
188
|
-
c(this, b, void 0);
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
M = new WeakMap(), S = new WeakMap(), x = new WeakMap(), D = new WeakMap(), N = new WeakMap(), O = new WeakMap(), P = new WeakMap(), b = new WeakMap(), w = new WeakMap(), R = new WeakMap(), F = new WeakMap(), l = new WeakSet(), J = function(t) {
|
|
193
|
-
return k(this, null, function* () {
|
|
194
|
-
const i = e(this, P).get(t);
|
|
195
|
-
if (i)
|
|
196
|
-
return i;
|
|
197
|
-
const n = yield (yield fetch(t)).text(), d = e(this, O).parseFromString(n, "text/html");
|
|
198
|
-
return e(this, x) && e(this, P).set(t, d), d;
|
|
199
|
-
});
|
|
200
|
-
}, Q = function() {
|
|
201
|
-
const t = [
|
|
202
|
-
...document.documentElement.querySelectorAll("a")
|
|
203
|
-
].filter((i) => {
|
|
204
|
-
var a;
|
|
205
|
-
return (a = i.getAttribute("href")) == null ? void 0 : a.startsWith("/");
|
|
206
|
-
});
|
|
207
|
-
e(this, N).forEach((i) => i.destroy()), c(this, N, t.map((i) => new mt(i, this)));
|
|
208
|
-
}, U = function(t) {
|
|
209
|
-
return [...t.querySelectorAll("[data-morph]")];
|
|
210
|
-
}, at = function(t, i) {
|
|
211
|
-
return t.filter(
|
|
212
|
-
(a) => i.find(
|
|
213
|
-
(n) => n.outerHTML === a.outerHTML
|
|
214
|
-
)
|
|
215
|
-
);
|
|
216
|
-
}, V = function(t, i) {
|
|
217
|
-
return t.filter(
|
|
218
|
-
(a) => !i.find(
|
|
219
|
-
(n) => n.outerHTML === a.outerHTML
|
|
220
|
-
)
|
|
221
|
-
);
|
|
222
|
-
}, W = new WeakMap();
|
|
223
|
-
export {
|
|
224
|
-
Lt as Morph
|
|
225
|
-
};
|
package/lib/object-CCiXnER2.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function s(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function f(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Node)return e;const t=Array.isArray(e)?[]:{};for(const r in e)e.hasOwnProperty(r)&&(t[r]=f(e[r]));return t}function c(e,t,r=s){for(const n in t)r(t[n])?(e[n]||Object.assign(e,{[n]:{}}),c(e[n],t[n],r)):Object.assign(e,{[n]:t[n]});return e}function u(e){return e===null||typeof e=="undefined"}function i(e,t){if(typeof e!=typeof t)return!1;if([e,t].some(r=>u(r)))return e===t;if(Array.isArray(e)){const r=e.length>t.length?e:t,n=e.length>t.length?t:e;return r.every((p,y)=>i(p,n[y]))}if(typeof e!="object"||e instanceof Node||typeof e=="object"&&e.constructor.toString().startsWith("class"))return e===t;for(const r in e){if(!t.hasOwnProperty(r))return!1;if(typeof e[r]=="object"&&typeof t[r]=="object"){if(!i(e[r],t[r]))return!1}else if(e[r]!==t[r])return!1}return!0}function l(e,t){const r={};for(const n in e)t.includes(n)&&(r[n]=e[n]);return r}function o(e,t){const r={};for(const n in e)t.includes(n)||(r[n]=e[n]);return r}function a(e){var t;return typeof e=="function"&&((t=Object.getOwnPropertyDescriptor(e,"prototype"))==null?void 0:t.writable)===!1}function O(e,...t){t.forEach(r=>{Object.getOwnPropertyNames(r.prototype).forEach(n=>{Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(r.prototype,n)||Object.create(null))})})}exports.cloneDeep=f;exports.compareObjects=i;exports.isESClass=a;exports.isNullish=u;exports.isObject=s;exports.mergeDeep=c;exports.mixin=O;exports.omit=o;exports.pick=l;
|