aptechka 0.81.1 → 0.82.1
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-C4tLEBGM.js → Animation-DxtCzFP3.js} +2 -2
- package/lib/{Composed-BB1MtFiT.js → Composed-DtS09lSU.js} +2 -2
- package/lib/{Damped-DVG5nrYV.js → Damped-DMnIOXpC.js} +2 -2
- package/lib/{DerivedArray-D3scYQdp.js → DerivedArray-DG9iR0mf.js} +1 -1
- package/lib/{DragControls-Cm_88cLt.js → DragControls-DCC8iEOR.js} +4 -4
- package/lib/LocalLinks-Bua7BGRF.cjs +1 -0
- package/lib/LocalLinks-TQkTpAMx.js +62 -0
- package/lib/PageAnnouncerElement-C4k2kDJ5.cjs +1 -0
- package/lib/PageAnnouncerElement-sfh0_4vl.js +24 -0
- package/lib/PageScroll-C7QBpx0G.cjs +1 -0
- package/lib/PageScroll-cQ3B5-6N.js +62 -0
- package/lib/SourceElement-BQ7g2KWK.js +260 -0
- package/lib/SourceElement-TzgPNQOd.cjs +5 -0
- package/lib/{Store-BtVtCGLk.js → Store-CgQ3ReoB.js} +1 -1
- package/lib/{Tweened-C1lnK6n9.js → Tweened-lT68VACv.js} +2 -2
- package/lib/{Viewport-DbN_JWBM.js → Viewport-DGnJ31b4.js} +2 -2
- package/lib/accordion/index.js +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.js +3 -3
- package/lib/billboard/index.js +2 -2
- package/lib/cache/Cache.d.ts +8 -0
- package/lib/cache/index.cjs +1 -0
- package/lib/cache/index.d.ts +1 -0
- package/lib/cache/index.js +37 -0
- package/lib/canvas/index.js +2 -2
- package/lib/controls/index.js +1 -1
- package/lib/css-property/index.js +3 -3
- package/lib/css-value-parser/index.js +1 -1
- package/lib/dev/index.js +2 -2
- package/lib/device/index.js +1 -1
- package/lib/{dom-fgxIeFxm.js → dom-BIeVMHfK.js} +2 -2
- package/lib/element-linked-store/index.js +2 -2
- package/lib/element-resizer/index.js +2 -2
- package/lib/en3/index.js +2 -2
- package/lib/history/History.d.ts +10 -0
- package/lib/history/index.cjs +1 -0
- package/lib/history/index.d.ts +1 -0
- package/lib/history/index.js +34 -0
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +3 -3
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +4 -4
- package/lib/{index-JqYHGoo6.js → index-LReFyN6i.js} +1 -1
- package/lib/intersector/index.js +2 -2
- package/lib/jsx/index.js +6 -6
- package/lib/ladder/index.js +2 -2
- package/lib/layout-box/index.js +2 -2
- package/lib/loading/index.js +1 -1
- package/lib/local-links/LocalLinks.d.ts +17 -0
- package/lib/local-links/index.cjs +1 -0
- package/lib/local-links/index.d.ts +1 -0
- package/lib/local-links/index.js +4 -0
- package/lib/masonry-layout/index.js +2 -2
- package/lib/media/index.js +2 -2
- package/lib/metadata-BcYZ5w3T.cjs +1 -0
- package/lib/metadata-jfowcCyz.js +12 -0
- package/lib/morph/Morph.d.ts +2 -1
- package/lib/morph/MorphLink.d.ts +0 -1
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +436 -510
- package/lib/morph-B6sGhLCi.cjs +1 -0
- package/lib/morph-BQErz7qP.js +242 -0
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +4 -4
- package/lib/{object-D6MVWB4l.js → object-CcMK4y_r.js} +12 -10
- package/lib/object-baN9pgbU.cjs +1 -0
- package/lib/page-announcer/PageAnnouncerElement.d.ts +10 -0
- package/lib/page-announcer/index.cjs +1 -0
- package/lib/page-announcer/index.d.ts +1 -0
- package/lib/page-announcer/index.js +4 -0
- package/lib/page-scroll/PageScroll.d.ts +23 -0
- package/lib/page-scroll/index.cjs +1 -0
- package/lib/page-scroll/index.d.ts +1 -0
- package/lib/page-scroll/index.js +4 -0
- package/lib/pixel-perfect/index.js +3 -3
- package/lib/pointer/index.js +4 -4
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +3 -3
- package/lib/radio/index.js +1 -1
- package/lib/{render-CMQbWthg.js → render-CiA0mn5V.js} +3 -3
- package/lib/router/Route.d.ts +1 -2
- package/lib/router/Router.d.ts +18 -23
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.d.ts +1 -1
- package/lib/router/index.js +183 -249
- package/lib/scroll/index.js +8 -8
- package/lib/scroll-entries/index.js +1 -1
- package/lib/{scroll-7JSxRKFK.js → scroll-jcbHDexr.js} +2 -2
- package/lib/scroll-kit/index.js +4 -4
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +3 -3
- package/lib/size-element/index.js +1 -1
- package/lib/slicer/index.js +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +1 -1
- package/lib/spa/SPA.d.ts +29 -0
- package/lib/spa/index.cjs +1 -0
- package/lib/spa/index.d.ts +1 -0
- package/lib/spa/index.js +130 -0
- package/lib/store/index.js +3 -3
- package/lib/{stylesheet-JlRFfJIc.js → stylesheet-DbHOxtjw.js} +1 -1
- package/lib/ticker/index.js +2 -2
- package/lib/url-CPgw9bd5.cjs +1 -0
- package/lib/url-DAl-mgbC.js +97 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +141 -120
- package/lib/utils/morph.d.ts +49 -0
- package/lib/utils/object.d.ts +1 -1
- package/lib/utils/url.d.ts +6 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +3 -3
- package/lib/window-resizer/index.js +1 -1
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +3 -3
- package/package.json +49 -1
- package/lib/SourceElement-BweVAYgJ.js +0 -268
- package/lib/SourceElement-DMS25FM0.cjs +0 -5
- package/lib/object-CCiXnER2.cjs +0 -1
- package/lib/router/Link.d.ts +0 -8
- package/lib/url-BRY7C6vT.cjs +0 -1
- package/lib/url-DQgGZl_e.js +0 -66
package/lib/morph/index.js
CHANGED
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Ee = Object.defineProperty, ve = Object.defineProperties;
|
|
2
|
+
var Le = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var te = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var ee = (h, e) => (e = Symbol[h]) ? e : Symbol.for("Symbol." + h),
|
|
4
|
+
var Se = Object.prototype.hasOwnProperty, ye = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ee = (h, e) => (e = Symbol[h]) ? e : Symbol.for("Symbol." + h), ae = (h) => {
|
|
6
6
|
throw TypeError(h);
|
|
7
7
|
};
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
|
|
8
|
+
var se = (h, e, s) => e in h ? Ee(h, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : h[e] = s, Ht = (h, e) => {
|
|
9
|
+
for (var s in e || (e = {}))
|
|
10
|
+
Se.call(e, s) && se(h, s, e[s]);
|
|
11
11
|
if (te)
|
|
12
|
-
for (var
|
|
13
|
-
|
|
12
|
+
for (var s of te(e))
|
|
13
|
+
ye.call(e, s) && se(h, s, e[s]);
|
|
14
14
|
return h;
|
|
15
|
-
},
|
|
16
|
-
var
|
|
17
|
-
var t = (h, e,
|
|
18
|
-
var J = (h, e,
|
|
19
|
-
var
|
|
15
|
+
}, Dt = (h, e) => ve(h, Le(e));
|
|
16
|
+
var zt = (h, e, s) => e.has(h) || ae("Cannot " + s);
|
|
17
|
+
var t = (h, e, s) => (zt(h, e, "read from private field"), s ? s.call(h) : e.get(h)), l = (h, e, s) => e.has(h) ? ae("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(h) : e.set(h, s), n = (h, e, s, a) => (zt(h, e, "write to private field"), a ? a.call(h, s) : e.set(h, s), s), g = (h, e, s) => (zt(h, e, "access private method"), s);
|
|
18
|
+
var J = (h, e, s) => new Promise((a, o) => {
|
|
19
|
+
var L = (c) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
21
|
+
p(s.next(c));
|
|
22
22
|
} catch (E) {
|
|
23
|
-
|
|
23
|
+
o(E);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, y = (c) => {
|
|
26
26
|
try {
|
|
27
|
-
|
|
27
|
+
p(s.throw(c));
|
|
28
28
|
} catch (E) {
|
|
29
|
-
|
|
29
|
+
o(E);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
|
|
31
|
+
}, p = (c) => c.done ? a(c.value) : Promise.resolve(c.value).then(L, y);
|
|
32
|
+
p((s = s.apply(h, e)).next());
|
|
33
33
|
});
|
|
34
|
-
var ie = (h, e,
|
|
35
|
-
import { i as oe } from "../index-
|
|
36
|
-
import { d as
|
|
37
|
-
import { w as
|
|
34
|
+
var ie = (h, e, s) => (e = h[ee("asyncIterator")]) ? e.call(h) : (h = h[ee("iterator")](), e = {}, s = (a, o) => (o = h[a]) && (e[a] = (L) => new Promise((y, p, c) => (L = o.call(h, L), c = L.done, Promise.resolve(L.value).then((E) => y({ value: E, done: c }), p)))), s("next"), s("return"), e);
|
|
35
|
+
import { i as oe } from "../index-LReFyN6i.js";
|
|
36
|
+
import { d as q } from "../events-CsVF98U6.js";
|
|
37
|
+
import { w as be, s as we } from "../scroll-jcbHDexr.js";
|
|
38
38
|
import "construct-style-sheets-polyfill";
|
|
39
|
-
import {
|
|
40
|
-
import { cssValueParser as
|
|
39
|
+
import { a as Pe, c as qt, s as Ae } from "../url-DAl-mgbC.js";
|
|
40
|
+
import { cssValueParser as ke } from "../css-value-parser/index.js";
|
|
41
41
|
import { c as he } from "../string-BlMQbe8b.js";
|
|
42
|
-
import { c as Ce } from "../math-BOBiC4TN.js";
|
|
43
42
|
class le extends HTMLElement {
|
|
44
43
|
connectedCallback() {
|
|
45
44
|
const e = {
|
|
@@ -47,255 +46,176 @@ class le extends HTMLElement {
|
|
|
47
46
|
"aria-atomic": "true",
|
|
48
47
|
style: "position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"
|
|
49
48
|
};
|
|
50
|
-
for (const [
|
|
51
|
-
this.setAttribute(
|
|
49
|
+
for (const [s, a] of Object.entries(e))
|
|
50
|
+
this.setAttribute(s, a);
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
oe && !customElements.get("morph-announcer") && customElements.define("morph-announcer", le);
|
|
55
|
-
var
|
|
56
|
-
class
|
|
57
|
-
constructor(e,
|
|
58
|
-
l(this,
|
|
59
|
-
l(this,
|
|
60
|
-
l(this,
|
|
61
|
-
l(this,
|
|
62
|
-
e.preventDefault(), g(this,
|
|
54
|
+
var N, i, D, it, ce, gt, rt;
|
|
55
|
+
class It {
|
|
56
|
+
constructor(e, s) {
|
|
57
|
+
l(this, D);
|
|
58
|
+
l(this, N);
|
|
59
|
+
l(this, i);
|
|
60
|
+
l(this, gt, (e) => {
|
|
61
|
+
e.preventDefault(), g(this, D, ce).call(this);
|
|
63
62
|
});
|
|
64
63
|
l(this, rt, () => {
|
|
65
|
-
const e = t(this,
|
|
66
|
-
t(this,
|
|
64
|
+
const e = t(this, i).hasAttribute("data-revalidate");
|
|
65
|
+
t(this, N).prefetch(t(this, D, it), e), t(this, i).removeEventListener("pointerenter", t(this, rt));
|
|
67
66
|
});
|
|
68
|
-
|
|
69
|
-
const i = g(this, x, Ut).call(this, t(this, s).getAttribute("data-pagination-set-link") || t(this, s).getAttribute("data-pagination-more-link") || t(this, s).getAttribute("data-pagination-next-link") || t(this, s).getAttribute("data-pagination-prev-link"));
|
|
70
|
-
i && this.updatePagination(
|
|
71
|
-
i.currentPage,
|
|
72
|
-
i.selector
|
|
73
|
-
), t(this, s).hasAttribute("data-prefetch") && t(this, s).addEventListener("pointerenter", t(this, rt));
|
|
67
|
+
n(this, N, s), n(this, i, e), t(this, i).addEventListener("click", t(this, gt)), this.checkCurrent(location.href.replace(location.origin, "")), t(this, i).hasAttribute("data-prefetch") && t(this, i).addEventListener("pointerenter", t(this, rt));
|
|
74
68
|
}
|
|
75
69
|
get element() {
|
|
76
|
-
return t(this,
|
|
70
|
+
return t(this, i);
|
|
77
71
|
}
|
|
78
72
|
checkCurrent(e) {
|
|
79
|
-
var E,
|
|
80
|
-
const
|
|
81
|
-
t(this,
|
|
82
|
-
const [
|
|
73
|
+
var E, st;
|
|
74
|
+
const s = t(this, N).normalizePath(e), a = t(this, N).normalizePath(t(this, D, it));
|
|
75
|
+
t(this, i).hasAttribute("data-include") && s.pathname.includes(a.pathname) ? t(this, i).classList.add("current") : a.pathname === s.pathname ? t(this, i).classList.add("current") : (E = t(this, i).getAttribute("data-associated-paths")) != null && E.split(",").find((A) => s.pathname.includes(A)) ? t(this, i).classList.add("current") : t(this, i).classList.remove("current"), s.path === a.path ? t(this, i).classList.add("exact") : t(this, i).classList.remove("exact");
|
|
76
|
+
const [o, L] = (st = t(this, D, it).split("#")[0]) == null ? void 0 : st.split("?"), y = new URLSearchParams(L), p = new URLSearchParams(location.search);
|
|
83
77
|
let c = 0;
|
|
84
|
-
for (const [
|
|
85
|
-
|
|
86
|
-
c ? (t(this,
|
|
78
|
+
for (const [A] of p)
|
|
79
|
+
y.has(A) && p.get(A) === y.get(A) && c++;
|
|
80
|
+
c ? (t(this, i).classList.toggle(
|
|
87
81
|
"all-params-matched",
|
|
88
|
-
|
|
89
|
-
), t(this,
|
|
82
|
+
p.size === c
|
|
83
|
+
), t(this, i).classList.toggle(
|
|
90
84
|
"some-params-matched",
|
|
91
|
-
|
|
92
|
-
)) : !
|
|
93
|
-
for (const
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
const
|
|
97
|
-
|
|
85
|
+
p.size !== c
|
|
86
|
+
)) : !p.size && t(this, i).hasAttribute("data-match-no-params") ? t(this, i).classList.add("all-params-matched") : (t(this, i).classList.remove("all-params-matched"), t(this, i).classList.remove("some-params-matched"));
|
|
87
|
+
for (const A in t(this, i).dataset) {
|
|
88
|
+
const at = he(A);
|
|
89
|
+
if (at.startsWith("match-param-")) {
|
|
90
|
+
const z = at.split("match-param-")[1], w = t(this, i).dataset[A], G = `param-${z}-matched`;
|
|
91
|
+
p.has(z) && p.get(z) === w || !p.has(z) && (w === "" || w === "*" || w === "all" || w === "any" || w === "vse") ? t(this, i).classList.add(G) : t(this, i).classList.remove(G);
|
|
98
92
|
}
|
|
99
93
|
}
|
|
100
94
|
}
|
|
101
|
-
updatePagination(e, a) {
|
|
102
|
-
const i = g(this, x, Ut).call(this, a);
|
|
103
|
-
if (i)
|
|
104
|
-
if (i.element.setAttribute(
|
|
105
|
-
"data-current-page",
|
|
106
|
-
e.toString()
|
|
107
|
-
), t(this, s).hasAttribute("data-pagination-more-link"))
|
|
108
|
-
if (e < i.totalPages) {
|
|
109
|
-
t(this, s).style.display = "";
|
|
110
|
-
const n = t(this, s).querySelector(
|
|
111
|
-
"[data-pagination-more-link-counter]"
|
|
112
|
-
);
|
|
113
|
-
n && (n.textContent = (i.totalPages - e).toString());
|
|
114
|
-
const v = t(this, s).getAttribute("href"), p = new URL(v, window.location.origin);
|
|
115
|
-
p.searchParams.set("page", (e + 1).toString());
|
|
116
|
-
const u = p.href.replace(p.origin, "").toString();
|
|
117
|
-
t(this, s).setAttribute("href", u), this.checkCurrent(u);
|
|
118
|
-
} else
|
|
119
|
-
t(this, s).style.display = "none";
|
|
120
|
-
else if (t(this, s).hasAttribute("data-pagination-prev-link") || t(this, s).hasAttribute("data-pagination-next-link")) {
|
|
121
|
-
const n = t(this, s).hasAttribute("data-pagination-prev-link"), v = t(this, s).getAttribute("href"), p = new URL(v, window.location.origin), u = e + (n ? -1 : 1);
|
|
122
|
-
p.searchParams.set(
|
|
123
|
-
"page",
|
|
124
|
-
Ce(u, 1, i.totalPages).toString()
|
|
125
|
-
);
|
|
126
|
-
const c = p.href.replace(p.origin, "").toString();
|
|
127
|
-
t(this, s).setAttribute("href", c), n ? u < 1 ? (t(this, s).classList.add("pagination-disabled"), t(this, s).setAttribute("tabindex", "-1")) : (t(this, s).classList.remove("pagination-disabled"), t(this, s).removeAttribute("tabindex")) : u > i.totalPages ? (t(this, s).classList.add("pagination-disabled"), t(this, s).setAttribute("tabindex", "-1")) : (t(this, s).classList.remove("pagination-disabled"), t(this, s).removeAttribute("tabindex"));
|
|
128
|
-
} else t(this, s).hasAttribute("data-pagination-set-link") && (t(this, s).getAttribute("data-value") === e.toString() ? t(this, s).classList.add("pagination-current") : t(this, s).classList.remove("pagination-current"));
|
|
129
|
-
}
|
|
130
95
|
destroy() {
|
|
131
|
-
t(this,
|
|
96
|
+
t(this, i).removeEventListener("click", t(this, gt)), t(this, i).removeEventListener("pointerenter", t(this, rt)), t(this, i).classList.remove("current", "exact");
|
|
132
97
|
}
|
|
133
98
|
}
|
|
134
|
-
|
|
135
|
-
const e = new URL(t(this,
|
|
136
|
-
return t(this,
|
|
99
|
+
N = new WeakMap(), i = new WeakMap(), D = new WeakSet(), it = function() {
|
|
100
|
+
const e = new URL(t(this, i).href);
|
|
101
|
+
return t(this, N).normalizePath(
|
|
137
102
|
e.pathname + e.search + e.hash
|
|
138
103
|
).path;
|
|
139
|
-
}, Ut = function(e) {
|
|
140
|
-
if (!e)
|
|
141
|
-
return;
|
|
142
|
-
const a = document.querySelector(e);
|
|
143
|
-
if (a) {
|
|
144
|
-
const i = parseInt(
|
|
145
|
-
a.getAttribute("data-current-page") || "1"
|
|
146
|
-
), n = parseInt(
|
|
147
|
-
a.getAttribute("data-total-pages") || "1"
|
|
148
|
-
);
|
|
149
|
-
return {
|
|
150
|
-
element: a,
|
|
151
|
-
currentPage: i,
|
|
152
|
-
totalPages: n,
|
|
153
|
-
selector: e
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
104
|
}, ce = function() {
|
|
157
|
-
var
|
|
105
|
+
var s;
|
|
158
106
|
if (document.documentElement.classList.contains("click-disabled"))
|
|
159
107
|
return;
|
|
160
|
-
if (t(this,
|
|
108
|
+
if (t(this, i).hasAttribute("data-back") && t(this, N).previousURL)
|
|
161
109
|
history.back();
|
|
162
110
|
else {
|
|
163
|
-
const
|
|
111
|
+
const a = t(this, i).getAttribute(
|
|
164
112
|
"data-history-action"
|
|
165
|
-
) || "push",
|
|
113
|
+
) || "push", o = t(this, i).hasAttribute("data-center-scroll"), L = getComputedStyle(t(this, i)).getPropertyValue("--offset-scroll").trim(), y = L ? ke.parse(L) : void 0, p = t(this, i).hasAttribute("data-revalidate") || t(this, i).hasAttribute("data-pagination-more-link") || t(this, i).hasAttribute("data-pagination-set-link") || t(this, i).hasAttribute("data-pagination-next-link") || t(this, i).hasAttribute("data-pagination-prev-link"), c = t(this, i).hasAttribute(
|
|
166
114
|
"data-keep-search-parameters"
|
|
167
|
-
), E = t(this,
|
|
115
|
+
), E = t(this, i).hasAttribute("data-keep-scroll-position") || t(this, i).hasAttribute("data-pagination-more-link"), st = t(this, i).getAttribute(
|
|
168
116
|
"data-scroll-behaviour"
|
|
169
|
-
),
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
t(this,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if (t(this, s).hasAttribute("data-toggle-params")) {
|
|
180
|
-
const [w, wt] = t(this, x, nt).split("?"), d = new URLSearchParams(wt), B = new URLSearchParams(location.search), it = new URLSearchParams();
|
|
181
|
-
for (const [H] of d)
|
|
182
|
-
(!B.has(H) || B.has(H) && B.get(H) !== d.get(H)) && it.append(H, d.get(H));
|
|
183
|
-
if (t(this, s).hasAttribute("data-merge-params"))
|
|
184
|
-
for (const [H] of B)
|
|
185
|
-
d.has(H) || it.append(H, B.get(H));
|
|
186
|
-
q = `${w}?${it.toString()}`;
|
|
117
|
+
), A = (s = t(this, i).getAttribute("data-submorph") || t(this, i).getAttribute("data-submorph-append")) == null ? void 0 : s.split(",").map((w) => w.trim()), at = t(this, i).hasAttribute("data-clear-state");
|
|
118
|
+
let z = t(this, D, it);
|
|
119
|
+
if (t(this, i).hasAttribute("data-toggle-params")) {
|
|
120
|
+
const [w, G] = t(this, D, it).split("?"), At = new URLSearchParams(G), F = new URLSearchParams(location.search), d = new URLSearchParams();
|
|
121
|
+
for (const [R] of At)
|
|
122
|
+
(!F.has(R) || F.has(R) && F.get(R) !== At.get(R)) && d.append(R, At.get(R));
|
|
123
|
+
if (t(this, i).hasAttribute("data-merge-params"))
|
|
124
|
+
for (const [R] of F)
|
|
125
|
+
At.has(R) || d.append(R, F.get(R));
|
|
126
|
+
z = `${w}?${d.toString()}`;
|
|
187
127
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
);
|
|
194
|
-
}) : t(this, s).hasAttribute("data-pagination-prev-link") ? t(this, R).links.forEach((w) => {
|
|
195
|
-
w.updatePagination(
|
|
196
|
-
L.currentPage - 1,
|
|
197
|
-
L.selector
|
|
198
|
-
);
|
|
199
|
-
}) : t(this, s).hasAttribute("data-pagination-next-link") ? t(this, R).links.forEach((w) => {
|
|
200
|
-
w.updatePagination(
|
|
201
|
-
L.currentPage + 1,
|
|
202
|
-
L.selector
|
|
203
|
-
);
|
|
204
|
-
}) : t(this, s).hasAttribute("data-pagination-more-link") && t(this, R).links.forEach((w) => {
|
|
205
|
-
w.updatePagination(
|
|
206
|
-
L.currentPage + 1,
|
|
207
|
-
L.selector
|
|
208
|
-
);
|
|
209
|
-
})), t(this, R).navigate(q, {
|
|
210
|
-
historyAction: i,
|
|
211
|
-
centerScroll: n,
|
|
212
|
-
offsetScroll: p,
|
|
213
|
-
revalidate: u,
|
|
128
|
+
t(this, N).navigate(z, {
|
|
129
|
+
historyAction: a,
|
|
130
|
+
centerScroll: o,
|
|
131
|
+
offsetScroll: y,
|
|
132
|
+
revalidate: p,
|
|
214
133
|
keepSearchParameters: c,
|
|
215
|
-
submorph:
|
|
216
|
-
clearState:
|
|
134
|
+
submorph: A,
|
|
135
|
+
clearState: at,
|
|
217
136
|
keepScrollPosition: E,
|
|
218
|
-
scrollBehaviour:
|
|
219
|
-
submorphAppend: t(this,
|
|
220
|
-
mergeParams:
|
|
221
|
-
detail: t(this,
|
|
222
|
-
removeParams: t(this,
|
|
137
|
+
scrollBehaviour: st,
|
|
138
|
+
submorphAppend: t(this, i).hasAttribute("data-submorph-append"),
|
|
139
|
+
mergeParams: t(this, i).hasAttribute("data-merge-params") && !t(this, i).hasAttribute("data-toggle-params"),
|
|
140
|
+
detail: t(this, i).getAttribute("data-detail"),
|
|
141
|
+
removeParams: t(this, i).getAttribute("data-remove-params") || void 0,
|
|
142
|
+
scrollTo: t(this, i).getAttribute("data-scroll-to") || void 0
|
|
223
143
|
});
|
|
224
144
|
}
|
|
225
|
-
},
|
|
226
|
-
var
|
|
145
|
+
}, gt = new WeakMap(), rt = new WeakMap();
|
|
146
|
+
var C, nt, Et, Wt, vt;
|
|
227
147
|
class Re {
|
|
228
148
|
constructor(e) {
|
|
229
|
-
l(this,
|
|
230
|
-
l(this,
|
|
231
|
-
l(this,
|
|
232
|
-
l(this,
|
|
233
|
-
g(this,
|
|
149
|
+
l(this, Et);
|
|
150
|
+
l(this, C);
|
|
151
|
+
l(this, nt, []);
|
|
152
|
+
l(this, vt, () => {
|
|
153
|
+
g(this, Et, Wt).call(this);
|
|
234
154
|
});
|
|
235
|
-
|
|
236
|
-
for (const
|
|
237
|
-
const
|
|
238
|
-
if (
|
|
239
|
-
const
|
|
240
|
-
t(this,
|
|
241
|
-
name:
|
|
242
|
-
value:
|
|
155
|
+
n(this, C, e);
|
|
156
|
+
for (const s in t(this, C).dataset) {
|
|
157
|
+
const a = he(s);
|
|
158
|
+
if (a.startsWith("param-")) {
|
|
159
|
+
const o = a.split("param-")[1], L = t(this, C).dataset[s];
|
|
160
|
+
t(this, nt).push({
|
|
161
|
+
name: o,
|
|
162
|
+
value: L
|
|
243
163
|
});
|
|
244
164
|
}
|
|
245
165
|
}
|
|
246
166
|
document.addEventListener(
|
|
247
167
|
"morphURLParametersChange",
|
|
248
|
-
t(this,
|
|
249
|
-
), g(this,
|
|
168
|
+
t(this, vt)
|
|
169
|
+
), g(this, Et, Wt).call(this);
|
|
250
170
|
}
|
|
251
171
|
destroy() {
|
|
252
172
|
document.removeEventListener(
|
|
253
173
|
"morphURLParametersChange",
|
|
254
|
-
t(this,
|
|
174
|
+
t(this, vt)
|
|
255
175
|
);
|
|
256
176
|
}
|
|
257
177
|
}
|
|
258
|
-
|
|
178
|
+
C = new WeakMap(), nt = new WeakMap(), Et = new WeakSet(), Wt = function() {
|
|
259
179
|
const e = new URLSearchParams(location.search);
|
|
260
|
-
let
|
|
261
|
-
!
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
},
|
|
265
|
-
const
|
|
266
|
-
var
|
|
267
|
-
class
|
|
268
|
-
constructor(e,
|
|
269
|
-
l(this,
|
|
180
|
+
let s = !!t(this, nt).find((o) => e.has(o.name) && (e.get(o.name) === o.value || o.value === "*" || o.value === "all" || o.value === "any" || o.value === "vse" || e.get(o.name) === "*" || e.get(o.name) === "all" || e.get(o.name) === "any" || e.get(o.name) === "vse"));
|
|
181
|
+
!s && t(this, C).hasAttribute("data-match-no-params") && (s = !t(this, nt).filter((o) => e.has(o.name)).length);
|
|
182
|
+
const a = t(this, C).getAttribute("data-hide-class");
|
|
183
|
+
s ? a ? t(this, C).classList.remove(a) : t(this, C).style.display = "" : a ? t(this, C).classList.add(a) : t(this, C).style.display = "none";
|
|
184
|
+
}, vt = new WeakMap();
|
|
185
|
+
const Ce = new DOMParser();
|
|
186
|
+
var I, Q, H, W, Z, K, ot, _, Y, Lt, ht;
|
|
187
|
+
class re {
|
|
188
|
+
constructor(e, s) {
|
|
189
|
+
l(this, I);
|
|
270
190
|
l(this, Q);
|
|
271
|
-
l(this,
|
|
272
|
-
l(this,
|
|
191
|
+
l(this, H, { x: 0, y: 0 });
|
|
192
|
+
l(this, W, null);
|
|
273
193
|
l(this, Z, null);
|
|
274
|
-
l(this,
|
|
275
|
-
l(this,
|
|
194
|
+
l(this, K, null);
|
|
195
|
+
l(this, ot, null);
|
|
276
196
|
l(this, _, null);
|
|
277
|
-
l(this,
|
|
197
|
+
l(this, Y, null);
|
|
278
198
|
l(this, Lt);
|
|
279
|
-
l(this,
|
|
280
|
-
|
|
199
|
+
l(this, ht, !1);
|
|
200
|
+
n(this, I, e), n(this, Q, s);
|
|
281
201
|
}
|
|
282
202
|
get pathname() {
|
|
283
203
|
return t(this, Q);
|
|
284
204
|
}
|
|
285
205
|
get scrollState() {
|
|
286
|
-
return t(this,
|
|
206
|
+
return t(this, H);
|
|
287
207
|
}
|
|
288
208
|
get document() {
|
|
289
|
-
return t(this,
|
|
209
|
+
return t(this, K);
|
|
290
210
|
}
|
|
291
211
|
needRavalidation() {
|
|
292
|
-
|
|
212
|
+
n(this, ht, !0);
|
|
293
213
|
}
|
|
294
214
|
setHeaders(e) {
|
|
295
|
-
|
|
215
|
+
n(this, Lt, e);
|
|
296
216
|
}
|
|
297
217
|
setInitialDocument(e) {
|
|
298
|
-
|
|
218
|
+
n(this, W, e.cloneNode(!0));
|
|
299
219
|
}
|
|
300
220
|
abort() {
|
|
301
221
|
var e;
|
|
@@ -303,214 +223,215 @@ class ne {
|
|
|
303
223
|
`[${t(this, Q)}] page loading cancelled`
|
|
304
224
|
);
|
|
305
225
|
}
|
|
306
|
-
fetch(e,
|
|
226
|
+
fetch(e, s, a) {
|
|
307
227
|
return J(this, null, function* () {
|
|
308
|
-
var
|
|
309
|
-
if (!
|
|
310
|
-
const
|
|
311
|
-
if (t(this,
|
|
312
|
-
return t(this,
|
|
228
|
+
var o;
|
|
229
|
+
if (!a && !t(this, ht)) {
|
|
230
|
+
const p = ((o = t(this, W)) == null ? void 0 : o.documentElement.getAttribute("data-cache")) && s !== e, c = t(this, W) && t(this, I).isPopstateNavigation;
|
|
231
|
+
if (t(this, Y) || p || c)
|
|
232
|
+
return t(this, Y);
|
|
313
233
|
}
|
|
314
|
-
return
|
|
234
|
+
return n(this, Y, new Promise((L) => J(this, null, function* () {
|
|
315
235
|
try {
|
|
316
|
-
|
|
317
|
-
const
|
|
236
|
+
n(this, _, new AbortController());
|
|
237
|
+
const p = yield (yield fetch(e, {
|
|
318
238
|
signal: t(this, _).signal,
|
|
319
239
|
headers: Ht({
|
|
320
240
|
"X-MORPH": "true",
|
|
321
|
-
"X-MORPH-
|
|
241
|
+
"X-MORPH-RAVALIDATE": a ? "true" : "false",
|
|
242
|
+
"X-MORPH-CURRENT-PATH": encodeURIComponent(s),
|
|
322
243
|
"X-MORPH-NEW-PATH": encodeURIComponent(e)
|
|
323
244
|
}, t(this, Lt))
|
|
324
|
-
})).text(), c =
|
|
325
|
-
this.setInitialDocument(c),
|
|
326
|
-
} catch (
|
|
327
|
-
console.warn(
|
|
245
|
+
})).text(), c = Ce.parseFromString(p, "text/html");
|
|
246
|
+
this.setInitialDocument(c), n(this, ht, !1);
|
|
247
|
+
} catch (y) {
|
|
248
|
+
console.warn(y);
|
|
328
249
|
} finally {
|
|
329
|
-
|
|
250
|
+
n(this, _, null), n(this, Y, null), L();
|
|
330
251
|
}
|
|
331
|
-
}))), t(this,
|
|
252
|
+
}))), t(this, Y);
|
|
332
253
|
});
|
|
333
254
|
}
|
|
334
255
|
cloneDocument() {
|
|
335
|
-
|
|
256
|
+
n(this, K, (t(this, Z) || t(this, W)).cloneNode(!0));
|
|
336
257
|
}
|
|
337
258
|
get title() {
|
|
338
259
|
let e = "";
|
|
339
|
-
if (t(this,
|
|
340
|
-
e = t(this,
|
|
260
|
+
if (t(this, K).title)
|
|
261
|
+
e = t(this, K).title;
|
|
341
262
|
else {
|
|
342
|
-
const
|
|
343
|
-
e = (
|
|
263
|
+
const s = t(this, K).querySelector("h1");
|
|
264
|
+
e = (s == null ? void 0 : s.innerText) || (s == null ? void 0 : s.textContent) || t(this, Q);
|
|
344
265
|
}
|
|
345
266
|
return e;
|
|
346
267
|
}
|
|
347
268
|
clearScrollState() {
|
|
348
|
-
t(this,
|
|
269
|
+
t(this, H).x = 0, t(this, H).y = 0;
|
|
349
270
|
}
|
|
350
271
|
clearDocumentState() {
|
|
351
|
-
|
|
272
|
+
n(this, Z, null);
|
|
352
273
|
}
|
|
353
274
|
saveScrollState() {
|
|
354
|
-
t(this,
|
|
275
|
+
t(this, W).documentElement.hasAttribute(
|
|
355
276
|
"data-no-scroll-restoration"
|
|
356
|
-
) ? (t(this,
|
|
277
|
+
) ? (t(this, H).x = 0, t(this, H).y = 0) : (t(this, H).x = t(this, I).scrollValue.left, t(this, H).y = t(this, I).scrollValue.top);
|
|
357
278
|
}
|
|
358
279
|
restoreScrollPosition() {
|
|
359
|
-
t(this,
|
|
360
|
-
top: t(this,
|
|
361
|
-
left: t(this,
|
|
280
|
+
t(this, I).scrollElement.scroll({
|
|
281
|
+
top: t(this, H).y,
|
|
282
|
+
left: t(this, H).x,
|
|
362
283
|
behavior: "instant"
|
|
363
284
|
});
|
|
364
285
|
}
|
|
365
286
|
saveDocumentState() {
|
|
366
|
-
t(this,
|
|
287
|
+
t(this, W).documentElement.hasAttribute(
|
|
367
288
|
"data-no-page-restoration"
|
|
368
|
-
) ?
|
|
289
|
+
) ? n(this, Z, null) : n(this, Z, document.cloneNode(!0));
|
|
369
290
|
}
|
|
370
291
|
renewScrollPosition() {
|
|
371
|
-
t(this,
|
|
292
|
+
t(this, I).scrollElement.scroll({
|
|
372
293
|
top: 0,
|
|
373
294
|
left: 0,
|
|
374
295
|
behavior: "instant"
|
|
375
296
|
});
|
|
376
297
|
}
|
|
377
298
|
saveState(e) {
|
|
378
|
-
|
|
299
|
+
n(this, ot, e);
|
|
379
300
|
}
|
|
380
301
|
clearState() {
|
|
381
|
-
const e = t(this,
|
|
382
|
-
return
|
|
302
|
+
const e = t(this, ot);
|
|
303
|
+
return n(this, ot, null), e;
|
|
383
304
|
}
|
|
384
305
|
}
|
|
385
|
-
|
|
386
|
-
var
|
|
387
|
-
const
|
|
306
|
+
I = new WeakMap(), Q = new WeakMap(), H = new WeakMap(), W = new WeakMap(), Z = new WeakMap(), K = new WeakMap(), ot = new WeakMap(), _ = new WeakMap(), Y = new WeakMap(), Lt = new WeakMap(), ht = new WeakMap();
|
|
307
|
+
var x, lt, b, $, f, tt, V, j, M, St, O, yt, et, ct, dt, bt, ut, wt, m, Vt, Pt, ft, Ot, de, Ft, Xt, Bt, Tt, Mt, mt;
|
|
308
|
+
const pt = class pt {
|
|
388
309
|
constructor(e) {
|
|
389
|
-
l(this,
|
|
390
|
-
l(this,
|
|
391
|
-
l(this,
|
|
392
|
-
l(this,
|
|
393
|
-
l(this,
|
|
394
|
-
l(this,
|
|
310
|
+
l(this, m);
|
|
311
|
+
l(this, x, null);
|
|
312
|
+
l(this, lt, null);
|
|
313
|
+
l(this, b, []);
|
|
314
|
+
l(this, $);
|
|
315
|
+
l(this, f, null);
|
|
395
316
|
l(this, tt);
|
|
396
|
-
l(this,
|
|
397
|
-
l(this,
|
|
398
|
-
l(this,
|
|
317
|
+
l(this, V, []);
|
|
318
|
+
l(this, j, !1);
|
|
319
|
+
l(this, M, null);
|
|
399
320
|
l(this, St, !1);
|
|
400
321
|
l(this, O, /* @__PURE__ */ new Map());
|
|
401
|
-
l(this,
|
|
322
|
+
l(this, yt, []);
|
|
402
323
|
l(this, et, null);
|
|
324
|
+
l(this, ct, 0);
|
|
403
325
|
l(this, dt, 0);
|
|
404
|
-
l(this,
|
|
405
|
-
l(this,
|
|
406
|
-
l(this,
|
|
407
|
-
l(this,
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
return (((a = e.getAttribute("href")) == null ? void 0 : a.startsWith("/")) || ((i = e.getAttribute("href")) == null ? void 0 : i.startsWith("?"))) && !e.hasAttribute("download") && !e.hasAttribute("data-morph-skip") && !e.closest("[data-morph-skip]") && e.getAttribute("target") !== "_blank";
|
|
326
|
+
l(this, bt);
|
|
327
|
+
l(this, ut);
|
|
328
|
+
l(this, wt);
|
|
329
|
+
l(this, Pt, (e) => {
|
|
330
|
+
var s, a;
|
|
331
|
+
return (((s = e.getAttribute("href")) == null ? void 0 : s.startsWith("/")) || ((a = e.getAttribute("href")) == null ? void 0 : a.startsWith("?"))) && !e.hasAttribute("download") && !e.hasAttribute("data-morph-skip") && !e.closest("[data-morph-skip]") && e.getAttribute("target") !== "_blank";
|
|
411
332
|
});
|
|
412
|
-
l(this,
|
|
413
|
-
e.preventDefault(),
|
|
333
|
+
l(this, Mt, (e) => J(this, null, function* () {
|
|
334
|
+
e.preventDefault(), n(this, j, !0), yield this.navigate(location.href.replace(location.origin, ""), {
|
|
414
335
|
historyAction: "none",
|
|
415
|
-
submorph: t(this,
|
|
416
|
-
revalidate: t(this,
|
|
417
|
-
keepScrollPosition: t(this,
|
|
418
|
-
}),
|
|
336
|
+
submorph: t(this, ut) ? void 0 : t(this, bt),
|
|
337
|
+
revalidate: t(this, ut),
|
|
338
|
+
keepScrollPosition: t(this, wt)
|
|
339
|
+
}), n(this, j, !1);
|
|
419
340
|
}));
|
|
420
|
-
l(this,
|
|
421
|
-
const { left: e, top:
|
|
422
|
-
|
|
341
|
+
l(this, mt, () => {
|
|
342
|
+
const { left: e, top: s } = this.scrollValue, a = s - t(this, dt), o = e - t(this, ct);
|
|
343
|
+
n(this, dt, s), n(this, ct, e), document.documentElement.classList.toggle("scroll-y", s > 0), document.documentElement.classList.toggle("scroll-x", e > 0), document.documentElement.classList.toggle(
|
|
423
344
|
"scroll-y-forward",
|
|
424
|
-
|
|
345
|
+
a > 0
|
|
425
346
|
), document.documentElement.classList.toggle(
|
|
426
347
|
"scroll-y-backward",
|
|
427
|
-
|
|
348
|
+
a < 0
|
|
428
349
|
), document.documentElement.classList.toggle(
|
|
429
350
|
"scroll-x-forward",
|
|
430
|
-
|
|
351
|
+
o > 0
|
|
431
352
|
), document.documentElement.classList.toggle(
|
|
432
353
|
"scroll-x-backward",
|
|
433
|
-
|
|
434
|
-
),
|
|
354
|
+
o < 0
|
|
355
|
+
), q(document, "morphScroll", {
|
|
435
356
|
detail: {
|
|
436
357
|
left: e,
|
|
437
|
-
top:
|
|
358
|
+
top: s
|
|
438
359
|
}
|
|
439
360
|
});
|
|
440
361
|
});
|
|
441
|
-
if (oe && !
|
|
442
|
-
|
|
443
|
-
base:
|
|
362
|
+
if (oe && !pt.instance) {
|
|
363
|
+
pt.instance = this, n(this, x, {
|
|
364
|
+
base: Pe(e == null ? void 0 : e.base),
|
|
444
365
|
waitForHeadToLoad: (e == null ? void 0 : e.waitForHeadToLoad) !== !1,
|
|
445
366
|
trailingSlash: (e == null ? void 0 : e.trailingSlash) || !1,
|
|
446
367
|
scrollSelector: e == null ? void 0 : e.scrollSelector,
|
|
447
368
|
morphInsideScrollContainer: (e == null ? void 0 : e.morphInsideScrollContainer) || !1
|
|
448
|
-
}),
|
|
449
|
-
const
|
|
369
|
+
}), n(this, lt, g(this, m, Ot).call(this, document.body));
|
|
370
|
+
const s = this.normalizePath(
|
|
450
371
|
location.pathname + location.search + location.hash
|
|
451
372
|
);
|
|
452
|
-
|
|
453
|
-
const
|
|
454
|
-
|
|
373
|
+
n(this, f, s);
|
|
374
|
+
const a = new re(this, t(this, f).pathname);
|
|
375
|
+
a.setInitialDocument(document), t(this, O).set(t(this, f).pathname, a), document.documentElement.setAttribute(
|
|
455
376
|
"data-current-pathname",
|
|
456
|
-
t(this,
|
|
377
|
+
t(this, f).pathname
|
|
457
378
|
), document.documentElement.setAttribute(
|
|
458
379
|
"data-current-leaf",
|
|
459
|
-
|
|
460
|
-
), this.findLinks(), this.findParamsDependent(), history.scrollRestoration = "manual", addEventListener("popstate", t(this,
|
|
380
|
+
s.leaf
|
|
381
|
+
), this.findLinks(), this.findParamsDependent(), history.scrollRestoration = "manual", addEventListener("popstate", t(this, Mt)), qt({
|
|
461
382
|
action: "replace",
|
|
462
|
-
pathname:
|
|
463
|
-
searchParameters:
|
|
464
|
-
hash:
|
|
465
|
-
}),
|
|
383
|
+
pathname: s.pathname,
|
|
384
|
+
searchParameters: s.parameters,
|
|
385
|
+
hash: s.hash
|
|
386
|
+
}), n(this, et, new le()), g(this, m, Bt).call(this, document);
|
|
466
387
|
}
|
|
467
388
|
}
|
|
468
389
|
get currentURL() {
|
|
469
|
-
return t(this,
|
|
390
|
+
return t(this, f);
|
|
470
391
|
}
|
|
471
392
|
get previousURL() {
|
|
472
393
|
return t(this, tt);
|
|
473
394
|
}
|
|
474
395
|
get links() {
|
|
475
|
-
return t(this,
|
|
396
|
+
return t(this, b);
|
|
476
397
|
}
|
|
477
398
|
get scrollElement() {
|
|
478
|
-
return t(this,
|
|
399
|
+
return t(this, M);
|
|
479
400
|
}
|
|
480
401
|
get isPopstateNavigation() {
|
|
481
|
-
return t(this,
|
|
402
|
+
return t(this, j);
|
|
482
403
|
}
|
|
483
404
|
get scrollValue() {
|
|
484
|
-
let e = 0,
|
|
485
|
-
return t(this, St) ? (e = window.scrollY,
|
|
405
|
+
let e = 0, s = 0;
|
|
406
|
+
return t(this, St) ? (e = window.scrollY, s = window.scrollX) : (e = t(this, M).scrollTop, s = t(this, M).scrollLeft), { top: e, left: s };
|
|
486
407
|
}
|
|
487
408
|
get isNavigating() {
|
|
488
|
-
return !!t(this,
|
|
409
|
+
return !!t(this, V).length;
|
|
489
410
|
}
|
|
490
411
|
saveState(e) {
|
|
491
|
-
const
|
|
492
|
-
|
|
412
|
+
const s = t(this, O).get(t(this, f).path);
|
|
413
|
+
s && s.saveState(e);
|
|
493
414
|
}
|
|
494
415
|
getState() {
|
|
495
|
-
const e = t(this, O).get(t(this,
|
|
416
|
+
const e = t(this, O).get(t(this, f).path);
|
|
496
417
|
return e == null ? void 0 : e.clearState();
|
|
497
418
|
}
|
|
498
|
-
normalizePath(e,
|
|
499
|
-
return
|
|
500
|
-
base: t(this,
|
|
501
|
-
trailingSlash: t(this,
|
|
502
|
-
mergeParams:
|
|
503
|
-
removeParams:
|
|
419
|
+
normalizePath(e, s) {
|
|
420
|
+
return Ae(e, {
|
|
421
|
+
base: t(this, x).base,
|
|
422
|
+
trailingSlash: t(this, x).trailingSlash,
|
|
423
|
+
mergeParams: s != null && s.mergeParams ? location.search : "",
|
|
424
|
+
removeParams: s == null ? void 0 : s.removeParams
|
|
504
425
|
});
|
|
505
426
|
}
|
|
506
|
-
prefetch(e,
|
|
427
|
+
prefetch(e, s) {
|
|
507
428
|
return J(this, null, function* () {
|
|
508
|
-
var
|
|
509
|
-
if (t(this,
|
|
429
|
+
var o;
|
|
430
|
+
if (t(this, V).length)
|
|
510
431
|
return;
|
|
511
|
-
e = ((
|
|
512
|
-
const
|
|
513
|
-
|
|
432
|
+
e = ((o = this.pathnameModifier) == null ? void 0 : o.call(this, e)) || e;
|
|
433
|
+
const a = g(this, m, ft).call(this, e);
|
|
434
|
+
a == null || a.fetch(e, t(this, f).path, s);
|
|
514
435
|
});
|
|
515
436
|
}
|
|
516
437
|
excludeHeadChild(e) {
|
|
@@ -519,294 +440,299 @@ const gt = class gt {
|
|
|
519
440
|
setHeaders(e) {
|
|
520
441
|
}
|
|
521
442
|
needRavalidation(e) {
|
|
522
|
-
const
|
|
523
|
-
|
|
443
|
+
const s = this.normalizePath(e), a = g(this, m, ft).call(this, s.path);
|
|
444
|
+
a == null || a.needRavalidation();
|
|
524
445
|
}
|
|
525
|
-
navigate(
|
|
446
|
+
navigate(At) {
|
|
526
447
|
return J(this, arguments, function* (e, {
|
|
527
|
-
historyAction:
|
|
528
|
-
centerScroll:
|
|
529
|
-
offsetScroll:
|
|
530
|
-
scrollBehaviour:
|
|
531
|
-
revalidate:
|
|
532
|
-
keepSearchParameters:
|
|
448
|
+
historyAction: s = "push",
|
|
449
|
+
centerScroll: a,
|
|
450
|
+
offsetScroll: o,
|
|
451
|
+
scrollBehaviour: L,
|
|
452
|
+
revalidate: y,
|
|
453
|
+
keepSearchParameters: p,
|
|
533
454
|
submorph: c,
|
|
534
455
|
submorphAppend: E,
|
|
535
|
-
clearState:
|
|
536
|
-
keepScrollPosition:
|
|
537
|
-
mergeParams:
|
|
538
|
-
removeParams:
|
|
539
|
-
detail:
|
|
456
|
+
clearState: st,
|
|
457
|
+
keepScrollPosition: A,
|
|
458
|
+
mergeParams: at,
|
|
459
|
+
removeParams: z,
|
|
460
|
+
detail: w,
|
|
461
|
+
scrollTo: G
|
|
540
462
|
} = {}) {
|
|
541
|
-
var
|
|
542
|
-
if (t(this,
|
|
463
|
+
var R, Kt, Yt, $t;
|
|
464
|
+
if (t(this, V).length)
|
|
543
465
|
return;
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
mergeParams:
|
|
547
|
-
removeParams:
|
|
466
|
+
n(this, bt, c), n(this, ut, y), n(this, wt, A);
|
|
467
|
+
const F = ((R = this.pathnameModifier) == null ? void 0 : R.call(this, e)) || e, d = this.normalizePath(F, {
|
|
468
|
+
mergeParams: at,
|
|
469
|
+
removeParams: z
|
|
548
470
|
});
|
|
549
|
-
if (!
|
|
550
|
-
|
|
551
|
-
centerScroll:
|
|
552
|
-
offsetScroll:
|
|
471
|
+
if (!y && (((Kt = t(this, $)) == null ? void 0 : Kt.pathname) === d.pathname || t(this, f).pathname === d.pathname)) {
|
|
472
|
+
A || g(this, m, Tt).call(this, d.hash || 0, {
|
|
473
|
+
centerScroll: a,
|
|
474
|
+
offsetScroll: o,
|
|
553
475
|
behavior: "smooth"
|
|
554
|
-
}),
|
|
476
|
+
}), q(document, "morphSamePath", {
|
|
555
477
|
detail: {
|
|
556
|
-
detail:
|
|
478
|
+
detail: w
|
|
557
479
|
}
|
|
558
|
-
}), ((
|
|
559
|
-
action: (($t = t(this,
|
|
480
|
+
}), ((Yt = t(this, f)) == null ? void 0 : Yt.parameters) !== d.parameters && (n(this, tt, t(this, f)), n(this, f, d), qt({
|
|
481
|
+
action: (($t = t(this, f)) == null ? void 0 : $t.hash) !== d.hash ? "replace" : s,
|
|
560
482
|
pathname: d.pathname,
|
|
561
483
|
searchParameters: d.parameters,
|
|
562
484
|
hash: d.hash
|
|
563
|
-
}),
|
|
485
|
+
}), q(document, "morphURLParametersChange", {
|
|
564
486
|
detail: {
|
|
565
|
-
newURL: t(this,
|
|
487
|
+
newURL: t(this, f),
|
|
566
488
|
previousURL: t(this, tt),
|
|
567
|
-
detail:
|
|
489
|
+
detail: w
|
|
568
490
|
}
|
|
569
|
-
})), t(this,
|
|
491
|
+
})), t(this, b).forEach((X) => {
|
|
570
492
|
X.checkCurrent(d.path);
|
|
571
493
|
});
|
|
572
494
|
return;
|
|
573
495
|
} else
|
|
574
|
-
t(this,
|
|
496
|
+
t(this, b).forEach((X) => {
|
|
575
497
|
X.checkCurrent(d.path);
|
|
576
498
|
});
|
|
577
|
-
|
|
499
|
+
n(this, $, d);
|
|
578
500
|
try {
|
|
579
501
|
let X = !0;
|
|
580
502
|
if (this.preprocessor)
|
|
581
503
|
try {
|
|
582
|
-
yield new Promise((r,
|
|
583
|
-
var
|
|
584
|
-
(
|
|
504
|
+
yield new Promise((r, P) => {
|
|
505
|
+
var T;
|
|
506
|
+
(T = this.preprocessor) == null || T.call(this, {
|
|
585
507
|
url: d,
|
|
586
508
|
resolve: r,
|
|
587
|
-
reject:
|
|
509
|
+
reject: P,
|
|
588
510
|
submorph: c,
|
|
589
|
-
detail:
|
|
511
|
+
detail: w
|
|
590
512
|
});
|
|
591
513
|
});
|
|
592
514
|
} catch (r) {
|
|
593
515
|
r ? console.error(r) : console.log("Route change canceled"), X = !1;
|
|
594
516
|
}
|
|
595
|
-
if (!X || t(this,
|
|
596
|
-
t(this,
|
|
597
|
-
r.checkCurrent(t(this,
|
|
517
|
+
if (!X || t(this, $).pathname !== d.pathname) {
|
|
518
|
+
t(this, b).forEach((r) => {
|
|
519
|
+
r.checkCurrent(t(this, f).path);
|
|
598
520
|
});
|
|
599
521
|
return;
|
|
600
522
|
}
|
|
601
523
|
const jt = {
|
|
602
524
|
url: d,
|
|
603
525
|
submorph: c,
|
|
604
|
-
detail:
|
|
526
|
+
detail: w
|
|
605
527
|
};
|
|
606
528
|
c ? E || c.forEach((r) => {
|
|
607
|
-
document.querySelectorAll(r).forEach((
|
|
608
|
-
|
|
529
|
+
document.querySelectorAll(r).forEach((P) => {
|
|
530
|
+
P.classList.add("out"), P.setAttribute("data-morph-out", "");
|
|
609
531
|
});
|
|
610
|
-
}) : t(this,
|
|
611
|
-
var
|
|
612
|
-
(
|
|
613
|
-
}),
|
|
532
|
+
}) : t(this, lt).forEach((r) => {
|
|
533
|
+
var P, T;
|
|
534
|
+
(P = r.firstElementChild) == null || P.classList.add("out"), (T = r.firstElementChild) == null || T.setAttribute("data-morph-out", "");
|
|
535
|
+
}), q(document, "morphNavigation", {
|
|
614
536
|
detail: jt
|
|
615
537
|
});
|
|
616
|
-
const
|
|
538
|
+
const Ut = g(this, m, ft).call(this, t(this, f).pathname), S = g(this, m, ft).call(this, d.pathname);
|
|
617
539
|
if (t(this, O).forEach((r) => {
|
|
618
540
|
r.pathname !== d.pathname && r.abort();
|
|
619
|
-
}), yield
|
|
620
|
-
t(this,
|
|
621
|
-
r.checkCurrent(t(this,
|
|
541
|
+
}), yield S == null ? void 0 : S.fetch(F, t(this, f).path, y), t(this, $).pathname !== d.pathname) {
|
|
542
|
+
t(this, b).forEach((r) => {
|
|
543
|
+
r.checkCurrent(t(this, f).path);
|
|
622
544
|
});
|
|
623
545
|
return;
|
|
624
546
|
}
|
|
625
|
-
|
|
626
|
-
const
|
|
627
|
-
document:
|
|
547
|
+
Ut.clearState(), Ut.saveScrollState(), Ut.saveDocumentState(), (!t(this, j) || y) && (S.clearScrollState(), S.clearDocumentState()), st && S.clearState(), S.cloneDocument(), t(this, et).textContent = S.title, document.body.appendChild(t(this, et));
|
|
548
|
+
const kt = Dt(Ht({}, jt), {
|
|
549
|
+
document: S.document
|
|
628
550
|
});
|
|
629
|
-
E ||
|
|
551
|
+
E || kt.document.querySelectorAll("[data-morph-out]").forEach((r) => {
|
|
630
552
|
r.classList.remove("out");
|
|
631
|
-
}),
|
|
632
|
-
detail:
|
|
553
|
+
}), q(document, "morphStart", {
|
|
554
|
+
detail: kt
|
|
633
555
|
});
|
|
634
|
-
const Gt = Array.from(document.head.children), Jt = Array.from(
|
|
635
|
-
Rt.forEach((r,
|
|
636
|
-
r.tagName === "SCRIPT" && (Rt[
|
|
556
|
+
const Gt = Array.from(document.head.children), Jt = Array.from(S.document.head.children), Qt = g(this, m, de).call(this, Gt, Jt), ue = g(this, m, Ft).call(this, Gt, Qt), Rt = g(this, m, Ft).call(this, Jt, Qt).filter((r) => !this.excludeHeadChild(r));
|
|
557
|
+
Rt.forEach((r, P) => {
|
|
558
|
+
r.tagName === "SCRIPT" && (Rt[P] = g(this, m, Vt).call(this, r));
|
|
637
559
|
}), Rt.forEach((r) => {
|
|
638
560
|
document.head.appendChild(r);
|
|
639
561
|
});
|
|
640
562
|
const Nt = Rt.filter((r) => {
|
|
641
563
|
if (r.hasAttribute("data-no-waiting"))
|
|
642
564
|
return !1;
|
|
643
|
-
if (g(this,
|
|
565
|
+
if (g(this, m, Xt).call(this, r))
|
|
644
566
|
return !0;
|
|
645
567
|
});
|
|
646
|
-
t(this,
|
|
647
|
-
let
|
|
568
|
+
t(this, x).waitForHeadToLoad && Nt.length && (yield new Promise((r) => J(this, null, function* () {
|
|
569
|
+
let P = 0;
|
|
648
570
|
try {
|
|
649
|
-
for (var
|
|
650
|
-
const
|
|
651
|
-
|
|
652
|
-
|
|
571
|
+
for (var T = ie(Nt), fe, B, U; fe = !(B = yield T.next()).done; fe = !1) {
|
|
572
|
+
const Ct = B.value;
|
|
573
|
+
Ct.onload = () => {
|
|
574
|
+
P++, P === Nt.length && r();
|
|
653
575
|
};
|
|
654
576
|
}
|
|
655
|
-
} catch (
|
|
656
|
-
|
|
577
|
+
} catch (B) {
|
|
578
|
+
U = [B];
|
|
657
579
|
} finally {
|
|
658
580
|
try {
|
|
659
|
-
fe && (
|
|
581
|
+
fe && (B = T.return) && (yield B.call(T));
|
|
660
582
|
} finally {
|
|
661
|
-
if (
|
|
662
|
-
throw
|
|
583
|
+
if (U)
|
|
584
|
+
throw U[0];
|
|
663
585
|
}
|
|
664
586
|
}
|
|
665
|
-
}))), yield
|
|
587
|
+
}))), yield be(10);
|
|
666
588
|
const Zt = [];
|
|
667
589
|
E || ue.forEach((r) => {
|
|
668
|
-
r.hasAttribute("data-permanent") || (g(this,
|
|
590
|
+
r.hasAttribute("data-permanent") || (g(this, m, Xt).call(this, r) ? Zt.push(r) : r.remove());
|
|
669
591
|
});
|
|
670
|
-
const me = g(this,
|
|
671
|
-
!t(this,
|
|
592
|
+
const me = g(this, m, Ot).call(this, S.document.body);
|
|
593
|
+
!t(this, x).morphInsideScrollContainer && !c && g(this, m, Bt).call(this, S.document), document.documentElement.setAttribute(
|
|
672
594
|
"data-current-pathname",
|
|
673
595
|
d.pathname
|
|
674
596
|
), document.documentElement.setAttribute(
|
|
675
597
|
"data-current-leaf",
|
|
676
598
|
d.leaf
|
|
677
|
-
),
|
|
678
|
-
action:
|
|
599
|
+
), qt({
|
|
600
|
+
action: s,
|
|
679
601
|
pathname: d.pathname,
|
|
680
|
-
searchParameters: d.parameters || (
|
|
602
|
+
searchParameters: d.parameters || (p ? location.search : ""),
|
|
681
603
|
hash: d.hash
|
|
682
|
-
}), t(this, et).remove(),
|
|
683
|
-
const
|
|
684
|
-
t(this,
|
|
685
|
-
const
|
|
686
|
-
let
|
|
687
|
-
c ? (c.forEach((
|
|
688
|
-
const
|
|
689
|
-
|
|
690
|
-
}),
|
|
691
|
-
|
|
692
|
-
})) : (
|
|
693
|
-
const
|
|
694
|
-
E ||
|
|
695
|
-
|
|
604
|
+
}), t(this, et).remove(), n(this, tt, t(this, f)), n(this, f, d);
|
|
605
|
+
const xt = [];
|
|
606
|
+
t(this, lt).forEach((r, P) => {
|
|
607
|
+
const T = me[P], fe = getComputedStyle(r).getPropertyValue("--morph-duration");
|
|
608
|
+
let B = [], U = [];
|
|
609
|
+
c ? (c.forEach((u) => {
|
|
610
|
+
const v = r.querySelector(u), k = T.querySelector(u);
|
|
611
|
+
v && k && (U.push(v), B.push(k));
|
|
612
|
+
}), U.forEach((u) => {
|
|
613
|
+
u.parentElement && xt.push(u.parentElement);
|
|
614
|
+
})) : (B.push(...T.childNodes), U.push(...r.childNodes), xt.push(r));
|
|
615
|
+
const Ct = [];
|
|
616
|
+
E || U.forEach((u) => {
|
|
617
|
+
u instanceof HTMLElement && (this.destroyOldLinks(u), u.classList.add("old"), u.querySelectorAll(
|
|
696
618
|
"[data-morph-transfer]"
|
|
697
|
-
).forEach((
|
|
698
|
-
const ge =
|
|
699
|
-
|
|
700
|
-
element:
|
|
619
|
+
).forEach((k) => {
|
|
620
|
+
const ge = k.getAttribute("data-morph-transfer");
|
|
621
|
+
Ct.push({
|
|
622
|
+
element: k,
|
|
701
623
|
selector: ge
|
|
702
624
|
});
|
|
703
625
|
}));
|
|
704
|
-
}),
|
|
705
|
-
|
|
706
|
-
const
|
|
707
|
-
|
|
708
|
-
|
|
626
|
+
}), B.forEach((u) => {
|
|
627
|
+
u instanceof HTMLElement && (Ct.forEach((v) => {
|
|
628
|
+
const k = u.querySelector(v.selector);
|
|
629
|
+
k && k.replaceWith(
|
|
630
|
+
S.document.importNode(v.element, !0)
|
|
709
631
|
);
|
|
710
|
-
}), this.findNewLinks(
|
|
711
|
-
}), c ? E ?
|
|
712
|
-
|
|
713
|
-
}) :
|
|
714
|
-
var
|
|
715
|
-
(
|
|
716
|
-
|
|
717
|
-
|
|
632
|
+
}), this.findNewLinks(u), u.classList.add("new"));
|
|
633
|
+
}), c ? E ? B.forEach((u, v) => {
|
|
634
|
+
U[v] instanceof HTMLElement && U[v].append(...u.childNodes);
|
|
635
|
+
}) : B.forEach((u, v) => {
|
|
636
|
+
var k;
|
|
637
|
+
(k = U[v].parentElement) == null || k.insertBefore(
|
|
638
|
+
u,
|
|
639
|
+
U[v]
|
|
718
640
|
);
|
|
719
|
-
}) : r.prepend(...
|
|
720
|
-
E ||
|
|
721
|
-
|
|
722
|
-
}),
|
|
723
|
-
var
|
|
724
|
-
|
|
641
|
+
}) : r.prepend(...B), setTimeout(() => {
|
|
642
|
+
E || U.forEach((u) => {
|
|
643
|
+
u instanceof HTMLElement && u.classList.add("old-idle");
|
|
644
|
+
}), B.forEach((u) => {
|
|
645
|
+
var v;
|
|
646
|
+
u instanceof HTMLElement && ((v = u.parentElement) == null || v.style.setProperty(
|
|
725
647
|
"--new-content-height",
|
|
726
|
-
|
|
727
|
-
),
|
|
648
|
+
u.offsetHeight + "px"
|
|
649
|
+
), u.classList.add("new-idle"));
|
|
728
650
|
});
|
|
729
651
|
}, 0);
|
|
730
|
-
const _t =
|
|
652
|
+
const _t = Dt(Ht({}, kt), {
|
|
731
653
|
morphElement: r
|
|
732
654
|
});
|
|
733
|
-
|
|
655
|
+
q(document, "morphNewChildrenAdded", {
|
|
734
656
|
detail: _t
|
|
735
657
|
});
|
|
736
|
-
const pe = new Promise((
|
|
658
|
+
const pe = new Promise((u) => {
|
|
737
659
|
setTimeout(
|
|
738
660
|
() => {
|
|
739
|
-
E ||
|
|
740
|
-
|
|
741
|
-
}),
|
|
742
|
-
var
|
|
743
|
-
|
|
661
|
+
E || U.forEach((v) => {
|
|
662
|
+
v.remove();
|
|
663
|
+
}), B.forEach((v) => {
|
|
664
|
+
var k;
|
|
665
|
+
v instanceof HTMLElement && ((k = v.parentElement) == null || k.style.removeProperty(
|
|
744
666
|
"--new-content-height"
|
|
745
|
-
),
|
|
746
|
-
}), E ||
|
|
667
|
+
), v.classList.remove("new-idle", "new"));
|
|
668
|
+
}), E || q(document, "morphOldChildrenRemoved", {
|
|
747
669
|
detail: _t
|
|
748
|
-
}),
|
|
670
|
+
}), u();
|
|
749
671
|
},
|
|
750
672
|
(parseFloat(fe) || 0) * 1e3 + 10
|
|
751
673
|
);
|
|
752
674
|
});
|
|
753
|
-
t(this,
|
|
675
|
+
t(this, V).push(pe);
|
|
754
676
|
}), this.isPopstateNavigation ? document.documentElement.style.setProperty(
|
|
755
677
|
"--new-document-scroll-position",
|
|
756
|
-
(this.scrollValue.top -
|
|
678
|
+
(this.scrollValue.top - S.scrollState.y) * 1 + "px"
|
|
757
679
|
) : document.documentElement.style.setProperty(
|
|
758
680
|
"--new-document-scroll-position",
|
|
759
681
|
this.scrollValue.top + "px"
|
|
760
|
-
),
|
|
761
|
-
detail:
|
|
762
|
-
}),
|
|
763
|
-
centerScroll:
|
|
764
|
-
offsetScroll:
|
|
765
|
-
behavior:
|
|
766
|
-
})) :
|
|
767
|
-
|
|
768
|
-
|
|
682
|
+
), q(document, "morphBeforeNavigationScroll", {
|
|
683
|
+
detail: S.scrollState
|
|
684
|
+
}), G ? (S.clearScrollState(), g(this, m, Tt).call(this, G, {
|
|
685
|
+
centerScroll: a,
|
|
686
|
+
offsetScroll: o,
|
|
687
|
+
behavior: L
|
|
688
|
+
})) : d.hash ? (S.clearScrollState(), g(this, m, Tt).call(this, d.hash, {
|
|
689
|
+
centerScroll: a,
|
|
690
|
+
offsetScroll: o,
|
|
691
|
+
behavior: L
|
|
692
|
+
})) : t(this, j) ? S.restoreScrollPosition() : A || S.renewScrollPosition(), yield Promise.all(t(this, V)), E || Zt.forEach((r) => r.remove()), n(this, V, []), xt.forEach((r) => {
|
|
693
|
+
r.querySelectorAll("script").forEach((T) => {
|
|
694
|
+
T.replaceWith(g(this, m, Vt).call(this, T));
|
|
769
695
|
});
|
|
770
|
-
}), t(this,
|
|
771
|
-
r.checkCurrent(t(this,
|
|
772
|
-
}), this.findParamsDependent(),
|
|
773
|
-
detail:
|
|
696
|
+
}), t(this, b).forEach((r) => {
|
|
697
|
+
r.checkCurrent(t(this, f).path);
|
|
698
|
+
}), this.findParamsDependent(), q(document, "morphComplete", {
|
|
699
|
+
detail: kt
|
|
774
700
|
}), document.documentElement.style.removeProperty(
|
|
775
701
|
"--new-document-scroll-position"
|
|
776
702
|
), window.dispatchEvent(new Event("resize"));
|
|
777
703
|
} catch (X) {
|
|
778
704
|
console.error(X);
|
|
779
705
|
}
|
|
780
|
-
|
|
706
|
+
n(this, $, void 0);
|
|
781
707
|
});
|
|
782
708
|
}
|
|
783
709
|
addLink(e) {
|
|
784
|
-
t(this,
|
|
710
|
+
t(this, b).push(new It(e, this));
|
|
785
711
|
}
|
|
786
712
|
addLinks(e) {
|
|
787
|
-
e.forEach((
|
|
788
|
-
this.addLink(
|
|
713
|
+
e.forEach((s) => {
|
|
714
|
+
this.addLink(s);
|
|
789
715
|
});
|
|
790
716
|
}
|
|
791
717
|
removeLink(e) {
|
|
792
|
-
|
|
718
|
+
n(this, b, t(this, b).filter((s) => s.element === e ? (s.destroy(), !1) : !0));
|
|
793
719
|
}
|
|
794
720
|
destroyOldLinks(e) {
|
|
795
|
-
|
|
721
|
+
n(this, b, t(this, b).filter((s) => e.contains(s.element) ? (s.destroy(), !1) : !0));
|
|
796
722
|
}
|
|
797
723
|
findNewLinks(e) {
|
|
798
|
-
const
|
|
799
|
-
t(this,
|
|
724
|
+
const s = [...e.querySelectorAll("a")].filter(
|
|
725
|
+
t(this, Pt)
|
|
800
726
|
);
|
|
801
|
-
t(this,
|
|
802
|
-
...
|
|
727
|
+
t(this, b).push(
|
|
728
|
+
...s.map((a) => new It(a, this))
|
|
803
729
|
);
|
|
804
730
|
}
|
|
805
731
|
findLinks() {
|
|
806
732
|
const e = [
|
|
807
733
|
...document.documentElement.querySelectorAll("a")
|
|
808
|
-
].filter(t(this,
|
|
809
|
-
t(this,
|
|
734
|
+
].filter(t(this, Pt));
|
|
735
|
+
t(this, b).forEach((s) => s.destroy()), n(this, b, e.map((s) => new It(s, this)));
|
|
810
736
|
}
|
|
811
737
|
findParamsDependent() {
|
|
812
738
|
const e = [
|
|
@@ -814,55 +740,55 @@ const gt = class gt {
|
|
|
814
740
|
"[data-morph-params-dependent]"
|
|
815
741
|
)
|
|
816
742
|
];
|
|
817
|
-
t(this,
|
|
818
|
-
(
|
|
743
|
+
t(this, yt).forEach((s) => s.destroy()), n(this, yt, e.map(
|
|
744
|
+
(s) => new Re(s)
|
|
819
745
|
));
|
|
820
746
|
}
|
|
821
747
|
};
|
|
822
|
-
|
|
823
|
-
const
|
|
824
|
-
for (let
|
|
825
|
-
const
|
|
826
|
-
|
|
827
|
-
}
|
|
828
|
-
return e.hasAttribute("src") || (
|
|
829
|
-
},
|
|
830
|
-
const
|
|
831
|
-
let
|
|
832
|
-
return
|
|
748
|
+
x = new WeakMap(), lt = new WeakMap(), b = new WeakMap(), $ = new WeakMap(), f = new WeakMap(), tt = new WeakMap(), V = new WeakMap(), j = new WeakMap(), M = new WeakMap(), St = new WeakMap(), O = new WeakMap(), yt = new WeakMap(), et = new WeakMap(), ct = new WeakMap(), dt = new WeakMap(), bt = new WeakMap(), ut = new WeakMap(), wt = new WeakMap(), m = new WeakSet(), Vt = function(e) {
|
|
749
|
+
const s = document.createElement("script");
|
|
750
|
+
for (let a = 0; a < e.attributes.length; a++) {
|
|
751
|
+
const o = e.attributes[a];
|
|
752
|
+
s.setAttribute(o.name, o.value);
|
|
753
|
+
}
|
|
754
|
+
return e.hasAttribute("src") || (s.innerHTML = e.innerHTML), s;
|
|
755
|
+
}, Pt = new WeakMap(), ft = function(e) {
|
|
756
|
+
const s = this.normalizePath(e);
|
|
757
|
+
let a = t(this, O).get(s.pathname);
|
|
758
|
+
return a || (a = new re(this, s.pathname), t(this, O).set(s.pathname, a)), a;
|
|
833
759
|
}, Ot = function(e) {
|
|
834
|
-
const
|
|
835
|
-
return
|
|
836
|
-
}, de = function(e,
|
|
760
|
+
const s = [...e.querySelectorAll("[data-morph]")];
|
|
761
|
+
return s.length ? s : [e];
|
|
762
|
+
}, de = function(e, s) {
|
|
837
763
|
return e.filter(
|
|
838
|
-
(
|
|
839
|
-
(
|
|
764
|
+
(a) => s.find(
|
|
765
|
+
(o) => o.outerHTML === a.outerHTML
|
|
840
766
|
)
|
|
841
767
|
);
|
|
842
|
-
},
|
|
768
|
+
}, Ft = function(e, s) {
|
|
843
769
|
return e.filter(
|
|
844
|
-
(
|
|
845
|
-
(
|
|
770
|
+
(a) => !s.find(
|
|
771
|
+
(o) => o.outerHTML === a.outerHTML
|
|
846
772
|
)
|
|
847
773
|
);
|
|
848
774
|
}, Xt = function(e) {
|
|
849
775
|
return e.tagName === "SCRIPT" || e.tagName === "STYLE" || e.tagName === "LINK" && e.getAttribute("rel") === "stylesheet";
|
|
850
|
-
},
|
|
851
|
-
var
|
|
852
|
-
(
|
|
776
|
+
}, Bt = function(e) {
|
|
777
|
+
var s, a;
|
|
778
|
+
(s = t(this, M)) == null || s.removeEventListener(
|
|
853
779
|
"scroll",
|
|
854
|
-
t(this,
|
|
855
|
-
),
|
|
856
|
-
},
|
|
857
|
-
const
|
|
858
|
-
(typeof
|
|
859
|
-
scrollElement: t(this,
|
|
860
|
-
behavior: (
|
|
861
|
-
center:
|
|
862
|
-
offset:
|
|
780
|
+
t(this, mt)
|
|
781
|
+
), n(this, dt, 0), n(this, ct, 0), n(this, M, t(this, x).scrollSelector && e.querySelector(t(this, x).scrollSelector) || window), n(this, St, t(this, M) === window), (a = t(this, M)) == null || a.addEventListener("scroll", t(this, mt)), t(this, mt).call(this);
|
|
782
|
+
}, Tt = function(e, s) {
|
|
783
|
+
const a = typeof e == "string" ? document.getElementById(e) : e;
|
|
784
|
+
(typeof a == "number" || a) && we(a, {
|
|
785
|
+
scrollElement: t(this, M),
|
|
786
|
+
behavior: (s == null ? void 0 : s.behavior) || "instant",
|
|
787
|
+
center: s == null ? void 0 : s.centerScroll,
|
|
788
|
+
offset: s == null ? void 0 : s.offsetScroll
|
|
863
789
|
});
|
|
864
|
-
},
|
|
865
|
-
let
|
|
790
|
+
}, Mt = new WeakMap(), mt = new WeakMap(), pt.instance = null;
|
|
791
|
+
let ne = pt;
|
|
866
792
|
export {
|
|
867
|
-
|
|
793
|
+
ne as Morph
|
|
868
794
|
};
|