dynamic-html-helpers 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Bundle/htmlhelpers.min.js +15 -15
- package/Bundle/htmlhelpers.min.js.map +3 -3
- package/Bundle/htmlhelpers.script.js +867 -1003
- package/Bundle/htmlhelpers.script.js.map +3 -3
- package/Resource/Externals/jqx.min.js +13 -13
- package/Resource/Externals/jqx.min.js.map +3 -3
- package/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
|
+
$: () => yn,
|
|
26
26
|
$D: () => f,
|
|
27
27
|
logFactory: () => logFactory,
|
|
28
28
|
regexhelper: () => REHelper_default,
|
|
@@ -30,819 +30,677 @@ var HTMLHelpers = (() => {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
// ../Resource/Externals/jqx.min.js
|
|
33
|
-
var { IS:
|
|
34
|
-
function
|
|
35
|
-
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept:
|
|
36
|
-
return e &&
|
|
37
|
-
function
|
|
38
|
-
let
|
|
33
|
+
var { IS: a, maybe: P, $Wrap: Er, isNothing: ct, addSymbolicExtensions: Te, detectableProxy: G } = ut({ useSymbolicExtensions: false });
|
|
34
|
+
function ut(t = {}) {
|
|
35
|
+
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: o, verifyNothingness: i, determineType: u, addSymbolicExtensions: S2, maybe: p2, $Wrap: x2, detectableProxy: f2 } = ft(y, e);
|
|
36
|
+
return e && S2(), { IS: y, maybe: p2, $Wrap: x2, isNothing: i, addSymbolicExtensions: S2, detectableProxy: f2 };
|
|
37
|
+
function y(m, ...b2) {
|
|
38
|
+
let d = typeof m == "symbol" ? Symbol.isSymbol : m;
|
|
39
39
|
switch (true) {
|
|
40
|
-
case !!
|
|
41
|
-
return r(m,
|
|
40
|
+
case !!p2({ trial: (c) => "isTypes" in (b2?.[0] ?? {}) }):
|
|
41
|
+
return r(m, b2[0]);
|
|
42
42
|
default:
|
|
43
|
-
return
|
|
43
|
+
return b2.length > 1 ? n(d, ...b2) : u(m, ...b2);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory:
|
|
49
|
-
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf:
|
|
50
|
-
function
|
|
51
|
-
return
|
|
47
|
+
function ft(t, e) {
|
|
48
|
+
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: o, verifyNothingness: i, determineType: u, detectableProxy: S2 } = dt(t, y), { addSymbolicExtensions: p2 } = r(t, y, e), [x2, f2] = [n(), o(t, y)];
|
|
49
|
+
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: b2, isExcept: c, verifyNothingness: i, determineType: u, detectableProxy: S2, addSymbolicExtensions: p2, maybe: x2, $Wrap: f2 });
|
|
50
|
+
function y(s) {
|
|
51
|
+
return s?.[Symbol.proxy] || t(s);
|
|
52
52
|
}
|
|
53
|
-
function m(
|
|
53
|
+
function m(s, l) {
|
|
54
54
|
switch (true) {
|
|
55
|
-
case "defaultValue" in
|
|
56
|
-
return
|
|
57
|
-
case "notTypes" in
|
|
58
|
-
return c(
|
|
55
|
+
case "defaultValue" in l:
|
|
56
|
+
return d(s, l);
|
|
57
|
+
case "notTypes" in l:
|
|
58
|
+
return c(s, l);
|
|
59
59
|
default:
|
|
60
|
-
return t(
|
|
60
|
+
return t(s, ...[l.isTypes].flat());
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
63
|
+
function b2(s, ...l) {
|
|
64
|
+
return l.some((g2) => t(s, g2));
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return
|
|
66
|
+
function d(s, { defaultValue: l, isTypes: g2 = [void 0], notTypes: h2 } = {}) {
|
|
67
|
+
return g2 = g2?.constructor !== Array ? [g2] : g2, h2 = h2 && h2?.constructor !== Array ? [h2] : [], h2.length < 1 ? t(s, ...g2) ? s : l : c(s, { isTypes: g2, notTypes: h2 }) ? s : l;
|
|
68
68
|
}
|
|
69
|
-
function c(
|
|
70
|
-
return
|
|
69
|
+
function c(s, { isTypes: l = [void 0], notTypes: g2 = [void 0] } = {}) {
|
|
70
|
+
return l = l?.constructor !== Array ? [l] : l, g2 = g2?.constructor !== Array ? [g2] : g2, t(s, ...l) && !t(s, ...g2);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.
|
|
75
|
-
return Object.freeze({ SymbolAndCustomProxyFactory:
|
|
76
|
-
function
|
|
73
|
+
function dt() {
|
|
74
|
+
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxyFor" }, e = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" }, r = n();
|
|
75
|
+
return Object.freeze({ SymbolAndCustomProxyFactory: i, maybeFactory: d, WrapAnyFactory: b2, verifyNothingness: c, determineType: p2, detectableProxy: r });
|
|
76
|
+
function n() {
|
|
77
|
+
let s = (h2) => ({ get(E3, F2) {
|
|
78
|
+
return F2 === Symbol.proxy ? `Proxy for ${h2}` : Reflect.get(E3, F2);
|
|
79
|
+
}, has(E3, F2) {
|
|
80
|
+
return F2 === Symbol.proxy ? true : F2 in E3;
|
|
81
|
+
} });
|
|
82
|
+
function l(h2) {
|
|
83
|
+
let E3 = h2.name || h2.constructor.name;
|
|
84
|
+
return new Proxy(h2, s(E3));
|
|
85
|
+
}
|
|
86
|
+
function g2(h2, E3) {
|
|
87
|
+
return E3 = a(E3, Object) ? E3 : {}, l(new Proxy(h2, E3));
|
|
88
|
+
}
|
|
89
|
+
return { wrap: l, create: g2 };
|
|
90
|
+
}
|
|
91
|
+
function o(s, l) {
|
|
77
92
|
Symbol.is || (Symbol.is = Symbol.for(t.IS), Symbol.type = Symbol.for(t.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
78
|
-
return
|
|
79
|
-
}, enumerable: false, configurable:
|
|
80
|
-
return
|
|
81
|
-
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(
|
|
82
|
-
return
|
|
83
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(
|
|
84
|
-
return
|
|
93
|
+
return l(this);
|
|
94
|
+
}, enumerable: false, configurable: true }, [Symbol.is]: { value: function(...g2) {
|
|
95
|
+
return s(this, ...g2);
|
|
96
|
+
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(g2) {
|
|
97
|
+
return l(g2);
|
|
98
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(g2, ...h2) {
|
|
99
|
+
return s(g2, ...h2);
|
|
85
100
|
}, enumerable: false, configurable: false } }));
|
|
86
101
|
}
|
|
87
|
-
function
|
|
88
|
-
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL)
|
|
89
|
-
}
|
|
90
|
-
function
|
|
91
|
-
return (ct(
|
|
92
|
-
}
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
function y(o, ...s) {
|
|
113
|
-
let { noInput: a, noShouldbe: p2, compareTo: E3, inputCTOR: C3, isNaN: me2, isInfinity: ge2, shouldBeFirstElementIsNothing: pe2 } = S2(o, ...s);
|
|
114
|
-
switch (s = s.length && s[0], true) {
|
|
115
|
-
case pe2:
|
|
116
|
-
return String(o) === String(E3);
|
|
117
|
-
case (o?.[Symbol.proxy] && p2):
|
|
118
|
-
return o[Symbol.proxy];
|
|
119
|
-
case me2:
|
|
120
|
-
return p2 ? e.NAN : String(E3) === String(o);
|
|
121
|
-
case ge2:
|
|
122
|
-
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
123
|
-
case a:
|
|
124
|
-
return p2 ? String(o) : String(E3) === String(o);
|
|
125
|
-
case C3 === Boolean:
|
|
126
|
-
return p2 ? e.BOOLEAN : C3 === s;
|
|
102
|
+
function i(s, l, g2) {
|
|
103
|
+
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL), Symbol.proxy = Symbol.for(t.PROXY)), { addSymbolicExtensions: () => o(s, l) };
|
|
104
|
+
}
|
|
105
|
+
function u(s) {
|
|
106
|
+
return (ct(s, true) ? { name: "unknown" } : Object.getPrototypeOf(s)?.constructor).name;
|
|
107
|
+
}
|
|
108
|
+
function S2(s, ...l) {
|
|
109
|
+
let g2 = l.length < 1, h2 = s == null;
|
|
110
|
+
return { noInput: h2, noShouldbe: g2, compareTo: !g2 && l[0], inputCTOR: !h2 && (s?.constructor || Object.getPrototypeOf(s)?.constructor), isNaN: Number.isNaN(s) || P({ trial: (E3) => String(s) === e.NAN }), isInfinity: P({ trial: (E3) => String(s) }) === e.INFINITY, shouldBeFirstElementIsNothing: !g2 && c(l[0]) };
|
|
111
|
+
}
|
|
112
|
+
function p2(s, ...l) {
|
|
113
|
+
let { noInput: g2, noShouldbe: h2, compareTo: E3, inputCTOR: F2, isNaN: st, isInfinity: at, shouldBeFirstElementIsNothing: lt } = S2(s, ...l);
|
|
114
|
+
switch (l = l.length && l[0], true) {
|
|
115
|
+
case lt:
|
|
116
|
+
return String(s) === String(E3);
|
|
117
|
+
case (s?.[Symbol.proxy] && h2):
|
|
118
|
+
return s[Symbol.proxy];
|
|
119
|
+
case st:
|
|
120
|
+
return h2 ? e.NAN : String(E3) === String(s);
|
|
121
|
+
case at:
|
|
122
|
+
return h2 ? e.INFINITY : String(E3) === String(s);
|
|
123
|
+
case g2:
|
|
124
|
+
return h2 ? String(s) : String(E3) === String(s);
|
|
125
|
+
case F2 === Boolean:
|
|
126
|
+
return h2 ? e.BOOLEAN : F2 === l;
|
|
127
127
|
default:
|
|
128
|
-
return
|
|
128
|
+
return f2(s, l, h2, x2(s, F2));
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
function x2(
|
|
131
|
+
function x2(s, l) {
|
|
132
132
|
switch (true) {
|
|
133
|
-
case
|
|
133
|
+
case s === 0:
|
|
134
134
|
return Number;
|
|
135
|
-
case
|
|
135
|
+
case s === "":
|
|
136
136
|
return String;
|
|
137
|
-
case !
|
|
138
|
-
return { name: String(
|
|
137
|
+
case !s:
|
|
138
|
+
return { name: String(s) };
|
|
139
139
|
default:
|
|
140
|
-
return
|
|
140
|
+
return l;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function f2(s, l, g2, h2) {
|
|
144
144
|
switch (true) {
|
|
145
|
-
case (!
|
|
145
|
+
case (!g2 && l === s || s?.[Symbol.proxy] && l === Proxy):
|
|
146
146
|
return true;
|
|
147
|
-
case String(
|
|
148
|
-
return String(
|
|
149
|
-
case (
|
|
150
|
-
return String(
|
|
147
|
+
case String(l) === e.NAN:
|
|
148
|
+
return String(s) === e.NAN;
|
|
149
|
+
case (s?.[Symbol.toStringTag] && typeof l == "string"):
|
|
150
|
+
return String(l) === s[Symbol.toStringTag];
|
|
151
151
|
default:
|
|
152
|
-
return
|
|
152
|
+
return l ? m(s, l, h2) : y(s, h2);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
return (
|
|
155
|
+
function y(s, l) {
|
|
156
|
+
return (s?.[Symbol.toStringTag] ?? s?.prototype?.[Symbol.toStringTag]) || l?.name || String(l);
|
|
157
157
|
}
|
|
158
|
-
function m(
|
|
159
|
-
return
|
|
158
|
+
function m(s, l, g2) {
|
|
159
|
+
return P({ trial: (h2) => s instanceof l }) || l === g2 || l === Object.getPrototypeOf(g2) || `${l?.name}` === g2?.name;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
return function(
|
|
163
|
-
let
|
|
164
|
-
return
|
|
161
|
+
function b2(s, l) {
|
|
162
|
+
return function(g2) {
|
|
163
|
+
let h2 = { get value() {
|
|
164
|
+
return g2;
|
|
165
165
|
}, is(...E3) {
|
|
166
|
-
return
|
|
166
|
+
return s(g2, ...E3);
|
|
167
167
|
}, get type() {
|
|
168
|
-
return
|
|
168
|
+
return l(g2);
|
|
169
169
|
} };
|
|
170
|
-
return Object[Symbol.type] && Object.defineProperties(
|
|
171
|
-
return
|
|
170
|
+
return Object[Symbol.type] && Object.defineProperties(h2, { [Symbol.type]: { get() {
|
|
171
|
+
return l(g2);
|
|
172
172
|
} }, [Symbol.is]: { value(...E3) {
|
|
173
|
-
return
|
|
174
|
-
} } }), Object.freeze(
|
|
173
|
+
return s(g2, ...E3);
|
|
174
|
+
} } }), Object.freeze(h2);
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
let
|
|
177
|
+
function d() {
|
|
178
|
+
let s = (l) => {
|
|
179
179
|
};
|
|
180
|
-
return function({ trial:
|
|
180
|
+
return function({ trial: l, whenError: g2 = s } = {}) {
|
|
181
181
|
try {
|
|
182
|
-
return
|
|
183
|
-
} catch (
|
|
184
|
-
return
|
|
182
|
+
return l();
|
|
183
|
+
} catch (h2) {
|
|
184
|
+
return g2(h2);
|
|
185
185
|
}
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
function c(
|
|
189
|
-
let
|
|
190
|
-
return
|
|
188
|
+
function c(s, l = false) {
|
|
189
|
+
let g2 = s == null;
|
|
190
|
+
return g2 = l ? g2 || a(s, 1 / 0) || a(s, NaN) : g2, g2;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
var
|
|
194
|
-
var
|
|
195
|
-
var J =
|
|
196
|
-
function
|
|
193
|
+
var Ne = pt();
|
|
194
|
+
var I = mt();
|
|
195
|
+
var J = gt();
|
|
196
|
+
function mt() {
|
|
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 gt() {
|
|
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 pt() {
|
|
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
|
|
205
|
+
var Me = { html: "innerHTML", text: "textContent", class: "className" };
|
|
206
|
+
var yt = Mt();
|
|
206
207
|
var Q = {};
|
|
207
208
|
var k = {};
|
|
208
|
-
var
|
|
209
|
+
var j = Pt();
|
|
210
|
+
var De = (t) => {
|
|
209
211
|
console.error(`tinyDOM error: "${t}" is not a valid HTML tag`);
|
|
210
212
|
};
|
|
211
|
-
|
|
212
|
-
var B = bt();
|
|
213
|
+
var z = bt();
|
|
213
214
|
function bt() {
|
|
214
|
-
return Object.freeze(new Proxy(Q,
|
|
215
|
+
return Object.freeze(new Proxy(Q, Ie()));
|
|
215
216
|
}
|
|
216
|
-
function
|
|
217
|
+
function Ie() {
|
|
217
218
|
return { get(t, e) {
|
|
218
219
|
let r = String(e);
|
|
219
220
|
switch (true) {
|
|
220
221
|
case r in t:
|
|
221
222
|
return t[r];
|
|
222
|
-
case
|
|
223
|
-
return
|
|
223
|
+
case At(r):
|
|
224
|
+
return Pe({ tag: r, key: e });
|
|
224
225
|
default:
|
|
225
|
-
return
|
|
226
|
+
return Pe({ tag: r, key: e, isError: true });
|
|
226
227
|
}
|
|
227
228
|
}, set(t, e, r) {
|
|
228
|
-
return e === "setError" && typeof r == "function" && (
|
|
229
|
+
return e === "setError" && typeof r == "function" && (De = r), true;
|
|
229
230
|
}, enumerable: false, configurable: false };
|
|
230
231
|
}
|
|
231
|
-
function
|
|
232
|
-
let
|
|
233
|
-
if (
|
|
234
|
-
return (
|
|
235
|
-
} }),
|
|
232
|
+
function Pe({ tag: t, key: e, custom: r, debug: n = false, isError: o = false } = {}) {
|
|
233
|
+
let i = ht();
|
|
234
|
+
if (o) return Object.defineProperty(i, t, { get() {
|
|
235
|
+
return (u) => De(e) ?? "";
|
|
236
|
+
} }), Oe(i, t);
|
|
236
237
|
if (t.includes("-")) {
|
|
237
|
-
let [
|
|
238
|
-
k[
|
|
238
|
+
let [u, S2] = t.includes("-") ? [t, Nt(t)] : [Tt(t), t];
|
|
239
|
+
k[u] = u, k[S2] = u, r = S2;
|
|
239
240
|
}
|
|
240
|
-
return r && Object.defineProperty(
|
|
241
|
-
return
|
|
242
|
-
} }), Object.defineProperty(
|
|
243
|
-
return
|
|
244
|
-
} }),
|
|
241
|
+
return r && Object.defineProperty(i, r, { get() {
|
|
242
|
+
return Re(t);
|
|
243
|
+
} }), Object.defineProperty(i, t, { get() {
|
|
244
|
+
return Re(t);
|
|
245
|
+
} }), Oe(i, t);
|
|
245
246
|
}
|
|
246
|
-
function
|
|
247
|
-
return Q = Object.freeze(new Proxy(t,
|
|
247
|
+
function Oe(t, e) {
|
|
248
|
+
return Q = Object.freeze(new Proxy(t, Ie())), Q[Symbol.for.proxy] = "Proxy (Object)", Q[e];
|
|
248
249
|
}
|
|
249
250
|
function ht() {
|
|
250
251
|
return Object.fromEntries(Object.entries(Object.getOwnPropertyDescriptors(Q)));
|
|
251
252
|
}
|
|
252
253
|
function St(t, e, r) {
|
|
253
|
-
return e = e?.isJQx && e.node || (e
|
|
254
|
+
return e = e?.isJQx && e.node || (j(e, Number) ? String(e) : e), yt({ trial: (n) => je(e) ? t.insertAdjacentHTML("beforeend", e) : t.append(e), whenError: (n) => console.info(`${r} not created, reason
|
|
254
255
|
`, n) });
|
|
255
256
|
}
|
|
256
257
|
function xt(t, e, ...r) {
|
|
257
|
-
let n =
|
|
258
|
-
return r?.forEach((
|
|
259
|
-
}
|
|
260
|
-
function
|
|
261
|
-
switch (t =
|
|
262
|
-
case t
|
|
263
|
-
return
|
|
264
|
-
case t
|
|
265
|
-
return
|
|
258
|
+
let n = wt(e, t);
|
|
259
|
+
return r?.forEach((o) => St(n, o, t)), n;
|
|
260
|
+
}
|
|
261
|
+
function wt(t, e) {
|
|
262
|
+
switch (t = ge(e) ? Ft(t) : t?.isJQx ? t.node : t, true) {
|
|
263
|
+
case j(t, String):
|
|
264
|
+
return X(e, je(t, e) ? { html: t } : { text: t });
|
|
265
|
+
case t instanceof Node:
|
|
266
|
+
return Et(e, t);
|
|
266
267
|
default:
|
|
267
|
-
return
|
|
268
|
+
return X(e, t);
|
|
268
269
|
}
|
|
269
270
|
}
|
|
270
|
-
function
|
|
271
|
-
let r =
|
|
271
|
+
function Et(t, e) {
|
|
272
|
+
let r = X(t);
|
|
272
273
|
return r.append(e), r;
|
|
273
274
|
}
|
|
274
|
-
function
|
|
275
|
+
function vt(t) {
|
|
275
276
|
if (Object.keys(t).length < 1) return { assignable: {}, specials: [...Array(3)] };
|
|
276
277
|
let e = Lt(t);
|
|
277
278
|
return Object.keys(t).forEach((r) => {
|
|
278
279
|
let n = r.toLowerCase();
|
|
279
|
-
n in
|
|
280
|
+
n in Me && (t[Me[n]] = t[r]) && delete t[r];
|
|
280
281
|
}), { assignable: t, specials: e };
|
|
281
282
|
}
|
|
282
283
|
function Lt(t) {
|
|
283
|
-
if (
|
|
284
|
-
let e = Object.entries(t.data ?? {}), r = Object.entries(t.attributes ?? {}), n = t.class?.split(/[ ,]/).map((
|
|
284
|
+
if (t = j(t, Object) && t || void 0, !t) return Array(3);
|
|
285
|
+
let e = Object.entries(t.data ?? {}), r = Object.entries(t.attributes ?? {}), n = t.class?.split(/[ ,]/).map((o) => o.trim()).filter((o) => o.length > 1);
|
|
285
286
|
return delete t.data, delete t.attributes, delete t.class, [e, r, n];
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
-
let [r, n,
|
|
289
|
-
r?.length && r.forEach(([
|
|
288
|
+
function Ct(t, e) {
|
|
289
|
+
let [r, n, o] = t;
|
|
290
|
+
r?.length && r.forEach(([i, u]) => e.dataset[i] = u), n?.length && n.forEach(([i, u]) => e.setAttribute(i, u)), o?.forEach((i) => e.classList.add(i));
|
|
290
291
|
}
|
|
291
|
-
function
|
|
292
|
+
function X(t, e) {
|
|
292
293
|
e = e || {};
|
|
293
|
-
let { assignable: r, specials: n } =
|
|
294
|
-
return
|
|
294
|
+
let { assignable: r, specials: n } = vt(e), o = Object.assign(ge(t) ? new Comment() : document.createElement(t), r);
|
|
295
|
+
return Ct(n, o), o;
|
|
295
296
|
}
|
|
296
297
|
function Ft(t) {
|
|
297
298
|
return t?.constructor === Comment ? t?.textContent : String(t);
|
|
298
299
|
}
|
|
299
|
-
function
|
|
300
|
-
return !
|
|
300
|
+
function je(t, e) {
|
|
301
|
+
return !ge(e) && j(t, String) && /<.*>|&[#|0-9a-z]+[^;];/i.test(t);
|
|
301
302
|
}
|
|
302
|
-
function
|
|
303
|
+
function ge(t) {
|
|
303
304
|
return /comment/i.test(t);
|
|
304
305
|
}
|
|
305
|
-
function
|
|
306
|
-
return
|
|
306
|
+
function At(t) {
|
|
307
|
+
return $t(t) && (t in k || !j(X(t), HTMLUnknownElement));
|
|
307
308
|
}
|
|
308
|
-
function
|
|
309
|
+
function $t(t) {
|
|
309
310
|
return t = t.toLowerCase(), typeof t == "string" && t.length > 0 && /^[a-z]/.test(t) && /^[a-z0-9-]+$/gi.test(t);
|
|
310
311
|
}
|
|
311
|
-
function
|
|
312
|
+
function Re(t) {
|
|
312
313
|
return t = t in k ? k[t] : t, (e, ...r) => xt(t, e, ...r);
|
|
313
314
|
}
|
|
314
|
-
function
|
|
315
|
+
function Ht([t, ...e]) {
|
|
315
316
|
return `${t.toUpperCase()}${e.join("")}`;
|
|
316
317
|
}
|
|
317
|
-
function
|
|
318
|
+
function Tt(t) {
|
|
318
319
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/^-|-$/, "");
|
|
319
320
|
}
|
|
320
|
-
function
|
|
321
|
-
return t
|
|
322
|
-
}
|
|
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 };
|
|
327
|
-
function b2(m, ...h2) {
|
|
328
|
-
let g2 = typeof m == "symbol" ? Symbol.isSymbol : m;
|
|
329
|
-
switch (true) {
|
|
330
|
-
case !!x2({ trial: (c) => "isTypes" in (h2?.[0] ?? {}) }):
|
|
331
|
-
return r(m, h2[0]);
|
|
332
|
-
default:
|
|
333
|
-
return h2.length > 1 ? n(g2, ...h2) : S2(m, ...h2);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
321
|
+
function Nt(t) {
|
|
322
|
+
return j(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${Ht(e)}` || e).join("") : t;
|
|
336
323
|
}
|
|
337
|
-
function Mt(
|
|
338
|
-
let
|
|
339
|
-
|
|
340
|
-
function
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
case "defaultValue" in s:
|
|
346
|
-
return g2(o, s);
|
|
347
|
-
case "notTypes" in s:
|
|
348
|
-
return c(o, s);
|
|
349
|
-
default:
|
|
350
|
-
return t(o, ...[s.isTypes].flat());
|
|
324
|
+
function Mt() {
|
|
325
|
+
let t = (e) => {
|
|
326
|
+
};
|
|
327
|
+
return function({ trial: e, whenError: r = t } = {}) {
|
|
328
|
+
try {
|
|
329
|
+
return e();
|
|
330
|
+
} catch (n) {
|
|
331
|
+
return r(n);
|
|
351
332
|
}
|
|
352
|
-
}
|
|
353
|
-
function h2(o, ...s) {
|
|
354
|
-
return s.some((a) => t(o, a));
|
|
355
|
-
}
|
|
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;
|
|
358
|
-
}
|
|
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);
|
|
361
|
-
}
|
|
333
|
+
};
|
|
362
334
|
}
|
|
363
|
-
function
|
|
364
|
-
let t =
|
|
365
|
-
return
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
return s(this);
|
|
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);
|
|
375
|
-
}, enumerable: false, configurable: false } }));
|
|
376
|
-
}
|
|
377
|
-
function n(o, s, a) {
|
|
378
|
-
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL)), { xProxy: f2(), addSymbolicExtensions: () => r(o, s) };
|
|
379
|
-
}
|
|
380
|
-
function i(o) {
|
|
381
|
-
return (Pt(o, true) ? { name: "unknown" } : Object.getPrototypeOf(o)?.constructor).name;
|
|
382
|
-
}
|
|
383
|
-
function l(o, s) {
|
|
384
|
-
return Proxy = new o(o, { construct(a, p2) {
|
|
385
|
-
let E3 = new a(...p2);
|
|
386
|
-
return Object.defineProperty(E3, s, { value: `${e.PROXY_PREFIX}${i(p2[0])})` }), E3;
|
|
387
|
-
} }), Proxy;
|
|
388
|
-
}
|
|
389
|
-
function f2() {
|
|
390
|
-
Symbol.proxy || (Symbol.proxy = Symbol.for(t.PROXY));
|
|
391
|
-
let o = Proxy;
|
|
392
|
-
return { native() {
|
|
393
|
-
Proxy = o;
|
|
394
|
-
}, custom() {
|
|
395
|
-
Proxy = l(o, Symbol.proxy);
|
|
396
|
-
} };
|
|
397
|
-
}
|
|
398
|
-
function S2(o, ...s) {
|
|
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]) };
|
|
401
|
-
}
|
|
402
|
-
function y(o, ...s) {
|
|
403
|
-
let { noInput: a, noShouldbe: p2, compareTo: E3, inputCTOR: C3, isNaN: me2, isInfinity: ge2, shouldBeFirstElementIsNothing: pe2 } = S2(o, ...s);
|
|
404
|
-
switch (s = s.length && s[0], true) {
|
|
405
|
-
case pe2:
|
|
406
|
-
return String(o) === String(E3);
|
|
407
|
-
case (o?.[Symbol.proxy] && p2):
|
|
408
|
-
return o[Symbol.proxy];
|
|
409
|
-
case me2:
|
|
410
|
-
return p2 ? e.NAN : String(E3) === String(o);
|
|
411
|
-
case ge2:
|
|
412
|
-
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
413
|
-
case a:
|
|
414
|
-
return p2 ? String(o) : String(E3) === String(o);
|
|
415
|
-
case C3 === Boolean:
|
|
416
|
-
return p2 ? e.BOOLEAN : C3 === s;
|
|
417
|
-
default:
|
|
418
|
-
return d(o, s, p2, x2(o, C3));
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
function x2(o, s) {
|
|
422
|
-
switch (true) {
|
|
423
|
-
case o === 0:
|
|
424
|
-
return Number;
|
|
425
|
-
case o === "":
|
|
426
|
-
return String;
|
|
427
|
-
case !o:
|
|
428
|
-
return { name: String(o) };
|
|
429
|
-
default:
|
|
430
|
-
return s;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
function d(o, s, a, p2) {
|
|
434
|
-
switch (true) {
|
|
435
|
-
case (!a && s === o || o?.[Symbol.proxy] && s === Proxy):
|
|
436
|
-
return true;
|
|
437
|
-
case String(s) === e.NAN:
|
|
438
|
-
return String(o) === e.NAN;
|
|
439
|
-
case (o?.[Symbol.toStringTag] && typeof s == "string"):
|
|
440
|
-
return String(s) === o[Symbol.toStringTag];
|
|
441
|
-
default:
|
|
442
|
-
return s ? m(o, s, p2) : b2(o, p2);
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
function b2(o, s) {
|
|
446
|
-
return (o?.[Symbol.toStringTag] ?? o?.prototype?.[Symbol.toStringTag]) || s?.name || String(s);
|
|
447
|
-
}
|
|
448
|
-
function m(o, s, a) {
|
|
449
|
-
return be({ trial: (p2) => o instanceof s }) || s === a || s === Object.getPrototypeOf(a) || `${s?.name}` === a?.name;
|
|
450
|
-
}
|
|
451
|
-
function h2(o, s) {
|
|
452
|
-
return function(a) {
|
|
453
|
-
let p2 = { get value() {
|
|
454
|
-
return a;
|
|
455
|
-
}, is(...E3) {
|
|
456
|
-
return o(a, ...E3);
|
|
457
|
-
}, get type() {
|
|
458
|
-
return s(a);
|
|
459
|
-
} };
|
|
460
|
-
return Object[Symbol.type] && Object.defineProperties(p2, { [Symbol.type]: { get() {
|
|
461
|
-
return s(a);
|
|
462
|
-
} }, [Symbol.is]: { value(...E3) {
|
|
463
|
-
return o(a, ...E3);
|
|
464
|
-
} } }), Object.freeze(p2);
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
function g2() {
|
|
468
|
-
let o = (s) => {
|
|
469
|
-
};
|
|
470
|
-
return function({ trial: s, whenError: a = o } = {}) {
|
|
471
|
-
try {
|
|
472
|
-
return s();
|
|
473
|
-
} catch (p2) {
|
|
474
|
-
return a(p2);
|
|
475
|
-
}
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
function c(o, s = false) {
|
|
479
|
-
let a = o == null;
|
|
480
|
-
return a = s ? a || j(o, 1 / 0) || j(o, NaN) : a, a;
|
|
481
|
-
}
|
|
335
|
+
function Pt() {
|
|
336
|
+
let t = new Intl.Collator("en", { sensitivity: "base" }), e = (r) => r instanceof Function ? r.name : "noCTOR";
|
|
337
|
+
return function(r, n) {
|
|
338
|
+
return t.compare(Object.prototype.toString.call(r), `[object ${e(n)}]`) === 0 || r?.name === n?.name;
|
|
339
|
+
};
|
|
482
340
|
}
|
|
483
|
-
var
|
|
484
|
-
function
|
|
485
|
-
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams:
|
|
486
|
-
function x2(
|
|
487
|
-
if (
|
|
488
|
-
Object.keys(c.removeProperties).forEach((
|
|
341
|
+
var B = Ot;
|
|
342
|
+
function Ot({ styleSheet: t, createWithId: e } = {}) {
|
|
343
|
+
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: o, sheet: i, removeRules: u, consider: S2, currentSheetID: p2 } = Rt({ styleSheet: t, createWithId: e });
|
|
344
|
+
function x2(d, c) {
|
|
345
|
+
if (d && c.removeProperties) {
|
|
346
|
+
Object.keys(c.removeProperties).forEach((s) => d.style.removeProperty(Je(s)));
|
|
489
347
|
return;
|
|
490
348
|
}
|
|
491
|
-
Object.entries(c).forEach(([
|
|
492
|
-
|
|
493
|
-
let
|
|
494
|
-
if (/!important/.test(
|
|
495
|
-
|
|
349
|
+
Object.entries(c).forEach(([s, l]) => {
|
|
350
|
+
s = Je(s.trim()), l = l.trim();
|
|
351
|
+
let g2;
|
|
352
|
+
if (/!important/.test(l) && (l = l.slice(0, l.indexOf("!important")).trim(), g2 = "important"), !CSS.supports(s, l)) return console.error(`StylingFactory ${p2} error: '${s}' with value '${l}' not supported (yet)`);
|
|
353
|
+
Qe(() => d.style.setProperty(s, l, g2), `StylingFactory ${p2} (setRule4Selector) failed`);
|
|
496
354
|
});
|
|
497
355
|
}
|
|
498
|
-
function d
|
|
499
|
-
if (
|
|
500
|
-
if (c.removeRule) return
|
|
501
|
-
let
|
|
502
|
-
return S2(() => x2(
|
|
356
|
+
function f2(d, c, s = i) {
|
|
357
|
+
if (d = d?.trim?.(), !a(d, String) || !d.length || /[;,]$/g.test(d)) return console.error(`StylingFactory ${p2} (setRules): [${d || "[no selector given]"}] is not a valid selector`);
|
|
358
|
+
if (c.removeRule) return u(d);
|
|
359
|
+
let l = n(d, true), g2 = l || s.cssRules[s.insertRule(`${d} {}`, s.cssRules.length || 0)];
|
|
360
|
+
return S2(() => x2(g2, c), d, l);
|
|
503
361
|
}
|
|
504
|
-
function
|
|
505
|
-
let c =
|
|
506
|
-
if (!
|
|
507
|
-
let
|
|
508
|
-
return
|
|
362
|
+
function y(d) {
|
|
363
|
+
let c = d.trim().split(/{/, 2), s = c.shift().trim();
|
|
364
|
+
if (!a(s, String) || !s?.trim()?.length) return console.error(`StylingFactory ${p2} (doParse): no (valid) selector could be extracted from rule ${pe(d)}`);
|
|
365
|
+
let l = zt(c.shift());
|
|
366
|
+
return Qe(() => f2(s, l), `StylingFactory ${p2} (setRules) failed`);
|
|
509
367
|
}
|
|
510
|
-
function m(
|
|
511
|
-
let c = r(
|
|
512
|
-
return c.done ? c.existing :
|
|
368
|
+
function m(d) {
|
|
369
|
+
let c = r(d);
|
|
370
|
+
return c.done ? c.existing : y(d);
|
|
513
371
|
}
|
|
514
|
-
function
|
|
515
|
-
return
|
|
372
|
+
function b2(d, c) {
|
|
373
|
+
return d.trim().startsWith("@media") ? m(Dt(d, c)) : f2(d, c);
|
|
516
374
|
}
|
|
517
|
-
return function(
|
|
518
|
-
return
|
|
375
|
+
return function(d, c = {}) {
|
|
376
|
+
return o(d, c) && (Object.keys(c).length ? b2(d, c) : m(d));
|
|
519
377
|
};
|
|
520
378
|
}
|
|
521
379
|
function Rt({ styleSheet: t, createWithId: e }) {
|
|
522
380
|
let r = "Note: The rule or some of its properties may not be supported by your browser (yet)", n = `for style#${e}`;
|
|
523
|
-
t = e ?
|
|
524
|
-
function
|
|
525
|
-
let
|
|
526
|
-
if (
|
|
527
|
-
let
|
|
528
|
-
return document.head.insertAdjacentElement("beforeend",
|
|
381
|
+
t = e ? o(e) : t;
|
|
382
|
+
function o(m) {
|
|
383
|
+
let b2 = document.querySelector(`#${m}`)?.sheet;
|
|
384
|
+
if (b2) return b2;
|
|
385
|
+
let d = Object.assign(document.createElement("style"), { id: m });
|
|
386
|
+
return document.head.insertAdjacentElement("beforeend", d), d.sheet;
|
|
529
387
|
}
|
|
530
|
-
function
|
|
388
|
+
function i(m) {
|
|
531
389
|
return console.error(`StylingFactory ${n} [rule: ${m}]
|
|
532
390
|
=> @charset, @namespace and @import are not supported here`), { done: true };
|
|
533
391
|
}
|
|
534
|
-
function
|
|
535
|
-
return [...t.rules].find((
|
|
392
|
+
function u(m, b2) {
|
|
393
|
+
return [...t.rules].find((d) => b2 ? ke(d.selectorText || "", m) : Jt`${jt(m)}${[..."gim"]}`.test(d.cssText));
|
|
536
394
|
}
|
|
537
395
|
function S2(m) {
|
|
538
|
-
return /^@charset|@import|namespace/i.test(m.trim()) ?
|
|
396
|
+
return /^@charset|@import|namespace/i.test(m.trim()) ? i(m) : m.match(/}/g)?.length > 1 ? { existing: f2(m, 1), done: true } : { done: false };
|
|
539
397
|
}
|
|
540
|
-
function
|
|
541
|
-
let
|
|
542
|
-
return
|
|
398
|
+
function p2(m) {
|
|
399
|
+
let b2 = [...t.cssRules].reduce((c, s, l) => ke(s.selectorText || "", m) && c.concat(l) || c, []), d = b2.length;
|
|
400
|
+
return b2.forEach((c) => t.deleteRule(c)), d > 0 ? console.info(`\u2714 Removed ${d} instance${d > 1 ? "s" : ""} of selector ${m} from ${n.slice(4)}`) : console.info(`\u2714 Remove rule: selector ${m} does not exist in ${n.slice(4)}`);
|
|
543
401
|
}
|
|
544
|
-
function x2(m,
|
|
545
|
-
return m &&
|
|
402
|
+
function x2(m, b2) {
|
|
403
|
+
return m && a(m, String) && m.trim().length > 0 && a(b2, Object) || (console.error(`StylingFactory ${n} called with invalid parameters`), false);
|
|
546
404
|
}
|
|
547
|
-
function
|
|
405
|
+
function f2(m) {
|
|
548
406
|
m = m.trim();
|
|
549
|
-
let
|
|
407
|
+
let b2 = m.slice(0, m.indexOf("{")).trim(), d = !!u(b2);
|
|
550
408
|
try {
|
|
551
|
-
return t.insertRule(`${m}`, t.cssRules.length),
|
|
409
|
+
return t.insertRule(`${m}`, t.cssRules.length), d;
|
|
552
410
|
} catch (c) {
|
|
553
411
|
return console.error(`StylingFactory ${n} (tryParse) ${c.name} Error:
|
|
554
412
|
${c.message}
|
|
555
|
-
Rule: ${
|
|
556
|
-
${r}`),
|
|
413
|
+
Rule: ${pe(m)}
|
|
414
|
+
${r}`), d;
|
|
557
415
|
}
|
|
558
416
|
}
|
|
559
|
-
function
|
|
417
|
+
function y(m, b2, d) {
|
|
560
418
|
try {
|
|
561
|
-
return m(),
|
|
419
|
+
return m(), d;
|
|
562
420
|
} catch (c) {
|
|
563
421
|
return console.error(`StylingFactory ${n} (tryAddOrModify) ${c.name} Error:
|
|
564
422
|
${c.message}
|
|
565
|
-
Rule: ${
|
|
566
|
-
${r}`),
|
|
423
|
+
Rule: ${pe(b2)}
|
|
424
|
+
${r}`), d;
|
|
567
425
|
}
|
|
568
426
|
}
|
|
569
|
-
return { sheet: t, removeRules:
|
|
427
|
+
return { sheet: t, removeRules: p2, tryParseAtOrNestedRules: S2, ruleExists: u, checkParams: x2, tryParse: f2, consider: y, currentSheetID: n };
|
|
570
428
|
}
|
|
571
|
-
function
|
|
572
|
-
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${
|
|
429
|
+
function Dt(t, e) {
|
|
430
|
+
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${It(n)}`)}`;
|
|
573
431
|
}
|
|
574
|
-
function
|
|
432
|
+
function pe(t) {
|
|
575
433
|
let e = (t || "NO RULE").trim().slice(0, 50).replace(/\n/g, "\\n").replace(/\s{2,}/g, " ");
|
|
576
434
|
return t.length > e.length ? `${e.trim()}...truncated` : e;
|
|
577
435
|
}
|
|
578
|
-
function
|
|
436
|
+
function It(t) {
|
|
579
437
|
return Object.entries(t).map(([e, r]) => `${e}: ${r.trim()}`).join(`;
|
|
580
438
|
`);
|
|
581
439
|
}
|
|
582
|
-
function
|
|
440
|
+
function jt(t) {
|
|
583
441
|
return t.replace(/([*\[\]()-+{}.$?\\])/g, (e) => `\\${e}`);
|
|
584
442
|
}
|
|
585
|
-
function
|
|
443
|
+
function Jt(t, ...e) {
|
|
586
444
|
let r = e.length && Array.isArray(e.slice(-1)) ? e.pop().join("") : "";
|
|
587
|
-
return new RegExp((e.length && t.raw.reduce((n,
|
|
445
|
+
return new RegExp((e.length && t.raw.reduce((n, o, i) => n.concat(e[i - 1] || "").concat(o), "") || t.raw.join("")).split(`
|
|
588
446
|
`).map((n) => n.replace(/\s|\/\/.*$/g, "").trim().replace(/(@s!)/g, " ")).join(""), r);
|
|
589
447
|
}
|
|
590
|
-
function
|
|
448
|
+
function Je(t) {
|
|
591
449
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[^--]^-|-$/, "");
|
|
592
450
|
}
|
|
593
|
-
function
|
|
451
|
+
function Qe(t, e) {
|
|
594
452
|
try {
|
|
595
453
|
return t();
|
|
596
454
|
} catch (r) {
|
|
597
455
|
console.error(`${e || "an error occured"}: ${r.message}`);
|
|
598
456
|
}
|
|
599
457
|
}
|
|
600
|
-
function
|
|
458
|
+
function Qt(t) {
|
|
601
459
|
return t.replace(/\/\*.+?\*\//gm, "").replace(/[}{\r\n]/g, "").replace(/(data:.+?);/g, (e, r) => `${r}\\3b`).split(";").map((e) => e.trim()).join(`;
|
|
602
460
|
`).replaceAll("\\3b", ";").split(`
|
|
603
461
|
`);
|
|
604
462
|
}
|
|
605
|
-
function
|
|
463
|
+
function kt(t) {
|
|
606
464
|
return t.reduce((e, r) => {
|
|
607
|
-
let [n,
|
|
608
|
-
return n &&
|
|
465
|
+
let [n, o] = [r.slice(0, r.indexOf(":")).trim(), r.slice(r.indexOf(":") + 1).trim().replace(/;$|;.+(?=\/*).+\/$/, "")];
|
|
466
|
+
return n && o ? { ...e, [n]: o } : e;
|
|
609
467
|
}, {});
|
|
610
468
|
}
|
|
611
|
-
function
|
|
612
|
-
return
|
|
469
|
+
function zt(t) {
|
|
470
|
+
return kt(Qt(t));
|
|
613
471
|
}
|
|
614
|
-
function
|
|
472
|
+
function ke(t, e) {
|
|
615
473
|
return t?.replace("::", ":") === e?.replace("::", ":");
|
|
616
474
|
}
|
|
617
|
-
var
|
|
618
|
-
var
|
|
619
|
-
var
|
|
620
|
-
if (
|
|
621
|
-
let e =
|
|
475
|
+
var ye = false;
|
|
476
|
+
var Bt = { on: () => ye = true, off: () => ye = false };
|
|
477
|
+
var H = { tagsRaw: J, allowUnknownHtmlTags: Bt, isAllowed(t) {
|
|
478
|
+
if (ye) return true;
|
|
479
|
+
let e = a(t, String) ? t.toLowerCase() : t?.nodeName.toLowerCase() || "none";
|
|
622
480
|
return e === "#text" || !!J[e];
|
|
623
481
|
}, allowTag: (t) => J[t.toLowerCase()] = true, prohibitTag: (t) => J[t.toLowerCase()] = false };
|
|
624
|
-
var
|
|
482
|
+
var Wt = true;
|
|
625
483
|
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
|
|
627
|
-
if (
|
|
628
|
-
let e = Object.entries(t.removed).reduce((r, [n,
|
|
629
|
-
|
|
484
|
+
function _t(t) {
|
|
485
|
+
if (Wt && Object.keys(t.removed).length) {
|
|
486
|
+
let e = Object.entries(t.removed).reduce((r, [n, o]) => [...r, `${N(n)} => ${o}`], []).join("\\000A");
|
|
487
|
+
v.error(`JQx: HTML creation error(s): ${e}`);
|
|
630
488
|
}
|
|
631
489
|
}
|
|
632
|
-
function
|
|
490
|
+
function Vt(t) {
|
|
633
491
|
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"];
|
|
634
|
-
return /-/.test(e) && !r.find((n) => n === e) ||
|
|
492
|
+
return /-/.test(e) && !r.find((n) => n === e) || H.isAllowed(e);
|
|
635
493
|
}
|
|
636
|
-
function
|
|
494
|
+
function O(t) {
|
|
637
495
|
let e = { rawHTML: t?.parentElement?.getHTML() ?? "no html", removed: {} };
|
|
638
|
-
return
|
|
639
|
-
if (r?.children?.length &&
|
|
640
|
-
let
|
|
641
|
-
[...(r ?? { attributes: [] }).attributes].forEach((
|
|
642
|
-
let
|
|
643
|
-
if (
|
|
644
|
-
let
|
|
645
|
-
|
|
496
|
+
return a(t, HTMLElement) && [...t.childNodes].forEach((r) => {
|
|
497
|
+
if (r?.children?.length && O(r), r?.attributes) {
|
|
498
|
+
let o = a(r, SVGElement) ? I.svg : I.html;
|
|
499
|
+
[...(r ?? { attributes: [] }).attributes].forEach((i) => {
|
|
500
|
+
let u = i.name.trim().toLowerCase(), S2 = i.value.trim().toLowerCase().replace(Z.whiteSpace, ""), p2 = u === "href" ? !Z.validURL.test(S2) : Z.notAllowedValues.test(S2), x2 = u.startsWith("data") ? !Z.data.test(u) : !!o[u];
|
|
501
|
+
if (p2 || x2) {
|
|
502
|
+
let f2 = K(i.value || "none", 60);
|
|
503
|
+
f2 += f2.length === 60 ? "..." : "", e.removed[`${i.name}`] = `attribute/property/value not allowed, removed. Value: ${f2}`, r.removeAttribute(i.name);
|
|
646
504
|
}
|
|
647
505
|
});
|
|
648
506
|
}
|
|
649
|
-
if (!(
|
|
650
|
-
let
|
|
651
|
-
|
|
507
|
+
if (!(Vt(r) || r.constructor === CharacterData || r.constructor === Comment)) {
|
|
508
|
+
let o = (r?.outerHTML || r?.textContent).trim(), i = K(o, 60) ?? "EMPTY";
|
|
509
|
+
i += i.length === 60 ? "..." : "", e.removed[`<${r.nodeName?.toLowerCase()}>`] = `not allowed, not rendered. Value: ${i}`, r.remove();
|
|
652
510
|
}
|
|
653
|
-
}),
|
|
511
|
+
}), _t(e), t;
|
|
654
512
|
}
|
|
655
|
-
function
|
|
513
|
+
function Ut(t) {
|
|
656
514
|
let e = document.createElement("div");
|
|
657
|
-
return e.insertAdjacentHTML(
|
|
515
|
+
return e.insertAdjacentHTML(C.end, t), e.childNodes.length ? O(e) : void 0;
|
|
658
516
|
}
|
|
659
|
-
function
|
|
517
|
+
function Yt(t, e, r) {
|
|
660
518
|
switch (true) {
|
|
661
|
-
case
|
|
519
|
+
case a(t, Comment):
|
|
662
520
|
return e.insertAdjacentHTML(r, `<!--${t.data}-->`);
|
|
663
|
-
case
|
|
521
|
+
case a(t, Text):
|
|
664
522
|
return e.insertAdjacentText(r, t.data || t.textContent);
|
|
665
523
|
default:
|
|
666
524
|
return;
|
|
667
525
|
}
|
|
668
526
|
}
|
|
669
|
-
function
|
|
670
|
-
return r = r ||
|
|
671
|
-
let
|
|
672
|
-
return
|
|
527
|
+
function R(t = [], e = document.body, r = C.BeforeEnd) {
|
|
528
|
+
return r = r || C.BeforeEnd, e = e?.isJQx ? e.node : e || document.body, t.reduce((n, o) => {
|
|
529
|
+
let i = T(o) && Gt(o, e, r);
|
|
530
|
+
return i ? [...n, i] : n;
|
|
673
531
|
}, []);
|
|
674
532
|
}
|
|
675
|
-
function
|
|
676
|
-
return r = r ||
|
|
533
|
+
function Gt(t, e = document.body, r = C.BeforeEnd) {
|
|
534
|
+
return r = r || C.BeforeEnd, e = e?.isJQx ? e?.[0] : e, a(t, Comment, Text) ? Yt(t, e, r) : a(t, HTMLElement) ? e.insertAdjacentElement(r, t) : void 0;
|
|
677
535
|
}
|
|
678
|
-
function
|
|
679
|
-
if (
|
|
536
|
+
function $(t) {
|
|
537
|
+
if (a(t, Text, Comment)) return t;
|
|
680
538
|
let e = t?.trim(), r = e?.split(/<text>|<\/text>/i) ?? [];
|
|
681
|
-
if (r?.length && (r = r.length > 1 ? r.filter((
|
|
682
|
-
if (r ||
|
|
683
|
-
let n =
|
|
684
|
-
return n.childNodes.length < 1 ?
|
|
539
|
+
if (r?.length && (r = r.length > 1 ? r.filter((o) => o.length).shift() : void 0), e.startsWith("<!--") && e.endsWith("-->")) return document.createComment(t.replace(/<!--|-->$/g, ""));
|
|
540
|
+
if (r || a(e, String) && !/^<(.+)[^>]+>/m.test(e)) return document.createTextNode(r ?? e);
|
|
541
|
+
let n = Ut(t);
|
|
542
|
+
return n.childNodes.length < 1 ? $(`<span data-jqxcreationerror="1">${q(t, 60)}</span>`) : n.children[0];
|
|
685
543
|
}
|
|
686
544
|
function ee(t) {
|
|
687
545
|
if (t.node("#jqxPopup")) return;
|
|
688
|
-
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...
|
|
689
|
-
let e = [], [r, n] = [t("#jqxPopupContent"), t.node("#jqxPopup")],
|
|
690
|
-
return t.handle({ type: "click, cancel", handlers: m, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show:
|
|
691
|
-
function
|
|
546
|
+
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...Ne);
|
|
547
|
+
let e = [], [r, n] = [t("#jqxPopupContent"), t.node("#jqxPopup")], o = {};
|
|
548
|
+
return t.handle({ type: "click, cancel", handlers: m, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show: i, remove: u, removeModal: y });
|
|
549
|
+
function i(c) {
|
|
692
550
|
if (n.open) switch (true) {
|
|
693
551
|
case S2(c):
|
|
694
552
|
return;
|
|
695
553
|
default:
|
|
696
|
-
return
|
|
554
|
+
return u(), setTimeout(() => i(c), 200);
|
|
697
555
|
}
|
|
698
|
-
|
|
699
|
-
let { content:
|
|
700
|
-
return t.IS(
|
|
556
|
+
o = { ...c };
|
|
557
|
+
let { content: s } = o;
|
|
558
|
+
return t.IS(s, String, HTMLElement) || s?.isJQx ? p2() : true;
|
|
701
559
|
}
|
|
702
|
-
function
|
|
703
|
-
return
|
|
560
|
+
function u() {
|
|
561
|
+
return o.modal ? d(o.warnMessage) : x2();
|
|
704
562
|
}
|
|
705
563
|
function S2(c) {
|
|
706
|
-
for (let [
|
|
564
|
+
for (let [s, l] of Object.entries(o)) if (l !== c[s]) return false;
|
|
707
565
|
return true;
|
|
708
566
|
}
|
|
709
|
-
function
|
|
567
|
+
function p2() {
|
|
710
568
|
r.clear();
|
|
711
|
-
let { content: c, modal:
|
|
712
|
-
|
|
713
|
-
let
|
|
714
|
-
r.append(
|
|
569
|
+
let { content: c, modal: s, closeAfter: l } = o;
|
|
570
|
+
s = t.IS(s, Boolean) ? s : false;
|
|
571
|
+
let g2 = s ? "" : t.div({ id: "closeHandleIcon" });
|
|
572
|
+
r.append(g2, t.IS(c, String) ? t.div(c) : c), n.showModal(), !s && t.IS(l, Number) && b2(u, l);
|
|
715
573
|
}
|
|
716
574
|
function x2() {
|
|
717
|
-
if (n.close(
|
|
718
|
-
|
|
575
|
+
if (n.close(o.returnValue), f2(), t.IS(o.callback, Function)) return e.push(setTimeout(() => o.callback(o.returnValue), 200));
|
|
576
|
+
o = {};
|
|
719
577
|
}
|
|
720
|
-
function
|
|
578
|
+
function f2() {
|
|
721
579
|
e.forEach((c) => clearTimeout(c)), e = [];
|
|
722
580
|
}
|
|
723
|
-
function
|
|
724
|
-
|
|
581
|
+
function y({ callback: c, value: s } = {}) {
|
|
582
|
+
o.returnValue = s, o.modal = false, o.callback = c || o.callback, u();
|
|
725
583
|
}
|
|
726
584
|
function m({ evt: c }) {
|
|
727
|
-
if (!(Object.keys(
|
|
585
|
+
if (!(Object.keys(o).length < 1 || !n.open) && (c.type === "cancel" && o.modal && c.preventDefault(), c.target.closest("#closeHandleIcon") || !c.target.closest("#jqxPopupContent"))) return o.activeTimer && clearTimeout(o.activeTimer), u();
|
|
728
586
|
}
|
|
729
|
-
function
|
|
730
|
-
t.IS(c, Function) && t.IS(
|
|
587
|
+
function b2(c, s) {
|
|
588
|
+
t.IS(c, Function) && t.IS(s, Number) && s > 0 && (f2(), e.push(setTimeout(c, s * 1e3)));
|
|
731
589
|
}
|
|
732
|
-
function
|
|
733
|
-
if (!t.IS(c, String, HTMLElement
|
|
734
|
-
let
|
|
590
|
+
function d(c) {
|
|
591
|
+
if (!t.IS(c, String, HTMLElement) && !c.isJQx) return;
|
|
592
|
+
let s = r.find$(".warn");
|
|
735
593
|
switch (true) {
|
|
736
|
-
case
|
|
737
|
-
|
|
594
|
+
case s.is.empty:
|
|
595
|
+
s = t.div({ class: "warn" }, c);
|
|
738
596
|
default:
|
|
739
|
-
r.append(
|
|
597
|
+
r.append(s.addClass("active")), b2(() => r.find$(".warn").removeClass("active"), 2);
|
|
740
598
|
}
|
|
741
599
|
}
|
|
742
600
|
}
|
|
743
601
|
function te(t) {
|
|
744
602
|
let e = {}, r = "anonymous_";
|
|
745
|
-
function n(
|
|
746
|
-
if (
|
|
747
|
-
let { handler:
|
|
748
|
-
document.addEventListener(
|
|
603
|
+
function n(f2) {
|
|
604
|
+
if (f2) {
|
|
605
|
+
let { handler: y, capture: m, type: b2 } = f2;
|
|
606
|
+
document.addEventListener(b2, y, { capture: m });
|
|
749
607
|
}
|
|
750
608
|
}
|
|
751
|
-
function
|
|
752
|
-
if (
|
|
753
|
-
let { type:
|
|
754
|
-
document.removeEventListener(
|
|
609
|
+
function o(f2) {
|
|
610
|
+
if (f2) {
|
|
611
|
+
let { type: y, handler: m, capture: b2 } = f2;
|
|
612
|
+
document.removeEventListener(y, m, { capture: b2 });
|
|
755
613
|
}
|
|
756
614
|
}
|
|
757
|
-
function
|
|
758
|
-
return function(
|
|
759
|
-
if (!L(
|
|
760
|
-
let c =
|
|
615
|
+
function i(f2, y, m, b2) {
|
|
616
|
+
return function(d) {
|
|
617
|
+
if (!L(y)) return f2({ evt: d });
|
|
618
|
+
let c = d.target.closest(y);
|
|
761
619
|
if (c) {
|
|
762
|
-
let
|
|
763
|
-
|
|
620
|
+
let s = t(c);
|
|
621
|
+
f2({ self: s, me: s, evt: d }), m && p2(d.type, b2);
|
|
764
622
|
}
|
|
765
623
|
return true;
|
|
766
624
|
};
|
|
767
625
|
}
|
|
768
|
-
function f2
|
|
769
|
-
return e[
|
|
626
|
+
function u(f2) {
|
|
627
|
+
return e[f2] = e[f2] || {}, e[f2];
|
|
770
628
|
}
|
|
771
|
-
function S2(
|
|
772
|
-
return Object.entries(f2
|
|
629
|
+
function S2(f2, y) {
|
|
630
|
+
return Object.entries(u(f2)).find(([m]) => m === y);
|
|
773
631
|
}
|
|
774
|
-
function
|
|
775
|
-
let m = S2(
|
|
776
|
-
m && (
|
|
632
|
+
function p2(f2, y) {
|
|
633
|
+
let m = S2(f2, y);
|
|
634
|
+
m && (o(m[1]), delete e[f2][y], delete re[y], v.warn(`Removed listener [${y}] for event type [${f2}].`));
|
|
777
635
|
}
|
|
778
|
-
function x2(
|
|
779
|
-
let { type:
|
|
780
|
-
e[
|
|
781
|
-
let
|
|
782
|
-
if (
|
|
783
|
-
let
|
|
784
|
-
|
|
636
|
+
function x2(f2) {
|
|
637
|
+
let { type: y, handler: m, name: b2, capture: d, once: c, selector: s, node: l, about: g2 } = f2;
|
|
638
|
+
e[y] = e[y] || {};
|
|
639
|
+
let h2 = be(b2 || m.name), E3 = m;
|
|
640
|
+
if (l instanceof HTMLElement) {
|
|
641
|
+
let F2 = l.dataset.hid || h2;
|
|
642
|
+
l.dataset.hid = F2, s = `[data-hid=${F2}]`;
|
|
785
643
|
}
|
|
786
644
|
switch (true) {
|
|
787
|
-
case !e[
|
|
788
|
-
return
|
|
789
|
-
y
|
|
790
|
-
} }, e[
|
|
645
|
+
case !e[y][h2]:
|
|
646
|
+
return v.log(`JQx: created listener for event type ${y}, with handler name ${h2}`), e[y][h2] = { name: h2, handler: i(m, s, c, h2), capture: ze(y, d), once: !!c, type: y, initialHandler: E3, selector: !!s && s || false, about: !!g2 && g2 || false, unListen() {
|
|
647
|
+
p2(y, h2);
|
|
648
|
+
} }, e[y][h2];
|
|
791
649
|
default:
|
|
792
|
-
return console.warn(`The listener [${
|
|
650
|
+
return console.warn(`The listener [${h2}] for [${y}] exists, it is not re-assigned.`);
|
|
793
651
|
}
|
|
794
652
|
}
|
|
795
|
-
return { remove(...
|
|
796
|
-
return
|
|
797
|
-
}, listen: function(
|
|
798
|
-
let { type:
|
|
799
|
-
if (!L(
|
|
800
|
-
let
|
|
801
|
-
if (
|
|
802
|
-
y
|
|
653
|
+
return { remove(...f2) {
|
|
654
|
+
return p2(...f2);
|
|
655
|
+
}, listen: function(f2) {
|
|
656
|
+
let { type: y, handler: m } = f2;
|
|
657
|
+
if (!L(y) || !a(m, Function)) return;
|
|
658
|
+
let b2 = x2(f2);
|
|
659
|
+
if (b2) return n(b2), { type: y, name: b2.name, unListen() {
|
|
660
|
+
p2(y, b2.name);
|
|
803
661
|
} };
|
|
804
662
|
}, get ListenerStore() {
|
|
805
663
|
return Object.freeze({ ...e });
|
|
806
664
|
} };
|
|
807
665
|
}
|
|
808
|
-
|
|
809
|
-
var
|
|
810
|
-
var
|
|
666
|
+
Te();
|
|
667
|
+
var v = Kt();
|
|
668
|
+
var Xt = ["load", "unload", "scroll", "focus", "blur", "DOMNodeRemovedFromDocument", "DOMNodeInsertedIntoDocument", "loadstart", "progress", "error", "abort", "load", "loadend", "pointerenter", "pointerleave", "readystatechange"];
|
|
669
|
+
var C = Object.freeze(new Proxy({ start: "afterbegin", afterbegin: "afterbegin", end: "beforeend", beforeend: "beforeend", before: "beforebegin", beforebegin: "beforebegin", after: "afterend", afterend: "afterend" }, { get(t, e) {
|
|
811
670
|
return t[String(e).toLowerCase()] ?? t[e];
|
|
812
671
|
} }));
|
|
813
|
-
var
|
|
814
|
-
var
|
|
815
|
-
return t[
|
|
672
|
+
var Zt = [...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}`));
|
|
673
|
+
var Se = Object.freeze({ get(t, e) {
|
|
674
|
+
return t[V(e)] || t[e];
|
|
816
675
|
}, enumerable: false, configurable: false });
|
|
817
676
|
var re = {};
|
|
818
|
-
|
|
819
|
-
function we() {
|
|
677
|
+
function xe() {
|
|
820
678
|
let t = setTimeout(() => {
|
|
821
679
|
});
|
|
822
680
|
for (; t >= 0; ) clearTimeout(t--);
|
|
823
681
|
}
|
|
824
|
-
function
|
|
825
|
-
return L(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() :
|
|
682
|
+
function be(t) {
|
|
683
|
+
return L(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() : Be();
|
|
826
684
|
}
|
|
827
|
-
function
|
|
828
|
-
let e = !!t.node && !
|
|
685
|
+
function we(t) {
|
|
686
|
+
let e = !!t.node && !a(t, Text, Comment);
|
|
829
687
|
switch (true) {
|
|
830
688
|
case e:
|
|
831
|
-
let r = t.node.dataset ? Object.keys(t.node.dataset).map((
|
|
832
|
-
return
|
|
689
|
+
let r = t.node.dataset ? Object.keys(t.node.dataset).map((i) => `[data-${i}]`) : [], o = [t.attr("id") && `#${t?.attr("id")}` || void 0, t.attr("class") && t?.attr("class").split(" ").map((i) => `.${i}`).join(", ") || void 0, r.length > 0 && r.join(", ") || void 0].filter((i) => !!i).join(", ") || [];
|
|
690
|
+
return o.length ? `(${o})` : "";
|
|
833
691
|
default:
|
|
834
692
|
return "";
|
|
835
693
|
}
|
|
836
694
|
}
|
|
837
|
-
function
|
|
695
|
+
function Be(t) {
|
|
838
696
|
let e = `anonymous_${Math.random().toString(36).slice(2)}`;
|
|
839
|
-
return re[e] ?
|
|
697
|
+
return re[e] ? Be() : (re[e] = e, e);
|
|
840
698
|
}
|
|
841
|
-
function
|
|
842
|
-
return !!
|
|
699
|
+
function ze(t, e) {
|
|
700
|
+
return !!Xt.find((r) => r === t) || !!e;
|
|
843
701
|
}
|
|
844
702
|
function ie(t) {
|
|
845
|
-
return t.startsWith("data") ||
|
|
703
|
+
return t.startsWith("data") || I.html.find((e) => t.toLowerCase() === e);
|
|
846
704
|
}
|
|
847
705
|
function se(t) {
|
|
848
706
|
return t && (t.textContent = "");
|
|
@@ -851,7 +709,7 @@ ${r}`), g2;
|
|
|
851
709
|
return t = t?.parentElement, e += t ? t[r ? "scrollTop" : "scrollLeft"] : 0, t ? W(t, e, r) : e;
|
|
852
710
|
}
|
|
853
711
|
function L(t, e = 1) {
|
|
854
|
-
return e =
|
|
712
|
+
return e = a(e, Number) && e || 1, a(t, String) && t.length >= e;
|
|
855
713
|
}
|
|
856
714
|
function K(t, e = 120) {
|
|
857
715
|
return q(t, e).replace(/</g, "<");
|
|
@@ -859,19 +717,19 @@ ${r}`), g2;
|
|
|
859
717
|
function q(t, e = 120) {
|
|
860
718
|
return `${t}`.trim().slice(0, e).replace(/>\s+</g, "><").replace(/</g, "<").replace(/\s{2,}/g, " ").replace(/\n/g, "\\n") + (t.length > e ? " …" : "").trim();
|
|
861
719
|
}
|
|
862
|
-
function
|
|
720
|
+
function N(t) {
|
|
863
721
|
switch (true) {
|
|
864
|
-
case
|
|
722
|
+
case a(t, String):
|
|
865
723
|
let e = document.createElement("div");
|
|
866
724
|
return e.append(t), e.innerHTML;
|
|
867
725
|
default:
|
|
868
726
|
return t;
|
|
869
727
|
}
|
|
870
728
|
}
|
|
871
|
-
function
|
|
872
|
-
return
|
|
729
|
+
function he(t) {
|
|
730
|
+
return a(t, String) && Object.assign(document.createElement("textarea"), { innerHTML: t }).textContent || t;
|
|
873
731
|
}
|
|
874
|
-
function
|
|
732
|
+
function Kt() {
|
|
875
733
|
let [t, e] = [false, true], r = [], n = { get on() {
|
|
876
734
|
return t = true, n;
|
|
877
735
|
}, get off() {
|
|
@@ -883,95 +741,95 @@ ${r}`), g2;
|
|
|
883
741
|
}, get backLog() {
|
|
884
742
|
return r;
|
|
885
743
|
} };
|
|
886
|
-
function
|
|
744
|
+
function o() {
|
|
887
745
|
e = true;
|
|
888
746
|
}
|
|
889
|
-
function
|
|
747
|
+
function i() {
|
|
890
748
|
e = false;
|
|
891
749
|
}
|
|
892
|
-
function
|
|
893
|
-
return r.unshift(...x2.map((
|
|
750
|
+
function u(...x2) {
|
|
751
|
+
return r.unshift(...x2.map((f2) => `${oe()} \u2A3B ${he(f2)}`)), console.error(r.slice(0, x2.length).join(`
|
|
894
752
|
`)), n;
|
|
895
753
|
}
|
|
896
754
|
function S2(...x2) {
|
|
897
|
-
return r.unshift(...x2.map((
|
|
755
|
+
return r.unshift(...x2.map((f2) => `${oe()} \u26A0 ${he(f2)}`)), console.warn(r.slice(0, x2.length).join(`
|
|
898
756
|
`)), n;
|
|
899
757
|
}
|
|
900
|
-
function
|
|
901
|
-
let
|
|
902
|
-
switch (!e && r.unshift(...
|
|
758
|
+
function p2(...x2) {
|
|
759
|
+
let f2 = x2.map((y) => `${oe()} \u2714 ${he(y)}`);
|
|
760
|
+
switch (!e && r.unshift(...f2), t) {
|
|
903
761
|
case true:
|
|
904
|
-
console.log(
|
|
762
|
+
console.log(f2.join(`
|
|
905
763
|
`));
|
|
906
764
|
default:
|
|
907
765
|
return n;
|
|
908
766
|
}
|
|
909
767
|
}
|
|
910
|
-
return Object.defineProperties(n, { log: { value:
|
|
768
|
+
return Object.defineProperties(n, { log: { value: p2, enumerable: false }, error: { value: u, enumerable: false }, warn: { value: S2, enumerable: false } }), Object.freeze(n);
|
|
911
769
|
}
|
|
912
770
|
function oe() {
|
|
913
771
|
return ((t) => `[${ne(t.getHours())}:${ne(t.getMinutes())}:${ne(t.getSeconds())}.${ne(t.getMilliseconds(), 3)}]`)(/* @__PURE__ */ new Date());
|
|
914
772
|
}
|
|
915
|
-
function
|
|
773
|
+
function Ee(t, e) {
|
|
916
774
|
if (t) for (let [r, n] of Object.entries(e)) {
|
|
917
|
-
if (r =
|
|
918
|
-
|
|
775
|
+
if (r = A(r), r.startsWith("data")) return ae(t, n);
|
|
776
|
+
a(n, String) && ie(r) && t.setAttribute(r, n.split(/[, ]/)?.join(" "));
|
|
919
777
|
}
|
|
920
778
|
}
|
|
921
|
-
function
|
|
922
|
-
if (t &&
|
|
779
|
+
function ae(t, e) {
|
|
780
|
+
if (t && a(e, Object)) for (let [r, n] of Object.entries(e)) t.setAttribute(`data-${A(r)}`, n);
|
|
923
781
|
}
|
|
924
|
-
function
|
|
925
|
-
return t ?
|
|
782
|
+
function le(t) {
|
|
783
|
+
return t ? t.EL ? [t.EL] : a(t, NodeList) ? [...t] : T(t) ? [t] : Y(t) ? t : t.isJQx ? t.collection : void 0 : [];
|
|
926
784
|
}
|
|
927
785
|
function D(t, e, r = true, ...n) {
|
|
928
|
-
if (t.is.empty) return
|
|
929
|
-
if (n = n.map((
|
|
930
|
-
let
|
|
931
|
-
return
|
|
786
|
+
if (t.is.empty) return v.log("[JQx instance].[before(Me) | after(Me) | andThen]: instance is empty."), t;
|
|
787
|
+
if (n = n.map((i) => i.isJQx ? i.node : a(i, String) ? e(i).node ?? i : i), n.find((i) => !a(i, String, Element))) {
|
|
788
|
+
let i = r ? "after" : "before";
|
|
789
|
+
return v.log(`[JQx instance].[${i}(Me)]: invalid/-sufficient input.`), t;
|
|
932
790
|
}
|
|
933
791
|
return t.node[r ? "after" : "before"](...n), t;
|
|
934
792
|
}
|
|
935
|
-
function
|
|
936
|
-
return
|
|
793
|
+
function T(t) {
|
|
794
|
+
return a(t, Text, HTMLElement, Comment);
|
|
937
795
|
}
|
|
938
|
-
function
|
|
939
|
-
if (
|
|
940
|
-
let
|
|
941
|
-
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(),
|
|
796
|
+
function _(t, e) {
|
|
797
|
+
if (a(e, Object)) for (let [r, n] of Object.entries(e)) {
|
|
798
|
+
let o;
|
|
799
|
+
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(), o = "important"), t.style.setProperty(A(r), n, o);
|
|
942
800
|
}
|
|
943
801
|
}
|
|
944
|
-
function
|
|
802
|
+
function M(t) {
|
|
945
803
|
let e = t.cloneNode(true);
|
|
946
804
|
return e.removeAttribute && e.removeAttribute("id"), t.isConnected ? t.remove() : t = null, e;
|
|
947
805
|
}
|
|
948
|
-
function
|
|
949
|
-
if (!
|
|
950
|
-
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"),
|
|
951
|
-
return !(
|
|
806
|
+
function We(t) {
|
|
807
|
+
if (!a(t, HTMLElement)) return;
|
|
808
|
+
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), o = !![e.display, r.display].includes("none"), i = !!t.hidden, u = parseInt(r.height) < 1 || parseInt(r.width) < 1, S2 = t.offsetTop < 0 || t.offsetLeft + t.offsetWidth < 0 || t.offsetLeft > document.body.offsetWidth, p2 = +r.opacity == 0 || +(e.opacity || 1) == 0;
|
|
809
|
+
return !(i || S2 || p2 || o || n || u);
|
|
952
810
|
}
|
|
953
|
-
function
|
|
811
|
+
function _e(t) {
|
|
954
812
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:read-write)")].find((e) => e === t) : false;
|
|
955
813
|
}
|
|
956
|
-
function
|
|
957
|
-
return t?.filter((e) => e).reduce((e, r) => e.concat(
|
|
814
|
+
function Ve(t) {
|
|
815
|
+
return t?.filter((e) => e).reduce((e, r) => e.concat(Ce(r) ? `<!--${r.data}-->` : ue(r) ? r.textContent : r.outerHTML), "");
|
|
958
816
|
}
|
|
959
817
|
function ne(t, e = 2) {
|
|
960
818
|
return `${t}`.padStart(e, "0");
|
|
961
819
|
}
|
|
962
|
-
function
|
|
820
|
+
function Ue(t, e = 0) {
|
|
963
821
|
return [t, e] = [Math.floor(t), Math.ceil(e)], Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift() / 2 ** 32 * (t - e + 1) + e);
|
|
964
822
|
}
|
|
965
|
-
function
|
|
966
|
-
return `_${
|
|
823
|
+
function ce() {
|
|
824
|
+
return `_${qt(Zt).slice(0, 8).join("")}`;
|
|
967
825
|
}
|
|
968
|
-
function
|
|
969
|
-
return t =
|
|
826
|
+
function ve(t) {
|
|
827
|
+
return t = a(t, String) && /,/.test(t) ? t.split(",").map((e) => e.trim().toLowerCase()).filter((e) => e.length > 0) : t, a(t, Array) ? t : a(t, String) && t?.trim().toLowerCase() || "";
|
|
970
828
|
}
|
|
971
|
-
function
|
|
829
|
+
function Ye(t) {
|
|
972
830
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:modal)")].find((e) => e === t) : false;
|
|
973
831
|
}
|
|
974
|
-
function
|
|
832
|
+
function Le(t, e) {
|
|
975
833
|
switch (t = String(t).trim(), true) {
|
|
976
834
|
case /^(0|false|f)$/i.test(t):
|
|
977
835
|
return false;
|
|
@@ -981,74 +839,74 @@ ${r}`), g2;
|
|
|
981
839
|
return e;
|
|
982
840
|
}
|
|
983
841
|
}
|
|
984
|
-
function
|
|
842
|
+
function qt(t) {
|
|
985
843
|
let e = t.length;
|
|
986
844
|
for (; e--; ) {
|
|
987
|
-
let r =
|
|
845
|
+
let r = Ue(e);
|
|
988
846
|
[t[e], t[r]] = [t[r], t[e]];
|
|
989
847
|
}
|
|
990
848
|
return t;
|
|
991
849
|
}
|
|
992
|
-
function
|
|
993
|
-
return
|
|
850
|
+
function V(t) {
|
|
851
|
+
return a(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${er(e)}` || e).join("") : t;
|
|
994
852
|
}
|
|
995
|
-
function
|
|
853
|
+
function A(t) {
|
|
996
854
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/^-|-$/, "");
|
|
997
855
|
}
|
|
998
|
-
function
|
|
856
|
+
function er([t, ...e]) {
|
|
999
857
|
return `${t.toUpperCase()}${e.join("")}`;
|
|
1000
858
|
}
|
|
1001
|
-
function
|
|
1002
|
-
return
|
|
1003
|
-
}
|
|
1004
|
-
function Te(t) {
|
|
1005
|
-
u(t, Comment);
|
|
859
|
+
function ue(t) {
|
|
860
|
+
return a(t, Comment, Text);
|
|
1006
861
|
}
|
|
1007
|
-
function
|
|
1008
|
-
|
|
862
|
+
function Ce(t) {
|
|
863
|
+
a(t, Comment);
|
|
1009
864
|
}
|
|
1010
|
-
function
|
|
1011
|
-
return
|
|
865
|
+
function Ge(t) {
|
|
866
|
+
return a(t, Text);
|
|
1012
867
|
}
|
|
1013
868
|
function U(t) {
|
|
1014
|
-
return
|
|
869
|
+
return a(t, String) && /^<|>$/.test(`${t}`.trim());
|
|
870
|
+
}
|
|
871
|
+
function Y(t) {
|
|
872
|
+
return a(t, Array) && !t?.find((e) => !T(e));
|
|
1015
873
|
}
|
|
1016
874
|
function fe(t) {
|
|
1017
|
-
return
|
|
875
|
+
return a(t, Array) && !t?.find((e) => !U(e));
|
|
1018
876
|
}
|
|
1019
|
-
function
|
|
1020
|
-
let r = t.collection.filter((n) => !
|
|
877
|
+
function w(t, e) {
|
|
878
|
+
let r = t.collection.filter((n) => !ue(n));
|
|
1021
879
|
for (let n = 0; n < r.length; n += 1) e(r[n], n);
|
|
1022
880
|
return t;
|
|
1023
881
|
}
|
|
1024
|
-
function
|
|
1025
|
-
return t.node ?
|
|
882
|
+
function Xe(t) {
|
|
883
|
+
return t.node ? a(t.node, Comment) ? `<!--${t.node.textContent}-->` : t.HTML.get(1).split(">")[0] + ">..." : "";
|
|
1026
884
|
}
|
|
1027
|
-
function
|
|
1028
|
-
let n = e !== document.body &&
|
|
1029
|
-
try {
|
|
885
|
+
function Fe(t, e, r) {
|
|
886
|
+
let n = e !== document.body && a(t, String) && t.toLowerCase() !== "body" ? e : document;
|
|
887
|
+
if (!(!a(t, String) || t.trim().length < 1)) try {
|
|
1030
888
|
r.collection = [...n.querySelectorAll(t)];
|
|
1031
889
|
} catch {
|
|
1032
|
-
|
|
890
|
+
v.warn(`JQx: Invalid CSS querySelector. [${a(t, String) ? t : "Not a string!"}]`);
|
|
1033
891
|
}
|
|
1034
892
|
}
|
|
1035
|
-
function
|
|
1036
|
-
return { isCommentOrTextNode:
|
|
893
|
+
function Ze() {
|
|
894
|
+
return { isCommentOrTextNode: ue, isNode: T, isComment: Ce, isText: Ge, isHtmlString: U, isArrayOfHtmlElements: Y, isArrayOfHtmlStrings: fe, ElemArray2HtmlString: Ve, input2Collection: le, setCollectionFromCssSelector: Fe, cssRuleEdit: B({ createWithId: "JQxStylesheet" }) };
|
|
1037
895
|
}
|
|
1038
|
-
function
|
|
896
|
+
function Ke() {
|
|
1039
897
|
let e = Object.freeze({ notInDOM: "n/a", writable: "n/a", modal: "n/a", empty: true, open: "n/a", visible: "n/a" });
|
|
1040
898
|
return (r) => {
|
|
1041
899
|
let n = r.node;
|
|
1042
|
-
return
|
|
1043
|
-
return
|
|
900
|
+
return a(n, Node) ? Object.freeze({ get writable() {
|
|
901
|
+
return _e(n);
|
|
1044
902
|
}, get modal() {
|
|
1045
|
-
return
|
|
903
|
+
return Ye(n);
|
|
1046
904
|
}, get inDOM() {
|
|
1047
905
|
return n.isConnected;
|
|
1048
906
|
}, get open() {
|
|
1049
907
|
return n.open ?? false;
|
|
1050
908
|
}, get visible() {
|
|
1051
|
-
return
|
|
909
|
+
return We(n);
|
|
1052
910
|
}, get disabled() {
|
|
1053
911
|
return n.hasAttribute("readonly") || n.hasAttribute("disabled");
|
|
1054
912
|
}, get empty() {
|
|
@@ -1058,32 +916,32 @@ ${r}`), g2;
|
|
|
1058
916
|
} }) : e;
|
|
1059
917
|
};
|
|
1060
918
|
}
|
|
1061
|
-
function
|
|
1062
|
-
r &&
|
|
1063
|
-
let
|
|
1064
|
-
e.className && (
|
|
919
|
+
function qe(t, e, r, n) {
|
|
920
|
+
r && a(e, String) && (e = { [e]: r === "-" ? "" : r });
|
|
921
|
+
let o;
|
|
922
|
+
e.className && (o = e.className, delete e.className), o = [...t.classList].find((u) => u.startsWith("JQxClass-") || o && u === o) || o || `JQxClass-${ce().slice(1)}`, n.editCssRule(`.${o}`, e), t.classList.add(o);
|
|
1065
923
|
}
|
|
1066
|
-
var
|
|
1067
|
-
function
|
|
1068
|
-
return { factoryExtensions:
|
|
924
|
+
var tr = Ke();
|
|
925
|
+
function et(t) {
|
|
926
|
+
return { factoryExtensions: rr(t), instanceExtensions: nr(t) };
|
|
1069
927
|
}
|
|
1070
|
-
function
|
|
928
|
+
function rr(t) {
|
|
1071
929
|
return { data(e) {
|
|
1072
930
|
return { get all() {
|
|
1073
|
-
return new Proxy(e[0]?.dataset ?? {},
|
|
931
|
+
return new Proxy(e[0]?.dataset ?? {}, Se);
|
|
1074
932
|
}, set(r = {}) {
|
|
1075
|
-
if (!e.is.empty &&
|
|
933
|
+
if (!e.is.empty && a(r, Object)) for (let [n, o] of Object.entries(r)) e.setData({ [n]: o });
|
|
1076
934
|
return e;
|
|
1077
935
|
}, get(r, n) {
|
|
1078
936
|
return e.data.all[r] ?? n;
|
|
1079
937
|
}, add(r = {}) {
|
|
1080
|
-
if (!e.is.empty &&
|
|
938
|
+
if (!e.is.empty && a(r, Object)) for (let [n, o] of Object.entries(r)) e.setData({ [n]: o });
|
|
1081
939
|
return e;
|
|
1082
940
|
}, remove(r) {
|
|
1083
|
-
return e[0]?.removeAttribute(`data-${
|
|
941
|
+
return e[0]?.removeAttribute(`data-${A(r)}`), e;
|
|
1084
942
|
} };
|
|
1085
943
|
}, dimensions(e) {
|
|
1086
|
-
if (e.is.empty) return
|
|
944
|
+
if (e.is.empty) return v.error("[JQx instance].dimensions called on empty instance"), { error: "[JQx instance].dimensions: NO ELEMENTS" };
|
|
1087
945
|
let { node: r } = e, n = r.getBoundingClientRect().toJSON();
|
|
1088
946
|
return n.scrollTopDistance = W(r, 0), n.scrollLeftDistance = W(r, 0, false), n;
|
|
1089
947
|
}, node(e) {
|
|
@@ -1091,21 +949,21 @@ ${r}`), g2;
|
|
|
1091
949
|
}, HTML(e) {
|
|
1092
950
|
return { get(r, n) {
|
|
1093
951
|
if (e.is.empty) return "NO ELEMENTS IN COLLECTION";
|
|
1094
|
-
let
|
|
1095
|
-
return n ?
|
|
1096
|
-
}, set(r, n = false,
|
|
952
|
+
let o = r ? e.outerHtml : e.html();
|
|
953
|
+
return n ? N(o) : o;
|
|
954
|
+
}, set(r, n = false, o = false) {
|
|
1097
955
|
r = r.isJQx ? r.HTML.get(1) : r;
|
|
1098
|
-
let
|
|
1099
|
-
return r =
|
|
956
|
+
let i = a(r, String);
|
|
957
|
+
return r = i && o ? N(r) : r, i && (r || "").trim().length && e.html(r, n), e;
|
|
1100
958
|
}, replace(r, n = false) {
|
|
1101
959
|
return e.HTML.set(r, false, n);
|
|
1102
960
|
}, append(r, n = false) {
|
|
1103
|
-
return r =
|
|
961
|
+
return r = a(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r, true, n);
|
|
1104
962
|
}, insert(r, n = false) {
|
|
1105
|
-
return r =
|
|
963
|
+
return r = a(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r + e.HTML.get(), false, n);
|
|
1106
964
|
} };
|
|
1107
965
|
}, is(e) {
|
|
1108
|
-
return
|
|
966
|
+
return tr(e);
|
|
1109
967
|
}, length(e) {
|
|
1110
968
|
return e.collection.length;
|
|
1111
969
|
}, outerHtml(e) {
|
|
@@ -1128,19 +986,19 @@ ${r}`), g2;
|
|
|
1128
986
|
}, inSheet(r) {
|
|
1129
987
|
return e.css(r);
|
|
1130
988
|
}, valueOf(r) {
|
|
1131
|
-
return e.is.empty ? void 0 : getComputedStyle(e[0])[
|
|
989
|
+
return e.is.empty ? void 0 : getComputedStyle(e[0])[A(r)];
|
|
1132
990
|
}, nwRule(r) {
|
|
1133
991
|
return e.Style.byRule({ rules: r });
|
|
1134
992
|
}, byRule({ classes2Apply: r = [], rules: n = [] } = {}) {
|
|
1135
|
-
let
|
|
1136
|
-
if (n = n &&
|
|
1137
|
-
return
|
|
993
|
+
let i = a(n, String) && !r.length ? n.split("{")[0].trim() : "";
|
|
994
|
+
if (n = n && a(n, String) ? [n] : n, r = r && a(r, String) ? [r] : r, (n?.length || r?.length) && (n?.length && t.editCssRules(...n), r)) for (let u of r) e.addClass(u);
|
|
995
|
+
return i?.startsWith(".") && e.addClass(i.slice(1)), i?.startsWith("#") && !e.attr("id") && e.prop({ id: i.slice(1) }), e;
|
|
1138
996
|
} };
|
|
1139
997
|
} };
|
|
1140
998
|
}
|
|
1141
|
-
function
|
|
999
|
+
function nr(t) {
|
|
1142
1000
|
return { addClass(e, ...r) {
|
|
1143
|
-
return
|
|
1001
|
+
return w(e, (n) => n && r.forEach((o) => n.classList.add(o)));
|
|
1144
1002
|
}, after(e, ...r) {
|
|
1145
1003
|
return D(e, t, true, ...r);
|
|
1146
1004
|
}, afterMe(e, ...r) {
|
|
@@ -1150,38 +1008,38 @@ ${r}`), g2;
|
|
|
1150
1008
|
}, append(e, ...r) {
|
|
1151
1009
|
if (e.is.empty || r.length < 1) return e;
|
|
1152
1010
|
let n = e.length === 1;
|
|
1153
|
-
for (let
|
|
1154
|
-
if (!
|
|
1155
|
-
let
|
|
1156
|
-
|
|
1011
|
+
for (let o of r) {
|
|
1012
|
+
if (!o.isJQx && L(o)) {
|
|
1013
|
+
let i = o.trim(), S2 = !/^<(.+)[^>]+>$/m.test(i) ? t.text(o) : $(o);
|
|
1014
|
+
w(e, (p2) => p2.append(n ? S2 : M(S2)));
|
|
1157
1015
|
}
|
|
1158
|
-
|
|
1016
|
+
T(o) && w(e, (i) => i.append(n ? o : M(o))), o.isJQx && !o.is.empty && w(e, (i) => o.collection.forEach((u) => i.append(n ? u : M(u))));
|
|
1159
1017
|
}
|
|
1160
1018
|
return e;
|
|
1161
1019
|
}, appendTo(e, r) {
|
|
1162
1020
|
switch (r = typeof r == "string" ? t(r) : r, true) {
|
|
1163
|
-
case (!r?.isJQx && !
|
|
1021
|
+
case (!r?.isJQx && !a(r, HTMLElement) || r?.collection?.length < 1):
|
|
1164
1022
|
return t.warn("[JQx instance].appendTo: invalid input"), e;
|
|
1165
1023
|
default:
|
|
1166
1024
|
return (r.isJQx ? r : t(r)).append(e), e;
|
|
1167
1025
|
}
|
|
1168
1026
|
}, attr(e, r, n) {
|
|
1169
|
-
if (!e.node ||
|
|
1170
|
-
if (!n && L(r)) return r =
|
|
1171
|
-
if (L(r) && n) switch (r =
|
|
1027
|
+
if (!e.node || a(e.node, Text, Comment)) return e;
|
|
1028
|
+
if (!n && L(r)) return r = A(r), r === "class" ? [...e.node.classList].join(" ") : e.node.getAttribute(r);
|
|
1029
|
+
if (L(r) && n) switch (r = A(r), true) {
|
|
1172
1030
|
case r.startsWith("data-"):
|
|
1173
1031
|
r = { data: { [r.replace("data-", "")]: n } };
|
|
1174
1032
|
break;
|
|
1175
1033
|
default:
|
|
1176
1034
|
r = { [r]: n };
|
|
1177
1035
|
}
|
|
1178
|
-
return
|
|
1036
|
+
return a(r, Object) && !e.is.empty && Ee(e.node, r), e;
|
|
1179
1037
|
}, before(e, ...r) {
|
|
1180
1038
|
return D(e, t, false, ...r);
|
|
1181
1039
|
}, beforeMe(e, ...r) {
|
|
1182
1040
|
D(e, t, false, ...r);
|
|
1183
1041
|
}, clear(e) {
|
|
1184
|
-
return
|
|
1042
|
+
return w(e, se);
|
|
1185
1043
|
}, closest(e, r) {
|
|
1186
1044
|
let n = L(r) ? e.node?.closest(r) : void 0;
|
|
1187
1045
|
return n ? t(n) : e;
|
|
@@ -1189,21 +1047,21 @@ ${r}`), g2;
|
|
|
1189
1047
|
let { node: n } = e;
|
|
1190
1048
|
return n && getComputedStyle(n)[r];
|
|
1191
1049
|
}, css(e, r, n) {
|
|
1192
|
-
return
|
|
1050
|
+
return w(e, (o) => qe(o, r, n, t));
|
|
1193
1051
|
}, duplicate(e, r = false, n = document.body) {
|
|
1194
1052
|
switch (true) {
|
|
1195
1053
|
case e.is.empty:
|
|
1196
|
-
return
|
|
1054
|
+
return v.error("Duplicating an empty JQx instance is not possible"), e;
|
|
1197
1055
|
default:
|
|
1198
|
-
let
|
|
1199
|
-
return
|
|
1200
|
-
|
|
1201
|
-
}), r ? t(
|
|
1056
|
+
let o = e.collection[0].cloneNode(true);
|
|
1057
|
+
return o.childNodes.forEach((i) => {
|
|
1058
|
+
i.removeAttribute && i?.removeAttribute("id");
|
|
1059
|
+
}), r ? t(o).toDOM(n) : t.virtual(o);
|
|
1202
1060
|
}
|
|
1203
1061
|
}, each(e, r) {
|
|
1204
|
-
return
|
|
1062
|
+
return w(e, r);
|
|
1205
1063
|
}, empty(e) {
|
|
1206
|
-
return
|
|
1064
|
+
return w(e, se);
|
|
1207
1065
|
}, find(e, r) {
|
|
1208
1066
|
return e.collection.length > 0 ? [...e.first()?.querySelectorAll(r)] : [];
|
|
1209
1067
|
}, find$(e, r) {
|
|
@@ -1217,7 +1075,7 @@ ${r}`), g2;
|
|
|
1217
1075
|
}, hasClass(e, ...r) {
|
|
1218
1076
|
return e.is.empty || !e.node.classList.length ? false : r.find((n) => e.node.classList.contains(n)) && true || false;
|
|
1219
1077
|
}, hide(e) {
|
|
1220
|
-
return
|
|
1078
|
+
return w(e, (r) => _(r, { display: "none !important" }));
|
|
1221
1079
|
}, html(e, r, n) {
|
|
1222
1080
|
switch (true) {
|
|
1223
1081
|
case (e.is.empty && !L(r)):
|
|
@@ -1225,16 +1083,16 @@ ${r}`), g2;
|
|
|
1225
1083
|
case !L(r):
|
|
1226
1084
|
return e.node?.getHTML() ?? "";
|
|
1227
1085
|
default:
|
|
1228
|
-
let
|
|
1229
|
-
return
|
|
1086
|
+
let o = $(`<div>${r.isJQx ? r.HTML.get(true) : r}</div>`);
|
|
1087
|
+
return w(e, (u) => (u.textContent = n ? u.textContent : "", u.insertAdjacentHTML(t.at.end, o.getHTML())));
|
|
1230
1088
|
}
|
|
1231
|
-
}, htmlFor(e, r, n = "",
|
|
1089
|
+
}, htmlFor(e, r, n = "", o = false) {
|
|
1232
1090
|
if (e.is.empty || !L(r) || !L(n)) return e;
|
|
1233
|
-
let
|
|
1234
|
-
if (
|
|
1235
|
-
let
|
|
1236
|
-
return
|
|
1237
|
-
|
|
1091
|
+
let i = e.find$(r);
|
|
1092
|
+
if (i.length < 1) return e;
|
|
1093
|
+
let u = $(`<span>${n}</span>`);
|
|
1094
|
+
return i.each((S2) => {
|
|
1095
|
+
o || (S2.textContent = ""), S2.insertAdjacentHTML(t.at.end, u?.getHTML());
|
|
1238
1096
|
}), e;
|
|
1239
1097
|
}, isEmpty(e) {
|
|
1240
1098
|
return !e.node;
|
|
@@ -1242,14 +1100,14 @@ ${r}`), g2;
|
|
|
1242
1100
|
return e.single(r);
|
|
1243
1101
|
}, on(e, r, ...n) {
|
|
1244
1102
|
switch (true) {
|
|
1245
|
-
case (e.is.empty || !
|
|
1103
|
+
case (e.is.empty || !a(r, String, Array) || !L(r) || n.length < 1):
|
|
1246
1104
|
return e;
|
|
1247
1105
|
default:
|
|
1248
1106
|
return t.handle({ type: r, node: e.node, handler: n }), e;
|
|
1249
1107
|
}
|
|
1250
1108
|
}, once(e, r, ...n) {
|
|
1251
1109
|
switch (true) {
|
|
1252
|
-
case (e.is.empty || !
|
|
1110
|
+
case (e.is.empty || !a(r, String, Array) || !L(r) || n.length < 1):
|
|
1253
1111
|
return e;
|
|
1254
1112
|
default:
|
|
1255
1113
|
return t.handle({ type: r, once: true, node: e.node, handler: n }), e;
|
|
@@ -1257,72 +1115,72 @@ ${r}`), g2;
|
|
|
1257
1115
|
}, prepend(e, ...r) {
|
|
1258
1116
|
if (e.is.empty || !r) return;
|
|
1259
1117
|
let n = e.length === 1;
|
|
1260
|
-
for (let
|
|
1261
|
-
if (L(
|
|
1262
|
-
|
|
1263
|
-
let
|
|
1264
|
-
|
|
1118
|
+
for (let o of r) {
|
|
1119
|
+
if (L(o)) {
|
|
1120
|
+
o = o.trim();
|
|
1121
|
+
let u = !/^<(.+)[^>]+>$/m.test(o) ? t.text(o) : $(o);
|
|
1122
|
+
u = n ? u : M(u), w(e, (S2) => S2.prepend(u.cloneNode(true)));
|
|
1265
1123
|
}
|
|
1266
|
-
|
|
1124
|
+
T(o) && w(e, (i) => i.prepend(n ? o : M(o))), o.isJQx && !o.is.empty && (o.collection.length > 1 && o.collection.reverse(), w(e, (i) => w(o, (u) => i.prepend(n ? u : M(u)))), o.collection.reverse());
|
|
1267
1125
|
}
|
|
1268
1126
|
return e;
|
|
1269
1127
|
}, prependTo(e, r) {
|
|
1270
1128
|
switch (r = typeof r == "string" ? t(r) : r, true) {
|
|
1271
|
-
case (!r?.isJQx && !
|
|
1129
|
+
case (!r?.isJQx && !a(r, HTMLElement) || r?.collection?.length < 1):
|
|
1272
1130
|
return t.warn("[JQx instance].appendTo: invalid input"), e;
|
|
1273
1131
|
default:
|
|
1274
1132
|
return (r.isJQx ? r : t(r)).prepend(e), e;
|
|
1275
1133
|
}
|
|
1276
1134
|
}, prop(e, r, n) {
|
|
1277
|
-
if (
|
|
1278
|
-
let
|
|
1279
|
-
for (let [
|
|
1280
|
-
if (
|
|
1281
|
-
if (
|
|
1282
|
-
|
|
1283
|
-
if (
|
|
1284
|
-
|
|
1135
|
+
if (a(r, String) && !n) return r.startsWith("data") ? e[0]?.dataset[r.slice(r.indexOf("-") + 1)] : e[0]?.[r];
|
|
1136
|
+
let o = a(r, Object) ? r : { [r]: n };
|
|
1137
|
+
for (let [i, u] of Object.entries(o)) {
|
|
1138
|
+
if (i = i.trim(), u && !ie(i) || !u) return false;
|
|
1139
|
+
if (i.toLowerCase() === "id") return e[0].id = u;
|
|
1140
|
+
w(e, (p2) => {
|
|
1141
|
+
if (i.startsWith("data")) return p2.dataset[i.slice(i.indexOf("-") + 1)] = u;
|
|
1142
|
+
p2[i] = u;
|
|
1285
1143
|
});
|
|
1286
1144
|
}
|
|
1287
1145
|
return e;
|
|
1288
1146
|
}, remove(e, r) {
|
|
1289
|
-
let n = (
|
|
1147
|
+
let n = (i) => i.remove(), o = () => e.collection = e.collection.filter((i) => document.documentElement.contains(i));
|
|
1290
1148
|
if (r) {
|
|
1291
|
-
let
|
|
1292
|
-
return
|
|
1149
|
+
let i = e.find$(r);
|
|
1150
|
+
return i.is.empty || (w(i, n), o()), e;
|
|
1293
1151
|
}
|
|
1294
|
-
return
|
|
1152
|
+
return w(e, n), o(), e;
|
|
1295
1153
|
}, rmAttr(e, ...r) {
|
|
1296
1154
|
for (let n of r) e.node.removeAttribute(n);
|
|
1297
1155
|
return e;
|
|
1298
1156
|
}, removeClass(e, ...r) {
|
|
1299
|
-
return
|
|
1300
|
-
if (n) for (let
|
|
1157
|
+
return w(e, (n) => {
|
|
1158
|
+
if (n) for (let o of r) n.classList.remove(o);
|
|
1301
1159
|
});
|
|
1302
1160
|
}, renderTo(e, r, n) {
|
|
1303
|
-
return r =
|
|
1161
|
+
return r = a(r, HTMLElement) || r.isJQx ? r : document.body, n = a(n, String) && t.at[n] ? n : t.at.end, e.first$().toDOM(r, n), e;
|
|
1304
1162
|
}, replace(e, r, n) {
|
|
1305
|
-
let
|
|
1306
|
-
return !r || !
|
|
1163
|
+
let o = e.node;
|
|
1164
|
+
return !r || !a(n, HTMLElement) && !n?.isJQx ? (t.logger.error("JQx replace: invalid replacement value"), e) : ((n.isJQx || a(n, NodeList)) && (n = n[0]), o && r && (r = a(r, String) ? o.querySelectorAll(r) : r.isJQx ? r.collection : r, a(r, HTMLElement, NodeList, Array) && a(n, HTMLElement) && (a(r, HTMLElement) ? [r] : [...r]).forEach((i) => i.replaceWith(n.cloneNode(true)))), e);
|
|
1307
1165
|
}, replaceClass(e, r, ...n) {
|
|
1308
|
-
return
|
|
1309
|
-
|
|
1310
|
-
for (let
|
|
1166
|
+
return w(e, (o) => {
|
|
1167
|
+
o.classList.remove(r);
|
|
1168
|
+
for (let i of n) o.classList.add(i);
|
|
1311
1169
|
});
|
|
1312
1170
|
}, replaceMe(e, r) {
|
|
1313
1171
|
return e.replaceWith(r);
|
|
1314
1172
|
}, replaceWith(e, r) {
|
|
1315
|
-
return r =
|
|
1173
|
+
return r = a(r, Element) ? r : r.isJQx ? r[0] : void 0, r && (e[0].replaceWith(r), e = t.virtual(r)), e;
|
|
1316
1174
|
}, setData(e, r) {
|
|
1317
|
-
return
|
|
1175
|
+
return w(e, (n) => ae(n, r));
|
|
1318
1176
|
}, show(e) {
|
|
1319
|
-
return
|
|
1177
|
+
return w(e, (r) => _(r, { display: "revert-layer !important" }));
|
|
1320
1178
|
}, single(e, r) {
|
|
1321
1179
|
let n = e.collection.length > 0;
|
|
1322
1180
|
switch (r = r ?? 0, true) {
|
|
1323
|
-
case (n &&
|
|
1181
|
+
case (n && a(r, String)):
|
|
1324
1182
|
return e.find$(r);
|
|
1325
|
-
case (n &&
|
|
1183
|
+
case (n && a(r, Number)):
|
|
1326
1184
|
return t(e.collection[r]);
|
|
1327
1185
|
case n:
|
|
1328
1186
|
return e.collection[0];
|
|
@@ -1330,267 +1188,273 @@ ${r}`), g2;
|
|
|
1330
1188
|
return e;
|
|
1331
1189
|
}
|
|
1332
1190
|
}, style(e, r, n) {
|
|
1333
|
-
return
|
|
1334
|
-
n &&
|
|
1191
|
+
return w(e, (i) => {
|
|
1192
|
+
n && a(r, String) && (r = { [r]: n || "none" }), _(i, r);
|
|
1335
1193
|
});
|
|
1336
1194
|
}, text(e, r, n = false) {
|
|
1337
1195
|
switch (true) {
|
|
1338
1196
|
case e.isEmpty():
|
|
1339
1197
|
return e;
|
|
1340
|
-
case !
|
|
1198
|
+
case !a(r, String):
|
|
1341
1199
|
return e.node.textContent;
|
|
1342
1200
|
default:
|
|
1343
|
-
return
|
|
1201
|
+
return w(e, (o) => o.textContent = n ? o.textContent + r : r);
|
|
1344
1202
|
}
|
|
1345
|
-
}, toDOM(e, r = document.body, n =
|
|
1346
|
-
return e.isVirtual = false,
|
|
1203
|
+
}, toDOM(e, r = document.body, n = C.BeforeEnd) {
|
|
1204
|
+
return e.isVirtual = false, R(e.collection, r, n), e;
|
|
1347
1205
|
}, toggleClass(e, r) {
|
|
1348
|
-
return
|
|
1206
|
+
return w(e, (n) => n.classList.toggle(r));
|
|
1349
1207
|
}, toNodeList(e) {
|
|
1350
1208
|
return [...e.collection].map((r) => document.importNode(r, true));
|
|
1351
|
-
}, trigger(e, r, n,
|
|
1352
|
-
n =
|
|
1353
|
-
let
|
|
1354
|
-
return e.is.empty || e.each((
|
|
1209
|
+
}, trigger(e, r, n, o) {
|
|
1210
|
+
n = a(n, Function) ? n : Event, o = a(o, Object) ? { ...o, bubbles: o.bubbles ?? true } : { bubbles: true };
|
|
1211
|
+
let i = new n(r, o);
|
|
1212
|
+
return e.is.empty || e.each((u) => u.dispatchEvent(i)), e;
|
|
1355
1213
|
}, val(e, r) {
|
|
1356
1214
|
switch (true) {
|
|
1357
|
-
case (e.is.empty || !
|
|
1215
|
+
case (e.is.empty || !a(e.node, HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement)):
|
|
1358
1216
|
return e;
|
|
1359
|
-
case !
|
|
1217
|
+
case !a(r, String):
|
|
1360
1218
|
return e.node.value;
|
|
1361
1219
|
default:
|
|
1362
|
-
return e.node.value =
|
|
1220
|
+
return e.node.value = a(r, String) ? r : "", e;
|
|
1363
1221
|
}
|
|
1364
1222
|
} };
|
|
1365
1223
|
}
|
|
1366
|
-
var
|
|
1224
|
+
var Ae;
|
|
1367
1225
|
var de;
|
|
1368
|
-
var { isComment:
|
|
1369
|
-
function
|
|
1370
|
-
return { ...
|
|
1226
|
+
var { isComment: on, isText: sn, isHtmlString: an, isArrayOfHtmlElements: ln, isArrayOfHtmlStrings: cn, ElemArray2HtmlString: un, cssRuleEdit: $e, addFn: or } = ir();
|
|
1227
|
+
function ir() {
|
|
1228
|
+
return { ...Ze(), addFn: sr };
|
|
1371
1229
|
}
|
|
1372
|
-
function
|
|
1373
|
-
return t = t?.trim(), !L(t) || !
|
|
1230
|
+
function sr(t, e) {
|
|
1231
|
+
return t = t?.trim(), !L(t) || !a(e, Function) ? v.error("JQx.fn: method invalid parameter(s)") : (de[t] = (r, ...n) => e(r, ...n), v.log(`JQx: added extension function [${t}]`));
|
|
1374
1232
|
}
|
|
1375
|
-
function
|
|
1233
|
+
function ar(t) {
|
|
1376
1234
|
return function(e, r, n) {
|
|
1377
|
-
if (e = e?.trim(), !L(e) || !
|
|
1378
|
-
let
|
|
1235
|
+
if (e = e?.trim(), !L(e) || !a(r, Function)) return t.error("JQx.staticFn: invalid parameter(s)");
|
|
1236
|
+
let o = n ? { get() {
|
|
1379
1237
|
return r();
|
|
1380
|
-
} } : { value(...
|
|
1381
|
-
return r(...
|
|
1238
|
+
} } : { value(...i) {
|
|
1239
|
+
return r(...i);
|
|
1382
1240
|
} };
|
|
1383
1241
|
try {
|
|
1384
|
-
Object.defineProperty(t, e,
|
|
1242
|
+
Object.defineProperty(t, e, o);
|
|
1385
1243
|
} catch {
|
|
1386
1244
|
return t.warn(`JQx.staticFn: extension [${e}] already exists`);
|
|
1387
1245
|
}
|
|
1388
|
-
return
|
|
1246
|
+
return v.log(`JQx: added static extension function [${e}]`);
|
|
1389
1247
|
};
|
|
1390
1248
|
}
|
|
1391
|
-
function
|
|
1392
|
-
return new Proxy(t, Object.freeze({ get: (e, r) =>
|
|
1249
|
+
function me(t) {
|
|
1250
|
+
return new Proxy(t, Object.freeze({ get: (e, r) => lr(e, r, t) }));
|
|
1393
1251
|
}
|
|
1394
|
-
function
|
|
1395
|
-
return (...r) =>
|
|
1252
|
+
function tt(t, e) {
|
|
1253
|
+
return (...r) => e = typeof t == "function" ? t(me(e), ...r) : e;
|
|
1396
1254
|
}
|
|
1397
|
-
function
|
|
1255
|
+
function lr(t, e, r) {
|
|
1398
1256
|
switch (true) {
|
|
1399
|
-
case
|
|
1400
|
-
return
|
|
1401
|
-
case
|
|
1257
|
+
case (e === Symbol.proxy || e === Symbol.type):
|
|
1258
|
+
return "JQx instance proxy";
|
|
1259
|
+
case typeof e == "symbol":
|
|
1260
|
+
return P({ trial: () => t[e], whenError: () => t });
|
|
1261
|
+
case (!Number.isNaN(+e) && typeof +e == "number"):
|
|
1402
1262
|
return t.collection?.[e] || void 0;
|
|
1403
|
-
case e in
|
|
1404
|
-
return
|
|
1263
|
+
case e in Ae:
|
|
1264
|
+
return tt(Ae[e], r)();
|
|
1405
1265
|
case e in de:
|
|
1406
|
-
return
|
|
1266
|
+
return tt(de[e], r);
|
|
1407
1267
|
default:
|
|
1408
|
-
return t
|
|
1268
|
+
return Reflect.get(t, e);
|
|
1409
1269
|
}
|
|
1410
1270
|
}
|
|
1411
|
-
function
|
|
1412
|
-
let e =
|
|
1271
|
+
function ot(t) {
|
|
1272
|
+
let e = mr(t);
|
|
1413
1273
|
for (let [r, n] of Object.entries(Object.getOwnPropertyDescriptors(e))) Object.defineProperty(t, r, n);
|
|
1414
1274
|
return t;
|
|
1415
1275
|
}
|
|
1416
|
-
function
|
|
1276
|
+
function cr(t) {
|
|
1417
1277
|
return { allow(e) {
|
|
1418
1278
|
let r = /-/.test(e), n = r && e;
|
|
1419
|
-
e = r ?
|
|
1279
|
+
e = r ? V(e) : e.toLowerCase(), H.allowTag(e), Object.defineProperties(t, He(e, true, t, n));
|
|
1420
1280
|
}, prohibit(e) {
|
|
1421
|
-
e = e.toLowerCase(),
|
|
1281
|
+
e = e.toLowerCase(), H.prohibitTag(e), Object.defineProperties(t, He(e, false, t));
|
|
1422
1282
|
} };
|
|
1423
1283
|
}
|
|
1424
|
-
function
|
|
1284
|
+
function rt(...t) {
|
|
1425
1285
|
if (t.length === 1) {
|
|
1426
1286
|
let e = String(t.shift().trim());
|
|
1427
1287
|
t = e.startsWith("!") ? [e.slice(1, -1)] : e.split(",").map((r) => r.trim());
|
|
1428
1288
|
}
|
|
1429
|
-
for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r))
|
|
1289
|
+
for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r)) $e(e, { removeRule: 1 });
|
|
1430
1290
|
}
|
|
1431
|
-
function
|
|
1291
|
+
function ur(t) {
|
|
1432
1292
|
return function(e, r, n) {
|
|
1433
|
-
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(
|
|
1434
|
-
let
|
|
1435
|
-
if (r && !
|
|
1436
|
-
return
|
|
1293
|
+
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(C).find((i) => n === i);
|
|
1294
|
+
let o = t(e, document.createElement("br"));
|
|
1295
|
+
if (r && !a(r, HTMLBRElement)) for (let i of o.collection) n ? r.insertAdjacentElement(n, i) : r.append(i);
|
|
1296
|
+
return o;
|
|
1437
1297
|
};
|
|
1438
1298
|
}
|
|
1439
|
-
function
|
|
1299
|
+
function fr(...t) {
|
|
1440
1300
|
let e = {};
|
|
1441
1301
|
for (let r of t) {
|
|
1442
1302
|
let n = Object.getOwnPropertyDescriptors(r);
|
|
1443
|
-
for (let [
|
|
1303
|
+
for (let [o, i] of Object.entries(n)) !(o in e) && Object.defineProperty(e, o, { ...i, enumerable: false });
|
|
1444
1304
|
}
|
|
1445
1305
|
return e;
|
|
1446
1306
|
}
|
|
1447
|
-
function
|
|
1448
|
-
return t =
|
|
1449
|
-
return (...
|
|
1450
|
-
let
|
|
1451
|
-
return
|
|
1307
|
+
function dr(t, e, r, n) {
|
|
1308
|
+
return t = A(n || t.toLowerCase()), { get() {
|
|
1309
|
+
return (...o) => {
|
|
1310
|
+
let i = e && r.virtual(O(z[t](...o))) || void 0, S2 = !a(i?.node, Comment, Text, void 0) ? we(i) : "";
|
|
1311
|
+
return v.log(e ? `JQx: created (virtual) instance from [JQx].${t} ${S2}` : `JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`), i;
|
|
1452
1312
|
};
|
|
1453
1313
|
}, enumerable: false, configurable: true };
|
|
1454
1314
|
}
|
|
1455
|
-
function
|
|
1315
|
+
function He(t, e, r, n) {
|
|
1456
1316
|
t = t.toLowerCase();
|
|
1457
|
-
let
|
|
1458
|
-
return n ? { [n]:
|
|
1317
|
+
let o = dr(t, e, r, n);
|
|
1318
|
+
return n ? { [n]: o, [V(n)]: o } : { [t]: o, [t.toUpperCase()]: o };
|
|
1459
1319
|
}
|
|
1460
|
-
function
|
|
1461
|
-
return
|
|
1320
|
+
function mr(t) {
|
|
1321
|
+
return fr(Object.entries(H.tagsRaw).reduce(gr(t), {}), xr(t));
|
|
1462
1322
|
}
|
|
1463
|
-
function
|
|
1323
|
+
function gr(t) {
|
|
1464
1324
|
return function(e, [r, n]) {
|
|
1465
|
-
return Object.defineProperties(e,
|
|
1325
|
+
return Object.defineProperties(e, He(r, n, t)), e;
|
|
1466
1326
|
};
|
|
1467
1327
|
}
|
|
1468
|
-
function
|
|
1328
|
+
function pr(t) {
|
|
1469
1329
|
return function(e, r, ...n) {
|
|
1470
|
-
|
|
1330
|
+
a(r, Function) && (n.push(r), r = void 0), t({ type: e, selector: r, handlers: n });
|
|
1471
1331
|
};
|
|
1472
1332
|
}
|
|
1473
|
-
function
|
|
1333
|
+
function yr(t) {
|
|
1474
1334
|
return function(e) {
|
|
1475
|
-
let { type: r, types: n, origin:
|
|
1476
|
-
|
|
1477
|
-
let
|
|
1478
|
-
|
|
1479
|
-
let c = { type:
|
|
1335
|
+
let { type: r, types: n, origin: o, selector: i, handler: u, handlers: S2, node: p2, name: x2, capture: f2, once: y, about: m } = e;
|
|
1336
|
+
u = S2 || u, r = n || r, i = o || i;
|
|
1337
|
+
let b2 = ve(r), d = x2;
|
|
1338
|
+
u = a(u, Function) ? [u] : u;
|
|
1339
|
+
let c = { type: b2, selector: i || o, capture: f2, name: d, once: y, node: p2, about: m };
|
|
1480
1340
|
switch (true) {
|
|
1481
|
-
case (
|
|
1482
|
-
for (let
|
|
1341
|
+
case (a(b2, Array) && b2.length > 0):
|
|
1342
|
+
for (let s of b2) c.type = s, nt(u, c, t);
|
|
1483
1343
|
break;
|
|
1484
1344
|
default:
|
|
1485
|
-
return
|
|
1345
|
+
return nt(u, c, t);
|
|
1486
1346
|
}
|
|
1487
1347
|
};
|
|
1488
1348
|
}
|
|
1489
|
-
function
|
|
1349
|
+
function nt(t, e, r) {
|
|
1490
1350
|
for (let n of t) r.listen({ ...e, handler: n });
|
|
1491
1351
|
}
|
|
1492
|
-
function
|
|
1352
|
+
function br(t) {
|
|
1493
1353
|
return function(e, r) {
|
|
1494
1354
|
return r = L(r) && r, e = L(e) && e, r && e && t.listenerStore[e][r];
|
|
1495
1355
|
};
|
|
1496
1356
|
}
|
|
1497
|
-
function
|
|
1357
|
+
function hr(t) {
|
|
1498
1358
|
return t.activePopup || Object.defineProperty(t, "activePopup", { value: ee(t), enumerable: false }), t.activePopup;
|
|
1499
1359
|
}
|
|
1500
|
-
function
|
|
1501
|
-
let e = (
|
|
1502
|
-
return
|
|
1503
|
-
}, n = function(...
|
|
1504
|
-
for (let
|
|
1505
|
-
},
|
|
1506
|
-
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit:
|
|
1507
|
-
}
|
|
1508
|
-
function
|
|
1509
|
-
let { factoryExtensions: e, instanceExtensions: r } =
|
|
1510
|
-
|
|
1511
|
-
let { editCssRule: n, createStyle:
|
|
1512
|
-
return
|
|
1513
|
-
return
|
|
1514
|
-
}, node(c,
|
|
1515
|
-
return
|
|
1516
|
-
}, nodes(c,
|
|
1517
|
-
return [...
|
|
1518
|
-
}, clearAllTimers:
|
|
1519
|
-
return function(c,
|
|
1520
|
-
return
|
|
1360
|
+
function Sr(t) {
|
|
1361
|
+
let e = (f2, y) => $e(f2, y), r = function(f2) {
|
|
1362
|
+
return B({ createWithId: f2 || `jqx${ce()}` });
|
|
1363
|
+
}, n = function(...f2) {
|
|
1364
|
+
for (let y of f2) $e(y);
|
|
1365
|
+
}, o = cr(t), i = te(t), u = yr(i);
|
|
1366
|
+
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit: o, handle: u, capturedHandling: u, log: (...f2) => v.on.log(...f2).off, warn: (...f2) => v.on.warn(...f2).off, error: (...f2) => v.on.error(...f2).off, handlerWrapper: i };
|
|
1367
|
+
}
|
|
1368
|
+
function xr(t) {
|
|
1369
|
+
let { factoryExtensions: e, instanceExtensions: r } = et(t);
|
|
1370
|
+
Ae = e, de = r;
|
|
1371
|
+
let { editCssRule: n, createStyle: o, editCssRules: i, allowProhibit: u, handle: S2, capturedHandling: p2, log: x2, warn: f2, error: y, handlerWrapper: m } = Sr(t), b2 = br(t), d = ar(t);
|
|
1372
|
+
return z.setError = (c) => (y(`JQx direct element creation error: [${c}] is not a valid tag`), t.br()), { log: x2, warn: f2, error: y, editCssRules: i, createStyle: o, editStylesheet: o, editCssRule: n, escHtml: N, logger: v, proxyWrapper: G, text(c, s = false) {
|
|
1373
|
+
return s ? t.comment(c) : document.createTextNode(c);
|
|
1374
|
+
}, node(c, s = document) {
|
|
1375
|
+
return s.querySelector(c, s);
|
|
1376
|
+
}, nodes(c, s = document) {
|
|
1377
|
+
return [...s.querySelectorAll(c, s)];
|
|
1378
|
+
}, clearAllTimers: xe, get staticFn() {
|
|
1379
|
+
return function(c, s, l) {
|
|
1380
|
+
return d(c, s, l);
|
|
1521
1381
|
};
|
|
1522
1382
|
}, get toBool() {
|
|
1523
|
-
return
|
|
1383
|
+
return Le;
|
|
1524
1384
|
}, get getNamedListener() {
|
|
1525
|
-
return
|
|
1385
|
+
return b2;
|
|
1526
1386
|
}, get virtual() {
|
|
1527
|
-
return
|
|
1387
|
+
return ur(t);
|
|
1528
1388
|
}, get allowTag() {
|
|
1529
|
-
return
|
|
1389
|
+
return u.allow;
|
|
1530
1390
|
}, get prohibitTag() {
|
|
1531
|
-
return
|
|
1391
|
+
return u.prohibit;
|
|
1532
1392
|
}, get removeCssRule() {
|
|
1533
|
-
return
|
|
1393
|
+
return rt;
|
|
1534
1394
|
}, get removeCssRules() {
|
|
1535
|
-
return
|
|
1395
|
+
return rt;
|
|
1536
1396
|
}, get delegate() {
|
|
1537
|
-
return
|
|
1397
|
+
return pr(p2);
|
|
1538
1398
|
}, get delegateCaptured() {
|
|
1539
|
-
return
|
|
1399
|
+
return p2;
|
|
1540
1400
|
}, get handle() {
|
|
1541
|
-
return
|
|
1401
|
+
return p2;
|
|
1542
1402
|
}, get listen() {
|
|
1543
1403
|
return m.listen;
|
|
1544
1404
|
}, get at() {
|
|
1545
|
-
return
|
|
1405
|
+
return C;
|
|
1546
1406
|
}, get setStyle() {
|
|
1547
1407
|
return n;
|
|
1548
1408
|
}, get fn() {
|
|
1549
|
-
return
|
|
1409
|
+
return or;
|
|
1550
1410
|
}, get lenient() {
|
|
1551
|
-
return
|
|
1411
|
+
return H.allowUnknownHtmlTags;
|
|
1552
1412
|
}, get IS() {
|
|
1553
|
-
return
|
|
1413
|
+
return a;
|
|
1554
1414
|
}, get Popup() {
|
|
1555
|
-
return
|
|
1415
|
+
return hr(t);
|
|
1556
1416
|
}, get listenerStore() {
|
|
1557
1417
|
return m.ListenerStore;
|
|
1558
1418
|
} };
|
|
1559
1419
|
}
|
|
1560
|
-
var
|
|
1420
|
+
var it = ot(wr());
|
|
1561
1421
|
function wr() {
|
|
1562
|
-
return function(e, r, n =
|
|
1422
|
+
return function(e, r, n = C.BeforeEnd) {
|
|
1563
1423
|
if (e?.isJQx) return e;
|
|
1564
|
-
let
|
|
1565
|
-
r = (!
|
|
1566
|
-
let
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
let
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1424
|
+
let o = a(r, HTMLBRElement);
|
|
1425
|
+
r = (!o && r && r.isJQx ? r[0] : r) || document.body, n = n && Object.values(C).find((f2) => n === f2) ? n : void 0;
|
|
1426
|
+
let i = U(e), S2 = !i && fe(e) || i, p2 = { collection: le(e) ?? [], isVirtual: o, isJQx: true }, x2 = Y(p2.collection);
|
|
1427
|
+
switch (true) {
|
|
1428
|
+
case (p2.collection.length && x2 && !o):
|
|
1429
|
+
for (let f2 of p2.collection) r.contains(f2) || R([f2], r, n);
|
|
1430
|
+
break;
|
|
1431
|
+
case S2:
|
|
1432
|
+
for (let f2 of [e].flat()) p2.collection.push($(f2));
|
|
1433
|
+
if (p2.collection.length > 0) {
|
|
1434
|
+
let f2 = p2.collection.filter((d) => d?.dataset?.jqxcreationerror);
|
|
1435
|
+
p2.collection = p2.collection.filter((d) => !d?.dataset?.jqxcreationerror);
|
|
1436
|
+
let m = p2.collection.map((d) => `${String(d.constructor).split(/function|\(/)[1].trim()}`).length > 1;
|
|
1437
|
+
p2 = me(p2);
|
|
1438
|
+
let b2 = p2.collection.length > 0 ? Xe(p2) : "sanitized: no elements remaining";
|
|
1439
|
+
v.log(`JQx: created ${p2.isVirtual ? "(virtual)" : ""} instance from ${m ? "array of " : ""}HTML string${m ? "s" : ""} ${b2}`), p2.isVirtual || R(p2.collection, r, n);
|
|
1440
|
+
}
|
|
1441
|
+
break;
|
|
1442
|
+
default:
|
|
1443
|
+
Fe(e, r, p2);
|
|
1580
1444
|
}
|
|
1581
|
-
return
|
|
1445
|
+
return me(p2);
|
|
1582
1446
|
};
|
|
1583
1447
|
}
|
|
1584
|
-
var
|
|
1448
|
+
var yn = it;
|
|
1585
1449
|
|
|
1586
1450
|
// ../Resource/Externals/ticktock.min.js
|
|
1587
1451
|
var M2 = ke2();
|
|
1588
1452
|
function ke2() {
|
|
1589
|
-
let [e, r, n, t] = ["2-digit", "numeric", "long", "short"],
|
|
1453
|
+
let [e, r, n, t] = ["2-digit", "numeric", "long", "short"], a2 = { fixed: { MM: { month: n }, M: { month: t }, m: { month: r }, mm: { month: e }, yyyy: { year: r }, yy: { year: e }, WD: { weekday: n }, wd: { weekday: t }, d: { day: r }, dd: { day: e }, h: { hour: r }, hh: { hour: e }, mi: { minute: r }, mmi: { minute: e }, s: { second: r }, ss: { second: e }, ms: { fractionalSecondDigits: 3 }, tz: { timeZoneName: "shortOffset" }, dl: { locale: "default" }, h12: { hour12: false }, yn: { yearName: "" }, ry: { relatedYear: true }, msp: { fractionalSecond: true } }, dynamic: { tzn: (l) => ({ timeZoneName: l.slice(4) }), hrc: (l) => ({ hourCycle: `h${l.slice(4)}` }), ds: (l) => ({ dateStyle: l.slice(3) }), ts: (l) => ({ timeStyle: l.slice(3) }), tz: (l) => ({ timeZone: l.slice(3) }), e: (l) => ({ era: l.slice(2) }), l: (l) => ({ locale: l.slice(2) }) } }, o = { ...a2, retrieveDyn(l) {
|
|
1590
1454
|
let y = l?.slice(0, l.indexOf(":"));
|
|
1591
|
-
return
|
|
1455
|
+
return a2.dynamic[y] && a2.dynamic[y](l);
|
|
1592
1456
|
}, get re() {
|
|
1593
|
-
return new RegExp(`\\b(${Object.keys(
|
|
1457
|
+
return new RegExp(`\\b(${Object.keys(a2.fixed).join("|")})\\b`, "g");
|
|
1594
1458
|
} }, s = (l = "dtf", y = 0) => {
|
|
1595
1459
|
let h2 = ` ${l.replace(/(?<=\{)(.+?)(?=})/g, (d) => `[${y++}]`).replace(/[{}]/g, "").trim()} `, D2 = l.match(/(?<=\{)(.+?)(?=})/g) || [];
|
|
1596
1460
|
return { get texts() {
|
|
@@ -1606,69 +1470,69 @@ ${r}`), g2;
|
|
|
1606
1470
|
}, finalize(d = "", Z2 = "", b2 = "", $3 = "") {
|
|
1607
1471
|
return h2.replace(/~([\d+]?)/g, "$1").replace(/dtf/, d).replace(/era/, b2).replace(/dp\b|~dp\b/, Z2).replace(/yn\b/, $3).replace(/\[(\d+?)]/g, (w3, Fe2) => D2[Fe2].trim()).trim();
|
|
1608
1472
|
} };
|
|
1609
|
-
},
|
|
1610
|
-
let D2 = c(...
|
|
1473
|
+
}, u = (l) => l.replace(/\s+/g, ""), c = (...l) => l?.reduce((y, h2) => ({ ...y, ...o.retrieveDyn(h2) || o.fixed[h2] }), o.fixed.dl), i = (l, y, h2) => {
|
|
1474
|
+
let D2 = c(...u(h2).split(",")), d = Intl.DateTimeFormat(D2.locale, D2).format(l);
|
|
1611
1475
|
return y.finalize(d);
|
|
1612
1476
|
}, m = (l, y, h2, D2) => l.toLocaleString(y, { timeZone: h2, month: D2 ? t : n }), T3 = (l, y, h2) => {
|
|
1613
|
-
let D2 = c(...y.units.concat(
|
|
1477
|
+
let D2 = c(...y.units.concat(u(h2).split(",")).flat()), d = { ...o.fixed }, Z2 = ($3, w3) => D2[$3] === "numeric" && w3.startsWith("0") ? w3.slice(1) : w3, b2 = Intl.DateTimeFormat(D2.locale, D2).formatToParts(l).reduce(($3, w3) => w3.type === "literal" && /[ ,/-]/.test(w3.value) ? $3 : { ...$3, [w3.type]: Z2(w3.type, w3.value) }, {});
|
|
1614
1478
|
return d.ms = D2.fractionalSecondDigits ? d.msp : d.ms, d.yyyy = b2.relatedYear ? d.ry : d.yyyy, y.formatStr = y.formatStr.replace(o.re, ($3) => /^(M|MM)$/.test($3) ? m(l, D2.locale, D2.timeZone, /^M$/.test($3)) : b2[Object.keys(d[$3]).shift()] || $3), y.finalize(void 0, b2.dayPeriod, b2.era, b2.yearName);
|
|
1615
1479
|
};
|
|
1616
1480
|
return (l, y, h2 = "l:default") => /ds:|ts:/.test(h2) ? i(l, s(void 0), h2) : T3(l, s(y || void 0), h2);
|
|
1617
1481
|
}
|
|
1618
1482
|
var le2 = Ce2;
|
|
1619
1483
|
function Ce2() {
|
|
1620
|
-
let e = (t,
|
|
1621
|
-
let o = isNaN(new Date(t)), s = isNaN(new Date(
|
|
1484
|
+
let e = (t, a2) => {
|
|
1485
|
+
let o = isNaN(new Date(t)), s = isNaN(new Date(a2));
|
|
1622
1486
|
if (s) {
|
|
1623
|
-
let [
|
|
1624
|
-
return { error: true, message:
|
|
1487
|
+
let [u, c, i] = Array(3).fill("end date not valid");
|
|
1488
|
+
return { error: true, message: u, full: c, clean: i };
|
|
1625
1489
|
}
|
|
1626
1490
|
if (o) {
|
|
1627
|
-
let [
|
|
1628
|
-
return { error: true, message:
|
|
1491
|
+
let [u, c, i] = Array(3).fill("start date not valid");
|
|
1492
|
+
return { error: true, message: u, full: c, clean: i };
|
|
1629
1493
|
}
|
|
1630
1494
|
if (o && !s) {
|
|
1631
|
-
let [
|
|
1632
|
-
return { error: true, message:
|
|
1495
|
+
let [u, c, i] = Array(3).fill("start- and/or end date are not valid");
|
|
1496
|
+
return { error: true, message: u, full: c, clean: i };
|
|
1633
1497
|
}
|
|
1634
1498
|
return { error: false };
|
|
1635
1499
|
}, r = n();
|
|
1636
|
-
return function({ start: t, end:
|
|
1637
|
-
let s = e(t,
|
|
1500
|
+
return function({ start: t, end: a2, diffs: o = {} } = {}) {
|
|
1501
|
+
let s = e(t, a2), u = a2 > t ? "+" : "-";
|
|
1638
1502
|
if (s.error) return s;
|
|
1639
|
-
let c = Math.abs(t -
|
|
1640
|
-
o = { ...o, fromUTC: t, toUTC:
|
|
1503
|
+
let c = Math.abs(t - a2), i = new Date(c), m = i.getUTCFullYear() - 1970, T3 = i.getUTCMonth(), l = i.getUTCDate() - 1, y = l % 7, h2 = Math.floor(l / 7), D2 = i.getUTCHours(), d = i.getUTCMinutes(), Z2 = i.getUTCSeconds(), b2 = i.getUTCMilliseconds(), $3 = Math.floor(c / 864e5);
|
|
1504
|
+
o = { ...o, fromUTC: t, toUTC: a2, sign: "", years: m, months: T3, days: l, hours: D2, minutes: d, seconds: Z2, milliseconds: b2, diffInDays: $3 }, o.full = r({ values: o, full: true }), o.clean = r({ values: o }), o.equalDates = o.clean === "Dates are equal";
|
|
1641
1505
|
let w3 = D2 + d + Z2 > 0 ? "T" : "";
|
|
1642
|
-
return o.clean !== "Dates are equal" && (o.sign =
|
|
1506
|
+
return o.clean !== "Dates are equal" && (o.sign = u, o.jsPeriod = `${u}P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${h2 > 0 ? `${h2}W` : ""}${y > 0 ? `${y}D` : ""}${w3}${D2 > 0 ? `${D2}H` : ""}${d > 0 ? `${d}M` : ""}${Z2 > 0 ? `${Z2}S` : ""}`, o.ISOPeriod = `P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${l > 0 ? `${l}D` : ""}${w3}${D2 > 0 ? `${D2}H` : ""}${d > 0 ? `${d}M` : ""}${Z2 > 0 ? `${Z2}S` : ""}`), o;
|
|
1643
1507
|
};
|
|
1644
1508
|
function n() {
|
|
1645
|
-
let t = (...i) => (m) => i.reduce((T3, l) => l(T3), m),
|
|
1646
|
-
return t(({ values: i, full: m }) => [Object.entries(i).filter(([T3]) => /^(years|month|days|hours|minutes|seconds)/i.test(T3)), m], ([i, m]) => m ? i : i.filter(([, T3]) => m ? +T3 : T3 > 0), (i) => i.reduce((m, [T3, l]) => [...m, `${l} ${
|
|
1509
|
+
let t = (...i) => (m) => i.reduce((T3, l) => l(T3), m), a2 = (i, m) => i === 1 ? m.slice(0, -1) : m;
|
|
1510
|
+
return t(({ values: i, full: m }) => [Object.entries(i).filter(([T3]) => /^(years|month|days|hours|minutes|seconds)/i.test(T3)), m], ([i, m]) => m ? i : i.filter(([, T3]) => m ? +T3 : T3 > 0), (i) => i.reduce((m, [T3, l]) => [...m, `${l} ${a2(l, T3)}`], []), (i) => i.length < 1 ? "Dates are equal" : `${i.slice(0, -1).join(", ")}${i.length > 1 ? " and " : ""}${i.slice(-1).shift()}`);
|
|
1647
1511
|
}
|
|
1648
1512
|
}
|
|
1649
1513
|
var ie2 = Ae2;
|
|
1650
1514
|
function Ae2() {
|
|
1651
|
-
let e = Object.entries({ year: "FullYear", month: "Month", date: "Date", day: "Date", hour: "Hours", minute: "Minutes", second: "Seconds", millisecond: "Milliseconds" }).reduce((t, [
|
|
1652
|
-
let
|
|
1653
|
-
return r = t[0].trim().startsWith("subtract,"), r && (t =
|
|
1515
|
+
let e = Object.entries({ year: "FullYear", month: "Month", date: "Date", day: "Date", hour: "Hours", minute: "Minutes", second: "Seconds", millisecond: "Milliseconds" }).reduce((t, [a2, o]) => ({ ...t, [a2]: o, [`${a2}s`]: o }), {}), r = false, n = function(...t) {
|
|
1516
|
+
let a2 = t.length === 1;
|
|
1517
|
+
return r = t[0].trim().startsWith("subtract,"), r && (t = a2 ? t[0].trim().replace(/^subtract,/i, "").split(",").map((o) => o.trim()) : t.filter((o) => !o.startsWith("subtract"))), a2 && !r && (t = t[0].split(",").map((o) => o.trim())), t.map(function(o) {
|
|
1654
1518
|
if (!o) return false;
|
|
1655
1519
|
let s = o.toLowerCase().split(/ {1,}/);
|
|
1656
|
-
return s.length < 2 ? false : s.map((
|
|
1657
|
-
|
|
1658
|
-
let c = parseInt(
|
|
1659
|
-
return Number.isNaN(c) ?
|
|
1520
|
+
return s.length < 2 ? false : s.map((u) => {
|
|
1521
|
+
u = `${u}`.trim().replace(/[^a-z0-9-+]/g, "");
|
|
1522
|
+
let c = parseInt(u, 10);
|
|
1523
|
+
return Number.isNaN(c) ? u : r ? -c : +c;
|
|
1660
1524
|
});
|
|
1661
1525
|
}).filter((o) => o);
|
|
1662
1526
|
};
|
|
1663
|
-
return function(t, ...
|
|
1664
|
-
if (
|
|
1665
|
-
let o = n(...
|
|
1666
|
-
return o.length && o.forEach(([s,
|
|
1667
|
-
|
|
1527
|
+
return function(t, ...a2) {
|
|
1528
|
+
if (a2.length < 1) return t;
|
|
1529
|
+
let o = n(...a2);
|
|
1530
|
+
return o.length && o.forEach(([s, u]) => {
|
|
1531
|
+
u = u, u = e[u], s && u && t[`set${u}`](t[`get${u}`]() + s);
|
|
1668
1532
|
}), t;
|
|
1669
1533
|
};
|
|
1670
1534
|
}
|
|
1671
|
-
var
|
|
1535
|
+
var ge2 = le2();
|
|
1672
1536
|
var ye2 = Ye2();
|
|
1673
1537
|
var N2 = ie2();
|
|
1674
1538
|
var We2 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
@@ -1684,11 +1548,11 @@ ${r}`), g2;
|
|
|
1684
1548
|
}
|
|
1685
1549
|
function De2(e, r = false) {
|
|
1686
1550
|
let n = Q2(e.clone, { sunday: r }), t = [n];
|
|
1687
|
-
return { weekStart: n.format("WD", "l:en-GB"), inputDate: e, dates: t.concat([...Array(6)].map((
|
|
1551
|
+
return { weekStart: n.format("WD", "l:en-GB"), inputDate: e, dates: t.concat([...Array(6)].map((a2, o) => n.clone.addDays(o + 1))) };
|
|
1688
1552
|
}
|
|
1689
|
-
function W2(e, { start: r, end: n, future: t, past:
|
|
1553
|
+
function W2(e, { start: r, end: n, future: t, past: a2, include: o = { start: false, end: false } } = {}) {
|
|
1690
1554
|
let s = e.clone.UTC;
|
|
1691
|
-
return r = r?.value || r?.constructor === Date ? f(r?.value || r).UTC : f.now.UTC, n = n && n?.value || n?.constructor === Date ? f(n?.value || n).UTC : f.now.UTC, s.milliseconds = 0, r.milliseconds = 0, n.milliseconds = 0, t ? r > n :
|
|
1555
|
+
return r = r?.value || r?.constructor === Date ? f(r?.value || r).UTC : f.now.UTC, n = n && n?.value || n?.constructor === Date ? f(n?.value || n).UTC : f.now.UTC, s.milliseconds = 0, r.milliseconds = 0, n.milliseconds = 0, t ? r > n : a2 ? r < n : (o.start ? +s >= +r : +s > +r) && (o.end ? +s <= +n : +s < +n);
|
|
1692
1556
|
}
|
|
1693
1557
|
function _2(e, { zoneTime: r = false, formatStr: n, moreOptions: t } = {}) {
|
|
1694
1558
|
return t = r ? e.localeInfo.formatOptions + (t ? `,${t}` : "") : g.formatOptions + (t ? `,${t}` : ""), r ? (e.localeInfo || (e.localeInfo = g), M2(e, n, t)) : Ue2(e, n, t);
|
|
@@ -1698,26 +1562,26 @@ ${r}`), g2;
|
|
|
1698
1562
|
return n = (n || "").startsWith("+") ? `${t.localeInfo.formatOptions},${n.slice(1)}` : n || t.localeInfo.formatOptions, M2(t, r, n);
|
|
1699
1563
|
}
|
|
1700
1564
|
function Te2(e, r) {
|
|
1701
|
-
let n =
|
|
1565
|
+
let n = ge2({ start: e, end: r || e });
|
|
1702
1566
|
return parseInt(`${n.sign}${n.diffInDays}`);
|
|
1703
1567
|
}
|
|
1704
1568
|
function G2(e, r = false) {
|
|
1705
|
-
let { locale: n, timeZone: t } = r ? e.localeInfo : g,
|
|
1569
|
+
let { locale: n, timeZone: t } = r ? e.localeInfo : g, a2 = se2(n, t), o = e.format("MM|WD", a2).split("|");
|
|
1706
1570
|
return { locale: n, timeZone: t, monthName: o[0], dayName: o[1], dayNames: ae2(n), monthNames: Y2(n) };
|
|
1707
1571
|
}
|
|
1708
1572
|
function B2(e, r = false) {
|
|
1709
|
-
let [n, t,
|
|
1710
|
-
return Object.freeze(
|
|
1573
|
+
let [n, t, a2, o] = U2(e, r), u = { values4Timezone: r ? g.timeZone : e.timeZone, hours: n, minutes: t, seconds: a2, milliseconds: o };
|
|
1574
|
+
return Object.freeze(u);
|
|
1711
1575
|
}
|
|
1712
1576
|
function U2(e, r = false) {
|
|
1713
1577
|
let t = `l:en-CA,${r ? `tz:${g.timeZone}` : `tz:${e.timeZone}`},hrc:23,ts:medium`;
|
|
1714
1578
|
return e.format("", t).split(/:/).map(Number).concat(e.getMilliseconds());
|
|
1715
1579
|
}
|
|
1716
1580
|
function J2(e, r) {
|
|
1717
|
-
let n = r ? `tz:${g.timeZone}` : `,tz:${e.timeZone}`, [t,
|
|
1718
|
-
|
|
1581
|
+
let n = r ? `tz:${g.timeZone}` : `,tz:${e.timeZone}`, [t, a2, o] = e.format("yyyy-mm-dd", n).split(/-/).map(Number);
|
|
1582
|
+
a2 -= 1;
|
|
1719
1583
|
let s = r ? g.timeZone : e.timeZone;
|
|
1720
|
-
return Object.freeze({ values4Timezone: s, year: t, month:
|
|
1584
|
+
return Object.freeze({ values4Timezone: s, year: t, month: a2, date: o });
|
|
1721
1585
|
}
|
|
1722
1586
|
function K2(e, r = true) {
|
|
1723
1587
|
if (r) return [e.getFullYear(), e.getMonth(), e.getDate()];
|
|
@@ -1734,12 +1598,12 @@ ${r}`), g2;
|
|
|
1734
1598
|
}
|
|
1735
1599
|
function xe2(e, r) {
|
|
1736
1600
|
let n = e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000", t = r.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000";
|
|
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((
|
|
1601
|
+
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((a2) => n[0] < 0 ? -a2 : a2);
|
|
1738
1602
|
}
|
|
1739
1603
|
function R2({ start: e, end: r } = {}) {
|
|
1740
1604
|
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 =
|
|
1742
|
-
return n.timeZonesOffsetDifference = n.sign.length < 1 || o + s === 0 ? `Offsets of ${e.timeZone} and ${r.timeZone} are equal` : `${e.timeZone} is ${
|
|
1605
|
+
let n = ge2({ start: e, end: r, diffs: { timeZoneStart: e.timeZone, timeZoneEnd: r.timeZone } }), t = xe2(r, e), a2 = n.sign.startsWith("-") ? "ahead of" : "behind", [o, s] = t.map((i) => Math.abs(i)), [u, c] = [`${o} ${C2(o, "hour")}`, `${s} ${C2(s, "minute")}`];
|
|
1606
|
+
return n.timeZonesOffsetDifference = n.sign.length < 1 || o + s === 0 ? `Offsets of ${e.timeZone} and ${r.timeZone} are equal` : `${e.timeZone} is ${u}${s > 0 ? ` and ${c}` : ""} ${a2} ${r.timeZone}`, n;
|
|
1743
1607
|
}
|
|
1744
1608
|
function X2(e, r) {
|
|
1745
1609
|
r = String(r).toLowerCase() === "utc" || r.timeZone === "UTC" ? e.clone.relocate({ timeZone: "UTC" }) : f(e.value, { timeZone: r.timeZone || g.timeZone });
|
|
@@ -1749,29 +1613,29 @@ ${r}`), g2;
|
|
|
1749
1613
|
function ce2(e, r = 2) {
|
|
1750
1614
|
return `${e}`.padStart(r, "0");
|
|
1751
1615
|
}
|
|
1752
|
-
function
|
|
1616
|
+
function C2(e, r) {
|
|
1753
1617
|
return `${r}${e > 1 || e === 0 ? "s" : ""}`;
|
|
1754
1618
|
}
|
|
1755
1619
|
function je2(e) {
|
|
1756
1620
|
if (/00:00/.test(e)) return "no time diffence to";
|
|
1757
|
-
let r = e.slice(1).split(":").map(Number), [n, t] = r,
|
|
1758
|
-
return t > 0 ? `${n} ${
|
|
1621
|
+
let r = e.slice(1).split(":").map(Number), [n, t] = r, a2 = C2(n, "hour"), o = C2(t, "minute"), s = e.startsWith("+");
|
|
1622
|
+
return t > 0 ? `${n} ${a2} and ${t} ${o} ${s ? "ahead of" : "behind"}` : `${n} ${a2} ${s ? "ahead of" : "behind"}`;
|
|
1759
1623
|
}
|
|
1760
|
-
function
|
|
1624
|
+
function me2(e, r, n) {
|
|
1761
1625
|
return e.clone.format(r, n || e.localeInfo.formatOptions);
|
|
1762
1626
|
}
|
|
1763
|
-
function
|
|
1764
|
-
if (r) return t ?
|
|
1765
|
-
let
|
|
1766
|
-
return
|
|
1627
|
+
function pe2(e, { withFormat: r, withFormatOptions: n, local: t = false } = {}) {
|
|
1628
|
+
if (r) return t ? me2(e, r, $D.localeInformation.formatOptions) : me2(e, r, n);
|
|
1629
|
+
let a2 = e.clone.relocate({ locale: "en" }), o = t ? g.formatOptions : a2.localeInfo.formatOptions, u = `wd M dd yyyy hh:mmi:ss ${a2.format("tz", o + ",tzn:longOffset").replace(":", "")} (tz)`;
|
|
1630
|
+
return a2.format(u, o + ",tzn:long, hrc:23");
|
|
1767
1631
|
}
|
|
1768
1632
|
function ee2(e, r = false) {
|
|
1769
1633
|
let n = Intl.DateTimeFormat("en", { timeZone: r ? e.timeZone : g.timeZone, weekday: "short" });
|
|
1770
1634
|
return ye2(n.format(e));
|
|
1771
1635
|
}
|
|
1772
1636
|
function $e2(e) {
|
|
1773
|
-
let r = g, n = e.localeInfo, t = e.clone.relocate({ locale: r.locale, timeZone: r.timeZone }),
|
|
1774
|
-
return n.timeZone !== r.timeZone && (m.locales.remote = { locale:
|
|
1637
|
+
let r = g, n = e.localeInfo, t = e.clone.relocate({ locale: r.locale, timeZone: r.timeZone }), a2 = e.offsetFrom(t), o = t.offsetFrom(e), s = r, u = n, c = e.format("hh:mmi:ss dp", `hrc:12,tz:${e.timeZone}`), i = t.format("hh:mmi:ss dp", `hrc:12,tz:${t.timeZone}`), m = { note: "'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance", locales: { user: { locale: s.locale, timeZone: s.timeZone } }, dateTime: { user: { ...e.dateTime, monthName: t.monthName, weekdayNr: t.day, weekdayName: t.dayName, dayPeriodTime: i, hasDST: t.hasDST, DSTActive: t.DSTActive, offsetFromRemote: a2.offset, string: t.toString() } }, offset: { fromUTC: e.UTC.offsetFrom(e).offsetText } };
|
|
1638
|
+
return n.timeZone !== r.timeZone && (m.locales.remote = { locale: u.locale, timeZone: u.timeZone }, m.dateTime.remote = { ...e.zoneDateTime, monthName: e.zoneNames.monthName, weekdayNr: ee2(e, true), weekdayName: e.zoneNames.dayName, dayPeriodTime: c, hasDST: e.hasDST, DSTActive: e.DSTActive, offsetFromUser: o.offset, string: e.toString() }, m.offset.fromUserTime = o.offsetText), m;
|
|
1775
1639
|
}
|
|
1776
1640
|
function O2(e, r = true) {
|
|
1777
1641
|
if (r) return [e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()];
|
|
@@ -1784,29 +1648,29 @@ ${r}`), g2;
|
|
|
1784
1648
|
function L2(e, r) {
|
|
1785
1649
|
r = p({ locale: r || e.localeInfo.locale }).locale;
|
|
1786
1650
|
let n = e.clone.relocate({ locale: r });
|
|
1787
|
-
return n.date = { date: 1 }, [n].concat([...Array(te2(n) - 1)].map((t,
|
|
1651
|
+
return n.date = { date: 1 }, [n].concat([...Array(te2(n) - 1)].map((t, a2) => n.clone.add(`${a2 + 1} days`)));
|
|
1788
1652
|
}
|
|
1789
1653
|
function x(e, { day: r, next: n = false, preserveTodayWhenEqual: t = false } = {}) {
|
|
1790
1654
|
r = r?.toLowerCase() || "-";
|
|
1791
|
-
let
|
|
1792
|
-
if (
|
|
1655
|
+
let a2 = ye2(r);
|
|
1656
|
+
if (a2 < 0) return console.error(`[TickTock instance].next/previous invalid day value ${r}`), e.clone;
|
|
1793
1657
|
let o = n ? 1 : -1, s = f(new Date(...e.dateTimeValues), e.localeInfo);
|
|
1794
|
-
return t &&
|
|
1658
|
+
return t && a2 === s.day ? s : Pe2(s.addDays(n ? 1 : -1), a2, o);
|
|
1795
1659
|
}
|
|
1796
1660
|
function Pe2(e, r, n) {
|
|
1797
|
-
function t(
|
|
1661
|
+
function t(a2) {
|
|
1798
1662
|
switch (true) {
|
|
1799
|
-
case
|
|
1800
|
-
return
|
|
1663
|
+
case a2.day === r:
|
|
1664
|
+
return a2;
|
|
1801
1665
|
default:
|
|
1802
|
-
return t(
|
|
1666
|
+
return t(a2.add(`${n} days`));
|
|
1803
1667
|
}
|
|
1804
1668
|
}
|
|
1805
1669
|
return t(e);
|
|
1806
1670
|
}
|
|
1807
|
-
function
|
|
1808
|
-
let { locale: t, timeZone:
|
|
1809
|
-
return r ? new Date(e).toLocaleDateString(t, { timeZone:
|
|
1671
|
+
function F(e, { dateOnly: r = false, timeOnly: n = false } = {}) {
|
|
1672
|
+
let { locale: t, timeZone: a2 } = e.localeInfo;
|
|
1673
|
+
return r ? new Date(e).toLocaleDateString(t, { timeZone: a2 }) : n ? new Date(e).toLocaleTimeString(t, { timeZone: a2 }) : new Date(e).toLocaleString(t, { timeZone: a2 });
|
|
1810
1674
|
}
|
|
1811
1675
|
function fe2(e, r) {
|
|
1812
1676
|
let n = { timeZone: r, hourCycle: "h23" };
|
|
@@ -1815,8 +1679,8 @@ ${r}`), g2;
|
|
|
1815
1679
|
function v2(e, { year: r, month: n, date: t } = {}) {
|
|
1816
1680
|
return S(r) && e.setFullYear(parseInt(r)), S(t) && e.setDate(parseInt(t)), S(n) && e.setMonth(parseInt(n)), e;
|
|
1817
1681
|
}
|
|
1818
|
-
function I2(e, { hours: r, minutes: n, seconds: t, milliseconds:
|
|
1819
|
-
return S(r) && e.setHours(parseInt(r)), S(n) && e.setMinutes(parseInt(n)), S(t) && e.setSeconds(parseInt(t)), S(
|
|
1682
|
+
function I2(e, { hours: r, minutes: n, seconds: t, milliseconds: a2 } = {}) {
|
|
1683
|
+
return S(r) && e.setHours(parseInt(r)), S(n) && e.setMinutes(parseInt(n)), S(t) && e.setSeconds(parseInt(t)), S(a2) && e.setMilliseconds(parseInt(a2)), e;
|
|
1820
1684
|
}
|
|
1821
1685
|
function we2(e) {
|
|
1822
1686
|
return e?.constructor === Date || e?.value;
|
|
@@ -1843,14 +1707,14 @@ ${r}`), g2;
|
|
|
1843
1707
|
}
|
|
1844
1708
|
function j2(e, r) {
|
|
1845
1709
|
r = r || e?.timeZone || g.timeZone, e = e?.value ? e : e?.constructor === Date ? f(e, { timeZone: r }) : f({ timeZone: r });
|
|
1846
|
-
let n = e.year || e.getFullYear(), t = de2(new Date(n, 0, 1), r),
|
|
1847
|
-
return t !==
|
|
1710
|
+
let n = e.year || e.getFullYear(), t = de2(new Date(n, 0, 1), r), a2 = de2(new Date(n, 5, 1), r);
|
|
1711
|
+
return t !== a2;
|
|
1848
1712
|
}
|
|
1849
1713
|
function P2(e, r) {
|
|
1850
1714
|
return r = r || e?.timeZone || g.timeZone, e = e?.hasDST ? e : e?.constructor === Date ? f(e, { timeZone: r }) : f({ timeZone: r }), e.hasDST ? !/standard/i.test(e.toString()) : false;
|
|
1851
1715
|
}
|
|
1852
|
-
function Ze2(e, { locale: r, timeZone: n, l: t, tz:
|
|
1853
|
-
return e.localeInfo = p({ locale: t || r || e.l || e.locale, timeZone:
|
|
1716
|
+
function Ze2(e, { locale: r, timeZone: n, l: t, tz: a2 } = {}) {
|
|
1717
|
+
return e.localeInfo = p({ locale: t || r || e.l || e.locale, timeZone: a2 || n || e.tz || e.timeZone }), e;
|
|
1854
1718
|
}
|
|
1855
1719
|
function be2(e, r) {
|
|
1856
1720
|
return we2(r) && (e = f(r.value || r, r.localeInfo || e.localeInfo)), e;
|
|
@@ -1882,10 +1746,10 @@ ${r}`), g2;
|
|
|
1882
1746
|
}
|
|
1883
1747
|
var E = Ee2;
|
|
1884
1748
|
function Ee2({ localeInfo: e, customMethods: r, dateValue: n } = {}) {
|
|
1885
|
-
let t,
|
|
1749
|
+
let t, a2 = { add(...o) {
|
|
1886
1750
|
return H2(t, ...o);
|
|
1887
|
-
}, between({ start: o, end: s, include:
|
|
1888
|
-
return W2(t, { start: o, end: s, include:
|
|
1751
|
+
}, between({ start: o, end: s, include: u } = {}) {
|
|
1752
|
+
return W2(t, { start: o, end: s, include: u });
|
|
1889
1753
|
}, cloneWith(o) {
|
|
1890
1754
|
return re2(t, o);
|
|
1891
1755
|
}, daysUntil(o) {
|
|
@@ -1912,32 +1776,32 @@ ${r}`), g2;
|
|
|
1912
1776
|
return X2(t, o);
|
|
1913
1777
|
}, previous(o, s) {
|
|
1914
1778
|
return x(t, { day: o, next: false, preserveTodayWhenEqual: !!s });
|
|
1915
|
-
}, relocate({ locale: o, timeZone: s, l:
|
|
1916
|
-
return Ze2(t, { locale: o, timeZone: s, l:
|
|
1779
|
+
}, relocate({ locale: o, timeZone: s, l: u, tz: c } = {}) {
|
|
1780
|
+
return Ze2(t, { locale: o, timeZone: s, l: u, tz: c });
|
|
1917
1781
|
}, revalue(o) {
|
|
1918
1782
|
return t = be2(t, o), t;
|
|
1919
|
-
}, setDateValues({ year: o, month: s, date:
|
|
1920
|
-
return v2(t, { year: o, month: s, date:
|
|
1921
|
-
}, setTimeValues({ hours: o, minutes: s, seconds:
|
|
1922
|
-
return I2(t, { hours: o, minutes: s, seconds:
|
|
1783
|
+
}, setDateValues({ year: o, month: s, date: u } = {}) {
|
|
1784
|
+
return v2(t, { year: o, month: s, date: u });
|
|
1785
|
+
}, setTimeValues({ hours: o, minutes: s, seconds: u, milliseconds: c } = {}) {
|
|
1786
|
+
return I2(t, { hours: o, minutes: s, seconds: u, milliseconds: c });
|
|
1923
1787
|
}, subtract(...o) {
|
|
1924
1788
|
return H2(t, "subtract," + o.join(","));
|
|
1925
1789
|
}, toArray(o = false) {
|
|
1926
1790
|
return O2(t, o);
|
|
1927
|
-
}, toString({ template: o, formatOptions: s, local:
|
|
1928
|
-
return
|
|
1791
|
+
}, toString({ template: o, formatOptions: s, local: u } = {}) {
|
|
1792
|
+
return pe2(t, { withFormat: o, withFormatOptions: s, local: u });
|
|
1929
1793
|
}, values(o = false) {
|
|
1930
1794
|
return o ? t.dateTime : t.zoneDateTime;
|
|
1931
1795
|
}, zoneFormat(o, s) {
|
|
1932
1796
|
return _2(t, { zoneTime: true, formatStr: o, moreOptions: s });
|
|
1933
|
-
}, set date({ year: o, month: s, date:
|
|
1934
|
-
v2(t, { year: o, month: s, date:
|
|
1797
|
+
}, set date({ year: o, month: s, date: u }) {
|
|
1798
|
+
v2(t, { year: o, month: s, date: u });
|
|
1935
1799
|
}, set dateNr(o) {
|
|
1936
1800
|
v2(t, { date: o });
|
|
1937
1801
|
}, set hours(o) {
|
|
1938
1802
|
I2(t, { hours: o });
|
|
1939
|
-
}, set localeInfo({ locale: o, timeZone: s, l:
|
|
1940
|
-
e = z2({ locale: o, timeZone: s, l:
|
|
1803
|
+
}, set localeInfo({ locale: o, timeZone: s, l: u, tz: c }) {
|
|
1804
|
+
e = z2({ locale: o, timeZone: s, l: u, tz: c });
|
|
1941
1805
|
}, set milliseconds(o) {
|
|
1942
1806
|
I2(t, { milliseconds: `${o}` });
|
|
1943
1807
|
}, set minutes(o) {
|
|
@@ -1946,8 +1810,8 @@ ${r}`), g2;
|
|
|
1946
1810
|
v2(t, { month: o });
|
|
1947
1811
|
}, set seconds(o) {
|
|
1948
1812
|
I2(t, { seconds: o });
|
|
1949
|
-
}, set time({ hours: o, minutes: s, seconds:
|
|
1950
|
-
I2(t, { hours: o, minutes: s, seconds:
|
|
1813
|
+
}, set time({ hours: o, minutes: s, seconds: u, milliseconds: c }) {
|
|
1814
|
+
I2(t, { hours: o, minutes: s, seconds: u, milliseconds: c });
|
|
1951
1815
|
}, set year(o) {
|
|
1952
1816
|
v2(t, { year: o });
|
|
1953
1817
|
}, get age() {
|
|
@@ -1985,17 +1849,17 @@ ${r}`), g2;
|
|
|
1985
1849
|
}, get ISO() {
|
|
1986
1850
|
return t.toISOString();
|
|
1987
1851
|
}, get local() {
|
|
1988
|
-
return
|
|
1852
|
+
return F(t);
|
|
1989
1853
|
}, get localDate() {
|
|
1990
|
-
return
|
|
1854
|
+
return F(t, { dateOnly: true });
|
|
1991
1855
|
}, get locale() {
|
|
1992
1856
|
return (e || z2()).locale;
|
|
1993
1857
|
}, get localeInfo() {
|
|
1994
1858
|
return e;
|
|
1995
1859
|
}, get localeString() {
|
|
1996
|
-
return
|
|
1860
|
+
return F(t);
|
|
1997
1861
|
}, get localTime() {
|
|
1998
|
-
return
|
|
1862
|
+
return F(t, { timeOnly: true });
|
|
1999
1863
|
}, get milliseconds() {
|
|
2000
1864
|
return t.getMilliseconds();
|
|
2001
1865
|
}, get minutes() {
|
|
@@ -2073,7 +1937,7 @@ ${r}`), g2;
|
|
|
2073
1937
|
}, get zoneArray() {
|
|
2074
1938
|
return O2(t, false);
|
|
2075
1939
|
} };
|
|
2076
|
-
return !e && !n ?
|
|
1940
|
+
return !e && !n ? a2 : (a2.localeInfo = e || z2(), t = new Proxy(n, Ve2(a2)), Object.entries(Object.getOwnPropertyDescriptors(ue2(t, r))).forEach(([o, s]) => Object.defineProperty(a2, o, s)), Object.freeze(t));
|
|
2077
1941
|
}
|
|
2078
1942
|
function Ve2(e) {
|
|
2079
1943
|
return { get(r, n) {
|
|
@@ -2092,10 +1956,10 @@ ${r}`), g2;
|
|
|
2092
1956
|
}
|
|
2093
1957
|
function He2({ year: e, locale: r } = {}) {
|
|
2094
1958
|
e = S(e) ? parseInt(e) : (/* @__PURE__ */ new Date()).getFullYear();
|
|
2095
|
-
let n = { year: e, calendar: {} }, t = Y2().long.map((
|
|
2096
|
-
for (let
|
|
2097
|
-
let o = f.from(e,
|
|
2098
|
-
n.calendar[t[
|
|
1959
|
+
let n = { year: e, calendar: {} }, t = Y2().long.map((a2) => a2.toLowerCase());
|
|
1960
|
+
for (let a2 = 0; a2 < 12; a2 += 1) {
|
|
1961
|
+
let o = f.from(e, a2, 1);
|
|
1962
|
+
n.calendar[t[a2]] = L2(o, r);
|
|
2099
1963
|
}
|
|
2100
1964
|
return n;
|
|
2101
1965
|
}
|
|
@@ -2150,8 +2014,8 @@ ${r}`), g2;
|
|
|
2150
2014
|
}
|
|
2151
2015
|
}
|
|
2152
2016
|
function Ge2({ timeZoneDate: e, timeZoneID: r, userTimeZoneID: n } = {}) {
|
|
2153
|
-
let t = { timeZone: p({ timeZone: r }).timeZone },
|
|
2154
|
-
return { remoteTimezone: t.timeZone, userTimezone:
|
|
2017
|
+
let t = { timeZone: p({ timeZone: r }).timeZone }, a2 = { timeZone: p({ timeZone: n || "" }).timeZone }, o = f(e, t), s = f(e, a2), u = s.differenceTo(o), c = o.offsetFrom(s).offset, [i, m] = A2(c, true), T3 = s.clone.add(`${i} hours, ${m} minutes`), y = u.equalDates ? "No difference" : `Time offset ${c}: ${a2.timeZone} is ${u.clean} ${i < 0 ? "behind" : "ahead of"} ${t.timeZone}`;
|
|
2018
|
+
return { remoteTimezone: t.timeZone, userTimezone: a2.timeZone, timeDifference: y, result: { [t.timeZone.replace(/\//, "_")]: f(e).toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }), [a2.timeZone.replace(/\//, "_")]: T3.toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }) } };
|
|
2155
2019
|
}
|
|
2156
2020
|
function S(e) {
|
|
2157
2021
|
return !Number.isNaN(parseInt(e));
|
|
@@ -2192,11 +2056,11 @@ ${r}`), g2;
|
|
|
2192
2056
|
}
|
|
2193
2057
|
function ue2(e, r) {
|
|
2194
2058
|
let n = Be2(e);
|
|
2195
|
-
for (let [t,
|
|
2196
|
-
let o =
|
|
2197
|
-
return
|
|
2198
|
-
}, enumerable: o } : { value(...
|
|
2199
|
-
return
|
|
2059
|
+
for (let [t, a2] of Object.entries(r || {})) {
|
|
2060
|
+
let o = a2.enumerable, s = a2.isGetter ? { get() {
|
|
2061
|
+
return a2.method(e);
|
|
2062
|
+
}, enumerable: o } : { value(...u) {
|
|
2063
|
+
return a2.method(e, ...u);
|
|
2200
2064
|
}, enumerable: o };
|
|
2201
2065
|
Object.defineProperty(n, t, s);
|
|
2202
2066
|
}
|
|
@@ -2217,27 +2081,27 @@ ${r}`), g2;
|
|
|
2217
2081
|
return e(n);
|
|
2218
2082
|
} }, fromUxTS: { value(n, t) {
|
|
2219
2083
|
n = S(n) ? parseInt(n) * 1e3 : void 0;
|
|
2220
|
-
let
|
|
2221
|
-
return f(
|
|
2084
|
+
let a2 = n ? new Date(n) : /* @__PURE__ */ new Date();
|
|
2085
|
+
return f(a2, t || g);
|
|
2222
2086
|
} }, hasDST: { value({ date: n, timeZone: t } = {}) {
|
|
2223
2087
|
return j2(n, t);
|
|
2224
2088
|
} }, DSTActive: { value({ date: n, timeZone: t } = {}) {
|
|
2225
2089
|
return P2(n, t);
|
|
2226
2090
|
} }, values: { value({ date: n, timeZone: t } = {}) {
|
|
2227
2091
|
n = n || n?.value || /* @__PURE__ */ new Date();
|
|
2228
|
-
let
|
|
2229
|
-
return
|
|
2230
|
-
} }, format: { value({ date: n, template: t, timeZone:
|
|
2092
|
+
let a2 = M2(n, "yyyy-m-d-h-mi-s", p({ timeZone: t }).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());
|
|
2093
|
+
return a2[1] -= 1, a2;
|
|
2094
|
+
} }, format: { value({ date: n, template: t, timeZone: a2, locale: o, opts: s } = {}) {
|
|
2231
2095
|
n = n || n?.value || /* @__PURE__ */ new Date(), t = t?.constructor === String ? t : "yyyy/mm/dd hh:mmi:ss dp";
|
|
2232
|
-
let
|
|
2233
|
-
return
|
|
2234
|
-
} }, addCustom: { value({ name: n, method: t, enumerable:
|
|
2235
|
-
n?.constructor === String && t?.constructor === Function && t.length > 0 && (r[n] = { method: t, enumerable:
|
|
2096
|
+
let u = p({ timeZone: a2, locale: o }).formatOptions;
|
|
2097
|
+
return u += s ? `,${s}` : "", M2(n, t, u);
|
|
2098
|
+
} }, addCustom: { value({ name: n, method: t, enumerable: a2 = false, isGetter: o = false } = {}) {
|
|
2099
|
+
n?.constructor === String && t?.constructor === Function && t.length > 0 && (r[n] = { method: t, enumerable: a2, isGetter: o });
|
|
2236
2100
|
} }, validateLocaleInformation: { value: p }, timeAcrossZones: { value: Ge2 }, weeksInYear: { value(n) {
|
|
2237
2101
|
return k2(n, 31);
|
|
2238
2102
|
} }, keys: { get() {
|
|
2239
|
-
let n = Object.fromEntries(Object.entries(r).filter(([
|
|
2240
|
-
return [...Object.keys(E()), ...Object.keys(ue2()), ...Object.keys(n)].sort((
|
|
2103
|
+
let n = Object.fromEntries(Object.entries(r).filter(([a2, o]) => o.enumerable === true));
|
|
2104
|
+
return [...Object.keys(E()), ...Object.keys(ue2()), ...Object.keys(n)].sort((a2, o) => a2.localeCompare(o));
|
|
2241
2105
|
} } }), e;
|
|
2242
2106
|
}
|
|
2243
2107
|
var Oe2 = {};
|
|
@@ -2257,7 +2121,7 @@ ${r}`), g2;
|
|
|
2257
2121
|
);
|
|
2258
2122
|
}
|
|
2259
2123
|
function createRegExpStringFromInput(regExStr, ...cleanedArgs) {
|
|
2260
|
-
return !hasLength(cleanedArgs) ? regExStr.raw.join(``) : regExStr.raw.reduce((
|
|
2124
|
+
return !hasLength(cleanedArgs) ? regExStr.raw.join(``) : regExStr.raw.reduce((a2, v3, i) => a2.concat(cleanedArgs[i - 1] || ``).concat(v3), ``);
|
|
2261
2125
|
}
|
|
2262
2126
|
function maybeFlags(...args) {
|
|
2263
2127
|
const flags = cleanupFlags(getFlags(args.at(-1)));
|
|
@@ -2338,31 +2202,31 @@ ${r}`), g2;
|
|
|
2338
2202
|
case !!RegExp.escape:
|
|
2339
2203
|
return RegExp.escape(string2Escape);
|
|
2340
2204
|
default:
|
|
2341
|
-
return (`\\x${string2Escape.at(0)}` + string2Escape.slice(1).replace(/\p{S}|\p{P}/gu, (
|
|
2205
|
+
return (`\\x${string2Escape.at(0)}` + string2Escape.slice(1).replace(/\p{S}|\p{P}/gu, (a2) => `\\${a2}`)).replace(/ |\\x /g, `\\x20`);
|
|
2342
2206
|
}
|
|
2343
2207
|
}
|
|
2344
2208
|
function cleanup(str) {
|
|
2345
|
-
return str.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm, ``).replace(/\s/g, ``).trim().replace(/<!([^>]\d+)>/g, (
|
|
2209
|
+
return str.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm, ``).replace(/\s/g, ``).trim().replace(/<!([^>]\d+)>/g, (a2, b2) => String.fromCharCode(+b2) ?? a2);
|
|
2346
2210
|
}
|
|
2347
2211
|
|
|
2348
2212
|
// ../Resource/Externals/splat.min.js
|
|
2349
2213
|
var { IS: b, maybe: E2, $Wrap: X3, isNothing: j3, xProxy: h, addSymbolicExtensions: T2 } = Y3({ useSymbolicExtensions: false });
|
|
2350
2214
|
function Y3(i = {}) {
|
|
2351
|
-
let { useSymbolicExtensions:
|
|
2352
|
-
return
|
|
2353
|
-
function e(c, ...
|
|
2215
|
+
let { useSymbolicExtensions: a2 } = i, { shouldbeIsSingleObject: m, ISOneOf: g2, isExcept: P3, verifyNothingness: d, xProxy: x2, determineType: N3, addSymbolicExtensions: y, maybe: S2, $Wrap: O3 } = _3(e, a2);
|
|
2216
|
+
return a2 && y(), { IS: e, maybe: S2, $Wrap: O3, isNothing: d, xProxy: x2, addSymbolicExtensions: y };
|
|
2217
|
+
function e(c, ...u) {
|
|
2354
2218
|
let l = typeof c == "symbol" ? Symbol.isSymbol : c;
|
|
2355
2219
|
switch (true) {
|
|
2356
|
-
case !!S2({ trial: (f2) => "isTypes" in (
|
|
2357
|
-
return m(c,
|
|
2220
|
+
case !!S2({ trial: (f2) => "isTypes" in (u?.[0] ?? {}) }):
|
|
2221
|
+
return m(c, u[0]);
|
|
2358
2222
|
default:
|
|
2359
|
-
return
|
|
2223
|
+
return u.length > 1 ? g2(l, ...u) : N3(c, ...u);
|
|
2360
2224
|
}
|
|
2361
2225
|
}
|
|
2362
2226
|
}
|
|
2363
|
-
function _3(i,
|
|
2364
|
-
let { SymbolAndCustomProxyFactory: m, maybeFactory: g2, WrapAnyFactory: P3, verifyNothingness: d, determineType: x2 } = w2(i, e), { xProxy: N3, addSymbolicExtensions: y } = m(i, e,
|
|
2365
|
-
return Object.freeze({ shouldbeIsSingleObject: c, ISOneOf:
|
|
2227
|
+
function _3(i, a2) {
|
|
2228
|
+
let { SymbolAndCustomProxyFactory: m, maybeFactory: g2, WrapAnyFactory: P3, verifyNothingness: d, determineType: x2 } = w2(i, e), { xProxy: N3, addSymbolicExtensions: y } = m(i, e, a2), [S2, O3] = [g2(), P3(i, e)];
|
|
2229
|
+
return Object.freeze({ shouldbeIsSingleObject: c, ISOneOf: u, isExcept: f2, verifyNothingness: d, xProxy: N3, determineType: x2, addSymbolicExtensions: y, maybe: S2, $Wrap: O3 });
|
|
2366
2230
|
function e(r) {
|
|
2367
2231
|
return r?.[Symbol.proxy] ?? i(r);
|
|
2368
2232
|
}
|
|
@@ -2376,7 +2240,7 @@ ${r}`), g2;
|
|
|
2376
2240
|
return i(r, ...[t.isTypes].flat());
|
|
2377
2241
|
}
|
|
2378
2242
|
}
|
|
2379
|
-
function
|
|
2243
|
+
function u(r, ...t) {
|
|
2380
2244
|
return t.some((n) => i(r, n));
|
|
2381
2245
|
}
|
|
2382
2246
|
function l(r, { defaultValue: t, isTypes: n = [void 0], notTypes: o } = {}) {
|
|
@@ -2387,8 +2251,8 @@ ${r}`), g2;
|
|
|
2387
2251
|
}
|
|
2388
2252
|
}
|
|
2389
2253
|
function w2() {
|
|
2390
|
-
let i = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" },
|
|
2391
|
-
return Object.freeze({ SymbolAndCustomProxyFactory: g2, maybeFactory: l, WrapAnyFactory:
|
|
2254
|
+
let i = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" }, a2 = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" };
|
|
2255
|
+
return Object.freeze({ SymbolAndCustomProxyFactory: g2, maybeFactory: l, WrapAnyFactory: u, verifyNothingness: f2, determineType: y });
|
|
2392
2256
|
function m(r, t) {
|
|
2393
2257
|
Symbol.is || (Symbol.is = Symbol.for(i.IS), Symbol.type = Symbol.for(i.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
2394
2258
|
return t(this);
|
|
@@ -2409,7 +2273,7 @@ ${r}`), g2;
|
|
|
2409
2273
|
function d(r, t) {
|
|
2410
2274
|
return Proxy = new r(r, { construct(n, o) {
|
|
2411
2275
|
let s = new n(...o);
|
|
2412
|
-
return Object.defineProperty(s, t, { value: `${
|
|
2276
|
+
return Object.defineProperty(s, t, { value: `${a2.PROXY_PREFIX}${P3(o[0])})` }), s;
|
|
2413
2277
|
} }), Proxy;
|
|
2414
2278
|
}
|
|
2415
2279
|
function x2() {
|
|
@@ -2423,23 +2287,23 @@ ${r}`), g2;
|
|
|
2423
2287
|
}
|
|
2424
2288
|
function N3(r, ...t) {
|
|
2425
2289
|
let n = t.length < 1, o = r == null;
|
|
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) ===
|
|
2290
|
+
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) === a2.NAN }), isInfinity: E2({ trial: (s) => String(r) }) === a2.INFINITY, shouldBeFirstElementIsNothing: !n && f2(t[0]) };
|
|
2427
2291
|
}
|
|
2428
2292
|
function y(r, ...t) {
|
|
2429
|
-
let { noInput: n, noShouldbe: o, compareTo: s, inputCTOR: A3, isNaN:
|
|
2293
|
+
let { noInput: n, noShouldbe: o, compareTo: s, inputCTOR: A3, isNaN: F2, isInfinity: v3, shouldBeFirstElementIsNothing: p2 } = N3(r, ...t);
|
|
2430
2294
|
switch (t = t.length && t[0], true) {
|
|
2431
2295
|
case p2:
|
|
2432
2296
|
return String(r) === String(s);
|
|
2433
2297
|
case (r?.[Symbol.proxy] && o):
|
|
2434
2298
|
return r[Symbol.proxy];
|
|
2435
|
-
case
|
|
2436
|
-
return o ?
|
|
2299
|
+
case F2:
|
|
2300
|
+
return o ? a2.NAN : String(s) === String(r);
|
|
2437
2301
|
case v3:
|
|
2438
|
-
return o ?
|
|
2302
|
+
return o ? a2.INFINITY : String(s) === String(r);
|
|
2439
2303
|
case n:
|
|
2440
2304
|
return o ? String(r) : String(s) === String(r);
|
|
2441
2305
|
case A3 === Boolean:
|
|
2442
|
-
return o ?
|
|
2306
|
+
return o ? a2.BOOLEAN : A3 === t;
|
|
2443
2307
|
default:
|
|
2444
2308
|
return O3(r, t, o, S2(r, A3));
|
|
2445
2309
|
}
|
|
@@ -2460,8 +2324,8 @@ ${r}`), g2;
|
|
|
2460
2324
|
switch (true) {
|
|
2461
2325
|
case (!n && t === r || r?.[Symbol.proxy] && t === Proxy):
|
|
2462
2326
|
return true;
|
|
2463
|
-
case String(t) ===
|
|
2464
|
-
return String(r) ===
|
|
2327
|
+
case String(t) === a2.NAN:
|
|
2328
|
+
return String(r) === a2.NAN;
|
|
2465
2329
|
case (r?.[Symbol.toStringTag] && typeof t == "string"):
|
|
2466
2330
|
return String(t) === r[Symbol.toStringTag];
|
|
2467
2331
|
default:
|
|
@@ -2474,7 +2338,7 @@ ${r}`), g2;
|
|
|
2474
2338
|
function c(r, t, n) {
|
|
2475
2339
|
return E2({ trial: (o) => r instanceof t }) || t === n || t === Object.getPrototypeOf(n) || `${t?.name}` === n?.name;
|
|
2476
2340
|
}
|
|
2477
|
-
function
|
|
2341
|
+
function u(r, t) {
|
|
2478
2342
|
return function(n) {
|
|
2479
2343
|
let o = { get value() {
|
|
2480
2344
|
return n;
|
|
@@ -2506,10 +2370,10 @@ ${r}`), g2;
|
|
|
2506
2370
|
return n = t ? n || b(r, 1 / 0) || b(r, NaN) : n, n;
|
|
2507
2371
|
}
|
|
2508
2372
|
}
|
|
2509
|
-
var
|
|
2373
|
+
var C3 = I3();
|
|
2510
2374
|
var $2 = I3("");
|
|
2511
|
-
function I3(i,
|
|
2512
|
-
let { useSymbolicExtensions: m } =
|
|
2375
|
+
function I3(i, a2 = {}) {
|
|
2376
|
+
let { useSymbolicExtensions: m } = a2;
|
|
2513
2377
|
return i = b(i, String, Number) ? String(i) : void 0, m && L3(), function(e, ...c) {
|
|
2514
2378
|
return O3(e, S2(c));
|
|
2515
2379
|
};
|
|
@@ -2517,13 +2381,13 @@ ${r}`), g2;
|
|
|
2517
2381
|
return c && b(i, String, Number) ? String(i) : `{${e}}`;
|
|
2518
2382
|
}
|
|
2519
2383
|
function P3(e, c) {
|
|
2520
|
-
let
|
|
2521
|
-
return
|
|
2384
|
+
let u = e in c;
|
|
2385
|
+
return u && b(c[e], String, Number) ? String(c[e]) : g2(e, u);
|
|
2522
2386
|
}
|
|
2523
2387
|
function d(e) {
|
|
2524
2388
|
return (...c) => {
|
|
2525
|
-
let
|
|
2526
|
-
return P3(
|
|
2389
|
+
let u = c.find((l) => l.key);
|
|
2390
|
+
return P3(u ? u.key : "_", e);
|
|
2527
2391
|
};
|
|
2528
2392
|
}
|
|
2529
2393
|
function x2(e, c) {
|
|
@@ -2531,8 +2395,8 @@ ${r}`), g2;
|
|
|
2531
2395
|
}
|
|
2532
2396
|
function N3(e) {
|
|
2533
2397
|
let c = [];
|
|
2534
|
-
return Object.entries(e).forEach(([
|
|
2535
|
-
l.forEach((f2, r) => (c[r] ??= {}, c[r][
|
|
2398
|
+
return Object.entries(e).forEach(([u, l]) => {
|
|
2399
|
+
l.forEach((f2, r) => (c[r] ??= {}, c[r][u] = f2));
|
|
2536
2400
|
}), c;
|
|
2537
2401
|
}
|
|
2538
2402
|
function y(e) {
|
|
@@ -2542,13 +2406,13 @@ ${r}`), g2;
|
|
|
2542
2406
|
return y(e) ? N3(e[0]) : e;
|
|
2543
2407
|
}
|
|
2544
2408
|
function O3(e, c) {
|
|
2545
|
-
let
|
|
2546
|
-
return b(i, void 0) ?
|
|
2409
|
+
let u = c?.length ? c.filter((l) => b(l, Object)).map((l, f2) => x2(e, { ...l, index: f2 + 1 })).join("") : e;
|
|
2410
|
+
return b(i, void 0) ? u : u.replace(/\{[a-z_\d].+\}/gim, String(i));
|
|
2547
2411
|
}
|
|
2548
2412
|
}
|
|
2549
2413
|
function L3() {
|
|
2550
2414
|
return String.prototype[Symbol.for("interpolate")] || Object.defineProperties(String.prototype, { [Symbol.for("interpolate")]: { value(...i) {
|
|
2551
|
-
return
|
|
2415
|
+
return C3(this, ...i);
|
|
2552
2416
|
} }, [Symbol.for("interpolate$")]: { value(...i) {
|
|
2553
2417
|
return $2(this, ...i);
|
|
2554
2418
|
} } }), [Symbol.for("interpolate"), Symbol.for("interpolate$")];
|
|
@@ -2557,7 +2421,7 @@ ${r}`), g2;
|
|
|
2557
2421
|
// ../index.js
|
|
2558
2422
|
setDefaultStyling();
|
|
2559
2423
|
fixSBLinks2TopProblem();
|
|
2560
|
-
var splatModule = { interpolate:
|
|
2424
|
+
var splatModule = { interpolate: C3, interpolateClear: $2, addSymbolicStringExtensions: L3 };
|
|
2561
2425
|
function fixSBLinks2TopProblem() {
|
|
2562
2426
|
/stackblitz/i.test(location.href) && console.info(`\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it.`);
|
|
2563
2427
|
document.addEventListener(`click`, (evt) => {
|
|
@@ -2571,20 +2435,20 @@ ${r}`), g2;
|
|
|
2571
2435
|
});
|
|
2572
2436
|
}
|
|
2573
2437
|
function logFactory(formatJSON = true) {
|
|
2574
|
-
const logContainer =
|
|
2438
|
+
const logContainer = yn(`<ul id="log2screen">`).first();
|
|
2575
2439
|
function logItem(top2 = false) {
|
|
2576
|
-
const where2PutIt = top2 ?
|
|
2440
|
+
const where2PutIt = top2 ? yn.at.start : yn.at.end;
|
|
2577
2441
|
return (content) => {
|
|
2578
2442
|
if (content?.isJQx) {
|
|
2579
|
-
return
|
|
2443
|
+
return yn.li(
|
|
2580
2444
|
content.data.get(`header`) ? { class: `head` } : ``,
|
|
2581
2445
|
content
|
|
2582
2446
|
).renderTo(logContainer, where2PutIt);
|
|
2583
2447
|
}
|
|
2584
|
-
content = !
|
|
2448
|
+
content = !yn.IS(content, String, Number, Symbol) ? tryJSON(content, formatJSON) : String(content);
|
|
2585
2449
|
const isHead = content.startsWith(`!!`);
|
|
2586
2450
|
content = isHead ? content.slice(2) : content;
|
|
2587
|
-
|
|
2451
|
+
yn.li(isHead ? { class: `head` } : ``, content).renderTo(logContainer, where2PutIt);
|
|
2588
2452
|
};
|
|
2589
2453
|
}
|
|
2590
2454
|
const [logLamda, logTopLambda] = [logItem(), logItem(true)];
|
|
@@ -2601,7 +2465,7 @@ ${r}`), g2;
|
|
|
2601
2465
|
}
|
|
2602
2466
|
}
|
|
2603
2467
|
function setDefaultStyling() {
|
|
2604
|
-
|
|
2468
|
+
yn.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';}`);
|
|
2605
2469
|
}
|
|
2606
2470
|
return __toCommonJS(index_exports);
|
|
2607
2471
|
})();
|