dphelper 3.1.4 → 3.1.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.
Files changed (3) hide show
  1. package/dphelper.umd.js +19 -19
  2. package/index.js +18 -18
  3. package/package.json +107 -100
package/dphelper.umd.js CHANGED
@@ -1,12 +1,12 @@
1
- "use strict";var dphelper=(()=>{var vr=Object.create;var we=Object.defineProperty;var br=Object.getOwnPropertyDescriptor;var gr=Object.getOwnPropertyNames;var yr=Object.getPrototypeOf,Dr=Object.prototype.hasOwnProperty;var Lt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var j=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Cr=(e,t)=>{for(var r in t)we(e,r,{get:t[r],enumerable:!0})},jt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of gr(t))!Dr.call(e,o)&&o!==r&&we(e,o,{get:()=>t[o],enumerable:!(n=br(t,o))||n.enumerable});return e};var Er=(e,t,r)=>(r=e!=null?vr(yr(e)):{},jt(t||!e||!e.__esModule?we(r,"default",{value:e,enumerable:!0}):r,e)),Ar=e=>jt(we({},"__esModule",{value:!0}),e);var Gt=j(()=>{});var z=j((Pe,Yt)=>{(function(e,t){typeof Pe=="object"?Yt.exports=Pe=t():typeof define=="function"&&define.amd?define([],t):e.CryptoJS=t()})(Pe,function(){var e=e||(function(t,r){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global<"u"&&global.crypto&&(n=global.crypto),!n&&typeof Lt=="function")try{n=Gt()}catch{}var o=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||(function(){function u(){}return function(p){var y;return u.prototype=p,y=new u,u.prototype=null,y}})(),c={},a=c.lib={},s=a.Base=(function(){return{extend:function(u){var p=i(this);return u&&p.mixIn(u),(!p.hasOwnProperty("init")||this.init===p.init)&&(p.init=function(){p.$super.init.apply(this,arguments)}),p.init.prototype=p,p.$super=this,p},create:function(){var u=this.extend();return u.init.apply(u,arguments),u},init:function(){},mixIn:function(u){for(var p in u)u.hasOwnProperty(p)&&(this[p]=u[p]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),f=a.WordArray=s.extend({init:function(u,p){u=this.words=u||[],p!=r?this.sigBytes=p:this.sigBytes=u.length*4},toString:function(u){return(u||x).stringify(this)},concat:function(u){var p=this.words,y=u.words,g=this.sigBytes,D=u.sigBytes;if(this.clamp(),g%4)for(var C=0;C<D;C++){var M=y[C>>>2]>>>24-C%4*8&255;p[g+C>>>2]|=M<<24-(g+C)%4*8}else for(var k=0;k<D;k+=4)p[g+k>>>2]=y[k>>>2];return this.sigBytes+=D,this},clamp:function(){var u=this.words,p=this.sigBytes;u[p>>>2]&=4294967295<<32-p%4*8,u.length=t.ceil(p/4)},clone:function(){var u=s.clone.call(this);return u.words=this.words.slice(0),u},random:function(u){for(var p=[],y=0;y<u;y+=4)p.push(o());return new f.init(p,u)}}),l=c.enc={},x=l.Hex={stringify:function(u){for(var p=u.words,y=u.sigBytes,g=[],D=0;D<y;D++){var C=p[D>>>2]>>>24-D%4*8&255;g.push((C>>>4).toString(16)),g.push((C&15).toString(16))}return g.join("")},parse:function(u){for(var p=u.length,y=[],g=0;g<p;g+=2)y[g>>>3]|=parseInt(u.substr(g,2),16)<<24-g%8*4;return new f.init(y,p/2)}},d=l.Latin1={stringify:function(u){for(var p=u.words,y=u.sigBytes,g=[],D=0;D<y;D++){var C=p[D>>>2]>>>24-D%4*8&255;g.push(String.fromCharCode(C))}return g.join("")},parse:function(u){for(var p=u.length,y=[],g=0;g<p;g++)y[g>>>2]|=(u.charCodeAt(g)&255)<<24-g%4*8;return new f.init(y,p)}},h=l.Utf8={stringify:function(u){try{return decodeURIComponent(escape(d.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(u){return d.parse(unescape(encodeURIComponent(u)))}},m=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(u){typeof u=="string"&&(u=h.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},_process:function(u){var p,y=this._data,g=y.words,D=y.sigBytes,C=this.blockSize,M=C*4,k=D/M;u?k=t.ceil(k):k=t.max((k|0)-this._minBufferSize,0);var P=k*C,q=t.min(P*4,D);if(P){for(var E=0;E<P;E+=C)this._doProcessBlock(g,E);p=g.splice(0,P),y.sigBytes-=q}return new f.init(p,q)},clone:function(){var u=s.clone.call(this);return u._data=this._data.clone(),u},_minBufferSize:0}),v=a.Hasher=m.extend({cfg:s.extend(),init:function(u){this.cfg=this.cfg.extend(u),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(u){return this._append(u),this._process(),this},finalize:function(u){u&&this._append(u);var p=this._doFinalize();return p},blockSize:512/32,_createHelper:function(u){return function(p,y){return new u.init(y).finalize(p)}},_createHmacHelper:function(u){return function(p,y){return new b.HMAC.init(u,y).finalize(p)}}}),b=c.algo={};return c})(Math);return e})});var Ce=j((Te,Jt)=>{(function(e,t){typeof Te=="object"?Jt.exports=Te=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Te,function(e){return(function(t){var r=e,n=r.lib,o=n.Base,i=n.WordArray,c=r.x64={},a=c.Word=o.extend({init:function(f,l){this.high=f,this.low=l}}),s=c.WordArray=o.extend({init:function(f,l){f=this.words=f||[],l!=t?this.sigBytes=l:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,l=f.length,x=[],d=0;d<l;d++){var h=f[d];x.push(h.high),x.push(h.low)}return i.create(x,this.sigBytes)},clone:function(){for(var f=o.clone.call(this),l=f.words=this.words.slice(0),x=l.length,d=0;d<x;d++)l[d]=l[d].clone();return f}})})(),e})});var Zt=j((qe,Kt)=>{(function(e,t){typeof qe=="object"?Kt.exports=qe=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(qe,function(e){return(function(){if(typeof ArrayBuffer=="function"){var t=e,r=t.lib,n=r.WordArray,o=n.init,i=n.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray<"u"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var a=c.byteLength,s=[],f=0;f<a;f++)s[f>>>2]|=c[f]<<24-f%4*8;o.call(this,s,a)}else o.apply(this,arguments)};i.prototype=n}})(),e.lib.WordArray})});var Xt=j((He,Vt)=>{(function(e,t){typeof He=="object"?Vt.exports=He=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(He,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Utf16=o.Utf16BE={stringify:function(a){for(var s=a.words,f=a.sigBytes,l=[],x=0;x<f;x+=2){var d=s[x>>>2]>>>16-x%4*8&65535;l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,f=[],l=0;l<s;l++)f[l>>>1]|=a.charCodeAt(l)<<16-l%2*16;return n.create(f,s*2)}};o.Utf16LE={stringify:function(a){for(var s=a.words,f=a.sigBytes,l=[],x=0;x<f;x+=2){var d=c(s[x>>>2]>>>16-x%4*8&65535);l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,f=[],l=0;l<s;l++)f[l>>>1]|=c(a.charCodeAt(l)<<16-l%2*16);return n.create(f,s*2)}};function c(a){return a<<8&4278255360|a>>>8&16711935}})(),e.enc.Utf16})});var re=j((Oe,Qt)=>{(function(e,t){typeof Oe=="object"?Qt.exports=Oe=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Oe,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Base64={stringify:function(a){var s=a.words,f=a.sigBytes,l=this._map;a.clamp();for(var x=[],d=0;d<f;d+=3)for(var h=s[d>>>2]>>>24-d%4*8&255,m=s[d+1>>>2]>>>24-(d+1)%4*8&255,v=s[d+2>>>2]>>>24-(d+2)%4*8&255,b=h<<16|m<<8|v,u=0;u<4&&d+u*.75<f;u++)x.push(l.charAt(b>>>6*(3-u)&63));var p=l.charAt(64);if(p)for(;x.length%4;)x.push(p);return x.join("")},parse:function(a){var s=a.length,f=this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var x=0;x<f.length;x++)l[f.charCodeAt(x)]=x}var d=f.charAt(64);if(d){var h=a.indexOf(d);h!==-1&&(s=h)}return c(a,s,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function c(a,s,f){for(var l=[],x=0,d=0;d<s;d++)if(d%4){var h=f[a.charCodeAt(d-1)]<<d%4*2,m=f[a.charCodeAt(d)]>>>6-d%4*2,v=h|m;l[x>>>2]|=v<<24-x%4*8,x++}return n.create(l,x)}})(),e.enc.Base64})});var t0=j((Re,e0)=>{(function(e,t){typeof Re=="object"?e0.exports=Re=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Re,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Base64url={stringify:function(a,s){s===void 0&&(s=!0);var f=a.words,l=a.sigBytes,x=s?this._safe_map:this._map;a.clamp();for(var d=[],h=0;h<l;h+=3)for(var m=f[h>>>2]>>>24-h%4*8&255,v=f[h+1>>>2]>>>24-(h+1)%4*8&255,b=f[h+2>>>2]>>>24-(h+2)%4*8&255,u=m<<16|v<<8|b,p=0;p<4&&h+p*.75<l;p++)d.push(x.charAt(u>>>6*(3-p)&63));var y=x.charAt(64);if(y)for(;d.length%4;)d.push(y);return d.join("")},parse:function(a,s){s===void 0&&(s=!0);var f=a.length,l=s?this._safe_map:this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var d=0;d<l.length;d++)x[l.charCodeAt(d)]=d}var h=l.charAt(64);if(h){var m=a.indexOf(h);m!==-1&&(f=m)}return c(a,f,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function c(a,s,f){for(var l=[],x=0,d=0;d<s;d++)if(d%4){var h=f[a.charCodeAt(d-1)]<<d%4*2,m=f[a.charCodeAt(d)]>>>6-d%4*2,v=h|m;l[x>>>2]|=v<<24-x%4*8,x++}return n.create(l,x)}})(),e.enc.Base64url})});var ne=j((Le,r0)=>{(function(e,t){typeof Le=="object"?r0.exports=Le=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Le,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=[];(function(){for(var h=0;h<64;h++)a[h]=t.abs(t.sin(h+1))*4294967296|0})();var s=c.MD5=i.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(h,m){for(var v=0;v<16;v++){var b=m+v,u=h[b];h[b]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}var p=this._hash.words,y=h[m+0],g=h[m+1],D=h[m+2],C=h[m+3],M=h[m+4],k=h[m+5],P=h[m+6],q=h[m+7],E=h[m+8],_=h[m+9],T=h[m+10],F=h[m+11],O=h[m+12],H=h[m+13],R=h[m+14],N=h[m+15],A=p[0],w=p[1],S=p[2],B=p[3];A=f(A,w,S,B,y,7,a[0]),B=f(B,A,w,S,g,12,a[1]),S=f(S,B,A,w,D,17,a[2]),w=f(w,S,B,A,C,22,a[3]),A=f(A,w,S,B,M,7,a[4]),B=f(B,A,w,S,k,12,a[5]),S=f(S,B,A,w,P,17,a[6]),w=f(w,S,B,A,q,22,a[7]),A=f(A,w,S,B,E,7,a[8]),B=f(B,A,w,S,_,12,a[9]),S=f(S,B,A,w,T,17,a[10]),w=f(w,S,B,A,F,22,a[11]),A=f(A,w,S,B,O,7,a[12]),B=f(B,A,w,S,H,12,a[13]),S=f(S,B,A,w,R,17,a[14]),w=f(w,S,B,A,N,22,a[15]),A=l(A,w,S,B,g,5,a[16]),B=l(B,A,w,S,P,9,a[17]),S=l(S,B,A,w,F,14,a[18]),w=l(w,S,B,A,y,20,a[19]),A=l(A,w,S,B,k,5,a[20]),B=l(B,A,w,S,T,9,a[21]),S=l(S,B,A,w,N,14,a[22]),w=l(w,S,B,A,M,20,a[23]),A=l(A,w,S,B,_,5,a[24]),B=l(B,A,w,S,R,9,a[25]),S=l(S,B,A,w,C,14,a[26]),w=l(w,S,B,A,E,20,a[27]),A=l(A,w,S,B,H,5,a[28]),B=l(B,A,w,S,D,9,a[29]),S=l(S,B,A,w,q,14,a[30]),w=l(w,S,B,A,O,20,a[31]),A=x(A,w,S,B,k,4,a[32]),B=x(B,A,w,S,E,11,a[33]),S=x(S,B,A,w,F,16,a[34]),w=x(w,S,B,A,R,23,a[35]),A=x(A,w,S,B,g,4,a[36]),B=x(B,A,w,S,M,11,a[37]),S=x(S,B,A,w,q,16,a[38]),w=x(w,S,B,A,T,23,a[39]),A=x(A,w,S,B,H,4,a[40]),B=x(B,A,w,S,y,11,a[41]),S=x(S,B,A,w,C,16,a[42]),w=x(w,S,B,A,P,23,a[43]),A=x(A,w,S,B,_,4,a[44]),B=x(B,A,w,S,O,11,a[45]),S=x(S,B,A,w,N,16,a[46]),w=x(w,S,B,A,D,23,a[47]),A=d(A,w,S,B,y,6,a[48]),B=d(B,A,w,S,q,10,a[49]),S=d(S,B,A,w,R,15,a[50]),w=d(w,S,B,A,k,21,a[51]),A=d(A,w,S,B,O,6,a[52]),B=d(B,A,w,S,C,10,a[53]),S=d(S,B,A,w,T,15,a[54]),w=d(w,S,B,A,g,21,a[55]),A=d(A,w,S,B,E,6,a[56]),B=d(B,A,w,S,N,10,a[57]),S=d(S,B,A,w,P,15,a[58]),w=d(w,S,B,A,H,21,a[59]),A=d(A,w,S,B,M,6,a[60]),B=d(B,A,w,S,F,10,a[61]),S=d(S,B,A,w,D,15,a[62]),w=d(w,S,B,A,_,21,a[63]),p[0]=p[0]+A|0,p[1]=p[1]+w|0,p[2]=p[2]+S|0,p[3]=p[3]+B|0},_doFinalize:function(){var h=this._data,m=h.words,v=this._nDataBytes*8,b=h.sigBytes*8;m[b>>>5]|=128<<24-b%32;var u=t.floor(v/4294967296),p=v;m[(b+64>>>9<<4)+15]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,m[(b+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,h.sigBytes=(m.length+1)*4,this._process();for(var y=this._hash,g=y.words,D=0;D<4;D++){var C=g[D];g[D]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}return y},clone:function(){var h=i.clone.call(this);return h._hash=this._hash.clone(),h}});function f(h,m,v,b,u,p,y){var g=h+(m&v|~m&b)+u+y;return(g<<p|g>>>32-p)+m}function l(h,m,v,b,u,p,y){var g=h+(m&b|v&~b)+u+y;return(g<<p|g>>>32-p)+m}function x(h,m,v,b,u,p,y){var g=h+(m^v^b)+u+y;return(g<<p|g>>>32-p)+m}function d(h,m,v,b,u,p,y){var g=h+(v^(m|~b))+u+y;return(g<<p|g>>>32-p)+m}r.MD5=i._createHelper(s),r.HmacMD5=i._createHmacHelper(s)})(Math),e.MD5})});var At=j((je,n0)=>{(function(e,t){typeof je=="object"?n0.exports=je=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(je,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,c=[],a=i.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,f){for(var l=this._hash.words,x=l[0],d=l[1],h=l[2],m=l[3],v=l[4],b=0;b<80;b++){if(b<16)c[b]=s[f+b]|0;else{var u=c[b-3]^c[b-8]^c[b-14]^c[b-16];c[b]=u<<1|u>>>31}var p=(x<<5|x>>>27)+v+c[b];b<20?p+=(d&h|~d&m)+1518500249:b<40?p+=(d^h^m)+1859775393:b<60?p+=(d&h|d&m|h&m)-1894007588:p+=(d^h^m)-899497514,v=m,m=h,h=d<<30|d>>>2,d=x,x=p}l[0]=l[0]+x|0,l[1]=l[1]+d|0,l[2]=l[2]+h|0,l[3]=l[3]+m|0,l[4]=l[4]+v|0},_doFinalize:function(){var s=this._data,f=s.words,l=this._nDataBytes*8,x=s.sigBytes*8;return f[x>>>5]|=128<<24-x%32,f[(x+64>>>9<<4)+14]=Math.floor(l/4294967296),f[(x+64>>>9<<4)+15]=l,s.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var s=o.clone.call(this);return s._hash=this._hash.clone(),s}});t.SHA1=o._createHelper(a),t.HmacSHA1=o._createHmacHelper(a)})(),e.SHA1})});var Ne=j((ze,a0)=>{(function(e,t){typeof ze=="object"?a0.exports=ze=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(ze,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=[],s=[];(function(){function x(v){for(var b=t.sqrt(v),u=2;u<=b;u++)if(!(v%u))return!1;return!0}function d(v){return(v-(v|0))*4294967296|0}for(var h=2,m=0;m<64;)x(h)&&(m<8&&(a[m]=d(t.pow(h,1/2))),s[m]=d(t.pow(h,1/3)),m++),h++})();var f=[],l=c.SHA256=i.extend({_doReset:function(){this._hash=new o.init(a.slice(0))},_doProcessBlock:function(x,d){for(var h=this._hash.words,m=h[0],v=h[1],b=h[2],u=h[3],p=h[4],y=h[5],g=h[6],D=h[7],C=0;C<64;C++){if(C<16)f[C]=x[d+C]|0;else{var M=f[C-15],k=(M<<25|M>>>7)^(M<<14|M>>>18)^M>>>3,P=f[C-2],q=(P<<15|P>>>17)^(P<<13|P>>>19)^P>>>10;f[C]=k+f[C-7]+q+f[C-16]}var E=p&y^~p&g,_=m&v^m&b^v&b,T=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),F=(p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25),O=D+F+E+s[C]+f[C],H=T+_;D=g,g=y,y=p,p=u+O|0,u=b,b=v,v=m,m=O+H|0}h[0]=h[0]+m|0,h[1]=h[1]+v|0,h[2]=h[2]+b|0,h[3]=h[3]+u|0,h[4]=h[4]+p|0,h[5]=h[5]+y|0,h[6]=h[6]+g|0,h[7]=h[7]+D|0},_doFinalize:function(){var x=this._data,d=x.words,h=this._nDataBytes*8,m=x.sigBytes*8;return d[m>>>5]|=128<<24-m%32,d[(m+64>>>9<<4)+14]=t.floor(h/4294967296),d[(m+64>>>9<<4)+15]=h,x.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var x=i.clone.call(this);return x._hash=this._hash.clone(),x}});r.SHA256=i._createHelper(l),r.HmacSHA256=i._createHmacHelper(l)})(Math),e.SHA256})});var i0=j(($e,o0)=>{(function(e,t,r){typeof $e=="object"?o0.exports=$e=t(z(),Ne()):typeof define=="function"&&define.amd?define(["./core","./sha256"],t):t(e.CryptoJS)})($e,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.algo,i=o.SHA256,c=o.SHA224=i.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=i._doFinalize.call(this);return a.sigBytes-=4,a}});t.SHA224=i._createHelper(c),t.HmacSHA224=i._createHmacHelper(c)})(),e.SHA224})});var Bt=j((Ie,s0)=>{(function(e,t,r){typeof Ie=="object"?s0.exports=Ie=t(z(),Ce()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],t):t(e.CryptoJS)})(Ie,function(e){return(function(){var t=e,r=t.lib,n=r.Hasher,o=t.x64,i=o.Word,c=o.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var f=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];(function(){for(var d=0;d<80;d++)l[d]=s()})();var x=a.SHA512=n.extend({_doReset:function(){this._hash=new c.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(d,h){for(var m=this._hash.words,v=m[0],b=m[1],u=m[2],p=m[3],y=m[4],g=m[5],D=m[6],C=m[7],M=v.high,k=v.low,P=b.high,q=b.low,E=u.high,_=u.low,T=p.high,F=p.low,O=y.high,H=y.low,R=g.high,N=g.low,A=D.high,w=D.low,S=C.high,B=C.low,I=M,$=k,U=P,L=q,pe=E,le=_,ht=T,xe=F,K=O,G=H,Ee=R,fe=N,Ae=A,me=w,vt=S,he=B,Z=0;Z<80;Z++){var J,ee,Be=l[Z];if(Z<16)ee=Be.high=d[h+Z*2]|0,J=Be.low=d[h+Z*2+1]|0;else{var wt=l[Z-15],de=wt.high,ve=wt.low,ar=(de>>>1|ve<<31)^(de>>>8|ve<<24)^de>>>7,Ft=(ve>>>1|de<<31)^(ve>>>8|de<<24)^(ve>>>7|de<<25),St=l[Z-2],ue=St.high,be=St.low,or=(ue>>>19|be<<13)^(ue<<3|be>>>29)^ue>>>6,kt=(be>>>19|ue<<13)^(be<<3|ue>>>29)^(be>>>6|ue<<26),_t=l[Z-7],ir=_t.high,sr=_t.low,Mt=l[Z-16],cr=Mt.high,Pt=Mt.low;J=Ft+sr,ee=ar+ir+(J>>>0<Ft>>>0?1:0),J=J+kt,ee=ee+or+(J>>>0<kt>>>0?1:0),J=J+Pt,ee=ee+cr+(J>>>0<Pt>>>0?1:0),Be.high=ee,Be.low=J}var lr=K&Ee^~K&Ae,Tt=G&fe^~G&me,dr=I&U^I&pe^U&pe,ur=$&L^$&le^L&le,pr=(I>>>28|$<<4)^(I<<30|$>>>2)^(I<<25|$>>>7),qt=($>>>28|I<<4)^($<<30|I>>>2)^($<<25|I>>>7),xr=(K>>>14|G<<18)^(K>>>18|G<<14)^(K<<23|G>>>9),fr=(G>>>14|K<<18)^(G>>>18|K<<14)^(G<<23|K>>>9),Ht=f[Z],mr=Ht.high,Ot=Ht.low,Y=he+fr,te=vt+xr+(Y>>>0<he>>>0?1:0),Y=Y+Tt,te=te+lr+(Y>>>0<Tt>>>0?1:0),Y=Y+Ot,te=te+mr+(Y>>>0<Ot>>>0?1:0),Y=Y+J,te=te+ee+(Y>>>0<J>>>0?1:0),Rt=qt+ur,hr=pr+dr+(Rt>>>0<qt>>>0?1:0);vt=Ae,he=me,Ae=Ee,me=fe,Ee=K,fe=G,G=xe+Y|0,K=ht+te+(G>>>0<xe>>>0?1:0)|0,ht=pe,xe=le,pe=U,le=L,U=I,L=$,$=Y+Rt|0,I=te+hr+($>>>0<Y>>>0?1:0)|0}k=v.low=k+$,v.high=M+I+(k>>>0<$>>>0?1:0),q=b.low=q+L,b.high=P+U+(q>>>0<L>>>0?1:0),_=u.low=_+le,u.high=E+pe+(_>>>0<le>>>0?1:0),F=p.low=F+xe,p.high=T+ht+(F>>>0<xe>>>0?1:0),H=y.low=H+G,y.high=O+K+(H>>>0<G>>>0?1:0),N=g.low=N+fe,g.high=R+Ee+(N>>>0<fe>>>0?1:0),w=D.low=w+me,D.high=A+Ae+(w>>>0<me>>>0?1:0),B=C.low=B+he,C.high=S+vt+(B>>>0<he>>>0?1:0)},_doFinalize:function(){var d=this._data,h=d.words,m=this._nDataBytes*8,v=d.sigBytes*8;h[v>>>5]|=128<<24-v%32,h[(v+128>>>10<<5)+30]=Math.floor(m/4294967296),h[(v+128>>>10<<5)+31]=m,d.sigBytes=h.length*4,this._process();var b=this._hash.toX32();return b},clone:function(){var d=n.clone.call(this);return d._hash=this._hash.clone(),d},blockSize:1024/32});t.SHA512=n._createHelper(x),t.HmacSHA512=n._createHmacHelper(x)})(),e.SHA512})});var l0=j((We,c0)=>{(function(e,t,r){typeof We=="object"?c0.exports=We=t(z(),Ce(),Bt()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],t):t(e.CryptoJS)})(We,function(e){return(function(){var t=e,r=t.x64,n=r.Word,o=r.WordArray,i=t.algo,c=i.SHA512,a=i.SHA384=c.extend({_doReset:function(){this._hash=new o.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var s=c._doFinalize.call(this);return s.sigBytes-=16,s}});t.SHA384=c._createHelper(a),t.HmacSHA384=c._createHmacHelper(a)})(),e.SHA384})});var u0=j((Ue,d0)=>{(function(e,t,r){typeof Ue=="object"?d0.exports=Ue=t(z(),Ce()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],t):t(e.CryptoJS)})(Ue,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.x64,a=c.Word,s=r.algo,f=[],l=[],x=[];(function(){for(var m=1,v=0,b=0;b<24;b++){f[m+5*v]=(b+1)*(b+2)/2%64;var u=v%5,p=(2*m+3*v)%5;m=u,v=p}for(var m=0;m<5;m++)for(var v=0;v<5;v++)l[m+5*v]=v+(2*m+3*v)%5*5;for(var y=1,g=0;g<24;g++){for(var D=0,C=0,M=0;M<7;M++){if(y&1){var k=(1<<M)-1;k<32?C^=1<<k:D^=1<<k-32}y&128?y=y<<1^113:y<<=1}x[g]=a.create(D,C)}})();var d=[];(function(){for(var m=0;m<25;m++)d[m]=a.create()})();var h=s.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var m=this._state=[],v=0;v<25;v++)m[v]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(m,v){for(var b=this._state,u=this.blockSize/2,p=0;p<u;p++){var y=m[v+2*p],g=m[v+2*p+1];y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;var D=b[p];D.high^=g,D.low^=y}for(var C=0;C<24;C++){for(var M=0;M<5;M++){for(var k=0,P=0,q=0;q<5;q++){var D=b[M+5*q];k^=D.high,P^=D.low}var E=d[M];E.high=k,E.low=P}for(var M=0;M<5;M++)for(var _=d[(M+4)%5],T=d[(M+1)%5],F=T.high,O=T.low,k=_.high^(F<<1|O>>>31),P=_.low^(O<<1|F>>>31),q=0;q<5;q++){var D=b[M+5*q];D.high^=k,D.low^=P}for(var H=1;H<25;H++){var k,P,D=b[H],R=D.high,N=D.low,A=f[H];A<32?(k=R<<A|N>>>32-A,P=N<<A|R>>>32-A):(k=N<<A-32|R>>>64-A,P=R<<A-32|N>>>64-A);var w=d[l[H]];w.high=k,w.low=P}var S=d[0],B=b[0];S.high=B.high,S.low=B.low;for(var M=0;M<5;M++)for(var q=0;q<5;q++){var H=M+5*q,D=b[H],I=d[H],$=d[(M+1)%5+5*q],U=d[(M+2)%5+5*q];D.high=I.high^~$.high&U.high,D.low=I.low^~$.low&U.low}var D=b[0],L=x[C];D.high^=L.high,D.low^=L.low}},_doFinalize:function(){var m=this._data,v=m.words,b=this._nDataBytes*8,u=m.sigBytes*8,p=this.blockSize*32;v[u>>>5]|=1<<24-u%32,v[(t.ceil((u+1)/p)*p>>>5)-1]|=128,m.sigBytes=v.length*4,this._process();for(var y=this._state,g=this.cfg.outputLength/8,D=g/8,C=[],M=0;M<D;M++){var k=y[M],P=k.high,q=k.low;P=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,q=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360,C.push(q),C.push(P)}return new o.init(C,g)},clone:function(){for(var m=i.clone.call(this),v=m._state=this._state.slice(0),b=0;b<25;b++)v[b]=v[b].clone();return m}});r.SHA3=i._createHelper(h),r.HmacSHA3=i._createHmacHelper(h)})(Math),e.SHA3})});var x0=j((Ge,p0)=>{(function(e,t){typeof Ge=="object"?p0.exports=Ge=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ge,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),f=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),x=o.create([0,1518500249,1859775393,2400959708,2840853838]),d=o.create([1352829926,1548603684,1836072691,2053994217,0]),h=c.RIPEMD160=i.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(g,D){for(var C=0;C<16;C++){var M=D+C,k=g[M];g[M]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var P=this._hash.words,q=x.words,E=d.words,_=a.words,T=s.words,F=f.words,O=l.words,H,R,N,A,w,S,B,I,$,U;S=H=P[0],B=R=P[1],I=N=P[2],$=A=P[3],U=w=P[4];for(var L,C=0;C<80;C+=1)L=H+g[D+_[C]]|0,C<16?L+=m(R,N,A)+q[0]:C<32?L+=v(R,N,A)+q[1]:C<48?L+=b(R,N,A)+q[2]:C<64?L+=u(R,N,A)+q[3]:L+=p(R,N,A)+q[4],L=L|0,L=y(L,F[C]),L=L+w|0,H=w,w=A,A=y(N,10),N=R,R=L,L=S+g[D+T[C]]|0,C<16?L+=p(B,I,$)+E[0]:C<32?L+=u(B,I,$)+E[1]:C<48?L+=b(B,I,$)+E[2]:C<64?L+=v(B,I,$)+E[3]:L+=m(B,I,$)+E[4],L=L|0,L=y(L,O[C]),L=L+U|0,S=U,U=$,$=y(I,10),I=B,B=L;L=P[1]+N+$|0,P[1]=P[2]+A+U|0,P[2]=P[3]+w+S|0,P[3]=P[4]+H+B|0,P[4]=P[0]+R+I|0,P[0]=L},_doFinalize:function(){var g=this._data,D=g.words,C=this._nDataBytes*8,M=g.sigBytes*8;D[M>>>5]|=128<<24-M%32,D[(M+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,g.sigBytes=(D.length+1)*4,this._process();for(var k=this._hash,P=k.words,q=0;q<5;q++){var E=P[q];P[q]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return k},clone:function(){var g=i.clone.call(this);return g._hash=this._hash.clone(),g}});function m(g,D,C){return g^D^C}function v(g,D,C){return g&D|~g&C}function b(g,D,C){return(g|~D)^C}function u(g,D,C){return g&C|D&~C}function p(g,D,C){return g^(D|~C)}function y(g,D){return g<<D|g>>>32-D}r.RIPEMD160=i._createHelper(h),r.HmacRIPEMD160=i._createHmacHelper(h)})(Math),e.RIPEMD160})});var Je=j((Ye,f0)=>{(function(e,t){typeof Ye=="object"?f0.exports=Ye=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ye,function(e){(function(){var t=e,r=t.lib,n=r.Base,o=t.enc,i=o.Utf8,c=t.algo,a=c.HMAC=n.extend({init:function(s,f){s=this._hasher=new s.init,typeof f=="string"&&(f=i.parse(f));var l=s.blockSize,x=l*4;f.sigBytes>x&&(f=s.finalize(f)),f.clamp();for(var d=this._oKey=f.clone(),h=this._iKey=f.clone(),m=d.words,v=h.words,b=0;b<l;b++)m[b]^=1549556828,v[b]^=909522486;d.sigBytes=h.sigBytes=x,this.reset()},reset:function(){var s=this._hasher;s.reset(),s.update(this._iKey)},update:function(s){return this._hasher.update(s),this},finalize:function(s){var f=this._hasher,l=f.finalize(s);f.reset();var x=f.finalize(this._oKey.clone().concat(l));return x}})})()})});var h0=j((Ke,m0)=>{(function(e,t,r){typeof Ke=="object"?m0.exports=Ke=t(z(),Ne(),Je()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],t):t(e.CryptoJS)})(Ke,function(e){return(function(){var t=e,r=t.lib,n=r.Base,o=r.WordArray,i=t.algo,c=i.SHA256,a=i.HMAC,s=i.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:25e4}),init:function(f){this.cfg=this.cfg.extend(f)},compute:function(f,l){for(var x=this.cfg,d=a.create(x.hasher,f),h=o.create(),m=o.create([1]),v=h.words,b=m.words,u=x.keySize,p=x.iterations;v.length<u;){var y=d.update(l).finalize(m);d.reset();for(var g=y.words,D=g.length,C=y,M=1;M<p;M++){C=d.finalize(C),d.reset();for(var k=C.words,P=0;P<D;P++)g[P]^=k[P]}h.concat(y),b[0]++}return h.sigBytes=u*4,h}});t.PBKDF2=function(f,l,x){return s.create(x).compute(f,l)}})(),e.PBKDF2})});var X=j((Ze,v0)=>{(function(e,t,r){typeof Ze=="object"?v0.exports=Ze=t(z(),At(),Je()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],t):t(e.CryptoJS)})(Ze,function(e){return(function(){var t=e,r=t.lib,n=r.Base,o=r.WordArray,i=t.algo,c=i.MD5,a=i.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,f){for(var l,x=this.cfg,d=x.hasher.create(),h=o.create(),m=h.words,v=x.keySize,b=x.iterations;m.length<v;){l&&d.update(l),l=d.update(s).finalize(f),d.reset();for(var u=1;u<b;u++)l=d.finalize(l),d.reset();h.concat(l)}return h.sigBytes=v*4,h}});t.EvpKDF=function(s,f,l){return a.create(l).compute(s,f)}})(),e.EvpKDF})});var W=j((Ve,b0)=>{(function(e,t,r){typeof Ve=="object"?b0.exports=Ve=t(z(),X()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],t):t(e.CryptoJS)})(Ve,function(e){e.lib.Cipher||(function(t){var r=e,n=r.lib,o=n.Base,i=n.WordArray,c=n.BufferedBlockAlgorithm,a=r.enc,s=a.Utf8,f=a.Base64,l=r.algo,x=l.EvpKDF,d=n.Cipher=c.extend({cfg:o.extend(),createEncryptor:function(E,_){return this.create(this._ENC_XFORM_MODE,E,_)},createDecryptor:function(E,_){return this.create(this._DEC_XFORM_MODE,E,_)},init:function(E,_,T){this.cfg=this.cfg.extend(T),this._xformMode=E,this._key=_,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function E(_){return typeof _=="string"?q:M}return function(_){return{encrypt:function(T,F,O){return E(F).encrypt(_,T,F,O)},decrypt:function(T,F,O){return E(F).decrypt(_,T,F,O)}}}})()}),h=n.StreamCipher=d.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),m=r.mode={},v=n.BlockCipherMode=o.extend({createEncryptor:function(E,_){return this.Encryptor.create(E,_)},createDecryptor:function(E,_){return this.Decryptor.create(E,_)},init:function(E,_){this._cipher=E,this._iv=_}}),b=m.CBC=(function(){var E=v.extend();E.Encryptor=E.extend({processBlock:function(T,F){var O=this._cipher,H=O.blockSize;_.call(this,T,F,H),O.encryptBlock(T,F),this._prevBlock=T.slice(F,F+H)}}),E.Decryptor=E.extend({processBlock:function(T,F){var O=this._cipher,H=O.blockSize,R=T.slice(F,F+H);O.decryptBlock(T,F),_.call(this,T,F,H),this._prevBlock=R}});function _(T,F,O){var H,R=this._iv;R?(H=R,this._iv=t):H=this._prevBlock;for(var N=0;N<O;N++)T[F+N]^=H[N]}return E})(),u=r.pad={},p=u.Pkcs7={pad:function(E,_){for(var T=_*4,F=T-E.sigBytes%T,O=F<<24|F<<16|F<<8|F,H=[],R=0;R<F;R+=4)H.push(O);var N=i.create(H,F);E.concat(N)},unpad:function(E){var _=E.words[E.sigBytes-1>>>2]&255;E.sigBytes-=_}},y=n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:b,padding:p}),reset:function(){var E;d.reset.call(this);var _=this.cfg,T=_.iv,F=_.mode;this._xformMode==this._ENC_XFORM_MODE?E=F.createEncryptor:(E=F.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,T&&T.words):(this._mode=E.call(F,this,T&&T.words),this._mode.__creator=E)},_doProcessBlock:function(E,_){this._mode.processBlock(E,_)},_doFinalize:function(){var E,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),_.unpad(E)),E},blockSize:128/32}),g=n.CipherParams=o.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),D=r.format={},C=D.OpenSSL={stringify:function(E){var _,T=E.ciphertext,F=E.salt;return F?_=i.create([1398893684,1701076831]).concat(F).concat(T):_=T,_.toString(f)},parse:function(E){var _,T=f.parse(E),F=T.words;return F[0]==1398893684&&F[1]==1701076831&&(_=i.create(F.slice(2,4)),F.splice(0,4),T.sigBytes-=16),g.create({ciphertext:T,salt:_})}},M=n.SerializableCipher=o.extend({cfg:o.extend({format:C}),encrypt:function(E,_,T,F){F=this.cfg.extend(F);var O=E.createEncryptor(T,F),H=O.finalize(_),R=O.cfg;return g.create({ciphertext:H,key:T,iv:R.iv,algorithm:E,mode:R.mode,padding:R.padding,blockSize:E.blockSize,formatter:F.format})},decrypt:function(E,_,T,F){F=this.cfg.extend(F),_=this._parse(_,F.format);var O=E.createDecryptor(T,F).finalize(_.ciphertext);return O},_parse:function(E,_){return typeof E=="string"?_.parse(E,this):E}}),k=r.kdf={},P=k.OpenSSL={execute:function(E,_,T,F,O){if(F||(F=i.random(64/8)),O)var H=x.create({keySize:_+T,hasher:O}).compute(E,F);else var H=x.create({keySize:_+T}).compute(E,F);var R=i.create(H.words.slice(_),T*4);return H.sigBytes=_*4,g.create({key:H,iv:R,salt:F})}},q=n.PasswordBasedCipher=M.extend({cfg:M.cfg.extend({kdf:P}),encrypt:function(E,_,T,F){F=this.cfg.extend(F);var O=F.kdf.execute(T,E.keySize,E.ivSize,F.salt,F.hasher);F.iv=O.iv;var H=M.encrypt.call(this,E,_,O.key,F);return H.mixIn(O),H},decrypt:function(E,_,T,F){F=this.cfg.extend(F),_=this._parse(_,F.format);var O=F.kdf.execute(T,E.keySize,E.ivSize,_.salt,F.hasher);F.iv=O.iv;var H=M.decrypt.call(this,E,_,O.key,F);return H}})})()})});var y0=j((Xe,g0)=>{(function(e,t,r){typeof Xe=="object"?g0.exports=Xe=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(Xe,function(e){return e.mode.CFB=(function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize;r.call(this,n,o,c,i),this._prevBlock=n.slice(o,o+c)}}),t.Decryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=n.slice(o,o+c);r.call(this,n,o,c,i),this._prevBlock=a}});function r(n,o,i,c){var a,s=this._iv;s?(a=s.slice(0),this._iv=void 0):a=this._prevBlock,c.encryptBlock(a,0);for(var f=0;f<i;f++)n[o+f]^=a[f]}return t})(),e.mode.CFB})});var C0=j((Qe,D0)=>{(function(e,t,r){typeof Qe=="object"?D0.exports=Qe=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(Qe,function(e){return e.mode.CTR=(function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=this._iv,s=this._counter;a&&(s=this._counter=a.slice(0),this._iv=void 0);var f=s.slice(0);i.encryptBlock(f,0),s[c-1]=s[c-1]+1|0;for(var l=0;l<c;l++)n[o+l]^=f[l]}});return t.Decryptor=r,t})(),e.mode.CTR})});var A0=j((et,E0)=>{(function(e,t,r){typeof et=="object"?E0.exports=et=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(et,function(e){return e.mode.CTRGladman=(function(){var t=e.lib.BlockCipherMode.extend();function r(i){if((i>>24&255)===255){var c=i>>16&255,a=i>>8&255,s=i&255;c===255?(c=0,a===255?(a=0,s===255?s=0:++s):++a):++c,i=0,i+=c<<16,i+=a<<8,i+=s}else i+=1<<24;return i}function n(i){return(i[0]=r(i[0]))===0&&(i[1]=r(i[1])),i}var o=t.Encryptor=t.extend({processBlock:function(i,c){var a=this._cipher,s=a.blockSize,f=this._iv,l=this._counter;f&&(l=this._counter=f.slice(0),this._iv=void 0),n(l);var x=l.slice(0);a.encryptBlock(x,0);for(var d=0;d<s;d++)i[c+d]^=x[d]}});return t.Decryptor=o,t})(),e.mode.CTRGladman})});var w0=j((tt,B0)=>{(function(e,t,r){typeof tt=="object"?B0.exports=tt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(tt,function(e){return e.mode.OFB=(function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=this._iv,s=this._keystream;a&&(s=this._keystream=a.slice(0),this._iv=void 0),i.encryptBlock(s,0);for(var f=0;f<c;f++)n[o+f]^=s[f]}});return t.Decryptor=r,t})(),e.mode.OFB})});var S0=j((rt,F0)=>{(function(e,t,r){typeof rt=="object"?F0.exports=rt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(rt,function(e){return e.mode.ECB=(function(){var t=e.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(r,n){this._cipher.encryptBlock(r,n)}}),t.Decryptor=t.extend({processBlock:function(r,n){this._cipher.decryptBlock(r,n)}}),t})(),e.mode.ECB})});var _0=j((nt,k0)=>{(function(e,t,r){typeof nt=="object"?k0.exports=nt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(nt,function(e){return e.pad.AnsiX923={pad:function(t,r){var n=t.sigBytes,o=r*4,i=o-n%o,c=n+i-1;t.clamp(),t.words[c>>>2]|=i<<24-c%4*8,t.sigBytes+=i},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Ansix923})});var P0=j((at,M0)=>{(function(e,t,r){typeof at=="object"?M0.exports=at=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(at,function(e){return e.pad.Iso10126={pad:function(t,r){var n=r*4,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Iso10126})});var q0=j((ot,T0)=>{(function(e,t,r){typeof ot=="object"?T0.exports=ot=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(ot,function(e){return e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971})});var O0=j((it,H0)=>{(function(e,t,r){typeof it=="object"?H0.exports=it=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(it,function(e){return e.pad.ZeroPadding={pad:function(t,r){var n=r*4;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){for(var r=t.words,n=t.sigBytes-1,n=t.sigBytes-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},e.pad.ZeroPadding})});var L0=j((st,R0)=>{(function(e,t,r){typeof st=="object"?R0.exports=st=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(st,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})});var z0=j((ct,j0)=>{(function(e,t,r){typeof ct=="object"?j0.exports=ct=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(ct,function(e){return(function(t){var r=e,n=r.lib,o=n.CipherParams,i=r.enc,c=i.Hex,a=r.format,s=a.Hex={stringify:function(f){return f.ciphertext.toString(c)},parse:function(f){var l=c.parse(f);return o.create({ciphertext:l})}}})(),e.format.Hex})});var $0=j((lt,N0)=>{(function(e,t,r){typeof lt=="object"?N0.exports=lt=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(lt,function(e){return(function(){var t=e,r=t.lib,n=r.BlockCipher,o=t.algo,i=[],c=[],a=[],s=[],f=[],l=[],x=[],d=[],h=[],m=[];(function(){for(var u=[],p=0;p<256;p++)p<128?u[p]=p<<1:u[p]=p<<1^283;for(var y=0,g=0,p=0;p<256;p++){var D=g^g<<1^g<<2^g<<3^g<<4;D=D>>>8^D&255^99,i[y]=D,c[D]=y;var C=u[y],M=u[C],k=u[M],P=u[D]*257^D*16843008;a[y]=P<<24|P>>>8,s[y]=P<<16|P>>>16,f[y]=P<<8|P>>>24,l[y]=P;var P=k*16843009^M*65537^C*257^y*16843008;x[D]=P<<24|P>>>8,d[D]=P<<16|P>>>16,h[D]=P<<8|P>>>24,m[D]=P,y?(y=C^u[u[u[k^C]]],g^=u[u[g]]):y=g=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],b=o.AES=n.extend({_doReset:function(){var u;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var p=this._keyPriorReset=this._key,y=p.words,g=p.sigBytes/4,D=this._nRounds=g+6,C=(D+1)*4,M=this._keySchedule=[],k=0;k<C;k++)k<g?M[k]=y[k]:(u=M[k-1],k%g?g>6&&k%g==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[u&255]):(u=u<<8|u>>>24,u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[u&255],u^=v[k/g|0]<<24),M[k]=M[k-g]^u);for(var P=this._invKeySchedule=[],q=0;q<C;q++){var k=C-q;if(q%4)var u=M[k];else var u=M[k-4];q<4||k<=4?P[q]=u:P[q]=x[i[u>>>24]]^d[i[u>>>16&255]]^h[i[u>>>8&255]]^m[i[u&255]]}}},encryptBlock:function(u,p){this._doCryptBlock(u,p,this._keySchedule,a,s,f,l,i)},decryptBlock:function(u,p){var y=u[p+1];u[p+1]=u[p+3],u[p+3]=y,this._doCryptBlock(u,p,this._invKeySchedule,x,d,h,m,c);var y=u[p+1];u[p+1]=u[p+3],u[p+3]=y},_doCryptBlock:function(u,p,y,g,D,C,M,k){for(var P=this._nRounds,q=u[p]^y[0],E=u[p+1]^y[1],_=u[p+2]^y[2],T=u[p+3]^y[3],F=4,O=1;O<P;O++){var H=g[q>>>24]^D[E>>>16&255]^C[_>>>8&255]^M[T&255]^y[F++],R=g[E>>>24]^D[_>>>16&255]^C[T>>>8&255]^M[q&255]^y[F++],N=g[_>>>24]^D[T>>>16&255]^C[q>>>8&255]^M[E&255]^y[F++],A=g[T>>>24]^D[q>>>16&255]^C[E>>>8&255]^M[_&255]^y[F++];q=H,E=R,_=N,T=A}var H=(k[q>>>24]<<24|k[E>>>16&255]<<16|k[_>>>8&255]<<8|k[T&255])^y[F++],R=(k[E>>>24]<<24|k[_>>>16&255]<<16|k[T>>>8&255]<<8|k[q&255])^y[F++],N=(k[_>>>24]<<24|k[T>>>16&255]<<16|k[q>>>8&255]<<8|k[E&255])^y[F++],A=(k[T>>>24]<<24|k[q>>>16&255]<<16|k[E>>>8&255]<<8|k[_&255])^y[F++];u[p]=H,u[p+1]=R,u[p+2]=N,u[p+3]=A},keySize:256/32});t.AES=n._createHelper(b)})(),e.AES})});var W0=j((dt,I0)=>{(function(e,t,r){typeof dt=="object"?I0.exports=dt=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(dt,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=r.BlockCipher,i=t.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],s=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],x=i.DES=o.extend({_doReset:function(){for(var v=this._key,b=v.words,u=[],p=0;p<56;p++){var y=c[p]-1;u[p]=b[y>>>5]>>>31-y%32&1}for(var g=this._subKeys=[],D=0;D<16;D++){for(var C=g[D]=[],M=s[D],p=0;p<24;p++)C[p/6|0]|=u[(a[p]-1+M)%28]<<31-p%6,C[4+(p/6|0)]|=u[28+(a[p+24]-1+M)%28]<<31-p%6;C[0]=C[0]<<1|C[0]>>>31;for(var p=1;p<7;p++)C[p]=C[p]>>>(p-1)*4+3;C[7]=C[7]<<5|C[7]>>>27}for(var k=this._invSubKeys=[],p=0;p<16;p++)k[p]=g[15-p]},encryptBlock:function(v,b){this._doCryptBlock(v,b,this._subKeys)},decryptBlock:function(v,b){this._doCryptBlock(v,b,this._invSubKeys)},_doCryptBlock:function(v,b,u){this._lBlock=v[b],this._rBlock=v[b+1],d.call(this,4,252645135),d.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),d.call(this,1,1431655765);for(var p=0;p<16;p++){for(var y=u[p],g=this._lBlock,D=this._rBlock,C=0,M=0;M<8;M++)C|=f[M][((D^y[M])&l[M])>>>0];this._lBlock=D,this._rBlock=g^C}var k=this._lBlock;this._lBlock=this._rBlock,this._rBlock=k,d.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),v[b]=this._lBlock,v[b+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function d(v,b){var u=(this._lBlock>>>v^this._rBlock)&b;this._rBlock^=u,this._lBlock^=u<<v}function h(v,b){var u=(this._rBlock>>>v^this._lBlock)&b;this._lBlock^=u,this._rBlock^=u<<v}t.DES=o._createHelper(x);var m=i.TripleDES=o.extend({_doReset:function(){var v=this._key,b=v.words;if(b.length!==2&&b.length!==4&&b.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var u=b.slice(0,2),p=b.length<4?b.slice(0,2):b.slice(2,4),y=b.length<6?b.slice(0,2):b.slice(4,6);this._des1=x.createEncryptor(n.create(u)),this._des2=x.createEncryptor(n.create(p)),this._des3=x.createEncryptor(n.create(y))},encryptBlock:function(v,b){this._des1.encryptBlock(v,b),this._des2.decryptBlock(v,b),this._des3.encryptBlock(v,b)},decryptBlock:function(v,b){this._des3.decryptBlock(v,b),this._des2.encryptBlock(v,b),this._des1.decryptBlock(v,b)},keySize:192/32,ivSize:64/32,blockSize:64/32});t.TripleDES=o._createHelper(m)})(),e.TripleDES})});var G0=j((ut,U0)=>{(function(e,t,r){typeof ut=="object"?U0.exports=ut=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(ut,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=o.RC4=n.extend({_doReset:function(){for(var s=this._key,f=s.words,l=s.sigBytes,x=this._S=[],d=0;d<256;d++)x[d]=d;for(var d=0,h=0;d<256;d++){var m=d%l,v=f[m>>>2]>>>24-m%4*8&255;h=(h+x[d]+v)%256;var b=x[d];x[d]=x[h],x[h]=b}this._i=this._j=0},_doProcessBlock:function(s,f){s[f]^=c.call(this)},keySize:256/32,ivSize:0});function c(){for(var s=this._S,f=this._i,l=this._j,x=0,d=0;d<4;d++){f=(f+1)%256,l=(l+s[f])%256;var h=s[f];s[f]=s[l],s[l]=h,x|=s[(s[f]+s[l])%256]<<24-d*8}return this._i=f,this._j=l,x}t.RC4=n._createHelper(i);var a=o.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var s=this.cfg.drop;s>0;s--)c.call(this)}});t.RC4Drop=n._createHelper(a)})(),e.RC4})});var J0=j((pt,Y0)=>{(function(e,t,r){typeof pt=="object"?Y0.exports=pt=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(pt,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=[],c=[],a=[],s=o.Rabbit=n.extend({_doReset:function(){for(var l=this._key.words,x=this.cfg.iv,d=0;d<4;d++)l[d]=(l[d]<<8|l[d]>>>24)&16711935|(l[d]<<24|l[d]>>>8)&4278255360;var h=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],m=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var d=0;d<4;d++)f.call(this);for(var d=0;d<8;d++)m[d]^=h[d+4&7];if(x){var v=x.words,b=v[0],u=v[1],p=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,y=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,g=p>>>16|y&4294901760,D=y<<16|p&65535;m[0]^=p,m[1]^=g,m[2]^=y,m[3]^=D,m[4]^=p,m[5]^=g,m[6]^=y,m[7]^=D;for(var d=0;d<4;d++)f.call(this)}},_doProcessBlock:function(l,x){var d=this._X;f.call(this),i[0]=d[0]^d[5]>>>16^d[3]<<16,i[1]=d[2]^d[7]>>>16^d[5]<<16,i[2]=d[4]^d[1]>>>16^d[7]<<16,i[3]=d[6]^d[3]>>>16^d[1]<<16;for(var h=0;h<4;h++)i[h]=(i[h]<<8|i[h]>>>24)&16711935|(i[h]<<24|i[h]>>>8)&4278255360,l[x+h]^=i[h]},blockSize:128/32,ivSize:64/32});function f(){for(var l=this._X,x=this._C,d=0;d<8;d++)c[d]=x[d];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<c[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<c[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<c[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<c[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<c[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<c[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<c[6]>>>0?1:0)|0,this._b=x[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var h=l[d]+x[d],m=h&65535,v=h>>>16,b=((m*m>>>17)+m*v>>>15)+v*v,u=((h&4294901760)*h|0)+((h&65535)*h|0);a[d]=b^u}l[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,l[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,l[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,l[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,l[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,l[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,l[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,l[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=n._createHelper(s)})(),e.Rabbit})});var Z0=j((xt,K0)=>{(function(e,t,r){typeof xt=="object"?K0.exports=xt=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(xt,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=[],c=[],a=[],s=o.RabbitLegacy=n.extend({_doReset:function(){var l=this._key.words,x=this.cfg.iv,d=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],h=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var m=0;m<4;m++)f.call(this);for(var m=0;m<8;m++)h[m]^=d[m+4&7];if(x){var v=x.words,b=v[0],u=v[1],p=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,y=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,g=p>>>16|y&4294901760,D=y<<16|p&65535;h[0]^=p,h[1]^=g,h[2]^=y,h[3]^=D,h[4]^=p,h[5]^=g,h[6]^=y,h[7]^=D;for(var m=0;m<4;m++)f.call(this)}},_doProcessBlock:function(l,x){var d=this._X;f.call(this),i[0]=d[0]^d[5]>>>16^d[3]<<16,i[1]=d[2]^d[7]>>>16^d[5]<<16,i[2]=d[4]^d[1]>>>16^d[7]<<16,i[3]=d[6]^d[3]>>>16^d[1]<<16;for(var h=0;h<4;h++)i[h]=(i[h]<<8|i[h]>>>24)&16711935|(i[h]<<24|i[h]>>>8)&4278255360,l[x+h]^=i[h]},blockSize:128/32,ivSize:64/32});function f(){for(var l=this._X,x=this._C,d=0;d<8;d++)c[d]=x[d];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<c[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<c[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<c[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<c[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<c[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<c[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<c[6]>>>0?1:0)|0,this._b=x[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var h=l[d]+x[d],m=h&65535,v=h>>>16,b=((m*m>>>17)+m*v>>>15)+v*v,u=((h&4294901760)*h|0)+((h&65535)*h|0);a[d]=b^u}l[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,l[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,l[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,l[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,l[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,l[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,l[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,l[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=n._createHelper(s)})(),e.RabbitLegacy})});var X0=j((ft,V0)=>{(function(e,t,r){typeof ft=="object"?V0.exports=ft=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(ft,function(e){return(function(){var t=e,r=t.lib,n=r.BlockCipher,o=t.algo;let i=16,c=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function f(m,v){let b=v>>24&255,u=v>>16&255,p=v>>8&255,y=v&255,g=m.sbox[0][b]+m.sbox[1][u];return g=g^m.sbox[2][p],g=g+m.sbox[3][y],g}function l(m,v,b){let u=v,p=b,y;for(let g=0;g<i;++g)u=u^m.pbox[g],p=f(m,u)^p,y=u,u=p,p=y;return y=u,u=p,p=y,p=p^m.pbox[i],u=u^m.pbox[i+1],{left:u,right:p}}function x(m,v,b){let u=v,p=b,y;for(let g=i+1;g>1;--g)u=u^m.pbox[g],p=f(m,u)^p,y=u,u=p,p=y;return y=u,u=p,p=y,p=p^m.pbox[1],u=u^m.pbox[0],{left:u,right:p}}function d(m,v,b){for(let D=0;D<4;D++){m.sbox[D]=[];for(let C=0;C<256;C++)m.sbox[D][C]=a[D][C]}let u=0;for(let D=0;D<i+2;D++)m.pbox[D]=c[D]^v[u],u++,u>=b&&(u=0);let p=0,y=0,g=0;for(let D=0;D<i+2;D+=2)g=l(m,p,y),p=g.left,y=g.right,m.pbox[D]=p,m.pbox[D+1]=y;for(let D=0;D<4;D++)for(let C=0;C<256;C+=2)g=l(m,p,y),p=g.left,y=g.right,m.sbox[D][C]=p,m.sbox[D][C+1]=y;return!0}var h=o.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var m=this._keyPriorReset=this._key,v=m.words,b=m.sigBytes/4;d(s,v,b)}},encryptBlock:function(m,v){var b=l(s,m[v],m[v+1]);m[v]=b.left,m[v+1]=b.right},decryptBlock:function(m,v){var b=x(s,m[v],m[v+1]);m[v]=b.left,m[v+1]=b.right},blockSize:64/32,keySize:128/32,ivSize:64/32});t.Blowfish=n._createHelper(h)})(),e.Blowfish})});var er=j((mt,Q0)=>{(function(e,t,r){typeof mt=="object"?Q0.exports=mt=t(z(),Ce(),Zt(),Xt(),re(),t0(),ne(),At(),Ne(),i0(),Bt(),l0(),u0(),x0(),Je(),h0(),X(),W(),y0(),C0(),A0(),w0(),S0(),_0(),P0(),q0(),O0(),L0(),z0(),$0(),W0(),G0(),J0(),Z0(),X0()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],t):e.CryptoJS=t(e.CryptoJS)})(mt,function(e){return e})});var ya={};Cr(ya,{default:()=>ga});var bt={name:"dphelper",version:"3.1.4",type:"module",main:"index.js",browser:"./dist/dphelper.umd.js",description:"dphelper devtools for developers",license:"MIT",types:"./types/dphelper.d.ts",typings:"./types/*",copyright:"Dario Passariello",homepage:"https://a51.gitbook.io/dphelper",author:"Dario Passariello <dariopassariello@gmail.com>",support:{name:"Dario Passariello",url:"https://github.com/passariello/",email:"dariopassariello@gmail.com"},bugs:{url:"https://github.com/a51-dev/a51.dphelper.public/issues"},contributors:[{name:"Dario Passariello",email:"dariopassariello@gmail.com",url:"https://dario.passariello.ca/"},{name:"Valeria Cala Scaglitta",email:"valeriacalascaglitta@gmail.com"}],keywords:["dphelper","front-end","back-end","framework","helper","utils","tools","uuid","random","window","store","easy","pro","powerful","state","status","dp helper","local","storage","indexdb","idb","devtool"],funding:[{type:"patreon",url:"https://www.patreon.com/passariello"}],typing:["types/*"],exports:{".":{types:"./types/dphelper.d.ts",import:"./index.js",default:"./index.js"},"./types/*":"./types/*"},scripts:{build:"rimraf dist && npm run generate-imports && node esbuild.config.mjs && node node_modules/typescript/bin/tsc -p tsconfig.json --emitDeclarationOnly && node scripts/patch-dist.mjs",dev:"npm run generate-imports && node esbuild.config.mjs --watch-and-serve","npm:pack":"npm run build && cd dist && npm pack","npm:publish":"npm run build && npm publish ./dist --access public",test:"cd tests && npm run test",lint:"cd tests && npm run lint",tsc:"cd tests && tsc --noEmit","generate-imports":"tsx scripts/generate-imports.ts"},devDependencies:{"crypto-js":"4.2.0","@jest/globals":"^30.2.0","@types/crypto-js":"4.2.2","@types/node":"^25.3.2",esbuild:"0.27.3","esbuild-node-externals":"1.20.1","esbuild-plugin-alias":"0.2.1","esbuild-plugin-copy":"2.1.1","esbuild-sass-plugin":"3.6.0","esbuild-scss-modules-plugin":"1.1.1",rimraf:"6.1.3",tslib:"^2.8.1",tsx:"^4.21.0",typescript:"5.9.3"}};var zt={info:{title:"List",description:"Complete list of tools"},categories:["3party","system","financial","memory","numbers","time","path","file","forms","ui","other","development"]};var gt=globalThis.dphelper;if(gt&&gt.version&&gt.version<bt.version)try{delete globalThis.dphelper}catch{console.debug("Could not delete existing dphelper (likely non-configurable)")}var yt=Object.getOwnPropertyDescriptor(globalThis,"dphelper");yt&&!yt.configurable?yt.writable?globalThis.dphelper===void 0&&(globalThis.dphelper={}):console.debug("dphelper already defined on globalThis and is not writable/configurable"):Object.defineProperty(globalThis,"dphelper",{value:globalThis.dphelper||{},writable:!0,configurable:!0,enumerable:!1});globalThis.dphelper&&Object.defineProperties(globalThis.dphelper,{_list:{value:{scripts:[],sockets:[],...zt},configurable:!0,writable:!0},version:{value:bt.version,configurable:!0,writable:!0},isServer:{value:typeof window>"u",configurable:!0,writable:!0},isBrowser:{value:typeof window<"u",configurable:!0,writable:!0}});Object.defineProperty(dphelper,"setProps",{value:(e,t,r)=>{Object.defineProperty(e,t.name,r||{writable:!1,configurable:!1,enumerable:!1}),r?.lock&&Object.freeze(e[t.name])},writable:!1,configurable:!1,enumerable:!1});Object.defineProperty(dphelper,"setDescription",{value:(e,t)=>{Object.defineProperties(dphelper,{[e.name]:{value:t,writable:!1,configurable:!1,enumerable:!1}}),Object.keys(t).map(r=>(Object.defineProperties(dphelper[e.name],{[r]:{writable:!1,configurable:!1,enumerable:!1}}),null)),dphelper.setProps(dphelper,e,{writable:!1,configurable:!1,enumerable:!1}),dphelper._list.scripts.push(e)}});var Fr={name:"ai",active:!0,subCommand:[{name:"tokenCount",version:"0.0.3",example:"dphelper.ai.tokenCount({ users: [1,2,3] })",author:"Dario Passariello",creationDate:"20260220",lastMod:"20260221",type:"function",active:!0,description:"Estimate token count for LLMs. If an object is passed, it uses TOON format for calculation.",env:"both",subCommand:[]},{name:"smartSanitize",version:"0.0.2",example:"dphelper.ai.smartSanitize('My email is test@example.com')",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Remove PII (emails, phones, etc) from text for AI privacy",subCommand:[]},{name:"toon",version:"0.0.1",example:"dphelper.ai.toon({ users: [{id: 1, name: 'Ada'}] })",author:"TOON + Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Convert JSON to TOON format (Token-Oriented Object Notation)",subCommand:[]},{name:"toonToJson",version:"0.0.1",example:"dphelper.ai.toonToJson('users[1]{id,name}:\\n 1,Ada')",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Convert TOON format back to JSON/Object",subCommand:[]},{name:"chunker",version:"0.0.1",example:"dphelper.ai.chunker(text, { size: 1000, overlap: 200 })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Split long text into chunks for RAG or AI processing.",subCommand:[]},{name:"similarity",version:"0.0.1",example:"dphelper.ai.similarity(vecA, vecB)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Calculate cosine similarity between two embedding vectors.",subCommand:[]},{name:"extractReasoning",version:"0.0.1",example:"dphelper.ai.extractReasoning(aiResponse)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Extract <think> tags or internal reasoning from AI responses.",subCommand:[]},{name:"prompt",version:"0.0.1",example:"dphelper.ai.prompt('Hello {{name}}', { name: 'Ada' })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Simple prompt template engine with variable injection.",subCommand:[]},{name:"schema",version:"0.0.1",example:"dphelper.ai.schema({ id: 1, name: 'Ada' })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Generate a TOON-style schema definition for AI instructions.",subCommand:[]},{name:"snapshot",version:"0.0.1",example:"dphelper.ai.snapshot()",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Capture a 'mental snapshot' of the app state (logs/globals) in TOON format for AI debugging.",env:"both",subCommand:[]}]},Dt=e=>e===null||typeof e!="object",Fe=e=>e===null?"null":typeof e=="string"?e.includes(",")||e.includes(":")||e.includes('"')||e.includes(`
2
- `)||e.trim()!==e?`"${e.replace(/"/g,'\\"')}"`:e||'""':String(e),ge=(e,t=0)=>{let r=" ".repeat(t);if(Dt(e))return Fe(e);if(Array.isArray(e)){if(e.length===0)return"[0]:";let n=e[0];if(!Dt(n)&&!Array.isArray(n)){let o=Object.keys(n),i=`[${e.length}]{${o.join(",")}}:`;for(let c of e){let a=o.map(s=>Fe(c[s])).join(",");i+=`
3
- ${r} ${a}`}return i}else return`[${e.length}]: `+e.map(Fe).join(",")}else return Object.entries(e).map(([n,o])=>{let i=n.includes(" ")||n.includes(":")?`"${n}"`:n;if(!Dt(o)){let c=ge(o,t+1);return c.startsWith("[")?`${i}${c}`:`${i}:
4
- ${r}${c}`}return`${i}: ${Fe(o)}`}).join(`
5
- ${r}`)},Nt={tokenCount:e=>{let t=typeof e=="string"?e:ge(e);if(!t)return 0;let r=t.trim().split(/\s+/).length,n=t.length;return Math.ceil((n/4+r*1.3)/2)},smartSanitize:e=>e?e.replace(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,"[EMAIL]").replace(/(?:\+?\d{1,3}[- ]?)?\(?\d{3}\)?[- ]?\d{3}[- ]?\d{4}/g,"[PHONE]").replace(/\b\d{4}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}\b/g,"[CREDIT_CARD]").replace(/\b\d{3}-\d{2}-\d{4}\b/g,"[SSN]"):"",toon:e=>ge(e),toonToJson:e=>{if(!e)return null;let t=e.split(`
6
- `).filter(c=>c.trim()!==""),r={},n=[{indent:-1,obj:r}],o=c=>(c=c.trim(),c==="true"?!0:c==="false"?!1:c==="null"?null:!isNaN(Number(c))&&c!==""?Number(c):c.startsWith('"')&&c.endsWith('"')?c.slice(1,-1).replace(/\\"/g,'"'):c),i=c=>{let a=[],s="",f=!1;for(let l=0;l<c.length;l++){let x=c[l];x==='"'&&c[l-1]!=="\\"?f=!f:x===","&&!f?(a.push(s.trim()),s=""):s+=x}return a.push(s.trim()),a.map(o)};for(let c=0;c<t.length;c++){let a=t[c],s=a.search(/\S/),f=a.trim();if(!f)continue;for(;n.length>1&&s<=n[n.length-1].indent;)n.pop();let l=n[n.length-1];if(l.fields){let v=i(f),b={};l.fields.forEach((u,p)=>b[u]=v[p]),l.obj.push(b);continue}let x=f.indexOf(":");if(x===-1)continue;let d=f.slice(0,x).trim(),h=f.slice(x+1).trim(),m=d.match(/^(.+?)\[(\d+)\](?:{(.+?)})?$/);if(m){let[v,b,u,p]=m,y=[];l.obj[b]=y,p?n.push({indent:s,obj:y,key:b,fields:p.split(",").map(g=>g.trim())}):h?i(h).forEach(g=>y.push(g)):n.push({indent:s,obj:y,key:b})}else{let v=t[c+1],b=v?v.search(/\S/):-1;if(h===""&&b>s){let u={};l.obj[d]=u,n.push({indent:s,obj:u,key:d})}else l.obj[d]=o(h)}}return r},chunker:(e,t={})=>{if(!e)return[];let r=t.size||1e3,n=t.overlap||200,o=[],i=0;for(;i<e.length;)o.push(e.slice(i,i+r)),i+=r-n;return o},similarity:(e,t)=>{if(e.length!==t.length)return 0;let r=0,n=0,o=0;for(let i=0;i<e.length;i++)r+=e[i]*t[i],n+=e[i]*e[i],o+=t[i]*t[i];return r/(Math.sqrt(n)*Math.sqrt(o))},extractReasoning:e=>{let t=e.match(/<think>([\s\S]*?)<\/think>/);return{reasoning:t?t[1].trim():"",content:e.replace(/<think>[\s\S]*?<\/think>/,"").trim()}},prompt:(e,t)=>e.replace(/{{(.*?)}}/g,(r,n)=>{let o=t[n.trim()];return o!==void 0?typeof o=="object"?ge(o):String(o):`{{${n}}}`}),schema:e=>{let t=r=>r===null?"any":Array.isArray(r)?r.length>0&&typeof r[0]=="object"?`Array<{${Object.keys(r[0]).map(n=>`${n}:${t(r[0][n])}`).join(", ")}}>`:"Array<primitive>":typeof r;return typeof e!="object"||e===null?t(e):Object.entries(e).map(([r,n])=>`${r}: ${t(n)}`).join(`
7
- `)},snapshot:()=>{let e=typeof window<"u",t={context:{env:e?"browser":"server",time:new Date().toISOString()}};e?(t.context.url=window.location.href.split("?")[0],t.context.title=document.title,t.state=window.gState||"No global state detected",t.logs=dphelper?.log?.list?.()?.slice(-10)||[],t.system={lang:navigator.language,screen:`${window.screen.width}x${window.screen.height}`,zoom:dphelper?.browser?.zoom?.()||100}):t.system={platform:typeof process<"u"?process.platform:"unknown",node:typeof process<"u"?process.version:"unknown",arch:typeof process<"u"?process.arch:"unknown"};let r=ge(t);return Nt.smartSanitize(r)}};dphelper?.setDescription(Fr,Nt);var Sr={name:"anchor",active:!0,subCommand:[{name:"toOnClick",type:"function",version:"0.0.2",example:"dphelper.anchor.toOnClick([element, 'foo' | '.foo' | '#foo'])",description:`This tool allows you to convert all links in an element to 'onclick'.
1
+ "use strict";var dphelper=(()=>{var br=Object.create;var Fe=Object.defineProperty;var gr=Object.getOwnPropertyDescriptor;var yr=Object.getOwnPropertyNames;var Dr=Object.getPrototypeOf,Cr=Object.prototype.hasOwnProperty;var Rt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Er=(e,t)=>{for(var r in t)Fe(e,r,{get:t[r],enumerable:!0})},zt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of yr(t))!Cr.call(e,o)&&o!==r&&Fe(e,o,{get:()=>t[o],enumerable:!(n=gr(t,o))||n.enumerable});return e};var Ar=(e,t,r)=>(r=e!=null?br(Dr(e)):{},zt(t||!e||!e.__esModule?Fe(r,"default",{value:e,enumerable:!0}):r,e)),Br=e=>zt(Fe({},"__esModule",{value:!0}),e);var Yt=R(()=>{});var z=R((Te,Jt)=>{(function(e,t){typeof Te=="object"?Jt.exports=Te=t():typeof define=="function"&&define.amd?define([],t):e.CryptoJS=t()})(Te,function(){var e=e||(function(t,r){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global<"u"&&global.crypto&&(n=global.crypto),!n&&typeof Rt=="function")try{n=Yt()}catch{}var o=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||(function(){function u(){}return function(p){var y;return u.prototype=p,y=new u,u.prototype=null,y}})(),c={},a=c.lib={},s=a.Base=(function(){return{extend:function(u){var p=i(this);return u&&p.mixIn(u),(!p.hasOwnProperty("init")||this.init===p.init)&&(p.init=function(){p.$super.init.apply(this,arguments)}),p.init.prototype=p,p.$super=this,p},create:function(){var u=this.extend();return u.init.apply(u,arguments),u},init:function(){},mixIn:function(u){for(var p in u)u.hasOwnProperty(p)&&(this[p]=u[p]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),f=a.WordArray=s.extend({init:function(u,p){u=this.words=u||[],p!=r?this.sigBytes=p:this.sigBytes=u.length*4},toString:function(u){return(u||x).stringify(this)},concat:function(u){var p=this.words,y=u.words,g=this.sigBytes,D=u.sigBytes;if(this.clamp(),g%4)for(var C=0;C<D;C++){var M=y[C>>>2]>>>24-C%4*8&255;p[g+C>>>2]|=M<<24-(g+C)%4*8}else for(var k=0;k<D;k+=4)p[g+k>>>2]=y[k>>>2];return this.sigBytes+=D,this},clamp:function(){var u=this.words,p=this.sigBytes;u[p>>>2]&=4294967295<<32-p%4*8,u.length=t.ceil(p/4)},clone:function(){var u=s.clone.call(this);return u.words=this.words.slice(0),u},random:function(u){for(var p=[],y=0;y<u;y+=4)p.push(o());return new f.init(p,u)}}),l=c.enc={},x=l.Hex={stringify:function(u){for(var p=u.words,y=u.sigBytes,g=[],D=0;D<y;D++){var C=p[D>>>2]>>>24-D%4*8&255;g.push((C>>>4).toString(16)),g.push((C&15).toString(16))}return g.join("")},parse:function(u){for(var p=u.length,y=[],g=0;g<p;g+=2)y[g>>>3]|=parseInt(u.substr(g,2),16)<<24-g%8*4;return new f.init(y,p/2)}},d=l.Latin1={stringify:function(u){for(var p=u.words,y=u.sigBytes,g=[],D=0;D<y;D++){var C=p[D>>>2]>>>24-D%4*8&255;g.push(String.fromCharCode(C))}return g.join("")},parse:function(u){for(var p=u.length,y=[],g=0;g<p;g++)y[g>>>2]|=(u.charCodeAt(g)&255)<<24-g%4*8;return new f.init(y,p)}},h=l.Utf8={stringify:function(u){try{return decodeURIComponent(escape(d.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(u){return d.parse(unescape(encodeURIComponent(u)))}},m=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(u){typeof u=="string"&&(u=h.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},_process:function(u){var p,y=this._data,g=y.words,D=y.sigBytes,C=this.blockSize,M=C*4,k=D/M;u?k=t.ceil(k):k=t.max((k|0)-this._minBufferSize,0);var P=k*C,q=t.min(P*4,D);if(P){for(var E=0;E<P;E+=C)this._doProcessBlock(g,E);p=g.splice(0,P),y.sigBytes-=q}return new f.init(p,q)},clone:function(){var u=s.clone.call(this);return u._data=this._data.clone(),u},_minBufferSize:0}),v=a.Hasher=m.extend({cfg:s.extend(),init:function(u){this.cfg=this.cfg.extend(u),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(u){return this._append(u),this._process(),this},finalize:function(u){u&&this._append(u);var p=this._doFinalize();return p},blockSize:512/32,_createHelper:function(u){return function(p,y){return new u.init(y).finalize(p)}},_createHmacHelper:function(u){return function(p,y){return new b.HMAC.init(u,y).finalize(p)}}}),b=c.algo={};return c})(Math);return e})});var Ee=R((qe,Kt)=>{(function(e,t){typeof qe=="object"?Kt.exports=qe=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(qe,function(e){return(function(t){var r=e,n=r.lib,o=n.Base,i=n.WordArray,c=r.x64={},a=c.Word=o.extend({init:function(f,l){this.high=f,this.low=l}}),s=c.WordArray=o.extend({init:function(f,l){f=this.words=f||[],l!=t?this.sigBytes=l:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,l=f.length,x=[],d=0;d<l;d++){var h=f[d];x.push(h.high),x.push(h.low)}return i.create(x,this.sigBytes)},clone:function(){for(var f=o.clone.call(this),l=f.words=this.words.slice(0),x=l.length,d=0;d<x;d++)l[d]=l[d].clone();return f}})})(),e})});var Vt=R((He,Zt)=>{(function(e,t){typeof He=="object"?Zt.exports=He=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(He,function(e){return(function(){if(typeof ArrayBuffer=="function"){var t=e,r=t.lib,n=r.WordArray,o=n.init,i=n.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray<"u"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var a=c.byteLength,s=[],f=0;f<a;f++)s[f>>>2]|=c[f]<<24-f%4*8;o.call(this,s,a)}else o.apply(this,arguments)};i.prototype=n}})(),e.lib.WordArray})});var Qt=R((Le,Xt)=>{(function(e,t){typeof Le=="object"?Xt.exports=Le=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Le,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Utf16=o.Utf16BE={stringify:function(a){for(var s=a.words,f=a.sigBytes,l=[],x=0;x<f;x+=2){var d=s[x>>>2]>>>16-x%4*8&65535;l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,f=[],l=0;l<s;l++)f[l>>>1]|=a.charCodeAt(l)<<16-l%2*16;return n.create(f,s*2)}};o.Utf16LE={stringify:function(a){for(var s=a.words,f=a.sigBytes,l=[],x=0;x<f;x+=2){var d=c(s[x>>>2]>>>16-x%4*8&65535);l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,f=[],l=0;l<s;l++)f[l>>>1]|=c(a.charCodeAt(l)<<16-l%2*16);return n.create(f,s*2)}};function c(a){return a<<8&4278255360|a>>>8&16711935}})(),e.enc.Utf16})});var re=R((je,e0)=>{(function(e,t){typeof je=="object"?e0.exports=je=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(je,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Base64={stringify:function(a){var s=a.words,f=a.sigBytes,l=this._map;a.clamp();for(var x=[],d=0;d<f;d+=3)for(var h=s[d>>>2]>>>24-d%4*8&255,m=s[d+1>>>2]>>>24-(d+1)%4*8&255,v=s[d+2>>>2]>>>24-(d+2)%4*8&255,b=h<<16|m<<8|v,u=0;u<4&&d+u*.75<f;u++)x.push(l.charAt(b>>>6*(3-u)&63));var p=l.charAt(64);if(p)for(;x.length%4;)x.push(p);return x.join("")},parse:function(a){var s=a.length,f=this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var x=0;x<f.length;x++)l[f.charCodeAt(x)]=x}var d=f.charAt(64);if(d){var h=a.indexOf(d);h!==-1&&(s=h)}return c(a,s,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function c(a,s,f){for(var l=[],x=0,d=0;d<s;d++)if(d%4){var h=f[a.charCodeAt(d-1)]<<d%4*2,m=f[a.charCodeAt(d)]>>>6-d%4*2,v=h|m;l[x>>>2]|=v<<24-x%4*8,x++}return n.create(l,x)}})(),e.enc.Base64})});var r0=R((Oe,t0)=>{(function(e,t){typeof Oe=="object"?t0.exports=Oe=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Oe,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Base64url={stringify:function(a,s){s===void 0&&(s=!0);var f=a.words,l=a.sigBytes,x=s?this._safe_map:this._map;a.clamp();for(var d=[],h=0;h<l;h+=3)for(var m=f[h>>>2]>>>24-h%4*8&255,v=f[h+1>>>2]>>>24-(h+1)%4*8&255,b=f[h+2>>>2]>>>24-(h+2)%4*8&255,u=m<<16|v<<8|b,p=0;p<4&&h+p*.75<l;p++)d.push(x.charAt(u>>>6*(3-p)&63));var y=x.charAt(64);if(y)for(;d.length%4;)d.push(y);return d.join("")},parse:function(a,s){s===void 0&&(s=!0);var f=a.length,l=s?this._safe_map:this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var d=0;d<l.length;d++)x[l.charCodeAt(d)]=d}var h=l.charAt(64);if(h){var m=a.indexOf(h);m!==-1&&(f=m)}return c(a,f,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function c(a,s,f){for(var l=[],x=0,d=0;d<s;d++)if(d%4){var h=f[a.charCodeAt(d-1)]<<d%4*2,m=f[a.charCodeAt(d)]>>>6-d%4*2,v=h|m;l[x>>>2]|=v<<24-x%4*8,x++}return n.create(l,x)}})(),e.enc.Base64url})});var ne=R((Re,n0)=>{(function(e,t){typeof Re=="object"?n0.exports=Re=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Re,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=[];(function(){for(var h=0;h<64;h++)a[h]=t.abs(t.sin(h+1))*4294967296|0})();var s=c.MD5=i.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(h,m){for(var v=0;v<16;v++){var b=m+v,u=h[b];h[b]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}var p=this._hash.words,y=h[m+0],g=h[m+1],D=h[m+2],C=h[m+3],M=h[m+4],k=h[m+5],P=h[m+6],q=h[m+7],E=h[m+8],_=h[m+9],T=h[m+10],F=h[m+11],L=h[m+12],H=h[m+13],j=h[m+14],N=h[m+15],A=p[0],w=p[1],S=p[2],B=p[3];A=f(A,w,S,B,y,7,a[0]),B=f(B,A,w,S,g,12,a[1]),S=f(S,B,A,w,D,17,a[2]),w=f(w,S,B,A,C,22,a[3]),A=f(A,w,S,B,M,7,a[4]),B=f(B,A,w,S,k,12,a[5]),S=f(S,B,A,w,P,17,a[6]),w=f(w,S,B,A,q,22,a[7]),A=f(A,w,S,B,E,7,a[8]),B=f(B,A,w,S,_,12,a[9]),S=f(S,B,A,w,T,17,a[10]),w=f(w,S,B,A,F,22,a[11]),A=f(A,w,S,B,L,7,a[12]),B=f(B,A,w,S,H,12,a[13]),S=f(S,B,A,w,j,17,a[14]),w=f(w,S,B,A,N,22,a[15]),A=l(A,w,S,B,g,5,a[16]),B=l(B,A,w,S,P,9,a[17]),S=l(S,B,A,w,F,14,a[18]),w=l(w,S,B,A,y,20,a[19]),A=l(A,w,S,B,k,5,a[20]),B=l(B,A,w,S,T,9,a[21]),S=l(S,B,A,w,N,14,a[22]),w=l(w,S,B,A,M,20,a[23]),A=l(A,w,S,B,_,5,a[24]),B=l(B,A,w,S,j,9,a[25]),S=l(S,B,A,w,C,14,a[26]),w=l(w,S,B,A,E,20,a[27]),A=l(A,w,S,B,H,5,a[28]),B=l(B,A,w,S,D,9,a[29]),S=l(S,B,A,w,q,14,a[30]),w=l(w,S,B,A,L,20,a[31]),A=x(A,w,S,B,k,4,a[32]),B=x(B,A,w,S,E,11,a[33]),S=x(S,B,A,w,F,16,a[34]),w=x(w,S,B,A,j,23,a[35]),A=x(A,w,S,B,g,4,a[36]),B=x(B,A,w,S,M,11,a[37]),S=x(S,B,A,w,q,16,a[38]),w=x(w,S,B,A,T,23,a[39]),A=x(A,w,S,B,H,4,a[40]),B=x(B,A,w,S,y,11,a[41]),S=x(S,B,A,w,C,16,a[42]),w=x(w,S,B,A,P,23,a[43]),A=x(A,w,S,B,_,4,a[44]),B=x(B,A,w,S,L,11,a[45]),S=x(S,B,A,w,N,16,a[46]),w=x(w,S,B,A,D,23,a[47]),A=d(A,w,S,B,y,6,a[48]),B=d(B,A,w,S,q,10,a[49]),S=d(S,B,A,w,j,15,a[50]),w=d(w,S,B,A,k,21,a[51]),A=d(A,w,S,B,L,6,a[52]),B=d(B,A,w,S,C,10,a[53]),S=d(S,B,A,w,T,15,a[54]),w=d(w,S,B,A,g,21,a[55]),A=d(A,w,S,B,E,6,a[56]),B=d(B,A,w,S,N,10,a[57]),S=d(S,B,A,w,P,15,a[58]),w=d(w,S,B,A,H,21,a[59]),A=d(A,w,S,B,M,6,a[60]),B=d(B,A,w,S,F,10,a[61]),S=d(S,B,A,w,D,15,a[62]),w=d(w,S,B,A,_,21,a[63]),p[0]=p[0]+A|0,p[1]=p[1]+w|0,p[2]=p[2]+S|0,p[3]=p[3]+B|0},_doFinalize:function(){var h=this._data,m=h.words,v=this._nDataBytes*8,b=h.sigBytes*8;m[b>>>5]|=128<<24-b%32;var u=t.floor(v/4294967296),p=v;m[(b+64>>>9<<4)+15]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,m[(b+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,h.sigBytes=(m.length+1)*4,this._process();for(var y=this._hash,g=y.words,D=0;D<4;D++){var C=g[D];g[D]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}return y},clone:function(){var h=i.clone.call(this);return h._hash=this._hash.clone(),h}});function f(h,m,v,b,u,p,y){var g=h+(m&v|~m&b)+u+y;return(g<<p|g>>>32-p)+m}function l(h,m,v,b,u,p,y){var g=h+(m&b|v&~b)+u+y;return(g<<p|g>>>32-p)+m}function x(h,m,v,b,u,p,y){var g=h+(m^v^b)+u+y;return(g<<p|g>>>32-p)+m}function d(h,m,v,b,u,p,y){var g=h+(v^(m|~b))+u+y;return(g<<p|g>>>32-p)+m}r.MD5=i._createHelper(s),r.HmacMD5=i._createHmacHelper(s)})(Math),e.MD5})});var Bt=R((ze,a0)=>{(function(e,t){typeof ze=="object"?a0.exports=ze=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(ze,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,c=[],a=i.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,f){for(var l=this._hash.words,x=l[0],d=l[1],h=l[2],m=l[3],v=l[4],b=0;b<80;b++){if(b<16)c[b]=s[f+b]|0;else{var u=c[b-3]^c[b-8]^c[b-14]^c[b-16];c[b]=u<<1|u>>>31}var p=(x<<5|x>>>27)+v+c[b];b<20?p+=(d&h|~d&m)+1518500249:b<40?p+=(d^h^m)+1859775393:b<60?p+=(d&h|d&m|h&m)-1894007588:p+=(d^h^m)-899497514,v=m,m=h,h=d<<30|d>>>2,d=x,x=p}l[0]=l[0]+x|0,l[1]=l[1]+d|0,l[2]=l[2]+h|0,l[3]=l[3]+m|0,l[4]=l[4]+v|0},_doFinalize:function(){var s=this._data,f=s.words,l=this._nDataBytes*8,x=s.sigBytes*8;return f[x>>>5]|=128<<24-x%32,f[(x+64>>>9<<4)+14]=Math.floor(l/4294967296),f[(x+64>>>9<<4)+15]=l,s.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var s=o.clone.call(this);return s._hash=this._hash.clone(),s}});t.SHA1=o._createHelper(a),t.HmacSHA1=o._createHmacHelper(a)})(),e.SHA1})});var Ie=R((Ne,o0)=>{(function(e,t){typeof Ne=="object"?o0.exports=Ne=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ne,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=[],s=[];(function(){function x(v){for(var b=t.sqrt(v),u=2;u<=b;u++)if(!(v%u))return!1;return!0}function d(v){return(v-(v|0))*4294967296|0}for(var h=2,m=0;m<64;)x(h)&&(m<8&&(a[m]=d(t.pow(h,1/2))),s[m]=d(t.pow(h,1/3)),m++),h++})();var f=[],l=c.SHA256=i.extend({_doReset:function(){this._hash=new o.init(a.slice(0))},_doProcessBlock:function(x,d){for(var h=this._hash.words,m=h[0],v=h[1],b=h[2],u=h[3],p=h[4],y=h[5],g=h[6],D=h[7],C=0;C<64;C++){if(C<16)f[C]=x[d+C]|0;else{var M=f[C-15],k=(M<<25|M>>>7)^(M<<14|M>>>18)^M>>>3,P=f[C-2],q=(P<<15|P>>>17)^(P<<13|P>>>19)^P>>>10;f[C]=k+f[C-7]+q+f[C-16]}var E=p&y^~p&g,_=m&v^m&b^v&b,T=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),F=(p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25),L=D+F+E+s[C]+f[C],H=T+_;D=g,g=y,y=p,p=u+L|0,u=b,b=v,v=m,m=L+H|0}h[0]=h[0]+m|0,h[1]=h[1]+v|0,h[2]=h[2]+b|0,h[3]=h[3]+u|0,h[4]=h[4]+p|0,h[5]=h[5]+y|0,h[6]=h[6]+g|0,h[7]=h[7]+D|0},_doFinalize:function(){var x=this._data,d=x.words,h=this._nDataBytes*8,m=x.sigBytes*8;return d[m>>>5]|=128<<24-m%32,d[(m+64>>>9<<4)+14]=t.floor(h/4294967296),d[(m+64>>>9<<4)+15]=h,x.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var x=i.clone.call(this);return x._hash=this._hash.clone(),x}});r.SHA256=i._createHelper(l),r.HmacSHA256=i._createHmacHelper(l)})(Math),e.SHA256})});var s0=R(($e,i0)=>{(function(e,t,r){typeof $e=="object"?i0.exports=$e=t(z(),Ie()):typeof define=="function"&&define.amd?define(["./core","./sha256"],t):t(e.CryptoJS)})($e,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.algo,i=o.SHA256,c=o.SHA224=i.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=i._doFinalize.call(this);return a.sigBytes-=4,a}});t.SHA224=i._createHelper(c),t.HmacSHA224=i._createHmacHelper(c)})(),e.SHA224})});var wt=R((We,c0)=>{(function(e,t,r){typeof We=="object"?c0.exports=We=t(z(),Ee()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],t):t(e.CryptoJS)})(We,function(e){return(function(){var t=e,r=t.lib,n=r.Hasher,o=t.x64,i=o.Word,c=o.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var f=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];(function(){for(var d=0;d<80;d++)l[d]=s()})();var x=a.SHA512=n.extend({_doReset:function(){this._hash=new c.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(d,h){for(var m=this._hash.words,v=m[0],b=m[1],u=m[2],p=m[3],y=m[4],g=m[5],D=m[6],C=m[7],M=v.high,k=v.low,P=b.high,q=b.low,E=u.high,_=u.low,T=p.high,F=p.low,L=y.high,H=y.low,j=g.high,N=g.low,A=D.high,w=D.low,S=C.high,B=C.low,$=M,I=k,U=P,O=q,xe=E,de=_,vt=T,fe=F,K=L,G=H,Ae=j,me=N,Be=A,he=w,bt=S,ve=B,Z=0;Z<80;Z++){var J,ee,we=l[Z];if(Z<16)ee=we.high=d[h+Z*2]|0,J=we.low=d[h+Z*2+1]|0;else{var Ft=l[Z-15],ue=Ft.high,be=Ft.low,or=(ue>>>1|be<<31)^(ue>>>8|be<<24)^ue>>>7,St=(be>>>1|ue<<31)^(be>>>8|ue<<24)^(be>>>7|ue<<25),kt=l[Z-2],pe=kt.high,ge=kt.low,ir=(pe>>>19|ge<<13)^(pe<<3|ge>>>29)^pe>>>6,_t=(ge>>>19|pe<<13)^(ge<<3|pe>>>29)^(ge>>>6|pe<<26),Mt=l[Z-7],sr=Mt.high,cr=Mt.low,Pt=l[Z-16],lr=Pt.high,Tt=Pt.low;J=St+cr,ee=or+sr+(J>>>0<St>>>0?1:0),J=J+_t,ee=ee+ir+(J>>>0<_t>>>0?1:0),J=J+Tt,ee=ee+lr+(J>>>0<Tt>>>0?1:0),we.high=ee,we.low=J}var dr=K&Ae^~K&Be,qt=G&me^~G&he,ur=$&U^$&xe^U&xe,pr=I&O^I&de^O&de,xr=($>>>28|I<<4)^($<<30|I>>>2)^($<<25|I>>>7),Ht=(I>>>28|$<<4)^(I<<30|$>>>2)^(I<<25|$>>>7),fr=(K>>>14|G<<18)^(K>>>18|G<<14)^(K<<23|G>>>9),mr=(G>>>14|K<<18)^(G>>>18|K<<14)^(G<<23|K>>>9),Lt=f[Z],hr=Lt.high,jt=Lt.low,Y=ve+mr,te=bt+fr+(Y>>>0<ve>>>0?1:0),Y=Y+qt,te=te+dr+(Y>>>0<qt>>>0?1:0),Y=Y+jt,te=te+hr+(Y>>>0<jt>>>0?1:0),Y=Y+J,te=te+ee+(Y>>>0<J>>>0?1:0),Ot=Ht+pr,vr=xr+ur+(Ot>>>0<Ht>>>0?1:0);bt=Be,ve=he,Be=Ae,he=me,Ae=K,me=G,G=fe+Y|0,K=vt+te+(G>>>0<fe>>>0?1:0)|0,vt=xe,fe=de,xe=U,de=O,U=$,O=I,I=Y+Ot|0,$=te+vr+(I>>>0<Y>>>0?1:0)|0}k=v.low=k+I,v.high=M+$+(k>>>0<I>>>0?1:0),q=b.low=q+O,b.high=P+U+(q>>>0<O>>>0?1:0),_=u.low=_+de,u.high=E+xe+(_>>>0<de>>>0?1:0),F=p.low=F+fe,p.high=T+vt+(F>>>0<fe>>>0?1:0),H=y.low=H+G,y.high=L+K+(H>>>0<G>>>0?1:0),N=g.low=N+me,g.high=j+Ae+(N>>>0<me>>>0?1:0),w=D.low=w+he,D.high=A+Be+(w>>>0<he>>>0?1:0),B=C.low=B+ve,C.high=S+bt+(B>>>0<ve>>>0?1:0)},_doFinalize:function(){var d=this._data,h=d.words,m=this._nDataBytes*8,v=d.sigBytes*8;h[v>>>5]|=128<<24-v%32,h[(v+128>>>10<<5)+30]=Math.floor(m/4294967296),h[(v+128>>>10<<5)+31]=m,d.sigBytes=h.length*4,this._process();var b=this._hash.toX32();return b},clone:function(){var d=n.clone.call(this);return d._hash=this._hash.clone(),d},blockSize:1024/32});t.SHA512=n._createHelper(x),t.HmacSHA512=n._createHmacHelper(x)})(),e.SHA512})});var d0=R((Ue,l0)=>{(function(e,t,r){typeof Ue=="object"?l0.exports=Ue=t(z(),Ee(),wt()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],t):t(e.CryptoJS)})(Ue,function(e){return(function(){var t=e,r=t.x64,n=r.Word,o=r.WordArray,i=t.algo,c=i.SHA512,a=i.SHA384=c.extend({_doReset:function(){this._hash=new o.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var s=c._doFinalize.call(this);return s.sigBytes-=16,s}});t.SHA384=c._createHelper(a),t.HmacSHA384=c._createHmacHelper(a)})(),e.SHA384})});var p0=R((Ge,u0)=>{(function(e,t,r){typeof Ge=="object"?u0.exports=Ge=t(z(),Ee()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],t):t(e.CryptoJS)})(Ge,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.x64,a=c.Word,s=r.algo,f=[],l=[],x=[];(function(){for(var m=1,v=0,b=0;b<24;b++){f[m+5*v]=(b+1)*(b+2)/2%64;var u=v%5,p=(2*m+3*v)%5;m=u,v=p}for(var m=0;m<5;m++)for(var v=0;v<5;v++)l[m+5*v]=v+(2*m+3*v)%5*5;for(var y=1,g=0;g<24;g++){for(var D=0,C=0,M=0;M<7;M++){if(y&1){var k=(1<<M)-1;k<32?C^=1<<k:D^=1<<k-32}y&128?y=y<<1^113:y<<=1}x[g]=a.create(D,C)}})();var d=[];(function(){for(var m=0;m<25;m++)d[m]=a.create()})();var h=s.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var m=this._state=[],v=0;v<25;v++)m[v]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(m,v){for(var b=this._state,u=this.blockSize/2,p=0;p<u;p++){var y=m[v+2*p],g=m[v+2*p+1];y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;var D=b[p];D.high^=g,D.low^=y}for(var C=0;C<24;C++){for(var M=0;M<5;M++){for(var k=0,P=0,q=0;q<5;q++){var D=b[M+5*q];k^=D.high,P^=D.low}var E=d[M];E.high=k,E.low=P}for(var M=0;M<5;M++)for(var _=d[(M+4)%5],T=d[(M+1)%5],F=T.high,L=T.low,k=_.high^(F<<1|L>>>31),P=_.low^(L<<1|F>>>31),q=0;q<5;q++){var D=b[M+5*q];D.high^=k,D.low^=P}for(var H=1;H<25;H++){var k,P,D=b[H],j=D.high,N=D.low,A=f[H];A<32?(k=j<<A|N>>>32-A,P=N<<A|j>>>32-A):(k=N<<A-32|j>>>64-A,P=j<<A-32|N>>>64-A);var w=d[l[H]];w.high=k,w.low=P}var S=d[0],B=b[0];S.high=B.high,S.low=B.low;for(var M=0;M<5;M++)for(var q=0;q<5;q++){var H=M+5*q,D=b[H],$=d[H],I=d[(M+1)%5+5*q],U=d[(M+2)%5+5*q];D.high=$.high^~I.high&U.high,D.low=$.low^~I.low&U.low}var D=b[0],O=x[C];D.high^=O.high,D.low^=O.low}},_doFinalize:function(){var m=this._data,v=m.words,b=this._nDataBytes*8,u=m.sigBytes*8,p=this.blockSize*32;v[u>>>5]|=1<<24-u%32,v[(t.ceil((u+1)/p)*p>>>5)-1]|=128,m.sigBytes=v.length*4,this._process();for(var y=this._state,g=this.cfg.outputLength/8,D=g/8,C=[],M=0;M<D;M++){var k=y[M],P=k.high,q=k.low;P=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,q=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360,C.push(q),C.push(P)}return new o.init(C,g)},clone:function(){for(var m=i.clone.call(this),v=m._state=this._state.slice(0),b=0;b<25;b++)v[b]=v[b].clone();return m}});r.SHA3=i._createHelper(h),r.HmacSHA3=i._createHmacHelper(h)})(Math),e.SHA3})});var f0=R((Ye,x0)=>{(function(e,t){typeof Ye=="object"?x0.exports=Ye=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ye,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),f=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),x=o.create([0,1518500249,1859775393,2400959708,2840853838]),d=o.create([1352829926,1548603684,1836072691,2053994217,0]),h=c.RIPEMD160=i.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(g,D){for(var C=0;C<16;C++){var M=D+C,k=g[M];g[M]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var P=this._hash.words,q=x.words,E=d.words,_=a.words,T=s.words,F=f.words,L=l.words,H,j,N,A,w,S,B,$,I,U;S=H=P[0],B=j=P[1],$=N=P[2],I=A=P[3],U=w=P[4];for(var O,C=0;C<80;C+=1)O=H+g[D+_[C]]|0,C<16?O+=m(j,N,A)+q[0]:C<32?O+=v(j,N,A)+q[1]:C<48?O+=b(j,N,A)+q[2]:C<64?O+=u(j,N,A)+q[3]:O+=p(j,N,A)+q[4],O=O|0,O=y(O,F[C]),O=O+w|0,H=w,w=A,A=y(N,10),N=j,j=O,O=S+g[D+T[C]]|0,C<16?O+=p(B,$,I)+E[0]:C<32?O+=u(B,$,I)+E[1]:C<48?O+=b(B,$,I)+E[2]:C<64?O+=v(B,$,I)+E[3]:O+=m(B,$,I)+E[4],O=O|0,O=y(O,L[C]),O=O+U|0,S=U,U=I,I=y($,10),$=B,B=O;O=P[1]+N+I|0,P[1]=P[2]+A+U|0,P[2]=P[3]+w+S|0,P[3]=P[4]+H+B|0,P[4]=P[0]+j+$|0,P[0]=O},_doFinalize:function(){var g=this._data,D=g.words,C=this._nDataBytes*8,M=g.sigBytes*8;D[M>>>5]|=128<<24-M%32,D[(M+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,g.sigBytes=(D.length+1)*4,this._process();for(var k=this._hash,P=k.words,q=0;q<5;q++){var E=P[q];P[q]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return k},clone:function(){var g=i.clone.call(this);return g._hash=this._hash.clone(),g}});function m(g,D,C){return g^D^C}function v(g,D,C){return g&D|~g&C}function b(g,D,C){return(g|~D)^C}function u(g,D,C){return g&C|D&~C}function p(g,D,C){return g^(D|~C)}function y(g,D){return g<<D|g>>>32-D}r.RIPEMD160=i._createHelper(h),r.HmacRIPEMD160=i._createHmacHelper(h)})(Math),e.RIPEMD160})});var Ke=R((Je,m0)=>{(function(e,t){typeof Je=="object"?m0.exports=Je=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Je,function(e){(function(){var t=e,r=t.lib,n=r.Base,o=t.enc,i=o.Utf8,c=t.algo,a=c.HMAC=n.extend({init:function(s,f){s=this._hasher=new s.init,typeof f=="string"&&(f=i.parse(f));var l=s.blockSize,x=l*4;f.sigBytes>x&&(f=s.finalize(f)),f.clamp();for(var d=this._oKey=f.clone(),h=this._iKey=f.clone(),m=d.words,v=h.words,b=0;b<l;b++)m[b]^=1549556828,v[b]^=909522486;d.sigBytes=h.sigBytes=x,this.reset()},reset:function(){var s=this._hasher;s.reset(),s.update(this._iKey)},update:function(s){return this._hasher.update(s),this},finalize:function(s){var f=this._hasher,l=f.finalize(s);f.reset();var x=f.finalize(this._oKey.clone().concat(l));return x}})})()})});var v0=R((Ze,h0)=>{(function(e,t,r){typeof Ze=="object"?h0.exports=Ze=t(z(),Ie(),Ke()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],t):t(e.CryptoJS)})(Ze,function(e){return(function(){var t=e,r=t.lib,n=r.Base,o=r.WordArray,i=t.algo,c=i.SHA256,a=i.HMAC,s=i.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:25e4}),init:function(f){this.cfg=this.cfg.extend(f)},compute:function(f,l){for(var x=this.cfg,d=a.create(x.hasher,f),h=o.create(),m=o.create([1]),v=h.words,b=m.words,u=x.keySize,p=x.iterations;v.length<u;){var y=d.update(l).finalize(m);d.reset();for(var g=y.words,D=g.length,C=y,M=1;M<p;M++){C=d.finalize(C),d.reset();for(var k=C.words,P=0;P<D;P++)g[P]^=k[P]}h.concat(y),b[0]++}return h.sigBytes=u*4,h}});t.PBKDF2=function(f,l,x){return s.create(x).compute(f,l)}})(),e.PBKDF2})});var X=R((Ve,b0)=>{(function(e,t,r){typeof Ve=="object"?b0.exports=Ve=t(z(),Bt(),Ke()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],t):t(e.CryptoJS)})(Ve,function(e){return(function(){var t=e,r=t.lib,n=r.Base,o=r.WordArray,i=t.algo,c=i.MD5,a=i.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,f){for(var l,x=this.cfg,d=x.hasher.create(),h=o.create(),m=h.words,v=x.keySize,b=x.iterations;m.length<v;){l&&d.update(l),l=d.update(s).finalize(f),d.reset();for(var u=1;u<b;u++)l=d.finalize(l),d.reset();h.concat(l)}return h.sigBytes=v*4,h}});t.EvpKDF=function(s,f,l){return a.create(l).compute(s,f)}})(),e.EvpKDF})});var W=R((Xe,g0)=>{(function(e,t,r){typeof Xe=="object"?g0.exports=Xe=t(z(),X()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],t):t(e.CryptoJS)})(Xe,function(e){e.lib.Cipher||(function(t){var r=e,n=r.lib,o=n.Base,i=n.WordArray,c=n.BufferedBlockAlgorithm,a=r.enc,s=a.Utf8,f=a.Base64,l=r.algo,x=l.EvpKDF,d=n.Cipher=c.extend({cfg:o.extend(),createEncryptor:function(E,_){return this.create(this._ENC_XFORM_MODE,E,_)},createDecryptor:function(E,_){return this.create(this._DEC_XFORM_MODE,E,_)},init:function(E,_,T){this.cfg=this.cfg.extend(T),this._xformMode=E,this._key=_,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function E(_){return typeof _=="string"?q:M}return function(_){return{encrypt:function(T,F,L){return E(F).encrypt(_,T,F,L)},decrypt:function(T,F,L){return E(F).decrypt(_,T,F,L)}}}})()}),h=n.StreamCipher=d.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),m=r.mode={},v=n.BlockCipherMode=o.extend({createEncryptor:function(E,_){return this.Encryptor.create(E,_)},createDecryptor:function(E,_){return this.Decryptor.create(E,_)},init:function(E,_){this._cipher=E,this._iv=_}}),b=m.CBC=(function(){var E=v.extend();E.Encryptor=E.extend({processBlock:function(T,F){var L=this._cipher,H=L.blockSize;_.call(this,T,F,H),L.encryptBlock(T,F),this._prevBlock=T.slice(F,F+H)}}),E.Decryptor=E.extend({processBlock:function(T,F){var L=this._cipher,H=L.blockSize,j=T.slice(F,F+H);L.decryptBlock(T,F),_.call(this,T,F,H),this._prevBlock=j}});function _(T,F,L){var H,j=this._iv;j?(H=j,this._iv=t):H=this._prevBlock;for(var N=0;N<L;N++)T[F+N]^=H[N]}return E})(),u=r.pad={},p=u.Pkcs7={pad:function(E,_){for(var T=_*4,F=T-E.sigBytes%T,L=F<<24|F<<16|F<<8|F,H=[],j=0;j<F;j+=4)H.push(L);var N=i.create(H,F);E.concat(N)},unpad:function(E){var _=E.words[E.sigBytes-1>>>2]&255;E.sigBytes-=_}},y=n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:b,padding:p}),reset:function(){var E;d.reset.call(this);var _=this.cfg,T=_.iv,F=_.mode;this._xformMode==this._ENC_XFORM_MODE?E=F.createEncryptor:(E=F.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,T&&T.words):(this._mode=E.call(F,this,T&&T.words),this._mode.__creator=E)},_doProcessBlock:function(E,_){this._mode.processBlock(E,_)},_doFinalize:function(){var E,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),_.unpad(E)),E},blockSize:128/32}),g=n.CipherParams=o.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),D=r.format={},C=D.OpenSSL={stringify:function(E){var _,T=E.ciphertext,F=E.salt;return F?_=i.create([1398893684,1701076831]).concat(F).concat(T):_=T,_.toString(f)},parse:function(E){var _,T=f.parse(E),F=T.words;return F[0]==1398893684&&F[1]==1701076831&&(_=i.create(F.slice(2,4)),F.splice(0,4),T.sigBytes-=16),g.create({ciphertext:T,salt:_})}},M=n.SerializableCipher=o.extend({cfg:o.extend({format:C}),encrypt:function(E,_,T,F){F=this.cfg.extend(F);var L=E.createEncryptor(T,F),H=L.finalize(_),j=L.cfg;return g.create({ciphertext:H,key:T,iv:j.iv,algorithm:E,mode:j.mode,padding:j.padding,blockSize:E.blockSize,formatter:F.format})},decrypt:function(E,_,T,F){F=this.cfg.extend(F),_=this._parse(_,F.format);var L=E.createDecryptor(T,F).finalize(_.ciphertext);return L},_parse:function(E,_){return typeof E=="string"?_.parse(E,this):E}}),k=r.kdf={},P=k.OpenSSL={execute:function(E,_,T,F,L){if(F||(F=i.random(64/8)),L)var H=x.create({keySize:_+T,hasher:L}).compute(E,F);else var H=x.create({keySize:_+T}).compute(E,F);var j=i.create(H.words.slice(_),T*4);return H.sigBytes=_*4,g.create({key:H,iv:j,salt:F})}},q=n.PasswordBasedCipher=M.extend({cfg:M.cfg.extend({kdf:P}),encrypt:function(E,_,T,F){F=this.cfg.extend(F);var L=F.kdf.execute(T,E.keySize,E.ivSize,F.salt,F.hasher);F.iv=L.iv;var H=M.encrypt.call(this,E,_,L.key,F);return H.mixIn(L),H},decrypt:function(E,_,T,F){F=this.cfg.extend(F),_=this._parse(_,F.format);var L=F.kdf.execute(T,E.keySize,E.ivSize,_.salt,F.hasher);F.iv=L.iv;var H=M.decrypt.call(this,E,_,L.key,F);return H}})})()})});var D0=R((Qe,y0)=>{(function(e,t,r){typeof Qe=="object"?y0.exports=Qe=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(Qe,function(e){return e.mode.CFB=(function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize;r.call(this,n,o,c,i),this._prevBlock=n.slice(o,o+c)}}),t.Decryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=n.slice(o,o+c);r.call(this,n,o,c,i),this._prevBlock=a}});function r(n,o,i,c){var a,s=this._iv;s?(a=s.slice(0),this._iv=void 0):a=this._prevBlock,c.encryptBlock(a,0);for(var f=0;f<i;f++)n[o+f]^=a[f]}return t})(),e.mode.CFB})});var E0=R((et,C0)=>{(function(e,t,r){typeof et=="object"?C0.exports=et=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(et,function(e){return e.mode.CTR=(function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=this._iv,s=this._counter;a&&(s=this._counter=a.slice(0),this._iv=void 0);var f=s.slice(0);i.encryptBlock(f,0),s[c-1]=s[c-1]+1|0;for(var l=0;l<c;l++)n[o+l]^=f[l]}});return t.Decryptor=r,t})(),e.mode.CTR})});var B0=R((tt,A0)=>{(function(e,t,r){typeof tt=="object"?A0.exports=tt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(tt,function(e){return e.mode.CTRGladman=(function(){var t=e.lib.BlockCipherMode.extend();function r(i){if((i>>24&255)===255){var c=i>>16&255,a=i>>8&255,s=i&255;c===255?(c=0,a===255?(a=0,s===255?s=0:++s):++a):++c,i=0,i+=c<<16,i+=a<<8,i+=s}else i+=1<<24;return i}function n(i){return(i[0]=r(i[0]))===0&&(i[1]=r(i[1])),i}var o=t.Encryptor=t.extend({processBlock:function(i,c){var a=this._cipher,s=a.blockSize,f=this._iv,l=this._counter;f&&(l=this._counter=f.slice(0),this._iv=void 0),n(l);var x=l.slice(0);a.encryptBlock(x,0);for(var d=0;d<s;d++)i[c+d]^=x[d]}});return t.Decryptor=o,t})(),e.mode.CTRGladman})});var F0=R((rt,w0)=>{(function(e,t,r){typeof rt=="object"?w0.exports=rt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(rt,function(e){return e.mode.OFB=(function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=this._iv,s=this._keystream;a&&(s=this._keystream=a.slice(0),this._iv=void 0),i.encryptBlock(s,0);for(var f=0;f<c;f++)n[o+f]^=s[f]}});return t.Decryptor=r,t})(),e.mode.OFB})});var k0=R((nt,S0)=>{(function(e,t,r){typeof nt=="object"?S0.exports=nt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(nt,function(e){return e.mode.ECB=(function(){var t=e.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(r,n){this._cipher.encryptBlock(r,n)}}),t.Decryptor=t.extend({processBlock:function(r,n){this._cipher.decryptBlock(r,n)}}),t})(),e.mode.ECB})});var M0=R((at,_0)=>{(function(e,t,r){typeof at=="object"?_0.exports=at=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(at,function(e){return e.pad.AnsiX923={pad:function(t,r){var n=t.sigBytes,o=r*4,i=o-n%o,c=n+i-1;t.clamp(),t.words[c>>>2]|=i<<24-c%4*8,t.sigBytes+=i},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Ansix923})});var T0=R((ot,P0)=>{(function(e,t,r){typeof ot=="object"?P0.exports=ot=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(ot,function(e){return e.pad.Iso10126={pad:function(t,r){var n=r*4,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Iso10126})});var H0=R((it,q0)=>{(function(e,t,r){typeof it=="object"?q0.exports=it=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(it,function(e){return e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971})});var j0=R((st,L0)=>{(function(e,t,r){typeof st=="object"?L0.exports=st=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(st,function(e){return e.pad.ZeroPadding={pad:function(t,r){var n=r*4;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){for(var r=t.words,n=t.sigBytes-1,n=t.sigBytes-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},e.pad.ZeroPadding})});var R0=R((ct,O0)=>{(function(e,t,r){typeof ct=="object"?O0.exports=ct=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(ct,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})});var N0=R((lt,z0)=>{(function(e,t,r){typeof lt=="object"?z0.exports=lt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(lt,function(e){return(function(t){var r=e,n=r.lib,o=n.CipherParams,i=r.enc,c=i.Hex,a=r.format,s=a.Hex={stringify:function(f){return f.ciphertext.toString(c)},parse:function(f){var l=c.parse(f);return o.create({ciphertext:l})}}})(),e.format.Hex})});var $0=R((dt,I0)=>{(function(e,t,r){typeof dt=="object"?I0.exports=dt=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(dt,function(e){return(function(){var t=e,r=t.lib,n=r.BlockCipher,o=t.algo,i=[],c=[],a=[],s=[],f=[],l=[],x=[],d=[],h=[],m=[];(function(){for(var u=[],p=0;p<256;p++)p<128?u[p]=p<<1:u[p]=p<<1^283;for(var y=0,g=0,p=0;p<256;p++){var D=g^g<<1^g<<2^g<<3^g<<4;D=D>>>8^D&255^99,i[y]=D,c[D]=y;var C=u[y],M=u[C],k=u[M],P=u[D]*257^D*16843008;a[y]=P<<24|P>>>8,s[y]=P<<16|P>>>16,f[y]=P<<8|P>>>24,l[y]=P;var P=k*16843009^M*65537^C*257^y*16843008;x[D]=P<<24|P>>>8,d[D]=P<<16|P>>>16,h[D]=P<<8|P>>>24,m[D]=P,y?(y=C^u[u[u[k^C]]],g^=u[u[g]]):y=g=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],b=o.AES=n.extend({_doReset:function(){var u;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var p=this._keyPriorReset=this._key,y=p.words,g=p.sigBytes/4,D=this._nRounds=g+6,C=(D+1)*4,M=this._keySchedule=[],k=0;k<C;k++)k<g?M[k]=y[k]:(u=M[k-1],k%g?g>6&&k%g==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[u&255]):(u=u<<8|u>>>24,u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[u&255],u^=v[k/g|0]<<24),M[k]=M[k-g]^u);for(var P=this._invKeySchedule=[],q=0;q<C;q++){var k=C-q;if(q%4)var u=M[k];else var u=M[k-4];q<4||k<=4?P[q]=u:P[q]=x[i[u>>>24]]^d[i[u>>>16&255]]^h[i[u>>>8&255]]^m[i[u&255]]}}},encryptBlock:function(u,p){this._doCryptBlock(u,p,this._keySchedule,a,s,f,l,i)},decryptBlock:function(u,p){var y=u[p+1];u[p+1]=u[p+3],u[p+3]=y,this._doCryptBlock(u,p,this._invKeySchedule,x,d,h,m,c);var y=u[p+1];u[p+1]=u[p+3],u[p+3]=y},_doCryptBlock:function(u,p,y,g,D,C,M,k){for(var P=this._nRounds,q=u[p]^y[0],E=u[p+1]^y[1],_=u[p+2]^y[2],T=u[p+3]^y[3],F=4,L=1;L<P;L++){var H=g[q>>>24]^D[E>>>16&255]^C[_>>>8&255]^M[T&255]^y[F++],j=g[E>>>24]^D[_>>>16&255]^C[T>>>8&255]^M[q&255]^y[F++],N=g[_>>>24]^D[T>>>16&255]^C[q>>>8&255]^M[E&255]^y[F++],A=g[T>>>24]^D[q>>>16&255]^C[E>>>8&255]^M[_&255]^y[F++];q=H,E=j,_=N,T=A}var H=(k[q>>>24]<<24|k[E>>>16&255]<<16|k[_>>>8&255]<<8|k[T&255])^y[F++],j=(k[E>>>24]<<24|k[_>>>16&255]<<16|k[T>>>8&255]<<8|k[q&255])^y[F++],N=(k[_>>>24]<<24|k[T>>>16&255]<<16|k[q>>>8&255]<<8|k[E&255])^y[F++],A=(k[T>>>24]<<24|k[q>>>16&255]<<16|k[E>>>8&255]<<8|k[_&255])^y[F++];u[p]=H,u[p+1]=j,u[p+2]=N,u[p+3]=A},keySize:256/32});t.AES=n._createHelper(b)})(),e.AES})});var U0=R((ut,W0)=>{(function(e,t,r){typeof ut=="object"?W0.exports=ut=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(ut,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=r.BlockCipher,i=t.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],s=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],x=i.DES=o.extend({_doReset:function(){for(var v=this._key,b=v.words,u=[],p=0;p<56;p++){var y=c[p]-1;u[p]=b[y>>>5]>>>31-y%32&1}for(var g=this._subKeys=[],D=0;D<16;D++){for(var C=g[D]=[],M=s[D],p=0;p<24;p++)C[p/6|0]|=u[(a[p]-1+M)%28]<<31-p%6,C[4+(p/6|0)]|=u[28+(a[p+24]-1+M)%28]<<31-p%6;C[0]=C[0]<<1|C[0]>>>31;for(var p=1;p<7;p++)C[p]=C[p]>>>(p-1)*4+3;C[7]=C[7]<<5|C[7]>>>27}for(var k=this._invSubKeys=[],p=0;p<16;p++)k[p]=g[15-p]},encryptBlock:function(v,b){this._doCryptBlock(v,b,this._subKeys)},decryptBlock:function(v,b){this._doCryptBlock(v,b,this._invSubKeys)},_doCryptBlock:function(v,b,u){this._lBlock=v[b],this._rBlock=v[b+1],d.call(this,4,252645135),d.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),d.call(this,1,1431655765);for(var p=0;p<16;p++){for(var y=u[p],g=this._lBlock,D=this._rBlock,C=0,M=0;M<8;M++)C|=f[M][((D^y[M])&l[M])>>>0];this._lBlock=D,this._rBlock=g^C}var k=this._lBlock;this._lBlock=this._rBlock,this._rBlock=k,d.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),v[b]=this._lBlock,v[b+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function d(v,b){var u=(this._lBlock>>>v^this._rBlock)&b;this._rBlock^=u,this._lBlock^=u<<v}function h(v,b){var u=(this._rBlock>>>v^this._lBlock)&b;this._lBlock^=u,this._rBlock^=u<<v}t.DES=o._createHelper(x);var m=i.TripleDES=o.extend({_doReset:function(){var v=this._key,b=v.words;if(b.length!==2&&b.length!==4&&b.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var u=b.slice(0,2),p=b.length<4?b.slice(0,2):b.slice(2,4),y=b.length<6?b.slice(0,2):b.slice(4,6);this._des1=x.createEncryptor(n.create(u)),this._des2=x.createEncryptor(n.create(p)),this._des3=x.createEncryptor(n.create(y))},encryptBlock:function(v,b){this._des1.encryptBlock(v,b),this._des2.decryptBlock(v,b),this._des3.encryptBlock(v,b)},decryptBlock:function(v,b){this._des3.decryptBlock(v,b),this._des2.encryptBlock(v,b),this._des1.decryptBlock(v,b)},keySize:192/32,ivSize:64/32,blockSize:64/32});t.TripleDES=o._createHelper(m)})(),e.TripleDES})});var Y0=R((pt,G0)=>{(function(e,t,r){typeof pt=="object"?G0.exports=pt=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(pt,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=o.RC4=n.extend({_doReset:function(){for(var s=this._key,f=s.words,l=s.sigBytes,x=this._S=[],d=0;d<256;d++)x[d]=d;for(var d=0,h=0;d<256;d++){var m=d%l,v=f[m>>>2]>>>24-m%4*8&255;h=(h+x[d]+v)%256;var b=x[d];x[d]=x[h],x[h]=b}this._i=this._j=0},_doProcessBlock:function(s,f){s[f]^=c.call(this)},keySize:256/32,ivSize:0});function c(){for(var s=this._S,f=this._i,l=this._j,x=0,d=0;d<4;d++){f=(f+1)%256,l=(l+s[f])%256;var h=s[f];s[f]=s[l],s[l]=h,x|=s[(s[f]+s[l])%256]<<24-d*8}return this._i=f,this._j=l,x}t.RC4=n._createHelper(i);var a=o.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var s=this.cfg.drop;s>0;s--)c.call(this)}});t.RC4Drop=n._createHelper(a)})(),e.RC4})});var K0=R((xt,J0)=>{(function(e,t,r){typeof xt=="object"?J0.exports=xt=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(xt,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=[],c=[],a=[],s=o.Rabbit=n.extend({_doReset:function(){for(var l=this._key.words,x=this.cfg.iv,d=0;d<4;d++)l[d]=(l[d]<<8|l[d]>>>24)&16711935|(l[d]<<24|l[d]>>>8)&4278255360;var h=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],m=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var d=0;d<4;d++)f.call(this);for(var d=0;d<8;d++)m[d]^=h[d+4&7];if(x){var v=x.words,b=v[0],u=v[1],p=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,y=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,g=p>>>16|y&4294901760,D=y<<16|p&65535;m[0]^=p,m[1]^=g,m[2]^=y,m[3]^=D,m[4]^=p,m[5]^=g,m[6]^=y,m[7]^=D;for(var d=0;d<4;d++)f.call(this)}},_doProcessBlock:function(l,x){var d=this._X;f.call(this),i[0]=d[0]^d[5]>>>16^d[3]<<16,i[1]=d[2]^d[7]>>>16^d[5]<<16,i[2]=d[4]^d[1]>>>16^d[7]<<16,i[3]=d[6]^d[3]>>>16^d[1]<<16;for(var h=0;h<4;h++)i[h]=(i[h]<<8|i[h]>>>24)&16711935|(i[h]<<24|i[h]>>>8)&4278255360,l[x+h]^=i[h]},blockSize:128/32,ivSize:64/32});function f(){for(var l=this._X,x=this._C,d=0;d<8;d++)c[d]=x[d];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<c[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<c[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<c[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<c[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<c[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<c[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<c[6]>>>0?1:0)|0,this._b=x[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var h=l[d]+x[d],m=h&65535,v=h>>>16,b=((m*m>>>17)+m*v>>>15)+v*v,u=((h&4294901760)*h|0)+((h&65535)*h|0);a[d]=b^u}l[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,l[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,l[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,l[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,l[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,l[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,l[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,l[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=n._createHelper(s)})(),e.Rabbit})});var V0=R((ft,Z0)=>{(function(e,t,r){typeof ft=="object"?Z0.exports=ft=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(ft,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=[],c=[],a=[],s=o.RabbitLegacy=n.extend({_doReset:function(){var l=this._key.words,x=this.cfg.iv,d=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],h=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var m=0;m<4;m++)f.call(this);for(var m=0;m<8;m++)h[m]^=d[m+4&7];if(x){var v=x.words,b=v[0],u=v[1],p=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,y=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,g=p>>>16|y&4294901760,D=y<<16|p&65535;h[0]^=p,h[1]^=g,h[2]^=y,h[3]^=D,h[4]^=p,h[5]^=g,h[6]^=y,h[7]^=D;for(var m=0;m<4;m++)f.call(this)}},_doProcessBlock:function(l,x){var d=this._X;f.call(this),i[0]=d[0]^d[5]>>>16^d[3]<<16,i[1]=d[2]^d[7]>>>16^d[5]<<16,i[2]=d[4]^d[1]>>>16^d[7]<<16,i[3]=d[6]^d[3]>>>16^d[1]<<16;for(var h=0;h<4;h++)i[h]=(i[h]<<8|i[h]>>>24)&16711935|(i[h]<<24|i[h]>>>8)&4278255360,l[x+h]^=i[h]},blockSize:128/32,ivSize:64/32});function f(){for(var l=this._X,x=this._C,d=0;d<8;d++)c[d]=x[d];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<c[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<c[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<c[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<c[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<c[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<c[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<c[6]>>>0?1:0)|0,this._b=x[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var h=l[d]+x[d],m=h&65535,v=h>>>16,b=((m*m>>>17)+m*v>>>15)+v*v,u=((h&4294901760)*h|0)+((h&65535)*h|0);a[d]=b^u}l[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,l[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,l[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,l[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,l[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,l[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,l[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,l[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=n._createHelper(s)})(),e.RabbitLegacy})});var Q0=R((mt,X0)=>{(function(e,t,r){typeof mt=="object"?X0.exports=mt=t(z(),re(),ne(),X(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(mt,function(e){return(function(){var t=e,r=t.lib,n=r.BlockCipher,o=t.algo;let i=16,c=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function f(m,v){let b=v>>24&255,u=v>>16&255,p=v>>8&255,y=v&255,g=m.sbox[0][b]+m.sbox[1][u];return g=g^m.sbox[2][p],g=g+m.sbox[3][y],g}function l(m,v,b){let u=v,p=b,y;for(let g=0;g<i;++g)u=u^m.pbox[g],p=f(m,u)^p,y=u,u=p,p=y;return y=u,u=p,p=y,p=p^m.pbox[i],u=u^m.pbox[i+1],{left:u,right:p}}function x(m,v,b){let u=v,p=b,y;for(let g=i+1;g>1;--g)u=u^m.pbox[g],p=f(m,u)^p,y=u,u=p,p=y;return y=u,u=p,p=y,p=p^m.pbox[1],u=u^m.pbox[0],{left:u,right:p}}function d(m,v,b){for(let D=0;D<4;D++){m.sbox[D]=[];for(let C=0;C<256;C++)m.sbox[D][C]=a[D][C]}let u=0;for(let D=0;D<i+2;D++)m.pbox[D]=c[D]^v[u],u++,u>=b&&(u=0);let p=0,y=0,g=0;for(let D=0;D<i+2;D+=2)g=l(m,p,y),p=g.left,y=g.right,m.pbox[D]=p,m.pbox[D+1]=y;for(let D=0;D<4;D++)for(let C=0;C<256;C+=2)g=l(m,p,y),p=g.left,y=g.right,m.sbox[D][C]=p,m.sbox[D][C+1]=y;return!0}var h=o.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var m=this._keyPriorReset=this._key,v=m.words,b=m.sigBytes/4;d(s,v,b)}},encryptBlock:function(m,v){var b=l(s,m[v],m[v+1]);m[v]=b.left,m[v+1]=b.right},decryptBlock:function(m,v){var b=x(s,m[v],m[v+1]);m[v]=b.left,m[v+1]=b.right},blockSize:64/32,keySize:128/32,ivSize:64/32});t.Blowfish=n._createHelper(h)})(),e.Blowfish})});var tr=R((ht,er)=>{(function(e,t,r){typeof ht=="object"?er.exports=ht=t(z(),Ee(),Vt(),Qt(),re(),r0(),ne(),Bt(),Ie(),s0(),wt(),d0(),p0(),f0(),Ke(),v0(),X(),W(),D0(),E0(),B0(),F0(),k0(),M0(),T0(),H0(),j0(),R0(),N0(),$0(),U0(),Y0(),K0(),V0(),Q0()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],t):e.CryptoJS=t(e.CryptoJS)})(ht,function(e){return e})});var Aa={};Er(Aa,{default:()=>Ea});var gt={name:"dphelper",version:"3.1.6",type:"module",main:"index.js",browser:"./dist/dphelper.umd.js",description:"dphelper devtools for developers",license:"MIT",types:"./types/dphelper.d.ts",typings:"./types/*",copyright:"Dario Passariello",homepage:"https://a51.gitbook.io/dphelper",author:"Dario Passariello <dariopassariello@gmail.com>",engines:{node:">=18.0.0"},support:{name:"Dario Passariello",url:"https://github.com/passariello/",email:"dariopassariello@gmail.com"},repository:{type:"git",url:"git+https://github.com/a51-dev/a51.dphelper.public.git"},bugs:{url:"https://github.com/a51-dev/a51.dphelper.public/issues"},contributors:[{name:"Dario Passariello",email:"dariopassariello@gmail.com",url:"https://dario.passariello.ca/"},{name:"Valeria Cala Scaglitta",email:"valeriacalascaglitta@gmail.com"}],keywords:["dphelper","front-end","back-end","framework","helper","utils","tools","uuid","random","window","store","easy","pro","powerful","state","status","dp helper","local","storage","indexdb","idb","devtool"],funding:[{type:"patreon",url:"https://www.patreon.com/passariello"}],typing:["types/*"],exports:{".":{types:"./types/dphelper.d.ts",import:"./index.js",default:"./index.js"},"./types/*":"./types/*"},scripts:{build:"rimraf dist && npm run generate-imports && node esbuild.config.mjs && node node_modules/typescript/bin/tsc -p tsconfig.json --emitDeclarationOnly && node scripts/patch-dist.mjs",dev:"npm run generate-imports && node esbuild.config.mjs --watch-and-serve","npm:pack":"npm run build && cd dist && npm pack","npm:publish":"npm run build && npm publish ./dist --access public",test:"cd tests && npm run test",lint:"cd tests && npm run lint",tsc:"cd tests && tsc --noEmit","generate-imports":"tsx scripts/generate-imports.ts"},devDependencies:{"crypto-js":"4.2.0","@jest/globals":"^30.2.0","@types/crypto-js":"4.2.2","@types/node":"^25.3.2",esbuild:"0.27.3","esbuild-node-externals":"1.20.1","esbuild-plugin-alias":"0.2.1","esbuild-plugin-copy":"2.1.1","esbuild-sass-plugin":"3.6.0","esbuild-scss-modules-plugin":"1.1.1",rimraf:"6.1.3",tslib:"^2.8.1",tsx:"^4.21.0",typescript:"5.9.3"}};var Nt={info:{title:"List",description:"Complete list of tools"},categories:["3party","system","financial","memory","numbers","time","path","file","forms","ui","other","development"]};var yt=globalThis.dphelper;if(yt&&yt.version&&yt.version<gt.version)try{delete globalThis.dphelper}catch{console.debug("Could not delete existing dphelper (likely non-configurable)")}var Dt=Object.getOwnPropertyDescriptor(globalThis,"dphelper");Dt&&!Dt.configurable?Dt.writable?globalThis.dphelper===void 0&&(globalThis.dphelper={}):console.debug("dphelper already defined on globalThis and is not writable/configurable"):Object.defineProperty(globalThis,"dphelper",{value:globalThis.dphelper||{},writable:!0,configurable:!0,enumerable:!1});globalThis.dphelper&&Object.defineProperties(globalThis.dphelper,{_list:{value:{scripts:[],sockets:[],...Nt},configurable:!0,writable:!0},version:{value:gt.version,configurable:!0,writable:!0},isServer:{value:typeof window>"u",configurable:!0,writable:!0},isBrowser:{value:typeof window<"u",configurable:!0,writable:!0}});var ie=globalThis.dphelper;Object.defineProperty(ie,"setProps",{value:(e,t,r)=>{Object.defineProperty(e,t.name,r||{writable:!1,configurable:!1,enumerable:!1}),r?.lock&&Object.freeze(e[t.name])},writable:!1,configurable:!1,enumerable:!1});Object.defineProperty(ie,"setDescription",{value:(e,t)=>{Object.defineProperties(ie,{[e.name]:{value:t,writable:!1,configurable:!1,enumerable:!1}}),Object.keys(t).map(r=>(Object.defineProperties(ie[e.name],{[r]:{writable:!1,configurable:!1,enumerable:!1}}),null)),ie.setProps(ie,e,{writable:!1,configurable:!1,enumerable:!1}),ie._list.scripts.push(e)}});var Sr={name:"ai",active:!0,subCommand:[{name:"tokenCount",version:"0.0.3",example:"dphelper.ai.tokenCount({ users: [1,2,3] })",author:"Dario Passariello",creationDate:"20260220",lastMod:"20260221",type:"function",active:!0,description:"Estimate token count for LLMs. If an object is passed, it uses TOON format for calculation.",env:"both",subCommand:[]},{name:"smartSanitize",version:"0.0.2",example:"dphelper.ai.smartSanitize('My email is test@example.com')",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Remove PII (emails, phones, etc) from text for AI privacy",subCommand:[]},{name:"toon",version:"0.0.1",example:"dphelper.ai.toon({ users: [{id: 1, name: 'Ada'}] })",author:"TOON + Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Convert JSON to TOON format (Token-Oriented Object Notation)",subCommand:[]},{name:"toonToJson",version:"0.0.1",example:"dphelper.ai.toonToJson('users[1]{id,name}:\\n 1,Ada')",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Convert TOON format back to JSON/Object",subCommand:[]},{name:"chunker",version:"0.0.1",example:"dphelper.ai.chunker(text, { size: 1000, overlap: 200 })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Split long text into chunks for RAG or AI processing.",subCommand:[]},{name:"similarity",version:"0.0.1",example:"dphelper.ai.similarity(vecA, vecB)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Calculate cosine similarity between two embedding vectors.",subCommand:[]},{name:"extractReasoning",version:"0.0.1",example:"dphelper.ai.extractReasoning(aiResponse)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Extract <think> tags or internal reasoning from AI responses.",subCommand:[]},{name:"prompt",version:"0.0.1",example:"dphelper.ai.prompt('Hello {{name}}', { name: 'Ada' })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Simple prompt template engine with variable injection.",subCommand:[]},{name:"schema",version:"0.0.1",example:"dphelper.ai.schema({ id: 1, name: 'Ada' })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Generate a TOON-style schema definition for AI instructions.",subCommand:[]},{name:"snapshot",version:"0.0.1",example:"dphelper.ai.snapshot()",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Capture a 'mental snapshot' of the app state (logs/globals) in TOON format for AI debugging.",env:"both",subCommand:[]}]},Ct=e=>e===null||typeof e!="object",Se=e=>e===null?"null":typeof e=="string"?e.includes(",")||e.includes(":")||e.includes('"')||e.includes(`
2
+ `)||e.trim()!==e?`"${e.replace(/"/g,'\\"')}"`:e||'""':String(e),ye=(e,t=0)=>{let r=" ".repeat(t);if(Ct(e))return Se(e);if(Array.isArray(e)){if(e.length===0)return"[0]:";let n=e[0];if(!Ct(n)&&!Array.isArray(n)){let o=Object.keys(n),i=`[${e.length}]{${o.join(",")}}:`;for(let c of e){let a=o.map(s=>Se(c[s])).join(",");i+=`
3
+ ${r} ${a}`}return i}else return`[${e.length}]: `+e.map(Se).join(",")}else return Object.entries(e).map(([n,o])=>{let i=n.includes(" ")||n.includes(":")?`"${n}"`:n;if(!Ct(o)){let c=ye(o,t+1);return c.startsWith("[")?`${i}${c}`:`${i}:
4
+ ${r}${c}`}return`${i}: ${Se(o)}`}).join(`
5
+ ${r}`)},It={tokenCount:e=>{let t=typeof e=="string"?e:ye(e);if(!t)return 0;let r=t.trim().split(/\s+/).length,n=t.length;return Math.ceil((n/4+r*1.3)/2)},smartSanitize:e=>e?e.replace(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,"[EMAIL]").replace(/(?:\+?\d{1,3}[- ]?)?\(?\d{3}\)?[- ]?\d{3}[- ]?\d{4}/g,"[PHONE]").replace(/\b\d{4}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}\b/g,"[CREDIT_CARD]").replace(/\b\d{3}-\d{2}-\d{4}\b/g,"[SSN]"):"",toon:e=>ye(e),toonToJson:e=>{if(!e)return null;let t=e.split(`
6
+ `).filter(c=>c.trim()!==""),r={},n=[{indent:-1,obj:r}],o=c=>(c=c.trim(),c==="true"?!0:c==="false"?!1:c==="null"?null:!isNaN(Number(c))&&c!==""?Number(c):c.startsWith('"')&&c.endsWith('"')?c.slice(1,-1).replace(/\\"/g,'"'):c),i=c=>{let a=[],s="",f=!1;for(let l=0;l<c.length;l++){let x=c[l];x==='"'&&c[l-1]!=="\\"?f=!f:x===","&&!f?(a.push(s.trim()),s=""):s+=x}return a.push(s.trim()),a.map(o)};for(let c=0;c<t.length;c++){let a=t[c],s=a.search(/\S/),f=a.trim();if(!f)continue;for(;n.length>1&&s<=n[n.length-1].indent;)n.pop();let l=n[n.length-1];if(l.fields){let v=i(f),b={};l.fields.forEach((u,p)=>b[u]=v[p]),l.obj.push(b);continue}let x=f.indexOf(":");if(x===-1)continue;let d=f.slice(0,x).trim(),h=f.slice(x+1).trim(),m=d.match(/^(.+?)\[(\d+)\](?:{(.+?)})?$/);if(m){let[v,b,u,p]=m,y=[];l.obj[b]=y,p?n.push({indent:s,obj:y,key:b,fields:p.split(",").map(g=>g.trim())}):h?i(h).forEach(g=>y.push(g)):n.push({indent:s,obj:y,key:b})}else{let v=t[c+1],b=v?v.search(/\S/):-1;if(h===""&&b>s){let u={};l.obj[d]=u,n.push({indent:s,obj:u,key:d})}else l.obj[d]=o(h)}}return r},chunker:(e,t={})=>{if(!e)return[];let r=t.size||1e3,n=t.overlap||200,o=[],i=0;for(;i<e.length;)o.push(e.slice(i,i+r)),i+=r-n;return o},similarity:(e,t)=>{if(e.length!==t.length)return 0;let r=0,n=0,o=0;for(let i=0;i<e.length;i++)r+=e[i]*t[i],n+=e[i]*e[i],o+=t[i]*t[i];return r/(Math.sqrt(n)*Math.sqrt(o))},extractReasoning:e=>{let t=e.match(/<think>([\s\S]*?)<\/think>/);return{reasoning:t?t[1].trim():"",content:e.replace(/<think>[\s\S]*?<\/think>/,"").trim()}},prompt:(e,t)=>e.replace(/{{(.*?)}}/g,(r,n)=>{let o=t[n.trim()];return o!==void 0?typeof o=="object"?ye(o):String(o):`{{${n}}}`}),schema:e=>{let t=r=>r===null?"any":Array.isArray(r)?r.length>0&&typeof r[0]=="object"?`Array<{${Object.keys(r[0]).map(n=>`${n}:${t(r[0][n])}`).join(", ")}}>`:"Array<primitive>":typeof r;return typeof e!="object"||e===null?t(e):Object.entries(e).map(([r,n])=>`${r}: ${t(n)}`).join(`
7
+ `)},snapshot:()=>{let e=typeof window<"u",t={context:{env:e?"browser":"server",time:new Date().toISOString()}};e?(t.context.url=window.location.href.split("?")[0],t.context.title=document.title,t.state=window.gState||"No global state detected",t.logs=dphelper?.log?.list?.()?.slice(-10)||[],t.system={lang:navigator.language,screen:`${window.screen.width}x${window.screen.height}`,zoom:dphelper?.browser?.zoom?.()||100}):t.system={platform:typeof process<"u"?process.platform:"unknown",node:typeof process<"u"?process.version:"unknown",arch:typeof process<"u"?process.arch:"unknown"};let r=ye(t);return It.smartSanitize(r)}};dphelper?.setDescription(Sr,It);var kr={name:"anchor",active:!0,subCommand:[{name:"toOnClick",type:"function",version:"0.0.2",example:"dphelper.anchor.toOnClick([element, 'foo' | '.foo' | '#foo'])",description:`This tool allows you to convert all links in an element to 'onclick'.
8
8
  It allows you to avoid the message with the path relative to the requested address
9
- and it is very useful when you work with SPA but you want to keep even older browsers.`,author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",active:!0,env:"client",subCommand:[]}]},kr={toOnClick:e=>{let t=document.querySelector(e);if(!t)return;t.querySelectorAll("a").forEach(n=>{let o=n.getAttribute("href");if(!o)return;n.style.cursor="pointer";let i=dphelper.pathRail()?.[3]?.replace(/\//g,"")||"";i&&n.classList.add(i);let c=n.cloneNode(!0);n.parentNode?.replaceChild(c,n),c.removeAttribute("href"),c.addEventListener("mouseup",a=>{o.startsWith("/")?(history.pushState({href:o},"",o),dphelper.navigation.load(o),a.stopPropagation()):dphelper.browser.href(o)})})}};dphelper?.setDescription(Sr,kr);var _r={name:"array",active:!0,subCommand:[{name:"find",version:"0.0.2",example:"dphelper.array.find(array, 'key')",description:"Find an item in the array recursively.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"delete",version:"0.0.2",example:"dphelper.array.delete(array, 'key')",description:"Delete an item from the array recursively.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"unique",version:"0.0.2",example:"dphelper.array.unique(array)",description:"Remove duplicate values from an array.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"merge",version:"0.0.2",example:"dphelper.array.merge(arrA, arrB)",description:"Merge two arrays into one.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"mergeByKey",version:"0.0.2",example:"dphelper.array.mergeByKey(arrA, arrB, 'id')",author:"Dario Passariello",creationDate:"20230603",lastMod:"20260220",type:"function",active:!0,description:"Merge two arrays of objects by a specific key.",env:"both",subCommand:[]},{name:"asc",version:"0.0.2",example:"dphelper.array.asc(array)",description:"Sort array in ascending order.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"desc",version:"0.0.2",example:"dphelper.array.desc(array)",description:"Sort array in descending order.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"duplicates",version:"0.0.2",example:"dphelper.array.duplicates(array)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Find duplicate items in an array.",env:"both",subCommand:[]},{name:"even",version:"0.0.2",example:"dphelper.array.even(array)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Filter even numbers from an array.",env:"both",subCommand:[]},{name:"odd",version:"0.0.2",example:"dphelper.array.odd(array)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Filter odd numbers from an array.",env:"both",subCommand:[]},{name:"toObj",version:"0.0.2",example:"dphelper.array.toObj(array)",description:"Convert an array to an object.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"sumColumn",version:"0.0.2",example:"dphelper.array.sumColumn(arr, 0)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Sum the values of a specified column in a multidimensional array.",env:"both",subCommand:[]},{name:"shuffle",version:"0.0.2",example:"dphelper.array.shuffle(array)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20260220",type:"function",active:!0,description:"Randomly shuffle the elements of an array.",env:"both",subCommand:[]},{name:"generate",version:"0.0.2",example:"dphelper.array.generate(10)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20260220",type:"function",active:!0,description:"Generate an array of random numbers (max 500000).",env:"both",subCommand:[]},{name:"testArrayInt",version:"0.0.2",example:"dphelper.array.testArrayInt([1,2,4])",author:"Dario Passariello",creationDate:"20230527",lastMod:"20260220",type:"function",active:!0,description:"Check if an array contains consecutive integers.",env:"both",subCommand:[]},{name:"rand32",version:"0.0.2",example:"dphelper.array.rand32(5)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20260220",type:"function",active:!0,description:"Generate an array of random 32-bit unsigned integers.",env:"both",subCommand:[]},{name:"findindex",version:"0.0.2",example:"dphelper.array.findindex(array, 'name')",description:"Find the index of an item in an array by key.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"pathToJson",version:"0.0.2",example:"dphelper.array.pathToJson(paths, '/')",description:"Convert an array of paths into a JSON object.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"deepClone",version:"0.0.2",example:"dphelper.array.deepClone(array)",description:"Create a deep clone of an array using structuredClone.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"match",version:"0.0.2",example:"dphelper.array.match(arrA, arrB)",author:"Dario Passariello",creationDate:"20250101",lastMod:"20260220",type:"function",active:!0,description:"Find a perfect match between an array of words and an array to check.",env:"both",subCommand:[]}]},Mr={find:(e,t)=>{if(Array.isArray(e)){for(let r of e){if(r[t]===t)return r;if(r.children){let n=dphelper.array.find(t,r.children);if(n)return n}}return!1}},delete:(e,t)=>{Array.isArray(e)&&e.some(function r(n,o,i){if(n[t]===t)return i.splice(o,1),!0;for(let c of Object.keys(n)){let a=n[c];if(Array.isArray(a))return a.some(r)}return null})},merge:(e,t)=>{if(!(e&&t))return t||e;for(let r of Object.keys(e))r==="__proto__"||r==="constructor"||r==="prototype"||e[r]instanceof Object&&t[r]&&Object.assign(e[r],dphelper.array.merge(t[r],e[r]));return Object.assign(t,e)},mergeByKey:(e,t,r)=>e.map(n=>{let o=t.find(i=>n[r]===i[r]);return o?Object.assign({},n,o):n}),duplicates:e=>{if(!Array.isArray(e))return;let t=new Set,r=new Set;for(let n of e)t.has(n)?r.add(n):t.add(n);return Array.from(r)},even:e=>{if(Array.isArray(e))return e.filter(t=>t%2===0)},odd:e=>{if(Array.isArray(e))return e.filter(t=>t%2!==0)},sumColumn:(e=[],t=0)=>Array.isArray(e)?typeof t>"u"?"provide a column":e.reduce((r,n)=>r+(n[t]||0),0):"provide a multidimensional array",shuffle:e=>{if(Array.isArray(e)){for(let t=e.length-1;t>0;t--){let r=Math.floor(Math.random()*(t+1));[e[t],e[r]]=[e[r],e[t]]}return e}},generate:e=>{if(Number.isNaN(e))return;let t=Array.from({length:e},(r,n)=>n+1);return dphelper.array.shuffle(t)},testArrayInt:e=>{if(!Array.isArray(e))return;let t=[];for(let r=1;r<=e.length;r++)e.includes(r)||t.push(r);return t},rand32:e=>{let t=performance.now(),r=[];r.nums=[],r.time=[];for(let o=0;o<e;++o)r.nums.push(crypto.getRandomValues(new Uint32Array(1))[0]);let n=performance.now();return r.time.push(n-t),r},match:(e,t)=>e.filter(r=>t.includes(r)),pathToJson:(e,t="/")=>{let r={},n;for(let o of e){n=r;let i=o.split(t);for(let c of i.slice(1,-1)){if(c==="")return;c in n||(n[c]={}),n=n[c]}i.at(-1)&&(n[i.at(-1)]=null)}return r}};dphelper?.setDescription(_r,Mr);var Pr={name:"audio",active:!0,subCommand:[{name:"play",version:"0.0.2",example:"dphelper.audio.play([audiofile])",description:"Plays an audio file or removes all audio elements from the document.",author:"Dario Passariello",creationDate:"20240924",lastMod:"20240924",type:"function",active:!0,env:"client",subCommand:[]}]},Tr={play:(e,t="",r=!1)=>{if(e){if(!document.querySelector(`#audio_${e}`)){let n=document.createElement("audio");n.id=`audio_${e}`,n.dataset.dphelper="audio",n.src=t+e,n.loop=r,document.body.appendChild(n),n.load(),n.play()?.catch?.(o=>console.error("Error playing audio:",o))}}else document.querySelectorAll("audio[data-dphelper='audio']").forEach(n=>n.remove())}};dphelper?.setDescription(Pr,Tr);var qr={name:"avoid",active:!0,subCommand:[{name:"cache",version:"0.0.2",example:"dphelper.avoid.cache()",description:"Appends a cache-busting query parameter to a given URI.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]}]},Hr={cache:e=>{if(typeof e!="string")throw new Error("The provided URI must be a string");return e.concat(/\?/.test(e)?"&":"?","t=",Math.random().toString(36).substring(2))}};dphelper?.setDescription(qr,Hr);var $t={"1xx":{code:"1xx",message:"Information",description:"1xx codes are often interim responses for sharing connection status information. Not intended for final request or response action."},"100":{code:100,message:"Continue",description:"The server has received the request headers, and the client should proceed to send the request body."},"101":{code:101,message:"Switching Protocols",description:"The requester has asked the server to switch protocols."},"102":{code:102,message:"Processing",description:"This code indicates that the server has received and is processing the request, but no response is available yet. This prevents the client from timing out and assuming the request was lost."},"103":{code:103,message:"Early Hints",description:"Used to return some response headers before final HTTP message."},"2xx":{code:"2xx",message:"Successful",description:"2xx codes indicate successful responses usually this means the action requested by the client was received, understood and accepted successfully."},"200":{code:200,message:"OK",description:"The request is OK (this is the standard response for successful HTTP requests)."},"201":{code:201,message:"Created",description:"The request has been fulfilled, and a new resource is created."},"202":{code:202,message:"Accepted",description:"The request has been accepted for processing, but the processing has not been completed."},"203":{code:203,message:"Non-Authoritative Information",description:"The request has been successfully processed, but is returning information that may be from another source."},"204":{code:204,message:"No Content",description:"The request has been successfully processed, but is not returning any content."},"205":{code:205,message:"Reset Content",description:"The request has been successfully processed, but is not returning any content, and requires that the requester reset the document view."},"206":{code:206,message:"Partial Content",description:"The server is delivering only part of the resource due to a range header sent by the client."},"207":{code:207,message:"Multi-Status",description:"The message body that follows is by default an XML message and can contain a number of separate response codes, depending on how many sub-requests were made."},"208":{code:208,message:"Already Reported",description:"The members of a DAV binding have already been enumerated in a preceding part of the (multi-status) response, and are not being included again."},"218":{code:218,message:"This is fine (Apache Web Server)",description:"Used as a catch-all error condition for allowing response bodies to flow through Apache when ProxyErrorOverride is enabled."},"226":{code:226,message:"IM Used",description:"The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance."},"3xx":{code:"3xx",message:"Redirection",description:"3xx codes are a class of responses that suggest the User-Agent must follow another course of action to obtain the complete requested resource."},"300":{code:300,message:"Multiple Choices",description:"A link list. The user can select a link and go to that location. Maximum five addresses."},"301":{code:301,message:"Moved Permanently",description:"The requested page has moved to a new URL."},"302":{code:302,message:"Found",description:"The requested page has moved temporarily to a new URL."},"303":{code:303,message:"See Other",description:"The requested page can be found under a different URL."},"304":{code:304,message:"Not Modified",description:"Indicates the requested page has not been modified since last requested."},"306":{code:306,message:"Switch Proxy",description:'No longer used. Originally meant "Subsequent requests should use the specified proxy."'},"307":{code:307,message:"Temporary Redirect",description:"The requested page has moved temporarily to a new URL."},"308":{code:308,message:"Resume Incomplete",description:"Used in the resumable requests proposal to resume aborted PUT or POST requests."},"4xx":{code:"4xx",message:"Client Error",description:"4xx codes generally are error responses specifying an issue at the client\u2019s end. Potentially a network issue."},"400":{code:400,message:"Bad Request",description:"The request cannot be fulfilled due to bad syntax."},"401":{code:401,message:"Unauthorized",description:"The request was a legal request, but the server is refusing to respond to it. For use when authentication is possible but has failed or not yet been provided."},"402":{code:402,message:"Payment Required",description:"Not yet implemented by RFC standards, but reserved for future use."},"403":{code:403,message:"Forbidden",description:"The request was a legal request, but the server is refusing to respond to it."},"404":{code:404,message:"Not Found",description:"The requested page could not be found but may be available again in the future."},"405":{code:405,message:"Method Not Allowed",description:"A request was made of a page using a request method not supported by that page."},"406":{code:406,message:"Not Acceptable",description:"The server can only generate a response that is not accepted by the client."},"407":{code:407,message:"Proxy Authentication Required",description:"The client must first authenticate itself with the proxy."},"408":{code:408,message:"Request Timeout",description:"The server timed out waiting for the request."},"409":{code:409,message:"Conflict",description:"The request could not be completed because of a conflict in the request."},"410":{code:410,message:"Gone",description:"The requested page is no longer available."},"411":{code:411,message:"Length Required",description:'The "Content-Length" is not defined. The server will not accept the request without it.'},"412":{code:412,message:"Precondition Failed",description:"The precondition given in the request evaluated to false by the server."},"413":{code:413,message:"Request Entity Too Large",description:"The server will not accept the request, because the request entity is too large."},"414":{code:414,message:"Request-URI Too Long",description:"The server will not accept the request, because the URL is too long. Occurs when you convert a POST request to a GET request with a long query information."},"415":{code:415,message:"Unsupported Media Type",description:"The server will not accept the request, because the media type is not supported."},"416":{code:416,message:"Requested Range Not Satisfiable",description:"The client has asked for a portion of the file, but the server cannot supply that portion."},"417":{code:417,message:"Expectation Failed",description:"The server cannot meet the requirements of the Expect request-header field."},"418":{code:418,message:"I'm a teapot",description:`Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.`},"419":{code:419,message:"Page Expired (Laravel Framework)",description:"Used by the Laravel Framework when a CSRF Token is missing or expired."},"420":{code:420,message:"Method Failure (Spring Framework)",description:"A deprecated response used by the Spring Framework when a method has failed."},"421":{code:421,message:"Misdirected Request",description:"The request was directed at a server that is not able to produce a response (for example because a connection reuse)."},"422":{code:422,message:"Unprocessable Entity",description:"The request was well-formed but was unable to be followed due to semantic errors."},"423":{code:423,message:"Locked",description:"The resource that is being accessed is locked."},"424":{code:424,message:"Failed Dependency",description:"The request failed due to failure of a previous request (e.g., a PROPPATCH)."},"426":{code:426,message:"Upgrade Required",description:"The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field."},"428":{code:428,message:"Precondition Required",description:"The origin server requires the request to be conditional."},"429":{code:429,message:"Too Many Requests",description:"The user has sent too many requests in a given amount of time. Intended for use with rate limiting schemes."},"431":{code:431,message:"Request Header Fields Too Large",description:"The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large."},"440":{code:440,message:"Login Time-out",description:"The client's session has expired and must log in again. (IIS)"},"444":{code:444,message:"Connection Closed Without Response",description:"A non-standard status code used to instruct nginx to close the connection without sending a response to the client, most commonly used to deny malicious or malformed requests."},"449":{code:449,message:"Retry With",description:"The server cannot honour the request because the user has not provided the required information. (IIS)"},"450":{code:450,message:"Blocked by Windows Parental Controls",description:"The Microsoft extension code indicated when Windows Parental Controls are turned on and are blocking access to the requested webpage."},"451":{code:451,message:"Unavailable For Legal Reasons",description:"A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource."},"494":{code:494,message:"Request Header Too Large",description:"Used by nginx to indicate the client sent too large of a request or header line that is too long."},"495":{code:495,message:"SSL Certificate Error",description:"An expansion of the 400 Bad Request response code, used when the client has provided an invalid client certificate."},"496":{code:496,message:"SSL Certificate Required",description:"An expansion of the 400 Bad Request response code, used when a client certificate is required but not provided."},"497":{code:497,message:"HTTP Request Sent to HTTPS Port",description:"An expansion of the 400 Bad Request response code, used when the client has made a HTTP request to a port listening for HTTPS requests."},"498":{code:498,message:"Invalid Token (Esri)",description:"Returned by ArcGIS for Server. Code 498 indicates an expired or otherwise invalid token."},"499":{code:499,message:"Client Closed Request",description:"A non-standard status code introduced by nginx for the case when a client closes the connection while nginx is processing the request."},"5xx":{code:"5xx",message:"Server Error",description:"5xx error codes indicate that an error or unresolvable request occurred on the server side, whether that is a proxy or the origin host."},"500":{code:500,message:"Internal Server Error",description:"An error has occurred in a server side script, a no more specific message is suitable."},"501":{code:501,message:"Not Implemented",description:"The server either does not recognize the request method, or it lacks the ability to fulfill the request."},"502":{code:502,message:"Bad Gateway",description:"The server was acting as a gateway or proxy and received an invalid response from the upstream server."},"503":{code:503,message:"Service Unavailable",description:"The server is currently unavailable (overloaded or down)."},"504":{code:504,message:"Gateway Timeout",description:"The server was acting as a gateway or proxy and did not receive a timely response from the upstream server."},"505":{code:505,message:"HTTP Version Not Supported",description:"The server does not support the HTTP protocol version used in the request."},"506":{code:506,message:"Variant Also Negotiates",description:"Transparent content negotiation for the request results in a circular reference."},"507":{code:507,message:"Insufficient Storage",description:"The server is unable to store the representation needed to complete the request."},"508":{code:508,message:"Loop Detected",description:"The server detected an infinite loop while processing the request (sent instead of 208 Already Reported)."},"509":{code:509,message:"Bandwidth Limit Exceeded",description:"The server has exceeded the bandwidth specified by the server administrator; this is often used by shared hosting providers to limit the bandwidth of customers."},"510":{code:510,message:"Not Extended",description:"Further extensions to the request are required for the server to fulfil it."},"511":{code:511,message:"Network Authentication Required",description:"The client needs to authenticate to gain network access."},"520":{code:520,message:"Unknown Error",description:'The 520 error is used as a "catch-all response for when the origin server returns something unexpected", listing connection resets, large headers, and empty or invalid responses as common triggers.'},"521":{code:521,message:"Web Server Is Down",description:"The origin server has refused the connection from Cloudflare."},"522":{code:522,message:"Connection Timed Out",description:"Cloudflare could not negotiate a TCP handshake with the origin server."},"523":{code:523,message:"Origin Is Unreachable",description:"Cloudflare could not reach the origin server; for example, if the DNS records for the origin server are incorrect."},"524":{code:524,message:"A Timeout Occurred",description:"Cloudflare was able to complete a TCP connection to the origin server, but did not receive a timely HTTP response."},"525":{code:525,message:"SSL Handshake Failed",description:"Cloudflare could not negotiate a SSL/TLS handshake with the origin server."},"526":{code:526,message:"Invalid SSL Certificate",description:"Used by Cloudflare and Cloud Foundry's gorouter to indicate failure to validate the SSL/TLS certificate that the origin server presented."},"527":{code:527,message:"Railgun Listener to Origin Error",description:"Error 527 indicates that the request timed out or failed after the WAN connection had been established."},"530":{code:530,message:"Origin DNS Error",description:"Error 530 indicates that the requested host name could not be resolved on the Cloudflare network to an origin server."},"598":{code:598,message:"Network Read Timeout Error",description:"Used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy."}};var Rr={name:"browser",active:!0,subCommand:[{name:"state",version:"0.0.2",example:"dphelper.browser.state([state, title, url])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Pushes a new state to the browser history.",env:"client",subCommand:[]},{name:"forw",version:"0.0.2",example:"dphelper.browser.forw([number])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Moves forward in the browser history.",env:"client",subCommand:[]},{name:"back",version:"0.0.2",example:"dphelper.browser.back([number])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Moves backward in the browser history.",env:"client",subCommand:[]},{name:"reload",version:"0.0.2",example:"dphelper.browser.reload()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Reloads the current page.",env:"client",subCommand:[]},{name:"href",version:"0.0.2",example:"dphelper.browser.href([url])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Navigates to the specified URL.",env:"client",subCommand:[]},{name:"offLine",version:"0.0.2",example:"dphelper.browser.offline([text])",author:"Dario Passariello",creationDate:"20190727",lastMod:"20240727",type:"function",active:!0,description:"Displays an offline message when the browser is offline.",env:"client",subCommand:[]},{name:"zoom",version:"0.0.2",example:"dphelper.browser.zoom()",author:"Dario Passariello",creationDate:"20190727",lastMod:"20240727",type:"function",active:!0,description:"Returns the current zoom level of the browser.",env:"client",subCommand:[]},{name:"status",version:"0.0.2",example:"dphelper.browser.status(404)",author:"Dario Passariello",creationDate:"20240912",lastMod:"20240912",type:"function",active:!0,description:"Returns a description of the specified HTTP status code.",env:"client",subCommand:[]},{name:"interlock",version:"0.0.1",example:"dphelper.browser.interlock((tabs) => ...)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Detect and monitor other active tabs of the same app.",env:"client",subCommand:[]}]},Lr={interlock:e=>{let t=new BroadcastChannel("dp_interlock"),r=1;t.onmessage=n=>{(n.origin===window.location.origin||!n.origin)&&(n.data==="ping"||n.data==="pong")&&(n.data==="ping"&&t.postMessage("pong"),n.data==="pong"&&e(++r))},t.postMessage("ping"),e(r)},state:(e,t,r)=>{history.pushState(e,t,r)},forw:e=>{history.go(e)},back:e=>{history.go(-Math.abs(e))},reload:()=>{location.href="/"},href:e=>{location.href=e},offLine:(e="You are offline.")=>{window.addEventListener("online",()=>document.querySelectorAll("[o]").forEach(t=>t.remove())),window.addEventListener("offline",()=>{let t=String(e).replace(/["\\]/g,"\\$&").slice(0,200),r=document.createElement("style");r.setAttribute("o",""),r.textContent=`
9
+ and it is very useful when you work with SPA but you want to keep even older browsers.`,author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",active:!0,env:"client",subCommand:[]}]},_r={toOnClick:e=>{let t=document.querySelector(e);if(!t)return;t.querySelectorAll("a").forEach(n=>{let o=n.getAttribute("href");if(!o)return;n.style.cursor="pointer";let i=dphelper.pathRail()?.[3]?.replace(/\//g,"")||"";i&&n.classList.add(i);let c=n.cloneNode(!0);n.parentNode?.replaceChild(c,n),c.removeAttribute("href"),c.addEventListener("mouseup",a=>{o.startsWith("/")?(history.pushState({href:o},"",o),dphelper.navigation.load(o),a.stopPropagation()):dphelper.browser.href(o)})})}};dphelper?.setDescription(kr,_r);var Mr={name:"array",active:!0,subCommand:[{name:"find",version:"0.0.2",example:"dphelper.array.find(array, 'key')",description:"Find an item in the array recursively.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"delete",version:"0.0.2",example:"dphelper.array.delete(array, 'key')",description:"Delete an item from the array recursively.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"unique",version:"0.0.2",example:"dphelper.array.unique(array)",description:"Remove duplicate values from an array.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"merge",version:"0.0.2",example:"dphelper.array.merge(arrA, arrB)",description:"Merge two arrays into one.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"mergeByKey",version:"0.0.2",example:"dphelper.array.mergeByKey(arrA, arrB, 'id')",author:"Dario Passariello",creationDate:"20230603",lastMod:"20260220",type:"function",active:!0,description:"Merge two arrays of objects by a specific key.",env:"both",subCommand:[]},{name:"asc",version:"0.0.2",example:"dphelper.array.asc(array)",description:"Sort array in ascending order.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"desc",version:"0.0.2",example:"dphelper.array.desc(array)",description:"Sort array in descending order.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"duplicates",version:"0.0.2",example:"dphelper.array.duplicates(array)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Find duplicate items in an array.",env:"both",subCommand:[]},{name:"even",version:"0.0.2",example:"dphelper.array.even(array)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Filter even numbers from an array.",env:"both",subCommand:[]},{name:"odd",version:"0.0.2",example:"dphelper.array.odd(array)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Filter odd numbers from an array.",env:"both",subCommand:[]},{name:"toObj",version:"0.0.2",example:"dphelper.array.toObj(array)",description:"Convert an array to an object.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"sumColumn",version:"0.0.2",example:"dphelper.array.sumColumn(arr, 0)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Sum the values of a specified column in a multidimensional array.",env:"both",subCommand:[]},{name:"shuffle",version:"0.0.2",example:"dphelper.array.shuffle(array)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20260220",type:"function",active:!0,description:"Randomly shuffle the elements of an array.",env:"both",subCommand:[]},{name:"generate",version:"0.0.2",example:"dphelper.array.generate(10)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20260220",type:"function",active:!0,description:"Generate an array of random numbers (max 500000).",env:"both",subCommand:[]},{name:"testArrayInt",version:"0.0.2",example:"dphelper.array.testArrayInt([1,2,4])",author:"Dario Passariello",creationDate:"20230527",lastMod:"20260220",type:"function",active:!0,description:"Check if an array contains consecutive integers.",env:"both",subCommand:[]},{name:"rand32",version:"0.0.2",example:"dphelper.array.rand32(5)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20260220",type:"function",active:!0,description:"Generate an array of random 32-bit unsigned integers.",env:"both",subCommand:[]},{name:"findindex",version:"0.0.2",example:"dphelper.array.findindex(array, 'name')",description:"Find the index of an item in an array by key.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"pathToJson",version:"0.0.2",example:"dphelper.array.pathToJson(paths, '/')",description:"Convert an array of paths into a JSON object.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"deepClone",version:"0.0.2",example:"dphelper.array.deepClone(array)",description:"Create a deep clone of an array using structuredClone.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"match",version:"0.0.2",example:"dphelper.array.match(arrA, arrB)",author:"Dario Passariello",creationDate:"20250101",lastMod:"20260220",type:"function",active:!0,description:"Find a perfect match between an array of words and an array to check.",env:"both",subCommand:[]}]},Pr={find:(e,t)=>{if(Array.isArray(e)){for(let r of e){if(r[t]===t)return r;if(r.children){let n=dphelper.array.find(t,r.children);if(n)return n}}return!1}},delete:(e,t)=>{Array.isArray(e)&&e.some(function r(n,o,i){if(n[t]===t)return i.splice(o,1),!0;for(let c of Object.keys(n)){let a=n[c];if(Array.isArray(a))return a.some(r)}return null})},merge:(e,t)=>{if(!(e&&t))return t||e;for(let r of Object.keys(e))r==="__proto__"||r==="constructor"||r==="prototype"||e[r]instanceof Object&&t[r]&&Object.assign(e[r],dphelper.array.merge(t[r],e[r]));return Object.assign(t,e)},mergeByKey:(e,t,r)=>e.map(n=>{let o=t.find(i=>n[r]===i[r]);return o?Object.assign({},n,o):n}),duplicates:e=>{if(!Array.isArray(e))return;let t=new Set,r=new Set;for(let n of e)t.has(n)?r.add(n):t.add(n);return Array.from(r)},even:e=>{if(Array.isArray(e))return e.filter(t=>t%2===0)},odd:e=>{if(Array.isArray(e))return e.filter(t=>t%2!==0)},sumColumn:(e=[],t=0)=>Array.isArray(e)?typeof t>"u"?"provide a column":e.reduce((r,n)=>r+(n[t]||0),0):"provide a multidimensional array",shuffle:e=>{if(Array.isArray(e)){for(let t=e.length-1;t>0;t--){let r=Math.floor(Math.random()*(t+1));[e[t],e[r]]=[e[r],e[t]]}return e}},generate:e=>{if(Number.isNaN(e))return;let t=Array.from({length:e},(r,n)=>n+1);return dphelper.array.shuffle(t)},testArrayInt:e=>{if(!Array.isArray(e))return;let t=[];for(let r=1;r<=e.length;r++)e.includes(r)||t.push(r);return t},rand32:e=>{let t=performance.now(),r=[];r.nums=[],r.time=[];for(let o=0;o<e;++o)r.nums.push(crypto.getRandomValues(new Uint32Array(1))[0]);let n=performance.now();return r.time.push(n-t),r},match:(e,t)=>e.filter(r=>t.includes(r)),pathToJson:(e,t="/")=>{let r={},n;for(let o of e){n=r;let i=o.split(t);for(let c of i.slice(1,-1)){if(c==="")return;c in n||(n[c]={}),n=n[c]}i.at(-1)&&(n[i.at(-1)]=null)}return r}};dphelper?.setDescription(Mr,Pr);var Tr={name:"audio",active:!0,subCommand:[{name:"play",version:"0.0.2",example:"dphelper.audio.play([audiofile])",description:"Plays an audio file or removes all audio elements from the document.",author:"Dario Passariello",creationDate:"20240924",lastMod:"20240924",type:"function",active:!0,env:"client",subCommand:[]}]},qr={play:(e,t="",r=!1)=>{if(e){if(!document.querySelector(`#audio_${e}`)){let n=document.createElement("audio");n.id=`audio_${e}`,n.dataset.dphelper="audio",n.src=t+e,n.loop=r,document.body.appendChild(n),n.load(),n.play()?.catch?.(o=>console.error("Error playing audio:",o))}}else document.querySelectorAll("audio[data-dphelper='audio']").forEach(n=>n.remove())}};dphelper?.setDescription(Tr,qr);var Hr={name:"avoid",active:!0,subCommand:[{name:"cache",version:"0.0.2",example:"dphelper.avoid.cache()",description:"Appends a cache-busting query parameter to a given URI.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]}]},Lr={cache:e=>{if(typeof e!="string")throw new Error("The provided URI must be a string");return e.concat(/\?/.test(e)?"&":"?","t=",Math.random().toString(36).substring(2))}};dphelper?.setDescription(Hr,Lr);var $t={"1xx":{code:"1xx",message:"Information",description:"1xx codes are often interim responses for sharing connection status information. Not intended for final request or response action."},"100":{code:100,message:"Continue",description:"The server has received the request headers, and the client should proceed to send the request body."},"101":{code:101,message:"Switching Protocols",description:"The requester has asked the server to switch protocols."},"102":{code:102,message:"Processing",description:"This code indicates that the server has received and is processing the request, but no response is available yet. This prevents the client from timing out and assuming the request was lost."},"103":{code:103,message:"Early Hints",description:"Used to return some response headers before final HTTP message."},"2xx":{code:"2xx",message:"Successful",description:"2xx codes indicate successful responses usually this means the action requested by the client was received, understood and accepted successfully."},"200":{code:200,message:"OK",description:"The request is OK (this is the standard response for successful HTTP requests)."},"201":{code:201,message:"Created",description:"The request has been fulfilled, and a new resource is created."},"202":{code:202,message:"Accepted",description:"The request has been accepted for processing, but the processing has not been completed."},"203":{code:203,message:"Non-Authoritative Information",description:"The request has been successfully processed, but is returning information that may be from another source."},"204":{code:204,message:"No Content",description:"The request has been successfully processed, but is not returning any content."},"205":{code:205,message:"Reset Content",description:"The request has been successfully processed, but is not returning any content, and requires that the requester reset the document view."},"206":{code:206,message:"Partial Content",description:"The server is delivering only part of the resource due to a range header sent by the client."},"207":{code:207,message:"Multi-Status",description:"The message body that follows is by default an XML message and can contain a number of separate response codes, depending on how many sub-requests were made."},"208":{code:208,message:"Already Reported",description:"The members of a DAV binding have already been enumerated in a preceding part of the (multi-status) response, and are not being included again."},"218":{code:218,message:"This is fine (Apache Web Server)",description:"Used as a catch-all error condition for allowing response bodies to flow through Apache when ProxyErrorOverride is enabled."},"226":{code:226,message:"IM Used",description:"The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance."},"3xx":{code:"3xx",message:"Redirection",description:"3xx codes are a class of responses that suggest the User-Agent must follow another course of action to obtain the complete requested resource."},"300":{code:300,message:"Multiple Choices",description:"A link list. The user can select a link and go to that location. Maximum five addresses."},"301":{code:301,message:"Moved Permanently",description:"The requested page has moved to a new URL."},"302":{code:302,message:"Found",description:"The requested page has moved temporarily to a new URL."},"303":{code:303,message:"See Other",description:"The requested page can be found under a different URL."},"304":{code:304,message:"Not Modified",description:"Indicates the requested page has not been modified since last requested."},"306":{code:306,message:"Switch Proxy",description:'No longer used. Originally meant "Subsequent requests should use the specified proxy."'},"307":{code:307,message:"Temporary Redirect",description:"The requested page has moved temporarily to a new URL."},"308":{code:308,message:"Resume Incomplete",description:"Used in the resumable requests proposal to resume aborted PUT or POST requests."},"4xx":{code:"4xx",message:"Client Error",description:"4xx codes generally are error responses specifying an issue at the client\u2019s end. Potentially a network issue."},"400":{code:400,message:"Bad Request",description:"The request cannot be fulfilled due to bad syntax."},"401":{code:401,message:"Unauthorized",description:"The request was a legal request, but the server is refusing to respond to it. For use when authentication is possible but has failed or not yet been provided."},"402":{code:402,message:"Payment Required",description:"Not yet implemented by RFC standards, but reserved for future use."},"403":{code:403,message:"Forbidden",description:"The request was a legal request, but the server is refusing to respond to it."},"404":{code:404,message:"Not Found",description:"The requested page could not be found but may be available again in the future."},"405":{code:405,message:"Method Not Allowed",description:"A request was made of a page using a request method not supported by that page."},"406":{code:406,message:"Not Acceptable",description:"The server can only generate a response that is not accepted by the client."},"407":{code:407,message:"Proxy Authentication Required",description:"The client must first authenticate itself with the proxy."},"408":{code:408,message:"Request Timeout",description:"The server timed out waiting for the request."},"409":{code:409,message:"Conflict",description:"The request could not be completed because of a conflict in the request."},"410":{code:410,message:"Gone",description:"The requested page is no longer available."},"411":{code:411,message:"Length Required",description:'The "Content-Length" is not defined. The server will not accept the request without it.'},"412":{code:412,message:"Precondition Failed",description:"The precondition given in the request evaluated to false by the server."},"413":{code:413,message:"Request Entity Too Large",description:"The server will not accept the request, because the request entity is too large."},"414":{code:414,message:"Request-URI Too Long",description:"The server will not accept the request, because the URL is too long. Occurs when you convert a POST request to a GET request with a long query information."},"415":{code:415,message:"Unsupported Media Type",description:"The server will not accept the request, because the media type is not supported."},"416":{code:416,message:"Requested Range Not Satisfiable",description:"The client has asked for a portion of the file, but the server cannot supply that portion."},"417":{code:417,message:"Expectation Failed",description:"The server cannot meet the requirements of the Expect request-header field."},"418":{code:418,message:"I'm a teapot",description:`Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.`},"419":{code:419,message:"Page Expired (Laravel Framework)",description:"Used by the Laravel Framework when a CSRF Token is missing or expired."},"420":{code:420,message:"Method Failure (Spring Framework)",description:"A deprecated response used by the Spring Framework when a method has failed."},"421":{code:421,message:"Misdirected Request",description:"The request was directed at a server that is not able to produce a response (for example because a connection reuse)."},"422":{code:422,message:"Unprocessable Entity",description:"The request was well-formed but was unable to be followed due to semantic errors."},"423":{code:423,message:"Locked",description:"The resource that is being accessed is locked."},"424":{code:424,message:"Failed Dependency",description:"The request failed due to failure of a previous request (e.g., a PROPPATCH)."},"426":{code:426,message:"Upgrade Required",description:"The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field."},"428":{code:428,message:"Precondition Required",description:"The origin server requires the request to be conditional."},"429":{code:429,message:"Too Many Requests",description:"The user has sent too many requests in a given amount of time. Intended for use with rate limiting schemes."},"431":{code:431,message:"Request Header Fields Too Large",description:"The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large."},"440":{code:440,message:"Login Time-out",description:"The client's session has expired and must log in again. (IIS)"},"444":{code:444,message:"Connection Closed Without Response",description:"A non-standard status code used to instruct nginx to close the connection without sending a response to the client, most commonly used to deny malicious or malformed requests."},"449":{code:449,message:"Retry With",description:"The server cannot honour the request because the user has not provided the required information. (IIS)"},"450":{code:450,message:"Blocked by Windows Parental Controls",description:"The Microsoft extension code indicated when Windows Parental Controls are turned on and are blocking access to the requested webpage."},"451":{code:451,message:"Unavailable For Legal Reasons",description:"A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource."},"494":{code:494,message:"Request Header Too Large",description:"Used by nginx to indicate the client sent too large of a request or header line that is too long."},"495":{code:495,message:"SSL Certificate Error",description:"An expansion of the 400 Bad Request response code, used when the client has provided an invalid client certificate."},"496":{code:496,message:"SSL Certificate Required",description:"An expansion of the 400 Bad Request response code, used when a client certificate is required but not provided."},"497":{code:497,message:"HTTP Request Sent to HTTPS Port",description:"An expansion of the 400 Bad Request response code, used when the client has made a HTTP request to a port listening for HTTPS requests."},"498":{code:498,message:"Invalid Token (Esri)",description:"Returned by ArcGIS for Server. Code 498 indicates an expired or otherwise invalid token."},"499":{code:499,message:"Client Closed Request",description:"A non-standard status code introduced by nginx for the case when a client closes the connection while nginx is processing the request."},"5xx":{code:"5xx",message:"Server Error",description:"5xx error codes indicate that an error or unresolvable request occurred on the server side, whether that is a proxy or the origin host."},"500":{code:500,message:"Internal Server Error",description:"An error has occurred in a server side script, a no more specific message is suitable."},"501":{code:501,message:"Not Implemented",description:"The server either does not recognize the request method, or it lacks the ability to fulfill the request."},"502":{code:502,message:"Bad Gateway",description:"The server was acting as a gateway or proxy and received an invalid response from the upstream server."},"503":{code:503,message:"Service Unavailable",description:"The server is currently unavailable (overloaded or down)."},"504":{code:504,message:"Gateway Timeout",description:"The server was acting as a gateway or proxy and did not receive a timely response from the upstream server."},"505":{code:505,message:"HTTP Version Not Supported",description:"The server does not support the HTTP protocol version used in the request."},"506":{code:506,message:"Variant Also Negotiates",description:"Transparent content negotiation for the request results in a circular reference."},"507":{code:507,message:"Insufficient Storage",description:"The server is unable to store the representation needed to complete the request."},"508":{code:508,message:"Loop Detected",description:"The server detected an infinite loop while processing the request (sent instead of 208 Already Reported)."},"509":{code:509,message:"Bandwidth Limit Exceeded",description:"The server has exceeded the bandwidth specified by the server administrator; this is often used by shared hosting providers to limit the bandwidth of customers."},"510":{code:510,message:"Not Extended",description:"Further extensions to the request are required for the server to fulfil it."},"511":{code:511,message:"Network Authentication Required",description:"The client needs to authenticate to gain network access."},"520":{code:520,message:"Unknown Error",description:'The 520 error is used as a "catch-all response for when the origin server returns something unexpected", listing connection resets, large headers, and empty or invalid responses as common triggers.'},"521":{code:521,message:"Web Server Is Down",description:"The origin server has refused the connection from Cloudflare."},"522":{code:522,message:"Connection Timed Out",description:"Cloudflare could not negotiate a TCP handshake with the origin server."},"523":{code:523,message:"Origin Is Unreachable",description:"Cloudflare could not reach the origin server; for example, if the DNS records for the origin server are incorrect."},"524":{code:524,message:"A Timeout Occurred",description:"Cloudflare was able to complete a TCP connection to the origin server, but did not receive a timely HTTP response."},"525":{code:525,message:"SSL Handshake Failed",description:"Cloudflare could not negotiate a SSL/TLS handshake with the origin server."},"526":{code:526,message:"Invalid SSL Certificate",description:"Used by Cloudflare and Cloud Foundry's gorouter to indicate failure to validate the SSL/TLS certificate that the origin server presented."},"527":{code:527,message:"Railgun Listener to Origin Error",description:"Error 527 indicates that the request timed out or failed after the WAN connection had been established."},"530":{code:530,message:"Origin DNS Error",description:"Error 530 indicates that the requested host name could not be resolved on the Cloudflare network to an origin server."},"598":{code:598,message:"Network Read Timeout Error",description:"Used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy."}};var Or={name:"browser",active:!0,subCommand:[{name:"state",version:"0.0.2",example:"dphelper.browser.state([state, title, url])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Pushes a new state to the browser history.",env:"client",subCommand:[]},{name:"forw",version:"0.0.2",example:"dphelper.browser.forw([number])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Moves forward in the browser history.",env:"client",subCommand:[]},{name:"back",version:"0.0.2",example:"dphelper.browser.back([number])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Moves backward in the browser history.",env:"client",subCommand:[]},{name:"reload",version:"0.0.2",example:"dphelper.browser.reload()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Reloads the current page.",env:"client",subCommand:[]},{name:"href",version:"0.0.2",example:"dphelper.browser.href([url])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Navigates to the specified URL.",env:"client",subCommand:[]},{name:"offLine",version:"0.0.2",example:"dphelper.browser.offline([text])",author:"Dario Passariello",creationDate:"20190727",lastMod:"20240727",type:"function",active:!0,description:"Displays an offline message when the browser is offline.",env:"client",subCommand:[]},{name:"zoom",version:"0.0.2",example:"dphelper.browser.zoom()",author:"Dario Passariello",creationDate:"20190727",lastMod:"20240727",type:"function",active:!0,description:"Returns the current zoom level of the browser.",env:"client",subCommand:[]},{name:"status",version:"0.0.2",example:"dphelper.browser.status(404)",author:"Dario Passariello",creationDate:"20240912",lastMod:"20240912",type:"function",active:!0,description:"Returns a description of the specified HTTP status code.",env:"client",subCommand:[]},{name:"interlock",version:"0.0.1",example:"dphelper.browser.interlock((tabs) => ...)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Detect and monitor other active tabs of the same app.",env:"client",subCommand:[]}]},Rr={interlock:e=>{let t=new BroadcastChannel("dp_interlock"),r=1;t.onmessage=n=>{(n.origin===window.location.origin||!n.origin)&&(n.data==="ping"||n.data==="pong")&&(n.data==="ping"&&t.postMessage("pong"),n.data==="pong"&&e(++r))},t.postMessage("ping"),e(r)},state:(e,t,r)=>{history.pushState(e,t,r)},forw:e=>{history.go(e)},back:e=>{history.go(-Math.abs(e))},reload:()=>{location.href="/"},href:e=>{location.href=e},offLine:(e="You are offline.")=>{window.addEventListener("online",()=>document.querySelectorAll("[o]").forEach(t=>t.remove())),window.addEventListener("offline",()=>{let t=String(e).replace(/["\\]/g,"\\$&").slice(0,200),r=document.createElement("style");r.setAttribute("o",""),r.textContent=`
10
10
  html {
11
11
 
12
12
  &:before {
@@ -42,14 +42,14 @@ ${r}`)},Nt={tokenCount:e=>{let t=typeof e=="string"?e:ge(e);if(!t)return 0;let r
42
42
  }
43
43
 
44
44
  }
45
- `,document.body.appendChild(r)})},zoom:()=>Math.round(devicePixelRatio*100),status:e=>$t[e]||"Unknown status"};dphelper?.setDescription(Rr,Lr);var jr={name:"check",active:!0,subCommand:[{name:"version",version:"0.0.2",example:"dphelper.check.version([v1], [v2], [opts])",description:"Compares two versions.",author:"Dario Passariello",creationDate:"20240829",lastMod:"20240829",type:"function",active:!0,env:"both",subCommand:[]}]},zr={version:(e,t,r)=>{if(!(e&&t))return Number.NaN;let n=r?.lex,o=r?.zero,i=e.split("."),c=t.split("."),a=s=>(n?/^\d+[A-Za-z]*$/:/^\d+$/).test(s);if(!(i.every(a)&&c.every(a)))return Number.NaN;if(o){for(;i.length<c.length;)i.push("0");for(;c.length<i.length;)c.push("0")}n||(i=i.map(Number),c=c.map(Number));for(let s=0;s<i.length;s++){if(c.length===s)return 1;if(i[s]!==c[s])return i[s]>c[s]?1:-1}return i.length!==c.length?-1:0}};dphelper?.setDescription(jr,zr);var Nr={name:"color",active:!0,subCommand:[{name:"hex",version:"0.0.2",example:"dphelper.color.hex(255)",description:"Converts a number to a hexadecimal string.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"client",subCommand:[]},{name:"toHex",version:"0.0.2",example:"dphelper.color.toHex([255, 255, 255])",description:"Converts an RGB array to a hexadecimal string.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"client",subCommand:[]},{name:"toRGB",version:"0.0.2",example:"dphelper.color.toRGB('#ffffff')",description:"Converts a hexadecimal string to an RGB array.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"client",subCommand:[]},{name:"oleColor",version:"0.0.2",example:"dphelper.color.oleColor('#ffffff')",description:"Converts a hexadecimal string to an OLE color.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"client",subCommand:[]},{name:"gradient",version:"0.0.2",example:"dphelper.color.gradient([colorStart, colorEnd, colorCount])",description:"Generates a gradient between two colors.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"client",subCommand:[]}]},$r={hex:e=>{let t=Number.parseInt(e.toString(),10);return Number.isNaN(t)?"00":(t=Math.round(Math.max(0,Math.min(255,t))),t.toString(16).padStart(2,"0"))},toHex:e=>dphelper.color.hex(e[0])+dphelper.color.hex(e[1])+dphelper.color.hex(e[2]),toRGB:e=>{let t=[];return t[0]=Number.parseInt(dphelper.text.trim(e,"#",1,7).substring(0,2),16),t[1]=Number.parseInt(dphelper.text.trim(e,"#",1,7).substring(2,4),16),t[2]=Number.parseInt(dphelper.text.trim(e,"#",1,7).substring(4,6),16),t},oleColor:e=>{let t=e.replace("#","").match(/.{1,2}/g);return!t||t.length<3?"0":(Number.parseInt(t[0],16)+Number.parseInt(t[1],16)*256+Number.parseInt(t[2],16)*65536).toString()},gradient:(e,t,r)=>{let n=dphelper.color.toRGB(e),o=dphelper.color.toRGB(t),i=r,c=[],a=0,s=[];for(let f=0;f<i;f++)a+=1/i,s[0]=n[0]*a+(1-a)*o[0],s[1]=n[1]*a+(1-a)*o[1],s[2]=n[2]*a+(1-a)*o[2],c.push(dphelper.color.toHex(s));return c}};dphelper?.setDescription(Nr,$r);var Ir={name:"cookie",active:!0,subCommand:[{name:"set",version:"0.0.2",example:"dphelper.cookie.set({name, value, time, path = '/'})",description:"Creates a cookie with specified properties.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20240613",type:"function",active:!0,env:"client",subCommand:[]},{name:"get",version:"0.0.2",example:"dphelper.cookie.get(name)",description:"Retrieves the value of a specified cookie.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20240613",type:"function",active:!0,env:"client",subCommand:[]},{name:"delete",version:"0.0.2",example:"dphelper.cookie.delete(name)",description:"Deletes a specified cookie.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20240613",type:"function",active:!0,env:"client",subCommand:[]},{name:"removeAll",version:"0.0.2",example:"dphelper.cookie.removeAll()",description:"Clears all cookies.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20240613",type:"function",active:!0,env:"client",subCommand:[]}]},Wr={set:e=>{let t=new Date;if(t.setTime(t.getTime()+3600*1e3*24*365),!e.name)return;let{name:r,value:n,time:o=e.time||t.toUTCString(),path:i=e.path||"/",sameSite:c=e.sameSite||"Lax",secure:a=e.secure??location.protocol==="https:"}=e,s=encodeURIComponent(n),f=a?"Secure":"",l=c;document.cookie=`${r}=${s}; expires=${o}; path=${i}; SameSite=${l}; ${f}`},get:e=>{let t=document.cookie.split(";"),r=t.length;for(let n=0;n<r;n++){let o=t[n];if(!o)continue;let i=o.trim().split("=");if(e===i[0])return decodeURIComponent(i[1]||"")}return null},delete:e=>dphelper.cookie.set({name:e,value:"",time:"Thu, 01 Jan 1970 00:00:00 GMT"}),removeAll:()=>{let e=document.cookie.split(";"),t=e.length;for(let r=0;r<t;r++){let n=e[r];if(!n)continue;let o=n.indexOf("="),i=o>-1?n.slice(0,o):n;dphelper.cookie.delete(i.trim())}}};dphelper?.setDescription(Ir,Wr);var Ur={name:"coords",active:!0,subCommand:[{name:"degreesToRadians",version:"0.0.2",example:"dphelper.coords.degreesToRadians(45)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Convert degrees to radians",env:"client",subCommand:[]},{name:"latToMeters",version:"0.0.2",example:"dphelper.coords.latToMeters([40.689202777778, -74.044219444444])",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Convert latitude to meters",env:"client",subCommand:[]},{name:"toVector",version:"0.0.2",example:"dphelper.coords.toVector([40.689202777778, -74.044219444444, 1])",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Convert coordinates to vector",env:"client",subCommand:[]},{name:"convertToDecDegrees",version:"0.0.2",example:"dphelper.coords.convertToDecDegrees([39, 5, 59, 'N'])",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Convert coordinates to decimal degrees",env:"client",subCommand:[]},{name:"distance",version:"0.0.2",example:"dphelper.coords.distance([40.718788808171105, -74.0114768663747],[38.909309636475875, -77.01712459058946])",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:`
45
+ `,document.body.appendChild(r)})},zoom:()=>Math.round(devicePixelRatio*100),status:e=>$t[e]||"Unknown status"};dphelper?.setDescription(Or,Rr);var zr={name:"check",active:!0,subCommand:[{name:"version",version:"0.0.2",example:"dphelper.check.version([v1], [v2], [opts])",description:"Compares two versions.",author:"Dario Passariello",creationDate:"20240829",lastMod:"20240829",type:"function",active:!0,env:"both",subCommand:[]}]},Nr={version:(e,t,r)=>{if(!(e&&t))return Number.NaN;let n=r?.lex,o=r?.zero,i=e.split("."),c=t.split("."),a=s=>(n?/^\d+[A-Za-z]*$/:/^\d+$/).test(s);if(!(i.every(a)&&c.every(a)))return Number.NaN;if(o){for(;i.length<c.length;)i.push("0");for(;c.length<i.length;)c.push("0")}n||(i=i.map(Number),c=c.map(Number));for(let s=0;s<i.length;s++){if(c.length===s)return 1;if(i[s]!==c[s])return i[s]>c[s]?1:-1}return i.length!==c.length?-1:0}};dphelper?.setDescription(zr,Nr);var Ir={name:"color",active:!0,subCommand:[{name:"hex",version:"0.0.2",example:"dphelper.color.hex(255)",description:"Converts a number to a hexadecimal string.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"client",subCommand:[]},{name:"toHex",version:"0.0.2",example:"dphelper.color.toHex([255, 255, 255])",description:"Converts an RGB array to a hexadecimal string.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"client",subCommand:[]},{name:"toRGB",version:"0.0.2",example:"dphelper.color.toRGB('#ffffff')",description:"Converts a hexadecimal string to an RGB array.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"client",subCommand:[]},{name:"oleColor",version:"0.0.2",example:"dphelper.color.oleColor('#ffffff')",description:"Converts a hexadecimal string to an OLE color.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"client",subCommand:[]},{name:"gradient",version:"0.0.2",example:"dphelper.color.gradient([colorStart, colorEnd, colorCount])",description:"Generates a gradient between two colors.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"client",subCommand:[]}]},$r={hex:e=>{let t=Number.parseInt(e.toString(),10);return Number.isNaN(t)?"00":(t=Math.round(Math.max(0,Math.min(255,t))),t.toString(16).padStart(2,"0"))},toHex:e=>dphelper.color.hex(e[0])+dphelper.color.hex(e[1])+dphelper.color.hex(e[2]),toRGB:e=>{let t=[];return t[0]=Number.parseInt(dphelper.text.trim(e,"#",1,7).substring(0,2),16),t[1]=Number.parseInt(dphelper.text.trim(e,"#",1,7).substring(2,4),16),t[2]=Number.parseInt(dphelper.text.trim(e,"#",1,7).substring(4,6),16),t},oleColor:e=>{let t=e.replace("#","").match(/.{1,2}/g);return!t||t.length<3?"0":(Number.parseInt(t[0],16)+Number.parseInt(t[1],16)*256+Number.parseInt(t[2],16)*65536).toString()},gradient:(e,t,r)=>{let n=dphelper.color.toRGB(e),o=dphelper.color.toRGB(t),i=r,c=[],a=0,s=[];for(let f=0;f<i;f++)a+=1/i,s[0]=n[0]*a+(1-a)*o[0],s[1]=n[1]*a+(1-a)*o[1],s[2]=n[2]*a+(1-a)*o[2],c.push(dphelper.color.toHex(s));return c}};dphelper?.setDescription(Ir,$r);var Wr={name:"cookie",active:!0,subCommand:[{name:"set",version:"0.0.2",example:"dphelper.cookie.set({name, value, time, path = '/'})",description:"Creates a cookie with specified properties.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20240613",type:"function",active:!0,env:"client",subCommand:[]},{name:"get",version:"0.0.2",example:"dphelper.cookie.get(name)",description:"Retrieves the value of a specified cookie.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20240613",type:"function",active:!0,env:"client",subCommand:[]},{name:"delete",version:"0.0.2",example:"dphelper.cookie.delete(name)",description:"Deletes a specified cookie.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20240613",type:"function",active:!0,env:"client",subCommand:[]},{name:"removeAll",version:"0.0.2",example:"dphelper.cookie.removeAll()",description:"Clears all cookies.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20240613",type:"function",active:!0,env:"client",subCommand:[]}]},Ur={set:e=>{let t=new Date;if(t.setTime(t.getTime()+3600*1e3*24*365),!e.name)return;let{name:r,value:n,time:o=e.time||t.toUTCString(),path:i=e.path||"/",sameSite:c=e.sameSite||"Lax",secure:a=e.secure??location.protocol==="https:"}=e,s=encodeURIComponent(n),f=a?"Secure":"",l=c;document.cookie=`${r}=${s}; expires=${o}; path=${i}; SameSite=${l}; ${f}`},get:e=>{let t=document.cookie.split(";"),r=t.length;for(let n=0;n<r;n++){let o=t[n];if(!o)continue;let i=o.trim().split("=");if(e===i[0])return decodeURIComponent(i[1]||"")}return null},delete:e=>dphelper.cookie.set({name:e,value:"",time:"Thu, 01 Jan 1970 00:00:00 GMT"}),removeAll:()=>{let e=document.cookie.split(";"),t=e.length;for(let r=0;r<t;r++){let n=e[r];if(!n)continue;let o=n.indexOf("="),i=o>-1?n.slice(0,o):n;dphelper.cookie.delete(i.trim())}}};dphelper?.setDescription(Wr,Ur);var Gr={name:"coords",active:!0,subCommand:[{name:"degreesToRadians",version:"0.0.2",example:"dphelper.coords.degreesToRadians(45)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Convert degrees to radians",env:"client",subCommand:[]},{name:"latToMeters",version:"0.0.2",example:"dphelper.coords.latToMeters([40.689202777778, -74.044219444444])",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Convert latitude to meters",env:"client",subCommand:[]},{name:"toVector",version:"0.0.2",example:"dphelper.coords.toVector([40.689202777778, -74.044219444444, 1])",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Convert coordinates to vector",env:"client",subCommand:[]},{name:"convertToDecDegrees",version:"0.0.2",example:"dphelper.coords.convertToDecDegrees([39, 5, 59, 'N'])",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Convert coordinates to decimal degrees",env:"client",subCommand:[]},{name:"distance",version:"0.0.2",example:"dphelper.coords.distance([40.718788808171105, -74.0114768663747],[38.909309636475875, -77.01712459058946])",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:`
46
46
  Haversine formula:
47
47
  a = sin\xB2(\u0394\u03C6/2) + cos \u03C61 \u22C5 cos \u03C62 \u22C5 sin\xB2(\u0394\u03BB/2)
48
48
  c = 2 \u22C5 atan2( \u221Aa, \u221A(1-a) )
49
49
  d = R \u22C5 c
50
50
  where \u03C6 is latitude, \u03BB is longitude, R is earth's radius (mean radius = 6,371km);
51
51
  note that angles need to be in radians to pass to trig functions!
52
- `,env:"client",subCommand:[]},{name:"polarToCartesian",version:"0.0.2",example:"dphelper.coords.polarToCartesian([centerX, centerY, radius, angleInDegrees])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Convert polar coordinates to Cartesian coordinates",env:"client",subCommand:[]},{name:"mapDegreesToPixels",version:"0.0.2",example:"dphelper.coords.mapDegreesToPixels([degree, minDegree, maxDegree, minPixel, maxPixel, padding])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Map degrees to pixels",env:"client",subCommand:[]}]},ye=6371e3,Gr={degreesToRadians:e=>e*Math.PI/180,latToMeters:e=>Array.isArray(e)?ye*Math.cos(e[0])*Math.cos(e[1])/1e3:void 0,toVector:e=>{if(!Array.isArray(e))return;let t=ye*Math.cos(e[1]*Math.PI/180)*Math.cos(e[0]*Math.PI/180),r=ye*Math.cos(e[1]*Math.PI/180)*Math.sin(e[0]*Math.PI/180),n=ye*Math.sin(e[2]*Math.PI/180);return[t,r,n]},convertToDecDegrees:(e,t,r,n)=>{let o=e+t/60+r/3600;return(n==="S"||n==="W")&&(o*=-1),o},distance:(e,t)=>{if(!(Array.isArray(e)&&Array.isArray(t)))return;let r=e[0]*Math.PI/180,n=t[0]*Math.PI/180,o=(t[0]-e[0])*Math.PI/180,i=(t[1]-e[1])*Math.PI/180,c=Math.sin(o/2)*Math.sin(o/2)+Math.cos(r)*Math.cos(n)*Math.sin(i/2)*Math.sin(i/2),a=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),s=ye*a;return{km:Number((s/1e3).toFixed(2)),mi:Number((s/1e3*.621371).toFixed(2)),nMi:Number((s/1e3/1.852).toFixed(2))}},polarToCartesian:(e,t,r,n)=>{let o=(n-90)*Math.PI/180;return{x:e+r*Math.cos(o),y:t+r*Math.sin(o)}},mapDegreesToPixels:(e,t,r,n,o,i)=>{let c=(e-t)/(r-t),a=n+c*(o-n),s=i/20,f=o-(a-i)-s;return f<i?i:f}};dphelper?.setDescription(Ur,Gr);var It={version:"3.0.0",contributors:[{name:"Dario Passariello",email:"dariopassariello@gmail.com"}],app:{folder:"src",type:"library",port:3e3,code:"dphelper",host:{dev:"http://localhost",prod:"https://biglogic.ca/dphelper"},socket:{url:{tst:"http://localhost:5000/",dev:"http://localhost:5000/",pro:"wss://ws.a51.dev/"}},events:{url:{tst:"http://localhost:5002/",dev:"http://localhost:5002/",pro:"wss://ws.a51.dev/"}},proxy:{api:{tst:"http://localhost:5003/",dev:"http://localhost:5003/",pro:"https://api.a51.dev/"}},url:{dev:"http://localhost/"},cdn:{}}};dphelper.credits=()=>{let e=It;console.groupCollapsed(`%c${e.app.code} v${e.version}%c`,"color:orange",""),console.debug(`%c${e.app.code} v${e.version}%c by Dario Passariello started`,"color:orange",""),console.debug(`name: %c${e.app.code}`,"color:orange",""),console.debug(`version: %c${e.version}`,"color:orange",""),console.groupEnd()};Object.defineProperty(dphelper,"credits",{writable:!1,enumerable:!1,configurable:!1});var Wt={en:["January","February","March","April","May","June","July","August","September","October","November","December"],it:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]};var Kr={name:"date",active:!0,subCommand:[{name:"toIso",version:"0.0.2",example:"dphelper.date.toIso(value, 'en')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to ISO format.",env:"both",subCommand:[]},{name:"toMMDDYYYY",version:"0.0.2",example:"dphelper.date.toMMDDYYYY(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to MMDDYYYY format.",env:"both",subCommand:[]},{name:"toYYYYMMDD",version:"0.0.2",example:"dphelper.date.toYYYYMMDD(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to YYYYMMDD format.",env:"both",subCommand:[]},{name:"toHuman",version:"0.0.2",example:"dphelper.date.toHuman(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a human-readable format.",env:"both",subCommand:[]},{name:"convert",version:"0.0.2",example:"dphelper.date.convert(value, format)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a specified format.",env:"both",subCommand:[]},{name:"iso2Epoch",version:"0.0.2",example:"dphelper.date.iso2Epoch(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to epoch time.",env:"both",subCommand:[]},{name:"localIsoTime",version:"0.0.2",example:"dphelper.date.localIsoTime(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the local ISO time for a given date value.",env:"both",subCommand:[]},{name:"utc",version:"0.0.2",example:"dphelper.date.utc()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current UTC time.",env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.date.parse(value, '/')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Parses a date value with a specified separator.",env:"both",subCommand:[]},{name:"year",version:"0.0.2",example:"dphelper.date.year()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current year.",env:"both",subCommand:[]},{name:"addDays",version:"0.0.2",example:"dphelper.date.addDays(date, days)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Adds a specified number of days to a date.",env:"both",subCommand:[]},{name:"dateTimeToString",version:"0.0.2",example:"dphelper.date.dateTimeToString(dateObject)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date object to a string.",env:"both",subCommand:[]},{name:"isoToHuman",version:"0.0.2",example:"dphelper.date.isoToHuman(value, '@')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to a human-readable format with a specified symbol.",env:"both",subCommand:[]},{name:"fullDate",version:"0.0.2",example:"dphelper.date.fullDate()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the full date and time in the format DD-MM-YYYY HH:MM:SS.",env:"both",subCommand:[]},{name:"epoch",version:"0.0.2",example:"dphelper.date.epoch()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current epoch time.",env:"both",subCommand:[]},{name:"diffInDays",version:"0.0.2",example:"dphelper.date.diffInDays(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in days between two dates.",env:"both",subCommand:[]},{name:"diffInWeeks",version:"0.0.2",example:"dphelper.date.diffInWeeks(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in weeks between two dates.",env:"both",subCommand:[]},{name:"diffInMonths",version:"0.0.2",example:"dphelper.date.diffInMonths(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in months between two dates.",env:"both",subCommand:[]},{name:"diffInYears",version:"0.0.2",example:"dphelper.date.diffInYears(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in years between two dates.",env:"both",subCommand:[]},{name:"dateToYMD",version:"0.0.2",example:"dphelper.date.dateToYMD(date)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date to the format YYYY-MM-DD.",env:"both",subCommand:[]},{name:"collection",version:"0.0.2",example:"dphelper.date.collection()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets various date representations based on the type and locale.",env:"both",subCommand:[]},{name:"timeZones",version:"0.0.2",example:"dphelper.date.timeZones()",author:"Dario Passariello",creationDate:"20240901",lastMod:"20260220",type:"function",active:!0,description:"Returns an array of all supported timezones.",env:"both",subCommand:[]}]},Zr={days:(e="en")=>({en:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],it:["luned\xEC","marted\xEC","mercoled\xEC","gioved\xEC","venerd\xEC","sabato","domenica"]})[e],months:(e="en")=>Wt[e],year:()=>new Date().getFullYear(),toIso:(e,t="en")=>{e||(e="");let r=new Date(e);return String(r)==="Invalid Date"?null:new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(r)},toMMDDYYYY:e=>{try{let t=new Date(e);return isNaN(t.getTime())?"":`0${t.getMonth()+1}`.slice(-2)+""+`0${t.getDate()}`.slice(-2)+t.getFullYear()}catch{return""}},toYYYYMMDD:e=>{if(e)return e.toISOString().split("T")[0].replaceAll("-","")},toHuman:e=>{let t={weekday:"long",year:"numeric",month:"long",day:"numeric"};return e.toLocaleDateString(void 0,t)},convert:(e,t)=>{if(!e)return null;t||(t=dphelper.date.months("en"));let r=e.substring(0,2).replace("0",""),n=e.substring(2,4),o=e.substring(e.length-4);return`${n} ${t[Number(r)-1]} ${o}`},iso2Epoch:e=>(e||(e=""),new Date(e).getTime()),localIsoTime:e=>{e||(e=new Date);let t=new Date(e);if(isNaN(t.getTime()))return"";let r=t.getTimezoneOffset()*6e4;return new Date(Date.now()-r).toISOString().slice(0,-1)},utc:()=>new Date().toUTCString(),parse:(e,t="/")=>{if(!e)return null;let r=e.substring(0,2),n=e.substring(2,4),o=e.substring(4,8);return r+t+n+t+o},addDays:(e,t)=>{let r=new Date(Number(e));return r.setDate(e.getDate()+t),r},dateTimeToString:e=>{try{return`${e.getFullYear()}${e.getMonth().toString().length>1?e.getMonth()+1:`0${e.getMonth()+1}`}
52
+ `,env:"client",subCommand:[]},{name:"polarToCartesian",version:"0.0.2",example:"dphelper.coords.polarToCartesian([centerX, centerY, radius, angleInDegrees])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Convert polar coordinates to Cartesian coordinates",env:"client",subCommand:[]},{name:"mapDegreesToPixels",version:"0.0.2",example:"dphelper.coords.mapDegreesToPixels([degree, minDegree, maxDegree, minPixel, maxPixel, padding])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Map degrees to pixels",env:"client",subCommand:[]}]},De=6371e3,Yr={degreesToRadians:e=>e*Math.PI/180,latToMeters:e=>Array.isArray(e)?De*Math.cos(e[0])*Math.cos(e[1])/1e3:void 0,toVector:e=>{if(!Array.isArray(e))return;let t=De*Math.cos(e[1]*Math.PI/180)*Math.cos(e[0]*Math.PI/180),r=De*Math.cos(e[1]*Math.PI/180)*Math.sin(e[0]*Math.PI/180),n=De*Math.sin(e[2]*Math.PI/180);return[t,r,n]},convertToDecDegrees:(e,t,r,n)=>{let o=e+t/60+r/3600;return(n==="S"||n==="W")&&(o*=-1),o},distance:(e,t)=>{if(!(Array.isArray(e)&&Array.isArray(t)))return;let r=e[0]*Math.PI/180,n=t[0]*Math.PI/180,o=(t[0]-e[0])*Math.PI/180,i=(t[1]-e[1])*Math.PI/180,c=Math.sin(o/2)*Math.sin(o/2)+Math.cos(r)*Math.cos(n)*Math.sin(i/2)*Math.sin(i/2),a=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),s=De*a;return{km:Number((s/1e3).toFixed(2)),mi:Number((s/1e3*.621371).toFixed(2)),nMi:Number((s/1e3/1.852).toFixed(2))}},polarToCartesian:(e,t,r,n)=>{let o=(n-90)*Math.PI/180;return{x:e+r*Math.cos(o),y:t+r*Math.sin(o)}},mapDegreesToPixels:(e,t,r,n,o,i)=>{let c=(e-t)/(r-t),a=n+c*(o-n),s=i/20,f=o-(a-i)-s;return f<i?i:f}};dphelper?.setDescription(Gr,Yr);var Wt={version:"3.0.0",contributors:[{name:"Dario Passariello",email:"dariopassariello@gmail.com"}],app:{folder:"src",type:"library",port:3e3,code:"dphelper",host:{dev:"http://localhost",prod:"https://biglogic.ca/dphelper"},socket:{url:{tst:"http://localhost:5000/",dev:"http://localhost:5000/",pro:"wss://ws.a51.dev/"}},events:{url:{tst:"http://localhost:5002/",dev:"http://localhost:5002/",pro:"wss://ws.a51.dev/"}},proxy:{api:{tst:"http://localhost:5003/",dev:"http://localhost:5003/",pro:"https://api.a51.dev/"}},url:{dev:"http://localhost/"},cdn:{}}};var Kr={name:"credits",active:!0,subCommand:[]},Zr=()=>{let e=Wt;console.groupCollapsed(`%c${e.app.code} v${e.version}%c`,"color:orange",""),console.debug(`%c${e.app.code} v${e.version}%c by Dario Passariello started`,"color:orange",""),console.debug(`name: %c${e.app.code}`,"color:orange",""),console.debug(`version: %c${e.version}`,"color:orange",""),console.groupEnd()},Vr=globalThis.dphelper;Vr?.setDescription?.(Kr,Zr);var Ut={en:["January","February","March","April","May","June","July","August","September","October","November","December"],it:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]};var Qr={name:"date",active:!0,subCommand:[{name:"toIso",version:"0.0.2",example:"dphelper.date.toIso(value, 'en')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to ISO format.",env:"both",subCommand:[]},{name:"toMMDDYYYY",version:"0.0.2",example:"dphelper.date.toMMDDYYYY(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to MMDDYYYY format.",env:"both",subCommand:[]},{name:"toYYYYMMDD",version:"0.0.2",example:"dphelper.date.toYYYYMMDD(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to YYYYMMDD format.",env:"both",subCommand:[]},{name:"toHuman",version:"0.0.2",example:"dphelper.date.toHuman(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a human-readable format.",env:"both",subCommand:[]},{name:"convert",version:"0.0.2",example:"dphelper.date.convert(value, format)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a specified format.",env:"both",subCommand:[]},{name:"iso2Epoch",version:"0.0.2",example:"dphelper.date.iso2Epoch(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to epoch time.",env:"both",subCommand:[]},{name:"localIsoTime",version:"0.0.2",example:"dphelper.date.localIsoTime(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the local ISO time for a given date value.",env:"both",subCommand:[]},{name:"utc",version:"0.0.2",example:"dphelper.date.utc()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current UTC time.",env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.date.parse(value, '/')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Parses a date value with a specified separator.",env:"both",subCommand:[]},{name:"year",version:"0.0.2",example:"dphelper.date.year()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current year.",env:"both",subCommand:[]},{name:"addDays",version:"0.0.2",example:"dphelper.date.addDays(date, days)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Adds a specified number of days to a date.",env:"both",subCommand:[]},{name:"dateTimeToString",version:"0.0.2",example:"dphelper.date.dateTimeToString(dateObject)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date object to a string.",env:"both",subCommand:[]},{name:"isoToHuman",version:"0.0.2",example:"dphelper.date.isoToHuman(value, '@')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to a human-readable format with a specified symbol.",env:"both",subCommand:[]},{name:"fullDate",version:"0.0.2",example:"dphelper.date.fullDate()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the full date and time in the format DD-MM-YYYY HH:MM:SS.",env:"both",subCommand:[]},{name:"epoch",version:"0.0.2",example:"dphelper.date.epoch()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current epoch time.",env:"both",subCommand:[]},{name:"diffInDays",version:"0.0.2",example:"dphelper.date.diffInDays(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in days between two dates.",env:"both",subCommand:[]},{name:"diffInWeeks",version:"0.0.2",example:"dphelper.date.diffInWeeks(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in weeks between two dates.",env:"both",subCommand:[]},{name:"diffInMonths",version:"0.0.2",example:"dphelper.date.diffInMonths(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in months between two dates.",env:"both",subCommand:[]},{name:"diffInYears",version:"0.0.2",example:"dphelper.date.diffInYears(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in years between two dates.",env:"both",subCommand:[]},{name:"dateToYMD",version:"0.0.2",example:"dphelper.date.dateToYMD(date)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date to the format YYYY-MM-DD.",env:"both",subCommand:[]},{name:"collection",version:"0.0.2",example:"dphelper.date.collection()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets various date representations based on the type and locale.",env:"both",subCommand:[]},{name:"timeZones",version:"0.0.2",example:"dphelper.date.timeZones()",author:"Dario Passariello",creationDate:"20240901",lastMod:"20260220",type:"function",active:!0,description:"Returns an array of all supported timezones.",env:"both",subCommand:[]}]},en={days:(e="en")=>({en:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],it:["luned\xEC","marted\xEC","mercoled\xEC","gioved\xEC","venerd\xEC","sabato","domenica"]})[e],months:(e="en")=>Ut[e],year:()=>new Date().getFullYear(),toIso:(e,t="en")=>{e||(e="");let r=new Date(e);return String(r)==="Invalid Date"?null:new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(r)},toMMDDYYYY:e=>{try{let t=new Date(e);return isNaN(t.getTime())?"":`0${t.getMonth()+1}`.slice(-2)+""+`0${t.getDate()}`.slice(-2)+t.getFullYear()}catch{return""}},toYYYYMMDD:e=>{if(e)return e.toISOString().split("T")[0].replaceAll("-","")},toHuman:e=>{let t={weekday:"long",year:"numeric",month:"long",day:"numeric"};return e.toLocaleDateString(void 0,t)},convert:(e,t)=>{if(!e)return null;t||(t=dphelper.date.months("en"));let r=e.substring(0,2).replace("0",""),n=e.substring(2,4),o=e.substring(e.length-4);return`${n} ${t[Number(r)-1]} ${o}`},iso2Epoch:e=>(e||(e=""),new Date(e).getTime()),localIsoTime:e=>{e||(e=new Date);let t=new Date(e);if(isNaN(t.getTime()))return"";let r=t.getTimezoneOffset()*6e4;return new Date(Date.now()-r).toISOString().slice(0,-1)},utc:()=>new Date().toUTCString(),parse:(e,t="/")=>{if(!e)return null;let r=e.substring(0,2),n=e.substring(2,4),o=e.substring(4,8);return r+t+n+t+o},addDays:(e,t)=>{let r=new Date(Number(e));return r.setDate(e.getDate()+t),r},dateTimeToString:e=>{try{return`${e.getFullYear()}${e.getMonth().toString().length>1?e.getMonth()+1:`0${e.getMonth()+1}`}
53
53
  ${e.getDate().toString().length>1?e.getDate():`0${e.getDate()}`}_${e.getHours()}${e.getMinutes()}${e.getSeconds()}`}catch(t){return console.error(t),e}},isoToHuman:(e,t="@")=>{if(!e)return null;let r=dphelper.date.months("en"),n=new Date(e),o=n.getFullYear(),i=e.split("T")[1].split(":").slice(0,2).join(":"),c=(n.getMonth()+1).toString(),a=n.getDate().toString();return a.length<2&&(a=`0${a}`),c.length<2&&(c=`0${c}`),`${a} ${r[Number(c)-1]} ${o} ${t} ${i}`},fullDate:()=>{let e=new Date,t=Number(e.getDate()),r=Number(e.getMonth()+1),n=Number(e.getFullYear()),o=Number(e.getHours()),i=Number(e.getMinutes()),c=Number(e.getSeconds());return(t<10?`0${t}`:t)+"-"+(r<10?`0${r}`:r)+"-"+n+" "+(o<10?`0${o}`:o)+":"+(i<10?`0${i}`:i)+":"+(c<10?`0${c}`:c)},epoch:()=>Date.now(),diffInDays:(e,t)=>{let r=t.getTime(),n=e.getTime();return Math.floor((r-n)/(24*3600*1e3))},diffInWeeks:(e,t)=>{let r=t.getTime(),n=e.getTime();return Number(Number.parseInt(String((r-n)/(24*3600*1e3*7)),10))},diffInMonths:(e,t)=>{let r=e.getFullYear(),n=t.getFullYear(),o=e.getMonth();return t.getMonth()+12*n-(o+12*r)},diffInYears:(e,t)=>t.getFullYear()-e.getFullYear(),dateToYMD:e=>{let t=e.getDate(),r=e.getMonth()+1;return`${e.getFullYear()}-${r<=9?`0${r}`:r}-${t<=9?`0${t}`:t}`},collection:({date:e=new Date,type:t="",locale:r="en-US"})=>{!e&&t&&r&&console.debug(`
54
54
  "toDateString" -> Tue Jan 02 2024
55
55
  "toISOString" -> 2024-01-02T18:44:43.590Z
@@ -60,11 +60,11 @@ ${r}`)},Nt={tokenCount:e=>{let t=typeof e=="string"?e:ge(e);if(!t)return 0;let r
60
60
  "toString" -> Tue Jan 02 2024 11:44:43 GMT-0700 (Mountain Standard Time)
61
61
  "toISOStringShort" -> 2024-01-02
62
62
  "toLocaleString (en-GB)" -> 02/01/2024, 11:47:56 am
63
- `);let n;switch(t){case"toDateString":n=e.toDateString();break;case"toISOString":n=e.toISOString();break;case"toJSON":n=e.toJSON();break;case"toLocaleDateString":n=e.toLocaleDateString(r);break;case"toLocaleString":n=e.toLocaleString(r);break;case"toLocaleTimeString":n=e.toLocaleTimeString(r);break;case"toString":n=e.toString();break;case"toISOStringShort":n=e.toISOString().slice(0,10);break}return n},timeZones:()=>{let e=[],t=Intl.supportedValuesOf("timeZone");for(let r of t)e.push(r);return e}};dphelper?.setDescription(Kr,Zr);var Vr={name:"disable",active:!0,subCommand:[{name:"select",version:"0.0.2",example:"dphelper.disable.select([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable text selection on the specified element.",env:"client",subCommand:[]},{name:"spellCheck",version:"0.0.2",example:"dphelper.disable.spellCheck([tmr = 5000])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable spell check on the specified element after a delay.",env:"client",subCommand:[]},{name:"rightClick",version:"0.0.2",example:"dphelper.disable.rightClick([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable right-click context menu on the specified element.",env:"client",subCommand:[]},{name:"copy",version:"0.0.2",example:"dphelper.disable.copy([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable copy functionality on the specified element.",env:"client",subCommand:[]},{name:"paste",version:"0.0.2",example:"dphelper.disable.paste([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable paste functionality on the specified element.",env:"client",subCommand:[]},{name:"cut",version:"0.0.2",example:"dphelper.disable.cut([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable cut functionality on the specified element.",env:"client",subCommand:[]},{name:"drag",version:"0.0.2",example:"dphelper.disable.drag([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable drag functionality on the specified element.",env:"client",subCommand:[]}]},Xr={select:(e="body")=>{let t=typeof e=="string"?document.querySelector(e):e,r=n=>{let o=n.target,i=o.tagName.toLowerCase();if(!["input","button","select","textarea"].includes(i)&&!o.classList.contains("selectable"))return document.querySelectorAll("*").forEach(c=>c.blur()),n.preventDefault(),!1;document.querySelectorAll("img, a, input, button").forEach(c=>{c.addEventListener("dragstart",a=>(a.preventDefault(),!1))})};t&&t.addEventListener("mousedown",r),console.debug("%cSelection Disabled: %ctrue","color:orange","")},spellCheck:(e=5e3)=>{setInterval(()=>{let r=document.querySelectorAll("input[type=text], textarea, code");for(let n of r)n.getAttribute("spellcheck")||n.setAttribute("spellcheck","false")},e)},rightClick:(e="body")=>{let t=typeof e=="string"?document.querySelector(e):e;t&&t.addEventListener("contextmenu",r=>r.preventDefault())},copy:(e="body")=>{let t=typeof e=="string"?document.querySelector(e):e;t&&t.addEventListener("copy",r=>r.preventDefault())},paste:(e="body")=>{let t=typeof e=="string"?document.querySelector(e):e;t&&t.addEventListener("paste",r=>r.preventDefault())},cut:(e="body")=>{let t=typeof e=="string"?document.querySelector(e):e;t&&t.addEventListener("cut",r=>r.preventDefault())},drag:(e="body")=>{let t=typeof e=="string"?document.querySelector(e):e;t&&t.addEventListener("dragstart",r=>r.preventDefault())}};dphelper?.setDescription(Vr,Xr);var ie={},Qr={name:"dispatch",active:!0,subCommand:[{name:"set",version:"0.0.2",example:"dphelper.dispatch.set([name, value])",author:"Dario Passariello",creationDate:"20231231",lastMod:"20240612",type:"function",active:!0,description:"Dispatches a custom event with the specified name and value.",env:"client",subCommand:[]},{name:"listen",version:"0.0.2",example:"dphelper.dispatch.listen([eventNames, callback=null], flag = true)",author:"Dario Passariello",creationDate:"20231231",lastMod:"20240612",type:"function",active:!0,description:"Listens for the specified event names and executes the callback when the event is triggered.",env:"client",subCommand:[]},{name:"remove",version:"0.0.2",example:"dphelper.dispatch.remove([eventNames, callback=null], flag = true)",author:"Dario Passariello",creationDate:"20231231",lastMod:"20240612",type:"function",active:!0,description:"Removes the event listener for the specified event names.",env:"client",subCommand:[]}]},en={set:(e,t={})=>dispatchEvent(new CustomEvent(String(e),t)),listen:(e,t)=>{ie[e]&&ie[e].length>0&&dphelper.dispatch.remove(e);let r=n=>t?setTimeout(()=>t(n),0):null;window.addEventListener(e,r),ie[e]||(ie[e]=[]),ie[e].push(r)},remove:e=>{let t=ie[e];t&&(t.forEach(r=>window.removeEventListener(e,r)),delete ie[e])}};dphelper?.setDescription(Qr,en);var tn={name:"element",active:!0,subCommand:[{name:"fitScale",version:"0.0.2",example:"dphelper.element.fitScale([el = 'root', scale = 1, fit = false])",author:"Dario Passariello",creationDate:"20230527",lastMod:"20230527",type:"function",active:!0,description:"Scales an element based on the window size.",env:"client",subCommand:[]}]},rn={fitScale:(e,t=1,r=!1)=>addEventListener("resize",n=>dphelper.element.scaleBasedOnWindow(e,t,r)),scaleBasedOnWindow:(e,t,r)=>{if(!e)return;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return;let o=n.offsetWidth||1,i=n.offsetHeight||1,c=r?t/Math.max(o/window.innerWidth,i/window.innerHeight):t/Math.min(o/window.innerWidth,i/window.innerHeight);n.style.transform=`scale(${c})`}};dphelper?.setDescription(tn,rn);var nn={name:"event",active:!0,subCommand:[{name:"list",version:"0.0.2",example:"dphelper.event.list([element])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Show attached events.",env:"client",subCommand:[]},{name:"multi",version:"0.0.2",example:"dphelper.event.multi([element, eventNames, listener])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Attach multiple event listeners to an element.",env:"client",subCommand:[]},{name:"copy",version:"0.0.2",example:"dphelper.event.copy([element])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Copy text content of an element to the clipboard.",env:"client",subCommand:[]},{name:"onDrag",version:"0.0.2",example:"dphelper.event.onDrag([element])",author:"Dario Passariello",creationDate:"20230527",lastMod:"20230527",type:"function",active:!0,description:"Handle dragging functionality for elements.",env:"client",subCommand:[]},{name:"keys",version:"0.0.2",example:"dphelper.event.keys(e)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20230527",type:"function",active:!0,description:"Return key event properties.",env:"client",subCommand:[]}]},an={list:e=>window.getEventListeners(e),multi:(e,t,r)=>{let n=t.split(" ");for(let o of n)e.addEventListener(o,r,!1)},copy:e=>{let t=document.querySelector(e);t&&t.addEventListener("click",async r=>{if(navigator.clipboard)try{let n=r.target;n&&(await navigator.clipboard.writeText(n.textContent||""),alert("Copied"))}catch(n){console.error("Can't copy the value",n)}})},onDrag:e=>{let t=`.popup_overflow_${e}`,r=document.querySelector(t);if(!r)return;let n=o=>{let i=document.querySelector(t),c=i?.offsetHeight||0,a=i?.offsetWidth||0,s=Math.max(o.pageY,0)-c/2,f=Math.max(o.pageX,0)-a/2;localStorage.setItem(e,JSON.stringify([s,f]))};r.addEventListener("mousedown",()=>{window.addEventListener("mousemove",n)}),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",n)})},keys:e=>({key:e.key,ctrl:e.ctrlKey,alt:e.altKey,shift:e.shiftKey})};dphelper?.setDescription(nn,an);var on={name:"fetch",active:!0,subCommand:[{name:"get",version:"0.0.1",example:"dphelper.fetch.get('https://api.example.com')",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Perform a GET request with automatic retries and exponential backoff.",env:"both",subCommand:[]},{name:"post",version:"0.0.1",example:"dphelper.fetch.post('/api', { data: 123 })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Perform a POST request with JSON support.",env:"both",subCommand:[]}]},Se=async(e,t={},r=3,n=1e3)=>{try{let o=await globalThis.fetch(e,t);if(!o.ok&&r>0)throw new Error(o.statusText);return o}catch(o){if(r===0)throw o;return console.warn(`[dphelper] Fetch failed, retrying in ${n}ms... (${r} retries left)`),await new Promise(i=>setTimeout(i,n)),Se(e,t,r-1,n*2)}},Ct=(e,t)=>Se(e,t);Ct.get=(e,t)=>Se(e,{...t,method:"GET"});Ct.post=(e,t,r={})=>{let n=typeof t=="object"&&t!==null;return Se(e,{...r,method:"POST",headers:{...n?{"Content-Type":"application/json"}:{},...r.headers||{}},body:n?JSON.stringify(t):t})};dphelper?.setDescription(on,Ct);var sn={name:"form",active:!0,subCommand:[{name:"serialize",version:"0.0.2",example:"dphelper.form.serialize([form])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Serialize form data into an object.",env:"client",subCommand:[]},{name:"confirmType",version:"0.0.2",example:"dphelper.form.confirmType([type, value])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Confirm the type of a value.",env:"client",subCommand:[]},{name:"required",version:"0.0.2",example:"dphelper.form.required([value])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value is required.",env:"client",subCommand:[]},{name:"minLength",version:"0.0.2",example:"dphelper.form.minLength([value, num = 1])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value meets the minimum length.",env:"client",subCommand:[]},{name:"maxLength",version:"0.0.2",example:"dphelper.form.maxLength([value, num = 10])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value exceeds the maximum length.",env:"client",subCommand:[]},{name:"maxPhoneNumber",version:"0.0.2",example:"dphelper.form.maxPhoneNumber([value, num = 10])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a phone number exceeds the maximum length.",env:"client",subCommand:[]},{name:"isNumeric",version:"0.0.2",example:"dphelper.form.isNumeric([value])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value is numeric.",env:"client",subCommand:[]},{name:"isEmail",version:"0.0.2",example:"dphelper.form.isEmail([value])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Validate an email format.",env:"client",subCommand:[]},{name:"pattern",version:"0.0.2",example:"dphelper.form.pattern(event)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Pattern validation using onChange on inputs when you provide a pattern.",env:"client",subCommand:[]},{name:"noSpecialChars",version:"0.0.2",example:"dphelper.form.noSpecialChars(event)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20230527",type:"function",active:!0,description:"Avoid special characters in an input.",env:"client",subCommand:[]},{name:"table",version:"0.0.2",example:"dphelper.form.table(size = [7, 24], id, elem)",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Generate a table (default 7x24).",env:"client",subCommand:[]},{name:"sanitize",version:"0.0.2",example:"dphelper.form.sanitize(input)",author:"Dario Passariello",creationDate:"20240318",lastMod:"20240318",type:"function",active:!0,description:"Sanitize input value to avoid injection.",env:"client",subCommand:[]}]},cn={serialize:e=>{let t=typeof e=="string"?document.querySelector(e):e;if(!t)return{};let r={};if(!{validate:/[a-zA-Z][a-zA-Z0-9-_.]/,key:/[a-zA-Z0-9_]+|(?=\[\])/g,push:/^$/,fixed:/^\d+$/,named:/^[a-zA-Z0-9_]+$/}.validate.test(t.name))return;let o=a=>(a===""&&(a=null),a==="null"&&(a=null),a==="undefined"&&(a=void 0),a==="false"&&(a=!1),a==="true"&&(a=!0),a==="off"&&(a=!1),a==="on"&&(a=!0),a==="[]"&&(a=Array),a==="{}"&&(a=Object),["null","undefined","false","true","on","off"].filter(l=>l.includes(a)).length===0&&!Number.isNaN(a)&&(a=Number(a)),a),i=(a,s)=>{let f=a[0];f.slice(-1)==="]"&&(f=f.slice(0,-1));let l={};return a.length===1?l[f]=o(s):(a.shift(),l[f]=i(a,s)),l},c=t.serializeArray();for(let a of c){let s=a.value,f=a.name.split("["),l=i(f,s);Object.assign(r,l)}return r},confirmType:(e,t)=>e==="number"?/^\d+$/.test(t.toString()):e==="email"?/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t.toString().toLowerCase()):!0,required:e=>e==null?"Required":void 0,minLength:(e,t=1)=>!e||e.length<t?"Must Enter a Value":void 0,maxLength:(e,t=10)=>e.length>t?"Exceeds Max Length":void 0,maxPhoneNumber:(e,t=10)=>e.toString().length>t?"Exceeds Max Length":void 0,isNumeric:e=>!Number.isNaN(e),isEmail:e=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e.toString().toLowerCase()),pattern:e=>{let t=e.target;if(!(t.type&&t.value))return;let r;switch(t.type){case"text":case"password":r=/^[a-zA-Z0-9.\- !$@]+$/;break;case"email":r=/^([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6})*$/;break;case"number":r=/^[0-9\-+]*$/;break;case"tel":r=/^[0-9\s()\-+]*$/;break;default:return}t.value.match(r)||(t.value=t.value.slice(0,-1),e.preventDefault())},noSpecialChars:e=>{let t=e.target,r=t.value.trim(),n=/[^\w\s]/gi;r.length>2&&(t.value=r.replace(n,""))},table:(e,t,r)=>{let n=e[0]||7,o=e[1]||24,i=a=>String(a).replace(/[&<>"']/g,s=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[s]||s),c=`<form id='${i(t)}'>`;c+="<div class='table'>",c+="<div class='title'>";for(let a=1;a<=n;a++)c+=`<span>${a}</span>`;c+="</div>";for(let a=1;a<=o;a++){c+=`<div class='row'><span>${a}</span>`;for(let s=1;s<=n;s++)c+=`<input name='data[${s}][${a}]' tabindex='${s.toString().padStart(2,"0")}${a.toString().padStart(2,"0")}' type='number' onclick="this.select()" value='${Math.floor(Math.random()*100)}' title='${i(s)} to ${i(a)}' />`;c+="</div>"}c+="</div>",c+="</form>",r&&(r.innerHTML=c)},sanitize:e=>{if(e)return e.replace(/[^\w ]/g,"").replace(/[&/\\#, +()$~%.'":*?<>{}]/g,"")}};dphelper?.setDescription(sn,cn);var ln={name:"format",active:!0,subCommand:[{name:"currency",version:"0.0.2",example:"dphelper.format.currency(value, locale, currency)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Format a number as currency.",env:"both",subCommand:[]},{name:"phoneNumber",version:"0.0.2",example:"dphelper.format.phoneNumber(value, countryCode)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Format a string as a phone number.",env:"both",subCommand:[]}]},dn={currency:(e,t="en-US",r="USD")=>new Intl.NumberFormat(t,{style:"currency",currency:r}).format(e),phoneNumber:(e,t="US")=>{let r=`${e}`.replace(/\D/g,""),n;return t==="US"&&(n=r.match(/^(\d{3})(\d{3})(\d{4})$/),n)?`(${n[1]}) ${n[2]}-${n[3]}`:e}};dphelper?.setDescription(ln,dn);var un={name:"json",active:!0,subCommand:[{name:"counter",version:"0.0.2",example:"dphelper.json.counter()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Count occurrences of a key-value pair in a JSON object.",env:"both",subCommand:[]},{name:"toCsv",version:"0.0.2",example:"dphelper.json.toCsv()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Convert JSON data to CSV format.",env:"both",subCommand:[]},{name:"saveCsvAs",version:"0.0.2",example:"dphelper.json.saveCsvAs()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Save CSV data as a file.",env:"both",subCommand:[]},{name:"is",version:"0.0.2",example:"dphelper.json.is()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a string is valid JSON.",env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.json.parse()",author:"Dario Passariello",creationDate:"20241107",lastMod:"20241107",type:"function",active:!0,description:"Parse a JSON string.",env:"both",subCommand:[]},{name:"sanitize",version:"0.0.2",example:"dphelper.json.sanitize()",author:"Dario Passariello",creationDate:"20241107",lastMod:"20241107",type:"function",active:!0,description:"Sanitize a JSON string.",env:"both",subCommand:[]},{name:"sanitizeJsonValue",version:"0.0.2",example:"dphelper.json.sanitizeJsonValue()",author:"Dario Passariello",creationDate:"20241107",lastMod:"20241107",type:"function",active:!0,description:"Sanitize individual JSON values.",env:"both",subCommand:[]}]},pn={counter:(e,t,r)=>e?t&&r?e.items&&Array.isArray(e.items)?e.items.filter(n=>n[t]===r).length:Object.keys(e).length:0:null,toCsv:e=>{let t=e,r=(i,c)=>c===null?"":c,n=Object.keys(t[0]),o=t.map(i=>n.map(c=>JSON.stringify(i[c],r)).join(","));return o.unshift(n.join(",")),o.join(`\r
64
- `)},saveCsvAs:(e,t)=>{let r=new Blob([e],{type:"text/csv;charset=utf-8;"}),n=document.createElement("a"),o=dphelper.date.dateTimeToString(new Date(Date.now())),i=`${t}_${o}.csv`,c=URL.createObjectURL(r);n.setAttribute("href",c),n.setAttribute("download",i),n.style.visibility="hidden",document.body.appendChild(n),n.click(),document.body.removeChild(n)},is:e=>{try{JSON.parse(e)}catch(t){return console.warn(t),!1}return!0},parse:e=>{try{return JSON.parse(e)}catch(t){return console.warn(t),"Json not parsable"}},sanitize:e=>e?"{"+e.trim().replace(/^\{/,"").replace(/\}$/,"").split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/).map(o=>{let[i,...c]=o.split(":"),a=dphelper.json.sanitizeJsonValue(i?.trim()??"");if(!i)return"";let s=c.join(":");return s?(s=s.trim(),s==="null"?s='""':s==="true"||s==="false"?s=`"${s}"`:/^\d+$/.test(s)?s=`"${s}"`:s=dphelper.json.sanitizeJsonValue(s)):s='""',`${a}:${s}`}).filter(o=>o!=="").join(",")+"}":"{}",sanitizeJsonValue:e=>e?`"${e.replace(/^"(.*)"$/,"$1").replace(/\\/g,"").replace(/\//g,"/").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/"/g,'\\"').replace(/\t/g," ").trim()}"`:'""'};dphelper?.setDescription(un,pn);var xn={name:"load",active:!0,subCommand:[{name:"all",version:"0.0.2",example:"dphelper.load.all(require['context']('Scripts', true, /.(js|ts)$/) [, 'cacheName'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Load all files from a specific folder based on a specific extension. If you add a 'cacheName', the list is stored in cache.",env:"client",subCommand:[]},{name:"file",version:"0.0.2",example:"dphelper.load.file(filePath)",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Load a specific file.",env:"client",subCommand:[]},{name:"fileToElement",version:"0.0.2",example:"dphelper.load.fileToElement(filePath, elementSelector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Load a file and insert its content into an element.",env:"client",subCommand:[]},{name:"script",version:"0.0.2",example:"dphelper.load.script(scripts, elementSelector)",author:"Dario Passariello",creationDate:"20240525",lastMod:"20240525",type:"function",active:!0,description:"Append script tags to an element.",env:"client",subCommand:[]},{name:"toJson",version:"0.0.2",example:"dphelper.load.toJson(require.context('./src/router', true, /.(ts)$/), 'router')",author:"Dario Passariello",creationDate:"20250101",lastMod:"20250101",type:"function",active:!0,description:"Create JSON from folder recursion.",env:"client",subCommand:[]}]},fn={all:(e,t="")=>{if(e){t&&!window[t]&&(window[t]=[]);for(let r of e.keys()){if(!r)return;t&&window[t].push(r),e(r)}}},file:()=>null,fileToElement:async(e,t)=>{try{let r=await dphelper.load.file(t),n=document.querySelector(e);n?n.innerHTML=dphelper.sanitize.html(r):console.error(`Element not found: ${e}`)}catch(r){console.error("Error loading file to element:",r)}},script:(e,t="html")=>{let r=document.querySelector(t);if(!r){console.error(`Element not found: ${t}`);return}for(let n of e){let o=document.createElement("script");o.src=n,o.async=!0,o.defer=!0,r.appendChild(o)}},toJson:(e,t="")=>{let r={};if(e){t&&(r[t]=[]);for(let n of e.keys()){if(!n)return;t&&r[t]&&r[t].push(n),e(n)}!t||!r[t]||Object.defineProperty(window,t,{value:dphelper.array.pathToJson(r[t]),writable:!1,enumerable:!1,configurable:!1})}}};dphelper?.setDescription(xn,fn);var mn={name:"logging",active:!0,subCommand:[{name:"list",version:"0.0.2",example:"dphelper.log.list()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"List all log entries.",env:"both",subCommand:[]},{name:"reg",version:"0.0.2",example:"dphelper.log.reg('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log a regular message.",env:"both",subCommand:[]},{name:"debug",version:"0.0.2",example:"dphelper.log.debug('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log a debug message.",env:"both",subCommand:[]},{name:"error",version:"0.0.2",example:"dphelper.log.error('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log an error message.",env:"both",subCommand:[]}]},De={log:[]},hn={list:()=>De.log,reg:e=>De.log.push({type:"reg",message:e}),debug:e=>De.log.push({type:"debug",message:e}),error:e=>De.log.push({type:"error",message:e})};Object.defineProperty(De,"log",{writable:!1,enumerable:!1,configurable:!1});dphelper?.setDescription(mn,hn);var vn={name:"math",active:!0,subCommand:[{name:"rnd",version:"0.0.2",example:"dphelper.math.rnd()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Generate a random number.",env:"both",subCommand:[]},{name:"tmr",version:"0.0.2",example:"dphelper.math.tmr()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Measure the time taken by a function.",env:"both",subCommand:[]},{name:"isOdd",version:"0.0.2",example:"dphelper.math.isOdd(a)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a number is odd.",env:"both",subCommand:[]},{name:"percent",version:"0.0.2",example:"dphelper.math.percent([n, tot])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculate the percentage of a number relative to a total. Example: total: 100, number: 25 -> 25%",env:"both",subCommand:[]},{name:"isPrime",version:"0.0.2",example:"dphelper.math.isPrime(a)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a number is prime.",env:"both",subCommand:[]}]},bn={rnd:()=>Math.floor(1e5+Math.random()*dphelper.math.tmr()),tmr:()=>Math.round(dphelper.date.epoch()/1e3),isOdd:e=>Number(e)%2!==0,percent:(e,t)=>{if(t===0)throw new Error("Total cannot be zero");return Number(e)/Number(t)*100},isPrime:e=>{if(Number(e)<=1)return!1;for(let t=2;t<=Math.sqrt(Number(e));t++)if(Number(e)%t===0)return!1;return!0}};dphelper?.setDescription(vn,bn);var gn={name:"memory",active:!0,subCommand:[{name:"lock",version:"0.0.2",example:"dphelper.memory.lock('state[key]')",author:"Dario Passariello",creationDate:"20230101",lastMod:"20230111",type:"function",active:!0,description:"Lock a state",env:"client",subCommand:[]},{name:"unlock",version:"0.0.2",example:"dphelper.memory.unlock('state[key]')",author:"Dario Passariello",creationDate:"20230101",lastMod:"20230111",type:"function",active:!0,description:"Unlock a state",env:"client",subCommand:[]}]},yn={lock:e=>{if(!e)return;let t=window,r=e.split(".");if(r.length<2)return;let n=r[0],o=r[1];if(!n||!o)return;let i=t[n];i&&Object.defineProperty(i,o,{writable:!1,configurable:!1})},unlock:e=>{if(!e)return;let t=window,r=e.split(".");if(r.length<2)return;let n=r[0],o=r[1];if(!n||!o)return;let i=t[n];if(i)try{Object.defineProperty(i,o,{writable:!0,configurable:!0})}catch{}}};dphelper?.setDescription(gn,yn);var Dn={name:"navigation",active:!0,subCommand:[{name:"ajax",version:"0.0.2",example:"dphelper.navigation.ajax()",author:"Dario Passariello",creationDate:"20260223",lastMod:"20260223",type:"function",active:!0,description:"Vanilla AJAX Single Page Application (SPA) navigation engine.",env:"client",subCommand:[]},{name:"load",version:"0.0.1",example:"dphelper.navigation.load('/home')",author:"Dario Passariello",creationDate:"20260223",lastMod:"20260223",type:"function",active:!0,description:"Loads a page via AJAX and injects it into the body.",env:"client",subCommand:[]}]},Cn={load:async e=>{let r=document.body,n=e.startsWith("/")?e.split("/")[1]||"home":e;if((!n||n==="")&&(n="home"),!document.querySelector(".loader")){let o=document.createElement("div");o.className="loader",o.innerHTML="<i></i>",o.style.opacity="0",o.style.transition="opacity 1000ms",r.appendChild(o),setTimeout(()=>o.style.opacity="1",10)}try{let o=await fetch(`${n}/`);if(!o.ok)throw new Error("Page not found");let i=await o.text(),c=i.match(/<body[^>]*>([\s\S]*)<\/body>/i),a=c?c[1]:i,s=x=>{let d=document.createElement("div");return d.textContent=x,d.innerHTML},f=dphelper?.sanitize?.html?dphelper.sanitize.html(a||""):s(a||"");r.innerHTML=f,window.scrollTo({top:0,behavior:"smooth"}),document.title=n.charAt(0).toUpperCase()+n.slice(1);let l=dphelper.path.rail();l&&l.length>0&&(r.className=r.className.replace(/path-\w+/g,"").trim(),r.classList.add(`path-${l[l.length-1]}`)),globalThis.dphelper.navigation.ajax_running&&dphelper.navigation.ajax()}catch(o){console.error("Navigation error:",o);let i=window.location.origin;e.startsWith("/")&&!e.startsWith("//")&&!e.match(/^[a-zA-Z]:/)&&new URL(e,i).href.startsWith(i)&&(window.location.href=e)}},_bind:e=>{document.querySelectorAll(e).forEach(r=>{let n=r.getAttribute("href");if(!n||!n.startsWith("/")||n.includes("#"))return;let o=r.cloneNode(!0);r.parentNode?.replaceChild(o,r),o.addEventListener("mouseup",i=>{let c=o.getAttribute("data-href")||n;history.pushState({href:c},"",c),dphelper.navigation.load(c),o.removeAttribute("href"),i.stopPropagation()})})},ajax:()=>{if(globalThis.dphelper.navigation.ajax_running){dphelper.navigation._bind("a");return}globalThis.dphelper.navigation.ajax_running=!0,window.onpopstate=()=>dphelper.navigation.load(window.location.pathname),dphelper.navigation._bind("a"),globalThis.dp_hash_listener_set||(window.addEventListener("hashchange",()=>{let e=window.location.hash.substring(1);e&&document.getElementById(e)?.scrollIntoView({behavior:"smooth"})}),globalThis.dp_hash_listener_set=!0)}};dphelper?.setDescription(Dn,Cn);var En={name:"obj",active:!0,subCommand:[{name:"replaceNullObjects",version:"0.0.2",example:"dphelper.obj.replaceNullObjects([obj])",description:"Replace null values in an object with empty objects.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"serialize",version:"0.0.2",example:"dphelper.obj.serialize([obj])",description:"Serialize an object to a JSON string.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"deSerialize",version:"0.0.2",example:"dphelper.obj.deSerialize([obj])",description:"Deserialize a JSON string to an object.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"toXML",version:"0.0.2",example:"dphelper.obj.toXML([obj])",description:"Convert an object to an XML string.",author:"Dario Passariello",creationDate:"20240315",lastMod:"20240315",type:"function",active:!0,env:"both",subCommand:[]},{name:"updateByKey",version:"0.0.2",example:"dphelper.obj.updateByKey([obj, key, newValue])",description:"Update an object's property by key.",author:"Dario Passariello",creationDate:"20240929",lastMod:"20240929",type:"function",active:!0,env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.obj.parse(val)",description:"Check if value is an object or another type. Return object after parse or a different type. Used instead of JSON.parse to avoid crash.",author:"Dario Passariello",creationDate:"20241027",lastMod:"20240927",type:"function",active:!0,env:"both",subCommand:[]},{name:"diff",version:"0.0.2",example:"dphelper.obj.diff([obj1, obj2])",description:"Show the differences between two objects.",author:"Dario Passariello",creationDate:"20250101",lastMod:"20250101",type:"function",active:!0,env:"both",subCommand:[]},{name:"setProps",version:"0.0.2",example:"dphelper.obj.setProps( [object], {options} )",author:"Dario Passariello",creationDate:"20251224",lastMod:"20251224",type:"function",active:!0,description:"Set properties of an object.",env:"both",subCommand:[]}]},An={replaceNullObjects:e=>{let t={...e};for(let r of Object.keys(e))t[r]===null&&(t[r]="")},serialize:e=>{if(typeof e=="function")return e.toString();if(typeof e=="object"){let t={};for(let[r,n]of Object.entries(e))t[r]=dphelper.obj.serialize(n);return t}return e},deSerialize:e=>{if(typeof e=="object"){let t={};for(let[r,n]of Object.entries(e))t[r]=dphelper.obj.deSerialize(n);return t}return e},sort:e=>Object.keys(e).sort().reduce((t,r)=>(t[r]=e[r],t),{}),toXML:e=>{let t=(r,n="")=>{let o="";for(let i in r)if(Object.hasOwn(r,i)){let c=r[i];typeof c=="object"&&c!==null?o+=`${n}<${i}>
63
+ `);let n;switch(t){case"toDateString":n=e.toDateString();break;case"toISOString":n=e.toISOString();break;case"toJSON":n=e.toJSON();break;case"toLocaleDateString":n=e.toLocaleDateString(r);break;case"toLocaleString":n=e.toLocaleString(r);break;case"toLocaleTimeString":n=e.toLocaleTimeString(r);break;case"toString":n=e.toString();break;case"toISOStringShort":n=e.toISOString().slice(0,10);break}return n},timeZones:()=>{let e=[],t=Intl.supportedValuesOf("timeZone");for(let r of t)e.push(r);return e}};dphelper?.setDescription(Qr,en);var tn={name:"disable",active:!0,subCommand:[{name:"select",version:"0.0.2",example:"dphelper.disable.select([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable text selection on the specified element.",env:"client",subCommand:[]},{name:"spellCheck",version:"0.0.2",example:"dphelper.disable.spellCheck([tmr = 5000])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable spell check on the specified element after a delay.",env:"client",subCommand:[]},{name:"rightClick",version:"0.0.2",example:"dphelper.disable.rightClick([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable right-click context menu on the specified element.",env:"client",subCommand:[]},{name:"copy",version:"0.0.2",example:"dphelper.disable.copy([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable copy functionality on the specified element.",env:"client",subCommand:[]},{name:"paste",version:"0.0.2",example:"dphelper.disable.paste([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable paste functionality on the specified element.",env:"client",subCommand:[]},{name:"cut",version:"0.0.2",example:"dphelper.disable.cut([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable cut functionality on the specified element.",env:"client",subCommand:[]},{name:"drag",version:"0.0.2",example:"dphelper.disable.drag([el = 'body'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Disable drag functionality on the specified element.",env:"client",subCommand:[]}]},rn={select:(e="body")=>{try{if(typeof document>"u")return;let t=typeof e=="string"?document.querySelector(e):e;if(!t||typeof t.addEventListener!="function")return;let r=n=>{let o=n.target,i=o.tagName.toLowerCase();if(!["input","button","select","textarea"].includes(i)&&!o.classList.contains("selectable"))return document.querySelectorAll("*").forEach(c=>c.blur()),n.preventDefault(),!1;document.querySelectorAll("img, a, input, button").forEach(c=>{c.addEventListener("dragstart",a=>(a.preventDefault(),!1))})};t.addEventListener("mousedown",r),console.debug("%cSelection Disabled: %ctrue","color:orange","")}catch(t){console.debug("dphelper.disable.select:",t)}},spellCheck:(e=5e3)=>{setInterval(()=>{let r=document.querySelectorAll("input[type=text], textarea, code");for(let n of r)n.getAttribute("spellcheck")||n.setAttribute("spellcheck","false")},e)},rightClick:(e="body")=>{try{if(typeof document>"u")return;let t=typeof e=="string"?document.querySelector(e):e;t&&typeof t.addEventListener=="function"&&t.addEventListener("contextmenu",r=>r.preventDefault())}catch(t){console.debug("dphelper.disable.rightClick:",t)}},copy:(e="body")=>{try{if(typeof document>"u")return;let t=typeof e=="string"?document.querySelector(e):e;t&&typeof t.addEventListener=="function"&&t.addEventListener("copy",r=>r.preventDefault())}catch(t){console.debug("dphelper.disable.copy:",t)}},paste:(e="body")=>{try{if(typeof document>"u")return;let t=typeof e=="string"?document.querySelector(e):e;t&&typeof t.addEventListener=="function"&&t.addEventListener("paste",r=>r.preventDefault())}catch(t){console.debug("dphelper.disable.paste:",t)}},cut:(e="body")=>{try{if(typeof document>"u")return;let t=typeof e=="string"?document.querySelector(e):e;t&&typeof t.addEventListener=="function"&&t.addEventListener("cut",r=>r.preventDefault())}catch(t){console.debug("dphelper.disable.cut:",t)}},drag:(e="body")=>{try{if(typeof document>"u")return;let t=typeof e=="string"?document.querySelector(e):e;t&&typeof t.addEventListener=="function"&&t.addEventListener("dragstart",r=>r.preventDefault())}catch(t){console.debug("dphelper.disable.drag:",t)}}};dphelper?.setDescription?.(tn,rn);var se={},nn={name:"dispatch",active:!0,subCommand:[{name:"set",version:"0.0.2",example:"dphelper.dispatch.set([name, value])",author:"Dario Passariello",creationDate:"20231231",lastMod:"20240612",type:"function",active:!0,description:"Dispatches a custom event with the specified name and value.",env:"client",subCommand:[]},{name:"listen",version:"0.0.2",example:"dphelper.dispatch.listen([eventNames, callback=null], flag = true)",author:"Dario Passariello",creationDate:"20231231",lastMod:"20240612",type:"function",active:!0,description:"Listens for the specified event names and executes the callback when the event is triggered.",env:"client",subCommand:[]},{name:"remove",version:"0.0.2",example:"dphelper.dispatch.remove([eventNames, callback=null], flag = true)",author:"Dario Passariello",creationDate:"20231231",lastMod:"20240612",type:"function",active:!0,description:"Removes the event listener for the specified event names.",env:"client",subCommand:[]}]},an={set:(e,t={})=>dispatchEvent(new CustomEvent(String(e),t)),listen:(e,t)=>{se[e]&&se[e].length>0&&dphelper.dispatch.remove(e);let r=n=>t?setTimeout(()=>t(n),0):null;window.addEventListener(e,r),se[e]||(se[e]=[]),se[e].push(r)},remove:e=>{let t=se[e];t&&(t.forEach(r=>window.removeEventListener(e,r)),delete se[e])}};dphelper?.setDescription(nn,an);var on={name:"element",active:!0,subCommand:[{name:"fitScale",version:"0.0.2",example:"dphelper.element.fitScale([el = 'root', scale = 1, fit = false])",author:"Dario Passariello",creationDate:"20230527",lastMod:"20230527",type:"function",active:!0,description:"Scales an element based on the window size.",env:"client",subCommand:[]}]},sn={fitScale:(e,t=1,r=!1)=>addEventListener("resize",n=>dphelper.element.scaleBasedOnWindow(e,t,r)),scaleBasedOnWindow:(e,t,r)=>{if(!e)return;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return;let o=n.offsetWidth||1,i=n.offsetHeight||1,c=r?t/Math.max(o/window.innerWidth,i/window.innerHeight):t/Math.min(o/window.innerWidth,i/window.innerHeight);n.style.transform=`scale(${c})`}};dphelper?.setDescription(on,sn);var cn={name:"event",active:!0,subCommand:[{name:"list",version:"0.0.2",example:"dphelper.event.list([element])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Show attached events.",env:"client",subCommand:[]},{name:"multi",version:"0.0.2",example:"dphelper.event.multi([element, eventNames, listener])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Attach multiple event listeners to an element.",env:"client",subCommand:[]},{name:"copy",version:"0.0.2",example:"dphelper.event.copy([element])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Copy text content of an element to the clipboard.",env:"client",subCommand:[]},{name:"onDrag",version:"0.0.2",example:"dphelper.event.onDrag([element])",author:"Dario Passariello",creationDate:"20230527",lastMod:"20230527",type:"function",active:!0,description:"Handle dragging functionality for elements.",env:"client",subCommand:[]},{name:"keys",version:"0.0.2",example:"dphelper.event.keys(e)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20230527",type:"function",active:!0,description:"Return key event properties.",env:"client",subCommand:[]}]},ln={list:e=>window.getEventListeners(e),multi:(e,t,r)=>{let n=t.split(" ");for(let o of n)e.addEventListener(o,r,!1)},copy:e=>{let t=document.querySelector(e);t&&t.addEventListener("click",async r=>{if(navigator.clipboard)try{let n=r.target;n&&(await navigator.clipboard.writeText(n.textContent||""),alert("Copied"))}catch(n){console.error("Can't copy the value",n)}})},onDrag:e=>{let t=`.popup_overflow_${e}`,r=document.querySelector(t);if(!r)return;let n=o=>{let i=document.querySelector(t),c=i?.offsetHeight||0,a=i?.offsetWidth||0,s=Math.max(o.pageY,0)-c/2,f=Math.max(o.pageX,0)-a/2;localStorage.setItem(e,JSON.stringify([s,f]))};r.addEventListener("mousedown",()=>{window.addEventListener("mousemove",n)}),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",n)})},keys:e=>({key:e.key,ctrl:e.ctrlKey,alt:e.altKey,shift:e.shiftKey})};dphelper?.setDescription(cn,ln);var dn={name:"fetch",active:!0,subCommand:[{name:"get",version:"0.0.1",example:"dphelper.fetch.get('https://api.example.com')",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Perform a GET request with automatic retries and exponential backoff.",env:"both",subCommand:[]},{name:"post",version:"0.0.1",example:"dphelper.fetch.post('/api', { data: 123 })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Perform a POST request with JSON support.",env:"both",subCommand:[]}]},ke=async(e,t={},r=3,n=1e3)=>{try{let o=await globalThis.fetch(e,t);if(!o.ok&&r>0)throw new Error(o.statusText);return o}catch(o){if(r===0)throw o;return console.warn(`[dphelper] Fetch failed, retrying in ${n}ms... (${r} retries left)`),await new Promise(i=>setTimeout(i,n)),ke(e,t,r-1,n*2)}},Et=(e,t)=>ke(e,t);Et.get=(e,t)=>ke(e,{...t,method:"GET"});Et.post=(e,t,r={})=>{let n=typeof t=="object"&&t!==null;return ke(e,{...r,method:"POST",headers:{...n?{"Content-Type":"application/json"}:{},...r.headers||{}},body:n?JSON.stringify(t):t})};dphelper?.setDescription(dn,Et);var un={name:"form",active:!0,subCommand:[{name:"serialize",version:"0.0.2",example:"dphelper.form.serialize([form])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Serialize form data into an object.",env:"client",subCommand:[]},{name:"confirmType",version:"0.0.2",example:"dphelper.form.confirmType([type, value])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Confirm the type of a value.",env:"client",subCommand:[]},{name:"required",version:"0.0.2",example:"dphelper.form.required([value])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value is required.",env:"client",subCommand:[]},{name:"minLength",version:"0.0.2",example:"dphelper.form.minLength([value, num = 1])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value meets the minimum length.",env:"client",subCommand:[]},{name:"maxLength",version:"0.0.2",example:"dphelper.form.maxLength([value, num = 10])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value exceeds the maximum length.",env:"client",subCommand:[]},{name:"maxPhoneNumber",version:"0.0.2",example:"dphelper.form.maxPhoneNumber([value, num = 10])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a phone number exceeds the maximum length.",env:"client",subCommand:[]},{name:"isNumeric",version:"0.0.2",example:"dphelper.form.isNumeric([value])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value is numeric.",env:"client",subCommand:[]},{name:"isEmail",version:"0.0.2",example:"dphelper.form.isEmail([value])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Validate an email format.",env:"client",subCommand:[]},{name:"pattern",version:"0.0.2",example:"dphelper.form.pattern(event)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Pattern validation using onChange on inputs when you provide a pattern.",env:"client",subCommand:[]},{name:"noSpecialChars",version:"0.0.2",example:"dphelper.form.noSpecialChars(event)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20230527",type:"function",active:!0,description:"Avoid special characters in an input.",env:"client",subCommand:[]},{name:"table",version:"0.0.2",example:"dphelper.form.table(size = [7, 24], id, elem)",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Generate a table (default 7x24).",env:"client",subCommand:[]},{name:"sanitize",version:"0.0.2",example:"dphelper.form.sanitize(input)",author:"Dario Passariello",creationDate:"20240318",lastMod:"20240318",type:"function",active:!0,description:"Sanitize input value to avoid injection.",env:"client",subCommand:[]}]},pn={serialize:e=>{let t=typeof e=="string"?document.querySelector(e):e;if(!t)return{};let r={};if(!{validate:/[a-zA-Z][a-zA-Z0-9-_.]/,key:/[a-zA-Z0-9_]+|(?=\[\])/g,push:/^$/,fixed:/^\d+$/,named:/^[a-zA-Z0-9_]+$/}.validate.test(t.name))return;let o=a=>(a===""&&(a=null),a==="null"&&(a=null),a==="undefined"&&(a=void 0),a==="false"&&(a=!1),a==="true"&&(a=!0),a==="off"&&(a=!1),a==="on"&&(a=!0),a==="[]"&&(a=Array),a==="{}"&&(a=Object),["null","undefined","false","true","on","off"].filter(l=>l.includes(a)).length===0&&!Number.isNaN(a)&&(a=Number(a)),a),i=(a,s)=>{let f=a[0];f.slice(-1)==="]"&&(f=f.slice(0,-1));let l={};return a.length===1?l[f]=o(s):(a.shift(),l[f]=i(a,s)),l},c=t.serializeArray();for(let a of c){let s=a.value,f=a.name.split("["),l=i(f,s);Object.assign(r,l)}return r},confirmType:(e,t)=>e==="number"?/^\d+$/.test(t.toString()):e==="email"?/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t.toString().toLowerCase()):!0,required:e=>e==null?"Required":void 0,minLength:(e,t=1)=>!e||e.length<t?"Must Enter a Value":void 0,maxLength:(e,t=10)=>e.length>t?"Exceeds Max Length":void 0,maxPhoneNumber:(e,t=10)=>e.toString().length>t?"Exceeds Max Length":void 0,isNumeric:e=>!Number.isNaN(e),isEmail:e=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e.toString().toLowerCase()),pattern:e=>{let t=e.target;if(!(t.type&&t.value))return;let r;switch(t.type){case"text":case"password":r=/^[a-zA-Z0-9.\- !$@]+$/;break;case"email":r=/^([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6})*$/;break;case"number":r=/^[0-9\-+]*$/;break;case"tel":r=/^[0-9\s()\-+]*$/;break;default:return}t.value.match(r)||(t.value=t.value.slice(0,-1),e.preventDefault())},noSpecialChars:e=>{let t=e.target,r=t.value.trim(),n=/[^\w\s]/gi;r.length>2&&(t.value=r.replace(n,""))},table:(e,t,r)=>{let n=e[0]||7,o=e[1]||24,i=a=>String(a).replace(/[&<>"']/g,s=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[s]||s),c=`<form id='${i(t)}'>`;c+="<div class='table'>",c+="<div class='title'>";for(let a=1;a<=n;a++)c+=`<span>${a}</span>`;c+="</div>";for(let a=1;a<=o;a++){c+=`<div class='row'><span>${a}</span>`;for(let s=1;s<=n;s++)c+=`<input name='data[${s}][${a}]' tabindex='${s.toString().padStart(2,"0")}${a.toString().padStart(2,"0")}' type='number' onclick="this.select()" value='${Math.floor(Math.random()*100)}' title='${i(s)} to ${i(a)}' />`;c+="</div>"}c+="</div>",c+="</form>",r&&(r.innerHTML=c)},sanitize:e=>{if(e)return e.replace(/[^\w ]/g,"").replace(/[&/\\#, +()$~%.'":*?<>{}]/g,"")}};dphelper?.setDescription(un,pn);var xn={name:"format",active:!0,subCommand:[{name:"currency",version:"0.0.2",example:"dphelper.format.currency(value, locale, currency)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Format a number as currency.",env:"both",subCommand:[]},{name:"phoneNumber",version:"0.0.2",example:"dphelper.format.phoneNumber(value, countryCode)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Format a string as a phone number.",env:"both",subCommand:[]}]},fn={currency:(e,t="en-US",r="USD")=>new Intl.NumberFormat(t,{style:"currency",currency:r}).format(e),phoneNumber:(e,t="US")=>{let r=`${e}`.replace(/\D/g,""),n;return t==="US"&&(n=r.match(/^(\d{3})(\d{3})(\d{4})$/),n)?`(${n[1]}) ${n[2]}-${n[3]}`:e}};dphelper?.setDescription(xn,fn);var mn={name:"json",active:!0,subCommand:[{name:"counter",version:"0.0.2",example:"dphelper.json.counter()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Count occurrences of a key-value pair in a JSON object.",env:"both",subCommand:[]},{name:"toCsv",version:"0.0.2",example:"dphelper.json.toCsv()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Convert JSON data to CSV format.",env:"both",subCommand:[]},{name:"saveCsvAs",version:"0.0.2",example:"dphelper.json.saveCsvAs()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Save CSV data as a file.",env:"both",subCommand:[]},{name:"is",version:"0.0.2",example:"dphelper.json.is()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a string is valid JSON.",env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.json.parse()",author:"Dario Passariello",creationDate:"20241107",lastMod:"20241107",type:"function",active:!0,description:"Parse a JSON string.",env:"both",subCommand:[]},{name:"sanitize",version:"0.0.2",example:"dphelper.json.sanitize()",author:"Dario Passariello",creationDate:"20241107",lastMod:"20241107",type:"function",active:!0,description:"Sanitize a JSON string.",env:"both",subCommand:[]},{name:"sanitizeJsonValue",version:"0.0.2",example:"dphelper.json.sanitizeJsonValue()",author:"Dario Passariello",creationDate:"20241107",lastMod:"20241107",type:"function",active:!0,description:"Sanitize individual JSON values.",env:"both",subCommand:[]}]},hn={counter:(e,t,r)=>e?t&&r?e.items&&Array.isArray(e.items)?e.items.filter(n=>n[t]===r).length:Object.keys(e).length:0:null,toCsv:e=>{let t=e,r=(i,c)=>c===null?"":c,n=Object.keys(t[0]),o=t.map(i=>n.map(c=>JSON.stringify(i[c],r)).join(","));return o.unshift(n.join(",")),o.join(`\r
64
+ `)},saveCsvAs:(e,t)=>{let r=new Blob([e],{type:"text/csv;charset=utf-8;"}),n=document.createElement("a"),o=dphelper.date.dateTimeToString(new Date(Date.now())),i=`${t}_${o}.csv`,c=URL.createObjectURL(r);n.setAttribute("href",c),n.setAttribute("download",i),n.style.visibility="hidden",document.body.appendChild(n),n.click(),document.body.removeChild(n)},is:e=>{try{JSON.parse(e)}catch(t){return console.warn(t),!1}return!0},parse:e=>{try{return JSON.parse(e)}catch(t){return console.warn(t),"Json not parsable"}},sanitize:e=>e?"{"+e.trim().replace(/^\{/,"").replace(/\}$/,"").split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/).map(o=>{let[i,...c]=o.split(":"),a=dphelper.json.sanitizeJsonValue(i?.trim()??"");if(!i)return"";let s=c.join(":");return s?(s=s.trim(),s==="null"?s='""':s==="true"||s==="false"?s=`"${s}"`:/^\d+$/.test(s)?s=`"${s}"`:s=dphelper.json.sanitizeJsonValue(s)):s='""',`${a}:${s}`}).filter(o=>o!=="").join(",")+"}":"{}",sanitizeJsonValue:e=>e?`"${e.replace(/^"(.*)"$/,"$1").replace(/\\/g,"").replace(/\//g,"/").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/"/g,'\\"').replace(/\t/g," ").trim()}"`:'""'};dphelper?.setDescription(mn,hn);var vn={name:"load",active:!0,subCommand:[{name:"all",version:"0.0.3",example:"dphelper.load.all(import.meta.glob('./Scripts/*.ts', { eager: true }))",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260228",type:"function",active:!0,description:"Load all files from a glob object (Vite/esbuild) or require context. If you add a 'cacheName', the list is stored in cache.",env:"client",subCommand:[]},{name:"file",version:"0.0.2",example:"dphelper.load.file(filePath)",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Load a specific file.",env:"client",subCommand:[]},{name:"fileToElement",version:"0.0.2",example:"dphelper.load.fileToElement(filePath, elementSelector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Load a file and insert its content into an element.",env:"client",subCommand:[]},{name:"script",version:"0.0.2",example:"dphelper.load.script(scripts, elementSelector)",author:"Dario Passariello",creationDate:"20240525",lastMod:"20240525",type:"function",active:!0,description:"Append script tags to an element.",env:"client",subCommand:[]},{name:"toJson",version:"0.0.3",example:"dphelper.load.toJson(import.meta.glob('./router/*.ts', { eager: true }), 'router')",author:"Dario Passariello",creationDate:"20250101",lastMod:"20260228",type:"function",active:!0,description:"Create JSON from folder recursion using glob object.",env:"client",subCommand:[]}]},bn={all:(e,t="")=>{if(e){if(t&&!window[t]&&(window[t]=[]),typeof e=="object"&&!e.keys){for(let r in e)t&&window[t].push(r);return}if(typeof e=="function"&&e.keys)for(let r of e.keys())t&&window[t].push(r),e(r)}},file:()=>null,fileToElement:async(e,t)=>{try{let r=await dphelper.load.file(t),n=document.querySelector(e);n?n.innerHTML=dphelper.sanitize.html(r):console.error(`Element not found: ${e}`)}catch(r){console.error("Error loading file to element:",r)}},script:(e,t="html")=>{let r=document.querySelector(t);if(!r){console.error(`Element not found: ${t}`);return}for(let n of e){let o=document.createElement("script");o.src=n,o.async=!0,o.defer=!0,r.appendChild(o)}},toJson:(e,t="")=>{let r={};if(e){if(t&&(r[t]=[]),typeof e=="object"&&!e.keys)for(let n in e)t&&r[t]&&r[t].push(n);else if(typeof e=="function"&&e.keys)for(let n of e.keys())t&&r[t]&&r[t].push(n),e(n);!t||!r[t]||Object.defineProperty(window,t,{value:dphelper.array.pathToJson(r[t]),writable:!1,enumerable:!1,configurable:!1})}}};dphelper?.setDescription?.(vn,bn);var gn={name:"logging",active:!0,subCommand:[{name:"list",version:"0.0.2",example:"dphelper.log.list()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"List all log entries.",env:"both",subCommand:[]},{name:"reg",version:"0.0.2",example:"dphelper.log.reg('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log a regular message.",env:"both",subCommand:[]},{name:"debug",version:"0.0.2",example:"dphelper.log.debug('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log a debug message.",env:"both",subCommand:[]},{name:"error",version:"0.0.2",example:"dphelper.log.error('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log an error message.",env:"both",subCommand:[]}]},Ce={log:[]},yn={list:()=>Ce.log,reg:e=>Ce.log.push({type:"reg",message:e}),debug:e=>Ce.log.push({type:"debug",message:e}),error:e=>Ce.log.push({type:"error",message:e})};Object.defineProperty(Ce,"log",{writable:!1,enumerable:!1,configurable:!1});dphelper?.setDescription(gn,yn);var Dn={name:"math",active:!0,subCommand:[{name:"rnd",version:"0.0.2",example:"dphelper.math.rnd()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Generate a random number.",env:"both",subCommand:[]},{name:"tmr",version:"0.0.2",example:"dphelper.math.tmr()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Measure the time taken by a function.",env:"both",subCommand:[]},{name:"isOdd",version:"0.0.2",example:"dphelper.math.isOdd(a)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a number is odd.",env:"both",subCommand:[]},{name:"percent",version:"0.0.2",example:"dphelper.math.percent([n, tot])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculate the percentage of a number relative to a total. Example: total: 100, number: 25 -> 25%",env:"both",subCommand:[]},{name:"isPrime",version:"0.0.2",example:"dphelper.math.isPrime(a)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a number is prime.",env:"both",subCommand:[]}]},Cn={rnd:()=>Math.floor(1e5+Math.random()*dphelper.math.tmr()),tmr:()=>Math.round(dphelper.date.epoch()/1e3),isOdd:e=>Number(e)%2!==0,percent:(e,t)=>{if(t===0)throw new Error("Total cannot be zero");return Number(e)/Number(t)*100},isPrime:e=>{if(Number(e)<=1)return!1;for(let t=2;t<=Math.sqrt(Number(e));t++)if(Number(e)%t===0)return!1;return!0}};dphelper?.setDescription(Dn,Cn);var En={name:"memory",active:!0,subCommand:[{name:"lock",version:"0.0.2",example:"dphelper.memory.lock('state[key]')",author:"Dario Passariello",creationDate:"20230101",lastMod:"20230111",type:"function",active:!0,description:"Lock a state",env:"client",subCommand:[]},{name:"unlock",version:"0.0.2",example:"dphelper.memory.unlock('state[key]')",author:"Dario Passariello",creationDate:"20230101",lastMod:"20230111",type:"function",active:!0,description:"Unlock a state",env:"client",subCommand:[]}]},An={lock:e=>{if(!e)return;let t=window,r=e.split(".");if(r.length<2)return;let n=r[0],o=r[1];if(!n||!o)return;let i=t[n];i&&Object.defineProperty(i,o,{writable:!1,configurable:!1})},unlock:e=>{if(!e)return;let t=window,r=e.split(".");if(r.length<2)return;let n=r[0],o=r[1];if(!n||!o)return;let i=t[n];if(i)try{Object.defineProperty(i,o,{writable:!0,configurable:!0})}catch{}}};dphelper?.setDescription(En,An);var Bn={name:"navigation",active:!0,subCommand:[{name:"ajax",version:"0.0.2",example:"dphelper.navigation.ajax()",author:"Dario Passariello",creationDate:"20260223",lastMod:"20260223",type:"function",active:!0,description:"Vanilla AJAX Single Page Application (SPA) navigation engine.",env:"client",subCommand:[]},{name:"load",version:"0.0.1",example:"dphelper.navigation.load('/home')",author:"Dario Passariello",creationDate:"20260223",lastMod:"20260223",type:"function",active:!0,description:"Loads a page via AJAX and injects it into the body.",env:"client",subCommand:[]}]},wn={load:async e=>{let r=document.body,n=e.startsWith("/")?e.split("/")[1]||"home":e;if((!n||n==="")&&(n="home"),!document.querySelector(".loader")){let o=document.createElement("div");o.className="loader",o.innerHTML="<i></i>",o.style.opacity="0",o.style.transition="opacity 1000ms",r.appendChild(o),setTimeout(()=>o.style.opacity="1",10)}try{let o=await fetch(`${n}/`);if(!o.ok)throw new Error("Page not found");let i=await o.text(),c=i.match(/<body[^>]*>([\s\S]*)<\/body>/i),a=c?c[1]:i,s=x=>{let d=document.createElement("div");return d.textContent=x,d.innerHTML},f=dphelper?.sanitize?.html?dphelper.sanitize.html(a||""):s(a||"");r.innerHTML=f,window.scrollTo({top:0,behavior:"smooth"}),document.title=n.charAt(0).toUpperCase()+n.slice(1);let l=dphelper.path.rail();l&&l.length>0&&(r.className=r.className.replace(/path-\w+/g,"").trim(),r.classList.add(`path-${l[l.length-1]}`)),globalThis.dphelper.navigation.ajax_running&&dphelper.navigation.ajax()}catch(o){console.error("Navigation error:",o);let i=window.location.origin;e.startsWith("/")&&!e.startsWith("//")&&!e.match(/^[a-zA-Z]:/)&&new URL(e,i).href.startsWith(i)&&(window.location.href=e)}},_bind:e=>{document.querySelectorAll(e).forEach(r=>{let n=r.getAttribute("href");if(!n||!n.startsWith("/")||n.includes("#"))return;let o=r.cloneNode(!0);r.parentNode?.replaceChild(o,r),o.addEventListener("mouseup",i=>{let c=o.getAttribute("data-href")||n;history.pushState({href:c},"",c),dphelper.navigation.load(c),o.removeAttribute("href"),i.stopPropagation()})})},ajax:()=>{if(globalThis.dphelper.navigation.ajax_running){dphelper.navigation._bind("a");return}globalThis.dphelper.navigation.ajax_running=!0,window.onpopstate=()=>dphelper.navigation.load(window.location.pathname),dphelper.navigation._bind("a"),globalThis.dp_hash_listener_set||(window.addEventListener("hashchange",()=>{let e=window.location.hash.substring(1);e&&document.getElementById(e)?.scrollIntoView({behavior:"smooth"})}),globalThis.dp_hash_listener_set=!0)}};dphelper?.setDescription(Bn,wn);var Fn={name:"obj",active:!0,subCommand:[{name:"replaceNullObjects",version:"0.0.2",example:"dphelper.obj.replaceNullObjects([obj])",description:"Replace null values in an object with empty objects.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"serialize",version:"0.0.2",example:"dphelper.obj.serialize([obj])",description:"Serialize an object to a JSON string.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"deSerialize",version:"0.0.2",example:"dphelper.obj.deSerialize([obj])",description:"Deserialize a JSON string to an object.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"toXML",version:"0.0.2",example:"dphelper.obj.toXML([obj])",description:"Convert an object to an XML string.",author:"Dario Passariello",creationDate:"20240315",lastMod:"20240315",type:"function",active:!0,env:"both",subCommand:[]},{name:"updateByKey",version:"0.0.2",example:"dphelper.obj.updateByKey([obj, key, newValue])",description:"Update an object's property by key.",author:"Dario Passariello",creationDate:"20240929",lastMod:"20240929",type:"function",active:!0,env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.obj.parse(val)",description:"Check if value is an object or another type. Return object after parse or a different type. Used instead of JSON.parse to avoid crash.",author:"Dario Passariello",creationDate:"20241027",lastMod:"20240927",type:"function",active:!0,env:"both",subCommand:[]},{name:"diff",version:"0.0.2",example:"dphelper.obj.diff([obj1, obj2])",description:"Show the differences between two objects.",author:"Dario Passariello",creationDate:"20250101",lastMod:"20250101",type:"function",active:!0,env:"both",subCommand:[]},{name:"setProps",version:"0.0.2",example:"dphelper.obj.setProps( [object], {options} )",author:"Dario Passariello",creationDate:"20251224",lastMod:"20251224",type:"function",active:!0,description:"Set properties of an object.",env:"both",subCommand:[]}]},Sn={replaceNullObjects:e=>{let t={...e};for(let r of Object.keys(e))t[r]===null&&(t[r]="")},serialize:e=>{if(typeof e=="function")return e.toString();if(typeof e=="object"){let t={};for(let[r,n]of Object.entries(e))t[r]=dphelper.obj.serialize(n);return t}return e},deSerialize:e=>{if(typeof e=="object"){let t={};for(let[r,n]of Object.entries(e))t[r]=dphelper.obj.deSerialize(n);return t}return e},sort:e=>Object.keys(e).sort().reduce((t,r)=>(t[r]=e[r],t),{}),toXML:e=>{let t=(r,n="")=>{let o="";for(let i in r)if(Object.hasOwn(r,i)){let c=r[i];typeof c=="object"&&c!==null?o+=`${n}<${i}>
65
65
  ${t(c,`${n} `)}${n}</${i}>
66
66
  `:o+=`${n}<${i}>${c}</${i}>
67
- `}return o};return t(e)},updateByKey:(e,t,r)=>(Object.hasOwn(e,t)&&(e[t]=r),e),parse:e=>{try{return JSON.parse(e)}catch(t){return console.error(t),e}},isObject:e=>typeof e=="object"&&e!==null,diff:(e,t)=>{let r={};for(let n in e)Object.hasOwn(e,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});for(let n in t)Object.hasOwn(t,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});return r},path:(e,t,r=".")=>t.concat(e).join(r),setProps:(e,t)=>{Reflect.ownKeys(e).forEach(n=>{let o=Object.getOwnPropertyDescriptor(e,n);o&&(o.enumerable=t?.enumerable??!0,o.configurable=t?.configurable??!0,o.writable=t?.writable??!0,Object.defineProperty(e,n,o)),typeof e[n]=="object"&&e[n]!==null&&dphelper.obj.setProps(e[n],t)})}};dphelper?.setDescription(En,An);var Bn={name:"path",active:!0,subCommand:[{name:"rail",version:"0.0.2",example:"dphelper.path.rail()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the path segments from the current URL.",env:"both",subCommand:[]},{name:"hash",version:"0.0.2",example:"dphelper.path.hash([hashUrl])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the hash from a URL.",env:"both",subCommand:[]},{name:"query",version:"0.0.2",example:"dphelper.path.query([queryString])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20250513",type:"function",active:!0,description:"Extract the query parameters from a URL.",env:"both",subCommand:[]}]},wn={rail:()=>(location.href.split("?")[0]||"").replace(location.protocol,"").replace(location.host,"").replace(location.hash,"").split("/").filter(t=>t),hash:()=>{let e=location.hash.replace("#","").split("/");return e.length?e.filter(t=>t):["empty"]},query:()=>{let e=location.search.substring(1);return JSON.parse(`{"${decodeURI(e).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')}"}`)}};dphelper?.setDescription(Bn,wn);var Fn={name:"promise",active:!0,subCommand:[{name:"check",version:"0.0.2",example:"dphelper.promise.check(promise)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value is a Promise.",env:"both",subCommand:[]}]},Sn={check:e=>e!=null&&(e instanceof Promise||Object.prototype.toString.call(e)==="[object Promise]"||typeof e=="object"&&typeof e.then=="function")};dphelper?.setDescription(Fn,Sn);var kn={name:"sanitize",active:!0,subCommand:[{name:"html",version:"0.0.2",example:"dphelper.sanitize.html([html])",author:"Dario Passariello",creationDate:"20241204",lastMod:"20241204",type:"function",active:!0,description:"Sanitize HTML by escaping special characters.",env:"both",subCommand:[]}]},_n={html:e=>typeof e!="string"?"":e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&#x2F;")};dphelper?.setDescription(kn,_n);var ke="dphelper_popup_positions",Ut=(e,t,r,n)=>`${e}x${t}@${r},${n}`,_e=()=>{let e=[];return e.push({id:"primary",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0}),window.screenLeft!==void 0&&window.screenTop!==void 0&&(window.screenLeft>0||window.screenTop>0)&&e.push({id:`secondary_${Date.now()}`,width:window.innerWidth,height:window.innerHeight,left:window.screenLeft,top:window.screenTop,isPrimary:!1}),e},Et=(e,t)=>{let r=_e();for(let i of r)if(e>=i.left&&e<i.left+i.width&&t>=i.top&&t<i.top+i.height)return i;if(!r.length)return{id:"default",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0};let n=r[0],o=1/0;for(let i of r){let c=i.left+i.width/2,a=i.top+i.height/2,s=Math.sqrt(Math.pow(c-e,2)+Math.pow(a-t,2));s<o&&(o=s,n=i)}return n},Mn=(e,t,r)=>({relX:e-r.left,relY:t-r.top}),Pn=(e,t,r)=>({left:r.left+e,top:r.top+t}),Tn=(e,t)=>{if(typeof window>"u")return;let r=t||window,n=r.screenX||r.screenLeft||0,o=r.screenY||r.screenTop||0,i=r.outerWidth||800,c=r.outerHeight||600,a=_e(),s=Et(n,o),{relX:f,relY:l}=Mn(n,o,s),x=Ut(s.width,s.height,s.left,s.top),d=Me();d.monitors=a,d.popups[e]={id:e,monitorId:s.id,left:f,top:l,width:i,height:c,monitorFingerprint:x},localStorage.setItem(ke,JSON.stringify(d))},qn=e=>{if(typeof window>"u")return null;let t=Me(),r=t.popups[e];if(!r)return null;let n=_e(),o=n.find(s=>Ut(s.width,s.height,s.left,s.top)===r.monitorFingerprint),i;o?i=o:(console.warn(`[dphelper] Monitor changed, restoring popup "${e}" on closest available monitor`),i=Et(r.left+(n[0]?.left||0),r.top+(n[0]?.top||0)));let{left:c,top:a}=Pn(r.left,r.top,i);return{left:c,top:a,width:r.width,height:r.height}},Hn=e=>{let t=Me();delete t.popups[e],localStorage.setItem(ke,JSON.stringify(t))},On=()=>Me().popups,Rn=()=>Et(window.screenX||0,window.screenY||0),Ln=()=>{localStorage.removeItem(ke)},Me=()=>{try{let e=localStorage.getItem(ke);if(e)return JSON.parse(e)}catch(e){console.warn("[dphelper] Failed to parse popup storage:",e)}return{monitors:[],popups:{}}},se={save:Tn,restore:qn,remove:Hn,list:On,clear:Ln,getMonitors:_e,getCurrentMonitor:Rn};var jn={name:"screen",active:!0,subCommand:[{name:"popup",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Manage popup windows positions across monitor changes.",env:"client",subCommand:[{name:"save",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Save popup position with monitor fingerprint",env:"client",subCommand:[]},{name:"restore",version:"0.0.1",example:"dphelper.screen.popup.restore('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Restore popup position (auto-adjusts if monitor changed)",env:"client",subCommand:[]},{name:"remove",version:"0.0.1",example:"dphelper.screen.popup.remove('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Remove saved popup position",env:"client",subCommand:[]},{name:"list",version:"0.0.1",example:"dphelper.screen.popup.list()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"List all saved popup positions",env:"client",subCommand:[]},{name:"getCurrentMonitor",version:"0.0.1",example:"dphelper.screen.popup.getCurrentMonitor()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Get current monitor info",env:"client",subCommand:[]},{name:"clear",version:"0.0.1",example:"dphelper.screen.popup.clear()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Clear all saved popup positions",env:"client",subCommand:[]}]},{name:"fullScreen",version:"0.0.2",example:"dphelper.screen.fullScreen([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Enter full screen mode for a given element.",env:"client",subCommand:[]},{name:"toggle",version:"0.0.2",example:"dphelper.screen.toggle([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Toggle full screen mode for a given element.",env:"client",subCommand:[]}]},zn={fullScreen:e=>{let t=document.querySelector(e);t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},toggle:e=>{let t=document,r=t.querySelector(e);r?t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement?t.exitFullscreen?t.exitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.msExitFullscreen&&t.msExitFullscreen():r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen():r.msRequestFullscreen&&r.msRequestFullscreen():console.error(`Element not found: ${e}`)},info:()=>({width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth}),popup:{save:(e,t)=>{se.save(e,t)},restore:e=>se.restore(e),remove:e=>{se.remove(e)},list:()=>se.list(),getCurrentMonitor:()=>se.getCurrentMonitor(),clear:()=>{se.clear()}}};dphelper?.setDescription(jn,zn);var Nn={name:"scrollbar",active:!0,subCommand:[{name:"custom",version:"0.0.2",example:"dphelper.scrollbar.custom(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Apply custom styles to the scrollbar for the selected elements.",env:"client",subCommand:[]},{name:"indicator",version:"0.0.2",example:"dphelper.scrollbar.indicator(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Add a scroll indicator to the selected elements.",env:"client",subCommand:[]},{name:"position.get",version:"0.0.2",example:"dphelper.scrollbar.position.get(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Get the current scroll position of the selected elements.",env:"client",subCommand:[]},{name:"position.set",version:"0.0.2",example:"dphelper.scrollbar.position.set(selector, position)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Set the scroll position of the selected elements.",env:"client",subCommand:[]},{name:"smooth",version:"0.0.2",example:"dphelper.scrollbar.smooth(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Smoothly scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]},{name:"scrollTo",version:"0.0.2",example:"dphelper.scrollbar.scrollTo(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]}]},$n={custom:(e,t)=>{t.color_1=t?.color_1||"black",t.color_1_hover=t?.color_1_hover||"black",t.color_2=t?.color_2||"transparent",t.color_3=t?.color_3||"rgba(30,150,255,.5)",t.type=t?.type||"thin",t.behavior=t?.behavior||"smooth",t.width=t?.width||"16px",t.height=t?.height||"16px",t.rounded=t?.rounded||"10px",t.margin=t?.margin||0,t.border=t?.border||"5px",t.opacity=t?.opacity||1;let r=` ${e}::-webkit-scrollbar {
67
+ `}return o};return t(e)},updateByKey:(e,t,r)=>(Object.hasOwn(e,t)&&(e[t]=r),e),parse:e=>{try{return JSON.parse(e)}catch(t){return console.error(t),e}},isObject:e=>typeof e=="object"&&e!==null,diff:(e,t)=>{let r={};for(let n in e)Object.hasOwn(e,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});for(let n in t)Object.hasOwn(t,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});return r},path:(e,t,r=".")=>t.concat(e).join(r),setProps:(e,t)=>{Reflect.ownKeys(e).forEach(n=>{let o=Object.getOwnPropertyDescriptor(e,n);o&&(o.enumerable=t?.enumerable??!0,o.configurable=t?.configurable??!0,o.writable=t?.writable??!0,Object.defineProperty(e,n,o)),typeof e[n]=="object"&&e[n]!==null&&dphelper.obj.setProps(e[n],t)})}};dphelper?.setDescription(Fn,Sn);var kn={name:"path",active:!0,subCommand:[{name:"rail",version:"0.0.2",example:"dphelper.path.rail()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the path segments from the current URL.",env:"both",subCommand:[]},{name:"hash",version:"0.0.2",example:"dphelper.path.hash([hashUrl])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the hash from a URL.",env:"both",subCommand:[]},{name:"query",version:"0.0.2",example:"dphelper.path.query([queryString])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20250513",type:"function",active:!0,description:"Extract the query parameters from a URL.",env:"both",subCommand:[]}]},_n={rail:()=>(location.href.split("?")[0]||"").replace(location.protocol,"").replace(location.host,"").replace(location.hash,"").split("/").filter(t=>t),hash:()=>{let e=location.hash.replace("#","").split("/");return e.length?e.filter(t=>t):["empty"]},query:()=>{let e=location.search.substring(1);return JSON.parse(`{"${decodeURI(e).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')}"}`)}};dphelper?.setDescription(kn,_n);var Mn={name:"promise",active:!0,subCommand:[{name:"check",version:"0.0.2",example:"dphelper.promise.check(promise)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value is a Promise.",env:"both",subCommand:[]}]},Pn={check:e=>e!=null&&(e instanceof Promise||Object.prototype.toString.call(e)==="[object Promise]"||typeof e=="object"&&typeof e.then=="function")};dphelper?.setDescription(Mn,Pn);var Tn={name:"sanitize",active:!0,subCommand:[{name:"html",version:"0.0.2",example:"dphelper.sanitize.html([html])",author:"Dario Passariello",creationDate:"20241204",lastMod:"20241204",type:"function",active:!0,description:"Sanitize HTML by escaping special characters.",env:"both",subCommand:[]}]},qn={html:e=>typeof e!="string"?"":e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&#x2F;")};dphelper?.setDescription(Tn,qn);var _e="dphelper_popup_positions",Gt=(e,t,r,n)=>`${e}x${t}@${r},${n}`,Me=()=>{let e=[];return e.push({id:"primary",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0}),window.screenLeft!==void 0&&window.screenTop!==void 0&&(window.screenLeft>0||window.screenTop>0)&&e.push({id:`secondary_${Date.now()}`,width:window.innerWidth,height:window.innerHeight,left:window.screenLeft,top:window.screenTop,isPrimary:!1}),e},At=(e,t)=>{let r=Me();for(let i of r)if(e>=i.left&&e<i.left+i.width&&t>=i.top&&t<i.top+i.height)return i;if(!r.length)return{id:"default",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0};let n=r[0],o=1/0;for(let i of r){let c=i.left+i.width/2,a=i.top+i.height/2,s=Math.sqrt(Math.pow(c-e,2)+Math.pow(a-t,2));s<o&&(o=s,n=i)}return n},Hn=(e,t,r)=>({relX:e-r.left,relY:t-r.top}),Ln=(e,t,r)=>({left:r.left+e,top:r.top+t}),jn=(e,t)=>{if(typeof window>"u")return;let r=t||window,n=r.screenX||r.screenLeft||0,o=r.screenY||r.screenTop||0,i=r.outerWidth||800,c=r.outerHeight||600,a=Me(),s=At(n,o),{relX:f,relY:l}=Hn(n,o,s),x=Gt(s.width,s.height,s.left,s.top),d=Pe();d.monitors=a,d.popups[e]={id:e,monitorId:s.id,left:f,top:l,width:i,height:c,monitorFingerprint:x},localStorage.setItem(_e,JSON.stringify(d))},On=e=>{if(typeof window>"u")return null;let t=Pe(),r=t.popups[e];if(!r)return null;let n=Me(),o=n.find(s=>Gt(s.width,s.height,s.left,s.top)===r.monitorFingerprint),i;o?i=o:(console.warn(`[dphelper] Monitor changed, restoring popup "${e}" on closest available monitor`),i=At(r.left+(n[0]?.left||0),r.top+(n[0]?.top||0)));let{left:c,top:a}=Ln(r.left,r.top,i);return{left:c,top:a,width:r.width,height:r.height}},Rn=e=>{let t=Pe();delete t.popups[e],localStorage.setItem(_e,JSON.stringify(t))},zn=()=>Pe().popups,Nn=()=>At(window.screenX||0,window.screenY||0),In=()=>{localStorage.removeItem(_e)},Pe=()=>{try{let e=localStorage.getItem(_e);if(e)return JSON.parse(e)}catch(e){console.warn("[dphelper] Failed to parse popup storage:",e)}return{monitors:[],popups:{}}},ce={save:jn,restore:On,remove:Rn,list:zn,clear:In,getMonitors:Me,getCurrentMonitor:Nn};var $n={name:"screen",active:!0,subCommand:[{name:"popup",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Manage popup windows positions across monitor changes.",env:"client",subCommand:[{name:"save",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Save popup position with monitor fingerprint",env:"client",subCommand:[]},{name:"restore",version:"0.0.1",example:"dphelper.screen.popup.restore('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Restore popup position (auto-adjusts if monitor changed)",env:"client",subCommand:[]},{name:"remove",version:"0.0.1",example:"dphelper.screen.popup.remove('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Remove saved popup position",env:"client",subCommand:[]},{name:"list",version:"0.0.1",example:"dphelper.screen.popup.list()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"List all saved popup positions",env:"client",subCommand:[]},{name:"getCurrentMonitor",version:"0.0.1",example:"dphelper.screen.popup.getCurrentMonitor()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Get current monitor info",env:"client",subCommand:[]},{name:"clear",version:"0.0.1",example:"dphelper.screen.popup.clear()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Clear all saved popup positions",env:"client",subCommand:[]}]},{name:"fullScreen",version:"0.0.2",example:"dphelper.screen.fullScreen([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Enter full screen mode for a given element.",env:"client",subCommand:[]},{name:"toggle",version:"0.0.2",example:"dphelper.screen.toggle([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Toggle full screen mode for a given element.",env:"client",subCommand:[]}]},Wn={fullScreen:e=>{let t=document.querySelector(e);t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},toggle:e=>{let t=document,r=t.querySelector(e);r?t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement?t.exitFullscreen?t.exitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.msExitFullscreen&&t.msExitFullscreen():r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen():r.msRequestFullscreen&&r.msRequestFullscreen():console.error(`Element not found: ${e}`)},info:()=>({width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth}),popup:{save:(e,t)=>{ce.save(e,t)},restore:e=>ce.restore(e),remove:e=>{ce.remove(e)},list:()=>ce.list(),getCurrentMonitor:()=>ce.getCurrentMonitor(),clear:()=>{ce.clear()}}};dphelper?.setDescription($n,Wn);var Un={name:"scrollbar",active:!0,subCommand:[{name:"custom",version:"0.0.2",example:"dphelper.scrollbar.custom(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Apply custom styles to the scrollbar for the selected elements.",env:"client",subCommand:[]},{name:"indicator",version:"0.0.2",example:"dphelper.scrollbar.indicator(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Add a scroll indicator to the selected elements.",env:"client",subCommand:[]},{name:"position.get",version:"0.0.2",example:"dphelper.scrollbar.position.get(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Get the current scroll position of the selected elements.",env:"client",subCommand:[]},{name:"position.set",version:"0.0.2",example:"dphelper.scrollbar.position.set(selector, position)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Set the scroll position of the selected elements.",env:"client",subCommand:[]},{name:"smooth",version:"0.0.2",example:"dphelper.scrollbar.smooth(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Smoothly scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]},{name:"scrollTo",version:"0.0.2",example:"dphelper.scrollbar.scrollTo(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]}]},Gn={custom:(e,t)=>{t.color_1=t?.color_1||"black",t.color_1_hover=t?.color_1_hover||"black",t.color_2=t?.color_2||"transparent",t.color_3=t?.color_3||"rgba(30,150,255,.5)",t.type=t?.type||"thin",t.behavior=t?.behavior||"smooth",t.width=t?.width||"16px",t.height=t?.height||"16px",t.rounded=t?.rounded||"10px",t.margin=t?.margin||0,t.border=t?.border||"5px",t.opacity=t?.opacity||1;let r=` ${e}::-webkit-scrollbar {
68
68
  scroll-behavior: ${t.behavior};
69
69
  width: ${t.width};
70
70
  height: ${t.height};
@@ -128,8 +128,8 @@ ${t(c,`${n} `)}${n}</${i}>
128
128
  bottom:0;
129
129
  left:0;
130
130
  z-index:2
131
- `}if(!e.el&&r){r.style.width="0%";return}try{let n=document.querySelector(".scrollindicator");t.addEventListener("scroll",function(o){n.style.width="0%";let i=Number(this.scrollTop),c=Number(this.scrollHeight-this.clientHeight),a=Math.min(Math.max(i/c*100),100);n.style.width=`${a}%`,n.click()}),t.addEventListener("popstate",o=>{n.style.width=0})}catch(n){console.error(n);return}},position:{set:e=>{let t=typeof e=="string"?document.querySelector(e):e;if(!t)return;let r=[t.scrollTop,t.scrollLeft];r[0]!=null&&r[1]!=null&&localStorage.setItem(e,JSON.stringify(r))},get:e=>{if(localStorage.getItem(e))try{let t=localStorage.getItem(e),r=typeof e=="string"?document.querySelector(e):e;r&&t&&(r.scrollTop=t[0],r.scrollLeft=t[1])}catch(t){console.error("Error getting scroll position:",t)}}},smooth:(e,t,r)=>{e===document&&(e=document.scrollingElement||document.documentElement||document.body.parentNode||document.body);let n=!1,o=e.scrollTop,i=e===document.body&&document.documentElement?document.documentElement:e,c=l=>{l.preventDefault();let x=a(l);o+=-x*t,o=Math.max(0,Math.min(o,e.scrollHeight-i.clientHeight)),n||s()};e.addEventListener("mousewheel",c,{passive:!1}),e.addEventListener("DOMMouseScroll",c,{passive:!1});let a=l=>l.detail?l.wheelDelta?l.wheelDelta/l.detail/40*(l.detail>0?1:-1):-l.detail/3:l.wheelDelta/120,s=()=>{n=!0;let l=(o-e.scrollTop)/r;e.scrollTop+=l,Math.abs(l)>.5?f(s):n=!1},f=dphelper.window.animationframe()},scrollTo:(e,t,r=0)=>{let n=document.querySelector(e),o=document.querySelector(t);n&&o&&n.scrollTo({top:o.offsetTop-r,behavior:"smooth"})}};dphelper?.setDescription(Nn,$n);var ae=Er(er(),1),In={name:"security",active:!0,subCommand:[{name:"uuid",version:"0.0.2",example:"dphelper.security.uuid",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"UUID related commands",subCommand:[{name:"byVal",version:"0.0.2",example:"dphelper.security.uuid.byVal('string')",author:"Dario Passariello",creationDate:"20250101",lastMod:"20250101",type:"function",active:!0,description:"Generate a UUID based on a given string",env:"both",subCommand:[]},{name:"v4",version:"0.0.2",example:"dphelper.security.uuid.v4",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"return",active:!0,description:"Generate a random UUID v4",env:"both",subCommand:[]},{name:"v5",version:"0.0.2",example:"dphelper.security.uuid.v5",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"return",active:!0,description:"Generate a random UUID v5",env:"both",subCommand:[]}]},{name:"hashPass",description:"Generate a crypto digest SHA-1 starting from user and password values (Please, think about security before using SHA-1)",example:"dphelper.security.hashPass(user, password)",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"crypt",description:"Encrypt your message using a secret_key in a default format AES",example:"dphelper.security.crypt(data, secret_key, [optional mode])",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"deCrypt",description:"Decrypt your message using a secret_key in a default format AES",example:"dphelper.security.deCrypt(data, secret_key, [optional mode])",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"AES_KeyGen",description:"Generate a key based on the AES algorithm",example:"dphelper.security.AES_KeyGen(secret_key)",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"SHA256_Hex",description:"Generate a SHA256 hash in hexadecimal format",example:"dphelper.security.SHA256_Hex(secret_key)",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20250101",lastMod:"20250101",active:!0,env:"both",subCommand:[]},{name:"ulid",description:"Generate ULID code",example:"dphelper.security.ulid()",version:"0.0.2",type:"function",author:"mix",creationDate:"20250212",lastMod:"20250212",active:!0,env:"both",subCommand:[]},{name:"fingerprint",description:"Generate a unique browser fingerprint",example:"dphelper.security.fingerprint()",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20260220",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"saveEncrypted",description:"Save encrypted data to localStorage",example:"dphelper.security.saveEncrypted('key', 'value', 'secret')",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20260220",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"getEncrypted",description:"Retrieve and decrypt data from localStorage",example:"dphelper.security.getEncrypted('key', 'secret')",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20260220",lastMod:"20260220",active:!0,env:"both",subCommand:[]}]},tr=-1,V=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","J","K","M","N","P","Q","R","S","T","V","W","X","Y","Z"],Wn={uuid:{byVal:e=>{if(!e)return console.warn("You need to pass a value to obtain a fixed uuid"),"";let t=dphelper.security.SHA256_Hex(e);return[t.slice(0,8),t.slice(8,4),`4${t.slice(12,3)}`,`8${t.slice(15,3)}`,t.slice(18,12)].join("-")},v4:"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16)),v5:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(1))[0]:Math.floor(Math.random()*16);return(e==="x"?t:t&3|8).toString(16)})},hashPass:async(e,t,r="SHA-256")=>{let n=crypto.getRandomValues(new Uint8Array(16)),o=Array.from(n).map(f=>f.toString(16).padStart(2,"0")).join(""),i=new TextEncoder().encode(t.toLowerCase()+e.toLowerCase()+o),c=await crypto.subtle.digest(r,i),s=Array.from(new Uint8Array(c)).map(f=>f.toString(16).padStart(2,"0")).join("");return o+s},crypt:(e,t,r="AES")=>ae.default[r].encrypt(e,t).toString(),deCrypt:(e,t,r="AES")=>ae.default[r].decrypt(e,t).toString(ae.default.enc.Utf8),AES_KeyGen:e=>{let t=e||(typeof crypto<"u"?crypto.randomUUID():Math.random().toString(36).substring(2)),r=ae.default.lib.WordArray.random(128/8);return ae.default.PBKDF2(t,r,{keySize:512/32,iterations:1e4}).toString()},SHA256_Hex:e=>ae.default.SHA256(e).toString(ae.default.enc.Hex),ulid:()=>{let e=new Uint8Array(16),t=new DataView(e.buffer,0,6),r=new Uint8Array(e.buffer,6,10),n=new Array(26),o=c=>{n[0]=V[c[0]>>5],n[1]=V[c[0]>>0&31];for(let a=0;a<3;a++)n[a*8+2]=V[c[a*5+1]>>3],n[a*8+3]=V[(c[a*5+1]<<2|c[a*5+2]>>6)&31],n[a*8+4]=V[c[a*5+2]>>1&31],n[a*8+5]=V[(c[a*5+2]<<4|c[a*5+3]>>4)&31],n[a*8+6]=V[(c[a*5+3]<<1|c[a*5+4]>>7)&31],n[a*8+7]=V[c[a*5+4]>>2&31],n[a*8+8]=V[(c[a*5+4]<<3|c[a*5+5]>>5)&31],n[a*8+9]=V[c[a*5+5]>>0&31];return n.join("")},i=Date.now();if(i===tr)for(let c=9;c>=0&&!(r[c]!==void 0&&r[c]++<255);c--);else tr=i,t.setUint16(0,i/4294967296|0),t.setUint32(2,i|0),window.crypto.getRandomValues(r);return o(e)},fingerprint:()=>{let e=navigator,t=window.screen,r=document.createElement("canvas"),n=r.getContext("2d"),o="dphelper_fingerprint_v1",i="";n&&(r.width=200,r.height=30,n.textBaseline="top",n.font="14px 'Arial'",n.textBaseline="alphabetic",n.fillStyle="#f60",n.fillRect(125,1,62,20),n.fillStyle="#069",n.fillText(o,2,15),n.fillStyle="rgba(102, 204, 0, 0.7)",n.fillText(o,4,17),i=r.toDataURL());let c=[e.userAgent,e.language,t.colorDepth,t.width+"x"+t.height,new Date().getTimezoneOffset(),e.deviceMemory||"unknown",e.hardwareConcurrency||"unknown",i].join("|");return dphelper.security.SHA256_Hex(c)},saveEncrypted:(e,t,r)=>{let n=dphelper.security.crypt(t,r);localStorage.setItem(e,n)},getEncrypted:(e,t)=>{let r=localStorage.getItem(e);if(!r)return null;try{return dphelper.security.deCrypt(r,t)}catch(n){return console.warn("Decryption failed:",n),null}}};dphelper?.setDescription(In,Wn);var Un={name:"shortcut",active:!0,subCommand:[{name:"keys",version:"0.0.2",example:"dphelper.shortcut.keys([e, trigger])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Handle keyboard shortcuts.",env:"client",subCommand:[]}]},Gn={keys:(e,t)=>{let r=e.which?e.which:e.keyCode;t||(t={data:[{key:"83",ctrl:!0,active:!0,description:"CTRL+S",function:""},{key:"27",ctrl:!1,active:!0,description:"ESC",element:"",function:""},{key:"80",ctrl:!0,active:!0,description:"CTRL+P",element:"",function:"function(){ Print }"}]}),t.data&&t.data.map(n=>(e.ctrlKey||e.metaKey&&n.ctrl===!0)&&r===Number.parseInt(n.key)&&n.active===!0?(n.element&&n.element.click(),n.function?JSON.stringify(n.function):(e.preventDefault(),null)):null)}};dphelper?.setDescription(Un,Gn);var Q={ws:{}},Yn={name:"socket",active:!0,subCommand:[{name:"info",version:"0.0.2",example:"dphelper.socket.info(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Retrieve socket information",env:"client",subCommand:[]},{name:"start",version:"0.0.2",example:"dphelper.socket.start(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Start a socket connection",env:"client",subCommand:[]},{name:"conn",version:"0.0.2",example:"dphelper.socket.conn(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Manage socket connections",env:"client",subCommand:[]},{name:"connect",version:"0.0.2",example:"dphelper.socket.connect(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Connect to a socket",env:"client",subCommand:[]},{name:"open",version:"0.0.2",example:"dphelper.socket.open(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Open a socket connection",env:"client",subCommand:[]},{name:"send",version:"0.0.2",example:"dphelper.socket.send(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Send data through a socket",env:"client",subCommand:[]},{name:"receive",version:"0.0.2",example:"dphelper.socket.receive(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Receive data from a socket",env:"client",subCommand:[]},{name:"keepAlive",version:"0.0.2",example:"dphelper.socket.keepAlive(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Keep the socket connection alive",env:"client",subCommand:[]},{name:"check",version:"0.0.2",example:"dphelper.socket.check()",author:"Dario Passariello",creationDate:"2023-05-27",lastMod:"2023-05-27",type:"function",active:!0,description:"Check how many websocket connections are open",env:"client",subCommand:[]},{name:"list",version:"0.0.2",example:"dphelper.socket.list()",author:"Dario Passariello",creationDate:"2023-05-27",lastMod:"2023-05-27",type:"function",active:!0,description:"List all websocket connections in real-time",env:"client",subCommand:[]}]},Jn={info:()=>"Created by Dario Passariello",start:(e,t,r="general")=>{Q.ws={},dphelper.socket.connect(t,r),dphelper.socket.receive(e,r)},conn:(e,t,r)=>{if(!(e&&t)){console.debug("please use connect!");return}try{let n;try{n=new URL(t)}catch{if(!t.startsWith("/")&&!t.startsWith("ws")&&!t.startsWith("wss"))n=new URL(t,window.location.origin);else{console.error("Invalid WebSocket URL");return}}if(n.protocol==="ws:"){console.error("Insecure WebSocket protocol 'ws://' - must use 'wss://'");return}let o=new WebSocket(t);return o.binaryType="blob",o.onmessage=i=>{},[o,e,r]}catch(n){console.error(n);return}},connect:(e,t)=>{e&&dphelper.socket.open(dphelper.security.uuid.v5,e,t)},open:(e,t,r)=>{if(e)try{let n=dphelper.socket.conn(e,t,r);if(!n)return;Q.ws[r]=n,dphelper._list.sockets.indexOf(n[0])===-1&&dphelper._list.sockets.push(n[0]),n[0].onopen=()=>dphelper.log.reg(`${e} connected`),n[0].onclose=o=>dphelper.log.debug(o.wasClean?"Disconnected":`Connection break: ${o.reason||o.code}`),n[0].onerror=o=>dphelper.log?.error(o)}catch(n){console.error(n)}},send:(e,t,r)=>{if(Q.ws[r]?.[1]&&e)try{let n=Q.ws[r];if(!n)return;let o=n[0],i=n[1],c=t?`{"${t}":"(${i}:${e})"}`:e;o.send(c)}catch(n){console.error(n)}},ping:e=>{if(Q.ws[e]?.[1])try{Q.ws[e]?.[0]?.send('{"debug":"__ping__"}')}catch(t){console.error(t)}},receive:(e,t)=>{if(Q.ws[t]?.[1])try{let r=Q.ws[t],n=r[0];n.onmessage=async o=>{try{if(e){let i=typeof e=="string"?document.querySelector(e):e;if(i){let c=typeof o.data=="string"?o.data:await o.data.text(),a=JSON.parse(c),s=String(Object.values(a)[0]);i.textContent=s}}}catch{}dphelper.log.reg(o.data)}}catch(r){console.error(r)}},keepAlive:e=>{try{let t=Q.ws[e];if(!t)return;let r,n=t[0],o=(c=5e3)=>{r=setTimeout(()=>{dphelper.socket.ping(e)},c)},i=()=>clearTimeout(r);n.onopen=()=>setInterval(o,3e4),n.onmessage=c=>{try{Object.values(JSON.parse(c.data))[0]==="__ping__"&&i();return}catch(a){console.error(a)}}}catch(t){console.error(t)}},check:()=>{dphelper._list.sockets=dphelper._list.sockets.filter(e=>e.readyState!==WebSocket.CLOSED)},list:()=>dphelper._list.sockets};dphelper?.setDescription(Yn,Jn);dphelper?.socket?.check();var Kn={name:"sse",active:!0,subCommand:[{name:"open",version:"0.0.1",example:"dphelper.sse.open('/api/stream', { method: 'POST', body: ... })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Advanced Server-Sent Events client with POST and Custom Headers support.",env:"client",subCommand:[]}]},Zn={open:(e,t={})=>{let r={message:[],error:[],open:[]},n=new AbortController,o=(c,a)=>{r[c]?.forEach(s=>s(a))};return(async()=>{try{let c=await fetch(e,{...t,signal:n.signal,headers:{Accept:"text/event-stream",...t.headers||{}}});if(!c.ok)throw new Error(`SSE failed: ${c.statusText}`);o("open",{status:c.status});let a=c.body?.getReader(),s=new TextDecoder;if(!a)return;let f="";for(;;){let{done:l,value:x}=await a.read();if(l)break;f+=s.decode(x,{stream:!0});let d=f.split(`
132
- `);f=d.pop()||"";for(let h of d)if(h.startsWith("data:")){let m=h.replace("data:","").trim();try{(m.includes("[")||m.includes("{"))&&(m=JSON.parse(m))}catch{}o("message",m)}}}catch(c){c.name!=="AbortError"&&o("error",c)}})(),{on:(c,a)=>{r[c]&&r[c].push(a)},close:()=>n.abort()}}};dphelper?.setDescription(Kn,Zn);var Vn={name:"svg",active:!0,subCommand:[{name:"init",version:"0.0.2",example:"dphelper.svg.init(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Initializes an SVG connection between two elements.",env:"client",subCommand:[]},{name:"check",version:"0.0.2",example:"dphelper.svg.check(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Checks if SVG support is available.",env:"client",subCommand:[]},{name:"update",version:"0.0.2",example:"dphelper.svg.update(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Updates the SVG connection between two elements.",env:"client",subCommand:[]},{name:"getCurve",version:"0.0.2",example:"dphelper.svg.getCurve(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the curve of the connection between two points.",env:"client",subCommand:[]},{name:"getIntersection",version:"0.0.2",example:"dphelper.svg.getIntersection(...) ",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the intersection point between two elements.",env:"client",subCommand:[]},{name:"setConnector",version:"0.0.2",example:"dphelper.svg.setConnector(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Sets a connector on an element.",env:"client",subCommand:[]},{name:"removeConnection",version:"0.0.2",example:"dphelper.svg.removeConnection(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Removes an SVG connection from a container.",env:"client",subCommand:[]},{name:"makeScrollable",version:"0.0.2",example:"dphelper.svg.makeScrollable(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Makes an SVG container scrollable.",env:"client",subCommand:[]},{name:"makeDraggable",version:"0.0.2",example:"dphelper.svg.makeDraggable(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Makes an SVG element draggable.",env:"client",subCommand:[]},{name:"toggle",version:"0.0.2",example:"dphelper.svg.toggle(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Toggles an SVG connection on or off.",env:"client",subCommand:[]},{name:"convert",version:"0.0.2",example:"dphelper.svg.convert([Object])",author:"Dario Passariello",creationDate:"20190101",lastMod:"20240401",type:"function",active:!0,description:"Converts an element to SVG.",env:"client",subCommand:[]}]},Xn={init:(e,t,r,n)=>{e.querySelector("svg")&&dphelper.svg.removeConnection(e),t=[dphelper.svg.setConnector(t[0],t[1]),t[1]],r=[dphelper.svg.setConnector(r[0],r[1]),r[1]];let o=e.getBoundingClientRect(),i="http://www.w3.org/2000/svg",c=e.offsetWidth*10,a=e.offsetHeight*10,s=document.createElementNS(i,"svg"),f=`conn_${Math.random().toString(36).substring(2,9)}`;s.setAttribute("xmlns",i),s.dataset.dphelper="svg-connection",s.setAttributeNS(null,"viewBox","0 0 "+c+" "+a),s.setAttributeNS(null,"width",String(c)),s.setAttributeNS(null,"height",String(a)),s.style.display="block";let l=document.createElementNS(i,"rect"),x=t[0].getBoundingClientRect();l.setAttributeNS(null,"x",String(x.left-o.left)),l.setAttributeNS(null,"y",String(x.top-o.top)),l.setAttributeNS(null,"width",String(x.width)),l.setAttributeNS(null,"height",String(x.height)),s.appendChild(l);let d=document.createElementNS(i,"rect");x=r[0].getBoundingClientRect(),d.setAttributeNS(null,"x",String(x.left-o.left)),d.setAttributeNS(null,"y",String(x.top-o.top)),d.setAttributeNS(null,"width",String(x.width)),d.setAttributeNS(null,"height",String(x.height)),s.appendChild(d);let h=document.createElementNS(i,"path");h.setAttributeNS(null,"id",f),h.setAttributeNS(null,"marker-end","url(#head)"),s.appendChild(h),e.appendChild(s),dphelper.svg.update(l,d,h),typeof n=="function"&&n(t,r)},check:()=>!!(document.createElementNS&&document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),update:(e,t,r)=>{let n=Number.parseFloat(e.getAttribute("x")||"0"),o=Number.parseFloat(e.getAttribute("y")||"0"),i=Number.parseFloat(t.getAttribute("x")||"0"),c=Number.parseFloat(t.getAttribute("y")||"0"),a=Number.parseFloat(e.getAttribute("width")||"0")/2,s=Number.parseFloat(e.getAttribute("height")||"0")/2,f=Number.parseFloat(t.getAttribute("width")||"0")/2,l=Number.parseFloat(t.getAttribute("height")||"0")/2,x=n+a,d=o+s,h=i+f,m=c+l,v=h-x,b=m-d,u=dphelper.svg.getIntersection(v,b,x,d,a,s),p=dphelper.svg.getIntersection(-v,-b,h,m,f,l),y=p[0]-u[0],g=dphelper.svg.getCurve(u,p,y);r.setAttributeNS(null,"d","M"+x+","+d+g+h+","+m)},getCurve:(e,t,r)=>{let n=r/2;return" C"+(n+e[0])+","+e[1]+" "+(t[0]-n)+","+t[1]+" "},getIntersection:(e,t,r,n,o,i)=>Math.abs(t/e)<i/o?[r+(e>0?o:-o),n+t*o/Math.abs(e)]:[r+e*i/Math.abs(t),n+(t>0?i:-i)],setConnector:(e,t)=>{let r,n=document.createElement("span");switch(e.style.position="relative",n.style.position="absolute",n.style.width="5px",n.style.height="5px",t){case"top":r={left:"50%",top:"2.5px",marginLeft:"2.5px"};break;case"right":r={top:"50%",right:"2.5px",marginTop:"-2.5px"};break;case"bottom":r={left:"50%",bottom:"-2.5px",marginLeft:"2.5px"};break;case"left":r={top:"50%",left:"-2.5px",marginTop:"-2.5px"};break;default:r={}}return Object.assign(n.style,r),e.appendChild(n),n},removeConnection:e=>{e.querySelectorAll("svg[data-dphelper='svg-connection']").forEach(r=>r.remove())},makeScrollable:(e,t,r,n,o,i)=>{let c=e.getBoundingClientRect(),a=[r,n],s=a.length,f=[o,i],l=[];for(let v=0;v<s;v++){let b=a[v],u=f[v];!b||!u||(l[v]=b.getBoundingClientRect(),u.setAttributeNS(null,"x",String(l[v].left-c.left)),u.setAttributeNS(null,"y",String(l[v].top-c.top)),u.setAttributeNS(null,"width",String(l[v].width)),u.setAttributeNS(null,"height",String(l[v].height)))}let x=e.querySelectorAll("rect"),d=x[0],h=x[1],m=document.getElementById("connection");d&&h&&m&&dphelper.svg.update(d,h,m)},makeDraggable:e=>{let t=e.target;t.addEventListener("mousedown",i),t.addEventListener("mousemove",c),t.addEventListener("mouseup",a);function r(s){let f=t.getScreenCTM();return{x:(s.clientX-f.e)/f.a,y:(s.clientY-f.f)/f.d}}let n=null,o=null;function i(s){s.target.classList.contains("draggable")&&(n=s.target,o=r(s),o.x-=Number.parseFloat(n.getAttributeNS(null,"x")||"0"),o.y-=Number.parseFloat(n.getAttributeNS(null,"y")||"0"))}function c(s){if(n&&o){let f=r(s);n.setAttributeNS(null,"x",String(f.x-o.x)),n.setAttributeNS(null,"y",String(f.y-o.y)),dphelper.svg.update(n,n,document.getElementById("connection"))}}function a(){n=null,o=null}},toggle:(e,t,r,n)=>{let o=e.target;if(o.checked&&r&&n)dphelper.cookie.set({name:`${o.id}`,value:1,time:365}),dphelper.svg.init(t,[r,"right"],[n,"left"],(i,c)=>{let a=document.getElementById("parts-left-body");a&&a.addEventListener("scroll",()=>{dphelper.svg.makeScrollable(t,a,i,c,document.querySelector("#parts svg rect"),document.querySelectorAll("#parts svg rect")[1])})});else{dphelper.svg.removeConnection(t);let i=document.getElementById("parts-left-body");i&&i.replaceWith(i.cloneNode(!0)),dphelper.cookie.set({name:`${o.id}`,value:0,time:365})}},convert:({children:e,active:t=!0,size:r=[1920,1080],fit:n=["100%","100%"],preserveAspectRatio:o="none",style:i=`width:${n[0]}; height:${n[1]}`,zoom:c=1})=>{if(!e)return"Please pass ID of element for SVG conversion";if(t){let a=document.querySelector(e),s=a.cloneNode(!0),f=`
131
+ `}if(!e.el&&r){r.style.width="0%";return}try{let n=document.querySelector(".scrollindicator");t.addEventListener("scroll",function(o){n.style.width="0%";let i=Number(this.scrollTop),c=Number(this.scrollHeight-this.clientHeight),a=Math.min(Math.max(i/c*100),100);n.style.width=`${a}%`,n.click()}),t.addEventListener("popstate",o=>{n.style.width=0})}catch(n){console.error(n);return}},position:{set:e=>{let t=typeof e=="string"?document.querySelector(e):e;if(!t)return;let r=[t.scrollTop,t.scrollLeft];r[0]!=null&&r[1]!=null&&localStorage.setItem(e,JSON.stringify(r))},get:e=>{if(localStorage.getItem(e))try{let t=localStorage.getItem(e),r=typeof e=="string"?document.querySelector(e):e;r&&t&&(r.scrollTop=t[0],r.scrollLeft=t[1])}catch(t){console.error("Error getting scroll position:",t)}}},smooth:(e,t,r)=>{e===document&&(e=document.scrollingElement||document.documentElement||document.body.parentNode||document.body);let n=!1,o=e.scrollTop,i=e===document.body&&document.documentElement?document.documentElement:e,c=l=>{l.preventDefault();let x=a(l);o+=-x*t,o=Math.max(0,Math.min(o,e.scrollHeight-i.clientHeight)),n||s()};e.addEventListener("mousewheel",c,{passive:!1}),e.addEventListener("DOMMouseScroll",c,{passive:!1});let a=l=>l.detail?l.wheelDelta?l.wheelDelta/l.detail/40*(l.detail>0?1:-1):-l.detail/3:l.wheelDelta/120,s=()=>{n=!0;let l=(o-e.scrollTop)/r;e.scrollTop+=l,Math.abs(l)>.5?f(s):n=!1},f=dphelper.window.animationframe()},scrollTo:(e,t,r=0)=>{let n=document.querySelector(e),o=document.querySelector(t);n&&o&&n.scrollTo({top:o.offsetTop-r,behavior:"smooth"})}};dphelper?.setDescription(Un,Gn);var ae=Ar(tr(),1),Yn={name:"security",active:!0,subCommand:[{name:"uuid",version:"0.0.2",example:"dphelper.security.uuid",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"UUID related commands",subCommand:[{name:"byVal",version:"0.0.2",example:"dphelper.security.uuid.byVal('string')",author:"Dario Passariello",creationDate:"20250101",lastMod:"20250101",type:"function",active:!0,description:"Generate a UUID based on a given string",env:"both",subCommand:[]},{name:"v4",version:"0.0.2",example:"dphelper.security.uuid.v4",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"return",active:!0,description:"Generate a random UUID v4",env:"both",subCommand:[]},{name:"v5",version:"0.0.2",example:"dphelper.security.uuid.v5",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"return",active:!0,description:"Generate a random UUID v5",env:"both",subCommand:[]}]},{name:"hashPass",description:"Generate a crypto digest SHA-1 starting from user and password values (Please, think about security before using SHA-1)",example:"dphelper.security.hashPass(user, password)",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"crypt",description:"Encrypt your message using a secret_key in a default format AES",example:"dphelper.security.crypt(data, secret_key, [optional mode])",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"deCrypt",description:"Decrypt your message using a secret_key in a default format AES",example:"dphelper.security.deCrypt(data, secret_key, [optional mode])",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"AES_KeyGen",description:"Generate a key based on the AES algorithm",example:"dphelper.security.AES_KeyGen(secret_key)",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"SHA256_Hex",description:"Generate a SHA256 hash in hexadecimal format",example:"dphelper.security.SHA256_Hex(secret_key)",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20250101",lastMod:"20250101",active:!0,env:"both",subCommand:[]},{name:"ulid",description:"Generate ULID code",example:"dphelper.security.ulid()",version:"0.0.2",type:"function",author:"mix",creationDate:"20250212",lastMod:"20250212",active:!0,env:"both",subCommand:[]},{name:"fingerprint",description:"Generate a unique browser fingerprint",example:"dphelper.security.fingerprint()",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20260220",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"saveEncrypted",description:"Save encrypted data to localStorage",example:"dphelper.security.saveEncrypted('key', 'value', 'secret')",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20260220",lastMod:"20260220",active:!0,env:"both",subCommand:[]},{name:"getEncrypted",description:"Retrieve and decrypt data from localStorage",example:"dphelper.security.getEncrypted('key', 'secret')",version:"0.0.2",type:"function",author:"Dario Passariello",creationDate:"20260220",lastMod:"20260220",active:!0,env:"both",subCommand:[]}]},rr=-1,V=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","J","K","M","N","P","Q","R","S","T","V","W","X","Y","Z"],Jn={uuid:{byVal:e=>{if(!e)return console.warn("You need to pass a value to obtain a fixed uuid"),"";let t=dphelper.security.SHA256_Hex(e);return[t.slice(0,8),t.slice(8,4),`4${t.slice(12,3)}`,`8${t.slice(15,3)}`,t.slice(18,12)].join("-")},v4:"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16)),v5:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(1))[0]:Math.floor(Math.random()*16);return(e==="x"?t:t&3|8).toString(16)})},hashPass:async(e,t,r="SHA-256")=>{let n=crypto.getRandomValues(new Uint8Array(16)),o=Array.from(n).map(f=>f.toString(16).padStart(2,"0")).join(""),i=new TextEncoder().encode(t.toLowerCase()+e.toLowerCase()+o),c=await crypto.subtle.digest(r,i),s=Array.from(new Uint8Array(c)).map(f=>f.toString(16).padStart(2,"0")).join("");return o+s},crypt:(e,t,r="AES")=>ae.default[r].encrypt(e,t).toString(),deCrypt:(e,t,r="AES")=>ae.default[r].decrypt(e,t).toString(ae.default.enc.Utf8),AES_KeyGen:e=>{let t=e||(typeof crypto<"u"?crypto.randomUUID():Math.random().toString(36).substring(2)),r=ae.default.lib.WordArray.random(128/8);return ae.default.PBKDF2(t,r,{keySize:512/32,iterations:1e4}).toString()},SHA256_Hex:e=>ae.default.SHA256(e).toString(ae.default.enc.Hex),ulid:()=>{let e=new Uint8Array(16),t=new DataView(e.buffer,0,6),r=new Uint8Array(e.buffer,6,10),n=new Array(26),o=c=>{n[0]=V[c[0]>>5],n[1]=V[c[0]>>0&31];for(let a=0;a<3;a++)n[a*8+2]=V[c[a*5+1]>>3],n[a*8+3]=V[(c[a*5+1]<<2|c[a*5+2]>>6)&31],n[a*8+4]=V[c[a*5+2]>>1&31],n[a*8+5]=V[(c[a*5+2]<<4|c[a*5+3]>>4)&31],n[a*8+6]=V[(c[a*5+3]<<1|c[a*5+4]>>7)&31],n[a*8+7]=V[c[a*5+4]>>2&31],n[a*8+8]=V[(c[a*5+4]<<3|c[a*5+5]>>5)&31],n[a*8+9]=V[c[a*5+5]>>0&31];return n.join("")},i=Date.now();if(i===rr)for(let c=9;c>=0&&!(r[c]!==void 0&&r[c]++<255);c--);else rr=i,t.setUint16(0,i/4294967296|0),t.setUint32(2,i|0),window.crypto.getRandomValues(r);return o(e)},fingerprint:()=>{let e=navigator,t=window.screen,r=document.createElement("canvas"),n=r.getContext("2d"),o="dphelper_fingerprint_v1",i="";n&&(r.width=200,r.height=30,n.textBaseline="top",n.font="14px 'Arial'",n.textBaseline="alphabetic",n.fillStyle="#f60",n.fillRect(125,1,62,20),n.fillStyle="#069",n.fillText(o,2,15),n.fillStyle="rgba(102, 204, 0, 0.7)",n.fillText(o,4,17),i=r.toDataURL());let c=[e.userAgent,e.language,t.colorDepth,t.width+"x"+t.height,new Date().getTimezoneOffset(),e.deviceMemory||"unknown",e.hardwareConcurrency||"unknown",i].join("|");return dphelper.security.SHA256_Hex(c)},saveEncrypted:(e,t,r)=>{let n=dphelper.security.crypt(t,r);localStorage.setItem(e,n)},getEncrypted:(e,t)=>{let r=localStorage.getItem(e);if(!r)return null;try{return dphelper.security.deCrypt(r,t)}catch(n){return console.warn("Decryption failed:",n),null}}};dphelper?.setDescription(Yn,Jn);var Kn={name:"shortcut",active:!0,subCommand:[{name:"keys",version:"0.0.2",example:"dphelper.shortcut.keys([e, trigger])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Handle keyboard shortcuts.",env:"client",subCommand:[]}]},Zn={keys:(e,t)=>{let r=e.which?e.which:e.keyCode;t||(t={data:[{key:"83",ctrl:!0,active:!0,description:"CTRL+S",function:""},{key:"27",ctrl:!1,active:!0,description:"ESC",element:"",function:""},{key:"80",ctrl:!0,active:!0,description:"CTRL+P",element:"",function:"function(){ Print }"}]}),t.data&&t.data.map(n=>(e.ctrlKey||e.metaKey&&n.ctrl===!0)&&r===Number.parseInt(n.key)&&n.active===!0?(n.element&&n.element.click(),n.function?JSON.stringify(n.function):(e.preventDefault(),null)):null)}};dphelper?.setDescription(Kn,Zn);var Q={ws:{}},Vn={name:"socket",active:!0,subCommand:[{name:"info",version:"0.0.2",example:"dphelper.socket.info(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Retrieve socket information",env:"client",subCommand:[]},{name:"start",version:"0.0.2",example:"dphelper.socket.start(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Start a socket connection",env:"client",subCommand:[]},{name:"conn",version:"0.0.2",example:"dphelper.socket.conn(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Manage socket connections",env:"client",subCommand:[]},{name:"connect",version:"0.0.2",example:"dphelper.socket.connect(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Connect to a socket",env:"client",subCommand:[]},{name:"open",version:"0.0.2",example:"dphelper.socket.open(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Open a socket connection",env:"client",subCommand:[]},{name:"send",version:"0.0.2",example:"dphelper.socket.send(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Send data through a socket",env:"client",subCommand:[]},{name:"receive",version:"0.0.2",example:"dphelper.socket.receive(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Receive data from a socket",env:"client",subCommand:[]},{name:"keepAlive",version:"0.0.2",example:"dphelper.socket.keepAlive(...)",author:"Dario Passariello",creationDate:"2021-01-01",lastMod:"2021-01-01",type:"function",active:!0,description:"Keep the socket connection alive",env:"client",subCommand:[]},{name:"check",version:"0.0.2",example:"dphelper.socket.check()",author:"Dario Passariello",creationDate:"2023-05-27",lastMod:"2023-05-27",type:"function",active:!0,description:"Check how many websocket connections are open",env:"client",subCommand:[]},{name:"list",version:"0.0.2",example:"dphelper.socket.list()",author:"Dario Passariello",creationDate:"2023-05-27",lastMod:"2023-05-27",type:"function",active:!0,description:"List all websocket connections in real-time",env:"client",subCommand:[]}]},Xn={info:()=>"Created by Dario Passariello",start:(e,t,r="general")=>{Q.ws={},dphelper.socket.connect(t,r),dphelper.socket.receive(e,r)},conn:(e,t,r)=>{if(!(e&&t)){console.debug("please use connect!");return}try{let n;try{n=new URL(t)}catch{if(!t.startsWith("/")&&!t.startsWith("ws")&&!t.startsWith("wss"))n=new URL(t,window.location.origin);else{console.error("Invalid WebSocket URL");return}}if(n.protocol==="ws:"){console.error("Insecure WebSocket protocol 'ws://' - must use 'wss://'");return}let o=new WebSocket(t);return o.binaryType="blob",o.onmessage=i=>{},[o,e,r]}catch(n){console.error(n);return}},connect:(e,t)=>{e&&dphelper.socket.open(dphelper.security.uuid.v5,e,t)},open:(e,t,r)=>{if(e)try{let n=dphelper.socket.conn(e,t,r);if(!n)return;Q.ws[r]=n,dphelper._list.sockets.indexOf(n[0])===-1&&dphelper._list.sockets.push(n[0]),n[0].onopen=()=>dphelper.log.reg(`${e} connected`),n[0].onclose=o=>dphelper.log.debug(o.wasClean?"Disconnected":`Connection break: ${o.reason||o.code}`),n[0].onerror=o=>dphelper.log?.error(o)}catch(n){console.error(n)}},send:(e,t,r)=>{if(Q.ws[r]?.[1]&&e)try{let n=Q.ws[r];if(!n)return;let o=n[0],i=n[1],c=t?`{"${t}":"(${i}:${e})"}`:e;o.send(c)}catch(n){console.error(n)}},ping:e=>{if(Q.ws[e]?.[1])try{Q.ws[e]?.[0]?.send('{"debug":"__ping__"}')}catch(t){console.error(t)}},receive:(e,t)=>{if(Q.ws[t]?.[1])try{let r=Q.ws[t],n=r[0];n.onmessage=async o=>{try{if(e){let i=typeof e=="string"?document.querySelector(e):e;if(i){let c=typeof o.data=="string"?o.data:await o.data.text(),a=JSON.parse(c),s=String(Object.values(a)[0]);i.textContent=s}}}catch{}dphelper.log.reg(o.data)}}catch(r){console.error(r)}},keepAlive:e=>{try{let t=Q.ws[e];if(!t)return;let r,n=t[0],o=(c=5e3)=>{r=setTimeout(()=>{dphelper.socket.ping(e)},c)},i=()=>clearTimeout(r);n.onopen=()=>setInterval(o,3e4),n.onmessage=c=>{try{Object.values(JSON.parse(c.data))[0]==="__ping__"&&i();return}catch(a){console.error(a)}}}catch(t){console.error(t)}},check:()=>{dphelper._list.sockets=dphelper._list.sockets.filter(e=>e.readyState!==WebSocket.CLOSED)},list:()=>dphelper._list.sockets};dphelper?.setDescription(Vn,Xn);dphelper?.socket?.check();var Qn={name:"sse",active:!0,subCommand:[{name:"open",version:"0.0.1",example:"dphelper.sse.open('/api/stream', { method: 'POST', body: ... })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Advanced Server-Sent Events client with POST and Custom Headers support.",env:"client",subCommand:[]}]},ea={open:(e,t={})=>{let r={message:[],error:[],open:[]},n=new AbortController,o=(c,a)=>{r[c]?.forEach(s=>s(a))};return(async()=>{try{let c=await fetch(e,{...t,signal:n.signal,headers:{Accept:"text/event-stream",...t.headers||{}}});if(!c.ok)throw new Error(`SSE failed: ${c.statusText}`);o("open",{status:c.status});let a=c.body?.getReader(),s=new TextDecoder;if(!a)return;let f="";for(;;){let{done:l,value:x}=await a.read();if(l)break;f+=s.decode(x,{stream:!0});let d=f.split(`
132
+ `);f=d.pop()||"";for(let h of d)if(h.startsWith("data:")){let m=h.replace("data:","").trim();try{(m.includes("[")||m.includes("{"))&&(m=JSON.parse(m))}catch{}o("message",m)}}}catch(c){c.name!=="AbortError"&&o("error",c)}})(),{on:(c,a)=>{r[c]&&r[c].push(a)},close:()=>n.abort()}}};dphelper?.setDescription(Qn,ea);var ta={name:"svg",active:!0,subCommand:[{name:"init",version:"0.0.2",example:"dphelper.svg.init(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Initializes an SVG connection between two elements.",env:"client",subCommand:[]},{name:"check",version:"0.0.2",example:"dphelper.svg.check(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Checks if SVG support is available.",env:"client",subCommand:[]},{name:"update",version:"0.0.2",example:"dphelper.svg.update(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Updates the SVG connection between two elements.",env:"client",subCommand:[]},{name:"getCurve",version:"0.0.2",example:"dphelper.svg.getCurve(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the curve of the connection between two points.",env:"client",subCommand:[]},{name:"getIntersection",version:"0.0.2",example:"dphelper.svg.getIntersection(...) ",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the intersection point between two elements.",env:"client",subCommand:[]},{name:"setConnector",version:"0.0.2",example:"dphelper.svg.setConnector(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Sets a connector on an element.",env:"client",subCommand:[]},{name:"removeConnection",version:"0.0.2",example:"dphelper.svg.removeConnection(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Removes an SVG connection from a container.",env:"client",subCommand:[]},{name:"makeScrollable",version:"0.0.2",example:"dphelper.svg.makeScrollable(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Makes an SVG container scrollable.",env:"client",subCommand:[]},{name:"makeDraggable",version:"0.0.2",example:"dphelper.svg.makeDraggable(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Makes an SVG element draggable.",env:"client",subCommand:[]},{name:"toggle",version:"0.0.2",example:"dphelper.svg.toggle(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Toggles an SVG connection on or off.",env:"client",subCommand:[]},{name:"convert",version:"0.0.2",example:"dphelper.svg.convert([Object])",author:"Dario Passariello",creationDate:"20190101",lastMod:"20240401",type:"function",active:!0,description:"Converts an element to SVG.",env:"client",subCommand:[]}]},ra={init:(e,t,r,n)=>{e.querySelector("svg")&&dphelper.svg.removeConnection(e),t=[dphelper.svg.setConnector(t[0],t[1]),t[1]],r=[dphelper.svg.setConnector(r[0],r[1]),r[1]];let o=e.getBoundingClientRect(),i="http://www.w3.org/2000/svg",c=e.offsetWidth*10,a=e.offsetHeight*10,s=document.createElementNS(i,"svg"),f=`conn_${Math.random().toString(36).substring(2,9)}`;s.setAttribute("xmlns",i),s.dataset.dphelper="svg-connection",s.setAttributeNS(null,"viewBox","0 0 "+c+" "+a),s.setAttributeNS(null,"width",String(c)),s.setAttributeNS(null,"height",String(a)),s.style.display="block";let l=document.createElementNS(i,"rect"),x=t[0].getBoundingClientRect();l.setAttributeNS(null,"x",String(x.left-o.left)),l.setAttributeNS(null,"y",String(x.top-o.top)),l.setAttributeNS(null,"width",String(x.width)),l.setAttributeNS(null,"height",String(x.height)),s.appendChild(l);let d=document.createElementNS(i,"rect");x=r[0].getBoundingClientRect(),d.setAttributeNS(null,"x",String(x.left-o.left)),d.setAttributeNS(null,"y",String(x.top-o.top)),d.setAttributeNS(null,"width",String(x.width)),d.setAttributeNS(null,"height",String(x.height)),s.appendChild(d);let h=document.createElementNS(i,"path");h.setAttributeNS(null,"id",f),h.setAttributeNS(null,"marker-end","url(#head)"),s.appendChild(h),e.appendChild(s),dphelper.svg.update(l,d,h),typeof n=="function"&&n(t,r)},check:()=>!!(document.createElementNS&&document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),update:(e,t,r)=>{let n=Number.parseFloat(e.getAttribute("x")||"0"),o=Number.parseFloat(e.getAttribute("y")||"0"),i=Number.parseFloat(t.getAttribute("x")||"0"),c=Number.parseFloat(t.getAttribute("y")||"0"),a=Number.parseFloat(e.getAttribute("width")||"0")/2,s=Number.parseFloat(e.getAttribute("height")||"0")/2,f=Number.parseFloat(t.getAttribute("width")||"0")/2,l=Number.parseFloat(t.getAttribute("height")||"0")/2,x=n+a,d=o+s,h=i+f,m=c+l,v=h-x,b=m-d,u=dphelper.svg.getIntersection(v,b,x,d,a,s),p=dphelper.svg.getIntersection(-v,-b,h,m,f,l),y=p[0]-u[0],g=dphelper.svg.getCurve(u,p,y);r.setAttributeNS(null,"d","M"+x+","+d+g+h+","+m)},getCurve:(e,t,r)=>{let n=r/2;return" C"+(n+e[0])+","+e[1]+" "+(t[0]-n)+","+t[1]+" "},getIntersection:(e,t,r,n,o,i)=>Math.abs(t/e)<i/o?[r+(e>0?o:-o),n+t*o/Math.abs(e)]:[r+e*i/Math.abs(t),n+(t>0?i:-i)],setConnector:(e,t)=>{let r,n=document.createElement("span");switch(e.style.position="relative",n.style.position="absolute",n.style.width="5px",n.style.height="5px",t){case"top":r={left:"50%",top:"2.5px",marginLeft:"2.5px"};break;case"right":r={top:"50%",right:"2.5px",marginTop:"-2.5px"};break;case"bottom":r={left:"50%",bottom:"-2.5px",marginLeft:"2.5px"};break;case"left":r={top:"50%",left:"-2.5px",marginTop:"-2.5px"};break;default:r={}}return Object.assign(n.style,r),e.appendChild(n),n},removeConnection:e=>{e.querySelectorAll("svg[data-dphelper='svg-connection']").forEach(r=>r.remove())},makeScrollable:(e,t,r,n,o,i)=>{let c=e.getBoundingClientRect(),a=[r,n],s=a.length,f=[o,i],l=[];for(let v=0;v<s;v++){let b=a[v],u=f[v];!b||!u||(l[v]=b.getBoundingClientRect(),u.setAttributeNS(null,"x",String(l[v].left-c.left)),u.setAttributeNS(null,"y",String(l[v].top-c.top)),u.setAttributeNS(null,"width",String(l[v].width)),u.setAttributeNS(null,"height",String(l[v].height)))}let x=e.querySelectorAll("rect"),d=x[0],h=x[1],m=document.getElementById("connection");d&&h&&m&&dphelper.svg.update(d,h,m)},makeDraggable:e=>{let t=e.target;t.addEventListener("mousedown",i),t.addEventListener("mousemove",c),t.addEventListener("mouseup",a);function r(s){let f=t.getScreenCTM();return{x:(s.clientX-f.e)/f.a,y:(s.clientY-f.f)/f.d}}let n=null,o=null;function i(s){s.target.classList.contains("draggable")&&(n=s.target,o=r(s),o.x-=Number.parseFloat(n.getAttributeNS(null,"x")||"0"),o.y-=Number.parseFloat(n.getAttributeNS(null,"y")||"0"))}function c(s){if(n&&o){let f=r(s);n.setAttributeNS(null,"x",String(f.x-o.x)),n.setAttributeNS(null,"y",String(f.y-o.y)),dphelper.svg.update(n,n,document.getElementById("connection"))}}function a(){n=null,o=null}},toggle:(e,t,r,n)=>{let o=e.target;if(o.checked&&r&&n)dphelper.cookie.set({name:`${o.id}`,value:1,time:365}),dphelper.svg.init(t,[r,"right"],[n,"left"],(i,c)=>{let a=document.getElementById("parts-left-body");a&&a.addEventListener("scroll",()=>{dphelper.svg.makeScrollable(t,a,i,c,document.querySelector("#parts svg rect"),document.querySelectorAll("#parts svg rect")[1])})});else{dphelper.svg.removeConnection(t);let i=document.getElementById("parts-left-body");i&&i.replaceWith(i.cloneNode(!0)),dphelper.cookie.set({name:`${o.id}`,value:0,time:365})}},convert:({children:e,active:t=!0,size:r=[1920,1080],fit:n=["100%","100%"],preserveAspectRatio:o="none",style:i=`width:${n[0]}; height:${n[1]}`,zoom:c=1})=>{if(!e)return"Please pass ID of element for SVG conversion";if(t){let a=document.querySelector(e),s=a.cloneNode(!0),f=`
133
133
  <svg
134
134
  viewBox="0 0 ${r[0]} ${r[1]}"
135
135
  preserveAspectRatio="${o}"
@@ -145,7 +145,7 @@ ${t(c,`${n} `)}${n}</${i}>
145
145
  >
146
146
  </foreignObject>
147
147
  </svg >
148
- `;a.innerHTML=f;let l=a.querySelector("foreignObject");l&&l.appendChild(s)}}};dphelper?.setDescription(Vn,Xn);dphelper?.svg?.check();var Qn={name:"sync",active:!0,subCommand:[{name:"tab",version:"0.0.2",example:"dphelper.sync.tab('my_channel', (data) => console.debug(data))",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Synchronize data between tabs using BroadcastChannel",env:"client",subCommand:[]},{name:"storageProxy",version:"0.0.2",example:"const proxy = dphelper.sync.storageProxy('user_pref', {theme: 'dark'})",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Create a Proxy object linked to localStorage for auto-sync",env:"client",subCommand:[]},{name:"pulse",version:"0.0.1",example:"dphelper.sync.pulse('chat', (msg) => ...)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Low-latency cross-tab event bus with automatic registration.",env:"client",subCommand:[]}]},ea={pulse:(e,t)=>{if(typeof BroadcastChannel>"u")return{emit:()=>{},stop:()=>{}};let r=new BroadcastChannel(`pulse_${e}`);return r.onmessage=n=>{if(n.origin===window.location.origin||!n.origin)try{let o=n.data;o&&typeof o=="object"&&!o.__proto__&&!o.constructor&&t(o)}catch(o){console.warn("[dphelper] Invalid message received in pulse:",o)}},{emit:n=>r.postMessage(n),stop:()=>r.close()}},tab:(e,t)=>{if(typeof BroadcastChannel>"u")return{post:()=>{},close:()=>{}};let r=new BroadcastChannel(e);return r.onmessage=n=>{if(n.origin===window.location.origin||!n.origin)try{let o=n.data;o&&typeof o=="object"&&!o.__proto__&&!o.constructor&&t(o)}catch(o){console.warn("[dphelper] Invalid message received in tab:",o)}},{post:n=>r.postMessage(n),close:()=>r.close()}},storageProxy:(e,t)=>{if(typeof localStorage>"u")return t;let r=localStorage.getItem(e),n=r?JSON.parse(r):t;return new Proxy(n,{set(o,i,c){return o[i]=c,localStorage.setItem(e,JSON.stringify(o)),!0}})}};dphelper?.setDescription(Qn,ea);var ta={name:"system",active:!0,subCommand:[{name:"multiSplit",version:"0.0.2",example:"dphelper.system.multiSplit()",author:"Dario Passariello",creationDate:"20231121",lastMod:"20231121",type:"system",active:!0,description:"Run only one time when you load your App ... extend the .split with array as argument (example.split([',', ':', ';', '?', '/'])[0])",env:"both",subCommand:[]}]},ra={multiSplit:(e,t)=>{if(!e)return[];let r=t[0];if(!r)return[e];let n=e;for(let o=1;o<t.length;++o)n=n.split(t[o]).join(r);return n.split(r)}};dphelper?.setDescription(ta,ra);var na={name:"text",active:!0,subCommand:[{name:"trim",version:"0.0.2",example:"dphelper.text.trim(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Trims the specified characters from the start and end of a string.",env:"both",subCommand:[]},{name:"capitalize",version:"0.0.2",example:"dphelper.text.capitalize(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Capitalizes the first letter of each word in a string.",env:"both",subCommand:[]},{name:"lower",version:"0.0.2",example:"dphelper.text.lower(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a string to lowercase.",env:"both",subCommand:[]},{name:"upper",version:"0.0.2",example:"dphelper.text.upper(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a string to uppercase.",env:"both",subCommand:[]},{name:"nl2br",version:"0.0.2",example:"dphelper.text.nl2br(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts newlines in a string to HTML <br> tags.",env:"both",subCommand:[]},{name:"sanitize",version:"0.0.2",example:"dphelper.text.sanitize(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Sanitizes a string by removing HTML tags.",env:"both",subCommand:[]},{name:"camelCase",version:"0.0.2",example:"dphelper.text.camelCase(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a string to camelCase.",subCommand:[{name:"toSpace",version:"0.0.2",example:"dphelper.text.camelCase.toSpace(...)",type:"function",active:!0,description:"Converts camelCase to space-separated words.",env:"both",subCommand:[],author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220"},{name:"toUnderscore",version:"0.0.2",example:"dphelper.text.camelCase.toUnderscore(...)",type:"function",active:!0,description:"Converts camelCase to underscore-separated words.",env:"both",subCommand:[],author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220"}]},{name:"fitContainer",version:"0.0.2",example:"dphelper.text.fitContainer([element])",type:"function",active:!0,description:"Adjusts the font size of an element to fit its container.",env:"both",subCommand:[],author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220"},{name:"keywords",version:"0.0.2",example:"dphelper.text.keywords([sentence])",type:"function",active:!0,description:"Extrapolate keywords from a sentence",env:"both",subCommand:[],author:"Dario Passariello",creationDate:"20250601",lastMod:"20250601"},{name:"replaceText",version:"0.0.2",example:"dphelper.text.replaceText([sentence, object])",type:"function",active:!0,description:`
148
+ `;a.innerHTML=f;let l=a.querySelector("foreignObject");l&&l.appendChild(s)}}};dphelper?.setDescription(ta,ra);dphelper?.svg?.check();var na={name:"sync",active:!0,subCommand:[{name:"tab",version:"0.0.2",example:"dphelper.sync.tab('my_channel', (data) => console.debug(data))",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Synchronize data between tabs using BroadcastChannel",env:"client",subCommand:[]},{name:"storageProxy",version:"0.0.2",example:"const proxy = dphelper.sync.storageProxy('user_pref', {theme: 'dark'})",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Create a Proxy object linked to localStorage for auto-sync",env:"client",subCommand:[]},{name:"pulse",version:"0.0.1",example:"dphelper.sync.pulse('chat', (msg) => ...)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Low-latency cross-tab event bus with automatic registration.",env:"client",subCommand:[]}]},aa={pulse:(e,t)=>{if(typeof BroadcastChannel>"u")return{emit:()=>{},stop:()=>{}};let r=new BroadcastChannel(`pulse_${e}`);return r.onmessage=n=>{if(n.origin===window.location.origin||!n.origin)try{let o=n.data;o&&typeof o=="object"&&!o.__proto__&&!o.constructor&&t(o)}catch(o){console.warn("[dphelper] Invalid message received in pulse:",o)}},{emit:n=>r.postMessage(n),stop:()=>r.close()}},tab:(e,t)=>{if(typeof BroadcastChannel>"u")return{post:()=>{},close:()=>{}};let r=new BroadcastChannel(e);return r.onmessage=n=>{if(n.origin===window.location.origin||!n.origin)try{let o=n.data;o&&typeof o=="object"&&!o.__proto__&&!o.constructor&&t(o)}catch(o){console.warn("[dphelper] Invalid message received in tab:",o)}},{post:n=>r.postMessage(n),close:()=>r.close()}},storageProxy:(e,t)=>{if(typeof localStorage>"u")return t;let r=localStorage.getItem(e),n=r?JSON.parse(r):t;return new Proxy(n,{set(o,i,c){return o[i]=c,localStorage.setItem(e,JSON.stringify(o)),!0}})}};dphelper?.setDescription(na,aa);var oa={name:"system",active:!0,subCommand:[{name:"multiSplit",version:"0.0.2",example:"dphelper.system.multiSplit()",author:"Dario Passariello",creationDate:"20231121",lastMod:"20231121",type:"system",active:!0,description:"Run only one time when you load your App ... extend the .split with array as argument (example.split([',', ':', ';', '?', '/'])[0])",env:"both",subCommand:[]}]},ia={multiSplit:(e,t)=>{if(!e)return[];let r=t[0];if(!r)return[e];let n=e;for(let o=1;o<t.length;++o)n=n.split(t[o]).join(r);return n.split(r)}};dphelper?.setDescription(oa,ia);var sa={name:"text",active:!0,subCommand:[{name:"trim",version:"0.0.2",example:"dphelper.text.trim(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Trims the specified characters from the start and end of a string.",env:"both",subCommand:[]},{name:"capitalize",version:"0.0.2",example:"dphelper.text.capitalize(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Capitalizes the first letter of each word in a string.",env:"both",subCommand:[]},{name:"lower",version:"0.0.2",example:"dphelper.text.lower(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a string to lowercase.",env:"both",subCommand:[]},{name:"upper",version:"0.0.2",example:"dphelper.text.upper(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a string to uppercase.",env:"both",subCommand:[]},{name:"nl2br",version:"0.0.2",example:"dphelper.text.nl2br(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts newlines in a string to HTML <br> tags.",env:"both",subCommand:[]},{name:"sanitize",version:"0.0.2",example:"dphelper.text.sanitize(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Sanitizes a string by removing HTML tags.",env:"both",subCommand:[]},{name:"camelCase",version:"0.0.2",example:"dphelper.text.camelCase(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a string to camelCase.",subCommand:[{name:"toSpace",version:"0.0.2",example:"dphelper.text.camelCase.toSpace(...)",type:"function",active:!0,description:"Converts camelCase to space-separated words.",env:"both",subCommand:[],author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220"},{name:"toUnderscore",version:"0.0.2",example:"dphelper.text.camelCase.toUnderscore(...)",type:"function",active:!0,description:"Converts camelCase to underscore-separated words.",env:"both",subCommand:[],author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220"}]},{name:"fitContainer",version:"0.0.2",example:"dphelper.text.fitContainer([element])",type:"function",active:!0,description:"Adjusts the font size of an element to fit its container.",env:"both",subCommand:[],author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220"},{name:"keywords",version:"0.0.2",example:"dphelper.text.keywords([sentence])",type:"function",active:!0,description:"Extrapolate keywords from a sentence",env:"both",subCommand:[],author:"Dario Passariello",creationDate:"20250601",lastMod:"20250601"},{name:"replaceText",version:"0.0.2",example:"dphelper.text.replaceText([sentence, object])",type:"function",active:!0,description:`
149
149
  replace all occurrence from sentence using an object as list
150
150
 
151
151
  example:
@@ -159,16 +159,16 @@ ${t(c,`${n} `)}${n}</${i}>
159
159
  )
160
160
 
161
161
  Copyright text (c) became an html symbol
162
- `,env:"both",subCommand:[],author:"Dario Passariello",creationDate:"20250612",lastMod:"20250612"}]},aa={trim:(e,t,r,n)=>e.charAt(0)===t?e.substring(r,n):e,capitalize:e=>e.toLowerCase().replace(/\b\w/g,t=>t.toUpperCase()),lower:e=>e.toLowerCase(),upper:e=>e.toUpperCase(),nl2br:e=>e.replace(/(?:\r\n|\r|\n)/g,"<br>"),sanitize:e=>e.replace(/<(|\/|[^>\bi]|\/[^>bi]|[^/>][^>]+|\/[^>][^>]+)>/g,""),camelCase:{toSpace:e=>e.replace(/([A-Z])/g," $1").replace(/^./,t=>t.toUpperCase()),toUnderscore:e=>e.replace(/\.?([A-Z])/g,(t,r)=>`_${r.toLowerCase()}`).replace(/^_/,"")},fitContainer:e=>{if(!e)return;function t(r){let n=document.querySelectorAll(r),o=n.length;if(!(o<=0))for(let i=0;i<o;i++){let c=n[i].offsetWidth*.05;n[i].style.fontSize=`${c}px`}}dphelper.addListenerMulti(window,"load resize",()=>t(e))},keywords:e=>{let t=/\b[A-Z][a-z]+\b/g,r=e.match(t)?.filter(n=>n.length>3)||[];return[...new Set(r.map(n=>n.toLowerCase()))]},replaceText:(e,t)=>{let r=e;for(let n in t)Object.hasOwn(t,n)&&(r=r.replaceAll(n,t[n]||""));return r}};dphelper?.setDescription(na,aa);var oa={name:"timer",active:!0,subCommand:[{name:"sleep",version:"0.0.2",example:"dphelper.timer.sleep([ms]) ",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Pauses execution for a specified number of milliseconds.",env:"both",subCommand:[]},{name:"percentage",version:"0.0.2",example:"dphelper.timer.percentage([start], [end])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the percentage of time elapsed between two time strings.",env:"both",subCommand:[]}]},ia={sleep:e=>new Promise(t=>setTimeout(t,e)),percentage:(e,t)=>{function r(n){let o=n.split(":");return Number.parseInt(o[0]||"",10)*3600+Number.parseInt(o[1]||"",10)*60+Number.parseInt(o[2]||"",10)}return(100*r(e)/r(t)).toFixed(2)}};dphelper?.setDescription(oa,ia);var sa={name:"tools",active:!0,subCommand:[{name:"byteSize",description:"Give you the total in 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb', 'Zb', 'Yb' starting from bytes",example:"dphelper.tools.byteSize(bytes)",version:"0.0.2",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"hashPass",description:"Hashes a password using a specified number and total.",example:"dphelper.tools.hashPass(number, total)",version:"0.0.2",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"zIndex",description:"Finds the highest z-index value in the document.",example:"dphelper.tools.zIndex()",version:"0.0.2",author:"Dario Passariello",creationDate:"20240807",lastMod:"20240807",type:"function",active:!0,env:"both",subCommand:[]},{name:"zeroToFalse",description:"Converts zero to false, otherwise returns the value.",example:"dphelper.tools.zeroToFalse(num)",version:"0.0.2",author:"Dario Passariello",creationDate:"20240924",lastMod:"20240924",type:"function",active:!0,env:"both",subCommand:[]}]},ca={byteSize:e=>{if(Math.abs(e)<1024)return`${e}b`;let r=["Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],n=-1,o=e;do o/=1024,++n;while(Math.abs(o)>=1024&&n<r.length-1);return o.toFixed(1)+r[n]},zIndex:()=>Array.from(document.querySelectorAll("body *")).map(e=>Number.parseFloat(getComputedStyle(e).zIndex)).reduce((e,t)=>t>e?t:e,1),zeroToFalse:e=>e===0?!1:e};dphelper?.setDescription(sa,ca);var la={name:"translators",active:!0,subCommand:[{name:"convertMatrixToScale",version:"0.0.2",example:"dphelper.translators.convertMatrixToScale({value})",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a transformation matrix to a scale value.",env:"both",subCommand:[]}]},da={convertMatrixToScale:e=>{let t=e.split("(");if(t.length<2)return 0;let r=t[1].split(")")[0];if(!r)return 0;let n=r.split(","),o=Number.parseFloat(n[0]||"0"),i=Number.parseFloat(n[1]||"0");return Math.sqrt(o*o+i*i)}};dphelper?.setDescription(la,da);var ua={name:"triggers",active:!0,subCommand:[{name:"add",version:"0.0.1",example:"dphelper.triggers.add('event', callback)",author:"Dario Passariello",creationDate:"20250220",lastMod:"20250220",type:"function",active:!0,description:"Add a trigger for custom events.",env:"client",subCommand:[]},{name:"on",version:"0.0.1",example:"dphelper.triggers.on('event', callback)",author:"Dario Passariello",creationDate:"20250220",lastMod:"20250220",type:"function",active:!0,description:"Listen for a trigger event.",env:"client",subCommand:[]},{name:"emit",version:"0.0.1",example:"dphelper.triggers.emit('event', data)",author:"Dario Passariello",creationDate:"20250220",lastMod:"20250220",type:"function",active:!0,description:"Emit a trigger event.",env:"client",subCommand:[]},{name:"remove",version:"0.0.1",example:"dphelper.triggers.remove('event')",author:"Dario Passariello",creationDate:"20250220",lastMod:"20250220",type:"function",active:!0,description:"Remove a trigger event.",env:"client",subCommand:[]}]},oe=new Map,rr={add:(e,t)=>{oe.has(e)||oe.set(e,new Set),oe.get(e).add(t)},on:(e,t)=>{rr.add(e,t)},emit:(e,...t)=>{let r=oe.get(e);r&&r.forEach(n=>{try{n(...t)}catch(o){console.error(`Error in trigger callback for event '${e}':`,o)}})},remove:e=>{oe.delete(e)},off:(e,t)=>{let r=oe.get(e);r&&r.delete(t)},clear:()=>{oe.clear()},list:()=>Array.from(oe.keys())};dphelper?.setDescription(ua,rr);var pa={name:"type",active:!0,subCommand:[{name:"of",version:"0.0.2",example:"dphelper.type.of(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Returns the type of the given parameter.",env:"both",subCommand:[]},{name:"instOfObj",version:"0.0.2",example:"dphelper.type.instOfObj(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Checks if the given parameter is an instance of Object.",env:"both",subCommand:[]},{name:"isNaN",version:"0.0.2",example:"dphelper.type.isNaN(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Checks if the given parameter is NaN.",env:"both",subCommand:[]},{name:"isBool",version:"0.0.2",example:"dphelper.type.isBool(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Checks if the given parameter is a boolean.",env:"both",subCommand:[]}]},xa={of:e=>typeof e,instOfObj:e=>e instanceof Object,isNull:e=>t=>!e(t),isBool:e=>!e||e.length==null?!0:e==="1"};dphelper?.setDescription(pa,xa);var fa={name:"UI",active:!0,subCommand:[{name:"input",version:"0.0.2",example:"dphelper.UI.input(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Creates an input element with specified options.",env:"client",subCommand:[]},{name:"fps",version:"0.0.2",example:"dphelper.UI.fps(true)",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Toggle a real-time FPS and Memory monitor overlay",env:"client",subCommand:[]},{name:"boxModel",version:"0.0.2",example:"dphelper.UI.boxModel(true)",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Toggle visual box-model highlighter for all elements",env:"client",subCommand:[]},{name:"anchorContext",version:"0.0.1",example:"dphelper.UI.anchorContext()",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Snapshot and auto-restore UI state (inputs, scroll) across reloads.",env:"client",subCommand:[]}]},ma={anchorContext:()=>{if(typeof window>"u"||typeof localStorage>"u")return;let e=`dp_anchor_${btoa(location.pathname).replace(/=/g,"")}`,t=()=>{let n={scroll:{x:window.scrollX,y:window.scrollY},inputs:Array.from(document.querySelectorAll("input, textarea, select")).filter(o=>o.type!=="password"&&!o.hasAttribute("data-private")&&o.getAttribute("autocomplete")!=="off").map(o=>({id:o.id,name:o.name,value:o.value}))};localStorage.setItem(e,JSON.stringify(n))},r=()=>{let n=localStorage.getItem(e);if(n)try{let o=JSON.parse(n);window.scrollTo(o.scroll.x,o.scroll.y),o.inputs.forEach(i=>{let c=i.id?document.getElementById(i.id):document.querySelector(`[name="${i.name}"]`);c&&(c.value=i.value)})}catch{console.warn("dphelper: anchorContext restoration failed.")}};window.addEventListener("beforeunload",t),r()},fps:(e=!0)=>{if(typeof document>"u")return;let t=document.getElementById("dphelper-fps-monitor");if(!e){t?.remove();return}t||(t=document.createElement("div"),t.id="dphelper-fps-monitor",Object.assign(t.style,{position:"fixed",top:"10px",right:"10px",padding:"8px 12px",background:"rgba(0,0,0,0.8)",color:"#0f0",fontFamily:"monospace",fontSize:"12px",zIndex:"99999",borderRadius:"4px",pointerEvents:"none",boxShadow:"0 2px 10px rgba(0,0,0,0.5)",border:"1px solid #333"}),document.body.appendChild(t));let r=0,n=performance.now(),o=()=>{if(!document.getElementById("dphelper-fps-monitor"))return;r++;let i=performance.now();if(i>=n+1e3){let c=Math.round(r*1e3/(i-n)),a=performance.memory?` | Mem: ${Math.round(performance.memory.usedJSHeapSize/1048576)}MB`:"";t.innerText=`FPS: ${c}${a}`,r=0,n=i}requestAnimationFrame(o)};requestAnimationFrame(o)},boxModel:(e=!0)=>{if(typeof document>"u")return;let t=document.getElementById("dphelper-boxmodel-style");if(!e){t?.remove();return}t||(t=document.createElement("style"),t.id="dphelper-boxmodel-style",t.innerHTML=`
162
+ `,env:"both",subCommand:[],author:"Dario Passariello",creationDate:"20250612",lastMod:"20250612"}]},ca={trim:(e,t,r,n)=>e.charAt(0)===t?e.substring(r,n):e,capitalize:e=>e.toLowerCase().replace(/\b\w/g,t=>t.toUpperCase()),lower:e=>e.toLowerCase(),upper:e=>e.toUpperCase(),nl2br:e=>e.replace(/(?:\r\n|\r|\n)/g,"<br>"),sanitize:e=>e.replace(/<(|\/|[^>\bi]|\/[^>bi]|[^/>][^>]+|\/[^>][^>]+)>/g,""),camelCase:{toSpace:e=>e.replace(/([A-Z])/g," $1").replace(/^./,t=>t.toUpperCase()),toUnderscore:e=>e.replace(/\.?([A-Z])/g,(t,r)=>`_${r.toLowerCase()}`).replace(/^_/,"")},fitContainer:e=>{if(!e)return;function t(r){let n=document.querySelectorAll(r),o=n.length;if(!(o<=0))for(let i=0;i<o;i++){let c=n[i].offsetWidth*.05;n[i].style.fontSize=`${c}px`}}dphelper.addListenerMulti(window,"load resize",()=>t(e))},keywords:e=>{let t=/\b[A-Z][a-z]+\b/g,r=e.match(t)?.filter(n=>n.length>3)||[];return[...new Set(r.map(n=>n.toLowerCase()))]},replaceText:(e,t)=>{let r=e;for(let n in t)Object.hasOwn(t,n)&&(r=r.replaceAll(n,t[n]||""));return r}};dphelper?.setDescription(sa,ca);var la={name:"timer",active:!0,subCommand:[{name:"sleep",version:"0.0.2",example:"dphelper.timer.sleep([ms]) ",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Pauses execution for a specified number of milliseconds.",env:"both",subCommand:[]},{name:"percentage",version:"0.0.2",example:"dphelper.timer.percentage([start], [end])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the percentage of time elapsed between two time strings.",env:"both",subCommand:[]}]},da={sleep:e=>new Promise(t=>setTimeout(t,e)),percentage:(e,t)=>{function r(n){let o=n.split(":");return Number.parseInt(o[0]||"",10)*3600+Number.parseInt(o[1]||"",10)*60+Number.parseInt(o[2]||"",10)}return(100*r(e)/r(t)).toFixed(2)}};dphelper?.setDescription(la,da);var ua={name:"tools",active:!0,subCommand:[{name:"byteSize",description:"Give you the total in 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb', 'Zb', 'Yb' starting from bytes",example:"dphelper.tools.byteSize(bytes)",version:"0.0.2",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"hashPass",description:"Hashes a password using a specified number and total.",example:"dphelper.tools.hashPass(number, total)",version:"0.0.2",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"zIndex",description:"Finds the highest z-index value in the document.",example:"dphelper.tools.zIndex()",version:"0.0.2",author:"Dario Passariello",creationDate:"20240807",lastMod:"20240807",type:"function",active:!0,env:"both",subCommand:[]},{name:"zeroToFalse",description:"Converts zero to false, otherwise returns the value.",example:"dphelper.tools.zeroToFalse(num)",version:"0.0.2",author:"Dario Passariello",creationDate:"20240924",lastMod:"20240924",type:"function",active:!0,env:"both",subCommand:[]}]},pa={byteSize:e=>{if(Math.abs(e)<1024)return`${e}b`;let r=["Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],n=-1,o=e;do o/=1024,++n;while(Math.abs(o)>=1024&&n<r.length-1);return o.toFixed(1)+r[n]},zIndex:()=>Array.from(document.querySelectorAll("body *")).map(e=>Number.parseFloat(getComputedStyle(e).zIndex)).reduce((e,t)=>t>e?t:e,1),zeroToFalse:e=>e===0?!1:e};dphelper?.setDescription(ua,pa);var xa={name:"translators",active:!0,subCommand:[{name:"convertMatrixToScale",version:"0.0.2",example:"dphelper.translators.convertMatrixToScale({value})",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a transformation matrix to a scale value.",env:"both",subCommand:[]}]},fa={convertMatrixToScale:e=>{let t=e.split("(");if(t.length<2)return 0;let r=t[1].split(")")[0];if(!r)return 0;let n=r.split(","),o=Number.parseFloat(n[0]||"0"),i=Number.parseFloat(n[1]||"0");return Math.sqrt(o*o+i*i)}};dphelper?.setDescription(xa,fa);var ma={name:"triggers",active:!0,subCommand:[{name:"add",version:"0.0.1",example:"dphelper.triggers.add('event', callback)",author:"Dario Passariello",creationDate:"20250220",lastMod:"20250220",type:"function",active:!0,description:"Add a trigger for custom events.",env:"client",subCommand:[]},{name:"on",version:"0.0.1",example:"dphelper.triggers.on('event', callback)",author:"Dario Passariello",creationDate:"20250220",lastMod:"20250220",type:"function",active:!0,description:"Listen for a trigger event.",env:"client",subCommand:[]},{name:"emit",version:"0.0.1",example:"dphelper.triggers.emit('event', data)",author:"Dario Passariello",creationDate:"20250220",lastMod:"20250220",type:"function",active:!0,description:"Emit a trigger event.",env:"client",subCommand:[]},{name:"remove",version:"0.0.1",example:"dphelper.triggers.remove('event')",author:"Dario Passariello",creationDate:"20250220",lastMod:"20250220",type:"function",active:!0,description:"Remove a trigger event.",env:"client",subCommand:[]}]},oe=new Map,nr={add:(e,t)=>{oe.has(e)||oe.set(e,new Set),oe.get(e).add(t)},on:(e,t)=>{nr.add(e,t)},emit:(e,...t)=>{let r=oe.get(e);r&&r.forEach(n=>{try{n(...t)}catch(o){console.error(`Error in trigger callback for event '${e}':`,o)}})},remove:e=>{oe.delete(e)},off:(e,t)=>{let r=oe.get(e);r&&r.delete(t)},clear:()=>{oe.clear()},list:()=>Array.from(oe.keys())};dphelper?.setDescription(ma,nr);var ha={name:"type",active:!0,subCommand:[{name:"of",version:"0.0.2",example:"dphelper.type.of(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Returns the type of the given parameter.",env:"both",subCommand:[]},{name:"instOfObj",version:"0.0.2",example:"dphelper.type.instOfObj(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Checks if the given parameter is an instance of Object.",env:"both",subCommand:[]},{name:"isNaN",version:"0.0.2",example:"dphelper.type.isNaN(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Checks if the given parameter is NaN.",env:"both",subCommand:[]},{name:"isBool",version:"0.0.2",example:"dphelper.type.isBool(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Checks if the given parameter is a boolean.",env:"both",subCommand:[]}]},va={of:e=>typeof e,instOfObj:e=>e instanceof Object,isNull:e=>t=>!e(t),isBool:e=>!e||e.length==null?!0:e==="1"};dphelper?.setDescription(ha,va);var ba={name:"UI",active:!0,subCommand:[{name:"input",version:"0.0.2",example:"dphelper.UI.input(...)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Creates an input element with specified options.",env:"client",subCommand:[]},{name:"fps",version:"0.0.2",example:"dphelper.UI.fps(true)",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Toggle a real-time FPS and Memory monitor overlay",env:"client",subCommand:[]},{name:"boxModel",version:"0.0.2",example:"dphelper.UI.boxModel(true)",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Toggle visual box-model highlighter for all elements",env:"client",subCommand:[]},{name:"anchorContext",version:"0.0.1",example:"dphelper.UI.anchorContext()",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Snapshot and auto-restore UI state (inputs, scroll) across reloads.",env:"client",subCommand:[]}]},ga={anchorContext:()=>{if(typeof window>"u"||typeof localStorage>"u")return;let e=`dp_anchor_${btoa(location.pathname).replace(/=/g,"")}`,t=()=>{let n={scroll:{x:window.scrollX,y:window.scrollY},inputs:Array.from(document.querySelectorAll("input, textarea, select")).filter(o=>o.type!=="password"&&!o.hasAttribute("data-private")&&o.getAttribute("autocomplete")!=="off").map(o=>({id:o.id,name:o.name,value:o.value}))};localStorage.setItem(e,JSON.stringify(n))},r=()=>{let n=localStorage.getItem(e);if(n)try{let o=JSON.parse(n);window.scrollTo(o.scroll.x,o.scroll.y),o.inputs.forEach(i=>{let c=i.id?document.getElementById(i.id):document.querySelector(`[name="${i.name}"]`);c&&(c.value=i.value)})}catch{console.warn("dphelper: anchorContext restoration failed.")}};window.addEventListener("beforeunload",t),r()},fps:(e=!0)=>{if(typeof document>"u")return;let t=document.getElementById("dphelper-fps-monitor");if(!e){t?.remove();return}t||(t=document.createElement("div"),t.id="dphelper-fps-monitor",Object.assign(t.style,{position:"fixed",top:"10px",right:"10px",padding:"8px 12px",background:"rgba(0,0,0,0.8)",color:"#0f0",fontFamily:"monospace",fontSize:"12px",zIndex:"99999",borderRadius:"4px",pointerEvents:"none",boxShadow:"0 2px 10px rgba(0,0,0,0.5)",border:"1px solid #333"}),document.body.appendChild(t));let r=0,n=performance.now(),o=()=>{if(!document.getElementById("dphelper-fps-monitor"))return;r++;let i=performance.now();if(i>=n+1e3){let c=Math.round(r*1e3/(i-n)),a=performance.memory?` | Mem: ${Math.round(performance.memory.usedJSHeapSize/1048576)}MB`:"";t.innerText=`FPS: ${c}${a}`,r=0,n=i}requestAnimationFrame(o)};requestAnimationFrame(o)},boxModel:(e=!0)=>{if(typeof document>"u")return;let t=document.getElementById("dphelper-boxmodel-style");if(!e){t?.remove();return}t||(t=document.createElement("style"),t.id="dphelper-boxmodel-style",t.innerHTML=`
163
163
  * { outline: 1px solid rgba(255, 0, 0, 0.3) !important; }
164
164
  * * { outline: 1px solid rgba(0, 255, 0, 0.3) !important; }
165
165
  * * * { outline: 1px solid rgba(0, 0, 255, 0.3) !important; }
166
166
  * * * * { outline: 1px solid rgba(255, 255, 0, 0.3) !important; }
167
- `,document.head.appendChild(t))}};dphelper?.setDescription(fa,ma);var ha={name:"window",active:!0,subCommand:[{name:"enhancement",version:"0.0.2",example:"dphelper.window.enhancement()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Use only one time at end of application",env:"client",subCommand:[]},{name:"center",version:"0.0.2",example:"dphelper.window.center({ url, title, name, w, h })",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Use to center popup to screen",env:"client",subCommand:[]},{name:"onBeforeUnLoad",version:"0.0.2",example:"dphelper.window.onBeforeUnLoad()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Message during leave the site",env:"client",subCommand:[]},{name:"purge",version:"0.0.2",example:"dphelper.window.purge()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Purge from memory",env:"client",subCommand:[]},{name:"stopZoomWheel",version:"0.0.2",example:"dphelper.window.stopZoomWheel(e)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20230527",type:"function",active:!0,description:"Stop Zoom Generated by Mouse Wheel",env:"client",subCommand:[]},{name:"setZoom",version:"0.0.2",example:"dphelper.window.setZoom([el,1])",author:"Dario Passariello",creationDate:"20240727",lastMod:"20220727",type:"function",active:!0,description:"Set the zoom level of an element",env:"client",subCommand:[]},{name:"getZoom",version:"0.0.2",example:"dphelper.window.getZoom([el])",author:"Dario Passariello",creationDate:"20240727",lastMod:"20220727",type:"function",active:!0,description:"Get the zoom level of an element",env:"client",subCommand:[]}]},ce=!1,nr=!1,va={enhancement:()=>{window.offScreenBuffering="auto",dphelper.window.animationframe()},animationframe:()=>window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||(e=>{window.setTimeout(e,1e3/120)}),center:({url:e,title:t,name:r,w:n,h:o})=>{let i=screenLeft!==void 0?screenLeft:screenX,c=screenTop!==void 0?screenTop:screenY,a=innerWidth||(document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width),s=innerHeight||(document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height),f=a/screen.availWidth,l=(a-n)/2/f+i,x=(s-o)/2/f+c,d=open(e,t,`
167
+ `,document.head.appendChild(t))}};dphelper?.setDescription(ba,ga);var ya={name:"window",active:!0,subCommand:[{name:"enhancement",version:"0.0.2",example:"dphelper.window.enhancement()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Use only one time at end of application",env:"client",subCommand:[]},{name:"center",version:"0.0.2",example:"dphelper.window.center({ url, title, name, w, h })",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Use to center popup to screen",env:"client",subCommand:[]},{name:"onBeforeUnLoad",version:"0.0.2",example:"dphelper.window.onBeforeUnLoad()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Message during leave the site",env:"client",subCommand:[]},{name:"purge",version:"0.0.2",example:"dphelper.window.purge()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Purge from memory",env:"client",subCommand:[]},{name:"stopZoomWheel",version:"0.0.2",example:"dphelper.window.stopZoomWheel(e)",author:"Dario Passariello",creationDate:"20230527",lastMod:"20230527",type:"function",active:!0,description:"Stop Zoom Generated by Mouse Wheel",env:"client",subCommand:[]},{name:"setZoom",version:"0.0.2",example:"dphelper.window.setZoom([el,1])",author:"Dario Passariello",creationDate:"20240727",lastMod:"20220727",type:"function",active:!0,description:"Set the zoom level of an element",env:"client",subCommand:[]},{name:"getZoom",version:"0.0.2",example:"dphelper.window.getZoom([el])",author:"Dario Passariello",creationDate:"20240727",lastMod:"20220727",type:"function",active:!0,description:"Get the zoom level of an element",env:"client",subCommand:[]}]},le=!1,ar=!1,Da={enhancement:()=>{window.offScreenBuffering="auto",dphelper.window.animationframe()},animationframe:()=>window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||(e=>{window.setTimeout(e,1e3/120)}),center:({url:e,title:t,name:r,w:n,h:o})=>{let i=screenLeft!==void 0?screenLeft:screenX,c=screenTop!==void 0?screenTop:screenY,a=innerWidth||(document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width),s=innerHeight||(document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height),f=a/screen.availWidth,l=(a-n)/2/f+i,x=(s-o)/2/f+c,d=open(e,t,`
168
168
  scrollbars=yes,
169
169
  width=${n/f},
170
170
  height=${o/f},
171
171
  top=${x},
172
172
  left=${l}
173
- `);onfocus=()=>d?.focus()},onBeforeUnLoad:e=>{let t="You have made some changes which you might want to save.",r=o=>(o.preventDefault(),t),n=e?document.querySelector(e):null;n&&n.addEventListener("input",()=>{n.value!==""?(ce=!0,addEventListener("beforeunload",r,{capture:!0})):(ce=!1,removeEventListener("beforeunload",r,{capture:!0}))}),nr===!1&&(document.body.addEventListener("click",o=>{let i=o.target;if(i&&i.tagName.toLowerCase()==="img"&&ce===!0){if(confirm(t)===!0){ce=!1;return}o.preventDefault()}}),nr=!0),addEventListener("popstate",o=>{if(ce===!0){if(confirm(t)===!0){ce=!1;return}o.stopImmediatePropagation(),o.preventDefault();return}}),onbeforeunload=o=>{if(ce===!0)return o.preventDefault(),o.returnValue=t}},purge:(e=document,t=1e4)=>{setTimeout(()=>{if(!e)return;let r=e.attributes;if(r){let n=r.length;for(let o=0;o<n;o+=1){let i=r[o].name;typeof e[i]=="function"&&(e[i]=null),typeof e[i]>"u"&&(e[i]=null)}}if(r=e.childNodes,r){let n=r.length;for(let o=0;o<n;o+=1)dphelper.purge(e.childNodes[o])}},t)},stopZoomWheel:()=>{addEventListener("wheel",e=>{e.ctrlKey&&e.preventDefault()},{passive:!1}),addEventListener("keydown",e=>{let t=dphelper.event.keys(e);["+","-","="].includes(t.key)&&t.ctrl&&e.preventDefault()})},setZoom:(e="html",t=1)=>{t<0&&(t=1);let r=document.querySelector(e);return r&&(r.style.zoom=String(t)),`New zoom value: ${t*100}% (css: ${t})`},getZoom:(e="html")=>{let t=document.querySelector(e);return Number(t?.style.zoom||1)}};dphelper?.setDescription(ha,va);var ba=setInterval(()=>{let e=dphelper?.socket?.list(),t=[];e&&(e.map(r=>(t.push(r.url),!1)),dphelper._list.sockets=t,t&&clearInterval(ba))},1e3);Object.preventExtensions(dphelper);Object.seal(dphelper);var ga=dphelper;return Ar(ya);})();
173
+ `);onfocus=()=>d?.focus()},onBeforeUnLoad:e=>{let t="You have made some changes which you might want to save.",r=o=>(o.preventDefault(),t),n=e?document.querySelector(e):null;n&&n.addEventListener("input",()=>{n.value!==""?(le=!0,addEventListener("beforeunload",r,{capture:!0})):(le=!1,removeEventListener("beforeunload",r,{capture:!0}))}),ar===!1&&(document.body.addEventListener("click",o=>{let i=o.target;if(i&&i.tagName.toLowerCase()==="img"&&le===!0){if(confirm(t)===!0){le=!1;return}o.preventDefault()}}),ar=!0),addEventListener("popstate",o=>{if(le===!0){if(confirm(t)===!0){le=!1;return}o.stopImmediatePropagation(),o.preventDefault();return}}),onbeforeunload=o=>{if(le===!0)return o.preventDefault(),o.returnValue=t}},purge:(e=document,t=1e4)=>{setTimeout(()=>{if(!e)return;let r=e.attributes;if(r){let n=r.length;for(let o=0;o<n;o+=1){let i=r[o].name;typeof e[i]=="function"&&(e[i]=null),typeof e[i]>"u"&&(e[i]=null)}}if(r=e.childNodes,r){let n=r.length;for(let o=0;o<n;o+=1)dphelper.purge(e.childNodes[o])}},t)},stopZoomWheel:()=>{addEventListener("wheel",e=>{e.ctrlKey&&e.preventDefault()},{passive:!1}),addEventListener("keydown",e=>{let t=dphelper.event.keys(e);["+","-","="].includes(t.key)&&t.ctrl&&e.preventDefault()})},setZoom:(e="html",t=1)=>{t<0&&(t=1);let r=document.querySelector(e);return r&&(r.style.zoom=String(t)),`New zoom value: ${t*100}% (css: ${t})`},getZoom:(e="html")=>{let t=document.querySelector(e);return Number(t?.style.zoom||1)}};dphelper?.setDescription(ya,Da);var Ca=setInterval(()=>{let e=dphelper?.socket?.list(),t=[];e&&(e.map(r=>(t.push(r.url),!1)),dphelper._list.sockets=t,t&&clearInterval(Ca))},1e3);Object.preventExtensions(dphelper);Object.seal(dphelper);var Ea=dphelper;return Br(Aa);})();
174
174
  ;window.dphelper=globalThis.dphelper;