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