jqx-es 1.2.0 → 1.2.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/jqx.browser.min.js +15 -19
- package/Bundle/jqx.min.js +15 -19
- package/index.js +8 -8
- package/package.json +1 -1
- package/src/DOMCleanup.js +5 -5
- package/src/EmbedResources.js +1 -16
- package/src/HandlerFactory.js +23 -12
- package/src/JQxExtensionHelpers.js +51 -105
- package/src/JQxMethods.js +5 -5
- package/src/Utilities.js +146 -33
- package/src/JQxLog.js +0 -172
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
var JQx=(()=>{var
|
|
2
|
-
`,n)})}function st(r,e,...t){let n=at(e,r);return t?.forEach(o=>lt(n,o,r)),n}function at(r,e){switch(r=ae(e)?ft(r):r?.isJQx?r.first():r,!0){case u(r,String):return G(e,ve(r,e)?{html:r}:{text:r});case u(r,Node):return ut(e,r);default:return G(e,r)}}function ct(r){return delete r.data,Object.keys(r).length<1||Object.keys(r).forEach(e=>{let t=e.toLowerCase();t in he&&(r[he[t]]=r[e],delete r[e])}),r}function ut(r,e){let t=G(r);return t.append(e),t}function G(r,e={}){e=xe(e,{});let t=Object.entries(e.data??{}),n=Object.assign(ae(r)?new Comment(e?.text):document.createElement(r),ct(e));return t.length&&t.forEach(([o,l])=>n.dataset[o]=String(l)),n}function xe(r,e){return e?u(r,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):u(r,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function ft(r){return xe(r)?r?.text??r?.textContent??"":String(r)}function dt(r){return G("b",{style:"color:red",text:`'${r}' is not a valid HTML-tag`})}function ve(r,e){return!ae(e)&&u(r,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(r)}function mt(r){return r?.constructor===Comment||r?.constructor===CharacterData}function ae(r){return r?.constructor===Comment||/comment/i.test(r)}function gt(r){return!u(G(r),HTMLUnknownElement)}function pt(r){return(e,...t)=>st(r,e,...t)}var{IS:u,maybe:ce,$Wrap:xr,xProxy:vr,isNothing:wr}=yt();function yt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),y();let r=x(),[e,t]=[f(),C()];return t.custom(),{IS:n,maybe:r,$Wrap:e,isNothing:p,xProxy:t};function n(i,...s){if(r({trial:g=>"isTypes"in(s?.[0]??{})})){let g=s[0];return"defaultValue"in g?m(i,g):"notTypes"in g?a(i,g):n(i,...[g.isTypes].flat())}let d=typeof i=="symbol"?Symbol.isSymbol:i;return s.length>1?h(d,...s):l(i,...s)}function o(i){return i?.[Symbol.proxy]??n(i)}function l(i,...s){let{noInput:d,noShouldbe:g,compareTo:E,inputCTOR:F,isNaN:P,isInfinity:I,shouldBeFirstElementIsNothing:R}=b(i,...s);switch(s=s.length&&s[0],!0){case R:return String(i)===String(E);case(i?.[Symbol.proxy]&&g):return i[Symbol.proxy];case P:return g?"NaN":r({trial:k=>String(E)})===String(i);case I:return g?"Infinity":r({trial:k=>String(E)})===String(i);case d:return g?String(i):String(E)===String(i);case F===Boolean:return s?F===s:"Boolean";default:return S(i,s,g,c(i,F))}}function c(i,s){return i===0?Number:i===""?String:i?s:{name:String(i)}}function b(i,...s){let d=s.length<1,g=!d&&s[0],E=!d&&p(s[0]),F=i==null,P=!F&&Object.getPrototypeOf(i)?.constructor,I=r({trial:k=>String(i)})==="NaN",R=r({trial:k=>String(i)})==="Infinity";return{noInput:F,noShouldbe:d,compareTo:g,inputCTOR:P,isNaN:I,isInfinity:R,shouldBeFirstElementIsNothing:E}}function S(i,s,d,g){switch(!0){case(!d&&s===i||i?.[Symbol.proxy]&&s===Proxy):return!0;case r({trial:E=>String(s)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(s,String)):return String(s)===i[Symbol.toStringTag];default:return s?r({trial:E=>i instanceof s})||s===g||s===Object.getPrototypeOf(g)||`${s?.name}`===g?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||g?.name||String(g)}}function h(i,...s){return s.some(d=>n(i,d))}function p(i,s=!1){let d=i==null;return d=s?d||n(i,1/0)||n(i,NaN):d,d}function x(){let i=(s,d)=>s?.constructor===Function?s(d):void 0;return function({trial:s,whenError:d=()=>{}}={}){try{return i(s)}catch(g){return i(d,g)}}}function f(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...s){return n(i,...s)},is(...s){return n(i,...s)}})}}function m(i,{defaultValue:s,isTypes:d=[void 0],notTypes:g}={}){return d=d?.constructor!==Array?[d]:d,g=g&&g?.constructor!==Array?[g]:[],g.length<1?n(i,...d)?i:s:a(i,{isTypes:d,notTypes:g})?i:s}function a(i,{isTypes:s=[void 0],notTypes:d=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,d=d?.constructor!==Array?[d]:d,n(i,...s)&&!n(i,...d)}function y(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...s){return n(i,...s)},enumerable:!1,configurable:!1}}))}function v(i){let s=String(Object.getPrototypeOf(i)?.constructor);return s.slice(s.indexOf("ion")+3,s.indexOf("(")).trim()}function w(i){let s=i.set;return i.set=(d,g,E)=>g===Symbol.proxy?d[g]=E:s(d,g,E),i}function C(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(s,d){for(let E of d)E.set&&(E=w(E));let g=new s(...d);return g[Symbol.proxy]=`Proxy (${v(d[0])})`,g}})}}}}var{IS:q,maybe:Lr,$Wrap:Cr,xProxy:$r,isNothing:Fr}=bt();function bt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),y();let r=x(),[e,t]=[f(),C()];return t.custom(),{IS:n,maybe:r,$Wrap:e,isNothing:p,xProxy:t};function n(i,...s){if(r({trial:g=>"isTypes"in(s?.[0]??{})})){let g=s[0];return"defaultValue"in g?m(i,g):"notTypes"in g?a(i,g):n(i,...[g.isTypes].flat())}let d=typeof i=="symbol"?Symbol.isSymbol:i;return s.length>1?h(d,...s):l(i,...s)}function o(i){return i?.[Symbol.proxy]??n(i)}function l(i,...s){let{noInput:d,noShouldbe:g,compareTo:E,inputCTOR:F,isNaN:P,isInfinity:I,shouldBeFirstElementIsNothing:R}=b(i,...s);switch(s=s.length&&s[0],!0){case R:return String(i)===String(E);case(i?.[Symbol.proxy]&&g):return i[Symbol.proxy];case P:return g?"NaN":r({trial:k=>String(E)})===String(i);case I:return g?"Infinity":r({trial:k=>String(E)})===String(i);case d:return g?String(i):String(E)===String(i);case F===Boolean:return s?F===s:"Boolean";default:return S(i,s,g,c(i,F))}}function c(i,s){return i===0?Number:i===""?String:i?s:{name:String(i)}}function b(i,...s){let d=s.length<1,g=!d&&s[0],E=!d&&p(s[0]),F=i==null,P=!F&&Object.getPrototypeOf(i)?.constructor,I=r({trial:k=>String(i)})==="NaN",R=r({trial:k=>String(i)})==="Infinity";return{noInput:F,noShouldbe:d,compareTo:g,inputCTOR:P,isNaN:I,isInfinity:R,shouldBeFirstElementIsNothing:E}}function S(i,s,d,g){switch(!0){case(!d&&s===i||i?.[Symbol.proxy]&&s===Proxy):return!0;case r({trial:E=>String(s)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(s,String)):return String(s)===i[Symbol.toStringTag];default:return s?r({trial:E=>i instanceof s})||s===g||s===Object.getPrototypeOf(g)||`${s?.name}`===g?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||g?.name||String(g)}}function h(i,...s){return s.some(d=>n(i,d))}function p(i,s=!1){let d=i==null;return d=s?d||n(i,1/0)||n(i,NaN):d,d}function x(){let i=(s,d)=>s?.constructor===Function?s(d):void 0;return function({trial:s,whenError:d=()=>{}}={}){try{return i(s)}catch(g){return i(d,g)}}}function f(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...s){return n(i,...s)},is(...s){return n(i,...s)}})}}function m(i,{defaultValue:s,isTypes:d=[void 0],notTypes:g}={}){return d=d?.constructor!==Array?[d]:d,g=g&&g?.constructor!==Array?[g]:[],g.length<1?n(i,...d)?i:s:a(i,{isTypes:d,notTypes:g})?i:s}function a(i,{isTypes:s=[void 0],notTypes:d=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,d=d?.constructor!==Array?[d]:d,n(i,...s)&&!n(i,...d)}function y(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...s){return n(i,...s)},enumerable:!1,configurable:!1}}))}function v(i){let s=String(Object.getPrototypeOf(i)?.constructor);return s.slice(s.indexOf("ion")+3,s.indexOf("(")).trim()}function w(i){let s=i.set;return i.set=(d,g,E)=>g===Symbol.proxy?d[g]=E:s(d,g,E),i}function C(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(s,d){for(let E of d)E.set&&(E=w(E));let g=new s(...d);return g[Symbol.proxy]=`Proxy (${v(d[0])})`,g}})}}}}var Z=ht;function ht({styleSheet:r,createWithId:e}={}){let{tryParseAtOrNestedRules:t,ruleExists:n,checkParams:o,sheet:l,removeRules:c,consider:b,currentSheetID:S}=St({styleSheet:r,createWithId:e});function h(a,y){if(a&&y.removeProperties){Object.keys(y.removeProperties).forEach(v=>a.style.removeProperty(we(v)));return}Object.entries(y).forEach(([v,w])=>{v=we(v.trim()),w=w.trim();let C;if(/!important/.test(w)&&(w=w.slice(0,w.indexOf("!important")).trim(),C="important"),!CSS.supports(v,w))return console.error(`StylingFactory ${S} error: '${v}' with value '${w}' not supported (yet)`);Ee(()=>a.style.setProperty(v,w,C),`StylingFactory ${S} (setRule4Selector) failed`)})}function p(a,y,v=l){if(a=a?.trim?.(),!q(a,String)||!a.length||/[;,]$/g.test(a))return console.error(`StylingFactory ${S} (setRules): [${a||"[no selector given]"}] is not a valid selector`);if(y.removeRule)return c(a);let w=n(a,!0),C=w||v.cssRules[v.insertRule(`${a} {}`,v.cssRules.length||0)];return b(()=>h(C,y),a,w)}function x(a){let y=a.trim().split(/{/,2),v=y.shift().trim();if(!q(v,String)||!v?.trim()?.length)return console.error(`StylingFactory ${S} (doParse): no (valid) selector could be extracted from rule ${ue(a)}`);let w=$t(y.shift());return Ee(()=>p(v,w),`StylingFactory ${S} (setRules) failed`)}function f(a){let y=t(a);return y.done?y.existing:x(a)}function m(a,y){return a.trim().startsWith("@media")?f(xt(a,y)):p(a,y)}return function(a,y={}){return o(a,y)&&(Object.keys(y).length?m(a,y):f(a))}}function St({styleSheet:r,createWithId:e}){let t="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;r=e?o(e):r;function o(f){let m=document.querySelector(`#${f}`)?.sheet;if(m)return m;let a=Object.assign(document.createElement("style"),{id:f});return document.head.insertAdjacentElement("beforeend",a),a.sheet}function l(f){return console.error(`StylingFactory ${n} [rule: ${f}]
|
|
3
|
-
=> @charset, @namespace and @import are not supported here`),{done:!0}}function
|
|
4
|
-
${
|
|
5
|
-
Rule: ${
|
|
6
|
-
${t}`),
|
|
7
|
-
${
|
|
8
|
-
Rule: ${
|
|
9
|
-
${t}`),
|
|
10
|
-
`)}function
|
|
11
|
-
`).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),t)}function
|
|
1
|
+
var JQx=(()=>{var re=Object.defineProperty;var Ve=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Ue=Object.prototype.hasOwnProperty;var Ge=(r,e)=>{for(var t in e)re(r,t,{get:e[t],enumerable:!0})},Ze=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of _e(e))!Ue.call(r,o)&&o!==t&&re(r,o,{get:()=>e[o],enumerable:!(n=Ve(e,o))||n.enumerable});return r};var Ye=r=>Ze(re({},"__esModule",{value:!0}),r);var cr={};Ge(cr,{default:()=>sr});var me=qe(),B=Xe(),z=Ke();function Xe(){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(","))}}function Ke(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function qe(){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;}}"]}var ne=!1,et={on:()=>ne=!0,off:()=>ne=!1},k={tagsRaw:z,allowUnknownHtmlTags:et,isAllowed(r){if(ne)return!0;let e=c(r,String)?r.toLowerCase():r?.nodeName.toLowerCase()||"none";return e==="#text"||!!z[e]},allowTag:r=>z[r.toLowerCase()]=!0,prohibitTag:r=>z[r.toLowerCase()]=!1};var tt=rt(),ge={html:"innerHTML",text:"textContent",class:"className"},oe=tt;function rt(){let r={get(e,t){let n=String(t)?.toLowerCase();switch(!0){case n in e:return e[n];case ft(n):return pe(e,n,t);default:return pe(e,n,t,!0)}},enumerable:!1,configurable:!1};return new Proxy({},r)}function pe(r,e,t,n=!1){return Object.defineProperty(r,e,{get(){return n?o=>ct(t):dt(e)}}),r[e]}function nt(r,e,t){return e=e?.isJQx&&e.first()||e,le({trial:n=>ut(e)?r.append(e):be(e)?r.insertAdjacentHTML("beforeend",e):r.append(e),whenError:n=>console.info(`${t} (for root ${r}) not created, reason
|
|
2
|
+
`,n)})}function ot(r,e,...t){let n=it(e,r);return t?.forEach(o=>nt(n,o,r)),n}function it(r,e){switch(r=ie(e)?at(r):r?.isJQx?r.first():r,!0){case c(r,String):return V(e,be(r,e)?{html:r}:{text:r});case c(r,Node):return st(e,r);default:return V(e,r)}}function lt(r){return delete r.data,Object.keys(r).length<1||Object.keys(r).forEach(e=>{let t=e.toLowerCase();t in ge&&(r[ge[t]]=r[e],delete r[e])}),r}function st(r,e){let t=V(r);return t.append(e),t}function V(r,e={}){e=ye(e,{});let t=Object.entries(e.data??{}),n=Object.assign(ie(r)?new Comment(e?.text):document.createElement(r),lt(e));return t.length&&t.forEach(([o,l])=>n.dataset[o]=String(l)),n}function ye(r,e){return e?c(r,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):c(r,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function at(r){return ye(r)?r?.text??r?.textContent??"":String(r)}function ct(r){return V("b",{style:"color:red",text:`'${r}' is not a valid HTML-tag`})}function be(r,e){return!ie(e)&&c(r,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(r)}function ut(r){return r?.constructor===Comment||r?.constructor===CharacterData}function ie(r){return r?.constructor===Comment||/comment/i.test(r)}function ft(r){return!c(V(r),HTMLUnknownElement)}function dt(r){return(e,...t)=>ot(r,e,...t)}var{IS:c,maybe:le,$Wrap:br,xProxy:hr,isNothing:Sr}=mt();function mt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),x();let r=m(),[e,t]=[u(),M()];return t.custom(),{IS:n,maybe:r,$Wrap:e,isNothing:h,xProxy:t};function n(i,...s){if(r({trial:p=>"isTypes"in(s?.[0]??{})})){let p=s[0];return"defaultValue"in p?g(i,p):"notTypes"in p?d(i,p):n(i,...[p.isTypes].flat())}let f=typeof i=="symbol"?Symbol.isSymbol:i;return s.length>1?b(f,...s):l(i,...s)}function o(i){return i?.[Symbol.proxy]??n(i)}function l(i,...s){let{noInput:f,noShouldbe:p,compareTo:v,inputCTOR:L,isNaN:O,isInfinity:P,shouldBeFirstElementIsNothing:I}=S(i,...s);switch(s=s.length&&s[0],!0){case I:return String(i)===String(v);case(i?.[Symbol.proxy]&&p):return i[Symbol.proxy];case O:return p?"NaN":r({trial:R=>String(v)})===String(i);case P:return p?"Infinity":r({trial:R=>String(v)})===String(i);case f:return p?String(i):String(v)===String(i);case L===Boolean:return s?L===s:"Boolean";default:return y(i,s,p,a(i,L))}}function a(i,s){return i===0?Number:i===""?String:i?s:{name:String(i)}}function S(i,...s){let f=s.length<1,p=!f&&s[0],v=!f&&h(s[0]),L=i==null,O=!L&&Object.getPrototypeOf(i)?.constructor,P=r({trial:R=>String(i)})==="NaN",I=r({trial:R=>String(i)})==="Infinity";return{noInput:L,noShouldbe:f,compareTo:p,inputCTOR:O,isNaN:P,isInfinity:I,shouldBeFirstElementIsNothing:v}}function y(i,s,f,p){switch(!0){case(!f&&s===i||i?.[Symbol.proxy]&&s===Proxy):return!0;case r({trial:v=>String(s)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(s,String)):return String(s)===i[Symbol.toStringTag];default:return s?r({trial:v=>i instanceof s})||s===p||s===Object.getPrototypeOf(p)||`${s?.name}`===p?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||p?.name||String(p)}}function b(i,...s){return s.some(f=>n(i,f))}function h(i,s=!1){let f=i==null;return f=s?f||n(i,1/0)||n(i,NaN):f,f}function m(){let i=(s,f)=>s?.constructor===Function?s(f):void 0;return function({trial:s,whenError:f=()=>{}}={}){try{return i(s)}catch(p){return i(f,p)}}}function u(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...s){return n(i,...s)},is(...s){return n(i,...s)}})}}function g(i,{defaultValue:s,isTypes:f=[void 0],notTypes:p}={}){return f=f?.constructor!==Array?[f]:f,p=p&&p?.constructor!==Array?[p]:[],p.length<1?n(i,...f)?i:s:d(i,{isTypes:f,notTypes:p})?i:s}function d(i,{isTypes:s=[void 0],notTypes:f=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,f=f?.constructor!==Array?[f]:f,n(i,...s)&&!n(i,...f)}function x(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...s){return n(i,...s)},enumerable:!1,configurable:!1}}))}function w(i){let s=String(Object.getPrototypeOf(i)?.constructor);return s.slice(s.indexOf("ion")+3,s.indexOf("(")).trim()}function C(i){let s=i.set;return i.set=(f,p,v)=>p===Symbol.proxy?f[p]=v:s(f,p,v),i}function M(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(s,f){for(let v of f)v.set&&(v=C(v));let p=new s(...f);return p[Symbol.proxy]=`Proxy (${w(f[0])})`,p}})}}}}var{IS:Y,maybe:vr,$Wrap:Er,xProxy:wr,isNothing:Cr}=gt();function gt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),x();let r=m(),[e,t]=[u(),M()];return t.custom(),{IS:n,maybe:r,$Wrap:e,isNothing:h,xProxy:t};function n(i,...s){if(r({trial:p=>"isTypes"in(s?.[0]??{})})){let p=s[0];return"defaultValue"in p?g(i,p):"notTypes"in p?d(i,p):n(i,...[p.isTypes].flat())}let f=typeof i=="symbol"?Symbol.isSymbol:i;return s.length>1?b(f,...s):l(i,...s)}function o(i){return i?.[Symbol.proxy]??n(i)}function l(i,...s){let{noInput:f,noShouldbe:p,compareTo:v,inputCTOR:L,isNaN:O,isInfinity:P,shouldBeFirstElementIsNothing:I}=S(i,...s);switch(s=s.length&&s[0],!0){case I:return String(i)===String(v);case(i?.[Symbol.proxy]&&p):return i[Symbol.proxy];case O:return p?"NaN":r({trial:R=>String(v)})===String(i);case P:return p?"Infinity":r({trial:R=>String(v)})===String(i);case f:return p?String(i):String(v)===String(i);case L===Boolean:return s?L===s:"Boolean";default:return y(i,s,p,a(i,L))}}function a(i,s){return i===0?Number:i===""?String:i?s:{name:String(i)}}function S(i,...s){let f=s.length<1,p=!f&&s[0],v=!f&&h(s[0]),L=i==null,O=!L&&Object.getPrototypeOf(i)?.constructor,P=r({trial:R=>String(i)})==="NaN",I=r({trial:R=>String(i)})==="Infinity";return{noInput:L,noShouldbe:f,compareTo:p,inputCTOR:O,isNaN:P,isInfinity:I,shouldBeFirstElementIsNothing:v}}function y(i,s,f,p){switch(!0){case(!f&&s===i||i?.[Symbol.proxy]&&s===Proxy):return!0;case r({trial:v=>String(s)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(s,String)):return String(s)===i[Symbol.toStringTag];default:return s?r({trial:v=>i instanceof s})||s===p||s===Object.getPrototypeOf(p)||`${s?.name}`===p?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||p?.name||String(p)}}function b(i,...s){return s.some(f=>n(i,f))}function h(i,s=!1){let f=i==null;return f=s?f||n(i,1/0)||n(i,NaN):f,f}function m(){let i=(s,f)=>s?.constructor===Function?s(f):void 0;return function({trial:s,whenError:f=()=>{}}={}){try{return i(s)}catch(p){return i(f,p)}}}function u(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...s){return n(i,...s)},is(...s){return n(i,...s)}})}}function g(i,{defaultValue:s,isTypes:f=[void 0],notTypes:p}={}){return f=f?.constructor!==Array?[f]:f,p=p&&p?.constructor!==Array?[p]:[],p.length<1?n(i,...f)?i:s:d(i,{isTypes:f,notTypes:p})?i:s}function d(i,{isTypes:s=[void 0],notTypes:f=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,f=f?.constructor!==Array?[f]:f,n(i,...s)&&!n(i,...f)}function x(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...s){return n(i,...s)},enumerable:!1,configurable:!1}}))}function w(i){let s=String(Object.getPrototypeOf(i)?.constructor);return s.slice(s.indexOf("ion")+3,s.indexOf("(")).trim()}function C(i){let s=i.set;return i.set=(f,p,v)=>p===Symbol.proxy?f[p]=v:s(f,p,v),i}function M(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(s,f){for(let v of f)v.set&&(v=C(v));let p=new s(...f);return p[Symbol.proxy]=`Proxy (${w(f[0])})`,p}})}}}}var X=pt;function pt({styleSheet:r,createWithId:e}={}){let{tryParseAtOrNestedRules:t,ruleExists:n,checkParams:o,sheet:l,removeRules:a,consider:S,currentSheetID:y}=yt({styleSheet:r,createWithId:e});function b(d,x){if(d&&x.removeProperties){Object.keys(x.removeProperties).forEach(w=>d.style.removeProperty(he(w)));return}Object.entries(x).forEach(([w,C])=>{w=he(w.trim()),C=C.trim();let M;if(/!important/.test(C)&&(C=C.slice(0,C.indexOf("!important")).trim(),M="important"),!CSS.supports(w,C))return console.error(`StylingFactory ${y} error: '${w}' with value '${C}' not supported (yet)`);Se(()=>d.style.setProperty(w,C,M),`StylingFactory ${y} (setRule4Selector) failed`)})}function h(d,x,w=l){if(d=d?.trim?.(),!Y(d,String)||!d.length||/[;,]$/g.test(d))return console.error(`StylingFactory ${y} (setRules): [${d||"[no selector given]"}] is not a valid selector`);if(x.removeRule)return a(d);let C=n(d,!0),M=C||w.cssRules[w.insertRule(`${d} {}`,w.cssRules.length||0)];return S(()=>b(M,x),d,C)}function m(d){let x=d.trim().split(/{/,2),w=x.shift().trim();if(!Y(w,String)||!w?.trim()?.length)return console.error(`StylingFactory ${y} (doParse): no (valid) selector could be extracted from rule ${se(d)}`);let C=wt(x.shift());return Se(()=>h(w,C),`StylingFactory ${y} (setRules) failed`)}function u(d){let x=t(d);return x.done?x.existing:m(d)}function g(d,x){return d.trim().startsWith("@media")?u(bt(d,x)):h(d,x)}return function(d,x={}){return o(d,x)&&(Object.keys(x).length?g(d,x):u(d))}}function yt({styleSheet:r,createWithId:e}){let t="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;r=e?o(e):r;function o(u){let g=document.querySelector(`#${u}`)?.sheet;if(g)return g;let d=Object.assign(document.createElement("style"),{id:u});return document.head.insertAdjacentElement("beforeend",d),d.sheet}function l(u){return console.error(`StylingFactory ${n} [rule: ${u}]
|
|
3
|
+
=> @charset, @namespace and @import are not supported here`),{done:!0}}function a(u,g){return[...r.rules].find(d=>g?xe(d.selectorText||"",u):xt`${St(u)}${[..."gim"]}`.test(d.cssText))}function S(u){return/^@charset|@import|namespace/i.test(u.trim())?l(u):u.match(/}/g)?.length>1?{existing:h(u,1),done:!0}:{done:!1}}function y(u){let g=[...r.cssRules].reduce((x,w,C)=>xe(w.selectorText||"",u)&&x.concat(C)||x,[]),d=g.length;return g.forEach(x=>r.deleteRule(x)),d>0?console.info(`\u2714 Removed ${d} instance${d>1?"s":""} of selector ${u} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${u} does not exist in ${n.slice(4)}`)}function b(u,g){return u&&Y(u,String)&&u.trim().length>0&&Y(g,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function h(u){u=u.trim();let g=u.slice(0,u.indexOf("{")).trim(),d=!!a(g);try{return r.insertRule(`${u}`,r.cssRules.length),d}catch(x){return console.error(`StylingFactory ${n} (tryParse) ${x.name} Error:
|
|
4
|
+
${x.message}
|
|
5
|
+
Rule: ${se(u)}
|
|
6
|
+
${t}`),d}}function m(u,g,d){try{return u(),d}catch(x){return console.error(`StylingFactory ${n} (tryAddOrModify) ${x.name} Error:
|
|
7
|
+
${x.message}
|
|
8
|
+
Rule: ${se(g)}
|
|
9
|
+
${t}`),d}}return{sheet:r,removeRules:y,tryParseAtOrNestedRules:S,ruleExists:a,checkParams:b,tryParse:h,consider:m,currentSheetID:n}}function bt(r,e){return`${r.trim()} ${Object.entries(e).map(([t,n])=>`${t}: { ${ht(n)}`)}`}function se(r){let e=(r||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return r.length>e.length?`${e.trim()}...truncated`:e}function ht(r){return Object.entries(r).map(([e,t])=>`${e}: ${t.trim()}`).join(`;
|
|
10
|
+
`)}function St(r){return r.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function xt(r,...e){let t=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&r.raw.reduce((n,o,l)=>n.concat(e[l-1]||"").concat(o),"")||r.raw.join("")).split(`
|
|
11
|
+
`).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),t)}function he(r){return r.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Se(r,e){try{return r()}catch(t){console.error(`${e||"an error occured"}: ${t.message}`)}}function vt(r){return r.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(e,t)=>`${t}\\3b`).split(";").map(e=>e.trim()).join(`;
|
|
12
12
|
`).replaceAll("\\3b",";").split(`
|
|
13
|
-
`)}function
|
|
14
|
-
|
|
15
|
-
<div class="legend">
|
|
16
|
-
|
|
17
|
-
</div>
|
|
18
|
-
<${C} id="jqx_logger"></${C}>`,s=A(i);return fe(s,void 0,T.AfterBegin),w.node(S)}let f=(...w)=>{let C=w[0]==="fromStatic";if(!r.node("#JQxLogCSS")){c=r.editStylesheet("JQxLogCSS");for(let s of ie)c(s)}if(w=C?w.slice(1):w,C&&!t)return w.forEach(s=>console.info(`${B()} \u2714 ${p(s)}`));if(!t)return;!n&&!r.node("#logBox")&&x(r);let i=s=>`${r.IS(s,Object)?JSON.stringify(s,null,2):s}
|
|
19
|
-
`;w.forEach(s=>n?console.info(`${B()} \u2714 ${p(s)}`):r.node("#jqx_logger").insertAdjacentHTML(o?"afterbegin":"beforeend",`<div class="entry">${B()} ${i(s.replace(/\n/g,"<br>"))}</div>`))},m={on(){t=!0,f("Logging activated (CSS in style#JQxLogCSS)")},off(){t=!1,console.log(`${B()} \u2714 Logging deactivated`)}},a={on(){e=!0},off(){e=!1}},y=(...w)=>e&&f(...w),v={get isConsole(){return n===!0},get isOn(){return t},isVisible:function(){return r("#jqx_logger").is("visible")},on(){return m.on(),a.on(),n||b()?.addClass("visible"),f("Debug logging started. Every call to [jqx instance] is logged"),v},off(){return b().isEmpty||(a.off(),f("Debug logging stopped"),b()?.removeClass("visible")),m.off(),v},toConsole:{on(){return n=!0,f("Started logging to console"),v},off(){return f("Stopped logging to console (except error messages)"),n=!1,v}},remove(){return m.off(),a.off(),b()?.remove(),console.clear(),console.log(`${B()} logging completely disabled and all entries removed`),v},log:function(...w){return f(...w),v},hide(){return b()?.removeClass("visible"),v},show:()=>(b()?.addClass("visible"),v),get reversed(){return{on:()=>(o=!0,f("Reverse logging set: now logging bottom to top (latest first)"),r("#logBox .legend").addClass("reversed"),v),off:()=>(o=!1,r("#logBox .legend").removeClass("reversed"),f("Reverse logging reset: now logging chronological (latest last)"),v)}},clear(){return r(S).text(""),console.clear(),f("Logging cleared"),v}};return{Log:f,debugLog:v,systemLog:y}}var Fe=It;var L=(r,e)=>{let t=r.collection.filter(n=>!Oe(n));for(let n=0;n<t.length;n+=1)e(t[n],n);return r},Rt=$e(),kt={get(r,e){return r[Y(e)]||r[e]},enumerable:!1,configurable:!1};function Te(r){return r&&(r.textContent="")}function _(r){let e=r.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),r.isConnected?r.remove():r=null,e}function He(r,e){if(r&&u(e,Object))for(let[t,n]of Object.entries(e))r.setAttribute(`data-${H(t)}`,n)}function Ae(r,e){return r.andThen(e,!0)}function De(r,e){return r.andThen(e)}function Ne(r){return r.startsWith("data")||j.html.find(e=>r.toLowerCase()===e)}function Bt(r,e,t,n){t&&u(e,String)&&(e={[e]:t==="-"?"":t});let o;e.className&&(o=e.className,delete e.className),o=[...r.classList].find(c=>c.startsWith("JQxClass-")||o&&c===o)||o||`JQxClass-${J().slice(1)}`,n.editCssRule(`.${o}`,e),r.classList.add(o)}function jt(r,e){if(r)for(let[t,n]of Object.entries(e)){if(t=H(t),t.startsWith("data"))return He(r,n);u(n,String)&&Ne(t)&&r.setAttribute(t,n.split(/[, ]/)?.join(" "))}}function de(r,e){if(u(e,Object))for(let[t,n]of Object.entries(e)){let o;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),o="important"),r.style.setProperty(H(t),n,o)}}function Jt(...r){W.log("\u2757"+r.map(e=>String(e)).join(", "))}function me(r,e=0,t=!0){return r=r?.parentElement,e+=r?r[t?"scrollTop":"scrollLeft"]:0,r?me(r,e,t):e}function Qt(r){return{data:e=>({get all(){return new Proxy(e[0]?.dataset??{},kt)},set:(t={})=>{if(!e.is.empty&&u(t,Object))for(let[n,o]of Object.entries(t))e.setData({[n]:o});return e},get:(t,n)=>e.data.all[t]??n,add:(t={})=>{if(!e.is.empty&&u(t,Object))for(let[n,o]of Object.entries(t))e.setData({[n]:o});return e},remove:t=>(e[0]?.removeAttribute(`data-${H(t)}`),e)}),dimensions:e=>{if(e.is.empty)return{error:"[instance].dimensions: NO ELEMENTS"};let t=e[0],n=e.first()?.getBoundingClientRect().toJSON();return n.scrollTopDistance=me(t,0),n.scrollLeftDistance=me(t,0,!1),n},node:e=>e[0],HTML:e=>({get:(t,n)=>{if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let o=t?e.outerHtml:e.html();return n?Q(o):o},set:(t,n=!1,o=!1)=>{t=t.isJQx?t.HTML.get(1):t;let l=u(t,String);return t=l&&o?Q(t):t,l&&(t||"").trim().length&&e.html(t,n),e},replace:(t,n=!1)=>e.HTML.set(t,!1,n),append:(t,n=!1)=>(t=u(t,HTMLElement)?r(t).HTML.get(1):t.isJQx?t.HTML.get(1):t,e.HTML.set(t,!0,n)),insert:(t,n=!1)=>(t=u(t,HTMLElement)?r(t).HTML.get(1):t.isJQx?t.HTML.get(1):t,e.HTML.set(t+e.HTML.get(),!1,n))}),is:e=>Rt(e),length:e=>e.collection.length,outerHtml:e=>(e.first()||{outerHTML:void 0}).outerHTML,parent:e=>{let t=r(e[0]?.parentNode);return t.is.empty?e:t},render:e=>(!e.is.empty&&e.toDOM()||r.log("[JQx.render]: empty collection"),e),Style:e=>({get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline:t=>e.style(t),inSheet:t=>e.css(t),valueOf:t=>e.is.empty?void 0:getComputedStyle(e[0])[H(t)],nwRule:t=>e.Style.byRule({rules:t}),byRule:({classes2Apply:t=[],rules:n=[]}={})=>{let l=u(n,String)&&!t.length?n.split("{")[0].trim():"";if(n=n&&u(n,String)?[n]:n,t=t&&u(t,String)?[t]:t,(n?.length||t?.length)&&(n?.length&&r.editCssRules(...n),t))for(let c of t)e.addClass(c);return l?.startsWith(".")&&e.addClass(l.slice(1)),l?.startsWith("#")&&!e.attr("id")&&e.prop({id:l.slice(1)}),e}})}}function Wt(r){return{addClass:(e,...t)=>L(e,n=>n&&t.forEach(o=>n.classList.add(o))),after:De,afterMe:De,andThen:(e,t,n=!1)=>{if(!t||!u(t,String,Node,Proxy))return Jt(`[JQx instance].[beforeMe | afterMe | andThen]: insufficient input [${t}]`),e;t=t?.isJQx?t.collection:u(t,Node)?r.virtual(t).collection:r.virtual(A(t)).collection;let[o,l,c]=n?[0,"before",t.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(t)];return e[o][l](...t),e.collection=c,e},append:(e,...t)=>{if(!e.is.empty&&t.length){let n=e.length===1;for(let o of t){if(!o.isJQx&&$(o)){let l=o.trim(),b=!/^<(.+)[^>]+>$/m.test(l)?r.text(o):A(o);L(e,S=>S.append(n?b:_(b)))}K(o)&&L(e,l=>l.append(n?o:_(o))),o.isJQx&&!o.is.empty&&L(e,l=>o.collection.forEach(c=>l.append(n?c:_(c))))}}return e},appendTo:(e,t)=>(t.isJQx||(t=r(t)),t.append(e),e),attr:(e,t,n)=>{let o=e[0];if(!o)return e;if(!n&&$(t))return t=H(t),t==="class"?[...o?.classList].join(" "):o?.getAttribute(t);if($(t)&&n)switch(t=H(t),!0){case t.startsWith("data-"):t={data:{[t.replace("data-","")]:n}};break;default:t={[t]:n}}return u(t,Object)&&!e.is.empty&&jt(o,t),e},before:Ae,beforeMe:Ae,clear:e=>L(e,Te),closest:(e,t)=>{let n=$(t)?e[0].closest(t):null;return n?r(n):e},computedStyle:(e,t)=>e.first()&&getComputedStyle(e.first())[t],css:(e,t,n)=>L(e,o=>Bt(o,t,n,r)),duplicate:(e,t=!1,n=document.body)=>{let o=e.toNodeList().map(c=>c.removeAttribute&&c.removeAttribute("id")||c),l=r.virtual(o);return t?l.toDOM(n):l},each:(e,t)=>L(e,t),empty:e=>L(e,Te),find:(e,t)=>e.collection.length>0?[...e.first()?.querySelectorAll(t)]:[],find$:(e,t)=>e.collection.length>0?r(t,e):e,first:(e,t=!1)=>{if(e.collection.length>0)return t?e.single():e.collection[0]},first$:(e,t)=>e.single(t),getData:(e,t,n)=>e.first()&&e.first().dataset?.[t]||n,hasClass:(e,...t)=>{let n=e[0];return!n||!n.classList.length?!1:t.find(o=>n.classList.contains(o))&&!0||!1},hide:e=>L(e,t=>de(t,{display:"none !important"})),html:(e,t,n)=>{if(t===void 0){let o=e.node;return o?.getHTML&&o.getHTML()||""}if(!e.isEmpty()){let o=A(`<div>${t.isJQx?t.HTML.get(!0):t}</div>`);if(!u(o,Comment))return L(e,c=>(n||(c.textContent=""),c.insertAdjacentHTML(r.at.end,o.getHTML())))}return e},htmlFor:(e,t,n="",o=!1)=>{if(t&&e.collection.length){if(!t||!$(n))return e;let l=e.find$(t);if(l.length<1)return e;let c=A(`<span>${n}</span>`);l.each(b=>{o||(b.textContent=""),b.insertAdjacentHTML(r.at.end,c?.getHTML())})}return e},isEmpty:e=>e.collection.length<1,nth$:(e,t)=>e.single(t),on:(e,t,...n)=>{if(e.collection.length&&u(t,String,Array)){if(t?.length<1||n.length<1)return e;let o=Pe(e);r.handle({type:t,selector:o,handlers:n})}return e},prepend:(e,...t)=>{if(!e.is.empty&&t){let n=e.length===1;for(let o of t){if($(o)){o=o.trim();let c=!/^<(.+)[^>]+>$/m.test(o)?r.text(o):A(o);c=n?c:_(c),L(e,b=>b.prepend(c.cloneNode(!0)))}K(o)&&L(e,l=>l.prepend(n?o:_(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),L(e,l=>L(o,c=>l.prepend(n?c:_(c)))),o.collection.reverse())}}return e},prependTo:(e,t)=>(t.isJQx||(t=r.virtual(t)),t.prepend(e),e),prop:(e,t,n)=>{if(u(t,String)&&!n)return t.startsWith("data")?e[0]?.dataset[t.slice(t.indexOf("-")+1)]:e[0]?.[t];let o=u(t,Object)?t:{[t]:n};for(let[l,c]of Object.entries(o)){if(l=l.trim(),c&&!Ne(l)||!c)return!1;if(l.toLowerCase()==="id")return e[0].id=c;L(e,S=>{if(l.startsWith("data"))return S.dataset[l.slice(l.indexOf("-")+1)]=c;S[l]=c})}return e},remove:(e,t)=>{O(`remove ${D(e.HTML.get(1),40)}${t?` /w selector ${t}`:""}`);let n=l=>l.remove(),o=()=>e.collection=e.collection.filter(l=>document.documentElement.contains(l));if(t){let l=e.find$(t);return l.is.empty||(L(l,n),o()),e}return L(e,n),o(),e},rmAttr:(e,...t)=>{for(let n of t)e.node.removeAttribute(n);return e},removeClass:(e,...t)=>L(e,n=>{if(n)for(let o of t)n.classList.remove(o)}),renderTo:(e,t=document.body,n=r.at.end)=>(e.toDOM(t,n),e),replace:(e,t,n)=>{let o=e[0];return!t||!n||!u(n,HTMLElement)&&!n.isJQx?(console.error("JQx replace: invalid replacement value"),e):(n.isJQx&&(n=n[0]),u(n,NodeList)&&(n=n[0]),o&&t&&(t=u(t,String)?o.querySelectorAll(t):t.isJQx?t.collection:t,u(t,HTMLElement,NodeList,Array)&&u(n,HTMLElement)&&(u(t,HTMLElement)?[t]:[...t]).forEach(l=>l.replaceWith(n.cloneNode(!0)))),e)},replaceClass:(e,t,...n)=>L(e,o=>{o.classList.remove(t);for(let l of n)o.classList.add(l)}),replaceMe:(e,t)=>e.replaceWith(t),replaceWith:(e,t)=>(t=u(t,Element)?t:t.isJQx?t[0]:void 0,t&&(e[0].replaceWith(t),e=r.virtual(t)),e),setData:(e,t)=>L(e,n=>He(n,t)),show:e=>L(e,t=>de(t,{display:"revert-layer !important"})),single:(e,t)=>e.collection.length>0?u(t,String)?e.find$(t):u(t,Number)?r(e.collection[t]):r(e.collection[0]):e,style:(e,t,n)=>L(e,l=>{n&&u(t,String)&&(t={[t]:n||"none"}),de(l,t)}),text:(e,t,n=!1)=>e.isEmpty()?e:u(t,String)?L(e,l=>l.textContent=n?l.textContent+t:t):e.first().textContent,toDOM:(e,t=document.body,n=T.BeforeEnd)=>(e.isVirtual&&(e.isVirtual=!1),e.collection=z(e.collection,t,n),e),toggleClass:(e,t)=>L(e,n=>n.classList.toggle(t)),toNodeList:e=>[...e.collection].map(t=>document.importNode(t,!0)),trigger:(e,t,n=Event,o={})=>{if(e.collection.length){let l=new n(t,{...o,bubbles:o.bubbles??!0});for(let c of e.collection)c.dispatchEvent(l)}return e},val:(e,t)=>{let n=e[0];return!n||!u(n,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)?e:t===void 0?n.value:(n.value=u(t,String)?t:"",e)}}}function Me(r){return{factoryExtensions:Qt(r),instanceExtensions:Wt(r)}}function Ie(r){if(!r("#jqxPopup").isEmpty())return;r.dialog({id:"jqxPopup"},r.div({id:"jqxPopupContent"})).render,r.editCssRules(...be);let[e,t]=[r("#jqxPopupContent"),r.node("#jqxPopup")],n={};return r.handle({type:"click, keydown",handlers:h,capture:!0}),Object.freeze({show:o,removeModal:S});function o(f){if(t.open)return;n={...f};let{content:m}=n;return r.IS(m,String,HTMLElement)||m?.isJQx?c():!0}function l(){return n.modal?x(n.warnMessage):b()}function c(){e.clear();let{content:f,modal:m,closeAfter:a}=n;m=r.IS(m,Boolean)?m:!1;let y=m?"":r.div({id:"closeHandleIcon"});e.append(y,r.IS(f,String)?r.div(f):f),t.showModal(),!m&&r.IS(a,Number)&&p(l,a)}function b(){if(t.close(n.returnValue),r.IS(n.callback,Function))return n.callback(n.returnValue);n={}}function S({callback:f,value:m}={}){n.returnValue=m,n.modal=!1,n.callback=f||n.callback,l()}function h(f){if(!(Object.keys(n).length<1||!t.open))return f.key==="Escape"&&f.preventDefault(),n.activeTimer&&clearTimeout(n.activeTimer),(f.target.closest("#closeHandleIcon")||!f.target.closest("#jqxPopupContent"))&&l(),document.activeElement.blur()}function p(f,m){r.IS(f,Function)&&r.IS(m,Number)&&m>0&&(n.activeTimer=setTimeout(f,m*1e3))}function x(f){if(!r.IS(f,String,HTMLElement,Proxy))return;let m=e.find$(".warn");switch(!0){case m.is.empty:m=r.div({class:"warn"},f);default:e.append(m.addClass("active")),p(()=>e.find$(".warn").removeClass("active"),2)}}}var N={},zt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],Re=r=>!!zt.find(e=>e===r);function ke(r){return function(o){let{eventType:l,selector:c,callback:b,name:S,capture:h,once:p,canRemove:x}=o;switch(!0){case(!$(l)||!r.IS(b,Function)):default:S=S||!/handlers$/.test(b.name)&&b.name||void 0,h=r.IS(h,Boolean)?h:!1,p=r.IS(p,Boolean)?p:!1,x=$(S,4)&&r.IS(x,Boolean)?x:!1;let{handler:f,signal:m,remove:a}=e({selector:c,callback:b,canRemove:x,name:S,eventType:l});return n({eventType:l,handler:f,capture:h,once:p,signal:m,remove:a,name:S})}};function e(o){let{selector:l,callback:c,canRemove:b,name:S,eventType:h}=o,p=b&&new AbortController,x=t({abortcontroller:p,name:S,eventType:h}),f=l?{handler:m=>{let a=m.target?.closest?.(l);return a&&c(m,r(a),x)},remove:x}:{handler:m=>c(m,m.target,x),remove:x};return p&&(f.signal=p.signal),f}function t(o){let{abortcontroller:l,name:c,eventType:b}=o;return c?l?function(){l.abort();let h=[...N[b].entries()].find(([p,x])=>x.name===c);N[b].delete(h[0]),setTimeout(()=>console.warn(`Listener for event type [${b}] with name [${c}] was removed`),100)}:function(S){console.error(`Listener for event type [${b}] with name [${c}] is not marked as removable`)}:function(){console.error("An anonymous listener can not be removed")}}function n(o){let{eventType:l,handler:c,capture:b,once:S,signal:h,remove:p,name:x}=o;if(S)return addEventListener(l,c,{once:S});if(N[l]||(N[l]=new Map),!(N[l].has(c)||[...N[l].values()].find(m=>(m.name||"")===x))){let m={capture:b||Re(l),once:S||!1};h&&(m.signal=h),document.addEventListener(l,c,m);let a={name:x,remove:p,capture:b||Re(l)};N[l].set(c,a)}}}var _t={},ge,ne,Vt,O,W,{isCommentOrTextNode:Oe,isNode:K,isHtmlString:je,isArrayOfHtmlElements:Je,isArrayOfHtmlStrings:Qe,ElemArray2HtmlString:We,input2Collection:ze,setCollectionFromCssSelector:_e,addHandlerId:Pe,cssRuleEdit:pe,addFn:Ut,elems4Docs:un}=Gt();function Gt(){let r=Z({createWithId:"JQxStylesheet"}),e=(a,y)=>ne[a]=(v,...w)=>y(v,...w),t=a=>u(a,Comment,Text),n=a=>u(a,Text,HTMLElement,Comment),o=a=>u(a,Comment),l=a=>u(a,Text),c=a=>u(a,String)&&/^<|>$/.test(`${a}`.trim()),b=a=>u(a,Array)&&!a?.find(y=>!c(y)),S=a=>u(a,Array)&&!a?.find(y=>!n(y)),h=a=>a?.filter(y=>y).reduce((y,v)=>y.concat(o(v)?`<!--${v.data}-->`:t(v)?v.textContent:v.outerHTML),""),p=a=>a?u(a,Proxy)?[a.EL]:u(a,NodeList)?[...a]:n(a)?[a]:S(a)?a:a.isJQx?a.collection:void 0:[],x=(a,y,v)=>{let w=y!==document.body&&u(a,String)&&a.toLowerCase()!=="body"?y:document,C;try{v.collection=[...w.querySelectorAll(a)]}catch{C=`Invalid CSS querySelector. [${u(a,String)?a:"Nothing valid given!"}]`}return C??`CSS querySelector "${a}", output ${v.collection.length} element(s)`},f=a=>{let y=a.data.get("hid")||`HID${J()}`;return a.data.add({hid:y}),`[data-hid="${y}"]`},m=Object.entries(M.tagsRaw).filter(([,a])=>a).map(([a])=>a).sort((a,y)=>a.localeCompare(y));return{isCommentOrTextNode:t,isNode:n,isComment:o,isText:l,isHtmlString:c,isArrayOfHtmlElements:S,isArrayOfHtmlStrings:b,ElemArray2HtmlString:h,input2Collection:p,setCollectionFromCssSelector:x,addHandlerId:f,cssRuleEdit:r,addFn:e,elems4Docs:m}}function V(r){return new Proxy(r,{get:(e,t)=>Xt(e,t,r)})}function Zt(r,e){return(...t)=>u(r,Function)&&r(V(e),...t)}function Yt(r,e){return(...t)=>u(r,Function)&&r(V(e),...t)}function Xt(r,e,t){switch(!0){case u(e,Symbol):return r;case u(+e,Number):return r.collection?.[e]||void 0;case e in ge:return Yt(ge[e],t)();case e in ne:return Zt(ne[e],t);default:return r[e]}}function Ve(r){let e=nr(r);for(let[t,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(r,t,n),Object.defineProperty(_t,t,n);return r}function Kt(r){return{allow:e=>{let t=/-/.test(e),n=t&&e;e=t?Y(e):e.toLowerCase(),M.allowTag(e),u(r[e],Function)||Object.defineProperties(r,ye(e,!0,r,n))},prohibit:e=>{e=e.toLowerCase(),M.prohibitTag(e),u(r[e],Function)&&Object.defineProperties(r,ye(e,!1,r))}}}function Be(...r){if(r.length===1){let e=String(r.shift().trim());r=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(t=>t.trim())}for(let e of r.map(t=>t.startsWith("!")?t.slice(1,-1):t))pe(e,{removeRule:1})}function qt(r){return function(e,t,n){t=t?.isJQx?t?.[0]:t,n=n&&Object.values(T).find(l=>n===l)?n:void 0;let o=r(e,document.createElement("br"));if(t&&!u(t,HTMLBRElement))for(let l of o.collection)n?t.insertAdjacentElement(n,l):t.append(l);return o}}function er(...r){let e={};for(let t of r){let n=Object.getOwnPropertyDescriptors(t);for(let[o,l]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,l)}return e}function tr(r){console.error(`JQx: "${r}" not allowed, not rendered`)}function rr(r,e,t,n){return r=H(n||r.toLowerCase()),{get(){return(...o)=>e?t.virtual(X(se[r](...o))):tr(r)},enumerable:!1,configurable:!0}}function ye(r,e,t,n){r=r.toLowerCase();let o=rr(r,e,t,n);return n?{[n]:o,[Y(n)]:o}:{[r]:o,[r.toUpperCase()]:o}}function nr(r){return er(Object.entries(M.tagsRaw).reduce(or(r),{}),cr(r))}function or(r){return function(e,[t,n]){return n&&Object.defineProperties(e,ye(t,n,r)),e}}function ir(r){return function(e,t,...n){u(t,Function)&&(n.push(t),t=void 0),r({type:e,selector:t,handlers:n})}}function lr(r){return function(e){let{type:t,origin:n,selector:o,handlers:l,name:c,capture:b,once:S,canRemove:h}=e,p=Ce(t),x=c;if(!u(l,Function,Array))return;l=u(l,Function)?[l]:l,h=u(h,Boolean)?h:!1;let f={eventType:p,selector:o||n,capture:b,name:x,once:S,canRemove:h};switch(!0){case(u(p,Array)&&p.length>0):for(let a of p){f.eventType=a;for(let y of l)m(y)}return;default:for(let a of l)m(a)}function m(a){f.name=x,u(a,Function)&&r({...f,callback:a})}}}function sr(r,e){if(e=$(e)?e:void 0,r=$(r)?r:void 0,e&&r)return[...N[r].values()].find(t=>(t.name||"")===e)}function ar(r){return r.activePopup||Object.defineProperty(r,"activePopup",{value:Ie(r),enumerable:!1}),r.activePopup}function cr(r){let{debugLog:e,Log:t,systemLog:n}=Fe(r),{factoryExtensions:o,instanceExtensions:l}=Me(r);O=n,W=e,ge=o,ne=l,Vt=r;let c=(p,x)=>pe(p,x),b=Kt(r),S=ke(r),h=lr(S);return{log(...p){t("fromStatic",...p)},editCssRules(...p){for(let x of p)pe(x)},createStyle(p){return Z({createWithId:p||`jqx${J()}`})},editStylesheet(p){return Z({createWithId:p||`jqx${J()}`})},text(p,x=!1){return x?r.comment(p):document.createTextNode(p)},node(p,x=document){return x.querySelector(p,x)},nodes(p,x=document){return[...x.querySelectorAll(p,x)]},get editCssRule(){return c},get getNamedListener(){return sr},get debugLog(){return e},get virtual(){return qt(r)},get allowTag(){return b.allow},get prohibitTag(){return b.prohibit},get removeCssRule(){return Be},get removeCssRules(){return Be},get delegate(){return ir(h)},get delegateCaptured(){return h},get handle(){return h},get at(){return T},get setStyle(){return c},get fn(){return Ut},get lenient(){return M.allowUnknownHtmlTags},get IS(){return u},get Popup(){return ar(r)}}}var ur=Ve(fr());function fr(){return function(t,n,o=T.BeforeEnd){if(t?.isJQx)return t;let l=u(n,HTMLBRElement);n=(!l&&n&&n.isJQx?n[0]:n)||document.body,o=o&&Object.values(T).find(m=>o===m)?o:void 0;let c=je(t),b=!c&&Qe(t),S=b||c,h={collection:ze(t)??[],isVirtual:l,isJQx:!0},p=Je(h.collection),x=`input => ${b?`"${D(t.join(", "),70)}"`:!S&&p?`element collection [${D(h.collection.map(m=>`${u(m,Comment,Text)?"Comment|Text @":""} ${m?.outerHTML||m?.textContent}`).join(", "),70)}]`:`"${D(t,70)}"`}`;if(h.collection.length&&p)return O(x),l||h.collection.forEach(m=>{n.contains(m)||z([m],n,o)}),V(h);if(S){if([t].flat().forEach(m=>h.collection.push(A(m))),h.collection.length>0){let m=h.collection.filter(a=>a?.dataset?.jqxcreationerror);h.collection=h.collection.filter(a=>!a?.dataset?.jqxcreationerror),O(`${x}`),O(`*Created ${h.isVirtual?"VIRTUAL ":""}[${D(We(h.collection)||"sanitized: no elements remaining",70)}]`),m.length&&console.error(`JQx: illegal html, not rendered: "${m.reduce((a,y)=>a.concat(`${y.textContent}
|
|
20
|
-
`),"").trim()}"`),h.isVirtual||z(h.collection,n,o)}return V(h)}let f=_e(t,n,h);return O(`input => ${f}`),V(h)}}return Ke(dr);})();
|
|
13
|
+
`)}function Et(r){return r.reduce((e,t)=>{let[n,o]=[t.slice(0,t.indexOf(":")).trim(),t.slice(t.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return n&&o?{...e,[n]:o}:e},{})}function wt(r){return Et(vt(r))}function xe(r,e){return r?.replace("::",":")===e?.replace("::",":")}var Ct=[...Array(26)].map((r,e)=>String.fromCharCode(e+65)).concat([...Array(26)].map((r,e)=>String.fromCharCode(e+97))).concat([...Array(10)].map((r,e)=>`${e}`)),T=$t();function K(r,e=2){return`${r}`.padStart(e,"0")}function Ft(r,e=0){return[r,e]=[Math.floor(r),Math.ceil(e)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(r-e+1)+e)}function F(r,e=1){return e=c(e,Number)&&e||1,c(r,String)&&r.length>=e}function we(r){return r=c(r,String)&&/,/.test(r)?r.split(","):r,c(r,Array)?r.filter(e=>F(e)).map(e=>e.trim().toLowerCase()):c(r,String)&&r?.trim().toLowerCase()||""}function Lt(r){let e=r.length;for(;e--;){let t=Ft(e);[r[e],r[t]]=[r[t],r[e]]}return r}function $(r,e=120){return`${r}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"<").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(r.length>e?" …":"").trim()}function H(r){return r.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function Tt([r,...e]){return`${r.toUpperCase()}${e.join("")}`}function _(r){return c(r,String)?r.toLowerCase().split("-").map((e,t)=>t&&`${Tt(e)}`||e).join(""):r}function U(){return`_${Lt(Ct).slice(0,8).join("")}`}function q(r,e=120){return $(r,e).replace(/</g,"<")}function ve(){return(r=>`[${K(r.getHours())}:${K(r.getMinutes())}:${K(r.getSeconds())}.${K(r.getMilliseconds(),3)}]`)(new Date)}function j(r){return r.replace(/</g,"<").replace(/>/g,">")}function Ce(){let r=m=>c(m,Comment,Text),e=m=>c(m,Text,HTMLElement,Comment),t=m=>c(m,Comment),n=m=>c(m,Text),o=m=>c(m,String)&&/^<|>$/.test(`${m}`.trim()),l=m=>c(m,Array)&&!m?.find(u=>!o(u)),a=m=>c(m,Array)&&!m?.find(u=>!e(u));return{isCommentOrTextNode:r,isNode:e,isComment:t,isText:n,isHtmlString:o,isArrayOfHtmlElements:a,isArrayOfHtmlStrings:l,ElemArray2HtmlString:m=>m?.filter(u=>u).reduce((u,g)=>u.concat(t(g)?`<!--${g.data}-->`:r(g)?g.textContent:g.outerHTML),""),input2Collection:m=>m?c(m,Proxy)?[m.EL]:c(m,NodeList)?[...m]:e(m)?[m]:a(m)?m:m.isJQx?m.collection:void 0:[],setCollectionFromCssSelector:(m,u,g)=>{let d=u!==document.body&&c(m,String)&&m.toLowerCase()!=="body"?u:document,x;try{g.collection=[...d.querySelectorAll(m)]}catch{x=`Invalid CSS querySelector. [${c(m,String)?m:"Nothing valid given!"}]`}return x??`CSS querySelector "${m}", output ${g.collection.length} element(s)`},addHandlerId:m=>{let u=m.data.get("hid")||`HID${U()}`;return m.data.add({hid:u}),`[data-hid="${u}"]`}}}function Fe(){let r=function(l){if(!l)return;let a=l.style,S=getComputedStyle(l),y=[a.visibility,S.visibility].includes("hidden"),b=[a.display,S.display].includes("none"),h=l.offsetTop<0||l.offsetLeft+l.offsetWidth<0||l.offsetLeft>document.body.offsetWidth,m=+S.opacity==0||+(a.opacity||1)==0;return!(h||m||b||y)},t=function(l){return[...l.parentNode.querySelectorAll(":is(:read-write)")].find(a=>a===l)??!1},n=function(l){return[...l.parentNode.querySelectorAll(":is(:modal)")].find(a=>a===l)??!1},o={notInDOM:!0,writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"};return l=>{let a=l.node;return c(a,Node)?{get writable(){return t(a)},get modal(){return n(a)},get inDOM(){return a.isConnected},get open(){return a.open??!1},get visible(){return r(a)},get disabled(){return a.hasAttribute("readonly")||a.hasAttribute("disabled")},get empty(){return l.collection.length<1},get virtual(){return l.isVirtual}}:o}}function Ee(r){return c(r,String)&&Object.assign(document.createElement("textarea"),{innerHTML:r}).textContent||r}function $t(){let r=!1,e=[],t={get on(){return r=!0,t},get off(){return r=!1,t},get backLog(){return e}};function n(...l){return e.unshift(...l.map(a=>`${ve()} \u2A3B ${Ee(a)}`)),console.error(e.slice(0,l.length).join(`
|
|
14
|
+
`)),t}function o(...l){return e.unshift(...l.map(a=>`${ve()} \u2714 ${Ee(a)}`)),r&&console.log(e.slice(0,l.length).join(`
|
|
15
|
+
`)),t}return Object.defineProperties(t,{log:{value:o,enumerable:!1},error:{value:n,enumerable:!1}}),Object.freeze(t)}var At=!0,ee={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},Ht=r=>{if(At&&Object.keys(r.removed).length){let e=Object.entries(r.removed).reduce((t,[n,o])=>[...t,`${j(n)} => ${o}`],[]).join("\\000A");T.error(`JQx HTML creation errors: ${e}`)}},Dt=function(r){let e=r.nodeName.toLowerCase(),t=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(e)&&!t.find(n=>n===e)||k.isAllowed(e)},G=r=>{let e={rawHTML:r?.parentElement?.getHTML()??"no html",removed:{}};return c(r,HTMLElement)&&[...r.childNodes].forEach(t=>{if(t?.children?.length&&G(t),t?.attributes){let o=c(t,SVGElement)?B.svg:B.html;[...(t??{attributes:[]}).attributes].forEach(l=>{let a=l.name.trim().toLowerCase(),S=l.value.trim().toLowerCase().replace(ee.whiteSpace,""),y=a==="href"?!ee.validURL.test(S):ee.notAllowedValues.test(S),b=a.startsWith("data")?!ee.data.test(a):!!o[a];if(y||b){let h=q(l.value||"none",60);h+=h.length===60?"...":"",e.removed[`${l.name}`]=`attribute/property/value not allowed, removed. Value: ${h}`,t.removeAttribute(l.name)}})}if(!(Dt(t)||t.constructor===CharacterData||t.constructor===Comment)){let o=(t?.outerHTML||t?.textContent).trim(),l=q(o,60)??"EMPTY";l+=l.length===60?"...":"",e.removed[`<${t.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${l}`,t.remove()}}),Ht(e),r};var A=new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(r,e){return r[String(e).toLowerCase()]??r[e]}}),Nt=r=>{let e=document.createElement("div");return e.insertAdjacentHTML(A.end,r),e.childNodes.length?G(e):void 0},Mt=(r,e,t)=>c(r,Comment)?e.insertAdjacentHTML(t,`<!--${r.data}-->`):e.insertAdjacentText(t,r.data),J=(r=[],e=document.body,t=A.BeforeEnd)=>r.reduce((n,o)=>{let l=Z(o)&&Ot(o,e,t);return l?[...n,l]:n},[]),Ot=(r,e=document.body,t=A.BeforeEnd)=>(e=e?.isJQx?e?.[0]:e,c(r,Comment,Text)?Mt(r,e,t):e.insertAdjacentElement(t,r)),D=r=>{if(c(r,Text,Comment))return r;let e=r?.trim(),t=e?.split(/<text>|<\/text>/i)??[];if(t?.length&&(t=t.length>1?t.filter(o=>o.length).shift():void 0),e.startsWith("<!--")&&e.endsWith("-->"))return document.createComment(r.replace(/<!--|-->$/g,""));if(t||!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(t);let n=Nt(r);return n.childNodes.length<1?D(`<span data-jqxcreationerror="1">${$(r,60)}</span>`):n.children[0]};var E=(r,e)=>{let t=r.collection.filter(n=>!Ne(n));for(let n=0;n<t.length;n+=1)e(t[n],n);return r},Pt=Fe(),It={get(r,e){return r[_(e)]||r[e]},enumerable:!1,configurable:!1};function Le(r){return r&&(r.textContent="")}function Q(r){let e=r.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),r.isConnected?r.remove():r=null,e}function Ae(r,e){if(r&&c(e,Object))for(let[t,n]of Object.entries(e))r.setAttribute(`data-${H(t)}`,n)}function Te(r,e){return r.andThen(e,!0)}function $e(r,e){return r.andThen(e)}function He(r){return r.startsWith("data")||B.html.find(e=>r.toLowerCase()===e)}function Rt(r,e,t,n){t&&c(e,String)&&(e={[e]:t==="-"?"":t});let o;e.className&&(o=e.className,delete e.className),o=[...r.classList].find(a=>a.startsWith("JQxClass-")||o&&a===o)||o||`JQxClass-${U().slice(1)}`,n.editCssRule(`.${o}`,e),r.classList.add(o)}function kt(r,e){if(r)for(let[t,n]of Object.entries(e)){if(t=H(t),t.startsWith("data"))return Ae(r,n);c(n,String)&&He(t)&&r.setAttribute(t,n.split(/[, ]/)?.join(" "))}}function ae(r,e){if(c(e,Object))for(let[t,n]of Object.entries(e)){let o;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),o="important"),r.style.setProperty(H(t),n,o)}}function jt(...r){debugLog.log("\u2757"+r.map(e=>String(e)).join(", "))}function ce(r,e=0,t=!0){return r=r?.parentElement,e+=r?r[t?"scrollTop":"scrollLeft"]:0,r?ce(r,e,t):e}function Bt(r){return{data:e=>({get all(){return new Proxy(e[0]?.dataset??{},It)},set:(t={})=>{if(!e.is.empty&&c(t,Object))for(let[n,o]of Object.entries(t))e.setData({[n]:o});return e},get:(t,n)=>e.data.all[t]??n,add:(t={})=>{if(!e.is.empty&&c(t,Object))for(let[n,o]of Object.entries(t))e.setData({[n]:o});return e},remove:t=>(e[0]?.removeAttribute(`data-${H(t)}`),e)}),dimensions:e=>{if(e.is.empty)return{error:"[instance].dimensions: NO ELEMENTS"};let t=e[0],n=e.first()?.getBoundingClientRect().toJSON();return n.scrollTopDistance=ce(t,0),n.scrollLeftDistance=ce(t,0,!1),n},node:e=>e[0],HTML:e=>({get:(t,n)=>{if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let o=t?e.outerHtml:e.html();return n?j(o):o},set:(t,n=!1,o=!1)=>{t=t.isJQx?t.HTML.get(1):t;let l=c(t,String);return t=l&&o?j(t):t,l&&(t||"").trim().length&&e.html(t,n),e},replace:(t,n=!1)=>e.HTML.set(t,!1,n),append:(t,n=!1)=>(t=c(t,HTMLElement)?r(t).HTML.get(1):t.isJQx?t.HTML.get(1):t,e.HTML.set(t,!0,n)),insert:(t,n=!1)=>(t=c(t,HTMLElement)?r(t).HTML.get(1):t.isJQx?t.HTML.get(1):t,e.HTML.set(t+e.HTML.get(),!1,n))}),is:e=>Pt(e),length:e=>e.collection.length,outerHtml:e=>(e.first()||{outerHTML:void 0}).outerHTML,parent:e=>{let t=r(e[0]?.parentNode);return t.is.empty?e:t},render:e=>(!e.is.empty&&e.toDOM()||r.log("[JQx.render]: empty collection"),e),Style:e=>({get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline:t=>e.style(t),inSheet:t=>e.css(t),valueOf:t=>e.is.empty?void 0:getComputedStyle(e[0])[H(t)],nwRule:t=>e.Style.byRule({rules:t}),byRule:({classes2Apply:t=[],rules:n=[]}={})=>{let l=c(n,String)&&!t.length?n.split("{")[0].trim():"";if(n=n&&c(n,String)?[n]:n,t=t&&c(t,String)?[t]:t,(n?.length||t?.length)&&(n?.length&&r.editCssRules(...n),t))for(let a of t)e.addClass(a);return l?.startsWith(".")&&e.addClass(l.slice(1)),l?.startsWith("#")&&!e.attr("id")&&e.prop({id:l.slice(1)}),e}})}}function Jt(r){return{addClass:(e,...t)=>E(e,n=>n&&t.forEach(o=>n.classList.add(o))),after:$e,afterMe:$e,andThen:(e,t,n=!1)=>{if(!t||!c(t,String,Node,Proxy))return jt(`[JQx instance].[beforeMe | afterMe | andThen]: insufficient input [${t}]`),e;t=t?.isJQx?t.collection:c(t,Node)?r.virtual(t).collection:r.virtual(D(t)).collection;let[o,l,a]=n?[0,"before",t.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(t)];return e[o][l](...t),e.collection=a,e},append:(e,...t)=>{if(!e.is.empty&&t.length){let n=e.length===1;for(let o of t){if(!o.isJQx&&F(o)){let l=o.trim(),S=!/^<(.+)[^>]+>$/m.test(l)?r.text(o):D(o);E(e,y=>y.append(n?S:Q(S)))}Z(o)&&E(e,l=>l.append(n?o:Q(o))),o.isJQx&&!o.is.empty&&E(e,l=>o.collection.forEach(a=>l.append(n?a:Q(a))))}}return e},appendTo:(e,t)=>(t.isJQx||(t=r(t)),t.append(e),e),attr:(e,t,n)=>{let o=e[0];if(!o)return e;if(!n&&F(t))return t=H(t),t==="class"?[...o?.classList].join(" "):o?.getAttribute(t);if(F(t)&&n)switch(t=H(t),!0){case t.startsWith("data-"):t={data:{[t.replace("data-","")]:n}};break;default:t={[t]:n}}return c(t,Object)&&!e.is.empty&&kt(o,t),e},before:Te,beforeMe:Te,clear:e=>E(e,Le),closest:(e,t)=>{let n=F(t)?e[0].closest(t):null;return n?r(n):e},computedStyle:(e,t)=>e.first()&&getComputedStyle(e.first())[t],css:(e,t,n)=>E(e,o=>Rt(o,t,n,r)),duplicate:(e,t=!1,n=document.body)=>{let o=e.toNodeList().map(a=>a.removeAttribute&&a.removeAttribute("id")||a),l=r.virtual(o);return t?l.toDOM(n):l},each:(e,t)=>E(e,t),empty:e=>E(e,Le),find:(e,t)=>e.collection.length>0?[...e.first()?.querySelectorAll(t)]:[],find$:(e,t)=>e.collection.length>0?r(t,e):e,first:(e,t=!1)=>{if(e.collection.length>0)return t?e.single():e.collection[0]},first$:(e,t)=>e.single(t),getData:(e,t,n)=>e.first()&&e.first().dataset?.[t]||n,hasClass:(e,...t)=>{let n=e[0];return!n||!n.classList.length?!1:t.find(o=>n.classList.contains(o))&&!0||!1},hide:e=>E(e,t=>ae(t,{display:"none !important"})),html:(e,t,n)=>{if(t===void 0){let o=e.node;return o?.getHTML&&o.getHTML()||""}if(!e.isEmpty()){let o=D(`<div>${t.isJQx?t.HTML.get(!0):t}</div>`);if(!c(o,Comment))return E(e,a=>(n||(a.textContent=""),a.insertAdjacentHTML(r.at.end,o.getHTML())))}return e},htmlFor:(e,t,n="",o=!1)=>{if(t&&e.collection.length){if(!t||!F(n))return e;let l=e.find$(t);if(l.length<1)return e;let a=D(`<span>${n}</span>`);l.each(S=>{o||(S.textContent=""),S.insertAdjacentHTML(r.at.end,a?.getHTML())})}return e},isEmpty:e=>e.collection.length<1,nth$:(e,t)=>e.single(t),on:(e,t,...n)=>{if(e.collection.length&&c(t,String,Array)){if(t?.length<1||n.length<1)return e;let o=Me(e);r.handle({type:t,selector:o,handlers:n})}return e},prepend:(e,...t)=>{if(!e.is.empty&&t){let n=e.length===1;for(let o of t){if(F(o)){o=o.trim();let a=!/^<(.+)[^>]+>$/m.test(o)?r.text(o):D(o);a=n?a:Q(a),E(e,S=>S.prepend(a.cloneNode(!0)))}Z(o)&&E(e,l=>l.prepend(n?o:Q(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),E(e,l=>E(o,a=>l.prepend(n?a:Q(a)))),o.collection.reverse())}}return e},prependTo:(e,t)=>(t.isJQx||(t=r.virtual(t)),t.prepend(e),e),prop:(e,t,n)=>{if(c(t,String)&&!n)return t.startsWith("data")?e[0]?.dataset[t.slice(t.indexOf("-")+1)]:e[0]?.[t];let o=c(t,Object)?t:{[t]:n};for(let[l,a]of Object.entries(o)){if(l=l.trim(),a&&!He(l)||!a)return!1;if(l.toLowerCase()==="id")return e[0].id=a;E(e,y=>{if(l.startsWith("data"))return y.dataset[l.slice(l.indexOf("-")+1)]=a;y[l]=a})}return e},remove:(e,t)=>{T.log(`remove ${$(e.HTML.get(1),40)}${t?` /w selector ${t}`:""}`);let n=l=>l.remove(),o=()=>e.collection=e.collection.filter(l=>document.documentElement.contains(l));if(t){let l=e.find$(t);return l.is.empty||(E(l,n),o()),e}return E(e,n),o(),e},rmAttr:(e,...t)=>{for(let n of t)e.node.removeAttribute(n);return e},removeClass:(e,...t)=>E(e,n=>{if(n)for(let o of t)n.classList.remove(o)}),renderTo:(e,t=document.body,n=r.at.end)=>(e.toDOM(t,n),e),replace:(e,t,n)=>{let o=e[0];return!t||!n||!c(n,HTMLElement)&&!n.isJQx?(console.error("JQx replace: invalid replacement value"),e):(n.isJQx&&(n=n[0]),c(n,NodeList)&&(n=n[0]),o&&t&&(t=c(t,String)?o.querySelectorAll(t):t.isJQx?t.collection:t,c(t,HTMLElement,NodeList,Array)&&c(n,HTMLElement)&&(c(t,HTMLElement)?[t]:[...t]).forEach(l=>l.replaceWith(n.cloneNode(!0)))),e)},replaceClass:(e,t,...n)=>E(e,o=>{o.classList.remove(t);for(let l of n)o.classList.add(l)}),replaceMe:(e,t)=>e.replaceWith(t),replaceWith:(e,t)=>(t=c(t,Element)?t:t.isJQx?t[0]:void 0,t&&(e[0].replaceWith(t),e=r.virtual(t)),e),setData:(e,t)=>E(e,n=>Ae(n,t)),show:e=>E(e,t=>ae(t,{display:"revert-layer !important"})),single:(e,t)=>e.collection.length>0?c(t,String)?e.find$(t):c(t,Number)?r(e.collection[t]):r(e.collection[0]):e,style:(e,t,n)=>E(e,l=>{n&&c(t,String)&&(t={[t]:n||"none"}),ae(l,t)}),text:(e,t,n=!1)=>e.isEmpty()?e:c(t,String)?E(e,l=>l.textContent=n?l.textContent+t:t):e.first().textContent,toDOM:(e,t=document.body,n=A.BeforeEnd)=>(e.isVirtual&&(e.isVirtual=!1),e.collection=J(e.collection,t,n),e),toggleClass:(e,t)=>E(e,n=>n.classList.toggle(t)),toNodeList:e=>[...e.collection].map(t=>document.importNode(t,!0)),trigger:(e,t,n=Event,o={})=>{if(e.collection.length){let l=new n(t,{...o,bubbles:o.bubbles??!0});for(let a of e.collection)a.dispatchEvent(l)}return e},val:(e,t)=>{let n=e[0];return!n||!c(n,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)?e:t===void 0?n.value:(n.value=c(t,String)?t:"",e)}}}function De(r){return{factoryExtensions:Bt(r),instanceExtensions:Jt(r)}}function Oe(r){if(!r("#jqxPopup").isEmpty())return;r.dialog({id:"jqxPopup"},r.div({id:"jqxPopupContent"})).render,r.editCssRules(...me);let[e,t]=[r("#jqxPopupContent"),r.node("#jqxPopup")],n={};return r.handle({type:"click, keydown",handlers:b,capture:!0}),Object.freeze({show:o,removeModal:y});function o(u){if(t.open)return;n={...u};let{content:g}=n;return r.IS(g,String,HTMLElement)||g?.isJQx?a():!0}function l(){return n.modal?m(n.warnMessage):S()}function a(){e.clear();let{content:u,modal:g,closeAfter:d}=n;g=r.IS(g,Boolean)?g:!1;let x=g?"":r.div({id:"closeHandleIcon"});e.append(x,r.IS(u,String)?r.div(u):u),t.showModal(),!g&&r.IS(d,Number)&&h(l,d)}function S(){if(t.close(n.returnValue),r.IS(n.callback,Function))return n.callback(n.returnValue);n={}}function y({callback:u,value:g}={}){n.returnValue=g,n.modal=!1,n.callback=u||n.callback,l()}function b(u){if(!(Object.keys(n).length<1||!t.open))return u.key==="Escape"&&u.preventDefault(),n.activeTimer&&clearTimeout(n.activeTimer),(u.target.closest("#closeHandleIcon")||!u.target.closest("#jqxPopupContent"))&&l(),document.activeElement.blur()}function h(u,g){r.IS(u,Function)&&r.IS(g,Number)&&g>0&&(n.activeTimer=setTimeout(u,g*1e3))}function m(u){if(!r.IS(u,String,HTMLElement,Proxy))return;let g=e.find$(".warn");switch(!0){case g.is.empty:g=r.div({class:"warn"},u);default:e.append(g.addClass("active")),h(()=>e.find$(".warn").removeClass("active"),2)}}}var N={},Qt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],Pe=r=>!!Qt.find(e=>e===r);function Ie(r){return function(o){let{eventType:l,selector:a,callback:S,name:y,capture:b,once:h,canRemove:m}=o;switch(!0){case(!F(l)||!r.IS(S,Function)):default:y=y||!/handlers$/.test(S.name)&&S.name||void 0,b=r.IS(b,Boolean)?b:!1,h=r.IS(h,Boolean)?h:!1,m=F(y,4)&&r.IS(m,Boolean)?m:h;let{handler:u,signal:g,remove:d}=e({selector:a,callback:S,canRemove:m,once:h,name:y,eventType:l});return n({eventType:l,handler:u,capture:b,once:h,signal:g,remove:d,name:y})}};function e(o){let{selector:l,callback:a,canRemove:S,name:y,eventType:b,once:h}=o,m=(S||h)&&new AbortController,u=t({once:h,abortcontroller:m,name:y,eventType:b}),g=l?{handler:d=>{let x=d.target?.closest?.(l);return x&&a(d,r(x),u)},remove:u}:{handler:d=>a(d,d.target,u),remove:u};return m&&(g.signal=m.signal,h)?{handler:(d,x)=>{g.handler(d,x),u()}}:g}function t(o){let{once:l,abortcontroller:a,name:S,eventType:y}=o;return S?a?function(){a.abort();let h=[...N[y].entries()].find(([m,u])=>u.name===S);N[y].delete(h[0]),setTimeout(()=>r.logger.log(`Listener for event type [${y}] with name [${S}] was removed${l?" (once active, so handled once).":""}`),100)}:function(b){r.logger.error(`Listener for event type [${y}] with name [${S}] is not marked as removable`)}:function(){r.logger.error("An anonymous listener can not be removed")}}function n(o){let{eventType:l,handler:a,capture:S,once:y,signal:b,remove:h,name:m}=o;if(N[l]||(N[l]=new Map),!(N[l].has(a)||[...N[l].values()].find(g=>(g.name||"")===m))){let g={capture:S||Pe(l),once:y||!1};b&&(g.signal=b),document.addEventListener(l,a,g);let d={name:m,remove:h,capture:S||Pe(l)};N[l].set(a,d)}}}var ue,te,{isCommentOrTextNode:Ne,isNode:Z,isComment:en,isText:tn,isHtmlString:ke,isArrayOfHtmlElements:je,isArrayOfHtmlStrings:Be,ElemArray2HtmlString:Je,input2Collection:Qe,setCollectionFromCssSelector:We,addHandlerId:Me,cssRuleEdit:fe,addFn:Wt}=zt();function zt(){let r=X({createWithId:"JQxStylesheet"}),e=(t,n)=>te[t]=(o,...l)=>n(o,...l);return{...Ce(),cssRuleEdit:r,addFn:e}}function W(r){return new Proxy(r,{get:(e,t)=>Ut(e,t,r)})}function Vt(r,e){return(...t)=>c(r,Function)&&r(W(e),...t)}function _t(r,e){return(...t)=>c(r,Function)&&r(W(e),...t)}function Ut(r,e,t){switch(!0){case c(e,Symbol):return r;case c(+e,Number):return r.collection?.[e]||void 0;case e in ue:return _t(ue[e],t)();case e in te:return Vt(te[e],t);default:return r[e]}}function ze(r){let e=qt(r);for(let[t,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(r,t,n);return r}function Gt(r){return{allow:e=>{let t=/-/.test(e),n=t&&e;e=t?_(e):e.toLowerCase(),k.allowTag(e),c(r[e],Function)||Object.defineProperties(r,de(e,!0,r,n))},prohibit:e=>{e=e.toLowerCase(),k.prohibitTag(e),c(r[e],Function)&&Object.defineProperties(r,de(e,!1,r))}}}function Re(...r){if(r.length===1){let e=String(r.shift().trim());r=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(t=>t.trim())}for(let e of r.map(t=>t.startsWith("!")?t.slice(1,-1):t))fe(e,{removeRule:1})}function Zt(r){return function(e,t,n){t=t?.isJQx?t?.[0]:t,n=n&&Object.values(A).find(l=>n===l)?n:void 0;let o=r(e,document.createElement("br"));if(t&&!c(t,HTMLBRElement))for(let l of o.collection)n?t.insertAdjacentElement(n,l):t.append(l);return o}}function Yt(...r){let e={};for(let t of r){let n=Object.getOwnPropertyDescriptors(t);for(let[o,l]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,l)}return e}function Xt(r){console.error(`JQx: "${r}" not allowed, not rendered`)}function Kt(r,e,t,n){return r=H(n||r.toLowerCase()),{get(){return(...o)=>e?t.virtual(G(oe[r](...o))):Xt(r)},enumerable:!1,configurable:!0}}function de(r,e,t,n){r=r.toLowerCase();let o=Kt(r,e,t,n);return n?{[n]:o,[_(n)]:o}:{[r]:o,[r.toUpperCase()]:o}}function qt(r){return Yt(Object.entries(k.tagsRaw).reduce(er(r),{}),lr(r))}function er(r){return function(e,[t,n]){return n&&Object.defineProperties(e,de(t,n,r)),e}}function tr(r){return function(e,t,...n){c(t,Function)&&(n.push(t),t=void 0),r({type:e,selector:t,handlers:n})}}function rr(r){return function(e){let{type:t,origin:n,selector:o,handlers:l,name:a,capture:S,once:y,canRemove:b}=e,h=we(t),m=a;if(!c(l,Function,Array))return;l=c(l,Function)?[l]:l,b=c(b,Boolean)?b:!1;let u={eventType:h,selector:o||n,capture:S,name:m,once:y,canRemove:b};switch(!0){case(c(h,Array)&&h.length>0):for(let d of h){u.eventType=d;for(let x of l)g(x)}return;default:for(let d of l)g(d)}function g(d){u.name=m,c(d,Function)&&r({...u,callback:d})}}}function nr(r,e){if(e=F(e)?e:void 0,r=F(r)?r:void 0,e&&r)return[...N[r].values()].find(t=>(t.name||"")===e)}function or(r){return r.activePopup||Object.defineProperty(r,"activePopup",{value:Oe(r),enumerable:!1}),r.activePopup}function ir(r){let e=(y,b)=>fe(y,b),t=y=>X({createWithId:y||`jqx${U()}`}),n=(...y)=>{for(let b of y)fe(b)},o=Gt(r),l=Ie(r),a=rr(l);return{editCssRule:e,createStyle:t,editCssRules:n,allowProhibit:o,handle:l,capturedHandling:a,log:(...y)=>T.on.log(...y).off}}function lr(r){let{factoryExtensions:e,instanceExtensions:t}=De(r);ue=e,te=t;let{editCssRule:n,createStyle:o,editCssRules:l,allowProhibit:a,handle:S,capturedHandling:y,log:b}=ir(r);return{log:b,editCssRules:l,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:j,logger:T,text:(h,m=!1)=>m?r.comment(h):document.createTextNode(h),node:(h,m=document)=>m.querySelector(h,m),nodes:(h,m=document)=>[...m.querySelectorAll(h,m)],get getNamedListener(){return nr},get virtual(){return Zt(r)},get allowTag(){return a.allow},get prohibitTag(){return a.prohibit},get removeCssRule(){return Re},get removeCssRules(){return Re},get delegate(){return tr(y)},get delegateCaptured(){return y},get handle(){return y},get at(){return A},get setStyle(){return n},get fn(){return Wt},get lenient(){return k.allowUnknownHtmlTags},get IS(){return c},get Popup(){return or(r)}}}var sr=ze(ar());function ar(){return function(t,n,o=A.BeforeEnd){if(t?.isJQx)return t;let l=c(n,HTMLBRElement);n=(!l&&n&&n.isJQx?n[0]:n)||document.body,o=o&&Object.values(A).find(g=>o===g)?o:void 0;let a=ke(t),S=!a&&Be(t),y=S||a,b={collection:Qe(t)??[],isVirtual:l,isJQx:!0},h=je(b.collection),m=`input => ${S?`"${$(t.join(", "),70)}"`:!y&&h?`element collection [${$(b.collection.map(g=>`${c(g,Comment,Text)?"Comment|Text @":""} ${g?.outerHTML||g?.textContent}`).join(", "),70)}]`:`"${$(t,70)}"`}`;if(b.collection.length&&h)return T.log(m),l||b.collection.forEach(g=>{n.contains(g)||J([g],n,o)}),W(b);if(y){if([t].flat().forEach(g=>b.collection.push(D(g))),b.collection.length>0){let g=b.collection.filter(d=>d?.dataset?.jqxcreationerror);b.collection=b.collection.filter(d=>!d?.dataset?.jqxcreationerror),T.log(`${m}`),T.log(`*Created ${b.isVirtual?"VIRTUAL ":""}[${$(Je(b.collection)||"sanitized: no elements remaining",70)}]`),g.length&&T.error(`JQx: illegal html, not rendered: "${g.reduce((d,x)=>d.concat(`${x.textContent}
|
|
16
|
+
`),"").trim()}"`),b.isVirtual||J(b.collection,n,o)}return W(b)}let u=We(t,n,b);return T.log(`input => ${u}`),W(b)}}return Ye(cr);})();
|
package/Bundle/jqx.min.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
`,n)})}function et(r,e,...t){let n=tt(e,r);return t?.forEach(o=>qe(n,o,r)),n}function tt(r,e){switch(r=se(e)?ot(r):r?.isJQx?r.first():r,!0){case u(r,String):return G(e,xe(r,e)?{html:r}:{text:r});case u(r,Node):return nt(e,r);default:return G(e,r)}}function rt(r){return delete r.data,Object.keys(r).length<1||Object.keys(r).forEach(e=>{let t=e.toLowerCase();t in be&&(r[be[t]]=r[e],delete r[e])}),r}function nt(r,e){let t=G(r);return t.append(e),t}function G(r,e={}){e=Se(e,{});let t=Object.entries(e.data??{}),n=Object.assign(se(r)?new Comment(e?.text):document.createElement(r),rt(e));return t.length&&t.forEach(([o,l])=>n.dataset[o]=String(l)),n}function Se(r,e){return e?u(r,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):u(r,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function ot(r){return Se(r)?r?.text??r?.textContent??"":String(r)}function it(r){return G("b",{style:"color:red",text:`'${r}' is not a valid HTML-tag`})}function xe(r,e){return!se(e)&&u(r,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(r)}function lt(r){return r?.constructor===Comment||r?.constructor===CharacterData}function se(r){return r?.constructor===Comment||/comment/i.test(r)}function st(r){return!u(G(r),HTMLUnknownElement)}function at(r){return(e,...t)=>et(r,e,...t)}var{IS:u,maybe:ae,$Wrap:ur,xProxy:fr,isNothing:dr}=ct();function ct(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),y();let r=x(),[e,t]=[f(),C()];return t.custom(),{IS:n,maybe:r,$Wrap:e,isNothing:p,xProxy:t};function n(i,...s){if(r({trial:g=>"isTypes"in(s?.[0]??{})})){let g=s[0];return"defaultValue"in g?m(i,g):"notTypes"in g?a(i,g):n(i,...[g.isTypes].flat())}let d=typeof i=="symbol"?Symbol.isSymbol:i;return s.length>1?h(d,...s):l(i,...s)}function o(i){return i?.[Symbol.proxy]??n(i)}function l(i,...s){let{noInput:d,noShouldbe:g,compareTo:E,inputCTOR:F,isNaN:P,isInfinity:I,shouldBeFirstElementIsNothing:R}=b(i,...s);switch(s=s.length&&s[0],!0){case R:return String(i)===String(E);case(i?.[Symbol.proxy]&&g):return i[Symbol.proxy];case P:return g?"NaN":r({trial:k=>String(E)})===String(i);case I:return g?"Infinity":r({trial:k=>String(E)})===String(i);case d:return g?String(i):String(E)===String(i);case F===Boolean:return s?F===s:"Boolean";default:return S(i,s,g,c(i,F))}}function c(i,s){return i===0?Number:i===""?String:i?s:{name:String(i)}}function b(i,...s){let d=s.length<1,g=!d&&s[0],E=!d&&p(s[0]),F=i==null,P=!F&&Object.getPrototypeOf(i)?.constructor,I=r({trial:k=>String(i)})==="NaN",R=r({trial:k=>String(i)})==="Infinity";return{noInput:F,noShouldbe:d,compareTo:g,inputCTOR:P,isNaN:I,isInfinity:R,shouldBeFirstElementIsNothing:E}}function S(i,s,d,g){switch(!0){case(!d&&s===i||i?.[Symbol.proxy]&&s===Proxy):return!0;case r({trial:E=>String(s)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(s,String)):return String(s)===i[Symbol.toStringTag];default:return s?r({trial:E=>i instanceof s})||s===g||s===Object.getPrototypeOf(g)||`${s?.name}`===g?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||g?.name||String(g)}}function h(i,...s){return s.some(d=>n(i,d))}function p(i,s=!1){let d=i==null;return d=s?d||n(i,1/0)||n(i,NaN):d,d}function x(){let i=(s,d)=>s?.constructor===Function?s(d):void 0;return function({trial:s,whenError:d=()=>{}}={}){try{return i(s)}catch(g){return i(d,g)}}}function f(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...s){return n(i,...s)},is(...s){return n(i,...s)}})}}function m(i,{defaultValue:s,isTypes:d=[void 0],notTypes:g}={}){return d=d?.constructor!==Array?[d]:d,g=g&&g?.constructor!==Array?[g]:[],g.length<1?n(i,...d)?i:s:a(i,{isTypes:d,notTypes:g})?i:s}function a(i,{isTypes:s=[void 0],notTypes:d=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,d=d?.constructor!==Array?[d]:d,n(i,...s)&&!n(i,...d)}function y(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...s){return n(i,...s)},enumerable:!1,configurable:!1}}))}function v(i){let s=String(Object.getPrototypeOf(i)?.constructor);return s.slice(s.indexOf("ion")+3,s.indexOf("(")).trim()}function w(i){let s=i.set;return i.set=(d,g,E)=>g===Symbol.proxy?d[g]=E:s(d,g,E),i}function C(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(s,d){for(let E of d)E.set&&(E=w(E));let g=new s(...d);return g[Symbol.proxy]=`Proxy (${v(d[0])})`,g}})}}}}var{IS:q,maybe:gr,$Wrap:pr,xProxy:yr,isNothing:br}=ut();function ut(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),y();let r=x(),[e,t]=[f(),C()];return t.custom(),{IS:n,maybe:r,$Wrap:e,isNothing:p,xProxy:t};function n(i,...s){if(r({trial:g=>"isTypes"in(s?.[0]??{})})){let g=s[0];return"defaultValue"in g?m(i,g):"notTypes"in g?a(i,g):n(i,...[g.isTypes].flat())}let d=typeof i=="symbol"?Symbol.isSymbol:i;return s.length>1?h(d,...s):l(i,...s)}function o(i){return i?.[Symbol.proxy]??n(i)}function l(i,...s){let{noInput:d,noShouldbe:g,compareTo:E,inputCTOR:F,isNaN:P,isInfinity:I,shouldBeFirstElementIsNothing:R}=b(i,...s);switch(s=s.length&&s[0],!0){case R:return String(i)===String(E);case(i?.[Symbol.proxy]&&g):return i[Symbol.proxy];case P:return g?"NaN":r({trial:k=>String(E)})===String(i);case I:return g?"Infinity":r({trial:k=>String(E)})===String(i);case d:return g?String(i):String(E)===String(i);case F===Boolean:return s?F===s:"Boolean";default:return S(i,s,g,c(i,F))}}function c(i,s){return i===0?Number:i===""?String:i?s:{name:String(i)}}function b(i,...s){let d=s.length<1,g=!d&&s[0],E=!d&&p(s[0]),F=i==null,P=!F&&Object.getPrototypeOf(i)?.constructor,I=r({trial:k=>String(i)})==="NaN",R=r({trial:k=>String(i)})==="Infinity";return{noInput:F,noShouldbe:d,compareTo:g,inputCTOR:P,isNaN:I,isInfinity:R,shouldBeFirstElementIsNothing:E}}function S(i,s,d,g){switch(!0){case(!d&&s===i||i?.[Symbol.proxy]&&s===Proxy):return!0;case r({trial:E=>String(s)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(s,String)):return String(s)===i[Symbol.toStringTag];default:return s?r({trial:E=>i instanceof s})||s===g||s===Object.getPrototypeOf(g)||`${s?.name}`===g?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||g?.name||String(g)}}function h(i,...s){return s.some(d=>n(i,d))}function p(i,s=!1){let d=i==null;return d=s?d||n(i,1/0)||n(i,NaN):d,d}function x(){let i=(s,d)=>s?.constructor===Function?s(d):void 0;return function({trial:s,whenError:d=()=>{}}={}){try{return i(s)}catch(g){return i(d,g)}}}function f(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...s){return n(i,...s)},is(...s){return n(i,...s)}})}}function m(i,{defaultValue:s,isTypes:d=[void 0],notTypes:g}={}){return d=d?.constructor!==Array?[d]:d,g=g&&g?.constructor!==Array?[g]:[],g.length<1?n(i,...d)?i:s:a(i,{isTypes:d,notTypes:g})?i:s}function a(i,{isTypes:s=[void 0],notTypes:d=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,d=d?.constructor!==Array?[d]:d,n(i,...s)&&!n(i,...d)}function y(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...s){return n(i,...s)},enumerable:!1,configurable:!1}}))}function v(i){let s=String(Object.getPrototypeOf(i)?.constructor);return s.slice(s.indexOf("ion")+3,s.indexOf("(")).trim()}function w(i){let s=i.set;return i.set=(d,g,E)=>g===Symbol.proxy?d[g]=E:s(d,g,E),i}function C(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(s,d){for(let E of d)E.set&&(E=w(E));let g=new s(...d);return g[Symbol.proxy]=`Proxy (${v(d[0])})`,g}})}}}}var Z=ft;function ft({styleSheet:r,createWithId:e}={}){let{tryParseAtOrNestedRules:t,ruleExists:n,checkParams:o,sheet:l,removeRules:c,consider:b,currentSheetID:S}=dt({styleSheet:r,createWithId:e});function h(a,y){if(a&&y.removeProperties){Object.keys(y.removeProperties).forEach(v=>a.style.removeProperty(ve(v)));return}Object.entries(y).forEach(([v,w])=>{v=ve(v.trim()),w=w.trim();let C;if(/!important/.test(w)&&(w=w.slice(0,w.indexOf("!important")).trim(),C="important"),!CSS.supports(v,w))return console.error(`StylingFactory ${S} error: '${v}' with value '${w}' not supported (yet)`);we(()=>a.style.setProperty(v,w,C),`StylingFactory ${S} (setRule4Selector) failed`)})}function p(a,y,v=l){if(a=a?.trim?.(),!q(a,String)||!a.length||/[;,]$/g.test(a))return console.error(`StylingFactory ${S} (setRules): [${a||"[no selector given]"}] is not a valid selector`);if(y.removeRule)return c(a);let w=n(a,!0),C=w||v.cssRules[v.insertRule(`${a} {}`,v.cssRules.length||0)];return b(()=>h(C,y),a,w)}function x(a){let y=a.trim().split(/{/,2),v=y.shift().trim();if(!q(v,String)||!v?.trim()?.length)return console.error(`StylingFactory ${S} (doParse): no (valid) selector could be extracted from rule ${ce(a)}`);let w=St(y.shift());return we(()=>p(v,w),`StylingFactory ${S} (setRules) failed`)}function f(a){let y=t(a);return y.done?y.existing:x(a)}function m(a,y){return a.trim().startsWith("@media")?f(mt(a,y)):p(a,y)}return function(a,y={}){return o(a,y)&&(Object.keys(y).length?m(a,y):f(a))}}function dt({styleSheet:r,createWithId:e}){let t="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;r=e?o(e):r;function o(f){let m=document.querySelector(`#${f}`)?.sheet;if(m)return m;let a=Object.assign(document.createElement("style"),{id:f});return document.head.insertAdjacentElement("beforeend",a),a.sheet}function l(f){return console.error(`StylingFactory ${n} [rule: ${f}]
|
|
3
|
-
=> @charset, @namespace and @import are not supported here`),{done:!0}}function
|
|
4
|
-
${
|
|
5
|
-
Rule: ${
|
|
6
|
-
${t}`),
|
|
7
|
-
${
|
|
8
|
-
Rule: ${
|
|
9
|
-
${t}`),
|
|
10
|
-
`)}function
|
|
11
|
-
`).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),t)}function
|
|
1
|
+
var de=_e(),B=ze(),z=Ve();function ze(){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(","))}}function Ve(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function _e(){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;}}"]}var re=!1,Ue={on:()=>re=!0,off:()=>re=!1},k={tagsRaw:z,allowUnknownHtmlTags:Ue,isAllowed(r){if(re)return!0;let e=c(r,String)?r.toLowerCase():r?.nodeName.toLowerCase()||"none";return e==="#text"||!!z[e]},allowTag:r=>z[r.toLowerCase()]=!0,prohibitTag:r=>z[r.toLowerCase()]=!1};var Ge=Ze(),me={html:"innerHTML",text:"textContent",class:"className"},ne=Ge;function Ze(){let r={get(e,t){let n=String(t)?.toLowerCase();switch(!0){case n in e:return e[n];case ot(n):return ge(e,n,t);default:return ge(e,n,t,!0)}},enumerable:!1,configurable:!1};return new Proxy({},r)}function ge(r,e,t,n=!1){return Object.defineProperty(r,e,{get(){return n?o=>rt(t):it(e)}}),r[e]}function Ye(r,e,t){return e=e?.isJQx&&e.first()||e,ie({trial:n=>nt(e)?r.append(e):ye(e)?r.insertAdjacentHTML("beforeend",e):r.append(e),whenError:n=>console.info(`${t} (for root ${r}) not created, reason
|
|
2
|
+
`,n)})}function Xe(r,e,...t){let n=Ke(e,r);return t?.forEach(o=>Ye(n,o,r)),n}function Ke(r,e){switch(r=oe(e)?tt(r):r?.isJQx?r.first():r,!0){case c(r,String):return V(e,ye(r,e)?{html:r}:{text:r});case c(r,Node):return et(e,r);default:return V(e,r)}}function qe(r){return delete r.data,Object.keys(r).length<1||Object.keys(r).forEach(e=>{let t=e.toLowerCase();t in me&&(r[me[t]]=r[e],delete r[e])}),r}function et(r,e){let t=V(r);return t.append(e),t}function V(r,e={}){e=pe(e,{});let t=Object.entries(e.data??{}),n=Object.assign(oe(r)?new Comment(e?.text):document.createElement(r),qe(e));return t.length&&t.forEach(([o,l])=>n.dataset[o]=String(l)),n}function pe(r,e){return e?c(r,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):c(r,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function tt(r){return pe(r)?r?.text??r?.textContent??"":String(r)}function rt(r){return V("b",{style:"color:red",text:`'${r}' is not a valid HTML-tag`})}function ye(r,e){return!oe(e)&&c(r,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(r)}function nt(r){return r?.constructor===Comment||r?.constructor===CharacterData}function oe(r){return r?.constructor===Comment||/comment/i.test(r)}function ot(r){return!c(V(r),HTMLUnknownElement)}function it(r){return(e,...t)=>Xe(r,e,...t)}var{IS:c,maybe:ie,$Wrap:sr,xProxy:ar,isNothing:cr}=lt();function lt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),x();let r=m(),[e,t]=[u(),M()];return t.custom(),{IS:n,maybe:r,$Wrap:e,isNothing:h,xProxy:t};function n(i,...s){if(r({trial:p=>"isTypes"in(s?.[0]??{})})){let p=s[0];return"defaultValue"in p?g(i,p):"notTypes"in p?d(i,p):n(i,...[p.isTypes].flat())}let f=typeof i=="symbol"?Symbol.isSymbol:i;return s.length>1?b(f,...s):l(i,...s)}function o(i){return i?.[Symbol.proxy]??n(i)}function l(i,...s){let{noInput:f,noShouldbe:p,compareTo:v,inputCTOR:L,isNaN:O,isInfinity:P,shouldBeFirstElementIsNothing:I}=S(i,...s);switch(s=s.length&&s[0],!0){case I:return String(i)===String(v);case(i?.[Symbol.proxy]&&p):return i[Symbol.proxy];case O:return p?"NaN":r({trial:R=>String(v)})===String(i);case P:return p?"Infinity":r({trial:R=>String(v)})===String(i);case f:return p?String(i):String(v)===String(i);case L===Boolean:return s?L===s:"Boolean";default:return y(i,s,p,a(i,L))}}function a(i,s){return i===0?Number:i===""?String:i?s:{name:String(i)}}function S(i,...s){let f=s.length<1,p=!f&&s[0],v=!f&&h(s[0]),L=i==null,O=!L&&Object.getPrototypeOf(i)?.constructor,P=r({trial:R=>String(i)})==="NaN",I=r({trial:R=>String(i)})==="Infinity";return{noInput:L,noShouldbe:f,compareTo:p,inputCTOR:O,isNaN:P,isInfinity:I,shouldBeFirstElementIsNothing:v}}function y(i,s,f,p){switch(!0){case(!f&&s===i||i?.[Symbol.proxy]&&s===Proxy):return!0;case r({trial:v=>String(s)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(s,String)):return String(s)===i[Symbol.toStringTag];default:return s?r({trial:v=>i instanceof s})||s===p||s===Object.getPrototypeOf(p)||`${s?.name}`===p?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||p?.name||String(p)}}function b(i,...s){return s.some(f=>n(i,f))}function h(i,s=!1){let f=i==null;return f=s?f||n(i,1/0)||n(i,NaN):f,f}function m(){let i=(s,f)=>s?.constructor===Function?s(f):void 0;return function({trial:s,whenError:f=()=>{}}={}){try{return i(s)}catch(p){return i(f,p)}}}function u(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...s){return n(i,...s)},is(...s){return n(i,...s)}})}}function g(i,{defaultValue:s,isTypes:f=[void 0],notTypes:p}={}){return f=f?.constructor!==Array?[f]:f,p=p&&p?.constructor!==Array?[p]:[],p.length<1?n(i,...f)?i:s:d(i,{isTypes:f,notTypes:p})?i:s}function d(i,{isTypes:s=[void 0],notTypes:f=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,f=f?.constructor!==Array?[f]:f,n(i,...s)&&!n(i,...f)}function x(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...s){return n(i,...s)},enumerable:!1,configurable:!1}}))}function w(i){let s=String(Object.getPrototypeOf(i)?.constructor);return s.slice(s.indexOf("ion")+3,s.indexOf("(")).trim()}function C(i){let s=i.set;return i.set=(f,p,v)=>p===Symbol.proxy?f[p]=v:s(f,p,v),i}function M(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(s,f){for(let v of f)v.set&&(v=C(v));let p=new s(...f);return p[Symbol.proxy]=`Proxy (${w(f[0])})`,p}})}}}}var{IS:Y,maybe:fr,$Wrap:dr,xProxy:mr,isNothing:gr}=st();function st(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),x();let r=m(),[e,t]=[u(),M()];return t.custom(),{IS:n,maybe:r,$Wrap:e,isNothing:h,xProxy:t};function n(i,...s){if(r({trial:p=>"isTypes"in(s?.[0]??{})})){let p=s[0];return"defaultValue"in p?g(i,p):"notTypes"in p?d(i,p):n(i,...[p.isTypes].flat())}let f=typeof i=="symbol"?Symbol.isSymbol:i;return s.length>1?b(f,...s):l(i,...s)}function o(i){return i?.[Symbol.proxy]??n(i)}function l(i,...s){let{noInput:f,noShouldbe:p,compareTo:v,inputCTOR:L,isNaN:O,isInfinity:P,shouldBeFirstElementIsNothing:I}=S(i,...s);switch(s=s.length&&s[0],!0){case I:return String(i)===String(v);case(i?.[Symbol.proxy]&&p):return i[Symbol.proxy];case O:return p?"NaN":r({trial:R=>String(v)})===String(i);case P:return p?"Infinity":r({trial:R=>String(v)})===String(i);case f:return p?String(i):String(v)===String(i);case L===Boolean:return s?L===s:"Boolean";default:return y(i,s,p,a(i,L))}}function a(i,s){return i===0?Number:i===""?String:i?s:{name:String(i)}}function S(i,...s){let f=s.length<1,p=!f&&s[0],v=!f&&h(s[0]),L=i==null,O=!L&&Object.getPrototypeOf(i)?.constructor,P=r({trial:R=>String(i)})==="NaN",I=r({trial:R=>String(i)})==="Infinity";return{noInput:L,noShouldbe:f,compareTo:p,inputCTOR:O,isNaN:P,isInfinity:I,shouldBeFirstElementIsNothing:v}}function y(i,s,f,p){switch(!0){case(!f&&s===i||i?.[Symbol.proxy]&&s===Proxy):return!0;case r({trial:v=>String(s)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(s,String)):return String(s)===i[Symbol.toStringTag];default:return s?r({trial:v=>i instanceof s})||s===p||s===Object.getPrototypeOf(p)||`${s?.name}`===p?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||p?.name||String(p)}}function b(i,...s){return s.some(f=>n(i,f))}function h(i,s=!1){let f=i==null;return f=s?f||n(i,1/0)||n(i,NaN):f,f}function m(){let i=(s,f)=>s?.constructor===Function?s(f):void 0;return function({trial:s,whenError:f=()=>{}}={}){try{return i(s)}catch(p){return i(f,p)}}}function u(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...s){return n(i,...s)},is(...s){return n(i,...s)}})}}function g(i,{defaultValue:s,isTypes:f=[void 0],notTypes:p}={}){return f=f?.constructor!==Array?[f]:f,p=p&&p?.constructor!==Array?[p]:[],p.length<1?n(i,...f)?i:s:d(i,{isTypes:f,notTypes:p})?i:s}function d(i,{isTypes:s=[void 0],notTypes:f=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,f=f?.constructor!==Array?[f]:f,n(i,...s)&&!n(i,...f)}function x(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...s){return n(i,...s)},enumerable:!1,configurable:!1}}))}function w(i){let s=String(Object.getPrototypeOf(i)?.constructor);return s.slice(s.indexOf("ion")+3,s.indexOf("(")).trim()}function C(i){let s=i.set;return i.set=(f,p,v)=>p===Symbol.proxy?f[p]=v:s(f,p,v),i}function M(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(s,f){for(let v of f)v.set&&(v=C(v));let p=new s(...f);return p[Symbol.proxy]=`Proxy (${w(f[0])})`,p}})}}}}var X=at;function at({styleSheet:r,createWithId:e}={}){let{tryParseAtOrNestedRules:t,ruleExists:n,checkParams:o,sheet:l,removeRules:a,consider:S,currentSheetID:y}=ct({styleSheet:r,createWithId:e});function b(d,x){if(d&&x.removeProperties){Object.keys(x.removeProperties).forEach(w=>d.style.removeProperty(be(w)));return}Object.entries(x).forEach(([w,C])=>{w=be(w.trim()),C=C.trim();let M;if(/!important/.test(C)&&(C=C.slice(0,C.indexOf("!important")).trim(),M="important"),!CSS.supports(w,C))return console.error(`StylingFactory ${y} error: '${w}' with value '${C}' not supported (yet)`);he(()=>d.style.setProperty(w,C,M),`StylingFactory ${y} (setRule4Selector) failed`)})}function h(d,x,w=l){if(d=d?.trim?.(),!Y(d,String)||!d.length||/[;,]$/g.test(d))return console.error(`StylingFactory ${y} (setRules): [${d||"[no selector given]"}] is not a valid selector`);if(x.removeRule)return a(d);let C=n(d,!0),M=C||w.cssRules[w.insertRule(`${d} {}`,w.cssRules.length||0)];return S(()=>b(M,x),d,C)}function m(d){let x=d.trim().split(/{/,2),w=x.shift().trim();if(!Y(w,String)||!w?.trim()?.length)return console.error(`StylingFactory ${y} (doParse): no (valid) selector could be extracted from rule ${le(d)}`);let C=yt(x.shift());return he(()=>h(w,C),`StylingFactory ${y} (setRules) failed`)}function u(d){let x=t(d);return x.done?x.existing:m(d)}function g(d,x){return d.trim().startsWith("@media")?u(ut(d,x)):h(d,x)}return function(d,x={}){return o(d,x)&&(Object.keys(x).length?g(d,x):u(d))}}function ct({styleSheet:r,createWithId:e}){let t="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;r=e?o(e):r;function o(u){let g=document.querySelector(`#${u}`)?.sheet;if(g)return g;let d=Object.assign(document.createElement("style"),{id:u});return document.head.insertAdjacentElement("beforeend",d),d.sheet}function l(u){return console.error(`StylingFactory ${n} [rule: ${u}]
|
|
3
|
+
=> @charset, @namespace and @import are not supported here`),{done:!0}}function a(u,g){return[...r.rules].find(d=>g?Se(d.selectorText||"",u):mt`${dt(u)}${[..."gim"]}`.test(d.cssText))}function S(u){return/^@charset|@import|namespace/i.test(u.trim())?l(u):u.match(/}/g)?.length>1?{existing:h(u,1),done:!0}:{done:!1}}function y(u){let g=[...r.cssRules].reduce((x,w,C)=>Se(w.selectorText||"",u)&&x.concat(C)||x,[]),d=g.length;return g.forEach(x=>r.deleteRule(x)),d>0?console.info(`\u2714 Removed ${d} instance${d>1?"s":""} of selector ${u} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${u} does not exist in ${n.slice(4)}`)}function b(u,g){return u&&Y(u,String)&&u.trim().length>0&&Y(g,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function h(u){u=u.trim();let g=u.slice(0,u.indexOf("{")).trim(),d=!!a(g);try{return r.insertRule(`${u}`,r.cssRules.length),d}catch(x){return console.error(`StylingFactory ${n} (tryParse) ${x.name} Error:
|
|
4
|
+
${x.message}
|
|
5
|
+
Rule: ${le(u)}
|
|
6
|
+
${t}`),d}}function m(u,g,d){try{return u(),d}catch(x){return console.error(`StylingFactory ${n} (tryAddOrModify) ${x.name} Error:
|
|
7
|
+
${x.message}
|
|
8
|
+
Rule: ${le(g)}
|
|
9
|
+
${t}`),d}}return{sheet:r,removeRules:y,tryParseAtOrNestedRules:S,ruleExists:a,checkParams:b,tryParse:h,consider:m,currentSheetID:n}}function ut(r,e){return`${r.trim()} ${Object.entries(e).map(([t,n])=>`${t}: { ${ft(n)}`)}`}function le(r){let e=(r||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return r.length>e.length?`${e.trim()}...truncated`:e}function ft(r){return Object.entries(r).map(([e,t])=>`${e}: ${t.trim()}`).join(`;
|
|
10
|
+
`)}function dt(r){return r.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function mt(r,...e){let t=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&r.raw.reduce((n,o,l)=>n.concat(e[l-1]||"").concat(o),"")||r.raw.join("")).split(`
|
|
11
|
+
`).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),t)}function be(r){return r.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function he(r,e){try{return r()}catch(t){console.error(`${e||"an error occured"}: ${t.message}`)}}function gt(r){return r.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(e,t)=>`${t}\\3b`).split(";").map(e=>e.trim()).join(`;
|
|
12
12
|
`).replaceAll("\\3b",";").split(`
|
|
13
|
-
`)}function
|
|
14
|
-
|
|
15
|
-
<div class="legend">
|
|
16
|
-
|
|
17
|
-
</div>
|
|
18
|
-
<${C} id="jqx_logger"></${C}>`,s=A(i);return ue(s,void 0,T.AfterBegin),w.node(S)}let f=(...w)=>{let C=w[0]==="fromStatic";if(!r.node("#JQxLogCSS")){c=r.editStylesheet("JQxLogCSS");for(let s of oe)c(s)}if(w=C?w.slice(1):w,C&&!t)return w.forEach(s=>console.info(`${B()} \u2714 ${p(s)}`));if(!t)return;!n&&!r.node("#logBox")&&x(r);let i=s=>`${r.IS(s,Object)?JSON.stringify(s,null,2):s}
|
|
19
|
-
`;w.forEach(s=>n?console.info(`${B()} \u2714 ${p(s)}`):r.node("#jqx_logger").insertAdjacentHTML(o?"afterbegin":"beforeend",`<div class="entry">${B()} ${i(s.replace(/\n/g,"<br>"))}</div>`))},m={on(){t=!0,f("Logging activated (CSS in style#JQxLogCSS)")},off(){t=!1,console.log(`${B()} \u2714 Logging deactivated`)}},a={on(){e=!0},off(){e=!1}},y=(...w)=>e&&f(...w),v={get isConsole(){return n===!0},get isOn(){return t},isVisible:function(){return r("#jqx_logger").is("visible")},on(){return m.on(),a.on(),n||b()?.addClass("visible"),f("Debug logging started. Every call to [jqx instance] is logged"),v},off(){return b().isEmpty||(a.off(),f("Debug logging stopped"),b()?.removeClass("visible")),m.off(),v},toConsole:{on(){return n=!0,f("Started logging to console"),v},off(){return f("Stopped logging to console (except error messages)"),n=!1,v}},remove(){return m.off(),a.off(),b()?.remove(),console.clear(),console.log(`${B()} logging completely disabled and all entries removed`),v},log:function(...w){return f(...w),v},hide(){return b()?.removeClass("visible"),v},show:()=>(b()?.addClass("visible"),v),get reversed(){return{on:()=>(o=!0,f("Reverse logging set: now logging bottom to top (latest first)"),r("#logBox .legend").addClass("reversed"),v),off:()=>(o=!1,r("#logBox .legend").removeClass("reversed"),f("Reverse logging reset: now logging chronological (latest last)"),v)}},clear(){return r(S).text(""),console.clear(),f("Logging cleared"),v}};return{Log:f,debugLog:v,systemLog:y}}var $e=At;var L=(r,e)=>{let t=r.collection.filter(n=>!Me(n));for(let n=0;n<t.length;n+=1)e(t[n],n);return r},Dt=Ce(),Ht={get(r,e){return r[Y(e)]||r[e]},enumerable:!1,configurable:!1};function Fe(r){return r&&(r.textContent="")}function _(r){let e=r.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),r.isConnected?r.remove():r=null,e}function De(r,e){if(r&&u(e,Object))for(let[t,n]of Object.entries(e))r.setAttribute(`data-${H(t)}`,n)}function Te(r,e){return r.andThen(e,!0)}function Ae(r,e){return r.andThen(e)}function He(r){return r.startsWith("data")||j.html.find(e=>r.toLowerCase()===e)}function Nt(r,e,t,n){t&&u(e,String)&&(e={[e]:t==="-"?"":t});let o;e.className&&(o=e.className,delete e.className),o=[...r.classList].find(c=>c.startsWith("JQxClass-")||o&&c===o)||o||`JQxClass-${J().slice(1)}`,n.editCssRule(`.${o}`,e),r.classList.add(o)}function Mt(r,e){if(r)for(let[t,n]of Object.entries(e)){if(t=H(t),t.startsWith("data"))return De(r,n);u(n,String)&&He(t)&&r.setAttribute(t,n.split(/[, ]/)?.join(" "))}}function fe(r,e){if(u(e,Object))for(let[t,n]of Object.entries(e)){let o;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),o="important"),r.style.setProperty(H(t),n,o)}}function Ot(...r){W.log("\u2757"+r.map(e=>String(e)).join(", "))}function de(r,e=0,t=!0){return r=r?.parentElement,e+=r?r[t?"scrollTop":"scrollLeft"]:0,r?de(r,e,t):e}function Pt(r){return{data:e=>({get all(){return new Proxy(e[0]?.dataset??{},Ht)},set:(t={})=>{if(!e.is.empty&&u(t,Object))for(let[n,o]of Object.entries(t))e.setData({[n]:o});return e},get:(t,n)=>e.data.all[t]??n,add:(t={})=>{if(!e.is.empty&&u(t,Object))for(let[n,o]of Object.entries(t))e.setData({[n]:o});return e},remove:t=>(e[0]?.removeAttribute(`data-${H(t)}`),e)}),dimensions:e=>{if(e.is.empty)return{error:"[instance].dimensions: NO ELEMENTS"};let t=e[0],n=e.first()?.getBoundingClientRect().toJSON();return n.scrollTopDistance=de(t,0),n.scrollLeftDistance=de(t,0,!1),n},node:e=>e[0],HTML:e=>({get:(t,n)=>{if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let o=t?e.outerHtml:e.html();return n?Q(o):o},set:(t,n=!1,o=!1)=>{t=t.isJQx?t.HTML.get(1):t;let l=u(t,String);return t=l&&o?Q(t):t,l&&(t||"").trim().length&&e.html(t,n),e},replace:(t,n=!1)=>e.HTML.set(t,!1,n),append:(t,n=!1)=>(t=u(t,HTMLElement)?r(t).HTML.get(1):t.isJQx?t.HTML.get(1):t,e.HTML.set(t,!0,n)),insert:(t,n=!1)=>(t=u(t,HTMLElement)?r(t).HTML.get(1):t.isJQx?t.HTML.get(1):t,e.HTML.set(t+e.HTML.get(),!1,n))}),is:e=>Dt(e),length:e=>e.collection.length,outerHtml:e=>(e.first()||{outerHTML:void 0}).outerHTML,parent:e=>{let t=r(e[0]?.parentNode);return t.is.empty?e:t},render:e=>(!e.is.empty&&e.toDOM()||r.log("[JQx.render]: empty collection"),e),Style:e=>({get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline:t=>e.style(t),inSheet:t=>e.css(t),valueOf:t=>e.is.empty?void 0:getComputedStyle(e[0])[H(t)],nwRule:t=>e.Style.byRule({rules:t}),byRule:({classes2Apply:t=[],rules:n=[]}={})=>{let l=u(n,String)&&!t.length?n.split("{")[0].trim():"";if(n=n&&u(n,String)?[n]:n,t=t&&u(t,String)?[t]:t,(n?.length||t?.length)&&(n?.length&&r.editCssRules(...n),t))for(let c of t)e.addClass(c);return l?.startsWith(".")&&e.addClass(l.slice(1)),l?.startsWith("#")&&!e.attr("id")&&e.prop({id:l.slice(1)}),e}})}}function It(r){return{addClass:(e,...t)=>L(e,n=>n&&t.forEach(o=>n.classList.add(o))),after:Ae,afterMe:Ae,andThen:(e,t,n=!1)=>{if(!t||!u(t,String,Node,Proxy))return Ot(`[JQx instance].[beforeMe | afterMe | andThen]: insufficient input [${t}]`),e;t=t?.isJQx?t.collection:u(t,Node)?r.virtual(t).collection:r.virtual(A(t)).collection;let[o,l,c]=n?[0,"before",t.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(t)];return e[o][l](...t),e.collection=c,e},append:(e,...t)=>{if(!e.is.empty&&t.length){let n=e.length===1;for(let o of t){if(!o.isJQx&&$(o)){let l=o.trim(),b=!/^<(.+)[^>]+>$/m.test(l)?r.text(o):A(o);L(e,S=>S.append(n?b:_(b)))}K(o)&&L(e,l=>l.append(n?o:_(o))),o.isJQx&&!o.is.empty&&L(e,l=>o.collection.forEach(c=>l.append(n?c:_(c))))}}return e},appendTo:(e,t)=>(t.isJQx||(t=r(t)),t.append(e),e),attr:(e,t,n)=>{let o=e[0];if(!o)return e;if(!n&&$(t))return t=H(t),t==="class"?[...o?.classList].join(" "):o?.getAttribute(t);if($(t)&&n)switch(t=H(t),!0){case t.startsWith("data-"):t={data:{[t.replace("data-","")]:n}};break;default:t={[t]:n}}return u(t,Object)&&!e.is.empty&&Mt(o,t),e},before:Te,beforeMe:Te,clear:e=>L(e,Fe),closest:(e,t)=>{let n=$(t)?e[0].closest(t):null;return n?r(n):e},computedStyle:(e,t)=>e.first()&&getComputedStyle(e.first())[t],css:(e,t,n)=>L(e,o=>Nt(o,t,n,r)),duplicate:(e,t=!1,n=document.body)=>{let o=e.toNodeList().map(c=>c.removeAttribute&&c.removeAttribute("id")||c),l=r.virtual(o);return t?l.toDOM(n):l},each:(e,t)=>L(e,t),empty:e=>L(e,Fe),find:(e,t)=>e.collection.length>0?[...e.first()?.querySelectorAll(t)]:[],find$:(e,t)=>e.collection.length>0?r(t,e):e,first:(e,t=!1)=>{if(e.collection.length>0)return t?e.single():e.collection[0]},first$:(e,t)=>e.single(t),getData:(e,t,n)=>e.first()&&e.first().dataset?.[t]||n,hasClass:(e,...t)=>{let n=e[0];return!n||!n.classList.length?!1:t.find(o=>n.classList.contains(o))&&!0||!1},hide:e=>L(e,t=>fe(t,{display:"none !important"})),html:(e,t,n)=>{if(t===void 0){let o=e.node;return o?.getHTML&&o.getHTML()||""}if(!e.isEmpty()){let o=A(`<div>${t.isJQx?t.HTML.get(!0):t}</div>`);if(!u(o,Comment))return L(e,c=>(n||(c.textContent=""),c.insertAdjacentHTML(r.at.end,o.getHTML())))}return e},htmlFor:(e,t,n="",o=!1)=>{if(t&&e.collection.length){if(!t||!$(n))return e;let l=e.find$(t);if(l.length<1)return e;let c=A(`<span>${n}</span>`);l.each(b=>{o||(b.textContent=""),b.insertAdjacentHTML(r.at.end,c?.getHTML())})}return e},isEmpty:e=>e.collection.length<1,nth$:(e,t)=>e.single(t),on:(e,t,...n)=>{if(e.collection.length&&u(t,String,Array)){if(t?.length<1||n.length<1)return e;let o=Oe(e);r.handle({type:t,selector:o,handlers:n})}return e},prepend:(e,...t)=>{if(!e.is.empty&&t){let n=e.length===1;for(let o of t){if($(o)){o=o.trim();let c=!/^<(.+)[^>]+>$/m.test(o)?r.text(o):A(o);c=n?c:_(c),L(e,b=>b.prepend(c.cloneNode(!0)))}K(o)&&L(e,l=>l.prepend(n?o:_(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),L(e,l=>L(o,c=>l.prepend(n?c:_(c)))),o.collection.reverse())}}return e},prependTo:(e,t)=>(t.isJQx||(t=r.virtual(t)),t.prepend(e),e),prop:(e,t,n)=>{if(u(t,String)&&!n)return t.startsWith("data")?e[0]?.dataset[t.slice(t.indexOf("-")+1)]:e[0]?.[t];let o=u(t,Object)?t:{[t]:n};for(let[l,c]of Object.entries(o)){if(l=l.trim(),c&&!He(l)||!c)return!1;if(l.toLowerCase()==="id")return e[0].id=c;L(e,S=>{if(l.startsWith("data"))return S.dataset[l.slice(l.indexOf("-")+1)]=c;S[l]=c})}return e},remove:(e,t)=>{O(`remove ${D(e.HTML.get(1),40)}${t?` /w selector ${t}`:""}`);let n=l=>l.remove(),o=()=>e.collection=e.collection.filter(l=>document.documentElement.contains(l));if(t){let l=e.find$(t);return l.is.empty||(L(l,n),o()),e}return L(e,n),o(),e},rmAttr:(e,...t)=>{for(let n of t)e.node.removeAttribute(n);return e},removeClass:(e,...t)=>L(e,n=>{if(n)for(let o of t)n.classList.remove(o)}),renderTo:(e,t=document.body,n=r.at.end)=>(e.toDOM(t,n),e),replace:(e,t,n)=>{let o=e[0];return!t||!n||!u(n,HTMLElement)&&!n.isJQx?(console.error("JQx replace: invalid replacement value"),e):(n.isJQx&&(n=n[0]),u(n,NodeList)&&(n=n[0]),o&&t&&(t=u(t,String)?o.querySelectorAll(t):t.isJQx?t.collection:t,u(t,HTMLElement,NodeList,Array)&&u(n,HTMLElement)&&(u(t,HTMLElement)?[t]:[...t]).forEach(l=>l.replaceWith(n.cloneNode(!0)))),e)},replaceClass:(e,t,...n)=>L(e,o=>{o.classList.remove(t);for(let l of n)o.classList.add(l)}),replaceMe:(e,t)=>e.replaceWith(t),replaceWith:(e,t)=>(t=u(t,Element)?t:t.isJQx?t[0]:void 0,t&&(e[0].replaceWith(t),e=r.virtual(t)),e),setData:(e,t)=>L(e,n=>De(n,t)),show:e=>L(e,t=>fe(t,{display:"revert-layer !important"})),single:(e,t)=>e.collection.length>0?u(t,String)?e.find$(t):u(t,Number)?r(e.collection[t]):r(e.collection[0]):e,style:(e,t,n)=>L(e,l=>{n&&u(t,String)&&(t={[t]:n||"none"}),fe(l,t)}),text:(e,t,n=!1)=>e.isEmpty()?e:u(t,String)?L(e,l=>l.textContent=n?l.textContent+t:t):e.first().textContent,toDOM:(e,t=document.body,n=T.BeforeEnd)=>(e.isVirtual&&(e.isVirtual=!1),e.collection=z(e.collection,t,n),e),toggleClass:(e,t)=>L(e,n=>n.classList.toggle(t)),toNodeList:e=>[...e.collection].map(t=>document.importNode(t,!0)),trigger:(e,t,n=Event,o={})=>{if(e.collection.length){let l=new n(t,{...o,bubbles:o.bubbles??!0});for(let c of e.collection)c.dispatchEvent(l)}return e},val:(e,t)=>{let n=e[0];return!n||!u(n,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)?e:t===void 0?n.value:(n.value=u(t,String)?t:"",e)}}}function Ne(r){return{factoryExtensions:Pt(r),instanceExtensions:It(r)}}function Pe(r){if(!r("#jqxPopup").isEmpty())return;r.dialog({id:"jqxPopup"},r.div({id:"jqxPopupContent"})).render,r.editCssRules(...ye);let[e,t]=[r("#jqxPopupContent"),r.node("#jqxPopup")],n={};return r.handle({type:"click, keydown",handlers:h,capture:!0}),Object.freeze({show:o,removeModal:S});function o(f){if(t.open)return;n={...f};let{content:m}=n;return r.IS(m,String,HTMLElement)||m?.isJQx?c():!0}function l(){return n.modal?x(n.warnMessage):b()}function c(){e.clear();let{content:f,modal:m,closeAfter:a}=n;m=r.IS(m,Boolean)?m:!1;let y=m?"":r.div({id:"closeHandleIcon"});e.append(y,r.IS(f,String)?r.div(f):f),t.showModal(),!m&&r.IS(a,Number)&&p(l,a)}function b(){if(t.close(n.returnValue),r.IS(n.callback,Function))return n.callback(n.returnValue);n={}}function S({callback:f,value:m}={}){n.returnValue=m,n.modal=!1,n.callback=f||n.callback,l()}function h(f){if(!(Object.keys(n).length<1||!t.open))return f.key==="Escape"&&f.preventDefault(),n.activeTimer&&clearTimeout(n.activeTimer),(f.target.closest("#closeHandleIcon")||!f.target.closest("#jqxPopupContent"))&&l(),document.activeElement.blur()}function p(f,m){r.IS(f,Function)&&r.IS(m,Number)&&m>0&&(n.activeTimer=setTimeout(f,m*1e3))}function x(f){if(!r.IS(f,String,HTMLElement,Proxy))return;let m=e.find$(".warn");switch(!0){case m.is.empty:m=r.div({class:"warn"},f);default:e.append(m.addClass("active")),p(()=>e.find$(".warn").removeClass("active"),2)}}}var N={},Rt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],Ie=r=>!!Rt.find(e=>e===r);function Re(r){return function(o){let{eventType:l,selector:c,callback:b,name:S,capture:h,once:p,canRemove:x}=o;switch(!0){case(!$(l)||!r.IS(b,Function)):default:S=S||!/handlers$/.test(b.name)&&b.name||void 0,h=r.IS(h,Boolean)?h:!1,p=r.IS(p,Boolean)?p:!1,x=$(S,4)&&r.IS(x,Boolean)?x:!1;let{handler:f,signal:m,remove:a}=e({selector:c,callback:b,canRemove:x,name:S,eventType:l});return n({eventType:l,handler:f,capture:h,once:p,signal:m,remove:a,name:S})}};function e(o){let{selector:l,callback:c,canRemove:b,name:S,eventType:h}=o,p=b&&new AbortController,x=t({abortcontroller:p,name:S,eventType:h}),f=l?{handler:m=>{let a=m.target?.closest?.(l);return a&&c(m,r(a),x)},remove:x}:{handler:m=>c(m,m.target,x),remove:x};return p&&(f.signal=p.signal),f}function t(o){let{abortcontroller:l,name:c,eventType:b}=o;return c?l?function(){l.abort();let h=[...N[b].entries()].find(([p,x])=>x.name===c);N[b].delete(h[0]),setTimeout(()=>console.warn(`Listener for event type [${b}] with name [${c}] was removed`),100)}:function(S){console.error(`Listener for event type [${b}] with name [${c}] is not marked as removable`)}:function(){console.error("An anonymous listener can not be removed")}}function n(o){let{eventType:l,handler:c,capture:b,once:S,signal:h,remove:p,name:x}=o;if(S)return addEventListener(l,c,{once:S});if(N[l]||(N[l]=new Map),!(N[l].has(c)||[...N[l].values()].find(m=>(m.name||"")===x))){let m={capture:b||Ie(l),once:S||!1};h&&(m.signal=h),document.addEventListener(l,c,m);let a={name:x,remove:p,capture:b||Ie(l)};N[l].set(c,a)}}}var kt={},me,ne,Bt,O,W,{isCommentOrTextNode:Me,isNode:K,isHtmlString:Be,isArrayOfHtmlElements:je,isArrayOfHtmlStrings:Je,ElemArray2HtmlString:Qe,input2Collection:We,setCollectionFromCssSelector:ze,addHandlerId:Oe,cssRuleEdit:ge,addFn:jt,elems4Docs:qr}=Jt();function Jt(){let r=Z({createWithId:"JQxStylesheet"}),e=(a,y)=>ne[a]=(v,...w)=>y(v,...w),t=a=>u(a,Comment,Text),n=a=>u(a,Text,HTMLElement,Comment),o=a=>u(a,Comment),l=a=>u(a,Text),c=a=>u(a,String)&&/^<|>$/.test(`${a}`.trim()),b=a=>u(a,Array)&&!a?.find(y=>!c(y)),S=a=>u(a,Array)&&!a?.find(y=>!n(y)),h=a=>a?.filter(y=>y).reduce((y,v)=>y.concat(o(v)?`<!--${v.data}-->`:t(v)?v.textContent:v.outerHTML),""),p=a=>a?u(a,Proxy)?[a.EL]:u(a,NodeList)?[...a]:n(a)?[a]:S(a)?a:a.isJQx?a.collection:void 0:[],x=(a,y,v)=>{let w=y!==document.body&&u(a,String)&&a.toLowerCase()!=="body"?y:document,C;try{v.collection=[...w.querySelectorAll(a)]}catch{C=`Invalid CSS querySelector. [${u(a,String)?a:"Nothing valid given!"}]`}return C??`CSS querySelector "${a}", output ${v.collection.length} element(s)`},f=a=>{let y=a.data.get("hid")||`HID${J()}`;return a.data.add({hid:y}),`[data-hid="${y}"]`},m=Object.entries(M.tagsRaw).filter(([,a])=>a).map(([a])=>a).sort((a,y)=>a.localeCompare(y));return{isCommentOrTextNode:t,isNode:n,isComment:o,isText:l,isHtmlString:c,isArrayOfHtmlElements:S,isArrayOfHtmlStrings:b,ElemArray2HtmlString:h,input2Collection:p,setCollectionFromCssSelector:x,addHandlerId:f,cssRuleEdit:r,addFn:e,elems4Docs:m}}function V(r){return new Proxy(r,{get:(e,t)=>zt(e,t,r)})}function Qt(r,e){return(...t)=>u(r,Function)&&r(V(e),...t)}function Wt(r,e){return(...t)=>u(r,Function)&&r(V(e),...t)}function zt(r,e,t){switch(!0){case u(e,Symbol):return r;case u(+e,Number):return r.collection?.[e]||void 0;case e in me:return Wt(me[e],t)();case e in ne:return Qt(ne[e],t);default:return r[e]}}function _e(r){let e=Yt(r);for(let[t,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(r,t,n),Object.defineProperty(kt,t,n);return r}function _t(r){return{allow:e=>{let t=/-/.test(e),n=t&&e;e=t?Y(e):e.toLowerCase(),M.allowTag(e),u(r[e],Function)||Object.defineProperties(r,pe(e,!0,r,n))},prohibit:e=>{e=e.toLowerCase(),M.prohibitTag(e),u(r[e],Function)&&Object.defineProperties(r,pe(e,!1,r))}}}function ke(...r){if(r.length===1){let e=String(r.shift().trim());r=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(t=>t.trim())}for(let e of r.map(t=>t.startsWith("!")?t.slice(1,-1):t))ge(e,{removeRule:1})}function Vt(r){return function(e,t,n){t=t?.isJQx?t?.[0]:t,n=n&&Object.values(T).find(l=>n===l)?n:void 0;let o=r(e,document.createElement("br"));if(t&&!u(t,HTMLBRElement))for(let l of o.collection)n?t.insertAdjacentElement(n,l):t.append(l);return o}}function Ut(...r){let e={};for(let t of r){let n=Object.getOwnPropertyDescriptors(t);for(let[o,l]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,l)}return e}function Gt(r){console.error(`JQx: "${r}" not allowed, not rendered`)}function Zt(r,e,t,n){return r=H(n||r.toLowerCase()),{get(){return(...o)=>e?t.virtual(X(le[r](...o))):Gt(r)},enumerable:!1,configurable:!0}}function pe(r,e,t,n){r=r.toLowerCase();let o=Zt(r,e,t,n);return n?{[n]:o,[Y(n)]:o}:{[r]:o,[r.toUpperCase()]:o}}function Yt(r){return Ut(Object.entries(M.tagsRaw).reduce(Xt(r),{}),rr(r))}function Xt(r){return function(e,[t,n]){return n&&Object.defineProperties(e,pe(t,n,r)),e}}function Kt(r){return function(e,t,...n){u(t,Function)&&(n.push(t),t=void 0),r({type:e,selector:t,handlers:n})}}function qt(r){return function(e){let{type:t,origin:n,selector:o,handlers:l,name:c,capture:b,once:S,canRemove:h}=e,p=Le(t),x=c;if(!u(l,Function,Array))return;l=u(l,Function)?[l]:l,h=u(h,Boolean)?h:!1;let f={eventType:p,selector:o||n,capture:b,name:x,once:S,canRemove:h};switch(!0){case(u(p,Array)&&p.length>0):for(let a of p){f.eventType=a;for(let y of l)m(y)}return;default:for(let a of l)m(a)}function m(a){f.name=x,u(a,Function)&&r({...f,callback:a})}}}function er(r,e){if(e=$(e)?e:void 0,r=$(r)?r:void 0,e&&r)return[...N[r].values()].find(t=>(t.name||"")===e)}function tr(r){return r.activePopup||Object.defineProperty(r,"activePopup",{value:Pe(r),enumerable:!1}),r.activePopup}function rr(r){let{debugLog:e,Log:t,systemLog:n}=$e(r),{factoryExtensions:o,instanceExtensions:l}=Ne(r);O=n,W=e,me=o,ne=l,Bt=r;let c=(p,x)=>ge(p,x),b=_t(r),S=Re(r),h=qt(S);return{log(...p){t("fromStatic",...p)},editCssRules(...p){for(let x of p)ge(x)},createStyle(p){return Z({createWithId:p||`jqx${J()}`})},editStylesheet(p){return Z({createWithId:p||`jqx${J()}`})},text(p,x=!1){return x?r.comment(p):document.createTextNode(p)},node(p,x=document){return x.querySelector(p,x)},nodes(p,x=document){return[...x.querySelectorAll(p,x)]},get editCssRule(){return c},get getNamedListener(){return er},get debugLog(){return e},get virtual(){return Vt(r)},get allowTag(){return b.allow},get prohibitTag(){return b.prohibit},get removeCssRule(){return ke},get removeCssRules(){return ke},get delegate(){return Kt(h)},get delegateCaptured(){return h},get handle(){return h},get at(){return T},get setStyle(){return c},get fn(){return jt},get lenient(){return M.allowUnknownHtmlTags},get IS(){return u},get Popup(){return tr(r)}}}var rn=_e(nr());function nr(){return function(t,n,o=T.BeforeEnd){if(t?.isJQx)return t;let l=u(n,HTMLBRElement);n=(!l&&n&&n.isJQx?n[0]:n)||document.body,o=o&&Object.values(T).find(m=>o===m)?o:void 0;let c=Be(t),b=!c&&Je(t),S=b||c,h={collection:We(t)??[],isVirtual:l,isJQx:!0},p=je(h.collection),x=`input => ${b?`"${D(t.join(", "),70)}"`:!S&&p?`element collection [${D(h.collection.map(m=>`${u(m,Comment,Text)?"Comment|Text @":""} ${m?.outerHTML||m?.textContent}`).join(", "),70)}]`:`"${D(t,70)}"`}`;if(h.collection.length&&p)return O(x),l||h.collection.forEach(m=>{n.contains(m)||z([m],n,o)}),V(h);if(S){if([t].flat().forEach(m=>h.collection.push(A(m))),h.collection.length>0){let m=h.collection.filter(a=>a?.dataset?.jqxcreationerror);h.collection=h.collection.filter(a=>!a?.dataset?.jqxcreationerror),O(`${x}`),O(`*Created ${h.isVirtual?"VIRTUAL ":""}[${D(Qe(h.collection)||"sanitized: no elements remaining",70)}]`),m.length&&console.error(`JQx: illegal html, not rendered: "${m.reduce((a,y)=>a.concat(`${y.textContent}
|
|
20
|
-
`),"").trim()}"`),h.isVirtual||z(h.collection,n,o)}return V(h)}let f=ze(t,n,h);return O(`input => ${f}`),V(h)}}export{rn as default};
|
|
13
|
+
`)}function pt(r){return r.reduce((e,t)=>{let[n,o]=[t.slice(0,t.indexOf(":")).trim(),t.slice(t.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return n&&o?{...e,[n]:o}:e},{})}function yt(r){return pt(gt(r))}function Se(r,e){return r?.replace("::",":")===e?.replace("::",":")}var bt=[...Array(26)].map((r,e)=>String.fromCharCode(e+65)).concat([...Array(26)].map((r,e)=>String.fromCharCode(e+97))).concat([...Array(10)].map((r,e)=>`${e}`)),T=vt();function K(r,e=2){return`${r}`.padStart(e,"0")}function ht(r,e=0){return[r,e]=[Math.floor(r),Math.ceil(e)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(r-e+1)+e)}function F(r,e=1){return e=c(e,Number)&&e||1,c(r,String)&&r.length>=e}function Ee(r){return r=c(r,String)&&/,/.test(r)?r.split(","):r,c(r,Array)?r.filter(e=>F(e)).map(e=>e.trim().toLowerCase()):c(r,String)&&r?.trim().toLowerCase()||""}function St(r){let e=r.length;for(;e--;){let t=ht(e);[r[e],r[t]]=[r[t],r[e]]}return r}function $(r,e=120){return`${r}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"<").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(r.length>e?" …":"").trim()}function H(r){return r.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function xt([r,...e]){return`${r.toUpperCase()}${e.join("")}`}function _(r){return c(r,String)?r.toLowerCase().split("-").map((e,t)=>t&&`${xt(e)}`||e).join(""):r}function U(){return`_${St(bt).slice(0,8).join("")}`}function q(r,e=120){return $(r,e).replace(/</g,"<")}function xe(){return(r=>`[${K(r.getHours())}:${K(r.getMinutes())}:${K(r.getSeconds())}.${K(r.getMilliseconds(),3)}]`)(new Date)}function j(r){return r.replace(/</g,"<").replace(/>/g,">")}function we(){let r=m=>c(m,Comment,Text),e=m=>c(m,Text,HTMLElement,Comment),t=m=>c(m,Comment),n=m=>c(m,Text),o=m=>c(m,String)&&/^<|>$/.test(`${m}`.trim()),l=m=>c(m,Array)&&!m?.find(u=>!o(u)),a=m=>c(m,Array)&&!m?.find(u=>!e(u));return{isCommentOrTextNode:r,isNode:e,isComment:t,isText:n,isHtmlString:o,isArrayOfHtmlElements:a,isArrayOfHtmlStrings:l,ElemArray2HtmlString:m=>m?.filter(u=>u).reduce((u,g)=>u.concat(t(g)?`<!--${g.data}-->`:r(g)?g.textContent:g.outerHTML),""),input2Collection:m=>m?c(m,Proxy)?[m.EL]:c(m,NodeList)?[...m]:e(m)?[m]:a(m)?m:m.isJQx?m.collection:void 0:[],setCollectionFromCssSelector:(m,u,g)=>{let d=u!==document.body&&c(m,String)&&m.toLowerCase()!=="body"?u:document,x;try{g.collection=[...d.querySelectorAll(m)]}catch{x=`Invalid CSS querySelector. [${c(m,String)?m:"Nothing valid given!"}]`}return x??`CSS querySelector "${m}", output ${g.collection.length} element(s)`},addHandlerId:m=>{let u=m.data.get("hid")||`HID${U()}`;return m.data.add({hid:u}),`[data-hid="${u}"]`}}}function Ce(){let r=function(l){if(!l)return;let a=l.style,S=getComputedStyle(l),y=[a.visibility,S.visibility].includes("hidden"),b=[a.display,S.display].includes("none"),h=l.offsetTop<0||l.offsetLeft+l.offsetWidth<0||l.offsetLeft>document.body.offsetWidth,m=+S.opacity==0||+(a.opacity||1)==0;return!(h||m||b||y)},t=function(l){return[...l.parentNode.querySelectorAll(":is(:read-write)")].find(a=>a===l)??!1},n=function(l){return[...l.parentNode.querySelectorAll(":is(:modal)")].find(a=>a===l)??!1},o={notInDOM:!0,writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"};return l=>{let a=l.node;return c(a,Node)?{get writable(){return t(a)},get modal(){return n(a)},get inDOM(){return a.isConnected},get open(){return a.open??!1},get visible(){return r(a)},get disabled(){return a.hasAttribute("readonly")||a.hasAttribute("disabled")},get empty(){return l.collection.length<1},get virtual(){return l.isVirtual}}:o}}function ve(r){return c(r,String)&&Object.assign(document.createElement("textarea"),{innerHTML:r}).textContent||r}function vt(){let r=!1,e=[],t={get on(){return r=!0,t},get off(){return r=!1,t},get backLog(){return e}};function n(...l){return e.unshift(...l.map(a=>`${xe()} \u2A3B ${ve(a)}`)),console.error(e.slice(0,l.length).join(`
|
|
14
|
+
`)),t}function o(...l){return e.unshift(...l.map(a=>`${xe()} \u2714 ${ve(a)}`)),r&&console.log(e.slice(0,l.length).join(`
|
|
15
|
+
`)),t}return Object.defineProperties(t,{log:{value:o,enumerable:!1},error:{value:n,enumerable:!1}}),Object.freeze(t)}var Et=!0,ee={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},wt=r=>{if(Et&&Object.keys(r.removed).length){let e=Object.entries(r.removed).reduce((t,[n,o])=>[...t,`${j(n)} => ${o}`],[]).join("\\000A");T.error(`JQx HTML creation errors: ${e}`)}},Ct=function(r){let e=r.nodeName.toLowerCase(),t=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(e)&&!t.find(n=>n===e)||k.isAllowed(e)},G=r=>{let e={rawHTML:r?.parentElement?.getHTML()??"no html",removed:{}};return c(r,HTMLElement)&&[...r.childNodes].forEach(t=>{if(t?.children?.length&&G(t),t?.attributes){let o=c(t,SVGElement)?B.svg:B.html;[...(t??{attributes:[]}).attributes].forEach(l=>{let a=l.name.trim().toLowerCase(),S=l.value.trim().toLowerCase().replace(ee.whiteSpace,""),y=a==="href"?!ee.validURL.test(S):ee.notAllowedValues.test(S),b=a.startsWith("data")?!ee.data.test(a):!!o[a];if(y||b){let h=q(l.value||"none",60);h+=h.length===60?"...":"",e.removed[`${l.name}`]=`attribute/property/value not allowed, removed. Value: ${h}`,t.removeAttribute(l.name)}})}if(!(Ct(t)||t.constructor===CharacterData||t.constructor===Comment)){let o=(t?.outerHTML||t?.textContent).trim(),l=q(o,60)??"EMPTY";l+=l.length===60?"...":"",e.removed[`<${t.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${l}`,t.remove()}}),wt(e),r};var A=new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(r,e){return r[String(e).toLowerCase()]??r[e]}}),Ft=r=>{let e=document.createElement("div");return e.insertAdjacentHTML(A.end,r),e.childNodes.length?G(e):void 0},Lt=(r,e,t)=>c(r,Comment)?e.insertAdjacentHTML(t,`<!--${r.data}-->`):e.insertAdjacentText(t,r.data),J=(r=[],e=document.body,t=A.BeforeEnd)=>r.reduce((n,o)=>{let l=Z(o)&&Tt(o,e,t);return l?[...n,l]:n},[]),Tt=(r,e=document.body,t=A.BeforeEnd)=>(e=e?.isJQx?e?.[0]:e,c(r,Comment,Text)?Lt(r,e,t):e.insertAdjacentElement(t,r)),D=r=>{if(c(r,Text,Comment))return r;let e=r?.trim(),t=e?.split(/<text>|<\/text>/i)??[];if(t?.length&&(t=t.length>1?t.filter(o=>o.length).shift():void 0),e.startsWith("<!--")&&e.endsWith("-->"))return document.createComment(r.replace(/<!--|-->$/g,""));if(t||!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(t);let n=Ft(r);return n.childNodes.length<1?D(`<span data-jqxcreationerror="1">${$(r,60)}</span>`):n.children[0]};var E=(r,e)=>{let t=r.collection.filter(n=>!De(n));for(let n=0;n<t.length;n+=1)e(t[n],n);return r},$t=Ce(),At={get(r,e){return r[_(e)]||r[e]},enumerable:!1,configurable:!1};function Fe(r){return r&&(r.textContent="")}function Q(r){let e=r.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),r.isConnected?r.remove():r=null,e}function $e(r,e){if(r&&c(e,Object))for(let[t,n]of Object.entries(e))r.setAttribute(`data-${H(t)}`,n)}function Le(r,e){return r.andThen(e,!0)}function Te(r,e){return r.andThen(e)}function Ae(r){return r.startsWith("data")||B.html.find(e=>r.toLowerCase()===e)}function Ht(r,e,t,n){t&&c(e,String)&&(e={[e]:t==="-"?"":t});let o;e.className&&(o=e.className,delete e.className),o=[...r.classList].find(a=>a.startsWith("JQxClass-")||o&&a===o)||o||`JQxClass-${U().slice(1)}`,n.editCssRule(`.${o}`,e),r.classList.add(o)}function Dt(r,e){if(r)for(let[t,n]of Object.entries(e)){if(t=H(t),t.startsWith("data"))return $e(r,n);c(n,String)&&Ae(t)&&r.setAttribute(t,n.split(/[, ]/)?.join(" "))}}function se(r,e){if(c(e,Object))for(let[t,n]of Object.entries(e)){let o;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),o="important"),r.style.setProperty(H(t),n,o)}}function Nt(...r){debugLog.log("\u2757"+r.map(e=>String(e)).join(", "))}function ae(r,e=0,t=!0){return r=r?.parentElement,e+=r?r[t?"scrollTop":"scrollLeft"]:0,r?ae(r,e,t):e}function Mt(r){return{data:e=>({get all(){return new Proxy(e[0]?.dataset??{},At)},set:(t={})=>{if(!e.is.empty&&c(t,Object))for(let[n,o]of Object.entries(t))e.setData({[n]:o});return e},get:(t,n)=>e.data.all[t]??n,add:(t={})=>{if(!e.is.empty&&c(t,Object))for(let[n,o]of Object.entries(t))e.setData({[n]:o});return e},remove:t=>(e[0]?.removeAttribute(`data-${H(t)}`),e)}),dimensions:e=>{if(e.is.empty)return{error:"[instance].dimensions: NO ELEMENTS"};let t=e[0],n=e.first()?.getBoundingClientRect().toJSON();return n.scrollTopDistance=ae(t,0),n.scrollLeftDistance=ae(t,0,!1),n},node:e=>e[0],HTML:e=>({get:(t,n)=>{if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let o=t?e.outerHtml:e.html();return n?j(o):o},set:(t,n=!1,o=!1)=>{t=t.isJQx?t.HTML.get(1):t;let l=c(t,String);return t=l&&o?j(t):t,l&&(t||"").trim().length&&e.html(t,n),e},replace:(t,n=!1)=>e.HTML.set(t,!1,n),append:(t,n=!1)=>(t=c(t,HTMLElement)?r(t).HTML.get(1):t.isJQx?t.HTML.get(1):t,e.HTML.set(t,!0,n)),insert:(t,n=!1)=>(t=c(t,HTMLElement)?r(t).HTML.get(1):t.isJQx?t.HTML.get(1):t,e.HTML.set(t+e.HTML.get(),!1,n))}),is:e=>$t(e),length:e=>e.collection.length,outerHtml:e=>(e.first()||{outerHTML:void 0}).outerHTML,parent:e=>{let t=r(e[0]?.parentNode);return t.is.empty?e:t},render:e=>(!e.is.empty&&e.toDOM()||r.log("[JQx.render]: empty collection"),e),Style:e=>({get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline:t=>e.style(t),inSheet:t=>e.css(t),valueOf:t=>e.is.empty?void 0:getComputedStyle(e[0])[H(t)],nwRule:t=>e.Style.byRule({rules:t}),byRule:({classes2Apply:t=[],rules:n=[]}={})=>{let l=c(n,String)&&!t.length?n.split("{")[0].trim():"";if(n=n&&c(n,String)?[n]:n,t=t&&c(t,String)?[t]:t,(n?.length||t?.length)&&(n?.length&&r.editCssRules(...n),t))for(let a of t)e.addClass(a);return l?.startsWith(".")&&e.addClass(l.slice(1)),l?.startsWith("#")&&!e.attr("id")&&e.prop({id:l.slice(1)}),e}})}}function Ot(r){return{addClass:(e,...t)=>E(e,n=>n&&t.forEach(o=>n.classList.add(o))),after:Te,afterMe:Te,andThen:(e,t,n=!1)=>{if(!t||!c(t,String,Node,Proxy))return Nt(`[JQx instance].[beforeMe | afterMe | andThen]: insufficient input [${t}]`),e;t=t?.isJQx?t.collection:c(t,Node)?r.virtual(t).collection:r.virtual(D(t)).collection;let[o,l,a]=n?[0,"before",t.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(t)];return e[o][l](...t),e.collection=a,e},append:(e,...t)=>{if(!e.is.empty&&t.length){let n=e.length===1;for(let o of t){if(!o.isJQx&&F(o)){let l=o.trim(),S=!/^<(.+)[^>]+>$/m.test(l)?r.text(o):D(o);E(e,y=>y.append(n?S:Q(S)))}Z(o)&&E(e,l=>l.append(n?o:Q(o))),o.isJQx&&!o.is.empty&&E(e,l=>o.collection.forEach(a=>l.append(n?a:Q(a))))}}return e},appendTo:(e,t)=>(t.isJQx||(t=r(t)),t.append(e),e),attr:(e,t,n)=>{let o=e[0];if(!o)return e;if(!n&&F(t))return t=H(t),t==="class"?[...o?.classList].join(" "):o?.getAttribute(t);if(F(t)&&n)switch(t=H(t),!0){case t.startsWith("data-"):t={data:{[t.replace("data-","")]:n}};break;default:t={[t]:n}}return c(t,Object)&&!e.is.empty&&Dt(o,t),e},before:Le,beforeMe:Le,clear:e=>E(e,Fe),closest:(e,t)=>{let n=F(t)?e[0].closest(t):null;return n?r(n):e},computedStyle:(e,t)=>e.first()&&getComputedStyle(e.first())[t],css:(e,t,n)=>E(e,o=>Ht(o,t,n,r)),duplicate:(e,t=!1,n=document.body)=>{let o=e.toNodeList().map(a=>a.removeAttribute&&a.removeAttribute("id")||a),l=r.virtual(o);return t?l.toDOM(n):l},each:(e,t)=>E(e,t),empty:e=>E(e,Fe),find:(e,t)=>e.collection.length>0?[...e.first()?.querySelectorAll(t)]:[],find$:(e,t)=>e.collection.length>0?r(t,e):e,first:(e,t=!1)=>{if(e.collection.length>0)return t?e.single():e.collection[0]},first$:(e,t)=>e.single(t),getData:(e,t,n)=>e.first()&&e.first().dataset?.[t]||n,hasClass:(e,...t)=>{let n=e[0];return!n||!n.classList.length?!1:t.find(o=>n.classList.contains(o))&&!0||!1},hide:e=>E(e,t=>se(t,{display:"none !important"})),html:(e,t,n)=>{if(t===void 0){let o=e.node;return o?.getHTML&&o.getHTML()||""}if(!e.isEmpty()){let o=D(`<div>${t.isJQx?t.HTML.get(!0):t}</div>`);if(!c(o,Comment))return E(e,a=>(n||(a.textContent=""),a.insertAdjacentHTML(r.at.end,o.getHTML())))}return e},htmlFor:(e,t,n="",o=!1)=>{if(t&&e.collection.length){if(!t||!F(n))return e;let l=e.find$(t);if(l.length<1)return e;let a=D(`<span>${n}</span>`);l.each(S=>{o||(S.textContent=""),S.insertAdjacentHTML(r.at.end,a?.getHTML())})}return e},isEmpty:e=>e.collection.length<1,nth$:(e,t)=>e.single(t),on:(e,t,...n)=>{if(e.collection.length&&c(t,String,Array)){if(t?.length<1||n.length<1)return e;let o=Ne(e);r.handle({type:t,selector:o,handlers:n})}return e},prepend:(e,...t)=>{if(!e.is.empty&&t){let n=e.length===1;for(let o of t){if(F(o)){o=o.trim();let a=!/^<(.+)[^>]+>$/m.test(o)?r.text(o):D(o);a=n?a:Q(a),E(e,S=>S.prepend(a.cloneNode(!0)))}Z(o)&&E(e,l=>l.prepend(n?o:Q(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),E(e,l=>E(o,a=>l.prepend(n?a:Q(a)))),o.collection.reverse())}}return e},prependTo:(e,t)=>(t.isJQx||(t=r.virtual(t)),t.prepend(e),e),prop:(e,t,n)=>{if(c(t,String)&&!n)return t.startsWith("data")?e[0]?.dataset[t.slice(t.indexOf("-")+1)]:e[0]?.[t];let o=c(t,Object)?t:{[t]:n};for(let[l,a]of Object.entries(o)){if(l=l.trim(),a&&!Ae(l)||!a)return!1;if(l.toLowerCase()==="id")return e[0].id=a;E(e,y=>{if(l.startsWith("data"))return y.dataset[l.slice(l.indexOf("-")+1)]=a;y[l]=a})}return e},remove:(e,t)=>{T.log(`remove ${$(e.HTML.get(1),40)}${t?` /w selector ${t}`:""}`);let n=l=>l.remove(),o=()=>e.collection=e.collection.filter(l=>document.documentElement.contains(l));if(t){let l=e.find$(t);return l.is.empty||(E(l,n),o()),e}return E(e,n),o(),e},rmAttr:(e,...t)=>{for(let n of t)e.node.removeAttribute(n);return e},removeClass:(e,...t)=>E(e,n=>{if(n)for(let o of t)n.classList.remove(o)}),renderTo:(e,t=document.body,n=r.at.end)=>(e.toDOM(t,n),e),replace:(e,t,n)=>{let o=e[0];return!t||!n||!c(n,HTMLElement)&&!n.isJQx?(console.error("JQx replace: invalid replacement value"),e):(n.isJQx&&(n=n[0]),c(n,NodeList)&&(n=n[0]),o&&t&&(t=c(t,String)?o.querySelectorAll(t):t.isJQx?t.collection:t,c(t,HTMLElement,NodeList,Array)&&c(n,HTMLElement)&&(c(t,HTMLElement)?[t]:[...t]).forEach(l=>l.replaceWith(n.cloneNode(!0)))),e)},replaceClass:(e,t,...n)=>E(e,o=>{o.classList.remove(t);for(let l of n)o.classList.add(l)}),replaceMe:(e,t)=>e.replaceWith(t),replaceWith:(e,t)=>(t=c(t,Element)?t:t.isJQx?t[0]:void 0,t&&(e[0].replaceWith(t),e=r.virtual(t)),e),setData:(e,t)=>E(e,n=>$e(n,t)),show:e=>E(e,t=>se(t,{display:"revert-layer !important"})),single:(e,t)=>e.collection.length>0?c(t,String)?e.find$(t):c(t,Number)?r(e.collection[t]):r(e.collection[0]):e,style:(e,t,n)=>E(e,l=>{n&&c(t,String)&&(t={[t]:n||"none"}),se(l,t)}),text:(e,t,n=!1)=>e.isEmpty()?e:c(t,String)?E(e,l=>l.textContent=n?l.textContent+t:t):e.first().textContent,toDOM:(e,t=document.body,n=A.BeforeEnd)=>(e.isVirtual&&(e.isVirtual=!1),e.collection=J(e.collection,t,n),e),toggleClass:(e,t)=>E(e,n=>n.classList.toggle(t)),toNodeList:e=>[...e.collection].map(t=>document.importNode(t,!0)),trigger:(e,t,n=Event,o={})=>{if(e.collection.length){let l=new n(t,{...o,bubbles:o.bubbles??!0});for(let a of e.collection)a.dispatchEvent(l)}return e},val:(e,t)=>{let n=e[0];return!n||!c(n,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)?e:t===void 0?n.value:(n.value=c(t,String)?t:"",e)}}}function He(r){return{factoryExtensions:Mt(r),instanceExtensions:Ot(r)}}function Me(r){if(!r("#jqxPopup").isEmpty())return;r.dialog({id:"jqxPopup"},r.div({id:"jqxPopupContent"})).render,r.editCssRules(...de);let[e,t]=[r("#jqxPopupContent"),r.node("#jqxPopup")],n={};return r.handle({type:"click, keydown",handlers:b,capture:!0}),Object.freeze({show:o,removeModal:y});function o(u){if(t.open)return;n={...u};let{content:g}=n;return r.IS(g,String,HTMLElement)||g?.isJQx?a():!0}function l(){return n.modal?m(n.warnMessage):S()}function a(){e.clear();let{content:u,modal:g,closeAfter:d}=n;g=r.IS(g,Boolean)?g:!1;let x=g?"":r.div({id:"closeHandleIcon"});e.append(x,r.IS(u,String)?r.div(u):u),t.showModal(),!g&&r.IS(d,Number)&&h(l,d)}function S(){if(t.close(n.returnValue),r.IS(n.callback,Function))return n.callback(n.returnValue);n={}}function y({callback:u,value:g}={}){n.returnValue=g,n.modal=!1,n.callback=u||n.callback,l()}function b(u){if(!(Object.keys(n).length<1||!t.open))return u.key==="Escape"&&u.preventDefault(),n.activeTimer&&clearTimeout(n.activeTimer),(u.target.closest("#closeHandleIcon")||!u.target.closest("#jqxPopupContent"))&&l(),document.activeElement.blur()}function h(u,g){r.IS(u,Function)&&r.IS(g,Number)&&g>0&&(n.activeTimer=setTimeout(u,g*1e3))}function m(u){if(!r.IS(u,String,HTMLElement,Proxy))return;let g=e.find$(".warn");switch(!0){case g.is.empty:g=r.div({class:"warn"},u);default:e.append(g.addClass("active")),h(()=>e.find$(".warn").removeClass("active"),2)}}}var N={},Pt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],Oe=r=>!!Pt.find(e=>e===r);function Pe(r){return function(o){let{eventType:l,selector:a,callback:S,name:y,capture:b,once:h,canRemove:m}=o;switch(!0){case(!F(l)||!r.IS(S,Function)):default:y=y||!/handlers$/.test(S.name)&&S.name||void 0,b=r.IS(b,Boolean)?b:!1,h=r.IS(h,Boolean)?h:!1,m=F(y,4)&&r.IS(m,Boolean)?m:h;let{handler:u,signal:g,remove:d}=e({selector:a,callback:S,canRemove:m,once:h,name:y,eventType:l});return n({eventType:l,handler:u,capture:b,once:h,signal:g,remove:d,name:y})}};function e(o){let{selector:l,callback:a,canRemove:S,name:y,eventType:b,once:h}=o,m=(S||h)&&new AbortController,u=t({once:h,abortcontroller:m,name:y,eventType:b}),g=l?{handler:d=>{let x=d.target?.closest?.(l);return x&&a(d,r(x),u)},remove:u}:{handler:d=>a(d,d.target,u),remove:u};return m&&(g.signal=m.signal,h)?{handler:(d,x)=>{g.handler(d,x),u()}}:g}function t(o){let{once:l,abortcontroller:a,name:S,eventType:y}=o;return S?a?function(){a.abort();let h=[...N[y].entries()].find(([m,u])=>u.name===S);N[y].delete(h[0]),setTimeout(()=>r.logger.log(`Listener for event type [${y}] with name [${S}] was removed${l?" (once active, so handled once).":""}`),100)}:function(b){r.logger.error(`Listener for event type [${y}] with name [${S}] is not marked as removable`)}:function(){r.logger.error("An anonymous listener can not be removed")}}function n(o){let{eventType:l,handler:a,capture:S,once:y,signal:b,remove:h,name:m}=o;if(N[l]||(N[l]=new Map),!(N[l].has(a)||[...N[l].values()].find(g=>(g.name||"")===m))){let g={capture:S||Oe(l),once:y||!1};b&&(g.signal=b),document.addEventListener(l,a,g);let d={name:m,remove:h,capture:S||Oe(l)};N[l].set(a,d)}}}var ce,te,{isCommentOrTextNode:De,isNode:Z,isComment:zr,isText:Vr,isHtmlString:Re,isArrayOfHtmlElements:ke,isArrayOfHtmlStrings:je,ElemArray2HtmlString:Be,input2Collection:Je,setCollectionFromCssSelector:Qe,addHandlerId:Ne,cssRuleEdit:ue,addFn:It}=Rt();function Rt(){let r=X({createWithId:"JQxStylesheet"}),e=(t,n)=>te[t]=(o,...l)=>n(o,...l);return{...we(),cssRuleEdit:r,addFn:e}}function W(r){return new Proxy(r,{get:(e,t)=>Bt(e,t,r)})}function kt(r,e){return(...t)=>c(r,Function)&&r(W(e),...t)}function jt(r,e){return(...t)=>c(r,Function)&&r(W(e),...t)}function Bt(r,e,t){switch(!0){case c(e,Symbol):return r;case c(+e,Number):return r.collection?.[e]||void 0;case e in ce:return jt(ce[e],t)();case e in te:return kt(te[e],t);default:return r[e]}}function We(r){let e=_t(r);for(let[t,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(r,t,n);return r}function Jt(r){return{allow:e=>{let t=/-/.test(e),n=t&&e;e=t?_(e):e.toLowerCase(),k.allowTag(e),c(r[e],Function)||Object.defineProperties(r,fe(e,!0,r,n))},prohibit:e=>{e=e.toLowerCase(),k.prohibitTag(e),c(r[e],Function)&&Object.defineProperties(r,fe(e,!1,r))}}}function Ie(...r){if(r.length===1){let e=String(r.shift().trim());r=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(t=>t.trim())}for(let e of r.map(t=>t.startsWith("!")?t.slice(1,-1):t))ue(e,{removeRule:1})}function Qt(r){return function(e,t,n){t=t?.isJQx?t?.[0]:t,n=n&&Object.values(A).find(l=>n===l)?n:void 0;let o=r(e,document.createElement("br"));if(t&&!c(t,HTMLBRElement))for(let l of o.collection)n?t.insertAdjacentElement(n,l):t.append(l);return o}}function Wt(...r){let e={};for(let t of r){let n=Object.getOwnPropertyDescriptors(t);for(let[o,l]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,l)}return e}function zt(r){console.error(`JQx: "${r}" not allowed, not rendered`)}function Vt(r,e,t,n){return r=H(n||r.toLowerCase()),{get(){return(...o)=>e?t.virtual(G(ne[r](...o))):zt(r)},enumerable:!1,configurable:!0}}function fe(r,e,t,n){r=r.toLowerCase();let o=Vt(r,e,t,n);return n?{[n]:o,[_(n)]:o}:{[r]:o,[r.toUpperCase()]:o}}function _t(r){return Wt(Object.entries(k.tagsRaw).reduce(Ut(r),{}),qt(r))}function Ut(r){return function(e,[t,n]){return n&&Object.defineProperties(e,fe(t,n,r)),e}}function Gt(r){return function(e,t,...n){c(t,Function)&&(n.push(t),t=void 0),r({type:e,selector:t,handlers:n})}}function Zt(r){return function(e){let{type:t,origin:n,selector:o,handlers:l,name:a,capture:S,once:y,canRemove:b}=e,h=Ee(t),m=a;if(!c(l,Function,Array))return;l=c(l,Function)?[l]:l,b=c(b,Boolean)?b:!1;let u={eventType:h,selector:o||n,capture:S,name:m,once:y,canRemove:b};switch(!0){case(c(h,Array)&&h.length>0):for(let d of h){u.eventType=d;for(let x of l)g(x)}return;default:for(let d of l)g(d)}function g(d){u.name=m,c(d,Function)&&r({...u,callback:d})}}}function Yt(r,e){if(e=F(e)?e:void 0,r=F(r)?r:void 0,e&&r)return[...N[r].values()].find(t=>(t.name||"")===e)}function Xt(r){return r.activePopup||Object.defineProperty(r,"activePopup",{value:Me(r),enumerable:!1}),r.activePopup}function Kt(r){let e=(y,b)=>ue(y,b),t=y=>X({createWithId:y||`jqx${U()}`}),n=(...y)=>{for(let b of y)ue(b)},o=Jt(r),l=Pe(r),a=Zt(l);return{editCssRule:e,createStyle:t,editCssRules:n,allowProhibit:o,handle:l,capturedHandling:a,log:(...y)=>T.on.log(...y).off}}function qt(r){let{factoryExtensions:e,instanceExtensions:t}=He(r);ce=e,te=t;let{editCssRule:n,createStyle:o,editCssRules:l,allowProhibit:a,handle:S,capturedHandling:y,log:b}=Kt(r);return{log:b,editCssRules:l,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:j,logger:T,text:(h,m=!1)=>m?r.comment(h):document.createTextNode(h),node:(h,m=document)=>m.querySelector(h,m),nodes:(h,m=document)=>[...m.querySelectorAll(h,m)],get getNamedListener(){return Yt},get virtual(){return Qt(r)},get allowTag(){return a.allow},get prohibitTag(){return a.prohibit},get removeCssRule(){return Ie},get removeCssRules(){return Ie},get delegate(){return Gt(y)},get delegateCaptured(){return y},get handle(){return y},get at(){return A},get setStyle(){return n},get fn(){return It},get lenient(){return k.allowUnknownHtmlTags},get IS(){return c},get Popup(){return Xt(r)}}}var Zr=We(er());function er(){return function(t,n,o=A.BeforeEnd){if(t?.isJQx)return t;let l=c(n,HTMLBRElement);n=(!l&&n&&n.isJQx?n[0]:n)||document.body,o=o&&Object.values(A).find(g=>o===g)?o:void 0;let a=Re(t),S=!a&&je(t),y=S||a,b={collection:Je(t)??[],isVirtual:l,isJQx:!0},h=ke(b.collection),m=`input => ${S?`"${$(t.join(", "),70)}"`:!y&&h?`element collection [${$(b.collection.map(g=>`${c(g,Comment,Text)?"Comment|Text @":""} ${g?.outerHTML||g?.textContent}`).join(", "),70)}]`:`"${$(t,70)}"`}`;if(b.collection.length&&h)return T.log(m),l||b.collection.forEach(g=>{n.contains(g)||J([g],n,o)}),W(b);if(y){if([t].flat().forEach(g=>b.collection.push(D(g))),b.collection.length>0){let g=b.collection.filter(d=>d?.dataset?.jqxcreationerror);b.collection=b.collection.filter(d=>!d?.dataset?.jqxcreationerror),T.log(`${m}`),T.log(`*Created ${b.isVirtual?"VIRTUAL ":""}[${$(Be(b.collection)||"sanitized: no elements remaining",70)}]`),g.length&&T.error(`JQx: illegal html, not rendered: "${g.reduce((d,x)=>d.concat(`${x.textContent}
|
|
16
|
+
`),"").trim()}"`),b.isVirtual||J(b.collection,n,o)}return W(b)}let u=Qe(t,n,b);return T.log(`input => ${u}`),W(b)}}export{Zr as default};
|