aptechka 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/lib/Composed-C2Vv1xxR.cjs +1 -0
  2. package/lib/Composed-DhtYBEmo.js +79 -0
  3. package/lib/abstract-elements/index.cjs +1 -1
  4. package/lib/abstract-elements/index.js +1 -1
  5. package/lib/canvas/index.cjs +1 -1
  6. package/lib/canvas/index.js +2 -2
  7. package/lib/component/Component.d.ts +29 -0
  8. package/lib/component/hooks/animation.d.ts +9 -0
  9. package/lib/component/hooks/context.d.ts +2 -0
  10. package/lib/component/hooks/intersection.d.ts +4 -0
  11. package/lib/component/hooks/resize.d.ts +6 -0
  12. package/lib/component/hooks/shadow.d.ts +1 -0
  13. package/lib/component/hooks/stores.d.ts +6 -0
  14. package/lib/component/hooks/style.d.ts +2 -0
  15. package/lib/component/index.cjs +1 -0
  16. package/lib/component/index.d.ts +7 -0
  17. package/lib/component/index.js +187 -0
  18. package/lib/connector/index.cjs +1 -1
  19. package/lib/connector/index.d.ts +4 -3
  20. package/lib/connector/index.js +24 -22
  21. package/lib/{createStylesheet-BsVHqHhr.cjs → createStylesheet-BoJwXvjE.cjs} +1 -1
  22. package/lib/{createStylesheet-ITfBHk7A.js → createStylesheet-DSgkNlUZ.js} +1 -1
  23. package/lib/element-constructor/ElementConstructor.d.ts +4 -3
  24. package/lib/element-constructor/index.cjs +1 -1
  25. package/lib/element-constructor/index.js +2 -2
  26. package/lib/element-constructor/tags.d.ts +2 -3
  27. package/lib/element-resizer/index.cjs +1 -1
  28. package/lib/element-resizer/index.d.ts +1 -1
  29. package/lib/element-resizer/index.js +2 -1
  30. package/lib/en3/core/en3.d.ts +2 -2
  31. package/lib/en3/objects/En3Clip.d.ts +1 -1
  32. package/lib/{index-COirQu7j.js → index-228VqUsZ.js} +2 -2
  33. package/lib/{index-Bt91QUTY.cjs → index-Cv4y7_7y.cjs} +1 -1
  34. package/lib/intersector/index.cjs +1 -1
  35. package/lib/intersector/index.d.ts +1 -1
  36. package/lib/intersector/index.js +2 -1
  37. package/lib/layout-box/index.cjs +1 -1
  38. package/lib/layout-box/index.d.ts +2 -2
  39. package/lib/layout-box/index.js +70 -72
  40. package/lib/modal/index.cjs +1 -1
  41. package/lib/modal/index.js +2 -2
  42. package/lib/object-C1ph624j.cjs +1 -0
  43. package/lib/object-DIPjdukP.js +73 -0
  44. package/lib/popover/index.cjs +1 -1
  45. package/lib/popover/index.js +79 -71
  46. package/lib/router/Route.d.ts +8 -2
  47. package/lib/router/index.cjs +1 -1
  48. package/lib/router/index.d.ts +1 -2
  49. package/lib/router/index.js +139 -140
  50. package/lib/scroll/index.cjs +1 -1
  51. package/lib/scroll/index.js +2 -2
  52. package/lib/select/index.cjs +1 -1
  53. package/lib/select/index.js +1 -1
  54. package/lib/store/index.cjs +1 -1
  55. package/lib/store/index.js +48 -111
  56. package/lib/studio/index.cjs +1 -1
  57. package/lib/studio/index.js +3 -3
  58. package/lib/tags-920hsh9U.cjs +1 -0
  59. package/lib/tags-kZqsS_nJ.js +793 -0
  60. package/lib/theme/index.cjs +1 -1
  61. package/lib/theme/index.js +1 -1
  62. package/lib/ticker/index.cjs +1 -1
  63. package/lib/ticker/index.d.ts +1 -1
  64. package/lib/ticker/index.js +42 -36
  65. package/lib/utils/dom.d.ts +2 -2
  66. package/lib/utils/index.cjs +1 -1
  67. package/lib/utils/index.d.ts +1 -1
  68. package/lib/utils/index.js +113 -168
  69. package/lib/utils/object.d.ts +1 -0
  70. package/package.json +10 -2
  71. package/lib/router/RouteElement.d.ts +0 -14
  72. package/lib/tags-8Y7LSTwg.js +0 -779
  73. package/lib/tags-pcim-Cws.cjs +0 -1
@@ -1,55 +1,55 @@
1
- var it = Object.defineProperty;
2
- var Z = (i, t) => (t = Symbol[i]) ? t : Symbol.for("Symbol." + i);
3
- var rt = (i, t, s) => t in i ? it(i, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : i[t] = s;
4
- var K = (i, t, s) => (rt(i, typeof t != "symbol" ? t + "" : t, s), s), G = (i, t, s) => {
1
+ var st = Object.defineProperty;
2
+ var V = (i, t) => (t = Symbol[i]) ? t : Symbol.for("Symbol." + i);
3
+ var it = (i, t, s) => t in i ? st(i, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : i[t] = s;
4
+ var B = (i, t, s) => (it(i, typeof t != "symbol" ? t + "" : t, s), s), z = (i, t, s) => {
5
5
  if (!t.has(i))
6
6
  throw TypeError("Cannot " + s);
7
7
  };
8
- var e = (i, t, s) => (G(i, t, "read from private field"), s ? s.call(i) : t.get(i)), o = (i, t, s) => {
8
+ var e = (i, t, s) => (z(i, t, "read from private field"), s ? s.call(i) : t.get(i)), n = (i, t, s) => {
9
9
  if (t.has(i))
10
10
  throw TypeError("Cannot add the same private member more than once");
11
11
  t instanceof WeakSet ? t.add(i) : t.set(i, s);
12
- }, n = (i, t, s, r) => (G(i, t, "write to private field"), r ? r.call(i, s) : t.set(i, s), s);
13
- var J = (i, t, s) => (G(i, t, "access private method"), s);
14
- var W = (i, t, s) => new Promise((r, l) => {
15
- var a = (f) => {
12
+ }, r = (i, t, s, o) => (z(i, t, "write to private field"), o ? o.call(i, s) : t.set(i, s), s);
13
+ var F = (i, t, s) => (z(i, t, "access private method"), s);
14
+ var D = (i, t, s) => new Promise((o, f) => {
15
+ var h = (u) => {
16
16
  try {
17
- d(s.next(f));
17
+ d(s.next(u));
18
18
  } catch (T) {
19
- l(T);
19
+ f(T);
20
20
  }
21
- }, u = (f) => {
21
+ }, a = (u) => {
22
22
  try {
23
- d(s.throw(f));
23
+ d(s.throw(u));
24
24
  } catch (T) {
25
- l(T);
25
+ f(T);
26
26
  }
27
- }, d = (f) => f.done ? r(f.value) : Promise.resolve(f.value).then(a, u);
27
+ }, d = (u) => u.done ? o(u.value) : Promise.resolve(u.value).then(h, a);
28
28
  d((s = s.apply(i, t)).next());
29
29
  });
30
- var Q = (i, t, s) => (t = i[Z("asyncIterator")]) ? t.call(i) : (i = i[Z("iterator")](), t = {}, s = (r, l) => (l = i[r]) && (t[r] = (a) => new Promise((u, d, f) => (a = l.call(i, a), f = a.done, Promise.resolve(a.value).then((T) => u({ value: T, done: f }), d)))), s("next"), s("return"), t);
30
+ var G = (i, t, s) => (t = i[V("asyncIterator")]) ? t.call(i) : (i = i[V("iterator")](), t = {}, s = (o, f) => (f = i[o]) && (t[o] = (h) => new Promise((a, d, u) => (h = f.call(i, h), u = h.done, Promise.resolve(h.value).then((T) => a({ value: T, done: u }), d)))), s("next"), s("return"), t);
31
31
  import { URLPattern as ot } from "urlpattern-polyfill";
32
- import { Notifier as nt } from "../notifier/index.js";
33
- import { i as tt } from "../browser-0zX67oeU.js";
34
- import { d as at } from "../function-C10DGppn.js";
35
- import { CustomElement as ht } from "../custom-element/index.js";
36
- var R, H, b, m, c, P, A, v, w, E, Y, et;
37
- class ct {
32
+ import { Notifier as rt } from "../notifier/index.js";
33
+ import { i as _ } from "../browser-0zX67oeU.js";
34
+ import { d as nt } from "../function-C10DGppn.js";
35
+ import { i as X } from "../object-DIPjdukP.js";
36
+ var R, H, b, m, l, v, A, w, P, E, K, tt;
37
+ class ht {
38
38
  constructor(t, s) {
39
- o(this, Y);
40
- o(this, R, void 0);
41
- o(this, H, void 0);
42
- o(this, b, void 0);
43
- o(this, m, void 0);
44
- o(this, c, void 0);
45
- o(this, P, void 0);
46
- o(this, A, void 0);
47
- o(this, v, null);
48
- o(this, w, []);
49
- o(this, E, []);
50
- n(this, R, t), n(this, H, s), n(this, b, new URLPattern({ pathname: e(this, R) })), n(this, m, null), n(this, c, null), n(this, P, !1), n(this, A, null), tt && n(this, v, new MutationObserver((r) => {
51
- r[0].addedNodes.forEach((a) => {
52
- e(this, m) ? e(this, E).push(a) : e(this, w).push(a);
39
+ n(this, K);
40
+ n(this, R, void 0);
41
+ n(this, H, void 0);
42
+ n(this, b, void 0);
43
+ n(this, m, void 0);
44
+ n(this, l, void 0);
45
+ n(this, v, void 0);
46
+ n(this, A, void 0);
47
+ n(this, w, null);
48
+ n(this, P, []);
49
+ n(this, E, []);
50
+ r(this, R, t), r(this, H, s), r(this, b, new URLPattern({ pathname: e(this, R) })), r(this, m, null), r(this, l, null), r(this, v, !1), r(this, A, null), _ && r(this, w, new MutationObserver((o) => {
51
+ o[0].addedNodes.forEach((h) => {
52
+ e(this, m) ? e(this, E).push(h) : e(this, P).push(h);
53
53
  });
54
54
  }));
55
55
  }
@@ -60,10 +60,10 @@ class ct {
60
60
  return e(this, b);
61
61
  }
62
62
  get isActive() {
63
- return e(this, P);
63
+ return e(this, v);
64
64
  }
65
65
  get element() {
66
- return e(this, c);
66
+ return e(this, l);
67
67
  }
68
68
  get outlet() {
69
69
  return e(this, A);
@@ -72,71 +72,84 @@ class ct {
72
72
  return this.urlPattern.test({ pathname: t });
73
73
  }
74
74
  render(t, s) {
75
- return W(this, null, function* () {
76
- var r, l;
77
- if (e(this, v).observe(document.head, { childList: !0, subtree: !0 }), e(this, m))
78
- e(this, w).forEach((a) => {
79
- document.head.appendChild(a);
75
+ return D(this, null, function* () {
76
+ var o, f;
77
+ if (e(this, w).observe(document.head, {
78
+ childList: !0,
79
+ subtree: !0
80
+ }), e(this, m))
81
+ e(this, P).forEach((h) => {
82
+ document.head.appendChild(h);
80
83
  });
81
84
  else {
82
- const a = yield e(this, H).call(this);
83
- n(this, E, [...e(this, w)]), typeof a.default == "function" && (n(this, m, a.default), customElements.define("e-" + ((r = e(this, m)) == null ? void 0 : r.name.toLowerCase()), a.default));
85
+ const h = yield e(this, H).call(this);
86
+ if (r(this, E, [...e(this, P)]), typeof h.default == "function" && (r(this, m, h.default), X(h.default))) {
87
+ const a = "e-" + ((o = e(this, m)) == null ? void 0 : o.name.toLowerCase());
88
+ customElements.get(a) || customElements.define(a, h.default);
89
+ }
84
90
  }
85
- if (yield J(this, Y, et).call(this), e(this, m)) {
86
- const a = e(this, b).exec({ pathname: s }), u = (a == null ? void 0 : a.pathname.groups) || {}, d = Object.fromEntries(new URLSearchParams(location.search)), f = {
87
- pathnameParams: u,
91
+ if (yield F(this, K, tt).call(this), e(this, m)) {
92
+ const h = e(this, b).exec({ pathname: s }), a = (h == null ? void 0 : h.pathname.groups) || {}, d = Object.fromEntries(
93
+ new URLSearchParams(location.search)
94
+ ), u = {
95
+ pathnameParams: a,
88
96
  searchParams: d
89
97
  };
90
- n(this, c, new (e(this, m))(f)), t.appendChild(e(this, c)), n(this, A, e(this, c).querySelector("[data-outlet]") || ((l = e(this, c).shadowRoot) == null ? void 0 : l.querySelector("[data-outlet]")) || e(this, c).shadowRoot || e(this, c)), n(this, P, !0);
98
+ X(e(this, m)) ? r(this, l, new (e(this, m))(
99
+ u
100
+ )) : r(this, l, e(this, m).call(this, u)), t.appendChild(e(this, l)), r(this, A, e(this, l).querySelector("[data-outlet]") || ((f = e(this, l).shadowRoot) == null ? void 0 : f.querySelector("[data-outlet]")) || e(this, l).shadowRoot || e(this, l)), r(this, v, !0);
91
101
  }
92
- e(this, v).disconnect();
102
+ e(this, w).disconnect();
93
103
  });
94
104
  }
95
105
  close() {
96
106
  var t;
97
- e(this, v).disconnect(), (t = e(this, c)) == null || t.remove(), n(this, P, !1), e(this, E).forEach((s) => document.head.removeChild(s)), n(this, E, []);
107
+ e(this, w).disconnect(), (t = e(this, l)) == null || t.remove(), r(this, v, !1), e(this, E).forEach((s) => document.head.removeChild(s)), r(this, E, []);
98
108
  }
99
109
  getAnchorElements() {
100
110
  var s;
101
111
  let t = [];
102
- return e(this, c) && (t = [...e(this, c).querySelectorAll("a")]), (s = e(this, c)) != null && s.shadowRoot && (t = [...t, ...e(this, c).shadowRoot.querySelectorAll("a")]), t;
112
+ return e(this, l) && (t = [...e(this, l).querySelectorAll("a")]), (s = e(this, l)) != null && s.shadowRoot && (t = [
113
+ ...t,
114
+ ...e(this, l).shadowRoot.querySelectorAll("a")
115
+ ]), t;
103
116
  }
104
117
  }
105
- R = new WeakMap(), H = new WeakMap(), b = new WeakMap(), m = new WeakMap(), c = new WeakMap(), P = new WeakMap(), A = new WeakMap(), v = new WeakMap(), w = new WeakMap(), E = new WeakMap(), Y = new WeakSet(), et = function() {
106
- return W(this, null, function* () {
107
- const t = e(this, w).filter((u) => u instanceof HTMLElement ? u.tagName === "STYLE" || u.tagName === "SCRIPT" || u.tagName === "LINK" : !1);
118
+ R = new WeakMap(), H = new WeakMap(), b = new WeakMap(), m = new WeakMap(), l = new WeakMap(), v = new WeakMap(), A = new WeakMap(), w = new WeakMap(), P = new WeakMap(), E = new WeakMap(), K = new WeakSet(), tt = function() {
119
+ return D(this, null, function* () {
120
+ const t = e(this, P).filter((a) => a instanceof HTMLElement ? a.tagName === "STYLE" || a.tagName === "SCRIPT" || a.tagName === "LINK" : !1);
108
121
  try {
109
- for (var s = Q(t), r, l, a; r = !(l = yield s.next()).done; r = !1) {
110
- const u = l.value;
122
+ for (var s = G(t), o, f, h; o = !(f = yield s.next()).done; o = !1) {
123
+ const a = f.value;
111
124
  yield new Promise((d) => {
112
- u.onload = () => {
125
+ a.onload = () => {
113
126
  d();
114
127
  };
115
128
  });
116
129
  }
117
- } catch (l) {
118
- a = [l];
130
+ } catch (f) {
131
+ h = [f];
119
132
  } finally {
120
133
  try {
121
- r && (l = s.return) && (yield l.call(s));
134
+ o && (f = s.return) && (yield f.call(s));
122
135
  } finally {
123
- if (a)
124
- throw a[0];
136
+ if (h)
137
+ throw h[0];
125
138
  }
126
139
  }
127
140
  });
128
141
  };
129
142
  var O, p, S, x, I;
130
- class lt {
143
+ class at {
131
144
  constructor(t, s) {
132
- o(this, O, void 0);
133
- o(this, p, void 0);
134
- o(this, S, void 0);
135
- o(this, x, void 0);
136
- o(this, I, (t) => {
145
+ n(this, O, void 0);
146
+ n(this, p, void 0);
147
+ n(this, S, void 0);
148
+ n(this, x, void 0);
149
+ n(this, I, (t) => {
137
150
  t.preventDefault(), e(this, O).navigate(e(this, S), e(this, x));
138
151
  });
139
- n(this, O, t), n(this, p, s), n(this, S, e(this, p).getAttribute("href") || "/"), n(this, x, e(this, p).getAttribute("data-history-action") || "push"), e(this, p).addEventListener("click", e(this, I)), location.pathname === e(this, S) && e(this, p).classList.add("current");
152
+ r(this, O, t), r(this, p, s), r(this, S, e(this, p).getAttribute("href") || "/"), r(this, x, e(this, p).getAttribute("data-history-action") || "push"), e(this, p).addEventListener("click", e(this, I)), location.pathname === e(this, S) && e(this, p).classList.add("current");
140
153
  }
141
154
  destroy() {
142
155
  e(this, p).removeEventListener("click", e(this, I)), e(this, p).classList.remove("current");
@@ -144,28 +157,28 @@ class lt {
144
157
  }
145
158
  O = new WeakMap(), p = new WeakMap(), S = new WeakMap(), x = new WeakMap(), I = new WeakMap();
146
159
  globalThis.URLPattern = ot;
147
- var k, N, g, C, M, L, q, j, $, z, st, F;
160
+ var k, N, g, C, M, L, q, j, W, Y, et, $;
148
161
  const U = class U {
149
162
  constructor(t) {
150
- o(this, z);
151
- o(this, k, null);
152
- o(this, N, void 0);
153
- o(this, g, []);
154
- o(this, C, null);
155
- o(this, M, []);
156
- o(this, L, void 0);
157
- o(this, q, null);
158
- o(this, j, new nt());
159
- K(this, "preprocessor");
160
- K(this, "postprocessor");
161
- o(this, $, at(() => {
163
+ n(this, Y);
164
+ n(this, k, null);
165
+ n(this, N, void 0);
166
+ n(this, g, []);
167
+ n(this, C, null);
168
+ n(this, M, []);
169
+ n(this, L, void 0);
170
+ n(this, q, null);
171
+ n(this, j, new rt());
172
+ B(this, "preprocessor");
173
+ B(this, "postprocessor");
174
+ n(this, W, nt(() => {
162
175
  const t = (s) => s.split("/").length;
163
- n(this, g, e(this, g).sort((s, r) => t(s.pattern) - t(r.pattern))), this.navigate(location.pathname.replace(e(this, N), ""));
176
+ r(this, g, e(this, g).sort((s, o) => t(s.pattern) - t(o.pattern))), this.navigate(location.pathname.replace(e(this, N), ""));
164
177
  }, 0));
165
- o(this, F, (t) => {
178
+ n(this, $, (t) => {
166
179
  t.state && this.navigate(t.state, "none");
167
180
  });
168
- n(this, N, (t == null ? void 0 : t.base) || ""), U.active = this, tt && (n(this, k, (t == null ? void 0 : t.rootElement) || document.body), addEventListener("popstate", e(this, F)));
181
+ r(this, N, (t == null ? void 0 : t.base) || ""), U.active = this, _ && (r(this, k, (t == null ? void 0 : t.rootElement) || document.body), addEventListener("popstate", e(this, $)));
169
182
  }
170
183
  get currentPathname() {
171
184
  return e(this, q);
@@ -180,87 +193,73 @@ const U = class U {
180
193
  return e(this, j).subscribe(t);
181
194
  }
182
195
  defineRoute(t, s) {
183
- const r = new ct(t, s);
184
- e(this, g).push(r), e(this, $).call(this);
196
+ const o = new ht(t, s);
197
+ e(this, g).push(o), e(this, W).call(this);
185
198
  }
186
199
  navigate(t, s = "push") {
187
- return W(this, null, function* () {
188
- var f, V;
200
+ return D(this, null, function* () {
201
+ var u, J;
189
202
  if (e(this, L) === t || e(this, q) === t)
190
203
  return;
191
- U.active = this, n(this, L, t);
192
- const r = e(this, g).filter((h) => h.isActive), l = e(this, g).filter(
193
- (h) => !r.includes(h) && h.testPathname(t)
194
- ), a = r.filter((h) => !h.testPathname(t)), u = r.filter((h) => h.testPathname(t));
204
+ U.active = this, r(this, L, t);
205
+ const o = e(this, g).filter((c) => c.isActive), f = e(this, g).filter(
206
+ (c) => !o.includes(c) && c.testPathname(t)
207
+ ), h = o.filter((c) => !c.testPathname(t)), a = o.filter((c) => c.testPathname(t));
195
208
  let d = !0;
196
209
  if (this.preprocessor)
197
210
  try {
198
- yield new Promise((h, y) => {
199
- var X;
200
- (X = this.preprocessor) == null || X.call(this, { pathname: t, resolve: h, reject: y });
211
+ yield new Promise((c, y) => {
212
+ var Q;
213
+ (Q = this.preprocessor) == null || Q.call(this, { pathname: t, resolve: c, reject: y });
201
214
  });
202
- } catch (h) {
203
- h ? console.error(h) : console.log("Route change canceled"), d = !1;
215
+ } catch (c) {
216
+ c ? console.error(c) : console.log("Route change canceled"), d = !1;
204
217
  }
205
218
  if (d && e(this, L) === t) {
206
- n(this, C, u[u.length - 1]), a.forEach((y) => {
219
+ r(this, C, a[a.length - 1]), h.forEach((y) => {
207
220
  y.close();
208
- }), n(this, q, t);
221
+ }), r(this, q, t);
209
222
  try {
210
- for (var T = Q(l), Et, Lt, yt; Et = !(Lt = yield T.next()).done; Et = !1) {
211
- const y = Lt.value;
212
- yield y.render(((f = e(this, C)) == null ? void 0 : f.outlet) || e(this, k), t), n(this, C, y);
223
+ for (var T = G(f), vt, wt, Pt; vt = !(wt = yield T.next()).done; vt = !1) {
224
+ const y = wt.value;
225
+ yield y.render(
226
+ ((u = e(this, C)) == null ? void 0 : u.outlet) || e(this, k),
227
+ t
228
+ ), r(this, C, y);
213
229
  }
214
- } catch (Lt) {
215
- yt = [Lt];
230
+ } catch (wt) {
231
+ Pt = [wt];
216
232
  } finally {
217
233
  try {
218
- Et && (Lt = T.return) && (yield Lt.call(T));
234
+ vt && (wt = T.return) && (yield wt.call(T));
219
235
  } finally {
220
- if (yt)
221
- throw yt[0];
236
+ if (Pt)
237
+ throw Pt[0];
222
238
  }
223
239
  }
224
- const h = e(this, N) + t + location.search;
225
- s === "push" ? history.pushState(h, "", h) : s === "replace" && history.replaceState(h, "", h), J(this, z, st).call(this), (V = this.postprocessor) == null || V.call(this, { pathname: t }), e(this, j).notify({ pathname: t });
240
+ const c = e(this, N) + t + location.search;
241
+ s === "push" ? history.pushState(c, "", c) : s === "replace" && history.replaceState(c, "", c), F(this, Y, et).call(this), (J = this.postprocessor) == null || J.call(this, { pathname: t }), e(this, j).notify({ pathname: t });
226
242
  }
227
243
  });
228
244
  }
229
245
  };
230
- k = new WeakMap(), N = new WeakMap(), g = new WeakMap(), C = new WeakMap(), M = new WeakMap(), L = new WeakMap(), q = new WeakMap(), j = new WeakMap(), $ = new WeakMap(), z = new WeakSet(), st = function() {
231
- const t = e(this, g).filter((r) => r.isActive), s = Array.from(
246
+ k = new WeakMap(), N = new WeakMap(), g = new WeakMap(), C = new WeakMap(), M = new WeakMap(), L = new WeakMap(), q = new WeakMap(), j = new WeakMap(), W = new WeakMap(), Y = new WeakSet(), et = function() {
247
+ const t = e(this, g).filter((o) => o.isActive), s = Array.from(
232
248
  new Set(
233
249
  [
234
250
  ...e(this, k).querySelectorAll("a"),
235
- ...t.map((r) => r.getAnchorElements()).flat()
236
- ].filter((r) => {
237
- var l;
238
- return (l = r.getAttribute("href")) == null ? void 0 : l.startsWith("/");
251
+ ...t.map((o) => o.getAnchorElements()).flat()
252
+ ].filter((o) => {
253
+ var f;
254
+ return (f = o.getAttribute("href")) == null ? void 0 : f.startsWith("/");
239
255
  })
240
256
  )
241
257
  );
242
- e(this, M).forEach((r) => {
243
- r.destroy();
244
- }), n(this, M, s.map((r) => new lt(this, r)));
245
- }, F = new WeakMap(), K(U, "active");
246
- let _ = U;
247
- var B, D;
248
- class Pt extends ht {
249
- constructor(s) {
250
- super();
251
- o(this, B, void 0);
252
- o(this, D, void 0);
253
- n(this, B, s.pathnameParams), n(this, D, s.searchParams);
254
- }
255
- get pathnameParams() {
256
- return e(this, B);
257
- }
258
- get searchParams() {
259
- return e(this, D);
260
- }
261
- }
262
- B = new WeakMap(), D = new WeakMap();
258
+ e(this, M).forEach((o) => {
259
+ o.destroy();
260
+ }), r(this, M, s.map((o) => new at(this, o)));
261
+ }, $ = new WeakMap(), B(U, "active");
262
+ let Z = U;
263
263
  export {
264
- Pt as RouteElement,
265
- _ as Router
264
+ Z as Router
266
265
  };
@@ -1 +1 @@
1
- "use strict";var Ct=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var h=(s,e,i)=>(Ct(s,e,"read from private field"),i?i.call(s):e.get(s)),D=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},O=(s,e,i,n)=>(Ct(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qt=require("../Store-D0_rDIsE.cjs"),Dt=require("../Derived-SjPdLJiZ.cjs"),At=require("../browser-CpzFX2xg.cjs"),I=require("../layout-8ryRAMGJ.cjs"),zt=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Tt=require("../Damped-BwpMU9Gi.cjs"),x=require("../attribute/index.cjs"),Mt=require("../WheelControls-CfDeGCOU.cjs"),gt=require("../custom-element/index.cjs"),xt=require("../order/index.cjs"),pt=require("../window-resizer/index.cjs"),H=require("../scroll-entries/index.cjs"),P=require("../tags-pcim-Cws.cjs"),Lt=require("../createStylesheet-BsVHqHhr.cjs"),Vt=require("../dom-qY2LdCVL.cjs");var It=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Ft=(s,e,i,n)=>{for(var r=n>1?void 0:n?Ht(e,i):e,d=s.length-1,g;d>=0;d--)(g=s[d])&&(r=(n?g(e,i,r):g(r))||r);return n&&r&&It(e,i,r),r},yt=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},t=(s,e,i)=>(yt(s,e,"read from private field"),i?i.call(s):e.get(s)),l=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},m=(s,e,i,n)=>(yt(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i),f=(s,e,i)=>(yt(s,e,"access private method"),i),a,M,T,$,V,X,y,Y,j,tt,u,dt,c,et,it,_,p,k,F,b,G,R,N,ft,B,U,mt,kt,bt,Wt,st,vt,rt,_t,q,wt,St,Ot,nt,ht,Et,S,w,L,W;class Bt{constructor(e,i){D(this,S,void 0);D(this,w,void 0);D(this,L,0);D(this,W,0);O(this,S,e),O(this,w,i),H.scrollEntries.register(h(this,S))}get size(){return h(this,L)}get position(){return h(this,W)}destroy(){H.scrollEntries.unregister(h(this,S)),h(this,S).style.transform=""}resize(){O(this,L,h(this,w).vertical?h(this,S).offsetHeight:h(this,S).offsetWidth),O(this,W,h(this,w).vertical?I.getCumulativeOffsetTop(h(this,S)):I.getCumulativeOffsetLeft(h(this,S))),O(this,W,h(this,W)-h(this,w).contentPosition)}transform(){let e=0;h(this,w).infiniteAttribute.current&&h(this,w).overscroll&&h(this,W)+h(this,L)<h(this,w).currentScrollValue&&(e=h(this,w).distance*-1),H.scrollEntries.update(h(this,S),h(this,w).axisAttibute.current,e);const i=h(this,w).viewportSize-h(this,L),n=zt.clamp(h(this,w).currentScrollValue+e,h(this,W)-h(this,w).viewportSize-i,h(this,W)+h(this,L)+i);h(this,w).vertical?h(this,S).style.transform=`translate3d(0px, ${n*-1}px, 0px)`:h(this,S).style.transform=`translate3d(${n*-1}px, 0px, 0px)`}}S=new WeakMap,w=new WeakMap,L=new WeakMap,W=new WeakMap;const Gt=Lt.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends gt.CustomElement{constructor(e){if(super(),l(this,N),l(this,B),l(this,mt),l(this,bt),l(this,st),l(this,rt),l(this,St),l(this,ht),l(this,a,null),l(this,M,new x.Attribute(this,"axis","y")),l(this,T,new x.Attribute(this,"pages",0,{validate:i=>Math.max(0,i-1)})),l(this,$,new x.Attribute(this,"split",!1)),l(this,V,new x.Attribute(this,"sectional",!1)),l(this,X,new x.Attribute(this,"wheel-max-delta",!1)),l(this,y,new x.Attribute(this,"infinite",!1)),l(this,Y,new x.Attribute(this,"damping",.03)),l(this,j,new x.Attribute(this,"disabled",!1)),l(this,tt,new x.Attribute(this,"hibernated",!1)),l(this,u,null),l(this,dt,null),l(this,c,[]),l(this,et,0),l(this,it,0),l(this,_,0),l(this,p,0),l(this,k,null),l(this,F,null),l(this,b,new qt.Store(0)),l(this,G,0),l(this,R,0),l(this,q,()=>{const i=this.currentScrollValue/t(this,p);if(m(this,et,this.vertical?I.getCumulativeOffsetTop(this):I.getCumulativeOffsetLeft(this)),m(this,it,this.vertical?I.getCumulativeOffsetTop(t(this,u)):I.getCumulativeOffsetLeft(t(this,u))),m(this,_,this.vertical?this.offsetHeight:this.offsetWidth),t(this,T).current){m(this,p,t(this,_)*t(this,T).current);const n=t(this,p)+t(this,_);this.vertical?(t(this,u).style.width=n+"px",t(this,u).style.height="100%"):(t(this,u).style.height=n+"px",t(this,u).style.width="100%")}else this.vertical?(t(this,u).style.width="100%",t(this,u).style.height="max-content",m(this,p,t(this,u).offsetHeight-t(this,_))):(t(this,u).style.width="max-content",t(this,u).style.height="100%",m(this,p,t(this,u).offsetWidth-t(this,_)));if(!t(this,y).current){const n=getComputedStyle(this);m(this,p,t(this,p)+(this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd))),t(this,a).max.current=t(this,p)}if(t(this,c).forEach(n=>{n.resize(),n.transform()}),t(this,y).current&&t(this,c).length){const n=t(this,c)[t(this,c).length-1],r=n.position+n.size-t(this,_),d=t(this,p)-r;m(this,R,n.position+n.size+d)}else m(this,R,t(this,p));if(t(this,V).current&&t(this,c).length){const n=t(this,c)[t(this,b).current];t(this,a).set(n.position,!0)}else t(this,a).set(i*t(this,p),!0)}),l(this,wt,()=>{const i=this.currentScrollValue;if(m(this,G,Math.max(0,i-t(this,p))),t(this,c).length){let n=0;for(let r=0;r<t(this,c).length;r++){const d=t(this,c)[r];d.transform(),this.targetScrollValue+this.viewportSize/2>=d.position&&(n=r)}t(this,b).current=n}else this.vertical?t(this,u).style.transform=`translate3d(0px, ${i*-1}px, 0px)`:t(this,u).style.transform=`translate3d(${i*-1}px, 0px, 0px)`;H.scrollEntries.update(this,t(this,M).current,i)}),l(this,nt,i=>{if(typeof i=="number")if(t(this,V).current){const n=Math.sign(i);t(this,c).length?this.shiftSections(n):t(this,a).shift(n*t(this,_))}else t(this,a).shift(i);else i==="min"?t(this,a).set(t(this,a).min.current):i==="max"&&t(this,a).set(t(this,a).delta)}),At.isBrowser){let i,n=e||this.getAttribute("name");n&&(i={name:n}),m(this,a,new Tt.Damped({damping:.01,min:0,order:xt.TICK_ORDER.SCROLL,passport:i})),this.openShadow(Gt),P.element(this,{tabIndex:0,children:[P.div({class:"static",children:[P.slot({name:"static"})]}),P.div({class:"content",children:[P.slot({ref:r=>m(this,dt,r)})],style:{flexDirection:new Dt.Derived(t(this,M),r=>r==="x"?"row":"column")},ref:r=>m(this,u,r)})]}),m(this,k,new Mt.WheelControls({element:this})),t(this,k).changeEvent.subscribe(t(this,nt)),m(this,F,new Mt.KeyboardControls({element:this})),t(this,F).changeEvent.subscribe(t(this,nt)),t(this,M).subscribe(({current:r})=>{t(this,u).style.flexDirection=r==="x"?"row":"column",t(this,k).axis=t(this,X).current?"max":r,this.isConnected&&t(this,q).call(this)}),t(this,X).subscribe(r=>{t(this,k).axis=r.current?"max":t(this,M).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,$).subscribe(({current:r})=>{this.isConnected&&(r?f(this,N,ft).call(this):f(this,B,U).call(this))}),t(this,V).subscribe(r=>{t(this,b).current=0,t(this,k).debounce=r.current,t(this,a).reset(),this.isConnected&&(r.current&&!r.previous?f(this,N,ft).call(this):!r.current&&r.previous&&f(this,B,U).call(this))}),t(this,y).subscribe(r=>{r.current?(this.isConnected&&(t(this,c).length||(t(this,$).current=!0)),t(this,c).length&&(t(this,a).max.current=1/0,t(this,a).min.current=-1/0)):(m(this,G,0),t(this,a).max.current=t(this,p),t(this,a).min.current=0)}),t(this,Y).subscribe(r=>{t(this,a).damping=r.current}),t(this,j).subscribe(r=>{r.current&&!r.previous?f(this,mt,kt).call(this):!r.current&&r.previous&&f(this,bt,Wt).call(this)}),t(this,tt).subscribe(r=>{r.current&&!r.previous?f(this,st,vt).call(this):!r.current&&r.previous&&f(this,rt,_t).call(this)})}}get currentScrollValue(){return f(this,ht,Et).call(this,"current")}get targetScrollValue(){return f(this,ht,Et).call(this,"target")}get damped(){return t(this,a)}get dampedAttibute(){return t(this,a)}get axisAttibute(){return t(this,M)}get pagesAttibute(){return t(this,T)}get splitAttibute(){return t(this,$)}get sectionalAttibute(){return t(this,V)}get infiniteAttribute(){return t(this,y)}get dampingAttibute(){return t(this,Y)}get disabledAttibute(){return t(this,j)}get hibernatedAttibute(){return t(this,tt)}get contentElement(){return t(this,u)}get position(){return t(this,et)}get contentPosition(){return t(this,it)}get viewportSize(){return t(this,_)}get scrollSize(){return t(this,p)}get counter(){return t(this,b)}get distance(){return t(this,R)}get overscroll(){return t(this,G)}get vertical(){return t(this,M).current==="y"}get currentProgress(){return this.currentScrollValue/t(this,R)}get targetProgress(){return this.targetScrollValue/t(this,R)}scrollToSection(e,i="smooth"){if(!t(this,c).length)return;const n=t(this,b).current;f(this,St,Ot).call(this,e);const r=t(this,c)[n],d=t(this,c)[t(this,b).current];if(r&&d){let g=0;const Q=t(this,c).length-1;t(this,y).current?t(this,b).current===0&&n===Q?g=t(this,p)+t(this,_)-r.position:t(this,b).current===Q&&n===0?g=d.position-(t(this,p)+t(this,_)):g=d.position-r.position:g=d.position-r.position,t(this,a).shift(g,i==="instant")}}shiftSections(e,i="smooth"){t(this,c).length&&this.scrollToSection(t(this,b).current+e,i)}connectedCallback(){f(this,rt,_t).call(this)}disconnectedCallback(){f(this,st,vt).call(this)}};a=new WeakMap;M=new WeakMap;T=new WeakMap;$=new WeakMap;V=new WeakMap;X=new WeakMap;y=new WeakMap;Y=new WeakMap;j=new WeakMap;tt=new WeakMap;u=new WeakMap;dt=new WeakMap;c=new WeakMap;et=new WeakMap;it=new WeakMap;_=new WeakMap;p=new WeakMap;k=new WeakMap;F=new WeakMap;b=new WeakMap;G=new WeakMap;R=new WeakMap;N=new WeakSet;ft=function(){f(this,B,U).call(this),t(this,dt).assignedElements().forEach(s=>{s instanceof HTMLElement&&t(this,c).push(new Bt(s,this))}),t(this,u).style.transform="",t(this,q).call(this)};B=new WeakSet;U=function(){t(this,c).forEach(s=>{s.destroy()}),m(this,c,[])};mt=new WeakSet;kt=function(){t(this,a).unsubscribe(t(this,wt)),t(this,a).unlistenAnimationFrame(),t(this,k).disconnect(),t(this,F).disconnect()};bt=new WeakSet;Wt=function(){t(this,a).subscribe(t(this,wt)),t(this,k).connect(),t(this,F).connect()};st=new WeakSet;vt=function(){pt.windowResizer.unsubscribe(t(this,q)),t(this,a).reset(),f(this,mt,kt).call(this),t(this,u).style.transform="",t(this,$).current&&f(this,B,U).call(this),H.scrollEntries.unregister(this)};rt=new WeakSet;_t=function(){t(this,$).current&&f(this,N,ft).call(this),H.scrollEntries.register(this),pt.windowResizer.subscribe(t(this,q),xt.RESIZE_ORDER.SCROLL),f(this,bt,Wt).call(this)};q=new WeakMap;wt=new WeakMap;St=new WeakSet;Ot=function(s){t(this,y).current?(t(this,b).current=s%t(this,c).length,t(this,b).current=t(this,b).current<0?t(this,c).length+t(this,b).current:t(this,b).current):t(this,b).current=zt.clamp(s,0,t(this,c).length-1)};nt=new WeakMap;ht=new WeakSet;Et=function(s="current"){if(t(this,y).current&&t(this,c).length){const e=t(this,a)[s]%(t(this,p)+t(this,_));return e<0?t(this,p)+e+t(this,_):e}else return t(this,a)[s]};exports.ScrollElement=Ft([gt.define("e-scroll")],exports.ScrollElement);var J;class Kt extends gt.CustomElement{constructor(){super(...arguments);D(this,J,null)}get scrollElement(){return h(this,J)}connectedCallback(){const i=Vt.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?O(this,J,i):console.error(this,"e-scroll not found")}}J=new WeakMap;var Zt=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Ut=(s,e,i,n)=>{for(var r=n>1?void 0:n?Nt(e,i):e,d=s.length-1,g;d>=0;d--)(g=s[d])&&(r=(n?g(e,i,r):g(r))||r);return n&&r&&Zt(e,i,r),r},Rt=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},o=(s,e,i)=>(Rt(s,e,"read from private field"),i?i.call(s):e.get(s)),E=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},C=(s,e,i,n)=>(Rt(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i),lt,v,A,z,K,Z,ot,at,ct,ut;const Jt=Lt.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#efefef"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"#181818",borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Kt{constructor(){super(),E(this,lt,null),E(this,v,null),E(this,A,!1),E(this,z,0),E(this,K,0),E(this,Z,0),E(this,ot,()=>{C(this,A,this.offsetWidth>this.offsetHeight);const e=o(this,A)?this.offsetWidth:this.offsetHeight;C(this,z,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),C(this,z,Math.max(o(this,z),30)),o(this,A)?(o(this,v).style.width=o(this,z)+"px",o(this,v).style.height="100%"):(o(this,v).style.width="100%",o(this,v).style.height=o(this,z)+"px"),C(this,K,e-o(this,z)),this.scrollElement.scrollSize||(this.style.display="none")}),E(this,at,()=>{C(this,Z,this.scrollElement.currentProgress*o(this,K)),o(this,A)?o(this,v).style.transform=`translate3d(${o(this,Z)}px, 0px, 0px)`:o(this,v).style.transform=`translate3d(0px, ${o(this,Z)}px, 0px)`}),E(this,ct,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),E(this,ut,e=>{const i=g=>{const Q=o(this,A)?g.x:g.y,Pt=this.scrollElement.distance/o(this,K),$t=(Q-d)*Pt;this.scrollElement.damped.set(r+$t)},n=()=>{removeEventListener("pointermove",i),removeEventListener("pointerup",n),removeEventListener("touchend",n)};addEventListener("pointermove",i),addEventListener("pointerup",n),addEventListener("touchend",n);const r=this.scrollElement.damped.target,d=o(this,A)?e.x:e.y}),At.isBrowser&&(this.openShadow(Jt),P.element(this,{children:[P.slot({ref:e=>C(this,lt,e)})]}))}get thumbElement(){return o(this,v)}connectedCallback(){super.connectedCallback();const e=o(this,lt).assignedElements()[0];e instanceof HTMLElement?C(this,v,e):(C(this,v,document.createElement("div")),o(this,v).classList.add("default-thumb"),this.shadowRoot.appendChild(o(this,v))),o(this,v).addEventListener("pointerdown",o(this,ut)),pt.windowResizer.subscribe(o(this,ot),xt.RESIZE_ORDER.SCROLL+1),this.scrollElement.damped.subscribe(o(this,at)),this.scrollElement.axisAttibute.subscribe(o(this,ct))}disconnectedCallback(){o(this,v).removeEventListener("pointerdown",o(this,ut)),pt.windowResizer.unsubscribe(o(this,ot)),this.scrollElement.damped.unsubscribe(o(this,at)),this.scrollElement.axisAttibute.unsubscribe(o(this,ct))}};lt=new WeakMap;v=new WeakMap;A=new WeakMap;z=new WeakMap;K=new WeakMap;Z=new WeakMap;ot=new WeakMap;at=new WeakMap;ct=new WeakMap;ut=new WeakMap;exports.ScrollbarElement=Ut([gt.define("e-scrollbar")],exports.ScrollbarElement);
1
+ "use strict";var Ct=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var h=(s,e,i)=>(Ct(s,e,"read from private field"),i?i.call(s):e.get(s)),D=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},O=(s,e,i,n)=>(Ct(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qt=require("../Store-D0_rDIsE.cjs"),Dt=require("../Derived-SjPdLJiZ.cjs"),At=require("../browser-CpzFX2xg.cjs"),I=require("../layout-8ryRAMGJ.cjs"),zt=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Tt=require("../Damped-BwpMU9Gi.cjs"),x=require("../attribute/index.cjs"),Mt=require("../WheelControls-CfDeGCOU.cjs"),gt=require("../custom-element/index.cjs"),xt=require("../order/index.cjs"),pt=require("../window-resizer/index.cjs"),H=require("../scroll-entries/index.cjs"),P=require("../tags-920hsh9U.cjs"),Lt=require("../createStylesheet-BoJwXvjE.cjs"),Vt=require("../dom-qY2LdCVL.cjs");var It=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Ft=(s,e,i,n)=>{for(var r=n>1?void 0:n?Ht(e,i):e,d=s.length-1,g;d>=0;d--)(g=s[d])&&(r=(n?g(e,i,r):g(r))||r);return n&&r&&It(e,i,r),r},yt=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},t=(s,e,i)=>(yt(s,e,"read from private field"),i?i.call(s):e.get(s)),l=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},m=(s,e,i,n)=>(yt(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i),f=(s,e,i)=>(yt(s,e,"access private method"),i),a,M,T,$,V,X,y,Y,j,tt,u,dt,c,et,it,_,p,k,F,b,G,R,N,ft,B,U,mt,kt,bt,Wt,st,vt,rt,_t,q,wt,St,Ot,nt,ht,Et,S,w,L,W;class Bt{constructor(e,i){D(this,S,void 0);D(this,w,void 0);D(this,L,0);D(this,W,0);O(this,S,e),O(this,w,i),H.scrollEntries.register(h(this,S))}get size(){return h(this,L)}get position(){return h(this,W)}destroy(){H.scrollEntries.unregister(h(this,S)),h(this,S).style.transform=""}resize(){O(this,L,h(this,w).vertical?h(this,S).offsetHeight:h(this,S).offsetWidth),O(this,W,h(this,w).vertical?I.getCumulativeOffsetTop(h(this,S)):I.getCumulativeOffsetLeft(h(this,S))),O(this,W,h(this,W)-h(this,w).contentPosition)}transform(){let e=0;h(this,w).infiniteAttribute.current&&h(this,w).overscroll&&h(this,W)+h(this,L)<h(this,w).currentScrollValue&&(e=h(this,w).distance*-1),H.scrollEntries.update(h(this,S),h(this,w).axisAttibute.current,e);const i=h(this,w).viewportSize-h(this,L),n=zt.clamp(h(this,w).currentScrollValue+e,h(this,W)-h(this,w).viewportSize-i,h(this,W)+h(this,L)+i);h(this,w).vertical?h(this,S).style.transform=`translate3d(0px, ${n*-1}px, 0px)`:h(this,S).style.transform=`translate3d(${n*-1}px, 0px, 0px)`}}S=new WeakMap,w=new WeakMap,L=new WeakMap,W=new WeakMap;const Gt=Lt.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends gt.CustomElement{constructor(e){if(super(),l(this,N),l(this,B),l(this,mt),l(this,bt),l(this,st),l(this,rt),l(this,St),l(this,ht),l(this,a,null),l(this,M,new x.Attribute(this,"axis","y")),l(this,T,new x.Attribute(this,"pages",0,{validate:i=>Math.max(0,i-1)})),l(this,$,new x.Attribute(this,"split",!1)),l(this,V,new x.Attribute(this,"sectional",!1)),l(this,X,new x.Attribute(this,"wheel-max-delta",!1)),l(this,y,new x.Attribute(this,"infinite",!1)),l(this,Y,new x.Attribute(this,"damping",.03)),l(this,j,new x.Attribute(this,"disabled",!1)),l(this,tt,new x.Attribute(this,"hibernated",!1)),l(this,u,null),l(this,dt,null),l(this,c,[]),l(this,et,0),l(this,it,0),l(this,_,0),l(this,p,0),l(this,k,null),l(this,F,null),l(this,b,new qt.Store(0)),l(this,G,0),l(this,R,0),l(this,q,()=>{const i=this.currentScrollValue/t(this,p);if(m(this,et,this.vertical?I.getCumulativeOffsetTop(this):I.getCumulativeOffsetLeft(this)),m(this,it,this.vertical?I.getCumulativeOffsetTop(t(this,u)):I.getCumulativeOffsetLeft(t(this,u))),m(this,_,this.vertical?this.offsetHeight:this.offsetWidth),t(this,T).current){m(this,p,t(this,_)*t(this,T).current);const n=t(this,p)+t(this,_);this.vertical?(t(this,u).style.width=n+"px",t(this,u).style.height="100%"):(t(this,u).style.height=n+"px",t(this,u).style.width="100%")}else this.vertical?(t(this,u).style.width="100%",t(this,u).style.height="max-content",m(this,p,t(this,u).offsetHeight-t(this,_))):(t(this,u).style.width="max-content",t(this,u).style.height="100%",m(this,p,t(this,u).offsetWidth-t(this,_)));if(!t(this,y).current){const n=getComputedStyle(this);m(this,p,t(this,p)+(this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd))),t(this,a).max.current=t(this,p)}if(t(this,c).forEach(n=>{n.resize(),n.transform()}),t(this,y).current&&t(this,c).length){const n=t(this,c)[t(this,c).length-1],r=n.position+n.size-t(this,_),d=t(this,p)-r;m(this,R,n.position+n.size+d)}else m(this,R,t(this,p));if(t(this,V).current&&t(this,c).length){const n=t(this,c)[t(this,b).current];t(this,a).set(n.position,!0)}else t(this,a).set(i*t(this,p),!0)}),l(this,wt,()=>{const i=this.currentScrollValue;if(m(this,G,Math.max(0,i-t(this,p))),t(this,c).length){let n=0;for(let r=0;r<t(this,c).length;r++){const d=t(this,c)[r];d.transform(),this.targetScrollValue+this.viewportSize/2>=d.position&&(n=r)}t(this,b).current=n}else this.vertical?t(this,u).style.transform=`translate3d(0px, ${i*-1}px, 0px)`:t(this,u).style.transform=`translate3d(${i*-1}px, 0px, 0px)`;H.scrollEntries.update(this,t(this,M).current,i)}),l(this,nt,i=>{if(typeof i=="number")if(t(this,V).current){const n=Math.sign(i);t(this,c).length?this.shiftSections(n):t(this,a).shift(n*t(this,_))}else t(this,a).shift(i);else i==="min"?t(this,a).set(t(this,a).min.current):i==="max"&&t(this,a).set(t(this,a).delta)}),At.isBrowser){let i,n=e||this.getAttribute("name");n&&(i={name:n}),m(this,a,new Tt.Damped({damping:.01,min:0,order:xt.TICK_ORDER.SCROLL,passport:i})),this.openShadow(Gt),P.element(this,{tabIndex:0,children:[P.div({class:"static",children:[P.slot({name:"static"})]}),P.div({class:"content",children:[P.slot({ref:r=>m(this,dt,r)})],style:{flexDirection:new Dt.Derived(t(this,M),r=>r==="x"?"row":"column")},ref:r=>m(this,u,r)})]}),m(this,k,new Mt.WheelControls({element:this})),t(this,k).changeEvent.subscribe(t(this,nt)),m(this,F,new Mt.KeyboardControls({element:this})),t(this,F).changeEvent.subscribe(t(this,nt)),t(this,M).subscribe(({current:r})=>{t(this,u).style.flexDirection=r==="x"?"row":"column",t(this,k).axis=t(this,X).current?"max":r,this.isConnected&&t(this,q).call(this)}),t(this,X).subscribe(r=>{t(this,k).axis=r.current?"max":t(this,M).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,$).subscribe(({current:r})=>{this.isConnected&&(r?f(this,N,ft).call(this):f(this,B,U).call(this))}),t(this,V).subscribe(r=>{t(this,b).current=0,t(this,k).debounce=r.current,t(this,a).reset(),this.isConnected&&(r.current&&!r.previous?f(this,N,ft).call(this):!r.current&&r.previous&&f(this,B,U).call(this))}),t(this,y).subscribe(r=>{r.current?(this.isConnected&&(t(this,c).length||(t(this,$).current=!0)),t(this,c).length&&(t(this,a).max.current=1/0,t(this,a).min.current=-1/0)):(m(this,G,0),t(this,a).max.current=t(this,p),t(this,a).min.current=0)}),t(this,Y).subscribe(r=>{t(this,a).damping=r.current}),t(this,j).subscribe(r=>{r.current&&!r.previous?f(this,mt,kt).call(this):!r.current&&r.previous&&f(this,bt,Wt).call(this)}),t(this,tt).subscribe(r=>{r.current&&!r.previous?f(this,st,vt).call(this):!r.current&&r.previous&&f(this,rt,_t).call(this)})}}get currentScrollValue(){return f(this,ht,Et).call(this,"current")}get targetScrollValue(){return f(this,ht,Et).call(this,"target")}get damped(){return t(this,a)}get dampedAttibute(){return t(this,a)}get axisAttibute(){return t(this,M)}get pagesAttibute(){return t(this,T)}get splitAttibute(){return t(this,$)}get sectionalAttibute(){return t(this,V)}get infiniteAttribute(){return t(this,y)}get dampingAttibute(){return t(this,Y)}get disabledAttibute(){return t(this,j)}get hibernatedAttibute(){return t(this,tt)}get contentElement(){return t(this,u)}get position(){return t(this,et)}get contentPosition(){return t(this,it)}get viewportSize(){return t(this,_)}get scrollSize(){return t(this,p)}get counter(){return t(this,b)}get distance(){return t(this,R)}get overscroll(){return t(this,G)}get vertical(){return t(this,M).current==="y"}get currentProgress(){return this.currentScrollValue/t(this,R)}get targetProgress(){return this.targetScrollValue/t(this,R)}scrollToSection(e,i="smooth"){if(!t(this,c).length)return;const n=t(this,b).current;f(this,St,Ot).call(this,e);const r=t(this,c)[n],d=t(this,c)[t(this,b).current];if(r&&d){let g=0;const Q=t(this,c).length-1;t(this,y).current?t(this,b).current===0&&n===Q?g=t(this,p)+t(this,_)-r.position:t(this,b).current===Q&&n===0?g=d.position-(t(this,p)+t(this,_)):g=d.position-r.position:g=d.position-r.position,t(this,a).shift(g,i==="instant")}}shiftSections(e,i="smooth"){t(this,c).length&&this.scrollToSection(t(this,b).current+e,i)}connectedCallback(){f(this,rt,_t).call(this)}disconnectedCallback(){f(this,st,vt).call(this)}};a=new WeakMap;M=new WeakMap;T=new WeakMap;$=new WeakMap;V=new WeakMap;X=new WeakMap;y=new WeakMap;Y=new WeakMap;j=new WeakMap;tt=new WeakMap;u=new WeakMap;dt=new WeakMap;c=new WeakMap;et=new WeakMap;it=new WeakMap;_=new WeakMap;p=new WeakMap;k=new WeakMap;F=new WeakMap;b=new WeakMap;G=new WeakMap;R=new WeakMap;N=new WeakSet;ft=function(){f(this,B,U).call(this),t(this,dt).assignedElements().forEach(s=>{s instanceof HTMLElement&&t(this,c).push(new Bt(s,this))}),t(this,u).style.transform="",t(this,q).call(this)};B=new WeakSet;U=function(){t(this,c).forEach(s=>{s.destroy()}),m(this,c,[])};mt=new WeakSet;kt=function(){t(this,a).unsubscribe(t(this,wt)),t(this,a).unlistenAnimationFrame(),t(this,k).disconnect(),t(this,F).disconnect()};bt=new WeakSet;Wt=function(){t(this,a).subscribe(t(this,wt)),t(this,k).connect(),t(this,F).connect()};st=new WeakSet;vt=function(){pt.windowResizer.unsubscribe(t(this,q)),t(this,a).reset(),f(this,mt,kt).call(this),t(this,u).style.transform="",t(this,$).current&&f(this,B,U).call(this),H.scrollEntries.unregister(this)};rt=new WeakSet;_t=function(){t(this,$).current&&f(this,N,ft).call(this),H.scrollEntries.register(this),pt.windowResizer.subscribe(t(this,q),xt.RESIZE_ORDER.SCROLL),f(this,bt,Wt).call(this)};q=new WeakMap;wt=new WeakMap;St=new WeakSet;Ot=function(s){t(this,y).current?(t(this,b).current=s%t(this,c).length,t(this,b).current=t(this,b).current<0?t(this,c).length+t(this,b).current:t(this,b).current):t(this,b).current=zt.clamp(s,0,t(this,c).length-1)};nt=new WeakMap;ht=new WeakSet;Et=function(s="current"){if(t(this,y).current&&t(this,c).length){const e=t(this,a)[s]%(t(this,p)+t(this,_));return e<0?t(this,p)+e+t(this,_):e}else return t(this,a)[s]};exports.ScrollElement=Ft([gt.define("e-scroll")],exports.ScrollElement);var J;class Kt extends gt.CustomElement{constructor(){super(...arguments);D(this,J,null)}get scrollElement(){return h(this,J)}connectedCallback(){const i=Vt.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?O(this,J,i):console.error(this,"e-scroll not found")}}J=new WeakMap;var Zt=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Ut=(s,e,i,n)=>{for(var r=n>1?void 0:n?Nt(e,i):e,d=s.length-1,g;d>=0;d--)(g=s[d])&&(r=(n?g(e,i,r):g(r))||r);return n&&r&&Zt(e,i,r),r},Rt=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},o=(s,e,i)=>(Rt(s,e,"read from private field"),i?i.call(s):e.get(s)),E=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},C=(s,e,i,n)=>(Rt(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i),lt,v,A,z,K,Z,ot,at,ct,ut;const Jt=Lt.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#efefef"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"#181818",borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Kt{constructor(){super(),E(this,lt,null),E(this,v,null),E(this,A,!1),E(this,z,0),E(this,K,0),E(this,Z,0),E(this,ot,()=>{C(this,A,this.offsetWidth>this.offsetHeight);const e=o(this,A)?this.offsetWidth:this.offsetHeight;C(this,z,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),C(this,z,Math.max(o(this,z),30)),o(this,A)?(o(this,v).style.width=o(this,z)+"px",o(this,v).style.height="100%"):(o(this,v).style.width="100%",o(this,v).style.height=o(this,z)+"px"),C(this,K,e-o(this,z)),this.scrollElement.scrollSize||(this.style.display="none")}),E(this,at,()=>{C(this,Z,this.scrollElement.currentProgress*o(this,K)),o(this,A)?o(this,v).style.transform=`translate3d(${o(this,Z)}px, 0px, 0px)`:o(this,v).style.transform=`translate3d(0px, ${o(this,Z)}px, 0px)`}),E(this,ct,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),E(this,ut,e=>{const i=g=>{const Q=o(this,A)?g.x:g.y,Pt=this.scrollElement.distance/o(this,K),$t=(Q-d)*Pt;this.scrollElement.damped.set(r+$t)},n=()=>{removeEventListener("pointermove",i),removeEventListener("pointerup",n),removeEventListener("touchend",n)};addEventListener("pointermove",i),addEventListener("pointerup",n),addEventListener("touchend",n);const r=this.scrollElement.damped.target,d=o(this,A)?e.x:e.y}),At.isBrowser&&(this.openShadow(Jt),P.element(this,{children:[P.slot({ref:e=>C(this,lt,e)})]}))}get thumbElement(){return o(this,v)}connectedCallback(){super.connectedCallback();const e=o(this,lt).assignedElements()[0];e instanceof HTMLElement?C(this,v,e):(C(this,v,document.createElement("div")),o(this,v).classList.add("default-thumb"),this.shadowRoot.appendChild(o(this,v))),o(this,v).addEventListener("pointerdown",o(this,ut)),pt.windowResizer.subscribe(o(this,ot),xt.RESIZE_ORDER.SCROLL+1),this.scrollElement.damped.subscribe(o(this,at)),this.scrollElement.axisAttibute.subscribe(o(this,ct))}disconnectedCallback(){o(this,v).removeEventListener("pointerdown",o(this,ut)),pt.windowResizer.unsubscribe(o(this,ot)),this.scrollElement.damped.unsubscribe(o(this,at)),this.scrollElement.axisAttibute.unsubscribe(o(this,ct))}};lt=new WeakMap;v=new WeakMap;A=new WeakMap;z=new WeakMap;K=new WeakMap;Z=new WeakMap;ot=new WeakMap;at=new WeakMap;ct=new WeakMap;ut=new WeakMap;exports.ScrollbarElement=Ut([gt.define("e-scrollbar")],exports.ScrollbarElement);
@@ -20,8 +20,8 @@ import { CustomElement as Lt, define as $t } from "../custom-element/index.js";
20
20
  import { TICK_ORDER as Nt, RESIZE_ORDER as Pt } from "../order/index.js";
21
21
  import { windowResizer as ot } from "../window-resizer/index.js";
22
22
  import { scrollEntries as I } from "../scroll-entries/index.js";
23
- import { e as Ot, D as Mt, ay as bt } from "../tags-8Y7LSTwg.js";
24
- import { c as Dt } from "../createStylesheet-ITfBHk7A.js";
23
+ import { e as Ot, D as Mt, ay as bt } from "../tags-kZqsS_nJ.js";
24
+ import { c as Dt } from "../createStylesheet-DSgkNlUZ.js";
25
25
  import { f as Ut } from "../dom-BY7JhTx5.js";
26
26
  var Zt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Jt = (i, s, e, n) => {
27
27
  for (var a = n > 1 ? void 0 : n ? qt(s, e) : s, g = i.length - 1, x; g >= 0; g--)
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-Bt91QUTY.cjs");Object.defineProperty(exports,"SelectElement",{enumerable:!0,get:()=>e.SelectElement});Object.defineProperty(exports,"SelectHeadElement",{enumerable:!0,get:()=>e.SelectHeadElement});Object.defineProperty(exports,"SelectOptionElement",{enumerable:!0,get:()=>e.SelectOptionElement});exports.SelectUserElement=e.SelectUserElement;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-Cv4y7_7y.cjs");Object.defineProperty(exports,"SelectElement",{enumerable:!0,get:()=>e.SelectElement});Object.defineProperty(exports,"SelectHeadElement",{enumerable:!0,get:()=>e.SelectHeadElement});Object.defineProperty(exports,"SelectOptionElement",{enumerable:!0,get:()=>e.SelectOptionElement});exports.SelectUserElement=e.SelectUserElement;
@@ -1,4 +1,4 @@
1
- import { S as l, d as a, c, b as m } from "../index-COirQu7j.js";
1
+ import { S as l, d as a, c, b as m } from "../index-228VqUsZ.js";
2
2
  export {
3
3
  l as SelectElement,
4
4
  a as SelectHeadElement,
@@ -1 +1 @@
1
- "use strict";var C=(t,r,e)=>{if(!r.has(t))throw TypeError("Cannot "+e)};var u=(t,r,e)=>(C(t,r,"read from private field"),e?e.call(t):r.get(t)),n=(t,r,e)=>{if(r.has(t))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(t):r.set(t,e)},o=(t,r,e,s)=>(C(t,r,"write to private field"),s?s.call(t,e):r.set(t,e),e);var R=(t,r,e,s)=>({set _(c){o(t,r,c,e)},get _(){return u(t,r,s)}});var A=(t,r,e)=>new Promise((s,c)=>{var h=i=>{try{v(e.next(i))}catch(f){c(f)}},l=i=>{try{v(e.throw(i))}catch(f){c(f)}},v=i=>i.done?s(i.value):Promise.resolve(i.value).then(h,l);v((e=e.apply(t,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../Store-D0_rDIsE.cjs"),I=require("../Derived-SjPdLJiZ.cjs"),q=require("../function-MthRj-GJ.cjs");var b;class E extends d.Store{constructor(e,s,c){super(null,c);n(this,b,void 0);o(this,b,e.subscribe(h=>{const l=[];h.current.forEach((v,i)=>{var f;h.current[i]===((f=h.previous)==null?void 0:f[i])&&this.current[i]?l.push(this.current[i]):l.push(s(v))}),this.current=l}))}close(){super.close(),u(this,b).call(this)}}b=new WeakMap;var S,a,p;class D extends d.Store{constructor(e,s,c){super(e,c);n(this,S,void 0);n(this,a,void 0);n(this,p,0);o(this,a,new d.Store(!1)),o(this,S,s),c!=null&&c.manualControl||this.refetch()}get isPending(){return u(this,a)}refetch(){u(this,a).current=!0,o(this,p,u(this,p)+1);const e=u(this,p);u(this,S).call(this).then(s=>{e===u(this,p)&&(u(this,a).current=!1,this.current=s)})}}S=new WeakMap,a=new WeakMap,p=new WeakMap;var g,m,y;class P extends D{constructor(e,s,c=100){super(e,s,{manualControl:!0,skipSubscribeNotification:!0});n(this,g,void 0);n(this,m,void 0);n(this,y,0);o(this,m,c)}get step(){return u(this,y)}startAccumulating(){o(this,g,setInterval(()=>A(this,null,function*(){++R(this,y)._,this.refetch()}),u(this,m)))}stopAccumulating(){clearInterval(u(this,g))}close(){super.close(),this.stopAccumulating()}}g=new WeakMap,m=new WeakMap,y=new WeakMap;var x;class j extends d.Store{constructor(e,s,c){super(null,c);n(this,x,[]);const h=q.debounce(()=>{this.current=s()},0);e.forEach(l=>{u(this,x).push(l.subscribe(()=>{h()}))})}close(){super.close(),u(this,x).forEach(e=>e())}}x=new WeakMap;exports.Store=d.Store;exports.activeStores=d.activeStores;exports.storeRegistry=d.storeRegistry;exports.Derived=I.Derived;exports.Composed=j;exports.CumulativeResource=P;exports.DerivedArray=E;exports.Resource=D;
1
+ "use strict";var g=(e,r,t)=>{if(!r.has(e))throw TypeError("Cannot "+t)};var u=(e,r,t)=>(g(e,r,"read from private field"),t?t.call(e):r.get(e)),l=(e,r,t)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,t)},v=(e,r,t,s)=>(g(e,r,"write to private field"),s?s.call(e,t):r.set(e,t),t);var S=(e,r,t,s)=>({set _(o){v(e,r,o,t)},get _(){return u(e,r,s)}});var y=(e,r,t)=>new Promise((s,o)=>{var R=i=>{try{p(t.next(i))}catch(m){o(m)}},C=i=>{try{p(t.throw(i))}catch(m){o(m)}},p=i=>i.done?s(i.value):Promise.resolve(i.value).then(R,C);p((t=t.apply(e,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../Store-D0_rDIsE.cjs"),A=require("../Derived-SjPdLJiZ.cjs"),d=require("../Composed-C2Vv1xxR.cjs");var c,a,n;class D extends d.Resource{constructor(t,s,o=100){super(t,s,{manualControl:!0,skipSubscribeNotification:!0});l(this,c,void 0);l(this,a,void 0);l(this,n,0);v(this,a,o)}get step(){return u(this,n)}startAccumulating(){v(this,c,setInterval(()=>y(this,null,function*(){++S(this,n)._,this.refetch()}),u(this,a)))}stopAccumulating(){clearInterval(u(this,c))}close(){super.close(),this.stopAccumulating()}}c=new WeakMap,a=new WeakMap,n=new WeakMap;exports.Store=h.Store;exports.activeStores=h.activeStores;exports.storeRegistry=h.storeRegistry;exports.Derived=A.Derived;exports.Composed=d.Composed;exports.DerivedArray=d.DerivedArray;exports.Resource=d.Resource;exports.CumulativeResource=D;