@mjsz-vbr-elements/core 2.30.1 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TimezoneSelector-qP6OxXMD.js → TimezoneSelector-T8Y8aFc-.js} +4 -4
- package/dist/columns.js +1 -1
- package/dist/components.js +2 -2
- package/dist/composables.js +24 -24
- package/dist/constants.js +1 -1
- package/dist/datetime-bWwGbGlR.js +1395 -0
- package/dist/errors-DHx3LQ6t.js +708 -0
- package/dist/index.iife.js +4 -4
- package/dist/index.iife.js.br +0 -0
- package/dist/index.iife.js.gz +0 -0
- package/dist/index.js +149 -105
- package/dist/useSort-D5U_wkle.js +912 -0
- package/dist/utils.js +128 -76
- package/package.json +2 -2
- package/dist/datetime-D600LvsU.js +0 -1357
- package/dist/errors-B6O6sS7H.js +0 -554
- package/dist/useSort-BMv5JZAH.js +0 -943
|
@@ -0,0 +1,708 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* name: @mjsz-vbr-elements/core
|
|
3
|
+
* version: v2.31.0 - 27/10/2025, 14:23:29
|
|
4
|
+
* (c) 2025
|
|
5
|
+
* description: Data visualization for MJSZ VBR
|
|
6
|
+
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
|
+
*/
|
|
8
|
+
import { SORT_STATE_ORIGINAL as de, SORT_STATE_ASCEND as ye } from "./constants.js";
|
|
9
|
+
import { E as m, K as $, G as l, x as u, L as h, M as B, N as J, O as z, _ as f, P as A, J as ve, Q as K, R as ge, S as Ne, T as Q, U as Te, V as L, W as Se, X as _e, Y as Ie, Z as be, $ as Oe, a0 as Ae, a1 as G, C as Re, a2 as O, a3 as Ce, z as g, u as Ee, I as j, H as Pe, w as S, F as R, f as N, c as V, b as De, a as $e, v as je } from "./datetime-bWwGbGlR.js";
|
|
10
|
+
var Z = /* @__PURE__ */ m(function(e, r) {
|
|
11
|
+
if (e === r)
|
|
12
|
+
return r;
|
|
13
|
+
function n(d, p) {
|
|
14
|
+
if (d > p != p > d)
|
|
15
|
+
return p > d ? p : d;
|
|
16
|
+
}
|
|
17
|
+
var a = n(e, r);
|
|
18
|
+
if (a !== void 0)
|
|
19
|
+
return a;
|
|
20
|
+
var s = n(typeof e, typeof r);
|
|
21
|
+
if (s !== void 0)
|
|
22
|
+
return s === typeof e ? e : r;
|
|
23
|
+
var i = $(e), c = n(i, $(r));
|
|
24
|
+
return c !== void 0 && c === i ? e : r;
|
|
25
|
+
}), w = /* @__PURE__ */ m(function(e, r) {
|
|
26
|
+
return l(u(e), r);
|
|
27
|
+
}), Be = /* @__PURE__ */ h(function(e) {
|
|
28
|
+
return B(e) ? !0 : !e || typeof e != "object" || J(e) ? !1 : e.length === 0 ? !0 : e.length > 0 ? e.hasOwnProperty(0) && e.hasOwnProperty(e.length - 1) : !1;
|
|
29
|
+
}), U = typeof Symbol < "u" ? Symbol.iterator : "@@iterator";
|
|
30
|
+
function Le(t, e, r) {
|
|
31
|
+
return function(a, s, i) {
|
|
32
|
+
if (Be(i))
|
|
33
|
+
return t(a, s, i);
|
|
34
|
+
if (i == null)
|
|
35
|
+
return s;
|
|
36
|
+
if (typeof i["fantasy-land/reduce"] == "function")
|
|
37
|
+
return e(a, s, i, "fantasy-land/reduce");
|
|
38
|
+
if (i[U] != null)
|
|
39
|
+
return r(a, s, i[U]());
|
|
40
|
+
if (typeof i.next == "function")
|
|
41
|
+
return r(a, s, i);
|
|
42
|
+
if (typeof i.reduce == "function")
|
|
43
|
+
return e(a, s, i, "reduce");
|
|
44
|
+
throw new TypeError("reduce: list must be array or iterable");
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function Ge(t, e, r) {
|
|
48
|
+
for (var n = 0, a = r.length; n < a; ) {
|
|
49
|
+
if (e = t["@@transducer/step"](e, r[n]), e && e["@@transducer/reduced"]) {
|
|
50
|
+
e = e["@@transducer/value"];
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
n += 1;
|
|
54
|
+
}
|
|
55
|
+
return t["@@transducer/result"](e);
|
|
56
|
+
}
|
|
57
|
+
var Me = /* @__PURE__ */ m(function(e, r) {
|
|
58
|
+
return z(e.length, function() {
|
|
59
|
+
return e.apply(r, arguments);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
function xe(t, e, r) {
|
|
63
|
+
for (var n = r.next(); !n.done; ) {
|
|
64
|
+
if (e = t["@@transducer/step"](e, n.value), e && e["@@transducer/reduced"]) {
|
|
65
|
+
e = e["@@transducer/value"];
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
n = r.next();
|
|
69
|
+
}
|
|
70
|
+
return t["@@transducer/result"](e);
|
|
71
|
+
}
|
|
72
|
+
function Fe(t, e, r, n) {
|
|
73
|
+
return t["@@transducer/result"](r[n](Me(t["@@transducer/step"], t), e));
|
|
74
|
+
}
|
|
75
|
+
var ee = /* @__PURE__ */ Le(Ge, Fe, xe), We = /* @__PURE__ */ function() {
|
|
76
|
+
function t(e) {
|
|
77
|
+
this.f = e;
|
|
78
|
+
}
|
|
79
|
+
return t.prototype["@@transducer/init"] = function() {
|
|
80
|
+
throw new Error("init not implemented on XWrap");
|
|
81
|
+
}, t.prototype["@@transducer/result"] = function(e) {
|
|
82
|
+
return e;
|
|
83
|
+
}, t.prototype["@@transducer/step"] = function(e, r) {
|
|
84
|
+
return this.f(e, r);
|
|
85
|
+
}, t;
|
|
86
|
+
}();
|
|
87
|
+
function te(t) {
|
|
88
|
+
return new We(t);
|
|
89
|
+
}
|
|
90
|
+
var M = /* @__PURE__ */ f(function(t, e, r) {
|
|
91
|
+
return ee(typeof t == "function" ? te(t) : t, e, r);
|
|
92
|
+
}), Ue = /* @__PURE__ */ h(function(e) {
|
|
93
|
+
return A(M(Z, 0, w("length", e)), function() {
|
|
94
|
+
for (var r = 0, n = e.length; r < n; ) {
|
|
95
|
+
if (!e[r].apply(this, arguments))
|
|
96
|
+
return !1;
|
|
97
|
+
r += 1;
|
|
98
|
+
}
|
|
99
|
+
return !0;
|
|
100
|
+
});
|
|
101
|
+
}), k = /* @__PURE__ */ h(function(e) {
|
|
102
|
+
return function() {
|
|
103
|
+
return e;
|
|
104
|
+
};
|
|
105
|
+
}), ke = /* @__PURE__ */ h(function(e) {
|
|
106
|
+
return A(M(Z, 0, w("length", e)), function() {
|
|
107
|
+
for (var r = 0, n = e.length; r < n; ) {
|
|
108
|
+
if (e[r].apply(this, arguments))
|
|
109
|
+
return !0;
|
|
110
|
+
r += 1;
|
|
111
|
+
}
|
|
112
|
+
return !1;
|
|
113
|
+
});
|
|
114
|
+
}), re = /* @__PURE__ */ h(function(e) {
|
|
115
|
+
for (var r = ve(e), n = r.length, a = [], s = 0; s < n; )
|
|
116
|
+
a[s] = e[r[s]], s += 1;
|
|
117
|
+
return a;
|
|
118
|
+
}), _ = /* @__PURE__ */ f(function(e, r, n) {
|
|
119
|
+
var a = e(r), s = e(n);
|
|
120
|
+
return a < s ? -1 : a > s ? 1 : 0;
|
|
121
|
+
}), ne = /* @__PURE__ */ h(function(e) {
|
|
122
|
+
return A(e.length, e);
|
|
123
|
+
});
|
|
124
|
+
function qe(t, e, r) {
|
|
125
|
+
if (K(t) && B(r)) {
|
|
126
|
+
var n = t < 0 ? r.length + t : t, a = [].concat(r);
|
|
127
|
+
return a[n] = e, a;
|
|
128
|
+
}
|
|
129
|
+
var s = {};
|
|
130
|
+
for (var i in r)
|
|
131
|
+
s[i] = r[i];
|
|
132
|
+
return s[t] = e, s;
|
|
133
|
+
}
|
|
134
|
+
var He = /* @__PURE__ */ h(function(e) {
|
|
135
|
+
return e == null;
|
|
136
|
+
}), Xe = /* @__PURE__ */ f(function t(e, r, n) {
|
|
137
|
+
if (e.length === 0)
|
|
138
|
+
return r;
|
|
139
|
+
var a = e[0];
|
|
140
|
+
if (e.length > 1) {
|
|
141
|
+
var s = ge(a, n);
|
|
142
|
+
(He(s) || typeof s != "object") && (s = K(e[1]) ? [] : {}), r = t(Array.prototype.slice.call(e, 1), r, s);
|
|
143
|
+
}
|
|
144
|
+
return qe(a, r, n);
|
|
145
|
+
}), Ye = /* @__PURE__ */ f(function(e, r, n) {
|
|
146
|
+
return Xe([e], r, n);
|
|
147
|
+
});
|
|
148
|
+
function ae(t) {
|
|
149
|
+
return new RegExp(t.source, t.flags ? t.flags : (t.global ? "g" : "") + (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.sticky ? "y" : "") + (t.unicode ? "u" : "") + (t.dotAll ? "s" : ""));
|
|
150
|
+
}
|
|
151
|
+
function x(t, e, r) {
|
|
152
|
+
if (r || (r = new ze()), Je(t))
|
|
153
|
+
return t;
|
|
154
|
+
var n = function(s) {
|
|
155
|
+
var i = r.get(t);
|
|
156
|
+
if (i)
|
|
157
|
+
return i;
|
|
158
|
+
r.set(t, s);
|
|
159
|
+
for (var c in t)
|
|
160
|
+
Object.prototype.hasOwnProperty.call(t, c) && (s[c] = e ? x(t[c], !0, r) : t[c]);
|
|
161
|
+
return s;
|
|
162
|
+
};
|
|
163
|
+
switch (Ne(t)) {
|
|
164
|
+
case "Object":
|
|
165
|
+
return n(Object.create(Object.getPrototypeOf(t)));
|
|
166
|
+
case "Array":
|
|
167
|
+
return n(Array(t.length));
|
|
168
|
+
case "Date":
|
|
169
|
+
return new Date(t.valueOf());
|
|
170
|
+
case "RegExp":
|
|
171
|
+
return ae(t);
|
|
172
|
+
case "Int8Array":
|
|
173
|
+
case "Uint8Array":
|
|
174
|
+
case "Uint8ClampedArray":
|
|
175
|
+
case "Int16Array":
|
|
176
|
+
case "Uint16Array":
|
|
177
|
+
case "Int32Array":
|
|
178
|
+
case "Uint32Array":
|
|
179
|
+
case "Float32Array":
|
|
180
|
+
case "Float64Array":
|
|
181
|
+
case "BigInt64Array":
|
|
182
|
+
case "BigUint64Array":
|
|
183
|
+
return t.slice();
|
|
184
|
+
default:
|
|
185
|
+
return t;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function Je(t) {
|
|
189
|
+
var e = typeof t;
|
|
190
|
+
return t == null || e != "object" && e != "function";
|
|
191
|
+
}
|
|
192
|
+
var ze = /* @__PURE__ */ function() {
|
|
193
|
+
function t() {
|
|
194
|
+
this.map = {}, this.length = 0;
|
|
195
|
+
}
|
|
196
|
+
return t.prototype.set = function(e, r) {
|
|
197
|
+
var n = this.hash(e), a = this.map[n];
|
|
198
|
+
a || (this.map[n] = a = []), a.push([e, r]), this.length += 1;
|
|
199
|
+
}, t.prototype.hash = function(e) {
|
|
200
|
+
var r = [];
|
|
201
|
+
for (var n in e)
|
|
202
|
+
r.push(Object.prototype.toString.call(e[n]));
|
|
203
|
+
return r.join();
|
|
204
|
+
}, t.prototype.get = function(e) {
|
|
205
|
+
if (this.length <= 180) {
|
|
206
|
+
for (var r in this.map)
|
|
207
|
+
for (var i = this.map[r], n = 0; n < i.length; n += 1) {
|
|
208
|
+
var a = i[n];
|
|
209
|
+
if (a[0] === e)
|
|
210
|
+
return a[1];
|
|
211
|
+
}
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
var s = this.hash(e), i = this.map[s];
|
|
215
|
+
if (i)
|
|
216
|
+
for (var n = 0; n < i.length; n += 1) {
|
|
217
|
+
var a = i[n];
|
|
218
|
+
if (a[0] === e)
|
|
219
|
+
return a[1];
|
|
220
|
+
}
|
|
221
|
+
}, t;
|
|
222
|
+
}();
|
|
223
|
+
function Ke(t, e) {
|
|
224
|
+
return function() {
|
|
225
|
+
return e.call(this, t.apply(this, arguments));
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function F(t, e) {
|
|
229
|
+
return function() {
|
|
230
|
+
var r = arguments.length;
|
|
231
|
+
if (r === 0)
|
|
232
|
+
return e();
|
|
233
|
+
var n = arguments[r - 1];
|
|
234
|
+
return B(n) || typeof n[t] != "function" ? e.apply(this, arguments) : n[t].apply(n, Array.prototype.slice.call(arguments, 0, r - 1));
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
var Qe = /* @__PURE__ */ f(/* @__PURE__ */ F("slice", function(e, r, n) {
|
|
238
|
+
return Array.prototype.slice.call(n, e, r);
|
|
239
|
+
})), Ve = /* @__PURE__ */ h(/* @__PURE__ */ F("tail", /* @__PURE__ */ Qe(1, 1 / 0)));
|
|
240
|
+
function T() {
|
|
241
|
+
if (arguments.length === 0)
|
|
242
|
+
throw new Error("pipe requires at least one argument");
|
|
243
|
+
return z(arguments[0].length, M(Ke, arguments[0], Ve(arguments)));
|
|
244
|
+
}
|
|
245
|
+
var C = /* @__PURE__ */ h(function(e) {
|
|
246
|
+
return J(e) ? e.split("").reverse().join("") : Array.prototype.slice.call(e, 0).reverse();
|
|
247
|
+
});
|
|
248
|
+
function o() {
|
|
249
|
+
if (arguments.length === 0)
|
|
250
|
+
throw new Error("compose requires at least one argument");
|
|
251
|
+
return T.apply(this, C(arguments));
|
|
252
|
+
}
|
|
253
|
+
var se = /* @__PURE__ */ h(function(t) {
|
|
254
|
+
return Q(0, t);
|
|
255
|
+
}), Ze = /* @__PURE__ */ function() {
|
|
256
|
+
function t(e, r, n, a) {
|
|
257
|
+
this.valueFn = e, this.valueAcc = r, this.keyFn = n, this.xf = a, this.inputs = {};
|
|
258
|
+
}
|
|
259
|
+
return t.prototype["@@transducer/init"] = Te.init, t.prototype["@@transducer/result"] = function(e) {
|
|
260
|
+
var r;
|
|
261
|
+
for (r in this.inputs)
|
|
262
|
+
if (L(r, this.inputs) && (e = this.xf["@@transducer/step"](e, this.inputs[r]), e["@@transducer/reduced"])) {
|
|
263
|
+
e = e["@@transducer/value"];
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
return this.inputs = null, this.xf["@@transducer/result"](e);
|
|
267
|
+
}, t.prototype["@@transducer/step"] = function(e, r) {
|
|
268
|
+
var n = this.keyFn(r);
|
|
269
|
+
return this.inputs[n] = this.inputs[n] || [n, x(this.valueAcc, !1)], this.inputs[n][1] = this.valueFn(this.inputs[n][1], r), e;
|
|
270
|
+
}, t;
|
|
271
|
+
}();
|
|
272
|
+
function we(t, e, r) {
|
|
273
|
+
return function(n) {
|
|
274
|
+
return new Ze(t, e, r, n);
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
var ie = /* @__PURE__ */ Se(4, [], /* @__PURE__ */ _e([], we, function(e, r, n, a) {
|
|
278
|
+
var s = te(function(i, c) {
|
|
279
|
+
var d = n(c), p = e(L(d, i) ? i[d] : x(r, !1), c);
|
|
280
|
+
return p && p["@@transducer/reduced"] ? Ie(i) : (i[d] = p, i);
|
|
281
|
+
});
|
|
282
|
+
return ee(s, {}, a);
|
|
283
|
+
})), y = /* @__PURE__ */ f(function(e, r, n) {
|
|
284
|
+
var a = e(r), s = e(n);
|
|
285
|
+
return a > s ? -1 : a < s ? 1 : 0;
|
|
286
|
+
}), et = /* @__PURE__ */ h(function(t) {
|
|
287
|
+
return Q(-1, t);
|
|
288
|
+
}), I = /* @__PURE__ */ m(/* @__PURE__ */ F("groupBy", /* @__PURE__ */ ie(function(t, e) {
|
|
289
|
+
return t.push(e), t;
|
|
290
|
+
}, []))), tt = /* @__PURE__ */ f(function(e, r, n) {
|
|
291
|
+
return A(Math.max(e.length, r.length, n.length), function() {
|
|
292
|
+
return e.apply(this, arguments) ? r.apply(this, arguments) : n.apply(this, arguments);
|
|
293
|
+
});
|
|
294
|
+
}), rt = /* @__PURE__ */ m(be), q = /* @__PURE__ */ ie(function(t, e) {
|
|
295
|
+
return e;
|
|
296
|
+
}, null), nt = /* @__PURE__ */ f(function(e, r, n) {
|
|
297
|
+
return Oe(function(a) {
|
|
298
|
+
return Ae(e, a, n);
|
|
299
|
+
}, r);
|
|
300
|
+
});
|
|
301
|
+
function at(t) {
|
|
302
|
+
if (t == null)
|
|
303
|
+
throw new TypeError("Cannot convert undefined or null to object");
|
|
304
|
+
for (var e = Object(t), r = 1, n = arguments.length; r < n; ) {
|
|
305
|
+
var a = arguments[r];
|
|
306
|
+
if (a != null)
|
|
307
|
+
for (var s in a)
|
|
308
|
+
L(s, a) && (e[s] = a[s]);
|
|
309
|
+
r += 1;
|
|
310
|
+
}
|
|
311
|
+
return e;
|
|
312
|
+
}
|
|
313
|
+
const st = typeof Object.assign == "function" ? Object.assign : at;
|
|
314
|
+
var ue = /* @__PURE__ */ G(1, "join"), it = /* @__PURE__ */ m(function(e, r) {
|
|
315
|
+
return function(n) {
|
|
316
|
+
return function(a) {
|
|
317
|
+
return l(function(s) {
|
|
318
|
+
return r(s, a);
|
|
319
|
+
}, n(e(a)));
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
}), oe = /* @__PURE__ */ h(function(e) {
|
|
323
|
+
return it(u(e), Ye(e));
|
|
324
|
+
}), ut = /* @__PURE__ */ m(function(e, r) {
|
|
325
|
+
return st({}, r, e);
|
|
326
|
+
}), ot = /* @__PURE__ */ f(function(e, r, n) {
|
|
327
|
+
return Re(function(a, s, i) {
|
|
328
|
+
return e(s, i);
|
|
329
|
+
}, r, n);
|
|
330
|
+
}), ce = function(t) {
|
|
331
|
+
return {
|
|
332
|
+
value: t,
|
|
333
|
+
map: function(e) {
|
|
334
|
+
return ce(e(t));
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
}, le = /* @__PURE__ */ f(function(e, r, n) {
|
|
338
|
+
return e(function(a) {
|
|
339
|
+
return ce(r(a));
|
|
340
|
+
})(n).value;
|
|
341
|
+
}), fe = /* @__PURE__ */ f(function(e, r, n) {
|
|
342
|
+
return O(Ce(r, n), e);
|
|
343
|
+
}), pe = /* @__PURE__ */ m(function(e, r) {
|
|
344
|
+
for (var n = {}, a = 0; a < e.length; )
|
|
345
|
+
e[a] in r && (n[e[a]] = r[e[a]]), a += 1;
|
|
346
|
+
return n;
|
|
347
|
+
}), E = /* @__PURE__ */ f(function(e, r, n) {
|
|
348
|
+
return O(e, u(r, n));
|
|
349
|
+
}), P = /* @__PURE__ */ f(function(e, r, n) {
|
|
350
|
+
return n.replace(e, r);
|
|
351
|
+
}), W = /* @__PURE__ */ m(function(e, r) {
|
|
352
|
+
return Array.prototype.slice.call(r, 0).sort(e);
|
|
353
|
+
}), v = /* @__PURE__ */ m(function(e, r) {
|
|
354
|
+
return Array.prototype.slice.call(r, 0).sort(function(n, a) {
|
|
355
|
+
var s = e(n), i = e(a);
|
|
356
|
+
return s < i ? -1 : s > i ? 1 : 0;
|
|
357
|
+
});
|
|
358
|
+
}), D = /* @__PURE__ */ m(function(e, r) {
|
|
359
|
+
return Array.prototype.slice.call(r, 0).sort(function(n, a) {
|
|
360
|
+
for (var s = 0, i = 0; s === 0 && i < e.length; )
|
|
361
|
+
s = e[i](n, a), i += 1;
|
|
362
|
+
return s;
|
|
363
|
+
});
|
|
364
|
+
});
|
|
365
|
+
function ct(t) {
|
|
366
|
+
return Object.prototype.toString.call(t) === "[object RegExp]";
|
|
367
|
+
}
|
|
368
|
+
var lt = /* @__PURE__ */ m(function(e, r) {
|
|
369
|
+
if (!ct(e))
|
|
370
|
+
throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received " + $(e));
|
|
371
|
+
return ae(e).test(r);
|
|
372
|
+
}), H = /* @__PURE__ */ G(0, "toLowerCase"), ft = /* @__PURE__ */ G(0, "toUpperCase");
|
|
373
|
+
function Ot(t, e = "body") {
|
|
374
|
+
if (!t)
|
|
375
|
+
return;
|
|
376
|
+
if (typeof e != "string") {
|
|
377
|
+
e?.append(t);
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
document.querySelector(e)?.append(t);
|
|
381
|
+
}
|
|
382
|
+
function At(t, e = () => ({})) {
|
|
383
|
+
return t.slice().sort((r, n) => {
|
|
384
|
+
const a = e(r), s = e(n);
|
|
385
|
+
if (a === null || s === null)
|
|
386
|
+
return 0;
|
|
387
|
+
const i = a.compareDocumentPosition(s);
|
|
388
|
+
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
let pt = 0;
|
|
392
|
+
function mt() {
|
|
393
|
+
return ++pt;
|
|
394
|
+
}
|
|
395
|
+
function Rt(t = []) {
|
|
396
|
+
return {
|
|
397
|
+
result: [...t],
|
|
398
|
+
filteredRowsLength: 0,
|
|
399
|
+
isFiltered: !1,
|
|
400
|
+
value() {
|
|
401
|
+
return {
|
|
402
|
+
rows: this.result,
|
|
403
|
+
totalItems: this.isFiltered ? this.filteredRowsLength : t.length,
|
|
404
|
+
currentItems: this.currentItems
|
|
405
|
+
};
|
|
406
|
+
},
|
|
407
|
+
filter(e, r = [], n = !1) {
|
|
408
|
+
if (e) {
|
|
409
|
+
const a = r.map(
|
|
410
|
+
(c) => n ? T(S(c), O(e)) : T(u(c), H, rt(H(e)))
|
|
411
|
+
), s = ne((c) => c.name ? le(oe("name"), P(",", ""), c) : c), i = R(T(s, ke([...a])), this.result);
|
|
412
|
+
this.isFiltered = !0, this.filteredRowsLength = i.length, this.result = i;
|
|
413
|
+
}
|
|
414
|
+
return this;
|
|
415
|
+
},
|
|
416
|
+
sorted(e) {
|
|
417
|
+
if (!e.sortTarget)
|
|
418
|
+
return this;
|
|
419
|
+
if (e.orders[0].direction === de)
|
|
420
|
+
return this;
|
|
421
|
+
const r = tt(O(ye), k(_), k(y));
|
|
422
|
+
return this.result = D(e.orders.map((n) => o(r(n.direction), u)(n.target)))(this.result), this;
|
|
423
|
+
},
|
|
424
|
+
addIndex(e = null) {
|
|
425
|
+
return this.result.reduce((r, n, a) => {
|
|
426
|
+
const s = r[r.length - 1] || [], i = e && s[e] === n[e];
|
|
427
|
+
return n.index = i ? s.index : a + 1, n.indexClass = i ? "is-duplicated" : null, r.push(n), r;
|
|
428
|
+
}, []), this;
|
|
429
|
+
},
|
|
430
|
+
addContinuousIndex() {
|
|
431
|
+
return this.result = this.result.map((e, r) => ({
|
|
432
|
+
...e,
|
|
433
|
+
index: r + 1
|
|
434
|
+
})), this;
|
|
435
|
+
},
|
|
436
|
+
pagination(e, r) {
|
|
437
|
+
if (!r)
|
|
438
|
+
return this;
|
|
439
|
+
e = Number(e), r = Number(r);
|
|
440
|
+
const n = (e - 1) * r, a = n + r;
|
|
441
|
+
return this.result = this.result.slice(n, a), this;
|
|
442
|
+
},
|
|
443
|
+
more(e, r) {
|
|
444
|
+
return this.result = this.result.slice(Number(e), Number(r)), this;
|
|
445
|
+
},
|
|
446
|
+
playerName() {
|
|
447
|
+
return this.result = this.result.map((e) => ({
|
|
448
|
+
...e,
|
|
449
|
+
name: Tt(e)
|
|
450
|
+
})), this;
|
|
451
|
+
},
|
|
452
|
+
teamName() {
|
|
453
|
+
return this.result = this.result.map((e) => ({
|
|
454
|
+
...e,
|
|
455
|
+
teamName: e.team.longName
|
|
456
|
+
})), this;
|
|
457
|
+
},
|
|
458
|
+
schedule(e = "", r = "hu") {
|
|
459
|
+
return this.result = this.result.map((n) => ({
|
|
460
|
+
...n,
|
|
461
|
+
gameResult: `${n.homeTeamScore}-${n.awayTeamScore}`,
|
|
462
|
+
gameDateDate: N(n.gameDate, "L dddd", e, r),
|
|
463
|
+
gameDateTime: N(n.gameDate, "HH:mm", e, r)
|
|
464
|
+
})), this;
|
|
465
|
+
},
|
|
466
|
+
gameDateFilter(e) {
|
|
467
|
+
return e === null ? this : (this.result = this.result.filter((r) => new Date(r.gameDate).getMonth() === e), this);
|
|
468
|
+
},
|
|
469
|
+
convertTimes(e = []) {
|
|
470
|
+
return this.result = this.result.map((r) => (e.map((n) => r[n] ? r[`${n}Sec`] = V(r[n]) : r), r)), this;
|
|
471
|
+
},
|
|
472
|
+
groupByDays() {
|
|
473
|
+
return this.currentItems = this.result.length, this.result = I((e) => N(e.gameDate, "YYYY-MM-DD"))(this.result), this;
|
|
474
|
+
},
|
|
475
|
+
slice(e = 3) {
|
|
476
|
+
return this.result = this.result.slice(0, e), this;
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
const Ct = (t, ...e) => l(o(...e))(t);
|
|
481
|
+
function b(t) {
|
|
482
|
+
return {
|
|
483
|
+
...t,
|
|
484
|
+
...t.lastName && t.firstName && { name: `${t.lastName} ${t.firstName}` },
|
|
485
|
+
...t.player?.playerId && { name: `${t.player.lastName} ${t.player.firstName}` },
|
|
486
|
+
...t.player?.id && { name: `${t.player.lastName} ${t.player.firstName}` },
|
|
487
|
+
...t.player?.nationality && {
|
|
488
|
+
name: t.player?.nationality.includes("hu") ? `${t.player.lastName} ${t.player.firstName}` : `${t.player.lastName}, ${t.player.firstName}`
|
|
489
|
+
},
|
|
490
|
+
...t.nationality && {
|
|
491
|
+
name: t.nationality.includes("hu") ? `${t.lastName} ${t.firstName}` : `${t.lastName}, ${t.firstName}`
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
function me(t) {
|
|
496
|
+
return {
|
|
497
|
+
...t,
|
|
498
|
+
...t?.team?.id && { teamName: t.team.longName }
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
function Et(t = "", e = "hu") {
|
|
502
|
+
return (r) => ({
|
|
503
|
+
...r,
|
|
504
|
+
gameDateDate: N(r.gameDate, "L dddd", t, e),
|
|
505
|
+
gameDateTime: N(r.gameDate, "HH:mm", t, e)
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
function Pt(t) {
|
|
509
|
+
return (e) => ({
|
|
510
|
+
...e,
|
|
511
|
+
gameResult: gt(e)
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
function Dt(t) {
|
|
515
|
+
return {
|
|
516
|
+
...t,
|
|
517
|
+
opponent: vt(t)
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
function $t(t) {
|
|
521
|
+
return {
|
|
522
|
+
...t,
|
|
523
|
+
resultType: Nt(t)
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
function jt(t) {
|
|
527
|
+
return {
|
|
528
|
+
...t,
|
|
529
|
+
rowClasses: t.optional ? "is-optional" : ""
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
function ht(t = []) {
|
|
533
|
+
return (e) => ({
|
|
534
|
+
...e,
|
|
535
|
+
[t]: e[t]?.toUpperCase()
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
function Bt(t = []) {
|
|
539
|
+
return (e) => (t.map((r) => e[r] ? e[`${r}Sec`] = V(e[r]) : e), e);
|
|
540
|
+
}
|
|
541
|
+
function Lt(t = []) {
|
|
542
|
+
return (e) => (t.map((r) => e[r] ? e[`${r}Min`] = De(e[r]) : e), e);
|
|
543
|
+
}
|
|
544
|
+
function Gt(t = []) {
|
|
545
|
+
return (e) => (t.map((r) => e[`${r}Min`] = $e(e[r])), e);
|
|
546
|
+
}
|
|
547
|
+
function Mt(t) {
|
|
548
|
+
return {
|
|
549
|
+
...t,
|
|
550
|
+
periodResults: t.result?.match(/\(.*?\)/)?.[0] ?? ""
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
const dt = (t, e) => new Date(t.gameDate).getTime() - new Date(e.gameDate).getTime(), xt = D([dt, _(u("id")), _(u("gameId"))]), yt = (t) => (e, r) => e[t].localeCompare(r[t], "hu"), X = W(yt("name"));
|
|
554
|
+
function vt(t) {
|
|
555
|
+
return [t.isHomeGame ? null : "@", t.opponent?.shortName].join(" ");
|
|
556
|
+
}
|
|
557
|
+
function gt(t) {
|
|
558
|
+
let e = t?.homeTeamScore, r = t?.awayTeamScore;
|
|
559
|
+
return t.isHomeGame || (e = t?.awayTeamScore, r = t?.homeTeamScore), [e, r].join(":");
|
|
560
|
+
}
|
|
561
|
+
function Nt(t) {
|
|
562
|
+
const e = t.gameResult.split(":"), r = e[0] > e[1], n = e[0] < e[1];
|
|
563
|
+
return r && t.isOvertime ? "OTW" : r && t.isShootout ? "SOW" : r ? "W" : n && t.isOvertime ? "OTL" : n && t.isShootout ? "SOL" : n ? "L" : "D";
|
|
564
|
+
}
|
|
565
|
+
function Ft(t) {
|
|
566
|
+
return t.map((e) => ({
|
|
567
|
+
phaseId: e.phaseId,
|
|
568
|
+
phaseName: Object.values({
|
|
569
|
+
phaseName: e.phaseName,
|
|
570
|
+
...e.phaseType?.phaseTypeName && e.phaseType.phaseTypeName !== e.phaseName && {
|
|
571
|
+
phaseTypeName: e.phaseType.phaseTypeName
|
|
572
|
+
},
|
|
573
|
+
...e.phaseSubType?.phaseSubTypeName && { phaseSubTypeName: e.phaseSubType.phaseSubTypeName }
|
|
574
|
+
}).join("-")
|
|
575
|
+
}));
|
|
576
|
+
}
|
|
577
|
+
function Tt(t) {
|
|
578
|
+
return t.player ? t.player.nationality.includes("hu") ? `${t.player.lastName} ${t.player.firstName}` : `${t.player.lastName}, ${t.player.firstName}` : `${t.lastName} ${t.firstName}`;
|
|
579
|
+
}
|
|
580
|
+
const Wt = o(
|
|
581
|
+
W(y(u("seasonName"))),
|
|
582
|
+
l(pe(["championshipId", "seasonName"]))
|
|
583
|
+
), Ut = (t) => W(_(u("teamName")), t), kt = o(v(u("sectionId")), g(o(Ee, u("phases")))), qt = o(u("sectionId"), se), Ht = o(u("phaseName"), se), Xt = v(u("phaseId")), Yt = (t) => o(v(u("name")), l(o(b, me)))(t), Jt = o(u("phaseName"), et), zt = o(ft, P("_", "-")), Kt = o(g(lt(/-:-/)), j(",")), Qt = o(l(j(":")), l(Pe), j(","), P(/^\(|\)$/g, "")), Vt = D([y(u("startingFive"))]), Zt = o(
|
|
584
|
+
ue(", "),
|
|
585
|
+
l((t) => `${t.lastName} ${t.firstName}`),
|
|
586
|
+
g((t) => !t)
|
|
587
|
+
), wt = o(I(u("eventPeriod")), C, g(E("Period", "type"))), er = I(u("row")), tr = (t, e) => R(Ue([fe(e, ["team", "id"]), E("Gól", "type")]), C(t)), rr = o(l(b), pe(["headCoach", "secondCoach"])), nr = o(C, l((t) => ({ ...t, eventId: t.eventId ? t.eventId : mt() }))), ar = (t) => v(u("eventTimeSec"), Object.values(t));
|
|
588
|
+
function sr(t, e) {
|
|
589
|
+
const r = (a) => {
|
|
590
|
+
const s = ["first_referee", "second_referee", "first_line_judge", "second_line_judge"].indexOf(a.role);
|
|
591
|
+
return s > -1 ? s : 4;
|
|
592
|
+
}, n = (a) => ({ ...b(a), role: e(`role.${a.role}`) });
|
|
593
|
+
return I(u("type"), l(n, v(r, Object.values(t))));
|
|
594
|
+
}
|
|
595
|
+
const ir = D([
|
|
596
|
+
y(u("points")),
|
|
597
|
+
_(u("gamesPlayed")),
|
|
598
|
+
y(u("w")),
|
|
599
|
+
y(u("gd")),
|
|
600
|
+
y(u("gf"))
|
|
601
|
+
]), ur = (t, e) => g(E(t, "championshipId"), e), or = (t, e) => R(E(t, "championshipId"), e), cr = o(g((t) => ["Rájátszás", "Újrajátszandó"].includes(t.phaseName)), S([0, "phases"])), lr = o(
|
|
602
|
+
I(St),
|
|
603
|
+
v((t) => ["ld", "rd", "d"].includes(t.position?.toLowerCase()) ? 1 : ["lw", "rw", "c"].includes(t.position?.toLowerCase()) ? 2 : 0),
|
|
604
|
+
v(_t),
|
|
605
|
+
l(o(b, me, ht(["position"])))
|
|
606
|
+
);
|
|
607
|
+
function fr({ goalieStats: t, fieldPlayers: e, playersPenalty: r }) {
|
|
608
|
+
const n = l(S(["player", "playerId"]))(t), s = g((p) => n.includes(p.player.playerId), r), i = nt((p, he) => p.player.playerId === he, r, n), c = Y(e, s), d = Y(t, i);
|
|
609
|
+
return {
|
|
610
|
+
fieldPlayers: X(c),
|
|
611
|
+
goalies: X(d)
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
const pr = ne((t, e) => T(R(fe(e, ["team", "id"])), l(b))(t));
|
|
615
|
+
function mr(t) {
|
|
616
|
+
const e = t.city ? le(oe("city"), P(/$/, ",")) : () => ({});
|
|
617
|
+
return o(ue(" "), re, e, je(["type"]))(t);
|
|
618
|
+
}
|
|
619
|
+
function St(t) {
|
|
620
|
+
return ["ld", "rd"].includes(t.position?.toLowerCase()) ? "defenders" : ["lw", "rw", "c"].includes(t.position?.toLowerCase()) ? "forwards" : "goalies";
|
|
621
|
+
}
|
|
622
|
+
function _t(t) {
|
|
623
|
+
return Number(t.jerseyNr);
|
|
624
|
+
}
|
|
625
|
+
function Y(t, e) {
|
|
626
|
+
return re(ot(ut, q(S(["player", "playerId"]), t), q(S(["player", "playerId"]), e)));
|
|
627
|
+
}
|
|
628
|
+
class hr extends Error {
|
|
629
|
+
constructor(e, r = {}) {
|
|
630
|
+
const { key: n, cause: a } = r;
|
|
631
|
+
super(e), this.name = "WidgetError", this.key = n, this.cause = a;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
const dr = {
|
|
635
|
+
message: "Undefined Column name Message",
|
|
636
|
+
options: {
|
|
637
|
+
key: "undefined-column",
|
|
638
|
+
cause: {}
|
|
639
|
+
}
|
|
640
|
+
}, yr = {
|
|
641
|
+
message: "Invalid season name",
|
|
642
|
+
options: {
|
|
643
|
+
key: "invalid-season-name",
|
|
644
|
+
cause: {}
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
export {
|
|
648
|
+
pe as $,
|
|
649
|
+
Kt as A,
|
|
650
|
+
Qt as B,
|
|
651
|
+
Vt as C,
|
|
652
|
+
Zt as D,
|
|
653
|
+
wt as E,
|
|
654
|
+
er as F,
|
|
655
|
+
tr as G,
|
|
656
|
+
rr as H,
|
|
657
|
+
nr as I,
|
|
658
|
+
ar as J,
|
|
659
|
+
sr as K,
|
|
660
|
+
ir as L,
|
|
661
|
+
ur as M,
|
|
662
|
+
or as N,
|
|
663
|
+
cr as O,
|
|
664
|
+
lr as P,
|
|
665
|
+
fr as Q,
|
|
666
|
+
pr as R,
|
|
667
|
+
mr as S,
|
|
668
|
+
Ot as T,
|
|
669
|
+
At as U,
|
|
670
|
+
dr as V,
|
|
671
|
+
hr as W,
|
|
672
|
+
yr as X,
|
|
673
|
+
se as Y,
|
|
674
|
+
et as Z,
|
|
675
|
+
ut as _,
|
|
676
|
+
Pt as a,
|
|
677
|
+
T as a0,
|
|
678
|
+
E as a1,
|
|
679
|
+
C as a2,
|
|
680
|
+
v as a3,
|
|
681
|
+
x as a4,
|
|
682
|
+
M as a5,
|
|
683
|
+
Dt as b,
|
|
684
|
+
Rt as c,
|
|
685
|
+
$t as d,
|
|
686
|
+
Bt as e,
|
|
687
|
+
Lt as f,
|
|
688
|
+
Et as g,
|
|
689
|
+
Gt as h,
|
|
690
|
+
Mt as i,
|
|
691
|
+
xt as j,
|
|
692
|
+
Ft as k,
|
|
693
|
+
X as l,
|
|
694
|
+
Wt as m,
|
|
695
|
+
Ut as n,
|
|
696
|
+
kt as o,
|
|
697
|
+
b as p,
|
|
698
|
+
qt as q,
|
|
699
|
+
Ct as r,
|
|
700
|
+
jt as s,
|
|
701
|
+
me as t,
|
|
702
|
+
ht as u,
|
|
703
|
+
Ht as v,
|
|
704
|
+
Xt as w,
|
|
705
|
+
Yt as x,
|
|
706
|
+
Jt as y,
|
|
707
|
+
zt as z
|
|
708
|
+
};
|