dynamic-html-helpers 1.1.3 → 1.1.4

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{IS:m,maybe:Yt,$Wrap:To,xProxy:Oo,isNothing:Do}=_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"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:I,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case I:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,I=!N&&Object.getPrototypeOf(a)?.constructor,k=e({trial:P=>String(a)})==="NaN",Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:I,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var Gt=en(),be=Kt(),ee=Xt();function Kt(){return{html:Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")),svg:Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(","))}}function Xt(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function en(){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 We={html:"innerHTML",text:"textContent",class:"className"},tn=nn();function nn(){let e={get(t,n){let r=String(n)?.toLowerCase();switch(!0){case r in t:return t[r];case mn(r):return Ue(t,r,n);default:return Ue(t,r,n,!0)}},enumerable:!1,configurable:!1};return new Proxy({},e)}function Ue(e,t,n,r=!1){return Object.defineProperty(e,t,{get(){return r?o=>cn(n):dn(t)}}),e[t]}function rn(e,t,n){return t=t?.isJQx&&t.first()||t,Yt({trial:r=>fn(t)?e.append(t):rt(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} (for root ${e}) not created, reason
2
- `,r)})}function on(e,t,...n){let r=an(t,e);return n?.forEach(o=>rn(r,o,e)),r}function an(e,t){switch(e=je(t)?un(e):e?.isJQx?e.first():e,!0){case m(e,String):return G(t,rt(e,t)?{html:e}:{text:e});case m(e,Node):return sn(t,e);default:return G(t,e)}}function ln(e){return delete e.data,Object.keys(e).length<1||Object.keys(e).forEach(t=>{let n=t.toLowerCase();n in We&&(e[We[n]]=e[t],delete e[t])}),e}function sn(e,t){let n=G(e);return n.append(t),n}function G(e,t={}){t=nt(t,{});let n=Object.entries(t.data??{}),r=Object.assign(je(e)?new Comment(t?.text):document.createElement(e),ln(t));return n.length&&n.forEach(([o,i])=>r.dataset[o]=String(i)),r}function nt(e,t){return t?m(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:t}):m(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function un(e){return nt(e)?e?.text??e?.textContent??"":String(e)}function cn(e){return G("b",{style:"color:red",text:`'${e}' is not a valid HTML-tag`})}function rt(e,t){return!je(t)&&m(e,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(e)}function fn(e){return e?.constructor===Comment||e?.constructor===CharacterData}function je(e){return e?.constructor===Comment||/comment/i.test(e)}function mn(e){return!m(G(e),HTMLUnknownElement)}function dn(e){return(t,...n)=>on(e,t,...n)}var{IS:oe,maybe:jo,$Wrap:No,xProxy:Co,isNothing:Lo}=gn();function gn(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:I,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case I:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,I=!N&&Object.getPrototypeOf(a)?.constructor,k=e({trial:P=>String(a)})==="NaN",Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:I,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var ot=pn;function pn({styleSheet:e,createWithId:t}={}){let{tryParseAtOrNestedRules:n,ruleExists:r,checkParams:o,sheet:i,removeRules:s,consider:u,currentSheetID:p}=yn({styleSheet:e,createWithId:t});function y(b,g){if(b&&g.removeProperties){Object.keys(g.removeProperties).forEach(x=>b.style.removeProperty(qe(x)));return}Object.entries(g).forEach(([x,T])=>{x=qe(x.trim()),T=T.trim();let L;if(/!important/.test(T)&&(T=T.slice(0,T.indexOf("!important")).trim(),L="important"),!CSS.supports(x,T))return console.error(`StylingFactory ${p} error: '${x}' with value '${T}' not supported (yet)`);Be(()=>b.style.setProperty(x,T,L),`StylingFactory ${p} (setRule4Selector) failed`)})}function d(b,g,x=i){if(b=b?.trim?.(),!oe(b,String)||!b.length||/[;,]$/g.test(b))return console.error(`StylingFactory ${p} (setRules): [${b||"[no selector given]"}] is not a valid selector`);if(g.removeRule)return s(b);let T=r(b,!0),L=T||x.cssRules[x.insertRule(`${b} {}`,x.cssRules.length||0)];return u(()=>y(L,g),b,T)}function S(b){let g=b.trim().split(/{/,2),x=g.shift().trim();if(!oe(x,String)||!x?.trim()?.length)return console.error(`StylingFactory ${p} (doParse): no (valid) selector could be extracted from rule ${Se(b)}`);let T=$n(g.shift());return Be(()=>d(x,T),`StylingFactory ${p} (setRules) failed`)}function h(b){let g=n(b);return g.done?g.existing:S(b)}function v(b,g){return b.trim().startsWith("@media")?h(hn(b,g)):d(b,g)}return function(b,g={}){return o(b,g)&&(Object.keys(g).length?v(b,g):h(b))}}function yn({styleSheet:e,createWithId:t}){let n="Note: The rule or some of its properties may not be supported by your browser (yet)",r=`for style#${t}`;e=t?o(t):e;function o(h){let v=document.querySelector(`#${h}`)?.sheet;if(v)return v;let b=Object.assign(document.createElement("style"),{id:h});return document.head.insertAdjacentElement("beforeend",b),b.sheet}function i(h){return console.error(`StylingFactory ${r} [rule: ${h}]
3
- => @charset, @namespace and @import are not supported here`),{done:!0}}function s(h,v){return[...e.rules].find(b=>v?Ve(b.selectorText||"",h):xn`${Sn(h)}${[..."gim"]}`.test(b.cssText))}function u(h){return/^@charset|@import|namespace/i.test(h.trim())?i(h):h.match(/}/g)?.length>1?{existing:d(h,1),done:!0}:{done:!1}}function p(h){let v=[...e.cssRules].reduce((g,x,T)=>Ve(x.selectorText||"",h)&&g.concat(T)||g,[]),b=v.length;return v.forEach(g=>e.deleteRule(g)),b>0?console.info(`\u2714 Removed ${b} instance${b>1?"s":""} of selector ${h} from ${r.slice(4)}`):console.info(`\u2714 Remove rule: selector ${h} does not exist in ${r.slice(4)}`)}function y(h,v){return h&&oe(h,String)&&h.trim().length>0&&oe(v,Object)||(console.error(`StylingFactory ${r} called with invalid parameters`),!1)}function d(h){h=h.trim();let v=h.slice(0,h.indexOf("{")).trim(),b=!!s(v);try{return e.insertRule(`${h}`,e.cssRules.length),b}catch(g){return console.error(`StylingFactory ${r} (tryParse) ${g.name} Error:
1
+ var{IS:m,maybe:Gt,$Wrap:Do,xProxy:jo,isNothing:No}=Kt();function Kt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:M,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case M:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,M=!N&&Object.getPrototypeOf(a)?.constructor,k=e({trial:P=>String(a)})==="NaN",Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:M,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var Xt=nn(),be=en(),ee=tn();function en(){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 tn(){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 nn(){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 We={html:"innerHTML",text:"textContent",class:"className"},rn=on();function on(){let e={get(t,n){let r=String(n)?.toLowerCase();switch(!0){case r in t:return t[r];case gn(r):return Ue(t,r,n);default:return Ue(t,r,n,!0)}},enumerable:!1,configurable:!1};return new Proxy({},e)}function Ue(e,t,n,r=!1){return Object.defineProperty(e,t,{get(){return r?o=>mn(n):pn(t)}}),e[t]}function an(e,t,n){return t=t?.isJQx&&t.first()||t,Gt({trial:r=>dn(t)?e.append(t):rt(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} (for root ${e}) not created, reason
2
+ `,r)})}function ln(e,t,...n){let r=sn(t,e);return n?.forEach(o=>an(r,o,e)),r}function sn(e,t){switch(e=je(t)?fn(e):e?.isJQx?e.first():e,!0){case m(e,String):return G(t,rt(e,t)?{html:e}:{text:e});case m(e,Node):return cn(t,e);default:return G(t,e)}}function un(e){return delete e.data,Object.keys(e).length<1||Object.keys(e).forEach(t=>{let n=t.toLowerCase();n in We&&(e[We[n]]=e[t],delete e[t])}),e}function cn(e,t){let n=G(e);return n.append(t),n}function G(e,t={}){t=nt(t,{});let n=Object.entries(t.data??{}),r=Object.assign(je(e)?new Comment(t?.text):document.createElement(e),un(t));return n.length&&n.forEach(([o,i])=>r.dataset[o]=String(i)),r}function nt(e,t){return t?m(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:t}):m(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function fn(e){return nt(e)?e?.text??e?.textContent??"":String(e)}function mn(e){return G("b",{style:"color:red",text:`'${e}' is not a valid HTML-tag`})}function rt(e,t){return!je(t)&&m(e,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(e)}function dn(e){return e?.constructor===Comment||e?.constructor===CharacterData}function je(e){return e?.constructor===Comment||/comment/i.test(e)}function gn(e){return!m(G(e),HTMLUnknownElement)}function pn(e){return(t,...n)=>ln(e,t,...n)}var{IS:oe,maybe:Co,$Wrap:Lo,xProxy:Ao,isNothing:Io}=yn();function yn(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:M,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case M:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,M=!N&&Object.getPrototypeOf(a)?.constructor,k=e({trial:P=>String(a)})==="NaN",Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:M,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var ot=hn;function hn({styleSheet:e,createWithId:t}={}){let{tryParseAtOrNestedRules:n,ruleExists:r,checkParams:o,sheet:i,removeRules:s,consider:u,currentSheetID:p}=bn({styleSheet:e,createWithId:t});function y(b,g){if(b&&g.removeProperties){Object.keys(g.removeProperties).forEach(x=>b.style.removeProperty(qe(x)));return}Object.entries(g).forEach(([x,T])=>{x=qe(x.trim()),T=T.trim();let L;if(/!important/.test(T)&&(T=T.slice(0,T.indexOf("!important")).trim(),L="important"),!CSS.supports(x,T))return console.error(`StylingFactory ${p} error: '${x}' with value '${T}' not supported (yet)`);Be(()=>b.style.setProperty(x,T,L),`StylingFactory ${p} (setRule4Selector) failed`)})}function d(b,g,x=i){if(b=b?.trim?.(),!oe(b,String)||!b.length||/[;,]$/g.test(b))return console.error(`StylingFactory ${p} (setRules): [${b||"[no selector given]"}] is not a valid selector`);if(g.removeRule)return s(b);let T=r(b,!0),L=T||x.cssRules[x.insertRule(`${b} {}`,x.cssRules.length||0)];return u(()=>y(L,g),b,T)}function S(b){let g=b.trim().split(/{/,2),x=g.shift().trim();if(!oe(x,String)||!x?.trim()?.length)return console.error(`StylingFactory ${p} (doParse): no (valid) selector could be extracted from rule ${Se(b)}`);let T=On(g.shift());return Be(()=>d(x,T),`StylingFactory ${p} (setRules) failed`)}function h(b){let g=n(b);return g.done?g.existing:S(b)}function v(b,g){return b.trim().startsWith("@media")?h(Sn(b,g)):d(b,g)}return function(b,g={}){return o(b,g)&&(Object.keys(g).length?v(b,g):h(b))}}function bn({styleSheet:e,createWithId:t}){let n="Note: The rule or some of its properties may not be supported by your browser (yet)",r=`for style#${t}`;e=t?o(t):e;function o(h){let v=document.querySelector(`#${h}`)?.sheet;if(v)return v;let b=Object.assign(document.createElement("style"),{id:h});return document.head.insertAdjacentElement("beforeend",b),b.sheet}function i(h){return console.error(`StylingFactory ${r} [rule: ${h}]
3
+ => @charset, @namespace and @import are not supported here`),{done:!0}}function s(h,v){return[...e.rules].find(b=>v?Ve(b.selectorText||"",h):wn`${vn(h)}${[..."gim"]}`.test(b.cssText))}function u(h){return/^@charset|@import|namespace/i.test(h.trim())?i(h):h.match(/}/g)?.length>1?{existing:d(h,1),done:!0}:{done:!1}}function p(h){let v=[...e.cssRules].reduce((g,x,T)=>Ve(x.selectorText||"",h)&&g.concat(T)||g,[]),b=v.length;return v.forEach(g=>e.deleteRule(g)),b>0?console.info(`\u2714 Removed ${b} instance${b>1?"s":""} of selector ${h} from ${r.slice(4)}`):console.info(`\u2714 Remove rule: selector ${h} does not exist in ${r.slice(4)}`)}function y(h,v){return h&&oe(h,String)&&h.trim().length>0&&oe(v,Object)||(console.error(`StylingFactory ${r} called with invalid parameters`),!1)}function d(h){h=h.trim();let v=h.slice(0,h.indexOf("{")).trim(),b=!!s(v);try{return e.insertRule(`${h}`,e.cssRules.length),b}catch(g){return console.error(`StylingFactory ${r} (tryParse) ${g.name} Error:
4
4
  ${g.message}
5
5
  Rule: ${Se(h)}
6
6
  ${n}`),b}}function S(h,v,b){try{return h(),b}catch(g){return console.error(`StylingFactory ${r} (tryAddOrModify) ${g.name} Error:
7
7
  ${g.message}
8
8
  Rule: ${Se(v)}
9
- ${n}`),b}}return{sheet:e,removeRules:p,tryParseAtOrNestedRules:u,ruleExists:s,checkParams:y,tryParse:d,consider:S,currentSheetID:r}}function hn(e,t){return`${e.trim()} ${Object.entries(t).map(([n,r])=>`${n}: { ${bn(r)}`)}`}function Se(e){let t=(e||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return e.length>t.length?`${t.trim()}...truncated`:t}function bn(e){return Object.entries(e).map(([t,n])=>`${t}: ${n.trim()}`).join(`;
10
- `)}function Sn(e){return e.replace(/([*\[\]()-+{}.$?\\])/g,t=>`\\${t}`)}function xn(e,...t){let n=t.length&&Array.isArray(t.slice(-1))?t.pop().join(""):"";return new RegExp((t.length&&e.raw.reduce((r,o,i)=>r.concat(t[i-1]||"").concat(o),"")||e.raw.join("")).split(`
11
- `).map(r=>r.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),n)}function qe(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Be(e,t){try{return e()}catch(n){console.error(`${t||"an error occured"}: ${n.message}`)}}function vn(e){return e.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(t,n)=>`${n}\\3b`).split(";").map(t=>t.trim()).join(`;
9
+ ${n}`),b}}return{sheet:e,removeRules:p,tryParseAtOrNestedRules:u,ruleExists:s,checkParams:y,tryParse:d,consider:S,currentSheetID:r}}function Sn(e,t){return`${e.trim()} ${Object.entries(t).map(([n,r])=>`${n}: { ${xn(r)}`)}`}function Se(e){let t=(e||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return e.length>t.length?`${t.trim()}...truncated`:t}function xn(e){return Object.entries(e).map(([t,n])=>`${t}: ${n.trim()}`).join(`;
10
+ `)}function vn(e){return e.replace(/([*\[\]()-+{}.$?\\])/g,t=>`\\${t}`)}function wn(e,...t){let n=t.length&&Array.isArray(t.slice(-1))?t.pop().join(""):"";return new RegExp((t.length&&e.raw.reduce((r,o,i)=>r.concat(t[i-1]||"").concat(o),"")||e.raw.join("")).split(`
11
+ `).map(r=>r.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),n)}function qe(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Be(e,t){try{return e()}catch(n){console.error(`${t||"an error occured"}: ${n.message}`)}}function $n(e){return e.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(t,n)=>`${n}\\3b`).split(";").map(t=>t.trim()).join(`;
12
12
  `).replaceAll("\\3b",";").split(`
13
- `)}function wn(e){return e.reduce((t,n)=>{let[r,o]=[n.slice(0,n.indexOf(":")).trim(),n.slice(n.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return r&&o?{...t,[r]:o}:t},{})}function $n(e){return wn(vn(e))}function Ve(e,t){return e?.replace("::",":")===t?.replace("::",":")}var xe=!1,Tn={on:()=>xe=!0,off:()=>xe=!1},K={tagsRaw:ee,allowUnknownHtmlTags:Tn,isAllowed(e){if(xe)return!0;let t=m(e,String)?e.toLowerCase():e?.nodeName.toLowerCase()||"none";return t==="#text"||!!ee[t]},allowTag:e=>ee[e.toLowerCase()]=!0,prohibitTag:e=>ee[e.toLowerCase()]=!1},On=!0,te={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 Dn(e){if(On&&Object.keys(e.removed).length){let t=Object.entries(e.removed).reduce((n,[r,o])=>[...n,`${ie(r)} => ${o}`],[]).join("\\000A");A.error(`JQx: HTML creation error(s): ${t}`)}}function jn(e){let t=e.nodeName.toLowerCase(),n=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(t)&&!n.find(r=>r===t)||K.isAllowed(t)}function Ne(e){let t={rawHTML:e?.parentElement?.getHTML()??"no html",removed:{}};return m(e,HTMLElement)&&[...e.childNodes].forEach(n=>{if(n?.children?.length&&Ne(n),n?.attributes){let r=m(n,SVGElement)?be.svg:be.html;[...(n??{attributes:[]}).attributes].forEach(o=>{let i=o.name.trim().toLowerCase(),s=o.value.trim().toLowerCase().replace(te.whiteSpace,""),u=i==="href"?!te.validURL.test(s):te.notAllowedValues.test(s),p=i.startsWith("data")?!te.data.test(i):!!r[i];if(u||p){let y=_e(o.value||"none",60);y+=y.length===60?"...":"",t.removed[`${o.name}`]=`attribute/property/value not allowed, removed. Value: ${y}`,n.removeAttribute(o.name)}})}if(!(jn(n)||n.constructor===CharacterData||n.constructor===Comment)){let r=(n?.outerHTML||n?.textContent).trim(),o=_e(r,60)??"EMPTY";o+=o.length===60?"...":"",t.removed[`<${n.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${o}`,n.remove()}}),Dn(t),e}function Nn(e){let t=document.createElement("div");return t.insertAdjacentHTML(F.end,e),t.childNodes.length?Ne(t):void 0}function Cn(e,t,n){switch(!0){case m(e,Comment):return t.insertAdjacentHTML(n,`<!--${e.data}-->`);case m(e,Text):return t.insertAdjacentText(n,e.data||e.textContent);default:return}}function ve(e=[],t=document.body,n=F.BeforeEnd){return n=n||F.BeforeEnd,t=t?.isJQx?t.node:t||document.body,e.reduce((r,o)=>{let i=W(o)&&Ln(o,t,n);return i?[...r,i]:r},[])}function Ln(e,t=document.body,n=F.BeforeEnd){return n=n||F.BeforeEnd,t=t?.isJQx?t?.[0]:t,m(e,Comment,Text)?Cn(e,t,n):m(e,HTMLElement)?t.insertAdjacentElement(n,e):void 0}function J(e){if(m(e,Text,Comment))return e;let t=e?.trim(),n=t?.split(/<text>|<\/text>/i)??[];if(n?.length&&(n=n.length>1?n.filter(o=>o.length).shift():void 0),t.startsWith("<!--")&&t.endsWith("-->"))return document.createComment(e.replace(/<!--|-->$/g,""));if(n||m(t,String)&&!/^<(.+)[^>]+>/m.test(t))return document.createTextNode(n??t);let r=Nn(e);return r.childNodes.length<1?J(`<span data-jqxcreationerror="1">${lt(e,60)}</span>`):r.children[0]}function An(e){if(e.node("#jqxPopup"))return;e.logger.log("JQx: [JQx].Popup first call. Dialog element created."),e.dialog({id:"jqxPopup"},e.div({id:"jqxPopupContent"})).render,e.editCssRules(...Gt);let t=[],[n,r]=[e("#jqxPopupContent"),e.node("#jqxPopup")],o={};return e.handle({type:"click, cancel",handlers:h,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:i,remove:s,removeModal:S});function i(g){if(r.open)switch(!0){case u(g):return;default:return s(),setTimeout(()=>i(g),200)}o={...g};let{content:x}=o;return e.IS(x,String,HTMLElement)||x?.isJQx?p():!0}function s(){return o.modal?b(o.warnMessage):y()}function u(g){for(let[x,T]of Object.entries(o))if(T!==g[x])return!1;return!0}function p(){n.clear();let{content:g,modal:x,closeAfter:T}=o;x=e.IS(x,Boolean)?x:!1;let L=x?"":e.div({id:"closeHandleIcon"});n.append(L,e.IS(g,String)?e.div(g):g),r.showModal(),!x&&e.IS(T,Number)&&v(s,T)}function y(){if(r.close(o.returnValue),d(),e.IS(o.callback,Function))return t.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function d(){t.forEach(g=>clearTimeout(g)),t=[]}function S({callback:g,value:x}={}){o.returnValue=x,o.modal=!1,o.callback=g||o.callback,s()}function h({evt:g}){if(!(Object.keys(o).length<1||!r.open)&&(g.type==="cancel"&&o.modal&&g.preventDefault(),g.target.closest("#closeHandleIcon")||!g.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),s()}function v(g,x){e.IS(g,Function)&&e.IS(x,Number)&&x>0&&(d(),t.push(setTimeout(g,x*1e3)))}function b(g){if(!e.IS(g,String,HTMLElement,Proxy))return;let x=n.find$(".warn");switch(!0){case x.is.empty:x=e.div({class:"warn"},g);default:n.append(x.addClass("active")),v(()=>n.find$(".warn").removeClass("active"),2)}}}function En(e){let t={},n="anonymous_";function r(d){if(d){let{handler:S,capture:h,type:v}=d;document.addEventListener(v,S,{capture:h})}}function o(d){if(d){let{type:S,handler:h,capture:v}=d;document.removeEventListener(S,h,{capture:v})}}function i(d,S,h,v){return function(b){if(!C(S))return d({evt:b});let g=b.target.closest(S);if(g){let x=e(g);d({self:x,me:x,evt:b}),h&&p(b.type,v)}return!0}}function s(d){return t[d]=t[d]||{},t[d]}function u(d,S){return Object.entries(s(d)).find(([h])=>h===S)}function p(d,S){let h=u(d,S);h&&(o(h[1]),delete t[d][S],delete we[S],A.warn(`Removed listener [${S}] for event type [${d}].`))}function y(d){let{type:S,handler:h,name:v,capture:b,once:g,selector:x,node:T,about:L}=d;t[S]=t[S]||{};let a=Pn(v||h.name),l=h;if(T instanceof HTMLElement){let c=T.dataset.hid||a;T.dataset.hid=c,x=`[data-hid=${c}]`}switch(!0){case!t[S][a]:return A.log(`JQx: created listener for event type ${S}, with handler name ${a}`),t[S][a]={name:a,handler:i(h,x,g,a),capture:zn(S,b),once:!!g,type:S,initialHandler:l,selector:!!x&&x||!1,about:!!L&&L||!1,unListen(){p(S,a)}},t[S][a];default:return console.warn(`The listener [${a}] for [${S}] exists, it is not re-assigned.`)}}return{remove(...d){return p(...d)},listen:function(d){let{type:S,handler:h}=d;if(!C(S)||!m(h,Function))return;let v=y(d);if(v)return r(v),{type:S,name:v.name,unListen(){p(S,v.name)}}},get ListenerStore(){return Object.freeze({...t})}}}var A=Hn(),Mn=["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(e,t){return e[String(t).toLowerCase()]??e[t]}})),In=[...Array(26)].map((e,t)=>String.fromCharCode(t+65)).concat([...Array(26)].map((e,t)=>String.fromCharCode(t+97))).concat([...Array(10)].map((e,t)=>`${t}`)),kn=Object.freeze({get(e,t){return e[Ce(t)]||e[t]},enumerable:!1,configurable:!1}),we={};function Zn(){let e=setTimeout(()=>{});for(;e>=0;)clearTimeout(e--)}function Pn(e){return C(e)&&!/^handler|handlers$/gi.test(e.trim())?e.trim():it()}function Fn(e){let t=!!e.node&&!m(e,Text,Comment);switch(!0){case t:let n=e.node.dataset?Object.keys(e.node.dataset).map(o=>`[data-${o}]`):[],r=[e.attr("id")&&`#${e?.attr("id")}`||void 0,e.attr("class")&&e?.attr("class").split(" ").map(o=>`.${o}`).join(", ")||void 0,n.length>0&&n.join(", ")||void 0].filter(o=>!!o).join(", ")||[];return r.length?`(${r})`:"";default:return""}}function it(e){let t=`anonymous_${Math.random().toString(36).slice(2)}`;return we[t]?it():(we[t]=t,t)}function zn(e,t){return!!Mn.find(n=>n===e)||!!t}function at(e){return e.startsWith("data")||be.html.find(t=>e.toLowerCase()===t)}function Ye(e){return e&&(e.textContent="")}function $e(e,t=0,n=!0){return e=e?.parentElement,t+=e?e[n?"scrollTop":"scrollLeft"]:0,e?$e(e,t,n):t}function C(e,t=1){return t=m(t,Number)&&t||1,m(e,String)&&e.length>=t}function _e(e,t=120){return lt(e,t).replace(/&lt;/g,"<")}function lt(e,t=120){return`${e}`.trim().slice(0,t).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(e.length>t?" &hellip;":"").trim()}function ie(e){switch(!0){case m(e,String):let t=document.createElement("div");return t.append(e),t.innerHTML;default:return e}}function pe(e){return m(e,String)&&Object.assign(document.createElement("textarea"),{innerHTML:e}).textContent||e}function Hn(){let[e,t]=[!1,!0],n=[],r={get on(){return e=!0,r},get off(){return e=!1,r},get disable(){return t=!0,r},get enable(){return t=!1,r},get backLog(){return n}};function o(){t=!0}function i(){t=!1}function s(...y){return n.unshift(...y.map(d=>`${ye()} \u2A3B ${pe(d)}`)),console.error(n.slice(0,y.length).join(`
13
+ `)}function Tn(e){return e.reduce((t,n)=>{let[r,o]=[n.slice(0,n.indexOf(":")).trim(),n.slice(n.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return r&&o?{...t,[r]:o}:t},{})}function On(e){return Tn($n(e))}function Ve(e,t){return e?.replace("::",":")===t?.replace("::",":")}var xe=!1,Dn={on:()=>xe=!0,off:()=>xe=!1},K={tagsRaw:ee,allowUnknownHtmlTags:Dn,isAllowed(e){if(xe)return!0;let t=m(e,String)?e.toLowerCase():e?.nodeName.toLowerCase()||"none";return t==="#text"||!!ee[t]},allowTag:e=>ee[e.toLowerCase()]=!0,prohibitTag:e=>ee[e.toLowerCase()]=!1},jn=!0,te={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 Nn(e){if(jn&&Object.keys(e.removed).length){let t=Object.entries(e.removed).reduce((n,[r,o])=>[...n,`${ie(r)} => ${o}`],[]).join("\\000A");A.error(`JQx: HTML creation error(s): ${t}`)}}function Cn(e){let t=e.nodeName.toLowerCase(),n=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(t)&&!n.find(r=>r===t)||K.isAllowed(t)}function Ne(e){let t={rawHTML:e?.parentElement?.getHTML()??"no html",removed:{}};return m(e,HTMLElement)&&[...e.childNodes].forEach(n=>{if(n?.children?.length&&Ne(n),n?.attributes){let r=m(n,SVGElement)?be.svg:be.html;[...(n??{attributes:[]}).attributes].forEach(o=>{let i=o.name.trim().toLowerCase(),s=o.value.trim().toLowerCase().replace(te.whiteSpace,""),u=i==="href"?!te.validURL.test(s):te.notAllowedValues.test(s),p=i.startsWith("data")?!te.data.test(i):!!r[i];if(u||p){let y=_e(o.value||"none",60);y+=y.length===60?"...":"",t.removed[`${o.name}`]=`attribute/property/value not allowed, removed. Value: ${y}`,n.removeAttribute(o.name)}})}if(!(Cn(n)||n.constructor===CharacterData||n.constructor===Comment)){let r=(n?.outerHTML||n?.textContent).trim(),o=_e(r,60)??"EMPTY";o+=o.length===60?"...":"",t.removed[`<${n.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${o}`,n.remove()}}),Nn(t),e}function Ln(e){let t=document.createElement("div");return t.insertAdjacentHTML(F.end,e),t.childNodes.length?Ne(t):void 0}function An(e,t,n){switch(!0){case m(e,Comment):return t.insertAdjacentHTML(n,`<!--${e.data}-->`);case m(e,Text):return t.insertAdjacentText(n,e.data||e.textContent);default:return}}function ve(e=[],t=document.body,n=F.BeforeEnd){return n=n||F.BeforeEnd,t=t?.isJQx?t.node:t||document.body,e.reduce((r,o)=>{let i=W(o)&&In(o,t,n);return i?[...r,i]:r},[])}function In(e,t=document.body,n=F.BeforeEnd){return n=n||F.BeforeEnd,t=t?.isJQx?t?.[0]:t,m(e,Comment,Text)?An(e,t,n):m(e,HTMLElement)?t.insertAdjacentElement(n,e):void 0}function J(e){if(m(e,Text,Comment))return e;let t=e?.trim(),n=t?.split(/<text>|<\/text>/i)??[];if(n?.length&&(n=n.length>1?n.filter(o=>o.length).shift():void 0),t.startsWith("<!--")&&t.endsWith("-->"))return document.createComment(e.replace(/<!--|-->$/g,""));if(n||m(t,String)&&!/^<(.+)[^>]+>/m.test(t))return document.createTextNode(n??t);let r=Ln(e);return r.childNodes.length<1?J(`<span data-jqxcreationerror="1">${lt(e,60)}</span>`):r.children[0]}function En(e){if(e.node("#jqxPopup"))return;e.logger.log("JQx: [JQx].Popup first call. Dialog element created."),e.dialog({id:"jqxPopup"},e.div({id:"jqxPopupContent"})).render,e.editCssRules(...Xt);let t=[],[n,r]=[e("#jqxPopupContent"),e.node("#jqxPopup")],o={};return e.handle({type:"click, cancel",handlers:h,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:i,remove:s,removeModal:S});function i(g){if(r.open)switch(!0){case u(g):return;default:return s(),setTimeout(()=>i(g),200)}o={...g};let{content:x}=o;return e.IS(x,String,HTMLElement)||x?.isJQx?p():!0}function s(){return o.modal?b(o.warnMessage):y()}function u(g){for(let[x,T]of Object.entries(o))if(T!==g[x])return!1;return!0}function p(){n.clear();let{content:g,modal:x,closeAfter:T}=o;x=e.IS(x,Boolean)?x:!1;let L=x?"":e.div({id:"closeHandleIcon"});n.append(L,e.IS(g,String)?e.div(g):g),r.showModal(),!x&&e.IS(T,Number)&&v(s,T)}function y(){if(r.close(o.returnValue),d(),e.IS(o.callback,Function))return t.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function d(){t.forEach(g=>clearTimeout(g)),t=[]}function S({callback:g,value:x}={}){o.returnValue=x,o.modal=!1,o.callback=g||o.callback,s()}function h({evt:g}){if(!(Object.keys(o).length<1||!r.open)&&(g.type==="cancel"&&o.modal&&g.preventDefault(),g.target.closest("#closeHandleIcon")||!g.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),s()}function v(g,x){e.IS(g,Function)&&e.IS(x,Number)&&x>0&&(d(),t.push(setTimeout(g,x*1e3)))}function b(g){if(!e.IS(g,String,HTMLElement,Proxy))return;let x=n.find$(".warn");switch(!0){case x.is.empty:x=e.div({class:"warn"},g);default:n.append(x.addClass("active")),v(()=>n.find$(".warn").removeClass("active"),2)}}}function Mn(e){let t={},n="anonymous_";function r(d){if(d){let{handler:S,capture:h,type:v}=d;document.addEventListener(v,S,{capture:h})}}function o(d){if(d){let{type:S,handler:h,capture:v}=d;document.removeEventListener(S,h,{capture:v})}}function i(d,S,h,v){return function(b){if(!C(S))return d({evt:b});let g=b.target.closest(S);if(g){let x=e(g);d({self:x,me:x,evt:b}),h&&p(b.type,v)}return!0}}function s(d){return t[d]=t[d]||{},t[d]}function u(d,S){return Object.entries(s(d)).find(([h])=>h===S)}function p(d,S){let h=u(d,S);h&&(o(h[1]),delete t[d][S],delete we[S],A.warn(`Removed listener [${S}] for event type [${d}].`))}function y(d){let{type:S,handler:h,name:v,capture:b,once:g,selector:x,node:T,about:L}=d;t[S]=t[S]||{};let a=zn(v||h.name),l=h;if(T instanceof HTMLElement){let c=T.dataset.hid||a;T.dataset.hid=c,x=`[data-hid=${c}]`}switch(!0){case!t[S][a]:return A.log(`JQx: created listener for event type ${S}, with handler name ${a}`),t[S][a]={name:a,handler:i(h,x,g,a),capture:Rn(S,b),once:!!g,type:S,initialHandler:l,selector:!!x&&x||!1,about:!!L&&L||!1,unListen(){p(S,a)}},t[S][a];default:return console.warn(`The listener [${a}] for [${S}] exists, it is not re-assigned.`)}}return{remove(...d){return p(...d)},listen:function(d){let{type:S,handler:h}=d;if(!C(S)||!m(h,Function))return;let v=y(d);if(v)return r(v),{type:S,name:v.name,unListen(){p(S,v.name)}}},get ListenerStore(){return Object.freeze({...t})}}}var A=Jn(),kn=["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(e,t){return e[String(t).toLowerCase()]??e[t]}})),Zn=[...Array(26)].map((e,t)=>String.fromCharCode(t+65)).concat([...Array(26)].map((e,t)=>String.fromCharCode(t+97))).concat([...Array(10)].map((e,t)=>`${t}`)),Pn=Object.freeze({get(e,t){return e[Ce(t)]||e[t]},enumerable:!1,configurable:!1}),we={};function Fn(){let e=setTimeout(()=>{});for(;e>=0;)clearTimeout(e--)}function zn(e){return C(e)&&!/^handler|handlers$/gi.test(e.trim())?e.trim():it()}function Hn(e){let t=!!e.node&&!m(e,Text,Comment);switch(!0){case t:let n=e.node.dataset?Object.keys(e.node.dataset).map(o=>`[data-${o}]`):[],r=[e.attr("id")&&`#${e?.attr("id")}`||void 0,e.attr("class")&&e?.attr("class").split(" ").map(o=>`.${o}`).join(", ")||void 0,n.length>0&&n.join(", ")||void 0].filter(o=>!!o).join(", ")||[];return r.length?`(${r})`:"";default:return""}}function it(e){let t=`anonymous_${Math.random().toString(36).slice(2)}`;return we[t]?it():(we[t]=t,t)}function Rn(e,t){return!!kn.find(n=>n===e)||!!t}function at(e){return e.startsWith("data")||be.html.find(t=>e.toLowerCase()===t)}function Ye(e){return e&&(e.textContent="")}function $e(e,t=0,n=!0){return e=e?.parentElement,t+=e?e[n?"scrollTop":"scrollLeft"]:0,e?$e(e,t,n):t}function C(e,t=1){return t=m(t,Number)&&t||1,m(e,String)&&e.length>=t}function _e(e,t=120){return lt(e,t).replace(/&lt;/g,"<")}function lt(e,t=120){return`${e}`.trim().slice(0,t).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(e.length>t?" &hellip;":"").trim()}function ie(e){switch(!0){case m(e,String):let t=document.createElement("div");return t.append(e),t.innerHTML;default:return e}}function pe(e){return m(e,String)&&Object.assign(document.createElement("textarea"),{innerHTML:e}).textContent||e}function Jn(){let[e,t]=[!1,!0],n=[],r={get on(){return e=!0,r},get off(){return e=!1,r},get disable(){return t=!0,r},get enable(){return t=!1,r},get backLog(){return n}};function o(){t=!0}function i(){t=!1}function s(...y){return n.unshift(...y.map(d=>`${ye()} \u2A3B ${pe(d)}`)),console.error(n.slice(0,y.length).join(`
14
14
  `)),r}function u(...y){return n.unshift(...y.map(d=>`${ye()} \u26A0 ${pe(d)}`)),console.warn(n.slice(0,y.length).join(`
15
15
  `)),r}function p(...y){let d=y.map(S=>`${ye()} \u2714 ${pe(S)}`);switch(!t&&n.unshift(...d),e){case!0:console.log(d.join(`
16
- `));default:return r}}return Object.defineProperties(r,{log:{value:p,enumerable:!1},error:{value:s,enumerable:!1},warn:{value:u,enumerable:!1}}),Object.freeze(r)}function ye(){return(e=>`[${ne(e.getHours())}:${ne(e.getMinutes())}:${ne(e.getSeconds())}.${ne(e.getMilliseconds(),3)}]`)(new Date)}function Rn(e,t){if(e)for(let[n,r]of Object.entries(t)){if(n=H(n),n.startsWith("data"))return st(e,r);m(r,String)&&at(n)&&e.setAttribute(n,r.split(/[, ]/)?.join(" "))}}function st(e,t){if(e&&m(t,Object))for(let[n,r]of Object.entries(t))e.setAttribute(`data-${H(n)}`,r)}function ut(e){return e?m(e,Proxy)?[e.EL]:m(e,NodeList)?[...e]:W(e)?[e]:Ee(e)?e:e.isJQx?e.collection:void 0:[]}function Ge(e,t){return e.andThen(t)}function Ke(e,t){return e.andThen(t,!0)}function W(e){return m(e,Text,HTMLElement,Comment)}function he(e,t){if(m(t,Object))for(let[n,r]of Object.entries(t)){let o;/!important/i.test(r)&&(r=r.slice(0,r.indexOf("!")).trim(),o="important"),e.style.setProperty(H(n),r,o)}}function Q(e){let t=e.cloneNode(!0);return t.removeAttribute&&t.removeAttribute("id"),e.isConnected?e.remove():e=null,t}function Jn(e){if(!m(e,HTMLElement))return;let t=e.style,n=getComputedStyle(e),r=!![t.visibility,n.visibility].includes("hidden"),o=!![t.display,n.display].includes("none"),i=!!e.hidden,s=parseInt(n.height)<1||parseInt(n.width)<1,u=e.offsetTop<0||e.offsetLeft+e.offsetWidth<0||e.offsetLeft>document.body.offsetWidth,p=+n.opacity==0||+(t.opacity||1)==0;return!(i||u||p||o||r||s)}function Qn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(t=>t===e):!1}function Wn(e){return e?.filter(t=>t).reduce((t,n)=>t.concat(ft(n)?`<!--${n.data}-->`:Le(n)?n.textContent:n.outerHTML),"")}function ne(e,t=2){return`${e}`.padStart(t,"0")}function Un(e,t=0){return[e,t]=[Math.floor(e),Math.ceil(t)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(e-t+1)+t)}function ct(){return`_${Yn(In).slice(0,8).join("")}`}function qn(e){return e=m(e,String)&&/,/.test(e)?e.split(",").map(t=>t.trim().toLowerCase()).filter(t=>t.length>0):e,m(e,Array)?e:m(e,String)&&e?.trim().toLowerCase()||""}function Bn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(t=>t===e):!1}function Vn(e,t){switch(e=String(e).trim(),!0){case/^(0|false|f)$/i.test(e):return!1;case/^(1|true|t)$/i.test(e):return!0;default:return t}}function Yn(e){let t=e.length;for(;t--;){let n=Un(t);[e[t],e[n]]=[e[n],e[t]]}return e}function Ce(e){return m(e,String)?e.toLowerCase().split("-").map((t,n)=>n&&`${_n(t)}`||t).join(""):e}function H(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^-|-$/,"")}function _n([e,...t]){return`${e.toUpperCase()}${t.join("")}`}function Le(e){return m(e,Comment,Text)}function ft(e){m(e,Comment)}function Gn(e){return m(e,Text)}function Ae(e){return m(e,String)&&/^<|>$/.test(`${e}`.trim())}function Ee(e){return m(e,Array)&&!e?.find(t=>!W(t))}function mt(e){return m(e,Array)&&!e?.find(t=>!Ae(t))}function O(e,t){let n=e.collection.filter(r=>!Le(r));for(let r=0;r<n.length;r+=1)t(n[r],r);return e}function Kn(e){return e.node?m(e.node,Comment)?`<!--${e.node.textContent}-->`:e.HTML.get(1).split(">")[0]+">...":""}function dt(e,t,n){let r=t!==document.body&&m(e,String)&&e.toLowerCase()!=="body"?t:document;try{n.collection=[...r.querySelectorAll(e)]}catch{A.warn(`JQx: Invalid CSS querySelector. [${m(e,String)?e:"Not a string!"}]`)}}function Xn(){return{isCommentOrTextNode:Le,isNode:W,isComment:ft,isText:Gn,isHtmlString:Ae,isArrayOfHtmlElements:Ee,isArrayOfHtmlStrings:mt,ElemArray2HtmlString:Wn,input2Collection:ut,setCollectionFromCssSelector:dt,cssRuleEdit:ot({createWithId:"JQxStylesheet"})}}function er(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return t=>{let n=t.node;return m(n,Node)?Object.freeze({get writable(){return Qn(n)},get modal(){return Bn(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return Jn(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return t.collection.length<1},get virtual(){return t.isVirtual}}):e}}function tr(e,t,n,r){n&&m(t,String)&&(t={[t]:n==="-"?"":n});let o;t.className&&(o=t.className,delete t.className),o=[...e.classList].find(i=>i.startsWith("JQxClass-")||o&&i===o)||o||`JQxClass-${ct().slice(1)}`,r.editCssRule(`.${o}`,t),e.classList.add(o)}var nr=er();function rr(e){return{factoryExtensions:or(e),instanceExtensions:ir(e)}}function or(e){return{data(t){return{get all(){return new Proxy(t[0]?.dataset??{},kn)},set(n={}){if(!t.is.empty&&m(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},get(n,r){return t.data.all[n]??r},add(n={}){if(!t.is.empty&&m(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},remove(n){return t[0]?.removeAttribute(`data-${H(n)}`),t}}},dimensions(t){if(t.is.empty)return A.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:n}=t,r=n.getBoundingClientRect().toJSON();return r.scrollTopDistance=$e(n,0),r.scrollLeftDistance=$e(n,0,!1),r},node(t){return t[0]},HTML(t){return{get(n,r){if(t.is.empty)return"NO ELEMENTS IN COLLECTION";let o=n?t.outerHtml:t.html();return r?ie(o):o},set(n,r=!1,o=!1){n=n.isJQx?n.HTML.get(1):n;let i=m(n,String);return n=i&&o?ie(n):n,i&&(n||"").trim().length&&t.html(n,r),t},replace(n,r=!1){return t.HTML.set(n,!1,r)},append(n,r=!1){return n=m(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n,!0,r)},insert(n,r=!1){return n=m(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n+t.HTML.get(),!1,r)}}},is(t){return nr(t)},length(t){return t.collection.length},outerHtml(t){return(t.first()||{outerHTML:void 0}).outerHTML},parent(t){let n=e(t[0]?.parentNode);return n.is.empty?t:n},render(t){switch(!0){case!t.is.empty:return t.toDOM();default:return e.logger.warn("[JQx.render]: empty collection"),t}},Style(t){return{get computed(){return t.is.empty?{}:getComputedStyle(t[0])},inline(n){return t.style(n)},inSheet(n){return t.css(n)},valueOf(n){return t.is.empty?void 0:getComputedStyle(t[0])[H(n)]},nwRule(n){return t.Style.byRule({rules:n})},byRule({classes2Apply:n=[],rules:r=[]}={}){let o=m(r,String)&&!n.length?r.split("{")[0].trim():"";if(r=r&&m(r,String)?[r]:r,n=n&&m(n,String)?[n]:n,(r?.length||n?.length)&&(r?.length&&e.editCssRules(...r),n))for(let i of n)t.addClass(i);return o?.startsWith(".")&&t.addClass(o.slice(1)),o?.startsWith("#")&&!t.attr("id")&&t.prop({id:o.slice(1)}),t}}}}}function ir(e){return{addClass(t,...n){return O(t,r=>r&&n.forEach(o=>r.classList.add(o)))},after:Ge,afterMe:Ge,andThen(t,n,r=!1){if(!n||!m(n,String,Node,Proxy))return A.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),t;n=n?.isJQx?n:m(n,Node)?e.virtual(n):e.virtual(J(n));let[o,i,s]=r?[0,"before",n.collection.concat(t.collection)]:[t.collection.length-1,"after",t.collection.concat(n.collection)];return t[o][i](...n.collection),t.collection=s,t},append(t,...n){if(t.is.empty||n.length<1)return t;let r=t.length===1;for(let o of n){if(!o.isJQx&&C(o)){let i=o.trim(),s=/^<(.+)[^>]+>$/m.test(i)?J(o):e.text(o);O(t,u=>u.append(r?s:Q(s)))}W(o)&&O(t,i=>i.append(r?o:Q(o))),o.isJQx&&!o.is.empty&&O(t,i=>o.collection.forEach(s=>i.append(r?s:Q(s))))}return t},appendTo(t,n){switch(!0){case(!n.isJQx&&!m(n,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).append(t),t}},attr(t,n,r){if(!t.node||m(t.node,Text,Comment))return t;if(!r&&C(n))return n=H(n),n==="class"?[...t.node.classList].join(" "):t.node.getAttribute(n);if(C(n)&&r)switch(n=H(n),!0){case n.startsWith("data-"):n={data:{[n.replace("data-","")]:r}};break;default:n={[n]:r}}return m(n,Object)&&!t.is.empty&&Rn(t.node,n),t},before:Ke,beforeMe:Ke,clear(t){return O(t,Ye)},closest(t,n){let r=C(n)?t.node?.closest(n):void 0;return r?e(r):t},computedStyle(t,n){let{node:r}=t;return r&&getComputedStyle(r)[n]},css(t,n,r){return O(t,o=>tr(o,n,r,e))},duplicate(t,n=!1,r=document.body){switch(!0){case t.is.empty:return A.error("Duplicating an empty JQx instance is not possible"),t;default:let o=t.collection[0].cloneNode(!0);return o.childNodes.forEach(i=>{i.removeAttribute&&i?.removeAttribute("id")}),n?e(o).toDOM(r):e.virtual(o)}},each(t,n){return O(t,n)},empty(t){return O(t,Ye)},find(t,n){return t.collection.length>0?[...t.first()?.querySelectorAll(n)]:[]},find$(t,n){return t.collection.length>0?e(n,t):t},first(t,n=!1){return t.collection.length>0?n?t.single():t.collection[0]:void 0},first$(t,n){return t.single(n)},getData(t,n,r){return t.node?.dataset?.[n]||r},hasClass(t,...n){return t.is.empty||!t.node.classList.length?!1:n.find(r=>t.node.classList.contains(r))&&!0||!1},hide(t){return O(t,n=>he(n,{display:"none !important"}))},html(t,n,r){switch(!0){case(t.is.empty&&!C(n)):return"";case!C(n):return t.node?.getHTML()??"";default:let o=J(`<div>${n.isJQx?n.HTML.get(!0):n}</div>`);return O(t,i=>(i.textContent=r?i.textContent:"",i.insertAdjacentHTML(e.at.end,o.getHTML())))}},htmlFor(t,n,r="",o=!1){if(t.is.empty||!C(n)||!C(r))return t;let i=t.find$(n);if(i.length<1)return t;let s=J(`<span>${r}</span>`);return i.each(u=>{o||(u.textContent=""),u.insertAdjacentHTML(e.at.end,s?.getHTML())}),t},isEmpty(t){return!t.node},nth$(t,n){return t.single(n)},on(t,n,...r){switch(!0){case(t.is.empty||!m(n,String,Array)||!C(n)||r.length<1):return t;default:return e.handle({type:n,node:t.node,handler:r}),t}},once(t,n,...r){switch(!0){case(t.is.empty||!m(n,String,Array)||!C(n)||r.length<1):return t;default:return e.handle({type:n,once:!0,node:t.node,handler:r}),t}},prepend(t,...n){if(t.is.empty||!n)return;let r=t.length===1;for(let o of n){if(C(o)){o=o.trim();let i=/^<(.+)[^>]+>$/m.test(o)?J(o):e.text(o);i=r?i:Q(i),O(t,s=>s.prepend(i.cloneNode(!0)))}W(o)&&O(t,i=>i.prepend(r?o:Q(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),O(t,i=>O(o,s=>i.prepend(r?s:Q(s)))),o.collection.reverse())}return t},prependTo(t,n){return n.isJQx||(n=e.virtual(n)),n.prepend(t),t},prop(t,n,r){if(m(n,String)&&!r)return n.startsWith("data")?t[0]?.dataset[n.slice(n.indexOf("-")+1)]:t[0]?.[n];let o=m(n,Object)?n:{[n]:r};for(let[i,s]of Object.entries(o)){if(i=i.trim(),s&&!at(i)||!s)return!1;if(i.toLowerCase()==="id")return t[0].id=s;O(t,u=>{if(i.startsWith("data"))return u.dataset[i.slice(i.indexOf("-")+1)]=s;u[i]=s})}return t},remove(t,n){let r=i=>i.remove(),o=()=>t.collection=t.collection.filter(i=>document.documentElement.contains(i));if(n){let i=t.find$(n);return i.is.empty||(O(i,r),o()),t}return O(t,r),o(),t},rmAttr(t,...n){for(let r of n)t.node.removeAttribute(r);return t},removeClass(t,...n){return O(t,r=>{if(r)for(let o of n)r.classList.remove(o)})},renderTo(t,n,r){return n=m(n,HTMLElement)||n.isJQx?n:document.body,r=m(r,String)&&e.at[r]?r:e.at.end,t.first$().toDOM(n,r),t},replace(t,n,r){let o=t.node;return!n||!m(r,HTMLElement)&&!r?.isJQx?(e.logger.error("JQx replace: invalid replacement value"),t):((r.isJQx||m(r,NodeList))&&(r=r[0]),o&&n&&(n=m(n,String)?o.querySelectorAll(n):n.isJQx?n.collection:n,m(n,HTMLElement,NodeList,Array)&&m(r,HTMLElement)&&(m(n,HTMLElement)?[n]:[...n]).forEach(i=>i.replaceWith(r.cloneNode(!0)))),t)},replaceClass(t,n,...r){return O(t,o=>{o.classList.remove(n);for(let i of r)o.classList.add(i)})},replaceMe(t,n){return t.replaceWith(n)},replaceWith(t,n){return n=m(n,Element)?n:n.isJQx?n[0]:void 0,n&&(t[0].replaceWith(n),t=e.virtual(n)),t},setData(t,n){return O(t,r=>st(r,n))},show(t){return O(t,n=>he(n,{display:"revert-layer !important"}))},single(t,n){let r=t.collection.length>0;switch(n=n??0,!0){case(r&&m(n,String)):return t.find$(n);case(r&&m(n,Number)):return e(t.collection[n]);case r:return t.collection[0];default:return t}},style(t,n,r){return O(t,o=>{r&&m(n,String)&&(n={[n]:r||"none"}),he(o,n)})},text(t,n,r=!1){switch(!0){case t.isEmpty():return t;case!m(n,String):return t.node.textContent;default:return O(t,o=>o.textContent=r?o.textContent+n:n)}},toDOM(t,n=document.body,r=F.BeforeEnd){return t.isVirtual=!1,ve(t.collection,n,r),t},toggleClass(t,n){return O(t,r=>r.classList.toggle(n))},toNodeList(t){return[...t.collection].map(n=>document.importNode(n,!0))},trigger(t,n,r,o){if(r=/Event]$/.test(m(r))?r:Event,o=m(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0},!t.is.empty){let i=new r(n,o);t.each(s=>s.dispatchEvent(i))}return t},val(t,n){switch(!0){case(t.is.empty||!m(t.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return t;case!m(n,String):return t.node.value;default:return t.node.value=m(n,String)?n:"",t}}}}var Te,ae,{isComment:Ao,isText:Eo,isHtmlString:Mo,isArrayOfHtmlElements:Io,isArrayOfHtmlStrings:ko,ElemArray2HtmlString:Zo,cssRuleEdit:Oe,addFn:ar}=lr();function lr(){return{...Xn(),addFn:sr}}function sr(e,t){return e=e?.trim(),!C(e)||!m(t,Function)?A.error("JQx.fn: method invalid parameter(s)"):ae[e]=(n,...r)=>t(n,...r)}function ur(e){return function(t,n,r){if(t=t?.trim(),!C(t)||!m(n,Function))return e.error("JQx.staticFn: invalid parameter(s)");let o=r?{get(){return n()}}:{value(...i){return n(...i)}};try{Object.defineProperty(e,t,o)}catch{return e.warn(`JQx.staticFn: extension [${t}] already exists`)}return A.log(`JQx: added static extension function [${t}]`)}}function re(e){return new Proxy(e,Object.freeze({get:(t,n)=>cr(t,n,e)}))}function Xe(e,t){return(...n)=>m(e,Function)&&e(re(t),...n)}function cr(e,t,n){switch(!0){case m(t,Symbol):return e;case m(+t,Number):return e.collection?.[t]||void 0;case t in Te:return Xe(Te[t],n)();case t in ae:return Xe(ae[t],n);default:return e[t]}}function fr(e){let t=yr(e);for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(t)))Object.defineProperty(e,n,r);return e}function mr(e){return{allow(t){let n=/-/.test(t),r=n&&t;t=n?Ce(t):t.toLowerCase(),K.allowTag(t),Object.defineProperties(e,De(t,!0,e,r))},prohibit(t){t=t.toLowerCase(),K.prohibitTag(t),Object.defineProperties(e,De(t,!1,e))}}}function et(...e){if(e.length===1){let t=String(e.shift().trim());e=t.startsWith("!")?[t.slice(1,-1)]:t.split(",").map(n=>n.trim())}for(let t of e.map(n=>n.startsWith("!")?n.slice(1,-1):n))Oe(t,{removeRule:1})}function dr(e){return function(t,n,r){n=n?.isJQx?n?.[0]:n,r=r&&Object.values(F).find(i=>r===i);let o=e(t,document.createElement("br"));if(n&&!m(n,HTMLBRElement))for(let i of o.collection)r?n.insertAdjacentElement(r,i):n.append(i);return o}}function gr(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);for(let[o,i]of Object.entries(r))!(o in t)&&Object.defineProperty(t,o,{...i,enumerable:!1})}return t}function pr(e,t,n,r){return e=H(r||e.toLowerCase()),{get(){return(...o)=>{let i=t&&n.virtual(Ne(tn[e](...o)))||void 0,s=m(i?.node,Comment,Text,void 0)?"":Fn(i);return A.log(t?`JQx: created (virtual) instance from [JQx].${e} ${s}`:`JQx: ${e.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),i}},enumerable:!1,configurable:!0}}function De(e,t,n,r){e=e.toLowerCase();let o=pr(e,t,n,r);return r?{[r]:o,[Ce(r)]:o}:{[e]:o,[e.toUpperCase()]:o}}function yr(e){return gr(Object.entries(K.tagsRaw).reduce(hr(e),{}),$r(e))}function hr(e){return function(t,[n,r]){return Object.defineProperties(t,De(n,r,e)),t}}function br(e){return function(t,n,...r){m(n,Function)&&(r.push(n),n=void 0),e({type:t,selector:n,handlers:r})}}function Sr(e){return function(t){let{type:n,types:r,origin:o,selector:i,handler:s,handlers:u,node:p,name:y,capture:d,once:S,about:h}=t;s=u||s,n=r||n,i=o||i;let v=qn(n),b=y;s=m(s,Function)?[s]:s;let g={type:v,selector:i||o,capture:d,name:b,once:S,node:p,about:h};switch(!0){case(m(v,Array)&&v.length>0):for(let x of v)g.type=x,tt(s,g,e);break;default:return tt(s,g,e)}}}function tt(e,t,n){for(let r of e)n.listen({...t,handler:r})}function xr(e){return function(t,n){return n=C(n)&&n,t=C(t)&&t,n&&t&&e.listenerStore[t][n]}}function vr(e){return e.activePopup||Object.defineProperty(e,"activePopup",{value:An(e),enumerable:!1}),e.activePopup}function wr(e){let t=(u,p)=>Oe(u,p),n=function(u){return ot({createWithId:u||`jqx${ct()}`})},r=function(...u){for(let p of u)Oe(p)},o=mr(e),i=En(e),s=Sr(i);return{editCssRule:t,createStyle:n,editCssRules:r,allowProhibit:o,handle:s,capturedHandling:s,log:(...u)=>A.on.log(...u).off,warn:(...u)=>A.on.warn(...u).off,error:(...u)=>A.on.error(...u).off,handlerWrapper:i}}function $r(e){let{factoryExtensions:t,instanceExtensions:n}=rr(e);Te=t,ae=n;let{editCssRule:r,createStyle:o,editCssRules:i,allowProhibit:s,handle:u,capturedHandling:p,log:y,warn:d,error:S,handlerWrapper:h}=wr(e),v=xr(e),b=ur(e);return{log:y,warn:d,error:S,editCssRules:i,createStyle:o,editStylesheet:o,editCssRule:r,escHtml:ie,logger:A,text(g,x=!1){return x?e.comment(g):document.createTextNode(g)},node(g,x=document){return x.querySelector(g,x)},nodes(g,x=document){return[...x.querySelectorAll(g,x)]},clearAllTimers:Zn,get staticFn(){return function(g,x,T){return b(g,x,T)}},get toBool(){return Vn},get getNamedListener(){return v},get virtual(){return dr(e)},get allowTag(){return s.allow},get prohibitTag(){return s.prohibit},get removeCssRule(){return et},get removeCssRules(){return et},get delegate(){return br(p)},get delegateCaptured(){return p},get handle(){return p},get listen(){return h.listen},get at(){return F},get setStyle(){return r},get fn(){return ar},get lenient(){return K.allowUnknownHtmlTags},get IS(){return m},get Popup(){return vr(e)},get listenerStore(){return h.ListenerStore}}}var Tr=fr(Or());function Or(){return function(e,t,n=F.BeforeEnd){if(e?.isJQx)return e;let r=m(t,HTMLBRElement);t=(!r&&t&&t.isJQx?t[0]:t)||document.body,n=n&&Object.values(F).find(p=>n===p)?n:void 0;let o=Ae(e),i=!o&&mt(e)||o,s={collection:ut(e)??[],isVirtual:r,isJQx:!0},u=Ee(s.collection);if(s.collection.length&&u)return r||s.collection.forEach(p=>{t.contains(p)||ve([p],t,n)}),re(s);if(i){if([e].flat().forEach(p=>s.collection.push(J(p))),s.collection.length>0){let p=s.collection.filter(S=>S?.dataset?.jqxcreationerror);s.collection=s.collection.filter(S=>!S?.dataset?.jqxcreationerror);let y=s.collection.map(S=>`${String(S.constructor).split(/function|\(/)[1].trim()}`).length>1;s=re(s);let d=s.collection.length>0?Kn(s):"sanitized: no elements remaining";A.log(`JQx: created ${s.isVirtual?"(virtual)":""} instance from ${y?"array of ":""}HTML string${y?"s":""} ${d}`),s.isVirtual||ve(s.collection,t,n)}return s}return dt(e,t,s),re(s)}}var R=Tr;var[U,q,ke,Ze]=["2-digit","numeric","long","short"],le={fixed:{MM:{month:ke},M:{month:Ze},m:{month:q},mm:{month:U},yyyy:{year:q},yy:{year:U},WD:{weekday:ke},wd:{weekday:Ze},d:{day:q},dd:{day:U},h:{hour:q},hh:{hour:U},mi:{minute:q},mmi:{minute:U},s:{second:q},ss:{second:U},ms:{fractionalSecondDigits:3},tz:{timeZoneName:"shortOffset"},dl:{locale:"default"},h12:{hour12:!1},yn:{yearName:""},ry:{relatedYear:!0},msp:{fractionalSecond:!0}},dynamic:{tzn:e=>({timeZoneName:e.slice(4)}),hrc:e=>({hourCycle:`h${e.slice(4)}`}),ds:e=>({dateStyle:e.slice(3)}),ts:e=>({timeStyle:e.slice(3)}),tz:e=>({timeZone:e.slice(3)}),e:e=>({era:e.slice(2)}),l:e=>({locale:e.slice(2)})}},V={...le,retrieveDynamic(e){let t=e?.slice(0,e?.indexOf(":"));return le.dynamic[t]&&le.dynamic[t](e)},get re(){return new RegExp(`\\b(${Object.keys(le.fixed).join("|")})\\b`,"g")}},me=Dr;function Dr(e,t,n="l:default"){return/ds:|ts:/.test(n)?jr(e,gt(void 0),n):Cr(e,gt(t||void 0),n)}function gt(e="dtf"){let t=` ${e.replace(/[{}]/g,"").trim()} `,n=e.match(/(?<=\{)(.+?)(?=})/g)||[];return{set formatStr(r){t=r},get formatStr(){return t},get units(){return t.match(V.re)||[]},finalize(r="",o="",i="",s=""){return t.replace(/~([\d+]?)/g,"$1").replace(/dtf/,r).replace(/era/,i).replace(/dp\b|~dp\b/,o).replace(/yn\b/,s).replace(/\[(\d+?)]/g,(u,p)=>n[p].trim()).trim()}}}function Ct(...e){return e?.reduce((t,n)=>({...t,...V.retrieveDynamic(n)||V.fixed[n]}),V.fixed.dl)}function jr(e,t,n){let r=Ct(...Lt(n).split(",")),o=Intl.DateTimeFormat(r.locale,r).format(e);return t.finalize(o)}function Nr(e,t){return e==="numeric"&&t.startsWith("0")?t.slice(1):t}function Cr(e,t,n){let r=Ct(...t.units.concat(Lt(n).split(",")).flat()),o={...V.fixed},i=Intl.DateTimeFormat(r.locale,r).formatToParts(e).reduce((s,u)=>u.type==="literal"&&/[ ,/-]/.test(u.value)?s:{...s,[u.type]:Nr(r[u.type],u.value)},{});return o.ms=r.fractionalSecondDigits?o.msp:o.ms,o.yyyy=i.relatedYear?o.ry:o.yyyy,t.formatStr=t.formatStr.replace(V.re,s=>/^(M|MM)$/.test(s)?Lr(e,r.locale,r.timeZone,/^M$/.test(s)):i[Object.keys(o[s]).shift()]||s),t.finalize(void 0,i.dayPeriod,i.era,i.yearName)}function Lr(e,t,n,r){return e.toLocaleString(t,{timeZone:n,month:r?Ze:ke})}function Lt(e){return e.replace(/\s+/g,"")}var Ar=Er;function Er(){let e=(r,o)=>{let i=isNaN(new Date(r)),s=isNaN(new Date(o));if(s){let[u,p,y]=Array(3).fill("end date not valid");return{error:!0,message:u,full:p,clean:y}}if(i){let[u,p,y]=Array(3).fill("start date not valid");return{error:!0,message:u,full:p,clean:y}}if(i&&!s){let[u,p,y]=Array(3).fill("start- and/or end date are not valid");return{error:!0,message:u,full:p,clean:y}}return{error:!1}},t=n();return function({start:r,end:o,diffs:i={}}={}){let s=e(r,o),u=o>r?"+":"-";if(s.error)return s;let p=Math.abs(r-o),y=new Date(p),d=y.getUTCFullYear()-1970,S=y.getUTCMonth(),h=y.getUTCDate()-1,v=h%7,b=Math.floor(h/7),g=y.getUTCHours(),x=y.getUTCMinutes(),T=y.getUTCSeconds(),L=y.getUTCMilliseconds(),a=Math.floor(p/864e5);i={...i,fromUTC:r,toUTC:o,sign:"",years:d,months:S,days:h,hours:g,minutes:x,seconds:T,milliseconds:L,diffInDays:a},i.full=t({values:i,full:!0}),i.clean=t({values:i}),i.equalDates=i.clean==="Dates are equal";let l=g+x+T>0?"T":"";return i.clean!=="Dates are equal"&&(i.sign=u,i.jsPeriod=`${u}P${d>0?`${d}Y`:""}${S>0?`${S}M`:""}${b>0?`${b}W`:""}${v>0?`${v}D`:""}${l}${g>0?`${g}H`:""}${x>0?`${x}M`:""}${T>0?`${T}S`:""}`,i.ISOPeriod=`P${d>0?`${d}Y`:""}${S>0?`${S}M`:""}${h>0?`${h}D`:""}${l}${g>0?`${g}H`:""}${x>0?`${x}M`:""}${T>0?`${T}S`:""}`),i};function n(){let r=(...i)=>s=>i.reduce((u,p)=>p(u),s),o=(i,s)=>i===1?s.slice(0,-1):s;return r(({values:i,full:s})=>[Object.entries(i).filter(([u])=>/^(years|month|days|hours|minutes|seconds)/i.test(u)),s],([i,s])=>s?i:i.filter(([,u])=>s?+u:u>0),i=>i.reduce((s,[u,p])=>[...s,`${p} ${o(p,u)}`],[]),i=>i.length<1?"Dates are equal":`${i.slice(0,-1).join(", ")}${i.length>1?" and ":""}${i.slice(-1).shift()}`)}}var Mr=Ir;function Ir(){let e=Object.entries({year:"FullYear",month:"Month",date:"Date",day:"Date",hour:"Hours",minute:"Minutes",second:"Seconds",millisecond:"Milliseconds"}).reduce((r,[o,i])=>({...r,[o]:i,[`${o}s`]:i}),{}),t=!1,n=function(...r){let o=r.length===1;return t=r[0].trim().startsWith("subtract,"),t&&(r=o?r[0].trim().replace(/^subtract,/i,"").split(",").map(i=>i.trim()):r.filter(i=>!i.startsWith("subtract"))),o&&!t&&(r=r[0].split(",").map(i=>i.trim())),r.map(function(i){if(!i)return!1;let s=i.toLowerCase().split(/ {1,}/);return s.length<2?!1:s.map(u=>{u=`${u}`.trim().replace(/[^a-z0-9-+]/g,"");let p=parseInt(u,10);return Number.isNaN(p)?u:t?-p:+p})}).filter(i=>i)};return function(r,...o){if(o.length<1)return r;let i=n(...o);return i.length&&i.forEach(([s,u])=>{u=u,u=e[u],s&&u&&r[`set${u}`](r[`get${u}`]()+s)}),r}}var At=Ar(),Et=Ur(),z=Mr(),kr=["sun","mon","tue","wed","thu","fri","sat"],Zr=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function pt(e,...t){return z(e,...t),e}function Me(e,{start:t,end:n,future:r,past:o,include:i={start:!1,end:!1}}={}){let s=e.clone.UTC;return t=t?.value||t?.constructor===Date?D(t?.value||t).UTC:D.now.UTC,n=n&&n?.value||n?.constructor===Date?D(n?.value||n).UTC:D.now.UTC,s.milliseconds=0,t.milliseconds=0,n.milliseconds=0,r?t>n:o?t<n:(i.start?+s>=+t:+s>+t)&&(i.end?+s<=+n:+s<+n)}function yt(e,{zoneTime:t=!1,formatStr:n,moreOptions:r}={}){return r=t?e.localeInfo.formatOptions+(r?`,${r}`:""):j.formatOptions+(r?`,${r}`:""),t?(e.localeInfo||(e.localeInfo=j),me(e,n,r)):Pr(e,n,r)}function Pr(e,t,n){let r=e.clone.relocate(j);return n=(n||"").startsWith("+")?`${r.localeInfo.formatOptions},${n.slice(1)}`:n||r.localeInfo.formatOptions,me(r,t,n)}function Fr(e,t){let n=At({start:e,end:t||e});return parseInt(`${n.sign}${n.diffInDays}`)}function ht(e,t=!1){let{locale:n,timeZone:r}=t?e.localeInfo:j,o=Qt(n,r),i=e.format("MM|WD",o).split("|");return{locale:n,timeZone:r,monthName:i[0],dayName:i[1],dayNames:Jt(n),monthNames:Je(n)}}function bt(e,t=!1){let[n,r,o,i]=Pe(e,t),s={values4Timezone:t?j.timeZone:e.timeZone,hours:n,minutes:r,seconds:o,milliseconds:i};return Object.freeze(s)}function Pe(e,t=!1){let n=`l:en-CA,${t?`tz:${j.timeZone}`:`tz:${e.timeZone}`},hrc:23,ts:medium`;return e.format("",n).split(/:/).map(Number).concat(e.getMilliseconds())}function St(e,t){let n=t?`tz:${j.timeZone}`:`,tz:${e.timeZone}`,[r,o,i]=e.format("yyyy-mm-dd",n).split(/-/).map(Number);o-=1;let s=t?j.timeZone:e.timeZone;return Object.freeze({values4Timezone:s,year:r,month:o,date:i})}function xt(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate()];let n=e.format("yyyy-m-d",e.localeInfo.formatOptions).split(/-/).map(Number);return n[1]-=1,n}function zr(e,{sunday:t=!1}={}){return Fe(e,{day:t?"sunday":"monday",preserveTodayWhenEqual:!0})}function Hr(e,t){let n=e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000",r=t.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000";return n=ze(n.slice(0,3)+":"+n.slice(-2),!0),r=ze(r.slice(0,3)+":"+r.slice(-2),!0),[-n[0]+r[0],-n[1]+r[1]].map(o=>n[0]<0?-o:o)}function Mt({start:e,end:t}={}){t||(t=e.clone),t?.clone||(t=D(t,{timeZone:e.timeZone})),e=D(Tt(e,e.timeZone),{timeZone:e.timeZone}),t=D(Tt(t,t.timeZone),{timeZone:t.timeZone});let n=At({start:e,end:t,diffs:{timeZoneStart:e.timeZone,timeZoneEnd:t.timeZone}}),r=Hr(t,e),o=n.sign.startsWith("-")?"ahead of":"behind",[i,s]=r.map(y=>Math.abs(y)),[u,p]=[`${i} ${de(i,"hour")}`,`${s} ${de(s,"minute")}`];return n.timeZonesOffsetDifference=n.sign.length<1||i+s===0?`Offsets of ${e.timeZone} and ${t.timeZone} are equal`:`${e.timeZone} is ${u}${s>0?` and ${p}`:""} ${o} ${t.timeZone}`,n}function vt(e,t){t=String(t).toLowerCase()==="utc"||t.timeZone==="UTC"?e.clone.relocate({timeZone:"UTC"}):D(e.value,{timeZone:t.timeZone||j.timeZone});let n=Mt({start:e.clone,end:t}),r=`${n.sign}${wt(n.hours)}:${wt(n.minutes)}`;return{fromTZ:e.timeZone,toTZ:t.timeZone,offset:r,offsetText:`${t.timeZone} ${Rr(r)} ${e.timeZone}`}}function wt(e,t=2){return`${e}`.padStart(t,"0")}function de(e,t){return`${t}${e>1||e===0?"s":""}`}function Rr(e){if(/00:00/.test(e))return"no time diffence to";let t=e.slice(1).split(":").map(Number),[n,r]=t,o=de(n,"hour"),i=de(r,"minute"),s=e.startsWith("+");return r>0?`${n} ${o} and ${r} ${i} ${s?"ahead of":"behind"}`:`${n} ${o} ${s?"ahead of":"behind"}`}function $t(e,t,n){return e.clone.format(t,n||e.localeInfo.formatOptions)}function Jr(e,{withFormat:t,withFormatOptions:n,local:r=!1}={}){if(t)return r?$t(e,t,$D.localeInformation.formatOptions):$t(e,t,n);let o=e.clone.relocate({locale:"en"}),i=r?j.formatOptions:o.localeInfo.formatOptions,s=`wd M dd yyyy hh:mmi:ss ${o.format("tz",i+",tzn:longOffset").replace(":","")} (tz)`;return o.format(s,i+",tzn:long, hrc:23")}function It(e,t=!1){let n=Intl.DateTimeFormat("en",{timeZone:t?e.timeZone:j.timeZone,weekday:"short"});return Et(n.format(e))}function Qr(e){let t=j,n=e.localeInfo,r=e.clone.relocate({locale:t.locale,timeZone:t.timeZone}),o=e.offsetFrom(r),i=r.offsetFrom(e),s=t,u=n,p=e.format("hh:mmi:ss dp",`hrc:12,tz:${e.timeZone}`),y=r.format("hh:mmi:ss dp",`hrc:12,tz:${r.timeZone}`),d={note:"'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance",locales:{user:{locale:s.locale,timeZone:s.timeZone}},dateTime:{user:{...e.dateTime,monthName:r.monthName,weekdayNr:r.day,weekdayName:r.dayName,dayPeriodTime:y,hasDST:r.hasDST,DSTActive:r.DSTActive,offsetFromRemote:o.offset,string:r.toString()}},offset:{fromUTC:e.UTC.offsetFrom(e).offsetText}};return n.timeZone!==t.timeZone&&(d.locales.remote={locale:u.locale,timeZone:u.timeZone},d.dateTime.remote={...e.zoneDateTime,monthName:e.zoneNames.monthName,weekdayNr:It(e,!0),weekdayName:e.zoneNames.dayName,dayPeriodTime:p,hasDST:e.hasDST,DSTActive:e.DSTActive,offsetFromUser:i.offset,string:e.toString()},d.offset.fromUserTime=i.offsetText),d}function se(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];let n=e.format("yyyy-m-d-hh-mmi-ss",`${e.localeInfo.formatOptions},hrc23:true`).split(/-/).map(Number).concat(e.getMilliseconds());return n[1]-=1,n}function kt(e){return new Date(e.year,e.month+1,0,0,0,0).getDate()}function Zt(e,t){t=E({locale:t}).locale;let n=e.clone.relocate({locale:t});return n.date={date:1},[n].concat([...Array(kt(n)-1)].map((r,o)=>n.clone.add(`${o+1} days`)))}function Fe(e,{day:t,next:n=!1,preserveTodayWhenEqual:r=!1}={}){t=t?.toLowerCase()||"-";let o=Et(t);if(o<0)return console.error(`[TickTock instance].next/previous invalid day value ${t}`),e.clone;let i=n?1:-1,s=D(new Date(...e.dateTimeValues),e.localeInfo);return r&&o===s.day?s:Wr(s.addDays(n?1:-1),o,i)}function Wr(e,t,n){function r(o){switch(!0){case o.day===t:return o;default:return r(o.add(`${n} days`))}}return r(e)}function ue(e,{dateOnly:t=!1,timeOnly:n=!1}={}){let{locale:r,timeZone:o}=e.localeInfo;return t?new Date(e).toLocaleDateString(r,{timeZone:o}):n?new Date(e).toLocaleTimeString(r,{timeZone:o}):new Date(e).toLocaleString(r,{timeZone:o})}function Tt(e,t){let n={timeZone:t,hourCycle:"h23"};return new Date(new Date(e).toLocaleString("en",n))}function X(e,{year:t,month:n,date:r}={}){return M(t)&&e.setFullYear(parseInt(t)),M(r)&&e.setDate(parseInt(r)),M(n)&&e.setMonth(parseInt(n)),e}function B(e,{hours:t,minutes:n,seconds:r,milliseconds:o}={}){return M(t)&&e.setHours(parseInt(t)),M(n)&&e.setMinutes(parseInt(n)),M(r)&&e.setSeconds(parseInt(r)),M(o)&&e.setMilliseconds(parseInt(o)),e}function Pt(e){return e?.constructor===Date||e?.value}function Ot(e,t){return Pt(t)?D(t?.value||t,e.localeInfo):D.from(...e.dateTimeValues).relocate(e.localeInfo)}function Ur(){return function(e){e=`${e}`.toLowerCase();let t=kr.indexOf(e);return t<0?Zr.indexOf(e):t}}function ze(e){let t=e.slice(1).split(/[-:]/).map(Number),n=e.startsWith("-");return t=t.map(r=>n?-r:r),t}function qr(e){return e.time={hours:0,minutes:0,seconds:0,milliseconds:0},e}function Dt(e,t){return Intl.DateTimeFormat("en-CA",{timeZone:t,timeZoneName:"long"}).format(e).split(/,/)[1].trim()}function Ft(e,t){t=t||e?.timeZone||j.timeZone,e=e?.value?e:e?.constructor===Date?D(e,{timeZone:t}):D({timeZone:t});let n=e.year||e.getFullYear(),r=Dt(new Date(n,0,1),t),o=Dt(new Date(n,5,1),t);return r!==o}function zt(e,t){return t=t||e?.timeZone||j.timeZone,e=e?.hasDST?e:e?.constructor===Date?D(e,{timeZone:t}):D({timeZone:t}),e.hasDST?!/standard/i.test(e.toString()):!1}function Br(e,{locale:t,timeZone:n,l:r,tz:o}={}){return e.localeInfo=E({locale:r||t||e.l||e.locale,timeZone:o||n||e.tz||e.timeZone}),e}function Vr(e,t){return Pt(t)&&(e=D(t.value||t,t.localeInfo||e.localeInfo)),e}function Re(e,t){let n=Ht(new Date(e,11,t||31));return n===1?Re(e,(t||31)-1):n}function jt(e,t){let n=e.month;switch(!0){case n<3:return t?1:"First";case n<6:return t?2:"Second";case n<9:return t?3:"Third";case n<12:return t?4:"Fourth";default:return"unknown"}}function Ht(e){let t=new Date(e),n=(t.getDay()+6)%7;t.setDate(t.getDate()-n+3);let r=t.valueOf();return t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7),1+Math.ceil((r-t)/6048e5)}var Rt=Yr;function Yr({localeInfo:e,customMethods:t,dateValue:n}={}){let r,o={add(...i){return pt(r,...i)},between({start:i,end:s,include:u}={}){return Me(r,{start:i,end:s,include:u})},cloneWith(i){return Ot(r,i)},daysUntil(i){return Fr(r,i)},differenceTo(i){return Mt({start:r,end:i})},differenceUntil(i){return r.differenceTo(i).clean},firstWeekday({sunday:i=!1,midnight:s=!1}={}){return zr(r,{sunday:i,midnight:s})},format(i,s){return yt(r,{formatStr:i,moreOptions:s})},fullMonth(i){return Zt(r,i)},isFuture(i){return Me(r,{start:r,end:i,future:!0})},isPast(i){return Me(r,{start:r,end:i,past:!0})},next(i,s){return Fe(r,{day:i,next:!0,preserveTodayWhenEqual:!!s})},offsetFrom(i){return vt(r,i)},previous(i,s){return Fe(r,{day:i,next:!1,preserveTodayWhenEqual:!!s})},relocate({locale:i,timeZone:s,l:u,tz:p}={}){return Br(r,{locale:i,timeZone:s,l:u,tz:p})},revalue(i){return r=Vr(r,i),r},setDateValues({year:i,month:s,date:u}={}){return X(r,{year:i,month:s,date:u})},setTimeValues({hours:i,minutes:s,seconds:u,milliseconds:p}={}){return B(r,{hours:i,minutes:s,seconds:u,milliseconds:p})},subtract(...i){return pt(r,"subtract,"+i.join(","))},toArray(i=!1){return se(r,i)},toString({template:i,formatOptions:s,local:u}={}){return Jr(r,{withFormat:i,withFormatOptions:s,local:u})},values(i=!1){return i?r.dateTime:r.zoneDateTime},zoneFormat(i,s){return yt(r,{zoneTime:!0,formatStr:i,moreOptions:s})},set date({year:i,month:s,date:u}){X(r,{year:i,month:s,date:u})},set dateNr(i){X(r,{date:i})},set hours(i){B(r,{hours:i})},set localeInfo({locale:i,timeZone:s,l:u,tz:p}){e=ce({locale:i,timeZone:s,l:u,tz:p})},set milliseconds(i){B(r,{milliseconds:`${i}`})},set minutes(i){B(r,{minutes:i})},set month(i){X(r,{month:i})},set seconds(i){B(r,{seconds:i})},set time({hours:i,minutes:s,seconds:u,milliseconds:p}){B(r,{hours:i,minutes:s,seconds:u,milliseconds:p})},set year(i){X(r,{year:i})},get age(){return r.differenceTo(new Date).years},get ageFull(){return r.differenceTo(new Date).clean},get clone(){return Ot(r)},get date(){return St(r,!0)},get dateNr(){return r.date.date},get dateTime(){return{...r.date,...r.time}},get dateTimeValues(){return se(r,!0)},get dateValues(){return xt(r,!0)},get day(){return r.getDay()},get dayName(){return r.names.dayName},get daysThisMonth(){return kt(r)},get DSTActive(){return zt(r)},get hasDST(){return Ft(r)},get hours(){return r.time.hours},get info(){return Qr(r)},get isLeapYear(){return new Date(r.getFullYear(),2,0).getDate()===29},get ISO(){return r.toISOString()},get local(){return ue(r)},get localDate(){return ue(r,{dateOnly:!0})},get locale(){return(e||ce()).locale},get localeInfo(){return e},get localeString(){return ue(r)},get localTime(){return ue(r,{timeOnly:!0})},get milliseconds(){return r.getMilliseconds()},get minutes(){return r.time.minutes},get month(){return r.date.month},get monthName(){return r.names.monthName},get names(){return ht(r)},get quarter(){return jt(r)},get quarterNr(){return jt(r,!0)},get removeTime(){return qr(r)},get seconds(){return r.time.seconds},get time(){return bt(r,!0)},get timeValues(){return Pe(r,!0)},get timeZone(){return(e||ce()).timeZone},get unixEpochTimestamp(){return Math.floor(+r/1e3)},get userLocaleInfo(){return j},get UTC(){return r.clone.relocate({locale:r.locale,timeZone:"UTC"})},get UTCOffset(){return vt(r,"UTC")},get value(){return new Date(r)},get weeknr(){return Ht(r)},get weeksInYear(){return Re(r.year,31)},get year(){return r.date.year},get zoneDate(){return St(r,!1)},get zoneDateNr(){return r.zoneDate.date},get zoneDateTime(){return{...r.zoneDate,...r.zoneTime}},get zoneDateTimeValues(){return se(r,!1)},get zoneDateValues(){return xt(r,!1)},get zoneDay(){return It(r,!0)},get zoneDayname(){return r.zoneNames.dayName},get zoneHours(){return r.zoneTime.hours},get zoneMinutes(){return r.zoneTime.minutes},get zoneMonth(){return r.zoneDate.month},get zoneMonthname(){return r.zoneNames.monthName},get zoneNames(){return ht(r,!0)},get zoneSeconds(){return r.zoneTime.seconds},get zoneTime(){return bt(r)},get zoneTimeValues(){return Pe(r)},get zoneYear(){return r.zoneDate.year},get zoneValues(){return r.zoneDateTime},get zoneArray(){return se(r,!1)}};return!e&&!n?o:(o.localeInfo=e||ce(),r=new Proxy(n,_r(o)),Object.entries(Object.getOwnPropertyDescriptors(Wt(r,t))).forEach(([i,s])=>Object.defineProperty(o,i,s)),Object.freeze(r))}function _r(e){return{get(t,n){return n!=="toString"&&n in t?t[n].bind(t):Reflect.get(e,n)},set(t,n,r){return n in e&&Reflect.set(e,n,r)}}}var j=He(Intl.DateTimeFormat().resolvedOptions()),Gr=Object.getOwnPropertyNames(Date.prototype).filter(e=>e.startsWith("set")).reduce((e,t)=>[...e,{native:t,syn:"change"+t.slice(3)}],[]),Ie="\u{1F6AB}";function Jt(e="en-GB"){return e=E({locale:e}).locale,{long:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"long"})),short:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"short"}))}}function Je(e="en"){return e=E({locale:e}).locale,{long:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"long"})),short:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"short"}))}}function Kr({year:e,locale:t}={}){e=M(e)?parseInt(e):new Date().getFullYear();let n={year:e,calendar:{}},r=Je().long.map(o=>o.toLowerCase());for(let o=0;o<12;o+=1){let i=D.from(e,o,1);n.calendar[r[o]]=Zt(i,t)}return n}function Xr({year:e,monthNr:t,locale:n="en-CA"}={}){e=M(t)&&parseInt(e)||-1,t=M(t)&&parseInt(t)||new Date().getFullYear();let r=t>=1&&t<=12;return n=E({locale:n}).locale,t=r?t-1:void 0,r?D.from(e,t,1).relocate({locale:n}).fullMonth(n):"MonthNr should be a specific number (1 = january - 12 = december)"}function He(e){let t=Qt(e.locale,e.timeZone);return Object.defineProperty(e,"formatOptions",{value:t,enumerable:!1})}function Qt(e,t){return[`${e&&!(Array.isArray(e)&&e.length<1)?`l:${e}`:""}`,`${t?`tz:${t}`:""}`].filter(n=>n).join(",")}function E({locale:e,timeZone:t,l:n,tz:r}={}){return t=t||r,e=e||n,!e&&!t?j:to({trial:function(){let o=Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions();return e&&o.locale!==e&&console.error(`${Ie} Intl changed locale (using best fit) "${e}" to "${o.locale}"`),He(o)},onError:function(o){switch(!0){case/incorrect locale/i.test(o.message):return console.error(`${Ie} Intl locale "${e}" best fit impossible, using "${j.locale}"`),E({locale:j.locale,timeZone:t});case/invalid time zone/i.test(o.message):return console.error(`${Ie} timeZone "${t}" not valid. Using "${j.timeZone}"`),E({locale:e,timeZone:j.timeZone});default:return j||He(Intl.DateTimeFormat().resolvedOptions())}}})}function ce({locale:e,timeZone:t,l:n,tz:r}={}){return E({locale:e,timeZone:t,l:n,tz:r},!0)}function Nt(e){return!Number.isNaN(+e)&&e?.constructor===Date&&!e?.toISOString?.().startsWith("1970-01-01T00:00:00")?e:new Date}function eo(e){let t=new Date;switch(!0){case e?.constructor===String:return Nt(new Date(e));case(Array.isArray(e)&&e.map(Number).length===e.length):return e.length===1?new Date(e[0],0,1):new Date(...e);case e?.constructor===Date:return Nt(e);default:return t}}function to({trial:e,onError:t=()=>{}}={}){if(e?.constructor===Function)try{return e()}catch(n){return t?.constructor===Function?t(n):void 0}}function no({timeZoneDate:e,timeZoneID:t,userTimeZoneID:n}={}){let r={timeZone:E({timeZone:t}).timeZone},o={timeZone:E({timeZone:n||""}).timeZone},i=D(e,r),s=D(e,o),u=s.differenceTo(i),p=i.offsetFrom(s).offset,[y,d]=ze(p,!0),S=s.clone.add(`${y} hours, ${d} minutes`),h=u.equalDates?"No difference":`Time offset ${p}: ${o.timeZone} is ${u.clean} ${y<0?"behind":"ahead of"} ${r.timeZone}`;return{remoteTimezone:r.timeZone,userTimezone:o.timeZone,timeDifference:h,result:{[r.timeZone.replace(/\//,"_")]:D(e).toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"}),[o.timeZone.replace(/\//,"_")]:S.toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"})}}}function M(e){return!Number.isNaN(parseInt(e))}function fe(e,t,n){return e?.constructor===Number?z(t,`${e} ${n}`):t}function ro(e){let t={addYears(n=1){return fe(n,e,"years")},addMonths(n=1){return fe(n,e,"months")},addWeeks(n=1){return n=n?.constructor===Number?n*7:1,fe(n,e,"days")},addDays(n=1){return fe(n,e,"days")},get nextYear(){return z(e,"1 year")},get nextWeek(){return z(e,"7 days")},get previousWeek(){return z(e,"-7 days")},get previousYear(){return z(e,"-1 year")},get nextMonth(){return z(e,"1 month")},get previousMonth(){return z(e,"-1 month")},get tomorrow(){return z(e,"1 day")},get yesterday(){return z(e,"-1 day")}};for(let n of Gr)t[n.syn]=function(...r){return e[n.native](...r),e};return t}function Wt(e,t){let n=ro(e);for(let[r,o]of Object.entries(t||{})){let i=o.enumerable,s=o.isGetter?{get(){return o.method(e)},enumerable:i}:{value(...u){return o.method(e,...u)},enumerable:i};Object.defineProperty(n,r,s)}return n}function oo(e,t){return Object.defineProperties(e,{now:{get(){return e(new Date)}},localeInformation:{get(){return E()}},localWeekdaynames:{value(n){return Jt(n)}},localMonthnames:{value(n){return Je(n)}},daysInMonth:{value(n,r=!1){return n=M(n)?parseInt(n):0,n>=1&&n<=12?new Date(r?2e3:2005,n,0).getDate():`${n} should be a Number between (1 (january) - 12 (december))`}},yearCalendar:{value:Kr},monthCalendar:{value:Xr},from:{value(...n){return e(n)}},fromUxTS:{value(n,r){n=M(n)?parseInt(n)*1e3:void 0;let o=n?new Date(n):new Date;return D(o,r||j)}},hasDST:{value({date:n,timeZone:r}={}){return Ft(n,r)}},DSTActive:{value({date:n,timeZone:r}={}){return zt(n,r)}},values:{value({date:n,timeZone:r}={}){n=n||n?.value||new Date;let o=me(n,"yyyy-m-d-h-mi-s",E({timeZone:r}).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());return o[1]-=1,o}},format:{value({date:n,template:r,timeZone:o,locale:i,opts:s}={}){n=n||n?.value||new Date,r=r?.constructor===String?r:"yyyy/mm/dd hh:mmi:ss dp";let u=E({timeZone:o,locale:i}).formatOptions;return u+=s?`,${s}`:"",me(n,r,u)}},addCustom:{value({name:n,method:r,enumerable:o=!1,isGetter:i=!1}={}){n?.constructor===String&&r?.constructor===Function&&r.length>0&&(t[n]={method:r,enumerable:o,isGetter:i})}},validateLocaleInformation:{value:E},timeAcrossZones:{value:no},weeksInYear:{value(n){return Re(n,31)}},keys:{get(){let n=Object.fromEntries(Object.entries(t).filter(([r,o])=>o.enumerable===!0));return[...Object.keys(Rt()),...Object.keys(Wt()),...Object.keys(n)].sort((r,o)=>r.localeCompare(o))}}}),e}var Ut={},D=oo(io,Ut);function io(e,t){if(e?.localeInfo)return e.clone;let n=e?.locale||e?.timeZone||e?.tz||e?.l;return Rt({localeInfo:E(n?e:t),dateValue:new Date(n?Date.now():eo(e)),customMethods:Ut})}var ao=Object.defineProperties(qt,{escape:{value:yo,enumerable:!0}});function qt(e,...t){let{flags:n,cleanedArgs:r}=so(...t);return co(new RegExp(ho(lo(e,...r)),n))}function lo(e,...t){return Y(t)?e.raw.reduce((n,r,o)=>n.concat(t[o-1]||"").concat(r),""):e.raw.join("")}function so(...e){let t=Qe(uo(e.at(-1)));return{flags:t,cleanedArgs:Y(t)?e.slice(0,-1):e}}function uo(e){return ge(e,Array)?e.join(""):""}function co(e){let t=new Proxy(Object.defineProperties({},{re:{get(){return e},enumerable:!1},toString:{value:()=>e.toString(),enumerable:!1},valueOf:{value:()=>e,enumerable:!1},flags:{value(n){return e=po(n,e),t},enumerable:!1},clone:{get(){return go(t)},enumerable:!1}}),mo(e));return t}function Y(e){return e?.length>0}function ge(e,t){return e?.constructor===t}function fo(e,t,n){let r=Reflect.get(n,t);return{fromInstance:Reflect.get(e,t),fromRegExpMethod:ge(r,Function)?r.bind(e.re):e.re[t]}}function mo(e){return{get(t,n){let{fromInstance:r,fromRegExpMethod:o}=fo(t,n,e);switch(!0){case!!r:return r;default:return o}}}}function go(e){let t=e.re.source,n=Y(e.re.flags)?[...e.re.flags]:[];return qt`${t} ${n}`}function Qe(e,t){return t=(t??"").replace(/^-r\|/,""),e=t.concat(ge(e,String)&&Y(e)?e:""),[...new Set([...e])].join("").replace(/[^dgimsuvy]/g,"")}function po(e,t){switch(!0){case(!ge(e,String)||!Y(e)):return t;case e==="-r":return t=new RegExp(t.source);case e.startsWith("-r|"):return t=new RegExp(t.source,Qe(e));default:return t=new RegExp(t.source,Qe(t.flags,e))}}function yo(e){switch(!0){case(e?.constructor!==String||!Y(e)):return"";case!!RegExp.escape:return RegExp.escape(e);default:return(`\\x${e.at(0)}`+e.slice(1).replace(/\p{S}|\p{P}/gu,t=>`\\${t}`)).replace(/ |\\x /g,"\\x20")}}function ho(e){return e.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm,"").replace(/\s/g,"").trim().replace(/<!([^>]\d+)>/g,(t,n)=>String.fromCharCode(+n)??t)}var{IS:bo}=So(),_=bo;function So(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:I,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case I:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,I=!N&&Object.getPrototypeOf(a)?.constructor,k=Number.isNaN(a)||e({trial:P=>String(a)==="NaN"}),Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:I,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var Bt=Vt(void 0),xo=Vt("");Object.defineProperties(String.prototype,{[Symbol.for("interpolate")]:{value(...e){return Bt(this,...e)}},[Symbol.for("interpolate$")]:{value(...e){return xo(this,...e)}}});function Vt(e){return e=_(e,String,Number)?String(e):void 0,function(y,...d){return p(y,u(d))};function t(y,d){return d&&_(e,String,Number)?String(e):`{${y}}`}function n(y,d){let S=y in d;return S&&_(d[y],String,Number)?String(d[y]):t(y,S)}function r(y){return(...d)=>{let S=d.find(h=>h.key);return n(S?S.key:"_",y)}}function o(y,d){return y.replace(/\{(?<key>[a-z_\d]+)}/gim,r(d))}function i(y){let d=[];return Object.entries(y).forEach(([S,h])=>{h.forEach((v,b)=>(d[b]??={},d[b][S]=v))}),d}function s(y){return y.length===1&&Object.values(y[0]).every(Array.isArray)}function u(y){return s(y)?i(y[0]):y}function p(y,d){let S=d?.length?d.filter(h=>_(h,Object)).map((h,v)=>o(y,{...h,index:v+1})).join(""):y;return _(e,void 0)?S:S.replace(/\{[a-z_\d].+\}/gim,String(e))}}$o();vo();function vo(){/stackblitz/i.test(location.href)&&console.info("\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it."),document.addEventListener("click",e=>{if(e.target.href){let t=e.target;if(t.dataset.top||t.classList.contains("internalLink")||t.target==="_top")return top.location.href=t.href}return!0})}function Bo(e=!0){let t=R('<ul id="log2screen">').first();function n(i=!1){let s=i?R.at.start:R.at.end;return u=>{if(u?.isJQx)return R.li(u.data.get("header")?{class:"head"}:"",u).renderTo(t,s);u=R.IS(u,String,Number,Symbol)?String(u):wo(u,e);let p=u.startsWith("!!");u=p?u.slice(2):u,R.li(p?{class:"head"}:"",u).renderTo(t,s)}}let[r,o]=[n(),n(!0)];return{log:(...i)=>i.forEach(r),logTop:(...i)=>i.forEach(o)}}function wo(e,t){try{return t?`<pre>${JSON.stringify(e,null,2)}</pre>`:JSON.stringify(e)}catch{return"Some [Object object] can not be converted to JSON"}}function $o(){R.editCssRules("body{font:normal 14px/17px system-ui,sans-serif;margin:1rem;}","li::marker{vertical-align:top;}","code{color:green;background-color:#eee;padding:2px;font-family:monospace;}","code.codeblock{display:block;padding:6px;border:1px solid #999;margin:0.5rem 0;background-color:#eee;white-space:pre-wrap;}","h3{marginTop:1.5rem;}",".thickBorder{border:5px solid green;borderWidth:5px;padding:0.5rem;display:inline-block;}","a.ExternalLink{text-decoration:none;color:rgb(0,0,238);background-color:#EEE;padding:3px;font-weight:bold;}",".cmmt{color:#888;}",".hidden{display:none;}",".attention{color:red; font-size:1.2em; font-weight:bold;}","#log2screen li{listStyle:'\\2713';paddingLeft:6px;margin:0.5rem 0 0 -1.2rem;font-family:monospace}","#log2screen li.head{list-style-type:none;font-weight:bold;margin-top:0.8rem;margin-bottom:-0.2rem;font-family:revert;}",".err{fontStyle:italic; color:red; }","a{text-decoration:none; font-weight:bold;}","a:hover{text-decoration:underline;}","a[target]:before,a.internalLink:before,a.externalLink:before{color:rgba(0,0,238,0.7);font-size:1.1rem;padding-right:2px;vertical-align:baseline;}",`a[target="_blank"]:before,a.externalLink:before{content:'\\2197';}`,`a[data-top]:before,a.internalLink:before,a[target="_top"]:before{content:'\\21BA';}`)}export{R as $,D as $D,Bo as logFactory,ao as regexhelper,Bt as splat};
16
+ `));default:return r}}return Object.defineProperties(r,{log:{value:p,enumerable:!1},error:{value:s,enumerable:!1},warn:{value:u,enumerable:!1}}),Object.freeze(r)}function ye(){return(e=>`[${ne(e.getHours())}:${ne(e.getMinutes())}:${ne(e.getSeconds())}.${ne(e.getMilliseconds(),3)}]`)(new Date)}function Qn(e,t){if(e)for(let[n,r]of Object.entries(t)){if(n=H(n),n.startsWith("data"))return st(e,r);m(r,String)&&at(n)&&e.setAttribute(n,r.split(/[, ]/)?.join(" "))}}function st(e,t){if(e&&m(t,Object))for(let[n,r]of Object.entries(t))e.setAttribute(`data-${H(n)}`,r)}function ut(e){return e?m(e,Proxy)?[e.EL]:m(e,NodeList)?[...e]:W(e)?[e]:Ie(e)?e:e.isJQx?e.collection:void 0:[]}function Ge(e,t){return e.andThen(t)}function Ke(e,t){return e.andThen(t,!0)}function W(e){return m(e,Text,HTMLElement,Comment)}function he(e,t){if(m(t,Object))for(let[n,r]of Object.entries(t)){let o;/!important/i.test(r)&&(r=r.slice(0,r.indexOf("!")).trim(),o="important"),e.style.setProperty(H(n),r,o)}}function Q(e){let t=e.cloneNode(!0);return t.removeAttribute&&t.removeAttribute("id"),e.isConnected?e.remove():e=null,t}function Wn(e){if(!m(e,HTMLElement))return;let t=e.style,n=getComputedStyle(e),r=!![t.visibility,n.visibility].includes("hidden"),o=!![t.display,n.display].includes("none"),i=!!e.hidden,s=parseInt(n.height)<1||parseInt(n.width)<1,u=e.offsetTop<0||e.offsetLeft+e.offsetWidth<0||e.offsetLeft>document.body.offsetWidth,p=+n.opacity==0||+(t.opacity||1)==0;return!(i||u||p||o||r||s)}function Un(e){return e?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(t=>t===e):!1}function qn(e){return e?.filter(t=>t).reduce((t,n)=>t.concat(ft(n)?`<!--${n.data}-->`:Le(n)?n.textContent:n.outerHTML),"")}function ne(e,t=2){return`${e}`.padStart(t,"0")}function Bn(e,t=0){return[e,t]=[Math.floor(e),Math.ceil(t)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(e-t+1)+t)}function ct(){return`_${Gn(Zn).slice(0,8).join("")}`}function Vn(e){return e=m(e,String)&&/,/.test(e)?e.split(",").map(t=>t.trim().toLowerCase()).filter(t=>t.length>0):e,m(e,Array)?e:m(e,String)&&e?.trim().toLowerCase()||""}function Yn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(t=>t===e):!1}function _n(e,t){switch(e=String(e).trim(),!0){case/^(0|false|f)$/i.test(e):return!1;case/^(1|true|t)$/i.test(e):return!0;default:return t}}function Gn(e){let t=e.length;for(;t--;){let n=Bn(t);[e[t],e[n]]=[e[n],e[t]]}return e}function Ce(e){return m(e,String)?e.toLowerCase().split("-").map((t,n)=>n&&`${Kn(t)}`||t).join(""):e}function H(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^-|-$/,"")}function Kn([e,...t]){return`${e.toUpperCase()}${t.join("")}`}function Le(e){return m(e,Comment,Text)}function ft(e){m(e,Comment)}function Xn(e){return m(e,Text)}function Ae(e){return m(e,String)&&/^<|>$/.test(`${e}`.trim())}function Ie(e){return m(e,Array)&&!e?.find(t=>!W(t))}function mt(e){return m(e,Array)&&!e?.find(t=>!Ae(t))}function O(e,t){let n=e.collection.filter(r=>!Le(r));for(let r=0;r<n.length;r+=1)t(n[r],r);return e}function er(e){return e.node?m(e.node,Comment)?`<!--${e.node.textContent}-->`:e.HTML.get(1).split(">")[0]+">...":""}function dt(e,t,n){let r=t!==document.body&&m(e,String)&&e.toLowerCase()!=="body"?t:document;try{n.collection=[...r.querySelectorAll(e)]}catch{A.warn(`JQx: Invalid CSS querySelector. [${m(e,String)?e:"Not a string!"}]`)}}function tr(){return{isCommentOrTextNode:Le,isNode:W,isComment:ft,isText:Xn,isHtmlString:Ae,isArrayOfHtmlElements:Ie,isArrayOfHtmlStrings:mt,ElemArray2HtmlString:qn,input2Collection:ut,setCollectionFromCssSelector:dt,cssRuleEdit:ot({createWithId:"JQxStylesheet"})}}function nr(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return t=>{let n=t.node;return m(n,Node)?Object.freeze({get writable(){return Un(n)},get modal(){return Yn(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return Wn(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return t.collection.length<1},get virtual(){return t.isVirtual}}):e}}function rr(e,t,n,r){n&&m(t,String)&&(t={[t]:n==="-"?"":n});let o;t.className&&(o=t.className,delete t.className),o=[...e.classList].find(i=>i.startsWith("JQxClass-")||o&&i===o)||o||`JQxClass-${ct().slice(1)}`,r.editCssRule(`.${o}`,t),e.classList.add(o)}var or=nr();function ir(e){return{factoryExtensions:ar(e),instanceExtensions:lr(e)}}function ar(e){return{data(t){return{get all(){return new Proxy(t[0]?.dataset??{},Pn)},set(n={}){if(!t.is.empty&&m(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},get(n,r){return t.data.all[n]??r},add(n={}){if(!t.is.empty&&m(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},remove(n){return t[0]?.removeAttribute(`data-${H(n)}`),t}}},dimensions(t){if(t.is.empty)return A.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:n}=t,r=n.getBoundingClientRect().toJSON();return r.scrollTopDistance=$e(n,0),r.scrollLeftDistance=$e(n,0,!1),r},node(t){return t[0]},HTML(t){return{get(n,r){if(t.is.empty)return"NO ELEMENTS IN COLLECTION";let o=n?t.outerHtml:t.html();return r?ie(o):o},set(n,r=!1,o=!1){n=n.isJQx?n.HTML.get(1):n;let i=m(n,String);return n=i&&o?ie(n):n,i&&(n||"").trim().length&&t.html(n,r),t},replace(n,r=!1){return t.HTML.set(n,!1,r)},append(n,r=!1){return n=m(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n,!0,r)},insert(n,r=!1){return n=m(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n+t.HTML.get(),!1,r)}}},is(t){return or(t)},length(t){return t.collection.length},outerHtml(t){return(t.first()||{outerHTML:void 0}).outerHTML},parent(t){let n=e(t[0]?.parentNode);return n.is.empty?t:n},render(t){switch(!0){case!t.is.empty:return t.toDOM();default:return e.logger.warn("[JQx.render]: empty collection"),t}},Style(t){return{get computed(){return t.is.empty?{}:getComputedStyle(t[0])},inline(n){return t.style(n)},inSheet(n){return t.css(n)},valueOf(n){return t.is.empty?void 0:getComputedStyle(t[0])[H(n)]},nwRule(n){return t.Style.byRule({rules:n})},byRule({classes2Apply:n=[],rules:r=[]}={}){let o=m(r,String)&&!n.length?r.split("{")[0].trim():"";if(r=r&&m(r,String)?[r]:r,n=n&&m(n,String)?[n]:n,(r?.length||n?.length)&&(r?.length&&e.editCssRules(...r),n))for(let i of n)t.addClass(i);return o?.startsWith(".")&&t.addClass(o.slice(1)),o?.startsWith("#")&&!t.attr("id")&&t.prop({id:o.slice(1)}),t}}}}}function lr(e){return{addClass(t,...n){return O(t,r=>r&&n.forEach(o=>r.classList.add(o)))},after:Ge,afterMe:Ge,andThen(t,n,r=!1){if(!n||!m(n,String,Node,Proxy))return A.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),t;n=n?.isJQx?n:m(n,Node)?e.virtual(n):e.virtual(J(n));let[o,i,s]=r?[0,"before",n.collection.concat(t.collection)]:[t.collection.length-1,"after",t.collection.concat(n.collection)];return t[o][i](...n.collection),t.collection=s,t},append(t,...n){if(t.is.empty||n.length<1)return t;let r=t.length===1;for(let o of n){if(!o.isJQx&&C(o)){let i=o.trim(),s=/^<(.+)[^>]+>$/m.test(i)?J(o):e.text(o);O(t,u=>u.append(r?s:Q(s)))}W(o)&&O(t,i=>i.append(r?o:Q(o))),o.isJQx&&!o.is.empty&&O(t,i=>o.collection.forEach(s=>i.append(r?s:Q(s))))}return t},appendTo(t,n){switch(!0){case(!n.isJQx&&!m(n,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).append(t),t}},attr(t,n,r){if(!t.node||m(t.node,Text,Comment))return t;if(!r&&C(n))return n=H(n),n==="class"?[...t.node.classList].join(" "):t.node.getAttribute(n);if(C(n)&&r)switch(n=H(n),!0){case n.startsWith("data-"):n={data:{[n.replace("data-","")]:r}};break;default:n={[n]:r}}return m(n,Object)&&!t.is.empty&&Qn(t.node,n),t},before:Ke,beforeMe:Ke,clear(t){return O(t,Ye)},closest(t,n){let r=C(n)?t.node?.closest(n):void 0;return r?e(r):t},computedStyle(t,n){let{node:r}=t;return r&&getComputedStyle(r)[n]},css(t,n,r){return O(t,o=>rr(o,n,r,e))},duplicate(t,n=!1,r=document.body){switch(!0){case t.is.empty:return A.error("Duplicating an empty JQx instance is not possible"),t;default:let o=t.collection[0].cloneNode(!0);return o.childNodes.forEach(i=>{i.removeAttribute&&i?.removeAttribute("id")}),n?e(o).toDOM(r):e.virtual(o)}},each(t,n){return O(t,n)},empty(t){return O(t,Ye)},find(t,n){return t.collection.length>0?[...t.first()?.querySelectorAll(n)]:[]},find$(t,n){return t.collection.length>0?e(n,t):t},first(t,n=!1){return t.collection.length>0?n?t.single():t.collection[0]:void 0},first$(t,n){return t.single(n)},getData(t,n,r){return t.node?.dataset?.[n]||r},hasClass(t,...n){return t.is.empty||!t.node.classList.length?!1:n.find(r=>t.node.classList.contains(r))&&!0||!1},hide(t){return O(t,n=>he(n,{display:"none !important"}))},html(t,n,r){switch(!0){case(t.is.empty&&!C(n)):return"";case!C(n):return t.node?.getHTML()??"";default:let o=J(`<div>${n.isJQx?n.HTML.get(!0):n}</div>`);return O(t,i=>(i.textContent=r?i.textContent:"",i.insertAdjacentHTML(e.at.end,o.getHTML())))}},htmlFor(t,n,r="",o=!1){if(t.is.empty||!C(n)||!C(r))return t;let i=t.find$(n);if(i.length<1)return t;let s=J(`<span>${r}</span>`);return i.each(u=>{o||(u.textContent=""),u.insertAdjacentHTML(e.at.end,s?.getHTML())}),t},isEmpty(t){return!t.node},nth$(t,n){return t.single(n)},on(t,n,...r){switch(!0){case(t.is.empty||!m(n,String,Array)||!C(n)||r.length<1):return t;default:return e.handle({type:n,node:t.node,handler:r}),t}},once(t,n,...r){switch(!0){case(t.is.empty||!m(n,String,Array)||!C(n)||r.length<1):return t;default:return e.handle({type:n,once:!0,node:t.node,handler:r}),t}},prepend(t,...n){if(t.is.empty||!n)return;let r=t.length===1;for(let o of n){if(C(o)){o=o.trim();let i=/^<(.+)[^>]+>$/m.test(o)?J(o):e.text(o);i=r?i:Q(i),O(t,s=>s.prepend(i.cloneNode(!0)))}W(o)&&O(t,i=>i.prepend(r?o:Q(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),O(t,i=>O(o,s=>i.prepend(r?s:Q(s)))),o.collection.reverse())}return t},prependTo(t,n){return n.isJQx||(n=e.virtual(n)),n.prepend(t),t},prop(t,n,r){if(m(n,String)&&!r)return n.startsWith("data")?t[0]?.dataset[n.slice(n.indexOf("-")+1)]:t[0]?.[n];let o=m(n,Object)?n:{[n]:r};for(let[i,s]of Object.entries(o)){if(i=i.trim(),s&&!at(i)||!s)return!1;if(i.toLowerCase()==="id")return t[0].id=s;O(t,u=>{if(i.startsWith("data"))return u.dataset[i.slice(i.indexOf("-")+1)]=s;u[i]=s})}return t},remove(t,n){let r=i=>i.remove(),o=()=>t.collection=t.collection.filter(i=>document.documentElement.contains(i));if(n){let i=t.find$(n);return i.is.empty||(O(i,r),o()),t}return O(t,r),o(),t},rmAttr(t,...n){for(let r of n)t.node.removeAttribute(r);return t},removeClass(t,...n){return O(t,r=>{if(r)for(let o of n)r.classList.remove(o)})},renderTo(t,n,r){return n=m(n,HTMLElement)||n.isJQx?n:document.body,r=m(r,String)&&e.at[r]?r:e.at.end,t.first$().toDOM(n,r),t},replace(t,n,r){let o=t.node;return!n||!m(r,HTMLElement)&&!r?.isJQx?(e.logger.error("JQx replace: invalid replacement value"),t):((r.isJQx||m(r,NodeList))&&(r=r[0]),o&&n&&(n=m(n,String)?o.querySelectorAll(n):n.isJQx?n.collection:n,m(n,HTMLElement,NodeList,Array)&&m(r,HTMLElement)&&(m(n,HTMLElement)?[n]:[...n]).forEach(i=>i.replaceWith(r.cloneNode(!0)))),t)},replaceClass(t,n,...r){return O(t,o=>{o.classList.remove(n);for(let i of r)o.classList.add(i)})},replaceMe(t,n){return t.replaceWith(n)},replaceWith(t,n){return n=m(n,Element)?n:n.isJQx?n[0]:void 0,n&&(t[0].replaceWith(n),t=e.virtual(n)),t},setData(t,n){return O(t,r=>st(r,n))},show(t){return O(t,n=>he(n,{display:"revert-layer !important"}))},single(t,n){let r=t.collection.length>0;switch(n=n??0,!0){case(r&&m(n,String)):return t.find$(n);case(r&&m(n,Number)):return e(t.collection[n]);case r:return t.collection[0];default:return t}},style(t,n,r){return O(t,o=>{r&&m(n,String)&&(n={[n]:r||"none"}),he(o,n)})},text(t,n,r=!1){switch(!0){case t.isEmpty():return t;case!m(n,String):return t.node.textContent;default:return O(t,o=>o.textContent=r?o.textContent+n:n)}},toDOM(t,n=document.body,r=F.BeforeEnd){return t.isVirtual=!1,ve(t.collection,n,r),t},toggleClass(t,n){return O(t,r=>r.classList.toggle(n))},toNodeList(t){return[...t.collection].map(n=>document.importNode(n,!0))},trigger(t,n,r,o){if(r=/Event]$/.test(m(r))?r:Event,o=m(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0},!t.is.empty){let i=new r(n,o);t.each(s=>s.dispatchEvent(i))}return t},val(t,n){switch(!0){case(t.is.empty||!m(t.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return t;case!m(n,String):return t.node.value;default:return t.node.value=m(n,String)?n:"",t}}}}var Te,ae,{isComment:Eo,isText:Mo,isHtmlString:ko,isArrayOfHtmlElements:Zo,isArrayOfHtmlStrings:Po,ElemArray2HtmlString:Fo,cssRuleEdit:Oe,addFn:sr}=ur();function ur(){return{...tr(),addFn:cr}}function cr(e,t){return e=e?.trim(),!C(e)||!m(t,Function)?A.error("JQx.fn: method invalid parameter(s)"):ae[e]=(n,...r)=>t(n,...r)}function fr(e){return function(t,n,r){if(t=t?.trim(),!C(t)||!m(n,Function))return e.error("JQx.staticFn: invalid parameter(s)");let o=r?{get(){return n()}}:{value(...i){return n(...i)}};try{Object.defineProperty(e,t,o)}catch{return e.warn(`JQx.staticFn: extension [${t}] already exists`)}return A.log(`JQx: added static extension function [${t}]`)}}function re(e){return new Proxy(e,Object.freeze({get:(t,n)=>mr(t,n,e)}))}function Xe(e,t){return(...n)=>m(e,Function)&&e(re(t),...n)}function mr(e,t,n){switch(!0){case m(t,Symbol):return e;case m(+t,Number):return e.collection?.[t]||void 0;case t in Te:return Xe(Te[t],n)();case t in ae:return Xe(ae[t],n);default:return e[t]}}function dr(e){let t=br(e);for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(t)))Object.defineProperty(e,n,r);return e}function gr(e){return{allow(t){let n=/-/.test(t),r=n&&t;t=n?Ce(t):t.toLowerCase(),K.allowTag(t),Object.defineProperties(e,De(t,!0,e,r))},prohibit(t){t=t.toLowerCase(),K.prohibitTag(t),Object.defineProperties(e,De(t,!1,e))}}}function et(...e){if(e.length===1){let t=String(e.shift().trim());e=t.startsWith("!")?[t.slice(1,-1)]:t.split(",").map(n=>n.trim())}for(let t of e.map(n=>n.startsWith("!")?n.slice(1,-1):n))Oe(t,{removeRule:1})}function pr(e){return function(t,n,r){n=n?.isJQx?n?.[0]:n,r=r&&Object.values(F).find(i=>r===i);let o=e(t,document.createElement("br"));if(n&&!m(n,HTMLBRElement))for(let i of o.collection)r?n.insertAdjacentElement(r,i):n.append(i);return o}}function yr(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);for(let[o,i]of Object.entries(r))!(o in t)&&Object.defineProperty(t,o,{...i,enumerable:!1})}return t}function hr(e,t,n,r){return e=H(r||e.toLowerCase()),{get(){return(...o)=>{let i=t&&n.virtual(Ne(rn[e](...o)))||void 0,s=m(i?.node,Comment,Text,void 0)?"":Hn(i);return A.log(t?`JQx: created (virtual) instance from [JQx].${e} ${s}`:`JQx: ${e.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),i}},enumerable:!1,configurable:!0}}function De(e,t,n,r){e=e.toLowerCase();let o=hr(e,t,n,r);return r?{[r]:o,[Ce(r)]:o}:{[e]:o,[e.toUpperCase()]:o}}function br(e){return yr(Object.entries(K.tagsRaw).reduce(Sr(e),{}),Or(e))}function Sr(e){return function(t,[n,r]){return Object.defineProperties(t,De(n,r,e)),t}}function xr(e){return function(t,n,...r){m(n,Function)&&(r.push(n),n=void 0),e({type:t,selector:n,handlers:r})}}function vr(e){return function(t){let{type:n,types:r,origin:o,selector:i,handler:s,handlers:u,node:p,name:y,capture:d,once:S,about:h}=t;s=u||s,n=r||n,i=o||i;let v=Vn(n),b=y;s=m(s,Function)?[s]:s;let g={type:v,selector:i||o,capture:d,name:b,once:S,node:p,about:h};switch(!0){case(m(v,Array)&&v.length>0):for(let x of v)g.type=x,tt(s,g,e);break;default:return tt(s,g,e)}}}function tt(e,t,n){for(let r of e)n.listen({...t,handler:r})}function wr(e){return function(t,n){return n=C(n)&&n,t=C(t)&&t,n&&t&&e.listenerStore[t][n]}}function $r(e){return e.activePopup||Object.defineProperty(e,"activePopup",{value:En(e),enumerable:!1}),e.activePopup}function Tr(e){let t=(u,p)=>Oe(u,p),n=function(u){return ot({createWithId:u||`jqx${ct()}`})},r=function(...u){for(let p of u)Oe(p)},o=gr(e),i=Mn(e),s=vr(i);return{editCssRule:t,createStyle:n,editCssRules:r,allowProhibit:o,handle:s,capturedHandling:s,log:(...u)=>A.on.log(...u).off,warn:(...u)=>A.on.warn(...u).off,error:(...u)=>A.on.error(...u).off,handlerWrapper:i}}function Or(e){let{factoryExtensions:t,instanceExtensions:n}=ir(e);Te=t,ae=n;let{editCssRule:r,createStyle:o,editCssRules:i,allowProhibit:s,handle:u,capturedHandling:p,log:y,warn:d,error:S,handlerWrapper:h}=Tr(e),v=wr(e),b=fr(e);return{log:y,warn:d,error:S,editCssRules:i,createStyle:o,editStylesheet:o,editCssRule:r,escHtml:ie,logger:A,text(g,x=!1){return x?e.comment(g):document.createTextNode(g)},node(g,x=document){return x.querySelector(g,x)},nodes(g,x=document){return[...x.querySelectorAll(g,x)]},clearAllTimers:Fn,get staticFn(){return function(g,x,T){return b(g,x,T)}},get toBool(){return _n},get getNamedListener(){return v},get virtual(){return pr(e)},get allowTag(){return s.allow},get prohibitTag(){return s.prohibit},get removeCssRule(){return et},get removeCssRules(){return et},get delegate(){return xr(p)},get delegateCaptured(){return p},get handle(){return p},get listen(){return h.listen},get at(){return F},get setStyle(){return r},get fn(){return sr},get lenient(){return K.allowUnknownHtmlTags},get IS(){return m},get Popup(){return $r(e)},get listenerStore(){return h.ListenerStore}}}var Dr=dr(jr());function jr(){return function(e,t,n=F.BeforeEnd){if(e?.isJQx)return e;let r=m(t,HTMLBRElement);t=(!r&&t&&t.isJQx?t[0]:t)||document.body,n=n&&Object.values(F).find(p=>n===p)?n:void 0;let o=Ae(e),i=!o&&mt(e)||o,s={collection:ut(e)??[],isVirtual:r,isJQx:!0},u=Ie(s.collection);if(s.collection.length&&u)return r||s.collection.forEach(p=>{t.contains(p)||ve([p],t,n)}),re(s);if(i){if([e].flat().forEach(p=>s.collection.push(J(p))),s.collection.length>0){let p=s.collection.filter(S=>S?.dataset?.jqxcreationerror);s.collection=s.collection.filter(S=>!S?.dataset?.jqxcreationerror);let y=s.collection.map(S=>`${String(S.constructor).split(/function|\(/)[1].trim()}`).length>1;s=re(s);let d=s.collection.length>0?er(s):"sanitized: no elements remaining";A.log(`JQx: created ${s.isVirtual?"(virtual)":""} instance from ${y?"array of ":""}HTML string${y?"s":""} ${d}`),s.isVirtual||ve(s.collection,t,n)}return s}return dt(e,t,s),re(s)}}var R=Dr;var[U,q,ke,Ze]=["2-digit","numeric","long","short"],le={fixed:{MM:{month:ke},M:{month:Ze},m:{month:q},mm:{month:U},yyyy:{year:q},yy:{year:U},WD:{weekday:ke},wd:{weekday:Ze},d:{day:q},dd:{day:U},h:{hour:q},hh:{hour:U},mi:{minute:q},mmi:{minute:U},s:{second:q},ss:{second:U},ms:{fractionalSecondDigits:3},tz:{timeZoneName:"shortOffset"},dl:{locale:"default"},h12:{hour12:!1},yn:{yearName:""},ry:{relatedYear:!0},msp:{fractionalSecond:!0}},dynamic:{tzn:e=>({timeZoneName:e.slice(4)}),hrc:e=>({hourCycle:`h${e.slice(4)}`}),ds:e=>({dateStyle:e.slice(3)}),ts:e=>({timeStyle:e.slice(3)}),tz:e=>({timeZone:e.slice(3)}),e:e=>({era:e.slice(2)}),l:e=>({locale:e.slice(2)})}},V={...le,retrieveDynamic(e){let t=e?.slice(0,e?.indexOf(":"));return le.dynamic[t]&&le.dynamic[t](e)},get re(){return new RegExp(`\\b(${Object.keys(le.fixed).join("|")})\\b`,"g")}},me=Nr;function Nr(e,t,n="l:default"){return/ds:|ts:/.test(n)?Cr(e,gt(void 0),n):Ar(e,gt(t||void 0),n)}function gt(e="dtf"){let t=` ${e.replace(/[{}]/g,"").trim()} `,n=e.match(/(?<=\{)(.+?)(?=})/g)||[];return{set formatStr(r){t=r},get formatStr(){return t},get units(){return t.match(V.re)||[]},finalize(r="",o="",i="",s=""){return t.replace(/~([\d+]?)/g,"$1").replace(/dtf/,r).replace(/era/,i).replace(/dp\b|~dp\b/,o).replace(/yn\b/,s).replace(/\[(\d+?)]/g,(u,p)=>n[p].trim()).trim()}}}function Ct(...e){return e?.reduce((t,n)=>({...t,...V.retrieveDynamic(n)||V.fixed[n]}),V.fixed.dl)}function Cr(e,t,n){let r=Ct(...Lt(n).split(",")),o=Intl.DateTimeFormat(r.locale,r).format(e);return t.finalize(o)}function Lr(e,t){return e==="numeric"&&t.startsWith("0")?t.slice(1):t}function Ar(e,t,n){let r=Ct(...t.units.concat(Lt(n).split(",")).flat()),o={...V.fixed},i=Intl.DateTimeFormat(r.locale,r).formatToParts(e).reduce((s,u)=>u.type==="literal"&&/[ ,/-]/.test(u.value)?s:{...s,[u.type]:Lr(r[u.type],u.value)},{});return o.ms=r.fractionalSecondDigits?o.msp:o.ms,o.yyyy=i.relatedYear?o.ry:o.yyyy,t.formatStr=t.formatStr.replace(V.re,s=>/^(M|MM)$/.test(s)?Ir(e,r.locale,r.timeZone,/^M$/.test(s)):i[Object.keys(o[s]).shift()]||s),t.finalize(void 0,i.dayPeriod,i.era,i.yearName)}function Ir(e,t,n,r){return e.toLocaleString(t,{timeZone:n,month:r?Ze:ke})}function Lt(e){return e.replace(/\s+/g,"")}var Er=Mr;function Mr(){let e=(r,o)=>{let i=isNaN(new Date(r)),s=isNaN(new Date(o));if(s){let[u,p,y]=Array(3).fill("end date not valid");return{error:!0,message:u,full:p,clean:y}}if(i){let[u,p,y]=Array(3).fill("start date not valid");return{error:!0,message:u,full:p,clean:y}}if(i&&!s){let[u,p,y]=Array(3).fill("start- and/or end date are not valid");return{error:!0,message:u,full:p,clean:y}}return{error:!1}},t=n();return function({start:r,end:o,diffs:i={}}={}){let s=e(r,o),u=o>r?"+":"-";if(s.error)return s;let p=Math.abs(r-o),y=new Date(p),d=y.getUTCFullYear()-1970,S=y.getUTCMonth(),h=y.getUTCDate()-1,v=h%7,b=Math.floor(h/7),g=y.getUTCHours(),x=y.getUTCMinutes(),T=y.getUTCSeconds(),L=y.getUTCMilliseconds(),a=Math.floor(p/864e5);i={...i,fromUTC:r,toUTC:o,sign:"",years:d,months:S,days:h,hours:g,minutes:x,seconds:T,milliseconds:L,diffInDays:a},i.full=t({values:i,full:!0}),i.clean=t({values:i}),i.equalDates=i.clean==="Dates are equal";let l=g+x+T>0?"T":"";return i.clean!=="Dates are equal"&&(i.sign=u,i.jsPeriod=`${u}P${d>0?`${d}Y`:""}${S>0?`${S}M`:""}${b>0?`${b}W`:""}${v>0?`${v}D`:""}${l}${g>0?`${g}H`:""}${x>0?`${x}M`:""}${T>0?`${T}S`:""}`,i.ISOPeriod=`P${d>0?`${d}Y`:""}${S>0?`${S}M`:""}${h>0?`${h}D`:""}${l}${g>0?`${g}H`:""}${x>0?`${x}M`:""}${T>0?`${T}S`:""}`),i};function n(){let r=(...i)=>s=>i.reduce((u,p)=>p(u),s),o=(i,s)=>i===1?s.slice(0,-1):s;return r(({values:i,full:s})=>[Object.entries(i).filter(([u])=>/^(years|month|days|hours|minutes|seconds)/i.test(u)),s],([i,s])=>s?i:i.filter(([,u])=>s?+u:u>0),i=>i.reduce((s,[u,p])=>[...s,`${p} ${o(p,u)}`],[]),i=>i.length<1?"Dates are equal":`${i.slice(0,-1).join(", ")}${i.length>1?" and ":""}${i.slice(-1).shift()}`)}}var kr=Zr;function Zr(){let e=Object.entries({year:"FullYear",month:"Month",date:"Date",day:"Date",hour:"Hours",minute:"Minutes",second:"Seconds",millisecond:"Milliseconds"}).reduce((r,[o,i])=>({...r,[o]:i,[`${o}s`]:i}),{}),t=!1,n=function(...r){let o=r.length===1;return t=r[0].trim().startsWith("subtract,"),t&&(r=o?r[0].trim().replace(/^subtract,/i,"").split(",").map(i=>i.trim()):r.filter(i=>!i.startsWith("subtract"))),o&&!t&&(r=r[0].split(",").map(i=>i.trim())),r.map(function(i){if(!i)return!1;let s=i.toLowerCase().split(/ {1,}/);return s.length<2?!1:s.map(u=>{u=`${u}`.trim().replace(/[^a-z0-9-+]/g,"");let p=parseInt(u,10);return Number.isNaN(p)?u:t?-p:+p})}).filter(i=>i)};return function(r,...o){if(o.length<1)return r;let i=n(...o);return i.length&&i.forEach(([s,u])=>{u=u,u=e[u],s&&u&&r[`set${u}`](r[`get${u}`]()+s)}),r}}var At=Er(),It=Br(),z=kr(),Pr=["sun","mon","tue","wed","thu","fri","sat"],Et=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function pt(e,...t){return z(e,...t),e}function Fr(e,t=!1){let n=Mt(e.clone,{sunday:t}),r=[n];return{weekStart:n.format("WD","l:en-GB"),inputDate:e,dates:r.concat([...Array(6)].map((o,i)=>n.clone.addDays(i+1)))}}function Ee(e,{start:t,end:n,future:r,past:o,include:i={start:!1,end:!1}}={}){let s=e.clone.UTC;return t=t?.value||t?.constructor===Date?D(t?.value||t).UTC:D.now.UTC,n=n&&n?.value||n?.constructor===Date?D(n?.value||n).UTC:D.now.UTC,s.milliseconds=0,t.milliseconds=0,n.milliseconds=0,r?t>n:o?t<n:(i.start?+s>=+t:+s>+t)&&(i.end?+s<=+n:+s<+n)}function yt(e,{zoneTime:t=!1,formatStr:n,moreOptions:r}={}){return r=t?e.localeInfo.formatOptions+(r?`,${r}`:""):j.formatOptions+(r?`,${r}`:""),t?(e.localeInfo||(e.localeInfo=j),me(e,n,r)):zr(e,n,r)}function zr(e,t,n){let r=e.clone.relocate(j);return n=(n||"").startsWith("+")?`${r.localeInfo.formatOptions},${n.slice(1)}`:n||r.localeInfo.formatOptions,me(r,t,n)}function Hr(e,t){let n=At({start:e,end:t||e});return parseInt(`${n.sign}${n.diffInDays}`)}function ht(e,t=!1){let{locale:n,timeZone:r}=t?e.localeInfo:j,o=Ut(n,r),i=e.format("MM|WD",o).split("|");return{locale:n,timeZone:r,monthName:i[0],dayName:i[1],dayNames:Wt(n),monthNames:Je(n)}}function bt(e,t=!1){let[n,r,o,i]=Pe(e,t),s={values4Timezone:t?j.timeZone:e.timeZone,hours:n,minutes:r,seconds:o,milliseconds:i};return Object.freeze(s)}function Pe(e,t=!1){let n=`l:en-CA,${t?`tz:${j.timeZone}`:`tz:${e.timeZone}`},hrc:23,ts:medium`;return e.format("",n).split(/:/).map(Number).concat(e.getMilliseconds())}function St(e,t){let n=t?`tz:${j.timeZone}`:`,tz:${e.timeZone}`,[r,o,i]=e.format("yyyy-mm-dd",n).split(/-/).map(Number);o-=1;let s=t?j.timeZone:e.timeZone;return Object.freeze({values4Timezone:s,year:r,month:o,date:i})}function xt(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate()];let n=e.format("yyyy-m-d",e.localeInfo.formatOptions).split(/-/).map(Number);return n[1]-=1,n}function Rr(e){let t=e.localeInfo.weekInfo?.firstDay;return t=t>6?0:t,Et[t||1]}function Mt(e,{sunday:t=!1}={}){let n=t?"sunday":Rr(e);return Fe(e,{day:n,preserveTodayWhenEqual:!0})}function Jr(e,t){let n=e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000",r=t.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000";return n=ze(n.slice(0,3)+":"+n.slice(-2),!0),r=ze(r.slice(0,3)+":"+r.slice(-2),!0),[-n[0]+r[0],-n[1]+r[1]].map(o=>n[0]<0?-o:o)}function kt({start:e,end:t}={}){t||(t=e.clone),t?.clone||(t=D(t,{timeZone:e.timeZone})),e=D(Tt(e,e.timeZone),{timeZone:e.timeZone}),t=D(Tt(t,t.timeZone),{timeZone:t.timeZone});let n=At({start:e,end:t,diffs:{timeZoneStart:e.timeZone,timeZoneEnd:t.timeZone}}),r=Jr(t,e),o=n.sign.startsWith("-")?"ahead of":"behind",[i,s]=r.map(y=>Math.abs(y)),[u,p]=[`${i} ${de(i,"hour")}`,`${s} ${de(s,"minute")}`];return n.timeZonesOffsetDifference=n.sign.length<1||i+s===0?`Offsets of ${e.timeZone} and ${t.timeZone} are equal`:`${e.timeZone} is ${u}${s>0?` and ${p}`:""} ${o} ${t.timeZone}`,n}function vt(e,t){t=String(t).toLowerCase()==="utc"||t.timeZone==="UTC"?e.clone.relocate({timeZone:"UTC"}):D(e.value,{timeZone:t.timeZone||j.timeZone});let n=kt({start:e.clone,end:t}),r=`${n.sign}${wt(n.hours)}:${wt(n.minutes)}`;return{fromTZ:e.timeZone,toTZ:t.timeZone,offset:r,offsetText:`${t.timeZone} ${Qr(r)} ${e.timeZone}`}}function wt(e,t=2){return`${e}`.padStart(t,"0")}function de(e,t){return`${t}${e>1||e===0?"s":""}`}function Qr(e){if(/00:00/.test(e))return"no time diffence to";let t=e.slice(1).split(":").map(Number),[n,r]=t,o=de(n,"hour"),i=de(r,"minute"),s=e.startsWith("+");return r>0?`${n} ${o} and ${r} ${i} ${s?"ahead of":"behind"}`:`${n} ${o} ${s?"ahead of":"behind"}`}function $t(e,t,n){return e.clone.format(t,n||e.localeInfo.formatOptions)}function Wr(e,{withFormat:t,withFormatOptions:n,local:r=!1}={}){if(t)return r?$t(e,t,$D.localeInformation.formatOptions):$t(e,t,n);let o=e.clone.relocate({locale:"en"}),i=r?j.formatOptions:o.localeInfo.formatOptions,s=`wd M dd yyyy hh:mmi:ss ${o.format("tz",i+",tzn:longOffset").replace(":","")} (tz)`;return o.format(s,i+",tzn:long, hrc:23")}function Zt(e,t=!1){let n=Intl.DateTimeFormat("en",{timeZone:t?e.timeZone:j.timeZone,weekday:"short"});return It(n.format(e))}function Ur(e){let t=j,n=e.localeInfo,r=e.clone.relocate({locale:t.locale,timeZone:t.timeZone}),o=e.offsetFrom(r),i=r.offsetFrom(e),s=t,u=n,p=e.format("hh:mmi:ss dp",`hrc:12,tz:${e.timeZone}`),y=r.format("hh:mmi:ss dp",`hrc:12,tz:${r.timeZone}`),d={note:"'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance",locales:{user:{locale:s.locale,timeZone:s.timeZone}},dateTime:{user:{...e.dateTime,monthName:r.monthName,weekdayNr:r.day,weekdayName:r.dayName,dayPeriodTime:y,hasDST:r.hasDST,DSTActive:r.DSTActive,offsetFromRemote:o.offset,string:r.toString()}},offset:{fromUTC:e.UTC.offsetFrom(e).offsetText}};return n.timeZone!==t.timeZone&&(d.locales.remote={locale:u.locale,timeZone:u.timeZone},d.dateTime.remote={...e.zoneDateTime,monthName:e.zoneNames.monthName,weekdayNr:Zt(e,!0),weekdayName:e.zoneNames.dayName,dayPeriodTime:p,hasDST:e.hasDST,DSTActive:e.DSTActive,offsetFromUser:i.offset,string:e.toString()},d.offset.fromUserTime=i.offsetText),d}function se(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];let n=e.format("yyyy-m-d-hh-mmi-ss",`${e.localeInfo.formatOptions},hrc23:true`).split(/-/).map(Number).concat(e.getMilliseconds());return n[1]-=1,n}function Pt(e){return new Date(e.year,e.month+1,0,0,0,0).getDate()}function Ft(e,t){t=I({locale:t||e.localeInfo.locale}).locale;let n=e.clone.relocate({locale:t});return n.date={date:1},[n].concat([...Array(Pt(n)-1)].map((r,o)=>n.clone.add(`${o+1} days`)))}function Fe(e,{day:t,next:n=!1,preserveTodayWhenEqual:r=!1}={}){t=t?.toLowerCase()||"-";let o=It(t);if(o<0)return console.error(`[TickTock instance].next/previous invalid day value ${t}`),e.clone;let i=n?1:-1,s=D(new Date(...e.dateTimeValues),e.localeInfo);return r&&o===s.day?s:qr(s.addDays(n?1:-1),o,i)}function qr(e,t,n){function r(o){switch(!0){case o.day===t:return o;default:return r(o.add(`${n} days`))}}return r(e)}function ue(e,{dateOnly:t=!1,timeOnly:n=!1}={}){let{locale:r,timeZone:o}=e.localeInfo;return t?new Date(e).toLocaleDateString(r,{timeZone:o}):n?new Date(e).toLocaleTimeString(r,{timeZone:o}):new Date(e).toLocaleString(r,{timeZone:o})}function Tt(e,t){let n={timeZone:t,hourCycle:"h23"};return new Date(new Date(e).toLocaleString("en",n))}function X(e,{year:t,month:n,date:r}={}){return E(t)&&e.setFullYear(parseInt(t)),E(r)&&e.setDate(parseInt(r)),E(n)&&e.setMonth(parseInt(n)),e}function B(e,{hours:t,minutes:n,seconds:r,milliseconds:o}={}){return E(t)&&e.setHours(parseInt(t)),E(n)&&e.setMinutes(parseInt(n)),E(r)&&e.setSeconds(parseInt(r)),E(o)&&e.setMilliseconds(parseInt(o)),e}function zt(e){return e?.constructor===Date||e?.value}function Ot(e,t){return zt(t)?D(t?.value||t,e.localeInfo):D.from(...e.dateTimeValues).relocate(e.localeInfo)}function Br(){return function(e){e=`${e}`.toLowerCase();let t=Pr.indexOf(e);return t<0?Et.indexOf(e):t}}function ze(e){let t=e.slice(1).split(/[-:]/).map(Number),n=e.startsWith("-");return t=t.map(r=>n?-r:r),t}function Vr(e){return e.time={hours:0,minutes:0,seconds:0,milliseconds:0},e}function Dt(e,t){return Intl.DateTimeFormat("en-CA",{timeZone:t,timeZoneName:"long"}).format(e).split(/,/)[1].trim()}function Ht(e,t){t=t||e?.timeZone||j.timeZone,e=e?.value?e:e?.constructor===Date?D(e,{timeZone:t}):D({timeZone:t});let n=e.year||e.getFullYear(),r=Dt(new Date(n,0,1),t),o=Dt(new Date(n,5,1),t);return r!==o}function Rt(e,t){return t=t||e?.timeZone||j.timeZone,e=e?.hasDST?e:e?.constructor===Date?D(e,{timeZone:t}):D({timeZone:t}),e.hasDST?!/standard/i.test(e.toString()):!1}function Yr(e,{locale:t,timeZone:n,l:r,tz:o}={}){return e.localeInfo=I({locale:r||t||e.l||e.locale,timeZone:o||n||e.tz||e.timeZone}),e}function _r(e,t){return zt(t)&&(e=D(t.value||t,t.localeInfo||e.localeInfo)),e}function Re(e,t){let n=Jt(new Date(e,11,t||31));return n===1?Re(e,(t||31)-1):n}function jt(e,t){let n=e.month;switch(!0){case n<3:return t?1:"First";case n<6:return t?2:"Second";case n<9:return t?3:"Third";case n<12:return t?4:"Fourth";default:return"unknown"}}function Jt(e){let t=new Date(e),n=(t.getDay()+6)%7;t.setDate(t.getDate()-n+3);let r=t.valueOf();return t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7),1+Math.ceil((r-t)/6048e5)}var Qt=Gr;function Gr({localeInfo:e,customMethods:t,dateValue:n}={}){let r,o={add(...i){return pt(r,...i)},between({start:i,end:s,include:u}={}){return Ee(r,{start:i,end:s,include:u})},cloneWith(i){return Ot(r,i)},daysUntil(i){return Hr(r,i)},differenceTo(i){return kt({start:r,end:i})},differenceUntil(i){return r.differenceTo(i).clean},firstWeekday({sunday:i=!1,midnight:s=!1}={}){return Mt(r,{sunday:i,midnight:s})},format(i,s){return yt(r,{formatStr:i,moreOptions:s})},fullMonth(i){return Ft(r,i)},fullWeek(i=!1){return Fr(r,!!i)},isFuture(i){return Ee(r,{start:r,end:i,future:!0})},isPast(i){return Ee(r,{start:r,end:i,past:!0})},next(i,s){return Fe(r,{day:i,next:!0,preserveTodayWhenEqual:!!s})},offsetFrom(i){return vt(r,i)},previous(i,s){return Fe(r,{day:i,next:!1,preserveTodayWhenEqual:!!s})},relocate({locale:i,timeZone:s,l:u,tz:p}={}){return Yr(r,{locale:i,timeZone:s,l:u,tz:p})},revalue(i){return r=_r(r,i),r},setDateValues({year:i,month:s,date:u}={}){return X(r,{year:i,month:s,date:u})},setTimeValues({hours:i,minutes:s,seconds:u,milliseconds:p}={}){return B(r,{hours:i,minutes:s,seconds:u,milliseconds:p})},subtract(...i){return pt(r,"subtract,"+i.join(","))},toArray(i=!1){return se(r,i)},toString({template:i,formatOptions:s,local:u}={}){return Wr(r,{withFormat:i,withFormatOptions:s,local:u})},values(i=!1){return i?r.dateTime:r.zoneDateTime},zoneFormat(i,s){return yt(r,{zoneTime:!0,formatStr:i,moreOptions:s})},set date({year:i,month:s,date:u}){X(r,{year:i,month:s,date:u})},set dateNr(i){X(r,{date:i})},set hours(i){B(r,{hours:i})},set localeInfo({locale:i,timeZone:s,l:u,tz:p}){e=ce({locale:i,timeZone:s,l:u,tz:p})},set milliseconds(i){B(r,{milliseconds:`${i}`})},set minutes(i){B(r,{minutes:i})},set month(i){X(r,{month:i})},set seconds(i){B(r,{seconds:i})},set time({hours:i,minutes:s,seconds:u,milliseconds:p}){B(r,{hours:i,minutes:s,seconds:u,milliseconds:p})},set year(i){X(r,{year:i})},get age(){return r.differenceTo(new Date).years},get ageFull(){return r.differenceTo(new Date).clean},get clone(){return Ot(r)},get date(){return St(r,!0)},get dateNr(){return r.date.date},get dateTime(){return{...r.date,...r.time}},get dateTimeValues(){return se(r,!0)},get dateValues(){return xt(r,!0)},get day(){return r.getDay()},get dayName(){return r.names.dayName},get daysThisMonth(){return Pt(r)},get DSTActive(){return Rt(r)},get hasDST(){return Ht(r)},get hours(){return r.time.hours},get info(){return Ur(r)},get isLeapYear(){return new Date(r.getFullYear(),2,0).getDate()===29},get ISO(){return r.toISOString()},get local(){return ue(r)},get localDate(){return ue(r,{dateOnly:!0})},get locale(){return(e||ce()).locale},get localeInfo(){return e},get localeString(){return ue(r)},get localTime(){return ue(r,{timeOnly:!0})},get milliseconds(){return r.getMilliseconds()},get minutes(){return r.time.minutes},get month(){return r.date.month},get monthName(){return r.names.monthName},get names(){return ht(r)},get quarter(){return jt(r)},get quarterNr(){return jt(r,!0)},get removeTime(){return Vr(r)},get seconds(){return r.time.seconds},get time(){return bt(r,!0)},get timeValues(){return Pe(r,!0)},get timeZone(){return(e||ce()).timeZone},get unixEpochTimestamp(){return Math.floor(+r/1e3)},get userLocaleInfo(){return j},get UTC(){return r.clone.relocate({locale:r.locale,timeZone:"UTC"})},get UTCOffset(){return vt(r,"UTC")},get value(){return new Date(r)},get weeknr(){return Jt(r)},get weeksInYear(){return Re(r.year,31)},get year(){return r.date.year},get zoneDate(){return St(r,!1)},get zoneDateNr(){return r.zoneDate.date},get zoneDateTime(){return{...r.zoneDate,...r.zoneTime}},get zoneDateTimeValues(){return se(r,!1)},get zoneDateValues(){return xt(r,!1)},get zoneDay(){return Zt(r,!0)},get zoneDayname(){return r.zoneNames.dayName},get zoneHours(){return r.zoneTime.hours},get zoneMinutes(){return r.zoneTime.minutes},get zoneMonth(){return r.zoneDate.month},get zoneMonthname(){return r.zoneNames.monthName},get zoneNames(){return ht(r,!0)},get zoneSeconds(){return r.zoneTime.seconds},get zoneTime(){return bt(r)},get zoneTimeValues(){return Pe(r)},get zoneYear(){return r.zoneDate.year},get zoneValues(){return r.zoneDateTime},get zoneArray(){return se(r,!1)}};return!e&&!n?o:(o.localeInfo=e||ce(),r=new Proxy(n,Kr(o)),Object.entries(Object.getOwnPropertyDescriptors(qt(r,t))).forEach(([i,s])=>Object.defineProperty(o,i,s)),Object.freeze(r))}function Kr(e){return{get(t,n){return n!=="toString"&&n in t?t[n].bind(t):Reflect.get(e,n)},set(t,n,r){return n in e&&Reflect.set(e,n,r)}}}var j=He(Intl.DateTimeFormat().resolvedOptions()),Xr=Object.getOwnPropertyNames(Date.prototype).filter(e=>e.startsWith("set")).reduce((e,t)=>[...e,{native:t,syn:"change"+t.slice(3)}],[]),Me="\u{1F6AB}";function Wt(e="en-GB"){return e=I({locale:e}).locale,{long:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"long"})),short:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"short"}))}}function Je(e="en"){return e=I({locale:e}).locale,{long:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"long"})),short:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"short"}))}}function eo({year:e,locale:t}={}){e=E(e)?parseInt(e):new Date().getFullYear();let n={year:e,calendar:{}},r=Je().long.map(o=>o.toLowerCase());for(let o=0;o<12;o+=1){let i=D.from(e,o,1);n.calendar[r[o]]=Ft(i,t)}return n}function to({year:e,monthNr:t,locale:n="en-CA"}={}){e=E(t)&&parseInt(e)||-1,t=E(t)&&parseInt(t)||new Date().getFullYear();let r=t>=1&&t<=12;return n=I({locale:n}).locale,t=r?t-1:void 0,r?D.from(e,t,1).relocate({locale:n}).fullMonth(n):"MonthNr should be a specific number (1 = january - 12 = december)"}function He(e){let t=Ut(e.locale,e.timeZone),n=new Intl.Locale(e.locale);return e.weekInfo=n.getWeekInfo?n.getWeekInfo():null,Object.defineProperty(e,"formatOptions",{value:t,enumerable:!1})}function Ut(e,t){return[`${e&&!(Array.isArray(e)&&e.length<1)?`l:${e}`:""}`,`${t?`tz:${t}`:""}`].filter(n=>n).join(",")}function I({locale:e,timeZone:t,l:n,tz:r}={}){return t=t||r,e=e||n,!e&&!t?j:ro({trial:function(){let o=Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions();return e&&o.locale!==e&&console.error(`${Me} Intl changed locale (using best fit) "${e}" to "${o.locale}"`),He(o)},onError:function(o){switch(!0){case/incorrect locale/i.test(o.message):return console.error(`${Me} Intl locale "${e}" best fit impossible, using "${j.locale}"`),I({locale:j.locale,timeZone:t});case/invalid time zone/i.test(o.message):return console.error(`${Me} timeZone "${t}" not valid. Using "${j.timeZone}"`),I({locale:e,timeZone:j.timeZone});default:return j||He(Intl.DateTimeFormat().resolvedOptions())}}})}function ce({locale:e,timeZone:t,l:n,tz:r}={}){return I({locale:e,timeZone:t,l:n,tz:r},!0)}function Nt(e){return!Number.isNaN(+e)&&e?.constructor===Date&&!e?.toISOString?.().startsWith("1970-01-01T00:00:00")?e:new Date}function no(e){let t=new Date;switch(!0){case e?.constructor===String:return Nt(new Date(e));case(Array.isArray(e)&&e.map(Number).length===e.length):return e.length===1?new Date(e[0],0,1):new Date(...e);case e?.constructor===Date:return Nt(e);default:return t}}function ro({trial:e,onError:t=()=>{}}={}){if(e?.constructor===Function)try{return e()}catch(n){return t?.constructor===Function?t(n):void 0}}function oo({timeZoneDate:e,timeZoneID:t,userTimeZoneID:n}={}){let r={timeZone:I({timeZone:t}).timeZone},o={timeZone:I({timeZone:n||""}).timeZone},i=D(e,r),s=D(e,o),u=s.differenceTo(i),p=i.offsetFrom(s).offset,[y,d]=ze(p,!0),S=s.clone.add(`${y} hours, ${d} minutes`),h=u.equalDates?"No difference":`Time offset ${p}: ${o.timeZone} is ${u.clean} ${y<0?"behind":"ahead of"} ${r.timeZone}`;return{remoteTimezone:r.timeZone,userTimezone:o.timeZone,timeDifference:h,result:{[r.timeZone.replace(/\//,"_")]:D(e).toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"}),[o.timeZone.replace(/\//,"_")]:S.toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"})}}}function E(e){return!Number.isNaN(parseInt(e))}function fe(e,t,n){return e?.constructor===Number?z(t,`${e} ${n}`):t}function io(e){let t={addYears(n=1){return fe(n,e,"years")},addMonths(n=1){return fe(n,e,"months")},addWeeks(n=1){return n=n?.constructor===Number?n*7:1,fe(n,e,"days")},addDays(n=1){return fe(n,e,"days")},get nextYear(){return z(e,"1 year")},get nextWeek(){return z(e,"7 days")},get previousWeek(){return z(e,"-7 days")},get previousYear(){return z(e,"-1 year")},get nextMonth(){return z(e,"1 month")},get previousMonth(){return z(e,"-1 month")},get tomorrow(){return z(e,"1 day")},get yesterday(){return z(e,"-1 day")}};for(let n of Xr)t[n.syn]=function(...r){return e[n.native](...r),e};return t}function qt(e,t){let n=io(e);for(let[r,o]of Object.entries(t||{})){let i=o.enumerable,s=o.isGetter?{get(){return o.method(e)},enumerable:i}:{value(...u){return o.method(e,...u)},enumerable:i};Object.defineProperty(n,r,s)}return n}function ao(e,t){return Object.defineProperties(e,{now:{get(){return e(new Date)}},localeInformation:{get(){return I()}},localWeekdaynames:{value(n){return Wt(n)}},localMonthnames:{value(n){return Je(n)}},daysInMonth:{value(n,r=!1){return n=E(n)?parseInt(n):0,n>=1&&n<=12?new Date(r?2e3:2005,n,0).getDate():`${n} should be a Number between (1 (january) - 12 (december))`}},yearCalendar:{value:eo},monthCalendar:{value:to},from:{value(...n){return e(n)}},fromUxTS:{value(n,r){n=E(n)?parseInt(n)*1e3:void 0;let o=n?new Date(n):new Date;return D(o,r||j)}},hasDST:{value({date:n,timeZone:r}={}){return Ht(n,r)}},DSTActive:{value({date:n,timeZone:r}={}){return Rt(n,r)}},values:{value({date:n,timeZone:r}={}){n=n||n?.value||new Date;let o=me(n,"yyyy-m-d-h-mi-s",I({timeZone:r}).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());return o[1]-=1,o}},format:{value({date:n,template:r,timeZone:o,locale:i,opts:s}={}){n=n||n?.value||new Date,r=r?.constructor===String?r:"yyyy/mm/dd hh:mmi:ss dp";let u=I({timeZone:o,locale:i}).formatOptions;return u+=s?`,${s}`:"",me(n,r,u)}},addCustom:{value({name:n,method:r,enumerable:o=!1,isGetter:i=!1}={}){n?.constructor===String&&r?.constructor===Function&&r.length>0&&(t[n]={method:r,enumerable:o,isGetter:i})}},validateLocaleInformation:{value:I},timeAcrossZones:{value:oo},weeksInYear:{value(n){return Re(n,31)}},keys:{get(){let n=Object.fromEntries(Object.entries(t).filter(([r,o])=>o.enumerable===!0));return[...Object.keys(Qt()),...Object.keys(qt()),...Object.keys(n)].sort((r,o)=>r.localeCompare(o))}}}),e}var Bt={},D=ao(lo,Bt);function lo(e,t){if(e?.localeInfo)return e.clone;let n=e?.locale||e?.timeZone||e?.tz||e?.l;return Qt({localeInfo:I(n?e:t),dateValue:new Date(n?Date.now():no(e)),customMethods:Bt})}var so=Object.defineProperties(Vt,{escape:{value:bo,enumerable:!0}});function Vt(e,...t){let{flags:n,cleanedArgs:r}=co(...t);return mo(new RegExp(So(uo(e,...r)),n))}function uo(e,...t){return Y(t)?e.raw.reduce((n,r,o)=>n.concat(t[o-1]||"").concat(r),""):e.raw.join("")}function co(...e){let t=Qe(fo(e.at(-1)));return{flags:t,cleanedArgs:Y(t)?e.slice(0,-1):e}}function fo(e){return ge(e,Array)?e.join(""):""}function mo(e){let t=new Proxy(Object.defineProperties({},{re:{get(){return e},enumerable:!1},toString:{value:()=>e.toString(),enumerable:!1},valueOf:{value:()=>e,enumerable:!1},flags:{value(n){return e=ho(n,e),t},enumerable:!1},clone:{get(){return yo(t)},enumerable:!1}}),po(e));return t}function Y(e){return e?.length>0}function ge(e,t){return e?.constructor===t}function go(e,t,n){let r=Reflect.get(n,t);return{fromInstance:Reflect.get(e,t),fromRegExpMethod:ge(r,Function)?r.bind(e.re):e.re[t]}}function po(e){return{get(t,n){let{fromInstance:r,fromRegExpMethod:o}=go(t,n,e);switch(!0){case!!r:return r;default:return o}}}}function yo(e){let t=e.re.source,n=Y(e.re.flags)?[...e.re.flags]:[];return Vt`${t} ${n}`}function Qe(e,t){return t=(t??"").replace(/^-r\|/,""),e=t.concat(ge(e,String)&&Y(e)?e:""),[...new Set([...e])].join("").replace(/[^dgimsuvy]/g,"")}function ho(e,t){switch(!0){case(!ge(e,String)||!Y(e)):return t;case e==="-r":return t=new RegExp(t.source);case e.startsWith("-r|"):return t=new RegExp(t.source,Qe(e));default:return t=new RegExp(t.source,Qe(t.flags,e))}}function bo(e){switch(!0){case(e?.constructor!==String||!Y(e)):return"";case!!RegExp.escape:return RegExp.escape(e);default:return(`\\x${e.at(0)}`+e.slice(1).replace(/\p{S}|\p{P}/gu,t=>`\\${t}`)).replace(/ |\\x /g,"\\x20")}}function So(e){return e.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm,"").replace(/\s/g,"").trim().replace(/<!([^>]\d+)>/g,(t,n)=>String.fromCharCode(+n)??t)}var{IS:xo}=vo(),_=xo;function vo(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:M,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case M:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,M=!N&&Object.getPrototypeOf(a)?.constructor,k=Number.isNaN(a)||e({trial:P=>String(a)==="NaN"}),Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:M,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var Yt=_t(void 0),wo=_t("");Object.defineProperties(String.prototype,{[Symbol.for("interpolate")]:{value(...e){return Yt(this,...e)}},[Symbol.for("interpolate$")]:{value(...e){return wo(this,...e)}}});function _t(e){return e=_(e,String,Number)?String(e):void 0,function(y,...d){return p(y,u(d))};function t(y,d){return d&&_(e,String,Number)?String(e):`{${y}}`}function n(y,d){let S=y in d;return S&&_(d[y],String,Number)?String(d[y]):t(y,S)}function r(y){return(...d)=>{let S=d.find(h=>h.key);return n(S?S.key:"_",y)}}function o(y,d){return y.replace(/\{(?<key>[a-z_\d]+)}/gim,r(d))}function i(y){let d=[];return Object.entries(y).forEach(([S,h])=>{h.forEach((v,b)=>(d[b]??={},d[b][S]=v))}),d}function s(y){return y.length===1&&Object.values(y[0]).every(Array.isArray)}function u(y){return s(y)?i(y[0]):y}function p(y,d){let S=d?.length?d.filter(h=>_(h,Object)).map((h,v)=>o(y,{...h,index:v+1})).join(""):y;return _(e,void 0)?S:S.replace(/\{[a-z_\d].+\}/gim,String(e))}}Oo();$o();function $o(){/stackblitz/i.test(location.href)&&console.info("\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it."),document.addEventListener("click",e=>{if(e.target.href){let t=e.target;if(t.dataset.top||t.classList.contains("internalLink")||t.target==="_top")return top.location.href=t.href}return!0})}function Yo(e=!0){let t=R('<ul id="log2screen">').first();function n(i=!1){let s=i?R.at.start:R.at.end;return u=>{if(u?.isJQx)return R.li(u.data.get("header")?{class:"head"}:"",u).renderTo(t,s);u=R.IS(u,String,Number,Symbol)?String(u):To(u,e);let p=u.startsWith("!!");u=p?u.slice(2):u,R.li(p?{class:"head"}:"",u).renderTo(t,s)}}let[r,o]=[n(),n(!0)];return{log:(...i)=>i.forEach(r),logTop:(...i)=>i.forEach(o)}}function To(e,t){try{return t?`<pre>${JSON.stringify(e,null,2)}</pre>`:JSON.stringify(e)}catch{return"Some [Object object] can not be converted to JSON"}}function Oo(){R.editCssRules("body{font:normal 14px/17px system-ui,sans-serif;margin:1rem;}","li::marker{vertical-align:top;}","code{color:green;background-color:#eee;padding:2px;font-family:monospace;}","code.codeblock{display:block;padding:6px;border:1px solid #999;margin:0.5rem 0;background-color:#eee;white-space:pre-wrap;}","h3{marginTop:1.5rem;}",".thickBorder{border:5px solid green;borderWidth:5px;padding:0.5rem;display:inline-block;}","a.ExternalLink{text-decoration:none;color:rgb(0,0,238);background-color:#EEE;padding:3px;font-weight:bold;}",".cmmt{color:#888;}",".hidden{display:none;}",".attention{color:red; font-size:1.2em; font-weight:bold;}","#log2screen li{listStyle:'\\2713';paddingLeft:6px;margin:0.5rem 0 0 -1.2rem;font-family:monospace}","#log2screen li.head{list-style-type:none;font-weight:bold;margin-top:0.8rem;margin-bottom:-0.2rem;font-family:revert;}",".err{fontStyle:italic; color:red; }","a{text-decoration:none; font-weight:bold;}","a:hover{text-decoration:underline;}","a[target]:before,a.internalLink:before,a.externalLink:before{color:rgba(0,0,238,0.7);font-size:1.1rem;padding-right:2px;vertical-align:baseline;}",`a[target="_blank"]:before,a.externalLink:before{content:'\\2197';}`,`a[data-top]:before,a.internalLink:before,a[target="_top"]:before{content:'\\21BA';}`)}export{R as $,D as $D,Yo as logFactory,so as regexhelper,Yt as splat};
@@ -1,16 +1,16 @@
1
- var HTMLHelpers=(()=>{var pe=Object.defineProperty;var Gt=Object.getOwnPropertyDescriptor;var Kt=Object.getOwnPropertyNames;var Xt=Object.prototype.hasOwnProperty;var en=(e,t)=>{for(var n in t)pe(e,n,{get:t[n],enumerable:!0})},tn=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Kt(t))!Xt.call(e,o)&&o!==n&&pe(e,o,{get:()=>t[o],enumerable:!(r=Gt(t,o))||r.enumerable});return e};var nn=e=>tn(pe({},"__esModule",{value:!0}),e);var Eo={};en(Eo,{$:()=>H,$D:()=>D,logFactory:()=>Co,regexhelper:()=>Vt,splat:()=>Ue});var{IS:m,maybe:rn,$Wrap:Io,xProxy:ko,isNothing:Zo}=on();function on(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:I,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case I:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,I=!N&&Object.getPrototypeOf(a)?.constructor,k=e({trial:P=>String(a)})==="NaN",Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:I,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var an=un(),Se=ln(),ee=sn();function ln(){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 sn(){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 un(){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 qe={html:"innerHTML",text:"textContent",class:"className"},cn=fn();function fn(){let e={get(t,n){let r=String(n)?.toLowerCase();switch(!0){case r in t:return t[r];case xn(r):return Be(t,r,n);default:return Be(t,r,n,!0)}},enumerable:!1,configurable:!1};return new Proxy({},e)}function Be(e,t,n,r=!1){return Object.defineProperty(e,t,{get(){return r?o=>bn(n):vn(t)}}),e[t]}function mn(e,t,n){return t=t?.isJQx&&t.first()||t,rn({trial:r=>Sn(t)?e.append(t):it(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} (for root ${e}) not created, reason
2
- `,r)})}function dn(e,t,...n){let r=gn(t,e);return n?.forEach(o=>mn(r,o,e)),r}function gn(e,t){switch(e=Ne(t)?hn(e):e?.isJQx?e.first():e,!0){case m(e,String):return G(t,it(e,t)?{html:e}:{text:e});case m(e,Node):return yn(t,e);default:return G(t,e)}}function pn(e){return delete e.data,Object.keys(e).length<1||Object.keys(e).forEach(t=>{let n=t.toLowerCase();n in qe&&(e[qe[n]]=e[t],delete e[t])}),e}function yn(e,t){let n=G(e);return n.append(t),n}function G(e,t={}){t=ot(t,{});let n=Object.entries(t.data??{}),r=Object.assign(Ne(e)?new Comment(t?.text):document.createElement(e),pn(t));return n.length&&n.forEach(([o,i])=>r.dataset[o]=String(i)),r}function ot(e,t){return t?m(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:t}):m(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function hn(e){return ot(e)?e?.text??e?.textContent??"":String(e)}function bn(e){return G("b",{style:"color:red",text:`'${e}' is not a valid HTML-tag`})}function it(e,t){return!Ne(t)&&m(e,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(e)}function Sn(e){return e?.constructor===Comment||e?.constructor===CharacterData}function Ne(e){return e?.constructor===Comment||/comment/i.test(e)}function xn(e){return!m(G(e),HTMLUnknownElement)}function vn(e){return(t,...n)=>dn(e,t,...n)}var{IS:oe,maybe:Po,$Wrap:Fo,xProxy:zo,isNothing:Ho}=wn();function wn(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:I,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case I:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,I=!N&&Object.getPrototypeOf(a)?.constructor,k=e({trial:P=>String(a)})==="NaN",Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:I,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var at=$n;function $n({styleSheet:e,createWithId:t}={}){let{tryParseAtOrNestedRules:n,ruleExists:r,checkParams:o,sheet:i,removeRules:s,consider:u,currentSheetID:p}=Tn({styleSheet:e,createWithId:t});function y(b,g){if(b&&g.removeProperties){Object.keys(g.removeProperties).forEach(x=>b.style.removeProperty(Ve(x)));return}Object.entries(g).forEach(([x,T])=>{x=Ve(x.trim()),T=T.trim();let L;if(/!important/.test(T)&&(T=T.slice(0,T.indexOf("!important")).trim(),L="important"),!CSS.supports(x,T))return console.error(`StylingFactory ${p} error: '${x}' with value '${T}' not supported (yet)`);Ye(()=>b.style.setProperty(x,T,L),`StylingFactory ${p} (setRule4Selector) failed`)})}function d(b,g,x=i){if(b=b?.trim?.(),!oe(b,String)||!b.length||/[;,]$/g.test(b))return console.error(`StylingFactory ${p} (setRules): [${b||"[no selector given]"}] is not a valid selector`);if(g.removeRule)return s(b);let T=r(b,!0),L=T||x.cssRules[x.insertRule(`${b} {}`,x.cssRules.length||0)];return u(()=>y(L,g),b,T)}function S(b){let g=b.trim().split(/{/,2),x=g.shift().trim();if(!oe(x,String)||!x?.trim()?.length)return console.error(`StylingFactory ${p} (doParse): no (valid) selector could be extracted from rule ${xe(b)}`);let T=An(g.shift());return Ye(()=>d(x,T),`StylingFactory ${p} (setRules) failed`)}function h(b){let g=n(b);return g.done?g.existing:S(b)}function v(b,g){return b.trim().startsWith("@media")?h(On(b,g)):d(b,g)}return function(b,g={}){return o(b,g)&&(Object.keys(g).length?v(b,g):h(b))}}function Tn({styleSheet:e,createWithId:t}){let n="Note: The rule or some of its properties may not be supported by your browser (yet)",r=`for style#${t}`;e=t?o(t):e;function o(h){let v=document.querySelector(`#${h}`)?.sheet;if(v)return v;let b=Object.assign(document.createElement("style"),{id:h});return document.head.insertAdjacentElement("beforeend",b),b.sheet}function i(h){return console.error(`StylingFactory ${r} [rule: ${h}]
3
- => @charset, @namespace and @import are not supported here`),{done:!0}}function s(h,v){return[...e.rules].find(b=>v?_e(b.selectorText||"",h):Nn`${jn(h)}${[..."gim"]}`.test(b.cssText))}function u(h){return/^@charset|@import|namespace/i.test(h.trim())?i(h):h.match(/}/g)?.length>1?{existing:d(h,1),done:!0}:{done:!1}}function p(h){let v=[...e.cssRules].reduce((g,x,T)=>_e(x.selectorText||"",h)&&g.concat(T)||g,[]),b=v.length;return v.forEach(g=>e.deleteRule(g)),b>0?console.info(`\u2714 Removed ${b} instance${b>1?"s":""} of selector ${h} from ${r.slice(4)}`):console.info(`\u2714 Remove rule: selector ${h} does not exist in ${r.slice(4)}`)}function y(h,v){return h&&oe(h,String)&&h.trim().length>0&&oe(v,Object)||(console.error(`StylingFactory ${r} called with invalid parameters`),!1)}function d(h){h=h.trim();let v=h.slice(0,h.indexOf("{")).trim(),b=!!s(v);try{return e.insertRule(`${h}`,e.cssRules.length),b}catch(g){return console.error(`StylingFactory ${r} (tryParse) ${g.name} Error:
1
+ var HTMLHelpers=(()=>{var pe=Object.defineProperty;var Xt=Object.getOwnPropertyDescriptor;var en=Object.getOwnPropertyNames;var tn=Object.prototype.hasOwnProperty;var nn=(e,t)=>{for(var n in t)pe(e,n,{get:t[n],enumerable:!0})},rn=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of en(t))!tn.call(e,o)&&o!==n&&pe(e,o,{get:()=>t[o],enumerable:!(r=Xt(t,o))||r.enumerable});return e};var on=e=>rn(pe({},"__esModule",{value:!0}),e);var Mo={};nn(Mo,{$:()=>H,$D:()=>D,logFactory:()=>Ao,regexhelper:()=>_t,splat:()=>Ue});var{IS:m,maybe:an,$Wrap:Zo,xProxy:Po,isNothing:Fo}=ln();function ln(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:M,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case M:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,M=!N&&Object.getPrototypeOf(a)?.constructor,k=e({trial:P=>String(a)})==="NaN",Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:M,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var sn=fn(),Se=un(),ee=cn();function un(){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 cn(){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 fn(){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 qe={html:"innerHTML",text:"textContent",class:"className"},mn=dn();function dn(){let e={get(t,n){let r=String(n)?.toLowerCase();switch(!0){case r in t:return t[r];case wn(r):return Be(t,r,n);default:return Be(t,r,n,!0)}},enumerable:!1,configurable:!1};return new Proxy({},e)}function Be(e,t,n,r=!1){return Object.defineProperty(e,t,{get(){return r?o=>xn(n):$n(t)}}),e[t]}function gn(e,t,n){return t=t?.isJQx&&t.first()||t,an({trial:r=>vn(t)?e.append(t):it(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} (for root ${e}) not created, reason
2
+ `,r)})}function pn(e,t,...n){let r=yn(t,e);return n?.forEach(o=>gn(r,o,e)),r}function yn(e,t){switch(e=Ne(t)?Sn(e):e?.isJQx?e.first():e,!0){case m(e,String):return G(t,it(e,t)?{html:e}:{text:e});case m(e,Node):return bn(t,e);default:return G(t,e)}}function hn(e){return delete e.data,Object.keys(e).length<1||Object.keys(e).forEach(t=>{let n=t.toLowerCase();n in qe&&(e[qe[n]]=e[t],delete e[t])}),e}function bn(e,t){let n=G(e);return n.append(t),n}function G(e,t={}){t=ot(t,{});let n=Object.entries(t.data??{}),r=Object.assign(Ne(e)?new Comment(t?.text):document.createElement(e),hn(t));return n.length&&n.forEach(([o,i])=>r.dataset[o]=String(i)),r}function ot(e,t){return t?m(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:t}):m(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function Sn(e){return ot(e)?e?.text??e?.textContent??"":String(e)}function xn(e){return G("b",{style:"color:red",text:`'${e}' is not a valid HTML-tag`})}function it(e,t){return!Ne(t)&&m(e,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(e)}function vn(e){return e?.constructor===Comment||e?.constructor===CharacterData}function Ne(e){return e?.constructor===Comment||/comment/i.test(e)}function wn(e){return!m(G(e),HTMLUnknownElement)}function $n(e){return(t,...n)=>pn(e,t,...n)}var{IS:oe,maybe:zo,$Wrap:Ho,xProxy:Ro,isNothing:Jo}=Tn();function Tn(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:M,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case M:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,M=!N&&Object.getPrototypeOf(a)?.constructor,k=e({trial:P=>String(a)})==="NaN",Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:M,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var at=On;function On({styleSheet:e,createWithId:t}={}){let{tryParseAtOrNestedRules:n,ruleExists:r,checkParams:o,sheet:i,removeRules:s,consider:u,currentSheetID:p}=Dn({styleSheet:e,createWithId:t});function y(b,g){if(b&&g.removeProperties){Object.keys(g.removeProperties).forEach(x=>b.style.removeProperty(Ve(x)));return}Object.entries(g).forEach(([x,T])=>{x=Ve(x.trim()),T=T.trim();let L;if(/!important/.test(T)&&(T=T.slice(0,T.indexOf("!important")).trim(),L="important"),!CSS.supports(x,T))return console.error(`StylingFactory ${p} error: '${x}' with value '${T}' not supported (yet)`);Ye(()=>b.style.setProperty(x,T,L),`StylingFactory ${p} (setRule4Selector) failed`)})}function d(b,g,x=i){if(b=b?.trim?.(),!oe(b,String)||!b.length||/[;,]$/g.test(b))return console.error(`StylingFactory ${p} (setRules): [${b||"[no selector given]"}] is not a valid selector`);if(g.removeRule)return s(b);let T=r(b,!0),L=T||x.cssRules[x.insertRule(`${b} {}`,x.cssRules.length||0)];return u(()=>y(L,g),b,T)}function S(b){let g=b.trim().split(/{/,2),x=g.shift().trim();if(!oe(x,String)||!x?.trim()?.length)return console.error(`StylingFactory ${p} (doParse): no (valid) selector could be extracted from rule ${xe(b)}`);let T=En(g.shift());return Ye(()=>d(x,T),`StylingFactory ${p} (setRules) failed`)}function h(b){let g=n(b);return g.done?g.existing:S(b)}function v(b,g){return b.trim().startsWith("@media")?h(jn(b,g)):d(b,g)}return function(b,g={}){return o(b,g)&&(Object.keys(g).length?v(b,g):h(b))}}function Dn({styleSheet:e,createWithId:t}){let n="Note: The rule or some of its properties may not be supported by your browser (yet)",r=`for style#${t}`;e=t?o(t):e;function o(h){let v=document.querySelector(`#${h}`)?.sheet;if(v)return v;let b=Object.assign(document.createElement("style"),{id:h});return document.head.insertAdjacentElement("beforeend",b),b.sheet}function i(h){return console.error(`StylingFactory ${r} [rule: ${h}]
3
+ => @charset, @namespace and @import are not supported here`),{done:!0}}function s(h,v){return[...e.rules].find(b=>v?_e(b.selectorText||"",h):Ln`${Cn(h)}${[..."gim"]}`.test(b.cssText))}function u(h){return/^@charset|@import|namespace/i.test(h.trim())?i(h):h.match(/}/g)?.length>1?{existing:d(h,1),done:!0}:{done:!1}}function p(h){let v=[...e.cssRules].reduce((g,x,T)=>_e(x.selectorText||"",h)&&g.concat(T)||g,[]),b=v.length;return v.forEach(g=>e.deleteRule(g)),b>0?console.info(`\u2714 Removed ${b} instance${b>1?"s":""} of selector ${h} from ${r.slice(4)}`):console.info(`\u2714 Remove rule: selector ${h} does not exist in ${r.slice(4)}`)}function y(h,v){return h&&oe(h,String)&&h.trim().length>0&&oe(v,Object)||(console.error(`StylingFactory ${r} called with invalid parameters`),!1)}function d(h){h=h.trim();let v=h.slice(0,h.indexOf("{")).trim(),b=!!s(v);try{return e.insertRule(`${h}`,e.cssRules.length),b}catch(g){return console.error(`StylingFactory ${r} (tryParse) ${g.name} Error:
4
4
  ${g.message}
5
5
  Rule: ${xe(h)}
6
6
  ${n}`),b}}function S(h,v,b){try{return h(),b}catch(g){return console.error(`StylingFactory ${r} (tryAddOrModify) ${g.name} Error:
7
7
  ${g.message}
8
8
  Rule: ${xe(v)}
9
- ${n}`),b}}return{sheet:e,removeRules:p,tryParseAtOrNestedRules:u,ruleExists:s,checkParams:y,tryParse:d,consider:S,currentSheetID:r}}function On(e,t){return`${e.trim()} ${Object.entries(t).map(([n,r])=>`${n}: { ${Dn(r)}`)}`}function xe(e){let t=(e||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return e.length>t.length?`${t.trim()}...truncated`:t}function Dn(e){return Object.entries(e).map(([t,n])=>`${t}: ${n.trim()}`).join(`;
10
- `)}function jn(e){return e.replace(/([*\[\]()-+{}.$?\\])/g,t=>`\\${t}`)}function Nn(e,...t){let n=t.length&&Array.isArray(t.slice(-1))?t.pop().join(""):"";return new RegExp((t.length&&e.raw.reduce((r,o,i)=>r.concat(t[i-1]||"").concat(o),"")||e.raw.join("")).split(`
11
- `).map(r=>r.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),n)}function Ve(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Ye(e,t){try{return e()}catch(n){console.error(`${t||"an error occured"}: ${n.message}`)}}function Cn(e){return e.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(t,n)=>`${n}\\3b`).split(";").map(t=>t.trim()).join(`;
9
+ ${n}`),b}}return{sheet:e,removeRules:p,tryParseAtOrNestedRules:u,ruleExists:s,checkParams:y,tryParse:d,consider:S,currentSheetID:r}}function jn(e,t){return`${e.trim()} ${Object.entries(t).map(([n,r])=>`${n}: { ${Nn(r)}`)}`}function xe(e){let t=(e||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return e.length>t.length?`${t.trim()}...truncated`:t}function Nn(e){return Object.entries(e).map(([t,n])=>`${t}: ${n.trim()}`).join(`;
10
+ `)}function Cn(e){return e.replace(/([*\[\]()-+{}.$?\\])/g,t=>`\\${t}`)}function Ln(e,...t){let n=t.length&&Array.isArray(t.slice(-1))?t.pop().join(""):"";return new RegExp((t.length&&e.raw.reduce((r,o,i)=>r.concat(t[i-1]||"").concat(o),"")||e.raw.join("")).split(`
11
+ `).map(r=>r.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),n)}function Ve(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Ye(e,t){try{return e()}catch(n){console.error(`${t||"an error occured"}: ${n.message}`)}}function An(e){return e.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(t,n)=>`${n}\\3b`).split(";").map(t=>t.trim()).join(`;
12
12
  `).replaceAll("\\3b",";").split(`
13
- `)}function Ln(e){return e.reduce((t,n)=>{let[r,o]=[n.slice(0,n.indexOf(":")).trim(),n.slice(n.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return r&&o?{...t,[r]:o}:t},{})}function An(e){return Ln(Cn(e))}function _e(e,t){return e?.replace("::",":")===t?.replace("::",":")}var ve=!1,En={on:()=>ve=!0,off:()=>ve=!1},K={tagsRaw:ee,allowUnknownHtmlTags:En,isAllowed(e){if(ve)return!0;let t=m(e,String)?e.toLowerCase():e?.nodeName.toLowerCase()||"none";return t==="#text"||!!ee[t]},allowTag:e=>ee[e.toLowerCase()]=!0,prohibitTag:e=>ee[e.toLowerCase()]=!1},Mn=!0,te={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 In(e){if(Mn&&Object.keys(e.removed).length){let t=Object.entries(e.removed).reduce((n,[r,o])=>[...n,`${ie(r)} => ${o}`],[]).join("\\000A");A.error(`JQx: HTML creation error(s): ${t}`)}}function kn(e){let t=e.nodeName.toLowerCase(),n=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(t)&&!n.find(r=>r===t)||K.isAllowed(t)}function Ce(e){let t={rawHTML:e?.parentElement?.getHTML()??"no html",removed:{}};return m(e,HTMLElement)&&[...e.childNodes].forEach(n=>{if(n?.children?.length&&Ce(n),n?.attributes){let r=m(n,SVGElement)?Se.svg:Se.html;[...(n??{attributes:[]}).attributes].forEach(o=>{let i=o.name.trim().toLowerCase(),s=o.value.trim().toLowerCase().replace(te.whiteSpace,""),u=i==="href"?!te.validURL.test(s):te.notAllowedValues.test(s),p=i.startsWith("data")?!te.data.test(i):!!r[i];if(u||p){let y=Ke(o.value||"none",60);y+=y.length===60?"...":"",t.removed[`${o.name}`]=`attribute/property/value not allowed, removed. Value: ${y}`,n.removeAttribute(o.name)}})}if(!(kn(n)||n.constructor===CharacterData||n.constructor===Comment)){let r=(n?.outerHTML||n?.textContent).trim(),o=Ke(r,60)??"EMPTY";o+=o.length===60?"...":"",t.removed[`<${n.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${o}`,n.remove()}}),In(t),e}function Zn(e){let t=document.createElement("div");return t.insertAdjacentHTML(F.end,e),t.childNodes.length?Ce(t):void 0}function Pn(e,t,n){switch(!0){case m(e,Comment):return t.insertAdjacentHTML(n,`<!--${e.data}-->`);case m(e,Text):return t.insertAdjacentText(n,e.data||e.textContent);default:return}}function we(e=[],t=document.body,n=F.BeforeEnd){return n=n||F.BeforeEnd,t=t?.isJQx?t.node:t||document.body,e.reduce((r,o)=>{let i=W(o)&&Fn(o,t,n);return i?[...r,i]:r},[])}function Fn(e,t=document.body,n=F.BeforeEnd){return n=n||F.BeforeEnd,t=t?.isJQx?t?.[0]:t,m(e,Comment,Text)?Pn(e,t,n):m(e,HTMLElement)?t.insertAdjacentElement(n,e):void 0}function J(e){if(m(e,Text,Comment))return e;let t=e?.trim(),n=t?.split(/<text>|<\/text>/i)??[];if(n?.length&&(n=n.length>1?n.filter(o=>o.length).shift():void 0),t.startsWith("<!--")&&t.endsWith("-->"))return document.createComment(e.replace(/<!--|-->$/g,""));if(n||m(t,String)&&!/^<(.+)[^>]+>/m.test(t))return document.createTextNode(n??t);let r=Zn(e);return r.childNodes.length<1?J(`<span data-jqxcreationerror="1">${ut(e,60)}</span>`):r.children[0]}function zn(e){if(e.node("#jqxPopup"))return;e.logger.log("JQx: [JQx].Popup first call. Dialog element created."),e.dialog({id:"jqxPopup"},e.div({id:"jqxPopupContent"})).render,e.editCssRules(...an);let t=[],[n,r]=[e("#jqxPopupContent"),e.node("#jqxPopup")],o={};return e.handle({type:"click, cancel",handlers:h,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:i,remove:s,removeModal:S});function i(g){if(r.open)switch(!0){case u(g):return;default:return s(),setTimeout(()=>i(g),200)}o={...g};let{content:x}=o;return e.IS(x,String,HTMLElement)||x?.isJQx?p():!0}function s(){return o.modal?b(o.warnMessage):y()}function u(g){for(let[x,T]of Object.entries(o))if(T!==g[x])return!1;return!0}function p(){n.clear();let{content:g,modal:x,closeAfter:T}=o;x=e.IS(x,Boolean)?x:!1;let L=x?"":e.div({id:"closeHandleIcon"});n.append(L,e.IS(g,String)?e.div(g):g),r.showModal(),!x&&e.IS(T,Number)&&v(s,T)}function y(){if(r.close(o.returnValue),d(),e.IS(o.callback,Function))return t.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function d(){t.forEach(g=>clearTimeout(g)),t=[]}function S({callback:g,value:x}={}){o.returnValue=x,o.modal=!1,o.callback=g||o.callback,s()}function h({evt:g}){if(!(Object.keys(o).length<1||!r.open)&&(g.type==="cancel"&&o.modal&&g.preventDefault(),g.target.closest("#closeHandleIcon")||!g.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),s()}function v(g,x){e.IS(g,Function)&&e.IS(x,Number)&&x>0&&(d(),t.push(setTimeout(g,x*1e3)))}function b(g){if(!e.IS(g,String,HTMLElement,Proxy))return;let x=n.find$(".warn");switch(!0){case x.is.empty:x=e.div({class:"warn"},g);default:n.append(x.addClass("active")),v(()=>n.find$(".warn").removeClass("active"),2)}}}function Hn(e){let t={},n="anonymous_";function r(d){if(d){let{handler:S,capture:h,type:v}=d;document.addEventListener(v,S,{capture:h})}}function o(d){if(d){let{type:S,handler:h,capture:v}=d;document.removeEventListener(S,h,{capture:v})}}function i(d,S,h,v){return function(b){if(!C(S))return d({evt:b});let g=b.target.closest(S);if(g){let x=e(g);d({self:x,me:x,evt:b}),h&&p(b.type,v)}return!0}}function s(d){return t[d]=t[d]||{},t[d]}function u(d,S){return Object.entries(s(d)).find(([h])=>h===S)}function p(d,S){let h=u(d,S);h&&(o(h[1]),delete t[d][S],delete $e[S],A.warn(`Removed listener [${S}] for event type [${d}].`))}function y(d){let{type:S,handler:h,name:v,capture:b,once:g,selector:x,node:T,about:L}=d;t[S]=t[S]||{};let a=Un(v||h.name),l=h;if(T instanceof HTMLElement){let c=T.dataset.hid||a;T.dataset.hid=c,x=`[data-hid=${c}]`}switch(!0){case!t[S][a]:return A.log(`JQx: created listener for event type ${S}, with handler name ${a}`),t[S][a]={name:a,handler:i(h,x,g,a),capture:Bn(S,b),once:!!g,type:S,initialHandler:l,selector:!!x&&x||!1,about:!!L&&L||!1,unListen(){p(S,a)}},t[S][a];default:return console.warn(`The listener [${a}] for [${S}] exists, it is not re-assigned.`)}}return{remove(...d){return p(...d)},listen:function(d){let{type:S,handler:h}=d;if(!C(S)||!m(h,Function))return;let v=y(d);if(v)return r(v),{type:S,name:v.name,unListen(){p(S,v.name)}}},get ListenerStore(){return Object.freeze({...t})}}}var A=Vn(),Rn=["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(e,t){return e[String(t).toLowerCase()]??e[t]}})),Jn=[...Array(26)].map((e,t)=>String.fromCharCode(t+65)).concat([...Array(26)].map((e,t)=>String.fromCharCode(t+97))).concat([...Array(10)].map((e,t)=>`${t}`)),Qn=Object.freeze({get(e,t){return e[Le(t)]||e[t]},enumerable:!1,configurable:!1}),$e={};function Wn(){let e=setTimeout(()=>{});for(;e>=0;)clearTimeout(e--)}function Un(e){return C(e)&&!/^handler|handlers$/gi.test(e.trim())?e.trim():lt()}function qn(e){let t=!!e.node&&!m(e,Text,Comment);switch(!0){case t:let n=e.node.dataset?Object.keys(e.node.dataset).map(o=>`[data-${o}]`):[],r=[e.attr("id")&&`#${e?.attr("id")}`||void 0,e.attr("class")&&e?.attr("class").split(" ").map(o=>`.${o}`).join(", ")||void 0,n.length>0&&n.join(", ")||void 0].filter(o=>!!o).join(", ")||[];return r.length?`(${r})`:"";default:return""}}function lt(e){let t=`anonymous_${Math.random().toString(36).slice(2)}`;return $e[t]?lt():($e[t]=t,t)}function Bn(e,t){return!!Rn.find(n=>n===e)||!!t}function st(e){return e.startsWith("data")||Se.html.find(t=>e.toLowerCase()===t)}function Ge(e){return e&&(e.textContent="")}function Te(e,t=0,n=!0){return e=e?.parentElement,t+=e?e[n?"scrollTop":"scrollLeft"]:0,e?Te(e,t,n):t}function C(e,t=1){return t=m(t,Number)&&t||1,m(e,String)&&e.length>=t}function Ke(e,t=120){return ut(e,t).replace(/&lt;/g,"<")}function ut(e,t=120){return`${e}`.trim().slice(0,t).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(e.length>t?" &hellip;":"").trim()}function ie(e){switch(!0){case m(e,String):let t=document.createElement("div");return t.append(e),t.innerHTML;default:return e}}function ye(e){return m(e,String)&&Object.assign(document.createElement("textarea"),{innerHTML:e}).textContent||e}function Vn(){let[e,t]=[!1,!0],n=[],r={get on(){return e=!0,r},get off(){return e=!1,r},get disable(){return t=!0,r},get enable(){return t=!1,r},get backLog(){return n}};function o(){t=!0}function i(){t=!1}function s(...y){return n.unshift(...y.map(d=>`${he()} \u2A3B ${ye(d)}`)),console.error(n.slice(0,y.length).join(`
13
+ `)}function In(e){return e.reduce((t,n)=>{let[r,o]=[n.slice(0,n.indexOf(":")).trim(),n.slice(n.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return r&&o?{...t,[r]:o}:t},{})}function En(e){return In(An(e))}function _e(e,t){return e?.replace("::",":")===t?.replace("::",":")}var ve=!1,Mn={on:()=>ve=!0,off:()=>ve=!1},K={tagsRaw:ee,allowUnknownHtmlTags:Mn,isAllowed(e){if(ve)return!0;let t=m(e,String)?e.toLowerCase():e?.nodeName.toLowerCase()||"none";return t==="#text"||!!ee[t]},allowTag:e=>ee[e.toLowerCase()]=!0,prohibitTag:e=>ee[e.toLowerCase()]=!1},kn=!0,te={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 Zn(e){if(kn&&Object.keys(e.removed).length){let t=Object.entries(e.removed).reduce((n,[r,o])=>[...n,`${ie(r)} => ${o}`],[]).join("\\000A");A.error(`JQx: HTML creation error(s): ${t}`)}}function Pn(e){let t=e.nodeName.toLowerCase(),n=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(t)&&!n.find(r=>r===t)||K.isAllowed(t)}function Ce(e){let t={rawHTML:e?.parentElement?.getHTML()??"no html",removed:{}};return m(e,HTMLElement)&&[...e.childNodes].forEach(n=>{if(n?.children?.length&&Ce(n),n?.attributes){let r=m(n,SVGElement)?Se.svg:Se.html;[...(n??{attributes:[]}).attributes].forEach(o=>{let i=o.name.trim().toLowerCase(),s=o.value.trim().toLowerCase().replace(te.whiteSpace,""),u=i==="href"?!te.validURL.test(s):te.notAllowedValues.test(s),p=i.startsWith("data")?!te.data.test(i):!!r[i];if(u||p){let y=Ke(o.value||"none",60);y+=y.length===60?"...":"",t.removed[`${o.name}`]=`attribute/property/value not allowed, removed. Value: ${y}`,n.removeAttribute(o.name)}})}if(!(Pn(n)||n.constructor===CharacterData||n.constructor===Comment)){let r=(n?.outerHTML||n?.textContent).trim(),o=Ke(r,60)??"EMPTY";o+=o.length===60?"...":"",t.removed[`<${n.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${o}`,n.remove()}}),Zn(t),e}function Fn(e){let t=document.createElement("div");return t.insertAdjacentHTML(F.end,e),t.childNodes.length?Ce(t):void 0}function zn(e,t,n){switch(!0){case m(e,Comment):return t.insertAdjacentHTML(n,`<!--${e.data}-->`);case m(e,Text):return t.insertAdjacentText(n,e.data||e.textContent);default:return}}function we(e=[],t=document.body,n=F.BeforeEnd){return n=n||F.BeforeEnd,t=t?.isJQx?t.node:t||document.body,e.reduce((r,o)=>{let i=W(o)&&Hn(o,t,n);return i?[...r,i]:r},[])}function Hn(e,t=document.body,n=F.BeforeEnd){return n=n||F.BeforeEnd,t=t?.isJQx?t?.[0]:t,m(e,Comment,Text)?zn(e,t,n):m(e,HTMLElement)?t.insertAdjacentElement(n,e):void 0}function J(e){if(m(e,Text,Comment))return e;let t=e?.trim(),n=t?.split(/<text>|<\/text>/i)??[];if(n?.length&&(n=n.length>1?n.filter(o=>o.length).shift():void 0),t.startsWith("<!--")&&t.endsWith("-->"))return document.createComment(e.replace(/<!--|-->$/g,""));if(n||m(t,String)&&!/^<(.+)[^>]+>/m.test(t))return document.createTextNode(n??t);let r=Fn(e);return r.childNodes.length<1?J(`<span data-jqxcreationerror="1">${ut(e,60)}</span>`):r.children[0]}function Rn(e){if(e.node("#jqxPopup"))return;e.logger.log("JQx: [JQx].Popup first call. Dialog element created."),e.dialog({id:"jqxPopup"},e.div({id:"jqxPopupContent"})).render,e.editCssRules(...sn);let t=[],[n,r]=[e("#jqxPopupContent"),e.node("#jqxPopup")],o={};return e.handle({type:"click, cancel",handlers:h,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:i,remove:s,removeModal:S});function i(g){if(r.open)switch(!0){case u(g):return;default:return s(),setTimeout(()=>i(g),200)}o={...g};let{content:x}=o;return e.IS(x,String,HTMLElement)||x?.isJQx?p():!0}function s(){return o.modal?b(o.warnMessage):y()}function u(g){for(let[x,T]of Object.entries(o))if(T!==g[x])return!1;return!0}function p(){n.clear();let{content:g,modal:x,closeAfter:T}=o;x=e.IS(x,Boolean)?x:!1;let L=x?"":e.div({id:"closeHandleIcon"});n.append(L,e.IS(g,String)?e.div(g):g),r.showModal(),!x&&e.IS(T,Number)&&v(s,T)}function y(){if(r.close(o.returnValue),d(),e.IS(o.callback,Function))return t.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function d(){t.forEach(g=>clearTimeout(g)),t=[]}function S({callback:g,value:x}={}){o.returnValue=x,o.modal=!1,o.callback=g||o.callback,s()}function h({evt:g}){if(!(Object.keys(o).length<1||!r.open)&&(g.type==="cancel"&&o.modal&&g.preventDefault(),g.target.closest("#closeHandleIcon")||!g.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),s()}function v(g,x){e.IS(g,Function)&&e.IS(x,Number)&&x>0&&(d(),t.push(setTimeout(g,x*1e3)))}function b(g){if(!e.IS(g,String,HTMLElement,Proxy))return;let x=n.find$(".warn");switch(!0){case x.is.empty:x=e.div({class:"warn"},g);default:n.append(x.addClass("active")),v(()=>n.find$(".warn").removeClass("active"),2)}}}function Jn(e){let t={},n="anonymous_";function r(d){if(d){let{handler:S,capture:h,type:v}=d;document.addEventListener(v,S,{capture:h})}}function o(d){if(d){let{type:S,handler:h,capture:v}=d;document.removeEventListener(S,h,{capture:v})}}function i(d,S,h,v){return function(b){if(!C(S))return d({evt:b});let g=b.target.closest(S);if(g){let x=e(g);d({self:x,me:x,evt:b}),h&&p(b.type,v)}return!0}}function s(d){return t[d]=t[d]||{},t[d]}function u(d,S){return Object.entries(s(d)).find(([h])=>h===S)}function p(d,S){let h=u(d,S);h&&(o(h[1]),delete t[d][S],delete $e[S],A.warn(`Removed listener [${S}] for event type [${d}].`))}function y(d){let{type:S,handler:h,name:v,capture:b,once:g,selector:x,node:T,about:L}=d;t[S]=t[S]||{};let a=Bn(v||h.name),l=h;if(T instanceof HTMLElement){let c=T.dataset.hid||a;T.dataset.hid=c,x=`[data-hid=${c}]`}switch(!0){case!t[S][a]:return A.log(`JQx: created listener for event type ${S}, with handler name ${a}`),t[S][a]={name:a,handler:i(h,x,g,a),capture:Yn(S,b),once:!!g,type:S,initialHandler:l,selector:!!x&&x||!1,about:!!L&&L||!1,unListen(){p(S,a)}},t[S][a];default:return console.warn(`The listener [${a}] for [${S}] exists, it is not re-assigned.`)}}return{remove(...d){return p(...d)},listen:function(d){let{type:S,handler:h}=d;if(!C(S)||!m(h,Function))return;let v=y(d);if(v)return r(v),{type:S,name:v.name,unListen(){p(S,v.name)}}},get ListenerStore(){return Object.freeze({...t})}}}var A=_n(),Qn=["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(e,t){return e[String(t).toLowerCase()]??e[t]}})),Wn=[...Array(26)].map((e,t)=>String.fromCharCode(t+65)).concat([...Array(26)].map((e,t)=>String.fromCharCode(t+97))).concat([...Array(10)].map((e,t)=>`${t}`)),Un=Object.freeze({get(e,t){return e[Le(t)]||e[t]},enumerable:!1,configurable:!1}),$e={};function qn(){let e=setTimeout(()=>{});for(;e>=0;)clearTimeout(e--)}function Bn(e){return C(e)&&!/^handler|handlers$/gi.test(e.trim())?e.trim():lt()}function Vn(e){let t=!!e.node&&!m(e,Text,Comment);switch(!0){case t:let n=e.node.dataset?Object.keys(e.node.dataset).map(o=>`[data-${o}]`):[],r=[e.attr("id")&&`#${e?.attr("id")}`||void 0,e.attr("class")&&e?.attr("class").split(" ").map(o=>`.${o}`).join(", ")||void 0,n.length>0&&n.join(", ")||void 0].filter(o=>!!o).join(", ")||[];return r.length?`(${r})`:"";default:return""}}function lt(e){let t=`anonymous_${Math.random().toString(36).slice(2)}`;return $e[t]?lt():($e[t]=t,t)}function Yn(e,t){return!!Qn.find(n=>n===e)||!!t}function st(e){return e.startsWith("data")||Se.html.find(t=>e.toLowerCase()===t)}function Ge(e){return e&&(e.textContent="")}function Te(e,t=0,n=!0){return e=e?.parentElement,t+=e?e[n?"scrollTop":"scrollLeft"]:0,e?Te(e,t,n):t}function C(e,t=1){return t=m(t,Number)&&t||1,m(e,String)&&e.length>=t}function Ke(e,t=120){return ut(e,t).replace(/&lt;/g,"<")}function ut(e,t=120){return`${e}`.trim().slice(0,t).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(e.length>t?" &hellip;":"").trim()}function ie(e){switch(!0){case m(e,String):let t=document.createElement("div");return t.append(e),t.innerHTML;default:return e}}function ye(e){return m(e,String)&&Object.assign(document.createElement("textarea"),{innerHTML:e}).textContent||e}function _n(){let[e,t]=[!1,!0],n=[],r={get on(){return e=!0,r},get off(){return e=!1,r},get disable(){return t=!0,r},get enable(){return t=!1,r},get backLog(){return n}};function o(){t=!0}function i(){t=!1}function s(...y){return n.unshift(...y.map(d=>`${he()} \u2A3B ${ye(d)}`)),console.error(n.slice(0,y.length).join(`
14
14
  `)),r}function u(...y){return n.unshift(...y.map(d=>`${he()} \u26A0 ${ye(d)}`)),console.warn(n.slice(0,y.length).join(`
15
15
  `)),r}function p(...y){let d=y.map(S=>`${he()} \u2714 ${ye(S)}`);switch(!t&&n.unshift(...d),e){case!0:console.log(d.join(`
16
- `));default:return r}}return Object.defineProperties(r,{log:{value:p,enumerable:!1},error:{value:s,enumerable:!1},warn:{value:u,enumerable:!1}}),Object.freeze(r)}function he(){return(e=>`[${ne(e.getHours())}:${ne(e.getMinutes())}:${ne(e.getSeconds())}.${ne(e.getMilliseconds(),3)}]`)(new Date)}function Yn(e,t){if(e)for(let[n,r]of Object.entries(t)){if(n=R(n),n.startsWith("data"))return ct(e,r);m(r,String)&&st(n)&&e.setAttribute(n,r.split(/[, ]/)?.join(" "))}}function ct(e,t){if(e&&m(t,Object))for(let[n,r]of Object.entries(t))e.setAttribute(`data-${R(n)}`,r)}function ft(e){return e?m(e,Proxy)?[e.EL]:m(e,NodeList)?[...e]:W(e)?[e]:Me(e)?e:e.isJQx?e.collection:void 0:[]}function Xe(e,t){return e.andThen(t)}function et(e,t){return e.andThen(t,!0)}function W(e){return m(e,Text,HTMLElement,Comment)}function be(e,t){if(m(t,Object))for(let[n,r]of Object.entries(t)){let o;/!important/i.test(r)&&(r=r.slice(0,r.indexOf("!")).trim(),o="important"),e.style.setProperty(R(n),r,o)}}function Q(e){let t=e.cloneNode(!0);return t.removeAttribute&&t.removeAttribute("id"),e.isConnected?e.remove():e=null,t}function _n(e){if(!m(e,HTMLElement))return;let t=e.style,n=getComputedStyle(e),r=!![t.visibility,n.visibility].includes("hidden"),o=!![t.display,n.display].includes("none"),i=!!e.hidden,s=parseInt(n.height)<1||parseInt(n.width)<1,u=e.offsetTop<0||e.offsetLeft+e.offsetWidth<0||e.offsetLeft>document.body.offsetWidth,p=+n.opacity==0||+(t.opacity||1)==0;return!(i||u||p||o||r||s)}function Gn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(t=>t===e):!1}function Kn(e){return e?.filter(t=>t).reduce((t,n)=>t.concat(dt(n)?`<!--${n.data}-->`:Ae(n)?n.textContent:n.outerHTML),"")}function ne(e,t=2){return`${e}`.padStart(t,"0")}function Xn(e,t=0){return[e,t]=[Math.floor(e),Math.ceil(t)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(e-t+1)+t)}function mt(){return`_${rr(Jn).slice(0,8).join("")}`}function er(e){return e=m(e,String)&&/,/.test(e)?e.split(",").map(t=>t.trim().toLowerCase()).filter(t=>t.length>0):e,m(e,Array)?e:m(e,String)&&e?.trim().toLowerCase()||""}function tr(e){return e?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(t=>t===e):!1}function nr(e,t){switch(e=String(e).trim(),!0){case/^(0|false|f)$/i.test(e):return!1;case/^(1|true|t)$/i.test(e):return!0;default:return t}}function rr(e){let t=e.length;for(;t--;){let n=Xn(t);[e[t],e[n]]=[e[n],e[t]]}return e}function Le(e){return m(e,String)?e.toLowerCase().split("-").map((t,n)=>n&&`${or(t)}`||t).join(""):e}function R(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^-|-$/,"")}function or([e,...t]){return`${e.toUpperCase()}${t.join("")}`}function Ae(e){return m(e,Comment,Text)}function dt(e){m(e,Comment)}function ir(e){return m(e,Text)}function Ee(e){return m(e,String)&&/^<|>$/.test(`${e}`.trim())}function Me(e){return m(e,Array)&&!e?.find(t=>!W(t))}function gt(e){return m(e,Array)&&!e?.find(t=>!Ee(t))}function O(e,t){let n=e.collection.filter(r=>!Ae(r));for(let r=0;r<n.length;r+=1)t(n[r],r);return e}function ar(e){return e.node?m(e.node,Comment)?`<!--${e.node.textContent}-->`:e.HTML.get(1).split(">")[0]+">...":""}function pt(e,t,n){let r=t!==document.body&&m(e,String)&&e.toLowerCase()!=="body"?t:document;try{n.collection=[...r.querySelectorAll(e)]}catch{A.warn(`JQx: Invalid CSS querySelector. [${m(e,String)?e:"Not a string!"}]`)}}function lr(){return{isCommentOrTextNode:Ae,isNode:W,isComment:dt,isText:ir,isHtmlString:Ee,isArrayOfHtmlElements:Me,isArrayOfHtmlStrings:gt,ElemArray2HtmlString:Kn,input2Collection:ft,setCollectionFromCssSelector:pt,cssRuleEdit:at({createWithId:"JQxStylesheet"})}}function sr(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return t=>{let n=t.node;return m(n,Node)?Object.freeze({get writable(){return Gn(n)},get modal(){return tr(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return _n(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return t.collection.length<1},get virtual(){return t.isVirtual}}):e}}function ur(e,t,n,r){n&&m(t,String)&&(t={[t]:n==="-"?"":n});let o;t.className&&(o=t.className,delete t.className),o=[...e.classList].find(i=>i.startsWith("JQxClass-")||o&&i===o)||o||`JQxClass-${mt().slice(1)}`,r.editCssRule(`.${o}`,t),e.classList.add(o)}var cr=sr();function fr(e){return{factoryExtensions:mr(e),instanceExtensions:dr(e)}}function mr(e){return{data(t){return{get all(){return new Proxy(t[0]?.dataset??{},Qn)},set(n={}){if(!t.is.empty&&m(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},get(n,r){return t.data.all[n]??r},add(n={}){if(!t.is.empty&&m(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},remove(n){return t[0]?.removeAttribute(`data-${R(n)}`),t}}},dimensions(t){if(t.is.empty)return A.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:n}=t,r=n.getBoundingClientRect().toJSON();return r.scrollTopDistance=Te(n,0),r.scrollLeftDistance=Te(n,0,!1),r},node(t){return t[0]},HTML(t){return{get(n,r){if(t.is.empty)return"NO ELEMENTS IN COLLECTION";let o=n?t.outerHtml:t.html();return r?ie(o):o},set(n,r=!1,o=!1){n=n.isJQx?n.HTML.get(1):n;let i=m(n,String);return n=i&&o?ie(n):n,i&&(n||"").trim().length&&t.html(n,r),t},replace(n,r=!1){return t.HTML.set(n,!1,r)},append(n,r=!1){return n=m(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n,!0,r)},insert(n,r=!1){return n=m(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n+t.HTML.get(),!1,r)}}},is(t){return cr(t)},length(t){return t.collection.length},outerHtml(t){return(t.first()||{outerHTML:void 0}).outerHTML},parent(t){let n=e(t[0]?.parentNode);return n.is.empty?t:n},render(t){switch(!0){case!t.is.empty:return t.toDOM();default:return e.logger.warn("[JQx.render]: empty collection"),t}},Style(t){return{get computed(){return t.is.empty?{}:getComputedStyle(t[0])},inline(n){return t.style(n)},inSheet(n){return t.css(n)},valueOf(n){return t.is.empty?void 0:getComputedStyle(t[0])[R(n)]},nwRule(n){return t.Style.byRule({rules:n})},byRule({classes2Apply:n=[],rules:r=[]}={}){let o=m(r,String)&&!n.length?r.split("{")[0].trim():"";if(r=r&&m(r,String)?[r]:r,n=n&&m(n,String)?[n]:n,(r?.length||n?.length)&&(r?.length&&e.editCssRules(...r),n))for(let i of n)t.addClass(i);return o?.startsWith(".")&&t.addClass(o.slice(1)),o?.startsWith("#")&&!t.attr("id")&&t.prop({id:o.slice(1)}),t}}}}}function dr(e){return{addClass(t,...n){return O(t,r=>r&&n.forEach(o=>r.classList.add(o)))},after:Xe,afterMe:Xe,andThen(t,n,r=!1){if(!n||!m(n,String,Node,Proxy))return A.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),t;n=n?.isJQx?n:m(n,Node)?e.virtual(n):e.virtual(J(n));let[o,i,s]=r?[0,"before",n.collection.concat(t.collection)]:[t.collection.length-1,"after",t.collection.concat(n.collection)];return t[o][i](...n.collection),t.collection=s,t},append(t,...n){if(t.is.empty||n.length<1)return t;let r=t.length===1;for(let o of n){if(!o.isJQx&&C(o)){let i=o.trim(),s=/^<(.+)[^>]+>$/m.test(i)?J(o):e.text(o);O(t,u=>u.append(r?s:Q(s)))}W(o)&&O(t,i=>i.append(r?o:Q(o))),o.isJQx&&!o.is.empty&&O(t,i=>o.collection.forEach(s=>i.append(r?s:Q(s))))}return t},appendTo(t,n){switch(!0){case(!n.isJQx&&!m(n,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).append(t),t}},attr(t,n,r){if(!t.node||m(t.node,Text,Comment))return t;if(!r&&C(n))return n=R(n),n==="class"?[...t.node.classList].join(" "):t.node.getAttribute(n);if(C(n)&&r)switch(n=R(n),!0){case n.startsWith("data-"):n={data:{[n.replace("data-","")]:r}};break;default:n={[n]:r}}return m(n,Object)&&!t.is.empty&&Yn(t.node,n),t},before:et,beforeMe:et,clear(t){return O(t,Ge)},closest(t,n){let r=C(n)?t.node?.closest(n):void 0;return r?e(r):t},computedStyle(t,n){let{node:r}=t;return r&&getComputedStyle(r)[n]},css(t,n,r){return O(t,o=>ur(o,n,r,e))},duplicate(t,n=!1,r=document.body){switch(!0){case t.is.empty:return A.error("Duplicating an empty JQx instance is not possible"),t;default:let o=t.collection[0].cloneNode(!0);return o.childNodes.forEach(i=>{i.removeAttribute&&i?.removeAttribute("id")}),n?e(o).toDOM(r):e.virtual(o)}},each(t,n){return O(t,n)},empty(t){return O(t,Ge)},find(t,n){return t.collection.length>0?[...t.first()?.querySelectorAll(n)]:[]},find$(t,n){return t.collection.length>0?e(n,t):t},first(t,n=!1){return t.collection.length>0?n?t.single():t.collection[0]:void 0},first$(t,n){return t.single(n)},getData(t,n,r){return t.node?.dataset?.[n]||r},hasClass(t,...n){return t.is.empty||!t.node.classList.length?!1:n.find(r=>t.node.classList.contains(r))&&!0||!1},hide(t){return O(t,n=>be(n,{display:"none !important"}))},html(t,n,r){switch(!0){case(t.is.empty&&!C(n)):return"";case!C(n):return t.node?.getHTML()??"";default:let o=J(`<div>${n.isJQx?n.HTML.get(!0):n}</div>`);return O(t,i=>(i.textContent=r?i.textContent:"",i.insertAdjacentHTML(e.at.end,o.getHTML())))}},htmlFor(t,n,r="",o=!1){if(t.is.empty||!C(n)||!C(r))return t;let i=t.find$(n);if(i.length<1)return t;let s=J(`<span>${r}</span>`);return i.each(u=>{o||(u.textContent=""),u.insertAdjacentHTML(e.at.end,s?.getHTML())}),t},isEmpty(t){return!t.node},nth$(t,n){return t.single(n)},on(t,n,...r){switch(!0){case(t.is.empty||!m(n,String,Array)||!C(n)||r.length<1):return t;default:return e.handle({type:n,node:t.node,handler:r}),t}},once(t,n,...r){switch(!0){case(t.is.empty||!m(n,String,Array)||!C(n)||r.length<1):return t;default:return e.handle({type:n,once:!0,node:t.node,handler:r}),t}},prepend(t,...n){if(t.is.empty||!n)return;let r=t.length===1;for(let o of n){if(C(o)){o=o.trim();let i=/^<(.+)[^>]+>$/m.test(o)?J(o):e.text(o);i=r?i:Q(i),O(t,s=>s.prepend(i.cloneNode(!0)))}W(o)&&O(t,i=>i.prepend(r?o:Q(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),O(t,i=>O(o,s=>i.prepend(r?s:Q(s)))),o.collection.reverse())}return t},prependTo(t,n){return n.isJQx||(n=e.virtual(n)),n.prepend(t),t},prop(t,n,r){if(m(n,String)&&!r)return n.startsWith("data")?t[0]?.dataset[n.slice(n.indexOf("-")+1)]:t[0]?.[n];let o=m(n,Object)?n:{[n]:r};for(let[i,s]of Object.entries(o)){if(i=i.trim(),s&&!st(i)||!s)return!1;if(i.toLowerCase()==="id")return t[0].id=s;O(t,u=>{if(i.startsWith("data"))return u.dataset[i.slice(i.indexOf("-")+1)]=s;u[i]=s})}return t},remove(t,n){let r=i=>i.remove(),o=()=>t.collection=t.collection.filter(i=>document.documentElement.contains(i));if(n){let i=t.find$(n);return i.is.empty||(O(i,r),o()),t}return O(t,r),o(),t},rmAttr(t,...n){for(let r of n)t.node.removeAttribute(r);return t},removeClass(t,...n){return O(t,r=>{if(r)for(let o of n)r.classList.remove(o)})},renderTo(t,n,r){return n=m(n,HTMLElement)||n.isJQx?n:document.body,r=m(r,String)&&e.at[r]?r:e.at.end,t.first$().toDOM(n,r),t},replace(t,n,r){let o=t.node;return!n||!m(r,HTMLElement)&&!r?.isJQx?(e.logger.error("JQx replace: invalid replacement value"),t):((r.isJQx||m(r,NodeList))&&(r=r[0]),o&&n&&(n=m(n,String)?o.querySelectorAll(n):n.isJQx?n.collection:n,m(n,HTMLElement,NodeList,Array)&&m(r,HTMLElement)&&(m(n,HTMLElement)?[n]:[...n]).forEach(i=>i.replaceWith(r.cloneNode(!0)))),t)},replaceClass(t,n,...r){return O(t,o=>{o.classList.remove(n);for(let i of r)o.classList.add(i)})},replaceMe(t,n){return t.replaceWith(n)},replaceWith(t,n){return n=m(n,Element)?n:n.isJQx?n[0]:void 0,n&&(t[0].replaceWith(n),t=e.virtual(n)),t},setData(t,n){return O(t,r=>ct(r,n))},show(t){return O(t,n=>be(n,{display:"revert-layer !important"}))},single(t,n){let r=t.collection.length>0;switch(n=n??0,!0){case(r&&m(n,String)):return t.find$(n);case(r&&m(n,Number)):return e(t.collection[n]);case r:return t.collection[0];default:return t}},style(t,n,r){return O(t,o=>{r&&m(n,String)&&(n={[n]:r||"none"}),be(o,n)})},text(t,n,r=!1){switch(!0){case t.isEmpty():return t;case!m(n,String):return t.node.textContent;default:return O(t,o=>o.textContent=r?o.textContent+n:n)}},toDOM(t,n=document.body,r=F.BeforeEnd){return t.isVirtual=!1,we(t.collection,n,r),t},toggleClass(t,n){return O(t,r=>r.classList.toggle(n))},toNodeList(t){return[...t.collection].map(n=>document.importNode(n,!0))},trigger(t,n,r,o){if(r=/Event]$/.test(m(r))?r:Event,o=m(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0},!t.is.empty){let i=new r(n,o);t.each(s=>s.dispatchEvent(i))}return t},val(t,n){switch(!0){case(t.is.empty||!m(t.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return t;case!m(n,String):return t.node.value;default:return t.node.value=m(n,String)?n:"",t}}}}var Oe,ae,{isComment:Ro,isText:Jo,isHtmlString:Qo,isArrayOfHtmlElements:Wo,isArrayOfHtmlStrings:Uo,ElemArray2HtmlString:qo,cssRuleEdit:De,addFn:gr}=pr();function pr(){return{...lr(),addFn:yr}}function yr(e,t){return e=e?.trim(),!C(e)||!m(t,Function)?A.error("JQx.fn: method invalid parameter(s)"):ae[e]=(n,...r)=>t(n,...r)}function hr(e){return function(t,n,r){if(t=t?.trim(),!C(t)||!m(n,Function))return e.error("JQx.staticFn: invalid parameter(s)");let o=r?{get(){return n()}}:{value(...i){return n(...i)}};try{Object.defineProperty(e,t,o)}catch{return e.warn(`JQx.staticFn: extension [${t}] already exists`)}return A.log(`JQx: added static extension function [${t}]`)}}function re(e){return new Proxy(e,Object.freeze({get:(t,n)=>br(t,n,e)}))}function tt(e,t){return(...n)=>m(e,Function)&&e(re(t),...n)}function br(e,t,n){switch(!0){case m(t,Symbol):return e;case m(+t,Number):return e.collection?.[t]||void 0;case t in Oe:return tt(Oe[t],n)();case t in ae:return tt(ae[t],n);default:return e[t]}}function Sr(e){let t=Tr(e);for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(t)))Object.defineProperty(e,n,r);return e}function xr(e){return{allow(t){let n=/-/.test(t),r=n&&t;t=n?Le(t):t.toLowerCase(),K.allowTag(t),Object.defineProperties(e,je(t,!0,e,r))},prohibit(t){t=t.toLowerCase(),K.prohibitTag(t),Object.defineProperties(e,je(t,!1,e))}}}function nt(...e){if(e.length===1){let t=String(e.shift().trim());e=t.startsWith("!")?[t.slice(1,-1)]:t.split(",").map(n=>n.trim())}for(let t of e.map(n=>n.startsWith("!")?n.slice(1,-1):n))De(t,{removeRule:1})}function vr(e){return function(t,n,r){n=n?.isJQx?n?.[0]:n,r=r&&Object.values(F).find(i=>r===i);let o=e(t,document.createElement("br"));if(n&&!m(n,HTMLBRElement))for(let i of o.collection)r?n.insertAdjacentElement(r,i):n.append(i);return o}}function wr(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);for(let[o,i]of Object.entries(r))!(o in t)&&Object.defineProperty(t,o,{...i,enumerable:!1})}return t}function $r(e,t,n,r){return e=R(r||e.toLowerCase()),{get(){return(...o)=>{let i=t&&n.virtual(Ce(cn[e](...o)))||void 0,s=m(i?.node,Comment,Text,void 0)?"":qn(i);return A.log(t?`JQx: created (virtual) instance from [JQx].${e} ${s}`:`JQx: ${e.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),i}},enumerable:!1,configurable:!0}}function je(e,t,n,r){e=e.toLowerCase();let o=$r(e,t,n,r);return r?{[r]:o,[Le(r)]:o}:{[e]:o,[e.toUpperCase()]:o}}function Tr(e){return wr(Object.entries(K.tagsRaw).reduce(Or(e),{}),Ar(e))}function Or(e){return function(t,[n,r]){return Object.defineProperties(t,je(n,r,e)),t}}function Dr(e){return function(t,n,...r){m(n,Function)&&(r.push(n),n=void 0),e({type:t,selector:n,handlers:r})}}function jr(e){return function(t){let{type:n,types:r,origin:o,selector:i,handler:s,handlers:u,node:p,name:y,capture:d,once:S,about:h}=t;s=u||s,n=r||n,i=o||i;let v=er(n),b=y;s=m(s,Function)?[s]:s;let g={type:v,selector:i||o,capture:d,name:b,once:S,node:p,about:h};switch(!0){case(m(v,Array)&&v.length>0):for(let x of v)g.type=x,rt(s,g,e);break;default:return rt(s,g,e)}}}function rt(e,t,n){for(let r of e)n.listen({...t,handler:r})}function Nr(e){return function(t,n){return n=C(n)&&n,t=C(t)&&t,n&&t&&e.listenerStore[t][n]}}function Cr(e){return e.activePopup||Object.defineProperty(e,"activePopup",{value:zn(e),enumerable:!1}),e.activePopup}function Lr(e){let t=(u,p)=>De(u,p),n=function(u){return at({createWithId:u||`jqx${mt()}`})},r=function(...u){for(let p of u)De(p)},o=xr(e),i=Hn(e),s=jr(i);return{editCssRule:t,createStyle:n,editCssRules:r,allowProhibit:o,handle:s,capturedHandling:s,log:(...u)=>A.on.log(...u).off,warn:(...u)=>A.on.warn(...u).off,error:(...u)=>A.on.error(...u).off,handlerWrapper:i}}function Ar(e){let{factoryExtensions:t,instanceExtensions:n}=fr(e);Oe=t,ae=n;let{editCssRule:r,createStyle:o,editCssRules:i,allowProhibit:s,handle:u,capturedHandling:p,log:y,warn:d,error:S,handlerWrapper:h}=Lr(e),v=Nr(e),b=hr(e);return{log:y,warn:d,error:S,editCssRules:i,createStyle:o,editStylesheet:o,editCssRule:r,escHtml:ie,logger:A,text(g,x=!1){return x?e.comment(g):document.createTextNode(g)},node(g,x=document){return x.querySelector(g,x)},nodes(g,x=document){return[...x.querySelectorAll(g,x)]},clearAllTimers:Wn,get staticFn(){return function(g,x,T){return b(g,x,T)}},get toBool(){return nr},get getNamedListener(){return v},get virtual(){return vr(e)},get allowTag(){return s.allow},get prohibitTag(){return s.prohibit},get removeCssRule(){return nt},get removeCssRules(){return nt},get delegate(){return Dr(p)},get delegateCaptured(){return p},get handle(){return p},get listen(){return h.listen},get at(){return F},get setStyle(){return r},get fn(){return gr},get lenient(){return K.allowUnknownHtmlTags},get IS(){return m},get Popup(){return Cr(e)},get listenerStore(){return h.ListenerStore}}}var Er=Sr(Mr());function Mr(){return function(e,t,n=F.BeforeEnd){if(e?.isJQx)return e;let r=m(t,HTMLBRElement);t=(!r&&t&&t.isJQx?t[0]:t)||document.body,n=n&&Object.values(F).find(p=>n===p)?n:void 0;let o=Ee(e),i=!o&&gt(e)||o,s={collection:ft(e)??[],isVirtual:r,isJQx:!0},u=Me(s.collection);if(s.collection.length&&u)return r||s.collection.forEach(p=>{t.contains(p)||we([p],t,n)}),re(s);if(i){if([e].flat().forEach(p=>s.collection.push(J(p))),s.collection.length>0){let p=s.collection.filter(S=>S?.dataset?.jqxcreationerror);s.collection=s.collection.filter(S=>!S?.dataset?.jqxcreationerror);let y=s.collection.map(S=>`${String(S.constructor).split(/function|\(/)[1].trim()}`).length>1;s=re(s);let d=s.collection.length>0?ar(s):"sanitized: no elements remaining";A.log(`JQx: created ${s.isVirtual?"(virtual)":""} instance from ${y?"array of ":""}HTML string${y?"s":""} ${d}`),s.isVirtual||we(s.collection,t,n)}return s}return pt(e,t,s),re(s)}}var H=Er;var[U,q,Ze,Pe]=["2-digit","numeric","long","short"],le={fixed:{MM:{month:Ze},M:{month:Pe},m:{month:q},mm:{month:U},yyyy:{year:q},yy:{year:U},WD:{weekday:Ze},wd:{weekday:Pe},d:{day:q},dd:{day:U},h:{hour:q},hh:{hour:U},mi:{minute:q},mmi:{minute:U},s:{second:q},ss:{second:U},ms:{fractionalSecondDigits:3},tz:{timeZoneName:"shortOffset"},dl:{locale:"default"},h12:{hour12:!1},yn:{yearName:""},ry:{relatedYear:!0},msp:{fractionalSecond:!0}},dynamic:{tzn:e=>({timeZoneName:e.slice(4)}),hrc:e=>({hourCycle:`h${e.slice(4)}`}),ds:e=>({dateStyle:e.slice(3)}),ts:e=>({timeStyle:e.slice(3)}),tz:e=>({timeZone:e.slice(3)}),e:e=>({era:e.slice(2)}),l:e=>({locale:e.slice(2)})}},V={...le,retrieveDynamic(e){let t=e?.slice(0,e?.indexOf(":"));return le.dynamic[t]&&le.dynamic[t](e)},get re(){return new RegExp(`\\b(${Object.keys(le.fixed).join("|")})\\b`,"g")}},me=Ir;function Ir(e,t,n="l:default"){return/ds:|ts:/.test(n)?kr(e,yt(void 0),n):Pr(e,yt(t||void 0),n)}function yt(e="dtf"){let t=` ${e.replace(/[{}]/g,"").trim()} `,n=e.match(/(?<=\{)(.+?)(?=})/g)||[];return{set formatStr(r){t=r},get formatStr(){return t},get units(){return t.match(V.re)||[]},finalize(r="",o="",i="",s=""){return t.replace(/~([\d+]?)/g,"$1").replace(/dtf/,r).replace(/era/,i).replace(/dp\b|~dp\b/,o).replace(/yn\b/,s).replace(/\[(\d+?)]/g,(u,p)=>n[p].trim()).trim()}}}function At(...e){return e?.reduce((t,n)=>({...t,...V.retrieveDynamic(n)||V.fixed[n]}),V.fixed.dl)}function kr(e,t,n){let r=At(...Et(n).split(",")),o=Intl.DateTimeFormat(r.locale,r).format(e);return t.finalize(o)}function Zr(e,t){return e==="numeric"&&t.startsWith("0")?t.slice(1):t}function Pr(e,t,n){let r=At(...t.units.concat(Et(n).split(",")).flat()),o={...V.fixed},i=Intl.DateTimeFormat(r.locale,r).formatToParts(e).reduce((s,u)=>u.type==="literal"&&/[ ,/-]/.test(u.value)?s:{...s,[u.type]:Zr(r[u.type],u.value)},{});return o.ms=r.fractionalSecondDigits?o.msp:o.ms,o.yyyy=i.relatedYear?o.ry:o.yyyy,t.formatStr=t.formatStr.replace(V.re,s=>/^(M|MM)$/.test(s)?Fr(e,r.locale,r.timeZone,/^M$/.test(s)):i[Object.keys(o[s]).shift()]||s),t.finalize(void 0,i.dayPeriod,i.era,i.yearName)}function Fr(e,t,n,r){return e.toLocaleString(t,{timeZone:n,month:r?Pe:Ze})}function Et(e){return e.replace(/\s+/g,"")}var zr=Hr;function Hr(){let e=(r,o)=>{let i=isNaN(new Date(r)),s=isNaN(new Date(o));if(s){let[u,p,y]=Array(3).fill("end date not valid");return{error:!0,message:u,full:p,clean:y}}if(i){let[u,p,y]=Array(3).fill("start date not valid");return{error:!0,message:u,full:p,clean:y}}if(i&&!s){let[u,p,y]=Array(3).fill("start- and/or end date are not valid");return{error:!0,message:u,full:p,clean:y}}return{error:!1}},t=n();return function({start:r,end:o,diffs:i={}}={}){let s=e(r,o),u=o>r?"+":"-";if(s.error)return s;let p=Math.abs(r-o),y=new Date(p),d=y.getUTCFullYear()-1970,S=y.getUTCMonth(),h=y.getUTCDate()-1,v=h%7,b=Math.floor(h/7),g=y.getUTCHours(),x=y.getUTCMinutes(),T=y.getUTCSeconds(),L=y.getUTCMilliseconds(),a=Math.floor(p/864e5);i={...i,fromUTC:r,toUTC:o,sign:"",years:d,months:S,days:h,hours:g,minutes:x,seconds:T,milliseconds:L,diffInDays:a},i.full=t({values:i,full:!0}),i.clean=t({values:i}),i.equalDates=i.clean==="Dates are equal";let l=g+x+T>0?"T":"";return i.clean!=="Dates are equal"&&(i.sign=u,i.jsPeriod=`${u}P${d>0?`${d}Y`:""}${S>0?`${S}M`:""}${b>0?`${b}W`:""}${v>0?`${v}D`:""}${l}${g>0?`${g}H`:""}${x>0?`${x}M`:""}${T>0?`${T}S`:""}`,i.ISOPeriod=`P${d>0?`${d}Y`:""}${S>0?`${S}M`:""}${h>0?`${h}D`:""}${l}${g>0?`${g}H`:""}${x>0?`${x}M`:""}${T>0?`${T}S`:""}`),i};function n(){let r=(...i)=>s=>i.reduce((u,p)=>p(u),s),o=(i,s)=>i===1?s.slice(0,-1):s;return r(({values:i,full:s})=>[Object.entries(i).filter(([u])=>/^(years|month|days|hours|minutes|seconds)/i.test(u)),s],([i,s])=>s?i:i.filter(([,u])=>s?+u:u>0),i=>i.reduce((s,[u,p])=>[...s,`${p} ${o(p,u)}`],[]),i=>i.length<1?"Dates are equal":`${i.slice(0,-1).join(", ")}${i.length>1?" and ":""}${i.slice(-1).shift()}`)}}var Rr=Jr;function Jr(){let e=Object.entries({year:"FullYear",month:"Month",date:"Date",day:"Date",hour:"Hours",minute:"Minutes",second:"Seconds",millisecond:"Milliseconds"}).reduce((r,[o,i])=>({...r,[o]:i,[`${o}s`]:i}),{}),t=!1,n=function(...r){let o=r.length===1;return t=r[0].trim().startsWith("subtract,"),t&&(r=o?r[0].trim().replace(/^subtract,/i,"").split(",").map(i=>i.trim()):r.filter(i=>!i.startsWith("subtract"))),o&&!t&&(r=r[0].split(",").map(i=>i.trim())),r.map(function(i){if(!i)return!1;let s=i.toLowerCase().split(/ {1,}/);return s.length<2?!1:s.map(u=>{u=`${u}`.trim().replace(/[^a-z0-9-+]/g,"");let p=parseInt(u,10);return Number.isNaN(p)?u:t?-p:+p})}).filter(i=>i)};return function(r,...o){if(o.length<1)return r;let i=n(...o);return i.length&&i.forEach(([s,u])=>{u=u,u=e[u],s&&u&&r[`set${u}`](r[`get${u}`]()+s)}),r}}var Mt=zr(),It=Xr(),z=Rr(),Qr=["sun","mon","tue","wed","thu","fri","sat"],Wr=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ht(e,...t){return z(e,...t),e}function Ie(e,{start:t,end:n,future:r,past:o,include:i={start:!1,end:!1}}={}){let s=e.clone.UTC;return t=t?.value||t?.constructor===Date?D(t?.value||t).UTC:D.now.UTC,n=n&&n?.value||n?.constructor===Date?D(n?.value||n).UTC:D.now.UTC,s.milliseconds=0,t.milliseconds=0,n.milliseconds=0,r?t>n:o?t<n:(i.start?+s>=+t:+s>+t)&&(i.end?+s<=+n:+s<+n)}function bt(e,{zoneTime:t=!1,formatStr:n,moreOptions:r}={}){return r=t?e.localeInfo.formatOptions+(r?`,${r}`:""):j.formatOptions+(r?`,${r}`:""),t?(e.localeInfo||(e.localeInfo=j),me(e,n,r)):Ur(e,n,r)}function Ur(e,t,n){let r=e.clone.relocate(j);return n=(n||"").startsWith("+")?`${r.localeInfo.formatOptions},${n.slice(1)}`:n||r.localeInfo.formatOptions,me(r,t,n)}function qr(e,t){let n=Mt({start:e,end:t||e});return parseInt(`${n.sign}${n.diffInDays}`)}function St(e,t=!1){let{locale:n,timeZone:r}=t?e.localeInfo:j,o=Ut(n,r),i=e.format("MM|WD",o).split("|");return{locale:n,timeZone:r,monthName:i[0],dayName:i[1],dayNames:Wt(n),monthNames:Qe(n)}}function xt(e,t=!1){let[n,r,o,i]=Fe(e,t),s={values4Timezone:t?j.timeZone:e.timeZone,hours:n,minutes:r,seconds:o,milliseconds:i};return Object.freeze(s)}function Fe(e,t=!1){let n=`l:en-CA,${t?`tz:${j.timeZone}`:`tz:${e.timeZone}`},hrc:23,ts:medium`;return e.format("",n).split(/:/).map(Number).concat(e.getMilliseconds())}function vt(e,t){let n=t?`tz:${j.timeZone}`:`,tz:${e.timeZone}`,[r,o,i]=e.format("yyyy-mm-dd",n).split(/-/).map(Number);o-=1;let s=t?j.timeZone:e.timeZone;return Object.freeze({values4Timezone:s,year:r,month:o,date:i})}function wt(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate()];let n=e.format("yyyy-m-d",e.localeInfo.formatOptions).split(/-/).map(Number);return n[1]-=1,n}function Br(e,{sunday:t=!1}={}){return ze(e,{day:t?"sunday":"monday",preserveTodayWhenEqual:!0})}function Vr(e,t){let n=e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000",r=t.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000";return n=He(n.slice(0,3)+":"+n.slice(-2),!0),r=He(r.slice(0,3)+":"+r.slice(-2),!0),[-n[0]+r[0],-n[1]+r[1]].map(o=>n[0]<0?-o:o)}function kt({start:e,end:t}={}){t||(t=e.clone),t?.clone||(t=D(t,{timeZone:e.timeZone})),e=D(Dt(e,e.timeZone),{timeZone:e.timeZone}),t=D(Dt(t,t.timeZone),{timeZone:t.timeZone});let n=Mt({start:e,end:t,diffs:{timeZoneStart:e.timeZone,timeZoneEnd:t.timeZone}}),r=Vr(t,e),o=n.sign.startsWith("-")?"ahead of":"behind",[i,s]=r.map(y=>Math.abs(y)),[u,p]=[`${i} ${de(i,"hour")}`,`${s} ${de(s,"minute")}`];return n.timeZonesOffsetDifference=n.sign.length<1||i+s===0?`Offsets of ${e.timeZone} and ${t.timeZone} are equal`:`${e.timeZone} is ${u}${s>0?` and ${p}`:""} ${o} ${t.timeZone}`,n}function $t(e,t){t=String(t).toLowerCase()==="utc"||t.timeZone==="UTC"?e.clone.relocate({timeZone:"UTC"}):D(e.value,{timeZone:t.timeZone||j.timeZone});let n=kt({start:e.clone,end:t}),r=`${n.sign}${Tt(n.hours)}:${Tt(n.minutes)}`;return{fromTZ:e.timeZone,toTZ:t.timeZone,offset:r,offsetText:`${t.timeZone} ${Yr(r)} ${e.timeZone}`}}function Tt(e,t=2){return`${e}`.padStart(t,"0")}function de(e,t){return`${t}${e>1||e===0?"s":""}`}function Yr(e){if(/00:00/.test(e))return"no time diffence to";let t=e.slice(1).split(":").map(Number),[n,r]=t,o=de(n,"hour"),i=de(r,"minute"),s=e.startsWith("+");return r>0?`${n} ${o} and ${r} ${i} ${s?"ahead of":"behind"}`:`${n} ${o} ${s?"ahead of":"behind"}`}function Ot(e,t,n){return e.clone.format(t,n||e.localeInfo.formatOptions)}function _r(e,{withFormat:t,withFormatOptions:n,local:r=!1}={}){if(t)return r?Ot(e,t,$D.localeInformation.formatOptions):Ot(e,t,n);let o=e.clone.relocate({locale:"en"}),i=r?j.formatOptions:o.localeInfo.formatOptions,s=`wd M dd yyyy hh:mmi:ss ${o.format("tz",i+",tzn:longOffset").replace(":","")} (tz)`;return o.format(s,i+",tzn:long, hrc:23")}function Zt(e,t=!1){let n=Intl.DateTimeFormat("en",{timeZone:t?e.timeZone:j.timeZone,weekday:"short"});return It(n.format(e))}function Gr(e){let t=j,n=e.localeInfo,r=e.clone.relocate({locale:t.locale,timeZone:t.timeZone}),o=e.offsetFrom(r),i=r.offsetFrom(e),s=t,u=n,p=e.format("hh:mmi:ss dp",`hrc:12,tz:${e.timeZone}`),y=r.format("hh:mmi:ss dp",`hrc:12,tz:${r.timeZone}`),d={note:"'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance",locales:{user:{locale:s.locale,timeZone:s.timeZone}},dateTime:{user:{...e.dateTime,monthName:r.monthName,weekdayNr:r.day,weekdayName:r.dayName,dayPeriodTime:y,hasDST:r.hasDST,DSTActive:r.DSTActive,offsetFromRemote:o.offset,string:r.toString()}},offset:{fromUTC:e.UTC.offsetFrom(e).offsetText}};return n.timeZone!==t.timeZone&&(d.locales.remote={locale:u.locale,timeZone:u.timeZone},d.dateTime.remote={...e.zoneDateTime,monthName:e.zoneNames.monthName,weekdayNr:Zt(e,!0),weekdayName:e.zoneNames.dayName,dayPeriodTime:p,hasDST:e.hasDST,DSTActive:e.DSTActive,offsetFromUser:i.offset,string:e.toString()},d.offset.fromUserTime=i.offsetText),d}function se(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];let n=e.format("yyyy-m-d-hh-mmi-ss",`${e.localeInfo.formatOptions},hrc23:true`).split(/-/).map(Number).concat(e.getMilliseconds());return n[1]-=1,n}function Pt(e){return new Date(e.year,e.month+1,0,0,0,0).getDate()}function Ft(e,t){t=E({locale:t}).locale;let n=e.clone.relocate({locale:t});return n.date={date:1},[n].concat([...Array(Pt(n)-1)].map((r,o)=>n.clone.add(`${o+1} days`)))}function ze(e,{day:t,next:n=!1,preserveTodayWhenEqual:r=!1}={}){t=t?.toLowerCase()||"-";let o=It(t);if(o<0)return console.error(`[TickTock instance].next/previous invalid day value ${t}`),e.clone;let i=n?1:-1,s=D(new Date(...e.dateTimeValues),e.localeInfo);return r&&o===s.day?s:Kr(s.addDays(n?1:-1),o,i)}function Kr(e,t,n){function r(o){switch(!0){case o.day===t:return o;default:return r(o.add(`${n} days`))}}return r(e)}function ue(e,{dateOnly:t=!1,timeOnly:n=!1}={}){let{locale:r,timeZone:o}=e.localeInfo;return t?new Date(e).toLocaleDateString(r,{timeZone:o}):n?new Date(e).toLocaleTimeString(r,{timeZone:o}):new Date(e).toLocaleString(r,{timeZone:o})}function Dt(e,t){let n={timeZone:t,hourCycle:"h23"};return new Date(new Date(e).toLocaleString("en",n))}function X(e,{year:t,month:n,date:r}={}){return M(t)&&e.setFullYear(parseInt(t)),M(r)&&e.setDate(parseInt(r)),M(n)&&e.setMonth(parseInt(n)),e}function B(e,{hours:t,minutes:n,seconds:r,milliseconds:o}={}){return M(t)&&e.setHours(parseInt(t)),M(n)&&e.setMinutes(parseInt(n)),M(r)&&e.setSeconds(parseInt(r)),M(o)&&e.setMilliseconds(parseInt(o)),e}function zt(e){return e?.constructor===Date||e?.value}function jt(e,t){return zt(t)?D(t?.value||t,e.localeInfo):D.from(...e.dateTimeValues).relocate(e.localeInfo)}function Xr(){return function(e){e=`${e}`.toLowerCase();let t=Qr.indexOf(e);return t<0?Wr.indexOf(e):t}}function He(e){let t=e.slice(1).split(/[-:]/).map(Number),n=e.startsWith("-");return t=t.map(r=>n?-r:r),t}function eo(e){return e.time={hours:0,minutes:0,seconds:0,milliseconds:0},e}function Nt(e,t){return Intl.DateTimeFormat("en-CA",{timeZone:t,timeZoneName:"long"}).format(e).split(/,/)[1].trim()}function Ht(e,t){t=t||e?.timeZone||j.timeZone,e=e?.value?e:e?.constructor===Date?D(e,{timeZone:t}):D({timeZone:t});let n=e.year||e.getFullYear(),r=Nt(new Date(n,0,1),t),o=Nt(new Date(n,5,1),t);return r!==o}function Rt(e,t){return t=t||e?.timeZone||j.timeZone,e=e?.hasDST?e:e?.constructor===Date?D(e,{timeZone:t}):D({timeZone:t}),e.hasDST?!/standard/i.test(e.toString()):!1}function to(e,{locale:t,timeZone:n,l:r,tz:o}={}){return e.localeInfo=E({locale:r||t||e.l||e.locale,timeZone:o||n||e.tz||e.timeZone}),e}function no(e,t){return zt(t)&&(e=D(t.value||t,t.localeInfo||e.localeInfo)),e}function Je(e,t){let n=Jt(new Date(e,11,t||31));return n===1?Je(e,(t||31)-1):n}function Ct(e,t){let n=e.month;switch(!0){case n<3:return t?1:"First";case n<6:return t?2:"Second";case n<9:return t?3:"Third";case n<12:return t?4:"Fourth";default:return"unknown"}}function Jt(e){let t=new Date(e),n=(t.getDay()+6)%7;t.setDate(t.getDate()-n+3);let r=t.valueOf();return t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7),1+Math.ceil((r-t)/6048e5)}var Qt=ro;function ro({localeInfo:e,customMethods:t,dateValue:n}={}){let r,o={add(...i){return ht(r,...i)},between({start:i,end:s,include:u}={}){return Ie(r,{start:i,end:s,include:u})},cloneWith(i){return jt(r,i)},daysUntil(i){return qr(r,i)},differenceTo(i){return kt({start:r,end:i})},differenceUntil(i){return r.differenceTo(i).clean},firstWeekday({sunday:i=!1,midnight:s=!1}={}){return Br(r,{sunday:i,midnight:s})},format(i,s){return bt(r,{formatStr:i,moreOptions:s})},fullMonth(i){return Ft(r,i)},isFuture(i){return Ie(r,{start:r,end:i,future:!0})},isPast(i){return Ie(r,{start:r,end:i,past:!0})},next(i,s){return ze(r,{day:i,next:!0,preserveTodayWhenEqual:!!s})},offsetFrom(i){return $t(r,i)},previous(i,s){return ze(r,{day:i,next:!1,preserveTodayWhenEqual:!!s})},relocate({locale:i,timeZone:s,l:u,tz:p}={}){return to(r,{locale:i,timeZone:s,l:u,tz:p})},revalue(i){return r=no(r,i),r},setDateValues({year:i,month:s,date:u}={}){return X(r,{year:i,month:s,date:u})},setTimeValues({hours:i,minutes:s,seconds:u,milliseconds:p}={}){return B(r,{hours:i,minutes:s,seconds:u,milliseconds:p})},subtract(...i){return ht(r,"subtract,"+i.join(","))},toArray(i=!1){return se(r,i)},toString({template:i,formatOptions:s,local:u}={}){return _r(r,{withFormat:i,withFormatOptions:s,local:u})},values(i=!1){return i?r.dateTime:r.zoneDateTime},zoneFormat(i,s){return bt(r,{zoneTime:!0,formatStr:i,moreOptions:s})},set date({year:i,month:s,date:u}){X(r,{year:i,month:s,date:u})},set dateNr(i){X(r,{date:i})},set hours(i){B(r,{hours:i})},set localeInfo({locale:i,timeZone:s,l:u,tz:p}){e=ce({locale:i,timeZone:s,l:u,tz:p})},set milliseconds(i){B(r,{milliseconds:`${i}`})},set minutes(i){B(r,{minutes:i})},set month(i){X(r,{month:i})},set seconds(i){B(r,{seconds:i})},set time({hours:i,minutes:s,seconds:u,milliseconds:p}){B(r,{hours:i,minutes:s,seconds:u,milliseconds:p})},set year(i){X(r,{year:i})},get age(){return r.differenceTo(new Date).years},get ageFull(){return r.differenceTo(new Date).clean},get clone(){return jt(r)},get date(){return vt(r,!0)},get dateNr(){return r.date.date},get dateTime(){return{...r.date,...r.time}},get dateTimeValues(){return se(r,!0)},get dateValues(){return wt(r,!0)},get day(){return r.getDay()},get dayName(){return r.names.dayName},get daysThisMonth(){return Pt(r)},get DSTActive(){return Rt(r)},get hasDST(){return Ht(r)},get hours(){return r.time.hours},get info(){return Gr(r)},get isLeapYear(){return new Date(r.getFullYear(),2,0).getDate()===29},get ISO(){return r.toISOString()},get local(){return ue(r)},get localDate(){return ue(r,{dateOnly:!0})},get locale(){return(e||ce()).locale},get localeInfo(){return e},get localeString(){return ue(r)},get localTime(){return ue(r,{timeOnly:!0})},get milliseconds(){return r.getMilliseconds()},get minutes(){return r.time.minutes},get month(){return r.date.month},get monthName(){return r.names.monthName},get names(){return St(r)},get quarter(){return Ct(r)},get quarterNr(){return Ct(r,!0)},get removeTime(){return eo(r)},get seconds(){return r.time.seconds},get time(){return xt(r,!0)},get timeValues(){return Fe(r,!0)},get timeZone(){return(e||ce()).timeZone},get unixEpochTimestamp(){return Math.floor(+r/1e3)},get userLocaleInfo(){return j},get UTC(){return r.clone.relocate({locale:r.locale,timeZone:"UTC"})},get UTCOffset(){return $t(r,"UTC")},get value(){return new Date(r)},get weeknr(){return Jt(r)},get weeksInYear(){return Je(r.year,31)},get year(){return r.date.year},get zoneDate(){return vt(r,!1)},get zoneDateNr(){return r.zoneDate.date},get zoneDateTime(){return{...r.zoneDate,...r.zoneTime}},get zoneDateTimeValues(){return se(r,!1)},get zoneDateValues(){return wt(r,!1)},get zoneDay(){return Zt(r,!0)},get zoneDayname(){return r.zoneNames.dayName},get zoneHours(){return r.zoneTime.hours},get zoneMinutes(){return r.zoneTime.minutes},get zoneMonth(){return r.zoneDate.month},get zoneMonthname(){return r.zoneNames.monthName},get zoneNames(){return St(r,!0)},get zoneSeconds(){return r.zoneTime.seconds},get zoneTime(){return xt(r)},get zoneTimeValues(){return Fe(r)},get zoneYear(){return r.zoneDate.year},get zoneValues(){return r.zoneDateTime},get zoneArray(){return se(r,!1)}};return!e&&!n?o:(o.localeInfo=e||ce(),r=new Proxy(n,oo(o)),Object.entries(Object.getOwnPropertyDescriptors(qt(r,t))).forEach(([i,s])=>Object.defineProperty(o,i,s)),Object.freeze(r))}function oo(e){return{get(t,n){return n!=="toString"&&n in t?t[n].bind(t):Reflect.get(e,n)},set(t,n,r){return n in e&&Reflect.set(e,n,r)}}}var j=Re(Intl.DateTimeFormat().resolvedOptions()),io=Object.getOwnPropertyNames(Date.prototype).filter(e=>e.startsWith("set")).reduce((e,t)=>[...e,{native:t,syn:"change"+t.slice(3)}],[]),ke="\u{1F6AB}";function Wt(e="en-GB"){return e=E({locale:e}).locale,{long:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"long"})),short:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"short"}))}}function Qe(e="en"){return e=E({locale:e}).locale,{long:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"long"})),short:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"short"}))}}function ao({year:e,locale:t}={}){e=M(e)?parseInt(e):new Date().getFullYear();let n={year:e,calendar:{}},r=Qe().long.map(o=>o.toLowerCase());for(let o=0;o<12;o+=1){let i=D.from(e,o,1);n.calendar[r[o]]=Ft(i,t)}return n}function lo({year:e,monthNr:t,locale:n="en-CA"}={}){e=M(t)&&parseInt(e)||-1,t=M(t)&&parseInt(t)||new Date().getFullYear();let r=t>=1&&t<=12;return n=E({locale:n}).locale,t=r?t-1:void 0,r?D.from(e,t,1).relocate({locale:n}).fullMonth(n):"MonthNr should be a specific number (1 = january - 12 = december)"}function Re(e){let t=Ut(e.locale,e.timeZone);return Object.defineProperty(e,"formatOptions",{value:t,enumerable:!1})}function Ut(e,t){return[`${e&&!(Array.isArray(e)&&e.length<1)?`l:${e}`:""}`,`${t?`tz:${t}`:""}`].filter(n=>n).join(",")}function E({locale:e,timeZone:t,l:n,tz:r}={}){return t=t||r,e=e||n,!e&&!t?j:uo({trial:function(){let o=Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions();return e&&o.locale!==e&&console.error(`${ke} Intl changed locale (using best fit) "${e}" to "${o.locale}"`),Re(o)},onError:function(o){switch(!0){case/incorrect locale/i.test(o.message):return console.error(`${ke} Intl locale "${e}" best fit impossible, using "${j.locale}"`),E({locale:j.locale,timeZone:t});case/invalid time zone/i.test(o.message):return console.error(`${ke} timeZone "${t}" not valid. Using "${j.timeZone}"`),E({locale:e,timeZone:j.timeZone});default:return j||Re(Intl.DateTimeFormat().resolvedOptions())}}})}function ce({locale:e,timeZone:t,l:n,tz:r}={}){return E({locale:e,timeZone:t,l:n,tz:r},!0)}function Lt(e){return!Number.isNaN(+e)&&e?.constructor===Date&&!e?.toISOString?.().startsWith("1970-01-01T00:00:00")?e:new Date}function so(e){let t=new Date;switch(!0){case e?.constructor===String:return Lt(new Date(e));case(Array.isArray(e)&&e.map(Number).length===e.length):return e.length===1?new Date(e[0],0,1):new Date(...e);case e?.constructor===Date:return Lt(e);default:return t}}function uo({trial:e,onError:t=()=>{}}={}){if(e?.constructor===Function)try{return e()}catch(n){return t?.constructor===Function?t(n):void 0}}function co({timeZoneDate:e,timeZoneID:t,userTimeZoneID:n}={}){let r={timeZone:E({timeZone:t}).timeZone},o={timeZone:E({timeZone:n||""}).timeZone},i=D(e,r),s=D(e,o),u=s.differenceTo(i),p=i.offsetFrom(s).offset,[y,d]=He(p,!0),S=s.clone.add(`${y} hours, ${d} minutes`),h=u.equalDates?"No difference":`Time offset ${p}: ${o.timeZone} is ${u.clean} ${y<0?"behind":"ahead of"} ${r.timeZone}`;return{remoteTimezone:r.timeZone,userTimezone:o.timeZone,timeDifference:h,result:{[r.timeZone.replace(/\//,"_")]:D(e).toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"}),[o.timeZone.replace(/\//,"_")]:S.toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"})}}}function M(e){return!Number.isNaN(parseInt(e))}function fe(e,t,n){return e?.constructor===Number?z(t,`${e} ${n}`):t}function fo(e){let t={addYears(n=1){return fe(n,e,"years")},addMonths(n=1){return fe(n,e,"months")},addWeeks(n=1){return n=n?.constructor===Number?n*7:1,fe(n,e,"days")},addDays(n=1){return fe(n,e,"days")},get nextYear(){return z(e,"1 year")},get nextWeek(){return z(e,"7 days")},get previousWeek(){return z(e,"-7 days")},get previousYear(){return z(e,"-1 year")},get nextMonth(){return z(e,"1 month")},get previousMonth(){return z(e,"-1 month")},get tomorrow(){return z(e,"1 day")},get yesterday(){return z(e,"-1 day")}};for(let n of io)t[n.syn]=function(...r){return e[n.native](...r),e};return t}function qt(e,t){let n=fo(e);for(let[r,o]of Object.entries(t||{})){let i=o.enumerable,s=o.isGetter?{get(){return o.method(e)},enumerable:i}:{value(...u){return o.method(e,...u)},enumerable:i};Object.defineProperty(n,r,s)}return n}function mo(e,t){return Object.defineProperties(e,{now:{get(){return e(new Date)}},localeInformation:{get(){return E()}},localWeekdaynames:{value(n){return Wt(n)}},localMonthnames:{value(n){return Qe(n)}},daysInMonth:{value(n,r=!1){return n=M(n)?parseInt(n):0,n>=1&&n<=12?new Date(r?2e3:2005,n,0).getDate():`${n} should be a Number between (1 (january) - 12 (december))`}},yearCalendar:{value:ao},monthCalendar:{value:lo},from:{value(...n){return e(n)}},fromUxTS:{value(n,r){n=M(n)?parseInt(n)*1e3:void 0;let o=n?new Date(n):new Date;return D(o,r||j)}},hasDST:{value({date:n,timeZone:r}={}){return Ht(n,r)}},DSTActive:{value({date:n,timeZone:r}={}){return Rt(n,r)}},values:{value({date:n,timeZone:r}={}){n=n||n?.value||new Date;let o=me(n,"yyyy-m-d-h-mi-s",E({timeZone:r}).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());return o[1]-=1,o}},format:{value({date:n,template:r,timeZone:o,locale:i,opts:s}={}){n=n||n?.value||new Date,r=r?.constructor===String?r:"yyyy/mm/dd hh:mmi:ss dp";let u=E({timeZone:o,locale:i}).formatOptions;return u+=s?`,${s}`:"",me(n,r,u)}},addCustom:{value({name:n,method:r,enumerable:o=!1,isGetter:i=!1}={}){n?.constructor===String&&r?.constructor===Function&&r.length>0&&(t[n]={method:r,enumerable:o,isGetter:i})}},validateLocaleInformation:{value:E},timeAcrossZones:{value:co},weeksInYear:{value(n){return Je(n,31)}},keys:{get(){let n=Object.fromEntries(Object.entries(t).filter(([r,o])=>o.enumerable===!0));return[...Object.keys(Qt()),...Object.keys(qt()),...Object.keys(n)].sort((r,o)=>r.localeCompare(o))}}}),e}var Bt={},D=mo(go,Bt);function go(e,t){if(e?.localeInfo)return e.clone;let n=e?.locale||e?.timeZone||e?.tz||e?.l;return Qt({localeInfo:E(n?e:t),dateValue:new Date(n?Date.now():so(e)),customMethods:Bt})}var Vt=Object.defineProperties(Yt,{escape:{value:$o,enumerable:!0}});function Yt(e,...t){let{flags:n,cleanedArgs:r}=yo(...t);return bo(new RegExp(To(po(e,...r)),n))}function po(e,...t){return Y(t)?e.raw.reduce((n,r,o)=>n.concat(t[o-1]||"").concat(r),""):e.raw.join("")}function yo(...e){let t=We(ho(e.at(-1)));return{flags:t,cleanedArgs:Y(t)?e.slice(0,-1):e}}function ho(e){return ge(e,Array)?e.join(""):""}function bo(e){let t=new Proxy(Object.defineProperties({},{re:{get(){return e},enumerable:!1},toString:{value:()=>e.toString(),enumerable:!1},valueOf:{value:()=>e,enumerable:!1},flags:{value(n){return e=wo(n,e),t},enumerable:!1},clone:{get(){return vo(t)},enumerable:!1}}),xo(e));return t}function Y(e){return e?.length>0}function ge(e,t){return e?.constructor===t}function So(e,t,n){let r=Reflect.get(n,t);return{fromInstance:Reflect.get(e,t),fromRegExpMethod:ge(r,Function)?r.bind(e.re):e.re[t]}}function xo(e){return{get(t,n){let{fromInstance:r,fromRegExpMethod:o}=So(t,n,e);switch(!0){case!!r:return r;default:return o}}}}function vo(e){let t=e.re.source,n=Y(e.re.flags)?[...e.re.flags]:[];return Yt`${t} ${n}`}function We(e,t){return t=(t??"").replace(/^-r\|/,""),e=t.concat(ge(e,String)&&Y(e)?e:""),[...new Set([...e])].join("").replace(/[^dgimsuvy]/g,"")}function wo(e,t){switch(!0){case(!ge(e,String)||!Y(e)):return t;case e==="-r":return t=new RegExp(t.source);case e.startsWith("-r|"):return t=new RegExp(t.source,We(e));default:return t=new RegExp(t.source,We(t.flags,e))}}function $o(e){switch(!0){case(e?.constructor!==String||!Y(e)):return"";case!!RegExp.escape:return RegExp.escape(e);default:return(`\\x${e.at(0)}`+e.slice(1).replace(/\p{S}|\p{P}/gu,t=>`\\${t}`)).replace(/ |\\x /g,"\\x20")}}function To(e){return e.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm,"").replace(/\s/g,"").trim().replace(/<!([^>]\d+)>/g,(t,n)=>String.fromCharCode(+n)??t)}var{IS:Oo}=Do(),_=Oo;function Do(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:I,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case I:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,I=!N&&Object.getPrototypeOf(a)?.constructor,k=Number.isNaN(a)||e({trial:P=>String(a)==="NaN"}),Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:I,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var Ue=_t(void 0),jo=_t("");Object.defineProperties(String.prototype,{[Symbol.for("interpolate")]:{value(...e){return Ue(this,...e)}},[Symbol.for("interpolate$")]:{value(...e){return jo(this,...e)}}});function _t(e){return e=_(e,String,Number)?String(e):void 0,function(y,...d){return p(y,u(d))};function t(y,d){return d&&_(e,String,Number)?String(e):`{${y}}`}function n(y,d){let S=y in d;return S&&_(d[y],String,Number)?String(d[y]):t(y,S)}function r(y){return(...d)=>{let S=d.find(h=>h.key);return n(S?S.key:"_",y)}}function o(y,d){return y.replace(/\{(?<key>[a-z_\d]+)}/gim,r(d))}function i(y){let d=[];return Object.entries(y).forEach(([S,h])=>{h.forEach((v,b)=>(d[b]??={},d[b][S]=v))}),d}function s(y){return y.length===1&&Object.values(y[0]).every(Array.isArray)}function u(y){return s(y)?i(y[0]):y}function p(y,d){let S=d?.length?d.filter(h=>_(h,Object)).map((h,v)=>o(y,{...h,index:v+1})).join(""):y;return _(e,void 0)?S:S.replace(/\{[a-z_\d].+\}/gim,String(e))}}Ao();No();function No(){/stackblitz/i.test(location.href)&&console.info("\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it."),document.addEventListener("click",e=>{if(e.target.href){let t=e.target;if(t.dataset.top||t.classList.contains("internalLink")||t.target==="_top")return top.location.href=t.href}return!0})}function Co(e=!0){let t=H('<ul id="log2screen">').first();function n(i=!1){let s=i?H.at.start:H.at.end;return u=>{if(u?.isJQx)return H.li(u.data.get("header")?{class:"head"}:"",u).renderTo(t,s);u=H.IS(u,String,Number,Symbol)?String(u):Lo(u,e);let p=u.startsWith("!!");u=p?u.slice(2):u,H.li(p?{class:"head"}:"",u).renderTo(t,s)}}let[r,o]=[n(),n(!0)];return{log:(...i)=>i.forEach(r),logTop:(...i)=>i.forEach(o)}}function Lo(e,t){try{return t?`<pre>${JSON.stringify(e,null,2)}</pre>`:JSON.stringify(e)}catch{return"Some [Object object] can not be converted to JSON"}}function Ao(){H.editCssRules("body{font:normal 14px/17px system-ui,sans-serif;margin:1rem;}","li::marker{vertical-align:top;}","code{color:green;background-color:#eee;padding:2px;font-family:monospace;}","code.codeblock{display:block;padding:6px;border:1px solid #999;margin:0.5rem 0;background-color:#eee;white-space:pre-wrap;}","h3{marginTop:1.5rem;}",".thickBorder{border:5px solid green;borderWidth:5px;padding:0.5rem;display:inline-block;}","a.ExternalLink{text-decoration:none;color:rgb(0,0,238);background-color:#EEE;padding:3px;font-weight:bold;}",".cmmt{color:#888;}",".hidden{display:none;}",".attention{color:red; font-size:1.2em; font-weight:bold;}","#log2screen li{listStyle:'\\2713';paddingLeft:6px;margin:0.5rem 0 0 -1.2rem;font-family:monospace}","#log2screen li.head{list-style-type:none;font-weight:bold;margin-top:0.8rem;margin-bottom:-0.2rem;font-family:revert;}",".err{fontStyle:italic; color:red; }","a{text-decoration:none; font-weight:bold;}","a:hover{text-decoration:underline;}","a[target]:before,a.internalLink:before,a.externalLink:before{color:rgba(0,0,238,0.7);font-size:1.1rem;padding-right:2px;vertical-align:baseline;}",`a[target="_blank"]:before,a.externalLink:before{content:'\\2197';}`,`a[data-top]:before,a.internalLink:before,a[target="_top"]:before{content:'\\21BA';}`)}return nn(Eo);})();
16
+ `));default:return r}}return Object.defineProperties(r,{log:{value:p,enumerable:!1},error:{value:s,enumerable:!1},warn:{value:u,enumerable:!1}}),Object.freeze(r)}function he(){return(e=>`[${ne(e.getHours())}:${ne(e.getMinutes())}:${ne(e.getSeconds())}.${ne(e.getMilliseconds(),3)}]`)(new Date)}function Gn(e,t){if(e)for(let[n,r]of Object.entries(t)){if(n=R(n),n.startsWith("data"))return ct(e,r);m(r,String)&&st(n)&&e.setAttribute(n,r.split(/[, ]/)?.join(" "))}}function ct(e,t){if(e&&m(t,Object))for(let[n,r]of Object.entries(t))e.setAttribute(`data-${R(n)}`,r)}function ft(e){return e?m(e,Proxy)?[e.EL]:m(e,NodeList)?[...e]:W(e)?[e]:Ee(e)?e:e.isJQx?e.collection:void 0:[]}function Xe(e,t){return e.andThen(t)}function et(e,t){return e.andThen(t,!0)}function W(e){return m(e,Text,HTMLElement,Comment)}function be(e,t){if(m(t,Object))for(let[n,r]of Object.entries(t)){let o;/!important/i.test(r)&&(r=r.slice(0,r.indexOf("!")).trim(),o="important"),e.style.setProperty(R(n),r,o)}}function Q(e){let t=e.cloneNode(!0);return t.removeAttribute&&t.removeAttribute("id"),e.isConnected?e.remove():e=null,t}function Kn(e){if(!m(e,HTMLElement))return;let t=e.style,n=getComputedStyle(e),r=!![t.visibility,n.visibility].includes("hidden"),o=!![t.display,n.display].includes("none"),i=!!e.hidden,s=parseInt(n.height)<1||parseInt(n.width)<1,u=e.offsetTop<0||e.offsetLeft+e.offsetWidth<0||e.offsetLeft>document.body.offsetWidth,p=+n.opacity==0||+(t.opacity||1)==0;return!(i||u||p||o||r||s)}function Xn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(t=>t===e):!1}function er(e){return e?.filter(t=>t).reduce((t,n)=>t.concat(dt(n)?`<!--${n.data}-->`:Ae(n)?n.textContent:n.outerHTML),"")}function ne(e,t=2){return`${e}`.padStart(t,"0")}function tr(e,t=0){return[e,t]=[Math.floor(e),Math.ceil(t)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(e-t+1)+t)}function mt(){return`_${ir(Wn).slice(0,8).join("")}`}function nr(e){return e=m(e,String)&&/,/.test(e)?e.split(",").map(t=>t.trim().toLowerCase()).filter(t=>t.length>0):e,m(e,Array)?e:m(e,String)&&e?.trim().toLowerCase()||""}function rr(e){return e?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(t=>t===e):!1}function or(e,t){switch(e=String(e).trim(),!0){case/^(0|false|f)$/i.test(e):return!1;case/^(1|true|t)$/i.test(e):return!0;default:return t}}function ir(e){let t=e.length;for(;t--;){let n=tr(t);[e[t],e[n]]=[e[n],e[t]]}return e}function Le(e){return m(e,String)?e.toLowerCase().split("-").map((t,n)=>n&&`${ar(t)}`||t).join(""):e}function R(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^-|-$/,"")}function ar([e,...t]){return`${e.toUpperCase()}${t.join("")}`}function Ae(e){return m(e,Comment,Text)}function dt(e){m(e,Comment)}function lr(e){return m(e,Text)}function Ie(e){return m(e,String)&&/^<|>$/.test(`${e}`.trim())}function Ee(e){return m(e,Array)&&!e?.find(t=>!W(t))}function gt(e){return m(e,Array)&&!e?.find(t=>!Ie(t))}function O(e,t){let n=e.collection.filter(r=>!Ae(r));for(let r=0;r<n.length;r+=1)t(n[r],r);return e}function sr(e){return e.node?m(e.node,Comment)?`<!--${e.node.textContent}-->`:e.HTML.get(1).split(">")[0]+">...":""}function pt(e,t,n){let r=t!==document.body&&m(e,String)&&e.toLowerCase()!=="body"?t:document;try{n.collection=[...r.querySelectorAll(e)]}catch{A.warn(`JQx: Invalid CSS querySelector. [${m(e,String)?e:"Not a string!"}]`)}}function ur(){return{isCommentOrTextNode:Ae,isNode:W,isComment:dt,isText:lr,isHtmlString:Ie,isArrayOfHtmlElements:Ee,isArrayOfHtmlStrings:gt,ElemArray2HtmlString:er,input2Collection:ft,setCollectionFromCssSelector:pt,cssRuleEdit:at({createWithId:"JQxStylesheet"})}}function cr(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return t=>{let n=t.node;return m(n,Node)?Object.freeze({get writable(){return Xn(n)},get modal(){return rr(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return Kn(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return t.collection.length<1},get virtual(){return t.isVirtual}}):e}}function fr(e,t,n,r){n&&m(t,String)&&(t={[t]:n==="-"?"":n});let o;t.className&&(o=t.className,delete t.className),o=[...e.classList].find(i=>i.startsWith("JQxClass-")||o&&i===o)||o||`JQxClass-${mt().slice(1)}`,r.editCssRule(`.${o}`,t),e.classList.add(o)}var mr=cr();function dr(e){return{factoryExtensions:gr(e),instanceExtensions:pr(e)}}function gr(e){return{data(t){return{get all(){return new Proxy(t[0]?.dataset??{},Un)},set(n={}){if(!t.is.empty&&m(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},get(n,r){return t.data.all[n]??r},add(n={}){if(!t.is.empty&&m(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},remove(n){return t[0]?.removeAttribute(`data-${R(n)}`),t}}},dimensions(t){if(t.is.empty)return A.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:n}=t,r=n.getBoundingClientRect().toJSON();return r.scrollTopDistance=Te(n,0),r.scrollLeftDistance=Te(n,0,!1),r},node(t){return t[0]},HTML(t){return{get(n,r){if(t.is.empty)return"NO ELEMENTS IN COLLECTION";let o=n?t.outerHtml:t.html();return r?ie(o):o},set(n,r=!1,o=!1){n=n.isJQx?n.HTML.get(1):n;let i=m(n,String);return n=i&&o?ie(n):n,i&&(n||"").trim().length&&t.html(n,r),t},replace(n,r=!1){return t.HTML.set(n,!1,r)},append(n,r=!1){return n=m(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n,!0,r)},insert(n,r=!1){return n=m(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n+t.HTML.get(),!1,r)}}},is(t){return mr(t)},length(t){return t.collection.length},outerHtml(t){return(t.first()||{outerHTML:void 0}).outerHTML},parent(t){let n=e(t[0]?.parentNode);return n.is.empty?t:n},render(t){switch(!0){case!t.is.empty:return t.toDOM();default:return e.logger.warn("[JQx.render]: empty collection"),t}},Style(t){return{get computed(){return t.is.empty?{}:getComputedStyle(t[0])},inline(n){return t.style(n)},inSheet(n){return t.css(n)},valueOf(n){return t.is.empty?void 0:getComputedStyle(t[0])[R(n)]},nwRule(n){return t.Style.byRule({rules:n})},byRule({classes2Apply:n=[],rules:r=[]}={}){let o=m(r,String)&&!n.length?r.split("{")[0].trim():"";if(r=r&&m(r,String)?[r]:r,n=n&&m(n,String)?[n]:n,(r?.length||n?.length)&&(r?.length&&e.editCssRules(...r),n))for(let i of n)t.addClass(i);return o?.startsWith(".")&&t.addClass(o.slice(1)),o?.startsWith("#")&&!t.attr("id")&&t.prop({id:o.slice(1)}),t}}}}}function pr(e){return{addClass(t,...n){return O(t,r=>r&&n.forEach(o=>r.classList.add(o)))},after:Xe,afterMe:Xe,andThen(t,n,r=!1){if(!n||!m(n,String,Node,Proxy))return A.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),t;n=n?.isJQx?n:m(n,Node)?e.virtual(n):e.virtual(J(n));let[o,i,s]=r?[0,"before",n.collection.concat(t.collection)]:[t.collection.length-1,"after",t.collection.concat(n.collection)];return t[o][i](...n.collection),t.collection=s,t},append(t,...n){if(t.is.empty||n.length<1)return t;let r=t.length===1;for(let o of n){if(!o.isJQx&&C(o)){let i=o.trim(),s=/^<(.+)[^>]+>$/m.test(i)?J(o):e.text(o);O(t,u=>u.append(r?s:Q(s)))}W(o)&&O(t,i=>i.append(r?o:Q(o))),o.isJQx&&!o.is.empty&&O(t,i=>o.collection.forEach(s=>i.append(r?s:Q(s))))}return t},appendTo(t,n){switch(!0){case(!n.isJQx&&!m(n,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).append(t),t}},attr(t,n,r){if(!t.node||m(t.node,Text,Comment))return t;if(!r&&C(n))return n=R(n),n==="class"?[...t.node.classList].join(" "):t.node.getAttribute(n);if(C(n)&&r)switch(n=R(n),!0){case n.startsWith("data-"):n={data:{[n.replace("data-","")]:r}};break;default:n={[n]:r}}return m(n,Object)&&!t.is.empty&&Gn(t.node,n),t},before:et,beforeMe:et,clear(t){return O(t,Ge)},closest(t,n){let r=C(n)?t.node?.closest(n):void 0;return r?e(r):t},computedStyle(t,n){let{node:r}=t;return r&&getComputedStyle(r)[n]},css(t,n,r){return O(t,o=>fr(o,n,r,e))},duplicate(t,n=!1,r=document.body){switch(!0){case t.is.empty:return A.error("Duplicating an empty JQx instance is not possible"),t;default:let o=t.collection[0].cloneNode(!0);return o.childNodes.forEach(i=>{i.removeAttribute&&i?.removeAttribute("id")}),n?e(o).toDOM(r):e.virtual(o)}},each(t,n){return O(t,n)},empty(t){return O(t,Ge)},find(t,n){return t.collection.length>0?[...t.first()?.querySelectorAll(n)]:[]},find$(t,n){return t.collection.length>0?e(n,t):t},first(t,n=!1){return t.collection.length>0?n?t.single():t.collection[0]:void 0},first$(t,n){return t.single(n)},getData(t,n,r){return t.node?.dataset?.[n]||r},hasClass(t,...n){return t.is.empty||!t.node.classList.length?!1:n.find(r=>t.node.classList.contains(r))&&!0||!1},hide(t){return O(t,n=>be(n,{display:"none !important"}))},html(t,n,r){switch(!0){case(t.is.empty&&!C(n)):return"";case!C(n):return t.node?.getHTML()??"";default:let o=J(`<div>${n.isJQx?n.HTML.get(!0):n}</div>`);return O(t,i=>(i.textContent=r?i.textContent:"",i.insertAdjacentHTML(e.at.end,o.getHTML())))}},htmlFor(t,n,r="",o=!1){if(t.is.empty||!C(n)||!C(r))return t;let i=t.find$(n);if(i.length<1)return t;let s=J(`<span>${r}</span>`);return i.each(u=>{o||(u.textContent=""),u.insertAdjacentHTML(e.at.end,s?.getHTML())}),t},isEmpty(t){return!t.node},nth$(t,n){return t.single(n)},on(t,n,...r){switch(!0){case(t.is.empty||!m(n,String,Array)||!C(n)||r.length<1):return t;default:return e.handle({type:n,node:t.node,handler:r}),t}},once(t,n,...r){switch(!0){case(t.is.empty||!m(n,String,Array)||!C(n)||r.length<1):return t;default:return e.handle({type:n,once:!0,node:t.node,handler:r}),t}},prepend(t,...n){if(t.is.empty||!n)return;let r=t.length===1;for(let o of n){if(C(o)){o=o.trim();let i=/^<(.+)[^>]+>$/m.test(o)?J(o):e.text(o);i=r?i:Q(i),O(t,s=>s.prepend(i.cloneNode(!0)))}W(o)&&O(t,i=>i.prepend(r?o:Q(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),O(t,i=>O(o,s=>i.prepend(r?s:Q(s)))),o.collection.reverse())}return t},prependTo(t,n){return n.isJQx||(n=e.virtual(n)),n.prepend(t),t},prop(t,n,r){if(m(n,String)&&!r)return n.startsWith("data")?t[0]?.dataset[n.slice(n.indexOf("-")+1)]:t[0]?.[n];let o=m(n,Object)?n:{[n]:r};for(let[i,s]of Object.entries(o)){if(i=i.trim(),s&&!st(i)||!s)return!1;if(i.toLowerCase()==="id")return t[0].id=s;O(t,u=>{if(i.startsWith("data"))return u.dataset[i.slice(i.indexOf("-")+1)]=s;u[i]=s})}return t},remove(t,n){let r=i=>i.remove(),o=()=>t.collection=t.collection.filter(i=>document.documentElement.contains(i));if(n){let i=t.find$(n);return i.is.empty||(O(i,r),o()),t}return O(t,r),o(),t},rmAttr(t,...n){for(let r of n)t.node.removeAttribute(r);return t},removeClass(t,...n){return O(t,r=>{if(r)for(let o of n)r.classList.remove(o)})},renderTo(t,n,r){return n=m(n,HTMLElement)||n.isJQx?n:document.body,r=m(r,String)&&e.at[r]?r:e.at.end,t.first$().toDOM(n,r),t},replace(t,n,r){let o=t.node;return!n||!m(r,HTMLElement)&&!r?.isJQx?(e.logger.error("JQx replace: invalid replacement value"),t):((r.isJQx||m(r,NodeList))&&(r=r[0]),o&&n&&(n=m(n,String)?o.querySelectorAll(n):n.isJQx?n.collection:n,m(n,HTMLElement,NodeList,Array)&&m(r,HTMLElement)&&(m(n,HTMLElement)?[n]:[...n]).forEach(i=>i.replaceWith(r.cloneNode(!0)))),t)},replaceClass(t,n,...r){return O(t,o=>{o.classList.remove(n);for(let i of r)o.classList.add(i)})},replaceMe(t,n){return t.replaceWith(n)},replaceWith(t,n){return n=m(n,Element)?n:n.isJQx?n[0]:void 0,n&&(t[0].replaceWith(n),t=e.virtual(n)),t},setData(t,n){return O(t,r=>ct(r,n))},show(t){return O(t,n=>be(n,{display:"revert-layer !important"}))},single(t,n){let r=t.collection.length>0;switch(n=n??0,!0){case(r&&m(n,String)):return t.find$(n);case(r&&m(n,Number)):return e(t.collection[n]);case r:return t.collection[0];default:return t}},style(t,n,r){return O(t,o=>{r&&m(n,String)&&(n={[n]:r||"none"}),be(o,n)})},text(t,n,r=!1){switch(!0){case t.isEmpty():return t;case!m(n,String):return t.node.textContent;default:return O(t,o=>o.textContent=r?o.textContent+n:n)}},toDOM(t,n=document.body,r=F.BeforeEnd){return t.isVirtual=!1,we(t.collection,n,r),t},toggleClass(t,n){return O(t,r=>r.classList.toggle(n))},toNodeList(t){return[...t.collection].map(n=>document.importNode(n,!0))},trigger(t,n,r,o){if(r=/Event]$/.test(m(r))?r:Event,o=m(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0},!t.is.empty){let i=new r(n,o);t.each(s=>s.dispatchEvent(i))}return t},val(t,n){switch(!0){case(t.is.empty||!m(t.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return t;case!m(n,String):return t.node.value;default:return t.node.value=m(n,String)?n:"",t}}}}var Oe,ae,{isComment:Qo,isText:Wo,isHtmlString:Uo,isArrayOfHtmlElements:qo,isArrayOfHtmlStrings:Bo,ElemArray2HtmlString:Vo,cssRuleEdit:De,addFn:yr}=hr();function hr(){return{...ur(),addFn:br}}function br(e,t){return e=e?.trim(),!C(e)||!m(t,Function)?A.error("JQx.fn: method invalid parameter(s)"):ae[e]=(n,...r)=>t(n,...r)}function Sr(e){return function(t,n,r){if(t=t?.trim(),!C(t)||!m(n,Function))return e.error("JQx.staticFn: invalid parameter(s)");let o=r?{get(){return n()}}:{value(...i){return n(...i)}};try{Object.defineProperty(e,t,o)}catch{return e.warn(`JQx.staticFn: extension [${t}] already exists`)}return A.log(`JQx: added static extension function [${t}]`)}}function re(e){return new Proxy(e,Object.freeze({get:(t,n)=>xr(t,n,e)}))}function tt(e,t){return(...n)=>m(e,Function)&&e(re(t),...n)}function xr(e,t,n){switch(!0){case m(t,Symbol):return e;case m(+t,Number):return e.collection?.[t]||void 0;case t in Oe:return tt(Oe[t],n)();case t in ae:return tt(ae[t],n);default:return e[t]}}function vr(e){let t=Dr(e);for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(t)))Object.defineProperty(e,n,r);return e}function wr(e){return{allow(t){let n=/-/.test(t),r=n&&t;t=n?Le(t):t.toLowerCase(),K.allowTag(t),Object.defineProperties(e,je(t,!0,e,r))},prohibit(t){t=t.toLowerCase(),K.prohibitTag(t),Object.defineProperties(e,je(t,!1,e))}}}function nt(...e){if(e.length===1){let t=String(e.shift().trim());e=t.startsWith("!")?[t.slice(1,-1)]:t.split(",").map(n=>n.trim())}for(let t of e.map(n=>n.startsWith("!")?n.slice(1,-1):n))De(t,{removeRule:1})}function $r(e){return function(t,n,r){n=n?.isJQx?n?.[0]:n,r=r&&Object.values(F).find(i=>r===i);let o=e(t,document.createElement("br"));if(n&&!m(n,HTMLBRElement))for(let i of o.collection)r?n.insertAdjacentElement(r,i):n.append(i);return o}}function Tr(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);for(let[o,i]of Object.entries(r))!(o in t)&&Object.defineProperty(t,o,{...i,enumerable:!1})}return t}function Or(e,t,n,r){return e=R(r||e.toLowerCase()),{get(){return(...o)=>{let i=t&&n.virtual(Ce(mn[e](...o)))||void 0,s=m(i?.node,Comment,Text,void 0)?"":Vn(i);return A.log(t?`JQx: created (virtual) instance from [JQx].${e} ${s}`:`JQx: ${e.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),i}},enumerable:!1,configurable:!0}}function je(e,t,n,r){e=e.toLowerCase();let o=Or(e,t,n,r);return r?{[r]:o,[Le(r)]:o}:{[e]:o,[e.toUpperCase()]:o}}function Dr(e){return Tr(Object.entries(K.tagsRaw).reduce(jr(e),{}),Er(e))}function jr(e){return function(t,[n,r]){return Object.defineProperties(t,je(n,r,e)),t}}function Nr(e){return function(t,n,...r){m(n,Function)&&(r.push(n),n=void 0),e({type:t,selector:n,handlers:r})}}function Cr(e){return function(t){let{type:n,types:r,origin:o,selector:i,handler:s,handlers:u,node:p,name:y,capture:d,once:S,about:h}=t;s=u||s,n=r||n,i=o||i;let v=nr(n),b=y;s=m(s,Function)?[s]:s;let g={type:v,selector:i||o,capture:d,name:b,once:S,node:p,about:h};switch(!0){case(m(v,Array)&&v.length>0):for(let x of v)g.type=x,rt(s,g,e);break;default:return rt(s,g,e)}}}function rt(e,t,n){for(let r of e)n.listen({...t,handler:r})}function Lr(e){return function(t,n){return n=C(n)&&n,t=C(t)&&t,n&&t&&e.listenerStore[t][n]}}function Ar(e){return e.activePopup||Object.defineProperty(e,"activePopup",{value:Rn(e),enumerable:!1}),e.activePopup}function Ir(e){let t=(u,p)=>De(u,p),n=function(u){return at({createWithId:u||`jqx${mt()}`})},r=function(...u){for(let p of u)De(p)},o=wr(e),i=Jn(e),s=Cr(i);return{editCssRule:t,createStyle:n,editCssRules:r,allowProhibit:o,handle:s,capturedHandling:s,log:(...u)=>A.on.log(...u).off,warn:(...u)=>A.on.warn(...u).off,error:(...u)=>A.on.error(...u).off,handlerWrapper:i}}function Er(e){let{factoryExtensions:t,instanceExtensions:n}=dr(e);Oe=t,ae=n;let{editCssRule:r,createStyle:o,editCssRules:i,allowProhibit:s,handle:u,capturedHandling:p,log:y,warn:d,error:S,handlerWrapper:h}=Ir(e),v=Lr(e),b=Sr(e);return{log:y,warn:d,error:S,editCssRules:i,createStyle:o,editStylesheet:o,editCssRule:r,escHtml:ie,logger:A,text(g,x=!1){return x?e.comment(g):document.createTextNode(g)},node(g,x=document){return x.querySelector(g,x)},nodes(g,x=document){return[...x.querySelectorAll(g,x)]},clearAllTimers:qn,get staticFn(){return function(g,x,T){return b(g,x,T)}},get toBool(){return or},get getNamedListener(){return v},get virtual(){return $r(e)},get allowTag(){return s.allow},get prohibitTag(){return s.prohibit},get removeCssRule(){return nt},get removeCssRules(){return nt},get delegate(){return Nr(p)},get delegateCaptured(){return p},get handle(){return p},get listen(){return h.listen},get at(){return F},get setStyle(){return r},get fn(){return yr},get lenient(){return K.allowUnknownHtmlTags},get IS(){return m},get Popup(){return Ar(e)},get listenerStore(){return h.ListenerStore}}}var Mr=vr(kr());function kr(){return function(e,t,n=F.BeforeEnd){if(e?.isJQx)return e;let r=m(t,HTMLBRElement);t=(!r&&t&&t.isJQx?t[0]:t)||document.body,n=n&&Object.values(F).find(p=>n===p)?n:void 0;let o=Ie(e),i=!o&&gt(e)||o,s={collection:ft(e)??[],isVirtual:r,isJQx:!0},u=Ee(s.collection);if(s.collection.length&&u)return r||s.collection.forEach(p=>{t.contains(p)||we([p],t,n)}),re(s);if(i){if([e].flat().forEach(p=>s.collection.push(J(p))),s.collection.length>0){let p=s.collection.filter(S=>S?.dataset?.jqxcreationerror);s.collection=s.collection.filter(S=>!S?.dataset?.jqxcreationerror);let y=s.collection.map(S=>`${String(S.constructor).split(/function|\(/)[1].trim()}`).length>1;s=re(s);let d=s.collection.length>0?sr(s):"sanitized: no elements remaining";A.log(`JQx: created ${s.isVirtual?"(virtual)":""} instance from ${y?"array of ":""}HTML string${y?"s":""} ${d}`),s.isVirtual||we(s.collection,t,n)}return s}return pt(e,t,s),re(s)}}var H=Mr;var[U,q,Ze,Pe]=["2-digit","numeric","long","short"],le={fixed:{MM:{month:Ze},M:{month:Pe},m:{month:q},mm:{month:U},yyyy:{year:q},yy:{year:U},WD:{weekday:Ze},wd:{weekday:Pe},d:{day:q},dd:{day:U},h:{hour:q},hh:{hour:U},mi:{minute:q},mmi:{minute:U},s:{second:q},ss:{second:U},ms:{fractionalSecondDigits:3},tz:{timeZoneName:"shortOffset"},dl:{locale:"default"},h12:{hour12:!1},yn:{yearName:""},ry:{relatedYear:!0},msp:{fractionalSecond:!0}},dynamic:{tzn:e=>({timeZoneName:e.slice(4)}),hrc:e=>({hourCycle:`h${e.slice(4)}`}),ds:e=>({dateStyle:e.slice(3)}),ts:e=>({timeStyle:e.slice(3)}),tz:e=>({timeZone:e.slice(3)}),e:e=>({era:e.slice(2)}),l:e=>({locale:e.slice(2)})}},V={...le,retrieveDynamic(e){let t=e?.slice(0,e?.indexOf(":"));return le.dynamic[t]&&le.dynamic[t](e)},get re(){return new RegExp(`\\b(${Object.keys(le.fixed).join("|")})\\b`,"g")}},me=Zr;function Zr(e,t,n="l:default"){return/ds:|ts:/.test(n)?Pr(e,yt(void 0),n):zr(e,yt(t||void 0),n)}function yt(e="dtf"){let t=` ${e.replace(/[{}]/g,"").trim()} `,n=e.match(/(?<=\{)(.+?)(?=})/g)||[];return{set formatStr(r){t=r},get formatStr(){return t},get units(){return t.match(V.re)||[]},finalize(r="",o="",i="",s=""){return t.replace(/~([\d+]?)/g,"$1").replace(/dtf/,r).replace(/era/,i).replace(/dp\b|~dp\b/,o).replace(/yn\b/,s).replace(/\[(\d+?)]/g,(u,p)=>n[p].trim()).trim()}}}function At(...e){return e?.reduce((t,n)=>({...t,...V.retrieveDynamic(n)||V.fixed[n]}),V.fixed.dl)}function Pr(e,t,n){let r=At(...It(n).split(",")),o=Intl.DateTimeFormat(r.locale,r).format(e);return t.finalize(o)}function Fr(e,t){return e==="numeric"&&t.startsWith("0")?t.slice(1):t}function zr(e,t,n){let r=At(...t.units.concat(It(n).split(",")).flat()),o={...V.fixed},i=Intl.DateTimeFormat(r.locale,r).formatToParts(e).reduce((s,u)=>u.type==="literal"&&/[ ,/-]/.test(u.value)?s:{...s,[u.type]:Fr(r[u.type],u.value)},{});return o.ms=r.fractionalSecondDigits?o.msp:o.ms,o.yyyy=i.relatedYear?o.ry:o.yyyy,t.formatStr=t.formatStr.replace(V.re,s=>/^(M|MM)$/.test(s)?Hr(e,r.locale,r.timeZone,/^M$/.test(s)):i[Object.keys(o[s]).shift()]||s),t.finalize(void 0,i.dayPeriod,i.era,i.yearName)}function Hr(e,t,n,r){return e.toLocaleString(t,{timeZone:n,month:r?Pe:Ze})}function It(e){return e.replace(/\s+/g,"")}var Rr=Jr;function Jr(){let e=(r,o)=>{let i=isNaN(new Date(r)),s=isNaN(new Date(o));if(s){let[u,p,y]=Array(3).fill("end date not valid");return{error:!0,message:u,full:p,clean:y}}if(i){let[u,p,y]=Array(3).fill("start date not valid");return{error:!0,message:u,full:p,clean:y}}if(i&&!s){let[u,p,y]=Array(3).fill("start- and/or end date are not valid");return{error:!0,message:u,full:p,clean:y}}return{error:!1}},t=n();return function({start:r,end:o,diffs:i={}}={}){let s=e(r,o),u=o>r?"+":"-";if(s.error)return s;let p=Math.abs(r-o),y=new Date(p),d=y.getUTCFullYear()-1970,S=y.getUTCMonth(),h=y.getUTCDate()-1,v=h%7,b=Math.floor(h/7),g=y.getUTCHours(),x=y.getUTCMinutes(),T=y.getUTCSeconds(),L=y.getUTCMilliseconds(),a=Math.floor(p/864e5);i={...i,fromUTC:r,toUTC:o,sign:"",years:d,months:S,days:h,hours:g,minutes:x,seconds:T,milliseconds:L,diffInDays:a},i.full=t({values:i,full:!0}),i.clean=t({values:i}),i.equalDates=i.clean==="Dates are equal";let l=g+x+T>0?"T":"";return i.clean!=="Dates are equal"&&(i.sign=u,i.jsPeriod=`${u}P${d>0?`${d}Y`:""}${S>0?`${S}M`:""}${b>0?`${b}W`:""}${v>0?`${v}D`:""}${l}${g>0?`${g}H`:""}${x>0?`${x}M`:""}${T>0?`${T}S`:""}`,i.ISOPeriod=`P${d>0?`${d}Y`:""}${S>0?`${S}M`:""}${h>0?`${h}D`:""}${l}${g>0?`${g}H`:""}${x>0?`${x}M`:""}${T>0?`${T}S`:""}`),i};function n(){let r=(...i)=>s=>i.reduce((u,p)=>p(u),s),o=(i,s)=>i===1?s.slice(0,-1):s;return r(({values:i,full:s})=>[Object.entries(i).filter(([u])=>/^(years|month|days|hours|minutes|seconds)/i.test(u)),s],([i,s])=>s?i:i.filter(([,u])=>s?+u:u>0),i=>i.reduce((s,[u,p])=>[...s,`${p} ${o(p,u)}`],[]),i=>i.length<1?"Dates are equal":`${i.slice(0,-1).join(", ")}${i.length>1?" and ":""}${i.slice(-1).shift()}`)}}var Qr=Wr;function Wr(){let e=Object.entries({year:"FullYear",month:"Month",date:"Date",day:"Date",hour:"Hours",minute:"Minutes",second:"Seconds",millisecond:"Milliseconds"}).reduce((r,[o,i])=>({...r,[o]:i,[`${o}s`]:i}),{}),t=!1,n=function(...r){let o=r.length===1;return t=r[0].trim().startsWith("subtract,"),t&&(r=o?r[0].trim().replace(/^subtract,/i,"").split(",").map(i=>i.trim()):r.filter(i=>!i.startsWith("subtract"))),o&&!t&&(r=r[0].split(",").map(i=>i.trim())),r.map(function(i){if(!i)return!1;let s=i.toLowerCase().split(/ {1,}/);return s.length<2?!1:s.map(u=>{u=`${u}`.trim().replace(/[^a-z0-9-+]/g,"");let p=parseInt(u,10);return Number.isNaN(p)?u:t?-p:+p})}).filter(i=>i)};return function(r,...o){if(o.length<1)return r;let i=n(...o);return i.length&&i.forEach(([s,u])=>{u=u,u=e[u],s&&u&&r[`set${u}`](r[`get${u}`]()+s)}),r}}var Et=Rr(),Mt=to(),z=Qr(),Ur=["sun","mon","tue","wed","thu","fri","sat"],kt=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ht(e,...t){return z(e,...t),e}function qr(e,t=!1){let n=Zt(e.clone,{sunday:t}),r=[n];return{weekStart:n.format("WD","l:en-GB"),inputDate:e,dates:r.concat([...Array(6)].map((o,i)=>n.clone.addDays(i+1)))}}function Me(e,{start:t,end:n,future:r,past:o,include:i={start:!1,end:!1}}={}){let s=e.clone.UTC;return t=t?.value||t?.constructor===Date?D(t?.value||t).UTC:D.now.UTC,n=n&&n?.value||n?.constructor===Date?D(n?.value||n).UTC:D.now.UTC,s.milliseconds=0,t.milliseconds=0,n.milliseconds=0,r?t>n:o?t<n:(i.start?+s>=+t:+s>+t)&&(i.end?+s<=+n:+s<+n)}function bt(e,{zoneTime:t=!1,formatStr:n,moreOptions:r}={}){return r=t?e.localeInfo.formatOptions+(r?`,${r}`:""):j.formatOptions+(r?`,${r}`:""),t?(e.localeInfo||(e.localeInfo=j),me(e,n,r)):Br(e,n,r)}function Br(e,t,n){let r=e.clone.relocate(j);return n=(n||"").startsWith("+")?`${r.localeInfo.formatOptions},${n.slice(1)}`:n||r.localeInfo.formatOptions,me(r,t,n)}function Vr(e,t){let n=Et({start:e,end:t||e});return parseInt(`${n.sign}${n.diffInDays}`)}function St(e,t=!1){let{locale:n,timeZone:r}=t?e.localeInfo:j,o=Bt(n,r),i=e.format("MM|WD",o).split("|");return{locale:n,timeZone:r,monthName:i[0],dayName:i[1],dayNames:qt(n),monthNames:Qe(n)}}function xt(e,t=!1){let[n,r,o,i]=Fe(e,t),s={values4Timezone:t?j.timeZone:e.timeZone,hours:n,minutes:r,seconds:o,milliseconds:i};return Object.freeze(s)}function Fe(e,t=!1){let n=`l:en-CA,${t?`tz:${j.timeZone}`:`tz:${e.timeZone}`},hrc:23,ts:medium`;return e.format("",n).split(/:/).map(Number).concat(e.getMilliseconds())}function vt(e,t){let n=t?`tz:${j.timeZone}`:`,tz:${e.timeZone}`,[r,o,i]=e.format("yyyy-mm-dd",n).split(/-/).map(Number);o-=1;let s=t?j.timeZone:e.timeZone;return Object.freeze({values4Timezone:s,year:r,month:o,date:i})}function wt(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate()];let n=e.format("yyyy-m-d",e.localeInfo.formatOptions).split(/-/).map(Number);return n[1]-=1,n}function Yr(e){let t=e.localeInfo.weekInfo?.firstDay;return t=t>6?0:t,kt[t||1]}function Zt(e,{sunday:t=!1}={}){let n=t?"sunday":Yr(e);return ze(e,{day:n,preserveTodayWhenEqual:!0})}function _r(e,t){let n=e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000",r=t.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000";return n=He(n.slice(0,3)+":"+n.slice(-2),!0),r=He(r.slice(0,3)+":"+r.slice(-2),!0),[-n[0]+r[0],-n[1]+r[1]].map(o=>n[0]<0?-o:o)}function Pt({start:e,end:t}={}){t||(t=e.clone),t?.clone||(t=D(t,{timeZone:e.timeZone})),e=D(Dt(e,e.timeZone),{timeZone:e.timeZone}),t=D(Dt(t,t.timeZone),{timeZone:t.timeZone});let n=Et({start:e,end:t,diffs:{timeZoneStart:e.timeZone,timeZoneEnd:t.timeZone}}),r=_r(t,e),o=n.sign.startsWith("-")?"ahead of":"behind",[i,s]=r.map(y=>Math.abs(y)),[u,p]=[`${i} ${de(i,"hour")}`,`${s} ${de(s,"minute")}`];return n.timeZonesOffsetDifference=n.sign.length<1||i+s===0?`Offsets of ${e.timeZone} and ${t.timeZone} are equal`:`${e.timeZone} is ${u}${s>0?` and ${p}`:""} ${o} ${t.timeZone}`,n}function $t(e,t){t=String(t).toLowerCase()==="utc"||t.timeZone==="UTC"?e.clone.relocate({timeZone:"UTC"}):D(e.value,{timeZone:t.timeZone||j.timeZone});let n=Pt({start:e.clone,end:t}),r=`${n.sign}${Tt(n.hours)}:${Tt(n.minutes)}`;return{fromTZ:e.timeZone,toTZ:t.timeZone,offset:r,offsetText:`${t.timeZone} ${Gr(r)} ${e.timeZone}`}}function Tt(e,t=2){return`${e}`.padStart(t,"0")}function de(e,t){return`${t}${e>1||e===0?"s":""}`}function Gr(e){if(/00:00/.test(e))return"no time diffence to";let t=e.slice(1).split(":").map(Number),[n,r]=t,o=de(n,"hour"),i=de(r,"minute"),s=e.startsWith("+");return r>0?`${n} ${o} and ${r} ${i} ${s?"ahead of":"behind"}`:`${n} ${o} ${s?"ahead of":"behind"}`}function Ot(e,t,n){return e.clone.format(t,n||e.localeInfo.formatOptions)}function Kr(e,{withFormat:t,withFormatOptions:n,local:r=!1}={}){if(t)return r?Ot(e,t,$D.localeInformation.formatOptions):Ot(e,t,n);let o=e.clone.relocate({locale:"en"}),i=r?j.formatOptions:o.localeInfo.formatOptions,s=`wd M dd yyyy hh:mmi:ss ${o.format("tz",i+",tzn:longOffset").replace(":","")} (tz)`;return o.format(s,i+",tzn:long, hrc:23")}function Ft(e,t=!1){let n=Intl.DateTimeFormat("en",{timeZone:t?e.timeZone:j.timeZone,weekday:"short"});return Mt(n.format(e))}function Xr(e){let t=j,n=e.localeInfo,r=e.clone.relocate({locale:t.locale,timeZone:t.timeZone}),o=e.offsetFrom(r),i=r.offsetFrom(e),s=t,u=n,p=e.format("hh:mmi:ss dp",`hrc:12,tz:${e.timeZone}`),y=r.format("hh:mmi:ss dp",`hrc:12,tz:${r.timeZone}`),d={note:"'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance",locales:{user:{locale:s.locale,timeZone:s.timeZone}},dateTime:{user:{...e.dateTime,monthName:r.monthName,weekdayNr:r.day,weekdayName:r.dayName,dayPeriodTime:y,hasDST:r.hasDST,DSTActive:r.DSTActive,offsetFromRemote:o.offset,string:r.toString()}},offset:{fromUTC:e.UTC.offsetFrom(e).offsetText}};return n.timeZone!==t.timeZone&&(d.locales.remote={locale:u.locale,timeZone:u.timeZone},d.dateTime.remote={...e.zoneDateTime,monthName:e.zoneNames.monthName,weekdayNr:Ft(e,!0),weekdayName:e.zoneNames.dayName,dayPeriodTime:p,hasDST:e.hasDST,DSTActive:e.DSTActive,offsetFromUser:i.offset,string:e.toString()},d.offset.fromUserTime=i.offsetText),d}function se(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];let n=e.format("yyyy-m-d-hh-mmi-ss",`${e.localeInfo.formatOptions},hrc23:true`).split(/-/).map(Number).concat(e.getMilliseconds());return n[1]-=1,n}function zt(e){return new Date(e.year,e.month+1,0,0,0,0).getDate()}function Ht(e,t){t=I({locale:t||e.localeInfo.locale}).locale;let n=e.clone.relocate({locale:t});return n.date={date:1},[n].concat([...Array(zt(n)-1)].map((r,o)=>n.clone.add(`${o+1} days`)))}function ze(e,{day:t,next:n=!1,preserveTodayWhenEqual:r=!1}={}){t=t?.toLowerCase()||"-";let o=Mt(t);if(o<0)return console.error(`[TickTock instance].next/previous invalid day value ${t}`),e.clone;let i=n?1:-1,s=D(new Date(...e.dateTimeValues),e.localeInfo);return r&&o===s.day?s:eo(s.addDays(n?1:-1),o,i)}function eo(e,t,n){function r(o){switch(!0){case o.day===t:return o;default:return r(o.add(`${n} days`))}}return r(e)}function ue(e,{dateOnly:t=!1,timeOnly:n=!1}={}){let{locale:r,timeZone:o}=e.localeInfo;return t?new Date(e).toLocaleDateString(r,{timeZone:o}):n?new Date(e).toLocaleTimeString(r,{timeZone:o}):new Date(e).toLocaleString(r,{timeZone:o})}function Dt(e,t){let n={timeZone:t,hourCycle:"h23"};return new Date(new Date(e).toLocaleString("en",n))}function X(e,{year:t,month:n,date:r}={}){return E(t)&&e.setFullYear(parseInt(t)),E(r)&&e.setDate(parseInt(r)),E(n)&&e.setMonth(parseInt(n)),e}function B(e,{hours:t,minutes:n,seconds:r,milliseconds:o}={}){return E(t)&&e.setHours(parseInt(t)),E(n)&&e.setMinutes(parseInt(n)),E(r)&&e.setSeconds(parseInt(r)),E(o)&&e.setMilliseconds(parseInt(o)),e}function Rt(e){return e?.constructor===Date||e?.value}function jt(e,t){return Rt(t)?D(t?.value||t,e.localeInfo):D.from(...e.dateTimeValues).relocate(e.localeInfo)}function to(){return function(e){e=`${e}`.toLowerCase();let t=Ur.indexOf(e);return t<0?kt.indexOf(e):t}}function He(e){let t=e.slice(1).split(/[-:]/).map(Number),n=e.startsWith("-");return t=t.map(r=>n?-r:r),t}function no(e){return e.time={hours:0,minutes:0,seconds:0,milliseconds:0},e}function Nt(e,t){return Intl.DateTimeFormat("en-CA",{timeZone:t,timeZoneName:"long"}).format(e).split(/,/)[1].trim()}function Jt(e,t){t=t||e?.timeZone||j.timeZone,e=e?.value?e:e?.constructor===Date?D(e,{timeZone:t}):D({timeZone:t});let n=e.year||e.getFullYear(),r=Nt(new Date(n,0,1),t),o=Nt(new Date(n,5,1),t);return r!==o}function Qt(e,t){return t=t||e?.timeZone||j.timeZone,e=e?.hasDST?e:e?.constructor===Date?D(e,{timeZone:t}):D({timeZone:t}),e.hasDST?!/standard/i.test(e.toString()):!1}function ro(e,{locale:t,timeZone:n,l:r,tz:o}={}){return e.localeInfo=I({locale:r||t||e.l||e.locale,timeZone:o||n||e.tz||e.timeZone}),e}function oo(e,t){return Rt(t)&&(e=D(t.value||t,t.localeInfo||e.localeInfo)),e}function Je(e,t){let n=Wt(new Date(e,11,t||31));return n===1?Je(e,(t||31)-1):n}function Ct(e,t){let n=e.month;switch(!0){case n<3:return t?1:"First";case n<6:return t?2:"Second";case n<9:return t?3:"Third";case n<12:return t?4:"Fourth";default:return"unknown"}}function Wt(e){let t=new Date(e),n=(t.getDay()+6)%7;t.setDate(t.getDate()-n+3);let r=t.valueOf();return t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7),1+Math.ceil((r-t)/6048e5)}var Ut=io;function io({localeInfo:e,customMethods:t,dateValue:n}={}){let r,o={add(...i){return ht(r,...i)},between({start:i,end:s,include:u}={}){return Me(r,{start:i,end:s,include:u})},cloneWith(i){return jt(r,i)},daysUntil(i){return Vr(r,i)},differenceTo(i){return Pt({start:r,end:i})},differenceUntil(i){return r.differenceTo(i).clean},firstWeekday({sunday:i=!1,midnight:s=!1}={}){return Zt(r,{sunday:i,midnight:s})},format(i,s){return bt(r,{formatStr:i,moreOptions:s})},fullMonth(i){return Ht(r,i)},fullWeek(i=!1){return qr(r,!!i)},isFuture(i){return Me(r,{start:r,end:i,future:!0})},isPast(i){return Me(r,{start:r,end:i,past:!0})},next(i,s){return ze(r,{day:i,next:!0,preserveTodayWhenEqual:!!s})},offsetFrom(i){return $t(r,i)},previous(i,s){return ze(r,{day:i,next:!1,preserveTodayWhenEqual:!!s})},relocate({locale:i,timeZone:s,l:u,tz:p}={}){return ro(r,{locale:i,timeZone:s,l:u,tz:p})},revalue(i){return r=oo(r,i),r},setDateValues({year:i,month:s,date:u}={}){return X(r,{year:i,month:s,date:u})},setTimeValues({hours:i,minutes:s,seconds:u,milliseconds:p}={}){return B(r,{hours:i,minutes:s,seconds:u,milliseconds:p})},subtract(...i){return ht(r,"subtract,"+i.join(","))},toArray(i=!1){return se(r,i)},toString({template:i,formatOptions:s,local:u}={}){return Kr(r,{withFormat:i,withFormatOptions:s,local:u})},values(i=!1){return i?r.dateTime:r.zoneDateTime},zoneFormat(i,s){return bt(r,{zoneTime:!0,formatStr:i,moreOptions:s})},set date({year:i,month:s,date:u}){X(r,{year:i,month:s,date:u})},set dateNr(i){X(r,{date:i})},set hours(i){B(r,{hours:i})},set localeInfo({locale:i,timeZone:s,l:u,tz:p}){e=ce({locale:i,timeZone:s,l:u,tz:p})},set milliseconds(i){B(r,{milliseconds:`${i}`})},set minutes(i){B(r,{minutes:i})},set month(i){X(r,{month:i})},set seconds(i){B(r,{seconds:i})},set time({hours:i,minutes:s,seconds:u,milliseconds:p}){B(r,{hours:i,minutes:s,seconds:u,milliseconds:p})},set year(i){X(r,{year:i})},get age(){return r.differenceTo(new Date).years},get ageFull(){return r.differenceTo(new Date).clean},get clone(){return jt(r)},get date(){return vt(r,!0)},get dateNr(){return r.date.date},get dateTime(){return{...r.date,...r.time}},get dateTimeValues(){return se(r,!0)},get dateValues(){return wt(r,!0)},get day(){return r.getDay()},get dayName(){return r.names.dayName},get daysThisMonth(){return zt(r)},get DSTActive(){return Qt(r)},get hasDST(){return Jt(r)},get hours(){return r.time.hours},get info(){return Xr(r)},get isLeapYear(){return new Date(r.getFullYear(),2,0).getDate()===29},get ISO(){return r.toISOString()},get local(){return ue(r)},get localDate(){return ue(r,{dateOnly:!0})},get locale(){return(e||ce()).locale},get localeInfo(){return e},get localeString(){return ue(r)},get localTime(){return ue(r,{timeOnly:!0})},get milliseconds(){return r.getMilliseconds()},get minutes(){return r.time.minutes},get month(){return r.date.month},get monthName(){return r.names.monthName},get names(){return St(r)},get quarter(){return Ct(r)},get quarterNr(){return Ct(r,!0)},get removeTime(){return no(r)},get seconds(){return r.time.seconds},get time(){return xt(r,!0)},get timeValues(){return Fe(r,!0)},get timeZone(){return(e||ce()).timeZone},get unixEpochTimestamp(){return Math.floor(+r/1e3)},get userLocaleInfo(){return j},get UTC(){return r.clone.relocate({locale:r.locale,timeZone:"UTC"})},get UTCOffset(){return $t(r,"UTC")},get value(){return new Date(r)},get weeknr(){return Wt(r)},get weeksInYear(){return Je(r.year,31)},get year(){return r.date.year},get zoneDate(){return vt(r,!1)},get zoneDateNr(){return r.zoneDate.date},get zoneDateTime(){return{...r.zoneDate,...r.zoneTime}},get zoneDateTimeValues(){return se(r,!1)},get zoneDateValues(){return wt(r,!1)},get zoneDay(){return Ft(r,!0)},get zoneDayname(){return r.zoneNames.dayName},get zoneHours(){return r.zoneTime.hours},get zoneMinutes(){return r.zoneTime.minutes},get zoneMonth(){return r.zoneDate.month},get zoneMonthname(){return r.zoneNames.monthName},get zoneNames(){return St(r,!0)},get zoneSeconds(){return r.zoneTime.seconds},get zoneTime(){return xt(r)},get zoneTimeValues(){return Fe(r)},get zoneYear(){return r.zoneDate.year},get zoneValues(){return r.zoneDateTime},get zoneArray(){return se(r,!1)}};return!e&&!n?o:(o.localeInfo=e||ce(),r=new Proxy(n,ao(o)),Object.entries(Object.getOwnPropertyDescriptors(Vt(r,t))).forEach(([i,s])=>Object.defineProperty(o,i,s)),Object.freeze(r))}function ao(e){return{get(t,n){return n!=="toString"&&n in t?t[n].bind(t):Reflect.get(e,n)},set(t,n,r){return n in e&&Reflect.set(e,n,r)}}}var j=Re(Intl.DateTimeFormat().resolvedOptions()),lo=Object.getOwnPropertyNames(Date.prototype).filter(e=>e.startsWith("set")).reduce((e,t)=>[...e,{native:t,syn:"change"+t.slice(3)}],[]),ke="\u{1F6AB}";function qt(e="en-GB"){return e=I({locale:e}).locale,{long:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"long"})),short:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"short"}))}}function Qe(e="en"){return e=I({locale:e}).locale,{long:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"long"})),short:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"short"}))}}function so({year:e,locale:t}={}){e=E(e)?parseInt(e):new Date().getFullYear();let n={year:e,calendar:{}},r=Qe().long.map(o=>o.toLowerCase());for(let o=0;o<12;o+=1){let i=D.from(e,o,1);n.calendar[r[o]]=Ht(i,t)}return n}function uo({year:e,monthNr:t,locale:n="en-CA"}={}){e=E(t)&&parseInt(e)||-1,t=E(t)&&parseInt(t)||new Date().getFullYear();let r=t>=1&&t<=12;return n=I({locale:n}).locale,t=r?t-1:void 0,r?D.from(e,t,1).relocate({locale:n}).fullMonth(n):"MonthNr should be a specific number (1 = january - 12 = december)"}function Re(e){let t=Bt(e.locale,e.timeZone),n=new Intl.Locale(e.locale);return e.weekInfo=n.getWeekInfo?n.getWeekInfo():null,Object.defineProperty(e,"formatOptions",{value:t,enumerable:!1})}function Bt(e,t){return[`${e&&!(Array.isArray(e)&&e.length<1)?`l:${e}`:""}`,`${t?`tz:${t}`:""}`].filter(n=>n).join(",")}function I({locale:e,timeZone:t,l:n,tz:r}={}){return t=t||r,e=e||n,!e&&!t?j:fo({trial:function(){let o=Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions();return e&&o.locale!==e&&console.error(`${ke} Intl changed locale (using best fit) "${e}" to "${o.locale}"`),Re(o)},onError:function(o){switch(!0){case/incorrect locale/i.test(o.message):return console.error(`${ke} Intl locale "${e}" best fit impossible, using "${j.locale}"`),I({locale:j.locale,timeZone:t});case/invalid time zone/i.test(o.message):return console.error(`${ke} timeZone "${t}" not valid. Using "${j.timeZone}"`),I({locale:e,timeZone:j.timeZone});default:return j||Re(Intl.DateTimeFormat().resolvedOptions())}}})}function ce({locale:e,timeZone:t,l:n,tz:r}={}){return I({locale:e,timeZone:t,l:n,tz:r},!0)}function Lt(e){return!Number.isNaN(+e)&&e?.constructor===Date&&!e?.toISOString?.().startsWith("1970-01-01T00:00:00")?e:new Date}function co(e){let t=new Date;switch(!0){case e?.constructor===String:return Lt(new Date(e));case(Array.isArray(e)&&e.map(Number).length===e.length):return e.length===1?new Date(e[0],0,1):new Date(...e);case e?.constructor===Date:return Lt(e);default:return t}}function fo({trial:e,onError:t=()=>{}}={}){if(e?.constructor===Function)try{return e()}catch(n){return t?.constructor===Function?t(n):void 0}}function mo({timeZoneDate:e,timeZoneID:t,userTimeZoneID:n}={}){let r={timeZone:I({timeZone:t}).timeZone},o={timeZone:I({timeZone:n||""}).timeZone},i=D(e,r),s=D(e,o),u=s.differenceTo(i),p=i.offsetFrom(s).offset,[y,d]=He(p,!0),S=s.clone.add(`${y} hours, ${d} minutes`),h=u.equalDates?"No difference":`Time offset ${p}: ${o.timeZone} is ${u.clean} ${y<0?"behind":"ahead of"} ${r.timeZone}`;return{remoteTimezone:r.timeZone,userTimezone:o.timeZone,timeDifference:h,result:{[r.timeZone.replace(/\//,"_")]:D(e).toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"}),[o.timeZone.replace(/\//,"_")]:S.toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"})}}}function E(e){return!Number.isNaN(parseInt(e))}function fe(e,t,n){return e?.constructor===Number?z(t,`${e} ${n}`):t}function go(e){let t={addYears(n=1){return fe(n,e,"years")},addMonths(n=1){return fe(n,e,"months")},addWeeks(n=1){return n=n?.constructor===Number?n*7:1,fe(n,e,"days")},addDays(n=1){return fe(n,e,"days")},get nextYear(){return z(e,"1 year")},get nextWeek(){return z(e,"7 days")},get previousWeek(){return z(e,"-7 days")},get previousYear(){return z(e,"-1 year")},get nextMonth(){return z(e,"1 month")},get previousMonth(){return z(e,"-1 month")},get tomorrow(){return z(e,"1 day")},get yesterday(){return z(e,"-1 day")}};for(let n of lo)t[n.syn]=function(...r){return e[n.native](...r),e};return t}function Vt(e,t){let n=go(e);for(let[r,o]of Object.entries(t||{})){let i=o.enumerable,s=o.isGetter?{get(){return o.method(e)},enumerable:i}:{value(...u){return o.method(e,...u)},enumerable:i};Object.defineProperty(n,r,s)}return n}function po(e,t){return Object.defineProperties(e,{now:{get(){return e(new Date)}},localeInformation:{get(){return I()}},localWeekdaynames:{value(n){return qt(n)}},localMonthnames:{value(n){return Qe(n)}},daysInMonth:{value(n,r=!1){return n=E(n)?parseInt(n):0,n>=1&&n<=12?new Date(r?2e3:2005,n,0).getDate():`${n} should be a Number between (1 (january) - 12 (december))`}},yearCalendar:{value:so},monthCalendar:{value:uo},from:{value(...n){return e(n)}},fromUxTS:{value(n,r){n=E(n)?parseInt(n)*1e3:void 0;let o=n?new Date(n):new Date;return D(o,r||j)}},hasDST:{value({date:n,timeZone:r}={}){return Jt(n,r)}},DSTActive:{value({date:n,timeZone:r}={}){return Qt(n,r)}},values:{value({date:n,timeZone:r}={}){n=n||n?.value||new Date;let o=me(n,"yyyy-m-d-h-mi-s",I({timeZone:r}).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());return o[1]-=1,o}},format:{value({date:n,template:r,timeZone:o,locale:i,opts:s}={}){n=n||n?.value||new Date,r=r?.constructor===String?r:"yyyy/mm/dd hh:mmi:ss dp";let u=I({timeZone:o,locale:i}).formatOptions;return u+=s?`,${s}`:"",me(n,r,u)}},addCustom:{value({name:n,method:r,enumerable:o=!1,isGetter:i=!1}={}){n?.constructor===String&&r?.constructor===Function&&r.length>0&&(t[n]={method:r,enumerable:o,isGetter:i})}},validateLocaleInformation:{value:I},timeAcrossZones:{value:mo},weeksInYear:{value(n){return Je(n,31)}},keys:{get(){let n=Object.fromEntries(Object.entries(t).filter(([r,o])=>o.enumerable===!0));return[...Object.keys(Ut()),...Object.keys(Vt()),...Object.keys(n)].sort((r,o)=>r.localeCompare(o))}}}),e}var Yt={},D=po(yo,Yt);function yo(e,t){if(e?.localeInfo)return e.clone;let n=e?.locale||e?.timeZone||e?.tz||e?.l;return Ut({localeInfo:I(n?e:t),dateValue:new Date(n?Date.now():co(e)),customMethods:Yt})}var _t=Object.defineProperties(Gt,{escape:{value:Oo,enumerable:!0}});function Gt(e,...t){let{flags:n,cleanedArgs:r}=bo(...t);return xo(new RegExp(Do(ho(e,...r)),n))}function ho(e,...t){return Y(t)?e.raw.reduce((n,r,o)=>n.concat(t[o-1]||"").concat(r),""):e.raw.join("")}function bo(...e){let t=We(So(e.at(-1)));return{flags:t,cleanedArgs:Y(t)?e.slice(0,-1):e}}function So(e){return ge(e,Array)?e.join(""):""}function xo(e){let t=new Proxy(Object.defineProperties({},{re:{get(){return e},enumerable:!1},toString:{value:()=>e.toString(),enumerable:!1},valueOf:{value:()=>e,enumerable:!1},flags:{value(n){return e=To(n,e),t},enumerable:!1},clone:{get(){return $o(t)},enumerable:!1}}),wo(e));return t}function Y(e){return e?.length>0}function ge(e,t){return e?.constructor===t}function vo(e,t,n){let r=Reflect.get(n,t);return{fromInstance:Reflect.get(e,t),fromRegExpMethod:ge(r,Function)?r.bind(e.re):e.re[t]}}function wo(e){return{get(t,n){let{fromInstance:r,fromRegExpMethod:o}=vo(t,n,e);switch(!0){case!!r:return r;default:return o}}}}function $o(e){let t=e.re.source,n=Y(e.re.flags)?[...e.re.flags]:[];return Gt`${t} ${n}`}function We(e,t){return t=(t??"").replace(/^-r\|/,""),e=t.concat(ge(e,String)&&Y(e)?e:""),[...new Set([...e])].join("").replace(/[^dgimsuvy]/g,"")}function To(e,t){switch(!0){case(!ge(e,String)||!Y(e)):return t;case e==="-r":return t=new RegExp(t.source);case e.startsWith("-r|"):return t=new RegExp(t.source,We(e));default:return t=new RegExp(t.source,We(t.flags,e))}}function Oo(e){switch(!0){case(e?.constructor!==String||!Y(e)):return"";case!!RegExp.escape:return RegExp.escape(e);default:return(`\\x${e.at(0)}`+e.slice(1).replace(/\p{S}|\p{P}/gu,t=>`\\${t}`)).replace(/ |\\x /g,"\\x20")}}function Do(e){return e.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm,"").replace(/\s/g,"").trim().replace(/<!([^>]\d+)>/g,(t,n)=>String.fromCharCode(+n)??t)}var{IS:jo}=No(),_=jo;function No(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),g();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:N,isNaN:M,isInfinity:k,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case M:return f?"NaN":e({trial:P=>String(w)})===String(a);case k:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case N===Boolean:return l?N===l:"Boolean";default:return p(a,l,f,s(a,N))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),N=a==null,M=!N&&Object.getPrototypeOf(a)?.constructor,k=Number.isNaN(a)||e({trial:P=>String(a)==="NaN"}),Z=e({trial:P=>String(a)})==="Infinity";return{noInput:N,noShouldbe:c,compareTo:f,inputCTOR:M,isNaN:k,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function p(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var Ue=Kt(void 0),Co=Kt("");Object.defineProperties(String.prototype,{[Symbol.for("interpolate")]:{value(...e){return Ue(this,...e)}},[Symbol.for("interpolate$")]:{value(...e){return Co(this,...e)}}});function Kt(e){return e=_(e,String,Number)?String(e):void 0,function(y,...d){return p(y,u(d))};function t(y,d){return d&&_(e,String,Number)?String(e):`{${y}}`}function n(y,d){let S=y in d;return S&&_(d[y],String,Number)?String(d[y]):t(y,S)}function r(y){return(...d)=>{let S=d.find(h=>h.key);return n(S?S.key:"_",y)}}function o(y,d){return y.replace(/\{(?<key>[a-z_\d]+)}/gim,r(d))}function i(y){let d=[];return Object.entries(y).forEach(([S,h])=>{h.forEach((v,b)=>(d[b]??={},d[b][S]=v))}),d}function s(y){return y.length===1&&Object.values(y[0]).every(Array.isArray)}function u(y){return s(y)?i(y[0]):y}function p(y,d){let S=d?.length?d.filter(h=>_(h,Object)).map((h,v)=>o(y,{...h,index:v+1})).join(""):y;return _(e,void 0)?S:S.replace(/\{[a-z_\d].+\}/gim,String(e))}}Eo();Lo();function Lo(){/stackblitz/i.test(location.href)&&console.info("\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it."),document.addEventListener("click",e=>{if(e.target.href){let t=e.target;if(t.dataset.top||t.classList.contains("internalLink")||t.target==="_top")return top.location.href=t.href}return!0})}function Ao(e=!0){let t=H('<ul id="log2screen">').first();function n(i=!1){let s=i?H.at.start:H.at.end;return u=>{if(u?.isJQx)return H.li(u.data.get("header")?{class:"head"}:"",u).renderTo(t,s);u=H.IS(u,String,Number,Symbol)?String(u):Io(u,e);let p=u.startsWith("!!");u=p?u.slice(2):u,H.li(p?{class:"head"}:"",u).renderTo(t,s)}}let[r,o]=[n(),n(!0)];return{log:(...i)=>i.forEach(r),logTop:(...i)=>i.forEach(o)}}function Io(e,t){try{return t?`<pre>${JSON.stringify(e,null,2)}</pre>`:JSON.stringify(e)}catch{return"Some [Object object] can not be converted to JSON"}}function Eo(){H.editCssRules("body{font:normal 14px/17px system-ui,sans-serif;margin:1rem;}","li::marker{vertical-align:top;}","code{color:green;background-color:#eee;padding:2px;font-family:monospace;}","code.codeblock{display:block;padding:6px;border:1px solid #999;margin:0.5rem 0;background-color:#eee;white-space:pre-wrap;}","h3{marginTop:1.5rem;}",".thickBorder{border:5px solid green;borderWidth:5px;padding:0.5rem;display:inline-block;}","a.ExternalLink{text-decoration:none;color:rgb(0,0,238);background-color:#EEE;padding:3px;font-weight:bold;}",".cmmt{color:#888;}",".hidden{display:none;}",".attention{color:red; font-size:1.2em; font-weight:bold;}","#log2screen li{listStyle:'\\2713';paddingLeft:6px;margin:0.5rem 0 0 -1.2rem;font-family:monospace}","#log2screen li.head{list-style-type:none;font-weight:bold;margin-top:0.8rem;margin-bottom:-0.2rem;font-family:revert;}",".err{fontStyle:italic; color:red; }","a{text-decoration:none; font-weight:bold;}","a:hover{text-decoration:underline;}","a[target]:before,a.internalLink:before,a.externalLink:before{color:rgba(0,0,238,0.7);font-size:1.1rem;padding-right:2px;vertical-align:baseline;}",`a[target="_blank"]:before,a.externalLink:before{content:'\\2197';}`,`a[data-top]:before,a.internalLink:before,a[target="_top"]:before{content:'\\21BA';}`)}return on(Mo);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dynamic-html-helpers",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Helpers for ES/JS/HTML projects",
5
5
  "keywords": [
6
6
  "es20xx",