jqx-es 1.6.0 → 1.6.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.
@@ -1,16 +1,16 @@
1
- var JQx=(()=>{var xe=Object.defineProperty;var ft=Object.getOwnPropertyDescriptor;var dt=Object.getOwnPropertyNames;var mt=Object.prototype.hasOwnProperty;var gt=(t,e)=>{for(var r in e)xe(t,r,{get:e[r],enumerable:!0})},pt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of dt(e))!mt.call(t,o)&&o!==r&&xe(t,o,{get:()=>e[o],enumerable:!(n=ft(e,o))||n.enumerable});return t};var yt=t=>pt(xe({},"__esModule",{value:!0}),t);var Er={};gt(Er,{default:()=>wr});var{IS:s,maybe:W,$Wrap:Lr,isNothing:Tr,xProxy:Fr,addSymbolicExtensions:$r}=bt({useSymbolicExtensions:!1});function bt(t={}){let{useSymbolicExtensions:e}=t,{xProxy:r,addSymbolicExtensions:n}=ht(a,f,e),o=C(),[i]=[N()];return r.custom(),e&&n(),{IS:a,maybe:o,$Wrap:i,isNothing:b,xProxy:r,addSymbolicExtensions:n};function a(l,...d){let v=typeof l=="symbol"?Symbol.isSymbol:l;switch(!0){case!!o({trial:L=>"isTypes"in(d?.[0]??{})}):return w(l,d[0]);default:return d.length>1?m(v,...d):E(l,...d)}}function w(l,d){switch(!0){case"defaultValue"in d:return u(l,d);case"notTypes"in d:return y(l,d);default:return a(l,...[d.isTypes].flat())}}function f(l){return l?.[Symbol.proxy]??a(l)}function E(l,...d){let{noInput:v,noShouldbe:L,compareTo:O,inputCTOR:J,isNaN:B,isInfinity:ut,shouldBeFirstElementIsNothing:ct}=c(l,...d);switch(d=d.length&&d[0],!0){case ct:return String(l)===String(O);case(l?.[Symbol.proxy]&&L):return l[Symbol.proxy];case B:return L?"NaN":String(O)===String(l);case ut:return L?"Infinity":String(O)===String(l);case v:return L?String(l):String(O)===String(l);case J===Boolean:return d?J===d:"Boolean";default:return g(l,d,L,h(l,J))}}function c(l,...d){let v=d.length<1,L=l==null;return{noInput:L,noShouldbe:v,compareTo:!v&&d[0],inputCTOR:!L&&Object.getPrototypeOf(l)?.constructor,isNaN:Number.isNaN(l)||o({trial:O=>String(l)==="NaN"}),isInfinity:o({trial:O=>String(l)})==="Infinity",shouldBeFirstElementIsNothing:!v&&b(d[0])}}function h(l,d){switch(!0){case l===0:return Number;case l==="":return String;case!l:return{name:String(l)};default:return d}}function g(l,d,v,L){switch(!0){case(!v&&d===l||l?.[Symbol.proxy]&&d===Proxy):return!0;case String(d)==="NaN":return String(l)==="NaN";case(l?.[Symbol.toStringTag]&&typeof d=="string"):return String(d)===l[Symbol.toStringTag];default:return d?p(l,d,L):S(l,L)}}function S(l,d){return(l?.[Symbol.toStringTag]??l?.prototype?.[Symbol.toStringTag])||d?.name||String(d)}function p(l,d,v){return o({trial:L=>l instanceof d})||d===v||d===Object.getPrototypeOf(v)||`${d?.name}`===v?.name}function m(l,...d){return d.some(v=>a(l,v))}function b(l,d=!1){let v=l==null;return v=d?v||a(l,1/0)||a(l,NaN):v,v}function C(){let l=d=>{};return function({trial:d,whenError:v=l}={}){try{return d()}catch(L){return v(L)}}}function N(){return function(l){return Object.freeze({get value(){return l},get[Symbol.type](){return f(l)},get type(){return f(l)},[Symbol.is](...d){return a(l,...d)},is(...d){return a(l,...d)}})}}function u(l,{defaultValue:d,isTypes:v=[void 0],notTypes:L}={}){return v=v?.constructor!==Array?[v]:v,L=L&&L?.constructor!==Array?[L]:[],L.length<1?a(l,...v)?l:d:y(l,{isTypes:v,notTypes:L})?l:d}function y(l,{isTypes:d=[void 0],notTypes:v=[void 0]}={}){return d=d?.constructor!==Array?[d]:d,v=v?.constructor!==Array?[v]:v,a(l,...d)&&!a(l,...v)}function x(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return f(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...l){return a(this,...l)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(l){return f(l)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(l,...d){return a(l,...d)},enumerable:!1,configurable:!1}}))}}function ht(t,e,r){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for("toa.isASymbol")),{xProxy:w(),addSymbolicExtensions:n};function n(){Symbol.is||(Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type")),Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return e(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...f){return t(this,...f)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(f){return e(f)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(f,...E){return t(f,...E)},enumerable:!1,configurable:!1}}))}function o(f){let E=f.set;return f.set=(c,h,g)=>h===Symbol.proxy?c[h]=g:E(c,h,g),f}function i(f){return Object.getPrototypeOf(f)?.constructor?.name||"Object"}function a(f){return Proxy=new f(f,{construct(E,c){for(let g of c)g.set&&(g=o(g));let h=new E(...c);return h[Symbol.proxy]=`Proxy (${i(c[0])})`,h}}),Proxy}function w(){Symbol.proxy||(Symbol.proxy=Symbol.for("toa.proxy"));let f=Proxy;return{native(){Proxy=f},custom(){Proxy=a(f)}}}}var je=vt(),z=St(),V=xt();function St(){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 xt(){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 vt(){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={html:"innerHTML",text:"textContent",class:"className"},ee=wt();function wt(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case Nt(n):return Je(e,n,r);default:return Je(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function Je(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?o=>At(r):Pt(e)}}),t[e]}function Et(t,e,r){return e=e?.isJQx&&e.first()||e,W({trial:n=>Ht(e)?t.append(e):ke(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
2
- `,n)})}function Ct(t,e,...r){let n=Lt(e,t);return r?.forEach(o=>Et(n,o,t)),n}function Lt(t,e){switch(t=ve(e)?$t(t):t?.isJQx?t.first():t,!0){case s(t,String):return U(e,ke(t,e)?{html:t}:{text:t});case s(t,Node):return Ft(e,t);default:return U(e,t)}}function Tt(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in Re&&(t[Re[r]]=t[e],delete t[e])}),t}function Ft(t,e){let r=U(t);return r.append(e),r}function U(t,e={}){e=Qe(e,{});let r=Object.entries(e.data??{}),n=Object.assign(ve(t)?new Comment(e?.text):document.createElement(t),Tt(e));return r.length&&r.forEach(([o,i])=>n.dataset[o]=String(i)),n}function Qe(t,e){return e?s(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):s(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function $t(t){return Qe(t)?t?.text??t?.textContent??"":String(t)}function At(t){return U("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function ke(t,e){return!ve(e)&&s(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function Ht(t){return t?.constructor===Comment||t?.constructor===CharacterData}function ve(t){return t?.constructor===Comment||/comment/i.test(t)}function Nt(t){return!s(U(t),HTMLUnknownElement)}function Pt(t){return(e,...r)=>Ct(t,e,...r)}var{IS:te,maybe:Mr,$Wrap:Or,xProxy:Dr,isNothing:Ir}=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"),m();let t=h(),[e,r]=[g(),N()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:c,xProxy:r};function n(u,...y){if(t({trial:l=>"isTypes"in(y?.[0]??{})})){let l=y[0];return"defaultValue"in l?S(u,l):"notTypes"in l?p(u,l):n(u,...[l.isTypes].flat())}let x=typeof u=="symbol"?Symbol.isSymbol:u;return y.length>1?E(x,...y):i(u,...y)}function o(u){return u?.[Symbol.proxy]??n(u)}function i(u,...y){let{noInput:x,noShouldbe:l,compareTo:d,inputCTOR:v,isNaN:L,isInfinity:O,shouldBeFirstElementIsNothing:J}=w(u,...y);switch(y=y.length&&y[0],!0){case J:return String(u)===String(d);case(u?.[Symbol.proxy]&&l):return u[Symbol.proxy];case L:return l?"NaN":t({trial:B=>String(d)})===String(u);case O:return l?"Infinity":t({trial:B=>String(d)})===String(u);case x:return l?String(u):String(d)===String(u);case v===Boolean:return y?v===y:"Boolean";default:return f(u,y,l,a(u,v))}}function a(u,y){return u===0?Number:u===""?String:u?y:{name:String(u)}}function w(u,...y){let x=y.length<1,l=!x&&y[0],d=!x&&c(y[0]),v=u==null,L=!v&&Object.getPrototypeOf(u)?.constructor,O=t({trial:B=>String(u)})==="NaN",J=t({trial:B=>String(u)})==="Infinity";return{noInput:v,noShouldbe:x,compareTo:l,inputCTOR:L,isNaN:O,isInfinity:J,shouldBeFirstElementIsNothing:d}}function f(u,y,x,l){switch(!0){case(!x&&y===u||u?.[Symbol.proxy]&&y===Proxy):return!0;case t({trial:d=>String(y)})==="NaN":return String(u)==="NaN";case(u?.[Symbol.toStringTag]&&n(y,String)):return String(y)===u[Symbol.toStringTag];default:return y?t({trial:d=>u instanceof y})||y===l||y===Object.getPrototypeOf(l)||`${y?.name}`===l?.name:u?.[Symbol.toStringTag]&&`[object ${u?.[Symbol.toStringTag]}]`||l?.name||String(l)}}function E(u,...y){return y.some(x=>n(u,x))}function c(u,y=!1){let x=u==null;return x=y?x||n(u,1/0)||n(u,NaN):x,x}function h(){let u=(y,x)=>y?.constructor===Function?y(x):void 0;return function({trial:y,whenError:x=()=>{}}={}){try{return u(y)}catch(l){return u(x,l)}}}function g(){return function(u){return Object.freeze({get value(){return u},get[Symbol.type](){return o(u)},get type(){return o(u)},[Symbol.is](...y){return n(u,...y)},is(...y){return n(u,...y)}})}}function S(u,{defaultValue:y,isTypes:x=[void 0],notTypes:l}={}){return x=x?.constructor!==Array?[x]:x,l=l&&l?.constructor!==Array?[l]:[],l.length<1?n(u,...x)?u:y:p(u,{isTypes:x,notTypes:l})?u:y}function p(u,{isTypes:y=[void 0],notTypes:x=[void 0]}={}){return y=y?.constructor!==Array?[y]:y,x=x?.constructor!==Array?[x]:x,n(u,...y)&&!n(u,...x)}function m(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return n(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return o(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...y){return n(u,...y)},enumerable:!1,configurable:!1}}))}function b(u){let y=String(Object.getPrototypeOf(u)?.constructor);return y.slice(y.indexOf("ion")+3,y.indexOf("(")).trim()}function C(u){let y=u.set;return u.set=(x,l,d)=>l===Symbol.proxy?x[l]=d:y(x,l,d),u}function N(){let u=Proxy;return{native(){Proxy=u},custom(){Proxy=new u(u,{construct(y,x){for(let d of x)d.set&&(d=C(d));let l=new y(...x);return l[Symbol.proxy]=`Proxy (${b(x[0])})`,l}})}}}}var _=Ot;function Ot({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:o,sheet:i,removeRules:a,consider:w,currentSheetID:f}=Dt({styleSheet:t,createWithId:e});function E(p,m){if(p&&m.removeProperties){Object.keys(m.removeProperties).forEach(b=>p.style.removeProperty(We(b)));return}Object.entries(m).forEach(([b,C])=>{b=We(b.trim()),C=C.trim();let N;if(/!important/.test(C)&&(C=C.slice(0,C.indexOf("!important")).trim(),N="important"),!CSS.supports(b,C))return console.error(`StylingFactory ${f} error: '${b}' with value '${C}' not supported (yet)`);ze(()=>p.style.setProperty(b,C,N),`StylingFactory ${f} (setRule4Selector) failed`)})}function c(p,m,b=i){if(p=p?.trim?.(),!te(p,String)||!p.length||/[;,]$/g.test(p))return console.error(`StylingFactory ${f} (setRules): [${p||"[no selector given]"}] is not a valid selector`);if(m.removeRule)return a(p);let C=n(p,!0),N=C||b.cssRules[b.insertRule(`${p} {}`,b.cssRules.length||0)];return w(()=>E(N,m),p,C)}function h(p){let m=p.trim().split(/{/,2),b=m.shift().trim();if(!te(b,String)||!b?.trim()?.length)return console.error(`StylingFactory ${f} (doParse): no (valid) selector could be extracted from rule ${we(p)}`);let C=Wt(m.shift());return ze(()=>c(b,C),`StylingFactory ${f} (setRules) failed`)}function g(p){let m=r(p);return m.done?m.existing:h(p)}function S(p,m){return p.trim().startsWith("@media")?g(It(p,m)):c(p,m)}return function(p,m={}){return o(p,m)&&(Object.keys(m).length?S(p,m):g(p))}}function Dt({styleSheet:t,createWithId:e}){let r="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;t=e?o(e):t;function o(g){let S=document.querySelector(`#${g}`)?.sheet;if(S)return S;let p=Object.assign(document.createElement("style"),{id:g});return document.head.insertAdjacentElement("beforeend",p),p.sheet}function i(g){return console.error(`StylingFactory ${n} [rule: ${g}]
3
- => @charset, @namespace and @import are not supported here`),{done:!0}}function a(g,S){return[...t.rules].find(p=>S?Be(p.selectorText||"",g):Jt`${Rt(g)}${[..."gim"]}`.test(p.cssText))}function w(g){return/^@charset|@import|namespace/i.test(g.trim())?i(g):g.match(/}/g)?.length>1?{existing:c(g,1),done:!0}:{done:!1}}function f(g){let S=[...t.cssRules].reduce((m,b,C)=>Be(b.selectorText||"",g)&&m.concat(C)||m,[]),p=S.length;return S.forEach(m=>t.deleteRule(m)),p>0?console.info(`\u2714 Removed ${p} instance${p>1?"s":""} of selector ${g} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${g} does not exist in ${n.slice(4)}`)}function E(g,S){return g&&te(g,String)&&g.trim().length>0&&te(S,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function c(g){g=g.trim();let S=g.slice(0,g.indexOf("{")).trim(),p=!!a(S);try{return t.insertRule(`${g}`,t.cssRules.length),p}catch(m){return console.error(`StylingFactory ${n} (tryParse) ${m.name} Error:
4
- ${m.message}
5
- Rule: ${we(g)}
6
- ${r}`),p}}function h(g,S,p){try{return g(),p}catch(m){return console.error(`StylingFactory ${n} (tryAddOrModify) ${m.name} Error:
7
- ${m.message}
8
- Rule: ${we(S)}
9
- ${r}`),p}}return{sheet:t,removeRules:f,tryParseAtOrNestedRules:w,ruleExists:a,checkParams:E,tryParse:c,consider:h,currentSheetID:n}}function It(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${jt(n)}`)}`}function we(t){let e=(t||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return t.length>e.length?`${e.trim()}...truncated`:e}function jt(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
10
- `)}function Rt(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function Jt(t,...e){let r=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&t.raw.reduce((n,o,i)=>n.concat(e[i-1]||"").concat(o),"")||t.raw.join("")).split(`
11
- `).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function We(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function ze(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function Qt(t){return t.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(e,r)=>`${r}\\3b`).split(";").map(e=>e.trim()).join(`;
1
+ var JQx=(()=>{var ye=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var lt=Object.prototype.hasOwnProperty;var ut=(t,e)=>{for(var r in e)ye(t,r,{get:e[r],enumerable:!0})},ct=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of at(e))!lt.call(t,i)&&i!==r&&ye(t,i,{get:()=>e[i],enumerable:!(n=st(e,i))||n.enumerable});return t};var ft=t=>ct(ye({},"__esModule",{value:!0}),t);var Er={};ut(Er,{default:()=>xr});var{IS:u,maybe:A,$Wrap:wr,isNothing:Tr,xProxy:Lr,addSymbolicExtensions:Cr}=dt({useSymbolicExtensions:!1});function dt(t={}){let{useSymbolicExtensions:e}=t,{shouldbeIsSingleObject:r,ISOneOf:n,isExcept:i,verifyNothingness:a,xProxy:f,determineType:S,addSymbolicExtensions:y,maybe:x,$Wrap:d}=mt(b,e);return f.custom(),e&&y(),{IS:b,maybe:x,$Wrap:d,isNothing:a,xProxy:f,addSymbolicExtensions:y};function b(m,...h){let g=typeof m=="symbol"?Symbol.isSymbol:m;switch(!0){case!!x({trial:c=>"isTypes"in(h?.[0]??{})}):return r(m,h[0]);default:return h.length>1?n(g,...h):S(m,...h)}}}function mt(t,e){let{SymbolAndCustomProxyFactory:r,maybeFactory:n,WrapAnyFactory:i,verifyNothingness:a,determineType:f}=gt(t,b),{xProxy:S,addSymbolicExtensions:y}=r(t,b,e),[x,d]=[n(),i(t,b)];return Object.freeze({shouldbeIsSingleObject:m,ISOneOf:h,isExcept:c,verifyNothingness:a,xProxy:S,determineType:f,addSymbolicExtensions:y,maybe:x,$Wrap:d});function b(o){return o?.[Symbol.proxy]??t(o)}function m(o,s){switch(!0){case"defaultValue"in s:return g(o,s);case"notTypes"in s:return c(o,s);default:return t(o,...[s.isTypes].flat())}}function h(o,...s){return s.some(l=>t(o,l))}function g(o,{defaultValue:s,isTypes:l=[void 0],notTypes:p}={}){return l=l?.constructor!==Array?[l]:l,p=p&&p?.constructor!==Array?[p]:[],p.length<1?t(o,...l)?o:s:c(o,{isTypes:l,notTypes:p})?o:s}function c(o,{isTypes:s=[void 0],notTypes:l=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,l=l?.constructor!==Array?[l]:l,t(o,...s)&&!t(o,...l)}}function gt(){let t={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},e={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:n,maybeFactory:g,WrapAnyFactory:h,verifyNothingness:c,determineType:y});function r(o,s){Symbol.is||(Symbol.is=Symbol.for(t.IS),Symbol.type=Symbol.for(t.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return s(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...l){return o(this,...l)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(l){return s(l)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(l,...p){return o(l,...p)},enumerable:!1,configurable:!1}}))}function n(o,s,l){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(t.IS_SYMBOL)),{xProxy:f(),addSymbolicExtensions:()=>r(o,s)}}function i(o){return Object.getPrototypeOf(o)?.constructor?.name||e.OBJECT}function a(o){return Proxy=new o(o,{construct(s,l){let p=new s(...l);return p[Symbol.proxy]=`${e.PROXY_PREFIX}${i(l[0])})`,p}}),Proxy}function f(){Symbol.proxy||(Symbol.proxy=Symbol.for(t.PROXY));let o=Proxy;return{native(){Proxy=o},custom(){Proxy=a(o)}}}function S(o,...s){let l=s.length<1,p=o==null;return{noInput:p,noShouldbe:l,compareTo:!l&&s[0],inputCTOR:!p&&(o?.constructor||Object.getPrototypeOf(o)?.constructor),isNaN:Number.isNaN(o)||A({trial:v=>String(o)===e.NAN}),isInfinity:A({trial:v=>String(o)})===e.INFINITY,shouldBeFirstElementIsNothing:!l&&c(s[0])}}function y(o,...s){let{noInput:l,noShouldbe:p,compareTo:v,inputCTOR:F,isNaN:me,isInfinity:ge,shouldBeFirstElementIsNothing:pe}=S(o,...s);switch(s=s.length&&s[0],!0){case pe:return String(o)===String(v);case(o?.[Symbol.proxy]&&p):return o[Symbol.proxy];case me:return p?e.NAN:String(v)===String(o);case ge:return p?e.INFINITY:String(v)===String(o);case l:return p?String(o):String(v)===String(o);case F===Boolean:return p?e.BOOLEAN:F===s;default:return d(o,s,p,x(o,F))}}function x(o,s){switch(!0){case o===0:return Number;case o==="":return String;case!o:return{name:String(o)};default:return s}}function d(o,s,l,p){switch(!0){case(!l&&s===o||o?.[Symbol.proxy]&&s===Proxy):return!0;case String(s)===e.NAN:return String(o)===e.NAN;case(o?.[Symbol.toStringTag]&&typeof s=="string"):return String(s)===o[Symbol.toStringTag];default:return s?m(o,s,p):b(o,p)}}function b(o,s){return(o?.[Symbol.toStringTag]??o?.prototype?.[Symbol.toStringTag])||s?.name||String(s)}function m(o,s,l){return A({trial:p=>o instanceof s})||s===l||s===Object.getPrototypeOf(l)||`${s?.name}`===l?.name}function h(o,s){return function(l){let p={get value(){return l},is(...v){return o(l,...v)},get type(){return s(l)}};return Object[Symbol.type]&&Object.defineProperties(p,{[Symbol.type]:{get(){return s(l)}},[Symbol.is]:{value(...v){return o(l,...v)}}}),Object.freeze(p)}}function g(){let o=s=>{};return function({trial:s,whenError:l=o}={}){try{return s()}catch(p){return l(p)}}}function c(o,s=!1){let l=o==null;return l=s?l||u(o,1/0)||u(o,NaN):l,l}}var Me=bt(),R=pt(),J=yt();function pt(){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 yt(){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 bt(){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 Ie={html:"innerHTML",text:"textContent",class:"className"},U=ht();function ht(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case Nt(n):return De(e,n,r);default:return De(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function De(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?i=>Lt(r):Ft(e)}}),t[e]}function St(t,e,r){return e=e?.isJQx&&e.first()||e,A({trial:n=>Ct(e)?t.append(e):je(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
2
+ `,n)})}function xt(t,e,...r){let n=Et(e,t);return r?.forEach(i=>St(n,i,t)),n}function Et(t,e){switch(t=be(e)?Tt(t):t?.isJQx?t.first():t,!0){case u(t,String):return Q(e,je(t,e)?{html:t}:{text:t});case u(t,Node):return wt(e,t);default:return Q(e,t)}}function vt(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in Ie&&(t[Ie[r]]=t[e],delete t[e])}),t}function wt(t,e){let r=Q(t);return r.append(e),r}function Q(t,e={}){e=Re(e,{});let r=Object.entries(e.data??{}),n=Object.assign(be(t)?new Comment(e?.text):document.createElement(t),vt(e));return r.length&&r.forEach(([i,a])=>n.dataset[i]=String(a)),n}function Re(t,e){return e?u(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):u(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function Tt(t){return Re(t)?t?.text??t?.textContent??"":String(t)}function Lt(t){return Q("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function je(t,e){return!be(e)&&u(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function Ct(t){return t?.constructor===Comment||t?.constructor===CharacterData}function be(t){return t?.constructor===Comment||/comment/i.test(t)}function Nt(t){return!u(Q(t),HTMLUnknownElement)}function Ft(t){return(e,...r)=>xt(t,e,...r)}var{IS:j,maybe:he,$Wrap:Pr,isNothing:Or,xProxy:Hr,addSymbolicExtensions:Mr}=At({useSymbolicExtensions:!1});function At(t={}){let{useSymbolicExtensions:e}=t,{shouldbeIsSingleObject:r,ISOneOf:n,isExcept:i,verifyNothingness:a,xProxy:f,determineType:S,addSymbolicExtensions:y,maybe:x,$Wrap:d}=$t(b,e);return f.custom(),e&&y(),{IS:b,maybe:x,$Wrap:d,isNothing:a,xProxy:f,addSymbolicExtensions:y};function b(m,...h){let g=typeof m=="symbol"?Symbol.isSymbol:m;switch(!0){case!!x({trial:c=>"isTypes"in(h?.[0]??{})}):return r(m,h[0]);default:return h.length>1?n(g,...h):S(m,...h)}}}function $t(t,e){let{SymbolAndCustomProxyFactory:r,maybeFactory:n,WrapAnyFactory:i,verifyNothingness:a,determineType:f}=Pt(t,b),{xProxy:S,addSymbolicExtensions:y}=r(t,b,e),[x,d]=[n(),i(t,b)];return Object.freeze({shouldbeIsSingleObject:m,ISOneOf:h,isExcept:c,verifyNothingness:a,xProxy:S,determineType:f,addSymbolicExtensions:y,maybe:x,$Wrap:d});function b(o){return o?.[Symbol.proxy]??t(o)}function m(o,s){switch(!0){case"defaultValue"in s:return g(o,s);case"notTypes"in s:return c(o,s);default:return t(o,...[s.isTypes].flat())}}function h(o,...s){return s.some(l=>t(o,l))}function g(o,{defaultValue:s,isTypes:l=[void 0],notTypes:p}={}){return l=l?.constructor!==Array?[l]:l,p=p&&p?.constructor!==Array?[p]:[],p.length<1?t(o,...l)?o:s:c(o,{isTypes:l,notTypes:p})?o:s}function c(o,{isTypes:s=[void 0],notTypes:l=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,l=l?.constructor!==Array?[l]:l,t(o,...s)&&!t(o,...l)}}function Pt(){let t={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},e={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:n,maybeFactory:g,WrapAnyFactory:h,verifyNothingness:c,determineType:y});function r(o,s){Symbol.is||(Symbol.is=Symbol.for(t.IS),Symbol.type=Symbol.for(t.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return s(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...l){return o(this,...l)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(l){return s(l)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(l,...p){return o(l,...p)},enumerable:!1,configurable:!1}}))}function n(o,s,l){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(t.IS_SYMBOL)),{xProxy:f(),addSymbolicExtensions:()=>r(o,s)}}function i(o){return Object.getPrototypeOf(o)?.constructor?.name||e.OBJECT}function a(o){return Proxy=new o(o,{construct(s,l){let p=new s(...l);return p[Symbol.proxy]=`${e.PROXY_PREFIX}${i(l[0])})`,p}}),Proxy}function f(){Symbol.proxy||(Symbol.proxy=Symbol.for(t.PROXY));let o=Proxy;return{native(){Proxy=o},custom(){Proxy=a(o)}}}function S(o,...s){let l=s.length<1,p=o==null;return{noInput:p,noShouldbe:l,compareTo:!l&&s[0],inputCTOR:!p&&(o?.constructor||Object.getPrototypeOf(o)?.constructor),isNaN:Number.isNaN(o)||he({trial:v=>String(o)===e.NAN}),isInfinity:he({trial:v=>String(o)})===e.INFINITY,shouldBeFirstElementIsNothing:!l&&c(s[0])}}function y(o,...s){let{noInput:l,noShouldbe:p,compareTo:v,inputCTOR:F,isNaN:me,isInfinity:ge,shouldBeFirstElementIsNothing:pe}=S(o,...s);switch(s=s.length&&s[0],!0){case pe:return String(o)===String(v);case(o?.[Symbol.proxy]&&p):return o[Symbol.proxy];case me:return p?e.NAN:String(v)===String(o);case ge:return p?e.INFINITY:String(v)===String(o);case l:return p?String(o):String(v)===String(o);case F===Boolean:return p?e.BOOLEAN:F===s;default:return d(o,s,p,x(o,F))}}function x(o,s){switch(!0){case o===0:return Number;case o==="":return String;case!o:return{name:String(o)};default:return s}}function d(o,s,l,p){switch(!0){case(!l&&s===o||o?.[Symbol.proxy]&&s===Proxy):return!0;case String(s)===e.NAN:return String(o)===e.NAN;case(o?.[Symbol.toStringTag]&&typeof s=="string"):return String(s)===o[Symbol.toStringTag];default:return s?m(o,s,p):b(o,p)}}function b(o,s){return(o?.[Symbol.toStringTag]??o?.prototype?.[Symbol.toStringTag])||s?.name||String(s)}function m(o,s,l){return he({trial:p=>o instanceof s})||s===l||s===Object.getPrototypeOf(l)||`${s?.name}`===l?.name}function h(o,s){return function(l){let p={get value(){return l},is(...v){return o(l,...v)},get type(){return s(l)}};return Object[Symbol.type]&&Object.defineProperties(p,{[Symbol.type]:{get(){return s(l)}},[Symbol.is]:{value(...v){return o(l,...v)}}}),Object.freeze(p)}}function g(){let o=s=>{};return function({trial:s,whenError:l=o}={}){try{return s()}catch(p){return l(p)}}}function c(o,s=!1){let l=o==null;return l=s?l||j(o,1/0)||j(o,NaN):l,l}}var k=Ot;function Ot({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:i,sheet:a,removeRules:f,consider:S,currentSheetID:y}=Ht({styleSheet:t,createWithId:e});function x(g,c){if(g&&c.removeProperties){Object.keys(c.removeProperties).forEach(o=>g.style.removeProperty(Je(o)));return}Object.entries(c).forEach(([o,s])=>{o=Je(o.trim()),s=s.trim();let l;if(/!important/.test(s)&&(s=s.slice(0,s.indexOf("!important")).trim(),l="important"),!CSS.supports(o,s))return console.error(`StylingFactory ${y} error: '${o}' with value '${s}' not supported (yet)`);Qe(()=>g.style.setProperty(o,s,l),`StylingFactory ${y} (setRule4Selector) failed`)})}function d(g,c,o=a){if(g=g?.trim?.(),!j(g,String)||!g.length||/[;,]$/g.test(g))return console.error(`StylingFactory ${y} (setRules): [${g||"[no selector given]"}] is not a valid selector`);if(c.removeRule)return f(g);let s=n(g,!0),l=s||o.cssRules[o.insertRule(`${g} {}`,o.cssRules.length||0)];return S(()=>x(l,c),g,s)}function b(g){let c=g.trim().split(/{/,2),o=c.shift().trim();if(!j(o,String)||!o?.trim()?.length)return console.error(`StylingFactory ${y} (doParse): no (valid) selector could be extracted from rule ${Se(g)}`);let s=Qt(c.shift());return Qe(()=>d(o,s),`StylingFactory ${y} (setRules) failed`)}function m(g){let c=r(g);return c.done?c.existing:b(g)}function h(g,c){return g.trim().startsWith("@media")?m(Mt(g,c)):d(g,c)}return function(g,c={}){return i(g,c)&&(Object.keys(c).length?h(g,c):m(g))}}function Ht({styleSheet:t,createWithId:e}){let r="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;t=e?i(e):t;function i(m){let h=document.querySelector(`#${m}`)?.sheet;if(h)return h;let g=Object.assign(document.createElement("style"),{id:m});return document.head.insertAdjacentElement("beforeend",g),g.sheet}function a(m){return console.error(`StylingFactory ${n} [rule: ${m}]
3
+ => @charset, @namespace and @import are not supported here`),{done:!0}}function f(m,h){return[...t.rules].find(g=>h?ke(g.selectorText||"",m):Rt`${Dt(m)}${[..."gim"]}`.test(g.cssText))}function S(m){return/^@charset|@import|namespace/i.test(m.trim())?a(m):m.match(/}/g)?.length>1?{existing:d(m,1),done:!0}:{done:!1}}function y(m){let h=[...t.cssRules].reduce((c,o,s)=>ke(o.selectorText||"",m)&&c.concat(s)||c,[]),g=h.length;return h.forEach(c=>t.deleteRule(c)),g>0?console.info(`\u2714 Removed ${g} instance${g>1?"s":""} of selector ${m} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${m} does not exist in ${n.slice(4)}`)}function x(m,h){return m&&j(m,String)&&m.trim().length>0&&j(h,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function d(m){m=m.trim();let h=m.slice(0,m.indexOf("{")).trim(),g=!!f(h);try{return t.insertRule(`${m}`,t.cssRules.length),g}catch(c){return console.error(`StylingFactory ${n} (tryParse) ${c.name} Error:
4
+ ${c.message}
5
+ Rule: ${Se(m)}
6
+ ${r}`),g}}function b(m,h,g){try{return m(),g}catch(c){return console.error(`StylingFactory ${n} (tryAddOrModify) ${c.name} Error:
7
+ ${c.message}
8
+ Rule: ${Se(h)}
9
+ ${r}`),g}}return{sheet:t,removeRules:y,tryParseAtOrNestedRules:S,ruleExists:f,checkParams:x,tryParse:d,consider:b,currentSheetID:n}}function Mt(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${It(n)}`)}`}function Se(t){let e=(t||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return t.length>e.length?`${e.trim()}...truncated`:e}function It(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
10
+ `)}function Dt(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function Rt(t,...e){let r=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&t.raw.reduce((n,i,a)=>n.concat(e[a-1]||"").concat(i),"")||t.raw.join("")).split(`
11
+ `).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function Je(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Qe(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function jt(t){return t.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(e,r)=>`${r}\\3b`).split(";").map(e=>e.trim()).join(`;
12
12
  `).replaceAll("\\3b",";").split(`
13
- `)}function kt(t){return t.reduce((e,r)=>{let[n,o]=[r.slice(0,r.indexOf(":")).trim(),r.slice(r.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return n&&o?{...e,[n]:o}:e},{})}function Wt(t){return kt(Qt(t))}function Be(t,e){return t?.replace("::",":")===e?.replace("::",":")}var Ee=!1,zt={on:()=>Ee=!0,off:()=>Ee=!1},D={tagsRaw:V,allowUnknownHtmlTags:zt,isAllowed(t){if(Ee)return!0;let e=s(t,String)?t.toLowerCase():t?.nodeName.toLowerCase()||"none";return e==="#text"||!!V[e]},allowTag:t=>V[t.toLowerCase()]=!0,prohibitTag:t=>V[t.toLowerCase()]=!1};var Bt=!0,re={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};function Vt(t){if(Bt&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,o])=>[...r,`${j(n)} => ${o}`],[]).join("\\000A");F.error(`JQx: HTML creation error(s): ${e}`)}}function Ut(t){let e=t.nodeName.toLowerCase(),r=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(e)&&!r.find(n=>n===e)||D.isAllowed(e)}function Q(t){let e={rawHTML:t?.parentElement?.getHTML()??"no html",removed:{}};return s(t,HTMLElement)&&[...t.childNodes].forEach(r=>{if(r?.children?.length&&Q(r),r?.attributes){let o=s(r,SVGElement)?z.svg:z.html;[...(r??{attributes:[]}).attributes].forEach(i=>{let a=i.name.trim().toLowerCase(),w=i.value.trim().toLowerCase().replace(re.whiteSpace,""),f=a==="href"?!re.validURL.test(w):re.notAllowedValues.test(w),E=a.startsWith("data")?!re.data.test(a):!!o[a];if(f||E){let c=ne(i.value||"none",60);c+=c.length===60?"...":"",e.removed[`${i.name}`]=`attribute/property/value not allowed, removed. Value: ${c}`,r.removeAttribute(i.name)}})}if(!(Ut(r)||r.constructor===CharacterData||r.constructor===Comment)){let o=(r?.outerHTML||r?.textContent).trim(),i=ne(o,60)??"EMPTY";i+=i.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${i}`,r.remove()}}),Vt(e),t}function _t(t){let e=document.createElement("div");return e.insertAdjacentHTML(H.end,t),e.childNodes.length?Q(e):void 0}function Gt(t,e,r){switch(!0){case s(t,Comment):return e.insertAdjacentHTML(r,`<!--${t.data}-->`);case s(t,Text):return e.insertAdjacentText(r,t.data||t.textContent);default:return}}function k(t=[],e=document.body,r=H.BeforeEnd){return r=r||H.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,o)=>{let i=I(o)&&Zt(o,e,r);return i?[...n,i]:n},[])}function Zt(t,e=document.body,r=H.BeforeEnd){return r=r||H.BeforeEnd,e=e?.isJQx?e?.[0]:e,s(t,Comment,Text)?Gt(t,e,r):s(t,HTMLElement)?e.insertAdjacentElement(r,t):void 0}function P(t){if(s(t,Text,Comment))return t;let e=t?.trim(),r=e?.split(/<text>|<\/text>/i)??[];if(r?.length&&(r=r.length>1?r.filter(o=>o.length).shift():void 0),e.startsWith("<!--")&&e.endsWith("-->"))return document.createComment(t.replace(/<!--|-->$/g,""));if(r||s(e,String)&&!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r??e);let n=_t(t);return n.childNodes.length<1?P(`<span data-jqxcreationerror="1">${oe(t,60)}</span>`):n.children[0]}function ie(t){if(t.node("#jqxPopup"))return;t.logger.log("JQx: [JQx].Popup first call. Dialog element created."),t.dialog({id:"jqxPopup"},t.div({id:"jqxPopupContent"})).render,t.editCssRules(...je);let e=[],[r,n]=[t("#jqxPopupContent"),t.node("#jqxPopup")],o={};return t.handle({type:"click, cancel",handlers:g,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:i,remove:a,removeModal:h});function i(m){if(n.open)switch(!0){case w(m):return;default:return a(),setTimeout(()=>i(m),200)}o={...m};let{content:b}=o;return t.IS(b,String,HTMLElement)||b?.isJQx?f():!0}function a(){return o.modal?p(o.warnMessage):E()}function w(m){for(let[b,C]of Object.entries(o))if(C!==m[b])return!1;return!0}function f(){r.clear();let{content:m,modal:b,closeAfter:C}=o;b=t.IS(b,Boolean)?b:!1;let N=b?"":t.div({id:"closeHandleIcon"});r.append(N,t.IS(m,String)?t.div(m):m),n.showModal(),!b&&t.IS(C,Number)&&S(a,C)}function E(){if(n.close(o.returnValue),c(),t.IS(o.callback,Function))return e.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function c(){e.forEach(m=>clearTimeout(m)),e=[]}function h({callback:m,value:b}={}){o.returnValue=b,o.modal=!1,o.callback=m||o.callback,a()}function g({evt:m}){if(!(Object.keys(o).length<1||!n.open)&&(m.type==="cancel"&&o.modal&&m.preventDefault(),m.target.closest("#closeHandleIcon")||!m.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),a()}function S(m,b){t.IS(m,Function)&&t.IS(b,Number)&&b>0&&(c(),e.push(setTimeout(m,b*1e3)))}function p(m){if(!t.IS(m,String,HTMLElement,Proxy))return;let b=r.find$(".warn");switch(!0){case b.is.empty:b=t.div({class:"warn"},m);default:r.append(b.addClass("active")),S(()=>r.find$(".warn").removeClass("active"),2)}}}function le(t){let e={},r="anonymous_";function n(c){if(c){let{handler:h,capture:g,type:S}=c;document.addEventListener(S,h,{capture:g})}}function o(c){if(c){let{type:h,handler:g,capture:S}=c;document.removeEventListener(h,g,{capture:S})}}function i(c,h,g,S){return function(p){if(!A(h))return c({evt:p});let m=p.target.closest(h);if(m){let b=t(m);c({self:b,me:b,evt:p}),g&&f(p.type,S)}return!0}}function a(c){return e[c]=e[c]||{},e[c]}function w(c,h){return Object.entries(a(c)).find(([g])=>g===h)}function f(c,h){let g=w(c,h);g&&(o(g[1]),delete e[c][h],delete se[h],F.warn(`Removed listener [${h}] for event type [${c}].`))}function E(c){let{type:h,handler:g,name:S,capture:p,once:m,selector:b,node:C,about:N}=c;e[h]=e[h]||{};let u=Ce(S||g.name),y=g;if(C instanceof HTMLElement){let x=C.dataset.hid||u;C.dataset.hid=x,b=`[data-hid=${x}]`}switch(!0){case!e[h][u]:return F.log(`JQx: created listener for event type ${h}, with handler name ${u}`),e[h][u]={name:u,handler:i(g,b,m,u),capture:Ve(h,p),once:!!m,type:h,initialHandler:y,selector:!!b&&b||!1,about:!!N&&N||!1,unListen(){f(h,u)}},e[h][u];default:return console.warn(`The listener [${u}] for [${h}] exists, it is not re-assigned.`)}}return{remove(...c){return f(...c)},listen:function(c){let{type:h,handler:g}=c;if(!A(h)||!s(g,Function))return;let S=E(c);if(S)return n(S),{type:h,name:S.name,unListen(){f(h,S.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var F=Kt(),Yt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],H=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(t,e){return t[String(e).toLowerCase()]??t[e]}})),Xt=[...Array(26)].map((t,e)=>String.fromCharCode(e+65)).concat([...Array(26)].map((t,e)=>String.fromCharCode(e+97))).concat([...Array(10)].map((t,e)=>`${e}`)),Te=Object.freeze({get(t,e){return t[Y(e)]||t[e]},enumerable:!1,configurable:!1}),se={};function Fe(){let t=setTimeout(()=>{});for(;t>=0;)clearTimeout(t--)}function Ce(t){return A(t)&&!/^handler|handlers$/gi.test(t.trim())?t.trim():Ue()}function $e(t){let e=!!t.node&&!s(t,Text,Comment);switch(!0){case e:let r=t.node.dataset?Object.keys(t.node.dataset).map(i=>`[data-${i}]`):[],o=[t.attr("id")&&`#${t?.attr("id")}`||void 0,t.attr("class")&&t?.attr("class").split(" ").map(i=>`.${i}`).join(", ")||void 0,r.length>0&&r.join(", ")||void 0].filter(i=>!!i).join(", ")||[];return o.length?`(${o})`:"";default:return""}}function Ue(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return se[e]?Ue():(se[e]=e,e)}function Ve(t,e){return!!Yt.find(r=>r===t)||!!e}function ce(t){return t.startsWith("data")||z.html.find(e=>t.toLowerCase()===e)}function fe(t){return t&&(t.textContent="")}function G(t,e=0,r=!0){return t=t?.parentElement,e+=t?t[r?"scrollTop":"scrollLeft"]:0,t?G(t,e,r):e}function A(t,e=1){return e=s(e,Number)&&e||1,s(t,String)&&t.length>=e}function ne(t,e=120){return oe(t,e).replace(/&lt;/g,"<")}function oe(t,e=120){return`${t}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(t.length>e?" &hellip;":"").trim()}function j(t){switch(!0){case s(t,String):let e=document.createElement("div");return e.append(t),e.innerHTML;default:return t}}function Le(t){return s(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function Kt(){let[t,e]=[!1,!0],r=[],n={get on(){return t=!0,n},get off(){return t=!1,n},get disable(){return e=!0,n},get enable(){return e=!1,n},get backLog(){return r}};function o(){e=!0}function i(){e=!1}function a(...E){return r.unshift(...E.map(c=>`${ue()} \u2A3B ${Le(c)}`)),console.error(r.slice(0,E.length).join(`
14
- `)),n}function w(...E){return r.unshift(...E.map(c=>`${ue()} \u26A0 ${Le(c)}`)),console.warn(r.slice(0,E.length).join(`
15
- `)),n}function f(...E){let c=E.map(h=>`${ue()} \u2714 ${Le(h)}`);switch(!e&&r.unshift(...c),t){case!0:console.log(c.join(`
16
- `));default:return n}}return Object.defineProperties(n,{log:{value:f,enumerable:!1},error:{value:a,enumerable:!1},warn:{value:w,enumerable:!1}}),Object.freeze(n)}function ue(){return(t=>`[${ae(t.getHours())}:${ae(t.getMinutes())}:${ae(t.getSeconds())}.${ae(t.getMilliseconds(),3)}]`)(new Date)}function Ae(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=M(r),r.startsWith("data"))return de(t,n);s(n,String)&&ce(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function de(t,e){if(t&&s(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${M(r)}`,n)}function me(t){return t?s(t,Proxy)?[t.EL]:s(t,NodeList)?[...t]:I(t)?[t]:K(t)?t:t.isJQx?t.collection:void 0:[]}function ge(t,e){return t.andThen(e)}function pe(t,e){return t.andThen(e,!0)}function I(t){return s(t,Text,HTMLElement,Comment)}function Z(t,e){if(s(e,Object))for(let[r,n]of Object.entries(e)){let o;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),o="important"),t.style.setProperty(M(r),n,o)}}function R(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function _e(t){if(!s(t,HTMLElement))return;let e=t.style,r=getComputedStyle(t),n=!![e.visibility,r.visibility].includes("hidden"),o=!![e.display,r.display].includes("none"),i=!!t.hidden,a=parseInt(r.height)<1||parseInt(r.width)<1,w=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,f=+r.opacity==0||+(e.opacity||1)==0;return!(i||w||f||o||n||a)}function Ge(t){return t?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(e=>e===t):!1}function Ze(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(Pe(r)?`<!--${r.data}-->`:be(r)?r.textContent:r.outerHTML),"")}function ae(t,e=2){return`${t}`.padStart(e,"0")}function Ye(t,e=0){return[t,e]=[Math.floor(t),Math.ceil(e)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(t-e+1)+e)}function ye(){return`_${qt(Xt).slice(0,8).join("")}`}function He(t){return t=s(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,s(t,Array)?t:s(t,String)&&t?.trim().toLowerCase()||""}function Xe(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function Ne(t,e){switch(t=String(t).trim(),!0){case/^(0|false|f)$/i.test(t):return!1;case/^(1|true|t)$/i.test(t):return!0;default:return e}}function qt(t){let e=t.length;for(;e--;){let r=Ye(e);[t[e],t[r]]=[t[r],t[e]]}return t}function Y(t){return s(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${er(e)}`||e).join(""):t}function M(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function er([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function be(t){return s(t,Comment,Text)}function Pe(t){s(t,Comment)}function Ke(t){return s(t,Text)}function X(t){return s(t,String)&&/^<|>$/.test(`${t}`.trim())}function K(t){return s(t,Array)&&!t?.find(e=>!I(e))}function he(t){return s(t,Array)&&!t?.find(e=>!X(e))}function T(t,e){let r=t.collection.filter(n=>!be(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function qe(t){return t.node?s(t.node,Comment)?`<!--${t.node.textContent}-->`:t.HTML.get(1).split(">")[0]+">...":""}function Me(t,e,r){let n=e!==document.body&&s(t,String)&&t.toLowerCase()!=="body"?e:document;try{r.collection=[...n.querySelectorAll(t)]}catch{F.warn(`JQx: Invalid CSS querySelector. [${s(t,String)?t:"Not a string!"}]`)}}function et(){return{isCommentOrTextNode:be,isNode:I,isComment:Pe,isText:Ke,isHtmlString:X,isArrayOfHtmlElements:K,isArrayOfHtmlStrings:he,ElemArray2HtmlString:Ze,input2Collection:me,setCollectionFromCssSelector:Me,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function tt(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return r=>{let n=r.node;return s(n,Node)?Object.freeze({get writable(){return Ge(n)},get modal(){return Xe(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return _e(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function rt(t,e,r,n){r&&s(e,String)&&(e={[e]:r==="-"?"":r});let o;e.className&&(o=e.className,delete e.className),o=[...t.classList].find(a=>a.startsWith("JQxClass-")||o&&a===o)||o||`JQxClass-${ye().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var tr=tt();function nt(t){return{factoryExtensions:rr(t),instanceExtensions:nr(t)}}function rr(t){return{data(e){return{get all(){return new Proxy(e[0]?.dataset??{},Te)},set(r={}){if(!e.is.empty&&s(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},get(r,n){return e.data.all[r]??n},add(r={}){if(!e.is.empty&&s(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},remove(r){return e[0]?.removeAttribute(`data-${M(r)}`),e}}},dimensions(e){if(e.is.empty)return F.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:r}=e,n=r.getBoundingClientRect().toJSON();return n.scrollTopDistance=G(r,0),n.scrollLeftDistance=G(r,0,!1),n},node(e){return e[0]},HTML(e){return{get(r,n){if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let o=r?e.outerHtml:e.html();return n?j(o):o},set(r,n=!1,o=!1){r=r.isJQx?r.HTML.get(1):r;let i=s(r,String);return r=i&&o?j(r):r,i&&(r||"").trim().length&&e.html(r,n),e},replace(r,n=!1){return e.HTML.set(r,!1,n)},append(r,n=!1){return r=s(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r,!0,n)},insert(r,n=!1){return r=s(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r+e.HTML.get(),!1,n)}}},is(e){return tr(e)},length(e){return e.collection.length},outerHtml(e){return(e.first()||{outerHTML:void 0}).outerHTML},parent(e){let r=t(e[0]?.parentNode);return r.is.empty?e:r},render(e){switch(!0){case!e.is.empty:return e.toDOM();default:return t.logger.warn("[JQx.render]: empty collection"),e}},Style(e){return{get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline(r){return e.style(r)},inSheet(r){return e.css(r)},valueOf(r){return e.is.empty?void 0:getComputedStyle(e[0])[M(r)]},nwRule(r){return e.Style.byRule({rules:r})},byRule({classes2Apply:r=[],rules:n=[]}={}){let i=s(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&s(n,String)?[n]:n,r=r&&s(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let a of r)e.addClass(a);return i?.startsWith(".")&&e.addClass(i.slice(1)),i?.startsWith("#")&&!e.attr("id")&&e.prop({id:i.slice(1)}),e}}}}}function nr(t){return{addClass(e,...r){return T(e,n=>n&&r.forEach(o=>n.classList.add(o)))},after:ge,afterMe:ge,andThen(e,r,n=!1){if(!r||!s(r,String,Node,Proxy))return F.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:s(r,Node)?t.virtual(r):t.virtual(P(r));let[o,i,a]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[o][i](...r.collection),e.collection=a,e},append(e,...r){if(e.is.empty||r.length<1)return e;let n=e.length===1;for(let o of r){if(!o.isJQx&&A(o)){let i=o.trim(),w=!/^<(.+)[^>]+>$/m.test(i)?t.text(o):P(o);T(e,f=>f.append(n?w:R(w)))}I(o)&&T(e,i=>i.append(n?o:R(o))),o.isJQx&&!o.is.empty&&T(e,i=>o.collection.forEach(a=>i.append(n?a:R(a))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!s(r,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),e;default:return(r.isJQx?r:t(r)).append(e),e}},attr(e,r,n){if(!e.node||s(e.node,Text,Comment))return e;if(!n&&A(r))return r=M(r),r==="class"?[...e.node.classList].join(" "):e.node.getAttribute(r);if(A(r)&&n)switch(r=M(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return s(r,Object)&&!e.is.empty&&Ae(e.node,r),e},before:pe,beforeMe:pe,clear(e){return T(e,fe)},closest(e,r){let n=A(r)?e.node?.closest(r):void 0;return n?t(n):e},computedStyle(e,r){let{node:n}=e;return n&&getComputedStyle(n)[r]},css(e,r,n){return T(e,o=>rt(o,r,n,t))},duplicate(e,r=!1,n=document.body){switch(!0){case e.is.empty:return F.error("Duplicating an empty JQx instance is not possible"),e;default:let o=e.collection[0].cloneNode(!0);return o.childNodes.forEach(i=>{i.removeAttribute&&i?.removeAttribute("id")}),r?t(o).toDOM(n):t.virtual(o)}},each(e,r){return T(e,r)},empty(e){return T(e,fe)},find(e,r){return e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[]},find$(e,r){return e.collection.length>0?t(r,e):e},first(e,r=!1){return e.collection.length>0?r?e.single():e.collection[0]:void 0},first$(e,r){return e.single(r)},getData(e,r,n){return e.node?.dataset?.[r]||n},hasClass(e,...r){return e.is.empty||!e.node.classList.length?!1:r.find(n=>e.node.classList.contains(n))&&!0||!1},hide(e){return T(e,r=>Z(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!A(r)):return"";case!A(r):return e.node?.getHTML()??"";default:let o=P(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return T(e,a=>(a.textContent=n?a.textContent:"",a.insertAdjacentHTML(t.at.end,o.getHTML())))}},htmlFor(e,r,n="",o=!1){if(e.is.empty||!A(r)||!A(n))return e;let i=e.find$(r);if(i.length<1)return e;let a=P(`<span>${n}</span>`);return i.each(w=>{o||(w.textContent=""),w.insertAdjacentHTML(t.at.end,a?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!s(r,String,Array)||!A(r)||n.length<1):return e;default:return t.handle({type:r,node:e.node,handler:n}),e}},once(e,r,...n){switch(!0){case(e.is.empty||!s(r,String,Array)||!A(r)||n.length<1):return e;default:return t.handle({type:r,once:!0,node:e.node,handler:n}),e}},prepend(e,...r){if(e.is.empty||!r)return;let n=e.length===1;for(let o of r){if(A(o)){o=o.trim();let a=!/^<(.+)[^>]+>$/m.test(o)?t.text(o):P(o);a=n?a:R(a),T(e,w=>w.prepend(a.cloneNode(!0)))}I(o)&&T(e,i=>i.prepend(n?o:R(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),T(e,i=>T(o,a=>i.prepend(n?a:R(a)))),o.collection.reverse())}return e},prependTo(e,r){return r.isJQx||(r=t.virtual(r)),r.prepend(e),e},prop(e,r,n){if(s(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let o=s(r,Object)?r:{[r]:n};for(let[i,a]of Object.entries(o)){if(i=i.trim(),a&&!ce(i)||!a)return!1;if(i.toLowerCase()==="id")return e[0].id=a;T(e,f=>{if(i.startsWith("data"))return f.dataset[i.slice(i.indexOf("-")+1)]=a;f[i]=a})}return e},remove(e,r){let n=i=>i.remove(),o=()=>e.collection=e.collection.filter(i=>document.documentElement.contains(i));if(r){let i=e.find$(r);return i.is.empty||(T(i,n),o()),e}return T(e,n),o(),e},rmAttr(e,...r){for(let n of r)e.node.removeAttribute(n);return e},removeClass(e,...r){return T(e,n=>{if(n)for(let o of r)n.classList.remove(o)})},renderTo(e,r,n){return r=s(r,HTMLElement)||r.isJQx?r:document.body,n=s(n,String)&&t.at[n]?n:t.at.end,e.first$().toDOM(r,n),e},replace(e,r,n){let o=e.node;return!r||!s(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||s(n,NodeList))&&(n=n[0]),o&&r&&(r=s(r,String)?o.querySelectorAll(r):r.isJQx?r.collection:r,s(r,HTMLElement,NodeList,Array)&&s(n,HTMLElement)&&(s(r,HTMLElement)?[r]:[...r]).forEach(i=>i.replaceWith(n.cloneNode(!0)))),e)},replaceClass(e,r,...n){return T(e,o=>{o.classList.remove(r);for(let i of n)o.classList.add(i)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=s(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return T(e,n=>de(n,r))},show(e){return T(e,r=>Z(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&s(r,String)):return e.find$(r);case(n&&s(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return T(e,i=>{n&&s(r,String)&&(r={[r]:n||"none"}),Z(i,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!s(r,String):return e.node.textContent;default:return T(e,o=>o.textContent=n?o.textContent+r:r)}},toDOM(e,r=document.body,n=H.BeforeEnd){return e.isVirtual=!1,k(e.collection,r,n),e},toggleClass(e,r){return T(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,o){n=s(n,Function)?n:Event,o=s(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0};let i=new n(r,o);return e.is.empty||e.each(a=>a.dispatchEvent(i)),e},val(e,r){switch(!0){case(e.is.empty||!s(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!s(r,String):return e.node.value;default:return e.node.value=s(r,String)?r:"",e}}}}var Oe,Se,{isComment:gn,isText:pn,isHtmlString:yn,isArrayOfHtmlElements:bn,isArrayOfHtmlStrings:hn,ElemArray2HtmlString:Sn,cssRuleEdit:De,addFn:or}=ir();function ir(){return{...et(),addFn:lr}}function lr(t,e){return t=t?.trim(),!A(t)||!s(e,Function)?F.error("JQx.fn: method invalid parameter(s)"):Se[t]=(r,...n)=>e(r,...n)}function sr(t){return function(e,r,n){if(e=e?.trim(),!A(e)||!s(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let o=n?{get(){return r()}}:{value(...i){return r(...i)}};try{Object.defineProperty(t,e,o)}catch{return t.warn(`JQx.staticFn: extension [${e}] already exists`)}return F.log(`JQx: added static extension function [${e}]`)}}function q(t){return new Proxy(t,Object.freeze({get:(e,r)=>ar(e,r,t)}))}function ot(t,e){return(...r)=>s(t,Function)&&t(q(e),...r)}function ar(t,e,r){switch(!0){case s(e,Symbol):return W({trial:()=>t[e],whenError:()=>t});case s(+e,Number):return t.collection?.[e]||void 0;case e in Oe:return ot(Oe[e],r)();case e in Se:return ot(Se[e],r);default:return t[e]}}function st(t){let e=mr(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function ur(t){return{allow(e){let r=/-/.test(e),n=r&&e;e=r?Y(e):e.toLowerCase(),D.allowTag(e),Object.defineProperties(t,Ie(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),D.prohibitTag(e),Object.defineProperties(t,Ie(e,!1,t))}}}function it(...t){if(t.length===1){let e=String(t.shift().trim());t=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(r=>r.trim())}for(let e of t.map(r=>r.startsWith("!")?r.slice(1,-1):r))De(e,{removeRule:1})}function cr(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(H).find(i=>n===i);let o=t(e,document.createElement("br"));if(r&&!s(r,HTMLBRElement))for(let i of o.collection)n?r.insertAdjacentElement(n,i):r.append(i);return o}}function fr(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[o,i]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,{...i,enumerable:!1})}return e}function dr(t,e,r,n){return t=M(n||t.toLowerCase()),{get(){return(...o)=>{let i=e&&r.virtual(Q(ee[t](...o)))||void 0,w=!s(i?.node,Comment,Text,void 0)?$e(i):"";return F.log(e?`JQx: created (virtual) instance from [JQx].${t} ${w}`:`JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),i}},enumerable:!1,configurable:!0}}function Ie(t,e,r,n){t=t.toLowerCase();let o=dr(t,e,r,n);return n?{[n]:o,[Y(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function mr(t){return fr(Object.entries(D.tagsRaw).reduce(gr(t),{}),xr(t))}function gr(t){return function(e,[r,n]){return Object.defineProperties(e,Ie(r,n,t)),e}}function pr(t){return function(e,r,...n){s(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function yr(t){return function(e){let{type:r,types:n,origin:o,selector:i,handler:a,handlers:w,node:f,name:E,capture:c,once:h,about:g}=e;a=w||a,r=n||r,i=o||i;let S=He(r),p=E;a=s(a,Function)?[a]:a;let m={type:S,selector:i||o,capture:c,name:p,once:h,node:f,about:g};switch(!0){case(s(S,Array)&&S.length>0):for(let b of S)m.type=b,lt(a,m,t);break;default:return lt(a,m,t)}}}function lt(t,e,r){for(let n of t)r.listen({...e,handler:n})}function br(t){return function(e,r){return r=A(r)&&r,e=A(e)&&e,r&&e&&t.listenerStore[e][r]}}function hr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:ie(t),enumerable:!1}),t.activePopup}function Sr(t){let e=(c,h)=>De(c,h),r=function(c){return _({createWithId:c||`jqx${ye()}`})},n=function(...c){for(let h of c)De(h)},o=ur(t),i=le(t),a=yr(i);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:a,capturedHandling:a,log:(...c)=>F.on.log(...c).off,warn:(...c)=>F.on.warn(...c).off,error:(...c)=>F.on.error(...c).off,handlerWrapper:i}}function xr(t){let{factoryExtensions:e,instanceExtensions:r}=nt(t);Oe=e,Se=r;let{editCssRule:n,createStyle:o,editCssRules:i,allowProhibit:a,handle:w,capturedHandling:f,log:E,warn:c,error:h,handlerWrapper:g}=Sr(t),S=br(t),p=sr(t);return{log:E,warn:c,error:h,editCssRules:i,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:j,logger:F,text(m,b=!1){return b?t.comment(m):document.createTextNode(m)},node(m,b=document){return b.querySelector(m,b)},nodes(m,b=document){return[...b.querySelectorAll(m,b)]},clearAllTimers:Fe,get staticFn(){return function(m,b,C){return p(m,b,C)}},get toBool(){return Ne},get getNamedListener(){return S},get virtual(){return cr(t)},get allowTag(){return a.allow},get prohibitTag(){return a.prohibit},get removeCssRule(){return it},get removeCssRules(){return it},get delegate(){return pr(f)},get delegateCaptured(){return f},get handle(){return f},get listen(){return g.listen},get at(){return H},get setStyle(){return n},get fn(){return or},get lenient(){return D.allowUnknownHtmlTags},get IS(){return s},get Popup(){return hr(t)},get listenerStore(){return g.ListenerStore}}}var at=st(vr());function vr(){return function(e,r,n=H.BeforeEnd){if(e?.isJQx)return e;let o=s(r,HTMLBRElement);r=(!o&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(H).find(c=>n===c)?n:void 0;let i=X(e),w=!i&&he(e)||i,f={collection:me(e)??[],isVirtual:o,isJQx:!0},E=K(f.collection);if(f.collection.length&&E)return o||f.collection.forEach(c=>{r.contains(c)||k([c],r,n)}),q(f);if(w){if([e].flat().forEach(c=>f.collection.push(P(c))),f.collection.length>0){let c=f.collection.filter(p=>p?.dataset?.jqxcreationerror);f.collection=f.collection.filter(p=>!p?.dataset?.jqxcreationerror);let g=f.collection.map(p=>`${String(p.constructor).split(/function|\(/)[1].trim()}`).length>1;f=q(f);let S=f.collection.length>0?qe(f):"sanitized: no elements remaining";F.log(`JQx: created ${f.isVirtual?"(virtual)":""} instance from ${g?"array of ":""}HTML string${g?"s":""} ${S}`),f.isVirtual||k(f.collection,r,n)}return f}return Me(e,r,f),q(f)}}var wr=at;return yt(Er);})();
13
+ `)}function Jt(t){return t.reduce((e,r)=>{let[n,i]=[r.slice(0,r.indexOf(":")).trim(),r.slice(r.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return n&&i?{...e,[n]:i}:e},{})}function Qt(t){return Jt(jt(t))}function ke(t,e){return t?.replace("::",":")===e?.replace("::",":")}var xe=!1,kt={on:()=>xe=!0,off:()=>xe=!1},P={tagsRaw:J,allowUnknownHtmlTags:kt,isAllowed(t){if(xe)return!0;let e=u(t,String)?t.toLowerCase():t?.nodeName.toLowerCase()||"none";return e==="#text"||!!J[e]},allowTag:t=>J[t.toLowerCase()]=!0,prohibitTag:t=>J[t.toLowerCase()]=!1};var Bt=!0,X={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};function Wt(t){if(Bt&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,i])=>[...r,`${H(n)} => ${i}`],[]).join("\\000A");w.error(`JQx: HTML creation error(s): ${e}`)}}function zt(t){let e=t.nodeName.toLowerCase(),r=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(e)&&!r.find(n=>n===e)||P.isAllowed(e)}function I(t){let e={rawHTML:t?.parentElement?.getHTML()??"no html",removed:{}};return u(t,HTMLElement)&&[...t.childNodes].forEach(r=>{if(r?.children?.length&&I(r),r?.attributes){let i=u(r,SVGElement)?R.svg:R.html;[...(r??{attributes:[]}).attributes].forEach(a=>{let f=a.name.trim().toLowerCase(),S=a.value.trim().toLowerCase().replace(X.whiteSpace,""),y=f==="href"?!X.validURL.test(S):X.notAllowedValues.test(S),x=f.startsWith("data")?!X.data.test(f):!!i[f];if(y||x){let d=G(a.value||"none",60);d+=d.length===60?"...":"",e.removed[`${a.name}`]=`attribute/property/value not allowed, removed. Value: ${d}`,r.removeAttribute(a.name)}})}if(!(zt(r)||r.constructor===CharacterData||r.constructor===Comment)){let i=(r?.outerHTML||r?.textContent).trim(),a=G(i,60)??"EMPTY";a+=a.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${a}`,r.remove()}}),Wt(e),t}function Yt(t){let e=document.createElement("div");return e.insertAdjacentHTML(L.end,t),e.childNodes.length?I(e):void 0}function _t(t,e,r){switch(!0){case u(t,Comment):return e.insertAdjacentHTML(r,`<!--${t.data}-->`);case u(t,Text):return e.insertAdjacentText(r,t.data||t.textContent);default:return}}function D(t=[],e=document.body,r=L.BeforeEnd){return r=r||L.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,i)=>{let a=O(i)&&Vt(i,e,r);return a?[...n,a]:n},[])}function Vt(t,e=document.body,r=L.BeforeEnd){return r=r||L.BeforeEnd,e=e?.isJQx?e?.[0]:e,u(t,Comment,Text)?_t(t,e,r):u(t,HTMLElement)?e.insertAdjacentElement(r,t):void 0}function C(t){if(u(t,Text,Comment))return t;let e=t?.trim(),r=e?.split(/<text>|<\/text>/i)??[];if(r?.length&&(r=r.length>1?r.filter(i=>i.length).shift():void 0),e.startsWith("<!--")&&e.endsWith("-->"))return document.createComment(t.replace(/<!--|-->$/g,""));if(r||u(e,String)&&!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r??e);let n=Yt(t);return n.childNodes.length<1?C(`<span data-jqxcreationerror="1">${Z(t,60)}</span>`):n.children[0]}function K(t){if(t.node("#jqxPopup"))return;t.logger.log("JQx: [JQx].Popup first call. Dialog element created."),t.dialog({id:"jqxPopup"},t.div({id:"jqxPopupContent"})).render,t.editCssRules(...Me);let e=[],[r,n]=[t("#jqxPopupContent"),t.node("#jqxPopup")],i={};return t.handle({type:"click, cancel",handlers:m,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:a,remove:f,removeModal:b});function a(c){if(n.open)switch(!0){case S(c):return;default:return f(),setTimeout(()=>a(c),200)}i={...c};let{content:o}=i;return t.IS(o,String,HTMLElement)||o?.isJQx?y():!0}function f(){return i.modal?g(i.warnMessage):x()}function S(c){for(let[o,s]of Object.entries(i))if(s!==c[o])return!1;return!0}function y(){r.clear();let{content:c,modal:o,closeAfter:s}=i;o=t.IS(o,Boolean)?o:!1;let l=o?"":t.div({id:"closeHandleIcon"});r.append(l,t.IS(c,String)?t.div(c):c),n.showModal(),!o&&t.IS(s,Number)&&h(f,s)}function x(){if(n.close(i.returnValue),d(),t.IS(i.callback,Function))return e.push(setTimeout(()=>i.callback(i.returnValue),200));i={}}function d(){e.forEach(c=>clearTimeout(c)),e=[]}function b({callback:c,value:o}={}){i.returnValue=o,i.modal=!1,i.callback=c||i.callback,f()}function m({evt:c}){if(!(Object.keys(i).length<1||!n.open)&&(c.type==="cancel"&&i.modal&&c.preventDefault(),c.target.closest("#closeHandleIcon")||!c.target.closest("#jqxPopupContent")))return i.activeTimer&&clearTimeout(i.activeTimer),f()}function h(c,o){t.IS(c,Function)&&t.IS(o,Number)&&o>0&&(d(),e.push(setTimeout(c,o*1e3)))}function g(c){if(!t.IS(c,String,HTMLElement,Proxy))return;let o=r.find$(".warn");switch(!0){case o.is.empty:o=t.div({class:"warn"},c);default:r.append(o.addClass("active")),h(()=>r.find$(".warn").removeClass("active"),2)}}}function q(t){let e={},r="anonymous_";function n(d){if(d){let{handler:b,capture:m,type:h}=d;document.addEventListener(h,b,{capture:m})}}function i(d){if(d){let{type:b,handler:m,capture:h}=d;document.removeEventListener(b,m,{capture:h})}}function a(d,b,m,h){return function(g){if(!T(b))return d({evt:g});let c=g.target.closest(b);if(c){let o=t(c);d({self:o,me:o,evt:g}),m&&y(g.type,h)}return!0}}function f(d){return e[d]=e[d]||{},e[d]}function S(d,b){return Object.entries(f(d)).find(([m])=>m===b)}function y(d,b){let m=S(d,b);m&&(i(m[1]),delete e[d][b],delete ee[b],w.warn(`Removed listener [${b}] for event type [${d}].`))}function x(d){let{type:b,handler:m,name:h,capture:g,once:c,selector:o,node:s,about:l}=d;e[b]=e[b]||{};let p=Ee(h||m.name),v=m;if(s instanceof HTMLElement){let F=s.dataset.hid||p;s.dataset.hid=F,o=`[data-hid=${F}]`}switch(!0){case!e[b][p]:return w.log(`JQx: created listener for event type ${b}, with handler name ${p}`),e[b][p]={name:p,handler:a(m,o,c,p),capture:Be(b,g),once:!!c,type:b,initialHandler:v,selector:!!o&&o||!1,about:!!l&&l||!1,unListen(){y(b,p)}},e[b][p];default:return console.warn(`The listener [${p}] for [${b}] exists, it is not re-assigned.`)}}return{remove(...d){return y(...d)},listen:function(d){let{type:b,handler:m}=d;if(!T(b)||!u(m,Function))return;let h=x(d);if(h)return n(h),{type:b,name:h.name,unListen(){y(b,h.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var w=Gt(),Ut=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],L=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(t,e){return t[String(e).toLowerCase()]??t[e]}})),Xt=[...Array(26)].map((t,e)=>String.fromCharCode(e+65)).concat([...Array(26)].map((t,e)=>String.fromCharCode(e+97))).concat([...Array(10)].map((t,e)=>`${e}`)),we=Object.freeze({get(t,e){return t[z(e)]||t[e]},enumerable:!1,configurable:!1}),ee={};function Te(){let t=setTimeout(()=>{});for(;t>=0;)clearTimeout(t--)}function Ee(t){return T(t)&&!/^handler|handlers$/gi.test(t.trim())?t.trim():We()}function Le(t){let e=!!t.node&&!u(t,Text,Comment);switch(!0){case e:let r=t.node.dataset?Object.keys(t.node.dataset).map(a=>`[data-${a}]`):[],i=[t.attr("id")&&`#${t?.attr("id")}`||void 0,t.attr("class")&&t?.attr("class").split(" ").map(a=>`.${a}`).join(", ")||void 0,r.length>0&&r.join(", ")||void 0].filter(a=>!!a).join(", ")||[];return i.length?`(${i})`:"";default:return""}}function We(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return ee[e]?We():(ee[e]=e,e)}function Be(t,e){return!!Ut.find(r=>r===t)||!!e}function ne(t){return t.startsWith("data")||R.html.find(e=>t.toLowerCase()===e)}function oe(t){return t&&(t.textContent="")}function B(t,e=0,r=!0){return t=t?.parentElement,e+=t?t[r?"scrollTop":"scrollLeft"]:0,t?B(t,e,r):e}function T(t,e=1){return e=u(e,Number)&&e||1,u(t,String)&&t.length>=e}function G(t,e=120){return Z(t,e).replace(/&lt;/g,"<")}function Z(t,e=120){return`${t}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(t.length>e?" &hellip;":"").trim()}function H(t){switch(!0){case u(t,String):let e=document.createElement("div");return e.append(t),e.innerHTML;default:return t}}function ve(t){return u(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function Gt(){let[t,e]=[!1,!0],r=[],n={get on(){return t=!0,n},get off(){return t=!1,n},get disable(){return e=!0,n},get enable(){return e=!1,n},get backLog(){return r}};function i(){e=!0}function a(){e=!1}function f(...x){return r.unshift(...x.map(d=>`${re()} \u2A3B ${ve(d)}`)),console.error(r.slice(0,x.length).join(`
14
+ `)),n}function S(...x){return r.unshift(...x.map(d=>`${re()} \u26A0 ${ve(d)}`)),console.warn(r.slice(0,x.length).join(`
15
+ `)),n}function y(...x){let d=x.map(b=>`${re()} \u2714 ${ve(b)}`);switch(!e&&r.unshift(...d),t){case!0:console.log(d.join(`
16
+ `));default:return n}}return Object.defineProperties(n,{log:{value:y,enumerable:!1},error:{value:f,enumerable:!1},warn:{value:S,enumerable:!1}}),Object.freeze(n)}function re(){return(t=>`[${te(t.getHours())}:${te(t.getMinutes())}:${te(t.getSeconds())}.${te(t.getMilliseconds(),3)}]`)(new Date)}function Ce(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=N(r),r.startsWith("data"))return ie(t,n);u(n,String)&&ne(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function ie(t,e){if(t&&u(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${N(r)}`,n)}function se(t){return t?u(t,Proxy)?[t.EL]:u(t,NodeList)?[...t]:O(t)?[t]:_(t)?t:t.isJQx?t.collection:void 0:[]}function ae(t,e){return t.andThen(e)}function le(t,e){return t.andThen(e,!0)}function O(t){return u(t,Text,HTMLElement,Comment)}function W(t,e){if(u(e,Object))for(let[r,n]of Object.entries(e)){let i;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),i="important"),t.style.setProperty(N(r),n,i)}}function M(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function ze(t){if(!u(t,HTMLElement))return;let e=t.style,r=getComputedStyle(t),n=!![e.visibility,r.visibility].includes("hidden"),i=!![e.display,r.display].includes("none"),a=!!t.hidden,f=parseInt(r.height)<1||parseInt(r.width)<1,S=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,y=+r.opacity==0||+(e.opacity||1)==0;return!(a||S||y||i||n||f)}function Ye(t){return t?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(e=>e===t):!1}function _e(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(Ae(r)?`<!--${r.data}-->`:ce(r)?r.textContent:r.outerHTML),"")}function te(t,e=2){return`${t}`.padStart(e,"0")}function Ve(t,e=0){return[t,e]=[Math.floor(t),Math.ceil(e)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(t-e+1)+e)}function ue(){return`_${Zt(Xt).slice(0,8).join("")}`}function Ne(t){return t=u(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,u(t,Array)?t:u(t,String)&&t?.trim().toLowerCase()||""}function Ue(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function Fe(t,e){switch(t=String(t).trim(),!0){case/^(0|false|f)$/i.test(t):return!1;case/^(1|true|t)$/i.test(t):return!0;default:return e}}function Zt(t){let e=t.length;for(;e--;){let r=Ve(e);[t[e],t[r]]=[t[r],t[e]]}return t}function z(t){return u(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${Kt(e)}`||e).join(""):t}function N(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function Kt([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function ce(t){return u(t,Comment,Text)}function Ae(t){u(t,Comment)}function Xe(t){return u(t,Text)}function Y(t){return u(t,String)&&/^<|>$/.test(`${t}`.trim())}function _(t){return u(t,Array)&&!t?.find(e=>!O(e))}function fe(t){return u(t,Array)&&!t?.find(e=>!Y(e))}function E(t,e){let r=t.collection.filter(n=>!ce(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function Ge(t){return t.node?u(t.node,Comment)?`<!--${t.node.textContent}-->`:t.HTML.get(1).split(">")[0]+">...":""}function $e(t,e,r){let n=e!==document.body&&u(t,String)&&t.toLowerCase()!=="body"?e:document;try{r.collection=[...n.querySelectorAll(t)]}catch{w.warn(`JQx: Invalid CSS querySelector. [${u(t,String)?t:"Not a string!"}]`)}}function Ze(){return{isCommentOrTextNode:ce,isNode:O,isComment:Ae,isText:Xe,isHtmlString:Y,isArrayOfHtmlElements:_,isArrayOfHtmlStrings:fe,ElemArray2HtmlString:_e,input2Collection:se,setCollectionFromCssSelector:$e,cssRuleEdit:k({createWithId:"JQxStylesheet"})}}function Ke(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return r=>{let n=r.node;return u(n,Node)?Object.freeze({get writable(){return Ye(n)},get modal(){return Ue(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return ze(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function qe(t,e,r,n){r&&u(e,String)&&(e={[e]:r==="-"?"":r});let i;e.className&&(i=e.className,delete e.className),i=[...t.classList].find(f=>f.startsWith("JQxClass-")||i&&f===i)||i||`JQxClass-${ue().slice(1)}`,n.editCssRule(`.${i}`,e),t.classList.add(i)}var qt=Ke();function et(t){return{factoryExtensions:er(t),instanceExtensions:tr(t)}}function er(t){return{data(e){return{get all(){return new Proxy(e[0]?.dataset??{},we)},set(r={}){if(!e.is.empty&&u(r,Object))for(let[n,i]of Object.entries(r))e.setData({[n]:i});return e},get(r,n){return e.data.all[r]??n},add(r={}){if(!e.is.empty&&u(r,Object))for(let[n,i]of Object.entries(r))e.setData({[n]:i});return e},remove(r){return e[0]?.removeAttribute(`data-${N(r)}`),e}}},dimensions(e){if(e.is.empty)return w.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:r}=e,n=r.getBoundingClientRect().toJSON();return n.scrollTopDistance=B(r,0),n.scrollLeftDistance=B(r,0,!1),n},node(e){return e[0]},HTML(e){return{get(r,n){if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let i=r?e.outerHtml:e.html();return n?H(i):i},set(r,n=!1,i=!1){r=r.isJQx?r.HTML.get(1):r;let a=u(r,String);return r=a&&i?H(r):r,a&&(r||"").trim().length&&e.html(r,n),e},replace(r,n=!1){return e.HTML.set(r,!1,n)},append(r,n=!1){return r=u(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r,!0,n)},insert(r,n=!1){return r=u(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r+e.HTML.get(),!1,n)}}},is(e){return qt(e)},length(e){return e.collection.length},outerHtml(e){return(e.first()||{outerHTML:void 0}).outerHTML},parent(e){let r=t(e[0]?.parentNode);return r.is.empty?e:r},render(e){switch(!0){case!e.is.empty:return e.toDOM();default:return t.logger.warn("[JQx.render]: empty collection"),e}},Style(e){return{get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline(r){return e.style(r)},inSheet(r){return e.css(r)},valueOf(r){return e.is.empty?void 0:getComputedStyle(e[0])[N(r)]},nwRule(r){return e.Style.byRule({rules:r})},byRule({classes2Apply:r=[],rules:n=[]}={}){let a=u(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&u(n,String)?[n]:n,r=r&&u(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let f of r)e.addClass(f);return a?.startsWith(".")&&e.addClass(a.slice(1)),a?.startsWith("#")&&!e.attr("id")&&e.prop({id:a.slice(1)}),e}}}}}function tr(t){return{addClass(e,...r){return E(e,n=>n&&r.forEach(i=>n.classList.add(i)))},after:ae,afterMe:ae,andThen(e,r,n=!1){if(!r||!u(r,String,Node,Proxy))return w.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:u(r,Node)?t.virtual(r):t.virtual(C(r));let[i,a,f]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[i][a](...r.collection),e.collection=f,e},append(e,...r){if(e.is.empty||r.length<1)return e;let n=e.length===1;for(let i of r){if(!i.isJQx&&T(i)){let a=i.trim(),S=!/^<(.+)[^>]+>$/m.test(a)?t.text(i):C(i);E(e,y=>y.append(n?S:M(S)))}O(i)&&E(e,a=>a.append(n?i:M(i))),i.isJQx&&!i.is.empty&&E(e,a=>i.collection.forEach(f=>a.append(n?f:M(f))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!u(r,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),e;default:return(r.isJQx?r:t(r)).append(e),e}},attr(e,r,n){if(!e.node||u(e.node,Text,Comment))return e;if(!n&&T(r))return r=N(r),r==="class"?[...e.node.classList].join(" "):e.node.getAttribute(r);if(T(r)&&n)switch(r=N(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return u(r,Object)&&!e.is.empty&&Ce(e.node,r),e},before:le,beforeMe:le,clear(e){return E(e,oe)},closest(e,r){let n=T(r)?e.node?.closest(r):void 0;return n?t(n):e},computedStyle(e,r){let{node:n}=e;return n&&getComputedStyle(n)[r]},css(e,r,n){return E(e,i=>qe(i,r,n,t))},duplicate(e,r=!1,n=document.body){switch(!0){case e.is.empty:return w.error("Duplicating an empty JQx instance is not possible"),e;default:let i=e.collection[0].cloneNode(!0);return i.childNodes.forEach(a=>{a.removeAttribute&&a?.removeAttribute("id")}),r?t(i).toDOM(n):t.virtual(i)}},each(e,r){return E(e,r)},empty(e){return E(e,oe)},find(e,r){return e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[]},find$(e,r){return e.collection.length>0?t(r,e):e},first(e,r=!1){return e.collection.length>0?r?e.single():e.collection[0]:void 0},first$(e,r){return e.single(r)},getData(e,r,n){return e.node?.dataset?.[r]||n},hasClass(e,...r){return e.is.empty||!e.node.classList.length?!1:r.find(n=>e.node.classList.contains(n))&&!0||!1},hide(e){return E(e,r=>W(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!T(r)):return"";case!T(r):return e.node?.getHTML()??"";default:let i=C(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return E(e,f=>(f.textContent=n?f.textContent:"",f.insertAdjacentHTML(t.at.end,i.getHTML())))}},htmlFor(e,r,n="",i=!1){if(e.is.empty||!T(r)||!T(n))return e;let a=e.find$(r);if(a.length<1)return e;let f=C(`<span>${n}</span>`);return a.each(S=>{i||(S.textContent=""),S.insertAdjacentHTML(t.at.end,f?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!u(r,String,Array)||!T(r)||n.length<1):return e;default:return t.handle({type:r,node:e.node,handler:n}),e}},once(e,r,...n){switch(!0){case(e.is.empty||!u(r,String,Array)||!T(r)||n.length<1):return e;default:return t.handle({type:r,once:!0,node:e.node,handler:n}),e}},prepend(e,...r){if(e.is.empty||!r)return;let n=e.length===1;for(let i of r){if(T(i)){i=i.trim();let f=!/^<(.+)[^>]+>$/m.test(i)?t.text(i):C(i);f=n?f:M(f),E(e,S=>S.prepend(f.cloneNode(!0)))}O(i)&&E(e,a=>a.prepend(n?i:M(i))),i.isJQx&&!i.is.empty&&(i.collection.length>1&&i.collection.reverse(),E(e,a=>E(i,f=>a.prepend(n?f:M(f)))),i.collection.reverse())}return e},prependTo(e,r){return r.isJQx||(r=t.virtual(r)),r.prepend(e),e},prop(e,r,n){if(u(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let i=u(r,Object)?r:{[r]:n};for(let[a,f]of Object.entries(i)){if(a=a.trim(),f&&!ne(a)||!f)return!1;if(a.toLowerCase()==="id")return e[0].id=f;E(e,y=>{if(a.startsWith("data"))return y.dataset[a.slice(a.indexOf("-")+1)]=f;y[a]=f})}return e},remove(e,r){let n=a=>a.remove(),i=()=>e.collection=e.collection.filter(a=>document.documentElement.contains(a));if(r){let a=e.find$(r);return a.is.empty||(E(a,n),i()),e}return E(e,n),i(),e},rmAttr(e,...r){for(let n of r)e.node.removeAttribute(n);return e},removeClass(e,...r){return E(e,n=>{if(n)for(let i of r)n.classList.remove(i)})},renderTo(e,r,n){return r=u(r,HTMLElement)||r.isJQx?r:document.body,n=u(n,String)&&t.at[n]?n:t.at.end,e.first$().toDOM(r,n),e},replace(e,r,n){let i=e.node;return!r||!u(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||u(n,NodeList))&&(n=n[0]),i&&r&&(r=u(r,String)?i.querySelectorAll(r):r.isJQx?r.collection:r,u(r,HTMLElement,NodeList,Array)&&u(n,HTMLElement)&&(u(r,HTMLElement)?[r]:[...r]).forEach(a=>a.replaceWith(n.cloneNode(!0)))),e)},replaceClass(e,r,...n){return E(e,i=>{i.classList.remove(r);for(let a of n)i.classList.add(a)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=u(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return E(e,n=>ie(n,r))},show(e){return E(e,r=>W(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&u(r,String)):return e.find$(r);case(n&&u(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return E(e,a=>{n&&u(r,String)&&(r={[r]:n||"none"}),W(a,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!u(r,String):return e.node.textContent;default:return E(e,i=>i.textContent=n?i.textContent+r:r)}},toDOM(e,r=document.body,n=L.BeforeEnd){return e.isVirtual=!1,D(e.collection,r,n),e},toggleClass(e,r){return E(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,i){n=u(n,Function)?n:Event,i=u(i,Object)?{...i,bubbles:i.bubbles??!0}:{bubbles:!0};let a=new n(r,i);return e.is.empty||e.each(f=>f.dispatchEvent(a)),e},val(e,r){switch(!0){case(e.is.empty||!u(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!u(r,String):return e.node.value;default:return e.node.value=u(r,String)?r:"",e}}}}var Pe,de,{isComment:dn,isText:mn,isHtmlString:gn,isArrayOfHtmlElements:pn,isArrayOfHtmlStrings:yn,ElemArray2HtmlString:bn,cssRuleEdit:Oe,addFn:rr}=nr();function nr(){return{...Ze(),addFn:or}}function or(t,e){return t=t?.trim(),!T(t)||!u(e,Function)?w.error("JQx.fn: method invalid parameter(s)"):de[t]=(r,...n)=>e(r,...n)}function ir(t){return function(e,r,n){if(e=e?.trim(),!T(e)||!u(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let i=n?{get(){return r()}}:{value(...a){return r(...a)}};try{Object.defineProperty(t,e,i)}catch{return t.warn(`JQx.staticFn: extension [${e}] already exists`)}return w.log(`JQx: added static extension function [${e}]`)}}function V(t){return new Proxy(t,Object.freeze({get:(e,r)=>sr(e,r,t)}))}function tt(t,e){return(...r)=>u(t,Function)&&t(V(e),...r)}function sr(t,e,r){switch(!0){case u(e,Symbol):return A({trial:()=>t[e],whenError:()=>t});case u(+e,Number):return t.collection?.[e]||void 0;case e in Pe:return tt(Pe[e],r)();case e in de:return tt(de[e],r);default:return t[e]}}function ot(t){let e=fr(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function ar(t){return{allow(e){let r=/-/.test(e),n=r&&e;e=r?z(e):e.toLowerCase(),P.allowTag(e),Object.defineProperties(t,He(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),P.prohibitTag(e),Object.defineProperties(t,He(e,!1,t))}}}function rt(...t){if(t.length===1){let e=String(t.shift().trim());t=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(r=>r.trim())}for(let e of t.map(r=>r.startsWith("!")?r.slice(1,-1):r))Oe(e,{removeRule:1})}function lr(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(L).find(a=>n===a);let i=t(e,document.createElement("br"));if(r&&!u(r,HTMLBRElement))for(let a of i.collection)n?r.insertAdjacentElement(n,a):r.append(a);return i}}function ur(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[i,a]of Object.entries(n))!(i in e)&&Object.defineProperty(e,i,{...a,enumerable:!1})}return e}function cr(t,e,r,n){return t=N(n||t.toLowerCase()),{get(){return(...i)=>{let a=e&&r.virtual(I(U[t](...i)))||void 0,S=!u(a?.node,Comment,Text,void 0)?Le(a):"";return w.log(e?`JQx: created (virtual) instance from [JQx].${t} ${S}`:`JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),a}},enumerable:!1,configurable:!0}}function He(t,e,r,n){t=t.toLowerCase();let i=cr(t,e,r,n);return n?{[n]:i,[z(n)]:i}:{[t]:i,[t.toUpperCase()]:i}}function fr(t){return ur(Object.entries(P.tagsRaw).reduce(dr(t),{}),hr(t))}function dr(t){return function(e,[r,n]){return Object.defineProperties(e,He(r,n,t)),e}}function mr(t){return function(e,r,...n){u(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function gr(t){return function(e){let{type:r,types:n,origin:i,selector:a,handler:f,handlers:S,node:y,name:x,capture:d,once:b,about:m}=e;f=S||f,r=n||r,a=i||a;let h=Ne(r),g=x;f=u(f,Function)?[f]:f;let c={type:h,selector:a||i,capture:d,name:g,once:b,node:y,about:m};switch(!0){case(u(h,Array)&&h.length>0):for(let o of h)c.type=o,nt(f,c,t);break;default:return nt(f,c,t)}}}function nt(t,e,r){for(let n of t)r.listen({...e,handler:n})}function pr(t){return function(e,r){return r=T(r)&&r,e=T(e)&&e,r&&e&&t.listenerStore[e][r]}}function yr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:K(t),enumerable:!1}),t.activePopup}function br(t){let e=(d,b)=>Oe(d,b),r=function(d){return k({createWithId:d||`jqx${ue()}`})},n=function(...d){for(let b of d)Oe(b)},i=ar(t),a=q(t),f=gr(a);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:i,handle:f,capturedHandling:f,log:(...d)=>w.on.log(...d).off,warn:(...d)=>w.on.warn(...d).off,error:(...d)=>w.on.error(...d).off,handlerWrapper:a}}function hr(t){let{factoryExtensions:e,instanceExtensions:r}=et(t);Pe=e,de=r;let{editCssRule:n,createStyle:i,editCssRules:a,allowProhibit:f,handle:S,capturedHandling:y,log:x,warn:d,error:b,handlerWrapper:m}=br(t),h=pr(t),g=ir(t);return{log:x,warn:d,error:b,editCssRules:a,createStyle:i,editStylesheet:i,editCssRule:n,escHtml:H,logger:w,text(c,o=!1){return o?t.comment(c):document.createTextNode(c)},node(c,o=document){return o.querySelector(c,o)},nodes(c,o=document){return[...o.querySelectorAll(c,o)]},clearAllTimers:Te,get staticFn(){return function(c,o,s){return g(c,o,s)}},get toBool(){return Fe},get getNamedListener(){return h},get virtual(){return lr(t)},get allowTag(){return f.allow},get prohibitTag(){return f.prohibit},get removeCssRule(){return rt},get removeCssRules(){return rt},get delegate(){return mr(y)},get delegateCaptured(){return y},get handle(){return y},get listen(){return m.listen},get at(){return L},get setStyle(){return n},get fn(){return rr},get lenient(){return P.allowUnknownHtmlTags},get IS(){return u},get Popup(){return yr(t)},get listenerStore(){return m.ListenerStore}}}var it=ot(Sr());function Sr(){return function(e,r,n=L.BeforeEnd){if(e?.isJQx)return e;let i=u(r,HTMLBRElement);r=(!i&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(L).find(d=>n===d)?n:void 0;let a=Y(e),S=!a&&fe(e)||a,y={collection:se(e)??[],isVirtual:i,isJQx:!0},x=_(y.collection);if(y.collection.length&&x)return i||y.collection.forEach(d=>{r.contains(d)||D([d],r,n)}),V(y);if(S){if([e].flat().forEach(d=>y.collection.push(C(d))),y.collection.length>0){let d=y.collection.filter(g=>g?.dataset?.jqxcreationerror);y.collection=y.collection.filter(g=>!g?.dataset?.jqxcreationerror);let m=y.collection.map(g=>`${String(g.constructor).split(/function|\(/)[1].trim()}`).length>1;y=V(y);let h=y.collection.length>0?Ge(y):"sanitized: no elements remaining";w.log(`JQx: created ${y.isVirtual?"(virtual)":""} instance from ${m?"array of ":""}HTML string${m?"s":""} ${h}`),y.isVirtual||D(y.collection,r,n)}return y}return $e(e,r,y),V(y)}}var xr=it;return ft(Er);})();
package/Bundle/jqx.min.js CHANGED
@@ -1,16 +1,16 @@
1
- var{IS:s,maybe:W,$Wrap:pr,isNothing:yr,xProxy:br,addSymbolicExtensions:hr}=ct({useSymbolicExtensions:!1});function ct(t={}){let{useSymbolicExtensions:e}=t,{xProxy:r,addSymbolicExtensions:n}=ft(a,f,e),o=C(),[i]=[N()];return r.custom(),e&&n(),{IS:a,maybe:o,$Wrap:i,isNothing:b,xProxy:r,addSymbolicExtensions:n};function a(l,...d){let v=typeof l=="symbol"?Symbol.isSymbol:l;switch(!0){case!!o({trial:L=>"isTypes"in(d?.[0]??{})}):return w(l,d[0]);default:return d.length>1?m(v,...d):E(l,...d)}}function w(l,d){switch(!0){case"defaultValue"in d:return u(l,d);case"notTypes"in d:return y(l,d);default:return a(l,...[d.isTypes].flat())}}function f(l){return l?.[Symbol.proxy]??a(l)}function E(l,...d){let{noInput:v,noShouldbe:L,compareTo:O,inputCTOR:J,isNaN:B,isInfinity:at,shouldBeFirstElementIsNothing:ut}=c(l,...d);switch(d=d.length&&d[0],!0){case ut:return String(l)===String(O);case(l?.[Symbol.proxy]&&L):return l[Symbol.proxy];case B:return L?"NaN":String(O)===String(l);case at:return L?"Infinity":String(O)===String(l);case v:return L?String(l):String(O)===String(l);case J===Boolean:return d?J===d:"Boolean";default:return g(l,d,L,h(l,J))}}function c(l,...d){let v=d.length<1,L=l==null;return{noInput:L,noShouldbe:v,compareTo:!v&&d[0],inputCTOR:!L&&Object.getPrototypeOf(l)?.constructor,isNaN:Number.isNaN(l)||o({trial:O=>String(l)==="NaN"}),isInfinity:o({trial:O=>String(l)})==="Infinity",shouldBeFirstElementIsNothing:!v&&b(d[0])}}function h(l,d){switch(!0){case l===0:return Number;case l==="":return String;case!l:return{name:String(l)};default:return d}}function g(l,d,v,L){switch(!0){case(!v&&d===l||l?.[Symbol.proxy]&&d===Proxy):return!0;case String(d)==="NaN":return String(l)==="NaN";case(l?.[Symbol.toStringTag]&&typeof d=="string"):return String(d)===l[Symbol.toStringTag];default:return d?p(l,d,L):S(l,L)}}function S(l,d){return(l?.[Symbol.toStringTag]??l?.prototype?.[Symbol.toStringTag])||d?.name||String(d)}function p(l,d,v){return o({trial:L=>l instanceof d})||d===v||d===Object.getPrototypeOf(v)||`${d?.name}`===v?.name}function m(l,...d){return d.some(v=>a(l,v))}function b(l,d=!1){let v=l==null;return v=d?v||a(l,1/0)||a(l,NaN):v,v}function C(){let l=d=>{};return function({trial:d,whenError:v=l}={}){try{return d()}catch(L){return v(L)}}}function N(){return function(l){return Object.freeze({get value(){return l},get[Symbol.type](){return f(l)},get type(){return f(l)},[Symbol.is](...d){return a(l,...d)},is(...d){return a(l,...d)}})}}function u(l,{defaultValue:d,isTypes:v=[void 0],notTypes:L}={}){return v=v?.constructor!==Array?[v]:v,L=L&&L?.constructor!==Array?[L]:[],L.length<1?a(l,...v)?l:d:y(l,{isTypes:v,notTypes:L})?l:d}function y(l,{isTypes:d=[void 0],notTypes:v=[void 0]}={}){return d=d?.constructor!==Array?[d]:d,v=v?.constructor!==Array?[v]:v,a(l,...d)&&!a(l,...v)}function x(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return f(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...l){return a(this,...l)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(l){return f(l)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(l,...d){return a(l,...d)},enumerable:!1,configurable:!1}}))}}function ft(t,e,r){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for("toa.isASymbol")),{xProxy:w(),addSymbolicExtensions:n};function n(){Symbol.is||(Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type")),Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return e(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...f){return t(this,...f)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(f){return e(f)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(f,...E){return t(f,...E)},enumerable:!1,configurable:!1}}))}function o(f){let E=f.set;return f.set=(c,h,g)=>h===Symbol.proxy?c[h]=g:E(c,h,g),f}function i(f){return Object.getPrototypeOf(f)?.constructor?.name||"Object"}function a(f){return Proxy=new f(f,{construct(E,c){for(let g of c)g.set&&(g=o(g));let h=new E(...c);return h[Symbol.proxy]=`Proxy (${i(c[0])})`,h}}),Proxy}function w(){Symbol.proxy||(Symbol.proxy=Symbol.for("toa.proxy"));let f=Proxy;return{native(){Proxy=f},custom(){Proxy=a(f)}}}}var Ie=gt(),z=dt(),V=mt();function dt(){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 mt(){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 gt(){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 je={html:"innerHTML",text:"textContent",class:"className"},ee=pt();function pt(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case Ct(n):return Re(e,n,r);default:return Re(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function Re(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?o=>wt(r):Lt(e)}}),t[e]}function yt(t,e,r){return e=e?.isJQx&&e.first()||e,W({trial:n=>Et(e)?t.append(e):Qe(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
2
- `,n)})}function bt(t,e,...r){let n=ht(e,t);return r?.forEach(o=>yt(n,o,t)),n}function ht(t,e){switch(t=xe(e)?vt(t):t?.isJQx?t.first():t,!0){case s(t,String):return U(e,Qe(t,e)?{html:t}:{text:t});case s(t,Node):return xt(e,t);default:return U(e,t)}}function St(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in je&&(t[je[r]]=t[e],delete t[e])}),t}function xt(t,e){let r=U(t);return r.append(e),r}function U(t,e={}){e=Je(e,{});let r=Object.entries(e.data??{}),n=Object.assign(xe(t)?new Comment(e?.text):document.createElement(t),St(e));return r.length&&r.forEach(([o,i])=>n.dataset[o]=String(i)),n}function Je(t,e){return e?s(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):s(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function vt(t){return Je(t)?t?.text??t?.textContent??"":String(t)}function wt(t){return U("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function Qe(t,e){return!xe(e)&&s(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function Et(t){return t?.constructor===Comment||t?.constructor===CharacterData}function xe(t){return t?.constructor===Comment||/comment/i.test(t)}function Ct(t){return!s(U(t),HTMLUnknownElement)}function Lt(t){return(e,...r)=>bt(t,e,...r)}var{IS:te,maybe:Er,$Wrap:Cr,xProxy:Lr,isNothing:Tr}=Tt();function Tt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),m();let t=h(),[e,r]=[g(),N()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:c,xProxy:r};function n(u,...y){if(t({trial:l=>"isTypes"in(y?.[0]??{})})){let l=y[0];return"defaultValue"in l?S(u,l):"notTypes"in l?p(u,l):n(u,...[l.isTypes].flat())}let x=typeof u=="symbol"?Symbol.isSymbol:u;return y.length>1?E(x,...y):i(u,...y)}function o(u){return u?.[Symbol.proxy]??n(u)}function i(u,...y){let{noInput:x,noShouldbe:l,compareTo:d,inputCTOR:v,isNaN:L,isInfinity:O,shouldBeFirstElementIsNothing:J}=w(u,...y);switch(y=y.length&&y[0],!0){case J:return String(u)===String(d);case(u?.[Symbol.proxy]&&l):return u[Symbol.proxy];case L:return l?"NaN":t({trial:B=>String(d)})===String(u);case O:return l?"Infinity":t({trial:B=>String(d)})===String(u);case x:return l?String(u):String(d)===String(u);case v===Boolean:return y?v===y:"Boolean";default:return f(u,y,l,a(u,v))}}function a(u,y){return u===0?Number:u===""?String:u?y:{name:String(u)}}function w(u,...y){let x=y.length<1,l=!x&&y[0],d=!x&&c(y[0]),v=u==null,L=!v&&Object.getPrototypeOf(u)?.constructor,O=t({trial:B=>String(u)})==="NaN",J=t({trial:B=>String(u)})==="Infinity";return{noInput:v,noShouldbe:x,compareTo:l,inputCTOR:L,isNaN:O,isInfinity:J,shouldBeFirstElementIsNothing:d}}function f(u,y,x,l){switch(!0){case(!x&&y===u||u?.[Symbol.proxy]&&y===Proxy):return!0;case t({trial:d=>String(y)})==="NaN":return String(u)==="NaN";case(u?.[Symbol.toStringTag]&&n(y,String)):return String(y)===u[Symbol.toStringTag];default:return y?t({trial:d=>u instanceof y})||y===l||y===Object.getPrototypeOf(l)||`${y?.name}`===l?.name:u?.[Symbol.toStringTag]&&`[object ${u?.[Symbol.toStringTag]}]`||l?.name||String(l)}}function E(u,...y){return y.some(x=>n(u,x))}function c(u,y=!1){let x=u==null;return x=y?x||n(u,1/0)||n(u,NaN):x,x}function h(){let u=(y,x)=>y?.constructor===Function?y(x):void 0;return function({trial:y,whenError:x=()=>{}}={}){try{return u(y)}catch(l){return u(x,l)}}}function g(){return function(u){return Object.freeze({get value(){return u},get[Symbol.type](){return o(u)},get type(){return o(u)},[Symbol.is](...y){return n(u,...y)},is(...y){return n(u,...y)}})}}function S(u,{defaultValue:y,isTypes:x=[void 0],notTypes:l}={}){return x=x?.constructor!==Array?[x]:x,l=l&&l?.constructor!==Array?[l]:[],l.length<1?n(u,...x)?u:y:p(u,{isTypes:x,notTypes:l})?u:y}function p(u,{isTypes:y=[void 0],notTypes:x=[void 0]}={}){return y=y?.constructor!==Array?[y]:y,x=x?.constructor!==Array?[x]:x,n(u,...y)&&!n(u,...x)}function m(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return n(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return o(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...y){return n(u,...y)},enumerable:!1,configurable:!1}}))}function b(u){let y=String(Object.getPrototypeOf(u)?.constructor);return y.slice(y.indexOf("ion")+3,y.indexOf("(")).trim()}function C(u){let y=u.set;return u.set=(x,l,d)=>l===Symbol.proxy?x[l]=d:y(x,l,d),u}function N(){let u=Proxy;return{native(){Proxy=u},custom(){Proxy=new u(u,{construct(y,x){for(let d of x)d.set&&(d=C(d));let l=new y(...x);return l[Symbol.proxy]=`Proxy (${b(x[0])})`,l}})}}}}var _=Ft;function Ft({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:o,sheet:i,removeRules:a,consider:w,currentSheetID:f}=$t({styleSheet:t,createWithId:e});function E(p,m){if(p&&m.removeProperties){Object.keys(m.removeProperties).forEach(b=>p.style.removeProperty(ke(b)));return}Object.entries(m).forEach(([b,C])=>{b=ke(b.trim()),C=C.trim();let N;if(/!important/.test(C)&&(C=C.slice(0,C.indexOf("!important")).trim(),N="important"),!CSS.supports(b,C))return console.error(`StylingFactory ${f} error: '${b}' with value '${C}' not supported (yet)`);We(()=>p.style.setProperty(b,C,N),`StylingFactory ${f} (setRule4Selector) failed`)})}function c(p,m,b=i){if(p=p?.trim?.(),!te(p,String)||!p.length||/[;,]$/g.test(p))return console.error(`StylingFactory ${f} (setRules): [${p||"[no selector given]"}] is not a valid selector`);if(m.removeRule)return a(p);let C=n(p,!0),N=C||b.cssRules[b.insertRule(`${p} {}`,b.cssRules.length||0)];return w(()=>E(N,m),p,C)}function h(p){let m=p.trim().split(/{/,2),b=m.shift().trim();if(!te(b,String)||!b?.trim()?.length)return console.error(`StylingFactory ${f} (doParse): no (valid) selector could be extracted from rule ${ve(p)}`);let C=Dt(m.shift());return We(()=>c(b,C),`StylingFactory ${f} (setRules) failed`)}function g(p){let m=r(p);return m.done?m.existing:h(p)}function S(p,m){return p.trim().startsWith("@media")?g(At(p,m)):c(p,m)}return function(p,m={}){return o(p,m)&&(Object.keys(m).length?S(p,m):g(p))}}function $t({styleSheet:t,createWithId:e}){let r="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;t=e?o(e):t;function o(g){let S=document.querySelector(`#${g}`)?.sheet;if(S)return S;let p=Object.assign(document.createElement("style"),{id:g});return document.head.insertAdjacentElement("beforeend",p),p.sheet}function i(g){return console.error(`StylingFactory ${n} [rule: ${g}]
3
- => @charset, @namespace and @import are not supported here`),{done:!0}}function a(g,S){return[...t.rules].find(p=>S?ze(p.selectorText||"",g):Pt`${Nt(g)}${[..."gim"]}`.test(p.cssText))}function w(g){return/^@charset|@import|namespace/i.test(g.trim())?i(g):g.match(/}/g)?.length>1?{existing:c(g,1),done:!0}:{done:!1}}function f(g){let S=[...t.cssRules].reduce((m,b,C)=>ze(b.selectorText||"",g)&&m.concat(C)||m,[]),p=S.length;return S.forEach(m=>t.deleteRule(m)),p>0?console.info(`\u2714 Removed ${p} instance${p>1?"s":""} of selector ${g} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${g} does not exist in ${n.slice(4)}`)}function E(g,S){return g&&te(g,String)&&g.trim().length>0&&te(S,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function c(g){g=g.trim();let S=g.slice(0,g.indexOf("{")).trim(),p=!!a(S);try{return t.insertRule(`${g}`,t.cssRules.length),p}catch(m){return console.error(`StylingFactory ${n} (tryParse) ${m.name} Error:
4
- ${m.message}
5
- Rule: ${ve(g)}
6
- ${r}`),p}}function h(g,S,p){try{return g(),p}catch(m){return console.error(`StylingFactory ${n} (tryAddOrModify) ${m.name} Error:
7
- ${m.message}
8
- Rule: ${ve(S)}
9
- ${r}`),p}}return{sheet:t,removeRules:f,tryParseAtOrNestedRules:w,ruleExists:a,checkParams:E,tryParse:c,consider:h,currentSheetID:n}}function At(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${Ht(n)}`)}`}function ve(t){let e=(t||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return t.length>e.length?`${e.trim()}...truncated`:e}function Ht(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
10
- `)}function Nt(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function Pt(t,...e){let r=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&t.raw.reduce((n,o,i)=>n.concat(e[i-1]||"").concat(o),"")||t.raw.join("")).split(`
11
- `).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function ke(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function We(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function Mt(t){return t.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(e,r)=>`${r}\\3b`).split(";").map(e=>e.trim()).join(`;
1
+ var{IS:u,maybe:A,$Wrap:mr,isNothing:gr,xProxy:pr,addSymbolicExtensions:yr}=it({useSymbolicExtensions:!1});function it(t={}){let{useSymbolicExtensions:e}=t,{shouldbeIsSingleObject:r,ISOneOf:n,isExcept:i,verifyNothingness:a,xProxy:f,determineType:S,addSymbolicExtensions:y,maybe:x,$Wrap:d}=st(b,e);return f.custom(),e&&y(),{IS:b,maybe:x,$Wrap:d,isNothing:a,xProxy:f,addSymbolicExtensions:y};function b(m,...h){let g=typeof m=="symbol"?Symbol.isSymbol:m;switch(!0){case!!x({trial:c=>"isTypes"in(h?.[0]??{})}):return r(m,h[0]);default:return h.length>1?n(g,...h):S(m,...h)}}}function st(t,e){let{SymbolAndCustomProxyFactory:r,maybeFactory:n,WrapAnyFactory:i,verifyNothingness:a,determineType:f}=at(t,b),{xProxy:S,addSymbolicExtensions:y}=r(t,b,e),[x,d]=[n(),i(t,b)];return Object.freeze({shouldbeIsSingleObject:m,ISOneOf:h,isExcept:c,verifyNothingness:a,xProxy:S,determineType:f,addSymbolicExtensions:y,maybe:x,$Wrap:d});function b(o){return o?.[Symbol.proxy]??t(o)}function m(o,s){switch(!0){case"defaultValue"in s:return g(o,s);case"notTypes"in s:return c(o,s);default:return t(o,...[s.isTypes].flat())}}function h(o,...s){return s.some(l=>t(o,l))}function g(o,{defaultValue:s,isTypes:l=[void 0],notTypes:p}={}){return l=l?.constructor!==Array?[l]:l,p=p&&p?.constructor!==Array?[p]:[],p.length<1?t(o,...l)?o:s:c(o,{isTypes:l,notTypes:p})?o:s}function c(o,{isTypes:s=[void 0],notTypes:l=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,l=l?.constructor!==Array?[l]:l,t(o,...s)&&!t(o,...l)}}function at(){let t={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},e={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:n,maybeFactory:g,WrapAnyFactory:h,verifyNothingness:c,determineType:y});function r(o,s){Symbol.is||(Symbol.is=Symbol.for(t.IS),Symbol.type=Symbol.for(t.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return s(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...l){return o(this,...l)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(l){return s(l)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(l,...p){return o(l,...p)},enumerable:!1,configurable:!1}}))}function n(o,s,l){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(t.IS_SYMBOL)),{xProxy:f(),addSymbolicExtensions:()=>r(o,s)}}function i(o){return Object.getPrototypeOf(o)?.constructor?.name||e.OBJECT}function a(o){return Proxy=new o(o,{construct(s,l){let p=new s(...l);return p[Symbol.proxy]=`${e.PROXY_PREFIX}${i(l[0])})`,p}}),Proxy}function f(){Symbol.proxy||(Symbol.proxy=Symbol.for(t.PROXY));let o=Proxy;return{native(){Proxy=o},custom(){Proxy=a(o)}}}function S(o,...s){let l=s.length<1,p=o==null;return{noInput:p,noShouldbe:l,compareTo:!l&&s[0],inputCTOR:!p&&(o?.constructor||Object.getPrototypeOf(o)?.constructor),isNaN:Number.isNaN(o)||A({trial:v=>String(o)===e.NAN}),isInfinity:A({trial:v=>String(o)})===e.INFINITY,shouldBeFirstElementIsNothing:!l&&c(s[0])}}function y(o,...s){let{noInput:l,noShouldbe:p,compareTo:v,inputCTOR:F,isNaN:me,isInfinity:ge,shouldBeFirstElementIsNothing:pe}=S(o,...s);switch(s=s.length&&s[0],!0){case pe:return String(o)===String(v);case(o?.[Symbol.proxy]&&p):return o[Symbol.proxy];case me:return p?e.NAN:String(v)===String(o);case ge:return p?e.INFINITY:String(v)===String(o);case l:return p?String(o):String(v)===String(o);case F===Boolean:return p?e.BOOLEAN:F===s;default:return d(o,s,p,x(o,F))}}function x(o,s){switch(!0){case o===0:return Number;case o==="":return String;case!o:return{name:String(o)};default:return s}}function d(o,s,l,p){switch(!0){case(!l&&s===o||o?.[Symbol.proxy]&&s===Proxy):return!0;case String(s)===e.NAN:return String(o)===e.NAN;case(o?.[Symbol.toStringTag]&&typeof s=="string"):return String(s)===o[Symbol.toStringTag];default:return s?m(o,s,p):b(o,p)}}function b(o,s){return(o?.[Symbol.toStringTag]??o?.prototype?.[Symbol.toStringTag])||s?.name||String(s)}function m(o,s,l){return A({trial:p=>o instanceof s})||s===l||s===Object.getPrototypeOf(l)||`${s?.name}`===l?.name}function h(o,s){return function(l){let p={get value(){return l},is(...v){return o(l,...v)},get type(){return s(l)}};return Object[Symbol.type]&&Object.defineProperties(p,{[Symbol.type]:{get(){return s(l)}},[Symbol.is]:{value(...v){return o(l,...v)}}}),Object.freeze(p)}}function g(){let o=s=>{};return function({trial:s,whenError:l=o}={}){try{return s()}catch(p){return l(p)}}}function c(o,s=!1){let l=o==null;return l=s?l||u(o,1/0)||u(o,NaN):l,l}}var He=ct(),R=lt(),J=ut();function lt(){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 ut(){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 ct(){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 Me={html:"innerHTML",text:"textContent",class:"className"},U=ft();function ft(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case xt(n):return Ie(e,n,r);default:return Ie(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function Ie(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?i=>ht(r):Et(e)}}),t[e]}function dt(t,e,r){return e=e?.isJQx&&e.first()||e,A({trial:n=>St(e)?t.append(e):Re(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
2
+ `,n)})}function mt(t,e,...r){let n=gt(e,t);return r?.forEach(i=>dt(n,i,t)),n}function gt(t,e){switch(t=ye(e)?bt(t):t?.isJQx?t.first():t,!0){case u(t,String):return Q(e,Re(t,e)?{html:t}:{text:t});case u(t,Node):return yt(e,t);default:return Q(e,t)}}function pt(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in Me&&(t[Me[r]]=t[e],delete t[e])}),t}function yt(t,e){let r=Q(t);return r.append(e),r}function Q(t,e={}){e=De(e,{});let r=Object.entries(e.data??{}),n=Object.assign(ye(t)?new Comment(e?.text):document.createElement(t),pt(e));return r.length&&r.forEach(([i,a])=>n.dataset[i]=String(a)),n}function De(t,e){return e?u(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):u(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function bt(t){return De(t)?t?.text??t?.textContent??"":String(t)}function ht(t){return Q("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function Re(t,e){return!ye(e)&&u(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function St(t){return t?.constructor===Comment||t?.constructor===CharacterData}function ye(t){return t?.constructor===Comment||/comment/i.test(t)}function xt(t){return!u(Q(t),HTMLUnknownElement)}function Et(t){return(e,...r)=>mt(t,e,...r)}var{IS:j,maybe:be,$Wrap:Er,isNothing:vr,xProxy:wr,addSymbolicExtensions:Tr}=vt({useSymbolicExtensions:!1});function vt(t={}){let{useSymbolicExtensions:e}=t,{shouldbeIsSingleObject:r,ISOneOf:n,isExcept:i,verifyNothingness:a,xProxy:f,determineType:S,addSymbolicExtensions:y,maybe:x,$Wrap:d}=wt(b,e);return f.custom(),e&&y(),{IS:b,maybe:x,$Wrap:d,isNothing:a,xProxy:f,addSymbolicExtensions:y};function b(m,...h){let g=typeof m=="symbol"?Symbol.isSymbol:m;switch(!0){case!!x({trial:c=>"isTypes"in(h?.[0]??{})}):return r(m,h[0]);default:return h.length>1?n(g,...h):S(m,...h)}}}function wt(t,e){let{SymbolAndCustomProxyFactory:r,maybeFactory:n,WrapAnyFactory:i,verifyNothingness:a,determineType:f}=Tt(t,b),{xProxy:S,addSymbolicExtensions:y}=r(t,b,e),[x,d]=[n(),i(t,b)];return Object.freeze({shouldbeIsSingleObject:m,ISOneOf:h,isExcept:c,verifyNothingness:a,xProxy:S,determineType:f,addSymbolicExtensions:y,maybe:x,$Wrap:d});function b(o){return o?.[Symbol.proxy]??t(o)}function m(o,s){switch(!0){case"defaultValue"in s:return g(o,s);case"notTypes"in s:return c(o,s);default:return t(o,...[s.isTypes].flat())}}function h(o,...s){return s.some(l=>t(o,l))}function g(o,{defaultValue:s,isTypes:l=[void 0],notTypes:p}={}){return l=l?.constructor!==Array?[l]:l,p=p&&p?.constructor!==Array?[p]:[],p.length<1?t(o,...l)?o:s:c(o,{isTypes:l,notTypes:p})?o:s}function c(o,{isTypes:s=[void 0],notTypes:l=[void 0]}={}){return s=s?.constructor!==Array?[s]:s,l=l?.constructor!==Array?[l]:l,t(o,...s)&&!t(o,...l)}}function Tt(){let t={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},e={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:n,maybeFactory:g,WrapAnyFactory:h,verifyNothingness:c,determineType:y});function r(o,s){Symbol.is||(Symbol.is=Symbol.for(t.IS),Symbol.type=Symbol.for(t.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return s(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...l){return o(this,...l)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(l){return s(l)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(l,...p){return o(l,...p)},enumerable:!1,configurable:!1}}))}function n(o,s,l){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(t.IS_SYMBOL)),{xProxy:f(),addSymbolicExtensions:()=>r(o,s)}}function i(o){return Object.getPrototypeOf(o)?.constructor?.name||e.OBJECT}function a(o){return Proxy=new o(o,{construct(s,l){let p=new s(...l);return p[Symbol.proxy]=`${e.PROXY_PREFIX}${i(l[0])})`,p}}),Proxy}function f(){Symbol.proxy||(Symbol.proxy=Symbol.for(t.PROXY));let o=Proxy;return{native(){Proxy=o},custom(){Proxy=a(o)}}}function S(o,...s){let l=s.length<1,p=o==null;return{noInput:p,noShouldbe:l,compareTo:!l&&s[0],inputCTOR:!p&&(o?.constructor||Object.getPrototypeOf(o)?.constructor),isNaN:Number.isNaN(o)||be({trial:v=>String(o)===e.NAN}),isInfinity:be({trial:v=>String(o)})===e.INFINITY,shouldBeFirstElementIsNothing:!l&&c(s[0])}}function y(o,...s){let{noInput:l,noShouldbe:p,compareTo:v,inputCTOR:F,isNaN:me,isInfinity:ge,shouldBeFirstElementIsNothing:pe}=S(o,...s);switch(s=s.length&&s[0],!0){case pe:return String(o)===String(v);case(o?.[Symbol.proxy]&&p):return o[Symbol.proxy];case me:return p?e.NAN:String(v)===String(o);case ge:return p?e.INFINITY:String(v)===String(o);case l:return p?String(o):String(v)===String(o);case F===Boolean:return p?e.BOOLEAN:F===s;default:return d(o,s,p,x(o,F))}}function x(o,s){switch(!0){case o===0:return Number;case o==="":return String;case!o:return{name:String(o)};default:return s}}function d(o,s,l,p){switch(!0){case(!l&&s===o||o?.[Symbol.proxy]&&s===Proxy):return!0;case String(s)===e.NAN:return String(o)===e.NAN;case(o?.[Symbol.toStringTag]&&typeof s=="string"):return String(s)===o[Symbol.toStringTag];default:return s?m(o,s,p):b(o,p)}}function b(o,s){return(o?.[Symbol.toStringTag]??o?.prototype?.[Symbol.toStringTag])||s?.name||String(s)}function m(o,s,l){return be({trial:p=>o instanceof s})||s===l||s===Object.getPrototypeOf(l)||`${s?.name}`===l?.name}function h(o,s){return function(l){let p={get value(){return l},is(...v){return o(l,...v)},get type(){return s(l)}};return Object[Symbol.type]&&Object.defineProperties(p,{[Symbol.type]:{get(){return s(l)}},[Symbol.is]:{value(...v){return o(l,...v)}}}),Object.freeze(p)}}function g(){let o=s=>{};return function({trial:s,whenError:l=o}={}){try{return s()}catch(p){return l(p)}}}function c(o,s=!1){let l=o==null;return l=s?l||j(o,1/0)||j(o,NaN):l,l}}var k=Lt;function Lt({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:i,sheet:a,removeRules:f,consider:S,currentSheetID:y}=Ct({styleSheet:t,createWithId:e});function x(g,c){if(g&&c.removeProperties){Object.keys(c.removeProperties).forEach(o=>g.style.removeProperty(je(o)));return}Object.entries(c).forEach(([o,s])=>{o=je(o.trim()),s=s.trim();let l;if(/!important/.test(s)&&(s=s.slice(0,s.indexOf("!important")).trim(),l="important"),!CSS.supports(o,s))return console.error(`StylingFactory ${y} error: '${o}' with value '${s}' not supported (yet)`);Je(()=>g.style.setProperty(o,s,l),`StylingFactory ${y} (setRule4Selector) failed`)})}function d(g,c,o=a){if(g=g?.trim?.(),!j(g,String)||!g.length||/[;,]$/g.test(g))return console.error(`StylingFactory ${y} (setRules): [${g||"[no selector given]"}] is not a valid selector`);if(c.removeRule)return f(g);let s=n(g,!0),l=s||o.cssRules[o.insertRule(`${g} {}`,o.cssRules.length||0)];return S(()=>x(l,c),g,s)}function b(g){let c=g.trim().split(/{/,2),o=c.shift().trim();if(!j(o,String)||!o?.trim()?.length)return console.error(`StylingFactory ${y} (doParse): no (valid) selector could be extracted from rule ${he(g)}`);let s=Ht(c.shift());return Je(()=>d(o,s),`StylingFactory ${y} (setRules) failed`)}function m(g){let c=r(g);return c.done?c.existing:b(g)}function h(g,c){return g.trim().startsWith("@media")?m(Nt(g,c)):d(g,c)}return function(g,c={}){return i(g,c)&&(Object.keys(c).length?h(g,c):m(g))}}function Ct({styleSheet:t,createWithId:e}){let r="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;t=e?i(e):t;function i(m){let h=document.querySelector(`#${m}`)?.sheet;if(h)return h;let g=Object.assign(document.createElement("style"),{id:m});return document.head.insertAdjacentElement("beforeend",g),g.sheet}function a(m){return console.error(`StylingFactory ${n} [rule: ${m}]
3
+ => @charset, @namespace and @import are not supported here`),{done:!0}}function f(m,h){return[...t.rules].find(g=>h?Qe(g.selectorText||"",m):$t`${At(m)}${[..."gim"]}`.test(g.cssText))}function S(m){return/^@charset|@import|namespace/i.test(m.trim())?a(m):m.match(/}/g)?.length>1?{existing:d(m,1),done:!0}:{done:!1}}function y(m){let h=[...t.cssRules].reduce((c,o,s)=>Qe(o.selectorText||"",m)&&c.concat(s)||c,[]),g=h.length;return h.forEach(c=>t.deleteRule(c)),g>0?console.info(`\u2714 Removed ${g} instance${g>1?"s":""} of selector ${m} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${m} does not exist in ${n.slice(4)}`)}function x(m,h){return m&&j(m,String)&&m.trim().length>0&&j(h,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function d(m){m=m.trim();let h=m.slice(0,m.indexOf("{")).trim(),g=!!f(h);try{return t.insertRule(`${m}`,t.cssRules.length),g}catch(c){return console.error(`StylingFactory ${n} (tryParse) ${c.name} Error:
4
+ ${c.message}
5
+ Rule: ${he(m)}
6
+ ${r}`),g}}function b(m,h,g){try{return m(),g}catch(c){return console.error(`StylingFactory ${n} (tryAddOrModify) ${c.name} Error:
7
+ ${c.message}
8
+ Rule: ${he(h)}
9
+ ${r}`),g}}return{sheet:t,removeRules:y,tryParseAtOrNestedRules:S,ruleExists:f,checkParams:x,tryParse:d,consider:b,currentSheetID:n}}function Nt(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${Ft(n)}`)}`}function he(t){let e=(t||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return t.length>e.length?`${e.trim()}...truncated`:e}function Ft(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
10
+ `)}function At(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function $t(t,...e){let r=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&t.raw.reduce((n,i,a)=>n.concat(e[a-1]||"").concat(i),"")||t.raw.join("")).split(`
11
+ `).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function je(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Je(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function Pt(t){return t.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(e,r)=>`${r}\\3b`).split(";").map(e=>e.trim()).join(`;
12
12
  `).replaceAll("\\3b",";").split(`
13
- `)}function Ot(t){return t.reduce((e,r)=>{let[n,o]=[r.slice(0,r.indexOf(":")).trim(),r.slice(r.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return n&&o?{...e,[n]:o}:e},{})}function Dt(t){return Ot(Mt(t))}function ze(t,e){return t?.replace("::",":")===e?.replace("::",":")}var we=!1,It={on:()=>we=!0,off:()=>we=!1},D={tagsRaw:V,allowUnknownHtmlTags:It,isAllowed(t){if(we)return!0;let e=s(t,String)?t.toLowerCase():t?.nodeName.toLowerCase()||"none";return e==="#text"||!!V[e]},allowTag:t=>V[t.toLowerCase()]=!0,prohibitTag:t=>V[t.toLowerCase()]=!1};var jt=!0,re={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};function Rt(t){if(jt&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,o])=>[...r,`${j(n)} => ${o}`],[]).join("\\000A");F.error(`JQx: HTML creation error(s): ${e}`)}}function Jt(t){let e=t.nodeName.toLowerCase(),r=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(e)&&!r.find(n=>n===e)||D.isAllowed(e)}function Q(t){let e={rawHTML:t?.parentElement?.getHTML()??"no html",removed:{}};return s(t,HTMLElement)&&[...t.childNodes].forEach(r=>{if(r?.children?.length&&Q(r),r?.attributes){let o=s(r,SVGElement)?z.svg:z.html;[...(r??{attributes:[]}).attributes].forEach(i=>{let a=i.name.trim().toLowerCase(),w=i.value.trim().toLowerCase().replace(re.whiteSpace,""),f=a==="href"?!re.validURL.test(w):re.notAllowedValues.test(w),E=a.startsWith("data")?!re.data.test(a):!!o[a];if(f||E){let c=ne(i.value||"none",60);c+=c.length===60?"...":"",e.removed[`${i.name}`]=`attribute/property/value not allowed, removed. Value: ${c}`,r.removeAttribute(i.name)}})}if(!(Jt(r)||r.constructor===CharacterData||r.constructor===Comment)){let o=(r?.outerHTML||r?.textContent).trim(),i=ne(o,60)??"EMPTY";i+=i.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${i}`,r.remove()}}),Rt(e),t}function Qt(t){let e=document.createElement("div");return e.insertAdjacentHTML(H.end,t),e.childNodes.length?Q(e):void 0}function kt(t,e,r){switch(!0){case s(t,Comment):return e.insertAdjacentHTML(r,`<!--${t.data}-->`);case s(t,Text):return e.insertAdjacentText(r,t.data||t.textContent);default:return}}function k(t=[],e=document.body,r=H.BeforeEnd){return r=r||H.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,o)=>{let i=I(o)&&Wt(o,e,r);return i?[...n,i]:n},[])}function Wt(t,e=document.body,r=H.BeforeEnd){return r=r||H.BeforeEnd,e=e?.isJQx?e?.[0]:e,s(t,Comment,Text)?kt(t,e,r):s(t,HTMLElement)?e.insertAdjacentElement(r,t):void 0}function P(t){if(s(t,Text,Comment))return t;let e=t?.trim(),r=e?.split(/<text>|<\/text>/i)??[];if(r?.length&&(r=r.length>1?r.filter(o=>o.length).shift():void 0),e.startsWith("<!--")&&e.endsWith("-->"))return document.createComment(t.replace(/<!--|-->$/g,""));if(r||s(e,String)&&!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r??e);let n=Qt(t);return n.childNodes.length<1?P(`<span data-jqxcreationerror="1">${oe(t,60)}</span>`):n.children[0]}function ie(t){if(t.node("#jqxPopup"))return;t.logger.log("JQx: [JQx].Popup first call. Dialog element created."),t.dialog({id:"jqxPopup"},t.div({id:"jqxPopupContent"})).render,t.editCssRules(...Ie);let e=[],[r,n]=[t("#jqxPopupContent"),t.node("#jqxPopup")],o={};return t.handle({type:"click, cancel",handlers:g,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:i,remove:a,removeModal:h});function i(m){if(n.open)switch(!0){case w(m):return;default:return a(),setTimeout(()=>i(m),200)}o={...m};let{content:b}=o;return t.IS(b,String,HTMLElement)||b?.isJQx?f():!0}function a(){return o.modal?p(o.warnMessage):E()}function w(m){for(let[b,C]of Object.entries(o))if(C!==m[b])return!1;return!0}function f(){r.clear();let{content:m,modal:b,closeAfter:C}=o;b=t.IS(b,Boolean)?b:!1;let N=b?"":t.div({id:"closeHandleIcon"});r.append(N,t.IS(m,String)?t.div(m):m),n.showModal(),!b&&t.IS(C,Number)&&S(a,C)}function E(){if(n.close(o.returnValue),c(),t.IS(o.callback,Function))return e.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function c(){e.forEach(m=>clearTimeout(m)),e=[]}function h({callback:m,value:b}={}){o.returnValue=b,o.modal=!1,o.callback=m||o.callback,a()}function g({evt:m}){if(!(Object.keys(o).length<1||!n.open)&&(m.type==="cancel"&&o.modal&&m.preventDefault(),m.target.closest("#closeHandleIcon")||!m.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),a()}function S(m,b){t.IS(m,Function)&&t.IS(b,Number)&&b>0&&(c(),e.push(setTimeout(m,b*1e3)))}function p(m){if(!t.IS(m,String,HTMLElement,Proxy))return;let b=r.find$(".warn");switch(!0){case b.is.empty:b=t.div({class:"warn"},m);default:r.append(b.addClass("active")),S(()=>r.find$(".warn").removeClass("active"),2)}}}function le(t){let e={},r="anonymous_";function n(c){if(c){let{handler:h,capture:g,type:S}=c;document.addEventListener(S,h,{capture:g})}}function o(c){if(c){let{type:h,handler:g,capture:S}=c;document.removeEventListener(h,g,{capture:S})}}function i(c,h,g,S){return function(p){if(!A(h))return c({evt:p});let m=p.target.closest(h);if(m){let b=t(m);c({self:b,me:b,evt:p}),g&&f(p.type,S)}return!0}}function a(c){return e[c]=e[c]||{},e[c]}function w(c,h){return Object.entries(a(c)).find(([g])=>g===h)}function f(c,h){let g=w(c,h);g&&(o(g[1]),delete e[c][h],delete se[h],F.warn(`Removed listener [${h}] for event type [${c}].`))}function E(c){let{type:h,handler:g,name:S,capture:p,once:m,selector:b,node:C,about:N}=c;e[h]=e[h]||{};let u=Ee(S||g.name),y=g;if(C instanceof HTMLElement){let x=C.dataset.hid||u;C.dataset.hid=x,b=`[data-hid=${x}]`}switch(!0){case!e[h][u]:return F.log(`JQx: created listener for event type ${h}, with handler name ${u}`),e[h][u]={name:u,handler:i(g,b,m,u),capture:Be(h,p),once:!!m,type:h,initialHandler:y,selector:!!b&&b||!1,about:!!N&&N||!1,unListen(){f(h,u)}},e[h][u];default:return console.warn(`The listener [${u}] for [${h}] exists, it is not re-assigned.`)}}return{remove(...c){return f(...c)},listen:function(c){let{type:h,handler:g}=c;if(!A(h)||!s(g,Function))return;let S=E(c);if(S)return n(S),{type:h,name:S.name,unListen(){f(h,S.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var F=Vt(),zt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],H=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(t,e){return t[String(e).toLowerCase()]??t[e]}})),Bt=[...Array(26)].map((t,e)=>String.fromCharCode(e+65)).concat([...Array(26)].map((t,e)=>String.fromCharCode(e+97))).concat([...Array(10)].map((t,e)=>`${e}`)),Le=Object.freeze({get(t,e){return t[Y(e)]||t[e]},enumerable:!1,configurable:!1}),se={};function Te(){let t=setTimeout(()=>{});for(;t>=0;)clearTimeout(t--)}function Ee(t){return A(t)&&!/^handler|handlers$/gi.test(t.trim())?t.trim():Ve()}function Fe(t){let e=!!t.node&&!s(t,Text,Comment);switch(!0){case e:let r=t.node.dataset?Object.keys(t.node.dataset).map(i=>`[data-${i}]`):[],o=[t.attr("id")&&`#${t?.attr("id")}`||void 0,t.attr("class")&&t?.attr("class").split(" ").map(i=>`.${i}`).join(", ")||void 0,r.length>0&&r.join(", ")||void 0].filter(i=>!!i).join(", ")||[];return o.length?`(${o})`:"";default:return""}}function Ve(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return se[e]?Ve():(se[e]=e,e)}function Be(t,e){return!!zt.find(r=>r===t)||!!e}function ce(t){return t.startsWith("data")||z.html.find(e=>t.toLowerCase()===e)}function fe(t){return t&&(t.textContent="")}function G(t,e=0,r=!0){return t=t?.parentElement,e+=t?t[r?"scrollTop":"scrollLeft"]:0,t?G(t,e,r):e}function A(t,e=1){return e=s(e,Number)&&e||1,s(t,String)&&t.length>=e}function ne(t,e=120){return oe(t,e).replace(/&lt;/g,"<")}function oe(t,e=120){return`${t}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(t.length>e?" &hellip;":"").trim()}function j(t){switch(!0){case s(t,String):let e=document.createElement("div");return e.append(t),e.innerHTML;default:return t}}function Ce(t){return s(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function Vt(){let[t,e]=[!1,!0],r=[],n={get on(){return t=!0,n},get off(){return t=!1,n},get disable(){return e=!0,n},get enable(){return e=!1,n},get backLog(){return r}};function o(){e=!0}function i(){e=!1}function a(...E){return r.unshift(...E.map(c=>`${ue()} \u2A3B ${Ce(c)}`)),console.error(r.slice(0,E.length).join(`
14
- `)),n}function w(...E){return r.unshift(...E.map(c=>`${ue()} \u26A0 ${Ce(c)}`)),console.warn(r.slice(0,E.length).join(`
15
- `)),n}function f(...E){let c=E.map(h=>`${ue()} \u2714 ${Ce(h)}`);switch(!e&&r.unshift(...c),t){case!0:console.log(c.join(`
16
- `));default:return n}}return Object.defineProperties(n,{log:{value:f,enumerable:!1},error:{value:a,enumerable:!1},warn:{value:w,enumerable:!1}}),Object.freeze(n)}function ue(){return(t=>`[${ae(t.getHours())}:${ae(t.getMinutes())}:${ae(t.getSeconds())}.${ae(t.getMilliseconds(),3)}]`)(new Date)}function $e(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=M(r),r.startsWith("data"))return de(t,n);s(n,String)&&ce(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function de(t,e){if(t&&s(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${M(r)}`,n)}function me(t){return t?s(t,Proxy)?[t.EL]:s(t,NodeList)?[...t]:I(t)?[t]:K(t)?t:t.isJQx?t.collection:void 0:[]}function ge(t,e){return t.andThen(e)}function pe(t,e){return t.andThen(e,!0)}function I(t){return s(t,Text,HTMLElement,Comment)}function Z(t,e){if(s(e,Object))for(let[r,n]of Object.entries(e)){let o;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),o="important"),t.style.setProperty(M(r),n,o)}}function R(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function Ue(t){if(!s(t,HTMLElement))return;let e=t.style,r=getComputedStyle(t),n=!![e.visibility,r.visibility].includes("hidden"),o=!![e.display,r.display].includes("none"),i=!!t.hidden,a=parseInt(r.height)<1||parseInt(r.width)<1,w=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,f=+r.opacity==0||+(e.opacity||1)==0;return!(i||w||f||o||n||a)}function _e(t){return t?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(e=>e===t):!1}function Ge(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(Ne(r)?`<!--${r.data}-->`:be(r)?r.textContent:r.outerHTML),"")}function ae(t,e=2){return`${t}`.padStart(e,"0")}function Ze(t,e=0){return[t,e]=[Math.floor(t),Math.ceil(e)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(t-e+1)+e)}function ye(){return`_${Ut(Bt).slice(0,8).join("")}`}function Ae(t){return t=s(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,s(t,Array)?t:s(t,String)&&t?.trim().toLowerCase()||""}function Ye(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function He(t,e){switch(t=String(t).trim(),!0){case/^(0|false|f)$/i.test(t):return!1;case/^(1|true|t)$/i.test(t):return!0;default:return e}}function Ut(t){let e=t.length;for(;e--;){let r=Ze(e);[t[e],t[r]]=[t[r],t[e]]}return t}function Y(t){return s(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${_t(e)}`||e).join(""):t}function M(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function _t([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function be(t){return s(t,Comment,Text)}function Ne(t){s(t,Comment)}function Xe(t){return s(t,Text)}function X(t){return s(t,String)&&/^<|>$/.test(`${t}`.trim())}function K(t){return s(t,Array)&&!t?.find(e=>!I(e))}function he(t){return s(t,Array)&&!t?.find(e=>!X(e))}function T(t,e){let r=t.collection.filter(n=>!be(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function Ke(t){return t.node?s(t.node,Comment)?`<!--${t.node.textContent}-->`:t.HTML.get(1).split(">")[0]+">...":""}function Pe(t,e,r){let n=e!==document.body&&s(t,String)&&t.toLowerCase()!=="body"?e:document;try{r.collection=[...n.querySelectorAll(t)]}catch{F.warn(`JQx: Invalid CSS querySelector. [${s(t,String)?t:"Not a string!"}]`)}}function qe(){return{isCommentOrTextNode:be,isNode:I,isComment:Ne,isText:Xe,isHtmlString:X,isArrayOfHtmlElements:K,isArrayOfHtmlStrings:he,ElemArray2HtmlString:Ge,input2Collection:me,setCollectionFromCssSelector:Pe,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function et(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return r=>{let n=r.node;return s(n,Node)?Object.freeze({get writable(){return _e(n)},get modal(){return Ye(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return Ue(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function tt(t,e,r,n){r&&s(e,String)&&(e={[e]:r==="-"?"":r});let o;e.className&&(o=e.className,delete e.className),o=[...t.classList].find(a=>a.startsWith("JQxClass-")||o&&a===o)||o||`JQxClass-${ye().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var Gt=et();function rt(t){return{factoryExtensions:Zt(t),instanceExtensions:Yt(t)}}function Zt(t){return{data(e){return{get all(){return new Proxy(e[0]?.dataset??{},Le)},set(r={}){if(!e.is.empty&&s(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},get(r,n){return e.data.all[r]??n},add(r={}){if(!e.is.empty&&s(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},remove(r){return e[0]?.removeAttribute(`data-${M(r)}`),e}}},dimensions(e){if(e.is.empty)return F.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:r}=e,n=r.getBoundingClientRect().toJSON();return n.scrollTopDistance=G(r,0),n.scrollLeftDistance=G(r,0,!1),n},node(e){return e[0]},HTML(e){return{get(r,n){if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let o=r?e.outerHtml:e.html();return n?j(o):o},set(r,n=!1,o=!1){r=r.isJQx?r.HTML.get(1):r;let i=s(r,String);return r=i&&o?j(r):r,i&&(r||"").trim().length&&e.html(r,n),e},replace(r,n=!1){return e.HTML.set(r,!1,n)},append(r,n=!1){return r=s(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r,!0,n)},insert(r,n=!1){return r=s(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r+e.HTML.get(),!1,n)}}},is(e){return Gt(e)},length(e){return e.collection.length},outerHtml(e){return(e.first()||{outerHTML:void 0}).outerHTML},parent(e){let r=t(e[0]?.parentNode);return r.is.empty?e:r},render(e){switch(!0){case!e.is.empty:return e.toDOM();default:return t.logger.warn("[JQx.render]: empty collection"),e}},Style(e){return{get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline(r){return e.style(r)},inSheet(r){return e.css(r)},valueOf(r){return e.is.empty?void 0:getComputedStyle(e[0])[M(r)]},nwRule(r){return e.Style.byRule({rules:r})},byRule({classes2Apply:r=[],rules:n=[]}={}){let i=s(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&s(n,String)?[n]:n,r=r&&s(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let a of r)e.addClass(a);return i?.startsWith(".")&&e.addClass(i.slice(1)),i?.startsWith("#")&&!e.attr("id")&&e.prop({id:i.slice(1)}),e}}}}}function Yt(t){return{addClass(e,...r){return T(e,n=>n&&r.forEach(o=>n.classList.add(o)))},after:ge,afterMe:ge,andThen(e,r,n=!1){if(!r||!s(r,String,Node,Proxy))return F.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:s(r,Node)?t.virtual(r):t.virtual(P(r));let[o,i,a]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[o][i](...r.collection),e.collection=a,e},append(e,...r){if(e.is.empty||r.length<1)return e;let n=e.length===1;for(let o of r){if(!o.isJQx&&A(o)){let i=o.trim(),w=!/^<(.+)[^>]+>$/m.test(i)?t.text(o):P(o);T(e,f=>f.append(n?w:R(w)))}I(o)&&T(e,i=>i.append(n?o:R(o))),o.isJQx&&!o.is.empty&&T(e,i=>o.collection.forEach(a=>i.append(n?a:R(a))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!s(r,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),e;default:return(r.isJQx?r:t(r)).append(e),e}},attr(e,r,n){if(!e.node||s(e.node,Text,Comment))return e;if(!n&&A(r))return r=M(r),r==="class"?[...e.node.classList].join(" "):e.node.getAttribute(r);if(A(r)&&n)switch(r=M(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return s(r,Object)&&!e.is.empty&&$e(e.node,r),e},before:pe,beforeMe:pe,clear(e){return T(e,fe)},closest(e,r){let n=A(r)?e.node?.closest(r):void 0;return n?t(n):e},computedStyle(e,r){let{node:n}=e;return n&&getComputedStyle(n)[r]},css(e,r,n){return T(e,o=>tt(o,r,n,t))},duplicate(e,r=!1,n=document.body){switch(!0){case e.is.empty:return F.error("Duplicating an empty JQx instance is not possible"),e;default:let o=e.collection[0].cloneNode(!0);return o.childNodes.forEach(i=>{i.removeAttribute&&i?.removeAttribute("id")}),r?t(o).toDOM(n):t.virtual(o)}},each(e,r){return T(e,r)},empty(e){return T(e,fe)},find(e,r){return e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[]},find$(e,r){return e.collection.length>0?t(r,e):e},first(e,r=!1){return e.collection.length>0?r?e.single():e.collection[0]:void 0},first$(e,r){return e.single(r)},getData(e,r,n){return e.node?.dataset?.[r]||n},hasClass(e,...r){return e.is.empty||!e.node.classList.length?!1:r.find(n=>e.node.classList.contains(n))&&!0||!1},hide(e){return T(e,r=>Z(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!A(r)):return"";case!A(r):return e.node?.getHTML()??"";default:let o=P(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return T(e,a=>(a.textContent=n?a.textContent:"",a.insertAdjacentHTML(t.at.end,o.getHTML())))}},htmlFor(e,r,n="",o=!1){if(e.is.empty||!A(r)||!A(n))return e;let i=e.find$(r);if(i.length<1)return e;let a=P(`<span>${n}</span>`);return i.each(w=>{o||(w.textContent=""),w.insertAdjacentHTML(t.at.end,a?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!s(r,String,Array)||!A(r)||n.length<1):return e;default:return t.handle({type:r,node:e.node,handler:n}),e}},once(e,r,...n){switch(!0){case(e.is.empty||!s(r,String,Array)||!A(r)||n.length<1):return e;default:return t.handle({type:r,once:!0,node:e.node,handler:n}),e}},prepend(e,...r){if(e.is.empty||!r)return;let n=e.length===1;for(let o of r){if(A(o)){o=o.trim();let a=!/^<(.+)[^>]+>$/m.test(o)?t.text(o):P(o);a=n?a:R(a),T(e,w=>w.prepend(a.cloneNode(!0)))}I(o)&&T(e,i=>i.prepend(n?o:R(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),T(e,i=>T(o,a=>i.prepend(n?a:R(a)))),o.collection.reverse())}return e},prependTo(e,r){return r.isJQx||(r=t.virtual(r)),r.prepend(e),e},prop(e,r,n){if(s(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let o=s(r,Object)?r:{[r]:n};for(let[i,a]of Object.entries(o)){if(i=i.trim(),a&&!ce(i)||!a)return!1;if(i.toLowerCase()==="id")return e[0].id=a;T(e,f=>{if(i.startsWith("data"))return f.dataset[i.slice(i.indexOf("-")+1)]=a;f[i]=a})}return e},remove(e,r){let n=i=>i.remove(),o=()=>e.collection=e.collection.filter(i=>document.documentElement.contains(i));if(r){let i=e.find$(r);return i.is.empty||(T(i,n),o()),e}return T(e,n),o(),e},rmAttr(e,...r){for(let n of r)e.node.removeAttribute(n);return e},removeClass(e,...r){return T(e,n=>{if(n)for(let o of r)n.classList.remove(o)})},renderTo(e,r,n){return r=s(r,HTMLElement)||r.isJQx?r:document.body,n=s(n,String)&&t.at[n]?n:t.at.end,e.first$().toDOM(r,n),e},replace(e,r,n){let o=e.node;return!r||!s(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||s(n,NodeList))&&(n=n[0]),o&&r&&(r=s(r,String)?o.querySelectorAll(r):r.isJQx?r.collection:r,s(r,HTMLElement,NodeList,Array)&&s(n,HTMLElement)&&(s(r,HTMLElement)?[r]:[...r]).forEach(i=>i.replaceWith(n.cloneNode(!0)))),e)},replaceClass(e,r,...n){return T(e,o=>{o.classList.remove(r);for(let i of n)o.classList.add(i)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=s(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return T(e,n=>de(n,r))},show(e){return T(e,r=>Z(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&s(r,String)):return e.find$(r);case(n&&s(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return T(e,i=>{n&&s(r,String)&&(r={[r]:n||"none"}),Z(i,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!s(r,String):return e.node.textContent;default:return T(e,o=>o.textContent=n?o.textContent+r:r)}},toDOM(e,r=document.body,n=H.BeforeEnd){return e.isVirtual=!1,k(e.collection,r,n),e},toggleClass(e,r){return T(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,o){n=s(n,Function)?n:Event,o=s(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0};let i=new n(r,o);return e.is.empty||e.each(a=>a.dispatchEvent(i)),e},val(e,r){switch(!0){case(e.is.empty||!s(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!s(r,String):return e.node.value;default:return e.node.value=s(r,String)?r:"",e}}}}var Me,Se,{isComment:nn,isText:on,isHtmlString:ln,isArrayOfHtmlElements:sn,isArrayOfHtmlStrings:an,ElemArray2HtmlString:un,cssRuleEdit:Oe,addFn:Xt}=Kt();function Kt(){return{...qe(),addFn:qt}}function qt(t,e){return t=t?.trim(),!A(t)||!s(e,Function)?F.error("JQx.fn: method invalid parameter(s)"):Se[t]=(r,...n)=>e(r,...n)}function er(t){return function(e,r,n){if(e=e?.trim(),!A(e)||!s(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let o=n?{get(){return r()}}:{value(...i){return r(...i)}};try{Object.defineProperty(t,e,o)}catch{return t.warn(`JQx.staticFn: extension [${e}] already exists`)}return F.log(`JQx: added static extension function [${e}]`)}}function q(t){return new Proxy(t,Object.freeze({get:(e,r)=>tr(e,r,t)}))}function nt(t,e){return(...r)=>s(t,Function)&&t(q(e),...r)}function tr(t,e,r){switch(!0){case s(e,Symbol):return W({trial:()=>t[e],whenError:()=>t});case s(+e,Number):return t.collection?.[e]||void 0;case e in Me:return nt(Me[e],r)();case e in Se:return nt(Se[e],r);default:return t[e]}}function lt(t){let e=lr(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function rr(t){return{allow(e){let r=/-/.test(e),n=r&&e;e=r?Y(e):e.toLowerCase(),D.allowTag(e),Object.defineProperties(t,De(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),D.prohibitTag(e),Object.defineProperties(t,De(e,!1,t))}}}function ot(...t){if(t.length===1){let e=String(t.shift().trim());t=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(r=>r.trim())}for(let e of t.map(r=>r.startsWith("!")?r.slice(1,-1):r))Oe(e,{removeRule:1})}function nr(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(H).find(i=>n===i);let o=t(e,document.createElement("br"));if(r&&!s(r,HTMLBRElement))for(let i of o.collection)n?r.insertAdjacentElement(n,i):r.append(i);return o}}function or(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[o,i]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,{...i,enumerable:!1})}return e}function ir(t,e,r,n){return t=M(n||t.toLowerCase()),{get(){return(...o)=>{let i=e&&r.virtual(Q(ee[t](...o)))||void 0,w=!s(i?.node,Comment,Text,void 0)?Fe(i):"";return F.log(e?`JQx: created (virtual) instance from [JQx].${t} ${w}`:`JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),i}},enumerable:!1,configurable:!0}}function De(t,e,r,n){t=t.toLowerCase();let o=ir(t,e,r,n);return n?{[n]:o,[Y(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function lr(t){return or(Object.entries(D.tagsRaw).reduce(sr(t),{}),mr(t))}function sr(t){return function(e,[r,n]){return Object.defineProperties(e,De(r,n,t)),e}}function ar(t){return function(e,r,...n){s(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function ur(t){return function(e){let{type:r,types:n,origin:o,selector:i,handler:a,handlers:w,node:f,name:E,capture:c,once:h,about:g}=e;a=w||a,r=n||r,i=o||i;let S=Ae(r),p=E;a=s(a,Function)?[a]:a;let m={type:S,selector:i||o,capture:c,name:p,once:h,node:f,about:g};switch(!0){case(s(S,Array)&&S.length>0):for(let b of S)m.type=b,it(a,m,t);break;default:return it(a,m,t)}}}function it(t,e,r){for(let n of t)r.listen({...e,handler:n})}function cr(t){return function(e,r){return r=A(r)&&r,e=A(e)&&e,r&&e&&t.listenerStore[e][r]}}function fr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:ie(t),enumerable:!1}),t.activePopup}function dr(t){let e=(c,h)=>Oe(c,h),r=function(c){return _({createWithId:c||`jqx${ye()}`})},n=function(...c){for(let h of c)Oe(h)},o=rr(t),i=le(t),a=ur(i);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:a,capturedHandling:a,log:(...c)=>F.on.log(...c).off,warn:(...c)=>F.on.warn(...c).off,error:(...c)=>F.on.error(...c).off,handlerWrapper:i}}function mr(t){let{factoryExtensions:e,instanceExtensions:r}=rt(t);Me=e,Se=r;let{editCssRule:n,createStyle:o,editCssRules:i,allowProhibit:a,handle:w,capturedHandling:f,log:E,warn:c,error:h,handlerWrapper:g}=dr(t),S=cr(t),p=er(t);return{log:E,warn:c,error:h,editCssRules:i,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:j,logger:F,text(m,b=!1){return b?t.comment(m):document.createTextNode(m)},node(m,b=document){return b.querySelector(m,b)},nodes(m,b=document){return[...b.querySelectorAll(m,b)]},clearAllTimers:Te,get staticFn(){return function(m,b,C){return p(m,b,C)}},get toBool(){return He},get getNamedListener(){return S},get virtual(){return nr(t)},get allowTag(){return a.allow},get prohibitTag(){return a.prohibit},get removeCssRule(){return ot},get removeCssRules(){return ot},get delegate(){return ar(f)},get delegateCaptured(){return f},get handle(){return f},get listen(){return g.listen},get at(){return H},get setStyle(){return n},get fn(){return Xt},get lenient(){return D.allowUnknownHtmlTags},get IS(){return s},get Popup(){return fr(t)},get listenerStore(){return g.ListenerStore}}}var st=lt(gr());function gr(){return function(e,r,n=H.BeforeEnd){if(e?.isJQx)return e;let o=s(r,HTMLBRElement);r=(!o&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(H).find(c=>n===c)?n:void 0;let i=X(e),w=!i&&he(e)||i,f={collection:me(e)??[],isVirtual:o,isJQx:!0},E=K(f.collection);if(f.collection.length&&E)return o||f.collection.forEach(c=>{r.contains(c)||k([c],r,n)}),q(f);if(w){if([e].flat().forEach(c=>f.collection.push(P(c))),f.collection.length>0){let c=f.collection.filter(p=>p?.dataset?.jqxcreationerror);f.collection=f.collection.filter(p=>!p?.dataset?.jqxcreationerror);let g=f.collection.map(p=>`${String(p.constructor).split(/function|\(/)[1].trim()}`).length>1;f=q(f);let S=f.collection.length>0?Ke(f):"sanitized: no elements remaining";F.log(`JQx: created ${f.isVirtual?"(virtual)":""} instance from ${g?"array of ":""}HTML string${g?"s":""} ${S}`),f.isVirtual||k(f.collection,r,n)}return f}return Pe(e,r,f),q(f)}}var pn=st;export{pn as default};
13
+ `)}function Ot(t){return t.reduce((e,r)=>{let[n,i]=[r.slice(0,r.indexOf(":")).trim(),r.slice(r.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return n&&i?{...e,[n]:i}:e},{})}function Ht(t){return Ot(Pt(t))}function Qe(t,e){return t?.replace("::",":")===e?.replace("::",":")}var Se=!1,Mt={on:()=>Se=!0,off:()=>Se=!1},P={tagsRaw:J,allowUnknownHtmlTags:Mt,isAllowed(t){if(Se)return!0;let e=u(t,String)?t.toLowerCase():t?.nodeName.toLowerCase()||"none";return e==="#text"||!!J[e]},allowTag:t=>J[t.toLowerCase()]=!0,prohibitTag:t=>J[t.toLowerCase()]=!1};var It=!0,X={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};function Dt(t){if(It&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,i])=>[...r,`${H(n)} => ${i}`],[]).join("\\000A");w.error(`JQx: HTML creation error(s): ${e}`)}}function Rt(t){let e=t.nodeName.toLowerCase(),r=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(e)&&!r.find(n=>n===e)||P.isAllowed(e)}function I(t){let e={rawHTML:t?.parentElement?.getHTML()??"no html",removed:{}};return u(t,HTMLElement)&&[...t.childNodes].forEach(r=>{if(r?.children?.length&&I(r),r?.attributes){let i=u(r,SVGElement)?R.svg:R.html;[...(r??{attributes:[]}).attributes].forEach(a=>{let f=a.name.trim().toLowerCase(),S=a.value.trim().toLowerCase().replace(X.whiteSpace,""),y=f==="href"?!X.validURL.test(S):X.notAllowedValues.test(S),x=f.startsWith("data")?!X.data.test(f):!!i[f];if(y||x){let d=G(a.value||"none",60);d+=d.length===60?"...":"",e.removed[`${a.name}`]=`attribute/property/value not allowed, removed. Value: ${d}`,r.removeAttribute(a.name)}})}if(!(Rt(r)||r.constructor===CharacterData||r.constructor===Comment)){let i=(r?.outerHTML||r?.textContent).trim(),a=G(i,60)??"EMPTY";a+=a.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${a}`,r.remove()}}),Dt(e),t}function jt(t){let e=document.createElement("div");return e.insertAdjacentHTML(L.end,t),e.childNodes.length?I(e):void 0}function Jt(t,e,r){switch(!0){case u(t,Comment):return e.insertAdjacentHTML(r,`<!--${t.data}-->`);case u(t,Text):return e.insertAdjacentText(r,t.data||t.textContent);default:return}}function D(t=[],e=document.body,r=L.BeforeEnd){return r=r||L.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,i)=>{let a=O(i)&&Qt(i,e,r);return a?[...n,a]:n},[])}function Qt(t,e=document.body,r=L.BeforeEnd){return r=r||L.BeforeEnd,e=e?.isJQx?e?.[0]:e,u(t,Comment,Text)?Jt(t,e,r):u(t,HTMLElement)?e.insertAdjacentElement(r,t):void 0}function C(t){if(u(t,Text,Comment))return t;let e=t?.trim(),r=e?.split(/<text>|<\/text>/i)??[];if(r?.length&&(r=r.length>1?r.filter(i=>i.length).shift():void 0),e.startsWith("<!--")&&e.endsWith("-->"))return document.createComment(t.replace(/<!--|-->$/g,""));if(r||u(e,String)&&!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r??e);let n=jt(t);return n.childNodes.length<1?C(`<span data-jqxcreationerror="1">${Z(t,60)}</span>`):n.children[0]}function K(t){if(t.node("#jqxPopup"))return;t.logger.log("JQx: [JQx].Popup first call. Dialog element created."),t.dialog({id:"jqxPopup"},t.div({id:"jqxPopupContent"})).render,t.editCssRules(...He);let e=[],[r,n]=[t("#jqxPopupContent"),t.node("#jqxPopup")],i={};return t.handle({type:"click, cancel",handlers:m,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:a,remove:f,removeModal:b});function a(c){if(n.open)switch(!0){case S(c):return;default:return f(),setTimeout(()=>a(c),200)}i={...c};let{content:o}=i;return t.IS(o,String,HTMLElement)||o?.isJQx?y():!0}function f(){return i.modal?g(i.warnMessage):x()}function S(c){for(let[o,s]of Object.entries(i))if(s!==c[o])return!1;return!0}function y(){r.clear();let{content:c,modal:o,closeAfter:s}=i;o=t.IS(o,Boolean)?o:!1;let l=o?"":t.div({id:"closeHandleIcon"});r.append(l,t.IS(c,String)?t.div(c):c),n.showModal(),!o&&t.IS(s,Number)&&h(f,s)}function x(){if(n.close(i.returnValue),d(),t.IS(i.callback,Function))return e.push(setTimeout(()=>i.callback(i.returnValue),200));i={}}function d(){e.forEach(c=>clearTimeout(c)),e=[]}function b({callback:c,value:o}={}){i.returnValue=o,i.modal=!1,i.callback=c||i.callback,f()}function m({evt:c}){if(!(Object.keys(i).length<1||!n.open)&&(c.type==="cancel"&&i.modal&&c.preventDefault(),c.target.closest("#closeHandleIcon")||!c.target.closest("#jqxPopupContent")))return i.activeTimer&&clearTimeout(i.activeTimer),f()}function h(c,o){t.IS(c,Function)&&t.IS(o,Number)&&o>0&&(d(),e.push(setTimeout(c,o*1e3)))}function g(c){if(!t.IS(c,String,HTMLElement,Proxy))return;let o=r.find$(".warn");switch(!0){case o.is.empty:o=t.div({class:"warn"},c);default:r.append(o.addClass("active")),h(()=>r.find$(".warn").removeClass("active"),2)}}}function q(t){let e={},r="anonymous_";function n(d){if(d){let{handler:b,capture:m,type:h}=d;document.addEventListener(h,b,{capture:m})}}function i(d){if(d){let{type:b,handler:m,capture:h}=d;document.removeEventListener(b,m,{capture:h})}}function a(d,b,m,h){return function(g){if(!T(b))return d({evt:g});let c=g.target.closest(b);if(c){let o=t(c);d({self:o,me:o,evt:g}),m&&y(g.type,h)}return!0}}function f(d){return e[d]=e[d]||{},e[d]}function S(d,b){return Object.entries(f(d)).find(([m])=>m===b)}function y(d,b){let m=S(d,b);m&&(i(m[1]),delete e[d][b],delete ee[b],w.warn(`Removed listener [${b}] for event type [${d}].`))}function x(d){let{type:b,handler:m,name:h,capture:g,once:c,selector:o,node:s,about:l}=d;e[b]=e[b]||{};let p=xe(h||m.name),v=m;if(s instanceof HTMLElement){let F=s.dataset.hid||p;s.dataset.hid=F,o=`[data-hid=${F}]`}switch(!0){case!e[b][p]:return w.log(`JQx: created listener for event type ${b}, with handler name ${p}`),e[b][p]={name:p,handler:a(m,o,c,p),capture:ke(b,g),once:!!c,type:b,initialHandler:v,selector:!!o&&o||!1,about:!!l&&l||!1,unListen(){y(b,p)}},e[b][p];default:return console.warn(`The listener [${p}] for [${b}] exists, it is not re-assigned.`)}}return{remove(...d){return y(...d)},listen:function(d){let{type:b,handler:m}=d;if(!T(b)||!u(m,Function))return;let h=x(d);if(h)return n(h),{type:b,name:h.name,unListen(){y(b,h.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var w=Wt(),kt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],L=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(t,e){return t[String(e).toLowerCase()]??t[e]}})),Bt=[...Array(26)].map((t,e)=>String.fromCharCode(e+65)).concat([...Array(26)].map((t,e)=>String.fromCharCode(e+97))).concat([...Array(10)].map((t,e)=>`${e}`)),ve=Object.freeze({get(t,e){return t[z(e)]||t[e]},enumerable:!1,configurable:!1}),ee={};function we(){let t=setTimeout(()=>{});for(;t>=0;)clearTimeout(t--)}function xe(t){return T(t)&&!/^handler|handlers$/gi.test(t.trim())?t.trim():Be()}function Te(t){let e=!!t.node&&!u(t,Text,Comment);switch(!0){case e:let r=t.node.dataset?Object.keys(t.node.dataset).map(a=>`[data-${a}]`):[],i=[t.attr("id")&&`#${t?.attr("id")}`||void 0,t.attr("class")&&t?.attr("class").split(" ").map(a=>`.${a}`).join(", ")||void 0,r.length>0&&r.join(", ")||void 0].filter(a=>!!a).join(", ")||[];return i.length?`(${i})`:"";default:return""}}function Be(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return ee[e]?Be():(ee[e]=e,e)}function ke(t,e){return!!kt.find(r=>r===t)||!!e}function ne(t){return t.startsWith("data")||R.html.find(e=>t.toLowerCase()===e)}function oe(t){return t&&(t.textContent="")}function B(t,e=0,r=!0){return t=t?.parentElement,e+=t?t[r?"scrollTop":"scrollLeft"]:0,t?B(t,e,r):e}function T(t,e=1){return e=u(e,Number)&&e||1,u(t,String)&&t.length>=e}function G(t,e=120){return Z(t,e).replace(/&lt;/g,"<")}function Z(t,e=120){return`${t}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(t.length>e?" &hellip;":"").trim()}function H(t){switch(!0){case u(t,String):let e=document.createElement("div");return e.append(t),e.innerHTML;default:return t}}function Ee(t){return u(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function Wt(){let[t,e]=[!1,!0],r=[],n={get on(){return t=!0,n},get off(){return t=!1,n},get disable(){return e=!0,n},get enable(){return e=!1,n},get backLog(){return r}};function i(){e=!0}function a(){e=!1}function f(...x){return r.unshift(...x.map(d=>`${re()} \u2A3B ${Ee(d)}`)),console.error(r.slice(0,x.length).join(`
14
+ `)),n}function S(...x){return r.unshift(...x.map(d=>`${re()} \u26A0 ${Ee(d)}`)),console.warn(r.slice(0,x.length).join(`
15
+ `)),n}function y(...x){let d=x.map(b=>`${re()} \u2714 ${Ee(b)}`);switch(!e&&r.unshift(...d),t){case!0:console.log(d.join(`
16
+ `));default:return n}}return Object.defineProperties(n,{log:{value:y,enumerable:!1},error:{value:f,enumerable:!1},warn:{value:S,enumerable:!1}}),Object.freeze(n)}function re(){return(t=>`[${te(t.getHours())}:${te(t.getMinutes())}:${te(t.getSeconds())}.${te(t.getMilliseconds(),3)}]`)(new Date)}function Le(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=N(r),r.startsWith("data"))return ie(t,n);u(n,String)&&ne(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function ie(t,e){if(t&&u(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${N(r)}`,n)}function se(t){return t?u(t,Proxy)?[t.EL]:u(t,NodeList)?[...t]:O(t)?[t]:_(t)?t:t.isJQx?t.collection:void 0:[]}function ae(t,e){return t.andThen(e)}function le(t,e){return t.andThen(e,!0)}function O(t){return u(t,Text,HTMLElement,Comment)}function W(t,e){if(u(e,Object))for(let[r,n]of Object.entries(e)){let i;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),i="important"),t.style.setProperty(N(r),n,i)}}function M(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function We(t){if(!u(t,HTMLElement))return;let e=t.style,r=getComputedStyle(t),n=!![e.visibility,r.visibility].includes("hidden"),i=!![e.display,r.display].includes("none"),a=!!t.hidden,f=parseInt(r.height)<1||parseInt(r.width)<1,S=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,y=+r.opacity==0||+(e.opacity||1)==0;return!(a||S||y||i||n||f)}function ze(t){return t?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(e=>e===t):!1}function Ye(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(Fe(r)?`<!--${r.data}-->`:ce(r)?r.textContent:r.outerHTML),"")}function te(t,e=2){return`${t}`.padStart(e,"0")}function _e(t,e=0){return[t,e]=[Math.floor(t),Math.ceil(e)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(t-e+1)+e)}function ue(){return`_${zt(Bt).slice(0,8).join("")}`}function Ce(t){return t=u(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,u(t,Array)?t:u(t,String)&&t?.trim().toLowerCase()||""}function Ve(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function Ne(t,e){switch(t=String(t).trim(),!0){case/^(0|false|f)$/i.test(t):return!1;case/^(1|true|t)$/i.test(t):return!0;default:return e}}function zt(t){let e=t.length;for(;e--;){let r=_e(e);[t[e],t[r]]=[t[r],t[e]]}return t}function z(t){return u(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${Yt(e)}`||e).join(""):t}function N(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function Yt([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function ce(t){return u(t,Comment,Text)}function Fe(t){u(t,Comment)}function Ue(t){return u(t,Text)}function Y(t){return u(t,String)&&/^<|>$/.test(`${t}`.trim())}function _(t){return u(t,Array)&&!t?.find(e=>!O(e))}function fe(t){return u(t,Array)&&!t?.find(e=>!Y(e))}function E(t,e){let r=t.collection.filter(n=>!ce(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function Xe(t){return t.node?u(t.node,Comment)?`<!--${t.node.textContent}-->`:t.HTML.get(1).split(">")[0]+">...":""}function Ae(t,e,r){let n=e!==document.body&&u(t,String)&&t.toLowerCase()!=="body"?e:document;try{r.collection=[...n.querySelectorAll(t)]}catch{w.warn(`JQx: Invalid CSS querySelector. [${u(t,String)?t:"Not a string!"}]`)}}function Ge(){return{isCommentOrTextNode:ce,isNode:O,isComment:Fe,isText:Ue,isHtmlString:Y,isArrayOfHtmlElements:_,isArrayOfHtmlStrings:fe,ElemArray2HtmlString:Ye,input2Collection:se,setCollectionFromCssSelector:Ae,cssRuleEdit:k({createWithId:"JQxStylesheet"})}}function Ze(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return r=>{let n=r.node;return u(n,Node)?Object.freeze({get writable(){return ze(n)},get modal(){return Ve(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return We(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function Ke(t,e,r,n){r&&u(e,String)&&(e={[e]:r==="-"?"":r});let i;e.className&&(i=e.className,delete e.className),i=[...t.classList].find(f=>f.startsWith("JQxClass-")||i&&f===i)||i||`JQxClass-${ue().slice(1)}`,n.editCssRule(`.${i}`,e),t.classList.add(i)}var _t=Ze();function qe(t){return{factoryExtensions:Vt(t),instanceExtensions:Ut(t)}}function Vt(t){return{data(e){return{get all(){return new Proxy(e[0]?.dataset??{},ve)},set(r={}){if(!e.is.empty&&u(r,Object))for(let[n,i]of Object.entries(r))e.setData({[n]:i});return e},get(r,n){return e.data.all[r]??n},add(r={}){if(!e.is.empty&&u(r,Object))for(let[n,i]of Object.entries(r))e.setData({[n]:i});return e},remove(r){return e[0]?.removeAttribute(`data-${N(r)}`),e}}},dimensions(e){if(e.is.empty)return w.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:r}=e,n=r.getBoundingClientRect().toJSON();return n.scrollTopDistance=B(r,0),n.scrollLeftDistance=B(r,0,!1),n},node(e){return e[0]},HTML(e){return{get(r,n){if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let i=r?e.outerHtml:e.html();return n?H(i):i},set(r,n=!1,i=!1){r=r.isJQx?r.HTML.get(1):r;let a=u(r,String);return r=a&&i?H(r):r,a&&(r||"").trim().length&&e.html(r,n),e},replace(r,n=!1){return e.HTML.set(r,!1,n)},append(r,n=!1){return r=u(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r,!0,n)},insert(r,n=!1){return r=u(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r+e.HTML.get(),!1,n)}}},is(e){return _t(e)},length(e){return e.collection.length},outerHtml(e){return(e.first()||{outerHTML:void 0}).outerHTML},parent(e){let r=t(e[0]?.parentNode);return r.is.empty?e:r},render(e){switch(!0){case!e.is.empty:return e.toDOM();default:return t.logger.warn("[JQx.render]: empty collection"),e}},Style(e){return{get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline(r){return e.style(r)},inSheet(r){return e.css(r)},valueOf(r){return e.is.empty?void 0:getComputedStyle(e[0])[N(r)]},nwRule(r){return e.Style.byRule({rules:r})},byRule({classes2Apply:r=[],rules:n=[]}={}){let a=u(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&u(n,String)?[n]:n,r=r&&u(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let f of r)e.addClass(f);return a?.startsWith(".")&&e.addClass(a.slice(1)),a?.startsWith("#")&&!e.attr("id")&&e.prop({id:a.slice(1)}),e}}}}}function Ut(t){return{addClass(e,...r){return E(e,n=>n&&r.forEach(i=>n.classList.add(i)))},after:ae,afterMe:ae,andThen(e,r,n=!1){if(!r||!u(r,String,Node,Proxy))return w.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:u(r,Node)?t.virtual(r):t.virtual(C(r));let[i,a,f]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[i][a](...r.collection),e.collection=f,e},append(e,...r){if(e.is.empty||r.length<1)return e;let n=e.length===1;for(let i of r){if(!i.isJQx&&T(i)){let a=i.trim(),S=!/^<(.+)[^>]+>$/m.test(a)?t.text(i):C(i);E(e,y=>y.append(n?S:M(S)))}O(i)&&E(e,a=>a.append(n?i:M(i))),i.isJQx&&!i.is.empty&&E(e,a=>i.collection.forEach(f=>a.append(n?f:M(f))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!u(r,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),e;default:return(r.isJQx?r:t(r)).append(e),e}},attr(e,r,n){if(!e.node||u(e.node,Text,Comment))return e;if(!n&&T(r))return r=N(r),r==="class"?[...e.node.classList].join(" "):e.node.getAttribute(r);if(T(r)&&n)switch(r=N(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return u(r,Object)&&!e.is.empty&&Le(e.node,r),e},before:le,beforeMe:le,clear(e){return E(e,oe)},closest(e,r){let n=T(r)?e.node?.closest(r):void 0;return n?t(n):e},computedStyle(e,r){let{node:n}=e;return n&&getComputedStyle(n)[r]},css(e,r,n){return E(e,i=>Ke(i,r,n,t))},duplicate(e,r=!1,n=document.body){switch(!0){case e.is.empty:return w.error("Duplicating an empty JQx instance is not possible"),e;default:let i=e.collection[0].cloneNode(!0);return i.childNodes.forEach(a=>{a.removeAttribute&&a?.removeAttribute("id")}),r?t(i).toDOM(n):t.virtual(i)}},each(e,r){return E(e,r)},empty(e){return E(e,oe)},find(e,r){return e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[]},find$(e,r){return e.collection.length>0?t(r,e):e},first(e,r=!1){return e.collection.length>0?r?e.single():e.collection[0]:void 0},first$(e,r){return e.single(r)},getData(e,r,n){return e.node?.dataset?.[r]||n},hasClass(e,...r){return e.is.empty||!e.node.classList.length?!1:r.find(n=>e.node.classList.contains(n))&&!0||!1},hide(e){return E(e,r=>W(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!T(r)):return"";case!T(r):return e.node?.getHTML()??"";default:let i=C(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return E(e,f=>(f.textContent=n?f.textContent:"",f.insertAdjacentHTML(t.at.end,i.getHTML())))}},htmlFor(e,r,n="",i=!1){if(e.is.empty||!T(r)||!T(n))return e;let a=e.find$(r);if(a.length<1)return e;let f=C(`<span>${n}</span>`);return a.each(S=>{i||(S.textContent=""),S.insertAdjacentHTML(t.at.end,f?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!u(r,String,Array)||!T(r)||n.length<1):return e;default:return t.handle({type:r,node:e.node,handler:n}),e}},once(e,r,...n){switch(!0){case(e.is.empty||!u(r,String,Array)||!T(r)||n.length<1):return e;default:return t.handle({type:r,once:!0,node:e.node,handler:n}),e}},prepend(e,...r){if(e.is.empty||!r)return;let n=e.length===1;for(let i of r){if(T(i)){i=i.trim();let f=!/^<(.+)[^>]+>$/m.test(i)?t.text(i):C(i);f=n?f:M(f),E(e,S=>S.prepend(f.cloneNode(!0)))}O(i)&&E(e,a=>a.prepend(n?i:M(i))),i.isJQx&&!i.is.empty&&(i.collection.length>1&&i.collection.reverse(),E(e,a=>E(i,f=>a.prepend(n?f:M(f)))),i.collection.reverse())}return e},prependTo(e,r){return r.isJQx||(r=t.virtual(r)),r.prepend(e),e},prop(e,r,n){if(u(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let i=u(r,Object)?r:{[r]:n};for(let[a,f]of Object.entries(i)){if(a=a.trim(),f&&!ne(a)||!f)return!1;if(a.toLowerCase()==="id")return e[0].id=f;E(e,y=>{if(a.startsWith("data"))return y.dataset[a.slice(a.indexOf("-")+1)]=f;y[a]=f})}return e},remove(e,r){let n=a=>a.remove(),i=()=>e.collection=e.collection.filter(a=>document.documentElement.contains(a));if(r){let a=e.find$(r);return a.is.empty||(E(a,n),i()),e}return E(e,n),i(),e},rmAttr(e,...r){for(let n of r)e.node.removeAttribute(n);return e},removeClass(e,...r){return E(e,n=>{if(n)for(let i of r)n.classList.remove(i)})},renderTo(e,r,n){return r=u(r,HTMLElement)||r.isJQx?r:document.body,n=u(n,String)&&t.at[n]?n:t.at.end,e.first$().toDOM(r,n),e},replace(e,r,n){let i=e.node;return!r||!u(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||u(n,NodeList))&&(n=n[0]),i&&r&&(r=u(r,String)?i.querySelectorAll(r):r.isJQx?r.collection:r,u(r,HTMLElement,NodeList,Array)&&u(n,HTMLElement)&&(u(r,HTMLElement)?[r]:[...r]).forEach(a=>a.replaceWith(n.cloneNode(!0)))),e)},replaceClass(e,r,...n){return E(e,i=>{i.classList.remove(r);for(let a of n)i.classList.add(a)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=u(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return E(e,n=>ie(n,r))},show(e){return E(e,r=>W(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&u(r,String)):return e.find$(r);case(n&&u(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return E(e,a=>{n&&u(r,String)&&(r={[r]:n||"none"}),W(a,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!u(r,String):return e.node.textContent;default:return E(e,i=>i.textContent=n?i.textContent+r:r)}},toDOM(e,r=document.body,n=L.BeforeEnd){return e.isVirtual=!1,D(e.collection,r,n),e},toggleClass(e,r){return E(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,i){n=u(n,Function)?n:Event,i=u(i,Object)?{...i,bubbles:i.bubbles??!0}:{bubbles:!0};let a=new n(r,i);return e.is.empty||e.each(f=>f.dispatchEvent(a)),e},val(e,r){switch(!0){case(e.is.empty||!u(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!u(r,String):return e.node.value;default:return e.node.value=u(r,String)?r:"",e}}}}var $e,de,{isComment:tn,isText:rn,isHtmlString:nn,isArrayOfHtmlElements:on,isArrayOfHtmlStrings:sn,ElemArray2HtmlString:an,cssRuleEdit:Pe,addFn:Xt}=Gt();function Gt(){return{...Ge(),addFn:Zt}}function Zt(t,e){return t=t?.trim(),!T(t)||!u(e,Function)?w.error("JQx.fn: method invalid parameter(s)"):de[t]=(r,...n)=>e(r,...n)}function Kt(t){return function(e,r,n){if(e=e?.trim(),!T(e)||!u(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let i=n?{get(){return r()}}:{value(...a){return r(...a)}};try{Object.defineProperty(t,e,i)}catch{return t.warn(`JQx.staticFn: extension [${e}] already exists`)}return w.log(`JQx: added static extension function [${e}]`)}}function V(t){return new Proxy(t,Object.freeze({get:(e,r)=>qt(e,r,t)}))}function et(t,e){return(...r)=>u(t,Function)&&t(V(e),...r)}function qt(t,e,r){switch(!0){case u(e,Symbol):return A({trial:()=>t[e],whenError:()=>t});case u(+e,Number):return t.collection?.[e]||void 0;case e in $e:return et($e[e],r)();case e in de:return et(de[e],r);default:return t[e]}}function nt(t){let e=or(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function er(t){return{allow(e){let r=/-/.test(e),n=r&&e;e=r?z(e):e.toLowerCase(),P.allowTag(e),Object.defineProperties(t,Oe(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),P.prohibitTag(e),Object.defineProperties(t,Oe(e,!1,t))}}}function tt(...t){if(t.length===1){let e=String(t.shift().trim());t=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(r=>r.trim())}for(let e of t.map(r=>r.startsWith("!")?r.slice(1,-1):r))Pe(e,{removeRule:1})}function tr(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(L).find(a=>n===a);let i=t(e,document.createElement("br"));if(r&&!u(r,HTMLBRElement))for(let a of i.collection)n?r.insertAdjacentElement(n,a):r.append(a);return i}}function rr(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[i,a]of Object.entries(n))!(i in e)&&Object.defineProperty(e,i,{...a,enumerable:!1})}return e}function nr(t,e,r,n){return t=N(n||t.toLowerCase()),{get(){return(...i)=>{let a=e&&r.virtual(I(U[t](...i)))||void 0,S=!u(a?.node,Comment,Text,void 0)?Te(a):"";return w.log(e?`JQx: created (virtual) instance from [JQx].${t} ${S}`:`JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),a}},enumerable:!1,configurable:!0}}function Oe(t,e,r,n){t=t.toLowerCase();let i=nr(t,e,r,n);return n?{[n]:i,[z(n)]:i}:{[t]:i,[t.toUpperCase()]:i}}function or(t){return rr(Object.entries(P.tagsRaw).reduce(ir(t),{}),fr(t))}function ir(t){return function(e,[r,n]){return Object.defineProperties(e,Oe(r,n,t)),e}}function sr(t){return function(e,r,...n){u(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function ar(t){return function(e){let{type:r,types:n,origin:i,selector:a,handler:f,handlers:S,node:y,name:x,capture:d,once:b,about:m}=e;f=S||f,r=n||r,a=i||a;let h=Ce(r),g=x;f=u(f,Function)?[f]:f;let c={type:h,selector:a||i,capture:d,name:g,once:b,node:y,about:m};switch(!0){case(u(h,Array)&&h.length>0):for(let o of h)c.type=o,rt(f,c,t);break;default:return rt(f,c,t)}}}function rt(t,e,r){for(let n of t)r.listen({...e,handler:n})}function lr(t){return function(e,r){return r=T(r)&&r,e=T(e)&&e,r&&e&&t.listenerStore[e][r]}}function ur(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:K(t),enumerable:!1}),t.activePopup}function cr(t){let e=(d,b)=>Pe(d,b),r=function(d){return k({createWithId:d||`jqx${ue()}`})},n=function(...d){for(let b of d)Pe(b)},i=er(t),a=q(t),f=ar(a);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:i,handle:f,capturedHandling:f,log:(...d)=>w.on.log(...d).off,warn:(...d)=>w.on.warn(...d).off,error:(...d)=>w.on.error(...d).off,handlerWrapper:a}}function fr(t){let{factoryExtensions:e,instanceExtensions:r}=qe(t);$e=e,de=r;let{editCssRule:n,createStyle:i,editCssRules:a,allowProhibit:f,handle:S,capturedHandling:y,log:x,warn:d,error:b,handlerWrapper:m}=cr(t),h=lr(t),g=Kt(t);return{log:x,warn:d,error:b,editCssRules:a,createStyle:i,editStylesheet:i,editCssRule:n,escHtml:H,logger:w,text(c,o=!1){return o?t.comment(c):document.createTextNode(c)},node(c,o=document){return o.querySelector(c,o)},nodes(c,o=document){return[...o.querySelectorAll(c,o)]},clearAllTimers:we,get staticFn(){return function(c,o,s){return g(c,o,s)}},get toBool(){return Ne},get getNamedListener(){return h},get virtual(){return tr(t)},get allowTag(){return f.allow},get prohibitTag(){return f.prohibit},get removeCssRule(){return tt},get removeCssRules(){return tt},get delegate(){return sr(y)},get delegateCaptured(){return y},get handle(){return y},get listen(){return m.listen},get at(){return L},get setStyle(){return n},get fn(){return Xt},get lenient(){return P.allowUnknownHtmlTags},get IS(){return u},get Popup(){return ur(t)},get listenerStore(){return m.ListenerStore}}}var ot=nt(dr());function dr(){return function(e,r,n=L.BeforeEnd){if(e?.isJQx)return e;let i=u(r,HTMLBRElement);r=(!i&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(L).find(d=>n===d)?n:void 0;let a=Y(e),S=!a&&fe(e)||a,y={collection:se(e)??[],isVirtual:i,isJQx:!0},x=_(y.collection);if(y.collection.length&&x)return i||y.collection.forEach(d=>{r.contains(d)||D([d],r,n)}),V(y);if(S){if([e].flat().forEach(d=>y.collection.push(C(d))),y.collection.length>0){let d=y.collection.filter(g=>g?.dataset?.jqxcreationerror);y.collection=y.collection.filter(g=>!g?.dataset?.jqxcreationerror);let m=y.collection.map(g=>`${String(g.constructor).split(/function|\(/)[1].trim()}`).length>1;y=V(y);let h=y.collection.length>0?Xe(y):"sanitized: no elements remaining";w.log(`JQx: created ${y.isVirtual?"(virtual)":""} instance from ${m?"array of ":""}HTML string${m?"s":""} ${h}`),y.isVirtual||D(y.collection,r,n)}return y}return Ae(e,r,y),V(y)}}var mn=ot;export{mn as default};
@@ -1,12 +1,12 @@
1
- var{IS:N,maybe:J,$Wrap:K,xProxy:Q,isNothing:V}=C();function C(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),l();let n=h(),[i,f]=[u(),p()];return f.custom(),{IS:s,maybe:n,$Wrap:i,isNothing:b,xProxy:f};function s(e,...t){if(n({trial:c=>"isTypes"in(t?.[0]??{})})){let c=t[0];return"defaultValue"in c?y(e,c):"notTypes"in c?r(e,c):s(e,...[c.isTypes].flat())}let o=typeof e=="symbol"?Symbol.isSymbol:e;return t.length>1?P(o,...t):$(e,...t)}function S(e){return e?.[Symbol.proxy]??s(e)}function $(e,...t){let{noInput:o,noShouldbe:c,compareTo:g,inputCTOR:R,isNaN:j,isInfinity:F,shouldBeFirstElementIsNothing:A}=O(e,...t);switch(t=t.length&&t[0],!0){case A:return String(e)===String(g);case(e?.[Symbol.proxy]&&c):return e[Symbol.proxy];case j:return c?"NaN":n({trial:E=>String(g)})===String(e);case F:return c?"Infinity":n({trial:E=>String(g)})===String(e);case o:return c?String(e):String(g)===String(e);case R===Boolean:return t?R===t:"Boolean";default:return d(e,t,c,x(e,R))}}function x(e,t){return e===0?Number:e===""?String:e?t:{name:String(e)}}function O(e,...t){let o=t.length<1,c=!o&&t[0],g=!o&&b(t[0]),R=e==null,j=!R&&Object.getPrototypeOf(e)?.constructor,F=n({trial:E=>String(e)})==="NaN",A=n({trial:E=>String(e)})==="Infinity";return{noInput:R,noShouldbe:o,compareTo:c,inputCTOR:j,isNaN:F,isInfinity:A,shouldBeFirstElementIsNothing:g}}function d(e,t,o,c){switch(!0){case(!o&&t===e||e?.[Symbol.proxy]&&t===Proxy):return!0;case n({trial:g=>String(t)})==="NaN":return String(e)==="NaN";case(e?.[Symbol.toStringTag]&&s(t,String)):return String(t)===e[Symbol.toStringTag];default:return t?n({trial:g=>e instanceof t})||t===c||t===Object.getPrototypeOf(c)||`${t?.name}`===c?.name:e?.[Symbol.toStringTag]&&`[object ${e?.[Symbol.toStringTag]}]`||c?.name||String(c)}}function P(e,...t){return t.some(o=>s(e,o))}function b(e,t=!1){let o=e==null;return o=t?o||s(e,1/0)||s(e,NaN):o,o}function h(){let e=(t,o)=>t?.constructor===Function?t(o):void 0;return function({trial:t,whenError:o=()=>{}}={}){try{return e(t)}catch(c){return e(o,c)}}}function u(){return function(e){return Object.freeze({get value(){return e},get[Symbol.type](){return S(e)},get type(){return S(e)},[Symbol.is](...t){return s(e,...t)},is(...t){return s(e,...t)}})}}function y(e,{defaultValue:t,isTypes:o=[void 0],notTypes:c}={}){return o=o?.constructor!==Array?[o]:o,c=c&&c?.constructor!==Array?[c]:[],c.length<1?s(e,...o)?e:t:r(e,{isTypes:o,notTypes:c})?e:t}function r(e,{isTypes:t=[void 0],notTypes:o=[void 0]}={}){return t=t?.constructor!==Array?[t]:t,o=o?.constructor!==Array?[o]:o,s(e,...t)&&!s(e,...o)}function l(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return S(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...e){return s(this,...e)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(e){return S(e)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(e,...t){return s(e,...t)},enumerable:!1,configurable:!1}}))}function a(e){let t=String(Object.getPrototypeOf(e)?.constructor);return t.slice(t.indexOf("ion")+3,t.indexOf("(")).trim()}function m(e){let t=e.set;return e.set=(o,c,g)=>c===Symbol.proxy?o[c]=g:t(o,c,g),e}function p(){let e=Proxy;return{native(){Proxy=e},custom(){Proxy=new e(e,{construct(t,o){for(let g of o)g.set&&(g=m(g));let c=new t(...o);return c[Symbol.proxy]=`Proxy (${a(o[0])})`,c}})}}}}var M=k;function k({styleSheet:n,createWithId:i}={}){let{tryParseAtOrNestedRules:f,ruleExists:s,checkParams:S,sheet:$,removeRules:x,consider:O,currentSheetID:d}=L({styleSheet:n,createWithId:i});function P(r,l){if(r&&l.removeProperties){Object.keys(l.removeProperties).forEach(a=>r.style.removeProperty(I(a)));return}Object.entries(l).forEach(([a,m])=>{a=I(a.trim()),m=m.trim();let p;if(/!important/.test(m)&&(m=m.slice(0,m.indexOf("!important")).trim(),p="important"),!CSS.supports(a,m))return console.error(`StylingFactory ${d} error: '${a}' with value '${m}' not supported (yet)`);v(()=>r.style.setProperty(a,m,p),`StylingFactory ${d} (setRule4Selector) failed`)})}function b(r,l,a=$){if(r=r?.trim?.(),!N(r,String)||!r.length||/[;,]$/g.test(r))return console.error(`StylingFactory ${d} (setRules): [${r||"[no selector given]"}] is not a valid selector`);if(l.removeRule)return x(r);let m=s(r,!0),p=m||a.cssRules[a.insertRule(`${r} {}`,a.cssRules.length||0)];return O(()=>P(p,l),r,m)}function h(r){let l=r.trim().split(/{/,2),a=l.shift().trim();if(!N(a,String)||!a?.trim()?.length)return console.error(`StylingFactory ${d} (doParse): no (valid) selector could be extracted from rule ${w(r)}`);let m=G(l.shift());return v(()=>b(a,m),`StylingFactory ${d} (setRules) failed`)}function u(r){let l=f(r);return l.done?l.existing:h(r)}function y(r,l){return r.trim().startsWith("@media")?u(T(r,l)):b(r,l)}return function(r,l={}){return S(r,l)&&(Object.keys(l).length?y(r,l):u(r))}}function L({styleSheet:n,createWithId:i}){let f="Note: The rule or some of its properties may not be supported by your browser (yet)",s=`for style#${i}`;n=i?S(i):n;function S(u){let y=document.querySelector(`#${u}`)?.sheet;if(y)return y;let r=Object.assign(document.createElement("style"),{id:u});return document.head.insertAdjacentElement("beforeend",r),r.sheet}function $(u){return console.error(`StylingFactory ${s} [rule: ${u}]
2
- => @charset, @namespace and @import are not supported here`),{done:!0}}function x(u,y){return[...n.rules].find(r=>y?_(r.selectorText||"",u):H`${z(u)}${[..."gim"]}`.test(r.cssText))}function O(u){return/^@charset|@import|namespace/i.test(u.trim())?$(u):u.match(/}/g)?.length>1?{existing:b(u,1),done:!0}:{done:!1}}function d(u){let y=[...n.cssRules].reduce((l,a,m)=>_(a.selectorText||"",u)&&l.concat(m)||l,[]),r=y.length;return y.forEach(l=>n.deleteRule(l)),r>0?console.info(`\u2714 Removed ${r} instance${r>1?"s":""} of selector ${u} from ${s.slice(4)}`):console.info(`\u2714 Remove rule: selector ${u} does not exist in ${s.slice(4)}`)}function P(u,y){return u&&N(u,String)&&u.trim().length>0&&N(y,Object)||(console.error(`StylingFactory ${s} called with invalid parameters`),!1)}function b(u){u=u.trim();let y=u.slice(0,u.indexOf("{")).trim(),r=!!x(y);try{return n.insertRule(`${u}`,n.cssRules.length),r}catch(l){return console.error(`StylingFactory ${s} (tryParse) ${l.name} Error:
3
- ${l.message}
4
- Rule: ${w(u)}
5
- ${f}`),r}}function h(u,y,r){try{return u(),r}catch(l){return console.error(`StylingFactory ${s} (tryAddOrModify) ${l.name} Error:
6
- ${l.message}
7
- Rule: ${w(y)}
8
- ${f}`),r}}return{sheet:n,removeRules:d,tryParseAtOrNestedRules:O,ruleExists:x,checkParams:P,tryParse:b,consider:h,currentSheetID:s}}function T(n,i){return`${n.trim()} ${Object.entries(i).map(([f,s])=>`${f}: { ${q(s)}`)}`}function w(n){let i=(n||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return n.length>i.length?`${i.trim()}...truncated`:i}function q(n){return Object.entries(n).map(([i,f])=>`${i}: ${f.trim()}`).join(`;
9
- `)}function z(n){return n.replace(/([*\[\]()-+{}.$?\\])/g,i=>`\\${i}`)}function H(n,...i){let f=i.length&&Array.isArray(i.slice(-1))?i.pop().join(""):"";return new RegExp((i.length&&n.raw.reduce((s,S,$)=>s.concat(i[$-1]||"").concat(S),"")||n.raw.join("")).split(`
10
- `).map(s=>s.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),f)}function I(n){return n.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function v(n,i){try{return n()}catch(f){console.error(`${i||"an error occured"}: ${f.message}`)}}function U(n){return n.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(i,f)=>`${f}\\3b`).split(";").map(i=>i.trim()).join(`;
1
+ var{IS:P,maybe:N,$Wrap:J,isNothing:U,xProxy:q,addSymbolicExtensions:G}=w({useSymbolicExtensions:!1});function w(n={}){let{useSymbolicExtensions:c}=n,{shouldbeIsSingleObject:l,ISOneOf:f,isExcept:m,verifyNothingness:g,xProxy:S,determineType:p,addSymbolicExtensions:y,maybe:$,$Wrap:b}=C(d,c);return S.custom(),c&&y(),{IS:d,maybe:$,$Wrap:b,isNothing:g,xProxy:S,addSymbolicExtensions:y};function d(i,...a){let o=typeof i=="symbol"?Symbol.isSymbol:i;switch(!0){case!!$({trial:u=>"isTypes"in(a?.[0]??{})}):return l(i,a[0]);default:return a.length>1?f(o,...a):p(i,...a)}}}function C(n,c){let{SymbolAndCustomProxyFactory:l,maybeFactory:f,WrapAnyFactory:m,verifyNothingness:g,determineType:S}=v(n,d),{xProxy:p,addSymbolicExtensions:y}=l(n,d,c),[$,b]=[f(),m(n,d)];return Object.freeze({shouldbeIsSingleObject:i,ISOneOf:a,isExcept:u,verifyNothingness:g,xProxy:p,determineType:S,addSymbolicExtensions:y,maybe:$,$Wrap:b});function d(e){return e?.[Symbol.proxy]??n(e)}function i(e,r){switch(!0){case"defaultValue"in r:return o(e,r);case"notTypes"in r:return u(e,r);default:return n(e,...[r.isTypes].flat())}}function a(e,...r){return r.some(t=>n(e,t))}function o(e,{defaultValue:r,isTypes:t=[void 0],notTypes:s}={}){return t=t?.constructor!==Array?[t]:t,s=s&&s?.constructor!==Array?[s]:[],s.length<1?n(e,...t)?e:r:u(e,{isTypes:t,notTypes:s})?e:r}function u(e,{isTypes:r=[void 0],notTypes:t=[void 0]}={}){return r=r?.constructor!==Array?[r]:r,t=t?.constructor!==Array?[t]:t,n(e,...r)&&!n(e,...t)}}function v(){let n={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},c={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:f,maybeFactory:o,WrapAnyFactory:a,verifyNothingness:u,determineType:y});function l(e,r){Symbol.is||(Symbol.is=Symbol.for(n.IS),Symbol.type=Symbol.for(n.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return r(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...t){return e(this,...t)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(t){return r(t)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(t,...s){return e(t,...s)},enumerable:!1,configurable:!1}}))}function f(e,r,t){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(n.IS_SYMBOL)),{xProxy:S(),addSymbolicExtensions:()=>l(e,r)}}function m(e){return Object.getPrototypeOf(e)?.constructor?.name||c.OBJECT}function g(e){return Proxy=new e(e,{construct(r,t){let s=new r(...t);return s[Symbol.proxy]=`${c.PROXY_PREFIX}${m(t[0])})`,s}}),Proxy}function S(){Symbol.proxy||(Symbol.proxy=Symbol.for(n.PROXY));let e=Proxy;return{native(){Proxy=e},custom(){Proxy=g(e)}}}function p(e,...r){let t=r.length<1,s=e==null;return{noInput:s,noShouldbe:t,compareTo:!t&&r[0],inputCTOR:!s&&(e?.constructor||Object.getPrototypeOf(e)?.constructor),isNaN:Number.isNaN(e)||N({trial:x=>String(e)===c.NAN}),isInfinity:N({trial:x=>String(e)})===c.INFINITY,shouldBeFirstElementIsNothing:!t&&u(r[0])}}function y(e,...r){let{noInput:t,noShouldbe:s,compareTo:x,inputCTOR:O,isNaN:F,isInfinity:I,shouldBeFirstElementIsNothing:j}=p(e,...r);switch(r=r.length&&r[0],!0){case j:return String(e)===String(x);case(e?.[Symbol.proxy]&&s):return e[Symbol.proxy];case F:return s?c.NAN:String(x)===String(e);case I:return s?c.INFINITY:String(x)===String(e);case t:return s?String(e):String(x)===String(e);case O===Boolean:return s?c.BOOLEAN:O===r;default:return b(e,r,s,$(e,O))}}function $(e,r){switch(!0){case e===0:return Number;case e==="":return String;case!e:return{name:String(e)};default:return r}}function b(e,r,t,s){switch(!0){case(!t&&r===e||e?.[Symbol.proxy]&&r===Proxy):return!0;case String(r)===c.NAN:return String(e)===c.NAN;case(e?.[Symbol.toStringTag]&&typeof r=="string"):return String(r)===e[Symbol.toStringTag];default:return r?i(e,r,s):d(e,s)}}function d(e,r){return(e?.[Symbol.toStringTag]??e?.prototype?.[Symbol.toStringTag])||r?.name||String(r)}function i(e,r,t){return N({trial:s=>e instanceof r})||r===t||r===Object.getPrototypeOf(t)||`${r?.name}`===t?.name}function a(e,r){return function(t){let s={get value(){return t},is(...x){return e(t,...x)},get type(){return r(t)}};return Object[Symbol.type]&&Object.defineProperties(s,{[Symbol.type]:{get(){return r(t)}},[Symbol.is]:{value(...x){return e(t,...x)}}}),Object.freeze(s)}}function o(){let e=r=>{};return function({trial:r,whenError:t=e}={}){try{return r()}catch(s){return t(s)}}}function u(e,r=!1){let t=e==null;return t=r?t||P(e,1/0)||P(e,NaN):t,t}}var Q=Y;function Y({styleSheet:n,createWithId:c}={}){let{tryParseAtOrNestedRules:l,ruleExists:f,checkParams:m,sheet:g,removeRules:S,consider:p,currentSheetID:y}=T({styleSheet:n,createWithId:c});function $(o,u){if(o&&u.removeProperties){Object.keys(u.removeProperties).forEach(e=>o.style.removeProperty(R(e)));return}Object.entries(u).forEach(([e,r])=>{e=R(e.trim()),r=r.trim();let t;if(/!important/.test(r)&&(r=r.slice(0,r.indexOf("!important")).trim(),t="important"),!CSS.supports(e,r))return console.error(`StylingFactory ${y} error: '${e}' with value '${r}' not supported (yet)`);E(()=>o.style.setProperty(e,r,t),`StylingFactory ${y} (setRule4Selector) failed`)})}function b(o,u,e=g){if(o=o?.trim?.(),!P(o,String)||!o.length||/[;,]$/g.test(o))return console.error(`StylingFactory ${y} (setRules): [${o||"[no selector given]"}] is not a valid selector`);if(u.removeRule)return S(o);let r=f(o,!0),t=r||e.cssRules[e.insertRule(`${o} {}`,e.cssRules.length||0)];return p(()=>$(t,u),o,r)}function d(o){let u=o.trim().split(/{/,2),e=u.shift().trim();if(!P(e,String)||!e?.trim()?.length)return console.error(`StylingFactory ${y} (doParse): no (valid) selector could be extracted from rule ${h(o)}`);let r=H(u.shift());return E(()=>b(e,r),`StylingFactory ${y} (setRules) failed`)}function i(o){let u=l(o);return u.done?u.existing:d(o)}function a(o,u){return o.trim().startsWith("@media")?i(_(o,u)):b(o,u)}return function(o,u={}){return m(o,u)&&(Object.keys(u).length?a(o,u):i(o))}}function T({styleSheet:n,createWithId:c}){let l="Note: The rule or some of its properties may not be supported by your browser (yet)",f=`for style#${c}`;n=c?m(c):n;function m(i){let a=document.querySelector(`#${i}`)?.sheet;if(a)return a;let o=Object.assign(document.createElement("style"),{id:i});return document.head.insertAdjacentElement("beforeend",o),o.sheet}function g(i){return console.error(`StylingFactory ${f} [rule: ${i}]
2
+ => @charset, @namespace and @import are not supported here`),{done:!0}}function S(i,a){return[...n.rules].find(o=>a?A(o.selectorText||"",i):k`${X(i)}${[..."gim"]}`.test(o.cssText))}function p(i){return/^@charset|@import|namespace/i.test(i.trim())?g(i):i.match(/}/g)?.length>1?{existing:b(i,1),done:!0}:{done:!1}}function y(i){let a=[...n.cssRules].reduce((u,e,r)=>A(e.selectorText||"",i)&&u.concat(r)||u,[]),o=a.length;return a.forEach(u=>n.deleteRule(u)),o>0?console.info(`\u2714 Removed ${o} instance${o>1?"s":""} of selector ${i} from ${f.slice(4)}`):console.info(`\u2714 Remove rule: selector ${i} does not exist in ${f.slice(4)}`)}function $(i,a){return i&&P(i,String)&&i.trim().length>0&&P(a,Object)||(console.error(`StylingFactory ${f} called with invalid parameters`),!1)}function b(i){i=i.trim();let a=i.slice(0,i.indexOf("{")).trim(),o=!!S(a);try{return n.insertRule(`${i}`,n.cssRules.length),o}catch(u){return console.error(`StylingFactory ${f} (tryParse) ${u.name} Error:
3
+ ${u.message}
4
+ Rule: ${h(i)}
5
+ ${l}`),o}}function d(i,a,o){try{return i(),o}catch(u){return console.error(`StylingFactory ${f} (tryAddOrModify) ${u.name} Error:
6
+ ${u.message}
7
+ Rule: ${h(a)}
8
+ ${l}`),o}}return{sheet:n,removeRules:y,tryParseAtOrNestedRules:p,ruleExists:S,checkParams:$,tryParse:b,consider:d,currentSheetID:f}}function _(n,c){return`${n.trim()} ${Object.entries(c).map(([l,f])=>`${l}: { ${L(f)}`)}`}function h(n){let c=(n||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return n.length>c.length?`${c.trim()}...truncated`:c}function L(n){return Object.entries(n).map(([c,l])=>`${c}: ${l.trim()}`).join(`;
9
+ `)}function X(n){return n.replace(/([*\[\]()-+{}.$?\\])/g,c=>`\\${c}`)}function k(n,...c){let l=c.length&&Array.isArray(c.slice(-1))?c.pop().join(""):"";return new RegExp((c.length&&n.raw.reduce((f,m,g)=>f.concat(c[g-1]||"").concat(m),"")||n.raw.join("")).split(`
10
+ `).map(f=>f.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),l)}function R(n){return n.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function E(n,c){try{return n()}catch(l){console.error(`${c||"an error occured"}: ${l.message}`)}}function M(n){return n.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(c,l)=>`${l}\\3b`).split(";").map(c=>c.trim()).join(`;
11
11
  `).replaceAll("\\3b",";").split(`
12
- `)}function Z(n){return n.reduce((i,f)=>{let[s,S]=[f.slice(0,f.indexOf(":")).trim(),f.slice(f.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return s&&S?{...i,[s]:S}:i},{})}function G(n){return Z(U(n))}function _(n,i){return n?.replace("::",":")===i?.replace("::",":")}export{M as default};
12
+ `)}function z(n){return n.reduce((c,l)=>{let[f,m]=[l.slice(0,l.indexOf(":")).trim(),l.slice(l.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return f&&m?{...c,[f]:m}:c},{})}function H(n){return z(M(n))}function A(n,c){return n?.replace("::",":")===c?.replace("::",":")}export{Q as default};
@@ -1,129 +1,54 @@
1
1
  const { IS, maybe, $Wrap, isNothing, xProxy, addSymbolicExtensions } =
2
2
  TOAFactory({useSymbolicExtensions: false});
3
+
3
4
  export { IS as default, maybe, $Wrap, xProxy, isNothing, addSymbolicExtensions };
4
5
 
5
6
  function TOAFactory(specs = {}) {
6
- const {useSymbolicExtensions} = specs;
7
- const {xProxy, addSymbolicExtensions} = SymbolAndCustomProxyFactory(IS, typeOf, useSymbolicExtensions);
8
- const maybe = maybeFactory();
9
- const [$Wrap] = [WrapAnyFactory()];
7
+ const { useSymbolicExtensions } = specs;
8
+ const { shouldbeIsSingleObject, ISOneOf, isExcept, verifyNothingness, xProxy,
9
+ determineType, addSymbolicExtensions, maybe, $Wrap } = TOAHelpers(IS, useSymbolicExtensions);
10
10
  xProxy.custom();
11
- !!useSymbolicExtensions && addSymbolicExtensions();
12
11
 
13
- return {IS, maybe, $Wrap, isNothing, xProxy, addSymbolicExtensions};
12
+ if (!!useSymbolicExtensions) { addSymbolicExtensions(); }
13
+
14
+ return {IS, maybe, $Wrap, isNothing: verifyNothingness, xProxy, addSymbolicExtensions};
14
15
 
15
16
  function IS(anything, ...shouldBe) {
16
17
  const input = typeof anything === `symbol` ? Symbol.isSymbol : anything;
17
18
  switch(true) {
18
- case !!maybe({trial: _ => `isTypes` in (shouldBe?.[0] ?? {})}): return ISShouldIsObject(anything, shouldBe[0]);
19
+ case !!maybe({trial: _ => `isTypes` in (shouldBe?.[0] ?? {})}):
20
+ return shouldbeIsSingleObject(anything, shouldBe[0]);
19
21
  default: return shouldBe.length > 1 ? ISOneOf(input, ...shouldBe) : determineType(anything, ...shouldBe);
20
22
  }
21
23
  }
24
+ }
25
+
26
+ function TOAHelpers(IS, useSymbolicExtensions) {
27
+ const { SymbolAndCustomProxyFactory, maybeFactory, WrapAnyFactory,
28
+ verifyNothingness, determineType } = AUXHelperFactory(IS, typeOf);
29
+ const {xProxy, addSymbolicExtensions} = SymbolAndCustomProxyFactory(IS, typeOf, useSymbolicExtensions);
30
+ const [maybe, $Wrap] = [maybeFactory(), WrapAnyFactory(IS, typeOf)];
22
31
 
23
- function ISShouldIsObject(anything, isTypeObj) {
24
- switch(true) {
25
- case `defaultValue` in isTypeObj: return isOrDefault(anything, isTypeObj);
26
- case `notTypes` in isTypeObj: return isExcept(anything, isTypeObj);
27
- default: return IS(anything, ...[isTypeObj.isTypes].flat());
28
- }
29
- }
32
+ return Object.freeze({
33
+ shouldbeIsSingleObject, ISOneOf, isExcept, verifyNothingness, xProxy,
34
+ determineType, addSymbolicExtensions, maybe, $Wrap });
30
35
 
31
36
  function typeOf(anything) {
32
37
  return anything?.[Symbol.proxy] ?? IS(anything);
33
38
  }
34
39
 
35
- function determineType(input, ...shouldBe) {
36
- let { noInput, noShouldbe, compareTo, inputCTOR, isNaN, isInfinity, shouldBeFirstElementIsNothing } =
37
- processInput(input, ...shouldBe);
38
- shouldBe = shouldBe.length && shouldBe[0];
39
-
40
- switch (true) {
41
- case shouldBeFirstElementIsNothing: return String(input) === String(compareTo);
42
- case input?.[Symbol.proxy] && noShouldbe: return input[Symbol.proxy];
43
- case isNaN: return noShouldbe ? `NaN` : String(compareTo) === String(input);
44
- case isInfinity: return noShouldbe ? `Infinity` : String(compareTo) === String(input);
45
- case noInput: return noShouldbe ? String(input) : String(compareTo) === String(input);
46
- case inputCTOR === Boolean: return !shouldBe ? `Boolean` : inputCTOR === shouldBe;
47
- default: return getResult(input, shouldBe, noShouldbe, getMe(input, inputCTOR));
48
- }
49
- }
50
-
51
- function processInput(input, ...shouldBe) {
52
- const noShouldbe = shouldBe.length < 1;
53
- const noInput = input === undefined || input === null;
54
-
55
- return {
56
- noInput,
57
- noShouldbe,
58
- compareTo: !noShouldbe && shouldBe[0],
59
- inputCTOR: !noInput && Object.getPrototypeOf(input)?.constructor,
60
- isNaN: Number.isNaN(input) || maybe({trial: _ => String(input) === `NaN`}),
61
- isInfinity: maybe({trial: _ => String(input)}) === `Infinity`,
62
- shouldBeFirstElementIsNothing: !noShouldbe && isNothing(shouldBe[0])
63
- };
64
- }
65
-
66
- function getMe(input, inputCTOR) {
67
- switch(true) {
68
- case input === 0: return Number;
69
- case input === ``: return String;
70
- case !input: return {name: String(input)};
71
- default: return inputCTOR;
72
- }
73
- }
74
-
75
- function getResult(input, compareWith, noShouldbe, me) {
40
+ function shouldbeIsSingleObject(anything, isTypeObj) {
76
41
  switch(true) {
77
- case (!noShouldbe && compareWith === input) || (input?.[Symbol.proxy] && compareWith === Proxy): return true;
78
- case String(compareWith) === `NaN`: return String(input) === `NaN`;
79
- case input?.[Symbol.toStringTag] && typeof compareWith === `string`:
80
- return String(compareWith) === input[Symbol.toStringTag];
81
- default: return compareWith ? resultWithComparison(input, compareWith, me) : resultWithoutComparison(input, me);
42
+ case `defaultValue` in isTypeObj: return isOrDefault(anything, isTypeObj);
43
+ case `notTypes` in isTypeObj: return isExcept(anything, isTypeObj);
44
+ default: return IS(anything, ...[isTypeObj.isTypes].flat());
82
45
  }
83
46
  }
84
47
 
85
- function resultWithoutComparison(input, me) {
86
- const toStringTag = input?.[Symbol.toStringTag] ?? input?.prototype?.[Symbol.toStringTag];
87
- return toStringTag || me?.name || String(me);
88
- }
89
-
90
- function resultWithComparison(input, compareWith, me) {
91
- return maybe({trial: _ =>
92
- input instanceof compareWith}) ||
93
- compareWith === me ||
94
- compareWith === Object.getPrototypeOf(me) ||
95
- `${compareWith?.name}` === me?.name;
96
- }
97
-
98
48
  function ISOneOf(obj, ...params) {
99
49
  return params.some(param => IS(obj, param));
100
50
  }
101
51
 
102
- function isNothing(maybeNothing, all = false) {
103
- let nada = maybeNothing === null || maybeNothing === undefined;
104
- nada = all ? nada || IS(maybeNothing, Infinity) || IS(maybeNothing, NaN) : nada;
105
- return nada;
106
- }
107
-
108
- function maybeFactory() {
109
- const errFn = err => undefined;
110
- return function({trial, whenError = errFn } = {}) {
111
- try { return trial(); } catch (err) { return whenError(err); }
112
- };
113
- }
114
-
115
- function WrapAnyFactory() {
116
- return function (someObj) {
117
- return Object.freeze({
118
- get value() { return someObj; },
119
- get [Symbol.type]() { return typeOf(someObj); },
120
- get type() { return typeOf(someObj); },
121
- [Symbol.is](...args) { return IS(someObj, ...args); },
122
- is(...args) { return IS(someObj, ...args); }
123
- });
124
- }
125
- }
126
-
127
52
  function isOrDefault(input, {defaultValue, isTypes = [undefined], notTypes} = {}) {
128
53
  isTypes = isTypes?.constructor !== Array ? [isTypes] : isTypes;
129
54
  notTypes = notTypes && notTypes?.constructor !== Array ? [notTypes] : [];
@@ -137,33 +62,34 @@ function TOAFactory(specs = {}) {
137
62
  notTypes = notTypes?.constructor !== Array ? [notTypes] : notTypes;
138
63
  return IS(input, ...isTypes) && !IS(input, ...notTypes);
139
64
  }
140
-
141
- function addSymbols2Anything() {
142
- if (!Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]) {
143
- Object.defineProperties(Object.prototype, {
144
- [Symbol.type]: { get() { return typeOf(this); }, enumerable: false, configurable: false },
145
- [Symbol.is]: { value: function (...args) { return IS(this, ...args); }, enumerable: false, configurable: false },
146
- });
147
- Object.defineProperties(Object, {
148
- [Symbol.type]: { value(obj) { return typeOf(obj); }, enumerable: false, configurable: false },
149
- [Symbol.is]: { value: function (obj, ...args) { return IS(obj, ...args); }, enumerable: false, configurable: false },
150
- });
151
- }
152
- }
153
65
  }
154
66
 
155
- function SymbolAndCustomProxyFactory(IS, typeOf, useSymbolicExtension) {
156
- if (!Symbol.isSymbol) { Symbol.isSymbol = Symbol.for(`toa.isASymbol`); }
157
-
158
- return {xProxy: setProxyFactory(), addSymbolicExtensions: addSymbols2Anything};
67
+ function AUXHelperFactory() {
68
+ const SYMBOL_KEYS = {
69
+ IS: 'toa.is',
70
+ TYPE: 'toa.type',
71
+ IS_SYMBOL: 'toa.isASymbol',
72
+ PROXY: 'toa.proxy'
73
+ };
74
+
75
+ const TYPE_STRINGS = {
76
+ NAN: 'NaN',
77
+ INFINITY: 'Infinity',
78
+ BOOLEAN: 'Boolean',
79
+ OBJECT: 'Object',
80
+ PROXY_PREFIX: 'Proxy ('
81
+ };
82
+
83
+ return Object.freeze({
84
+ SymbolAndCustomProxyFactory, maybeFactory, WrapAnyFactory, verifyNothingness, determineType
85
+ }
86
+ );
159
87
 
160
- function addSymbols2Anything() {
88
+ function addSymbols2Anything(IS, typeOf) {
161
89
  if (!Symbol.is) {
162
- Symbol.is = Symbol.for(`toa.is`);
163
- Symbol.type = Symbol.for(`toa.type`);
164
- }
165
-
166
- if (!Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]) {
90
+ Symbol.is = Symbol.for(SYMBOL_KEYS.IS);
91
+ Symbol.type = Symbol.for(SYMBOL_KEYS.TYPE);
92
+
167
93
  Object.defineProperties(Object.prototype, {
168
94
  [Symbol.type]: { get() { return typeOf(this); }, enumerable: false, configurable: false },
169
95
  [Symbol.is]: { value: function (...args) { return IS(this, ...args); }, enumerable: false, configurable: false },
@@ -175,38 +101,131 @@ function SymbolAndCustomProxyFactory(IS, typeOf, useSymbolicExtension) {
175
101
  }
176
102
  }
177
103
 
178
- function modifySetter(setterMethod2Modify) {
179
- const oldSetter = setterMethod2Modify.set;
180
- setterMethod2Modify.set = (target, key, value) => {
181
- if (key === Symbol.proxy) { return target[key] = value; }
182
- return oldSetter(target, key, value);
183
- }
184
-
185
- return setterMethod2Modify;
104
+ function SymbolAndCustomProxyFactory(IS, typeOf, useSymbolicExtension) {
105
+ if (!Symbol.isSymbol) { Symbol.isSymbol = Symbol.for(SYMBOL_KEYS.IS_SYMBOL); }
106
+
107
+ return {xProxy: setCustomOrDefaultProxyFactory(), addSymbolicExtensions: () => addSymbols2Anything(IS, typeOf)};
186
108
  }
187
109
 
188
- function ctor2String(obj) {
110
+ function constructor2String(obj) {
189
111
  const ctor = Object.getPrototypeOf(obj)?.constructor;
190
- return ctor?.name || `Object`;
112
+ return ctor?.name || TYPE_STRINGS.OBJECT;
191
113
  }
192
114
 
193
- function createCustomProxyFactory(nativeProxy) {
115
+ function createCustomProxy(nativeProxy) {
194
116
  Proxy = new nativeProxy(nativeProxy, {
195
117
  construct(target, args) {
196
- for (let item of args) { if (item.set) { item = modifySetter(item); } }
197
118
  const wrappedProxy = new target(...args);
198
- wrappedProxy[Symbol.proxy] = `Proxy (${ctor2String(args[0])})`;
119
+ wrappedProxy[Symbol.proxy] = `${TYPE_STRINGS.PROXY_PREFIX}${constructor2String(args[0])})`;
199
120
  return wrappedProxy;
200
121
  }
201
122
  });
202
123
  return Proxy;
203
124
  }
204
125
 
205
- function setProxyFactory() {
206
- if (!Symbol.proxy) { Symbol.proxy = Symbol.for("toa.proxy"); }
126
+ function setCustomOrDefaultProxyFactory() {
127
+ if (!Symbol.proxy) { Symbol.proxy = Symbol.for(SYMBOL_KEYS.PROXY); }
207
128
  const nativeProxy = Proxy;
208
129
  return {
209
130
  native() { Proxy = nativeProxy; },
210
- custom() { Proxy = createCustomProxyFactory(nativeProxy); } };
131
+ custom() { Proxy = createCustomProxy(nativeProxy); } };
132
+ }
133
+
134
+ function processInput(input, ...shouldBe) {
135
+ const noShouldbe = shouldBe.length < 1;
136
+ const noInput = input === undefined || input === null;
137
+
138
+ return {
139
+ noInput,
140
+ noShouldbe,
141
+ compareTo: !noShouldbe && shouldBe[0],
142
+ inputCTOR: !noInput && (input?.constructor || Object.getPrototypeOf(input)?.constructor),
143
+ isNaN: Number.isNaN(input) || maybe({trial: _ => String(input) === TYPE_STRINGS.NAN}),
144
+ isInfinity: maybe({trial: _ => String(input)}) === TYPE_STRINGS.INFINITY,
145
+ shouldBeFirstElementIsNothing: !noShouldbe && verifyNothingness(shouldBe[0])
146
+ };
147
+ }
148
+
149
+ function determineType(input, ...shouldBe) {
150
+ let { noInput, noShouldbe, compareTo, inputCTOR, isNaN, isInfinity, shouldBeFirstElementIsNothing } =
151
+ processInput(input, ...shouldBe);
152
+ shouldBe = shouldBe.length && shouldBe[0];
153
+
154
+ switch (true) {
155
+ case shouldBeFirstElementIsNothing: return String(input) === String(compareTo);
156
+ case input?.[Symbol.proxy] && noShouldbe: return input[Symbol.proxy];
157
+ case isNaN: return noShouldbe ? TYPE_STRINGS.NAN : String(compareTo) === String(input);
158
+ case isInfinity: return noShouldbe ? TYPE_STRINGS.INFINITY : String(compareTo) === String(input);
159
+ case noInput: return noShouldbe ? String(input) : String(compareTo) === String(input);
160
+ case inputCTOR === Boolean: return noShouldbe ? TYPE_STRINGS.BOOLEAN : inputCTOR === shouldBe;
161
+ default: return getResult(input, shouldBe, noShouldbe, finalInputResolver(input, inputCTOR));
162
+ }
163
+ }
164
+
165
+ function finalInputResolver(input, inputCTOR) {
166
+ switch(true) {
167
+ case input === 0: return Number;
168
+ case input === ``: return String;
169
+ case !input: return {name: String(input)};
170
+ default: return inputCTOR;
171
+ }
172
+ }
173
+
174
+ function getResult(input, compareWith, noShouldbe, maybeResult) {
175
+ switch (true) {
176
+ case (!noShouldbe && compareWith === input) || (input?.[Symbol.proxy] && compareWith === Proxy):
177
+ return true;
178
+ case String(compareWith) === TYPE_STRINGS.NAN:
179
+ return String(input) === TYPE_STRINGS.NAN;
180
+ case input?.[Symbol.toStringTag] && typeof compareWith === `string`:
181
+ return String(compareWith) === input[Symbol.toStringTag];
182
+ default:
183
+ return compareWith ?
184
+ resultWithComparison(input, compareWith, maybeResult) : resultWithoutComparison(input, maybeResult);
185
+ }
186
+ }
187
+
188
+ function resultWithoutComparison(input, maybeResult) {
189
+ const toStringTag = input?.[Symbol.toStringTag] ?? input?.prototype?.[Symbol.toStringTag];
190
+ return toStringTag || maybeResult?.name || String(maybeResult);
191
+ }
192
+
193
+ function resultWithComparison(input, compareWith, maybeResult) {
194
+ return maybe({trial: _ =>
195
+ input instanceof compareWith}) ||
196
+ compareWith === maybeResult ||
197
+ compareWith === Object.getPrototypeOf(maybeResult) ||
198
+ `${compareWith?.name}` === maybeResult?.name;
199
+ }
200
+
201
+ function WrapAnyFactory(IS, typeOf) {
202
+ return function (someObj) {
203
+ const wrapper = {
204
+ get value() { return someObj; },
205
+ is(...args) { return IS(someObj, ...args); },
206
+ get type() { return typeOf(someObj); },
207
+ };
208
+
209
+ if (Object[Symbol.type]) {
210
+ Object.defineProperties(wrapper, {
211
+ [Symbol.type]: { get() { return typeOf(someObj);} },
212
+ [Symbol.is]: { value(...args) { return IS(someObj, ...args); }}
213
+ });
214
+ }
215
+ return Object.freeze(wrapper);
216
+ }
217
+ }
218
+
219
+ function maybeFactory() {
220
+ const errFn = err => undefined;
221
+ return function({trial, whenError = errFn } = {}) {
222
+ try { return trial(); } catch (err) { return whenError(err); }
223
+ };
224
+ }
225
+
226
+ function verifyNothingness(maybeNothing, all = false) {
227
+ let nada = maybeNothing === null || maybeNothing === undefined;
228
+ nada = all ? nada || IS(maybeNothing, Infinity) || IS(maybeNothing, NaN) : nada;
229
+ return nada;
211
230
  }
212
231
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jqx-es",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "JQuery alike with a few twists",