dynamic-html-helpers 1.4.7 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Bundle/htmlhelpers.min.js +13 -12
- package/Bundle/htmlhelpers.min.js.map +7 -0
- package/Bundle/htmlhelpers.script.js +529 -488
- package/Bundle/htmlhelpers.script.js.map +7 -0
- package/Bundle/htmlhelpers.script.min.js +17 -17
- package/Resource/Externals/jqx.min.js +13 -12
- package/Resource/Externals/jqx.min.js.map +7 -0
- package/index.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
|
+
$: () => En,
|
|
26
26
|
$D: () => f,
|
|
27
27
|
logFactory: () => logFactory,
|
|
28
28
|
regexhelper: () => REHelper_default,
|
|
@@ -30,10 +30,10 @@ var HTMLHelpers = (() => {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
// ../Resource/Externals/jqx.min.js
|
|
33
|
-
var { IS: u, maybe:
|
|
34
|
-
function
|
|
35
|
-
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness:
|
|
36
|
-
return e && y(), { IS: b2, maybe: x2, $Wrap: d, isNothing:
|
|
33
|
+
var { IS: u, maybe: $, $Wrap: Lr, isNothing: ct, xProxy: He, addSymbolicExtensions: Me } = ft({ useSymbolicExtensions: false });
|
|
34
|
+
function ft(t = {}) {
|
|
35
|
+
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: l, xProxy: f2, determineType: S2, addSymbolicExtensions: y, maybe: x2, $Wrap: d } = dt(b2, e);
|
|
36
|
+
return e && y(), { IS: b2, maybe: x2, $Wrap: d, isNothing: l, xProxy: f2, addSymbolicExtensions: y };
|
|
37
37
|
function b2(m, ...h2) {
|
|
38
38
|
let g2 = typeof m == "symbol" ? Symbol.isSymbol : m;
|
|
39
39
|
switch (true) {
|
|
@@ -44,9 +44,9 @@ var HTMLHelpers = (() => {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness:
|
|
49
|
-
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness:
|
|
47
|
+
function dt(t, e) {
|
|
48
|
+
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: l, determineType: f2 } = mt(t, b2), { xProxy: S2, addSymbolicExtensions: y } = r(t, b2, e), [x2, d] = [n(), i(t, b2)];
|
|
49
|
+
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness: l, xProxy: S2, determineType: f2, addSymbolicExtensions: y, maybe: x2, $Wrap: d });
|
|
50
50
|
function b2(o) {
|
|
51
51
|
return o?.[Symbol.proxy] ?? t(o);
|
|
52
52
|
}
|
|
@@ -61,38 +61,38 @@ var HTMLHelpers = (() => {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
function h2(o, ...s) {
|
|
64
|
-
return s.some((
|
|
64
|
+
return s.some((a) => t(o, a));
|
|
65
65
|
}
|
|
66
|
-
function g2(o, { defaultValue: s, isTypes:
|
|
67
|
-
return
|
|
66
|
+
function g2(o, { defaultValue: s, isTypes: a = [void 0], notTypes: p2 } = {}) {
|
|
67
|
+
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;
|
|
68
68
|
}
|
|
69
|
-
function c(o, { isTypes: s = [void 0], notTypes:
|
|
70
|
-
return s = s?.constructor !== Array ? [s] : s,
|
|
69
|
+
function c(o, { isTypes: s = [void 0], notTypes: a = [void 0] } = {}) {
|
|
70
|
+
return s = s?.constructor !== Array ? [s] : s, a = a?.constructor !== Array ? [a] : a, t(o, ...s) && !t(o, ...a);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function mt() {
|
|
74
74
|
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" }, e = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" };
|
|
75
75
|
return Object.freeze({ SymbolAndCustomProxyFactory: n, maybeFactory: g2, WrapAnyFactory: h2, verifyNothingness: c, determineType: y });
|
|
76
76
|
function r(o, s) {
|
|
77
77
|
Symbol.is || (Symbol.is = Symbol.for(t.IS), Symbol.type = Symbol.for(t.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
78
78
|
return s(this);
|
|
79
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...
|
|
80
|
-
return o(this, ...
|
|
81
|
-
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(
|
|
82
|
-
return s(
|
|
83
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(
|
|
84
|
-
return o(
|
|
79
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...a) {
|
|
80
|
+
return o(this, ...a);
|
|
81
|
+
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(a) {
|
|
82
|
+
return s(a);
|
|
83
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(a, ...p2) {
|
|
84
|
+
return o(a, ...p2);
|
|
85
85
|
}, enumerable: false, configurable: false } }));
|
|
86
86
|
}
|
|
87
|
-
function n(o, s,
|
|
87
|
+
function n(o, s, a) {
|
|
88
88
|
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL)), { xProxy: f2(), addSymbolicExtensions: () => r(o, s) };
|
|
89
89
|
}
|
|
90
90
|
function i(o) {
|
|
91
|
-
return (
|
|
91
|
+
return (ct(o, true) ? { name: "unknown" } : Object.getPrototypeOf(o)?.constructor).name;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return Proxy = new o(o, { construct(
|
|
95
|
-
let E3 = new
|
|
93
|
+
function l(o, s) {
|
|
94
|
+
return Proxy = new o(o, { construct(a, p2) {
|
|
95
|
+
let E3 = new a(...p2);
|
|
96
96
|
return Object.defineProperty(E3, s, { value: `${e.PROXY_PREFIX}${i(p2[0])})` }), E3;
|
|
97
97
|
} }), Proxy;
|
|
98
98
|
}
|
|
@@ -102,30 +102,30 @@ var HTMLHelpers = (() => {
|
|
|
102
102
|
return { native() {
|
|
103
103
|
Proxy = o;
|
|
104
104
|
}, custom() {
|
|
105
|
-
Proxy =
|
|
105
|
+
Proxy = l(o, Symbol.proxy);
|
|
106
106
|
} };
|
|
107
107
|
}
|
|
108
108
|
function S2(o, ...s) {
|
|
109
|
-
let
|
|
110
|
-
return { noInput: p2, noShouldbe:
|
|
109
|
+
let a = s.length < 1, p2 = o == null;
|
|
110
|
+
return { noInput: p2, noShouldbe: a, compareTo: !a && s[0], inputCTOR: !p2 && (o?.constructor || Object.getPrototypeOf(o)?.constructor), isNaN: Number.isNaN(o) || $({ trial: (E3) => String(o) === e.NAN }), isInfinity: $({ trial: (E3) => String(o) }) === e.INFINITY, shouldBeFirstElementIsNothing: !a && c(s[0]) };
|
|
111
111
|
}
|
|
112
112
|
function y(o, ...s) {
|
|
113
|
-
let { noInput:
|
|
113
|
+
let { noInput: a, noShouldbe: p2, compareTo: E3, inputCTOR: C3, isNaN: me2, isInfinity: ge2, shouldBeFirstElementIsNothing: pe2 } = S2(o, ...s);
|
|
114
114
|
switch (s = s.length && s[0], true) {
|
|
115
|
-
case
|
|
115
|
+
case pe2:
|
|
116
116
|
return String(o) === String(E3);
|
|
117
117
|
case (o?.[Symbol.proxy] && p2):
|
|
118
118
|
return o[Symbol.proxy];
|
|
119
|
-
case
|
|
119
|
+
case me2:
|
|
120
120
|
return p2 ? e.NAN : String(E3) === String(o);
|
|
121
|
-
case
|
|
121
|
+
case ge2:
|
|
122
122
|
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
123
|
-
case
|
|
123
|
+
case a:
|
|
124
124
|
return p2 ? String(o) : String(E3) === String(o);
|
|
125
|
-
case
|
|
126
|
-
return p2 ? e.BOOLEAN :
|
|
125
|
+
case C3 === Boolean:
|
|
126
|
+
return p2 ? e.BOOLEAN : C3 === s;
|
|
127
127
|
default:
|
|
128
|
-
return d(o, s, p2, x2(o,
|
|
128
|
+
return d(o, s, p2, x2(o, C3));
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
function x2(o, s) {
|
|
@@ -140,9 +140,9 @@ var HTMLHelpers = (() => {
|
|
|
140
140
|
return s;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
function d(o, s,
|
|
143
|
+
function d(o, s, a, p2) {
|
|
144
144
|
switch (true) {
|
|
145
|
-
case (!
|
|
145
|
+
case (!a && s === o || o?.[Symbol.proxy] && s === Proxy):
|
|
146
146
|
return true;
|
|
147
147
|
case String(s) === e.NAN:
|
|
148
148
|
return String(o) === e.NAN;
|
|
@@ -155,135 +155,175 @@ var HTMLHelpers = (() => {
|
|
|
155
155
|
function b2(o, s) {
|
|
156
156
|
return (o?.[Symbol.toStringTag] ?? o?.prototype?.[Symbol.toStringTag]) || s?.name || String(s);
|
|
157
157
|
}
|
|
158
|
-
function m(o, s,
|
|
159
|
-
return
|
|
158
|
+
function m(o, s, a) {
|
|
159
|
+
return $({ trial: (p2) => o instanceof s }) || s === a || s === Object.getPrototypeOf(a) || `${s?.name}` === a?.name;
|
|
160
160
|
}
|
|
161
161
|
function h2(o, s) {
|
|
162
|
-
return function(
|
|
162
|
+
return function(a) {
|
|
163
163
|
let p2 = { get value() {
|
|
164
|
-
return
|
|
164
|
+
return a;
|
|
165
165
|
}, is(...E3) {
|
|
166
|
-
return o(
|
|
166
|
+
return o(a, ...E3);
|
|
167
167
|
}, get type() {
|
|
168
|
-
return s(
|
|
168
|
+
return s(a);
|
|
169
169
|
} };
|
|
170
170
|
return Object[Symbol.type] && Object.defineProperties(p2, { [Symbol.type]: { get() {
|
|
171
|
-
return s(
|
|
171
|
+
return s(a);
|
|
172
172
|
} }, [Symbol.is]: { value(...E3) {
|
|
173
|
-
return o(
|
|
173
|
+
return o(a, ...E3);
|
|
174
174
|
} } }), Object.freeze(p2);
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
177
|
function g2() {
|
|
178
178
|
let o = (s) => {
|
|
179
179
|
};
|
|
180
|
-
return function({ trial: s, whenError:
|
|
180
|
+
return function({ trial: s, whenError: a = o } = {}) {
|
|
181
181
|
try {
|
|
182
182
|
return s();
|
|
183
183
|
} catch (p2) {
|
|
184
|
-
return
|
|
184
|
+
return a(p2);
|
|
185
185
|
}
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
function c(o, s = false) {
|
|
189
|
-
let
|
|
190
|
-
return
|
|
189
|
+
let a = o == null;
|
|
190
|
+
return a = s ? a || u(o, 1 / 0) || u(o, NaN) : a, a;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
var
|
|
194
|
-
var R =
|
|
195
|
-
var J =
|
|
196
|
-
function
|
|
193
|
+
var Ie = yt();
|
|
194
|
+
var R = gt();
|
|
195
|
+
var J = pt();
|
|
196
|
+
function gt() {
|
|
197
197
|
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(",")) };
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function pt() {
|
|
200
200
|
return { a: true, area: true, audio: false, br: true, base: true, body: true, button: true, canvas: true, comment: true, dl: true, data: true, datalist: true, div: true, em: true, embed: false, fieldset: true, font: true, footer: true, form: false, hr: true, head: true, header: true, output: true, iframe: false, frameset: false, img: true, input: true, li: true, label: true, legend: true, link: true, map: true, mark: true, menu: true, media: true, meta: true, nav: true, meter: true, ol: true, object: false, optgroup: true, option: true, p: true, param: true, picture: true, pre: true, progress: false, quote: true, script: false, select: true, source: true, span: true, style: true, caption: true, td: true, col: true, table: true, tr: true, template: false, textarea: true, time: true, title: true, track: true, details: true, ul: true, video: true, del: true, ins: true, slot: true, blockquote: true, svg: true, dialog: true, summary: true, main: true, address: true, colgroup: true, tbody: true, tfoot: true, thead: true, th: true, dd: true, dt: true, figcaption: true, figure: true, i: true, b: true, code: true, h1: true, h2: true, h3: true, h4: true, abbr: true, bdo: true, dfn: true, kbd: true, q: true, rb: true, rp: true, rt: true, ruby: true, s: true, strike: true, samp: true, small: true, strong: true, sup: true, sub: true, u: true, var: true, wbr: true, nobr: true, tt: true, noscript: true };
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function yt() {
|
|
203
203
|
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
204
|
}
|
|
205
|
-
var
|
|
206
|
-
var
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
205
|
+
var De = { html: "innerHTML", text: "textContent", class: "className" };
|
|
206
|
+
var Q = {};
|
|
207
|
+
var k = {};
|
|
208
|
+
var Qe = (t) => {
|
|
209
|
+
console.error(`tinyDOM error: "${t}" is not a valid HTML tag`);
|
|
210
|
+
};
|
|
211
|
+
Me();
|
|
212
|
+
var B = bt();
|
|
213
|
+
function bt() {
|
|
214
|
+
return Object.freeze(new Proxy(Q, ke()));
|
|
215
|
+
}
|
|
216
|
+
function ke() {
|
|
217
|
+
return { get(t, e) {
|
|
218
|
+
let r = String(e);
|
|
210
219
|
switch (true) {
|
|
211
|
-
case
|
|
212
|
-
return
|
|
213
|
-
case
|
|
214
|
-
return
|
|
220
|
+
case r in t:
|
|
221
|
+
return t[r];
|
|
222
|
+
case Ct(r):
|
|
223
|
+
return Re({ tag: r, key: e });
|
|
215
224
|
default:
|
|
216
|
-
return
|
|
225
|
+
return Re({ tag: r, key: e, isError: true });
|
|
217
226
|
}
|
|
227
|
+
}, set(t, e, r) {
|
|
228
|
+
return e === "setError" && typeof r == "function" && (Qe = r), true;
|
|
218
229
|
}, enumerable: false, configurable: false };
|
|
219
|
-
return new Proxy({}, t);
|
|
220
230
|
}
|
|
221
|
-
function
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
231
|
+
function Re({ tag: t, key: e, custom: r, debug: n = false, isError: i = false } = {}) {
|
|
232
|
+
let l = ht();
|
|
233
|
+
if (i) return Object.defineProperty(l, t, { get() {
|
|
234
|
+
return (f2) => Qe(e) ?? "";
|
|
235
|
+
} }), je(l, t);
|
|
236
|
+
if (t.includes("-")) {
|
|
237
|
+
let [f2, S2] = t.includes("-") ? [t, Ot(t)] : [Nt(t), t];
|
|
238
|
+
k[f2] = f2, k[S2] = f2, r = S2;
|
|
239
|
+
}
|
|
240
|
+
return r && Object.defineProperty(l, r, { get() {
|
|
241
|
+
return Je(t);
|
|
242
|
+
} }), Object.defineProperty(l, t, { get() {
|
|
243
|
+
return Je(t);
|
|
244
|
+
} }), je(l, t);
|
|
225
245
|
}
|
|
226
|
-
function
|
|
227
|
-
return
|
|
246
|
+
function je(t, e) {
|
|
247
|
+
return Q = Object.freeze(new Proxy(t, ke())), Q[Symbol.for.proxy] = "Proxy (Object)", Q[e];
|
|
248
|
+
}
|
|
249
|
+
function ht() {
|
|
250
|
+
return Object.fromEntries(Object.entries(Object.getOwnPropertyDescriptors(Q)));
|
|
251
|
+
}
|
|
252
|
+
function St(t, e, r) {
|
|
253
|
+
return e = e?.isJQx && e.node || (e?.[Symbol.is](Number) ? String(e) : e), $({ trial: (n) => Be(e) ? t.insertAdjacentHTML("beforeend", e) : t.append(e), whenError: (n) => console.info(`${r} not created, reason
|
|
228
254
|
`, n) });
|
|
229
255
|
}
|
|
230
|
-
function
|
|
231
|
-
let n =
|
|
232
|
-
return r?.forEach((i) =>
|
|
256
|
+
function xt(t, e, ...r) {
|
|
257
|
+
let n = Et(e, t);
|
|
258
|
+
return r?.forEach((i) => St(n, i, t)), n;
|
|
233
259
|
}
|
|
234
|
-
function
|
|
235
|
-
switch (t =
|
|
236
|
-
case
|
|
237
|
-
return
|
|
238
|
-
case
|
|
239
|
-
return
|
|
260
|
+
function Et(t, e) {
|
|
261
|
+
switch (t = ye(e) ? Ft(t) : t?.isJQx ? t.node : t, true) {
|
|
262
|
+
case t?.[Symbol.is](String):
|
|
263
|
+
return G(e, Be(t, e) ? { html: t } : { text: t });
|
|
264
|
+
case t?.[Symbol.is](Node):
|
|
265
|
+
return vt(e, t);
|
|
240
266
|
default:
|
|
241
|
-
return
|
|
267
|
+
return G(e, t);
|
|
242
268
|
}
|
|
243
269
|
}
|
|
244
|
-
function
|
|
245
|
-
|
|
246
|
-
let r = e.toLowerCase();
|
|
247
|
-
r in He && (t[He[r]] = t[e], delete t[e]);
|
|
248
|
-
}), t;
|
|
249
|
-
}
|
|
250
|
-
function yt(t, e) {
|
|
251
|
-
let r = Q(t);
|
|
270
|
+
function vt(t, e) {
|
|
271
|
+
let r = G(t);
|
|
252
272
|
return r.append(e), r;
|
|
253
273
|
}
|
|
254
|
-
function
|
|
255
|
-
|
|
256
|
-
let
|
|
257
|
-
return
|
|
274
|
+
function wt(t) {
|
|
275
|
+
if (Object.keys(t).length < 1) return { assignable: {}, specials: [...Array(3)] };
|
|
276
|
+
let e = Lt(t);
|
|
277
|
+
return Object.keys(t).forEach((r) => {
|
|
278
|
+
let n = r.toLowerCase();
|
|
279
|
+
n in De && (t[De[n]] = t[r]) && delete t[r];
|
|
280
|
+
}), { assignable: t, specials: e };
|
|
258
281
|
}
|
|
259
|
-
function
|
|
260
|
-
|
|
282
|
+
function Lt(t) {
|
|
283
|
+
if (!t?.[Symbol.is](Object)) return Array(3);
|
|
284
|
+
let e = Object.entries(t.data ?? {}), r = Object.entries(t.attributes ?? {}), n = t.class?.split(/[ ,]/).map((i) => i.trim()).filter((i) => i.length > 1);
|
|
285
|
+
return delete t.data, delete t.attributes, delete t.class, [e, r, n];
|
|
261
286
|
}
|
|
262
|
-
function
|
|
263
|
-
|
|
287
|
+
function At(t, e) {
|
|
288
|
+
let [r, n, i] = t;
|
|
289
|
+
r?.length && r.forEach(([l, f2]) => e.dataset[l] = f2), n?.length && n.forEach(([l, f2]) => e.setAttribute(l, f2)), i?.forEach((l) => e.classList.add(l));
|
|
264
290
|
}
|
|
265
|
-
function
|
|
266
|
-
|
|
291
|
+
function G(t, e) {
|
|
292
|
+
e = e || {};
|
|
293
|
+
let { assignable: r, specials: n } = wt(e), i = Object.assign(ye(t) ? new Comment() : document.createElement(t), r);
|
|
294
|
+
return At(n, i), i;
|
|
267
295
|
}
|
|
268
|
-
function
|
|
269
|
-
return
|
|
296
|
+
function Ft(t) {
|
|
297
|
+
return t?.constructor === Comment ? t?.textContent : String(t);
|
|
298
|
+
}
|
|
299
|
+
function Be(t, e) {
|
|
300
|
+
return !ye(e) && t?.[Symbol.is](String) && /<.*>|&[#|0-9a-z]+[^;];/i.test(t);
|
|
301
|
+
}
|
|
302
|
+
function ye(t) {
|
|
303
|
+
return /comment/i.test(t);
|
|
270
304
|
}
|
|
271
|
-
function
|
|
272
|
-
return t
|
|
305
|
+
function Ct(t) {
|
|
306
|
+
return Tt(t) && (t in k || !G(t)?.[Symbol.is](HTMLUnknownElement));
|
|
273
307
|
}
|
|
274
|
-
function
|
|
275
|
-
return t
|
|
308
|
+
function Tt(t) {
|
|
309
|
+
return t = t.toLowerCase(), typeof t == "string" && t.length > 0 && /^[a-z]/.test(t) && /^[a-z0-9-]+$/gi.test(t);
|
|
276
310
|
}
|
|
277
|
-
function
|
|
278
|
-
return
|
|
311
|
+
function Je(t) {
|
|
312
|
+
return t = t in k ? k[t] : t, (e, ...r) => xt(t, e, ...r);
|
|
313
|
+
}
|
|
314
|
+
function $t([t, ...e]) {
|
|
315
|
+
return `${t.toUpperCase()}${e.join("")}`;
|
|
316
|
+
}
|
|
317
|
+
function Nt(t) {
|
|
318
|
+
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/^-|-$/, "");
|
|
279
319
|
}
|
|
280
|
-
function
|
|
281
|
-
return (e,
|
|
320
|
+
function Ot(t) {
|
|
321
|
+
return t[Symbol.is](String) ? t.toLowerCase().split("-").map((e, r) => r && `${$t(e)}` || e).join("") : t;
|
|
282
322
|
}
|
|
283
|
-
var { IS: j, maybe:
|
|
284
|
-
function
|
|
285
|
-
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness:
|
|
286
|
-
return e && y(), { IS: b2, maybe: x2, $Wrap: d, isNothing:
|
|
323
|
+
var { IS: j, maybe: be, $Wrap: $r, isNothing: Pt, xProxy: Nr, addSymbolicExtensions: Or } = Ht({ useSymbolicExtensions: false });
|
|
324
|
+
function Ht(t = {}) {
|
|
325
|
+
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: l, xProxy: f2, determineType: S2, addSymbolicExtensions: y, maybe: x2, $Wrap: d } = Mt(b2, e);
|
|
326
|
+
return e && y(), { IS: b2, maybe: x2, $Wrap: d, isNothing: l, xProxy: f2, addSymbolicExtensions: y };
|
|
287
327
|
function b2(m, ...h2) {
|
|
288
328
|
let g2 = typeof m == "symbol" ? Symbol.isSymbol : m;
|
|
289
329
|
switch (true) {
|
|
@@ -294,9 +334,9 @@ var HTMLHelpers = (() => {
|
|
|
294
334
|
}
|
|
295
335
|
}
|
|
296
336
|
}
|
|
297
|
-
function
|
|
298
|
-
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness:
|
|
299
|
-
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness:
|
|
337
|
+
function Mt(t, e) {
|
|
338
|
+
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: l, determineType: f2 } = It(t, b2), { xProxy: S2, addSymbolicExtensions: y } = r(t, b2, e), [x2, d] = [n(), i(t, b2)];
|
|
339
|
+
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness: l, xProxy: S2, determineType: f2, addSymbolicExtensions: y, maybe: x2, $Wrap: d });
|
|
300
340
|
function b2(o) {
|
|
301
341
|
return o?.[Symbol.proxy] ?? t(o);
|
|
302
342
|
}
|
|
@@ -311,38 +351,38 @@ var HTMLHelpers = (() => {
|
|
|
311
351
|
}
|
|
312
352
|
}
|
|
313
353
|
function h2(o, ...s) {
|
|
314
|
-
return s.some((
|
|
354
|
+
return s.some((a) => t(o, a));
|
|
315
355
|
}
|
|
316
|
-
function g2(o, { defaultValue: s, isTypes:
|
|
317
|
-
return
|
|
356
|
+
function g2(o, { defaultValue: s, isTypes: a = [void 0], notTypes: p2 } = {}) {
|
|
357
|
+
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;
|
|
318
358
|
}
|
|
319
|
-
function c(o, { isTypes: s = [void 0], notTypes:
|
|
320
|
-
return s = s?.constructor !== Array ? [s] : s,
|
|
359
|
+
function c(o, { isTypes: s = [void 0], notTypes: a = [void 0] } = {}) {
|
|
360
|
+
return s = s?.constructor !== Array ? [s] : s, a = a?.constructor !== Array ? [a] : a, t(o, ...s) && !t(o, ...a);
|
|
321
361
|
}
|
|
322
362
|
}
|
|
323
|
-
function
|
|
363
|
+
function It() {
|
|
324
364
|
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" }, e = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" };
|
|
325
365
|
return Object.freeze({ SymbolAndCustomProxyFactory: n, maybeFactory: g2, WrapAnyFactory: h2, verifyNothingness: c, determineType: y });
|
|
326
366
|
function r(o, s) {
|
|
327
367
|
Symbol.is || (Symbol.is = Symbol.for(t.IS), Symbol.type = Symbol.for(t.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
328
368
|
return s(this);
|
|
329
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...
|
|
330
|
-
return o(this, ...
|
|
331
|
-
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(
|
|
332
|
-
return s(
|
|
333
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(
|
|
334
|
-
return o(
|
|
369
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...a) {
|
|
370
|
+
return o(this, ...a);
|
|
371
|
+
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(a) {
|
|
372
|
+
return s(a);
|
|
373
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(a, ...p2) {
|
|
374
|
+
return o(a, ...p2);
|
|
335
375
|
}, enumerable: false, configurable: false } }));
|
|
336
376
|
}
|
|
337
|
-
function n(o, s,
|
|
377
|
+
function n(o, s, a) {
|
|
338
378
|
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL)), { xProxy: f2(), addSymbolicExtensions: () => r(o, s) };
|
|
339
379
|
}
|
|
340
380
|
function i(o) {
|
|
341
|
-
return (
|
|
381
|
+
return (Pt(o, true) ? { name: "unknown" } : Object.getPrototypeOf(o)?.constructor).name;
|
|
342
382
|
}
|
|
343
|
-
function
|
|
344
|
-
return Proxy = new o(o, { construct(
|
|
345
|
-
let E3 = new
|
|
383
|
+
function l(o, s) {
|
|
384
|
+
return Proxy = new o(o, { construct(a, p2) {
|
|
385
|
+
let E3 = new a(...p2);
|
|
346
386
|
return Object.defineProperty(E3, s, { value: `${e.PROXY_PREFIX}${i(p2[0])})` }), E3;
|
|
347
387
|
} }), Proxy;
|
|
348
388
|
}
|
|
@@ -352,30 +392,30 @@ var HTMLHelpers = (() => {
|
|
|
352
392
|
return { native() {
|
|
353
393
|
Proxy = o;
|
|
354
394
|
}, custom() {
|
|
355
|
-
Proxy =
|
|
395
|
+
Proxy = l(o, Symbol.proxy);
|
|
356
396
|
} };
|
|
357
397
|
}
|
|
358
398
|
function S2(o, ...s) {
|
|
359
|
-
let
|
|
360
|
-
return { noInput: p2, noShouldbe:
|
|
399
|
+
let a = s.length < 1, p2 = o == null;
|
|
400
|
+
return { noInput: p2, noShouldbe: a, compareTo: !a && s[0], inputCTOR: !p2 && (o?.constructor || Object.getPrototypeOf(o)?.constructor), isNaN: Number.isNaN(o) || be({ trial: (E3) => String(o) === e.NAN }), isInfinity: be({ trial: (E3) => String(o) }) === e.INFINITY, shouldBeFirstElementIsNothing: !a && c(s[0]) };
|
|
361
401
|
}
|
|
362
402
|
function y(o, ...s) {
|
|
363
|
-
let { noInput:
|
|
403
|
+
let { noInput: a, noShouldbe: p2, compareTo: E3, inputCTOR: C3, isNaN: me2, isInfinity: ge2, shouldBeFirstElementIsNothing: pe2 } = S2(o, ...s);
|
|
364
404
|
switch (s = s.length && s[0], true) {
|
|
365
|
-
case
|
|
405
|
+
case pe2:
|
|
366
406
|
return String(o) === String(E3);
|
|
367
407
|
case (o?.[Symbol.proxy] && p2):
|
|
368
408
|
return o[Symbol.proxy];
|
|
369
|
-
case
|
|
409
|
+
case me2:
|
|
370
410
|
return p2 ? e.NAN : String(E3) === String(o);
|
|
371
|
-
case
|
|
411
|
+
case ge2:
|
|
372
412
|
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
373
|
-
case
|
|
413
|
+
case a:
|
|
374
414
|
return p2 ? String(o) : String(E3) === String(o);
|
|
375
|
-
case
|
|
376
|
-
return p2 ? e.BOOLEAN :
|
|
415
|
+
case C3 === Boolean:
|
|
416
|
+
return p2 ? e.BOOLEAN : C3 === s;
|
|
377
417
|
default:
|
|
378
|
-
return d(o, s, p2, x2(o,
|
|
418
|
+
return d(o, s, p2, x2(o, C3));
|
|
379
419
|
}
|
|
380
420
|
}
|
|
381
421
|
function x2(o, s) {
|
|
@@ -390,9 +430,9 @@ var HTMLHelpers = (() => {
|
|
|
390
430
|
return s;
|
|
391
431
|
}
|
|
392
432
|
}
|
|
393
|
-
function d(o, s,
|
|
433
|
+
function d(o, s, a, p2) {
|
|
394
434
|
switch (true) {
|
|
395
|
-
case (!
|
|
435
|
+
case (!a && s === o || o?.[Symbol.proxy] && s === Proxy):
|
|
396
436
|
return true;
|
|
397
437
|
case String(s) === e.NAN:
|
|
398
438
|
return String(o) === e.NAN;
|
|
@@ -405,80 +445,80 @@ var HTMLHelpers = (() => {
|
|
|
405
445
|
function b2(o, s) {
|
|
406
446
|
return (o?.[Symbol.toStringTag] ?? o?.prototype?.[Symbol.toStringTag]) || s?.name || String(s);
|
|
407
447
|
}
|
|
408
|
-
function m(o, s,
|
|
409
|
-
return
|
|
448
|
+
function m(o, s, a) {
|
|
449
|
+
return be({ trial: (p2) => o instanceof s }) || s === a || s === Object.getPrototypeOf(a) || `${s?.name}` === a?.name;
|
|
410
450
|
}
|
|
411
451
|
function h2(o, s) {
|
|
412
|
-
return function(
|
|
452
|
+
return function(a) {
|
|
413
453
|
let p2 = { get value() {
|
|
414
|
-
return
|
|
454
|
+
return a;
|
|
415
455
|
}, is(...E3) {
|
|
416
|
-
return o(
|
|
456
|
+
return o(a, ...E3);
|
|
417
457
|
}, get type() {
|
|
418
|
-
return s(
|
|
458
|
+
return s(a);
|
|
419
459
|
} };
|
|
420
460
|
return Object[Symbol.type] && Object.defineProperties(p2, { [Symbol.type]: { get() {
|
|
421
|
-
return s(
|
|
461
|
+
return s(a);
|
|
422
462
|
} }, [Symbol.is]: { value(...E3) {
|
|
423
|
-
return o(
|
|
463
|
+
return o(a, ...E3);
|
|
424
464
|
} } }), Object.freeze(p2);
|
|
425
465
|
};
|
|
426
466
|
}
|
|
427
467
|
function g2() {
|
|
428
468
|
let o = (s) => {
|
|
429
469
|
};
|
|
430
|
-
return function({ trial: s, whenError:
|
|
470
|
+
return function({ trial: s, whenError: a = o } = {}) {
|
|
431
471
|
try {
|
|
432
472
|
return s();
|
|
433
473
|
} catch (p2) {
|
|
434
|
-
return
|
|
474
|
+
return a(p2);
|
|
435
475
|
}
|
|
436
476
|
};
|
|
437
477
|
}
|
|
438
478
|
function c(o, s = false) {
|
|
439
|
-
let
|
|
440
|
-
return
|
|
479
|
+
let a = o == null;
|
|
480
|
+
return a = s ? a || j(o, 1 / 0) || j(o, NaN) : a, a;
|
|
441
481
|
}
|
|
442
482
|
}
|
|
443
|
-
var
|
|
444
|
-
function
|
|
445
|
-
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: i, sheet:
|
|
483
|
+
var z = Dt;
|
|
484
|
+
function Dt({ styleSheet: t, createWithId: e } = {}) {
|
|
485
|
+
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: i, sheet: l, removeRules: f2, consider: S2, currentSheetID: y } = Rt({ styleSheet: t, createWithId: e });
|
|
446
486
|
function x2(g2, c) {
|
|
447
487
|
if (g2 && c.removeProperties) {
|
|
448
|
-
Object.keys(c.removeProperties).forEach((o) => g2.style.removeProperty(
|
|
488
|
+
Object.keys(c.removeProperties).forEach((o) => g2.style.removeProperty(ze(o)));
|
|
449
489
|
return;
|
|
450
490
|
}
|
|
451
491
|
Object.entries(c).forEach(([o, s]) => {
|
|
452
|
-
o =
|
|
453
|
-
let
|
|
454
|
-
if (/!important/.test(s) && (s = s.slice(0, s.indexOf("!important")).trim(),
|
|
455
|
-
|
|
492
|
+
o = ze(o.trim()), s = s.trim();
|
|
493
|
+
let a;
|
|
494
|
+
if (/!important/.test(s) && (s = s.slice(0, s.indexOf("!important")).trim(), a = "important"), !CSS.supports(o, s)) return console.error(`StylingFactory ${y} error: '${o}' with value '${s}' not supported (yet)`);
|
|
495
|
+
We(() => g2.style.setProperty(o, s, a), `StylingFactory ${y} (setRule4Selector) failed`);
|
|
456
496
|
});
|
|
457
497
|
}
|
|
458
|
-
function d(g2, c, o =
|
|
498
|
+
function d(g2, c, o = l) {
|
|
459
499
|
if (g2 = g2?.trim?.(), !j(g2, String) || !g2.length || /[;,]$/g.test(g2)) return console.error(`StylingFactory ${y} (setRules): [${g2 || "[no selector given]"}] is not a valid selector`);
|
|
460
500
|
if (c.removeRule) return f2(g2);
|
|
461
|
-
let s = n(g2, true),
|
|
462
|
-
return S2(() => x2(
|
|
501
|
+
let s = n(g2, true), a = s || o.cssRules[o.insertRule(`${g2} {}`, o.cssRules.length || 0)];
|
|
502
|
+
return S2(() => x2(a, c), g2, s);
|
|
463
503
|
}
|
|
464
504
|
function b2(g2) {
|
|
465
505
|
let c = g2.trim().split(/{/, 2), o = c.shift().trim();
|
|
466
|
-
if (!j(o, String) || !o?.trim()?.length) return console.error(`StylingFactory ${y} (doParse): no (valid) selector could be extracted from rule ${
|
|
467
|
-
let s =
|
|
468
|
-
return
|
|
506
|
+
if (!j(o, String) || !o?.trim()?.length) return console.error(`StylingFactory ${y} (doParse): no (valid) selector could be extracted from rule ${he(g2)}`);
|
|
507
|
+
let s = Wt(c.shift());
|
|
508
|
+
return We(() => d(o, s), `StylingFactory ${y} (setRules) failed`);
|
|
469
509
|
}
|
|
470
510
|
function m(g2) {
|
|
471
511
|
let c = r(g2);
|
|
472
512
|
return c.done ? c.existing : b2(g2);
|
|
473
513
|
}
|
|
474
514
|
function h2(g2, c) {
|
|
475
|
-
return g2.trim().startsWith("@media") ? m(
|
|
515
|
+
return g2.trim().startsWith("@media") ? m(jt(g2, c)) : d(g2, c);
|
|
476
516
|
}
|
|
477
517
|
return function(g2, c = {}) {
|
|
478
518
|
return i(g2, c) && (Object.keys(c).length ? h2(g2, c) : m(g2));
|
|
479
519
|
};
|
|
480
520
|
}
|
|
481
|
-
function
|
|
521
|
+
function Rt({ styleSheet: t, createWithId: e }) {
|
|
482
522
|
let r = "Note: The rule or some of its properties may not be supported by your browser (yet)", n = `for style#${e}`;
|
|
483
523
|
t = e ? i(e) : t;
|
|
484
524
|
function i(m) {
|
|
@@ -487,18 +527,18 @@ var HTMLHelpers = (() => {
|
|
|
487
527
|
let g2 = Object.assign(document.createElement("style"), { id: m });
|
|
488
528
|
return document.head.insertAdjacentElement("beforeend", g2), g2.sheet;
|
|
489
529
|
}
|
|
490
|
-
function
|
|
530
|
+
function l(m) {
|
|
491
531
|
return console.error(`StylingFactory ${n} [rule: ${m}]
|
|
492
532
|
=> @charset, @namespace and @import are not supported here`), { done: true };
|
|
493
533
|
}
|
|
494
534
|
function f2(m, h2) {
|
|
495
|
-
return [...t.rules].find((g2) => h2 ?
|
|
535
|
+
return [...t.rules].find((g2) => h2 ? Ye(g2.selectorText || "", m) : kt`${Qt(m)}${[..."gim"]}`.test(g2.cssText));
|
|
496
536
|
}
|
|
497
537
|
function S2(m) {
|
|
498
|
-
return /^@charset|@import|namespace/i.test(m.trim()) ?
|
|
538
|
+
return /^@charset|@import|namespace/i.test(m.trim()) ? l(m) : m.match(/}/g)?.length > 1 ? { existing: d(m, 1), done: true } : { done: false };
|
|
499
539
|
}
|
|
500
540
|
function y(m) {
|
|
501
|
-
let h2 = [...t.cssRules].reduce((c, o, s) =>
|
|
541
|
+
let h2 = [...t.cssRules].reduce((c, o, s) => Ye(o.selectorText || "", m) && c.concat(s) || c, []), g2 = h2.length;
|
|
502
542
|
return h2.forEach((c) => t.deleteRule(c)), g2 > 0 ? console.info(`\u2714 Removed ${g2} instance${g2 > 1 ? "s" : ""} of selector ${m} from ${n.slice(4)}`) : console.info(`\u2714 Remove rule: selector ${m} does not exist in ${n.slice(4)}`);
|
|
503
543
|
}
|
|
504
544
|
function x2(m, h2) {
|
|
@@ -512,7 +552,7 @@ var HTMLHelpers = (() => {
|
|
|
512
552
|
} catch (c) {
|
|
513
553
|
return console.error(`StylingFactory ${n} (tryParse) ${c.name} Error:
|
|
514
554
|
${c.message}
|
|
515
|
-
Rule: ${
|
|
555
|
+
Rule: ${he(m)}
|
|
516
556
|
${r}`), g2;
|
|
517
557
|
}
|
|
518
558
|
}
|
|
@@ -522,101 +562,101 @@ ${r}`), g2;
|
|
|
522
562
|
} catch (c) {
|
|
523
563
|
return console.error(`StylingFactory ${n} (tryAddOrModify) ${c.name} Error:
|
|
524
564
|
${c.message}
|
|
525
|
-
Rule: ${
|
|
565
|
+
Rule: ${he(h2)}
|
|
526
566
|
${r}`), g2;
|
|
527
567
|
}
|
|
528
568
|
}
|
|
529
569
|
return { sheet: t, removeRules: y, tryParseAtOrNestedRules: S2, ruleExists: f2, checkParams: x2, tryParse: d, consider: b2, currentSheetID: n };
|
|
530
570
|
}
|
|
531
|
-
function
|
|
532
|
-
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${
|
|
571
|
+
function jt(t, e) {
|
|
572
|
+
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${Jt(n)}`)}`;
|
|
533
573
|
}
|
|
534
|
-
function
|
|
574
|
+
function he(t) {
|
|
535
575
|
let e = (t || "NO RULE").trim().slice(0, 50).replace(/\n/g, "\\n").replace(/\s{2,}/g, " ");
|
|
536
576
|
return t.length > e.length ? `${e.trim()}...truncated` : e;
|
|
537
577
|
}
|
|
538
|
-
function
|
|
578
|
+
function Jt(t) {
|
|
539
579
|
return Object.entries(t).map(([e, r]) => `${e}: ${r.trim()}`).join(`;
|
|
540
580
|
`);
|
|
541
581
|
}
|
|
542
|
-
function
|
|
582
|
+
function Qt(t) {
|
|
543
583
|
return t.replace(/([*\[\]()-+{}.$?\\])/g, (e) => `\\${e}`);
|
|
544
584
|
}
|
|
545
|
-
function
|
|
585
|
+
function kt(t, ...e) {
|
|
546
586
|
let r = e.length && Array.isArray(e.slice(-1)) ? e.pop().join("") : "";
|
|
547
|
-
return new RegExp((e.length && t.raw.reduce((n, i,
|
|
587
|
+
return new RegExp((e.length && t.raw.reduce((n, i, l) => n.concat(e[l - 1] || "").concat(i), "") || t.raw.join("")).split(`
|
|
548
588
|
`).map((n) => n.replace(/\s|\/\/.*$/g, "").trim().replace(/(@s!)/g, " ")).join(""), r);
|
|
549
589
|
}
|
|
550
|
-
function
|
|
590
|
+
function ze(t) {
|
|
551
591
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[^--]^-|-$/, "");
|
|
552
592
|
}
|
|
553
|
-
function
|
|
593
|
+
function We(t, e) {
|
|
554
594
|
try {
|
|
555
595
|
return t();
|
|
556
596
|
} catch (r) {
|
|
557
597
|
console.error(`${e || "an error occured"}: ${r.message}`);
|
|
558
598
|
}
|
|
559
599
|
}
|
|
560
|
-
function
|
|
600
|
+
function Bt(t) {
|
|
561
601
|
return t.replace(/\/\*.+?\*\//gm, "").replace(/[}{\r\n]/g, "").replace(/(data:.+?);/g, (e, r) => `${r}\\3b`).split(";").map((e) => e.trim()).join(`;
|
|
562
602
|
`).replaceAll("\\3b", ";").split(`
|
|
563
603
|
`);
|
|
564
604
|
}
|
|
565
|
-
function
|
|
605
|
+
function zt(t) {
|
|
566
606
|
return t.reduce((e, r) => {
|
|
567
607
|
let [n, i] = [r.slice(0, r.indexOf(":")).trim(), r.slice(r.indexOf(":") + 1).trim().replace(/;$|;.+(?=\/*).+\/$/, "")];
|
|
568
608
|
return n && i ? { ...e, [n]: i } : e;
|
|
569
609
|
}, {});
|
|
570
610
|
}
|
|
571
|
-
function
|
|
572
|
-
return
|
|
611
|
+
function Wt(t) {
|
|
612
|
+
return zt(Bt(t));
|
|
573
613
|
}
|
|
574
|
-
function
|
|
614
|
+
function Ye(t, e) {
|
|
575
615
|
return t?.replace("::", ":") === e?.replace("::", ":");
|
|
576
616
|
}
|
|
577
|
-
var
|
|
578
|
-
var
|
|
579
|
-
var
|
|
580
|
-
if (
|
|
617
|
+
var Se = false;
|
|
618
|
+
var Yt = { on: () => Se = true, off: () => Se = false };
|
|
619
|
+
var N = { tagsRaw: J, allowUnknownHtmlTags: Yt, isAllowed(t) {
|
|
620
|
+
if (Se) return true;
|
|
581
621
|
let e = u(t, String) ? t.toLowerCase() : t?.nodeName.toLowerCase() || "none";
|
|
582
622
|
return e === "#text" || !!J[e];
|
|
583
623
|
}, allowTag: (t) => J[t.toLowerCase()] = true, prohibitTag: (t) => J[t.toLowerCase()] = false };
|
|
584
|
-
var
|
|
585
|
-
var
|
|
586
|
-
function
|
|
587
|
-
if (
|
|
588
|
-
let e = Object.entries(t.removed).reduce((r, [n, i]) => [...r, `${
|
|
624
|
+
var _t = true;
|
|
625
|
+
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 };
|
|
626
|
+
function Vt(t) {
|
|
627
|
+
if (_t && Object.keys(t.removed).length) {
|
|
628
|
+
let e = Object.entries(t.removed).reduce((r, [n, i]) => [...r, `${P(n)} => ${i}`], []).join("\\000A");
|
|
589
629
|
w.error(`JQx: HTML creation error(s): ${e}`);
|
|
590
630
|
}
|
|
591
631
|
}
|
|
592
|
-
function
|
|
632
|
+
function Ut(t) {
|
|
593
633
|
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"];
|
|
594
|
-
return /-/.test(e) && !r.find((n) => n === e) ||
|
|
634
|
+
return /-/.test(e) && !r.find((n) => n === e) || N.isAllowed(e);
|
|
595
635
|
}
|
|
596
636
|
function M(t) {
|
|
597
637
|
let e = { rawHTML: t?.parentElement?.getHTML() ?? "no html", removed: {} };
|
|
598
638
|
return u(t, HTMLElement) && [...t.childNodes].forEach((r) => {
|
|
599
639
|
if (r?.children?.length && M(r), r?.attributes) {
|
|
600
640
|
let i = u(r, SVGElement) ? R.svg : R.html;
|
|
601
|
-
[...(r ?? { attributes: [] }).attributes].forEach((
|
|
602
|
-
let f2 =
|
|
641
|
+
[...(r ?? { attributes: [] }).attributes].forEach((l) => {
|
|
642
|
+
let f2 = l.name.trim().toLowerCase(), S2 = l.value.trim().toLowerCase().replace(Z.whiteSpace, ""), y = f2 === "href" ? !Z.validURL.test(S2) : Z.notAllowedValues.test(S2), x2 = f2.startsWith("data") ? !Z.data.test(f2) : !!i[f2];
|
|
603
643
|
if (y || x2) {
|
|
604
|
-
let d =
|
|
605
|
-
d += d.length === 60 ? "..." : "", e.removed[`${
|
|
644
|
+
let d = K(l.value || "none", 60);
|
|
645
|
+
d += d.length === 60 ? "..." : "", e.removed[`${l.name}`] = `attribute/property/value not allowed, removed. Value: ${d}`, r.removeAttribute(l.name);
|
|
606
646
|
}
|
|
607
647
|
});
|
|
608
648
|
}
|
|
609
|
-
if (!(
|
|
610
|
-
let i = (r?.outerHTML || r?.textContent).trim(),
|
|
611
|
-
|
|
649
|
+
if (!(Ut(r) || r.constructor === CharacterData || r.constructor === Comment)) {
|
|
650
|
+
let i = (r?.outerHTML || r?.textContent).trim(), l = K(i, 60) ?? "EMPTY";
|
|
651
|
+
l += l.length === 60 ? "..." : "", e.removed[`<${r.nodeName?.toLowerCase()}>`] = `not allowed, not rendered. Value: ${l}`, r.remove();
|
|
612
652
|
}
|
|
613
|
-
}),
|
|
653
|
+
}), Vt(e), t;
|
|
614
654
|
}
|
|
615
|
-
function
|
|
655
|
+
function Xt(t) {
|
|
616
656
|
let e = document.createElement("div");
|
|
617
657
|
return e.insertAdjacentHTML(A.end, t), e.childNodes.length ? M(e) : void 0;
|
|
618
658
|
}
|
|
619
|
-
function
|
|
659
|
+
function Gt(t, e, r) {
|
|
620
660
|
switch (true) {
|
|
621
661
|
case u(t, Comment):
|
|
622
662
|
return e.insertAdjacentHTML(r, `<!--${t.data}-->`);
|
|
@@ -628,32 +668,32 @@ ${r}`), g2;
|
|
|
628
668
|
}
|
|
629
669
|
function I(t = [], e = document.body, r = A.BeforeEnd) {
|
|
630
670
|
return r = r || A.BeforeEnd, e = e?.isJQx ? e.node : e || document.body, t.reduce((n, i) => {
|
|
631
|
-
let
|
|
632
|
-
return
|
|
671
|
+
let l = O(i) && Zt(i, e, r);
|
|
672
|
+
return l ? [...n, l] : n;
|
|
633
673
|
}, []);
|
|
634
674
|
}
|
|
635
|
-
function
|
|
636
|
-
return r = r || A.BeforeEnd, e = e?.isJQx ? e?.[0] : e, u(t, Comment, Text) ?
|
|
675
|
+
function Zt(t, e = document.body, r = A.BeforeEnd) {
|
|
676
|
+
return r = r || A.BeforeEnd, e = e?.isJQx ? e?.[0] : e, u(t, Comment, Text) ? Gt(t, e, r) : u(t, HTMLElement) ? e.insertAdjacentElement(r, t) : void 0;
|
|
637
677
|
}
|
|
638
678
|
function T(t) {
|
|
639
679
|
if (u(t, Text, Comment)) return t;
|
|
640
680
|
let e = t?.trim(), r = e?.split(/<text>|<\/text>/i) ?? [];
|
|
641
681
|
if (r?.length && (r = r.length > 1 ? r.filter((i) => i.length).shift() : void 0), e.startsWith("<!--") && e.endsWith("-->")) return document.createComment(t.replace(/<!--|-->$/g, ""));
|
|
642
682
|
if (r || u(e, String) && !/^<(.+)[^>]+>/m.test(e)) return document.createTextNode(r ?? e);
|
|
643
|
-
let n =
|
|
644
|
-
return n.childNodes.length < 1 ? T(`<span data-jqxcreationerror="1">${
|
|
683
|
+
let n = Xt(t);
|
|
684
|
+
return n.childNodes.length < 1 ? T(`<span data-jqxcreationerror="1">${q(t, 60)}</span>`) : n.children[0];
|
|
645
685
|
}
|
|
646
|
-
function
|
|
686
|
+
function ee(t) {
|
|
647
687
|
if (t.node("#jqxPopup")) return;
|
|
648
|
-
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...
|
|
688
|
+
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...Ie);
|
|
649
689
|
let e = [], [r, n] = [t("#jqxPopupContent"), t.node("#jqxPopup")], i = {};
|
|
650
|
-
return t.handle({ type: "click, cancel", handlers: m, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show:
|
|
651
|
-
function
|
|
690
|
+
return t.handle({ type: "click, cancel", handlers: m, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show: l, remove: f2, removeModal: b2 });
|
|
691
|
+
function l(c) {
|
|
652
692
|
if (n.open) switch (true) {
|
|
653
693
|
case S2(c):
|
|
654
694
|
return;
|
|
655
695
|
default:
|
|
656
|
-
return f2(), setTimeout(() =>
|
|
696
|
+
return f2(), setTimeout(() => l(c), 200);
|
|
657
697
|
}
|
|
658
698
|
i = { ...c };
|
|
659
699
|
let { content: o } = i;
|
|
@@ -670,8 +710,8 @@ ${r}`), g2;
|
|
|
670
710
|
r.clear();
|
|
671
711
|
let { content: c, modal: o, closeAfter: s } = i;
|
|
672
712
|
o = t.IS(o, Boolean) ? o : false;
|
|
673
|
-
let
|
|
674
|
-
r.append(
|
|
713
|
+
let a = o ? "" : t.div({ id: "closeHandleIcon" });
|
|
714
|
+
r.append(a, t.IS(c, String) ? t.div(c) : c), n.showModal(), !o && t.IS(s, Number) && h2(f2, s);
|
|
675
715
|
}
|
|
676
716
|
function x2() {
|
|
677
717
|
if (n.close(i.returnValue), d(), t.IS(i.callback, Function)) return e.push(setTimeout(() => i.callback(i.returnValue), 200));
|
|
@@ -700,7 +740,7 @@ ${r}`), g2;
|
|
|
700
740
|
}
|
|
701
741
|
}
|
|
702
742
|
}
|
|
703
|
-
function
|
|
743
|
+
function te(t) {
|
|
704
744
|
let e = {}, r = "anonymous_";
|
|
705
745
|
function n(d) {
|
|
706
746
|
if (d) {
|
|
@@ -714,7 +754,7 @@ ${r}`), g2;
|
|
|
714
754
|
document.removeEventListener(b2, m, { capture: h2 });
|
|
715
755
|
}
|
|
716
756
|
}
|
|
717
|
-
function
|
|
757
|
+
function l(d, b2, m, h2) {
|
|
718
758
|
return function(g2) {
|
|
719
759
|
if (!L(b2)) return d({ evt: g2 });
|
|
720
760
|
let c = g2.target.closest(b2);
|
|
@@ -733,19 +773,19 @@ ${r}`), g2;
|
|
|
733
773
|
}
|
|
734
774
|
function y(d, b2) {
|
|
735
775
|
let m = S2(d, b2);
|
|
736
|
-
m && (i(m[1]), delete e[d][b2], delete
|
|
776
|
+
m && (i(m[1]), delete e[d][b2], delete re[b2], w.warn(`Removed listener [${b2}] for event type [${d}].`));
|
|
737
777
|
}
|
|
738
778
|
function x2(d) {
|
|
739
|
-
let { type: b2, handler: m, name: h2, capture: g2, once: c, selector: o, node: s, about:
|
|
779
|
+
let { type: b2, handler: m, name: h2, capture: g2, once: c, selector: o, node: s, about: a } = d;
|
|
740
780
|
e[b2] = e[b2] || {};
|
|
741
|
-
let p2 =
|
|
781
|
+
let p2 = xe(h2 || m.name), E3 = m;
|
|
742
782
|
if (s instanceof HTMLElement) {
|
|
743
|
-
let
|
|
744
|
-
s.dataset.hid =
|
|
783
|
+
let C3 = s.dataset.hid || p2;
|
|
784
|
+
s.dataset.hid = C3, o = `[data-hid=${C3}]`;
|
|
745
785
|
}
|
|
746
786
|
switch (true) {
|
|
747
787
|
case !e[b2][p2]:
|
|
748
|
-
return w.log(`JQx: created listener for event type ${b2}, with handler name ${p2}`), e[b2][p2] = { name: p2, handler:
|
|
788
|
+
return w.log(`JQx: created listener for event type ${b2}, with handler name ${p2}`), e[b2][p2] = { name: p2, handler: l(m, o, c, p2), capture: _e(b2, g2), once: !!c, type: b2, initialHandler: E3, selector: !!o && o || false, about: !!a && a || false, unListen() {
|
|
749
789
|
y(b2, p2);
|
|
750
790
|
} }, e[b2][p2];
|
|
751
791
|
default:
|
|
@@ -765,61 +805,61 @@ ${r}`), g2;
|
|
|
765
805
|
return Object.freeze({ ...e });
|
|
766
806
|
} };
|
|
767
807
|
}
|
|
768
|
-
var w =
|
|
769
|
-
var
|
|
808
|
+
var w = er();
|
|
809
|
+
var Kt = ["load", "unload", "scroll", "focus", "blur", "DOMNodeRemovedFromDocument", "DOMNodeInsertedIntoDocument", "loadstart", "progress", "error", "abort", "load", "loadend", "pointerenter", "pointerleave", "readystatechange"];
|
|
770
810
|
var A = Object.freeze(new Proxy({ start: "afterbegin", afterbegin: "afterbegin", end: "beforeend", beforeend: "beforeend", before: "beforebegin", beforebegin: "beforebegin", after: "afterend", afterend: "afterend" }, { get(t, e) {
|
|
771
811
|
return t[String(e).toLowerCase()] ?? t[e];
|
|
772
812
|
} }));
|
|
773
|
-
var
|
|
774
|
-
var
|
|
775
|
-
return t[
|
|
813
|
+
var qt = [...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}`));
|
|
814
|
+
var ve = Object.freeze({ get(t, e) {
|
|
815
|
+
return t[_(e)] || t[e];
|
|
776
816
|
}, enumerable: false, configurable: false });
|
|
777
|
-
var
|
|
778
|
-
|
|
779
|
-
function
|
|
817
|
+
var re = {};
|
|
818
|
+
He.custom();
|
|
819
|
+
function we() {
|
|
780
820
|
let t = setTimeout(() => {
|
|
781
821
|
});
|
|
782
822
|
for (; t >= 0; ) clearTimeout(t--);
|
|
783
823
|
}
|
|
784
|
-
function
|
|
785
|
-
return L(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() :
|
|
824
|
+
function xe(t) {
|
|
825
|
+
return L(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() : Ve();
|
|
786
826
|
}
|
|
787
|
-
function
|
|
827
|
+
function Le(t) {
|
|
788
828
|
let e = !!t.node && !u(t, Text, Comment);
|
|
789
829
|
switch (true) {
|
|
790
830
|
case e:
|
|
791
|
-
let r = t.node.dataset ? Object.keys(t.node.dataset).map((
|
|
831
|
+
let r = t.node.dataset ? Object.keys(t.node.dataset).map((l) => `[data-${l}]`) : [], i = [t.attr("id") && `#${t?.attr("id")}` || void 0, t.attr("class") && t?.attr("class").split(" ").map((l) => `.${l}`).join(", ") || void 0, r.length > 0 && r.join(", ") || void 0].filter((l) => !!l).join(", ") || [];
|
|
792
832
|
return i.length ? `(${i})` : "";
|
|
793
833
|
default:
|
|
794
834
|
return "";
|
|
795
835
|
}
|
|
796
836
|
}
|
|
797
|
-
function
|
|
837
|
+
function Ve(t) {
|
|
798
838
|
let e = `anonymous_${Math.random().toString(36).slice(2)}`;
|
|
799
|
-
return
|
|
839
|
+
return re[e] ? Ve() : (re[e] = e, e);
|
|
800
840
|
}
|
|
801
|
-
function
|
|
802
|
-
return !!
|
|
841
|
+
function _e(t, e) {
|
|
842
|
+
return !!Kt.find((r) => r === t) || !!e;
|
|
803
843
|
}
|
|
804
|
-
function
|
|
844
|
+
function ie(t) {
|
|
805
845
|
return t.startsWith("data") || R.html.find((e) => t.toLowerCase() === e);
|
|
806
846
|
}
|
|
807
|
-
function
|
|
847
|
+
function se(t) {
|
|
808
848
|
return t && (t.textContent = "");
|
|
809
849
|
}
|
|
810
|
-
function
|
|
811
|
-
return t = t?.parentElement, e += t ? t[r ? "scrollTop" : "scrollLeft"] : 0, t ?
|
|
850
|
+
function W(t, e = 0, r = true) {
|
|
851
|
+
return t = t?.parentElement, e += t ? t[r ? "scrollTop" : "scrollLeft"] : 0, t ? W(t, e, r) : e;
|
|
812
852
|
}
|
|
813
853
|
function L(t, e = 1) {
|
|
814
854
|
return e = u(e, Number) && e || 1, u(t, String) && t.length >= e;
|
|
815
855
|
}
|
|
816
|
-
function
|
|
817
|
-
return
|
|
856
|
+
function K(t, e = 120) {
|
|
857
|
+
return q(t, e).replace(/</g, "<");
|
|
818
858
|
}
|
|
819
|
-
function
|
|
859
|
+
function q(t, e = 120) {
|
|
820
860
|
return `${t}`.trim().slice(0, e).replace(/>\s+</g, "><").replace(/</g, "<").replace(/\s{2,}/g, " ").replace(/\n/g, "\\n") + (t.length > e ? " …" : "").trim();
|
|
821
861
|
}
|
|
822
|
-
function
|
|
862
|
+
function P(t) {
|
|
823
863
|
switch (true) {
|
|
824
864
|
case u(t, String):
|
|
825
865
|
let e = document.createElement("div");
|
|
@@ -828,10 +868,10 @@ ${r}`), g2;
|
|
|
828
868
|
return t;
|
|
829
869
|
}
|
|
830
870
|
}
|
|
831
|
-
function
|
|
871
|
+
function Ee(t) {
|
|
832
872
|
return u(t, String) && Object.assign(document.createElement("textarea"), { innerHTML: t }).textContent || t;
|
|
833
873
|
}
|
|
834
|
-
function
|
|
874
|
+
function er() {
|
|
835
875
|
let [t, e] = [false, true], r = [], n = { get on() {
|
|
836
876
|
return t = true, n;
|
|
837
877
|
}, get off() {
|
|
@@ -846,19 +886,19 @@ ${r}`), g2;
|
|
|
846
886
|
function i() {
|
|
847
887
|
e = true;
|
|
848
888
|
}
|
|
849
|
-
function
|
|
889
|
+
function l() {
|
|
850
890
|
e = false;
|
|
851
891
|
}
|
|
852
892
|
function f2(...x2) {
|
|
853
|
-
return r.unshift(...x2.map((d) => `${
|
|
893
|
+
return r.unshift(...x2.map((d) => `${oe()} \u2A3B ${Ee(d)}`)), console.error(r.slice(0, x2.length).join(`
|
|
854
894
|
`)), n;
|
|
855
895
|
}
|
|
856
896
|
function S2(...x2) {
|
|
857
|
-
return r.unshift(...x2.map((d) => `${
|
|
897
|
+
return r.unshift(...x2.map((d) => `${oe()} \u26A0 ${Ee(d)}`)), console.warn(r.slice(0, x2.length).join(`
|
|
858
898
|
`)), n;
|
|
859
899
|
}
|
|
860
900
|
function y(...x2) {
|
|
861
|
-
let d = x2.map((b2) => `${
|
|
901
|
+
let d = x2.map((b2) => `${oe()} \u2714 ${Ee(b2)}`);
|
|
862
902
|
switch (!e && r.unshift(...d), t) {
|
|
863
903
|
case true:
|
|
864
904
|
console.log(d.join(`
|
|
@@ -869,69 +909,69 @@ ${r}`), g2;
|
|
|
869
909
|
}
|
|
870
910
|
return Object.defineProperties(n, { log: { value: y, enumerable: false }, error: { value: f2, enumerable: false }, warn: { value: S2, enumerable: false } }), Object.freeze(n);
|
|
871
911
|
}
|
|
872
|
-
function
|
|
873
|
-
return ((t) => `[${
|
|
912
|
+
function oe() {
|
|
913
|
+
return ((t) => `[${ne(t.getHours())}:${ne(t.getMinutes())}:${ne(t.getSeconds())}.${ne(t.getMilliseconds(), 3)}]`)(/* @__PURE__ */ new Date());
|
|
874
914
|
}
|
|
875
|
-
function
|
|
915
|
+
function Ae(t, e) {
|
|
876
916
|
if (t) for (let [r, n] of Object.entries(e)) {
|
|
877
|
-
if (r =
|
|
878
|
-
u(n, String) &&
|
|
917
|
+
if (r = F(r), r.startsWith("data")) return le(t, n);
|
|
918
|
+
u(n, String) && ie(r) && t.setAttribute(r, n.split(/[, ]/)?.join(" "));
|
|
879
919
|
}
|
|
880
920
|
}
|
|
881
|
-
function
|
|
882
|
-
if (t && u(e, Object)) for (let [r, n] of Object.entries(e)) t.setAttribute(`data-${
|
|
921
|
+
function le(t, e) {
|
|
922
|
+
if (t && u(e, Object)) for (let [r, n] of Object.entries(e)) t.setAttribute(`data-${F(r)}`, n);
|
|
883
923
|
}
|
|
884
|
-
function
|
|
885
|
-
return t ? u(t, Proxy) ? [t.EL] : u(t, NodeList) ? [...t] :
|
|
924
|
+
function ae(t) {
|
|
925
|
+
return t ? u(t, Proxy) ? [t.EL] : u(t, NodeList) ? [...t] : O(t) ? [t] : U(t) ? t : t.isJQx ? t.collection : void 0 : [];
|
|
886
926
|
}
|
|
887
927
|
function D(t, e, r = true, ...n) {
|
|
888
928
|
if (t.is.empty) return w.log("[JQx instance].[before(Me) | after(Me) | andThen]: instance is empty."), t;
|
|
889
|
-
if (n = n.map((
|
|
890
|
-
let
|
|
891
|
-
return w.log(`[JQx instance].[${
|
|
929
|
+
if (n = n.map((l) => l.isJQx ? l.node : u(l, String) ? e(l).node ?? l : l), n.find((l) => !u(l, String, Element))) {
|
|
930
|
+
let l = r ? "after" : "before";
|
|
931
|
+
return w.log(`[JQx instance].[${l}(Me)]: invalid/-sufficient input.`), t;
|
|
892
932
|
}
|
|
893
933
|
return t.node[r ? "after" : "before"](...n), t;
|
|
894
934
|
}
|
|
895
|
-
function
|
|
935
|
+
function O(t) {
|
|
896
936
|
return u(t, Text, HTMLElement, Comment);
|
|
897
937
|
}
|
|
898
|
-
function
|
|
938
|
+
function Y(t, e) {
|
|
899
939
|
if (u(e, Object)) for (let [r, n] of Object.entries(e)) {
|
|
900
940
|
let i;
|
|
901
|
-
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(), i = "important"), t.style.setProperty(
|
|
941
|
+
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(), i = "important"), t.style.setProperty(F(r), n, i);
|
|
902
942
|
}
|
|
903
943
|
}
|
|
904
944
|
function H(t) {
|
|
905
945
|
let e = t.cloneNode(true);
|
|
906
946
|
return e.removeAttribute && e.removeAttribute("id"), t.isConnected ? t.remove() : t = null, e;
|
|
907
947
|
}
|
|
908
|
-
function
|
|
948
|
+
function Ue(t) {
|
|
909
949
|
if (!u(t, HTMLElement)) return;
|
|
910
|
-
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), i = !![e.display, r.display].includes("none"),
|
|
911
|
-
return !(
|
|
950
|
+
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), i = !![e.display, r.display].includes("none"), l = !!t.hidden, f2 = parseInt(r.height) < 1 || parseInt(r.width) < 1, S2 = t.offsetTop < 0 || t.offsetLeft + t.offsetWidth < 0 || t.offsetLeft > document.body.offsetWidth, y = +r.opacity == 0 || +(e.opacity || 1) == 0;
|
|
951
|
+
return !(l || S2 || y || i || n || f2);
|
|
912
952
|
}
|
|
913
|
-
function
|
|
953
|
+
function Xe(t) {
|
|
914
954
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:read-write)")].find((e) => e === t) : false;
|
|
915
955
|
}
|
|
916
|
-
function
|
|
917
|
-
return t?.filter((e) => e).reduce((e, r) => e.concat(
|
|
956
|
+
function Ge(t) {
|
|
957
|
+
return t?.filter((e) => e).reduce((e, r) => e.concat(Te(r) ? `<!--${r.data}-->` : ce(r) ? r.textContent : r.outerHTML), "");
|
|
918
958
|
}
|
|
919
|
-
function
|
|
959
|
+
function ne(t, e = 2) {
|
|
920
960
|
return `${t}`.padStart(e, "0");
|
|
921
961
|
}
|
|
922
|
-
function
|
|
962
|
+
function Ze(t, e = 0) {
|
|
923
963
|
return [t, e] = [Math.floor(t), Math.ceil(e)], Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift() / 2 ** 32 * (t - e + 1) + e);
|
|
924
964
|
}
|
|
925
|
-
function
|
|
926
|
-
return `_${
|
|
965
|
+
function ue() {
|
|
966
|
+
return `_${tr(qt).slice(0, 8).join("")}`;
|
|
927
967
|
}
|
|
928
|
-
function
|
|
968
|
+
function Fe(t) {
|
|
929
969
|
return t = u(t, String) && /,/.test(t) ? t.split(",").map((e) => e.trim().toLowerCase()).filter((e) => e.length > 0) : t, u(t, Array) ? t : u(t, String) && t?.trim().toLowerCase() || "";
|
|
930
970
|
}
|
|
931
|
-
function
|
|
971
|
+
function Ke(t) {
|
|
932
972
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:modal)")].find((e) => e === t) : false;
|
|
933
973
|
}
|
|
934
|
-
function
|
|
974
|
+
function Ce(t, e) {
|
|
935
975
|
switch (t = String(t).trim(), true) {
|
|
936
976
|
case /^(0|false|f)$/i.test(t):
|
|
937
977
|
return false;
|
|
@@ -941,50 +981,50 @@ ${r}`), g2;
|
|
|
941
981
|
return e;
|
|
942
982
|
}
|
|
943
983
|
}
|
|
944
|
-
function
|
|
984
|
+
function tr(t) {
|
|
945
985
|
let e = t.length;
|
|
946
986
|
for (; e--; ) {
|
|
947
|
-
let r =
|
|
987
|
+
let r = Ze(e);
|
|
948
988
|
[t[e], t[r]] = [t[r], t[e]];
|
|
949
989
|
}
|
|
950
990
|
return t;
|
|
951
991
|
}
|
|
952
|
-
function
|
|
953
|
-
return u(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${
|
|
992
|
+
function _(t) {
|
|
993
|
+
return u(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${rr(e)}` || e).join("") : t;
|
|
954
994
|
}
|
|
955
|
-
function
|
|
995
|
+
function F(t) {
|
|
956
996
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/^-|-$/, "");
|
|
957
997
|
}
|
|
958
|
-
function
|
|
998
|
+
function rr([t, ...e]) {
|
|
959
999
|
return `${t.toUpperCase()}${e.join("")}`;
|
|
960
1000
|
}
|
|
961
|
-
function
|
|
1001
|
+
function ce(t) {
|
|
962
1002
|
return u(t, Comment, Text);
|
|
963
1003
|
}
|
|
964
|
-
function
|
|
1004
|
+
function Te(t) {
|
|
965
1005
|
u(t, Comment);
|
|
966
1006
|
}
|
|
967
|
-
function
|
|
1007
|
+
function qe(t) {
|
|
968
1008
|
return u(t, Text);
|
|
969
1009
|
}
|
|
970
|
-
function
|
|
1010
|
+
function V(t) {
|
|
971
1011
|
return u(t, String) && /^<|>$/.test(`${t}`.trim());
|
|
972
1012
|
}
|
|
973
|
-
function
|
|
974
|
-
return u(t, Array) && !t?.find((e) => !
|
|
1013
|
+
function U(t) {
|
|
1014
|
+
return u(t, Array) && !t?.find((e) => !O(e));
|
|
975
1015
|
}
|
|
976
|
-
function
|
|
977
|
-
return u(t, Array) && !t?.find((e) => !
|
|
1016
|
+
function fe(t) {
|
|
1017
|
+
return u(t, Array) && !t?.find((e) => !V(e));
|
|
978
1018
|
}
|
|
979
1019
|
function v(t, e) {
|
|
980
|
-
let r = t.collection.filter((n) => !
|
|
1020
|
+
let r = t.collection.filter((n) => !ce(n));
|
|
981
1021
|
for (let n = 0; n < r.length; n += 1) e(r[n], n);
|
|
982
1022
|
return t;
|
|
983
1023
|
}
|
|
984
|
-
function
|
|
1024
|
+
function et(t) {
|
|
985
1025
|
return t.node ? u(t.node, Comment) ? `<!--${t.node.textContent}-->` : t.HTML.get(1).split(">")[0] + ">..." : "";
|
|
986
1026
|
}
|
|
987
|
-
function
|
|
1027
|
+
function $e(t, e, r) {
|
|
988
1028
|
let n = e !== document.body && u(t, String) && t.toLowerCase() !== "body" ? e : document;
|
|
989
1029
|
try {
|
|
990
1030
|
r.collection = [...n.querySelectorAll(t)];
|
|
@@ -992,23 +1032,23 @@ ${r}`), g2;
|
|
|
992
1032
|
w.warn(`JQx: Invalid CSS querySelector. [${u(t, String) ? t : "Not a string!"}]`);
|
|
993
1033
|
}
|
|
994
1034
|
}
|
|
995
|
-
function
|
|
996
|
-
return { isCommentOrTextNode:
|
|
1035
|
+
function tt() {
|
|
1036
|
+
return { isCommentOrTextNode: ce, isNode: O, isComment: Te, isText: qe, isHtmlString: V, isArrayOfHtmlElements: U, isArrayOfHtmlStrings: fe, ElemArray2HtmlString: Ge, input2Collection: ae, setCollectionFromCssSelector: $e, cssRuleEdit: z({ createWithId: "JQxStylesheet" }) };
|
|
997
1037
|
}
|
|
998
|
-
function
|
|
1038
|
+
function rt() {
|
|
999
1039
|
let e = Object.freeze({ notInDOM: "n/a", writable: "n/a", modal: "n/a", empty: true, open: "n/a", visible: "n/a" });
|
|
1000
1040
|
return (r) => {
|
|
1001
1041
|
let n = r.node;
|
|
1002
1042
|
return u(n, Node) ? Object.freeze({ get writable() {
|
|
1003
|
-
return
|
|
1043
|
+
return Xe(n);
|
|
1004
1044
|
}, get modal() {
|
|
1005
|
-
return
|
|
1045
|
+
return Ke(n);
|
|
1006
1046
|
}, get inDOM() {
|
|
1007
1047
|
return n.isConnected;
|
|
1008
1048
|
}, get open() {
|
|
1009
1049
|
return n.open ?? false;
|
|
1010
1050
|
}, get visible() {
|
|
1011
|
-
return
|
|
1051
|
+
return Ue(n);
|
|
1012
1052
|
}, get disabled() {
|
|
1013
1053
|
return n.hasAttribute("readonly") || n.hasAttribute("disabled");
|
|
1014
1054
|
}, get empty() {
|
|
@@ -1018,19 +1058,19 @@ ${r}`), g2;
|
|
|
1018
1058
|
} }) : e;
|
|
1019
1059
|
};
|
|
1020
1060
|
}
|
|
1021
|
-
function
|
|
1061
|
+
function nt(t, e, r, n) {
|
|
1022
1062
|
r && u(e, String) && (e = { [e]: r === "-" ? "" : r });
|
|
1023
1063
|
let i;
|
|
1024
|
-
e.className && (i = e.className, delete e.className), i = [...t.classList].find((f2) => f2.startsWith("JQxClass-") || i && f2 === i) || i || `JQxClass-${
|
|
1064
|
+
e.className && (i = e.className, delete e.className), i = [...t.classList].find((f2) => f2.startsWith("JQxClass-") || i && f2 === i) || i || `JQxClass-${ue().slice(1)}`, n.editCssRule(`.${i}`, e), t.classList.add(i);
|
|
1025
1065
|
}
|
|
1026
|
-
var
|
|
1027
|
-
function
|
|
1028
|
-
return { factoryExtensions:
|
|
1066
|
+
var nr = rt();
|
|
1067
|
+
function ot(t) {
|
|
1068
|
+
return { factoryExtensions: or(t), instanceExtensions: ir(t) };
|
|
1029
1069
|
}
|
|
1030
|
-
function
|
|
1070
|
+
function or(t) {
|
|
1031
1071
|
return { data(e) {
|
|
1032
1072
|
return { get all() {
|
|
1033
|
-
return new Proxy(e[0]?.dataset ?? {},
|
|
1073
|
+
return new Proxy(e[0]?.dataset ?? {}, ve);
|
|
1034
1074
|
}, set(r = {}) {
|
|
1035
1075
|
if (!e.is.empty && u(r, Object)) for (let [n, i] of Object.entries(r)) e.setData({ [n]: i });
|
|
1036
1076
|
return e;
|
|
@@ -1040,23 +1080,23 @@ ${r}`), g2;
|
|
|
1040
1080
|
if (!e.is.empty && u(r, Object)) for (let [n, i] of Object.entries(r)) e.setData({ [n]: i });
|
|
1041
1081
|
return e;
|
|
1042
1082
|
}, remove(r) {
|
|
1043
|
-
return e[0]?.removeAttribute(`data-${
|
|
1083
|
+
return e[0]?.removeAttribute(`data-${F(r)}`), e;
|
|
1044
1084
|
} };
|
|
1045
1085
|
}, dimensions(e) {
|
|
1046
1086
|
if (e.is.empty) return w.error("[JQx instance].dimensions called on empty instance"), { error: "[JQx instance].dimensions: NO ELEMENTS" };
|
|
1047
1087
|
let { node: r } = e, n = r.getBoundingClientRect().toJSON();
|
|
1048
|
-
return n.scrollTopDistance =
|
|
1088
|
+
return n.scrollTopDistance = W(r, 0), n.scrollLeftDistance = W(r, 0, false), n;
|
|
1049
1089
|
}, node(e) {
|
|
1050
1090
|
return e[0];
|
|
1051
1091
|
}, HTML(e) {
|
|
1052
1092
|
return { get(r, n) {
|
|
1053
1093
|
if (e.is.empty) return "NO ELEMENTS IN COLLECTION";
|
|
1054
1094
|
let i = r ? e.outerHtml : e.html();
|
|
1055
|
-
return n ?
|
|
1095
|
+
return n ? P(i) : i;
|
|
1056
1096
|
}, set(r, n = false, i = false) {
|
|
1057
1097
|
r = r.isJQx ? r.HTML.get(1) : r;
|
|
1058
|
-
let
|
|
1059
|
-
return r =
|
|
1098
|
+
let l = u(r, String);
|
|
1099
|
+
return r = l && i ? P(r) : r, l && (r || "").trim().length && e.html(r, n), e;
|
|
1060
1100
|
}, replace(r, n = false) {
|
|
1061
1101
|
return e.HTML.set(r, false, n);
|
|
1062
1102
|
}, append(r, n = false) {
|
|
@@ -1065,7 +1105,7 @@ ${r}`), g2;
|
|
|
1065
1105
|
return r = u(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r + e.HTML.get(), false, n);
|
|
1066
1106
|
} };
|
|
1067
1107
|
}, is(e) {
|
|
1068
|
-
return
|
|
1108
|
+
return nr(e);
|
|
1069
1109
|
}, length(e) {
|
|
1070
1110
|
return e.collection.length;
|
|
1071
1111
|
}, outerHtml(e) {
|
|
@@ -1088,17 +1128,17 @@ ${r}`), g2;
|
|
|
1088
1128
|
}, inSheet(r) {
|
|
1089
1129
|
return e.css(r);
|
|
1090
1130
|
}, valueOf(r) {
|
|
1091
|
-
return e.is.empty ? void 0 : getComputedStyle(e[0])[
|
|
1131
|
+
return e.is.empty ? void 0 : getComputedStyle(e[0])[F(r)];
|
|
1092
1132
|
}, nwRule(r) {
|
|
1093
1133
|
return e.Style.byRule({ rules: r });
|
|
1094
1134
|
}, byRule({ classes2Apply: r = [], rules: n = [] } = {}) {
|
|
1095
|
-
let
|
|
1135
|
+
let l = u(n, String) && !r.length ? n.split("{")[0].trim() : "";
|
|
1096
1136
|
if (n = n && u(n, String) ? [n] : n, r = r && u(r, String) ? [r] : r, (n?.length || r?.length) && (n?.length && t.editCssRules(...n), r)) for (let f2 of r) e.addClass(f2);
|
|
1097
|
-
return
|
|
1137
|
+
return l?.startsWith(".") && e.addClass(l.slice(1)), l?.startsWith("#") && !e.attr("id") && e.prop({ id: l.slice(1) }), e;
|
|
1098
1138
|
} };
|
|
1099
1139
|
} };
|
|
1100
1140
|
}
|
|
1101
|
-
function
|
|
1141
|
+
function ir(t) {
|
|
1102
1142
|
return { addClass(e, ...r) {
|
|
1103
1143
|
return v(e, (n) => n && r.forEach((i) => n.classList.add(i)));
|
|
1104
1144
|
}, after(e, ...r) {
|
|
@@ -1112,10 +1152,10 @@ ${r}`), g2;
|
|
|
1112
1152
|
let n = e.length === 1;
|
|
1113
1153
|
for (let i of r) {
|
|
1114
1154
|
if (!i.isJQx && L(i)) {
|
|
1115
|
-
let
|
|
1155
|
+
let l = i.trim(), S2 = !/^<(.+)[^>]+>$/m.test(l) ? t.text(i) : T(i);
|
|
1116
1156
|
v(e, (y) => y.append(n ? S2 : H(S2)));
|
|
1117
1157
|
}
|
|
1118
|
-
|
|
1158
|
+
O(i) && v(e, (l) => l.append(n ? i : H(i))), i.isJQx && !i.is.empty && v(e, (l) => i.collection.forEach((f2) => l.append(n ? f2 : H(f2))));
|
|
1119
1159
|
}
|
|
1120
1160
|
return e;
|
|
1121
1161
|
}, appendTo(e, r) {
|
|
@@ -1127,21 +1167,21 @@ ${r}`), g2;
|
|
|
1127
1167
|
}
|
|
1128
1168
|
}, attr(e, r, n) {
|
|
1129
1169
|
if (!e.node || u(e.node, Text, Comment)) return e;
|
|
1130
|
-
if (!n && L(r)) return r =
|
|
1131
|
-
if (L(r) && n) switch (r =
|
|
1170
|
+
if (!n && L(r)) return r = F(r), r === "class" ? [...e.node.classList].join(" ") : e.node.getAttribute(r);
|
|
1171
|
+
if (L(r) && n) switch (r = F(r), true) {
|
|
1132
1172
|
case r.startsWith("data-"):
|
|
1133
1173
|
r = { data: { [r.replace("data-", "")]: n } };
|
|
1134
1174
|
break;
|
|
1135
1175
|
default:
|
|
1136
1176
|
r = { [r]: n };
|
|
1137
1177
|
}
|
|
1138
|
-
return u(r, Object) && !e.is.empty &&
|
|
1178
|
+
return u(r, Object) && !e.is.empty && Ae(e.node, r), e;
|
|
1139
1179
|
}, before(e, ...r) {
|
|
1140
1180
|
return D(e, t, false, ...r);
|
|
1141
1181
|
}, beforeMe(e, ...r) {
|
|
1142
1182
|
D(e, t, false, ...r);
|
|
1143
1183
|
}, clear(e) {
|
|
1144
|
-
return v(e,
|
|
1184
|
+
return v(e, se);
|
|
1145
1185
|
}, closest(e, r) {
|
|
1146
1186
|
let n = L(r) ? e.node?.closest(r) : void 0;
|
|
1147
1187
|
return n ? t(n) : e;
|
|
@@ -1149,21 +1189,21 @@ ${r}`), g2;
|
|
|
1149
1189
|
let { node: n } = e;
|
|
1150
1190
|
return n && getComputedStyle(n)[r];
|
|
1151
1191
|
}, css(e, r, n) {
|
|
1152
|
-
return v(e, (i) =>
|
|
1192
|
+
return v(e, (i) => nt(i, r, n, t));
|
|
1153
1193
|
}, duplicate(e, r = false, n = document.body) {
|
|
1154
1194
|
switch (true) {
|
|
1155
1195
|
case e.is.empty:
|
|
1156
1196
|
return w.error("Duplicating an empty JQx instance is not possible"), e;
|
|
1157
1197
|
default:
|
|
1158
1198
|
let i = e.collection[0].cloneNode(true);
|
|
1159
|
-
return i.childNodes.forEach((
|
|
1160
|
-
|
|
1199
|
+
return i.childNodes.forEach((l) => {
|
|
1200
|
+
l.removeAttribute && l?.removeAttribute("id");
|
|
1161
1201
|
}), r ? t(i).toDOM(n) : t.virtual(i);
|
|
1162
1202
|
}
|
|
1163
1203
|
}, each(e, r) {
|
|
1164
1204
|
return v(e, r);
|
|
1165
1205
|
}, empty(e) {
|
|
1166
|
-
return v(e,
|
|
1206
|
+
return v(e, se);
|
|
1167
1207
|
}, find(e, r) {
|
|
1168
1208
|
return e.collection.length > 0 ? [...e.first()?.querySelectorAll(r)] : [];
|
|
1169
1209
|
}, find$(e, r) {
|
|
@@ -1177,7 +1217,7 @@ ${r}`), g2;
|
|
|
1177
1217
|
}, hasClass(e, ...r) {
|
|
1178
1218
|
return e.is.empty || !e.node.classList.length ? false : r.find((n) => e.node.classList.contains(n)) && true || false;
|
|
1179
1219
|
}, hide(e) {
|
|
1180
|
-
return v(e, (r) =>
|
|
1220
|
+
return v(e, (r) => Y(r, { display: "none !important" }));
|
|
1181
1221
|
}, html(e, r, n) {
|
|
1182
1222
|
switch (true) {
|
|
1183
1223
|
case (e.is.empty && !L(r)):
|
|
@@ -1190,10 +1230,10 @@ ${r}`), g2;
|
|
|
1190
1230
|
}
|
|
1191
1231
|
}, htmlFor(e, r, n = "", i = false) {
|
|
1192
1232
|
if (e.is.empty || !L(r) || !L(n)) return e;
|
|
1193
|
-
let
|
|
1194
|
-
if (
|
|
1233
|
+
let l = e.find$(r);
|
|
1234
|
+
if (l.length < 1) return e;
|
|
1195
1235
|
let f2 = T(`<span>${n}</span>`);
|
|
1196
|
-
return
|
|
1236
|
+
return l.each((S2) => {
|
|
1197
1237
|
i || (S2.textContent = ""), S2.insertAdjacentHTML(t.at.end, f2?.getHTML());
|
|
1198
1238
|
}), e;
|
|
1199
1239
|
}, isEmpty(e) {
|
|
@@ -1223,7 +1263,7 @@ ${r}`), g2;
|
|
|
1223
1263
|
let f2 = !/^<(.+)[^>]+>$/m.test(i) ? t.text(i) : T(i);
|
|
1224
1264
|
f2 = n ? f2 : H(f2), v(e, (S2) => S2.prepend(f2.cloneNode(true)));
|
|
1225
1265
|
}
|
|
1226
|
-
|
|
1266
|
+
O(i) && v(e, (l) => l.prepend(n ? i : H(i))), i.isJQx && !i.is.empty && (i.collection.length > 1 && i.collection.reverse(), v(e, (l) => v(i, (f2) => l.prepend(n ? f2 : H(f2)))), i.collection.reverse());
|
|
1227
1267
|
}
|
|
1228
1268
|
return e;
|
|
1229
1269
|
}, prependTo(e, r) {
|
|
@@ -1236,20 +1276,20 @@ ${r}`), g2;
|
|
|
1236
1276
|
}, prop(e, r, n) {
|
|
1237
1277
|
if (u(r, String) && !n) return r.startsWith("data") ? e[0]?.dataset[r.slice(r.indexOf("-") + 1)] : e[0]?.[r];
|
|
1238
1278
|
let i = u(r, Object) ? r : { [r]: n };
|
|
1239
|
-
for (let [
|
|
1240
|
-
if (
|
|
1241
|
-
if (
|
|
1279
|
+
for (let [l, f2] of Object.entries(i)) {
|
|
1280
|
+
if (l = l.trim(), f2 && !ie(l) || !f2) return false;
|
|
1281
|
+
if (l.toLowerCase() === "id") return e[0].id = f2;
|
|
1242
1282
|
v(e, (y) => {
|
|
1243
|
-
if (
|
|
1244
|
-
y[
|
|
1283
|
+
if (l.startsWith("data")) return y.dataset[l.slice(l.indexOf("-") + 1)] = f2;
|
|
1284
|
+
y[l] = f2;
|
|
1245
1285
|
});
|
|
1246
1286
|
}
|
|
1247
1287
|
return e;
|
|
1248
1288
|
}, remove(e, r) {
|
|
1249
|
-
let n = (
|
|
1289
|
+
let n = (l) => l.remove(), i = () => e.collection = e.collection.filter((l) => document.documentElement.contains(l));
|
|
1250
1290
|
if (r) {
|
|
1251
|
-
let
|
|
1252
|
-
return
|
|
1291
|
+
let l = e.find$(r);
|
|
1292
|
+
return l.is.empty || (v(l, n), i()), e;
|
|
1253
1293
|
}
|
|
1254
1294
|
return v(e, n), i(), e;
|
|
1255
1295
|
}, rmAttr(e, ...r) {
|
|
@@ -1263,20 +1303,20 @@ ${r}`), g2;
|
|
|
1263
1303
|
return r = u(r, HTMLElement) || r.isJQx ? r : document.body, n = u(n, String) && t.at[n] ? n : t.at.end, e.first$().toDOM(r, n), e;
|
|
1264
1304
|
}, replace(e, r, n) {
|
|
1265
1305
|
let i = e.node;
|
|
1266
|
-
return !r || !u(n, HTMLElement) && !n?.isJQx ? (t.logger.error("JQx replace: invalid replacement value"), e) : ((n.isJQx || u(n, NodeList)) && (n = n[0]), i && r && (r = u(r, String) ? i.querySelectorAll(r) : r.isJQx ? r.collection : r, u(r, HTMLElement, NodeList, Array) && u(n, HTMLElement) && (u(r, HTMLElement) ? [r] : [...r]).forEach((
|
|
1306
|
+
return !r || !u(n, HTMLElement) && !n?.isJQx ? (t.logger.error("JQx replace: invalid replacement value"), e) : ((n.isJQx || u(n, NodeList)) && (n = n[0]), i && r && (r = u(r, String) ? i.querySelectorAll(r) : r.isJQx ? r.collection : r, u(r, HTMLElement, NodeList, Array) && u(n, HTMLElement) && (u(r, HTMLElement) ? [r] : [...r]).forEach((l) => l.replaceWith(n.cloneNode(true)))), e);
|
|
1267
1307
|
}, replaceClass(e, r, ...n) {
|
|
1268
1308
|
return v(e, (i) => {
|
|
1269
1309
|
i.classList.remove(r);
|
|
1270
|
-
for (let
|
|
1310
|
+
for (let l of n) i.classList.add(l);
|
|
1271
1311
|
});
|
|
1272
1312
|
}, replaceMe(e, r) {
|
|
1273
1313
|
return e.replaceWith(r);
|
|
1274
1314
|
}, replaceWith(e, r) {
|
|
1275
1315
|
return r = u(r, Element) ? r : r.isJQx ? r[0] : void 0, r && (e[0].replaceWith(r), e = t.virtual(r)), e;
|
|
1276
1316
|
}, setData(e, r) {
|
|
1277
|
-
return v(e, (n) =>
|
|
1317
|
+
return v(e, (n) => le(n, r));
|
|
1278
1318
|
}, show(e) {
|
|
1279
|
-
return v(e, (r) =>
|
|
1319
|
+
return v(e, (r) => Y(r, { display: "revert-layer !important" }));
|
|
1280
1320
|
}, single(e, r) {
|
|
1281
1321
|
let n = e.collection.length > 0;
|
|
1282
1322
|
switch (r = r ?? 0, true) {
|
|
@@ -1290,8 +1330,8 @@ ${r}`), g2;
|
|
|
1290
1330
|
return e;
|
|
1291
1331
|
}
|
|
1292
1332
|
}, style(e, r, n) {
|
|
1293
|
-
return v(e, (
|
|
1294
|
-
n && u(r, String) && (r = { [r]: n || "none" }),
|
|
1333
|
+
return v(e, (l) => {
|
|
1334
|
+
n && u(r, String) && (r = { [r]: n || "none" }), Y(l, r);
|
|
1295
1335
|
});
|
|
1296
1336
|
}, text(e, r, n = false) {
|
|
1297
1337
|
switch (true) {
|
|
@@ -1310,8 +1350,8 @@ ${r}`), g2;
|
|
|
1310
1350
|
return [...e.collection].map((r) => document.importNode(r, true));
|
|
1311
1351
|
}, trigger(e, r, n, i) {
|
|
1312
1352
|
n = u(n, Function) ? n : Event, i = u(i, Object) ? { ...i, bubbles: i.bubbles ?? true } : { bubbles: true };
|
|
1313
|
-
let
|
|
1314
|
-
return e.is.empty || e.each((f2) => f2.dispatchEvent(
|
|
1353
|
+
let l = new n(r, i);
|
|
1354
|
+
return e.is.empty || e.each((f2) => f2.dispatchEvent(l)), e;
|
|
1315
1355
|
}, val(e, r) {
|
|
1316
1356
|
switch (true) {
|
|
1317
1357
|
case (e.is.empty || !u(e.node, HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement)):
|
|
@@ -1323,22 +1363,22 @@ ${r}`), g2;
|
|
|
1323
1363
|
}
|
|
1324
1364
|
} };
|
|
1325
1365
|
}
|
|
1326
|
-
var
|
|
1327
|
-
var
|
|
1328
|
-
var { isComment:
|
|
1329
|
-
function
|
|
1330
|
-
return { ...
|
|
1366
|
+
var Ne;
|
|
1367
|
+
var de;
|
|
1368
|
+
var { isComment: cn, isText: fn, isHtmlString: dn, isArrayOfHtmlElements: mn, isArrayOfHtmlStrings: gn, ElemArray2HtmlString: pn, cssRuleEdit: Oe, addFn: sr } = lr();
|
|
1369
|
+
function lr() {
|
|
1370
|
+
return { ...tt(), addFn: ar };
|
|
1331
1371
|
}
|
|
1332
|
-
function
|
|
1333
|
-
return t = t?.trim(), !L(t) || !u(e, Function) ? w.error("JQx.fn: method invalid parameter(s)") : (
|
|
1372
|
+
function ar(t, e) {
|
|
1373
|
+
return t = t?.trim(), !L(t) || !u(e, Function) ? w.error("JQx.fn: method invalid parameter(s)") : (de[t] = (r, ...n) => e(r, ...n), w.log(`JQx: added extension function [${t}]`));
|
|
1334
1374
|
}
|
|
1335
|
-
function
|
|
1375
|
+
function ur(t) {
|
|
1336
1376
|
return function(e, r, n) {
|
|
1337
1377
|
if (e = e?.trim(), !L(e) || !u(r, Function)) return t.error("JQx.staticFn: invalid parameter(s)");
|
|
1338
1378
|
let i = n ? { get() {
|
|
1339
1379
|
return r();
|
|
1340
|
-
} } : { value(...
|
|
1341
|
-
return r(...
|
|
1380
|
+
} } : { value(...l) {
|
|
1381
|
+
return r(...l);
|
|
1342
1382
|
} };
|
|
1343
1383
|
try {
|
|
1344
1384
|
Object.defineProperty(t, e, i);
|
|
@@ -1348,153 +1388,153 @@ ${r}`), g2;
|
|
|
1348
1388
|
return w.log(`JQx: added static extension function [${e}]`);
|
|
1349
1389
|
};
|
|
1350
1390
|
}
|
|
1351
|
-
function
|
|
1352
|
-
return new Proxy(t, Object.freeze({ get: (e, r) =>
|
|
1391
|
+
function X(t) {
|
|
1392
|
+
return new Proxy(t, Object.freeze({ get: (e, r) => cr(e, r, t) }));
|
|
1353
1393
|
}
|
|
1354
|
-
function
|
|
1355
|
-
return (...r) => u(t, Function) && t(
|
|
1394
|
+
function it(t, e) {
|
|
1395
|
+
return (...r) => u(t, Function) && t(X(e), ...r);
|
|
1356
1396
|
}
|
|
1357
|
-
function
|
|
1397
|
+
function cr(t, e, r) {
|
|
1358
1398
|
switch (true) {
|
|
1359
1399
|
case u(e, Symbol):
|
|
1360
|
-
return
|
|
1400
|
+
return $({ trial: () => t[e], whenError: () => t });
|
|
1361
1401
|
case u(+e, Number):
|
|
1362
1402
|
return t.collection?.[e] || void 0;
|
|
1363
|
-
case e in
|
|
1364
|
-
return
|
|
1365
|
-
case e in
|
|
1366
|
-
return
|
|
1403
|
+
case e in Ne:
|
|
1404
|
+
return it(Ne[e], r)();
|
|
1405
|
+
case e in de:
|
|
1406
|
+
return it(de[e], r);
|
|
1367
1407
|
default:
|
|
1368
1408
|
return t[e];
|
|
1369
1409
|
}
|
|
1370
1410
|
}
|
|
1371
|
-
function
|
|
1372
|
-
let e =
|
|
1411
|
+
function at(t) {
|
|
1412
|
+
let e = pr(t);
|
|
1373
1413
|
for (let [r, n] of Object.entries(Object.getOwnPropertyDescriptors(e))) Object.defineProperty(t, r, n);
|
|
1374
1414
|
return t;
|
|
1375
1415
|
}
|
|
1376
|
-
function
|
|
1416
|
+
function fr(t) {
|
|
1377
1417
|
return { allow(e) {
|
|
1378
1418
|
let r = /-/.test(e), n = r && e;
|
|
1379
|
-
e = r ?
|
|
1419
|
+
e = r ? _(e) : e.toLowerCase(), N.allowTag(e), Object.defineProperties(t, Pe(e, true, t, n));
|
|
1380
1420
|
}, prohibit(e) {
|
|
1381
|
-
e = e.toLowerCase(),
|
|
1421
|
+
e = e.toLowerCase(), N.prohibitTag(e), Object.defineProperties(t, Pe(e, false, t));
|
|
1382
1422
|
} };
|
|
1383
1423
|
}
|
|
1384
|
-
function
|
|
1424
|
+
function st(...t) {
|
|
1385
1425
|
if (t.length === 1) {
|
|
1386
1426
|
let e = String(t.shift().trim());
|
|
1387
1427
|
t = e.startsWith("!") ? [e.slice(1, -1)] : e.split(",").map((r) => r.trim());
|
|
1388
1428
|
}
|
|
1389
|
-
for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r))
|
|
1429
|
+
for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r)) Oe(e, { removeRule: 1 });
|
|
1390
1430
|
}
|
|
1391
|
-
function
|
|
1431
|
+
function dr(t) {
|
|
1392
1432
|
return function(e, r, n) {
|
|
1393
|
-
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(A).find((
|
|
1433
|
+
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(A).find((l) => n === l);
|
|
1394
1434
|
let i = t(e, document.createElement("br"));
|
|
1395
|
-
if (r && !u(r, HTMLBRElement)) for (let
|
|
1435
|
+
if (r && !u(r, HTMLBRElement)) for (let l of i.collection) n ? r.insertAdjacentElement(n, l) : r.append(l);
|
|
1396
1436
|
return i;
|
|
1397
1437
|
};
|
|
1398
1438
|
}
|
|
1399
|
-
function
|
|
1439
|
+
function mr(...t) {
|
|
1400
1440
|
let e = {};
|
|
1401
1441
|
for (let r of t) {
|
|
1402
1442
|
let n = Object.getOwnPropertyDescriptors(r);
|
|
1403
|
-
for (let [i,
|
|
1443
|
+
for (let [i, l] of Object.entries(n)) !(i in e) && Object.defineProperty(e, i, { ...l, enumerable: false });
|
|
1404
1444
|
}
|
|
1405
1445
|
return e;
|
|
1406
1446
|
}
|
|
1407
|
-
function
|
|
1408
|
-
return t =
|
|
1447
|
+
function gr(t, e, r, n) {
|
|
1448
|
+
return t = F(n || t.toLowerCase()), { get() {
|
|
1409
1449
|
return (...i) => {
|
|
1410
|
-
let
|
|
1411
|
-
return w.log(e ? `JQx: created (virtual) instance from [JQx].${t} ${S2}` : `JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),
|
|
1450
|
+
let l = e && r.virtual(M(B[t](...i))) || void 0, S2 = !u(l?.node, Comment, Text, void 0) ? Le(l) : "";
|
|
1451
|
+
return w.log(e ? `JQx: created (virtual) instance from [JQx].${t} ${S2}` : `JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`), l;
|
|
1412
1452
|
};
|
|
1413
1453
|
}, enumerable: false, configurable: true };
|
|
1414
1454
|
}
|
|
1415
|
-
function
|
|
1455
|
+
function Pe(t, e, r, n) {
|
|
1416
1456
|
t = t.toLowerCase();
|
|
1417
|
-
let i =
|
|
1418
|
-
return n ? { [n]: i, [
|
|
1457
|
+
let i = gr(t, e, r, n);
|
|
1458
|
+
return n ? { [n]: i, [_(n)]: i } : { [t]: i, [t.toUpperCase()]: i };
|
|
1419
1459
|
}
|
|
1420
|
-
function
|
|
1421
|
-
return
|
|
1460
|
+
function pr(t) {
|
|
1461
|
+
return mr(Object.entries(N.tagsRaw).reduce(yr(t), {}), vr(t));
|
|
1422
1462
|
}
|
|
1423
|
-
function
|
|
1463
|
+
function yr(t) {
|
|
1424
1464
|
return function(e, [r, n]) {
|
|
1425
|
-
return Object.defineProperties(e,
|
|
1465
|
+
return Object.defineProperties(e, Pe(r, n, t)), e;
|
|
1426
1466
|
};
|
|
1427
1467
|
}
|
|
1428
|
-
function
|
|
1468
|
+
function br(t) {
|
|
1429
1469
|
return function(e, r, ...n) {
|
|
1430
1470
|
u(r, Function) && (n.push(r), r = void 0), t({ type: e, selector: r, handlers: n });
|
|
1431
1471
|
};
|
|
1432
1472
|
}
|
|
1433
|
-
function
|
|
1473
|
+
function hr(t) {
|
|
1434
1474
|
return function(e) {
|
|
1435
|
-
let { type: r, types: n, origin: i, selector:
|
|
1436
|
-
f2 = S2 || f2, r = n || r,
|
|
1437
|
-
let h2 =
|
|
1475
|
+
let { type: r, types: n, origin: i, selector: l, handler: f2, handlers: S2, node: y, name: x2, capture: d, once: b2, about: m } = e;
|
|
1476
|
+
f2 = S2 || f2, r = n || r, l = i || l;
|
|
1477
|
+
let h2 = Fe(r), g2 = x2;
|
|
1438
1478
|
f2 = u(f2, Function) ? [f2] : f2;
|
|
1439
|
-
let c = { type: h2, selector:
|
|
1479
|
+
let c = { type: h2, selector: l || i, capture: d, name: g2, once: b2, node: y, about: m };
|
|
1440
1480
|
switch (true) {
|
|
1441
1481
|
case (u(h2, Array) && h2.length > 0):
|
|
1442
|
-
for (let o of h2) c.type = o,
|
|
1482
|
+
for (let o of h2) c.type = o, lt(f2, c, t);
|
|
1443
1483
|
break;
|
|
1444
1484
|
default:
|
|
1445
|
-
return
|
|
1485
|
+
return lt(f2, c, t);
|
|
1446
1486
|
}
|
|
1447
1487
|
};
|
|
1448
1488
|
}
|
|
1449
|
-
function
|
|
1489
|
+
function lt(t, e, r) {
|
|
1450
1490
|
for (let n of t) r.listen({ ...e, handler: n });
|
|
1451
1491
|
}
|
|
1452
|
-
function
|
|
1492
|
+
function Sr(t) {
|
|
1453
1493
|
return function(e, r) {
|
|
1454
1494
|
return r = L(r) && r, e = L(e) && e, r && e && t.listenerStore[e][r];
|
|
1455
1495
|
};
|
|
1456
1496
|
}
|
|
1457
|
-
function
|
|
1458
|
-
return t.activePopup || Object.defineProperty(t, "activePopup", { value:
|
|
1497
|
+
function xr(t) {
|
|
1498
|
+
return t.activePopup || Object.defineProperty(t, "activePopup", { value: ee(t), enumerable: false }), t.activePopup;
|
|
1459
1499
|
}
|
|
1460
|
-
function
|
|
1461
|
-
let e = (d, b2) =>
|
|
1462
|
-
return
|
|
1500
|
+
function Er(t) {
|
|
1501
|
+
let e = (d, b2) => Oe(d, b2), r = function(d) {
|
|
1502
|
+
return z({ createWithId: d || `jqx${ue()}` });
|
|
1463
1503
|
}, n = function(...d) {
|
|
1464
|
-
for (let b2 of d)
|
|
1465
|
-
}, i =
|
|
1466
|
-
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit: i, handle: f2, capturedHandling: f2, log: (...d) => w.on.log(...d).off, warn: (...d) => w.on.warn(...d).off, error: (...d) => w.on.error(...d).off, handlerWrapper:
|
|
1467
|
-
}
|
|
1468
|
-
function
|
|
1469
|
-
let { factoryExtensions: e, instanceExtensions: r } =
|
|
1470
|
-
|
|
1471
|
-
let { editCssRule: n, createStyle: i, editCssRules:
|
|
1472
|
-
return { log: x2, warn: d, error: b2, editCssRules:
|
|
1504
|
+
for (let b2 of d) Oe(b2);
|
|
1505
|
+
}, i = fr(t), l = te(t), f2 = hr(l);
|
|
1506
|
+
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit: i, handle: f2, capturedHandling: f2, log: (...d) => w.on.log(...d).off, warn: (...d) => w.on.warn(...d).off, error: (...d) => w.on.error(...d).off, handlerWrapper: l };
|
|
1507
|
+
}
|
|
1508
|
+
function vr(t) {
|
|
1509
|
+
let { factoryExtensions: e, instanceExtensions: r } = ot(t);
|
|
1510
|
+
Ne = e, de = r;
|
|
1511
|
+
let { editCssRule: n, createStyle: i, editCssRules: l, allowProhibit: f2, handle: S2, capturedHandling: y, log: x2, warn: d, error: b2, handlerWrapper: m } = Er(t), h2 = Sr(t), g2 = ur(t);
|
|
1512
|
+
return B.setError = (c) => (b2(`JQx direct element creation error: [${c}] is not a valid tag`), t.br()), { log: x2, warn: d, error: b2, editCssRules: l, createStyle: i, editStylesheet: i, editCssRule: n, escHtml: P, logger: w, text(c, o = false) {
|
|
1473
1513
|
return o ? t.comment(c) : document.createTextNode(c);
|
|
1474
1514
|
}, node(c, o = document) {
|
|
1475
1515
|
return o.querySelector(c, o);
|
|
1476
1516
|
}, nodes(c, o = document) {
|
|
1477
1517
|
return [...o.querySelectorAll(c, o)];
|
|
1478
|
-
}, clearAllTimers:
|
|
1518
|
+
}, clearAllTimers: we, get staticFn() {
|
|
1479
1519
|
return function(c, o, s) {
|
|
1480
1520
|
return g2(c, o, s);
|
|
1481
1521
|
};
|
|
1482
1522
|
}, get toBool() {
|
|
1483
|
-
return
|
|
1523
|
+
return Ce;
|
|
1484
1524
|
}, get getNamedListener() {
|
|
1485
1525
|
return h2;
|
|
1486
1526
|
}, get virtual() {
|
|
1487
|
-
return
|
|
1527
|
+
return dr(t);
|
|
1488
1528
|
}, get allowTag() {
|
|
1489
1529
|
return f2.allow;
|
|
1490
1530
|
}, get prohibitTag() {
|
|
1491
1531
|
return f2.prohibit;
|
|
1492
1532
|
}, get removeCssRule() {
|
|
1493
|
-
return
|
|
1533
|
+
return st;
|
|
1494
1534
|
}, get removeCssRules() {
|
|
1495
|
-
return
|
|
1535
|
+
return st;
|
|
1496
1536
|
}, get delegate() {
|
|
1497
|
-
return
|
|
1537
|
+
return br(y);
|
|
1498
1538
|
}, get delegateCaptured() {
|
|
1499
1539
|
return y;
|
|
1500
1540
|
}, get handle() {
|
|
@@ -1506,42 +1546,42 @@ ${r}`), g2;
|
|
|
1506
1546
|
}, get setStyle() {
|
|
1507
1547
|
return n;
|
|
1508
1548
|
}, get fn() {
|
|
1509
|
-
return
|
|
1549
|
+
return sr;
|
|
1510
1550
|
}, get lenient() {
|
|
1511
|
-
return
|
|
1551
|
+
return N.allowUnknownHtmlTags;
|
|
1512
1552
|
}, get IS() {
|
|
1513
1553
|
return u;
|
|
1514
1554
|
}, get Popup() {
|
|
1515
|
-
return
|
|
1555
|
+
return xr(t);
|
|
1516
1556
|
}, get listenerStore() {
|
|
1517
1557
|
return m.ListenerStore;
|
|
1518
1558
|
} };
|
|
1519
1559
|
}
|
|
1520
|
-
var
|
|
1521
|
-
function
|
|
1560
|
+
var ut = at(wr());
|
|
1561
|
+
function wr() {
|
|
1522
1562
|
return function(e, r, n = A.BeforeEnd) {
|
|
1523
1563
|
if (e?.isJQx) return e;
|
|
1524
1564
|
let i = u(r, HTMLBRElement);
|
|
1525
1565
|
r = (!i && r && r.isJQx ? r[0] : r) || document.body, n = n && Object.values(A).find((d) => n === d) ? n : void 0;
|
|
1526
|
-
let
|
|
1566
|
+
let l = V(e), S2 = !l && fe(e) || l, y = { collection: ae(e) ?? [], isVirtual: i, isJQx: true }, x2 = U(y.collection);
|
|
1527
1567
|
if (y.collection.length && x2) return i || y.collection.forEach((d) => {
|
|
1528
1568
|
r.contains(d) || I([d], r, n);
|
|
1529
|
-
}),
|
|
1569
|
+
}), X(y);
|
|
1530
1570
|
if (S2) {
|
|
1531
1571
|
if ([e].flat().forEach((d) => y.collection.push(T(d))), y.collection.length > 0) {
|
|
1532
1572
|
let d = y.collection.filter((g2) => g2?.dataset?.jqxcreationerror);
|
|
1533
1573
|
y.collection = y.collection.filter((g2) => !g2?.dataset?.jqxcreationerror);
|
|
1534
1574
|
let m = y.collection.map((g2) => `${String(g2.constructor).split(/function|\(/)[1].trim()}`).length > 1;
|
|
1535
|
-
y =
|
|
1536
|
-
let h2 = y.collection.length > 0 ?
|
|
1575
|
+
y = X(y);
|
|
1576
|
+
let h2 = y.collection.length > 0 ? et(y) : "sanitized: no elements remaining";
|
|
1537
1577
|
w.log(`JQx: created ${y.isVirtual ? "(virtual)" : ""} instance from ${m ? "array of " : ""}HTML string${m ? "s" : ""} ${h2}`), y.isVirtual || I(y.collection, r, n);
|
|
1538
1578
|
}
|
|
1539
1579
|
return y;
|
|
1540
1580
|
}
|
|
1541
|
-
return
|
|
1581
|
+
return $e(e, r, y), X(y);
|
|
1542
1582
|
};
|
|
1543
1583
|
}
|
|
1544
|
-
var
|
|
1584
|
+
var En = ut;
|
|
1545
1585
|
|
|
1546
1586
|
// ../Resource/Externals/ticktock.min.js
|
|
1547
1587
|
var M2 = ke2();
|
|
@@ -1628,9 +1668,9 @@ ${r}`), g2;
|
|
|
1628
1668
|
}), t;
|
|
1629
1669
|
};
|
|
1630
1670
|
}
|
|
1631
|
-
var
|
|
1671
|
+
var ge = le2();
|
|
1632
1672
|
var ye2 = Ye2();
|
|
1633
|
-
var
|
|
1673
|
+
var N2 = ie2();
|
|
1634
1674
|
var We2 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
1635
1675
|
var he2 = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
|
|
1636
1676
|
function q2(e, r = false) {
|
|
@@ -1640,7 +1680,7 @@ ${r}`), g2;
|
|
|
1640
1680
|
return e;
|
|
1641
1681
|
}
|
|
1642
1682
|
function H2(e, ...r) {
|
|
1643
|
-
return
|
|
1683
|
+
return N2(e, ...r), e;
|
|
1644
1684
|
}
|
|
1645
1685
|
function De2(e, r = false) {
|
|
1646
1686
|
let n = Q2(e.clone, { sunday: r }), t = [n];
|
|
@@ -1658,7 +1698,7 @@ ${r}`), g2;
|
|
|
1658
1698
|
return n = (n || "").startsWith("+") ? `${t.localeInfo.formatOptions},${n.slice(1)}` : n || t.localeInfo.formatOptions, M2(t, r, n);
|
|
1659
1699
|
}
|
|
1660
1700
|
function Te2(e, r) {
|
|
1661
|
-
let n =
|
|
1701
|
+
let n = ge({ start: e, end: r || e });
|
|
1662
1702
|
return parseInt(`${n.sign}${n.diffInDays}`);
|
|
1663
1703
|
}
|
|
1664
1704
|
function G2(e, r = false) {
|
|
@@ -1697,8 +1737,8 @@ ${r}`), g2;
|
|
|
1697
1737
|
return n = A2(n.slice(0, 3) + ":" + n.slice(-2), true), t = A2(t.slice(0, 3) + ":" + t.slice(-2), true), [-n[0] + t[0], -n[1] + t[1]].map((a) => n[0] < 0 ? -a : a);
|
|
1698
1738
|
}
|
|
1699
1739
|
function R2({ start: e, end: r } = {}) {
|
|
1700
|
-
r || (r = e.clone), r?.clone || (r = f(r, { timeZone: e.timeZone })), e = f(
|
|
1701
|
-
let n =
|
|
1740
|
+
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 });
|
|
1741
|
+
let n = ge({ 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} ${C(o, "hour")}`, `${s} ${C(s, "minute")}`];
|
|
1702
1742
|
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;
|
|
1703
1743
|
}
|
|
1704
1744
|
function X2(e, r) {
|
|
@@ -1709,18 +1749,18 @@ ${r}`), g2;
|
|
|
1709
1749
|
function ce2(e, r = 2) {
|
|
1710
1750
|
return `${e}`.padStart(r, "0");
|
|
1711
1751
|
}
|
|
1712
|
-
function
|
|
1752
|
+
function C(e, r) {
|
|
1713
1753
|
return `${r}${e > 1 || e === 0 ? "s" : ""}`;
|
|
1714
1754
|
}
|
|
1715
1755
|
function je2(e) {
|
|
1716
1756
|
if (/00:00/.test(e)) return "no time diffence to";
|
|
1717
|
-
let r = e.slice(1).split(":").map(Number), [n, t] = r, a =
|
|
1757
|
+
let r = e.slice(1).split(":").map(Number), [n, t] = r, a = C(n, "hour"), o = C(t, "minute"), s = e.startsWith("+");
|
|
1718
1758
|
return t > 0 ? `${n} ${a} and ${t} ${o} ${s ? "ahead of" : "behind"}` : `${n} ${a} ${s ? "ahead of" : "behind"}`;
|
|
1719
1759
|
}
|
|
1720
1760
|
function me(e, r, n) {
|
|
1721
1761
|
return e.clone.format(r, n || e.localeInfo.formatOptions);
|
|
1722
1762
|
}
|
|
1723
|
-
function
|
|
1763
|
+
function pe(e, { withFormat: r, withFormatOptions: n, local: t = false } = {}) {
|
|
1724
1764
|
if (r) return t ? me(e, r, $D.localeInformation.formatOptions) : me(e, r, n);
|
|
1725
1765
|
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)`;
|
|
1726
1766
|
return a.format(u2, o + ",tzn:long, hrc:23");
|
|
@@ -1768,7 +1808,7 @@ ${r}`), g2;
|
|
|
1768
1808
|
let { locale: t, timeZone: a } = e.localeInfo;
|
|
1769
1809
|
return r ? new Date(e).toLocaleDateString(t, { timeZone: a }) : n ? new Date(e).toLocaleTimeString(t, { timeZone: a }) : new Date(e).toLocaleString(t, { timeZone: a });
|
|
1770
1810
|
}
|
|
1771
|
-
function
|
|
1811
|
+
function fe2(e, r) {
|
|
1772
1812
|
let n = { timeZone: r, hourCycle: "h23" };
|
|
1773
1813
|
return new Date(new Date(e).toLocaleString("en", n));
|
|
1774
1814
|
}
|
|
@@ -1798,12 +1838,12 @@ ${r}`), g2;
|
|
|
1798
1838
|
function Se2(e) {
|
|
1799
1839
|
return e.time = { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 }, e;
|
|
1800
1840
|
}
|
|
1801
|
-
function
|
|
1841
|
+
function de2(e, r) {
|
|
1802
1842
|
return Intl.DateTimeFormat("en-CA", { timeZone: r, timeZoneName: "long" }).format(e).split(/,/)[1].trim();
|
|
1803
1843
|
}
|
|
1804
1844
|
function j2(e, r) {
|
|
1805
1845
|
r = r || e?.timeZone || g.timeZone, e = e?.value ? e : e?.constructor === Date ? f(e, { timeZone: r }) : f({ timeZone: r });
|
|
1806
|
-
let n = e.year || e.getFullYear(), t =
|
|
1846
|
+
let n = e.year || e.getFullYear(), t = de2(new Date(n, 0, 1), r), a = de2(new Date(n, 5, 1), r);
|
|
1807
1847
|
return t !== a;
|
|
1808
1848
|
}
|
|
1809
1849
|
function P2(e, r) {
|
|
@@ -1885,7 +1925,7 @@ ${r}`), g2;
|
|
|
1885
1925
|
}, toArray(o = false) {
|
|
1886
1926
|
return O2(t, o);
|
|
1887
1927
|
}, toString({ template: o, formatOptions: s, local: u2 } = {}) {
|
|
1888
|
-
return
|
|
1928
|
+
return pe(t, { withFormat: o, withFormatOptions: s, local: u2 });
|
|
1889
1929
|
}, values(o = false) {
|
|
1890
1930
|
return o ? t.dateTime : t.zoneDateTime;
|
|
1891
1931
|
}, zoneFormat(o, s) {
|
|
@@ -2117,7 +2157,7 @@ ${r}`), g2;
|
|
|
2117
2157
|
return !Number.isNaN(parseInt(e));
|
|
2118
2158
|
}
|
|
2119
2159
|
function V2(e, r, n) {
|
|
2120
|
-
return e?.constructor === Number ?
|
|
2160
|
+
return e?.constructor === Number ? N2(r, `${e} ${n}`) : r;
|
|
2121
2161
|
}
|
|
2122
2162
|
function Be2(e) {
|
|
2123
2163
|
let r = { addYears(n = 1) {
|
|
@@ -2129,21 +2169,21 @@ ${r}`), g2;
|
|
|
2129
2169
|
}, addDays(n = 1) {
|
|
2130
2170
|
return V2(n, e, "days");
|
|
2131
2171
|
}, get nextYear() {
|
|
2132
|
-
return
|
|
2172
|
+
return N2(e, "1 year");
|
|
2133
2173
|
}, get nextWeek() {
|
|
2134
|
-
return
|
|
2174
|
+
return N2(e, "7 days");
|
|
2135
2175
|
}, get previousWeek() {
|
|
2136
|
-
return
|
|
2176
|
+
return N2(e, "-7 days");
|
|
2137
2177
|
}, get previousYear() {
|
|
2138
|
-
return
|
|
2178
|
+
return N2(e, "-1 year");
|
|
2139
2179
|
}, get nextMonth() {
|
|
2140
2180
|
return q2(e);
|
|
2141
2181
|
}, get previousMonth() {
|
|
2142
2182
|
return q2(e, true);
|
|
2143
2183
|
}, get tomorrow() {
|
|
2144
|
-
return
|
|
2184
|
+
return N2(e, "1 day");
|
|
2145
2185
|
}, get yesterday() {
|
|
2146
|
-
return
|
|
2186
|
+
return N2(e, "-1 day");
|
|
2147
2187
|
} };
|
|
2148
2188
|
for (let n of qe2) r[n.syn] = function(...t) {
|
|
2149
2189
|
return e[n.native](...t), e;
|
|
@@ -2308,7 +2348,7 @@ ${r}`), g2;
|
|
|
2308
2348
|
// ../Resource/Externals/splat.min.js
|
|
2309
2349
|
var { IS: b, maybe: E2, $Wrap: X3, isNothing: j3, xProxy: h, addSymbolicExtensions: T2 } = Y3({ useSymbolicExtensions: false });
|
|
2310
2350
|
function Y3(i = {}) {
|
|
2311
|
-
let { useSymbolicExtensions: a } = i, { shouldbeIsSingleObject: m, ISOneOf: g2, isExcept: P3, verifyNothingness: d, xProxy: x2, determineType:
|
|
2351
|
+
let { useSymbolicExtensions: a } = i, { shouldbeIsSingleObject: m, ISOneOf: g2, isExcept: P3, verifyNothingness: d, xProxy: x2, determineType: N3, addSymbolicExtensions: y, maybe: S2, $Wrap: O3 } = _3(e, a);
|
|
2312
2352
|
return a && y(), { IS: e, maybe: S2, $Wrap: O3, isNothing: d, xProxy: x2, addSymbolicExtensions: y };
|
|
2313
2353
|
function e(c, ...u2) {
|
|
2314
2354
|
let l = typeof c == "symbol" ? Symbol.isSymbol : c;
|
|
@@ -2316,13 +2356,13 @@ ${r}`), g2;
|
|
|
2316
2356
|
case !!S2({ trial: (f2) => "isTypes" in (u2?.[0] ?? {}) }):
|
|
2317
2357
|
return m(c, u2[0]);
|
|
2318
2358
|
default:
|
|
2319
|
-
return u2.length > 1 ? g2(l, ...u2) :
|
|
2359
|
+
return u2.length > 1 ? g2(l, ...u2) : N3(c, ...u2);
|
|
2320
2360
|
}
|
|
2321
2361
|
}
|
|
2322
2362
|
}
|
|
2323
2363
|
function _3(i, a) {
|
|
2324
|
-
let { SymbolAndCustomProxyFactory: m, maybeFactory: g2, WrapAnyFactory: P3, verifyNothingness: d, determineType: x2 } = w2(i, e), { xProxy:
|
|
2325
|
-
return Object.freeze({ shouldbeIsSingleObject: c, ISOneOf: u2, isExcept: f2, verifyNothingness: d, xProxy:
|
|
2364
|
+
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)];
|
|
2365
|
+
return Object.freeze({ shouldbeIsSingleObject: c, ISOneOf: u2, isExcept: f2, verifyNothingness: d, xProxy: N3, determineType: x2, addSymbolicExtensions: y, maybe: S2, $Wrap: O3 });
|
|
2326
2366
|
function e(r) {
|
|
2327
2367
|
return r?.[Symbol.proxy] ?? i(r);
|
|
2328
2368
|
}
|
|
@@ -2381,12 +2421,12 @@ ${r}`), g2;
|
|
|
2381
2421
|
Proxy = d(r, Symbol.proxy);
|
|
2382
2422
|
} };
|
|
2383
2423
|
}
|
|
2384
|
-
function
|
|
2424
|
+
function N3(r, ...t) {
|
|
2385
2425
|
let n = t.length < 1, o = r == null;
|
|
2386
2426
|
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]) };
|
|
2387
2427
|
}
|
|
2388
2428
|
function y(r, ...t) {
|
|
2389
|
-
let { noInput: n, noShouldbe: o, compareTo: s, inputCTOR: A3, isNaN: F3, isInfinity: v3, shouldBeFirstElementIsNothing: p2 } =
|
|
2429
|
+
let { noInput: n, noShouldbe: o, compareTo: s, inputCTOR: A3, isNaN: F3, isInfinity: v3, shouldBeFirstElementIsNothing: p2 } = N3(r, ...t);
|
|
2390
2430
|
switch (t = t.length && t[0], true) {
|
|
2391
2431
|
case p2:
|
|
2392
2432
|
return String(r) === String(s);
|
|
@@ -2466,7 +2506,7 @@ ${r}`), g2;
|
|
|
2466
2506
|
return n = t ? n || b(r, 1 / 0) || b(r, NaN) : n, n;
|
|
2467
2507
|
}
|
|
2468
2508
|
}
|
|
2469
|
-
var
|
|
2509
|
+
var C2 = I3();
|
|
2470
2510
|
var $2 = I3("");
|
|
2471
2511
|
function I3(i, a = {}) {
|
|
2472
2512
|
let { useSymbolicExtensions: m } = a;
|
|
@@ -2489,7 +2529,7 @@ ${r}`), g2;
|
|
|
2489
2529
|
function x2(e, c) {
|
|
2490
2530
|
return e.replace(/\{(?<key>[a-z_\d]+)}/gim, d(c));
|
|
2491
2531
|
}
|
|
2492
|
-
function
|
|
2532
|
+
function N3(e) {
|
|
2493
2533
|
let c = [];
|
|
2494
2534
|
return Object.entries(e).forEach(([u2, l]) => {
|
|
2495
2535
|
l.forEach((f2, r) => (c[r] ??= {}, c[r][u2] = f2));
|
|
@@ -2499,7 +2539,7 @@ ${r}`), g2;
|
|
|
2499
2539
|
return e.length === 1 && Object.values(e[0]).every(Array.isArray);
|
|
2500
2540
|
}
|
|
2501
2541
|
function S2(e) {
|
|
2502
|
-
return y(e) ?
|
|
2542
|
+
return y(e) ? N3(e[0]) : e;
|
|
2503
2543
|
}
|
|
2504
2544
|
function O3(e, c) {
|
|
2505
2545
|
let u2 = c?.length ? c.filter((l) => b(l, Object)).map((l, f2) => x2(e, { ...l, index: f2 + 1 })).join("") : e;
|
|
@@ -2508,7 +2548,7 @@ ${r}`), g2;
|
|
|
2508
2548
|
}
|
|
2509
2549
|
function L3() {
|
|
2510
2550
|
return String.prototype[Symbol.for("interpolate")] || Object.defineProperties(String.prototype, { [Symbol.for("interpolate")]: { value(...i) {
|
|
2511
|
-
return
|
|
2551
|
+
return C2(this, ...i);
|
|
2512
2552
|
} }, [Symbol.for("interpolate$")]: { value(...i) {
|
|
2513
2553
|
return $2(this, ...i);
|
|
2514
2554
|
} } }), [Symbol.for("interpolate"), Symbol.for("interpolate$")];
|
|
@@ -2517,7 +2557,7 @@ ${r}`), g2;
|
|
|
2517
2557
|
// ../index.js
|
|
2518
2558
|
setDefaultStyling();
|
|
2519
2559
|
fixSBLinks2TopProblem();
|
|
2520
|
-
var splatModule = { interpolate:
|
|
2560
|
+
var splatModule = { interpolate: C2, interpolateClear: $2, addSymbolicStringExtensions: L3 };
|
|
2521
2561
|
function fixSBLinks2TopProblem() {
|
|
2522
2562
|
/stackblitz/i.test(location.href) && console.info(`\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it.`);
|
|
2523
2563
|
document.addEventListener(`click`, (evt) => {
|
|
@@ -2531,20 +2571,20 @@ ${r}`), g2;
|
|
|
2531
2571
|
});
|
|
2532
2572
|
}
|
|
2533
2573
|
function logFactory(formatJSON = true) {
|
|
2534
|
-
const logContainer =
|
|
2574
|
+
const logContainer = En(`<ul id="log2screen">`).first();
|
|
2535
2575
|
function logItem(top2 = false) {
|
|
2536
|
-
const where2PutIt = top2 ?
|
|
2576
|
+
const where2PutIt = top2 ? En.at.start : En.at.end;
|
|
2537
2577
|
return (content) => {
|
|
2538
2578
|
if (content?.isJQx) {
|
|
2539
|
-
return
|
|
2579
|
+
return En.li(
|
|
2540
2580
|
content.data.get(`header`) ? { class: `head` } : ``,
|
|
2541
2581
|
content
|
|
2542
2582
|
).renderTo(logContainer, where2PutIt);
|
|
2543
2583
|
}
|
|
2544
|
-
content = !
|
|
2584
|
+
content = !En.IS(content, String, Number, Symbol) ? tryJSON(content, formatJSON) : String(content);
|
|
2545
2585
|
const isHead = content.startsWith(`!!`);
|
|
2546
2586
|
content = isHead ? content.slice(2) : content;
|
|
2547
|
-
|
|
2587
|
+
En.li(isHead ? { class: `head` } : ``, content).renderTo(logContainer, where2PutIt);
|
|
2548
2588
|
};
|
|
2549
2589
|
}
|
|
2550
2590
|
const [logLamda, logTopLambda] = [logItem(), logItem(true)];
|
|
@@ -2561,7 +2601,8 @@ ${r}`), g2;
|
|
|
2561
2601
|
}
|
|
2562
2602
|
}
|
|
2563
2603
|
function setDefaultStyling() {
|
|
2564
|
-
|
|
2604
|
+
En.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';}`);
|
|
2565
2605
|
}
|
|
2566
2606
|
return __toCommonJS(index_exports);
|
|
2567
2607
|
})();
|
|
2608
|
+
//# sourceMappingURL=htmlhelpers.script.js.map
|