jqx-es 1.5.3 → 1.5.5

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