dynamic-html-helpers 1.5.1 → 1.5.3
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 +15 -15
- package/Bundle/htmlhelpers.min.js.map +3 -3
- package/Bundle/htmlhelpers.script.js +814 -1081
- package/Bundle/htmlhelpers.script.js.map +3 -3
- package/Resource/Externals/jqx.min.js +13 -13
- package/Resource/Externals/jqx.min.js.map +3 -3
- package/Resource/Externals/splat.min.js +1 -1
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ var HTMLHelpers = (() => {
|
|
|
22
22
|
// ../index.js
|
|
23
23
|
var index_exports = {};
|
|
24
24
|
__export(index_exports, {
|
|
25
|
-
$: () =>
|
|
25
|
+
$: () => hn,
|
|
26
26
|
$D: () => f,
|
|
27
27
|
logFactory: () => logFactory,
|
|
28
28
|
regexhelper: () => REHelper_default,
|
|
@@ -30,168 +30,190 @@ var HTMLHelpers = (() => {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
// ../Resource/Externals/jqx.min.js
|
|
33
|
-
var { IS:
|
|
34
|
-
function
|
|
35
|
-
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject:
|
|
36
|
-
return e &&
|
|
37
|
-
function
|
|
38
|
-
let g2 = typeof
|
|
33
|
+
var { IS: l, isOnly: vr, maybe: O, $Wrap: Lr, isNothing: ut, addSymbolicExtensions: Ne, detectableProxy: G } = ct({ useSymbolicExtensions: false });
|
|
34
|
+
function ct(t = {}) {
|
|
35
|
+
let { useSymbolicExtensions: e } = t, r = mt(), { shouldbeIsSingleObject: n, ISOneOf: o, isExcept: i, verifyNothingness: a, determineType: b, addSymbolicExtensions: p3, maybe: x2, $Wrap: d, detectableProxy: y } = ft(m, e);
|
|
36
|
+
return e && p3(), { IS: m, isOnly: S2, maybe: x2, $Wrap: d, isNothing: a, addSymbolicExtensions: p3, detectableProxy: y };
|
|
37
|
+
function m(f2, ...c) {
|
|
38
|
+
let s = Object.getOwnPropertySymbols(f2 || {})?.some((h2) => h2 === Symbol.justME) && c.length > 0, u2 = f2?.[Symbol.justME], g2 = s ? u2 : typeof f2 == "symbol" ? Symbol.isSymbol : f2;
|
|
39
39
|
switch (true) {
|
|
40
|
-
case
|
|
41
|
-
return r(
|
|
40
|
+
case s:
|
|
41
|
+
return r(u2, ...c);
|
|
42
|
+
case !!x2({ trial: (h2) => "isTypes" in (c?.[0] ?? {}) }):
|
|
43
|
+
return n(f2, c[0]);
|
|
42
44
|
default:
|
|
43
|
-
return
|
|
45
|
+
return c.length > 1 ? o(g2, ...c) : b(f2, ...c);
|
|
44
46
|
}
|
|
45
47
|
}
|
|
48
|
+
function S2(f2, ...c) {
|
|
49
|
+
return m({ [Symbol.justME]: f2 }, ...c);
|
|
50
|
+
}
|
|
46
51
|
}
|
|
47
|
-
function
|
|
48
|
-
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory:
|
|
49
|
-
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf:
|
|
50
|
-
function
|
|
51
|
-
return
|
|
52
|
+
function ft(t, e) {
|
|
53
|
+
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: o, verifyNothingness: i, determineType: a, detectableProxy: b } = dt(t, y), { addSymbolicExtensions: p3 } = r(t, y, e), [x2, d] = [n(), o(t, y)];
|
|
54
|
+
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: S2, isExcept: c, verifyNothingness: i, determineType: a, detectableProxy: b, addSymbolicExtensions: p3, maybe: x2, $Wrap: d });
|
|
55
|
+
function y(s) {
|
|
56
|
+
return s?.[Symbol.proxy] || t(s);
|
|
52
57
|
}
|
|
53
|
-
function m(
|
|
58
|
+
function m(s, u2) {
|
|
54
59
|
switch (true) {
|
|
55
|
-
case "defaultValue" in
|
|
56
|
-
return
|
|
57
|
-
case "notTypes" in
|
|
58
|
-
return c(
|
|
60
|
+
case "defaultValue" in u2:
|
|
61
|
+
return f2(s, u2);
|
|
62
|
+
case "notTypes" in u2:
|
|
63
|
+
return c(s, u2);
|
|
59
64
|
default:
|
|
60
|
-
return t(
|
|
65
|
+
return t(s, ...[u2.isTypes].flat());
|
|
61
66
|
}
|
|
62
67
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
68
|
+
function S2(s, ...u2) {
|
|
69
|
+
return u2.some((g2) => t(s, g2));
|
|
65
70
|
}
|
|
66
|
-
function
|
|
67
|
-
return
|
|
71
|
+
function f2(s, { defaultValue: u2, isTypes: g2 = [void 0], notTypes: h2 } = {}) {
|
|
72
|
+
return g2 = g2?.constructor !== Array ? [g2] : g2, h2 = h2 && h2?.constructor !== Array ? [h2] : [], h2.length < 1 ? t(s, ...g2) ? s : u2 : c(s, { isTypes: g2, notTypes: h2 }) ? s : u2;
|
|
68
73
|
}
|
|
69
|
-
function c(
|
|
70
|
-
return
|
|
74
|
+
function c(s, { isTypes: u2 = [void 0], notTypes: g2 = [void 0] } = {}) {
|
|
75
|
+
return u2 = u2?.constructor !== Array ? [u2] : u2, g2 = g2?.constructor !== Array ? [g2] : g2, t(s, ...u2) && !t(s, ...g2);
|
|
71
76
|
}
|
|
72
77
|
}
|
|
73
|
-
function
|
|
74
|
-
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.
|
|
75
|
-
return Object.freeze({ SymbolAndCustomProxyFactory:
|
|
76
|
-
function
|
|
78
|
+
function dt() {
|
|
79
|
+
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxyFor", TARGET: "toa.target" }, e = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy for", JUSTME: "justME" }, r = n();
|
|
80
|
+
return Object.freeze({ SymbolAndCustomProxyFactory: i, maybeFactory: f2, WrapAnyFactory: S2, verifyNothingness: c, determineType: p3, detectableProxy: r });
|
|
81
|
+
function n() {
|
|
82
|
+
let s = (h2) => ({ get(w, A2) {
|
|
83
|
+
return A2 === Symbol.proxy ? `Proxy for ${h2}` : A2 === Symbol.target ? w : Reflect.get(w, A2);
|
|
84
|
+
}, has(w, A2) {
|
|
85
|
+
return A2 === Symbol.proxy ? true : A2 in w;
|
|
86
|
+
} });
|
|
87
|
+
function u2(h2) {
|
|
88
|
+
let w = h2.name || h2.constructor.name;
|
|
89
|
+
return new Proxy(h2, s(w));
|
|
90
|
+
}
|
|
91
|
+
function g2(h2, w) {
|
|
92
|
+
return w = l(w, Object) ? w : {}, u2(new Proxy(h2, w));
|
|
93
|
+
}
|
|
94
|
+
return { wrap: u2, create: g2 };
|
|
95
|
+
}
|
|
96
|
+
function o(s, u2) {
|
|
77
97
|
Symbol.is || (Symbol.is = Symbol.for(t.IS), Symbol.type = Symbol.for(t.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
78
|
-
return
|
|
79
|
-
}, enumerable: false, configurable:
|
|
80
|
-
return
|
|
81
|
-
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(
|
|
82
|
-
return
|
|
83
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(
|
|
84
|
-
return
|
|
98
|
+
return u2(this);
|
|
99
|
+
}, enumerable: false, configurable: true }, [Symbol.is]: { value: function(...g2) {
|
|
100
|
+
return s(this, ...g2);
|
|
101
|
+
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(g2) {
|
|
102
|
+
return u2(g2);
|
|
103
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(g2, ...h2) {
|
|
104
|
+
return s(g2, ...h2);
|
|
85
105
|
}, enumerable: false, configurable: false } }));
|
|
86
106
|
}
|
|
87
|
-
function
|
|
88
|
-
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL)),
|
|
89
|
-
}
|
|
90
|
-
function
|
|
91
|
-
return (
|
|
92
|
-
}
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
switch (s = s.length && s[0], true) {
|
|
115
|
-
case ye2:
|
|
116
|
-
return String(o) === String(E3);
|
|
117
|
-
case (o?.[Symbol.proxy] && p2):
|
|
118
|
-
return o[Symbol.proxy];
|
|
119
|
-
case ge2:
|
|
120
|
-
return p2 ? e.NAN : String(E3) === String(o);
|
|
121
|
-
case pe2:
|
|
122
|
-
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
123
|
-
case a:
|
|
124
|
-
return p2 ? String(o) : String(E3) === String(o);
|
|
125
|
-
case C3 === Boolean:
|
|
126
|
-
return p2 ? e.BOOLEAN : C3 === s;
|
|
107
|
+
function i(s, u2, g2) {
|
|
108
|
+
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL), Symbol.proxy = Symbol.for(t.PROXY), Symbol.target = Symbol.for(t.target), Symbol.justME = Symbol.for(t.JUSTME)), { addSymbolicExtensions: () => o(s, u2) };
|
|
109
|
+
}
|
|
110
|
+
function a(s) {
|
|
111
|
+
return (ut(s, true) ? { name: "unknown" } : Object.getPrototypeOf(s)?.constructor).name;
|
|
112
|
+
}
|
|
113
|
+
function b(s, ...u2) {
|
|
114
|
+
let g2 = u2.length < 1, h2 = s == null;
|
|
115
|
+
return { noInput: h2, noShouldbe: g2, compareTo: !g2 && u2[0], inputCTOR: !h2 && (s?.constructor || Object.getPrototypeOf(s)?.constructor), isNaN: Number.isNaN(s) || O({ trial: (w) => String(s) === e.NAN }), isInfinity: O({ trial: (w) => String(s) }) === e.INFINITY, shouldBeFirstElementIsNothing: !g2 && c(u2[0]) };
|
|
116
|
+
}
|
|
117
|
+
function p3(s, ...u2) {
|
|
118
|
+
let { noInput: g2, noShouldbe: h2, compareTo: w, inputCTOR: A2, isNaN: st, isInfinity: at, shouldBeFirstElementIsNothing: lt } = b(s, ...u2);
|
|
119
|
+
switch (u2 = u2.length && u2[0], true) {
|
|
120
|
+
case lt:
|
|
121
|
+
return String(s) === String(w);
|
|
122
|
+
case (s?.[Symbol.proxy] && h2):
|
|
123
|
+
return s[Symbol.proxy];
|
|
124
|
+
case (s?.[Symbol.proxy] && typeof u2 == "string"):
|
|
125
|
+
return s[Symbol.proxy].toLowerCase() === u2.toLowerCase();
|
|
126
|
+
case st:
|
|
127
|
+
return h2 ? e.NAN : String(w) === String(s);
|
|
128
|
+
case at:
|
|
129
|
+
return h2 ? e.INFINITY : String(w) === String(s);
|
|
130
|
+
case g2:
|
|
131
|
+
return h2 ? String(s) : String(w) === String(s);
|
|
132
|
+
case A2 === Boolean:
|
|
133
|
+
return h2 ? e.BOOLEAN : A2 === u2;
|
|
127
134
|
default:
|
|
128
|
-
return d(
|
|
135
|
+
return d(s, u2, h2, x2(s, A2));
|
|
129
136
|
}
|
|
130
137
|
}
|
|
131
|
-
function x2(
|
|
138
|
+
function x2(s, u2) {
|
|
132
139
|
switch (true) {
|
|
133
|
-
case
|
|
140
|
+
case s === 0:
|
|
134
141
|
return Number;
|
|
135
|
-
case
|
|
142
|
+
case s === "":
|
|
136
143
|
return String;
|
|
137
|
-
case !
|
|
138
|
-
return { name: String(
|
|
144
|
+
case !s:
|
|
145
|
+
return { name: String(s) };
|
|
139
146
|
default:
|
|
140
|
-
return
|
|
147
|
+
return u2;
|
|
141
148
|
}
|
|
142
149
|
}
|
|
143
|
-
function d(
|
|
150
|
+
function d(s, u2, g2, h2) {
|
|
144
151
|
switch (true) {
|
|
145
|
-
case (!
|
|
152
|
+
case (!g2 && u2 === s || s?.[Symbol.proxy] && u2 === Proxy):
|
|
146
153
|
return true;
|
|
147
|
-
case String(
|
|
148
|
-
return String(
|
|
149
|
-
case (
|
|
150
|
-
return String(
|
|
154
|
+
case String(u2) === e.NAN:
|
|
155
|
+
return String(s) === e.NAN;
|
|
156
|
+
case (s?.[Symbol.toStringTag] && typeof u2 == "string"):
|
|
157
|
+
return String(u2) === s[Symbol.toStringTag];
|
|
151
158
|
default:
|
|
152
|
-
return
|
|
159
|
+
return u2 ? m(s, u2, h2) : y(s, h2);
|
|
153
160
|
}
|
|
154
161
|
}
|
|
155
|
-
function
|
|
156
|
-
return (
|
|
162
|
+
function y(s, u2) {
|
|
163
|
+
return (s?.[Symbol.toStringTag] ?? s?.prototype?.[Symbol.toStringTag]) || u2?.name || String(u2);
|
|
157
164
|
}
|
|
158
|
-
function m(
|
|
159
|
-
return
|
|
165
|
+
function m(s, u2, g2) {
|
|
166
|
+
return O({ trial: (h2) => s instanceof u2 }) || u2 === g2 || u2 === Object.getPrototypeOf(g2) || `${u2?.name}` === g2?.name;
|
|
160
167
|
}
|
|
161
|
-
function
|
|
162
|
-
return function(
|
|
163
|
-
let
|
|
164
|
-
return
|
|
165
|
-
}, is(...
|
|
166
|
-
return
|
|
168
|
+
function S2(s, u2) {
|
|
169
|
+
return function(g2) {
|
|
170
|
+
let h2 = { get value() {
|
|
171
|
+
return g2;
|
|
172
|
+
}, is(...w) {
|
|
173
|
+
return s(g2, ...w);
|
|
167
174
|
}, get type() {
|
|
168
|
-
return
|
|
175
|
+
return u2(g2);
|
|
169
176
|
} };
|
|
170
|
-
return Object[Symbol.type] && Object.defineProperties(
|
|
171
|
-
return
|
|
172
|
-
} }, [Symbol.is]: { value(...
|
|
173
|
-
return
|
|
174
|
-
} } }), Object.freeze(
|
|
177
|
+
return Object[Symbol.type] && Object.defineProperties(h2, { [Symbol.type]: { get() {
|
|
178
|
+
return u2(g2);
|
|
179
|
+
} }, [Symbol.is]: { value(...w) {
|
|
180
|
+
return s(g2, ...w);
|
|
181
|
+
} } }), Object.freeze(h2);
|
|
175
182
|
};
|
|
176
183
|
}
|
|
177
|
-
function
|
|
178
|
-
let
|
|
184
|
+
function f2() {
|
|
185
|
+
let s = (u2) => {
|
|
179
186
|
};
|
|
180
|
-
return function({ trial:
|
|
187
|
+
return function({ trial: u2, whenError: g2 = s } = {}) {
|
|
181
188
|
try {
|
|
182
|
-
return
|
|
183
|
-
} catch (
|
|
184
|
-
return
|
|
189
|
+
return u2();
|
|
190
|
+
} catch (h2) {
|
|
191
|
+
return g2(h2);
|
|
185
192
|
}
|
|
186
193
|
};
|
|
187
194
|
}
|
|
188
|
-
function c(
|
|
189
|
-
let
|
|
190
|
-
return
|
|
195
|
+
function c(s, u2 = false) {
|
|
196
|
+
let g2 = s == null;
|
|
197
|
+
return g2 = u2 ? g2 || l(s, 1 / 0) || l(s, NaN) : g2, g2;
|
|
191
198
|
}
|
|
192
199
|
}
|
|
193
|
-
|
|
194
|
-
|
|
200
|
+
function mt() {
|
|
201
|
+
let t = new Intl.Collator("en", { sensitivity: "base" }), e = (o) => typeof o?.constructor == "function" ? o?.name || o?.constructor?.name : typeof o == "string" ? o : typeof o, r = (o) => [null, void 0, 1 / 0, NaN].some((i) => i === o);
|
|
202
|
+
function n(o, i) {
|
|
203
|
+
if (i !== o && (r(o) || i === Number && (Number.isNaN(o) || !Number.isFinite(o)))) return false;
|
|
204
|
+
let [a, b] = [e(o), e(i)];
|
|
205
|
+
return o?.[Symbol.proxy] === i || i === o?.name || t.compare(a, b) === 0 || t.compare(o.constructor?.name, i?.name) === 0 || o.constructor?.name === i || a === i || t.compare(Object.prototype.toString.call(o), `[object ${b}]`) === 0;
|
|
206
|
+
}
|
|
207
|
+
return function(i, ...a) {
|
|
208
|
+
if (Array.isArray(a) && a.length > 1) {
|
|
209
|
+
for (let b of a) if (n(i, b)) return true;
|
|
210
|
+
return false;
|
|
211
|
+
}
|
|
212
|
+
return n(i, a?.[0]);
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
var He = yt();
|
|
216
|
+
var I = gt();
|
|
195
217
|
var Q = pt();
|
|
196
218
|
function gt() {
|
|
197
219
|
return { html: Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")), svg: Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(",")) };
|
|
@@ -202,73 +224,74 @@ var HTMLHelpers = (() => {
|
|
|
202
224
|
function yt() {
|
|
203
225
|
return ["::backdrop{background-color:grey;opacity:0.2;}", `#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`, "@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}", "@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}", "@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}", "@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"];
|
|
204
226
|
}
|
|
205
|
-
var
|
|
206
|
-
var bt =
|
|
207
|
-
var
|
|
208
|
-
var
|
|
209
|
-
var
|
|
227
|
+
var Me = { html: "innerHTML", text: "textContent", class: "className" };
|
|
228
|
+
var bt = Ot();
|
|
229
|
+
var j = {};
|
|
230
|
+
var z = {};
|
|
231
|
+
var J = Pt();
|
|
232
|
+
var De = (t) => {
|
|
210
233
|
console.error(`tinyDOM error: "${t}" is not a valid HTML tag`);
|
|
211
234
|
};
|
|
212
|
-
var
|
|
235
|
+
var k = ht();
|
|
213
236
|
function ht() {
|
|
214
|
-
return Object.freeze(new Proxy(
|
|
237
|
+
return Object.freeze(new Proxy(j, Ie()));
|
|
215
238
|
}
|
|
216
|
-
function
|
|
239
|
+
function Ie() {
|
|
217
240
|
return { get(t, e) {
|
|
218
241
|
let r = String(e);
|
|
219
242
|
switch (true) {
|
|
220
243
|
case r in t:
|
|
221
244
|
return t[r];
|
|
222
245
|
case Tt(r):
|
|
223
|
-
return
|
|
246
|
+
return Oe({ tag: r, key: e });
|
|
224
247
|
default:
|
|
225
|
-
return
|
|
248
|
+
return Oe({ tag: r, key: e, isError: true });
|
|
226
249
|
}
|
|
227
250
|
}, set(t, e, r) {
|
|
228
|
-
return e === "setError" && typeof r == "function" && (
|
|
251
|
+
return e === "setError" && typeof r == "function" && (De = r), true;
|
|
229
252
|
}, enumerable: false, configurable: false };
|
|
230
253
|
}
|
|
231
|
-
function
|
|
232
|
-
let
|
|
233
|
-
if (
|
|
234
|
-
return (
|
|
235
|
-
} }),
|
|
254
|
+
function Oe({ tag: t, key: e, custom: r, debug: n = false, isError: o = false } = {}) {
|
|
255
|
+
let i = St();
|
|
256
|
+
if (o) return Object.defineProperty(i, t, { get() {
|
|
257
|
+
return (a) => De(e) ?? "";
|
|
258
|
+
} }), Pe(i, t);
|
|
236
259
|
if (t.includes("-")) {
|
|
237
|
-
let [
|
|
238
|
-
|
|
260
|
+
let [a, b] = t.includes("-") ? [t, Mt(t)] : [Ht(t), t];
|
|
261
|
+
z[a] = a, z[b] = a, r = b;
|
|
239
262
|
}
|
|
240
|
-
return r && Object.defineProperty(
|
|
241
|
-
return
|
|
242
|
-
} }), Object.defineProperty(
|
|
243
|
-
return
|
|
244
|
-
} }),
|
|
263
|
+
return r && Object.defineProperty(i, r, { get() {
|
|
264
|
+
return Re(t);
|
|
265
|
+
} }), Object.defineProperty(i, t, { get() {
|
|
266
|
+
return Re(t);
|
|
267
|
+
} }), Pe(i, t);
|
|
245
268
|
}
|
|
246
|
-
function
|
|
247
|
-
return
|
|
269
|
+
function Pe(t, e) {
|
|
270
|
+
return j = Object.freeze(new Proxy(t, Ie())), j[Symbol.for.proxy] = "Proxy (Object)", j[e];
|
|
248
271
|
}
|
|
249
272
|
function St() {
|
|
250
|
-
return Object.fromEntries(Object.entries(Object.getOwnPropertyDescriptors(
|
|
273
|
+
return Object.fromEntries(Object.entries(Object.getOwnPropertyDescriptors(j)));
|
|
251
274
|
}
|
|
252
275
|
function xt(t, e, r) {
|
|
253
|
-
return e = e?.isJQx && e.node || (
|
|
276
|
+
return e = e?.isJQx && e.node || (J(e, Number) ? String(e) : e), bt({ trial: (n) => Je(e) ? t.insertAdjacentHTML("beforeend", e) : t.append(e), whenError: (n) => console.info(`${r} not created, reason
|
|
254
277
|
`, n) });
|
|
255
278
|
}
|
|
256
279
|
function Et(t, e, ...r) {
|
|
257
280
|
let n = wt(e, t);
|
|
258
|
-
return r?.forEach((
|
|
281
|
+
return r?.forEach((o) => xt(n, o, t)), n;
|
|
259
282
|
}
|
|
260
283
|
function wt(t, e) {
|
|
261
|
-
switch (t =
|
|
262
|
-
case
|
|
263
|
-
return
|
|
284
|
+
switch (t = ge(e) ? $t(t) : t?.isJQx ? t.node : t, true) {
|
|
285
|
+
case J(t, String):
|
|
286
|
+
return X(e, Je(t, e) ? { html: t } : { text: t });
|
|
264
287
|
case t instanceof Node:
|
|
265
288
|
return vt(e, t);
|
|
266
289
|
default:
|
|
267
|
-
return
|
|
290
|
+
return X(e, t);
|
|
268
291
|
}
|
|
269
292
|
}
|
|
270
293
|
function vt(t, e) {
|
|
271
|
-
let r =
|
|
294
|
+
let r = X(t);
|
|
272
295
|
return r.append(e), r;
|
|
273
296
|
}
|
|
274
297
|
function Lt(t) {
|
|
@@ -276,51 +299,51 @@ var HTMLHelpers = (() => {
|
|
|
276
299
|
let e = Ft(t);
|
|
277
300
|
return Object.keys(t).forEach((r) => {
|
|
278
301
|
let n = r.toLowerCase();
|
|
279
|
-
n in
|
|
302
|
+
n in Me && (t[Me[n]] = t[r]) && delete t[r];
|
|
280
303
|
}), { assignable: t, specials: e };
|
|
281
304
|
}
|
|
282
305
|
function Ft(t) {
|
|
283
|
-
if (t =
|
|
284
|
-
let e = Object.entries(t.data ?? {}), r = Object.entries(t.attributes ?? {}), n = t.class?.split(/[ ,]/).map((
|
|
306
|
+
if (t = J(t, Object) && t || void 0, !t) return Array(3);
|
|
307
|
+
let e = Object.entries(t.data ?? {}), r = Object.entries(t.attributes ?? {}), n = t.class?.split(/[ ,]/).map((o) => o.trim()).filter((o) => o.length > 1);
|
|
285
308
|
return delete t.data, delete t.attributes, delete t.class, [e, r, n];
|
|
286
309
|
}
|
|
287
310
|
function At(t, e) {
|
|
288
|
-
let [r, n,
|
|
289
|
-
r?.length && r.forEach(([
|
|
311
|
+
let [r, n, o] = t;
|
|
312
|
+
r?.length && r.forEach(([i, a]) => e.dataset[i] = a), n?.length && n.forEach(([i, a]) => e.setAttribute(i, a)), o?.forEach((i) => e.classList.add(i));
|
|
290
313
|
}
|
|
291
|
-
function
|
|
314
|
+
function X(t, e) {
|
|
292
315
|
e = e || {};
|
|
293
|
-
let { assignable: r, specials: n } = Lt(e),
|
|
294
|
-
return At(n,
|
|
316
|
+
let { assignable: r, specials: n } = Lt(e), o = Object.assign(ge(t) ? new Comment() : document.createElement(t), r);
|
|
317
|
+
return At(n, o), o;
|
|
295
318
|
}
|
|
296
|
-
function
|
|
319
|
+
function $t(t) {
|
|
297
320
|
return t?.constructor === Comment ? t?.textContent : String(t);
|
|
298
321
|
}
|
|
299
|
-
function
|
|
300
|
-
return !
|
|
322
|
+
function Je(t, e) {
|
|
323
|
+
return !ge(e) && J(t, String) && /<.*>|&[#|0-9a-z]+[^;];/i.test(t);
|
|
301
324
|
}
|
|
302
|
-
function
|
|
325
|
+
function ge(t) {
|
|
303
326
|
return /comment/i.test(t);
|
|
304
327
|
}
|
|
305
328
|
function Tt(t) {
|
|
306
|
-
return
|
|
329
|
+
return Ct(t) && (t in z || !J(X(t), HTMLUnknownElement));
|
|
307
330
|
}
|
|
308
|
-
function
|
|
331
|
+
function Ct(t) {
|
|
309
332
|
return t = t.toLowerCase(), typeof t == "string" && t.length > 0 && /^[a-z]/.test(t) && /^[a-z0-9-]+$/gi.test(t);
|
|
310
333
|
}
|
|
311
|
-
function
|
|
312
|
-
return t = t in
|
|
334
|
+
function Re(t) {
|
|
335
|
+
return t = t in z ? z[t] : t, (e, ...r) => Et(t, e, ...r);
|
|
313
336
|
}
|
|
314
|
-
function
|
|
337
|
+
function Nt([t, ...e]) {
|
|
315
338
|
return `${t.toUpperCase()}${e.join("")}`;
|
|
316
339
|
}
|
|
317
|
-
function
|
|
340
|
+
function Ht(t) {
|
|
318
341
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/^-|-$/, "");
|
|
319
342
|
}
|
|
320
|
-
function
|
|
321
|
-
return
|
|
343
|
+
function Mt(t) {
|
|
344
|
+
return J(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${Nt(e)}` || e).join("") : t;
|
|
322
345
|
}
|
|
323
|
-
function
|
|
346
|
+
function Ot() {
|
|
324
347
|
let t = (e) => {
|
|
325
348
|
};
|
|
326
349
|
return function({ trial: e, whenError: r = t } = {}) {
|
|
@@ -331,565 +354,413 @@ var HTMLHelpers = (() => {
|
|
|
331
354
|
}
|
|
332
355
|
};
|
|
333
356
|
}
|
|
334
|
-
function
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}
|
|
341
|
-
var { IS: J, maybe: he, $Wrap: Pr, isNothing: It, xProxy: Hr, addSymbolicExtensions: Mr } = Dt({ useSymbolicExtensions: false });
|
|
342
|
-
function Dt(t = {}) {
|
|
343
|
-
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: l, xProxy: f2, determineType: S2, addSymbolicExtensions: y, maybe: x2, $Wrap: d } = Rt(b2, e);
|
|
344
|
-
return e && y(), { IS: b2, maybe: x2, $Wrap: d, isNothing: l, xProxy: f2, addSymbolicExtensions: y };
|
|
345
|
-
function b2(m, ...h2) {
|
|
346
|
-
let g2 = typeof m == "symbol" ? Symbol.isSymbol : m;
|
|
347
|
-
switch (true) {
|
|
348
|
-
case !!x2({ trial: (c) => "isTypes" in (h2?.[0] ?? {}) }):
|
|
349
|
-
return r(m, h2[0]);
|
|
350
|
-
default:
|
|
351
|
-
return h2.length > 1 ? n(g2, ...h2) : S2(m, ...h2);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
function Rt(t, e) {
|
|
356
|
-
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: l, determineType: f2 } = jt(t, b2), { xProxy: S2, addSymbolicExtensions: y } = r(t, b2, e), [x2, d] = [n(), i(t, b2)];
|
|
357
|
-
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness: l, xProxy: S2, determineType: f2, addSymbolicExtensions: y, maybe: x2, $Wrap: d });
|
|
358
|
-
function b2(o) {
|
|
359
|
-
return o?.[Symbol.proxy] ?? t(o);
|
|
360
|
-
}
|
|
361
|
-
function m(o, s) {
|
|
362
|
-
switch (true) {
|
|
363
|
-
case "defaultValue" in s:
|
|
364
|
-
return g2(o, s);
|
|
365
|
-
case "notTypes" in s:
|
|
366
|
-
return c(o, s);
|
|
367
|
-
default:
|
|
368
|
-
return t(o, ...[s.isTypes].flat());
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
function h2(o, ...s) {
|
|
372
|
-
return s.some((a) => t(o, a));
|
|
373
|
-
}
|
|
374
|
-
function g2(o, { defaultValue: s, isTypes: a = [void 0], notTypes: p2 } = {}) {
|
|
375
|
-
return a = a?.constructor !== Array ? [a] : a, p2 = p2 && p2?.constructor !== Array ? [p2] : [], p2.length < 1 ? t(o, ...a) ? o : s : c(o, { isTypes: a, notTypes: p2 }) ? o : s;
|
|
357
|
+
function Pt() {
|
|
358
|
+
let t = new Intl.Collator("en", { sensitivity: "base" }), e = (o) => typeof o?.constructor == "function" ? o?.name || o?.constructor?.name : typeof o == "string" ? o : typeof o, r = (o) => [null, void 0, 1 / 0, NaN].some((i) => i === o);
|
|
359
|
+
function n(o, i) {
|
|
360
|
+
if (i !== o && (r(o) || i === Number && (Number.isNaN(o) || !Number.isFinite(o)))) return false;
|
|
361
|
+
let [a, b] = [e(o), e(i)];
|
|
362
|
+
return o?.[Symbol.proxy] === i || i === o?.name || t.compare(a, b) === 0 || t.compare(o.constructor?.name, i?.name) === 0 || o.constructor?.name === i || a === i || t.compare(Object.prototype.toString.call(o), `[object ${b}]`) === 0;
|
|
376
363
|
}
|
|
377
|
-
function
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
function jt() {
|
|
382
|
-
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 (" };
|
|
383
|
-
return Object.freeze({ SymbolAndCustomProxyFactory: n, maybeFactory: g2, WrapAnyFactory: h2, verifyNothingness: c, determineType: y });
|
|
384
|
-
function r(o, s) {
|
|
385
|
-
Symbol.is || (Symbol.is = Symbol.for(t.IS), Symbol.type = Symbol.for(t.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
386
|
-
return s(this);
|
|
387
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...a) {
|
|
388
|
-
return o(this, ...a);
|
|
389
|
-
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(a) {
|
|
390
|
-
return s(a);
|
|
391
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(a, ...p2) {
|
|
392
|
-
return o(a, ...p2);
|
|
393
|
-
}, enumerable: false, configurable: false } }));
|
|
394
|
-
}
|
|
395
|
-
function n(o, s, a) {
|
|
396
|
-
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL)), { xProxy: f2(), addSymbolicExtensions: () => r(o, s) };
|
|
397
|
-
}
|
|
398
|
-
function i(o) {
|
|
399
|
-
return (It(o, true) ? { name: "unknown" } : Object.getPrototypeOf(o)?.constructor).name;
|
|
400
|
-
}
|
|
401
|
-
function l(o, s) {
|
|
402
|
-
return Proxy = new o(o, { construct(a, p2) {
|
|
403
|
-
let E3 = new a(...p2);
|
|
404
|
-
return Object.defineProperty(E3, s, { value: `${e.PROXY_PREFIX}${i(p2[0])})` }), E3;
|
|
405
|
-
} }), Proxy;
|
|
406
|
-
}
|
|
407
|
-
function f2() {
|
|
408
|
-
Symbol.proxy || (Symbol.proxy = Symbol.for(t.PROXY));
|
|
409
|
-
let o = Proxy;
|
|
410
|
-
return { native() {
|
|
411
|
-
Proxy = o;
|
|
412
|
-
}, custom() {
|
|
413
|
-
Proxy = l(o, Symbol.proxy);
|
|
414
|
-
} };
|
|
415
|
-
}
|
|
416
|
-
function S2(o, ...s) {
|
|
417
|
-
let a = s.length < 1, p2 = o == null;
|
|
418
|
-
return { noInput: p2, noShouldbe: a, compareTo: !a && s[0], inputCTOR: !p2 && (o?.constructor || Object.getPrototypeOf(o)?.constructor), isNaN: Number.isNaN(o) || he({ trial: (E3) => String(o) === e.NAN }), isInfinity: he({ trial: (E3) => String(o) }) === e.INFINITY, shouldBeFirstElementIsNothing: !a && c(s[0]) };
|
|
419
|
-
}
|
|
420
|
-
function y(o, ...s) {
|
|
421
|
-
let { noInput: a, noShouldbe: p2, compareTo: E3, inputCTOR: C3, isNaN: ge2, isInfinity: pe2, shouldBeFirstElementIsNothing: ye2 } = S2(o, ...s);
|
|
422
|
-
switch (s = s.length && s[0], true) {
|
|
423
|
-
case ye2:
|
|
424
|
-
return String(o) === String(E3);
|
|
425
|
-
case (o?.[Symbol.proxy] && p2):
|
|
426
|
-
return o[Symbol.proxy];
|
|
427
|
-
case ge2:
|
|
428
|
-
return p2 ? e.NAN : String(E3) === String(o);
|
|
429
|
-
case pe2:
|
|
430
|
-
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
431
|
-
case a:
|
|
432
|
-
return p2 ? String(o) : String(E3) === String(o);
|
|
433
|
-
case C3 === Boolean:
|
|
434
|
-
return p2 ? e.BOOLEAN : C3 === s;
|
|
435
|
-
default:
|
|
436
|
-
return d(o, s, p2, x2(o, C3));
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
function x2(o, s) {
|
|
440
|
-
switch (true) {
|
|
441
|
-
case o === 0:
|
|
442
|
-
return Number;
|
|
443
|
-
case o === "":
|
|
444
|
-
return String;
|
|
445
|
-
case !o:
|
|
446
|
-
return { name: String(o) };
|
|
447
|
-
default:
|
|
448
|
-
return s;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
function d(o, s, a, p2) {
|
|
452
|
-
switch (true) {
|
|
453
|
-
case (!a && s === o || o?.[Symbol.proxy] && s === Proxy):
|
|
454
|
-
return true;
|
|
455
|
-
case String(s) === e.NAN:
|
|
456
|
-
return String(o) === e.NAN;
|
|
457
|
-
case (o?.[Symbol.toStringTag] && typeof s == "string"):
|
|
458
|
-
return String(s) === o[Symbol.toStringTag];
|
|
459
|
-
default:
|
|
460
|
-
return s ? m(o, s, p2) : b2(o, p2);
|
|
364
|
+
return function(i, ...a) {
|
|
365
|
+
if (Array.isArray(a) && a.length > 1) {
|
|
366
|
+
for (let b of a) if (n(i, b)) return true;
|
|
367
|
+
return false;
|
|
461
368
|
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
return (o?.[Symbol.toStringTag] ?? o?.prototype?.[Symbol.toStringTag]) || s?.name || String(s);
|
|
465
|
-
}
|
|
466
|
-
function m(o, s, a) {
|
|
467
|
-
return he({ trial: (p2) => o instanceof s }) || s === a || s === Object.getPrototypeOf(a) || `${s?.name}` === a?.name;
|
|
468
|
-
}
|
|
469
|
-
function h2(o, s) {
|
|
470
|
-
return function(a) {
|
|
471
|
-
let p2 = { get value() {
|
|
472
|
-
return a;
|
|
473
|
-
}, is(...E3) {
|
|
474
|
-
return o(a, ...E3);
|
|
475
|
-
}, get type() {
|
|
476
|
-
return s(a);
|
|
477
|
-
} };
|
|
478
|
-
return Object[Symbol.type] && Object.defineProperties(p2, { [Symbol.type]: { get() {
|
|
479
|
-
return s(a);
|
|
480
|
-
} }, [Symbol.is]: { value(...E3) {
|
|
481
|
-
return o(a, ...E3);
|
|
482
|
-
} } }), Object.freeze(p2);
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
function g2() {
|
|
486
|
-
let o = (s) => {
|
|
487
|
-
};
|
|
488
|
-
return function({ trial: s, whenError: a = o } = {}) {
|
|
489
|
-
try {
|
|
490
|
-
return s();
|
|
491
|
-
} catch (p2) {
|
|
492
|
-
return a(p2);
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
|
-
function c(o, s = false) {
|
|
497
|
-
let a = o == null;
|
|
498
|
-
return a = s ? a || J(o, 1 / 0) || J(o, NaN) : a, a;
|
|
499
|
-
}
|
|
369
|
+
return n(i, a?.[0]);
|
|
370
|
+
};
|
|
500
371
|
}
|
|
501
|
-
var W =
|
|
502
|
-
function
|
|
503
|
-
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams:
|
|
504
|
-
function x2(
|
|
505
|
-
if (
|
|
506
|
-
Object.keys(c.removeProperties).forEach((
|
|
372
|
+
var W = Rt;
|
|
373
|
+
function Rt({ styleSheet: t, createWithId: e } = {}) {
|
|
374
|
+
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: o, sheet: i, removeRules: a, consider: b, currentSheetID: p3 } = Dt({ styleSheet: t, createWithId: e });
|
|
375
|
+
function x2(f2, c) {
|
|
376
|
+
if (f2 && c.removeProperties) {
|
|
377
|
+
Object.keys(c.removeProperties).forEach((s) => f2.style.removeProperty(Qe(s)));
|
|
507
378
|
return;
|
|
508
379
|
}
|
|
509
|
-
Object.entries(c).forEach(([
|
|
510
|
-
|
|
511
|
-
let
|
|
512
|
-
if (/!important/.test(
|
|
513
|
-
|
|
380
|
+
Object.entries(c).forEach(([s, u2]) => {
|
|
381
|
+
s = Qe(s.trim()), u2 = u2.trim();
|
|
382
|
+
let g2;
|
|
383
|
+
if (/!important/.test(u2) && (u2 = u2.slice(0, u2.indexOf("!important")).trim(), g2 = "important"), !CSS.supports(s, u2)) return console.error(`StylingFactory ${p3} error: '${s}' with value '${u2}' not supported (yet)`);
|
|
384
|
+
je(() => f2.style.setProperty(s, u2, g2), `StylingFactory ${p3} (setRule4Selector) failed`);
|
|
514
385
|
});
|
|
515
386
|
}
|
|
516
|
-
function d(
|
|
517
|
-
if (
|
|
518
|
-
if (c.removeRule) return f2
|
|
519
|
-
let
|
|
520
|
-
return
|
|
387
|
+
function d(f2, c, s = i) {
|
|
388
|
+
if (f2 = f2?.trim?.(), !l(f2, String) || !f2.length || /[;,]$/g.test(f2)) return console.error(`StylingFactory ${p3} (setRules): [${f2 || "[no selector given]"}] is not a valid selector`);
|
|
389
|
+
if (c.removeRule) return a(f2);
|
|
390
|
+
let u2 = n(f2, true), g2 = u2 || s.cssRules[s.insertRule(`${f2} {}`, s.cssRules.length || 0)];
|
|
391
|
+
return b(() => x2(g2, c), f2, u2);
|
|
521
392
|
}
|
|
522
|
-
function
|
|
523
|
-
let c =
|
|
524
|
-
if (!
|
|
525
|
-
let
|
|
526
|
-
return
|
|
393
|
+
function y(f2) {
|
|
394
|
+
let c = f2.trim().split(/{/, 2), s = c.shift().trim();
|
|
395
|
+
if (!l(s, String) || !s?.trim()?.length) return console.error(`StylingFactory ${p3} (doParse): no (valid) selector could be extracted from rule ${pe(f2)}`);
|
|
396
|
+
let u2 = Wt(c.shift());
|
|
397
|
+
return je(() => d(s, u2), `StylingFactory ${p3} (setRules) failed`);
|
|
527
398
|
}
|
|
528
|
-
function m(
|
|
529
|
-
let c = r(
|
|
530
|
-
return c.done ? c.existing :
|
|
399
|
+
function m(f2) {
|
|
400
|
+
let c = r(f2);
|
|
401
|
+
return c.done ? c.existing : y(f2);
|
|
531
402
|
}
|
|
532
|
-
function
|
|
533
|
-
return
|
|
403
|
+
function S2(f2, c) {
|
|
404
|
+
return f2.trim().startsWith("@media") ? m(It(f2, c)) : d(f2, c);
|
|
534
405
|
}
|
|
535
|
-
return function(
|
|
536
|
-
return
|
|
406
|
+
return function(f2, c = {}) {
|
|
407
|
+
return o(f2, c) && (Object.keys(c).length ? S2(f2, c) : m(f2));
|
|
537
408
|
};
|
|
538
409
|
}
|
|
539
|
-
function
|
|
410
|
+
function Dt({ styleSheet: t, createWithId: e }) {
|
|
540
411
|
let r = "Note: The rule or some of its properties may not be supported by your browser (yet)", n = `for style#${e}`;
|
|
541
|
-
t = e ?
|
|
542
|
-
function
|
|
543
|
-
let
|
|
544
|
-
if (
|
|
545
|
-
let
|
|
546
|
-
return document.head.insertAdjacentElement("beforeend",
|
|
412
|
+
t = e ? o(e) : t;
|
|
413
|
+
function o(m) {
|
|
414
|
+
let S2 = document.querySelector(`#${m}`)?.sheet;
|
|
415
|
+
if (S2) return S2;
|
|
416
|
+
let f2 = Object.assign(document.createElement("style"), { id: m });
|
|
417
|
+
return document.head.insertAdjacentElement("beforeend", f2), f2.sheet;
|
|
547
418
|
}
|
|
548
|
-
function
|
|
419
|
+
function i(m) {
|
|
549
420
|
return console.error(`StylingFactory ${n} [rule: ${m}]
|
|
550
421
|
=> @charset, @namespace and @import are not supported here`), { done: true };
|
|
551
422
|
}
|
|
552
|
-
function
|
|
553
|
-
return [...t.rules].find((
|
|
423
|
+
function a(m, S2) {
|
|
424
|
+
return [...t.rules].find((f2) => S2 ? ze(f2.selectorText || "", m) : jt`${Qt(m)}${[..."gim"]}`.test(f2.cssText));
|
|
554
425
|
}
|
|
555
|
-
function
|
|
556
|
-
return /^@charset|@import|namespace/i.test(m.trim()) ?
|
|
426
|
+
function b(m) {
|
|
427
|
+
return /^@charset|@import|namespace/i.test(m.trim()) ? i(m) : m.match(/}/g)?.length > 1 ? { existing: d(m, 1), done: true } : { done: false };
|
|
557
428
|
}
|
|
558
|
-
function
|
|
559
|
-
let
|
|
560
|
-
return
|
|
429
|
+
function p3(m) {
|
|
430
|
+
let S2 = [...t.cssRules].reduce((c, s, u2) => ze(s.selectorText || "", m) && c.concat(u2) || c, []), f2 = S2.length;
|
|
431
|
+
return S2.forEach((c) => t.deleteRule(c)), f2 > 0 ? console.info(`\u2714 Removed ${f2} instance${f2 > 1 ? "s" : ""} of selector ${m} from ${n.slice(4)}`) : console.info(`\u2714 Remove rule: selector ${m} does not exist in ${n.slice(4)}`);
|
|
561
432
|
}
|
|
562
|
-
function x2(m,
|
|
563
|
-
return m &&
|
|
433
|
+
function x2(m, S2) {
|
|
434
|
+
return m && l(m, String) && m.trim().length > 0 && l(S2, Object) || (console.error(`StylingFactory ${n} called with invalid parameters`), false);
|
|
564
435
|
}
|
|
565
436
|
function d(m) {
|
|
566
437
|
m = m.trim();
|
|
567
|
-
let
|
|
438
|
+
let S2 = m.slice(0, m.indexOf("{")).trim(), f2 = !!a(S2);
|
|
568
439
|
try {
|
|
569
|
-
return t.insertRule(`${m}`, t.cssRules.length),
|
|
440
|
+
return t.insertRule(`${m}`, t.cssRules.length), f2;
|
|
570
441
|
} catch (c) {
|
|
571
442
|
return console.error(`StylingFactory ${n} (tryParse) ${c.name} Error:
|
|
572
443
|
${c.message}
|
|
573
|
-
Rule: ${
|
|
574
|
-
${r}`),
|
|
444
|
+
Rule: ${pe(m)}
|
|
445
|
+
${r}`), f2;
|
|
575
446
|
}
|
|
576
447
|
}
|
|
577
|
-
function
|
|
448
|
+
function y(m, S2, f2) {
|
|
578
449
|
try {
|
|
579
|
-
return m(),
|
|
450
|
+
return m(), f2;
|
|
580
451
|
} catch (c) {
|
|
581
452
|
return console.error(`StylingFactory ${n} (tryAddOrModify) ${c.name} Error:
|
|
582
453
|
${c.message}
|
|
583
|
-
Rule: ${
|
|
584
|
-
${r}`),
|
|
454
|
+
Rule: ${pe(S2)}
|
|
455
|
+
${r}`), f2;
|
|
585
456
|
}
|
|
586
457
|
}
|
|
587
|
-
return { sheet: t, removeRules:
|
|
458
|
+
return { sheet: t, removeRules: p3, tryParseAtOrNestedRules: b, ruleExists: a, checkParams: x2, tryParse: d, consider: y, currentSheetID: n };
|
|
588
459
|
}
|
|
589
|
-
function
|
|
590
|
-
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${
|
|
460
|
+
function It(t, e) {
|
|
461
|
+
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${Jt(n)}`)}`;
|
|
591
462
|
}
|
|
592
|
-
function
|
|
463
|
+
function pe(t) {
|
|
593
464
|
let e = (t || "NO RULE").trim().slice(0, 50).replace(/\n/g, "\\n").replace(/\s{2,}/g, " ");
|
|
594
465
|
return t.length > e.length ? `${e.trim()}...truncated` : e;
|
|
595
466
|
}
|
|
596
|
-
function
|
|
467
|
+
function Jt(t) {
|
|
597
468
|
return Object.entries(t).map(([e, r]) => `${e}: ${r.trim()}`).join(`;
|
|
598
469
|
`);
|
|
599
470
|
}
|
|
600
|
-
function
|
|
471
|
+
function Qt(t) {
|
|
601
472
|
return t.replace(/([*\[\]()-+{}.$?\\])/g, (e) => `\\${e}`);
|
|
602
473
|
}
|
|
603
|
-
function
|
|
474
|
+
function jt(t, ...e) {
|
|
604
475
|
let r = e.length && Array.isArray(e.slice(-1)) ? e.pop().join("") : "";
|
|
605
|
-
return new RegExp((e.length && t.raw.reduce((n,
|
|
476
|
+
return new RegExp((e.length && t.raw.reduce((n, o, i) => n.concat(e[i - 1] || "").concat(o), "") || t.raw.join("")).split(`
|
|
606
477
|
`).map((n) => n.replace(/\s|\/\/.*$/g, "").trim().replace(/(@s!)/g, " ")).join(""), r);
|
|
607
478
|
}
|
|
608
|
-
function
|
|
479
|
+
function Qe(t) {
|
|
609
480
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[^--]^-|-$/, "");
|
|
610
481
|
}
|
|
611
|
-
function
|
|
482
|
+
function je(t, e) {
|
|
612
483
|
try {
|
|
613
484
|
return t();
|
|
614
485
|
} catch (r) {
|
|
615
486
|
console.error(`${e || "an error occured"}: ${r.message}`);
|
|
616
487
|
}
|
|
617
488
|
}
|
|
618
|
-
function
|
|
489
|
+
function zt(t) {
|
|
619
490
|
return t.replace(/\/\*.+?\*\//gm, "").replace(/[}{\r\n]/g, "").replace(/(data:.+?);/g, (e, r) => `${r}\\3b`).split(";").map((e) => e.trim()).join(`;
|
|
620
491
|
`).replaceAll("\\3b", ";").split(`
|
|
621
492
|
`);
|
|
622
493
|
}
|
|
623
|
-
function
|
|
494
|
+
function kt(t) {
|
|
624
495
|
return t.reduce((e, r) => {
|
|
625
|
-
let [n,
|
|
626
|
-
return n &&
|
|
496
|
+
let [n, o] = [r.slice(0, r.indexOf(":")).trim(), r.slice(r.indexOf(":") + 1).trim().replace(/;$|;.+(?=\/*).+\/$/, "")];
|
|
497
|
+
return n && o ? { ...e, [n]: o } : e;
|
|
627
498
|
}, {});
|
|
628
499
|
}
|
|
629
|
-
function
|
|
630
|
-
return
|
|
500
|
+
function Wt(t) {
|
|
501
|
+
return kt(zt(t));
|
|
631
502
|
}
|
|
632
|
-
function
|
|
503
|
+
function ze(t, e) {
|
|
633
504
|
return t?.replace("::", ":") === e?.replace("::", ":");
|
|
634
505
|
}
|
|
635
|
-
var
|
|
636
|
-
var
|
|
637
|
-
var
|
|
638
|
-
if (
|
|
639
|
-
let e =
|
|
506
|
+
var ye = false;
|
|
507
|
+
var Bt = { on: () => ye = true, off: () => ye = false };
|
|
508
|
+
var C = { tagsRaw: Q, allowUnknownHtmlTags: Bt, isAllowed(t) {
|
|
509
|
+
if (ye) return true;
|
|
510
|
+
let e = l(t, String) ? t.toLowerCase() : t?.nodeName.toLowerCase() || "none";
|
|
640
511
|
return e === "#text" || !!Q[e];
|
|
641
512
|
}, allowTag: (t) => Q[t.toLowerCase()] = true, prohibitTag: (t) => Q[t.toLowerCase()] = false };
|
|
642
|
-
var
|
|
643
|
-
var
|
|
644
|
-
function
|
|
645
|
-
if (
|
|
646
|
-
let e = Object.entries(t.removed).reduce((r, [n,
|
|
513
|
+
var Ut = true;
|
|
514
|
+
var Z = { data: /data-[\-\w.\p{L}]/ui, validURL: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i, whiteSpace: /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g, notAllowedValues: /^javascript|injected|noreferrer|alert|DataURL/gi };
|
|
515
|
+
function Vt(t) {
|
|
516
|
+
if (Ut && Object.keys(t.removed).length) {
|
|
517
|
+
let e = Object.entries(t.removed).reduce((r, [n, o]) => [...r, `${H(n)} => ${o}`], []).join("\\000A");
|
|
647
518
|
v.error(`JQx: HTML creation error(s): ${e}`);
|
|
648
519
|
}
|
|
649
520
|
}
|
|
650
|
-
function
|
|
521
|
+
function _t(t) {
|
|
651
522
|
let e = t.nodeName.toLowerCase(), r = ["annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph"];
|
|
652
|
-
return /-/.test(e) && !r.find((n) => n === e) ||
|
|
523
|
+
return /-/.test(e) && !r.find((n) => n === e) || C.isAllowed(e);
|
|
653
524
|
}
|
|
654
|
-
function
|
|
525
|
+
function P(t) {
|
|
655
526
|
let e = { rawHTML: t?.parentElement?.getHTML() ?? "no html", removed: {} };
|
|
656
|
-
return
|
|
657
|
-
if (r?.children?.length &&
|
|
658
|
-
let
|
|
659
|
-
[...(r ?? { attributes: [] }).attributes].forEach((
|
|
660
|
-
let
|
|
661
|
-
if (
|
|
662
|
-
let d =
|
|
663
|
-
d += d.length === 60 ? "..." : "", e.removed[`${
|
|
527
|
+
return l(t, HTMLElement) && [...t.childNodes].forEach((r) => {
|
|
528
|
+
if (r?.children?.length && P(r), r?.attributes) {
|
|
529
|
+
let o = l(r, SVGElement) ? I.svg : I.html;
|
|
530
|
+
[...(r ?? { attributes: [] }).attributes].forEach((i) => {
|
|
531
|
+
let a = i.name.trim().toLowerCase(), b = i.value.trim().toLowerCase().replace(Z.whiteSpace, ""), p3 = a === "href" ? !Z.validURL.test(b) : Z.notAllowedValues.test(b), x2 = a.startsWith("data") ? !Z.data.test(a) : !!o[a];
|
|
532
|
+
if (p3 || x2) {
|
|
533
|
+
let d = K(i.value || "none", 60);
|
|
534
|
+
d += d.length === 60 ? "..." : "", e.removed[`${i.name}`] = `attribute/property/value not allowed, removed. Value: ${d}`, r.removeAttribute(i.name);
|
|
664
535
|
}
|
|
665
536
|
});
|
|
666
537
|
}
|
|
667
|
-
if (!(
|
|
668
|
-
let
|
|
669
|
-
|
|
538
|
+
if (!(_t(r) || r.constructor === CharacterData || r.constructor === Comment)) {
|
|
539
|
+
let o = (r?.outerHTML || r?.textContent).trim(), i = K(o, 60) ?? "EMPTY";
|
|
540
|
+
i += i.length === 60 ? "..." : "", e.removed[`<${r.nodeName?.toLowerCase()}>`] = `not allowed, not rendered. Value: ${i}`, r.remove();
|
|
670
541
|
}
|
|
671
|
-
}),
|
|
542
|
+
}), Vt(e), t;
|
|
672
543
|
}
|
|
673
|
-
function
|
|
544
|
+
function Yt(t) {
|
|
674
545
|
let e = document.createElement("div");
|
|
675
|
-
return e.insertAdjacentHTML(F.end, t), e.childNodes.length ?
|
|
546
|
+
return e.insertAdjacentHTML(F.end, t), e.childNodes.length ? P(e) : void 0;
|
|
676
547
|
}
|
|
677
|
-
function
|
|
548
|
+
function Gt(t, e, r) {
|
|
678
549
|
switch (true) {
|
|
679
|
-
case
|
|
550
|
+
case l(t, Comment):
|
|
680
551
|
return e.insertAdjacentHTML(r, `<!--${t.data}-->`);
|
|
681
|
-
case
|
|
552
|
+
case l(t, Text):
|
|
682
553
|
return e.insertAdjacentText(r, t.data || t.textContent);
|
|
683
554
|
default:
|
|
684
555
|
return;
|
|
685
556
|
}
|
|
686
557
|
}
|
|
687
|
-
function
|
|
688
|
-
return r = r || F.BeforeEnd, e = e?.isJQx ? e.node : e || document.body, t.reduce((n,
|
|
689
|
-
let
|
|
690
|
-
return
|
|
558
|
+
function R(t = [], e = document.body, r = F.BeforeEnd) {
|
|
559
|
+
return r = r || F.BeforeEnd, e = e?.isJQx ? e.node : e || document.body, t.reduce((n, o) => {
|
|
560
|
+
let i = N(o) && Xt(o, e, r);
|
|
561
|
+
return i ? [...n, i] : n;
|
|
691
562
|
}, []);
|
|
692
563
|
}
|
|
693
|
-
function
|
|
694
|
-
return r = r || F.BeforeEnd, e = e?.isJQx ? e?.[0] : e,
|
|
564
|
+
function Xt(t, e = document.body, r = F.BeforeEnd) {
|
|
565
|
+
return r = r || F.BeforeEnd, e = e?.isJQx ? e?.[0] : e, l(t, Comment, Text) ? Gt(t, e, r) : l(t, HTMLElement) ? e.insertAdjacentElement(r, t) : void 0;
|
|
695
566
|
}
|
|
696
567
|
function T(t) {
|
|
697
|
-
if (
|
|
568
|
+
if (l(t, Text, Comment)) return t;
|
|
698
569
|
let e = t?.trim(), r = e?.split(/<text>|<\/text>/i) ?? [];
|
|
699
|
-
if (r?.length && (r = r.length > 1 ? r.filter((
|
|
700
|
-
if (r ||
|
|
701
|
-
let n =
|
|
702
|
-
return n.childNodes.length < 1 ? T(`<span data-jqxcreationerror="1">${
|
|
570
|
+
if (r?.length && (r = r.length > 1 ? r.filter((o) => o.length).shift() : void 0), e.startsWith("<!--") && e.endsWith("-->")) return document.createComment(t.replace(/<!--|-->$/g, ""));
|
|
571
|
+
if (r || l(e, String) && !/^<(.+)[^>]+>/m.test(e)) return document.createTextNode(r ?? e);
|
|
572
|
+
let n = Yt(t);
|
|
573
|
+
return n.childNodes.length < 1 ? T(`<span data-jqxcreationerror="1">${q(t, 60)}</span>`) : n.children[0];
|
|
703
574
|
}
|
|
704
|
-
function
|
|
575
|
+
function ee(t) {
|
|
705
576
|
if (t.node("#jqxPopup")) return;
|
|
706
|
-
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...
|
|
707
|
-
let e = [], [r, n] = [t("#jqxPopupContent"), t.node("#jqxPopup")],
|
|
708
|
-
return t.handle({ type: "click, cancel", handlers: m, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show:
|
|
709
|
-
function
|
|
577
|
+
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...He);
|
|
578
|
+
let e = [], [r, n] = [t("#jqxPopupContent"), t.node("#jqxPopup")], o = {};
|
|
579
|
+
return t.handle({ type: "click, cancel", handlers: m, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show: i, remove: a, removeModal: y });
|
|
580
|
+
function i(c) {
|
|
710
581
|
if (n.open) switch (true) {
|
|
711
|
-
case
|
|
582
|
+
case b(c):
|
|
712
583
|
return;
|
|
713
584
|
default:
|
|
714
|
-
return
|
|
585
|
+
return a(), setTimeout(() => i(c), 200);
|
|
715
586
|
}
|
|
716
|
-
|
|
717
|
-
let { content:
|
|
718
|
-
return t.IS(
|
|
587
|
+
o = { ...c };
|
|
588
|
+
let { content: s } = o;
|
|
589
|
+
return t.IS(s, String, HTMLElement) || s?.isJQx ? p3() : true;
|
|
719
590
|
}
|
|
720
|
-
function
|
|
721
|
-
return
|
|
591
|
+
function a() {
|
|
592
|
+
return o.modal ? f2(o.warnMessage) : x2();
|
|
722
593
|
}
|
|
723
|
-
function
|
|
724
|
-
for (let [
|
|
594
|
+
function b(c) {
|
|
595
|
+
for (let [s, u2] of Object.entries(o)) if (u2 !== c[s]) return false;
|
|
725
596
|
return true;
|
|
726
597
|
}
|
|
727
|
-
function
|
|
598
|
+
function p3() {
|
|
728
599
|
r.clear();
|
|
729
|
-
let { content: c, modal:
|
|
730
|
-
|
|
731
|
-
let
|
|
732
|
-
r.append(
|
|
600
|
+
let { content: c, modal: s, closeAfter: u2 } = o;
|
|
601
|
+
s = t.IS(s, Boolean) ? s : false;
|
|
602
|
+
let g2 = s ? "" : t.div({ id: "closeHandleIcon" });
|
|
603
|
+
r.append(g2, t.IS(c, String) ? t.div(c) : c), n.showModal(), !s && t.IS(u2, Number) && S2(a, u2);
|
|
733
604
|
}
|
|
734
605
|
function x2() {
|
|
735
|
-
if (n.close(
|
|
736
|
-
|
|
606
|
+
if (n.close(o.returnValue), d(), t.IS(o.callback, Function)) return e.push(setTimeout(() => o.callback(o.returnValue), 200));
|
|
607
|
+
o = {};
|
|
737
608
|
}
|
|
738
609
|
function d() {
|
|
739
610
|
e.forEach((c) => clearTimeout(c)), e = [];
|
|
740
611
|
}
|
|
741
|
-
function
|
|
742
|
-
|
|
612
|
+
function y({ callback: c, value: s } = {}) {
|
|
613
|
+
o.returnValue = s, o.modal = false, o.callback = c || o.callback, a();
|
|
743
614
|
}
|
|
744
615
|
function m({ evt: c }) {
|
|
745
|
-
if (!(Object.keys(
|
|
616
|
+
if (!(Object.keys(o).length < 1 || !n.open) && (c.type === "cancel" && o.modal && c.preventDefault(), c.target.closest("#closeHandleIcon") || !c.target.closest("#jqxPopupContent"))) return o.activeTimer && clearTimeout(o.activeTimer), a();
|
|
746
617
|
}
|
|
747
|
-
function
|
|
748
|
-
t.IS(c, Function) && t.IS(
|
|
618
|
+
function S2(c, s) {
|
|
619
|
+
t.IS(c, Function) && t.IS(s, Number) && s > 0 && (d(), e.push(setTimeout(c, s * 1e3)));
|
|
749
620
|
}
|
|
750
|
-
function
|
|
751
|
-
if (!t.IS(c, String, HTMLElement
|
|
752
|
-
let
|
|
621
|
+
function f2(c) {
|
|
622
|
+
if (!t.IS(c, String, HTMLElement) && !c.isJQx) return;
|
|
623
|
+
let s = r.find$(".warn");
|
|
753
624
|
switch (true) {
|
|
754
|
-
case
|
|
755
|
-
|
|
625
|
+
case s.is.empty:
|
|
626
|
+
s = t.div({ class: "warn" }, c);
|
|
756
627
|
default:
|
|
757
|
-
r.append(
|
|
628
|
+
r.append(s.addClass("active")), S2(() => r.find$(".warn").removeClass("active"), 2);
|
|
758
629
|
}
|
|
759
630
|
}
|
|
760
631
|
}
|
|
761
|
-
function
|
|
632
|
+
function te(t) {
|
|
762
633
|
let e = {}, r = "anonymous_";
|
|
763
634
|
function n(d) {
|
|
764
635
|
if (d) {
|
|
765
|
-
let { handler:
|
|
766
|
-
document.addEventListener(
|
|
636
|
+
let { handler: y, capture: m, type: S2 } = d;
|
|
637
|
+
document.addEventListener(S2, y, { capture: m });
|
|
767
638
|
}
|
|
768
639
|
}
|
|
769
|
-
function
|
|
640
|
+
function o(d) {
|
|
770
641
|
if (d) {
|
|
771
|
-
let { type:
|
|
772
|
-
document.removeEventListener(
|
|
642
|
+
let { type: y, handler: m, capture: S2 } = d;
|
|
643
|
+
document.removeEventListener(y, m, { capture: S2 });
|
|
773
644
|
}
|
|
774
645
|
}
|
|
775
|
-
function
|
|
776
|
-
return function(
|
|
777
|
-
if (!L(
|
|
778
|
-
let c =
|
|
646
|
+
function i(d, y, m, S2) {
|
|
647
|
+
return function(f2) {
|
|
648
|
+
if (!L(y)) return d({ evt: f2 });
|
|
649
|
+
let c = f2.target.closest(y);
|
|
779
650
|
if (c) {
|
|
780
|
-
let
|
|
781
|
-
d({ self:
|
|
651
|
+
let s = t(c);
|
|
652
|
+
d({ self: s, me: s, evt: f2 }), m && p3(f2.type, S2);
|
|
782
653
|
}
|
|
783
654
|
return true;
|
|
784
655
|
};
|
|
785
656
|
}
|
|
786
|
-
function
|
|
657
|
+
function a(d) {
|
|
787
658
|
return e[d] = e[d] || {}, e[d];
|
|
788
659
|
}
|
|
789
|
-
function
|
|
790
|
-
return Object.entries(
|
|
660
|
+
function b(d, y) {
|
|
661
|
+
return Object.entries(a(d)).find(([m]) => m === y);
|
|
791
662
|
}
|
|
792
|
-
function
|
|
793
|
-
let m =
|
|
794
|
-
m && (
|
|
663
|
+
function p3(d, y) {
|
|
664
|
+
let m = b(d, y);
|
|
665
|
+
m && (o(m[1]), delete e[d][y], delete re[y], v.warn(`Removed listener [${y}] for event type [${d}].`));
|
|
795
666
|
}
|
|
796
667
|
function x2(d) {
|
|
797
|
-
let { type:
|
|
798
|
-
e[
|
|
799
|
-
let
|
|
800
|
-
if (
|
|
801
|
-
let
|
|
802
|
-
|
|
668
|
+
let { type: y, handler: m, name: S2, capture: f2, once: c, selector: s, node: u2, about: g2 } = d;
|
|
669
|
+
e[y] = e[y] || {};
|
|
670
|
+
let h2 = be(S2 || m.name), w = m;
|
|
671
|
+
if (u2 instanceof HTMLElement) {
|
|
672
|
+
let A2 = u2.dataset.hid || h2;
|
|
673
|
+
u2.dataset.hid = A2, s = `[data-hid=${A2}]`;
|
|
803
674
|
}
|
|
804
675
|
switch (true) {
|
|
805
|
-
case !e[
|
|
806
|
-
return v.log(`JQx: created listener for event type ${
|
|
807
|
-
y
|
|
808
|
-
} }, e[
|
|
676
|
+
case !e[y][h2]:
|
|
677
|
+
return v.log(`JQx: created listener for event type ${y}, with handler name ${h2}`), e[y][h2] = { name: h2, handler: i(m, s, c, h2), capture: ke(y, f2), once: !!c, type: y, initialHandler: w, selector: !!s && s || false, about: !!g2 && g2 || false, unListen() {
|
|
678
|
+
p3(y, h2);
|
|
679
|
+
} }, e[y][h2];
|
|
809
680
|
default:
|
|
810
|
-
return console.warn(`The listener [${
|
|
681
|
+
return console.warn(`The listener [${h2}] for [${y}] exists, it is not re-assigned.`);
|
|
811
682
|
}
|
|
812
683
|
}
|
|
813
684
|
return { remove(...d) {
|
|
814
|
-
return
|
|
685
|
+
return p3(...d);
|
|
815
686
|
}, listen: function(d) {
|
|
816
|
-
let { type:
|
|
817
|
-
if (!L(
|
|
818
|
-
let
|
|
819
|
-
if (
|
|
820
|
-
y
|
|
687
|
+
let { type: y, handler: m } = d;
|
|
688
|
+
if (!L(y) || !l(m, Function)) return;
|
|
689
|
+
let S2 = x2(d);
|
|
690
|
+
if (S2) return n(S2), { type: y, name: S2.name, unListen() {
|
|
691
|
+
p3(y, S2.name);
|
|
821
692
|
} };
|
|
822
693
|
}, get ListenerStore() {
|
|
823
694
|
return Object.freeze({ ...e });
|
|
824
695
|
} };
|
|
825
696
|
}
|
|
826
|
-
|
|
827
|
-
var
|
|
697
|
+
Ne();
|
|
698
|
+
var v = qt();
|
|
699
|
+
var Zt = ["load", "unload", "scroll", "focus", "blur", "DOMNodeRemovedFromDocument", "DOMNodeInsertedIntoDocument", "loadstart", "progress", "error", "abort", "load", "loadend", "pointerenter", "pointerleave", "readystatechange"];
|
|
828
700
|
var F = Object.freeze(new Proxy({ start: "afterbegin", afterbegin: "afterbegin", end: "beforeend", beforeend: "beforeend", before: "beforebegin", beforebegin: "beforebegin", after: "afterend", afterend: "afterend" }, { get(t, e) {
|
|
829
701
|
return t[String(e).toLowerCase()] ?? t[e];
|
|
830
702
|
} }));
|
|
831
|
-
var
|
|
832
|
-
var
|
|
703
|
+
var Kt = [...Array(26)].map((t, e) => String.fromCharCode(e + 65)).concat([...Array(26)].map((t, e) => String.fromCharCode(e + 97))).concat([...Array(10)].map((t, e) => `${e}`));
|
|
704
|
+
var Se = Object.freeze({ get(t, e) {
|
|
833
705
|
return t[V(e)] || t[e];
|
|
834
706
|
}, enumerable: false, configurable: false });
|
|
835
|
-
var
|
|
836
|
-
|
|
837
|
-
function Le() {
|
|
707
|
+
var re = {};
|
|
708
|
+
function xe() {
|
|
838
709
|
let t = setTimeout(() => {
|
|
839
710
|
});
|
|
840
711
|
for (; t >= 0; ) clearTimeout(t--);
|
|
841
712
|
}
|
|
842
|
-
function
|
|
843
|
-
return L(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() :
|
|
713
|
+
function be(t) {
|
|
714
|
+
return L(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() : We();
|
|
844
715
|
}
|
|
845
|
-
function
|
|
846
|
-
let e = !!t.node && !
|
|
716
|
+
function Ee(t) {
|
|
717
|
+
let e = !!t.node && !l(t, Text, Comment);
|
|
847
718
|
switch (true) {
|
|
848
719
|
case e:
|
|
849
|
-
let r = t.node.dataset ? Object.keys(t.node.dataset).map((
|
|
850
|
-
return
|
|
720
|
+
let r = t.node.dataset ? Object.keys(t.node.dataset).map((i) => `[data-${i}]`) : [], o = [t.attr("id") && `#${t?.attr("id")}` || void 0, t.attr("class") && t?.attr("class").split(" ").map((i) => `.${i}`).join(", ") || void 0, r.length > 0 && r.join(", ") || void 0].filter((i) => !!i).join(", ") || [];
|
|
721
|
+
return o.length ? `(${o})` : "";
|
|
851
722
|
default:
|
|
852
723
|
return "";
|
|
853
724
|
}
|
|
854
725
|
}
|
|
855
|
-
function
|
|
726
|
+
function We(t) {
|
|
856
727
|
let e = `anonymous_${Math.random().toString(36).slice(2)}`;
|
|
857
|
-
return
|
|
728
|
+
return re[e] ? We() : (re[e] = e, e);
|
|
858
729
|
}
|
|
859
|
-
function
|
|
860
|
-
return !!
|
|
730
|
+
function ke(t, e) {
|
|
731
|
+
return !!Zt.find((r) => r === t) || !!e;
|
|
861
732
|
}
|
|
862
|
-
function
|
|
863
|
-
return t.startsWith("data") ||
|
|
733
|
+
function ie(t) {
|
|
734
|
+
return t.startsWith("data") || I.html.find((e) => t.toLowerCase() === e);
|
|
864
735
|
}
|
|
865
|
-
function
|
|
736
|
+
function se(t) {
|
|
866
737
|
return t && (t.textContent = "");
|
|
867
738
|
}
|
|
868
|
-
function
|
|
869
|
-
return t = t?.parentElement, e += t ? t[r ? "scrollTop" : "scrollLeft"] : 0, t ?
|
|
739
|
+
function B(t, e = 0, r = true) {
|
|
740
|
+
return t = t?.parentElement, e += t ? t[r ? "scrollTop" : "scrollLeft"] : 0, t ? B(t, e, r) : e;
|
|
870
741
|
}
|
|
871
742
|
function L(t, e = 1) {
|
|
872
|
-
return e =
|
|
743
|
+
return e = l(e, Number) && e || 1, l(t, String) && t.length >= e;
|
|
873
744
|
}
|
|
874
|
-
function
|
|
875
|
-
return
|
|
745
|
+
function K(t, e = 120) {
|
|
746
|
+
return q(t, e).replace(/</g, "<");
|
|
876
747
|
}
|
|
877
|
-
function
|
|
748
|
+
function q(t, e = 120) {
|
|
878
749
|
return `${t}`.trim().slice(0, e).replace(/>\s+</g, "><").replace(/</g, "<").replace(/\s{2,}/g, " ").replace(/\n/g, "\\n") + (t.length > e ? " …" : "").trim();
|
|
879
750
|
}
|
|
880
|
-
function
|
|
751
|
+
function H(t) {
|
|
881
752
|
switch (true) {
|
|
882
|
-
case
|
|
753
|
+
case l(t, String):
|
|
883
754
|
let e = document.createElement("div");
|
|
884
755
|
return e.append(t), e.innerHTML;
|
|
885
756
|
default:
|
|
886
757
|
return t;
|
|
887
758
|
}
|
|
888
759
|
}
|
|
889
|
-
function
|
|
890
|
-
return
|
|
760
|
+
function he(t) {
|
|
761
|
+
return l(t, String) && Object.assign(document.createElement("textarea"), { innerHTML: t }).textContent || t;
|
|
891
762
|
}
|
|
892
|
-
function
|
|
763
|
+
function qt() {
|
|
893
764
|
let [t, e] = [false, true], r = [], n = { get on() {
|
|
894
765
|
return t = true, n;
|
|
895
766
|
}, get off() {
|
|
@@ -901,22 +772,22 @@ ${r}`), g2;
|
|
|
901
772
|
}, get backLog() {
|
|
902
773
|
return r;
|
|
903
774
|
} };
|
|
904
|
-
function
|
|
775
|
+
function o() {
|
|
905
776
|
e = true;
|
|
906
777
|
}
|
|
907
|
-
function
|
|
778
|
+
function i() {
|
|
908
779
|
e = false;
|
|
909
780
|
}
|
|
910
|
-
function
|
|
911
|
-
return r.unshift(...x2.map((d) => `${
|
|
781
|
+
function a(...x2) {
|
|
782
|
+
return r.unshift(...x2.map((d) => `${oe()} \u2A3B ${he(d)}`)), console.error(r.slice(0, x2.length).join(`
|
|
912
783
|
`)), n;
|
|
913
784
|
}
|
|
914
|
-
function
|
|
915
|
-
return r.unshift(...x2.map((d) => `${
|
|
785
|
+
function b(...x2) {
|
|
786
|
+
return r.unshift(...x2.map((d) => `${oe()} \u26A0 ${he(d)}`)), console.warn(r.slice(0, x2.length).join(`
|
|
916
787
|
`)), n;
|
|
917
788
|
}
|
|
918
|
-
function
|
|
919
|
-
let d = x2.map((
|
|
789
|
+
function p3(...x2) {
|
|
790
|
+
let d = x2.map((y) => `${oe()} \u2714 ${he(y)}`);
|
|
920
791
|
switch (!e && r.unshift(...d), t) {
|
|
921
792
|
case true:
|
|
922
793
|
console.log(d.join(`
|
|
@@ -925,71 +796,71 @@ ${r}`), g2;
|
|
|
925
796
|
return n;
|
|
926
797
|
}
|
|
927
798
|
}
|
|
928
|
-
return Object.defineProperties(n, { log: { value:
|
|
799
|
+
return Object.defineProperties(n, { log: { value: p3, enumerable: false }, error: { value: a, enumerable: false }, warn: { value: b, enumerable: false } }), Object.freeze(n);
|
|
929
800
|
}
|
|
930
|
-
function
|
|
931
|
-
return ((t) => `[${
|
|
801
|
+
function oe() {
|
|
802
|
+
return ((t) => `[${ne(t.getHours())}:${ne(t.getMinutes())}:${ne(t.getSeconds())}.${ne(t.getMilliseconds(), 3)}]`)(/* @__PURE__ */ new Date());
|
|
932
803
|
}
|
|
933
|
-
function
|
|
804
|
+
function we(t, e) {
|
|
934
805
|
if (t) for (let [r, n] of Object.entries(e)) {
|
|
935
|
-
if (r =
|
|
936
|
-
|
|
806
|
+
if (r = $(r), r.startsWith("data")) return ae(t, n);
|
|
807
|
+
l(n, String) && ie(r) && t.setAttribute(r, n.split(/[, ]/)?.join(" "));
|
|
937
808
|
}
|
|
938
809
|
}
|
|
939
810
|
function ae(t, e) {
|
|
940
|
-
if (t &&
|
|
811
|
+
if (t && l(e, Object)) for (let [r, n] of Object.entries(e)) t.setAttribute(`data-${$(r)}`, n);
|
|
941
812
|
}
|
|
942
|
-
function
|
|
943
|
-
return t ?
|
|
813
|
+
function le(t) {
|
|
814
|
+
return t ? t.EL ? [t.EL] : l(t, NodeList) ? [...t] : N(t) ? [t] : Y(t) ? t : t.isJQx ? t.collection : void 0 : [];
|
|
944
815
|
}
|
|
945
816
|
function D(t, e, r = true, ...n) {
|
|
946
817
|
if (t.is.empty) return v.log("[JQx instance].[before(Me) | after(Me) | andThen]: instance is empty."), t;
|
|
947
|
-
if (n = n.map((
|
|
948
|
-
let
|
|
949
|
-
return v.log(`[JQx instance].[${
|
|
818
|
+
if (n = n.map((i) => i.isJQx ? i.node : l(i, String) ? e(i).node ?? i : i), n.find((i) => !l(i, String, Element))) {
|
|
819
|
+
let i = r ? "after" : "before";
|
|
820
|
+
return v.log(`[JQx instance].[${i}(Me)]: invalid/-sufficient input.`), t;
|
|
950
821
|
}
|
|
951
822
|
return t.node[r ? "after" : "before"](...n), t;
|
|
952
823
|
}
|
|
953
|
-
function
|
|
954
|
-
return
|
|
824
|
+
function N(t) {
|
|
825
|
+
return l(t, Text, HTMLElement, Comment);
|
|
955
826
|
}
|
|
956
|
-
function
|
|
957
|
-
if (
|
|
958
|
-
let
|
|
959
|
-
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(),
|
|
827
|
+
function U(t, e) {
|
|
828
|
+
if (l(e, Object)) for (let [r, n] of Object.entries(e)) {
|
|
829
|
+
let o;
|
|
830
|
+
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(), o = "important"), t.style.setProperty($(r), n, o);
|
|
960
831
|
}
|
|
961
832
|
}
|
|
962
|
-
function
|
|
833
|
+
function M(t) {
|
|
963
834
|
let e = t.cloneNode(true);
|
|
964
835
|
return e.removeAttribute && e.removeAttribute("id"), t.isConnected ? t.remove() : t = null, e;
|
|
965
836
|
}
|
|
966
|
-
function
|
|
967
|
-
if (!
|
|
968
|
-
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"),
|
|
969
|
-
return !(
|
|
837
|
+
function Be(t) {
|
|
838
|
+
if (!l(t, HTMLElement)) return;
|
|
839
|
+
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), o = !![e.display, r.display].includes("none"), i = !!t.hidden, a = parseInt(r.height) < 1 || parseInt(r.width) < 1, b = t.offsetTop < 0 || t.offsetLeft + t.offsetWidth < 0 || t.offsetLeft > document.body.offsetWidth, p3 = +r.opacity == 0 || +(e.opacity || 1) == 0;
|
|
840
|
+
return !(i || b || p3 || o || n || a);
|
|
970
841
|
}
|
|
971
|
-
function
|
|
842
|
+
function Ue(t) {
|
|
972
843
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:read-write)")].find((e) => e === t) : false;
|
|
973
844
|
}
|
|
974
|
-
function
|
|
975
|
-
return t?.filter((e) => e).reduce((e, r) => e.concat(
|
|
845
|
+
function Ve(t) {
|
|
846
|
+
return t?.filter((e) => e).reduce((e, r) => e.concat(Fe(r) ? `<!--${r.data}-->` : ce(r) ? r.textContent : r.outerHTML), "");
|
|
976
847
|
}
|
|
977
|
-
function
|
|
848
|
+
function ne(t, e = 2) {
|
|
978
849
|
return `${t}`.padStart(e, "0");
|
|
979
850
|
}
|
|
980
|
-
function
|
|
851
|
+
function _e(t, e = 0) {
|
|
981
852
|
return [t, e] = [Math.floor(t), Math.ceil(e)], Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift() / 2 ** 32 * (t - e + 1) + e);
|
|
982
853
|
}
|
|
983
|
-
function
|
|
984
|
-
return `_${
|
|
854
|
+
function ue() {
|
|
855
|
+
return `_${er(Kt).slice(0, 8).join("")}`;
|
|
985
856
|
}
|
|
986
|
-
function
|
|
987
|
-
return t =
|
|
857
|
+
function ve(t) {
|
|
858
|
+
return t = l(t, String) && /,/.test(t) ? t.split(",").map((e) => e.trim().toLowerCase()).filter((e) => e.length > 0) : t, l(t, Array) ? t : l(t, String) && t?.trim().toLowerCase() || "";
|
|
988
859
|
}
|
|
989
|
-
function
|
|
860
|
+
function Ye(t) {
|
|
990
861
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:modal)")].find((e) => e === t) : false;
|
|
991
862
|
}
|
|
992
|
-
function
|
|
863
|
+
function Le(t, e) {
|
|
993
864
|
switch (t = String(t).trim(), true) {
|
|
994
865
|
case /^(0|false|f)$/i.test(t):
|
|
995
866
|
return false;
|
|
@@ -999,74 +870,74 @@ ${r}`), g2;
|
|
|
999
870
|
return e;
|
|
1000
871
|
}
|
|
1001
872
|
}
|
|
1002
|
-
function
|
|
873
|
+
function er(t) {
|
|
1003
874
|
let e = t.length;
|
|
1004
875
|
for (; e--; ) {
|
|
1005
|
-
let r =
|
|
876
|
+
let r = _e(e);
|
|
1006
877
|
[t[e], t[r]] = [t[r], t[e]];
|
|
1007
878
|
}
|
|
1008
879
|
return t;
|
|
1009
880
|
}
|
|
1010
881
|
function V(t) {
|
|
1011
|
-
return
|
|
882
|
+
return l(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${tr(e)}` || e).join("") : t;
|
|
1012
883
|
}
|
|
1013
|
-
function
|
|
884
|
+
function $(t) {
|
|
1014
885
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/^-|-$/, "");
|
|
1015
886
|
}
|
|
1016
|
-
function
|
|
887
|
+
function tr([t, ...e]) {
|
|
1017
888
|
return `${t.toUpperCase()}${e.join("")}`;
|
|
1018
889
|
}
|
|
1019
|
-
function
|
|
1020
|
-
return
|
|
890
|
+
function ce(t) {
|
|
891
|
+
return l(t, Comment, Text);
|
|
1021
892
|
}
|
|
1022
|
-
function
|
|
1023
|
-
|
|
893
|
+
function Fe(t) {
|
|
894
|
+
l(t, Comment);
|
|
1024
895
|
}
|
|
1025
|
-
function
|
|
1026
|
-
return
|
|
896
|
+
function Ge(t) {
|
|
897
|
+
return l(t, Text);
|
|
1027
898
|
}
|
|
1028
|
-
function
|
|
1029
|
-
return
|
|
899
|
+
function _(t) {
|
|
900
|
+
return l(t, String) && /^<|>$/.test(`${t}`.trim());
|
|
1030
901
|
}
|
|
1031
|
-
function
|
|
1032
|
-
return
|
|
902
|
+
function Y(t) {
|
|
903
|
+
return l(t, Array) && !t?.find((e) => !N(e));
|
|
1033
904
|
}
|
|
1034
|
-
function
|
|
1035
|
-
return
|
|
905
|
+
function fe(t) {
|
|
906
|
+
return l(t, Array) && !t?.find((e) => !_(e));
|
|
1036
907
|
}
|
|
1037
|
-
function
|
|
1038
|
-
let r = t.collection.filter((n) => !
|
|
908
|
+
function E(t, e) {
|
|
909
|
+
let r = t.collection.filter((n) => !ce(n));
|
|
1039
910
|
for (let n = 0; n < r.length; n += 1) e(r[n], n);
|
|
1040
911
|
return t;
|
|
1041
912
|
}
|
|
1042
|
-
function
|
|
1043
|
-
return t.node ?
|
|
913
|
+
function Xe(t) {
|
|
914
|
+
return t.node ? l(t.node, Comment) ? `<!--${t.node.textContent}-->` : t.HTML.get(1).split(">")[0] + ">..." : "";
|
|
1044
915
|
}
|
|
1045
|
-
function
|
|
1046
|
-
let n = e !== document.body &&
|
|
1047
|
-
try {
|
|
916
|
+
function Ae(t, e, r) {
|
|
917
|
+
let n = e !== document.body && l(t, String) && t.toLowerCase() !== "body" ? e : document;
|
|
918
|
+
if (!(!l(t, String) || t.trim().length < 1)) try {
|
|
1048
919
|
r.collection = [...n.querySelectorAll(t)];
|
|
1049
920
|
} catch {
|
|
1050
|
-
v.warn(`JQx: Invalid CSS querySelector. [${
|
|
921
|
+
v.warn(`JQx: Invalid CSS querySelector. [${l(t, String) ? t : "Not a string!"}]`);
|
|
1051
922
|
}
|
|
1052
923
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return { isCommentOrTextNode:
|
|
924
|
+
function Ze() {
|
|
925
|
+
return { isCommentOrTextNode: ce, isNode: N, isComment: Fe, isText: Ge, isHtmlString: _, isArrayOfHtmlElements: Y, isArrayOfHtmlStrings: fe, ElemArray2HtmlString: Ve, input2Collection: le, setCollectionFromCssSelector: Ae, cssRuleEdit: W({ createWithId: "JQxStylesheet" }) };
|
|
1055
926
|
}
|
|
1056
|
-
function
|
|
927
|
+
function Ke() {
|
|
1057
928
|
let e = Object.freeze({ notInDOM: "n/a", writable: "n/a", modal: "n/a", empty: true, open: "n/a", visible: "n/a" });
|
|
1058
929
|
return (r) => {
|
|
1059
930
|
let n = r.node;
|
|
1060
|
-
return
|
|
1061
|
-
return
|
|
931
|
+
return l(n, Node) ? Object.freeze({ get writable() {
|
|
932
|
+
return Ue(n);
|
|
1062
933
|
}, get modal() {
|
|
1063
|
-
return
|
|
934
|
+
return Ye(n);
|
|
1064
935
|
}, get inDOM() {
|
|
1065
936
|
return n.isConnected;
|
|
1066
937
|
}, get open() {
|
|
1067
938
|
return n.open ?? false;
|
|
1068
939
|
}, get visible() {
|
|
1069
|
-
return
|
|
940
|
+
return Be(n);
|
|
1070
941
|
}, get disabled() {
|
|
1071
942
|
return n.hasAttribute("readonly") || n.hasAttribute("disabled");
|
|
1072
943
|
}, get empty() {
|
|
@@ -1076,54 +947,54 @@ ${r}`), g2;
|
|
|
1076
947
|
} }) : e;
|
|
1077
948
|
};
|
|
1078
949
|
}
|
|
1079
|
-
function
|
|
1080
|
-
r &&
|
|
1081
|
-
let
|
|
1082
|
-
e.className && (
|
|
950
|
+
function qe(t, e, r, n) {
|
|
951
|
+
r && l(e, String) && (e = { [e]: r === "-" ? "" : r });
|
|
952
|
+
let o;
|
|
953
|
+
e.className && (o = e.className, delete e.className), o = [...t.classList].find((a) => a.startsWith("JQxClass-") || o && a === o) || o || `JQxClass-${ue().slice(1)}`, n.editCssRule(`.${o}`, e), t.classList.add(o);
|
|
1083
954
|
}
|
|
1084
|
-
var
|
|
1085
|
-
function
|
|
1086
|
-
return { factoryExtensions:
|
|
955
|
+
var rr = Ke();
|
|
956
|
+
function et(t) {
|
|
957
|
+
return { factoryExtensions: nr(t), instanceExtensions: or(t) };
|
|
1087
958
|
}
|
|
1088
|
-
function
|
|
959
|
+
function nr(t) {
|
|
1089
960
|
return { data(e) {
|
|
1090
961
|
return { get all() {
|
|
1091
|
-
return new Proxy(e[0]?.dataset ?? {},
|
|
962
|
+
return new Proxy(e[0]?.dataset ?? {}, Se);
|
|
1092
963
|
}, set(r = {}) {
|
|
1093
|
-
if (!e.is.empty &&
|
|
964
|
+
if (!e.is.empty && l(r, Object)) for (let [n, o] of Object.entries(r)) e.setData({ [n]: o });
|
|
1094
965
|
return e;
|
|
1095
966
|
}, get(r, n) {
|
|
1096
967
|
return e.data.all[r] ?? n;
|
|
1097
968
|
}, add(r = {}) {
|
|
1098
|
-
if (!e.is.empty &&
|
|
969
|
+
if (!e.is.empty && l(r, Object)) for (let [n, o] of Object.entries(r)) e.setData({ [n]: o });
|
|
1099
970
|
return e;
|
|
1100
971
|
}, remove(r) {
|
|
1101
|
-
return e[0]?.removeAttribute(`data-${
|
|
972
|
+
return e[0]?.removeAttribute(`data-${$(r)}`), e;
|
|
1102
973
|
} };
|
|
1103
974
|
}, dimensions(e) {
|
|
1104
975
|
if (e.is.empty) return v.error("[JQx instance].dimensions called on empty instance"), { error: "[JQx instance].dimensions: NO ELEMENTS" };
|
|
1105
976
|
let { node: r } = e, n = r.getBoundingClientRect().toJSON();
|
|
1106
|
-
return n.scrollTopDistance =
|
|
977
|
+
return n.scrollTopDistance = B(r, 0), n.scrollLeftDistance = B(r, 0, false), n;
|
|
1107
978
|
}, node(e) {
|
|
1108
979
|
return e[0];
|
|
1109
980
|
}, HTML(e) {
|
|
1110
981
|
return { get(r, n) {
|
|
1111
982
|
if (e.is.empty) return "NO ELEMENTS IN COLLECTION";
|
|
1112
|
-
let
|
|
1113
|
-
return n ?
|
|
1114
|
-
}, set(r, n = false,
|
|
983
|
+
let o = r ? e.outerHtml : e.html();
|
|
984
|
+
return n ? H(o) : o;
|
|
985
|
+
}, set(r, n = false, o = false) {
|
|
1115
986
|
r = r.isJQx ? r.HTML.get(1) : r;
|
|
1116
|
-
let
|
|
1117
|
-
return r =
|
|
987
|
+
let i = l(r, String);
|
|
988
|
+
return r = i && o ? H(r) : r, i && (r || "").trim().length && e.html(r, n), e;
|
|
1118
989
|
}, replace(r, n = false) {
|
|
1119
990
|
return e.HTML.set(r, false, n);
|
|
1120
991
|
}, append(r, n = false) {
|
|
1121
|
-
return r =
|
|
992
|
+
return r = l(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r, true, n);
|
|
1122
993
|
}, insert(r, n = false) {
|
|
1123
|
-
return r =
|
|
994
|
+
return r = l(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r + e.HTML.get(), false, n);
|
|
1124
995
|
} };
|
|
1125
996
|
}, is(e) {
|
|
1126
|
-
return
|
|
997
|
+
return rr(e);
|
|
1127
998
|
}, length(e) {
|
|
1128
999
|
return e.collection.length;
|
|
1129
1000
|
}, outerHtml(e) {
|
|
@@ -1146,19 +1017,19 @@ ${r}`), g2;
|
|
|
1146
1017
|
}, inSheet(r) {
|
|
1147
1018
|
return e.css(r);
|
|
1148
1019
|
}, valueOf(r) {
|
|
1149
|
-
return e.is.empty ? void 0 : getComputedStyle(e[0])[
|
|
1020
|
+
return e.is.empty ? void 0 : getComputedStyle(e[0])[$(r)];
|
|
1150
1021
|
}, nwRule(r) {
|
|
1151
1022
|
return e.Style.byRule({ rules: r });
|
|
1152
1023
|
}, byRule({ classes2Apply: r = [], rules: n = [] } = {}) {
|
|
1153
|
-
let
|
|
1154
|
-
if (n = n &&
|
|
1155
|
-
return
|
|
1024
|
+
let i = l(n, String) && !r.length ? n.split("{")[0].trim() : "";
|
|
1025
|
+
if (n = n && l(n, String) ? [n] : n, r = r && l(r, String) ? [r] : r, (n?.length || r?.length) && (n?.length && t.editCssRules(...n), r)) for (let a of r) e.addClass(a);
|
|
1026
|
+
return i?.startsWith(".") && e.addClass(i.slice(1)), i?.startsWith("#") && !e.attr("id") && e.prop({ id: i.slice(1) }), e;
|
|
1156
1027
|
} };
|
|
1157
1028
|
} };
|
|
1158
1029
|
}
|
|
1159
|
-
function
|
|
1030
|
+
function or(t) {
|
|
1160
1031
|
return { addClass(e, ...r) {
|
|
1161
|
-
return
|
|
1032
|
+
return E(e, (n) => n && r.forEach((o) => n.classList.add(o)));
|
|
1162
1033
|
}, after(e, ...r) {
|
|
1163
1034
|
return D(e, t, true, ...r);
|
|
1164
1035
|
}, afterMe(e, ...r) {
|
|
@@ -1168,38 +1039,38 @@ ${r}`), g2;
|
|
|
1168
1039
|
}, append(e, ...r) {
|
|
1169
1040
|
if (e.is.empty || r.length < 1) return e;
|
|
1170
1041
|
let n = e.length === 1;
|
|
1171
|
-
for (let
|
|
1172
|
-
if (!
|
|
1173
|
-
let
|
|
1174
|
-
|
|
1042
|
+
for (let o of r) {
|
|
1043
|
+
if (!o.isJQx && L(o)) {
|
|
1044
|
+
let i = o.trim(), b = !/^<(.+)[^>]+>$/m.test(i) ? t.text(o) : T(o);
|
|
1045
|
+
E(e, (p3) => p3.append(n ? b : M(b)));
|
|
1175
1046
|
}
|
|
1176
|
-
|
|
1047
|
+
N(o) && E(e, (i) => i.append(n ? o : M(o))), o.isJQx && !o.is.empty && E(e, (i) => o.collection.forEach((a) => i.append(n ? a : M(a))));
|
|
1177
1048
|
}
|
|
1178
1049
|
return e;
|
|
1179
1050
|
}, appendTo(e, r) {
|
|
1180
1051
|
switch (r = typeof r == "string" ? t(r) : r, true) {
|
|
1181
|
-
case (!r?.isJQx && !
|
|
1052
|
+
case (!r?.isJQx && !l(r, HTMLElement) || r?.collection?.length < 1):
|
|
1182
1053
|
return t.warn("[JQx instance].appendTo: invalid input"), e;
|
|
1183
1054
|
default:
|
|
1184
1055
|
return (r.isJQx ? r : t(r)).append(e), e;
|
|
1185
1056
|
}
|
|
1186
1057
|
}, attr(e, r, n) {
|
|
1187
|
-
if (!e.node ||
|
|
1188
|
-
if (!n && L(r)) return r =
|
|
1189
|
-
if (L(r) && n) switch (r =
|
|
1058
|
+
if (!e.node || l(e.node, Text, Comment)) return e;
|
|
1059
|
+
if (!n && L(r)) return r = $(r), r === "class" ? [...e.node.classList].join(" ") : e.node.getAttribute(r);
|
|
1060
|
+
if (L(r) && n) switch (r = $(r), true) {
|
|
1190
1061
|
case r.startsWith("data-"):
|
|
1191
1062
|
r = { data: { [r.replace("data-", "")]: n } };
|
|
1192
1063
|
break;
|
|
1193
1064
|
default:
|
|
1194
1065
|
r = { [r]: n };
|
|
1195
1066
|
}
|
|
1196
|
-
return
|
|
1067
|
+
return l(r, Object) && !e.is.empty && we(e.node, r), e;
|
|
1197
1068
|
}, before(e, ...r) {
|
|
1198
1069
|
return D(e, t, false, ...r);
|
|
1199
1070
|
}, beforeMe(e, ...r) {
|
|
1200
1071
|
D(e, t, false, ...r);
|
|
1201
1072
|
}, clear(e) {
|
|
1202
|
-
return
|
|
1073
|
+
return E(e, se);
|
|
1203
1074
|
}, closest(e, r) {
|
|
1204
1075
|
let n = L(r) ? e.node?.closest(r) : void 0;
|
|
1205
1076
|
return n ? t(n) : e;
|
|
@@ -1207,21 +1078,21 @@ ${r}`), g2;
|
|
|
1207
1078
|
let { node: n } = e;
|
|
1208
1079
|
return n && getComputedStyle(n)[r];
|
|
1209
1080
|
}, css(e, r, n) {
|
|
1210
|
-
return
|
|
1081
|
+
return E(e, (o) => qe(o, r, n, t));
|
|
1211
1082
|
}, duplicate(e, r = false, n = document.body) {
|
|
1212
1083
|
switch (true) {
|
|
1213
1084
|
case e.is.empty:
|
|
1214
1085
|
return v.error("Duplicating an empty JQx instance is not possible"), e;
|
|
1215
1086
|
default:
|
|
1216
|
-
let
|
|
1217
|
-
return
|
|
1218
|
-
|
|
1219
|
-
}), r ? t(
|
|
1087
|
+
let o = e.collection[0].cloneNode(true);
|
|
1088
|
+
return o.childNodes.forEach((i) => {
|
|
1089
|
+
i.removeAttribute && i?.removeAttribute("id");
|
|
1090
|
+
}), r ? t(o).toDOM(n) : t.virtual(o);
|
|
1220
1091
|
}
|
|
1221
1092
|
}, each(e, r) {
|
|
1222
|
-
return
|
|
1093
|
+
return E(e, r);
|
|
1223
1094
|
}, empty(e) {
|
|
1224
|
-
return
|
|
1095
|
+
return E(e, se);
|
|
1225
1096
|
}, find(e, r) {
|
|
1226
1097
|
return e.collection.length > 0 ? [...e.first()?.querySelectorAll(r)] : [];
|
|
1227
1098
|
}, find$(e, r) {
|
|
@@ -1235,7 +1106,7 @@ ${r}`), g2;
|
|
|
1235
1106
|
}, hasClass(e, ...r) {
|
|
1236
1107
|
return e.is.empty || !e.node.classList.length ? false : r.find((n) => e.node.classList.contains(n)) && true || false;
|
|
1237
1108
|
}, hide(e) {
|
|
1238
|
-
return
|
|
1109
|
+
return E(e, (r) => U(r, { display: "none !important" }));
|
|
1239
1110
|
}, html(e, r, n) {
|
|
1240
1111
|
switch (true) {
|
|
1241
1112
|
case (e.is.empty && !L(r)):
|
|
@@ -1243,16 +1114,16 @@ ${r}`), g2;
|
|
|
1243
1114
|
case !L(r):
|
|
1244
1115
|
return e.node?.getHTML() ?? "";
|
|
1245
1116
|
default:
|
|
1246
|
-
let
|
|
1247
|
-
return
|
|
1117
|
+
let o = T(`<div>${r.isJQx ? r.HTML.get(true) : r}</div>`);
|
|
1118
|
+
return E(e, (a) => (a.textContent = n ? a.textContent : "", a.insertAdjacentHTML(t.at.end, o.getHTML())));
|
|
1248
1119
|
}
|
|
1249
|
-
}, htmlFor(e, r, n = "",
|
|
1120
|
+
}, htmlFor(e, r, n = "", o = false) {
|
|
1250
1121
|
if (e.is.empty || !L(r) || !L(n)) return e;
|
|
1251
|
-
let
|
|
1252
|
-
if (
|
|
1253
|
-
let
|
|
1254
|
-
return
|
|
1255
|
-
|
|
1122
|
+
let i = e.find$(r);
|
|
1123
|
+
if (i.length < 1) return e;
|
|
1124
|
+
let a = T(`<span>${n}</span>`);
|
|
1125
|
+
return i.each((b) => {
|
|
1126
|
+
o || (b.textContent = ""), b.insertAdjacentHTML(t.at.end, a?.getHTML());
|
|
1256
1127
|
}), e;
|
|
1257
1128
|
}, isEmpty(e) {
|
|
1258
1129
|
return !e.node;
|
|
@@ -1260,14 +1131,14 @@ ${r}`), g2;
|
|
|
1260
1131
|
return e.single(r);
|
|
1261
1132
|
}, on(e, r, ...n) {
|
|
1262
1133
|
switch (true) {
|
|
1263
|
-
case (e.is.empty || !
|
|
1134
|
+
case (e.is.empty || !l(r, String, Array) || !L(r) || n.length < 1):
|
|
1264
1135
|
return e;
|
|
1265
1136
|
default:
|
|
1266
1137
|
return t.handle({ type: r, node: e.node, handler: n }), e;
|
|
1267
1138
|
}
|
|
1268
1139
|
}, once(e, r, ...n) {
|
|
1269
1140
|
switch (true) {
|
|
1270
|
-
case (e.is.empty || !
|
|
1141
|
+
case (e.is.empty || !l(r, String, Array) || !L(r) || n.length < 1):
|
|
1271
1142
|
return e;
|
|
1272
1143
|
default:
|
|
1273
1144
|
return t.handle({ type: r, once: true, node: e.node, handler: n }), e;
|
|
@@ -1275,72 +1146,72 @@ ${r}`), g2;
|
|
|
1275
1146
|
}, prepend(e, ...r) {
|
|
1276
1147
|
if (e.is.empty || !r) return;
|
|
1277
1148
|
let n = e.length === 1;
|
|
1278
|
-
for (let
|
|
1279
|
-
if (L(
|
|
1280
|
-
|
|
1281
|
-
let
|
|
1282
|
-
|
|
1149
|
+
for (let o of r) {
|
|
1150
|
+
if (L(o)) {
|
|
1151
|
+
o = o.trim();
|
|
1152
|
+
let a = !/^<(.+)[^>]+>$/m.test(o) ? t.text(o) : T(o);
|
|
1153
|
+
a = n ? a : M(a), E(e, (b) => b.prepend(a.cloneNode(true)));
|
|
1283
1154
|
}
|
|
1284
|
-
|
|
1155
|
+
N(o) && E(e, (i) => i.prepend(n ? o : M(o))), o.isJQx && !o.is.empty && (o.collection.length > 1 && o.collection.reverse(), E(e, (i) => E(o, (a) => i.prepend(n ? a : M(a)))), o.collection.reverse());
|
|
1285
1156
|
}
|
|
1286
1157
|
return e;
|
|
1287
1158
|
}, prependTo(e, r) {
|
|
1288
1159
|
switch (r = typeof r == "string" ? t(r) : r, true) {
|
|
1289
|
-
case (!r?.isJQx && !
|
|
1160
|
+
case (!r?.isJQx && !l(r, HTMLElement) || r?.collection?.length < 1):
|
|
1290
1161
|
return t.warn("[JQx instance].appendTo: invalid input"), e;
|
|
1291
1162
|
default:
|
|
1292
1163
|
return (r.isJQx ? r : t(r)).prepend(e), e;
|
|
1293
1164
|
}
|
|
1294
1165
|
}, prop(e, r, n) {
|
|
1295
|
-
if (
|
|
1296
|
-
let
|
|
1297
|
-
for (let [
|
|
1298
|
-
if (
|
|
1299
|
-
if (
|
|
1300
|
-
|
|
1301
|
-
if (
|
|
1302
|
-
|
|
1166
|
+
if (l(r, String) && !n) return r.startsWith("data") ? e[0]?.dataset[r.slice(r.indexOf("-") + 1)] : e[0]?.[r];
|
|
1167
|
+
let o = l(r, Object) ? r : { [r]: n };
|
|
1168
|
+
for (let [i, a] of Object.entries(o)) {
|
|
1169
|
+
if (i = i.trim(), a && !ie(i) || !a) return false;
|
|
1170
|
+
if (i.toLowerCase() === "id") return e[0].id = a;
|
|
1171
|
+
E(e, (p3) => {
|
|
1172
|
+
if (i.startsWith("data")) return p3.dataset[i.slice(i.indexOf("-") + 1)] = a;
|
|
1173
|
+
p3[i] = a;
|
|
1303
1174
|
});
|
|
1304
1175
|
}
|
|
1305
1176
|
return e;
|
|
1306
1177
|
}, remove(e, r) {
|
|
1307
|
-
let n = (
|
|
1178
|
+
let n = (i) => i.remove(), o = () => e.collection = e.collection.filter((i) => document.documentElement.contains(i));
|
|
1308
1179
|
if (r) {
|
|
1309
|
-
let
|
|
1310
|
-
return
|
|
1180
|
+
let i = e.find$(r);
|
|
1181
|
+
return i.is.empty || (E(i, n), o()), e;
|
|
1311
1182
|
}
|
|
1312
|
-
return
|
|
1183
|
+
return E(e, n), o(), e;
|
|
1313
1184
|
}, rmAttr(e, ...r) {
|
|
1314
1185
|
for (let n of r) e.node.removeAttribute(n);
|
|
1315
1186
|
return e;
|
|
1316
1187
|
}, removeClass(e, ...r) {
|
|
1317
|
-
return
|
|
1318
|
-
if (n) for (let
|
|
1188
|
+
return E(e, (n) => {
|
|
1189
|
+
if (n) for (let o of r) n.classList.remove(o);
|
|
1319
1190
|
});
|
|
1320
1191
|
}, renderTo(e, r, n) {
|
|
1321
|
-
return r =
|
|
1192
|
+
return r = l(r, HTMLElement) || r.isJQx ? r : document.body, n = l(n, String) && t.at[n] ? n : t.at.end, e.first$().toDOM(r, n), e;
|
|
1322
1193
|
}, replace(e, r, n) {
|
|
1323
|
-
let
|
|
1324
|
-
return !r || !
|
|
1194
|
+
let o = e.node;
|
|
1195
|
+
return !r || !l(n, HTMLElement) && !n?.isJQx ? (t.logger.error("JQx replace: invalid replacement value"), e) : ((n.isJQx || l(n, NodeList)) && (n = n[0]), o && r && (r = l(r, String) ? o.querySelectorAll(r) : r.isJQx ? r.collection : r, l(r, HTMLElement, NodeList, Array) && l(n, HTMLElement) && (l(r, HTMLElement) ? [r] : [...r]).forEach((i) => i.replaceWith(n.cloneNode(true)))), e);
|
|
1325
1196
|
}, replaceClass(e, r, ...n) {
|
|
1326
|
-
return
|
|
1327
|
-
|
|
1328
|
-
for (let
|
|
1197
|
+
return E(e, (o) => {
|
|
1198
|
+
o.classList.remove(r);
|
|
1199
|
+
for (let i of n) o.classList.add(i);
|
|
1329
1200
|
});
|
|
1330
1201
|
}, replaceMe(e, r) {
|
|
1331
1202
|
return e.replaceWith(r);
|
|
1332
1203
|
}, replaceWith(e, r) {
|
|
1333
|
-
return r =
|
|
1204
|
+
return r = l(r, Element) ? r : r.isJQx ? r[0] : void 0, r && (e[0].replaceWith(r), e = t.virtual(r)), e;
|
|
1334
1205
|
}, setData(e, r) {
|
|
1335
|
-
return
|
|
1206
|
+
return E(e, (n) => ae(n, r));
|
|
1336
1207
|
}, show(e) {
|
|
1337
|
-
return
|
|
1208
|
+
return E(e, (r) => U(r, { display: "revert-layer !important" }));
|
|
1338
1209
|
}, single(e, r) {
|
|
1339
1210
|
let n = e.collection.length > 0;
|
|
1340
1211
|
switch (r = r ?? 0, true) {
|
|
1341
|
-
case (n &&
|
|
1212
|
+
case (n && l(r, String)):
|
|
1342
1213
|
return e.find$(r);
|
|
1343
|
-
case (n &&
|
|
1214
|
+
case (n && l(r, Number)):
|
|
1344
1215
|
return t(e.collection[r]);
|
|
1345
1216
|
case n:
|
|
1346
1217
|
return e.collection[0];
|
|
@@ -1348,215 +1219,217 @@ ${r}`), g2;
|
|
|
1348
1219
|
return e;
|
|
1349
1220
|
}
|
|
1350
1221
|
}, style(e, r, n) {
|
|
1351
|
-
return
|
|
1352
|
-
n &&
|
|
1222
|
+
return E(e, (i) => {
|
|
1223
|
+
n && l(r, String) && (r = { [r]: n || "none" }), U(i, r);
|
|
1353
1224
|
});
|
|
1354
1225
|
}, text(e, r, n = false) {
|
|
1355
1226
|
switch (true) {
|
|
1356
1227
|
case e.isEmpty():
|
|
1357
1228
|
return e;
|
|
1358
|
-
case !
|
|
1229
|
+
case !l(r, String):
|
|
1359
1230
|
return e.node.textContent;
|
|
1360
1231
|
default:
|
|
1361
|
-
return
|
|
1232
|
+
return E(e, (o) => o.textContent = n ? o.textContent + r : r);
|
|
1362
1233
|
}
|
|
1363
1234
|
}, toDOM(e, r = document.body, n = F.BeforeEnd) {
|
|
1364
|
-
return e.isVirtual = false,
|
|
1235
|
+
return e.isVirtual = false, R(e.collection, r, n), e;
|
|
1365
1236
|
}, toggleClass(e, r) {
|
|
1366
|
-
return
|
|
1237
|
+
return E(e, (n) => n.classList.toggle(r));
|
|
1367
1238
|
}, toNodeList(e) {
|
|
1368
1239
|
return [...e.collection].map((r) => document.importNode(r, true));
|
|
1369
|
-
}, trigger(e, r, n,
|
|
1370
|
-
n =
|
|
1371
|
-
let
|
|
1372
|
-
return e.is.empty || e.each((
|
|
1240
|
+
}, trigger(e, r, n, o) {
|
|
1241
|
+
n = l(n, Function) ? n : Event, o = l(o, Object) ? { ...o, bubbles: o.bubbles ?? true } : { bubbles: true };
|
|
1242
|
+
let i = new n(r, o);
|
|
1243
|
+
return e.is.empty || e.each((a) => a.dispatchEvent(i)), e;
|
|
1373
1244
|
}, val(e, r) {
|
|
1374
1245
|
switch (true) {
|
|
1375
|
-
case (e.is.empty || !
|
|
1246
|
+
case (e.is.empty || !l(e.node, HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement)):
|
|
1376
1247
|
return e;
|
|
1377
|
-
case !
|
|
1248
|
+
case !l(r, String):
|
|
1378
1249
|
return e.node.value;
|
|
1379
1250
|
default:
|
|
1380
|
-
return e.node.value =
|
|
1251
|
+
return e.node.value = l(r, String) ? r : "", e;
|
|
1381
1252
|
}
|
|
1382
1253
|
} };
|
|
1383
1254
|
}
|
|
1384
|
-
var
|
|
1385
|
-
var
|
|
1386
|
-
var { isComment:
|
|
1387
|
-
function
|
|
1388
|
-
return { ...
|
|
1255
|
+
var $e;
|
|
1256
|
+
var de;
|
|
1257
|
+
var { isComment: an, isText: ln, isHtmlString: un, isArrayOfHtmlElements: cn, isArrayOfHtmlStrings: fn, ElemArray2HtmlString: dn, cssRuleEdit: Te, addFn: ir } = sr();
|
|
1258
|
+
function sr() {
|
|
1259
|
+
return { ...Ze(), addFn: ar };
|
|
1389
1260
|
}
|
|
1390
|
-
function
|
|
1391
|
-
return t = t?.trim(), !L(t) || !
|
|
1261
|
+
function ar(t, e) {
|
|
1262
|
+
return t = t?.trim(), !L(t) || !l(e, Function) ? v.error("JQx.fn: method invalid parameter(s)") : (de[t] = (r, ...n) => e(r, ...n), v.log(`JQx: added extension function [${t}]`));
|
|
1392
1263
|
}
|
|
1393
|
-
function
|
|
1264
|
+
function lr(t) {
|
|
1394
1265
|
return function(e, r, n) {
|
|
1395
|
-
if (e = e?.trim(), !L(e) || !
|
|
1396
|
-
let
|
|
1266
|
+
if (e = e?.trim(), !L(e) || !l(r, Function)) return t.error("JQx.staticFn: invalid parameter(s)");
|
|
1267
|
+
let o = n ? { get() {
|
|
1397
1268
|
return r();
|
|
1398
|
-
} } : { value(...
|
|
1399
|
-
return r(...
|
|
1269
|
+
} } : { value(...i) {
|
|
1270
|
+
return r(...i);
|
|
1400
1271
|
} };
|
|
1401
1272
|
try {
|
|
1402
|
-
Object.defineProperty(t, e,
|
|
1273
|
+
Object.defineProperty(t, e, o);
|
|
1403
1274
|
} catch {
|
|
1404
1275
|
return t.warn(`JQx.staticFn: extension [${e}] already exists`);
|
|
1405
1276
|
}
|
|
1406
1277
|
return v.log(`JQx: added static extension function [${e}]`);
|
|
1407
1278
|
};
|
|
1408
1279
|
}
|
|
1409
|
-
function
|
|
1410
|
-
return new Proxy(t,
|
|
1280
|
+
function me(t) {
|
|
1281
|
+
return new Proxy(t, { get: (e, r) => ur(e, r, t) });
|
|
1411
1282
|
}
|
|
1412
|
-
function
|
|
1413
|
-
return (...r) =>
|
|
1283
|
+
function tt(t, e) {
|
|
1284
|
+
return (...r) => e = typeof t == "function" ? t(me(e), ...r) : e;
|
|
1414
1285
|
}
|
|
1415
|
-
function
|
|
1286
|
+
function ur(t, e, r) {
|
|
1416
1287
|
switch (true) {
|
|
1417
|
-
case
|
|
1418
|
-
return
|
|
1419
|
-
case
|
|
1288
|
+
case (e === Symbol.proxy || e === Symbol.type):
|
|
1289
|
+
return "JQx instance proxy";
|
|
1290
|
+
case typeof e == "symbol":
|
|
1291
|
+
return O({ trial: () => t[e], whenError: () => t });
|
|
1292
|
+
case (!Number.isNaN(+e) && typeof +e == "number"):
|
|
1420
1293
|
return t.collection?.[e] || void 0;
|
|
1421
|
-
case e in
|
|
1422
|
-
return
|
|
1423
|
-
case e in
|
|
1424
|
-
return
|
|
1294
|
+
case e in $e:
|
|
1295
|
+
return tt($e[e], r)();
|
|
1296
|
+
case e in de:
|
|
1297
|
+
return tt(de[e], r);
|
|
1425
1298
|
default:
|
|
1426
|
-
return t
|
|
1299
|
+
return Reflect.get(t, e);
|
|
1427
1300
|
}
|
|
1428
1301
|
}
|
|
1429
|
-
function
|
|
1430
|
-
let e =
|
|
1302
|
+
function ot(t) {
|
|
1303
|
+
let e = gr(t);
|
|
1431
1304
|
for (let [r, n] of Object.entries(Object.getOwnPropertyDescriptors(e))) Object.defineProperty(t, r, n);
|
|
1432
1305
|
return t;
|
|
1433
1306
|
}
|
|
1434
|
-
function
|
|
1307
|
+
function cr(t) {
|
|
1435
1308
|
return { allow(e) {
|
|
1436
1309
|
let r = /-/.test(e), n = r && e;
|
|
1437
|
-
e = r ? V(e) : e.toLowerCase(),
|
|
1310
|
+
e = r ? V(e) : e.toLowerCase(), C.allowTag(e), Object.defineProperties(t, Ce(e, true, t, n));
|
|
1438
1311
|
}, prohibit(e) {
|
|
1439
|
-
e = e.toLowerCase(),
|
|
1312
|
+
e = e.toLowerCase(), C.prohibitTag(e), Object.defineProperties(t, Ce(e, false, t));
|
|
1440
1313
|
} };
|
|
1441
1314
|
}
|
|
1442
|
-
function
|
|
1315
|
+
function rt(...t) {
|
|
1443
1316
|
if (t.length === 1) {
|
|
1444
1317
|
let e = String(t.shift().trim());
|
|
1445
1318
|
t = e.startsWith("!") ? [e.slice(1, -1)] : e.split(",").map((r) => r.trim());
|
|
1446
1319
|
}
|
|
1447
|
-
for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r))
|
|
1320
|
+
for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r)) Te(e, { removeRule: 1 });
|
|
1448
1321
|
}
|
|
1449
|
-
function
|
|
1322
|
+
function fr(t) {
|
|
1450
1323
|
return function(e, r, n) {
|
|
1451
|
-
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(F).find((
|
|
1452
|
-
let
|
|
1453
|
-
if (r && !
|
|
1454
|
-
return
|
|
1324
|
+
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(F).find((i) => n === i);
|
|
1325
|
+
let o = t(e, document.createElement("br"));
|
|
1326
|
+
if (r && !l(r, HTMLBRElement)) for (let i of o.collection) n ? r.insertAdjacentElement(n, i) : r.append(i);
|
|
1327
|
+
return o;
|
|
1455
1328
|
};
|
|
1456
1329
|
}
|
|
1457
|
-
function
|
|
1330
|
+
function dr(...t) {
|
|
1458
1331
|
let e = {};
|
|
1459
1332
|
for (let r of t) {
|
|
1460
1333
|
let n = Object.getOwnPropertyDescriptors(r);
|
|
1461
|
-
for (let [
|
|
1334
|
+
for (let [o, i] of Object.entries(n)) !(o in e) && Object.defineProperty(e, o, { ...i, enumerable: false });
|
|
1462
1335
|
}
|
|
1463
1336
|
return e;
|
|
1464
1337
|
}
|
|
1465
|
-
function
|
|
1466
|
-
return t =
|
|
1467
|
-
return (...
|
|
1468
|
-
let
|
|
1469
|
-
return v.log(e ? `JQx: created (virtual) instance from [JQx].${t} ${
|
|
1338
|
+
function mr(t, e, r, n) {
|
|
1339
|
+
return t = $(n || t.toLowerCase()), { get() {
|
|
1340
|
+
return (...o) => {
|
|
1341
|
+
let i = e && r.virtual(P(k[t](...o))) || void 0, b = !l(i?.node, Comment, Text, void 0) ? Ee(i) : "";
|
|
1342
|
+
return v.log(e ? `JQx: created (virtual) instance from [JQx].${t} ${b}` : `JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`), i;
|
|
1470
1343
|
};
|
|
1471
1344
|
}, enumerable: false, configurable: true };
|
|
1472
1345
|
}
|
|
1473
|
-
function
|
|
1346
|
+
function Ce(t, e, r, n) {
|
|
1474
1347
|
t = t.toLowerCase();
|
|
1475
|
-
let
|
|
1476
|
-
return n ? { [n]:
|
|
1348
|
+
let o = mr(t, e, r, n);
|
|
1349
|
+
return n ? { [n]: o, [V(n)]: o } : { [t]: o, [t.toUpperCase()]: o };
|
|
1477
1350
|
}
|
|
1478
|
-
function
|
|
1479
|
-
return
|
|
1351
|
+
function gr(t) {
|
|
1352
|
+
return dr(Object.entries(C.tagsRaw).reduce(pr(t), {}), Er(t));
|
|
1480
1353
|
}
|
|
1481
|
-
function
|
|
1354
|
+
function pr(t) {
|
|
1482
1355
|
return function(e, [r, n]) {
|
|
1483
|
-
return Object.defineProperties(e,
|
|
1356
|
+
return Object.defineProperties(e, Ce(r, n, t)), e;
|
|
1484
1357
|
};
|
|
1485
1358
|
}
|
|
1486
|
-
function
|
|
1359
|
+
function yr(t) {
|
|
1487
1360
|
return function(e, r, ...n) {
|
|
1488
|
-
|
|
1361
|
+
l(r, Function) && (n.push(r), r = void 0), t({ type: e, selector: r, handlers: n });
|
|
1489
1362
|
};
|
|
1490
1363
|
}
|
|
1491
|
-
function
|
|
1364
|
+
function br(t) {
|
|
1492
1365
|
return function(e) {
|
|
1493
|
-
let { type: r, types: n, origin:
|
|
1494
|
-
|
|
1495
|
-
let
|
|
1496
|
-
|
|
1497
|
-
let c = { type:
|
|
1366
|
+
let { type: r, types: n, origin: o, selector: i, handler: a, handlers: b, node: p3, name: x2, capture: d, once: y, about: m } = e;
|
|
1367
|
+
a = b || a, r = n || r, i = o || i;
|
|
1368
|
+
let S2 = ve(r), f2 = x2;
|
|
1369
|
+
a = l(a, Function) ? [a] : a;
|
|
1370
|
+
let c = { type: S2, selector: i || o, capture: d, name: f2, once: y, node: p3, about: m };
|
|
1498
1371
|
switch (true) {
|
|
1499
|
-
case (
|
|
1500
|
-
for (let
|
|
1372
|
+
case (l(S2, Array) && S2.length > 0):
|
|
1373
|
+
for (let s of S2) c.type = s, nt(a, c, t);
|
|
1501
1374
|
break;
|
|
1502
1375
|
default:
|
|
1503
|
-
return
|
|
1376
|
+
return nt(a, c, t);
|
|
1504
1377
|
}
|
|
1505
1378
|
};
|
|
1506
1379
|
}
|
|
1507
|
-
function
|
|
1380
|
+
function nt(t, e, r) {
|
|
1508
1381
|
for (let n of t) r.listen({ ...e, handler: n });
|
|
1509
1382
|
}
|
|
1510
|
-
function
|
|
1383
|
+
function hr(t) {
|
|
1511
1384
|
return function(e, r) {
|
|
1512
1385
|
return r = L(r) && r, e = L(e) && e, r && e && t.listenerStore[e][r];
|
|
1513
1386
|
};
|
|
1514
1387
|
}
|
|
1515
|
-
function
|
|
1516
|
-
return t.activePopup || Object.defineProperty(t, "activePopup", { value:
|
|
1388
|
+
function Sr(t) {
|
|
1389
|
+
return t.activePopup || Object.defineProperty(t, "activePopup", { value: ee(t), enumerable: false }), t.activePopup;
|
|
1517
1390
|
}
|
|
1518
|
-
function
|
|
1519
|
-
let e = (d,
|
|
1520
|
-
return W({ createWithId: d || `jqx${
|
|
1391
|
+
function xr(t) {
|
|
1392
|
+
let e = (d, y) => Te(d, y), r = function(d) {
|
|
1393
|
+
return W({ createWithId: d || `jqx${ue()}` });
|
|
1521
1394
|
}, n = function(...d) {
|
|
1522
|
-
for (let
|
|
1523
|
-
},
|
|
1524
|
-
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit:
|
|
1525
|
-
}
|
|
1526
|
-
function
|
|
1527
|
-
let { factoryExtensions: e, instanceExtensions: r } =
|
|
1528
|
-
|
|
1529
|
-
let { editCssRule: n, createStyle:
|
|
1530
|
-
return
|
|
1531
|
-
return
|
|
1532
|
-
}, node(c,
|
|
1533
|
-
return
|
|
1534
|
-
}, nodes(c,
|
|
1535
|
-
return [...
|
|
1536
|
-
}, clearAllTimers:
|
|
1537
|
-
return function(c,
|
|
1538
|
-
return
|
|
1395
|
+
for (let y of d) Te(y);
|
|
1396
|
+
}, o = cr(t), i = te(t), a = br(i);
|
|
1397
|
+
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit: o, handle: a, capturedHandling: a, log: (...d) => v.on.log(...d).off, warn: (...d) => v.on.warn(...d).off, error: (...d) => v.on.error(...d).off, handlerWrapper: i };
|
|
1398
|
+
}
|
|
1399
|
+
function Er(t) {
|
|
1400
|
+
let { factoryExtensions: e, instanceExtensions: r } = et(t);
|
|
1401
|
+
$e = e, de = r;
|
|
1402
|
+
let { editCssRule: n, createStyle: o, editCssRules: i, allowProhibit: a, handle: b, capturedHandling: p3, log: x2, warn: d, error: y, handlerWrapper: m } = xr(t), S2 = hr(t), f2 = lr(t);
|
|
1403
|
+
return k.setError = (c) => (y(`JQx direct element creation error: [${c}] is not a valid tag`), t.br()), { log: x2, warn: d, error: y, editCssRules: i, createStyle: o, editStylesheet: o, editCssRule: n, escHtml: H, logger: v, proxyWrapper: G, text(c, s = false) {
|
|
1404
|
+
return s ? t.comment(c) : document.createTextNode(c);
|
|
1405
|
+
}, node(c, s = document) {
|
|
1406
|
+
return s.querySelector(c, s);
|
|
1407
|
+
}, nodes(c, s = document) {
|
|
1408
|
+
return [...s.querySelectorAll(c, s)];
|
|
1409
|
+
}, clearAllTimers: xe, get staticFn() {
|
|
1410
|
+
return function(c, s, u2) {
|
|
1411
|
+
return f2(c, s, u2);
|
|
1539
1412
|
};
|
|
1540
1413
|
}, get toBool() {
|
|
1541
|
-
return
|
|
1414
|
+
return Le;
|
|
1542
1415
|
}, get getNamedListener() {
|
|
1543
|
-
return
|
|
1416
|
+
return S2;
|
|
1544
1417
|
}, get virtual() {
|
|
1545
|
-
return
|
|
1418
|
+
return fr(t);
|
|
1546
1419
|
}, get allowTag() {
|
|
1547
|
-
return
|
|
1420
|
+
return a.allow;
|
|
1548
1421
|
}, get prohibitTag() {
|
|
1549
|
-
return
|
|
1422
|
+
return a.prohibit;
|
|
1550
1423
|
}, get removeCssRule() {
|
|
1551
|
-
return
|
|
1424
|
+
return rt;
|
|
1552
1425
|
}, get removeCssRules() {
|
|
1553
|
-
return
|
|
1426
|
+
return rt;
|
|
1554
1427
|
}, get delegate() {
|
|
1555
|
-
return
|
|
1428
|
+
return yr(p3);
|
|
1556
1429
|
}, get delegateCaptured() {
|
|
1557
|
-
return
|
|
1430
|
+
return p3;
|
|
1558
1431
|
}, get handle() {
|
|
1559
|
-
return
|
|
1432
|
+
return p3;
|
|
1560
1433
|
}, get listen() {
|
|
1561
1434
|
return m.listen;
|
|
1562
1435
|
}, get at() {
|
|
@@ -1564,53 +1437,57 @@ ${r}`), g2;
|
|
|
1564
1437
|
}, get setStyle() {
|
|
1565
1438
|
return n;
|
|
1566
1439
|
}, get fn() {
|
|
1567
|
-
return
|
|
1440
|
+
return ir;
|
|
1568
1441
|
}, get lenient() {
|
|
1569
|
-
return
|
|
1442
|
+
return C.allowUnknownHtmlTags;
|
|
1570
1443
|
}, get IS() {
|
|
1571
|
-
return
|
|
1444
|
+
return l;
|
|
1572
1445
|
}, get Popup() {
|
|
1573
|
-
return
|
|
1446
|
+
return Sr(t);
|
|
1574
1447
|
}, get listenerStore() {
|
|
1575
1448
|
return m.ListenerStore;
|
|
1576
1449
|
} };
|
|
1577
1450
|
}
|
|
1578
|
-
var
|
|
1579
|
-
function
|
|
1451
|
+
var it = ot(wr());
|
|
1452
|
+
function wr() {
|
|
1580
1453
|
return function(e, r, n = F.BeforeEnd) {
|
|
1581
1454
|
if (e?.isJQx) return e;
|
|
1582
|
-
let
|
|
1583
|
-
r = (!
|
|
1584
|
-
let
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
let d
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1455
|
+
let o = l(r, HTMLBRElement);
|
|
1456
|
+
r = (!o && r && r.isJQx ? r[0] : r) || document.body, n = n && Object.values(F).find((d) => n === d) ? n : void 0;
|
|
1457
|
+
let i = _(e), b = !i && fe(e) || i, p3 = { collection: le(e) ?? [], isVirtual: o, isJQx: true }, x2 = Y(p3.collection);
|
|
1458
|
+
switch (true) {
|
|
1459
|
+
case (p3.collection.length && x2 && !o):
|
|
1460
|
+
for (let d of p3.collection) r.contains(d) || R([d], r, n);
|
|
1461
|
+
break;
|
|
1462
|
+
case b:
|
|
1463
|
+
for (let d of [e].flat()) p3.collection.push(T(d));
|
|
1464
|
+
if (p3.collection.length > 0) {
|
|
1465
|
+
let d = p3.collection.filter((f2) => f2?.dataset?.jqxcreationerror);
|
|
1466
|
+
p3.collection = p3.collection.filter((f2) => !f2?.dataset?.jqxcreationerror);
|
|
1467
|
+
let m = p3.collection.map((f2) => `${String(f2.constructor).split(/function|\(/)[1].trim()}`).length > 1;
|
|
1468
|
+
p3 = me(p3);
|
|
1469
|
+
let S2 = p3.collection.length > 0 ? Xe(p3) : "sanitized: no elements remaining";
|
|
1470
|
+
v.log(`JQx: created ${p3.isVirtual ? "(virtual)" : ""} instance from ${m ? "array of " : ""}HTML string${m ? "s" : ""} ${S2}`), p3.isVirtual || R(p3.collection, r, n);
|
|
1471
|
+
}
|
|
1472
|
+
break;
|
|
1473
|
+
default:
|
|
1474
|
+
Ae(e, r, p3);
|
|
1598
1475
|
}
|
|
1599
|
-
return
|
|
1476
|
+
return me(p3);
|
|
1600
1477
|
};
|
|
1601
1478
|
}
|
|
1602
|
-
var
|
|
1479
|
+
var hn = it;
|
|
1603
1480
|
|
|
1604
1481
|
// ../Resource/Externals/ticktock.min.js
|
|
1605
1482
|
var M2 = ke2();
|
|
1606
1483
|
function ke2() {
|
|
1607
|
-
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: (
|
|
1608
|
-
let y =
|
|
1609
|
-
return a.dynamic[y] && a.dynamic[y](
|
|
1484
|
+
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: (l2) => ({ timeZoneName: l2.slice(4) }), hrc: (l2) => ({ hourCycle: `h${l2.slice(4)}` }), ds: (l2) => ({ dateStyle: l2.slice(3) }), ts: (l2) => ({ timeStyle: l2.slice(3) }), tz: (l2) => ({ timeZone: l2.slice(3) }), e: (l2) => ({ era: l2.slice(2) }), l: (l2) => ({ locale: l2.slice(2) }) } }, o = { ...a, retrieveDyn(l2) {
|
|
1485
|
+
let y = l2?.slice(0, l2.indexOf(":"));
|
|
1486
|
+
return a.dynamic[y] && a.dynamic[y](l2);
|
|
1610
1487
|
}, get re() {
|
|
1611
1488
|
return new RegExp(`\\b(${Object.keys(a.fixed).join("|")})\\b`, "g");
|
|
1612
|
-
} }, s = (
|
|
1613
|
-
let h2 = ` ${
|
|
1489
|
+
} }, s = (l2 = "dtf", y = 0) => {
|
|
1490
|
+
let h2 = ` ${l2.replace(/(?<=\{)(.+?)(?=})/g, (d) => `[${y++}]`).replace(/[{}]/g, "").trim()} `, D2 = l2.match(/(?<=\{)(.+?)(?=})/g) || [];
|
|
1614
1491
|
return { get texts() {
|
|
1615
1492
|
return D2;
|
|
1616
1493
|
}, formatString(d) {
|
|
@@ -1621,17 +1498,17 @@ ${r}`), g2;
|
|
|
1621
1498
|
return h2;
|
|
1622
1499
|
}, get units() {
|
|
1623
1500
|
return h2.match(o.re) || [];
|
|
1624
|
-
}, finalize(d = "", Z2 = "",
|
|
1625
|
-
return h2.replace(/~([\d+]?)/g, "$1").replace(/dtf/, d).replace(/era/,
|
|
1501
|
+
}, finalize(d = "", Z2 = "", b = "", $2 = "") {
|
|
1502
|
+
return h2.replace(/~([\d+]?)/g, "$1").replace(/dtf/, d).replace(/era/, b).replace(/dp\b|~dp\b/, Z2).replace(/yn\b/, $2).replace(/\[(\d+?)]/g, (w, Fe2) => D2[Fe2].trim()).trim();
|
|
1626
1503
|
} };
|
|
1627
|
-
}, u2 = (
|
|
1628
|
-
let D2 = c(...u2(h2).split(",")), d = Intl.DateTimeFormat(D2.locale, D2).format(
|
|
1504
|
+
}, u2 = (l2) => l2.replace(/\s+/g, ""), c = (...l2) => l2?.reduce((y, h2) => ({ ...y, ...o.retrieveDyn(h2) || o.fixed[h2] }), o.fixed.dl), i = (l2, y, h2) => {
|
|
1505
|
+
let D2 = c(...u2(h2).split(",")), d = Intl.DateTimeFormat(D2.locale, D2).format(l2);
|
|
1629
1506
|
return y.finalize(d);
|
|
1630
|
-
}, m = (
|
|
1631
|
-
let D2 = c(...y.units.concat(u2(h2).split(",")).flat()), d = { ...o.fixed }, Z2 = ($
|
|
1632
|
-
return d.ms = D2.fractionalSecondDigits ? d.msp : d.ms, d.yyyy =
|
|
1507
|
+
}, m = (l2, y, h2, D2) => l2.toLocaleString(y, { timeZone: h2, month: D2 ? t : n }), T2 = (l2, y, h2) => {
|
|
1508
|
+
let D2 = c(...y.units.concat(u2(h2).split(",")).flat()), d = { ...o.fixed }, Z2 = ($2, w) => D2[$2] === "numeric" && w.startsWith("0") ? w.slice(1) : w, b = Intl.DateTimeFormat(D2.locale, D2).formatToParts(l2).reduce(($2, w) => w.type === "literal" && /[ ,/-]/.test(w.value) ? $2 : { ...$2, [w.type]: Z2(w.type, w.value) }, {});
|
|
1509
|
+
return d.ms = D2.fractionalSecondDigits ? d.msp : d.ms, d.yyyy = b.relatedYear ? d.ry : d.yyyy, y.formatStr = y.formatStr.replace(o.re, ($2) => /^(M|MM)$/.test($2) ? m(l2, D2.locale, D2.timeZone, /^M$/.test($2)) : b[Object.keys(d[$2]).shift()] || $2), y.finalize(void 0, b.dayPeriod, b.era, b.yearName);
|
|
1633
1510
|
};
|
|
1634
|
-
return (
|
|
1511
|
+
return (l2, y, h2 = "l:default") => /ds:|ts:/.test(h2) ? i(l2, s(void 0), h2) : T2(l2, s(y || void 0), h2);
|
|
1635
1512
|
}
|
|
1636
1513
|
var le2 = Ce2;
|
|
1637
1514
|
function Ce2() {
|
|
@@ -1654,14 +1531,14 @@ ${r}`), g2;
|
|
|
1654
1531
|
return function({ start: t, end: a, diffs: o = {} } = {}) {
|
|
1655
1532
|
let s = e(t, a), u2 = a > t ? "+" : "-";
|
|
1656
1533
|
if (s.error) return s;
|
|
1657
|
-
let c = Math.abs(t - a), i = new Date(c), m = i.getUTCFullYear() - 1970,
|
|
1658
|
-
o = { ...o, fromUTC: t, toUTC: a, sign: "", years: m, months:
|
|
1659
|
-
let
|
|
1660
|
-
return o.clean !== "Dates are equal" && (o.sign = u2, o.jsPeriod = `${u2}P${m > 0 ? `${m}Y` : ""}${
|
|
1534
|
+
let c = Math.abs(t - a), i = new Date(c), m = i.getUTCFullYear() - 1970, T2 = i.getUTCMonth(), l2 = i.getUTCDate() - 1, y = l2 % 7, h2 = Math.floor(l2 / 7), D2 = i.getUTCHours(), d = i.getUTCMinutes(), Z2 = i.getUTCSeconds(), b = i.getUTCMilliseconds(), $2 = Math.floor(c / 864e5);
|
|
1535
|
+
o = { ...o, fromUTC: t, toUTC: a, sign: "", years: m, months: T2, days: l2, hours: D2, minutes: d, seconds: Z2, milliseconds: b, diffInDays: $2 }, o.full = r({ values: o, full: true }), o.clean = r({ values: o }), o.equalDates = o.clean === "Dates are equal";
|
|
1536
|
+
let w = D2 + d + Z2 > 0 ? "T" : "";
|
|
1537
|
+
return o.clean !== "Dates are equal" && (o.sign = u2, o.jsPeriod = `${u2}P${m > 0 ? `${m}Y` : ""}${T2 > 0 ? `${T2}M` : ""}${h2 > 0 ? `${h2}W` : ""}${y > 0 ? `${y}D` : ""}${w}${D2 > 0 ? `${D2}H` : ""}${d > 0 ? `${d}M` : ""}${Z2 > 0 ? `${Z2}S` : ""}`, o.ISOPeriod = `P${m > 0 ? `${m}Y` : ""}${T2 > 0 ? `${T2}M` : ""}${l2 > 0 ? `${l2}D` : ""}${w}${D2 > 0 ? `${D2}H` : ""}${d > 0 ? `${d}M` : ""}${Z2 > 0 ? `${Z2}S` : ""}`), o;
|
|
1661
1538
|
};
|
|
1662
1539
|
function n() {
|
|
1663
|
-
let t = (...i) => (m) => i.reduce((
|
|
1664
|
-
return t(({ values: i, full: m }) => [Object.entries(i).filter(([
|
|
1540
|
+
let t = (...i) => (m) => i.reduce((T2, l2) => l2(T2), m), a = (i, m) => i === 1 ? m.slice(0, -1) : m;
|
|
1541
|
+
return t(({ values: i, full: m }) => [Object.entries(i).filter(([T2]) => /^(years|month|days|hours|minutes|seconds)/i.test(T2)), m], ([i, m]) => m ? i : i.filter(([, T2]) => m ? +T2 : T2 > 0), (i) => i.reduce((m, [T2, l2]) => [...m, `${l2} ${a(l2, T2)}`], []), (i) => i.length < 1 ? "Dates are equal" : `${i.slice(0, -1).join(", ")}${i.length > 1 ? " and " : ""}${i.slice(-1).shift()}`);
|
|
1665
1542
|
}
|
|
1666
1543
|
}
|
|
1667
1544
|
var ie2 = Ae2;
|
|
@@ -1686,8 +1563,8 @@ ${r}`), g2;
|
|
|
1686
1563
|
}), t;
|
|
1687
1564
|
};
|
|
1688
1565
|
}
|
|
1689
|
-
var
|
|
1690
|
-
var
|
|
1566
|
+
var ge2 = le2();
|
|
1567
|
+
var ye2 = Ye2();
|
|
1691
1568
|
var N2 = ie2();
|
|
1692
1569
|
var We2 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
1693
1570
|
var he2 = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
|
|
@@ -1716,7 +1593,7 @@ ${r}`), g2;
|
|
|
1716
1593
|
return n = (n || "").startsWith("+") ? `${t.localeInfo.formatOptions},${n.slice(1)}` : n || t.localeInfo.formatOptions, M2(t, r, n);
|
|
1717
1594
|
}
|
|
1718
1595
|
function Te2(e, r) {
|
|
1719
|
-
let n =
|
|
1596
|
+
let n = ge2({ start: e, end: r || e });
|
|
1720
1597
|
return parseInt(`${n.sign}${n.diffInDays}`);
|
|
1721
1598
|
}
|
|
1722
1599
|
function G2(e, r = false) {
|
|
@@ -1752,11 +1629,11 @@ ${r}`), g2;
|
|
|
1752
1629
|
}
|
|
1753
1630
|
function xe2(e, r) {
|
|
1754
1631
|
let n = e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000", t = r.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000";
|
|
1755
|
-
return n =
|
|
1632
|
+
return n = A(n.slice(0, 3) + ":" + n.slice(-2), true), t = A(t.slice(0, 3) + ":" + t.slice(-2), true), [-n[0] + t[0], -n[1] + t[1]].map((a) => n[0] < 0 ? -a : a);
|
|
1756
1633
|
}
|
|
1757
1634
|
function R2({ start: e, end: r } = {}) {
|
|
1758
1635
|
r || (r = e.clone), r?.clone || (r = f(r, { timeZone: e.timeZone })), e = f(fe2(e, e.timeZone), { timeZone: e.timeZone }), r = f(fe2(r, r.timeZone), { timeZone: r.timeZone });
|
|
1759
|
-
let n =
|
|
1636
|
+
let n = ge2({ start: e, end: r, diffs: { timeZoneStart: e.timeZone, timeZoneEnd: r.timeZone } }), t = xe2(r, e), a = n.sign.startsWith("-") ? "ahead of" : "behind", [o, s] = t.map((i) => Math.abs(i)), [u2, c] = [`${o} ${C2(o, "hour")}`, `${s} ${C2(s, "minute")}`];
|
|
1760
1637
|
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;
|
|
1761
1638
|
}
|
|
1762
1639
|
function X2(e, r) {
|
|
@@ -1767,25 +1644,25 @@ ${r}`), g2;
|
|
|
1767
1644
|
function ce2(e, r = 2) {
|
|
1768
1645
|
return `${e}`.padStart(r, "0");
|
|
1769
1646
|
}
|
|
1770
|
-
function
|
|
1647
|
+
function C2(e, r) {
|
|
1771
1648
|
return `${r}${e > 1 || e === 0 ? "s" : ""}`;
|
|
1772
1649
|
}
|
|
1773
1650
|
function je2(e) {
|
|
1774
1651
|
if (/00:00/.test(e)) return "no time diffence to";
|
|
1775
|
-
let r = e.slice(1).split(":").map(Number), [n, t] = r, a =
|
|
1652
|
+
let r = e.slice(1).split(":").map(Number), [n, t] = r, a = C2(n, "hour"), o = C2(t, "minute"), s = e.startsWith("+");
|
|
1776
1653
|
return t > 0 ? `${n} ${a} and ${t} ${o} ${s ? "ahead of" : "behind"}` : `${n} ${a} ${s ? "ahead of" : "behind"}`;
|
|
1777
1654
|
}
|
|
1778
1655
|
function me2(e, r, n) {
|
|
1779
1656
|
return e.clone.format(r, n || e.localeInfo.formatOptions);
|
|
1780
1657
|
}
|
|
1781
|
-
function
|
|
1658
|
+
function pe2(e, { withFormat: r, withFormatOptions: n, local: t = false } = {}) {
|
|
1782
1659
|
if (r) return t ? me2(e, r, $D.localeInformation.formatOptions) : me2(e, r, n);
|
|
1783
1660
|
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)`;
|
|
1784
1661
|
return a.format(u2, o + ",tzn:long, hrc:23");
|
|
1785
1662
|
}
|
|
1786
1663
|
function ee2(e, r = false) {
|
|
1787
1664
|
let n = Intl.DateTimeFormat("en", { timeZone: r ? e.timeZone : g.timeZone, weekday: "short" });
|
|
1788
|
-
return
|
|
1665
|
+
return ye2(n.format(e));
|
|
1789
1666
|
}
|
|
1790
1667
|
function $e2(e) {
|
|
1791
1668
|
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}`), i = 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: i, hasDST: t.hasDST, DSTActive: t.DSTActive, offsetFromRemote: a.offset, string: t.toString() } }, offset: { fromUTC: e.UTC.offsetFrom(e).offsetText } };
|
|
@@ -1806,7 +1683,7 @@ ${r}`), g2;
|
|
|
1806
1683
|
}
|
|
1807
1684
|
function x(e, { day: r, next: n = false, preserveTodayWhenEqual: t = false } = {}) {
|
|
1808
1685
|
r = r?.toLowerCase() || "-";
|
|
1809
|
-
let a =
|
|
1686
|
+
let a = ye2(r);
|
|
1810
1687
|
if (a < 0) return console.error(`[TickTock instance].next/previous invalid day value ${r}`), e.clone;
|
|
1811
1688
|
let o = n ? 1 : -1, s = f(new Date(...e.dateTimeValues), e.localeInfo);
|
|
1812
1689
|
return t && a === s.day ? s : Pe2(s.addDays(n ? 1 : -1), a, o);
|
|
@@ -1849,7 +1726,7 @@ ${r}`), g2;
|
|
|
1849
1726
|
return r < 0 ? he2.indexOf(e) : r;
|
|
1850
1727
|
};
|
|
1851
1728
|
}
|
|
1852
|
-
function
|
|
1729
|
+
function A(e) {
|
|
1853
1730
|
let r = e.slice(1).split(/[-:]/).map(Number), n = e.startsWith("-");
|
|
1854
1731
|
return r = r.map((t) => n ? -t : t), r;
|
|
1855
1732
|
}
|
|
@@ -1898,7 +1775,7 @@ ${r}`), g2;
|
|
|
1898
1775
|
let t = r.valueOf();
|
|
1899
1776
|
return r.setMonth(0, 1), r.getDay() !== 4 && r.setMonth(0, 1 + (4 - r.getDay() + 7) % 7), 1 + Math.ceil((t - r) / 6048e5);
|
|
1900
1777
|
}
|
|
1901
|
-
var
|
|
1778
|
+
var E2 = Ee2;
|
|
1902
1779
|
function Ee2({ localeInfo: e, customMethods: r, dateValue: n } = {}) {
|
|
1903
1780
|
let t, a = { add(...o) {
|
|
1904
1781
|
return H2(t, ...o);
|
|
@@ -1943,7 +1820,7 @@ ${r}`), g2;
|
|
|
1943
1820
|
}, toArray(o = false) {
|
|
1944
1821
|
return O2(t, o);
|
|
1945
1822
|
}, toString({ template: o, formatOptions: s, local: u2 } = {}) {
|
|
1946
|
-
return
|
|
1823
|
+
return pe2(t, { withFormat: o, withFormatOptions: s, local: u2 });
|
|
1947
1824
|
}, values(o = false) {
|
|
1948
1825
|
return o ? t.dateTime : t.zoneDateTime;
|
|
1949
1826
|
}, zoneFormat(o, s) {
|
|
@@ -2168,8 +2045,8 @@ ${r}`), g2;
|
|
|
2168
2045
|
}
|
|
2169
2046
|
}
|
|
2170
2047
|
function Ge2({ timeZoneDate: e, timeZoneID: r, userTimeZoneID: n } = {}) {
|
|
2171
|
-
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, [i, m] =
|
|
2172
|
-
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(/\//, "_")]:
|
|
2048
|
+
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, [i, m] = A(c, true), T2 = s.clone.add(`${i} hours, ${m} minutes`), y = u2.equalDates ? "No difference" : `Time offset ${c}: ${a.timeZone} is ${u2.clean} ${i < 0 ? "behind" : "ahead of"} ${t.timeZone}`;
|
|
2049
|
+
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(/\//, "_")]: T2.toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }) } };
|
|
2173
2050
|
}
|
|
2174
2051
|
function S(e) {
|
|
2175
2052
|
return !Number.isNaN(parseInt(e));
|
|
@@ -2255,7 +2132,7 @@ ${r}`), g2;
|
|
|
2255
2132
|
return k2(n, 31);
|
|
2256
2133
|
} }, keys: { get() {
|
|
2257
2134
|
let n = Object.fromEntries(Object.entries(r).filter(([a, o]) => o.enumerable === true));
|
|
2258
|
-
return [...Object.keys(
|
|
2135
|
+
return [...Object.keys(E2()), ...Object.keys(ue2()), ...Object.keys(n)].sort((a, o) => a.localeCompare(o));
|
|
2259
2136
|
} } }), e;
|
|
2260
2137
|
}
|
|
2261
2138
|
var Oe2 = {};
|
|
@@ -2263,7 +2140,7 @@ ${r}`), g2;
|
|
|
2263
2140
|
function Je2(e, r) {
|
|
2264
2141
|
if (e?.localeInfo) return e.clone;
|
|
2265
2142
|
let n = e?.locale || e?.timeZone || e?.tz || e?.l;
|
|
2266
|
-
return
|
|
2143
|
+
return E2({ localeInfo: p(n ? e : r), dateValue: new Date(n ? Date.now() : ve2(e)), customMethods: Oe2 });
|
|
2267
2144
|
}
|
|
2268
2145
|
|
|
2269
2146
|
// ../Resource/Externals/REHelper.js
|
|
@@ -2275,7 +2152,7 @@ ${r}`), g2;
|
|
|
2275
2152
|
);
|
|
2276
2153
|
}
|
|
2277
2154
|
function createRegExpStringFromInput(regExStr, ...cleanedArgs) {
|
|
2278
|
-
return !hasLength(cleanedArgs) ? regExStr.raw.join(``) : regExStr.raw.reduce((a,
|
|
2155
|
+
return !hasLength(cleanedArgs) ? regExStr.raw.join(``) : regExStr.raw.reduce((a, v4, i) => a.concat(cleanedArgs[i - 1] || ``).concat(v4), ``);
|
|
2279
2156
|
}
|
|
2280
2157
|
function maybeFlags(...args) {
|
|
2281
2158
|
const flags = cleanupFlags(getFlags(args.at(-1)));
|
|
@@ -2360,222 +2237,78 @@ ${r}`), g2;
|
|
|
2360
2237
|
}
|
|
2361
2238
|
}
|
|
2362
2239
|
function cleanup(str) {
|
|
2363
|
-
return str.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm, ``).replace(/\s/g, ``).trim().replace(/<!([^>]\d+)>/g, (a,
|
|
2240
|
+
return str.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm, ``).replace(/\s/g, ``).trim().replace(/<!([^>]\d+)>/g, (a, b) => String.fromCharCode(+b) ?? a);
|
|
2364
2241
|
}
|
|
2365
2242
|
|
|
2366
2243
|
// ../Resource/Externals/splat.min.js
|
|
2367
|
-
var
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
return m(c, u2[0]);
|
|
2376
|
-
default:
|
|
2377
|
-
return u2.length > 1 ? g2(l, ...u2) : N3(c, ...u2);
|
|
2378
|
-
}
|
|
2379
|
-
}
|
|
2380
|
-
}
|
|
2381
|
-
function _3(i, a) {
|
|
2382
|
-
let { SymbolAndCustomProxyFactory: m, maybeFactory: g2, WrapAnyFactory: P3, verifyNothingness: d, determineType: x2 } = w2(i, e), { xProxy: N3, addSymbolicExtensions: y } = m(i, e, a), [S2, O3] = [g2(), P3(i, e)];
|
|
2383
|
-
return Object.freeze({ shouldbeIsSingleObject: c, ISOneOf: u2, isExcept: f2, verifyNothingness: d, xProxy: N3, determineType: x2, addSymbolicExtensions: y, maybe: S2, $Wrap: O3 });
|
|
2384
|
-
function e(r) {
|
|
2385
|
-
return r?.[Symbol.proxy] ?? i(r);
|
|
2386
|
-
}
|
|
2387
|
-
function c(r, t) {
|
|
2388
|
-
switch (true) {
|
|
2389
|
-
case "defaultValue" in t:
|
|
2390
|
-
return l(r, t);
|
|
2391
|
-
case "notTypes" in t:
|
|
2392
|
-
return f2(r, t);
|
|
2393
|
-
default:
|
|
2394
|
-
return i(r, ...[t.isTypes].flat());
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
|
-
function u2(r, ...t) {
|
|
2398
|
-
return t.some((n) => i(r, n));
|
|
2399
|
-
}
|
|
2400
|
-
function l(r, { defaultValue: t, isTypes: n = [void 0], notTypes: o } = {}) {
|
|
2401
|
-
return n = n?.constructor !== Array ? [n] : n, o = o && o?.constructor !== Array ? [o] : [], o.length < 1 ? i(r, ...n) ? r : t : f2(r, { isTypes: n, notTypes: o }) ? r : t;
|
|
2402
|
-
}
|
|
2403
|
-
function f2(r, { isTypes: t = [void 0], notTypes: n = [void 0] } = {}) {
|
|
2404
|
-
return t = t?.constructor !== Array ? [t] : t, n = n?.constructor !== Array ? [n] : n, i(r, ...t) && !i(r, ...n);
|
|
2405
|
-
}
|
|
2406
|
-
}
|
|
2407
|
-
function w2() {
|
|
2408
|
-
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 (" };
|
|
2409
|
-
return Object.freeze({ SymbolAndCustomProxyFactory: g2, maybeFactory: l, WrapAnyFactory: u2, verifyNothingness: f2, determineType: y });
|
|
2410
|
-
function m(r, t) {
|
|
2411
|
-
Symbol.is || (Symbol.is = Symbol.for(i.IS), Symbol.type = Symbol.for(i.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
2412
|
-
return t(this);
|
|
2413
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...n) {
|
|
2414
|
-
return r(this, ...n);
|
|
2415
|
-
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(n) {
|
|
2416
|
-
return t(n);
|
|
2417
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(n, ...o) {
|
|
2418
|
-
return r(n, ...o);
|
|
2419
|
-
}, enumerable: false, configurable: false } }));
|
|
2420
|
-
}
|
|
2421
|
-
function g2(r, t, n) {
|
|
2422
|
-
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(i.IS_SYMBOL)), { xProxy: x2(), addSymbolicExtensions: () => m(r, t) };
|
|
2423
|
-
}
|
|
2424
|
-
function P3(r) {
|
|
2425
|
-
return (j3(r, true) ? { name: "unknown" } : Object.getPrototypeOf(r)?.constructor).name;
|
|
2426
|
-
}
|
|
2427
|
-
function d(r, t) {
|
|
2428
|
-
return Proxy = new r(r, { construct(n, o) {
|
|
2429
|
-
let s = new n(...o);
|
|
2430
|
-
return Object.defineProperty(s, t, { value: `${a.PROXY_PREFIX}${P3(o[0])})` }), s;
|
|
2431
|
-
} }), Proxy;
|
|
2432
|
-
}
|
|
2433
|
-
function x2() {
|
|
2434
|
-
Symbol.proxy || (Symbol.proxy = Symbol.for(i.PROXY));
|
|
2435
|
-
let r = Proxy;
|
|
2436
|
-
return { native() {
|
|
2437
|
-
Proxy = r;
|
|
2438
|
-
}, custom() {
|
|
2439
|
-
Proxy = d(r, Symbol.proxy);
|
|
2440
|
-
} };
|
|
2441
|
-
}
|
|
2442
|
-
function N3(r, ...t) {
|
|
2443
|
-
let n = t.length < 1, o = r == null;
|
|
2444
|
-
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]) };
|
|
2445
|
-
}
|
|
2446
|
-
function y(r, ...t) {
|
|
2447
|
-
let { noInput: n, noShouldbe: o, compareTo: s, inputCTOR: A3, isNaN: F3, isInfinity: v3, shouldBeFirstElementIsNothing: p2 } = N3(r, ...t);
|
|
2448
|
-
switch (t = t.length && t[0], true) {
|
|
2449
|
-
case p2:
|
|
2450
|
-
return String(r) === String(s);
|
|
2451
|
-
case (r?.[Symbol.proxy] && o):
|
|
2452
|
-
return r[Symbol.proxy];
|
|
2453
|
-
case F3:
|
|
2454
|
-
return o ? a.NAN : String(s) === String(r);
|
|
2455
|
-
case v3:
|
|
2456
|
-
return o ? a.INFINITY : String(s) === String(r);
|
|
2457
|
-
case n:
|
|
2458
|
-
return o ? String(r) : String(s) === String(r);
|
|
2459
|
-
case A3 === Boolean:
|
|
2460
|
-
return o ? a.BOOLEAN : A3 === t;
|
|
2461
|
-
default:
|
|
2462
|
-
return O3(r, t, o, S2(r, A3));
|
|
2463
|
-
}
|
|
2464
|
-
}
|
|
2465
|
-
function S2(r, t) {
|
|
2466
|
-
switch (true) {
|
|
2467
|
-
case r === 0:
|
|
2468
|
-
return Number;
|
|
2469
|
-
case r === "":
|
|
2470
|
-
return String;
|
|
2471
|
-
case !r:
|
|
2472
|
-
return { name: String(r) };
|
|
2473
|
-
default:
|
|
2474
|
-
return t;
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
function O3(r, t, n, o) {
|
|
2478
|
-
switch (true) {
|
|
2479
|
-
case (!n && t === r || r?.[Symbol.proxy] && t === Proxy):
|
|
2480
|
-
return true;
|
|
2481
|
-
case String(t) === a.NAN:
|
|
2482
|
-
return String(r) === a.NAN;
|
|
2483
|
-
case (r?.[Symbol.toStringTag] && typeof t == "string"):
|
|
2484
|
-
return String(t) === r[Symbol.toStringTag];
|
|
2485
|
-
default:
|
|
2486
|
-
return t ? c(r, t, o) : e(r, o);
|
|
2487
|
-
}
|
|
2488
|
-
}
|
|
2489
|
-
function e(r, t) {
|
|
2490
|
-
return (r?.[Symbol.toStringTag] ?? r?.prototype?.[Symbol.toStringTag]) || t?.name || String(t);
|
|
2491
|
-
}
|
|
2492
|
-
function c(r, t, n) {
|
|
2493
|
-
return E2({ trial: (o) => r instanceof t }) || t === n || t === Object.getPrototypeOf(n) || `${t?.name}` === n?.name;
|
|
2494
|
-
}
|
|
2495
|
-
function u2(r, t) {
|
|
2496
|
-
return function(n) {
|
|
2497
|
-
let o = { get value() {
|
|
2498
|
-
return n;
|
|
2499
|
-
}, is(...s) {
|
|
2500
|
-
return r(n, ...s);
|
|
2501
|
-
}, get type() {
|
|
2502
|
-
return t(n);
|
|
2503
|
-
} };
|
|
2504
|
-
return Object[Symbol.type] && Object.defineProperties(o, { [Symbol.type]: { get() {
|
|
2505
|
-
return t(n);
|
|
2506
|
-
} }, [Symbol.is]: { value(...s) {
|
|
2507
|
-
return r(n, ...s);
|
|
2508
|
-
} } }), Object.freeze(o);
|
|
2509
|
-
};
|
|
2510
|
-
}
|
|
2511
|
-
function l() {
|
|
2512
|
-
let r = (t) => {
|
|
2513
|
-
};
|
|
2514
|
-
return function({ trial: t, whenError: n = r } = {}) {
|
|
2515
|
-
try {
|
|
2516
|
-
return t();
|
|
2517
|
-
} catch (o) {
|
|
2518
|
-
return n(o);
|
|
2519
|
-
}
|
|
2520
|
-
};
|
|
2521
|
-
}
|
|
2522
|
-
function f2(r, t = false) {
|
|
2523
|
-
let n = r == null;
|
|
2524
|
-
return n = t ? n || b(r, 1 / 0) || b(r, NaN) : n, n;
|
|
2525
|
-
}
|
|
2526
|
-
}
|
|
2527
|
-
var C2 = I3();
|
|
2528
|
-
var $2 = I3("");
|
|
2529
|
-
function I3(i, a = {}) {
|
|
2530
|
-
let { useSymbolicExtensions: m } = a;
|
|
2531
|
-
return i = b(i, String, Number) ? String(i) : void 0, m && L3(), function(e, ...c) {
|
|
2532
|
-
return O3(e, S2(c));
|
|
2244
|
+
var u = h();
|
|
2245
|
+
var v3 = p2();
|
|
2246
|
+
var N3 = p2("");
|
|
2247
|
+
window.IS = u;
|
|
2248
|
+
function p2(r, f2 = {}) {
|
|
2249
|
+
let { useSymbolicExtensions: a } = f2;
|
|
2250
|
+
return r = u(r, String, Number) ? String(r) : void 0, a && O3(), function(n, ...t) {
|
|
2251
|
+
return d(n, y(t));
|
|
2533
2252
|
};
|
|
2534
|
-
function
|
|
2535
|
-
return
|
|
2253
|
+
function s(n, t) {
|
|
2254
|
+
return t && u(r, String, Number) ? String(r) : `{${n}}`;
|
|
2536
2255
|
}
|
|
2537
|
-
function
|
|
2538
|
-
let
|
|
2539
|
-
return
|
|
2256
|
+
function e(n, t) {
|
|
2257
|
+
let i = n in t;
|
|
2258
|
+
return i && u(t[n], String, Number) ? String(t[n]) : s(n, i);
|
|
2540
2259
|
}
|
|
2541
|
-
function
|
|
2542
|
-
return (...
|
|
2543
|
-
let
|
|
2544
|
-
return
|
|
2260
|
+
function o(n) {
|
|
2261
|
+
return (...t) => {
|
|
2262
|
+
let i = t.find((c) => c.key);
|
|
2263
|
+
return e(i ? i.key : "_", n);
|
|
2545
2264
|
};
|
|
2546
2265
|
}
|
|
2547
|
-
function
|
|
2548
|
-
return
|
|
2266
|
+
function l2(n, t) {
|
|
2267
|
+
return n.replace(/\{(?<key>[a-z_\d]+)}/gim, o(t));
|
|
2549
2268
|
}
|
|
2550
|
-
function
|
|
2551
|
-
let
|
|
2552
|
-
return Object.entries(
|
|
2553
|
-
|
|
2554
|
-
}),
|
|
2269
|
+
function b(n) {
|
|
2270
|
+
let t = [];
|
|
2271
|
+
return Object.entries(n).forEach(([i, c]) => {
|
|
2272
|
+
c.forEach((m, S2) => (t[S2] ??= {}, t[S2][i] = m));
|
|
2273
|
+
}), t;
|
|
2555
2274
|
}
|
|
2556
|
-
function
|
|
2557
|
-
return
|
|
2275
|
+
function g2(n) {
|
|
2276
|
+
return n.length === 1 && Object.values(n[0]).every(Array.isArray);
|
|
2558
2277
|
}
|
|
2559
|
-
function
|
|
2560
|
-
return
|
|
2278
|
+
function y(n) {
|
|
2279
|
+
return g2(n) ? b(n[0]) : n;
|
|
2561
2280
|
}
|
|
2562
|
-
function
|
|
2563
|
-
let
|
|
2564
|
-
return
|
|
2281
|
+
function d(n, t) {
|
|
2282
|
+
let i = t?.length ? t.filter((c) => u(c, Object)).map((c, m) => l2(n, { ...c, index: m + 1 })).join("") : n;
|
|
2283
|
+
return u(r, void 0) ? i : i.replace(/\{[a-z_\d].+\}/gim, String(r));
|
|
2565
2284
|
}
|
|
2566
2285
|
}
|
|
2567
|
-
function
|
|
2568
|
-
return String.prototype[Symbol.for("interpolate")] || Object.defineProperties(String.prototype, { [Symbol.for("interpolate")]: { value(...
|
|
2569
|
-
return
|
|
2570
|
-
} }, [Symbol.for("interpolate$")]: { value(...
|
|
2571
|
-
return
|
|
2286
|
+
function O3() {
|
|
2287
|
+
return String.prototype[Symbol.for("interpolate")] || Object.defineProperties(String.prototype, { [Symbol.for("interpolate")]: { value(...r) {
|
|
2288
|
+
return v3(this, ...r);
|
|
2289
|
+
} }, [Symbol.for("interpolate$")]: { value(...r) {
|
|
2290
|
+
return N3(this, ...r);
|
|
2572
2291
|
} } }), [Symbol.for("interpolate"), Symbol.for("interpolate$")];
|
|
2573
2292
|
}
|
|
2293
|
+
function h() {
|
|
2294
|
+
let r = new Intl.Collator("en", { sensitivity: "base" }), f2 = (e) => typeof e == "function" ? e?.name || e?.constructor?.name : "noCTOR";
|
|
2295
|
+
function a(e, o) {
|
|
2296
|
+
return o === Number && (Number.isNaN(e) || !Number.isFinite(e)) ? false : r.compare(Object.prototype.toString.call(e), `[object ${f2(o)}]`) === 0 || e?.name === o?.name;
|
|
2297
|
+
}
|
|
2298
|
+
function s(e, ...o) {
|
|
2299
|
+
if (o.length > 1) {
|
|
2300
|
+
for (let l2 of o) if (a(e, l2)) return true;
|
|
2301
|
+
return false;
|
|
2302
|
+
}
|
|
2303
|
+
return a(e, o?.shift());
|
|
2304
|
+
}
|
|
2305
|
+
return s;
|
|
2306
|
+
}
|
|
2574
2307
|
|
|
2575
2308
|
// ../index.js
|
|
2576
2309
|
setDefaultStyling();
|
|
2577
2310
|
fixSBLinks2TopProblem();
|
|
2578
|
-
var splatModule = { interpolate:
|
|
2311
|
+
var splatModule = { interpolate: v3, interpolateClear: N3, addSymbolicStringExtensions: O3 };
|
|
2579
2312
|
function fixSBLinks2TopProblem() {
|
|
2580
2313
|
/stackblitz/i.test(location.href) && console.info(`\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it.`);
|
|
2581
2314
|
document.addEventListener(`click`, (evt) => {
|
|
@@ -2589,20 +2322,20 @@ ${r}`), g2;
|
|
|
2589
2322
|
});
|
|
2590
2323
|
}
|
|
2591
2324
|
function logFactory(formatJSON = true) {
|
|
2592
|
-
const logContainer =
|
|
2325
|
+
const logContainer = hn(`<ul id="log2screen">`).first();
|
|
2593
2326
|
function logItem(top2 = false) {
|
|
2594
|
-
const where2PutIt = top2 ?
|
|
2327
|
+
const where2PutIt = top2 ? hn.at.start : hn.at.end;
|
|
2595
2328
|
return (content) => {
|
|
2596
2329
|
if (content?.isJQx) {
|
|
2597
|
-
return
|
|
2330
|
+
return hn.li(
|
|
2598
2331
|
content.data.get(`header`) ? { class: `head` } : ``,
|
|
2599
2332
|
content
|
|
2600
2333
|
).renderTo(logContainer, where2PutIt);
|
|
2601
2334
|
}
|
|
2602
|
-
content = !
|
|
2335
|
+
content = !hn.IS(content, String, Number, Symbol) ? tryJSON(content, formatJSON) : String(content);
|
|
2603
2336
|
const isHead = content.startsWith(`!!`);
|
|
2604
2337
|
content = isHead ? content.slice(2) : content;
|
|
2605
|
-
|
|
2338
|
+
hn.li(isHead ? { class: `head` } : ``, content).renderTo(logContainer, where2PutIt);
|
|
2606
2339
|
};
|
|
2607
2340
|
}
|
|
2608
2341
|
const [logLamda, logTopLambda] = [logItem(), logItem(true)];
|
|
@@ -2619,7 +2352,7 @@ ${r}`), g2;
|
|
|
2619
2352
|
}
|
|
2620
2353
|
}
|
|
2621
2354
|
function setDefaultStyling() {
|
|
2622
|
-
|
|
2355
|
+
hn.editCssRules(`li::marker{vertical-align:top;}`, `code{color:green;background-color:#eee;padding:2px;font-family:monospace;}`, `code.codeblock{display:block;padding:6px;border:1px solid #999;margin:0.5rem 0;background-color:#eee;white-space:pre-wrap;}`, `h3{marginTop:1.5rem;}`, `.thickBorder{border:5px solid green;borderWidth:5px;padding:0.5rem;display:inline-block;}`, `a.ExternalLink{text-decoration:none;color:rgb(0,0,238);background-color:#EEE;padding:3px;font-weight:bold;}`, `.cmmt{color:#888;}`, `.hidden{display:none;}`, `.attention{color:red; font-size:1.2em; font-weight:bold;}`, `#log2screen li{listStyle:'\\2713';paddingLeft:6px;margin:0.5rem 0 0 -1.2rem;font-family:monospace}`, `#log2screen li.head{list-style-type:none;font-weight:bold;margin-top:0.8rem;margin-bottom:-0.2rem;font-family:revert;}`, `.err{fontStyle:italic; color:red; }`, `a{text-decoration:none; font-weight:bold;}`, `a:hover{text-decoration:underline;}`, `a[target]:before,a.internalLink:before,a.externalLink:before{color:rgba(0,0,238,0.7);font-size:1.1rem;padding-right:2px;vertical-align:baseline;}`, `a[target="_blank"]:before,a.externalLink:before{content:'\\2197';}`, `a[data-top]:before,a.internalLink:before,a[target="_top"]:before{content:'\\21BA';}`);
|
|
2623
2356
|
}
|
|
2624
2357
|
return __toCommonJS(index_exports);
|
|
2625
2358
|
})();
|