dynamic-html-helpers 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Bundle/htmlhelpers.min.js +13 -13
- package/Bundle/htmlhelpers.script.js +2561 -0
- package/Bundle/htmlhelpers.script.min.js +2 -1
- package/index.js +0 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var{IS:m,maybe:et,$Wrap:Oo,xProxy:Do,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"),p();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:j,isNaN:k,isInfinity:M,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 k:return f?"NaN":e({trial:P=>String(w)})===String(a);case M:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case j===Boolean:return l?j===l:"Boolean";default:return g(a,l,f,s(a,j))}}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]),j=a==null,k=!j&&Object.getPrototypeOf(a)?.constructor,M=Number.isNaN(a)||e({trial:P=>String(a)==="NaN"}),Z=e({trial:P=>String(a)})==="Infinity";return{noInput:j,noShouldbe:c,compareTo:f,inputCTOR:k,isNaN:M,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function g(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 p(){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 Je={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 pn(r):return Qe(t,r,n);default:return Qe(t,r,n,!0)}},enumerable:!1,configurable:!1};return new Proxy({},e)}function Qe(e,t,n,r=!1){return Object.defineProperty(e,t,{get(){return r?o=>mn(n):gn(t)}}),e[t]}function an(e,t,n){return t=t?.isJQx&&t.first()||t,et({trial:r=>dn(t)?e.append(t):nt(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} (for root ${e}) not created, reason
|
|
2
|
-
`,r)})}function
|
|
3
|
-
=> @charset, @namespace and @import are not supported here`),{done:!0}}function
|
|
1
|
+
var{IS:d,maybe:et,$Wrap:No,isNothing:Lo,xProxy:Io,addSymbolicExtensions:Ao}=tn({useSymbolicExtensions:!1});function tn(e={}){let{useSymbolicExtensions:t}=e,{xProxy:n,addSymbolicExtensions:r}=nn(a,f,t),o=D(),[i]=[A()];return n.custom(),t&&r(),{IS:a,maybe:o,$Wrap:i,isNothing:v,xProxy:n,addSymbolicExtensions:r};function a(c,...h){let O=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!o({trial:j=>"isTypes"in(h?.[0]??{})}):return s(c,h[0]);default:return h.length>1?p(O,...h):y(c,...h)}}function s(c,h){switch(!0){case"defaultValue"in h:return l(c,h);case"notTypes"in h:return u(c,h);default:return a(c,...[h.isTypes].flat())}}function f(c){return c?.[Symbol.proxy]??a(c)}function y(c,...h){let{noInput:O,noShouldbe:j,compareTo:M,inputCTOR:Z,isNaN:Kt,isInfinity:Xt,shouldBeFirstElementIsNothing:en}=m(c,...h);switch(h=h.length&&h[0],!0){case en:return String(c)===String(M);case(c?.[Symbol.proxy]&&j):return c[Symbol.proxy];case Kt:return j?"NaN":String(M)===String(c);case Xt:return j?"Infinity":String(M)===String(c);case O:return j?String(c):String(M)===String(c);case Z===Boolean:return h?Z===h:"Boolean";default:return b(c,h,j,S(c,Z))}}function m(c,...h){let O=h.length<1,j=c==null;return{noInput:j,noShouldbe:O,compareTo:!O&&h[0],inputCTOR:!j&&Object.getPrototypeOf(c)?.constructor,isNaN:Number.isNaN(c)||o({trial:M=>String(c)==="NaN"}),isInfinity:o({trial:M=>String(c)})==="Infinity",shouldBeFirstElementIsNothing:!O&&v(h[0])}}function S(c,h){switch(!0){case c===0:return Number;case c==="":return String;case!c:return{name:String(c)};default:return h}}function b(c,h,O,j){switch(!0){case(!O&&h===c||c?.[Symbol.proxy]&&h===Proxy):return!0;case String(h)==="NaN":return String(c)==="NaN";case(c?.[Symbol.toStringTag]&&a(h,String)):return String(h)===c[Symbol.toStringTag];default:return h?w(c,h,j):T(c,j)}}function T(c,h){return c?.[Symbol.toStringTag]&&`[object ${c?.[Symbol.toStringTag]}]`||h?.name||String(h)}function w(c,h,O){return o({trial:j=>c instanceof h})||h===O||h===Object.getPrototypeOf(O)||`${h?.name}`===O?.name}function p(c,...h){return h.some(O=>a(c,O))}function v(c,h=!1){let O=c==null;return O=h?O||a(c,1/0)||a(c,NaN):O,O}function D(){let c=h=>{};return function({trial:h,whenError:O=c}={}){try{return h()}catch(j){return O(j)}}}function A(){return function(c){return Object.freeze({get value(){return c},get[Symbol.type](){return f(c)},get type(){return f(c)},[Symbol.is](...h){return a(c,...h)},is(...h){return a(c,...h)}})}}function l(c,{defaultValue:h,isTypes:O=[void 0],notTypes:j}={}){return O=O?.constructor!==Array?[O]:O,j=j&&j?.constructor!==Array?[j]:[],j.length<1?a(c,...O)?c:h:u(c,{isTypes:O,notTypes:j})?c:h}function u(c,{isTypes:h=[void 0],notTypes:O=[void 0]}={}){return h=h?.constructor!==Array?[h]:h,O=O?.constructor!==Array?[O]:O,a(c,...h)&&!a(c,...O)}function g(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return f(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...c){return a(this,...c)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(c){return f(c)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(c,...h){return a(c,...h)},enumerable:!1,configurable:!1}}))}function x(c){let h=c.set;return c.set=(O,j,M)=>j===Symbol.proxy?O[j]=M:h(O,j,M),c}}function nn(e,t,n){return{xProxy:a(),addSymbolicExtensions:r};function r(){Symbol.is||(Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type")),Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return t(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...s){return e(this,...s)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(s){return t(s)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(s,...f){return e(s,...f)},enumerable:!1,configurable:!1}}))}function o(s){return Object.getPrototypeOf(s)?.constructor?.name||"Object"}function i(s){return function(){Proxy=new s(s,{construct(f,y){for(let S of y)S.set&&(S=modifySetter(S));let m=new f(...y);return m[Symbol.proxy]=`Proxy (${o(y[0])})`,m}})}}function a(){Symbol.proxy||(Symbol.proxy=Symbol.for("toa.proxy"));let s=Proxy;return{native(){Proxy=s},custom:i(s)}}}var rn=ln(),be=on(),ee=an();function on(){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 an(){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 ln(){return["::backdrop{background-color:grey;opacity:0.2;}",`#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`,"@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}","@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}","@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}","@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"]}var Je={html:"innerHTML",text:"textContent",class:"className"},sn=un();function un(){let e={get(t,n){let r=String(n)?.toLowerCase();switch(!0){case r in t:return t[r];case bn(r):return Qe(t,r,n);default:return Qe(t,r,n,!0)}},enumerable:!1,configurable:!1};return new Proxy({},e)}function Qe(e,t,n,r=!1){return Object.defineProperty(e,t,{get(){return r?o=>yn(n):Sn(t)}}),e[t]}function cn(e,t,n){return t=t?.isJQx&&t.first()||t,et({trial:r=>hn(t)?e.append(t):nt(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} (for root ${e}) not created, reason
|
|
2
|
+
`,r)})}function fn(e,t,...n){let r=mn(t,e);return n?.forEach(o=>cn(r,o,e)),r}function mn(e,t){switch(e=je(t)?gn(e):e?.isJQx?e.first():e,!0){case d(e,String):return G(t,nt(e,t)?{html:e}:{text:e});case d(e,Node):return pn(t,e);default:return G(t,e)}}function dn(e){return delete e.data,Object.keys(e).length<1||Object.keys(e).forEach(t=>{let n=t.toLowerCase();n in Je&&(e[Je[n]]=e[t],delete e[t])}),e}function pn(e,t){let n=G(e);return n.append(t),n}function G(e,t={}){t=tt(t,{});let n=Object.entries(t.data??{}),r=Object.assign(je(e)?new Comment(t?.text):document.createElement(e),dn(t));return n.length&&n.forEach(([o,i])=>r.dataset[o]=String(i)),r}function tt(e,t){return t?d(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:t}):d(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function gn(e){return tt(e)?e?.text??e?.textContent??"":String(e)}function yn(e){return G("b",{style:"color:red",text:`'${e}' is not a valid HTML-tag`})}function nt(e,t){return!je(t)&&d(e,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(e)}function hn(e){return e?.constructor===Comment||e?.constructor===CharacterData}function je(e){return e?.constructor===Comment||/comment/i.test(e)}function bn(e){return!d(G(e),HTMLUnknownElement)}function Sn(e){return(t,...n)=>fn(e,t,...n)}var{IS:oe,maybe:Mo,$Wrap:ko,xProxy:Eo,isNothing:Po}=xn();function xn(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),p();let e=S(),[t,n]=[b(),A()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:m,xProxy:n};function r(l,...u){if(e({trial:x=>"isTypes"in(u?.[0]??{})})){let x=u[0];return"defaultValue"in x?T(l,x):"notTypes"in x?w(l,x):r(l,...[x.isTypes].flat())}let g=typeof l=="symbol"?Symbol.isSymbol:l;return u.length>1?y(g,...u):i(l,...u)}function o(l){return l?.[Symbol.proxy]??r(l)}function i(l,...u){let{noInput:g,noShouldbe:x,compareTo:c,inputCTOR:h,isNaN:O,isInfinity:j,shouldBeFirstElementIsNothing:M}=s(l,...u);switch(u=u.length&&u[0],!0){case M:return String(l)===String(c);case(l?.[Symbol.proxy]&&x):return l[Symbol.proxy];case O:return x?"NaN":e({trial:Z=>String(c)})===String(l);case j:return x?"Infinity":e({trial:Z=>String(c)})===String(l);case g:return x?String(l):String(c)===String(l);case h===Boolean:return u?h===u:"Boolean";default:return f(l,u,x,a(l,h))}}function a(l,u){return l===0?Number:l===""?String:l?u:{name:String(l)}}function s(l,...u){let g=u.length<1,x=!g&&u[0],c=!g&&m(u[0]),h=l==null,O=!h&&Object.getPrototypeOf(l)?.constructor,j=e({trial:Z=>String(l)})==="NaN",M=e({trial:Z=>String(l)})==="Infinity";return{noInput:h,noShouldbe:g,compareTo:x,inputCTOR:O,isNaN:j,isInfinity:M,shouldBeFirstElementIsNothing:c}}function f(l,u,g,x){switch(!0){case(!g&&u===l||l?.[Symbol.proxy]&&u===Proxy):return!0;case e({trial:c=>String(u)})==="NaN":return String(l)==="NaN";case(l?.[Symbol.toStringTag]&&r(u,String)):return String(u)===l[Symbol.toStringTag];default:return u?e({trial:c=>l instanceof u})||u===x||u===Object.getPrototypeOf(x)||`${u?.name}`===x?.name:l?.[Symbol.toStringTag]&&`[object ${l?.[Symbol.toStringTag]}]`||x?.name||String(x)}}function y(l,...u){return u.some(g=>r(l,g))}function m(l,u=!1){let g=l==null;return g=u?g||r(l,1/0)||r(l,NaN):g,g}function S(){let l=(u,g)=>u?.constructor===Function?u(g):void 0;return function({trial:u,whenError:g=()=>{}}={}){try{return l(u)}catch(x){return l(g,x)}}}function b(){return function(l){return Object.freeze({get value(){return l},get[Symbol.type](){return o(l)},get type(){return o(l)},[Symbol.is](...u){return r(l,...u)},is(...u){return r(l,...u)}})}}function T(l,{defaultValue:u,isTypes:g=[void 0],notTypes:x}={}){return g=g?.constructor!==Array?[g]:g,x=x&&x?.constructor!==Array?[x]:[],x.length<1?r(l,...g)?l:u:w(l,{isTypes:g,notTypes:x})?l:u}function w(l,{isTypes:u=[void 0],notTypes:g=[void 0]}={}){return u=u?.constructor!==Array?[u]:u,g=g?.constructor!==Array?[g]:g,r(l,...u)&&!r(l,...g)}function p(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...l){return r(this,...l)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(l){return o(l)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(l,...u){return r(l,...u)},enumerable:!1,configurable:!1}}))}function v(l){let u=String(Object.getPrototypeOf(l)?.constructor);return u.slice(u.indexOf("ion")+3,u.indexOf("(")).trim()}function D(l){let u=l.set;return l.set=(g,x,c)=>x===Symbol.proxy?g[x]=c:u(g,x,c),l}function A(){let l=Proxy;return{native(){Proxy=l},custom(){Proxy=new l(l,{construct(u,g){for(let c of g)c.set&&(c=D(c));let x=new u(...g);return x[Symbol.proxy]=`Proxy (${v(g[0])})`,x}})}}}}var rt=vn;function vn({styleSheet:e,createWithId:t}={}){let{tryParseAtOrNestedRules:n,ruleExists:r,checkParams:o,sheet:i,removeRules:a,consider:s,currentSheetID:f}=wn({styleSheet:e,createWithId:t});function y(w,p){if(w&&p.removeProperties){Object.keys(p.removeProperties).forEach(v=>w.style.removeProperty(We(v)));return}Object.entries(p).forEach(([v,D])=>{v=We(v.trim()),D=D.trim();let A;if(/!important/.test(D)&&(D=D.slice(0,D.indexOf("!important")).trim(),A="important"),!CSS.supports(v,D))return console.error(`StylingFactory ${f} error: '${v}' with value '${D}' not supported (yet)`);Ue(()=>w.style.setProperty(v,D,A),`StylingFactory ${f} (setRule4Selector) failed`)})}function m(w,p,v=i){if(w=w?.trim?.(),!oe(w,String)||!w.length||/[;,]$/g.test(w))return console.error(`StylingFactory ${f} (setRules): [${w||"[no selector given]"}] is not a valid selector`);if(p.removeRule)return a(w);let D=r(w,!0),A=D||v.cssRules[v.insertRule(`${w} {}`,v.cssRules.length||0)];return s(()=>y(A,p),w,D)}function S(w){let p=w.trim().split(/{/,2),v=p.shift().trim();if(!oe(v,String)||!v?.trim()?.length)return console.error(`StylingFactory ${f} (doParse): no (valid) selector could be extracted from rule ${Se(w)}`);let D=Nn(p.shift());return Ue(()=>m(v,D),`StylingFactory ${f} (setRules) failed`)}function b(w){let p=n(w);return p.done?p.existing:S(w)}function T(w,p){return w.trim().startsWith("@media")?b($n(w,p)):m(w,p)}return function(w,p={}){return o(w,p)&&(Object.keys(p).length?T(w,p):b(w))}}function wn({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(b){let T=document.querySelector(`#${b}`)?.sheet;if(T)return T;let w=Object.assign(document.createElement("style"),{id:b});return document.head.insertAdjacentElement("beforeend",w),w.sheet}function i(b){return console.error(`StylingFactory ${r} [rule: ${b}]
|
|
3
|
+
=> @charset, @namespace and @import are not supported here`),{done:!0}}function a(b,T){return[...e.rules].find(w=>T?qe(w.selectorText||"",b):Dn`${On(b)}${[..."gim"]}`.test(w.cssText))}function s(b){return/^@charset|@import|namespace/i.test(b.trim())?i(b):b.match(/}/g)?.length>1?{existing:m(b,1),done:!0}:{done:!1}}function f(b){let T=[...e.cssRules].reduce((p,v,D)=>qe(v.selectorText||"",b)&&p.concat(D)||p,[]),w=T.length;return T.forEach(p=>e.deleteRule(p)),w>0?console.info(`\u2714 Removed ${w} instance${w>1?"s":""} of selector ${b} from ${r.slice(4)}`):console.info(`\u2714 Remove rule: selector ${b} does not exist in ${r.slice(4)}`)}function y(b,T){return b&&oe(b,String)&&b.trim().length>0&&oe(T,Object)||(console.error(`StylingFactory ${r} called with invalid parameters`),!1)}function m(b){b=b.trim();let T=b.slice(0,b.indexOf("{")).trim(),w=!!a(T);try{return e.insertRule(`${b}`,e.cssRules.length),w}catch(p){return console.error(`StylingFactory ${r} (tryParse) ${p.name} Error:
|
|
4
4
|
${p.message}
|
|
5
|
-
Rule: ${Se(
|
|
6
|
-
${n}`),
|
|
5
|
+
Rule: ${Se(b)}
|
|
6
|
+
${n}`),w}}function S(b,T,w){try{return b(),w}catch(p){return console.error(`StylingFactory ${r} (tryAddOrModify) ${p.name} Error:
|
|
7
7
|
${p.message}
|
|
8
|
-
Rule: ${Se(
|
|
9
|
-
${n}`),
|
|
10
|
-
`)}function
|
|
11
|
-
`).map(r=>r.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),n)}function We(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Ue(e,t){try{return e()}catch(n){console.error(`${t||"an error occured"}: ${n.message}`)}}function
|
|
8
|
+
Rule: ${Se(T)}
|
|
9
|
+
${n}`),w}}return{sheet:e,removeRules:f,tryParseAtOrNestedRules:s,ruleExists:a,checkParams:y,tryParse:m,consider:S,currentSheetID:r}}function $n(e,t){return`${e.trim()} ${Object.entries(t).map(([n,r])=>`${n}: { ${Tn(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 Tn(e){return Object.entries(e).map(([t,n])=>`${t}: ${n.trim()}`).join(`;
|
|
10
|
+
`)}function On(e){return e.replace(/([*\[\]()-+{}.$?\\])/g,t=>`\\${t}`)}function Dn(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 We(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Ue(e,t){try{return e()}catch(n){console.error(`${t||"an error occured"}: ${n.message}`)}}function jn(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
|
|
14
|
-
`)),r}function
|
|
15
|
-
`)),r}function
|
|
16
|
-
`));default:return r}}return Object.defineProperties(r,{log:{value:g,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 lt(e,r);m(r,String)&&it(n)&&e.setAttribute(n,r.split(/[, ]/)?.join(" "))}}function lt(e,t){if(e&&m(t,Object))for(let[n,r]of Object.entries(t))e.setAttribute(`data-${H(n)}`,r)}function st(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 Ye(e,t){return e.andThen(t)}function _e(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,g=+n.opacity==0||+(t.opacity||1)==0;return!(i||u||g||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(ct(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 ut(){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 ct(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 ft(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 mt(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:ct,isText:Xn,isHtmlString:Ae,isArrayOfHtmlElements:Ie,isArrayOfHtmlStrings:ft,ElemArray2HtmlString:qn,input2Collection:st,setCollectionFromCssSelector:mt,cssRuleEdit:rt({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-${ut().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:Ye,afterMe:Ye,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:_e,beforeMe:_e,clear(t){return O(t,Be)},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,Be)},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&&!it(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=>lt(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){r=m(r,Function)?r:Event,o=m(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0};let i=new r(n,o);return t.is.empty||t.each(s=>s.dispatchEvent(i)),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:Io,isText:Eo,isHtmlString:ko,isArrayOfHtmlElements:Mo,isArrayOfHtmlStrings:Zo,ElemArray2HtmlString:Po,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 Ge(e,t){return(...n)=>m(e,Function)&&e(re(t),...n)}function mr(e,t,n){switch(!0){case m(t,Symbol):return et({trial:()=>e[t],whenError:()=>e});case m(+t,Number):return e.collection?.[t]||void 0;case t in Te:return Ge(Te[t],n)();case t in ae:return Ge(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 pr(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 Ke(...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 gr(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(je(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:g,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 p={type:v,selector:i||o,capture:d,name:b,once:S,node:g,about:h};switch(!0){case(m(v,Array)&&v.length>0):for(let x of v)p.type=x,Xe(s,p,e);break;default:return Xe(s,p,e)}}}function Xe(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,g)=>Oe(u,g),n=function(u){return rt({createWithId:u||`jqx${ut()}`})},r=function(...u){for(let g of u)Oe(g)},o=pr(e),i=kn(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:g,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(p,x=!1){return x?e.comment(p):document.createTextNode(p)},node(p,x=document){return x.querySelector(p,x)},nodes(p,x=document){return[...x.querySelectorAll(p,x)]},clearAllTimers:Fn,get staticFn(){return function(p,x,T){return b(p,x,T)}},get toBool(){return _n},get getNamedListener(){return v},get virtual(){return gr(e)},get allowTag(){return s.allow},get prohibitTag(){return s.prohibit},get removeCssRule(){return Ke},get removeCssRules(){return Ke},get delegate(){return xr(g)},get delegateCaptured(){return g},get handle(){return g},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(Nr());function Nr(){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(g=>n===g)?n:void 0;let o=Ae(e),i=!o&&ft(e)||o,s={collection:st(e)??[],isVirtual:r,isJQx:!0},u=Ie(s.collection);if(s.collection.length&&u)return r||s.collection.forEach(g=>{t.contains(g)||ve([g],t,n)}),re(s);if(i){if([e].flat().forEach(g=>s.collection.push(J(g))),s.collection.length>0){let g=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 mt(e,t,s),re(s)}}var R=Dr;var[U,q,ke,Me]=["2-digit","numeric","long","short"],le={fixed:{MM:{month:ke},M:{month:Me},m:{month:q},mm:{month:U},yyyy:{year:q},yy:{year:U},WD:{weekday:ke},wd:{weekday:Me},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=jr;function jr(e,t,n="l:default"){return/ds:|ts:/.test(n)?Cr(e,dt(void 0),n):Ar(e,dt(t||void 0),n)}function dt(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,g)=>n[g].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?Me:ke})}function Lt(e){return e.replace(/\s+/g,"")}var Er=kr;function kr(){let e=(r,o)=>{let i=isNaN(new Date(r)),s=isNaN(new Date(o));if(s){let[u,g,y]=Array(3).fill("end date not valid");return{error:!0,message:u,full:g,clean:y}}if(i){let[u,g,y]=Array(3).fill("start date not valid");return{error:!0,message:u,full:g,clean:y}}if(i&&!s){let[u,g,y]=Array(3).fill("start- and/or end date are not valid");return{error:!0,message:u,full:g,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 g=Math.abs(r-o),y=new Date(g),d=y.getUTCFullYear()-1970,S=y.getUTCMonth(),h=y.getUTCDate()-1,v=h%7,b=Math.floor(h/7),p=y.getUTCHours(),x=y.getUTCMinutes(),T=y.getUTCSeconds(),L=y.getUTCMilliseconds(),a=Math.floor(g/864e5);i={...i,fromUTC:r,toUTC:o,sign:"",years:d,months:S,days:h,hours:p,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=p+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}${p>0?`${p}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}${p>0?`${p}H`:""}${x>0?`${x}M`:""}${T>0?`${T}S`:""}`),i};function n(){let r=(...i)=>s=>i.reduce((u,g)=>g(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,g])=>[...s,`${g} ${o(g,u)}`],[]),i=>i.length<1?"Dates are equal":`${i.slice(0,-1).join(", ")}${i.length>1?" and ":""}${i.slice(-1).shift()}`)}}var Mr=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 g=parseInt(u,10);return Number.isNaN(g)?u:t?-g:+g})}).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=Mr(),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=kt(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 gt(e,{zoneTime:t=!1,formatStr:n,moreOptions:r}={}){return r=t?e.localeInfo.formatOptions+(r?`,${r}`:""):N.formatOptions+(r?`,${r}`:""),t?(e.localeInfo||(e.localeInfo=N),me(e,n,r)):zr(e,n,r)}function zr(e,t,n){let r=e.clone.relocate(N);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 yt(e,t=!1){let{locale:n,timeZone:r}=t?e.localeInfo:N,o=qt(n,r),i=e.format("MM|WD",o).split("|");return{locale:n,timeZone:r,monthName:i[0],dayName:i[1],dayNames:Wt(n),monthNames:He(n)}}function ht(e,t=!1){let[n,r,o,i]=Ze(e,t),s={values4Timezone:t?N.timeZone:e.timeZone,hours:n,minutes:r,seconds:o,milliseconds:i};return Object.freeze(s)}function Ze(e,t=!1){let n=`l:en-CA,${t?`tz:${N.timeZone}`:`tz:${e.timeZone}`},hrc:23,ts:medium`;return e.format("",n).split(/:/).map(Number).concat(e.getMilliseconds())}function bt(e,t){let n=t?`tz:${N.timeZone}`:`,tz:${e.timeZone}`,[r,o,i]=e.format("yyyy-mm-dd",n).split(/-/).map(Number);o-=1;let s=t?N.timeZone:e.timeZone;return Object.freeze({values4Timezone:s,year:r,month:o,date:i})}function St(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=new Intl.Locale(e.localeInfo.locale),n=t.getWeekInfo&&t.getWeekInfo().firstDay||1;return n=n===7?0:n,Et[n]}function kt(e,{sunday:t=!1}={}){let n=t?"sunday":Rr(e);return Pe(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=Fe(n.slice(0,3)+":"+n.slice(-2),!0),r=Fe(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($t(e,e.timeZone),{timeZone:e.timeZone}),t=D($t(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,g]=[`${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 ${g}`:""} ${o} ${t.timeZone}`,n}function xt(e,t){t=String(t).toLowerCase()==="utc"||t.timeZone==="UTC"?e.clone.relocate({timeZone:"UTC"}):D(e.value,{timeZone:t.timeZone||N.timeZone});let n=Mt({start:e.clone,end:t}),r=`${n.sign}${vt(n.hours)}:${vt(n.minutes)}`;return{fromTZ:e.timeZone,toTZ:t.timeZone,offset:r,offsetText:`${t.timeZone} ${Qr(r)} ${e.timeZone}`}}function vt(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 wt(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?wt(e,t,$D.localeInformation.formatOptions):wt(e,t,n);let o=e.clone.relocate({locale:"en"}),i=r?N.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:N.timeZone,weekday:"short"});return It(n.format(e))}function Ur(e){let t=N,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,g=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:g,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 Pe(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 $t(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 Tt(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 Fe(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 Ot(e,t){return Intl.DateTimeFormat("en-CA",{timeZone:t,timeZoneName:"long"}).format(e).split(/,/)[1].trim()}function Ht(e,t){t=t||e?.timeZone||N.timeZone,e=e?.value?e:e?.constructor===Date?D(e,{timeZone:t}):D({timeZone:t});let n=e.year||e.getFullYear(),r=Ot(new Date(n,0,1),t),o=Ot(new Date(n,5,1),t);return r!==o}function Rt(e,t){return t=t||e?.timeZone||N.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 ze(e,t){let n=Jt(new Date(e,11,t||31));return n===1?ze(e,(t||31)-1):n}function Dt(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 Tt(r,i)},daysUntil(i){return Hr(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 kt(r,{sunday:i,midnight:s})},format(i,s){return gt(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 Pe(r,{day:i,next:!0,preserveTodayWhenEqual:!!s})},offsetFrom(i){return xt(r,i)},previous(i,s){return Pe(r,{day:i,next:!1,preserveTodayWhenEqual:!!s})},relocate({locale:i,timeZone:s,l:u,tz:g}={}){return Yr(r,{locale:i,timeZone:s,l:u,tz:g})},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:g}={}){return B(r,{hours:i,minutes:s,seconds:u,milliseconds:g})},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 gt(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:g}){e=ce({locale:i,timeZone:s,l:u,tz:g})},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:g}){B(r,{hours:i,minutes:s,seconds:u,milliseconds:g})},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 Tt(r)},get date(){return bt(r,!0)},get dateNr(){return r.date.date},get dateTime(){return{...r.date,...r.time}},get dateTimeValues(){return se(r,!0)},get dateValues(){return St(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 yt(r)},get quarter(){return Dt(r)},get quarterNr(){return Dt(r,!0)},get removeTime(){return Vr(r)},get seconds(){return r.time.seconds},get time(){return ht(r,!0)},get timeValues(){return Ze(r,!0)},get timeZone(){return(e||ce()).timeZone},get unixEpochTimestamp(){return Math.floor(+r/1e3)},get userLocaleInfo(){return N},get UTC(){return r.clone.relocate({locale:r.locale,timeZone:"UTC"})},get UTCOffset(){return xt(r,"UTC")},get value(){return new Date(r)},get weeknr(){return Jt(r)},get weeksInYear(){return ze(r.year,31)},get year(){return r.date.year},get zoneDate(){return bt(r,!1)},get zoneDateNr(){return r.zoneDate.date},get zoneDateTime(){return{...r.zoneDate,...r.zoneTime}},get zoneDateTimeValues(){return se(r,!1)},get zoneDateValues(){return St(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 yt(r,!0)},get zoneSeconds(){return r.zoneTime.seconds},get zoneTime(){return ht(r)},get zoneTimeValues(){return Ze(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(Bt(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 N=Ut(Intl.DateTimeFormat().resolvedOptions()),Xr=Object.getOwnPropertyNames(Date.prototype).filter(e=>e.startsWith("set")).reduce((e,t)=>[...e,{native:t,syn:"change"+t.slice(3)}],[]);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 He(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=He().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 Ut(e){let t=qt(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 qt(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=jt({trial:function(){return Intl.DateTimeFormat(e,{timeZone:N.timeZone}).resolvedOptions().locale},onError:function(){return console.warn(`Intl locale "${e}" best fit impossible, using "${N.locale}"`),N.locale}}),t=jt({trial:function(){return Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions().timeZone},onError:function(){return console.warn(`timeZone "${t}" not valid. Using "${N.timeZone}"`),N.timeZone}}),Ut(Intl.DateTimeFormat(e,{timeZone:t}).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 jt({trial:e,onError:t=()=>{}}={}){if(e?.constructor===Function)try{return e()}catch(n){return t?.constructor===Function?t(n):void 0}}function ro({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),g=i.offsetFrom(s).offset,[y,d]=Fe(g,!0),S=s.clone.add(`${y} hours, ${d} minutes`),h=u.equalDates?"No difference":`Time offset ${g}: ${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 oo(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 Bt(e,t){let n=oo(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 io(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 He(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||N)}},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:ro},weeksInYear:{value(n){return ze(n,31)}},keys:{get(){let n=Object.fromEntries(Object.entries(t).filter(([r,o])=>o.enumerable===!0));return[...Object.keys(Qt()),...Object.keys(Bt()),...Object.keys(n)].sort((r,o)=>r.localeCompare(o))}}}),e}var Vt={},D=io(ao,Vt);function ao(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:Vt})}var lo=Object.defineProperties(Yt,{escape:{value:ho,enumerable:!0}});function Yt(e,...t){let{flags:n,cleanedArgs:r}=uo(...t);return fo(new RegExp(bo(so(e,...r)),n))}function so(e,...t){return Y(t)?e.raw.reduce((n,r,o)=>n.concat(t[o-1]||"").concat(r),""):e.raw.join("")}function uo(...e){let t=Re(co(e.at(-1)));return{flags:t,cleanedArgs:Y(t)?e.slice(0,-1):e}}function co(e){return pe(e,Array)?e.join(""):""}function fo(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=yo(n,e),t},enumerable:!1},clone:{get(){return go(t)},enumerable:!1}}),po(e));return t}function Y(e){return e?.length>0}function pe(e,t){return e?.constructor===t}function mo(e,t,n){let r=Reflect.get(n,t);return{fromInstance:Reflect.get(e,t),fromRegExpMethod:pe(r,Function)?r.bind(e.re):e.re[t]}}function po(e){return{get(t,n){let{fromInstance:r,fromRegExpMethod:o}=mo(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 Yt`${t} ${n}`}function Re(e,t){return t=(t??"").replace(/^-r\|/,""),e=t.concat(pe(e,String)&&Y(e)?e:""),[...new Set([...e])].join("").replace(/[^dgimsuvy]/g,"")}function yo(e,t){switch(!0){case(!pe(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,Re(e));default:return t=new RegExp(t.source,Re(t.flags,e))}}function ho(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 bo(e){return e.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm,"").replace(/\s/g,"").trim().replace(/<!([^>]\d+)>/g,(t,n)=>String.fromCharCode(+n)??t)}var{IS:So}=xo(),_=So;function xo(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),p();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:j,isNaN:k,isInfinity:M,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 k:return f?"NaN":e({trial:P=>String(w)})===String(a);case M:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case j===Boolean:return l?j===l:"Boolean";default:return g(a,l,f,s(a,j))}}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]),j=a==null,k=!j&&Object.getPrototypeOf(a)?.constructor,M=Number.isNaN(a)||e({trial:P=>String(a)==="NaN"}),Z=e({trial:P=>String(a)})==="Infinity";return{noInput:j,noShouldbe:c,compareTo:f,inputCTOR:k,isNaN:M,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function g(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 p(){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 _t=Gt(void 0),vo=Gt("");Object.defineProperties(String.prototype,{[Symbol.for("interpolate")]:{value(...e){return _t(this,...e)}},[Symbol.for("interpolate$")]:{value(...e){return vo(this,...e)}}});function Gt(e){return e=_(e,String,Number)?String(e):void 0,function(y,...d){return g(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 g(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))}}To();wo();function wo(){/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 Vo(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):$o(u,e);let g=u.startsWith("!!");u=g?u.slice(2):u,R.li(g?{class:"head"}:"",u).renderTo(t,s)}}let[r,o]=[n(),n(!0)];return{log:(...i)=>i.forEach(r),logTop:(...i)=>i.forEach(o)}}function $o(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 To(){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,Vo as logFactory,lo as regexhelper,_t as splat};
|
|
13
|
+
`)}function Cn(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 Nn(e){return Cn(jn(e))}function qe(e,t){return e?.replace("::",":")===t?.replace("::",":")}var xe=!1,Ln={on:()=>xe=!0,off:()=>xe=!1},K={tagsRaw:ee,allowUnknownHtmlTags:Ln,isAllowed(e){if(xe)return!0;let t=d(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},In=!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 An(e){if(In&&Object.keys(e.removed).length){let t=Object.entries(e.removed).reduce((n,[r,o])=>[...n,`${ie(r)} => ${o}`],[]).join("\\000A");k.error(`JQx: HTML creation error(s): ${t}`)}}function Mn(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 d(e,HTMLElement)&&[...e.childNodes].forEach(n=>{if(n?.children?.length&&Ce(n),n?.attributes){let r=d(n,SVGElement)?be.svg:be.html;[...(n??{attributes:[]}).attributes].forEach(o=>{let i=o.name.trim().toLowerCase(),a=o.value.trim().toLowerCase().replace(te.whiteSpace,""),s=i==="href"?!te.validURL.test(a):te.notAllowedValues.test(a),f=i.startsWith("data")?!te.data.test(i):!!r[i];if(s||f){let y=Ve(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(!(Mn(n)||n.constructor===CharacterData||n.constructor===Comment)){let r=(n?.outerHTML||n?.textContent).trim(),o=Ve(r,60)??"EMPTY";o+=o.length===60?"...":"",t.removed[`<${n.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${o}`,n.remove()}}),An(t),e}function kn(e){let t=document.createElement("div");return t.insertAdjacentHTML(F.end,e),t.childNodes.length?Ce(t):void 0}function En(e,t,n){switch(!0){case d(e,Comment):return t.insertAdjacentHTML(n,`<!--${e.data}-->`);case d(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)&&Pn(o,t,n);return i?[...r,i]:r},[])}function Pn(e,t=document.body,n=F.BeforeEnd){return n=n||F.BeforeEnd,t=t?.isJQx?t?.[0]:t,d(e,Comment,Text)?En(e,t,n):d(e,HTMLElement)?t.insertAdjacentElement(n,e):void 0}function J(e){if(d(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||d(t,String)&&!/^<(.+)[^>]+>/m.test(t))return document.createTextNode(n??t);let r=kn(e);return r.childNodes.length<1?J(`<span data-jqxcreationerror="1">${at(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(...rn);let t=[],[n,r]=[e("#jqxPopupContent"),e.node("#jqxPopup")],o={};return e.handle({type:"click, cancel",handlers:b,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:i,remove:a,removeModal:S});function i(p){if(r.open)switch(!0){case s(p):return;default:return a(),setTimeout(()=>i(p),200)}o={...p};let{content:v}=o;return e.IS(v,String,HTMLElement)||v?.isJQx?f():!0}function a(){return o.modal?w(o.warnMessage):y()}function s(p){for(let[v,D]of Object.entries(o))if(D!==p[v])return!1;return!0}function f(){n.clear();let{content:p,modal:v,closeAfter:D}=o;v=e.IS(v,Boolean)?v:!1;let A=v?"":e.div({id:"closeHandleIcon"});n.append(A,e.IS(p,String)?e.div(p):p),r.showModal(),!v&&e.IS(D,Number)&&T(a,D)}function y(){if(r.close(o.returnValue),m(),e.IS(o.callback,Function))return t.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function m(){t.forEach(p=>clearTimeout(p)),t=[]}function S({callback:p,value:v}={}){o.returnValue=v,o.modal=!1,o.callback=p||o.callback,a()}function b({evt:p}){if(!(Object.keys(o).length<1||!r.open)&&(p.type==="cancel"&&o.modal&&p.preventDefault(),p.target.closest("#closeHandleIcon")||!p.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),a()}function T(p,v){e.IS(p,Function)&&e.IS(v,Number)&&v>0&&(m(),t.push(setTimeout(p,v*1e3)))}function w(p){if(!e.IS(p,String,HTMLElement,Proxy))return;let v=n.find$(".warn");switch(!0){case v.is.empty:v=e.div({class:"warn"},p);default:n.append(v.addClass("active")),T(()=>n.find$(".warn").removeClass("active"),2)}}}function Fn(e){let t={},n="anonymous_";function r(m){if(m){let{handler:S,capture:b,type:T}=m;document.addEventListener(T,S,{capture:b})}}function o(m){if(m){let{type:S,handler:b,capture:T}=m;document.removeEventListener(S,b,{capture:T})}}function i(m,S,b,T){return function(w){if(!I(S))return m({evt:w});let p=w.target.closest(S);if(p){let v=e(p);m({self:v,me:v,evt:w}),b&&f(w.type,T)}return!0}}function a(m){return t[m]=t[m]||{},t[m]}function s(m,S){return Object.entries(a(m)).find(([b])=>b===S)}function f(m,S){let b=s(m,S);b&&(o(b[1]),delete t[m][S],delete we[S],k.warn(`Removed listener [${S}] for event type [${m}].`))}function y(m){let{type:S,handler:b,name:T,capture:w,once:p,selector:v,node:D,about:A}=m;t[S]=t[S]||{};let l=Qn(T||b.name),u=b;if(D instanceof HTMLElement){let g=D.dataset.hid||l;D.dataset.hid=g,v=`[data-hid=${g}]`}switch(!0){case!t[S][l]:return k.log(`JQx: created listener for event type ${S}, with handler name ${l}`),t[S][l]={name:l,handler:i(b,v,p,l),capture:Un(S,w),once:!!p,type:S,initialHandler:u,selector:!!v&&v||!1,about:!!A&&A||!1,unListen(){f(S,l)}},t[S][l];default:return console.warn(`The listener [${l}] for [${S}] exists, it is not re-assigned.`)}}return{remove(...m){return f(...m)},listen:function(m){let{type:S,handler:b}=m;if(!I(S)||!d(b,Function))return;let T=y(m);if(T)return r(T),{type:S,name:T.name,unListen(){f(S,T.name)}}},get ListenerStore(){return Object.freeze({...t})}}}var k=qn(),zn=["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]}})),Hn=[...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}`)),Rn=Object.freeze({get(e,t){return e[Ne(t)]||e[t]},enumerable:!1,configurable:!1}),we={};function Jn(){let e=setTimeout(()=>{});for(;e>=0;)clearTimeout(e--)}function Qn(e){return I(e)&&!/^handler|handlers$/gi.test(e.trim())?e.trim():ot()}function Wn(e){let t=!!e.node&&!d(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 ot(e){let t=`anonymous_${Math.random().toString(36).slice(2)}`;return we[t]?ot():(we[t]=t,t)}function Un(e,t){return!!zn.find(n=>n===e)||!!t}function it(e){return e.startsWith("data")||be.html.find(t=>e.toLowerCase()===t)}function Be(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 I(e,t=1){return t=d(t,Number)&&t||1,d(e,String)&&e.length>=t}function Ve(e,t=120){return at(e,t).replace(/</g,"<")}function at(e,t=120){return`${e}`.trim().slice(0,t).replace(/>\s+</g,"><").replace(/</g,"<").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(e.length>t?" …":"").trim()}function ie(e){switch(!0){case d(e,String):let t=document.createElement("div");return t.append(e),t.innerHTML;default:return e}}function ge(e){return d(e,String)&&Object.assign(document.createElement("textarea"),{innerHTML:e}).textContent||e}function qn(){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 a(...y){return n.unshift(...y.map(m=>`${ye()} \u2A3B ${ge(m)}`)),console.error(n.slice(0,y.length).join(`
|
|
14
|
+
`)),r}function s(...y){return n.unshift(...y.map(m=>`${ye()} \u26A0 ${ge(m)}`)),console.warn(n.slice(0,y.length).join(`
|
|
15
|
+
`)),r}function f(...y){let m=y.map(S=>`${ye()} \u2714 ${ge(S)}`);switch(!t&&n.unshift(...m),e){case!0:console.log(m.join(`
|
|
16
|
+
`));default:return r}}return Object.defineProperties(r,{log:{value:f,enumerable:!1},error:{value:a,enumerable:!1},warn:{value:s,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 Bn(e,t){if(e)for(let[n,r]of Object.entries(t)){if(n=H(n),n.startsWith("data"))return lt(e,r);d(r,String)&&it(n)&&e.setAttribute(n,r.split(/[, ]/)?.join(" "))}}function lt(e,t){if(e&&d(t,Object))for(let[n,r]of Object.entries(t))e.setAttribute(`data-${H(n)}`,r)}function st(e){return e?d(e,Proxy)?[e.EL]:d(e,NodeList)?[...e]:W(e)?[e]:Ae(e)?e:e.isJQx?e.collection:void 0:[]}function Ye(e,t){return e.andThen(t)}function _e(e,t){return e.andThen(t,!0)}function W(e){return d(e,Text,HTMLElement,Comment)}function he(e,t){if(d(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 Vn(e){if(!d(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,a=parseInt(n.height)<1||parseInt(n.width)<1,s=e.offsetTop<0||e.offsetLeft+e.offsetWidth<0||e.offsetLeft>document.body.offsetWidth,f=+n.opacity==0||+(t.opacity||1)==0;return!(i||s||f||o||r||a)}function Yn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(t=>t===e):!1}function _n(e){return e?.filter(t=>t).reduce((t,n)=>t.concat(ct(n)?`<!--${n.data}-->`:Le(n)?n.textContent:n.outerHTML),"")}function ne(e,t=2){return`${e}`.padStart(t,"0")}function Gn(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 ut(){return`_${tr(Hn).slice(0,8).join("")}`}function Kn(e){return e=d(e,String)&&/,/.test(e)?e.split(",").map(t=>t.trim().toLowerCase()).filter(t=>t.length>0):e,d(e,Array)?e:d(e,String)&&e?.trim().toLowerCase()||""}function Xn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(t=>t===e):!1}function er(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 tr(e){let t=e.length;for(;t--;){let n=Gn(t);[e[t],e[n]]=[e[n],e[t]]}return e}function Ne(e){return d(e,String)?e.toLowerCase().split("-").map((t,n)=>n&&`${nr(t)}`||t).join(""):e}function H(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^-|-$/,"")}function nr([e,...t]){return`${e.toUpperCase()}${t.join("")}`}function Le(e){return d(e,Comment,Text)}function ct(e){d(e,Comment)}function rr(e){return d(e,Text)}function Ie(e){return d(e,String)&&/^<|>$/.test(`${e}`.trim())}function Ae(e){return d(e,Array)&&!e?.find(t=>!W(t))}function ft(e){return d(e,Array)&&!e?.find(t=>!Ie(t))}function C(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 or(e){return e.node?d(e.node,Comment)?`<!--${e.node.textContent}-->`:e.HTML.get(1).split(">")[0]+">...":""}function mt(e,t,n){let r=t!==document.body&&d(e,String)&&e.toLowerCase()!=="body"?t:document;try{n.collection=[...r.querySelectorAll(e)]}catch{k.warn(`JQx: Invalid CSS querySelector. [${d(e,String)?e:"Not a string!"}]`)}}function ir(){return{isCommentOrTextNode:Le,isNode:W,isComment:ct,isText:rr,isHtmlString:Ie,isArrayOfHtmlElements:Ae,isArrayOfHtmlStrings:ft,ElemArray2HtmlString:_n,input2Collection:st,setCollectionFromCssSelector:mt,cssRuleEdit:rt({createWithId:"JQxStylesheet"})}}function ar(){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 d(n,Node)?Object.freeze({get writable(){return Yn(n)},get modal(){return Xn(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return Vn(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return t.collection.length<1},get virtual(){return t.isVirtual}}):e}}function lr(e,t,n,r){n&&d(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-${ut().slice(1)}`,r.editCssRule(`.${o}`,t),e.classList.add(o)}var sr=ar();function ur(e){return{factoryExtensions:cr(e),instanceExtensions:fr(e)}}function cr(e){return{data(t){return{get all(){return new Proxy(t[0]?.dataset??{},Rn)},set(n={}){if(!t.is.empty&&d(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&&d(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 k.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=d(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=d(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=d(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 sr(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=d(r,String)&&!n.length?r.split("{")[0].trim():"";if(r=r&&d(r,String)?[r]:r,n=n&&d(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 fr(e){return{addClass(t,...n){return C(t,r=>r&&n.forEach(o=>r.classList.add(o)))},after:Ye,afterMe:Ye,andThen(t,n,r=!1){if(!n||!d(n,String,Node,Proxy))return k.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),t;n=n?.isJQx?n:d(n,Node)?e.virtual(n):e.virtual(J(n));let[o,i,a]=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=a,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&&I(o)){let i=o.trim(),a=/^<(.+)[^>]+>$/m.test(i)?J(o):e.text(o);C(t,s=>s.append(r?a:Q(a)))}W(o)&&C(t,i=>i.append(r?o:Q(o))),o.isJQx&&!o.is.empty&&C(t,i=>o.collection.forEach(a=>i.append(r?a:Q(a))))}return t},appendTo(t,n){switch(!0){case(!n.isJQx&&!d(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||d(t.node,Text,Comment))return t;if(!r&&I(n))return n=H(n),n==="class"?[...t.node.classList].join(" "):t.node.getAttribute(n);if(I(n)&&r)switch(n=H(n),!0){case n.startsWith("data-"):n={data:{[n.replace("data-","")]:r}};break;default:n={[n]:r}}return d(n,Object)&&!t.is.empty&&Bn(t.node,n),t},before:_e,beforeMe:_e,clear(t){return C(t,Be)},closest(t,n){let r=I(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 C(t,o=>lr(o,n,r,e))},duplicate(t,n=!1,r=document.body){switch(!0){case t.is.empty:return k.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 C(t,n)},empty(t){return C(t,Be)},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 C(t,n=>he(n,{display:"none !important"}))},html(t,n,r){switch(!0){case(t.is.empty&&!I(n)):return"";case!I(n):return t.node?.getHTML()??"";default:let o=J(`<div>${n.isJQx?n.HTML.get(!0):n}</div>`);return C(t,i=>(i.textContent=r?i.textContent:"",i.insertAdjacentHTML(e.at.end,o.getHTML())))}},htmlFor(t,n,r="",o=!1){if(t.is.empty||!I(n)||!I(r))return t;let i=t.find$(n);if(i.length<1)return t;let a=J(`<span>${r}</span>`);return i.each(s=>{o||(s.textContent=""),s.insertAdjacentHTML(e.at.end,a?.getHTML())}),t},isEmpty(t){return!t.node},nth$(t,n){return t.single(n)},on(t,n,...r){switch(!0){case(t.is.empty||!d(n,String,Array)||!I(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||!d(n,String,Array)||!I(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(I(o)){o=o.trim();let i=/^<(.+)[^>]+>$/m.test(o)?J(o):e.text(o);i=r?i:Q(i),C(t,a=>a.prepend(i.cloneNode(!0)))}W(o)&&C(t,i=>i.prepend(r?o:Q(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),C(t,i=>C(o,a=>i.prepend(r?a:Q(a)))),o.collection.reverse())}return t},prependTo(t,n){return n.isJQx||(n=e.virtual(n)),n.prepend(t),t},prop(t,n,r){if(d(n,String)&&!r)return n.startsWith("data")?t[0]?.dataset[n.slice(n.indexOf("-")+1)]:t[0]?.[n];let o=d(n,Object)?n:{[n]:r};for(let[i,a]of Object.entries(o)){if(i=i.trim(),a&&!it(i)||!a)return!1;if(i.toLowerCase()==="id")return t[0].id=a;C(t,s=>{if(i.startsWith("data"))return s.dataset[i.slice(i.indexOf("-")+1)]=a;s[i]=a})}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||(C(i,r),o()),t}return C(t,r),o(),t},rmAttr(t,...n){for(let r of n)t.node.removeAttribute(r);return t},removeClass(t,...n){return C(t,r=>{if(r)for(let o of n)r.classList.remove(o)})},renderTo(t,n,r){return n=d(n,HTMLElement)||n.isJQx?n:document.body,r=d(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||!d(r,HTMLElement)&&!r?.isJQx?(e.logger.error("JQx replace: invalid replacement value"),t):((r.isJQx||d(r,NodeList))&&(r=r[0]),o&&n&&(n=d(n,String)?o.querySelectorAll(n):n.isJQx?n.collection:n,d(n,HTMLElement,NodeList,Array)&&d(r,HTMLElement)&&(d(n,HTMLElement)?[n]:[...n]).forEach(i=>i.replaceWith(r.cloneNode(!0)))),t)},replaceClass(t,n,...r){return C(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=d(n,Element)?n:n.isJQx?n[0]:void 0,n&&(t[0].replaceWith(n),t=e.virtual(n)),t},setData(t,n){return C(t,r=>lt(r,n))},show(t){return C(t,n=>he(n,{display:"revert-layer !important"}))},single(t,n){let r=t.collection.length>0;switch(n=n??0,!0){case(r&&d(n,String)):return t.find$(n);case(r&&d(n,Number)):return e(t.collection[n]);case r:return t.collection[0];default:return t}},style(t,n,r){return C(t,o=>{r&&d(n,String)&&(n={[n]:r||"none"}),he(o,n)})},text(t,n,r=!1){switch(!0){case t.isEmpty():return t;case!d(n,String):return t.node.textContent;default:return C(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 C(t,r=>r.classList.toggle(n))},toNodeList(t){return[...t.collection].map(n=>document.importNode(n,!0))},trigger(t,n,r,o){r=d(r,Function)?r:Event,o=d(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0};let i=new r(n,o);return t.is.empty||t.each(a=>a.dispatchEvent(i)),t},val(t,n){switch(!0){case(t.is.empty||!d(t.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return t;case!d(n,String):return t.node.value;default:return t.node.value=d(n,String)?n:"",t}}}}var Te,ae,{isComment:Zo,isText:Fo,isHtmlString:zo,isArrayOfHtmlElements:Ho,isArrayOfHtmlStrings:Ro,ElemArray2HtmlString:Jo,cssRuleEdit:Oe,addFn:mr}=dr();function dr(){return{...ir(),addFn:pr}}function pr(e,t){return e=e?.trim(),!I(e)||!d(t,Function)?k.error("JQx.fn: method invalid parameter(s)"):ae[e]=(n,...r)=>t(n,...r)}function gr(e){return function(t,n,r){if(t=t?.trim(),!I(t)||!d(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 k.log(`JQx: added static extension function [${t}]`)}}function re(e){return new Proxy(e,Object.freeze({get:(t,n)=>yr(t,n,e)}))}function Ge(e,t){return(...n)=>d(e,Function)&&e(re(t),...n)}function yr(e,t,n){switch(!0){case d(t,Symbol):return et({trial:()=>e[t],whenError:()=>e});case d(+t,Number):return e.collection?.[t]||void 0;case t in Te:return Ge(Te[t],n)();case t in ae:return Ge(ae[t],n);default:return e[t]}}function hr(e){let t=wr(e);for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(t)))Object.defineProperty(e,n,r);return e}function br(e){return{allow(t){let n=/-/.test(t),r=n&&t;t=n?Ne(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 Ke(...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 Sr(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&&!d(n,HTMLBRElement))for(let i of o.collection)r?n.insertAdjacentElement(r,i):n.append(i);return o}}function xr(...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 vr(e,t,n,r){return e=H(r||e.toLowerCase()),{get(){return(...o)=>{let i=t&&n.virtual(Ce(sn[e](...o)))||void 0,a=d(i?.node,Comment,Text,void 0)?"":Wn(i);return k.log(t?`JQx: created (virtual) instance from [JQx].${e} ${a}`:`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=vr(e,t,n,r);return r?{[r]:o,[Ne(r)]:o}:{[e]:o,[e.toUpperCase()]:o}}function wr(e){return xr(Object.entries(K.tagsRaw).reduce($r(e),{}),Nr(e))}function $r(e){return function(t,[n,r]){return Object.defineProperties(t,De(n,r,e)),t}}function Tr(e){return function(t,n,...r){d(n,Function)&&(r.push(n),n=void 0),e({type:t,selector:n,handlers:r})}}function Or(e){return function(t){let{type:n,types:r,origin:o,selector:i,handler:a,handlers:s,node:f,name:y,capture:m,once:S,about:b}=t;a=s||a,n=r||n,i=o||i;let T=Kn(n),w=y;a=d(a,Function)?[a]:a;let p={type:T,selector:i||o,capture:m,name:w,once:S,node:f,about:b};switch(!0){case(d(T,Array)&&T.length>0):for(let v of T)p.type=v,Xe(a,p,e);break;default:return Xe(a,p,e)}}}function Xe(e,t,n){for(let r of e)n.listen({...t,handler:r})}function Dr(e){return function(t,n){return n=I(n)&&n,t=I(t)&&t,n&&t&&e.listenerStore[t][n]}}function jr(e){return e.activePopup||Object.defineProperty(e,"activePopup",{value:Zn(e),enumerable:!1}),e.activePopup}function Cr(e){let t=(s,f)=>Oe(s,f),n=function(s){return rt({createWithId:s||`jqx${ut()}`})},r=function(...s){for(let f of s)Oe(f)},o=br(e),i=Fn(e),a=Or(i);return{editCssRule:t,createStyle:n,editCssRules:r,allowProhibit:o,handle:a,capturedHandling:a,log:(...s)=>k.on.log(...s).off,warn:(...s)=>k.on.warn(...s).off,error:(...s)=>k.on.error(...s).off,handlerWrapper:i}}function Nr(e){let{factoryExtensions:t,instanceExtensions:n}=ur(e);Te=t,ae=n;let{editCssRule:r,createStyle:o,editCssRules:i,allowProhibit:a,handle:s,capturedHandling:f,log:y,warn:m,error:S,handlerWrapper:b}=Cr(e),T=Dr(e),w=gr(e);return{log:y,warn:m,error:S,editCssRules:i,createStyle:o,editStylesheet:o,editCssRule:r,escHtml:ie,logger:k,text(p,v=!1){return v?e.comment(p):document.createTextNode(p)},node(p,v=document){return v.querySelector(p,v)},nodes(p,v=document){return[...v.querySelectorAll(p,v)]},clearAllTimers:Jn,get staticFn(){return function(p,v,D){return w(p,v,D)}},get toBool(){return er},get getNamedListener(){return T},get virtual(){return Sr(e)},get allowTag(){return a.allow},get prohibitTag(){return a.prohibit},get removeCssRule(){return Ke},get removeCssRules(){return Ke},get delegate(){return Tr(f)},get delegateCaptured(){return f},get handle(){return f},get listen(){return b.listen},get at(){return F},get setStyle(){return r},get fn(){return mr},get lenient(){return K.allowUnknownHtmlTags},get IS(){return d},get Popup(){return jr(e)},get listenerStore(){return b.ListenerStore}}}var Lr=hr(Ir());function Ir(){return function(e,t,n=F.BeforeEnd){if(e?.isJQx)return e;let r=d(t,HTMLBRElement);t=(!r&&t&&t.isJQx?t[0]:t)||document.body,n=n&&Object.values(F).find(f=>n===f)?n:void 0;let o=Ie(e),i=!o&&ft(e)||o,a={collection:st(e)??[],isVirtual:r,isJQx:!0},s=Ae(a.collection);if(a.collection.length&&s)return r||a.collection.forEach(f=>{t.contains(f)||ve([f],t,n)}),re(a);if(i){if([e].flat().forEach(f=>a.collection.push(J(f))),a.collection.length>0){let f=a.collection.filter(S=>S?.dataset?.jqxcreationerror);a.collection=a.collection.filter(S=>!S?.dataset?.jqxcreationerror);let y=a.collection.map(S=>`${String(S.constructor).split(/function|\(/)[1].trim()}`).length>1;a=re(a);let m=a.collection.length>0?or(a):"sanitized: no elements remaining";k.log(`JQx: created ${a.isVirtual?"(virtual)":""} instance from ${y?"array of ":""}HTML string${y?"s":""} ${m}`),a.isVirtual||ve(a.collection,t,n)}return a}return mt(e,t,a),re(a)}}var R=Lr;var[U,q,ke,Ee]=["2-digit","numeric","long","short"],le={fixed:{MM:{month:ke},M:{month:Ee},m:{month:q},mm:{month:U},yyyy:{year:q},yy:{year:U},WD:{weekday:ke},wd:{weekday:Ee},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=Ar;function Ar(e,t,n="l:default"){return/ds:|ts:/.test(n)?Mr(e,dt(void 0),n):Er(e,dt(t||void 0),n)}function dt(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="",a=""){return t.replace(/~([\d+]?)/g,"$1").replace(/dtf/,r).replace(/era/,i).replace(/dp\b|~dp\b/,o).replace(/yn\b/,a).replace(/\[(\d+?)]/g,(s,f)=>n[f].trim()).trim()}}}function Nt(...e){return e?.reduce((t,n)=>({...t,...V.retrieveDynamic(n)||V.fixed[n]}),V.fixed.dl)}function Mr(e,t,n){let r=Nt(...Lt(n).split(",")),o=Intl.DateTimeFormat(r.locale,r).format(e);return t.finalize(o)}function kr(e,t){return e==="numeric"&&t.startsWith("0")?t.slice(1):t}function Er(e,t,n){let r=Nt(...t.units.concat(Lt(n).split(",")).flat()),o={...V.fixed},i=Intl.DateTimeFormat(r.locale,r).formatToParts(e).reduce((a,s)=>s.type==="literal"&&/[ ,/-]/.test(s.value)?a:{...a,[s.type]:kr(r[s.type],s.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,a=>/^(M|MM)$/.test(a)?Pr(e,r.locale,r.timeZone,/^M$/.test(a)):i[Object.keys(o[a]).shift()]||a),t.finalize(void 0,i.dayPeriod,i.era,i.yearName)}function Pr(e,t,n,r){return e.toLocaleString(t,{timeZone:n,month:r?Ee:ke})}function Lt(e){return e.replace(/\s+/g,"")}var Zr=Fr;function Fr(){let e=(r,o)=>{let i=isNaN(new Date(r)),a=isNaN(new Date(o));if(a){let[s,f,y]=Array(3).fill("end date not valid");return{error:!0,message:s,full:f,clean:y}}if(i){let[s,f,y]=Array(3).fill("start date not valid");return{error:!0,message:s,full:f,clean:y}}if(i&&!a){let[s,f,y]=Array(3).fill("start- and/or end date are not valid");return{error:!0,message:s,full:f,clean:y}}return{error:!1}},t=n();return function({start:r,end:o,diffs:i={}}={}){let a=e(r,o),s=o>r?"+":"-";if(a.error)return a;let f=Math.abs(r-o),y=new Date(f),m=y.getUTCFullYear()-1970,S=y.getUTCMonth(),b=y.getUTCDate()-1,T=b%7,w=Math.floor(b/7),p=y.getUTCHours(),v=y.getUTCMinutes(),D=y.getUTCSeconds(),A=y.getUTCMilliseconds(),l=Math.floor(f/864e5);i={...i,fromUTC:r,toUTC:o,sign:"",years:m,months:S,days:b,hours:p,minutes:v,seconds:D,milliseconds:A,diffInDays:l},i.full=t({values:i,full:!0}),i.clean=t({values:i}),i.equalDates=i.clean==="Dates are equal";let u=p+v+D>0?"T":"";return i.clean!=="Dates are equal"&&(i.sign=s,i.jsPeriod=`${s}P${m>0?`${m}Y`:""}${S>0?`${S}M`:""}${w>0?`${w}W`:""}${T>0?`${T}D`:""}${u}${p>0?`${p}H`:""}${v>0?`${v}M`:""}${D>0?`${D}S`:""}`,i.ISOPeriod=`P${m>0?`${m}Y`:""}${S>0?`${S}M`:""}${b>0?`${b}D`:""}${u}${p>0?`${p}H`:""}${v>0?`${v}M`:""}${D>0?`${D}S`:""}`),i};function n(){let r=(...i)=>a=>i.reduce((s,f)=>f(s),a),o=(i,a)=>i===1?a.slice(0,-1):a;return r(({values:i,full:a})=>[Object.entries(i).filter(([s])=>/^(years|month|days|hours|minutes|seconds)/i.test(s)),a],([i,a])=>a?i:i.filter(([,s])=>a?+s:s>0),i=>i.reduce((a,[s,f])=>[...a,`${f} ${o(f,s)}`],[]),i=>i.length<1?"Dates are equal":`${i.slice(0,-1).join(", ")}${i.length>1?" and ":""}${i.slice(-1).shift()}`)}}var zr=Hr;function Hr(){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 a=i.toLowerCase().split(/ {1,}/);return a.length<2?!1:a.map(s=>{s=`${s}`.trim().replace(/[^a-z0-9-+]/g,"");let f=parseInt(s,10);return Number.isNaN(f)?s:t?-f:+f})}).filter(i=>i)};return function(r,...o){if(o.length<1)return r;let i=n(...o);return i.length&&i.forEach(([a,s])=>{s=s,s=e[s],a&&s&&r[`set${s}`](r[`get${s}`]()+a)}),r}}var It=Zr(),At=Gr(),z=zr(),Rr=["sun","mon","tue","wed","thu","fri","sat"],Mt=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function pt(e,...t){return z(e,...t),e}function Jr(e,t=!1){let n=kt(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 a=e.clone.UTC;return t=t?.value||t?.constructor===Date?N(t?.value||t).UTC:N.now.UTC,n=n&&n?.value||n?.constructor===Date?N(n?.value||n).UTC:N.now.UTC,a.milliseconds=0,t.milliseconds=0,n.milliseconds=0,r?t>n:o?t<n:(i.start?+a>=+t:+a>+t)&&(i.end?+a<=+n:+a<+n)}function gt(e,{zoneTime:t=!1,formatStr:n,moreOptions:r}={}){return r=t?e.localeInfo.formatOptions+(r?`,${r}`:""):L.formatOptions+(r?`,${r}`:""),t?(e.localeInfo||(e.localeInfo=L),me(e,n,r)):Qr(e,n,r)}function Qr(e,t,n){let r=e.clone.relocate(L);return n=(n||"").startsWith("+")?`${r.localeInfo.formatOptions},${n.slice(1)}`:n||r.localeInfo.formatOptions,me(r,t,n)}function Wr(e,t){let n=It({start:e,end:t||e});return parseInt(`${n.sign}${n.diffInDays}`)}function yt(e,t=!1){let{locale:n,timeZone:r}=t?e.localeInfo:L,o=qt(n,r),i=e.format("MM|WD",o).split("|");return{locale:n,timeZone:r,monthName:i[0],dayName:i[1],dayNames:Wt(n),monthNames:He(n)}}function ht(e,t=!1){let[n,r,o,i]=Pe(e,t),a={values4Timezone:t?L.timeZone:e.timeZone,hours:n,minutes:r,seconds:o,milliseconds:i};return Object.freeze(a)}function Pe(e,t=!1){let n=`l:en-CA,${t?`tz:${L.timeZone}`:`tz:${e.timeZone}`},hrc:23,ts:medium`;return e.format("",n).split(/:/).map(Number).concat(e.getMilliseconds())}function bt(e,t){let n=t?`tz:${L.timeZone}`:`,tz:${e.timeZone}`,[r,o,i]=e.format("yyyy-mm-dd",n).split(/-/).map(Number);o-=1;let a=t?L.timeZone:e.timeZone;return Object.freeze({values4Timezone:a,year:r,month:o,date:i})}function St(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 Ur(e){let t=new Intl.Locale(e.localeInfo.locale),n=t.getWeekInfo&&t.getWeekInfo().firstDay||1;return n=n===7?0:n,Mt[n]}function kt(e,{sunday:t=!1}={}){let n=t?"sunday":Ur(e);return Ze(e,{day:n,preserveTodayWhenEqual:!0})}function qr(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=Fe(n.slice(0,3)+":"+n.slice(-2),!0),r=Fe(r.slice(0,3)+":"+r.slice(-2),!0),[-n[0]+r[0],-n[1]+r[1]].map(o=>n[0]<0?-o:o)}function Et({start:e,end:t}={}){t||(t=e.clone),t?.clone||(t=N(t,{timeZone:e.timeZone})),e=N($t(e,e.timeZone),{timeZone:e.timeZone}),t=N($t(t,t.timeZone),{timeZone:t.timeZone});let n=It({start:e,end:t,diffs:{timeZoneStart:e.timeZone,timeZoneEnd:t.timeZone}}),r=qr(t,e),o=n.sign.startsWith("-")?"ahead of":"behind",[i,a]=r.map(y=>Math.abs(y)),[s,f]=[`${i} ${de(i,"hour")}`,`${a} ${de(a,"minute")}`];return n.timeZonesOffsetDifference=n.sign.length<1||i+a===0?`Offsets of ${e.timeZone} and ${t.timeZone} are equal`:`${e.timeZone} is ${s}${a>0?` and ${f}`:""} ${o} ${t.timeZone}`,n}function xt(e,t){t=String(t).toLowerCase()==="utc"||t.timeZone==="UTC"?e.clone.relocate({timeZone:"UTC"}):N(e.value,{timeZone:t.timeZone||L.timeZone});let n=Et({start:e.clone,end:t}),r=`${n.sign}${vt(n.hours)}:${vt(n.minutes)}`;return{fromTZ:e.timeZone,toTZ:t.timeZone,offset:r,offsetText:`${t.timeZone} ${Br(r)} ${e.timeZone}`}}function vt(e,t=2){return`${e}`.padStart(t,"0")}function de(e,t){return`${t}${e>1||e===0?"s":""}`}function Br(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"),a=e.startsWith("+");return r>0?`${n} ${o} and ${r} ${i} ${a?"ahead of":"behind"}`:`${n} ${o} ${a?"ahead of":"behind"}`}function wt(e,t,n){return e.clone.format(t,n||e.localeInfo.formatOptions)}function Vr(e,{withFormat:t,withFormatOptions:n,local:r=!1}={}){if(t)return r?wt(e,t,$D.localeInformation.formatOptions):wt(e,t,n);let o=e.clone.relocate({locale:"en"}),i=r?L.formatOptions:o.localeInfo.formatOptions,a=`wd M dd yyyy hh:mmi:ss ${o.format("tz",i+",tzn:longOffset").replace(":","")} (tz)`;return o.format(a,i+",tzn:long, hrc:23")}function Pt(e,t=!1){let n=Intl.DateTimeFormat("en",{timeZone:t?e.timeZone:L.timeZone,weekday:"short"});return At(n.format(e))}function Yr(e){let t=L,n=e.localeInfo,r=e.clone.relocate({locale:t.locale,timeZone:t.timeZone}),o=e.offsetFrom(r),i=r.offsetFrom(e),a=t,s=n,f=e.format("hh:mmi:ss dp",`hrc:12,tz:${e.timeZone}`),y=r.format("hh:mmi:ss dp",`hrc:12,tz:${r.timeZone}`),m={note:"'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance",locales:{user:{locale:a.locale,timeZone:a.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&&(m.locales.remote={locale:s.locale,timeZone:s.timeZone},m.dateTime.remote={...e.zoneDateTime,monthName:e.zoneNames.monthName,weekdayNr:Pt(e,!0),weekdayName:e.zoneNames.dayName,dayPeriodTime:f,hasDST:e.hasDST,DSTActive:e.DSTActive,offsetFromUser:i.offset,string:e.toString()},m.offset.fromUserTime=i.offsetText),m}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 Ft(e,t){t=E({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=At(t);if(o<0)return console.error(`[TickTock instance].next/previous invalid day value ${t}`),e.clone;let i=n?1:-1,a=N(new Date(...e.dateTimeValues),e.localeInfo);return r&&o===a.day?a:_r(a.addDays(n?1:-1),o,i)}function _r(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 $t(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 P(t)&&e.setFullYear(parseInt(t)),P(r)&&e.setDate(parseInt(r)),P(n)&&e.setMonth(parseInt(n)),e}function B(e,{hours:t,minutes:n,seconds:r,milliseconds:o}={}){return P(t)&&e.setHours(parseInt(t)),P(n)&&e.setMinutes(parseInt(n)),P(r)&&e.setSeconds(parseInt(r)),P(o)&&e.setMilliseconds(parseInt(o)),e}function zt(e){return e?.constructor===Date||e?.value}function Tt(e,t){return zt(t)?N(t?.value||t,e.localeInfo):N.from(...e.dateTimeValues).relocate(e.localeInfo)}function Gr(){return function(e){e=`${e}`.toLowerCase();let t=Rr.indexOf(e);return t<0?Mt.indexOf(e):t}}function Fe(e){let t=e.slice(1).split(/[-:]/).map(Number),n=e.startsWith("-");return t=t.map(r=>n?-r:r),t}function Kr(e){return e.time={hours:0,minutes:0,seconds:0,milliseconds:0},e}function Ot(e,t){return Intl.DateTimeFormat("en-CA",{timeZone:t,timeZoneName:"long"}).format(e).split(/,/)[1].trim()}function Ht(e,t){t=t||e?.timeZone||L.timeZone,e=e?.value?e:e?.constructor===Date?N(e,{timeZone:t}):N({timeZone:t});let n=e.year||e.getFullYear(),r=Ot(new Date(n,0,1),t),o=Ot(new Date(n,5,1),t);return r!==o}function Rt(e,t){return t=t||e?.timeZone||L.timeZone,e=e?.hasDST?e:e?.constructor===Date?N(e,{timeZone:t}):N({timeZone:t}),e.hasDST?!/standard/i.test(e.toString()):!1}function Xr(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 eo(e,t){return zt(t)&&(e=N(t.value||t,t.localeInfo||e.localeInfo)),e}function ze(e,t){let n=Jt(new Date(e,11,t||31));return n===1?ze(e,(t||31)-1):n}function Dt(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=to;function to({localeInfo:e,customMethods:t,dateValue:n}={}){let r,o={add(...i){return pt(r,...i)},between({start:i,end:a,include:s}={}){return Me(r,{start:i,end:a,include:s})},cloneWith(i){return Tt(r,i)},daysUntil(i){return Wr(r,i)},differenceTo(i){return Et({start:r,end:i})},differenceUntil(i){return r.differenceTo(i).clean},firstWeekday({sunday:i=!1,midnight:a=!1}={}){return kt(r,{sunday:i,midnight:a})},format(i,a){return gt(r,{formatStr:i,moreOptions:a})},fullMonth(i){return Ft(r,i)},fullWeek(i=!1){return Jr(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,a){return Ze(r,{day:i,next:!0,preserveTodayWhenEqual:!!a})},offsetFrom(i){return xt(r,i)},previous(i,a){return Ze(r,{day:i,next:!1,preserveTodayWhenEqual:!!a})},relocate({locale:i,timeZone:a,l:s,tz:f}={}){return Xr(r,{locale:i,timeZone:a,l:s,tz:f})},revalue(i){return r=eo(r,i),r},setDateValues({year:i,month:a,date:s}={}){return X(r,{year:i,month:a,date:s})},setTimeValues({hours:i,minutes:a,seconds:s,milliseconds:f}={}){return B(r,{hours:i,minutes:a,seconds:s,milliseconds:f})},subtract(...i){return pt(r,"subtract,"+i.join(","))},toArray(i=!1){return se(r,i)},toString({template:i,formatOptions:a,local:s}={}){return Vr(r,{withFormat:i,withFormatOptions:a,local:s})},values(i=!1){return i?r.dateTime:r.zoneDateTime},zoneFormat(i,a){return gt(r,{zoneTime:!0,formatStr:i,moreOptions:a})},set date({year:i,month:a,date:s}){X(r,{year:i,month:a,date:s})},set dateNr(i){X(r,{date:i})},set hours(i){B(r,{hours:i})},set localeInfo({locale:i,timeZone:a,l:s,tz:f}){e=ce({locale:i,timeZone:a,l:s,tz:f})},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:a,seconds:s,milliseconds:f}){B(r,{hours:i,minutes:a,seconds:s,milliseconds:f})},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 Tt(r)},get date(){return bt(r,!0)},get dateNr(){return r.date.date},get dateTime(){return{...r.date,...r.time}},get dateTimeValues(){return se(r,!0)},get dateValues(){return St(r,!0)},get day(){return r.getDay()},get dayName(){return r.names.dayName},get daysThisMonth(){return Zt(r)},get DSTActive(){return Rt(r)},get hasDST(){return Ht(r)},get hours(){return r.time.hours},get info(){return Yr(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 yt(r)},get quarter(){return Dt(r)},get quarterNr(){return Dt(r,!0)},get removeTime(){return Kr(r)},get seconds(){return r.time.seconds},get time(){return ht(r,!0)},get timeValues(){return Pe(r,!0)},get timeZone(){return(e||ce()).timeZone},get unixEpochTimestamp(){return Math.floor(+r/1e3)},get userLocaleInfo(){return L},get UTC(){return r.clone.relocate({locale:r.locale,timeZone:"UTC"})},get UTCOffset(){return xt(r,"UTC")},get value(){return new Date(r)},get weeknr(){return Jt(r)},get weeksInYear(){return ze(r.year,31)},get year(){return r.date.year},get zoneDate(){return bt(r,!1)},get zoneDateNr(){return r.zoneDate.date},get zoneDateTime(){return{...r.zoneDate,...r.zoneTime}},get zoneDateTimeValues(){return se(r,!1)},get zoneDateValues(){return St(r,!1)},get zoneDay(){return Pt(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 yt(r,!0)},get zoneSeconds(){return r.zoneTime.seconds},get zoneTime(){return ht(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,no(o)),Object.entries(Object.getOwnPropertyDescriptors(Bt(r,t))).forEach(([i,a])=>Object.defineProperty(o,i,a)),Object.freeze(r))}function no(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 L=Ut(Intl.DateTimeFormat().resolvedOptions()),ro=Object.getOwnPropertyNames(Date.prototype).filter(e=>e.startsWith("set")).reduce((e,t)=>[...e,{native:t,syn:"change"+t.slice(3)}],[]);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 He(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 oo({year:e,locale:t}={}){e=P(e)?parseInt(e):new Date().getFullYear();let n={year:e,calendar:{}},r=He().long.map(o=>o.toLowerCase());for(let o=0;o<12;o+=1){let i=N.from(e,o,1);n.calendar[r[o]]=Ft(i,t)}return n}function io({year:e,monthNr:t,locale:n="en-CA"}={}){e=P(t)&&parseInt(e)||-1,t=P(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?N.from(e,t,1).relocate({locale:n}).fullMonth(n):"MonthNr should be a specific number (1 = january - 12 = december)"}function Ut(e){let t=qt(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 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=Ct({trial:function(){return Intl.DateTimeFormat(e,{timeZone:L.timeZone}).resolvedOptions().locale},onError:function(){return console.warn(`Intl locale "${e}" best fit impossible, using "${L.locale}"`),L.locale}}),t=Ct({trial:function(){return Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions().timeZone},onError:function(){return console.warn(`timeZone "${t}" not valid. Using "${L.timeZone}"`),L.timeZone}}),Ut(Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions())}function ce({locale:e,timeZone:t,l:n,tz:r}={}){return E({locale:e,timeZone:t,l:n,tz:r},!0)}function jt(e){return!Number.isNaN(+e)&&e?.constructor===Date&&!e?.toISOString?.().startsWith("1970-01-01T00:00:00")?e:new Date}function ao(e){let t=new Date;switch(!0){case e?.constructor===String:return jt(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 jt(e);default:return t}}function Ct({trial:e,onError:t=()=>{}}={}){if(e?.constructor===Function)try{return e()}catch(n){return t?.constructor===Function?t(n):void 0}}function lo({timeZoneDate:e,timeZoneID:t,userTimeZoneID:n}={}){let r={timeZone:E({timeZone:t}).timeZone},o={timeZone:E({timeZone:n||""}).timeZone},i=N(e,r),a=N(e,o),s=a.differenceTo(i),f=i.offsetFrom(a).offset,[y,m]=Fe(f,!0),S=a.clone.add(`${y} hours, ${m} minutes`),b=s.equalDates?"No difference":`Time offset ${f}: ${o.timeZone} is ${s.clean} ${y<0?"behind":"ahead of"} ${r.timeZone}`;return{remoteTimezone:r.timeZone,userTimezone:o.timeZone,timeDifference:b,result:{[r.timeZone.replace(/\//,"_")]:N(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 P(e){return!Number.isNaN(parseInt(e))}function fe(e,t,n){return e?.constructor===Number?z(t,`${e} ${n}`):t}function so(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 ro)t[n.syn]=function(...r){return e[n.native](...r),e};return t}function Bt(e,t){let n=so(e);for(let[r,o]of Object.entries(t||{})){let i=o.enumerable,a=o.isGetter?{get(){return o.method(e)},enumerable:i}:{value(...s){return o.method(e,...s)},enumerable:i};Object.defineProperty(n,r,a)}return n}function uo(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 He(n)}},daysInMonth:{value(n,r=!1){return n=P(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:oo},monthCalendar:{value:io},from:{value(...n){return e(n)}},fromUxTS:{value(n,r){n=P(n)?parseInt(n)*1e3:void 0;let o=n?new Date(n):new Date;return N(o,r||L)}},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:a}={}){n=n||n?.value||new Date,r=r?.constructor===String?r:"yyyy/mm/dd hh:mmi:ss dp";let s=E({timeZone:o,locale:i}).formatOptions;return s+=a?`,${a}`:"",me(n,r,s)}},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:lo},weeksInYear:{value(n){return ze(n,31)}},keys:{get(){let n=Object.fromEntries(Object.entries(t).filter(([r,o])=>o.enumerable===!0));return[...Object.keys(Qt()),...Object.keys(Bt()),...Object.keys(n)].sort((r,o)=>r.localeCompare(o))}}}),e}var Vt={},N=uo(co,Vt);function co(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():ao(e)),customMethods:Vt})}var fo=Object.defineProperties(Yt,{escape:{value:vo,enumerable:!0}});function Yt(e,...t){let{flags:n,cleanedArgs:r}=po(...t);return yo(new RegExp(wo(mo(e,...r)),n))}function mo(e,...t){return Y(t)?e.raw.reduce((n,r,o)=>n.concat(t[o-1]||"").concat(r),""):e.raw.join("")}function po(...e){let t=Re(go(e.at(-1)));return{flags:t,cleanedArgs:Y(t)?e.slice(0,-1):e}}function go(e){return pe(e,Array)?e.join(""):""}function yo(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=xo(n,e),t},enumerable:!1},clone:{get(){return So(t)},enumerable:!1}}),bo(e));return t}function Y(e){return e?.length>0}function pe(e,t){return e?.constructor===t}function ho(e,t,n){let r=Reflect.get(n,t);return{fromInstance:Reflect.get(e,t),fromRegExpMethod:pe(r,Function)?r.bind(e.re):e.re[t]}}function bo(e){return{get(t,n){let{fromInstance:r,fromRegExpMethod:o}=ho(t,n,e);switch(!0){case!!r:return r;default:return o}}}}function So(e){let t=e.re.source,n=Y(e.re.flags)?[...e.re.flags]:[];return Yt`${t} ${n}`}function Re(e,t){return t=(t??"").replace(/^-r\|/,""),e=t.concat(pe(e,String)&&Y(e)?e:""),[...new Set([...e])].join("").replace(/[^dgimsuvy]/g,"")}function xo(e,t){switch(!0){case(!pe(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,Re(e));default:return t=new RegExp(t.source,Re(t.flags,e))}}function vo(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 wo(e){return e.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm,"").replace(/\s/g,"").trim().replace(/<!([^>]\d+)>/g,(t,n)=>String.fromCharCode(+n)??t)}var{IS:$o}=To(),_=$o;function To(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),p();let e=S(),[t,n]=[b(),A()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:m,xProxy:n};function r(l,...u){if(e({trial:x=>"isTypes"in(u?.[0]??{})})){let x=u[0];return"defaultValue"in x?T(l,x):"notTypes"in x?w(l,x):r(l,...[x.isTypes].flat())}let g=typeof l=="symbol"?Symbol.isSymbol:l;return u.length>1?y(g,...u):i(l,...u)}function o(l){return l?.[Symbol.proxy]??r(l)}function i(l,...u){let{noInput:g,noShouldbe:x,compareTo:c,inputCTOR:h,isNaN:O,isInfinity:j,shouldBeFirstElementIsNothing:M}=s(l,...u);switch(u=u.length&&u[0],!0){case M:return String(l)===String(c);case(l?.[Symbol.proxy]&&x):return l[Symbol.proxy];case O:return x?"NaN":e({trial:Z=>String(c)})===String(l);case j:return x?"Infinity":e({trial:Z=>String(c)})===String(l);case g:return x?String(l):String(c)===String(l);case h===Boolean:return u?h===u:"Boolean";default:return f(l,u,x,a(l,h))}}function a(l,u){return l===0?Number:l===""?String:l?u:{name:String(l)}}function s(l,...u){let g=u.length<1,x=!g&&u[0],c=!g&&m(u[0]),h=l==null,O=!h&&Object.getPrototypeOf(l)?.constructor,j=Number.isNaN(l)||e({trial:Z=>String(l)==="NaN"}),M=e({trial:Z=>String(l)})==="Infinity";return{noInput:h,noShouldbe:g,compareTo:x,inputCTOR:O,isNaN:j,isInfinity:M,shouldBeFirstElementIsNothing:c}}function f(l,u,g,x){switch(!0){case(!g&&u===l||l?.[Symbol.proxy]&&u===Proxy):return!0;case e({trial:c=>String(u)})==="NaN":return String(l)==="NaN";case(l?.[Symbol.toStringTag]&&r(u,String)):return String(u)===l[Symbol.toStringTag];default:return u?e({trial:c=>l instanceof u})||u===x||u===Object.getPrototypeOf(x)||`${u?.name}`===x?.name:l?.[Symbol.toStringTag]&&`[object ${l?.[Symbol.toStringTag]}]`||x?.name||String(x)}}function y(l,...u){return u.some(g=>r(l,g))}function m(l,u=!1){let g=l==null;return g=u?g||r(l,1/0)||r(l,NaN):g,g}function S(){let l=(u,g)=>u?.constructor===Function?u(g):void 0;return function({trial:u,whenError:g=()=>{}}={}){try{return l(u)}catch(x){return l(g,x)}}}function b(){return function(l){return Object.freeze({get value(){return l},get[Symbol.type](){return o(l)},get type(){return o(l)},[Symbol.is](...u){return r(l,...u)},is(...u){return r(l,...u)}})}}function T(l,{defaultValue:u,isTypes:g=[void 0],notTypes:x}={}){return g=g?.constructor!==Array?[g]:g,x=x&&x?.constructor!==Array?[x]:[],x.length<1?r(l,...g)?l:u:w(l,{isTypes:g,notTypes:x})?l:u}function w(l,{isTypes:u=[void 0],notTypes:g=[void 0]}={}){return u=u?.constructor!==Array?[u]:u,g=g?.constructor!==Array?[g]:g,r(l,...u)&&!r(l,...g)}function p(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...l){return r(this,...l)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(l){return o(l)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(l,...u){return r(l,...u)},enumerable:!1,configurable:!1}}))}function v(l){let u=String(Object.getPrototypeOf(l)?.constructor);return u.slice(u.indexOf("ion")+3,u.indexOf("(")).trim()}function D(l){let u=l.set;return l.set=(g,x,c)=>x===Symbol.proxy?g[x]=c:u(g,x,c),l}function A(){let l=Proxy;return{native(){Proxy=l},custom(){Proxy=new l(l,{construct(u,g){for(let c of g)c.set&&(c=D(c));let x=new u(...g);return x[Symbol.proxy]=`Proxy (${v(g[0])})`,x}})}}}}var _t=Gt(void 0),Oo=Gt("");Object.defineProperties(String.prototype,{[Symbol.for("interpolate")]:{value(...e){return _t(this,...e)}},[Symbol.for("interpolate$")]:{value(...e){return Oo(this,...e)}}});function Gt(e){return e=_(e,String,Number)?String(e):void 0,function(y,...m){return f(y,s(m))};function t(y,m){return m&&_(e,String,Number)?String(e):`{${y}}`}function n(y,m){let S=y in m;return S&&_(m[y],String,Number)?String(m[y]):t(y,S)}function r(y){return(...m)=>{let S=m.find(b=>b.key);return n(S?S.key:"_",y)}}function o(y,m){return y.replace(/\{(?<key>[a-z_\d]+)}/gim,r(m))}function i(y){let m=[];return Object.entries(y).forEach(([S,b])=>{b.forEach((T,w)=>(m[w]??={},m[w][S]=T))}),m}function a(y){return y.length===1&&Object.values(y[0]).every(Array.isArray)}function s(y){return a(y)?i(y[0]):y}function f(y,m){let S=m?.length?m.filter(b=>_(b,Object)).map((b,T)=>o(y,{...b,index:T+1})).join(""):y;return _(e,void 0)?S:S.replace(/\{[a-z_\d].+\}/gim,String(e))}}Co();Do();function Do(){/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 Xo(e=!0){let t=R('<ul id="log2screen">').first();function n(i=!1){let a=i?R.at.start:R.at.end;return s=>{if(s?.isJQx)return R.li(s.data.get("header")?{class:"head"}:"",s).renderTo(t,a);s=R.IS(s,String,Number,Symbol)?String(s):jo(s,e);let f=s.startsWith("!!");s=f?s.slice(2):s,R.li(f?{class:"head"}:"",s).renderTo(t,a)}}let[r,o]=[n(),n(!0)];return{log:(...i)=>i.forEach(r),logTop:(...i)=>i.forEach(o)}}function jo(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 Co(){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 $,N as $D,Xo as logFactory,fo as regexhelper,_t as splat};
|