dynamic-html-helpers 1.4.3 → 1.4.5
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/Bundle/htmlhelpers.min.js +13 -13
- package/Bundle/htmlhelpers.script.js +466 -479
- package/Bundle/htmlhelpers.script.min.js +13 -13
- package/README.md +7 -1
- package/Resource/Externals/ticktock.min.js +1 -1
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ var HTMLHelpers = (() => {
|
|
|
23
23
|
var index_exports = {};
|
|
24
24
|
__export(index_exports, {
|
|
25
25
|
$: () => dn,
|
|
26
|
-
$D: () =>
|
|
26
|
+
$D: () => f,
|
|
27
27
|
logFactory: () => logFactory,
|
|
28
28
|
regexhelper: () => REHelper_default,
|
|
29
29
|
splatModule: () => splatModule
|
|
@@ -32,25 +32,25 @@ var HTMLHelpers = (() => {
|
|
|
32
32
|
// ../Resource/Externals/jqx.min.js
|
|
33
33
|
var { IS: u, maybe: A, $Wrap: pr, isNothing: it, xProxy: Oe, addSymbolicExtensions: yr } = st({ useSymbolicExtensions: false });
|
|
34
34
|
function st(t = {}) {
|
|
35
|
-
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: a, xProxy: f2, determineType: S, addSymbolicExtensions:
|
|
36
|
-
return e &&
|
|
37
|
-
function
|
|
38
|
-
let g2 = typeof
|
|
35
|
+
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: a, xProxy: f2, determineType: S, addSymbolicExtensions: y, maybe: x2, $Wrap: d } = at(b2, e);
|
|
36
|
+
return e && y(), { IS: b2, maybe: x2, $Wrap: d, isNothing: a, xProxy: f2, addSymbolicExtensions: y };
|
|
37
|
+
function b2(m, ...h2) {
|
|
38
|
+
let g2 = typeof m == "symbol" ? Symbol.isSymbol : m;
|
|
39
39
|
switch (true) {
|
|
40
40
|
case !!x2({ trial: (c) => "isTypes" in (h2?.[0] ?? {}) }):
|
|
41
|
-
return r(
|
|
41
|
+
return r(m, h2[0]);
|
|
42
42
|
default:
|
|
43
|
-
return h2.length > 1 ? n(g2, ...h2) : S(
|
|
43
|
+
return h2.length > 1 ? n(g2, ...h2) : S(m, ...h2);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
function at(t, e) {
|
|
48
|
-
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: a, determineType: f2 } = lt(t,
|
|
49
|
-
return Object.freeze({ shouldbeIsSingleObject:
|
|
50
|
-
function
|
|
48
|
+
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: a, determineType: f2 } = lt(t, b2), { xProxy: S, addSymbolicExtensions: y } = r(t, b2, e), [x2, d] = [n(), i(t, b2)];
|
|
49
|
+
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness: a, xProxy: S, determineType: f2, addSymbolicExtensions: y, maybe: x2, $Wrap: d });
|
|
50
|
+
function b2(o) {
|
|
51
51
|
return o?.[Symbol.proxy] ?? t(o);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function m(o, s) {
|
|
54
54
|
switch (true) {
|
|
55
55
|
case "defaultValue" in s:
|
|
56
56
|
return g2(o, s);
|
|
@@ -63,8 +63,8 @@ var HTMLHelpers = (() => {
|
|
|
63
63
|
function h2(o, ...s) {
|
|
64
64
|
return s.some((l) => t(o, l));
|
|
65
65
|
}
|
|
66
|
-
function g2(o, { defaultValue: s, isTypes: l = [void 0], notTypes:
|
|
67
|
-
return l = l?.constructor !== Array ? [l] : l,
|
|
66
|
+
function g2(o, { defaultValue: s, isTypes: l = [void 0], notTypes: p2 } = {}) {
|
|
67
|
+
return l = l?.constructor !== Array ? [l] : l, p2 = p2 && p2?.constructor !== Array ? [p2] : [], p2.length < 1 ? t(o, ...l) ? o : s : c(o, { isTypes: l, notTypes: p2 }) ? o : s;
|
|
68
68
|
}
|
|
69
69
|
function c(o, { isTypes: s = [void 0], notTypes: l = [void 0] } = {}) {
|
|
70
70
|
return s = s?.constructor !== Array ? [s] : s, l = l?.constructor !== Array ? [l] : l, t(o, ...s) && !t(o, ...l);
|
|
@@ -72,7 +72,7 @@ var HTMLHelpers = (() => {
|
|
|
72
72
|
}
|
|
73
73
|
function lt() {
|
|
74
74
|
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" }, e = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" };
|
|
75
|
-
return Object.freeze({ SymbolAndCustomProxyFactory: n, maybeFactory: g2, WrapAnyFactory: h2, verifyNothingness: c, determineType:
|
|
75
|
+
return Object.freeze({ SymbolAndCustomProxyFactory: n, maybeFactory: g2, WrapAnyFactory: h2, verifyNothingness: c, determineType: y });
|
|
76
76
|
function r(o, s) {
|
|
77
77
|
Symbol.is || (Symbol.is = Symbol.for(t.IS), Symbol.type = Symbol.for(t.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
78
78
|
return s(this);
|
|
@@ -80,8 +80,8 @@ var HTMLHelpers = (() => {
|
|
|
80
80
|
return o(this, ...l);
|
|
81
81
|
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(l) {
|
|
82
82
|
return s(l);
|
|
83
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(l, ...
|
|
84
|
-
return o(l, ...
|
|
83
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(l, ...p2) {
|
|
84
|
+
return o(l, ...p2);
|
|
85
85
|
}, enumerable: false, configurable: false } }));
|
|
86
86
|
}
|
|
87
87
|
function n(o, s, l) {
|
|
@@ -91,9 +91,9 @@ var HTMLHelpers = (() => {
|
|
|
91
91
|
return (it(o, true) ? { name: "unknown" } : Object.getPrototypeOf(o)?.constructor).name;
|
|
92
92
|
}
|
|
93
93
|
function a(o, s) {
|
|
94
|
-
return Proxy = new o(o, { construct(l,
|
|
95
|
-
let E3 = new l(...
|
|
96
|
-
return Object.defineProperty(E3, s, { value: `${e.PROXY_PREFIX}${i(
|
|
94
|
+
return Proxy = new o(o, { construct(l, p2) {
|
|
95
|
+
let E3 = new l(...p2);
|
|
96
|
+
return Object.defineProperty(E3, s, { value: `${e.PROXY_PREFIX}${i(p2[0])})` }), E3;
|
|
97
97
|
} }), Proxy;
|
|
98
98
|
}
|
|
99
99
|
function f2() {
|
|
@@ -106,26 +106,26 @@ var HTMLHelpers = (() => {
|
|
|
106
106
|
} };
|
|
107
107
|
}
|
|
108
108
|
function S(o, ...s) {
|
|
109
|
-
let l = s.length < 1,
|
|
110
|
-
return { noInput:
|
|
109
|
+
let l = s.length < 1, p2 = o == null;
|
|
110
|
+
return { noInput: p2, noShouldbe: l, compareTo: !l && s[0], inputCTOR: !p2 && (o?.constructor || Object.getPrototypeOf(o)?.constructor), isNaN: Number.isNaN(o) || A({ trial: (E3) => String(o) === e.NAN }), isInfinity: A({ trial: (E3) => String(o) }) === e.INFINITY, shouldBeFirstElementIsNothing: !l && c(s[0]) };
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
let { noInput: l, noShouldbe:
|
|
112
|
+
function y(o, ...s) {
|
|
113
|
+
let { noInput: l, noShouldbe: p2, compareTo: E3, inputCTOR: C3, isNaN: fe2, isInfinity: de2, shouldBeFirstElementIsNothing: me2 } = S(o, ...s);
|
|
114
114
|
switch (s = s.length && s[0], true) {
|
|
115
115
|
case me2:
|
|
116
116
|
return String(o) === String(E3);
|
|
117
|
-
case (o?.[Symbol.proxy] &&
|
|
117
|
+
case (o?.[Symbol.proxy] && p2):
|
|
118
118
|
return o[Symbol.proxy];
|
|
119
119
|
case fe2:
|
|
120
|
-
return
|
|
120
|
+
return p2 ? e.NAN : String(E3) === String(o);
|
|
121
121
|
case de2:
|
|
122
|
-
return
|
|
122
|
+
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
123
123
|
case l:
|
|
124
|
-
return
|
|
124
|
+
return p2 ? String(o) : String(E3) === String(o);
|
|
125
125
|
case C3 === Boolean:
|
|
126
|
-
return
|
|
126
|
+
return p2 ? e.BOOLEAN : C3 === s;
|
|
127
127
|
default:
|
|
128
|
-
return d(o, s,
|
|
128
|
+
return d(o, s, p2, x2(o, C3));
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
function x2(o, s) {
|
|
@@ -140,7 +140,7 @@ var HTMLHelpers = (() => {
|
|
|
140
140
|
return s;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
function d(o, s, l,
|
|
143
|
+
function d(o, s, l, p2) {
|
|
144
144
|
switch (true) {
|
|
145
145
|
case (!l && s === o || o?.[Symbol.proxy] && s === Proxy):
|
|
146
146
|
return true;
|
|
@@ -149,29 +149,29 @@ var HTMLHelpers = (() => {
|
|
|
149
149
|
case (o?.[Symbol.toStringTag] && typeof s == "string"):
|
|
150
150
|
return String(s) === o[Symbol.toStringTag];
|
|
151
151
|
default:
|
|
152
|
-
return s ?
|
|
152
|
+
return s ? m(o, s, p2) : b2(o, p2);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function b2(o, s) {
|
|
156
156
|
return (o?.[Symbol.toStringTag] ?? o?.prototype?.[Symbol.toStringTag]) || s?.name || String(s);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
return A({ trial: (
|
|
158
|
+
function m(o, s, l) {
|
|
159
|
+
return A({ trial: (p2) => o instanceof s }) || s === l || s === Object.getPrototypeOf(l) || `${s?.name}` === l?.name;
|
|
160
160
|
}
|
|
161
161
|
function h2(o, s) {
|
|
162
162
|
return function(l) {
|
|
163
|
-
let
|
|
163
|
+
let p2 = { get value() {
|
|
164
164
|
return l;
|
|
165
165
|
}, is(...E3) {
|
|
166
166
|
return o(l, ...E3);
|
|
167
167
|
}, get type() {
|
|
168
168
|
return s(l);
|
|
169
169
|
} };
|
|
170
|
-
return Object[Symbol.type] && Object.defineProperties(
|
|
170
|
+
return Object[Symbol.type] && Object.defineProperties(p2, { [Symbol.type]: { get() {
|
|
171
171
|
return s(l);
|
|
172
172
|
} }, [Symbol.is]: { value(...E3) {
|
|
173
173
|
return o(l, ...E3);
|
|
174
|
-
} } }), Object.freeze(
|
|
174
|
+
} } }), Object.freeze(p2);
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
177
|
function g2() {
|
|
@@ -180,8 +180,8 @@ var HTMLHelpers = (() => {
|
|
|
180
180
|
return function({ trial: s, whenError: l = o } = {}) {
|
|
181
181
|
try {
|
|
182
182
|
return s();
|
|
183
|
-
} catch (
|
|
184
|
-
return l(
|
|
183
|
+
} catch (p2) {
|
|
184
|
+
return l(p2);
|
|
185
185
|
}
|
|
186
186
|
};
|
|
187
187
|
}
|
|
@@ -282,25 +282,25 @@ var HTMLHelpers = (() => {
|
|
|
282
282
|
}
|
|
283
283
|
var { IS: R, maybe: pe, $Wrap: Er, isNothing: wt, xProxy: vr, addSymbolicExtensions: wr } = Lt({ useSymbolicExtensions: false });
|
|
284
284
|
function Lt(t = {}) {
|
|
285
|
-
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: a, xProxy: f2, determineType: S, addSymbolicExtensions:
|
|
286
|
-
return e &&
|
|
287
|
-
function
|
|
288
|
-
let g2 = typeof
|
|
285
|
+
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: a, xProxy: f2, determineType: S, addSymbolicExtensions: y, maybe: x2, $Wrap: d } = Nt(b2, e);
|
|
286
|
+
return e && y(), { IS: b2, maybe: x2, $Wrap: d, isNothing: a, xProxy: f2, addSymbolicExtensions: y };
|
|
287
|
+
function b2(m, ...h2) {
|
|
288
|
+
let g2 = typeof m == "symbol" ? Symbol.isSymbol : m;
|
|
289
289
|
switch (true) {
|
|
290
290
|
case !!x2({ trial: (c) => "isTypes" in (h2?.[0] ?? {}) }):
|
|
291
|
-
return r(
|
|
291
|
+
return r(m, h2[0]);
|
|
292
292
|
default:
|
|
293
|
-
return h2.length > 1 ? n(g2, ...h2) : S(
|
|
293
|
+
return h2.length > 1 ? n(g2, ...h2) : S(m, ...h2);
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
function Nt(t, e) {
|
|
298
|
-
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: a, determineType: f2 } = Ft(t,
|
|
299
|
-
return Object.freeze({ shouldbeIsSingleObject:
|
|
300
|
-
function
|
|
298
|
+
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: a, determineType: f2 } = Ft(t, b2), { xProxy: S, addSymbolicExtensions: y } = r(t, b2, e), [x2, d] = [n(), i(t, b2)];
|
|
299
|
+
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness: a, xProxy: S, determineType: f2, addSymbolicExtensions: y, maybe: x2, $Wrap: d });
|
|
300
|
+
function b2(o) {
|
|
301
301
|
return o?.[Symbol.proxy] ?? t(o);
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function m(o, s) {
|
|
304
304
|
switch (true) {
|
|
305
305
|
case "defaultValue" in s:
|
|
306
306
|
return g2(o, s);
|
|
@@ -313,8 +313,8 @@ var HTMLHelpers = (() => {
|
|
|
313
313
|
function h2(o, ...s) {
|
|
314
314
|
return s.some((l) => t(o, l));
|
|
315
315
|
}
|
|
316
|
-
function g2(o, { defaultValue: s, isTypes: l = [void 0], notTypes:
|
|
317
|
-
return l = l?.constructor !== Array ? [l] : l,
|
|
316
|
+
function g2(o, { defaultValue: s, isTypes: l = [void 0], notTypes: p2 } = {}) {
|
|
317
|
+
return l = l?.constructor !== Array ? [l] : l, p2 = p2 && p2?.constructor !== Array ? [p2] : [], p2.length < 1 ? t(o, ...l) ? o : s : c(o, { isTypes: l, notTypes: p2 }) ? o : s;
|
|
318
318
|
}
|
|
319
319
|
function c(o, { isTypes: s = [void 0], notTypes: l = [void 0] } = {}) {
|
|
320
320
|
return s = s?.constructor !== Array ? [s] : s, l = l?.constructor !== Array ? [l] : l, t(o, ...s) && !t(o, ...l);
|
|
@@ -322,7 +322,7 @@ var HTMLHelpers = (() => {
|
|
|
322
322
|
}
|
|
323
323
|
function Ft() {
|
|
324
324
|
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" }, e = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" };
|
|
325
|
-
return Object.freeze({ SymbolAndCustomProxyFactory: n, maybeFactory: g2, WrapAnyFactory: h2, verifyNothingness: c, determineType:
|
|
325
|
+
return Object.freeze({ SymbolAndCustomProxyFactory: n, maybeFactory: g2, WrapAnyFactory: h2, verifyNothingness: c, determineType: y });
|
|
326
326
|
function r(o, s) {
|
|
327
327
|
Symbol.is || (Symbol.is = Symbol.for(t.IS), Symbol.type = Symbol.for(t.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
328
328
|
return s(this);
|
|
@@ -330,8 +330,8 @@ var HTMLHelpers = (() => {
|
|
|
330
330
|
return o(this, ...l);
|
|
331
331
|
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(l) {
|
|
332
332
|
return s(l);
|
|
333
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(l, ...
|
|
334
|
-
return o(l, ...
|
|
333
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(l, ...p2) {
|
|
334
|
+
return o(l, ...p2);
|
|
335
335
|
}, enumerable: false, configurable: false } }));
|
|
336
336
|
}
|
|
337
337
|
function n(o, s, l) {
|
|
@@ -341,9 +341,9 @@ var HTMLHelpers = (() => {
|
|
|
341
341
|
return (wt(o, true) ? { name: "unknown" } : Object.getPrototypeOf(o)?.constructor).name;
|
|
342
342
|
}
|
|
343
343
|
function a(o, s) {
|
|
344
|
-
return Proxy = new o(o, { construct(l,
|
|
345
|
-
let E3 = new l(...
|
|
346
|
-
return Object.defineProperty(E3, s, { value: `${e.PROXY_PREFIX}${i(
|
|
344
|
+
return Proxy = new o(o, { construct(l, p2) {
|
|
345
|
+
let E3 = new l(...p2);
|
|
346
|
+
return Object.defineProperty(E3, s, { value: `${e.PROXY_PREFIX}${i(p2[0])})` }), E3;
|
|
347
347
|
} }), Proxy;
|
|
348
348
|
}
|
|
349
349
|
function f2() {
|
|
@@ -356,26 +356,26 @@ var HTMLHelpers = (() => {
|
|
|
356
356
|
} };
|
|
357
357
|
}
|
|
358
358
|
function S(o, ...s) {
|
|
359
|
-
let l = s.length < 1,
|
|
360
|
-
return { noInput:
|
|
359
|
+
let l = s.length < 1, p2 = o == null;
|
|
360
|
+
return { noInput: p2, noShouldbe: l, compareTo: !l && s[0], inputCTOR: !p2 && (o?.constructor || Object.getPrototypeOf(o)?.constructor), isNaN: Number.isNaN(o) || pe({ trial: (E3) => String(o) === e.NAN }), isInfinity: pe({ trial: (E3) => String(o) }) === e.INFINITY, shouldBeFirstElementIsNothing: !l && c(s[0]) };
|
|
361
361
|
}
|
|
362
|
-
function
|
|
363
|
-
let { noInput: l, noShouldbe:
|
|
362
|
+
function y(o, ...s) {
|
|
363
|
+
let { noInput: l, noShouldbe: p2, compareTo: E3, inputCTOR: C3, isNaN: fe2, isInfinity: de2, shouldBeFirstElementIsNothing: me2 } = S(o, ...s);
|
|
364
364
|
switch (s = s.length && s[0], true) {
|
|
365
365
|
case me2:
|
|
366
366
|
return String(o) === String(E3);
|
|
367
|
-
case (o?.[Symbol.proxy] &&
|
|
367
|
+
case (o?.[Symbol.proxy] && p2):
|
|
368
368
|
return o[Symbol.proxy];
|
|
369
369
|
case fe2:
|
|
370
|
-
return
|
|
370
|
+
return p2 ? e.NAN : String(E3) === String(o);
|
|
371
371
|
case de2:
|
|
372
|
-
return
|
|
372
|
+
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
373
373
|
case l:
|
|
374
|
-
return
|
|
374
|
+
return p2 ? String(o) : String(E3) === String(o);
|
|
375
375
|
case C3 === Boolean:
|
|
376
|
-
return
|
|
376
|
+
return p2 ? e.BOOLEAN : C3 === s;
|
|
377
377
|
default:
|
|
378
|
-
return d(o, s,
|
|
378
|
+
return d(o, s, p2, x2(o, C3));
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
function x2(o, s) {
|
|
@@ -390,7 +390,7 @@ var HTMLHelpers = (() => {
|
|
|
390
390
|
return s;
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
function d(o, s, l,
|
|
393
|
+
function d(o, s, l, p2) {
|
|
394
394
|
switch (true) {
|
|
395
395
|
case (!l && s === o || o?.[Symbol.proxy] && s === Proxy):
|
|
396
396
|
return true;
|
|
@@ -399,29 +399,29 @@ var HTMLHelpers = (() => {
|
|
|
399
399
|
case (o?.[Symbol.toStringTag] && typeof s == "string"):
|
|
400
400
|
return String(s) === o[Symbol.toStringTag];
|
|
401
401
|
default:
|
|
402
|
-
return s ?
|
|
402
|
+
return s ? m(o, s, p2) : b2(o, p2);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function b2(o, s) {
|
|
406
406
|
return (o?.[Symbol.toStringTag] ?? o?.prototype?.[Symbol.toStringTag]) || s?.name || String(s);
|
|
407
407
|
}
|
|
408
|
-
function
|
|
409
|
-
return pe({ trial: (
|
|
408
|
+
function m(o, s, l) {
|
|
409
|
+
return pe({ trial: (p2) => o instanceof s }) || s === l || s === Object.getPrototypeOf(l) || `${s?.name}` === l?.name;
|
|
410
410
|
}
|
|
411
411
|
function h2(o, s) {
|
|
412
412
|
return function(l) {
|
|
413
|
-
let
|
|
413
|
+
let p2 = { get value() {
|
|
414
414
|
return l;
|
|
415
415
|
}, is(...E3) {
|
|
416
416
|
return o(l, ...E3);
|
|
417
417
|
}, get type() {
|
|
418
418
|
return s(l);
|
|
419
419
|
} };
|
|
420
|
-
return Object[Symbol.type] && Object.defineProperties(
|
|
420
|
+
return Object[Symbol.type] && Object.defineProperties(p2, { [Symbol.type]: { get() {
|
|
421
421
|
return s(l);
|
|
422
422
|
} }, [Symbol.is]: { value(...E3) {
|
|
423
423
|
return o(l, ...E3);
|
|
424
|
-
} } }), Object.freeze(
|
|
424
|
+
} } }), Object.freeze(p2);
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
427
|
function g2() {
|
|
@@ -430,8 +430,8 @@ var HTMLHelpers = (() => {
|
|
|
430
430
|
return function({ trial: s, whenError: l = o } = {}) {
|
|
431
431
|
try {
|
|
432
432
|
return s();
|
|
433
|
-
} catch (
|
|
434
|
-
return l(
|
|
433
|
+
} catch (p2) {
|
|
434
|
+
return l(p2);
|
|
435
435
|
}
|
|
436
436
|
};
|
|
437
437
|
}
|
|
@@ -442,7 +442,7 @@ var HTMLHelpers = (() => {
|
|
|
442
442
|
}
|
|
443
443
|
var Q = Tt;
|
|
444
444
|
function Tt({ styleSheet: t, createWithId: e } = {}) {
|
|
445
|
-
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: i, sheet: a, removeRules: f2, consider: S, currentSheetID:
|
|
445
|
+
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: i, sheet: a, removeRules: f2, consider: S, currentSheetID: y } = Ct({ styleSheet: t, createWithId: e });
|
|
446
446
|
function x2(g2, c) {
|
|
447
447
|
if (g2 && c.removeProperties) {
|
|
448
448
|
Object.keys(c.removeProperties).forEach((o) => g2.style.removeProperty(je(o)));
|
|
@@ -451,74 +451,74 @@ var HTMLHelpers = (() => {
|
|
|
451
451
|
Object.entries(c).forEach(([o, s]) => {
|
|
452
452
|
o = je(o.trim()), s = s.trim();
|
|
453
453
|
let l;
|
|
454
|
-
if (/!important/.test(s) && (s = s.slice(0, s.indexOf("!important")).trim(), l = "important"), !CSS.supports(o, s)) return console.error(`StylingFactory ${
|
|
455
|
-
Je(() => g2.style.setProperty(o, s, l), `StylingFactory ${
|
|
454
|
+
if (/!important/.test(s) && (s = s.slice(0, s.indexOf("!important")).trim(), l = "important"), !CSS.supports(o, s)) return console.error(`StylingFactory ${y} error: '${o}' with value '${s}' not supported (yet)`);
|
|
455
|
+
Je(() => g2.style.setProperty(o, s, l), `StylingFactory ${y} (setRule4Selector) failed`);
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
458
|
function d(g2, c, o = a) {
|
|
459
|
-
if (g2 = g2?.trim?.(), !R(g2, String) || !g2.length || /[;,]$/g.test(g2)) return console.error(`StylingFactory ${
|
|
459
|
+
if (g2 = g2?.trim?.(), !R(g2, String) || !g2.length || /[;,]$/g.test(g2)) return console.error(`StylingFactory ${y} (setRules): [${g2 || "[no selector given]"}] is not a valid selector`);
|
|
460
460
|
if (c.removeRule) return f2(g2);
|
|
461
461
|
let s = n(g2, true), l = s || o.cssRules[o.insertRule(`${g2} {}`, o.cssRules.length || 0)];
|
|
462
462
|
return S(() => x2(l, c), g2, s);
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function b2(g2) {
|
|
465
465
|
let c = g2.trim().split(/{/, 2), o = c.shift().trim();
|
|
466
|
-
if (!R(o, String) || !o?.trim()?.length) return console.error(`StylingFactory ${
|
|
466
|
+
if (!R(o, String) || !o?.trim()?.length) return console.error(`StylingFactory ${y} (doParse): no (valid) selector could be extracted from rule ${ye(g2)}`);
|
|
467
467
|
let s = It(c.shift());
|
|
468
|
-
return Je(() => d(o, s), `StylingFactory ${
|
|
468
|
+
return Je(() => d(o, s), `StylingFactory ${y} (setRules) failed`);
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function m(g2) {
|
|
471
471
|
let c = r(g2);
|
|
472
|
-
return c.done ? c.existing :
|
|
472
|
+
return c.done ? c.existing : b2(g2);
|
|
473
473
|
}
|
|
474
474
|
function h2(g2, c) {
|
|
475
|
-
return g2.trim().startsWith("@media") ?
|
|
475
|
+
return g2.trim().startsWith("@media") ? m(At(g2, c)) : d(g2, c);
|
|
476
476
|
}
|
|
477
477
|
return function(g2, c = {}) {
|
|
478
|
-
return i(g2, c) && (Object.keys(c).length ? h2(g2, c) :
|
|
478
|
+
return i(g2, c) && (Object.keys(c).length ? h2(g2, c) : m(g2));
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
481
|
function Ct({ styleSheet: t, createWithId: e }) {
|
|
482
482
|
let r = "Note: The rule or some of its properties may not be supported by your browser (yet)", n = `for style#${e}`;
|
|
483
483
|
t = e ? i(e) : t;
|
|
484
|
-
function i(
|
|
485
|
-
let h2 = document.querySelector(`#${
|
|
484
|
+
function i(m) {
|
|
485
|
+
let h2 = document.querySelector(`#${m}`)?.sheet;
|
|
486
486
|
if (h2) return h2;
|
|
487
|
-
let g2 = Object.assign(document.createElement("style"), { id:
|
|
487
|
+
let g2 = Object.assign(document.createElement("style"), { id: m });
|
|
488
488
|
return document.head.insertAdjacentElement("beforeend", g2), g2.sheet;
|
|
489
489
|
}
|
|
490
|
-
function a(
|
|
491
|
-
return console.error(`StylingFactory ${n} [rule: ${
|
|
490
|
+
function a(m) {
|
|
491
|
+
return console.error(`StylingFactory ${n} [rule: ${m}]
|
|
492
492
|
=> @charset, @namespace and @import are not supported here`), { done: true };
|
|
493
493
|
}
|
|
494
|
-
function f2(
|
|
495
|
-
return [...t.rules].find((g2) => h2 ? Qe(g2.selectorText || "",
|
|
494
|
+
function f2(m, h2) {
|
|
495
|
+
return [...t.rules].find((g2) => h2 ? Qe(g2.selectorText || "", m) : Ot`${Pt(m)}${[..."gim"]}`.test(g2.cssText));
|
|
496
496
|
}
|
|
497
|
-
function S(
|
|
498
|
-
return /^@charset|@import|namespace/i.test(
|
|
497
|
+
function S(m) {
|
|
498
|
+
return /^@charset|@import|namespace/i.test(m.trim()) ? a(m) : m.match(/}/g)?.length > 1 ? { existing: d(m, 1), done: true } : { done: false };
|
|
499
499
|
}
|
|
500
|
-
function
|
|
501
|
-
let h2 = [...t.cssRules].reduce((c, o, s) => Qe(o.selectorText || "",
|
|
502
|
-
return h2.forEach((c) => t.deleteRule(c)), g2 > 0 ? console.info(`\u2714 Removed ${g2} instance${g2 > 1 ? "s" : ""} of selector ${
|
|
500
|
+
function y(m) {
|
|
501
|
+
let h2 = [...t.cssRules].reduce((c, o, s) => Qe(o.selectorText || "", m) && c.concat(s) || c, []), g2 = h2.length;
|
|
502
|
+
return h2.forEach((c) => t.deleteRule(c)), g2 > 0 ? console.info(`\u2714 Removed ${g2} instance${g2 > 1 ? "s" : ""} of selector ${m} from ${n.slice(4)}`) : console.info(`\u2714 Remove rule: selector ${m} does not exist in ${n.slice(4)}`);
|
|
503
503
|
}
|
|
504
|
-
function x2(
|
|
505
|
-
return
|
|
504
|
+
function x2(m, h2) {
|
|
505
|
+
return m && R(m, String) && m.trim().length > 0 && R(h2, Object) || (console.error(`StylingFactory ${n} called with invalid parameters`), false);
|
|
506
506
|
}
|
|
507
|
-
function d(
|
|
508
|
-
|
|
509
|
-
let h2 =
|
|
507
|
+
function d(m) {
|
|
508
|
+
m = m.trim();
|
|
509
|
+
let h2 = m.slice(0, m.indexOf("{")).trim(), g2 = !!f2(h2);
|
|
510
510
|
try {
|
|
511
|
-
return t.insertRule(`${
|
|
511
|
+
return t.insertRule(`${m}`, t.cssRules.length), g2;
|
|
512
512
|
} catch (c) {
|
|
513
513
|
return console.error(`StylingFactory ${n} (tryParse) ${c.name} Error:
|
|
514
514
|
${c.message}
|
|
515
|
-
Rule: ${ye(
|
|
515
|
+
Rule: ${ye(m)}
|
|
516
516
|
${r}`), g2;
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function b2(m, h2, g2) {
|
|
520
520
|
try {
|
|
521
|
-
return
|
|
521
|
+
return m(), g2;
|
|
522
522
|
} catch (c) {
|
|
523
523
|
return console.error(`StylingFactory ${n} (tryAddOrModify) ${c.name} Error:
|
|
524
524
|
${c.message}
|
|
@@ -526,7 +526,7 @@ Rule: ${ye(h2)}
|
|
|
526
526
|
${r}`), g2;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
return { sheet: t, removeRules:
|
|
529
|
+
return { sheet: t, removeRules: y, tryParseAtOrNestedRules: S, ruleExists: f2, checkParams: x2, tryParse: d, consider: b2, currentSheetID: n };
|
|
530
530
|
}
|
|
531
531
|
function At(t, e) {
|
|
532
532
|
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${$t(n)}`)}`;
|
|
@@ -599,8 +599,8 @@ ${r}`), g2;
|
|
|
599
599
|
if (r?.children?.length && M(r), r?.attributes) {
|
|
600
600
|
let i = u(r, SVGElement) ? D.svg : D.html;
|
|
601
601
|
[...(r ?? { attributes: [] }).attributes].forEach((a) => {
|
|
602
|
-
let f2 = a.name.trim().toLowerCase(), S = a.value.trim().toLowerCase().replace(U.whiteSpace, ""),
|
|
603
|
-
if (
|
|
602
|
+
let f2 = a.name.trim().toLowerCase(), S = a.value.trim().toLowerCase().replace(U.whiteSpace, ""), y = f2 === "href" ? !U.validURL.test(S) : U.notAllowedValues.test(S), x2 = f2.startsWith("data") ? !U.data.test(f2) : !!i[f2];
|
|
603
|
+
if (y || x2) {
|
|
604
604
|
let d = X(a.value || "none", 60);
|
|
605
605
|
d += d.length === 60 ? "..." : "", e.removed[`${a.name}`] = `attribute/property/value not allowed, removed. Value: ${d}`, r.removeAttribute(a.name);
|
|
606
606
|
}
|
|
@@ -647,7 +647,7 @@ ${r}`), g2;
|
|
|
647
647
|
if (t.node("#jqxPopup")) return;
|
|
648
648
|
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...He);
|
|
649
649
|
let e = [], [r, n] = [t("#jqxPopupContent"), t.node("#jqxPopup")], i = {};
|
|
650
|
-
return t.handle({ type: "click, cancel", handlers:
|
|
650
|
+
return t.handle({ type: "click, cancel", handlers: m, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show: a, remove: f2, removeModal: b2 });
|
|
651
651
|
function a(c) {
|
|
652
652
|
if (n.open) switch (true) {
|
|
653
653
|
case S(c):
|
|
@@ -657,7 +657,7 @@ ${r}`), g2;
|
|
|
657
657
|
}
|
|
658
658
|
i = { ...c };
|
|
659
659
|
let { content: o } = i;
|
|
660
|
-
return t.IS(o, String, HTMLElement) || o?.isJQx ?
|
|
660
|
+
return t.IS(o, String, HTMLElement) || o?.isJQx ? y() : true;
|
|
661
661
|
}
|
|
662
662
|
function f2() {
|
|
663
663
|
return i.modal ? g2(i.warnMessage) : x2();
|
|
@@ -666,7 +666,7 @@ ${r}`), g2;
|
|
|
666
666
|
for (let [o, s] of Object.entries(i)) if (s !== c[o]) return false;
|
|
667
667
|
return true;
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function y() {
|
|
670
670
|
r.clear();
|
|
671
671
|
let { content: c, modal: o, closeAfter: s } = i;
|
|
672
672
|
o = t.IS(o, Boolean) ? o : false;
|
|
@@ -680,10 +680,10 @@ ${r}`), g2;
|
|
|
680
680
|
function d() {
|
|
681
681
|
e.forEach((c) => clearTimeout(c)), e = [];
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function b2({ callback: c, value: o } = {}) {
|
|
684
684
|
i.returnValue = o, i.modal = false, i.callback = c || i.callback, f2();
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function m({ evt: c }) {
|
|
687
687
|
if (!(Object.keys(i).length < 1 || !n.open) && (c.type === "cancel" && i.modal && c.preventDefault(), c.target.closest("#closeHandleIcon") || !c.target.closest("#jqxPopupContent"))) return i.activeTimer && clearTimeout(i.activeTimer), f2();
|
|
688
688
|
}
|
|
689
689
|
function h2(c, o) {
|
|
@@ -704,23 +704,23 @@ ${r}`), g2;
|
|
|
704
704
|
let e = {}, r = "anonymous_";
|
|
705
705
|
function n(d) {
|
|
706
706
|
if (d) {
|
|
707
|
-
let { handler:
|
|
708
|
-
document.addEventListener(h2,
|
|
707
|
+
let { handler: b2, capture: m, type: h2 } = d;
|
|
708
|
+
document.addEventListener(h2, b2, { capture: m });
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
function i(d) {
|
|
712
712
|
if (d) {
|
|
713
|
-
let { type:
|
|
714
|
-
document.removeEventListener(
|
|
713
|
+
let { type: b2, handler: m, capture: h2 } = d;
|
|
714
|
+
document.removeEventListener(b2, m, { capture: h2 });
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
|
-
function a(d,
|
|
717
|
+
function a(d, b2, m, h2) {
|
|
718
718
|
return function(g2) {
|
|
719
|
-
if (!L(
|
|
720
|
-
let c = g2.target.closest(
|
|
719
|
+
if (!L(b2)) return d({ evt: g2 });
|
|
720
|
+
let c = g2.target.closest(b2);
|
|
721
721
|
if (c) {
|
|
722
722
|
let o = t(c);
|
|
723
|
-
d({ self: o, me: o, evt: g2 }),
|
|
723
|
+
d({ self: o, me: o, evt: g2 }), m && y(g2.type, h2);
|
|
724
724
|
}
|
|
725
725
|
return true;
|
|
726
726
|
};
|
|
@@ -728,38 +728,38 @@ ${r}`), g2;
|
|
|
728
728
|
function f2(d) {
|
|
729
729
|
return e[d] = e[d] || {}, e[d];
|
|
730
730
|
}
|
|
731
|
-
function S(d,
|
|
732
|
-
return Object.entries(f2(d)).find(([
|
|
731
|
+
function S(d, b2) {
|
|
732
|
+
return Object.entries(f2(d)).find(([m]) => m === b2);
|
|
733
733
|
}
|
|
734
|
-
function
|
|
735
|
-
let
|
|
736
|
-
|
|
734
|
+
function y(d, b2) {
|
|
735
|
+
let m = S(d, b2);
|
|
736
|
+
m && (i(m[1]), delete e[d][b2], delete q[b2], w.warn(`Removed listener [${b2}] for event type [${d}].`));
|
|
737
737
|
}
|
|
738
738
|
function x2(d) {
|
|
739
|
-
let { type:
|
|
740
|
-
e[
|
|
741
|
-
let
|
|
739
|
+
let { type: b2, handler: m, name: h2, capture: g2, once: c, selector: o, node: s, about: l } = d;
|
|
740
|
+
e[b2] = e[b2] || {};
|
|
741
|
+
let p2 = he(h2 || m.name), E3 = m;
|
|
742
742
|
if (s instanceof HTMLElement) {
|
|
743
|
-
let C3 = s.dataset.hid ||
|
|
743
|
+
let C3 = s.dataset.hid || p2;
|
|
744
744
|
s.dataset.hid = C3, o = `[data-hid=${C3}]`;
|
|
745
745
|
}
|
|
746
746
|
switch (true) {
|
|
747
|
-
case !e[
|
|
748
|
-
return w.log(`JQx: created listener for event type ${
|
|
749
|
-
|
|
750
|
-
} }, e[
|
|
747
|
+
case !e[b2][p2]:
|
|
748
|
+
return w.log(`JQx: created listener for event type ${b2}, with handler name ${p2}`), e[b2][p2] = { name: p2, handler: a(m, o, c, p2), capture: ke(b2, g2), once: !!c, type: b2, initialHandler: E3, selector: !!o && o || false, about: !!l && l || false, unListen() {
|
|
749
|
+
y(b2, p2);
|
|
750
|
+
} }, e[b2][p2];
|
|
751
751
|
default:
|
|
752
|
-
return console.warn(`The listener [${
|
|
752
|
+
return console.warn(`The listener [${p2}] for [${b2}] exists, it is not re-assigned.`);
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
755
|
return { remove(...d) {
|
|
756
|
-
return
|
|
756
|
+
return y(...d);
|
|
757
757
|
}, listen: function(d) {
|
|
758
|
-
let { type:
|
|
759
|
-
if (!L(
|
|
758
|
+
let { type: b2, handler: m } = d;
|
|
759
|
+
if (!L(b2) || !u(m, Function)) return;
|
|
760
760
|
let h2 = x2(d);
|
|
761
|
-
if (h2) return n(h2), { type:
|
|
762
|
-
|
|
761
|
+
if (h2) return n(h2), { type: b2, name: h2.name, unListen() {
|
|
762
|
+
y(b2, h2.name);
|
|
763
763
|
} };
|
|
764
764
|
}, get ListenerStore() {
|
|
765
765
|
return Object.freeze({ ...e });
|
|
@@ -857,8 +857,8 @@ ${r}`), g2;
|
|
|
857
857
|
return r.unshift(...x2.map((d) => `${te()} \u26A0 ${Se(d)}`)), console.warn(r.slice(0, x2.length).join(`
|
|
858
858
|
`)), n;
|
|
859
859
|
}
|
|
860
|
-
function
|
|
861
|
-
let d = x2.map((
|
|
860
|
+
function y(...x2) {
|
|
861
|
+
let d = x2.map((b2) => `${te()} \u2714 ${Se(b2)}`);
|
|
862
862
|
switch (!e && r.unshift(...d), t) {
|
|
863
863
|
case true:
|
|
864
864
|
console.log(d.join(`
|
|
@@ -867,7 +867,7 @@ ${r}`), g2;
|
|
|
867
867
|
return n;
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
return Object.defineProperties(n, { log: { value:
|
|
870
|
+
return Object.defineProperties(n, { log: { value: y, enumerable: false }, error: { value: f2, enumerable: false }, warn: { value: S, enumerable: false } }), Object.freeze(n);
|
|
871
871
|
}
|
|
872
872
|
function te() {
|
|
873
873
|
return ((t) => `[${ee(t.getHours())}:${ee(t.getMinutes())}:${ee(t.getSeconds())}.${ee(t.getMilliseconds(), 3)}]`)(/* @__PURE__ */ new Date());
|
|
@@ -905,8 +905,8 @@ ${r}`), g2;
|
|
|
905
905
|
}
|
|
906
906
|
function We(t) {
|
|
907
907
|
if (!u(t, HTMLElement)) return;
|
|
908
|
-
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), i = !![e.display, r.display].includes("none"), a = !!t.hidden, f2 = parseInt(r.height) < 1 || parseInt(r.width) < 1, S = t.offsetTop < 0 || t.offsetLeft + t.offsetWidth < 0 || t.offsetLeft > document.body.offsetWidth,
|
|
909
|
-
return !(a || S ||
|
|
908
|
+
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), i = !![e.display, r.display].includes("none"), a = !!t.hidden, f2 = parseInt(r.height) < 1 || parseInt(r.width) < 1, S = t.offsetTop < 0 || t.offsetLeft + t.offsetWidth < 0 || t.offsetLeft > document.body.offsetWidth, y = +r.opacity == 0 || +(e.opacity || 1) == 0;
|
|
909
|
+
return !(a || S || y || i || n || f2);
|
|
910
910
|
}
|
|
911
911
|
function ze(t) {
|
|
912
912
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:read-write)")].find((e) => e === t) : false;
|
|
@@ -1114,7 +1114,7 @@ ${r}`), g2;
|
|
|
1114
1114
|
for (let i of r) {
|
|
1115
1115
|
if (!i.isJQx && L(i)) {
|
|
1116
1116
|
let a = i.trim(), S = !/^<(.+)[^>]+>$/m.test(a) ? t.text(i) : F(i);
|
|
1117
|
-
v(e, (
|
|
1117
|
+
v(e, (y) => y.append(n ? S : H(S)));
|
|
1118
1118
|
}
|
|
1119
1119
|
P(i) && v(e, (a) => a.append(n ? i : H(i))), i.isJQx && !i.is.empty && v(e, (a) => i.collection.forEach((f2) => a.append(n ? f2 : H(f2))));
|
|
1120
1120
|
}
|
|
@@ -1240,9 +1240,9 @@ ${r}`), g2;
|
|
|
1240
1240
|
for (let [a, f2] of Object.entries(i)) {
|
|
1241
1241
|
if (a = a.trim(), f2 && !re(a) || !f2) return false;
|
|
1242
1242
|
if (a.toLowerCase() === "id") return e[0].id = f2;
|
|
1243
|
-
v(e, (
|
|
1244
|
-
if (a.startsWith("data")) return
|
|
1245
|
-
|
|
1243
|
+
v(e, (y) => {
|
|
1244
|
+
if (a.startsWith("data")) return y.dataset[a.slice(a.indexOf("-") + 1)] = f2;
|
|
1245
|
+
y[a] = f2;
|
|
1246
1246
|
});
|
|
1247
1247
|
}
|
|
1248
1248
|
return e;
|
|
@@ -1433,11 +1433,11 @@ ${r}`), g2;
|
|
|
1433
1433
|
}
|
|
1434
1434
|
function ur(t) {
|
|
1435
1435
|
return function(e) {
|
|
1436
|
-
let { type: r, types: n, origin: i, selector: a, handler: f2, handlers: S, node:
|
|
1436
|
+
let { type: r, types: n, origin: i, selector: a, handler: f2, handlers: S, node: y, name: x2, capture: d, once: b2, about: m } = e;
|
|
1437
1437
|
f2 = S || f2, r = n || r, a = i || a;
|
|
1438
1438
|
let h2 = Ne(r), g2 = x2;
|
|
1439
1439
|
f2 = u(f2, Function) ? [f2] : f2;
|
|
1440
|
-
let c = { type: h2, selector: a || i, capture: d, name: g2, once:
|
|
1440
|
+
let c = { type: h2, selector: a || i, capture: d, name: g2, once: b2, node: y, about: m };
|
|
1441
1441
|
switch (true) {
|
|
1442
1442
|
case (u(h2, Array) && h2.length > 0):
|
|
1443
1443
|
for (let o of h2) c.type = o, rt(f2, c, t);
|
|
@@ -1459,18 +1459,18 @@ ${r}`), g2;
|
|
|
1459
1459
|
return t.activePopup || Object.defineProperty(t, "activePopup", { value: Z(t), enumerable: false }), t.activePopup;
|
|
1460
1460
|
}
|
|
1461
1461
|
function dr(t) {
|
|
1462
|
-
let e = (d,
|
|
1462
|
+
let e = (d, b2) => $e(d, b2), r = function(d) {
|
|
1463
1463
|
return Q({ createWithId: d || `jqx${ae()}` });
|
|
1464
1464
|
}, n = function(...d) {
|
|
1465
|
-
for (let
|
|
1465
|
+
for (let b2 of d) $e(b2);
|
|
1466
1466
|
}, i = rr(t), a = K(t), f2 = ur(a);
|
|
1467
1467
|
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit: i, handle: f2, capturedHandling: f2, log: (...d) => w.on.log(...d).off, warn: (...d) => w.on.warn(...d).off, error: (...d) => w.on.error(...d).off, handlerWrapper: a };
|
|
1468
1468
|
}
|
|
1469
1469
|
function mr(t) {
|
|
1470
1470
|
let { factoryExtensions: e, instanceExtensions: r } = qe(t);
|
|
1471
1471
|
Ae = e, ce = r;
|
|
1472
|
-
let { editCssRule: n, createStyle: i, editCssRules: a, allowProhibit: f2, handle: S, capturedHandling:
|
|
1473
|
-
return { log: x2, warn: d, error:
|
|
1472
|
+
let { editCssRule: n, createStyle: i, editCssRules: a, allowProhibit: f2, handle: S, capturedHandling: y, log: x2, warn: d, error: b2, handlerWrapper: m } = dr(t), h2 = cr(t), g2 = er(t);
|
|
1473
|
+
return { log: x2, warn: d, error: b2, editCssRules: a, createStyle: i, editStylesheet: i, editCssRule: n, escHtml: O, logger: w, text(c, o = false) {
|
|
1474
1474
|
return o ? t.comment(c) : document.createTextNode(c);
|
|
1475
1475
|
}, node(c, o = document) {
|
|
1476
1476
|
return o.querySelector(c, o);
|
|
@@ -1495,13 +1495,13 @@ ${r}`), g2;
|
|
|
1495
1495
|
}, get removeCssRules() {
|
|
1496
1496
|
return tt;
|
|
1497
1497
|
}, get delegate() {
|
|
1498
|
-
return lr(
|
|
1498
|
+
return lr(y);
|
|
1499
1499
|
}, get delegateCaptured() {
|
|
1500
|
-
return
|
|
1500
|
+
return y;
|
|
1501
1501
|
}, get handle() {
|
|
1502
|
-
return
|
|
1502
|
+
return y;
|
|
1503
1503
|
}, get listen() {
|
|
1504
|
-
return
|
|
1504
|
+
return m.listen;
|
|
1505
1505
|
}, get at() {
|
|
1506
1506
|
return N;
|
|
1507
1507
|
}, get setStyle() {
|
|
@@ -1515,7 +1515,7 @@ ${r}`), g2;
|
|
|
1515
1515
|
}, get Popup() {
|
|
1516
1516
|
return fr(t);
|
|
1517
1517
|
}, get listenerStore() {
|
|
1518
|
-
return
|
|
1518
|
+
return m.ListenerStore;
|
|
1519
1519
|
} };
|
|
1520
1520
|
}
|
|
1521
1521
|
var ot = nt(gr());
|
|
@@ -1524,104 +1524,91 @@ ${r}`), g2;
|
|
|
1524
1524
|
if (e?.isJQx) return e;
|
|
1525
1525
|
let i = u(r, HTMLBRElement);
|
|
1526
1526
|
r = (!i && r && r.isJQx ? r[0] : r) || document.body, n = n && Object.values(N).find((d) => n === d) ? n : void 0;
|
|
1527
|
-
let a = z(e), S = !a && ue(e) || a,
|
|
1528
|
-
if (
|
|
1527
|
+
let a = z(e), S = !a && ue(e) || a, y = { collection: ie(e) ?? [], isVirtual: i, isJQx: true }, x2 = Y(y.collection);
|
|
1528
|
+
if (y.collection.length && x2) return i || y.collection.forEach((d) => {
|
|
1529
1529
|
r.contains(d) || I([d], r, n);
|
|
1530
|
-
}), _(
|
|
1530
|
+
}), _(y);
|
|
1531
1531
|
if (S) {
|
|
1532
|
-
if ([e].flat().forEach((d) =>
|
|
1533
|
-
let d =
|
|
1534
|
-
|
|
1535
|
-
let
|
|
1536
|
-
|
|
1537
|
-
let h2 =
|
|
1538
|
-
w.log(`JQx: created ${
|
|
1532
|
+
if ([e].flat().forEach((d) => y.collection.push(F(d))), y.collection.length > 0) {
|
|
1533
|
+
let d = y.collection.filter((g2) => g2?.dataset?.jqxcreationerror);
|
|
1534
|
+
y.collection = y.collection.filter((g2) => !g2?.dataset?.jqxcreationerror);
|
|
1535
|
+
let m = y.collection.map((g2) => `${String(g2.constructor).split(/function|\(/)[1].trim()}`).length > 1;
|
|
1536
|
+
y = _(y);
|
|
1537
|
+
let h2 = y.collection.length > 0 ? Xe(y) : "sanitized: no elements remaining";
|
|
1538
|
+
w.log(`JQx: created ${y.isVirtual ? "(virtual)" : ""} instance from ${m ? "array of " : ""}HTML string${m ? "s" : ""} ${h2}`), y.isVirtual || I(y.collection, r, n);
|
|
1539
1539
|
}
|
|
1540
|
-
return
|
|
1540
|
+
return y;
|
|
1541
1541
|
}
|
|
1542
|
-
return Ce(e, r,
|
|
1542
|
+
return Ce(e, r, y), _(y);
|
|
1543
1543
|
};
|
|
1544
1544
|
}
|
|
1545
1545
|
var dn = ot;
|
|
1546
1546
|
|
|
1547
1547
|
// ../Resource/Externals/ticktock.min.js
|
|
1548
|
-
var
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
} }
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
return
|
|
1578
|
-
}
|
|
1579
|
-
function Ye2(e, r) {
|
|
1580
|
-
return e === "numeric" && r.startsWith("0") ? r.slice(1) : r;
|
|
1581
|
-
}
|
|
1582
|
-
function Ee2(e, r, n) {
|
|
1583
|
-
let t = fe(...r.units.concat(de(n).split(",")).flat()), a = { ...b.fixed }, o = Intl.DateTimeFormat(t.locale, t).formatToParts(e).reduce((s, u2) => u2.type === "literal" && /[ ,/-]/.test(u2.value) ? s : { ...s, [u2.type]: Ye2(t[u2.type], u2.value) }, {});
|
|
1584
|
-
return a.ms = t.fractionalSecondDigits ? a.msp : a.ms, a.yyyy = o.relatedYear ? a.ry : a.yyyy, r.formatStr = r.formatStr.replace(b.re, (s) => /^(M|MM)$/.test(s) ? Ve2(e, t.locale, t.timeZone, /^M$/.test(s)) : o[Object.keys(a[s]).shift()] || s), r.finalize(void 0, o.dayPeriod, o.era, o.yearName);
|
|
1585
|
-
}
|
|
1586
|
-
function Ve2(e, r, n, t) {
|
|
1587
|
-
return e.toLocaleString(r, { timeZone: n, month: t ? H2 : q2 });
|
|
1588
|
-
}
|
|
1589
|
-
function de(e) {
|
|
1590
|
-
return e.replace(/\s+/g, "");
|
|
1548
|
+
var I2 = Fe2();
|
|
1549
|
+
function Fe2() {
|
|
1550
|
+
let [e, r, n, t] = ["2-digit", "numeric", "long", "short"], a = { fixed: { MM: { month: n }, M: { month: t }, m: { month: r }, mm: { month: e }, yyyy: { year: r }, yy: { year: e }, WD: { weekday: n }, wd: { weekday: t }, d: { day: r }, dd: { day: e }, h: { hour: r }, hh: { hour: e }, mi: { minute: r }, mmi: { minute: e }, s: { second: r }, ss: { second: e }, ms: { fractionalSecondDigits: 3 }, tz: { timeZoneName: "shortOffset" }, dl: { locale: "default" }, h12: { hour12: false }, yn: { yearName: "" }, ry: { relatedYear: true }, msp: { fractionalSecond: true } }, dynamic: { tzn: (i) => ({ timeZoneName: i.slice(4) }), hrc: (i) => ({ hourCycle: `h${i.slice(4)}` }), ds: (i) => ({ dateStyle: i.slice(3) }), ts: (i) => ({ timeStyle: i.slice(3) }), tz: (i) => ({ timeZone: i.slice(3) }), e: (i) => ({ era: i.slice(2) }), l: (i) => ({ locale: i.slice(2) }) } }, o = { ...a, retrieveDyn(i) {
|
|
1551
|
+
let y = i?.slice(0, i.indexOf(":"));
|
|
1552
|
+
return a.dynamic[y] && a.dynamic[y](i);
|
|
1553
|
+
}, get re() {
|
|
1554
|
+
return new RegExp(`\\b(${Object.keys(a.fixed).join("|")})\\b`, "g");
|
|
1555
|
+
} }, s = (i = "dtf", y = 0) => {
|
|
1556
|
+
let h2 = ` ${i.replace(/(?<=\{)(.+?)(?=})/g, (d) => `[${y++}]`).replace(/[{}]/g, "").trim()} `, D2 = i.match(/(?<=\{)(.+?)(?=})/g) || [];
|
|
1557
|
+
return { get texts() {
|
|
1558
|
+
return D2;
|
|
1559
|
+
}, formatString(d) {
|
|
1560
|
+
h2 = d;
|
|
1561
|
+
}, set formatStr(d) {
|
|
1562
|
+
h2 = d;
|
|
1563
|
+
}, get formatStr() {
|
|
1564
|
+
return h2;
|
|
1565
|
+
}, get units() {
|
|
1566
|
+
return h2.match(o.re) || [];
|
|
1567
|
+
}, finalize(d = "", b2 = "", v2 = "", $3 = "") {
|
|
1568
|
+
return h2.replace(/~([\d+]?)/g, "$1").replace(/dtf/, d).replace(/era/, v2).replace(/dp\b|~dp\b/, b2).replace(/yn\b/, $3).replace(/\[(\d+?)]/g, (S, Me2) => D2[Me2].trim()).trim();
|
|
1569
|
+
} };
|
|
1570
|
+
}, u2 = (i) => i.replace(/\s+/g, ""), c = (...i) => i?.reduce((y, h2) => ({ ...y, ...o.retrieveDyn(h2) || o.fixed[h2] }), o.fixed.dl), l = (i, y, h2) => {
|
|
1571
|
+
let D2 = c(...u2(h2).split(",")), d = Intl.DateTimeFormat(D2.locale, D2).format(i);
|
|
1572
|
+
return y.finalize(d);
|
|
1573
|
+
}, m = (i, y, h2, D2) => i.toLocaleString(y, { timeZone: h2, month: D2 ? t : n }), T3 = (i, y, h2) => {
|
|
1574
|
+
let D2 = c(...y.units.concat(u2(h2).split(",")).flat()), d = { ...o.fixed }, b2 = ($3, S) => D2[$3] === "numeric" && S.startsWith("0") ? S.slice(1) : S, v2 = Intl.DateTimeFormat(D2.locale, D2).formatToParts(i).reduce(($3, S) => S.type === "literal" && /[ ,/-]/.test(S.value) ? $3 : { ...$3, [S.type]: b2(S.type, S.value) }, {});
|
|
1575
|
+
return d.ms = D2.fractionalSecondDigits ? d.msp : d.ms, d.yyyy = v2.relatedYear ? d.ry : d.yyyy, y.formatStr = y.formatStr.replace(o.re, ($3) => /^(M|MM)$/.test($3) ? m(i, D2.locale, D2.timeZone, /^M$/.test($3)) : v2[Object.keys(d[$3]).shift()] || $3), y.finalize(void 0, v2.dayPeriod, v2.era, v2.yearName);
|
|
1576
|
+
};
|
|
1577
|
+
return (i, y, h2 = "l:default") => /ds:|ts:/.test(h2) ? l(i, s(void 0), h2) : T3(i, s(y || void 0), h2);
|
|
1591
1578
|
}
|
|
1592
|
-
var
|
|
1593
|
-
function
|
|
1579
|
+
var ue2 = Ce2;
|
|
1580
|
+
function Ce2() {
|
|
1594
1581
|
let e = (t, a) => {
|
|
1595
1582
|
let o = isNaN(new Date(t)), s = isNaN(new Date(a));
|
|
1596
1583
|
if (s) {
|
|
1597
|
-
let [u2,
|
|
1598
|
-
return { error: true, message: u2, full:
|
|
1584
|
+
let [u2, c, l] = Array(3).fill("end date not valid");
|
|
1585
|
+
return { error: true, message: u2, full: c, clean: l };
|
|
1599
1586
|
}
|
|
1600
1587
|
if (o) {
|
|
1601
|
-
let [u2,
|
|
1602
|
-
return { error: true, message: u2, full:
|
|
1588
|
+
let [u2, c, l] = Array(3).fill("start date not valid");
|
|
1589
|
+
return { error: true, message: u2, full: c, clean: l };
|
|
1603
1590
|
}
|
|
1604
1591
|
if (o && !s) {
|
|
1605
|
-
let [u2,
|
|
1606
|
-
return { error: true, message: u2, full:
|
|
1592
|
+
let [u2, c, l] = Array(3).fill("start- and/or end date are not valid");
|
|
1593
|
+
return { error: true, message: u2, full: c, clean: l };
|
|
1607
1594
|
}
|
|
1608
1595
|
return { error: false };
|
|
1609
1596
|
}, r = n();
|
|
1610
1597
|
return function({ start: t, end: a, diffs: o = {} } = {}) {
|
|
1611
1598
|
let s = e(t, a), u2 = a > t ? "+" : "-";
|
|
1612
1599
|
if (s.error) return s;
|
|
1613
|
-
let
|
|
1614
|
-
o = { ...o, fromUTC: t, toUTC: a, sign: "", years:
|
|
1615
|
-
let
|
|
1616
|
-
return o.clean !== "Dates are equal" && (o.sign = u2, o.jsPeriod = `${u2}P${
|
|
1600
|
+
let c = Math.abs(t - a), l = new Date(c), m = l.getUTCFullYear() - 1970, T3 = l.getUTCMonth(), i = l.getUTCDate() - 1, y = i % 7, h2 = Math.floor(i / 7), D2 = l.getUTCHours(), d = l.getUTCMinutes(), b2 = l.getUTCSeconds(), v2 = l.getUTCMilliseconds(), $3 = Math.floor(c / 864e5);
|
|
1601
|
+
o = { ...o, fromUTC: t, toUTC: a, sign: "", years: m, months: T3, days: i, hours: D2, minutes: d, seconds: b2, milliseconds: v2, diffInDays: $3 }, o.full = r({ values: o, full: true }), o.clean = r({ values: o }), o.equalDates = o.clean === "Dates are equal";
|
|
1602
|
+
let S = D2 + d + b2 > 0 ? "T" : "";
|
|
1603
|
+
return o.clean !== "Dates are equal" && (o.sign = u2, o.jsPeriod = `${u2}P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${h2 > 0 ? `${h2}W` : ""}${y > 0 ? `${y}D` : ""}${S}${D2 > 0 ? `${D2}H` : ""}${d > 0 ? `${d}M` : ""}${b2 > 0 ? `${b2}S` : ""}`, o.ISOPeriod = `P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${i > 0 ? `${i}D` : ""}${S}${D2 > 0 ? `${D2}H` : ""}${d > 0 ? `${d}M` : ""}${b2 > 0 ? `${b2}S` : ""}`), o;
|
|
1617
1604
|
};
|
|
1618
1605
|
function n() {
|
|
1619
|
-
let t = (...
|
|
1620
|
-
return t(({ values:
|
|
1606
|
+
let t = (...l) => (m) => l.reduce((T3, i) => i(T3), m), a = (l, m) => l === 1 ? m.slice(0, -1) : m;
|
|
1607
|
+
return t(({ values: l, full: m }) => [Object.entries(l).filter(([T3]) => /^(years|month|days|hours|minutes|seconds)/i.test(T3)), m], ([l, m]) => m ? l : l.filter(([, T3]) => m ? +T3 : T3 > 0), (l) => l.reduce((m, [T3, i]) => [...m, `${i} ${a(i, T3)}`], []), (l) => l.length < 1 ? "Dates are equal" : `${l.slice(0, -1).join(", ")}${l.length > 1 ? " and " : ""}${l.slice(-1).shift()}`);
|
|
1621
1608
|
}
|
|
1622
1609
|
}
|
|
1623
|
-
var
|
|
1624
|
-
function
|
|
1610
|
+
var ie2 = ke2;
|
|
1611
|
+
function ke2() {
|
|
1625
1612
|
let e = Object.entries({ year: "FullYear", month: "Month", date: "Date", day: "Date", hour: "Hours", minute: "Minutes", second: "Seconds", millisecond: "Milliseconds" }).reduce((t, [a, o]) => ({ ...t, [a]: o, [`${a}s`]: o }), {}), r = false, n = function(...t) {
|
|
1626
1613
|
let a = t.length === 1;
|
|
1627
1614
|
return r = t[0].trim().startsWith("subtract,"), r && (t = a ? t[0].trim().replace(/^subtract,/i, "").split(",").map((o) => o.trim()) : t.filter((o) => !o.startsWith("subtract"))), a && !r && (t = t[0].split(",").map((o) => o.trim())), t.map(function(o) {
|
|
@@ -1629,8 +1616,8 @@ ${r}`), g2;
|
|
|
1629
1616
|
let s = o.toLowerCase().split(/ {1,}/);
|
|
1630
1617
|
return s.length < 2 ? false : s.map((u2) => {
|
|
1631
1618
|
u2 = `${u2}`.trim().replace(/[^a-z0-9-+]/g, "");
|
|
1632
|
-
let
|
|
1633
|
-
return Number.isNaN(
|
|
1619
|
+
let c = parseInt(u2, 10);
|
|
1620
|
+
return Number.isNaN(c) ? u2 : r ? -c : +c;
|
|
1634
1621
|
});
|
|
1635
1622
|
}).filter((o) => o);
|
|
1636
1623
|
};
|
|
@@ -1642,126 +1629,126 @@ ${r}`), g2;
|
|
|
1642
1629
|
}), t;
|
|
1643
1630
|
};
|
|
1644
1631
|
}
|
|
1645
|
-
var
|
|
1646
|
-
var
|
|
1647
|
-
var
|
|
1648
|
-
var
|
|
1649
|
-
var
|
|
1650
|
-
function
|
|
1651
|
-
return
|
|
1632
|
+
var de = ue2();
|
|
1633
|
+
var ge2 = Pe2();
|
|
1634
|
+
var w2 = ie2();
|
|
1635
|
+
var Ae2 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
1636
|
+
var ye2 = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
|
|
1637
|
+
function q2(e, ...r) {
|
|
1638
|
+
return w2(e, ...r), e;
|
|
1652
1639
|
}
|
|
1653
|
-
function
|
|
1654
|
-
let n =
|
|
1640
|
+
function he2(e, r = false) {
|
|
1641
|
+
let n = K2(e.clone, { sunday: r }), t = [n];
|
|
1655
1642
|
return { weekStart: n.format("WD", "l:en-GB"), inputDate: e, dates: t.concat([...Array(6)].map((a, o) => n.clone.addDays(o + 1))) };
|
|
1656
1643
|
}
|
|
1657
1644
|
function W2(e, { start: r, end: n, future: t, past: a, include: o = { start: false, end: false } } = {}) {
|
|
1658
1645
|
let s = e.clone.UTC;
|
|
1659
|
-
return r = r?.value || r?.constructor === Date ?
|
|
1646
|
+
return r = r?.value || r?.constructor === Date ? f(r?.value || r).UTC : f.now.UTC, n = n && n?.value || n?.constructor === Date ? f(n?.value || n).UTC : f.now.UTC, s.milliseconds = 0, r.milliseconds = 0, n.milliseconds = 0, t ? r > n : a ? r < n : (o.start ? +s >= +r : +s > +r) && (o.end ? +s <= +n : +s < +n);
|
|
1660
1647
|
}
|
|
1661
|
-
function
|
|
1662
|
-
return t = r ? e.localeInfo.formatOptions + (t ? `,${t}` : "") :
|
|
1648
|
+
function H2(e, { zoneTime: r = false, formatStr: n, moreOptions: t } = {}) {
|
|
1649
|
+
return t = r ? e.localeInfo.formatOptions + (t ? `,${t}` : "") : g.formatOptions + (t ? `,${t}` : ""), r ? (e.localeInfo || (e.localeInfo = g), I2(e, n, t)) : We2(e, n, t);
|
|
1663
1650
|
}
|
|
1664
|
-
function
|
|
1665
|
-
let t = e.clone.relocate(
|
|
1666
|
-
return n = (n || "").startsWith("+") ? `${t.localeInfo.formatOptions},${n.slice(1)}` : n || t.localeInfo.formatOptions,
|
|
1651
|
+
function We2(e, r, n) {
|
|
1652
|
+
let t = e.clone.relocate(g);
|
|
1653
|
+
return n = (n || "").startsWith("+") ? `${t.localeInfo.formatOptions},${n.slice(1)}` : n || t.localeInfo.formatOptions, I2(t, r, n);
|
|
1667
1654
|
}
|
|
1668
|
-
function
|
|
1669
|
-
let n =
|
|
1655
|
+
function De2(e, r) {
|
|
1656
|
+
let n = de({ start: e, end: r || e });
|
|
1670
1657
|
return parseInt(`${n.sign}${n.diffInDays}`);
|
|
1671
1658
|
}
|
|
1672
|
-
function
|
|
1673
|
-
let { locale: n, timeZone: t } = r ? e.localeInfo :
|
|
1674
|
-
return { locale: n, timeZone: t, monthName: o[0], dayName: o[1], dayNames:
|
|
1659
|
+
function _2(e, r = false) {
|
|
1660
|
+
let { locale: n, timeZone: t } = r ? e.localeInfo : g, a = ae2(n, t), o = e.format("MM|WD", a).split("|");
|
|
1661
|
+
return { locale: n, timeZone: t, monthName: o[0], dayName: o[1], dayNames: oe2(n), monthNames: Y2(n) };
|
|
1675
1662
|
}
|
|
1676
|
-
function
|
|
1677
|
-
let [n, t, a, o] = U2(e, r), u2 = { values4Timezone: r ?
|
|
1663
|
+
function G2(e, r = false) {
|
|
1664
|
+
let [n, t, a, o] = U2(e, r), u2 = { values4Timezone: r ? g.timeZone : e.timeZone, hours: n, minutes: t, seconds: a, milliseconds: o };
|
|
1678
1665
|
return Object.freeze(u2);
|
|
1679
1666
|
}
|
|
1680
1667
|
function U2(e, r = false) {
|
|
1681
|
-
let t = `l:en-CA,${r ? `tz:${
|
|
1668
|
+
let t = `l:en-CA,${r ? `tz:${g.timeZone}` : `tz:${e.timeZone}`},hrc:23,ts:medium`;
|
|
1682
1669
|
return e.format("", t).split(/:/).map(Number).concat(e.getMilliseconds());
|
|
1683
1670
|
}
|
|
1684
|
-
function
|
|
1685
|
-
let n = r ? `tz:${
|
|
1671
|
+
function B2(e, r) {
|
|
1672
|
+
let n = r ? `tz:${g.timeZone}` : `,tz:${e.timeZone}`, [t, a, o] = e.format("yyyy-mm-dd", n).split(/-/).map(Number);
|
|
1686
1673
|
a -= 1;
|
|
1687
|
-
let s = r ?
|
|
1674
|
+
let s = r ? g.timeZone : e.timeZone;
|
|
1688
1675
|
return Object.freeze({ values4Timezone: s, year: t, month: a, date: o });
|
|
1689
1676
|
}
|
|
1690
|
-
function
|
|
1677
|
+
function J2(e, r = true) {
|
|
1691
1678
|
if (r) return [e.getFullYear(), e.getMonth(), e.getDate()];
|
|
1692
1679
|
let n = e.format("yyyy-m-d", e.localeInfo.formatOptions).split(/-/).map(Number);
|
|
1693
1680
|
return n[1] -= 1, n;
|
|
1694
1681
|
}
|
|
1695
|
-
function
|
|
1682
|
+
function Ue2(e) {
|
|
1696
1683
|
let r = new Intl.Locale(e.localeInfo.locale), n = r.getWeekInfo && r.getWeekInfo().firstDay || 1;
|
|
1697
|
-
return n = n === 7 ? 0 : n,
|
|
1684
|
+
return n = n === 7 ? 0 : n, ye2[n];
|
|
1698
1685
|
}
|
|
1699
|
-
function
|
|
1700
|
-
let n = r ? "sunday" :
|
|
1701
|
-
return
|
|
1686
|
+
function K2(e, { sunday: r = false } = {}) {
|
|
1687
|
+
let n = r ? "sunday" : Ue2(e);
|
|
1688
|
+
return x(e, { day: n, preserveTodayWhenEqual: true });
|
|
1702
1689
|
}
|
|
1703
|
-
function
|
|
1690
|
+
function Le2(e, r) {
|
|
1704
1691
|
let n = e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000", t = r.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000";
|
|
1705
1692
|
return n = A2(n.slice(0, 3) + ":" + n.slice(-2), true), t = A2(t.slice(0, 3) + ":" + t.slice(-2), true), [-n[0] + t[0], -n[1] + t[1]].map((a) => n[0] < 0 ? -a : a);
|
|
1706
1693
|
}
|
|
1707
|
-
function
|
|
1708
|
-
r || (r = e.clone), r?.clone || (r =
|
|
1709
|
-
let n =
|
|
1710
|
-
return n.timeZonesOffsetDifference = n.sign.length < 1 || o + s === 0 ? `Offsets of ${e.timeZone} and ${r.timeZone} are equal` : `${e.timeZone} is ${u2}${s > 0 ? ` and ${
|
|
1694
|
+
function Q2({ start: e, end: r } = {}) {
|
|
1695
|
+
r || (r = e.clone), r?.clone || (r = f(r, { timeZone: e.timeZone })), e = f(me(e, e.timeZone), { timeZone: e.timeZone }), r = f(me(r, r.timeZone), { timeZone: r.timeZone });
|
|
1696
|
+
let n = de({ start: e, end: r, diffs: { timeZoneStart: e.timeZone, timeZoneEnd: r.timeZone } }), t = Le2(r, e), a = n.sign.startsWith("-") ? "ahead of" : "behind", [o, s] = t.map((l) => Math.abs(l)), [u2, c] = [`${o} ${k2(o, "hour")}`, `${s} ${k2(s, "minute")}`];
|
|
1697
|
+
return n.timeZonesOffsetDifference = n.sign.length < 1 || o + s === 0 ? `Offsets of ${e.timeZone} and ${r.timeZone} are equal` : `${e.timeZone} is ${u2}${s > 0 ? ` and ${c}` : ""} ${a} ${r.timeZone}`, n;
|
|
1711
1698
|
}
|
|
1712
|
-
function
|
|
1713
|
-
r = String(r).toLowerCase() === "utc" || r.timeZone === "UTC" ? e.clone.relocate({ timeZone: "UTC" }) :
|
|
1714
|
-
let t =
|
|
1715
|
-
return { fromTZ: e.timeZone, toTZ: r.timeZone, offset: o, offsetText: `${r.timeZone} ${
|
|
1699
|
+
function R2(e, r) {
|
|
1700
|
+
r = String(r).toLowerCase() === "utc" || r.timeZone === "UTC" ? e.clone.relocate({ timeZone: "UTC" }) : f(e.value, { timeZone: r.timeZone || g.timeZone });
|
|
1701
|
+
let t = Q2({ start: e.clone, end: r }), o = `${t.sign}${le2(t.hours)}:${le2(t.minutes)}`;
|
|
1702
|
+
return { fromTZ: e.timeZone, toTZ: r.timeZone, offset: o, offsetText: `${r.timeZone} ${xe2(o)} ${e.timeZone}` };
|
|
1716
1703
|
}
|
|
1717
|
-
function
|
|
1704
|
+
function le2(e, r = 2) {
|
|
1718
1705
|
return `${e}`.padStart(r, "0");
|
|
1719
1706
|
}
|
|
1720
1707
|
function k2(e, r) {
|
|
1721
1708
|
return `${r}${e > 1 || e === 0 ? "s" : ""}`;
|
|
1722
1709
|
}
|
|
1723
|
-
function
|
|
1710
|
+
function xe2(e) {
|
|
1724
1711
|
if (/00:00/.test(e)) return "no time diffence to";
|
|
1725
1712
|
let r = e.slice(1).split(":").map(Number), [n, t] = r, a = k2(n, "hour"), o = k2(t, "minute"), s = e.startsWith("+");
|
|
1726
1713
|
return t > 0 ? `${n} ${a} and ${t} ${o} ${s ? "ahead of" : "behind"}` : `${n} ${a} ${s ? "ahead of" : "behind"}`;
|
|
1727
1714
|
}
|
|
1728
|
-
function
|
|
1715
|
+
function ce2(e, r, n) {
|
|
1729
1716
|
return e.clone.format(r, n || e.localeInfo.formatOptions);
|
|
1730
1717
|
}
|
|
1731
|
-
function
|
|
1732
|
-
if (r) return t ?
|
|
1733
|
-
let a = e.clone.relocate({ locale: "en" }), o = t ?
|
|
1718
|
+
function Te2(e, { withFormat: r, withFormatOptions: n, local: t = false } = {}) {
|
|
1719
|
+
if (r) return t ? ce2(e, r, $D.localeInformation.formatOptions) : ce2(e, r, n);
|
|
1720
|
+
let a = e.clone.relocate({ locale: "en" }), o = t ? g.formatOptions : a.localeInfo.formatOptions, u2 = `wd M dd yyyy hh:mmi:ss ${a.format("tz", o + ",tzn:longOffset").replace(":", "")} (tz)`;
|
|
1734
1721
|
return a.format(u2, o + ",tzn:long, hrc:23");
|
|
1735
1722
|
}
|
|
1736
|
-
function
|
|
1737
|
-
let n = Intl.DateTimeFormat("en", { timeZone: r ? e.timeZone :
|
|
1738
|
-
return
|
|
1723
|
+
function X2(e, r = false) {
|
|
1724
|
+
let n = Intl.DateTimeFormat("en", { timeZone: r ? e.timeZone : g.timeZone, weekday: "short" });
|
|
1725
|
+
return ge2(n.format(e));
|
|
1739
1726
|
}
|
|
1740
|
-
function
|
|
1741
|
-
let r =
|
|
1742
|
-
return n.timeZone !== r.timeZone && (
|
|
1727
|
+
function pe2(e) {
|
|
1728
|
+
let r = g, n = e.localeInfo, t = e.clone.relocate({ locale: r.locale, timeZone: r.timeZone }), a = e.offsetFrom(t), o = t.offsetFrom(e), s = r, u2 = n, c = e.format("hh:mmi:ss dp", `hrc:12,tz:${e.timeZone}`), l = t.format("hh:mmi:ss dp", `hrc:12,tz:${t.timeZone}`), m = { note: "'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance", locales: { user: { locale: s.locale, timeZone: s.timeZone } }, dateTime: { user: { ...e.dateTime, monthName: t.monthName, weekdayNr: t.day, weekdayName: t.dayName, dayPeriodTime: l, hasDST: t.hasDST, DSTActive: t.DSTActive, offsetFromRemote: a.offset, string: t.toString() } }, offset: { fromUTC: e.UTC.offsetFrom(e).offsetText } };
|
|
1729
|
+
return n.timeZone !== r.timeZone && (m.locales.remote = { locale: u2.locale, timeZone: u2.timeZone }, m.dateTime.remote = { ...e.zoneDateTime, monthName: e.zoneNames.monthName, weekdayNr: X2(e, true), weekdayName: e.zoneNames.dayName, dayPeriodTime: c, hasDST: e.hasDST, DSTActive: e.DSTActive, offsetFromUser: o.offset, string: e.toString() }, m.offset.fromUserTime = o.offsetText), m;
|
|
1743
1730
|
}
|
|
1744
|
-
function
|
|
1731
|
+
function M2(e, r = true) {
|
|
1745
1732
|
if (r) return [e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()];
|
|
1746
1733
|
let n = e.format("yyyy-m-d-hh-mmi-ss", `${e.localeInfo.formatOptions},hrc23:true`).split(/-/).map(Number).concat(e.getMilliseconds());
|
|
1747
1734
|
return n[1] -= 1, n;
|
|
1748
1735
|
}
|
|
1749
|
-
function
|
|
1736
|
+
function ee2(e) {
|
|
1750
1737
|
return new Date(e.year, e.month + 1, 0, 0, 0, 0).getDate();
|
|
1751
1738
|
}
|
|
1752
1739
|
function L2(e, r) {
|
|
1753
|
-
r =
|
|
1740
|
+
r = p({ locale: r || e.localeInfo.locale }).locale;
|
|
1754
1741
|
let n = e.clone.relocate({ locale: r });
|
|
1755
|
-
return n.date = { date: 1 }, [n].concat([...Array(
|
|
1742
|
+
return n.date = { date: 1 }, [n].concat([...Array(ee2(n) - 1)].map((t, a) => n.clone.add(`${a + 1} days`)));
|
|
1756
1743
|
}
|
|
1757
|
-
function
|
|
1744
|
+
function x(e, { day: r, next: n = false, preserveTodayWhenEqual: t = false } = {}) {
|
|
1758
1745
|
r = r?.toLowerCase() || "-";
|
|
1759
|
-
let a =
|
|
1746
|
+
let a = ge2(r);
|
|
1760
1747
|
if (a < 0) return console.error(`[TickTock instance].next/previous invalid day value ${r}`), e.clone;
|
|
1761
|
-
let o = n ? 1 : -1, s =
|
|
1762
|
-
return t && a === s.day ? s :
|
|
1748
|
+
let o = n ? 1 : -1, s = f(new Date(...e.dateTimeValues), e.localeInfo);
|
|
1749
|
+
return t && a === s.day ? s : je2(s.addDays(n ? 1 : -1), a, o);
|
|
1763
1750
|
}
|
|
1764
|
-
function
|
|
1751
|
+
function je2(e, r, n) {
|
|
1765
1752
|
function t(a) {
|
|
1766
1753
|
switch (true) {
|
|
1767
1754
|
case a.day === r:
|
|
@@ -1772,62 +1759,62 @@ ${r}`), g2;
|
|
|
1772
1759
|
}
|
|
1773
1760
|
return t(e);
|
|
1774
1761
|
}
|
|
1775
|
-
function
|
|
1762
|
+
function F2(e, { dateOnly: r = false, timeOnly: n = false } = {}) {
|
|
1776
1763
|
let { locale: t, timeZone: a } = e.localeInfo;
|
|
1777
1764
|
return r ? new Date(e).toLocaleDateString(t, { timeZone: a }) : n ? new Date(e).toLocaleTimeString(t, { timeZone: a }) : new Date(e).toLocaleString(t, { timeZone: a });
|
|
1778
1765
|
}
|
|
1779
|
-
function
|
|
1766
|
+
function me(e, r) {
|
|
1780
1767
|
let n = { timeZone: r, hourCycle: "h23" };
|
|
1781
1768
|
return new Date(new Date(e).toLocaleString("en", n));
|
|
1782
1769
|
}
|
|
1783
|
-
function
|
|
1784
|
-
return
|
|
1770
|
+
function z2(e, { year: r, month: n, date: t } = {}) {
|
|
1771
|
+
return Z2(r) && e.setFullYear(parseInt(r)), Z2(t) && e.setDate(parseInt(t)), Z2(n) && e.setMonth(parseInt(n)), e;
|
|
1785
1772
|
}
|
|
1786
|
-
function
|
|
1787
|
-
return
|
|
1773
|
+
function N2(e, { hours: r, minutes: n, seconds: t, milliseconds: a } = {}) {
|
|
1774
|
+
return Z2(r) && e.setHours(parseInt(r)), Z2(n) && e.setMinutes(parseInt(n)), Z2(t) && e.setSeconds(parseInt(t)), Z2(a) && e.setMilliseconds(parseInt(a)), e;
|
|
1788
1775
|
}
|
|
1789
|
-
function
|
|
1776
|
+
function $e2(e) {
|
|
1790
1777
|
return e?.constructor === Date || e?.value;
|
|
1791
1778
|
}
|
|
1792
|
-
function
|
|
1793
|
-
return
|
|
1779
|
+
function te2(e, r) {
|
|
1780
|
+
return $e2(r) ? f(r?.value || r, e.localeInfo) : f.from(...e.dateTimeValues).relocate(e.localeInfo);
|
|
1794
1781
|
}
|
|
1795
|
-
function
|
|
1782
|
+
function Pe2() {
|
|
1796
1783
|
return function(e) {
|
|
1797
1784
|
e = `${e}`.toLowerCase();
|
|
1798
|
-
let r =
|
|
1799
|
-
return r < 0 ?
|
|
1785
|
+
let r = Ae2.indexOf(e);
|
|
1786
|
+
return r < 0 ? ye2.indexOf(e) : r;
|
|
1800
1787
|
};
|
|
1801
1788
|
}
|
|
1802
1789
|
function A2(e) {
|
|
1803
1790
|
let r = e.slice(1).split(/[-:]/).map(Number), n = e.startsWith("-");
|
|
1804
1791
|
return r = r.map((t) => n ? -t : t), r;
|
|
1805
1792
|
}
|
|
1806
|
-
function
|
|
1793
|
+
function Se2(e) {
|
|
1807
1794
|
return e.time = { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 }, e;
|
|
1808
1795
|
}
|
|
1809
|
-
function
|
|
1796
|
+
function fe(e, r) {
|
|
1810
1797
|
return Intl.DateTimeFormat("en-CA", { timeZone: r, timeZoneName: "long" }).format(e).split(/,/)[1].trim();
|
|
1811
1798
|
}
|
|
1812
|
-
function
|
|
1813
|
-
r = r || e?.timeZone ||
|
|
1814
|
-
let n = e.year || e.getFullYear(), t =
|
|
1799
|
+
function j2(e, r) {
|
|
1800
|
+
r = r || e?.timeZone || g.timeZone, e = e?.value ? e : e?.constructor === Date ? f(e, { timeZone: r }) : f({ timeZone: r });
|
|
1801
|
+
let n = e.year || e.getFullYear(), t = fe(new Date(n, 0, 1), r), a = fe(new Date(n, 5, 1), r);
|
|
1815
1802
|
return t !== a;
|
|
1816
1803
|
}
|
|
1817
1804
|
function P2(e, r) {
|
|
1818
|
-
return r = r || e?.timeZone ||
|
|
1805
|
+
return r = r || e?.timeZone || g.timeZone, e = e?.hasDST ? e : e?.constructor === Date ? f(e, { timeZone: r }) : f({ timeZone: r }), e.hasDST ? !/standard/i.test(e.toString()) : false;
|
|
1819
1806
|
}
|
|
1820
|
-
function
|
|
1821
|
-
return e.localeInfo =
|
|
1807
|
+
function Ze2(e, { locale: r, timeZone: n, l: t, tz: a } = {}) {
|
|
1808
|
+
return e.localeInfo = p({ locale: t || r || e.l || e.locale, timeZone: a || n || e.tz || e.timeZone }), e;
|
|
1822
1809
|
}
|
|
1823
|
-
function
|
|
1824
|
-
return
|
|
1810
|
+
function we2(e, r) {
|
|
1811
|
+
return $e2(r) && (e = f(r.value || r, r.localeInfo || e.localeInfo)), e;
|
|
1825
1812
|
}
|
|
1826
|
-
function
|
|
1827
|
-
let n =
|
|
1828
|
-
return n === 1 ?
|
|
1813
|
+
function C(e, r) {
|
|
1814
|
+
let n = ne2(new Date(e, 11, r || 31));
|
|
1815
|
+
return n === 1 ? C(e, (r || 31) - 1) : n;
|
|
1829
1816
|
}
|
|
1830
|
-
function
|
|
1817
|
+
function re2(e, r) {
|
|
1831
1818
|
let n = e.month;
|
|
1832
1819
|
switch (true) {
|
|
1833
1820
|
case n < 3:
|
|
@@ -1842,128 +1829,128 @@ ${r}`), g2;
|
|
|
1842
1829
|
return "unknown";
|
|
1843
1830
|
}
|
|
1844
1831
|
}
|
|
1845
|
-
function
|
|
1832
|
+
function ne2(e) {
|
|
1846
1833
|
let r = new Date(e), n = (r.getDay() + 6) % 7;
|
|
1847
1834
|
r.setDate(r.getDate() - n + 3);
|
|
1848
1835
|
let t = r.valueOf();
|
|
1849
1836
|
return r.setMonth(0, 1), r.getDay() !== 4 && r.setMonth(0, 1 + (4 - r.getDay() + 7) % 7), 1 + Math.ceil((t - r) / 6048e5);
|
|
1850
1837
|
}
|
|
1851
|
-
var E =
|
|
1852
|
-
function
|
|
1838
|
+
var E = Ye2;
|
|
1839
|
+
function Ye2({ localeInfo: e, customMethods: r, dateValue: n } = {}) {
|
|
1853
1840
|
let t, a = { add(...o) {
|
|
1854
|
-
return
|
|
1841
|
+
return q2(t, ...o);
|
|
1855
1842
|
}, between({ start: o, end: s, include: u2 } = {}) {
|
|
1856
1843
|
return W2(t, { start: o, end: s, include: u2 });
|
|
1857
1844
|
}, cloneWith(o) {
|
|
1858
|
-
return
|
|
1845
|
+
return te2(t, o);
|
|
1859
1846
|
}, daysUntil(o) {
|
|
1860
|
-
return
|
|
1847
|
+
return De2(t, o);
|
|
1861
1848
|
}, differenceTo(o) {
|
|
1862
|
-
return
|
|
1849
|
+
return Q2({ start: t, end: o });
|
|
1863
1850
|
}, differenceUntil(o) {
|
|
1864
1851
|
return t.differenceTo(o).clean;
|
|
1865
1852
|
}, firstWeekday({ sunday: o = false, midnight: s = false } = {}) {
|
|
1866
|
-
return
|
|
1853
|
+
return K2(t, { sunday: o, midnight: s });
|
|
1867
1854
|
}, format(o, s) {
|
|
1868
|
-
return
|
|
1855
|
+
return H2(t, { formatStr: o, moreOptions: s });
|
|
1869
1856
|
}, fullMonth(o) {
|
|
1870
1857
|
return L2(t, o);
|
|
1871
1858
|
}, fullWeek(o = false) {
|
|
1872
|
-
return
|
|
1859
|
+
return he2(t, !!o);
|
|
1873
1860
|
}, isFuture(o) {
|
|
1874
1861
|
return W2(t, { start: t, end: o, future: true });
|
|
1875
1862
|
}, isPast(o) {
|
|
1876
1863
|
return W2(t, { start: t, end: o, past: true });
|
|
1877
1864
|
}, next(o, s) {
|
|
1878
|
-
return
|
|
1865
|
+
return x(t, { day: o, next: true, preserveTodayWhenEqual: !!s });
|
|
1879
1866
|
}, offsetFrom(o) {
|
|
1880
|
-
return
|
|
1867
|
+
return R2(t, o);
|
|
1881
1868
|
}, previous(o, s) {
|
|
1882
|
-
return
|
|
1883
|
-
}, relocate({ locale: o, timeZone: s, l: u2, tz:
|
|
1884
|
-
return
|
|
1869
|
+
return x(t, { day: o, next: false, preserveTodayWhenEqual: !!s });
|
|
1870
|
+
}, relocate({ locale: o, timeZone: s, l: u2, tz: c } = {}) {
|
|
1871
|
+
return Ze2(t, { locale: o, timeZone: s, l: u2, tz: c });
|
|
1885
1872
|
}, revalue(o) {
|
|
1886
|
-
return t =
|
|
1873
|
+
return t = we2(t, o), t;
|
|
1887
1874
|
}, setDateValues({ year: o, month: s, date: u2 } = {}) {
|
|
1888
|
-
return
|
|
1889
|
-
}, setTimeValues({ hours: o, minutes: s, seconds: u2, milliseconds:
|
|
1890
|
-
return
|
|
1875
|
+
return z2(t, { year: o, month: s, date: u2 });
|
|
1876
|
+
}, setTimeValues({ hours: o, minutes: s, seconds: u2, milliseconds: c } = {}) {
|
|
1877
|
+
return N2(t, { hours: o, minutes: s, seconds: u2, milliseconds: c });
|
|
1891
1878
|
}, subtract(...o) {
|
|
1892
|
-
return
|
|
1879
|
+
return q2(t, "subtract," + o.join(","));
|
|
1893
1880
|
}, toArray(o = false) {
|
|
1894
|
-
return
|
|
1881
|
+
return M2(t, o);
|
|
1895
1882
|
}, toString({ template: o, formatOptions: s, local: u2 } = {}) {
|
|
1896
|
-
return
|
|
1883
|
+
return Te2(t, { withFormat: o, withFormatOptions: s, local: u2 });
|
|
1897
1884
|
}, values(o = false) {
|
|
1898
1885
|
return o ? t.dateTime : t.zoneDateTime;
|
|
1899
1886
|
}, zoneFormat(o, s) {
|
|
1900
|
-
return
|
|
1887
|
+
return H2(t, { zoneTime: true, formatStr: o, moreOptions: s });
|
|
1901
1888
|
}, set date({ year: o, month: s, date: u2 }) {
|
|
1902
|
-
|
|
1889
|
+
z2(t, { year: o, month: s, date: u2 });
|
|
1903
1890
|
}, set dateNr(o) {
|
|
1904
|
-
|
|
1891
|
+
z2(t, { date: o });
|
|
1905
1892
|
}, set hours(o) {
|
|
1906
|
-
|
|
1907
|
-
}, set localeInfo({ locale: o, timeZone: s, l: u2, tz:
|
|
1908
|
-
e =
|
|
1893
|
+
N2(t, { hours: o });
|
|
1894
|
+
}, set localeInfo({ locale: o, timeZone: s, l: u2, tz: c }) {
|
|
1895
|
+
e = O2({ locale: o, timeZone: s, l: u2, tz: c });
|
|
1909
1896
|
}, set milliseconds(o) {
|
|
1910
|
-
|
|
1897
|
+
N2(t, { milliseconds: `${o}` });
|
|
1911
1898
|
}, set minutes(o) {
|
|
1912
|
-
|
|
1899
|
+
N2(t, { minutes: o });
|
|
1913
1900
|
}, set month(o) {
|
|
1914
|
-
|
|
1901
|
+
z2(t, { month: o });
|
|
1915
1902
|
}, set seconds(o) {
|
|
1916
|
-
|
|
1917
|
-
}, set time({ hours: o, minutes: s, seconds: u2, milliseconds:
|
|
1918
|
-
|
|
1903
|
+
N2(t, { seconds: o });
|
|
1904
|
+
}, set time({ hours: o, minutes: s, seconds: u2, milliseconds: c }) {
|
|
1905
|
+
N2(t, { hours: o, minutes: s, seconds: u2, milliseconds: c });
|
|
1919
1906
|
}, set year(o) {
|
|
1920
|
-
|
|
1907
|
+
z2(t, { year: o });
|
|
1921
1908
|
}, get age() {
|
|
1922
1909
|
return t.differenceTo(/* @__PURE__ */ new Date()).years;
|
|
1923
1910
|
}, get ageFull() {
|
|
1924
1911
|
return t.differenceTo(/* @__PURE__ */ new Date()).clean;
|
|
1925
1912
|
}, get clone() {
|
|
1926
|
-
return
|
|
1913
|
+
return te2(t);
|
|
1927
1914
|
}, get date() {
|
|
1928
|
-
return
|
|
1915
|
+
return B2(t, true);
|
|
1929
1916
|
}, get dateNr() {
|
|
1930
1917
|
return t.date.date;
|
|
1931
1918
|
}, get dateTime() {
|
|
1932
1919
|
return { ...t.date, ...t.time };
|
|
1933
1920
|
}, get dateTimeValues() {
|
|
1934
|
-
return
|
|
1921
|
+
return M2(t, true);
|
|
1935
1922
|
}, get dateValues() {
|
|
1936
|
-
return
|
|
1923
|
+
return J2(t, true);
|
|
1937
1924
|
}, get day() {
|
|
1938
1925
|
return t.getDay();
|
|
1939
1926
|
}, get dayName() {
|
|
1940
1927
|
return t.names.dayName;
|
|
1941
1928
|
}, get daysThisMonth() {
|
|
1942
|
-
return
|
|
1929
|
+
return ee2(t);
|
|
1943
1930
|
}, get DSTActive() {
|
|
1944
1931
|
return P2(t);
|
|
1945
1932
|
}, get hasDST() {
|
|
1946
|
-
return
|
|
1933
|
+
return j2(t);
|
|
1947
1934
|
}, get hours() {
|
|
1948
1935
|
return t.time.hours;
|
|
1949
1936
|
}, get info() {
|
|
1950
|
-
return
|
|
1937
|
+
return pe2(t);
|
|
1951
1938
|
}, get isLeapYear() {
|
|
1952
1939
|
return new Date(t.getFullYear(), 2, 0).getDate() === 29;
|
|
1953
1940
|
}, get ISO() {
|
|
1954
1941
|
return t.toISOString();
|
|
1955
1942
|
}, get local() {
|
|
1956
|
-
return
|
|
1943
|
+
return F2(t);
|
|
1957
1944
|
}, get localDate() {
|
|
1958
|
-
return
|
|
1945
|
+
return F2(t, { dateOnly: true });
|
|
1959
1946
|
}, get locale() {
|
|
1960
|
-
return (e ||
|
|
1947
|
+
return (e || O2()).locale;
|
|
1961
1948
|
}, get localeInfo() {
|
|
1962
1949
|
return e;
|
|
1963
1950
|
}, get localeString() {
|
|
1964
|
-
return
|
|
1951
|
+
return F2(t);
|
|
1965
1952
|
}, get localTime() {
|
|
1966
|
-
return
|
|
1953
|
+
return F2(t, { timeOnly: true });
|
|
1967
1954
|
}, get milliseconds() {
|
|
1968
1955
|
return t.getMilliseconds();
|
|
1969
1956
|
}, get minutes() {
|
|
@@ -1973,49 +1960,49 @@ ${r}`), g2;
|
|
|
1973
1960
|
}, get monthName() {
|
|
1974
1961
|
return t.names.monthName;
|
|
1975
1962
|
}, get names() {
|
|
1976
|
-
return
|
|
1963
|
+
return _2(t);
|
|
1977
1964
|
}, get quarter() {
|
|
1978
|
-
return
|
|
1965
|
+
return re2(t);
|
|
1979
1966
|
}, get quarterNr() {
|
|
1980
|
-
return
|
|
1967
|
+
return re2(t, true);
|
|
1981
1968
|
}, get removeTime() {
|
|
1982
|
-
return
|
|
1969
|
+
return Se2(t);
|
|
1983
1970
|
}, get seconds() {
|
|
1984
1971
|
return t.time.seconds;
|
|
1985
1972
|
}, get time() {
|
|
1986
|
-
return
|
|
1973
|
+
return G2(t, true);
|
|
1987
1974
|
}, get timeValues() {
|
|
1988
1975
|
return U2(t, true);
|
|
1989
1976
|
}, get timeZone() {
|
|
1990
|
-
return (e ||
|
|
1977
|
+
return (e || O2()).timeZone;
|
|
1991
1978
|
}, get unixEpochTimestamp() {
|
|
1992
1979
|
return Math.floor(+t / 1e3);
|
|
1993
1980
|
}, get userLocaleInfo() {
|
|
1994
|
-
return
|
|
1981
|
+
return g;
|
|
1995
1982
|
}, get UTC() {
|
|
1996
1983
|
return t.clone.relocate({ locale: t.locale, timeZone: "UTC" });
|
|
1997
1984
|
}, get UTCOffset() {
|
|
1998
|
-
return
|
|
1985
|
+
return R2(t, "UTC");
|
|
1999
1986
|
}, get value() {
|
|
2000
1987
|
return new Date(t);
|
|
2001
1988
|
}, get weeknr() {
|
|
2002
|
-
return
|
|
1989
|
+
return ne2(t);
|
|
2003
1990
|
}, get weeksInYear() {
|
|
2004
|
-
return
|
|
1991
|
+
return C(t.year, 31);
|
|
2005
1992
|
}, get year() {
|
|
2006
1993
|
return t.date.year;
|
|
2007
1994
|
}, get zoneDate() {
|
|
2008
|
-
return
|
|
1995
|
+
return B2(t, false);
|
|
2009
1996
|
}, get zoneDateNr() {
|
|
2010
1997
|
return t.zoneDate.date;
|
|
2011
1998
|
}, get zoneDateTime() {
|
|
2012
1999
|
return { ...t.zoneDate, ...t.zoneTime };
|
|
2013
2000
|
}, get zoneDateTimeValues() {
|
|
2014
|
-
return
|
|
2001
|
+
return M2(t, false);
|
|
2015
2002
|
}, get zoneDateValues() {
|
|
2016
|
-
return
|
|
2003
|
+
return J2(t, false);
|
|
2017
2004
|
}, get zoneDay() {
|
|
2018
|
-
return
|
|
2005
|
+
return X2(t, true);
|
|
2019
2006
|
}, get zoneDayname() {
|
|
2020
2007
|
return t.zoneNames.dayName;
|
|
2021
2008
|
}, get zoneHours() {
|
|
@@ -2027,11 +2014,11 @@ ${r}`), g2;
|
|
|
2027
2014
|
}, get zoneMonthname() {
|
|
2028
2015
|
return t.zoneNames.monthName;
|
|
2029
2016
|
}, get zoneNames() {
|
|
2030
|
-
return
|
|
2017
|
+
return _2(t, true);
|
|
2031
2018
|
}, get zoneSeconds() {
|
|
2032
2019
|
return t.zoneTime.seconds;
|
|
2033
2020
|
}, get zoneTime() {
|
|
2034
|
-
return
|
|
2021
|
+
return G2(t);
|
|
2035
2022
|
}, get zoneTimeValues() {
|
|
2036
2023
|
return U2(t);
|
|
2037
2024
|
}, get zoneYear() {
|
|
@@ -2039,77 +2026,77 @@ ${r}`), g2;
|
|
|
2039
2026
|
}, get zoneValues() {
|
|
2040
2027
|
return t.zoneDateTime;
|
|
2041
2028
|
}, get zoneArray() {
|
|
2042
|
-
return
|
|
2029
|
+
return M2(t, false);
|
|
2043
2030
|
} };
|
|
2044
|
-
return !e && !n ? a : (a.localeInfo = e ||
|
|
2031
|
+
return !e && !n ? a : (a.localeInfo = e || O2(), t = new Proxy(n, Ee2(a)), Object.entries(Object.getOwnPropertyDescriptors(se2(t, r))).forEach(([o, s]) => Object.defineProperty(a, o, s)), Object.freeze(t));
|
|
2045
2032
|
}
|
|
2046
|
-
function
|
|
2033
|
+
function Ee2(e) {
|
|
2047
2034
|
return { get(r, n) {
|
|
2048
2035
|
return n !== "toString" && n in r ? r[n].bind(r) : Reflect.get(e, n);
|
|
2049
2036
|
}, set(r, n, t) {
|
|
2050
2037
|
return n in e && Reflect.set(e, n, t);
|
|
2051
2038
|
} };
|
|
2052
2039
|
}
|
|
2053
|
-
var
|
|
2054
|
-
var
|
|
2055
|
-
function
|
|
2056
|
-
return e =
|
|
2040
|
+
var g = Ne2(Intl.DateTimeFormat().resolvedOptions());
|
|
2041
|
+
var Ve2 = Object.getOwnPropertyNames(Date.prototype).filter((e) => e.startsWith("set")).reduce((e, r) => [...e, { native: r, syn: "change" + r.slice(3) }], []);
|
|
2042
|
+
function oe2(e = "en-GB") {
|
|
2043
|
+
return e = p({ locale: e }).locale, { long: [...Array(7).keys()].map((r) => new Date(Date.UTC(1970, 0, 4 + r)).toLocaleDateString(e, { timeZone: "Etc/UTC", weekday: "long" })), short: [...Array(7).keys()].map((r) => new Date(Date.UTC(1970, 0, 4 + r)).toLocaleDateString(e, { timeZone: "Etc/UTC", weekday: "short" })) };
|
|
2057
2044
|
}
|
|
2058
2045
|
function Y2(e = "en") {
|
|
2059
|
-
return e =
|
|
2046
|
+
return e = p({ locale: e }).locale, { long: [...Array(12).keys()].map((r) => new Date(Date.UTC(1970, r, 1)).toLocaleDateString(e, { timeZone: "Etc/UTC", month: "long" })), short: [...Array(12).keys()].map((r) => new Date(Date.UTC(1970, r, 1)).toLocaleDateString(e, { timeZone: "Etc/UTC", month: "short" })) };
|
|
2060
2047
|
}
|
|
2061
|
-
function
|
|
2062
|
-
e =
|
|
2048
|
+
function qe2({ year: e, locale: r } = {}) {
|
|
2049
|
+
e = Z2(e) ? parseInt(e) : (/* @__PURE__ */ new Date()).getFullYear();
|
|
2063
2050
|
let n = { year: e, calendar: {} }, t = Y2().long.map((a) => a.toLowerCase());
|
|
2064
2051
|
for (let a = 0; a < 12; a += 1) {
|
|
2065
|
-
let o =
|
|
2052
|
+
let o = f.from(e, a, 1);
|
|
2066
2053
|
n.calendar[t[a]] = L2(o, r);
|
|
2067
2054
|
}
|
|
2068
2055
|
return n;
|
|
2069
2056
|
}
|
|
2070
|
-
function
|
|
2071
|
-
e =
|
|
2057
|
+
function He2({ year: e, monthNr: r, locale: n = "en-CA" } = {}) {
|
|
2058
|
+
e = Z2(r) && parseInt(e) || -1, r = Z2(r) && parseInt(r) || (/* @__PURE__ */ new Date()).getFullYear();
|
|
2072
2059
|
let t = r >= 1 && r <= 12;
|
|
2073
|
-
return n =
|
|
2060
|
+
return n = p({ locale: n }).locale, r = t ? r - 1 : void 0, t ? f.from(e, r, 1).relocate({ locale: n }).fullMonth(n) : "MonthNr should be a specific number (1 = january - 12 = december)";
|
|
2074
2061
|
}
|
|
2075
|
-
function
|
|
2076
|
-
let r =
|
|
2062
|
+
function Ne2(e) {
|
|
2063
|
+
let r = ae2(e.locale, e.timeZone), n = new Intl.Locale(e.locale);
|
|
2077
2064
|
return e.weekInfo = n.getWeekInfo ? n.getWeekInfo() : null, Object.defineProperty(e, "formatOptions", { value: r, enumerable: false });
|
|
2078
2065
|
}
|
|
2079
|
-
function
|
|
2066
|
+
function ae2(e, r) {
|
|
2080
2067
|
return [`${e && !(Array.isArray(e) && e.length < 1) ? `l:${e}` : ""}`, `${r ? `tz:${r}` : ""}`].filter((n) => n).join(",");
|
|
2081
2068
|
}
|
|
2082
|
-
function
|
|
2083
|
-
return r = r || t, e = e || n, e =
|
|
2084
|
-
return Intl.DateTimeFormat(e, { timeZone:
|
|
2069
|
+
function p({ locale: e, timeZone: r, l: n, tz: t } = {}) {
|
|
2070
|
+
return r = r || t, e = e || n, e = ve2({ trial: function() {
|
|
2071
|
+
return Intl.DateTimeFormat(e, { timeZone: g.timeZone }).resolvedOptions().locale;
|
|
2085
2072
|
}, onError: function() {
|
|
2086
|
-
return console.warn(`Intl locale "${e}" best fit impossible, using "${
|
|
2087
|
-
} }), r =
|
|
2073
|
+
return console.warn(`Intl locale "${e}" best fit impossible, using "${g.locale}"`), g.locale;
|
|
2074
|
+
} }), r = ve2({ trial: function() {
|
|
2088
2075
|
return Intl.DateTimeFormat(e, { timeZone: r }).resolvedOptions().timeZone;
|
|
2089
2076
|
}, onError: function() {
|
|
2090
|
-
return console.warn(`timeZone "${r}" not valid. Using "${
|
|
2091
|
-
} }),
|
|
2077
|
+
return console.warn(`timeZone "${r}" not valid. Using "${g.timeZone}"`), g.timeZone;
|
|
2078
|
+
} }), Ne2(Intl.DateTimeFormat(e, { timeZone: r }).resolvedOptions());
|
|
2092
2079
|
}
|
|
2093
|
-
function
|
|
2094
|
-
return
|
|
2080
|
+
function O2({ locale: e, timeZone: r, l: n, tz: t } = {}) {
|
|
2081
|
+
return p({ locale: e, timeZone: r, l: n, tz: t }, true);
|
|
2095
2082
|
}
|
|
2096
|
-
function
|
|
2083
|
+
function be2(e) {
|
|
2097
2084
|
return !Number.isNaN(+e) && e?.constructor === Date && !e?.toISOString?.().startsWith("1970-01-01T00:00:00") ? e : /* @__PURE__ */ new Date();
|
|
2098
2085
|
}
|
|
2099
|
-
function
|
|
2086
|
+
function Ie2(e) {
|
|
2100
2087
|
let r = /* @__PURE__ */ new Date();
|
|
2101
2088
|
switch (true) {
|
|
2102
2089
|
case e?.constructor === String:
|
|
2103
|
-
return
|
|
2090
|
+
return be2(new Date(e));
|
|
2104
2091
|
case (Array.isArray(e) && e.map(Number).length === e.length):
|
|
2105
2092
|
return e.length === 1 ? new Date(e[0], 0, 1) : new Date(...e);
|
|
2106
2093
|
case e?.constructor === Date:
|
|
2107
|
-
return
|
|
2094
|
+
return be2(e);
|
|
2108
2095
|
default:
|
|
2109
2096
|
return r;
|
|
2110
2097
|
}
|
|
2111
2098
|
}
|
|
2112
|
-
function
|
|
2099
|
+
function ve2({ trial: e, onError: r = () => {
|
|
2113
2100
|
} } = {}) {
|
|
2114
2101
|
if (e?.constructor === Function) try {
|
|
2115
2102
|
return e();
|
|
@@ -2117,17 +2104,17 @@ ${r}`), g2;
|
|
|
2117
2104
|
return r?.constructor === Function ? r(n) : void 0;
|
|
2118
2105
|
}
|
|
2119
2106
|
}
|
|
2120
|
-
function
|
|
2121
|
-
let t = { timeZone:
|
|
2122
|
-
return { remoteTimezone: t.timeZone, userTimezone: a.timeZone, timeDifference:
|
|
2107
|
+
function _e2({ timeZoneDate: e, timeZoneID: r, userTimeZoneID: n } = {}) {
|
|
2108
|
+
let t = { timeZone: p({ timeZone: r }).timeZone }, a = { timeZone: p({ timeZone: n || "" }).timeZone }, o = f(e, t), s = f(e, a), u2 = s.differenceTo(o), c = o.offsetFrom(s).offset, [l, m] = A2(c, true), T3 = s.clone.add(`${l} hours, ${m} minutes`), y = u2.equalDates ? "No difference" : `Time offset ${c}: ${a.timeZone} is ${u2.clean} ${l < 0 ? "behind" : "ahead of"} ${t.timeZone}`;
|
|
2109
|
+
return { remoteTimezone: t.timeZone, userTimezone: a.timeZone, timeDifference: y, result: { [t.timeZone.replace(/\//, "_")]: f(e).toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }), [a.timeZone.replace(/\//, "_")]: T3.toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }) } };
|
|
2123
2110
|
}
|
|
2124
|
-
function
|
|
2111
|
+
function Z2(e) {
|
|
2125
2112
|
return !Number.isNaN(parseInt(e));
|
|
2126
2113
|
}
|
|
2127
2114
|
function V2(e, r, n) {
|
|
2128
|
-
return e?.constructor === Number ?
|
|
2115
|
+
return e?.constructor === Number ? w2(r, `${e} ${n}`) : r;
|
|
2129
2116
|
}
|
|
2130
|
-
function
|
|
2117
|
+
function Ge2(e) {
|
|
2131
2118
|
let r = { addYears(n = 1) {
|
|
2132
2119
|
return V2(n, e, "years");
|
|
2133
2120
|
}, addMonths(n = 1) {
|
|
@@ -2137,29 +2124,29 @@ ${r}`), g2;
|
|
|
2137
2124
|
}, addDays(n = 1) {
|
|
2138
2125
|
return V2(n, e, "days");
|
|
2139
2126
|
}, get nextYear() {
|
|
2140
|
-
return
|
|
2127
|
+
return w2(e, "1 year");
|
|
2141
2128
|
}, get nextWeek() {
|
|
2142
|
-
return
|
|
2129
|
+
return w2(e, "7 days");
|
|
2143
2130
|
}, get previousWeek() {
|
|
2144
|
-
return
|
|
2131
|
+
return w2(e, "-7 days");
|
|
2145
2132
|
}, get previousYear() {
|
|
2146
|
-
return
|
|
2133
|
+
return w2(e, "-1 year");
|
|
2147
2134
|
}, get nextMonth() {
|
|
2148
|
-
return
|
|
2135
|
+
return w2(e, "1 month");
|
|
2149
2136
|
}, get previousMonth() {
|
|
2150
|
-
return
|
|
2137
|
+
return w2(e, "-1 month");
|
|
2151
2138
|
}, get tomorrow() {
|
|
2152
|
-
return
|
|
2139
|
+
return w2(e, "1 day");
|
|
2153
2140
|
}, get yesterday() {
|
|
2154
|
-
return
|
|
2141
|
+
return w2(e, "-1 day");
|
|
2155
2142
|
} };
|
|
2156
|
-
for (let n of
|
|
2143
|
+
for (let n of Ve2) r[n.syn] = function(...t) {
|
|
2157
2144
|
return e[n.native](...t), e;
|
|
2158
2145
|
};
|
|
2159
2146
|
return r;
|
|
2160
2147
|
}
|
|
2161
|
-
function
|
|
2162
|
-
let n =
|
|
2148
|
+
function se2(e, r) {
|
|
2149
|
+
let n = Ge2(e);
|
|
2163
2150
|
for (let [t, a] of Object.entries(r || {})) {
|
|
2164
2151
|
let o = a.enumerable, s = a.isGetter ? { get() {
|
|
2165
2152
|
return a.method(e);
|
|
@@ -2170,50 +2157,50 @@ ${r}`), g2;
|
|
|
2170
2157
|
}
|
|
2171
2158
|
return n;
|
|
2172
2159
|
}
|
|
2173
|
-
function
|
|
2160
|
+
function ze2(e, r) {
|
|
2174
2161
|
return Object.defineProperties(e, { now: { get() {
|
|
2175
2162
|
return e(/* @__PURE__ */ new Date());
|
|
2176
2163
|
} }, localeInformation: { get() {
|
|
2177
|
-
return
|
|
2164
|
+
return p();
|
|
2178
2165
|
} }, localWeekdaynames: { value(n) {
|
|
2179
|
-
return
|
|
2166
|
+
return oe2(n);
|
|
2180
2167
|
} }, localMonthnames: { value(n) {
|
|
2181
2168
|
return Y2(n);
|
|
2182
2169
|
} }, daysInMonth: { value(n, t = false) {
|
|
2183
|
-
return n =
|
|
2184
|
-
} }, yearCalendar: { value:
|
|
2170
|
+
return n = Z2(n) ? parseInt(n) : 0, n >= 1 && n <= 12 ? new Date(t ? 2e3 : 2005, n, 0).getDate() : `${n} should be a Number between (1 (january) - 12 (december))`;
|
|
2171
|
+
} }, yearCalendar: { value: qe2 }, monthCalendar: { value: He2 }, from: { value(...n) {
|
|
2185
2172
|
return e(n);
|
|
2186
2173
|
} }, fromUxTS: { value(n, t) {
|
|
2187
|
-
n =
|
|
2174
|
+
n = Z2(n) ? parseInt(n) * 1e3 : void 0;
|
|
2188
2175
|
let a = n ? new Date(n) : /* @__PURE__ */ new Date();
|
|
2189
|
-
return
|
|
2176
|
+
return f(a, t || g);
|
|
2190
2177
|
} }, hasDST: { value({ date: n, timeZone: t } = {}) {
|
|
2191
|
-
return
|
|
2178
|
+
return j2(n, t);
|
|
2192
2179
|
} }, DSTActive: { value({ date: n, timeZone: t } = {}) {
|
|
2193
2180
|
return P2(n, t);
|
|
2194
2181
|
} }, values: { value({ date: n, timeZone: t } = {}) {
|
|
2195
2182
|
n = n || n?.value || /* @__PURE__ */ new Date();
|
|
2196
|
-
let a =
|
|
2183
|
+
let a = I2(n, "yyyy-m-d-h-mi-s", p({ timeZone: t }).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());
|
|
2197
2184
|
return a[1] -= 1, a;
|
|
2198
2185
|
} }, format: { value({ date: n, template: t, timeZone: a, locale: o, opts: s } = {}) {
|
|
2199
2186
|
n = n || n?.value || /* @__PURE__ */ new Date(), t = t?.constructor === String ? t : "yyyy/mm/dd hh:mmi:ss dp";
|
|
2200
|
-
let u2 =
|
|
2201
|
-
return u2 += s ? `,${s}` : "",
|
|
2187
|
+
let u2 = p({ timeZone: a, locale: o }).formatOptions;
|
|
2188
|
+
return u2 += s ? `,${s}` : "", I2(n, t, u2);
|
|
2202
2189
|
} }, addCustom: { value({ name: n, method: t, enumerable: a = false, isGetter: o = false } = {}) {
|
|
2203
2190
|
n?.constructor === String && t?.constructor === Function && t.length > 0 && (r[n] = { method: t, enumerable: a, isGetter: o });
|
|
2204
|
-
} }, validateLocaleInformation: { value:
|
|
2205
|
-
return
|
|
2191
|
+
} }, validateLocaleInformation: { value: p }, timeAcrossZones: { value: _e2 }, weeksInYear: { value(n) {
|
|
2192
|
+
return C(n, 31);
|
|
2206
2193
|
} }, keys: { get() {
|
|
2207
2194
|
let n = Object.fromEntries(Object.entries(r).filter(([a, o]) => o.enumerable === true));
|
|
2208
|
-
return [...Object.keys(E()), ...Object.keys(
|
|
2195
|
+
return [...Object.keys(E()), ...Object.keys(se2()), ...Object.keys(n)].sort((a, o) => a.localeCompare(o));
|
|
2209
2196
|
} } }), e;
|
|
2210
2197
|
}
|
|
2211
|
-
var
|
|
2212
|
-
var
|
|
2213
|
-
function
|
|
2198
|
+
var Oe2 = {};
|
|
2199
|
+
var f = ze2(Be2, Oe2);
|
|
2200
|
+
function Be2(e, r) {
|
|
2214
2201
|
if (e?.localeInfo) return e.clone;
|
|
2215
2202
|
let n = e?.locale || e?.timeZone || e?.tz || e?.l;
|
|
2216
|
-
return E({ localeInfo:
|
|
2203
|
+
return E({ localeInfo: p(n ? e : r), dateValue: new Date(n ? Date.now() : Ie2(e)), customMethods: Oe2 });
|
|
2217
2204
|
}
|
|
2218
2205
|
|
|
2219
2206
|
// ../Resource/Externals/REHelper.js
|
|
@@ -2225,7 +2212,7 @@ ${r}`), g2;
|
|
|
2225
2212
|
);
|
|
2226
2213
|
}
|
|
2227
2214
|
function createRegExpStringFromInput(regExStr, ...cleanedArgs) {
|
|
2228
|
-
return !hasLength(cleanedArgs) ? regExStr.raw.join(``) : regExStr.raw.reduce((a,
|
|
2215
|
+
return !hasLength(cleanedArgs) ? regExStr.raw.join(``) : regExStr.raw.reduce((a, v2, i) => a.concat(cleanedArgs[i - 1] || ``).concat(v2), ``);
|
|
2229
2216
|
}
|
|
2230
2217
|
function maybeFlags(...args) {
|
|
2231
2218
|
const flags = cleanupFlags(getFlags(args.at(-1)));
|
|
@@ -2310,27 +2297,27 @@ ${r}`), g2;
|
|
|
2310
2297
|
}
|
|
2311
2298
|
}
|
|
2312
2299
|
function cleanup(str) {
|
|
2313
|
-
return str.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm, ``).replace(/\s/g, ``).trim().replace(/<!([^>]\d+)>/g, (a,
|
|
2300
|
+
return str.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm, ``).replace(/\s/g, ``).trim().replace(/<!([^>]\d+)>/g, (a, b2) => String.fromCharCode(+b2) ?? a);
|
|
2314
2301
|
}
|
|
2315
2302
|
|
|
2316
2303
|
// ../Resource/Externals/splat.min.js
|
|
2317
|
-
var { IS:
|
|
2304
|
+
var { IS: b, maybe: E2, $Wrap: X3, isNothing: j3, xProxy: h, addSymbolicExtensions: T2 } = Y3({ useSymbolicExtensions: false });
|
|
2318
2305
|
function Y3(i = {}) {
|
|
2319
|
-
let { useSymbolicExtensions: a } = i, { shouldbeIsSingleObject:
|
|
2320
|
-
return a &&
|
|
2306
|
+
let { useSymbolicExtensions: a } = i, { shouldbeIsSingleObject: m, ISOneOf: g2, isExcept: P3, verifyNothingness: d, xProxy: x2, determineType: N3, addSymbolicExtensions: y, maybe: S, $Wrap: O3 } = _3(e, a);
|
|
2307
|
+
return a && y(), { IS: e, maybe: S, $Wrap: O3, isNothing: d, xProxy: x2, addSymbolicExtensions: y };
|
|
2321
2308
|
function e(c, ...u2) {
|
|
2322
2309
|
let l = typeof c == "symbol" ? Symbol.isSymbol : c;
|
|
2323
2310
|
switch (true) {
|
|
2324
2311
|
case !!S({ trial: (f2) => "isTypes" in (u2?.[0] ?? {}) }):
|
|
2325
|
-
return
|
|
2312
|
+
return m(c, u2[0]);
|
|
2326
2313
|
default:
|
|
2327
2314
|
return u2.length > 1 ? g2(l, ...u2) : N3(c, ...u2);
|
|
2328
2315
|
}
|
|
2329
2316
|
}
|
|
2330
2317
|
}
|
|
2331
2318
|
function _3(i, a) {
|
|
2332
|
-
let { SymbolAndCustomProxyFactory:
|
|
2333
|
-
return Object.freeze({ shouldbeIsSingleObject: c, ISOneOf: u2, isExcept: f2, verifyNothingness: d, xProxy: N3, determineType: x2, addSymbolicExtensions:
|
|
2319
|
+
let { SymbolAndCustomProxyFactory: m, maybeFactory: g2, WrapAnyFactory: P3, verifyNothingness: d, determineType: x2 } = w3(i, e), { xProxy: N3, addSymbolicExtensions: y } = m(i, e, a), [S, O3] = [g2(), P3(i, e)];
|
|
2320
|
+
return Object.freeze({ shouldbeIsSingleObject: c, ISOneOf: u2, isExcept: f2, verifyNothingness: d, xProxy: N3, determineType: x2, addSymbolicExtensions: y, maybe: S, $Wrap: O3 });
|
|
2334
2321
|
function e(r) {
|
|
2335
2322
|
return r?.[Symbol.proxy] ?? i(r);
|
|
2336
2323
|
}
|
|
@@ -2356,8 +2343,8 @@ ${r}`), g2;
|
|
|
2356
2343
|
}
|
|
2357
2344
|
function w3() {
|
|
2358
2345
|
let i = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" }, a = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" };
|
|
2359
|
-
return Object.freeze({ SymbolAndCustomProxyFactory: g2, maybeFactory: l, WrapAnyFactory: u2, verifyNothingness: f2, determineType:
|
|
2360
|
-
function
|
|
2346
|
+
return Object.freeze({ SymbolAndCustomProxyFactory: g2, maybeFactory: l, WrapAnyFactory: u2, verifyNothingness: f2, determineType: y });
|
|
2347
|
+
function m(r, t) {
|
|
2361
2348
|
Symbol.is || (Symbol.is = Symbol.for(i.IS), Symbol.type = Symbol.for(i.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
2362
2349
|
return t(this);
|
|
2363
2350
|
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...n) {
|
|
@@ -2369,7 +2356,7 @@ ${r}`), g2;
|
|
|
2369
2356
|
}, enumerable: false, configurable: false } }));
|
|
2370
2357
|
}
|
|
2371
2358
|
function g2(r, t, n) {
|
|
2372
|
-
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(i.IS_SYMBOL)), { xProxy: x2(), addSymbolicExtensions: () =>
|
|
2359
|
+
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(i.IS_SYMBOL)), { xProxy: x2(), addSymbolicExtensions: () => m(r, t) };
|
|
2373
2360
|
}
|
|
2374
2361
|
function P3(r) {
|
|
2375
2362
|
return (j3(r, true) ? { name: "unknown" } : Object.getPrototypeOf(r)?.constructor).name;
|
|
@@ -2393,16 +2380,16 @@ ${r}`), g2;
|
|
|
2393
2380
|
let n = t.length < 1, o = r == null;
|
|
2394
2381
|
return { noInput: o, noShouldbe: n, compareTo: !n && t[0], inputCTOR: !o && (r?.constructor || Object.getPrototypeOf(r)?.constructor), isNaN: Number.isNaN(r) || E2({ trial: (s) => String(r) === a.NAN }), isInfinity: E2({ trial: (s) => String(r) }) === a.INFINITY, shouldBeFirstElementIsNothing: !n && f2(t[0]) };
|
|
2395
2382
|
}
|
|
2396
|
-
function
|
|
2397
|
-
let { noInput: n, noShouldbe: o, compareTo: s, inputCTOR: A3, isNaN:
|
|
2383
|
+
function y(r, ...t) {
|
|
2384
|
+
let { noInput: n, noShouldbe: o, compareTo: s, inputCTOR: A3, isNaN: F3, isInfinity: v2, shouldBeFirstElementIsNothing: p2 } = N3(r, ...t);
|
|
2398
2385
|
switch (t = t.length && t[0], true) {
|
|
2399
|
-
case
|
|
2386
|
+
case p2:
|
|
2400
2387
|
return String(r) === String(s);
|
|
2401
2388
|
case (r?.[Symbol.proxy] && o):
|
|
2402
2389
|
return r[Symbol.proxy];
|
|
2403
|
-
case
|
|
2390
|
+
case F3:
|
|
2404
2391
|
return o ? a.NAN : String(s) === String(r);
|
|
2405
|
-
case
|
|
2392
|
+
case v2:
|
|
2406
2393
|
return o ? a.INFINITY : String(s) === String(r);
|
|
2407
2394
|
case n:
|
|
2408
2395
|
return o ? String(r) : String(s) === String(r);
|
|
@@ -2471,22 +2458,22 @@ ${r}`), g2;
|
|
|
2471
2458
|
}
|
|
2472
2459
|
function f2(r, t = false) {
|
|
2473
2460
|
let n = r == null;
|
|
2474
|
-
return n = t ? n ||
|
|
2461
|
+
return n = t ? n || b(r, 1 / 0) || b(r, NaN) : n, n;
|
|
2475
2462
|
}
|
|
2476
2463
|
}
|
|
2477
2464
|
var C2 = I3();
|
|
2478
2465
|
var $2 = I3("");
|
|
2479
2466
|
function I3(i, a = {}) {
|
|
2480
|
-
let { useSymbolicExtensions:
|
|
2481
|
-
return i =
|
|
2467
|
+
let { useSymbolicExtensions: m } = a;
|
|
2468
|
+
return i = b(i, String, Number) ? String(i) : void 0, m && L3(), function(e, ...c) {
|
|
2482
2469
|
return O3(e, S(c));
|
|
2483
2470
|
};
|
|
2484
2471
|
function g2(e, c) {
|
|
2485
|
-
return c &&
|
|
2472
|
+
return c && b(i, String, Number) ? String(i) : `{${e}}`;
|
|
2486
2473
|
}
|
|
2487
2474
|
function P3(e, c) {
|
|
2488
2475
|
let u2 = e in c;
|
|
2489
|
-
return u2 &&
|
|
2476
|
+
return u2 && b(c[e], String, Number) ? String(c[e]) : g2(e, u2);
|
|
2490
2477
|
}
|
|
2491
2478
|
function d(e) {
|
|
2492
2479
|
return (...c) => {
|
|
@@ -2503,15 +2490,15 @@ ${r}`), g2;
|
|
|
2503
2490
|
l.forEach((f2, r) => (c[r] ??= {}, c[r][u2] = f2));
|
|
2504
2491
|
}), c;
|
|
2505
2492
|
}
|
|
2506
|
-
function
|
|
2493
|
+
function y(e) {
|
|
2507
2494
|
return e.length === 1 && Object.values(e[0]).every(Array.isArray);
|
|
2508
2495
|
}
|
|
2509
2496
|
function S(e) {
|
|
2510
|
-
return
|
|
2497
|
+
return y(e) ? N3(e[0]) : e;
|
|
2511
2498
|
}
|
|
2512
2499
|
function O3(e, c) {
|
|
2513
|
-
let u2 = c?.length ? c.filter((l) =>
|
|
2514
|
-
return
|
|
2500
|
+
let u2 = c?.length ? c.filter((l) => b(l, Object)).map((l, f2) => x2(e, { ...l, index: f2 + 1 })).join("") : e;
|
|
2501
|
+
return b(i, void 0) ? u2 : u2.replace(/\{[a-z_\d].+\}/gim, String(i));
|
|
2515
2502
|
}
|
|
2516
2503
|
}
|
|
2517
2504
|
function L3() {
|