dphelper 3.0.4 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dphelper.umd.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var dphelper=(()=>{var fr=Object.create;var we=Object.defineProperty;var mr=Object.getOwnPropertyDescriptor;var hr=Object.getOwnPropertyNames;var vr=Object.getPrototypeOf,br=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 z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gr=(e,t)=>{for(var r in t)we(e,r,{get:t[r],enumerable:!0})},zt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of hr(t))!br.call(e,i)&&i!==r&&we(e,i,{get:()=>t[i],enumerable:!(n=mr(t,i))||n.enumerable});return e};var yr=(e,t,r)=>(r=e!=null?fr(vr(e)):{},zt(t||!e||!e.__esModule?we(r,"default",{value:e,enumerable:!0}):r,e)),Dr=e=>zt(we({},"__esModule",{value:!0}),e);var Wt=z(()=>{});var L=z((Te,Ut)=>{(function(e,t){typeof Te=="object"?Ut.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 window<"u"&&window.crypto&&(n=window.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=Wt()}catch{}var i=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.")},o=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=o(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)}}})(),x=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||f).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(i());return new x.init(p,u)}}),l=c.enc={},f=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 x.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 x.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 x.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 x.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=z((qe,Gt)=>{(function(e,t){typeof qe=="object"?Gt.exports=qe=t(L()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(qe,function(e){return(function(t){var r=e,n=r.lib,i=n.Base,o=n.WordArray,c=r.x64={},a=c.Word=i.extend({init:function(x,l){this.high=x,this.low=l}}),s=c.WordArray=i.extend({init:function(x,l){x=this.words=x||[],l!=t?this.sigBytes=l:this.sigBytes=x.length*8},toX32:function(){for(var x=this.words,l=x.length,f=[],d=0;d<l;d++){var h=x[d];f.push(h.high),f.push(h.low)}return o.create(f,this.sigBytes)},clone:function(){for(var x=i.clone.call(this),l=x.words=this.words.slice(0),f=l.length,d=0;d<f;d++)l[d]=l[d].clone();return x}})})(),e})});var Jt=z((He,Yt)=>{(function(e,t){typeof He=="object"?Yt.exports=He=t(L()):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,i=n.init,o=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=[],x=0;x<a;x++)s[x>>>2]|=c[x]<<24-x%4*8;i.call(this,s,a)}else i.apply(this,arguments)};o.prototype=n}})(),e.lib.WordArray})});var Zt=z((Oe,Kt)=>{(function(e,t){typeof Oe=="object"?Kt.exports=Oe=t(L()):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,i=t.enc,o=i.Utf16=i.Utf16BE={stringify:function(a){for(var s=a.words,x=a.sigBytes,l=[],f=0;f<x;f+=2){var d=s[f>>>2]>>>16-f%4*8&65535;l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,x=[],l=0;l<s;l++)x[l>>>1]|=a.charCodeAt(l)<<16-l%2*16;return n.create(x,s*2)}};i.Utf16LE={stringify:function(a){for(var s=a.words,x=a.sigBytes,l=[],f=0;f<x;f+=2){var d=c(s[f>>>2]>>>16-f%4*8&65535);l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,x=[],l=0;l<s;l++)x[l>>>1]|=c(a.charCodeAt(l)<<16-l%2*16);return n.create(x,s*2)}};function c(a){return a<<8&4278255360|a>>>8&16711935}})(),e.enc.Utf16})});var ne=z((je,Vt)=>{(function(e,t){typeof je=="object"?Vt.exports=je=t(L()):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,i=t.enc,o=i.Base64={stringify:function(a){var s=a.words,x=a.sigBytes,l=this._map;a.clamp();for(var f=[],d=0;d<x;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<x;u++)f.push(l.charAt(b>>>6*(3-u)&63));var p=l.charAt(64);if(p)for(;f.length%4;)f.push(p);return f.join("")},parse:function(a){var s=a.length,x=this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var f=0;f<x.length;f++)l[x.charCodeAt(f)]=f}var d=x.charAt(64);if(d){var h=a.indexOf(d);h!==-1&&(s=h)}return c(a,s,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function c(a,s,x){for(var l=[],f=0,d=0;d<s;d++)if(d%4){var h=x[a.charCodeAt(d-1)]<<d%4*2,m=x[a.charCodeAt(d)]>>>6-d%4*2,v=h|m;l[f>>>2]|=v<<24-f%4*8,f++}return n.create(l,f)}})(),e.enc.Base64})});var Qt=z((Re,Xt)=>{(function(e,t){typeof Re=="object"?Xt.exports=Re=t(L()):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,i=t.enc,o=i.Base64url={stringify:function(a,s){s===void 0&&(s=!0);var x=a.words,l=a.sigBytes,f=s?this._safe_map:this._map;a.clamp();for(var d=[],h=0;h<l;h+=3)for(var m=x[h>>>2]>>>24-h%4*8&255,v=x[h+1>>>2]>>>24-(h+1)%4*8&255,b=x[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(f.charAt(u>>>6*(3-p)&63));var y=f.charAt(64);if(y)for(;d.length%4;)d.push(y);return d.join("")},parse:function(a,s){s===void 0&&(s=!0);var x=a.length,l=s?this._safe_map:this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var d=0;d<l.length;d++)f[l.charCodeAt(d)]=d}var h=l.charAt(64);if(h){var m=a.indexOf(h);m!==-1&&(x=m)}return c(a,x,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function c(a,s,x){for(var l=[],f=0,d=0;d<s;d++)if(d%4){var h=x[a.charCodeAt(d-1)]<<d%4*2,m=x[a.charCodeAt(d)]>>>6-d%4*2,v=h|m;l[f>>>2]|=v<<24-f%4*8,f++}return n.create(l,f)}})(),e.enc.Base64url})});var ae=z((ze,e0)=>{(function(e,t){typeof ze=="object"?e0.exports=ze=t(L()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(ze,function(e){return(function(t){var r=e,n=r.lib,i=n.WordArray,o=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=o.extend({_doReset:function(){this._hash=new i.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],j=h[m+14],N=h[m+15],A=p[0],w=p[1],S=p[2],B=p[3];A=x(A,w,S,B,y,7,a[0]),B=x(B,A,w,S,g,12,a[1]),S=x(S,B,A,w,D,17,a[2]),w=x(w,S,B,A,C,22,a[3]),A=x(A,w,S,B,M,7,a[4]),B=x(B,A,w,S,k,12,a[5]),S=x(S,B,A,w,P,17,a[6]),w=x(w,S,B,A,q,22,a[7]),A=x(A,w,S,B,E,7,a[8]),B=x(B,A,w,S,_,12,a[9]),S=x(S,B,A,w,T,17,a[10]),w=x(w,S,B,A,F,22,a[11]),A=x(A,w,S,B,O,7,a[12]),B=x(B,A,w,S,H,12,a[13]),S=x(S,B,A,w,j,17,a[14]),w=x(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,O,20,a[31]),A=f(A,w,S,B,k,4,a[32]),B=f(B,A,w,S,E,11,a[33]),S=f(S,B,A,w,F,16,a[34]),w=f(w,S,B,A,j,23,a[35]),A=f(A,w,S,B,g,4,a[36]),B=f(B,A,w,S,M,11,a[37]),S=f(S,B,A,w,q,16,a[38]),w=f(w,S,B,A,T,23,a[39]),A=f(A,w,S,B,H,4,a[40]),B=f(B,A,w,S,y,11,a[41]),S=f(S,B,A,w,C,16,a[42]),w=f(w,S,B,A,P,23,a[43]),A=f(A,w,S,B,_,4,a[44]),B=f(B,A,w,S,O,11,a[45]),S=f(S,B,A,w,N,16,a[46]),w=f(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,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=o.clone.call(this);return h._hash=this._hash.clone(),h}});function x(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 f(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=o._createHelper(s),r.HmacMD5=o._createHmacHelper(s)})(Math),e.MD5})});var At=z((Le,t0)=>{(function(e,t){typeof Le=="object"?t0.exports=Le=t(L()):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,i=r.Hasher,o=t.algo,c=[],a=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,x){for(var l=this._hash.words,f=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[x+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=(f<<5|f>>>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=f,f=p}l[0]=l[0]+f|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,x=s.words,l=this._nDataBytes*8,f=s.sigBytes*8;return x[f>>>5]|=128<<24-f%32,x[(f+64>>>9<<4)+14]=Math.floor(l/4294967296),x[(f+64>>>9<<4)+15]=l,s.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var s=i.clone.call(this);return s._hash=this._hash.clone(),s}});t.SHA1=i._createHelper(a),t.HmacSHA1=i._createHmacHelper(a)})(),e.SHA1})});var $e=z((Ne,r0)=>{(function(e,t){typeof Ne=="object"?r0.exports=Ne=t(L()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ne,function(e){return(function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,c=r.algo,a=[],s=[];(function(){function f(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;)f(h)&&(m<8&&(a[m]=d(t.pow(h,1/2))),s[m]=d(t.pow(h,1/3)),m++),h++})();var x=[],l=c.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(f,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)x[C]=f[d+C]|0;else{var M=x[C-15],k=(M<<25|M>>>7)^(M<<14|M>>>18)^M>>>3,P=x[C-2],q=(P<<15|P>>>17)^(P<<13|P>>>19)^P>>>10;x[C]=k+x[C-7]+q+x[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]+x[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 f=this._data,d=f.words,h=this._nDataBytes*8,m=f.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,f.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var f=o.clone.call(this);return f._hash=this._hash.clone(),f}});r.SHA256=o._createHelper(l),r.HmacSHA256=o._createHmacHelper(l)})(Math),e.SHA256})});var a0=z((Ie,n0)=>{(function(e,t,r){typeof Ie=="object"?n0.exports=Ie=t(L(),$e()):typeof define=="function"&&define.amd?define(["./core","./sha256"],t):t(e.CryptoJS)})(Ie,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,i=t.algo,o=i.SHA256,c=i.SHA224=o.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=o._doFinalize.call(this);return a.sigBytes-=4,a}});t.SHA224=o._createHelper(c),t.HmacSHA224=o._createHmacHelper(c)})(),e.SHA224})});var Bt=z((We,o0)=>{(function(e,t,r){typeof We=="object"?o0.exports=We=t(L(),Ce()):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,i=t.x64,o=i.Word,c=i.WordArray,a=t.algo;function s(){return o.create.apply(o,arguments)}var x=[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 f=a.SHA512=n.extend({_doReset:function(){this._hash=new c.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.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,j=g.high,N=g.low,A=D.high,w=D.low,S=C.high,B=C.low,I=M,$=k,U=P,R=q,pe=E,le=_,vt=T,xe=F,Z=O,G=H,Ee=j,fe=N,Ae=A,me=w,bt=S,he=B,V=0;V<80;V++){var K,te,Be=l[V];if(V<16)te=Be.high=d[h+V*2]|0,K=Be.low=d[h+V*2+1]|0;else{var wt=l[V-15],de=wt.high,ve=wt.low,tr=(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[V-2],ue=St.high,be=St.low,rr=(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[V-7],nr=_t.high,ar=_t.low,Mt=l[V-16],or=Mt.high,Pt=Mt.low;K=Ft+ar,te=tr+nr+(K>>>0<Ft>>>0?1:0),K=K+kt,te=te+rr+(K>>>0<kt>>>0?1:0),K=K+Pt,te=te+or+(K>>>0<Pt>>>0?1:0),Be.high=te,Be.low=K}var ir=Z&Ee^~Z&Ae,Tt=G&fe^~G&me,sr=I&U^I&pe^U&pe,cr=$&R^$&le^R&le,lr=(I>>>28|$<<4)^(I<<30|$>>>2)^(I<<25|$>>>7),qt=($>>>28|I<<4)^($<<30|I>>>2)^($<<25|I>>>7),dr=(Z>>>14|G<<18)^(Z>>>18|G<<14)^(Z<<23|G>>>9),ur=(G>>>14|Z<<18)^(G>>>18|Z<<14)^(G<<23|Z>>>9),Ht=x[V],pr=Ht.high,Ot=Ht.low,Y=he+ur,re=bt+dr+(Y>>>0<he>>>0?1:0),Y=Y+Tt,re=re+ir+(Y>>>0<Tt>>>0?1:0),Y=Y+Ot,re=re+pr+(Y>>>0<Ot>>>0?1:0),Y=Y+K,re=re+te+(Y>>>0<K>>>0?1:0),jt=qt+cr,xr=lr+sr+(jt>>>0<qt>>>0?1:0);bt=Ae,he=me,Ae=Ee,me=fe,Ee=Z,fe=G,G=xe+Y|0,Z=vt+re+(G>>>0<xe>>>0?1:0)|0,vt=pe,xe=le,pe=U,le=R,U=I,R=$,$=Y+jt|0,I=re+xr+($>>>0<Y>>>0?1:0)|0}k=v.low=k+$,v.high=M+I+(k>>>0<$>>>0?1:0),q=b.low=q+R,b.high=P+U+(q>>>0<R>>>0?1:0),_=u.low=_+le,u.high=E+pe+(_>>>0<le>>>0?1:0),F=p.low=F+xe,p.high=T+vt+(F>>>0<xe>>>0?1:0),H=y.low=H+G,y.high=O+Z+(H>>>0<G>>>0?1:0),N=g.low=N+fe,g.high=j+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+bt+(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(f),t.HmacSHA512=n._createHmacHelper(f)})(),e.SHA512})});var s0=z((Ue,i0)=>{(function(e,t,r){typeof Ue=="object"?i0.exports=Ue=t(L(),Ce(),Bt()):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,i=r.WordArray,o=t.algo,c=o.SHA512,a=o.SHA384=c.extend({_doReset:function(){this._hash=new i.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 l0=z((Ge,c0)=>{(function(e,t,r){typeof Ge=="object"?c0.exports=Ge=t(L(),Ce()):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,i=n.WordArray,o=n.Hasher,c=r.x64,a=c.Word,s=r.algo,x=[],l=[],f=[];(function(){for(var m=1,v=0,b=0;b<24;b++){x[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}f[g]=a.create(D,C)}})();var d=[];(function(){for(var m=0;m<25;m++)d[m]=a.create()})();var h=s.SHA3=o.extend({cfg:o.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],j=D.high,N=D.low,A=x[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],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],R=f[C];D.high^=R.high,D.low^=R.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 i.init(C,g)},clone:function(){for(var m=o.clone.call(this),v=m._state=this._state.slice(0),b=0;b<25;b++)v[b]=v[b].clone();return m}});r.SHA3=o._createHelper(h),r.HmacSHA3=o._createHmacHelper(h)})(Math),e.SHA3})});var u0=z((Ye,d0)=>{(function(e,t){typeof Ye=="object"?d0.exports=Ye=t(L()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ye,function(e){return(function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,c=r.algo,a=i.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=i.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]),x=i.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=i.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]),f=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=c.RIPEMD160=o.extend({_doReset:function(){this._hash=i.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=f.words,E=d.words,_=a.words,T=s.words,F=x.words,O=l.words,H,j,N,A,w,S,B,I,$,U;S=H=P[0],B=j=P[1],I=N=P[2],$=A=P[3],U=w=P[4];for(var R,C=0;C<80;C+=1)R=H+g[D+_[C]]|0,C<16?R+=m(j,N,A)+q[0]:C<32?R+=v(j,N,A)+q[1]:C<48?R+=b(j,N,A)+q[2]:C<64?R+=u(j,N,A)+q[3]:R+=p(j,N,A)+q[4],R=R|0,R=y(R,F[C]),R=R+w|0,H=w,w=A,A=y(N,10),N=j,j=R,R=S+g[D+T[C]]|0,C<16?R+=p(B,I,$)+E[0]:C<32?R+=u(B,I,$)+E[1]:C<48?R+=b(B,I,$)+E[2]:C<64?R+=v(B,I,$)+E[3]:R+=m(B,I,$)+E[4],R=R|0,R=y(R,O[C]),R=R+U|0,S=U,U=$,$=y(I,10),I=B,B=R;R=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]+j+I|0,P[0]=R},_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=o.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=o._createHelper(h),r.HmacRIPEMD160=o._createHmacHelper(h)})(Math),e.RIPEMD160})});var Ke=z((Je,p0)=>{(function(e,t){typeof Je=="object"?p0.exports=Je=t(L()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Je,function(e){(function(){var t=e,r=t.lib,n=r.Base,i=t.enc,o=i.Utf8,c=t.algo,a=c.HMAC=n.extend({init:function(s,x){s=this._hasher=new s.init,typeof x=="string"&&(x=o.parse(x));var l=s.blockSize,f=l*4;x.sigBytes>f&&(x=s.finalize(x)),x.clamp();for(var d=this._oKey=x.clone(),h=this._iKey=x.clone(),m=d.words,v=h.words,b=0;b<l;b++)m[b]^=1549556828,v[b]^=909522486;d.sigBytes=h.sigBytes=f,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 x=this._hasher,l=x.finalize(s);x.reset();var f=x.finalize(this._oKey.clone().concat(l));return f}})})()})});var f0=z((Ze,x0)=>{(function(e,t,r){typeof Ze=="object"?x0.exports=Ze=t(L(),$e(),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,i=r.WordArray,o=t.algo,c=o.SHA256,a=o.HMAC,s=o.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:25e4}),init:function(x){this.cfg=this.cfg.extend(x)},compute:function(x,l){for(var f=this.cfg,d=a.create(f.hasher,x),h=i.create(),m=i.create([1]),v=h.words,b=m.words,u=f.keySize,p=f.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(x,l,f){return s.create(f).compute(x,l)}})(),e.PBKDF2})});var Q=z((Ve,m0)=>{(function(e,t,r){typeof Ve=="object"?m0.exports=Ve=t(L(),At(),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,i=r.WordArray,o=t.algo,c=o.MD5,a=o.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,x){for(var l,f=this.cfg,d=f.hasher.create(),h=i.create(),m=h.words,v=f.keySize,b=f.iterations;m.length<v;){l&&d.update(l),l=d.update(s).finalize(x),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,x,l){return a.create(l).compute(s,x)}})(),e.EvpKDF})});var W=z((Xe,h0)=>{(function(e,t,r){typeof Xe=="object"?h0.exports=Xe=t(L(),Q()):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,i=n.Base,o=n.WordArray,c=n.BufferedBlockAlgorithm,a=r.enc,s=a.Utf8,x=a.Base64,l=r.algo,f=l.EvpKDF,d=n.Cipher=c.extend({cfg:i.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=i.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,j=T.slice(F,F+H);O.decryptBlock(T,F),_.call(this,T,F,H),this._prevBlock=j}});function _(T,F,O){var H,j=this._iv;j?(H=j,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=[],j=0;j<F;j+=4)H.push(O);var N=o.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=i.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?_=o.create([1398893684,1701076831]).concat(F).concat(T):_=T,_.toString(x)},parse:function(E){var _,T=x.parse(E),F=T.words;return F[0]==1398893684&&F[1]==1701076831&&(_=o.create(F.slice(2,4)),F.splice(0,4),T.sigBytes-=16),g.create({ciphertext:T,salt:_})}},M=n.SerializableCipher=i.extend({cfg:i.extend({format:C}),encrypt:function(E,_,T,F){F=this.cfg.extend(F);var O=E.createEncryptor(T,F),H=O.finalize(_),j=O.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 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=o.random(64/8)),O)var H=f.create({keySize:_+T,hasher:O}).compute(E,F);else var H=f.create({keySize:_+T}).compute(E,F);var j=o.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 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 b0=z((Qe,v0)=>{(function(e,t,r){typeof Qe=="object"?v0.exports=Qe=t(L(),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,i){var o=this._cipher,c=o.blockSize;r.call(this,n,i,c,o),this._prevBlock=n.slice(i,i+c)}}),t.Decryptor=t.extend({processBlock:function(n,i){var o=this._cipher,c=o.blockSize,a=n.slice(i,i+c);r.call(this,n,i,c,o),this._prevBlock=a}});function r(n,i,o,c){var a,s=this._iv;s?(a=s.slice(0),this._iv=void 0):a=this._prevBlock,c.encryptBlock(a,0);for(var x=0;x<o;x++)n[i+x]^=a[x]}return t})(),e.mode.CFB})});var y0=z((et,g0)=>{(function(e,t,r){typeof et=="object"?g0.exports=et=t(L(),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,i){var o=this._cipher,c=o.blockSize,a=this._iv,s=this._counter;a&&(s=this._counter=a.slice(0),this._iv=void 0);var x=s.slice(0);o.encryptBlock(x,0),s[c-1]=s[c-1]+1|0;for(var l=0;l<c;l++)n[i+l]^=x[l]}});return t.Decryptor=r,t})(),e.mode.CTR})});var C0=z((tt,D0)=>{(function(e,t,r){typeof tt=="object"?D0.exports=tt=t(L(),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(o){if((o>>24&255)===255){var c=o>>16&255,a=o>>8&255,s=o&255;c===255?(c=0,a===255?(a=0,s===255?s=0:++s):++a):++c,o=0,o+=c<<16,o+=a<<8,o+=s}else o+=1<<24;return o}function n(o){return(o[0]=r(o[0]))===0&&(o[1]=r(o[1])),o}var i=t.Encryptor=t.extend({processBlock:function(o,c){var a=this._cipher,s=a.blockSize,x=this._iv,l=this._counter;x&&(l=this._counter=x.slice(0),this._iv=void 0),n(l);var f=l.slice(0);a.encryptBlock(f,0);for(var d=0;d<s;d++)o[c+d]^=f[d]}});return t.Decryptor=i,t})(),e.mode.CTRGladman})});var A0=z((rt,E0)=>{(function(e,t,r){typeof rt=="object"?E0.exports=rt=t(L(),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,i){var o=this._cipher,c=o.blockSize,a=this._iv,s=this._keystream;a&&(s=this._keystream=a.slice(0),this._iv=void 0),o.encryptBlock(s,0);for(var x=0;x<c;x++)n[i+x]^=s[x]}});return t.Decryptor=r,t})(),e.mode.OFB})});var w0=z((nt,B0)=>{(function(e,t,r){typeof nt=="object"?B0.exports=nt=t(L(),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 S0=z((at,F0)=>{(function(e,t,r){typeof at=="object"?F0.exports=at=t(L(),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,i=r*4,o=i-n%i,c=n+o-1;t.clamp(),t.words[c>>>2]|=o<<24-c%4*8,t.sigBytes+=o},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Ansix923})});var _0=z((ot,k0)=>{(function(e,t,r){typeof ot=="object"?k0.exports=ot=t(L(),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,i=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Iso10126})});var P0=z((it,M0)=>{(function(e,t,r){typeof it=="object"?M0.exports=it=t(L(),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 q0=z((st,T0)=>{(function(e,t,r){typeof st=="object"?T0.exports=st=t(L(),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 O0=z((ct,H0)=>{(function(e,t,r){typeof ct=="object"?H0.exports=ct=t(L(),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 R0=z((lt,j0)=>{(function(e,t,r){typeof lt=="object"?j0.exports=lt=t(L(),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,i=n.CipherParams,o=r.enc,c=o.Hex,a=r.format,s=a.Hex={stringify:function(x){return x.ciphertext.toString(c)},parse:function(x){var l=c.parse(x);return i.create({ciphertext:l})}}})(),e.format.Hex})});var L0=z((dt,z0)=>{(function(e,t,r){typeof dt=="object"?z0.exports=dt=t(L(),ne(),ae(),Q(),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,i=t.algo,o=[],c=[],a=[],s=[],x=[],l=[],f=[],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,o[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,x[y]=P<<8|P>>>24,l[y]=P;var P=k*16843009^M*65537^C*257^y*16843008;f[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=i.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=o[u>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[u&255]):(u=u<<8|u>>>24,u=o[u>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[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]=f[o[u>>>24]]^d[o[u>>>16&255]]^h[o[u>>>8&255]]^m[o[u&255]]}}},encryptBlock:function(u,p){this._doCryptBlock(u,p,this._keySchedule,a,s,x,l,o)},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,f,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++],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 $0=z((ut,N0)=>{(function(e,t,r){typeof ut=="object"?N0.exports=ut=t(L(),ne(),ae(),Q(),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,i=r.BlockCipher,o=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],x=[{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],f=o.DES=i.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|=x[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=i._createHelper(f);var m=o.TripleDES=i.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=f.createEncryptor(n.create(u)),this._des2=f.createEncryptor(n.create(p)),this._des3=f.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=i._createHelper(m)})(),e.TripleDES})});var W0=z((pt,I0)=>{(function(e,t,r){typeof pt=="object"?I0.exports=pt=t(L(),ne(),ae(),Q(),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,i=t.algo,o=i.RC4=n.extend({_doReset:function(){for(var s=this._key,x=s.words,l=s.sigBytes,f=this._S=[],d=0;d<256;d++)f[d]=d;for(var d=0,h=0;d<256;d++){var m=d%l,v=x[m>>>2]>>>24-m%4*8&255;h=(h+f[d]+v)%256;var b=f[d];f[d]=f[h],f[h]=b}this._i=this._j=0},_doProcessBlock:function(s,x){s[x]^=c.call(this)},keySize:256/32,ivSize:0});function c(){for(var s=this._S,x=this._i,l=this._j,f=0,d=0;d<4;d++){x=(x+1)%256,l=(l+s[x])%256;var h=s[x];s[x]=s[l],s[l]=h,f|=s[(s[x]+s[l])%256]<<24-d*8}return this._i=x,this._j=l,f}t.RC4=n._createHelper(o);var a=i.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var s=this.cfg.drop;s>0;s--)c.call(this)}});t.RC4Drop=n._createHelper(a)})(),e.RC4})});var G0=z((xt,U0)=>{(function(e,t,r){typeof xt=="object"?U0.exports=xt=t(L(),ne(),ae(),Q(),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,i=t.algo,o=[],c=[],a=[],s=i.Rabbit=n.extend({_doReset:function(){for(var l=this._key.words,f=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++)x.call(this);for(var d=0;d<8;d++)m[d]^=h[d+4&7];if(f){var v=f.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++)x.call(this)}},_doProcessBlock:function(l,f){var d=this._X;x.call(this),o[0]=d[0]^d[5]>>>16^d[3]<<16,o[1]=d[2]^d[7]>>>16^d[5]<<16,o[2]=d[4]^d[1]>>>16^d[7]<<16,o[3]=d[6]^d[3]>>>16^d[1]<<16;for(var h=0;h<4;h++)o[h]=(o[h]<<8|o[h]>>>24)&16711935|(o[h]<<24|o[h]>>>8)&4278255360,l[f+h]^=o[h]},blockSize:128/32,ivSize:64/32});function x(){for(var l=this._X,f=this._C,d=0;d<8;d++)c[d]=f[d];f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0<c[0]>>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0<c[1]>>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0<c[2]>>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0<c[3]>>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0<c[4]>>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0<c[5]>>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0<c[6]>>>0?1:0)|0,this._b=f[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var h=l[d]+f[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 J0=z((ft,Y0)=>{(function(e,t,r){typeof ft=="object"?Y0.exports=ft=t(L(),ne(),ae(),Q(),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,i=t.algo,o=[],c=[],a=[],s=i.RabbitLegacy=n.extend({_doReset:function(){var l=this._key.words,f=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++)x.call(this);for(var m=0;m<8;m++)h[m]^=d[m+4&7];if(f){var v=f.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++)x.call(this)}},_doProcessBlock:function(l,f){var d=this._X;x.call(this),o[0]=d[0]^d[5]>>>16^d[3]<<16,o[1]=d[2]^d[7]>>>16^d[5]<<16,o[2]=d[4]^d[1]>>>16^d[7]<<16,o[3]=d[6]^d[3]>>>16^d[1]<<16;for(var h=0;h<4;h++)o[h]=(o[h]<<8|o[h]>>>24)&16711935|(o[h]<<24|o[h]>>>8)&4278255360,l[f+h]^=o[h]},blockSize:128/32,ivSize:64/32});function x(){for(var l=this._X,f=this._C,d=0;d<8;d++)c[d]=f[d];f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0<c[0]>>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0<c[1]>>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0<c[2]>>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0<c[3]>>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0<c[4]>>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0<c[5]>>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0<c[6]>>>0?1:0)|0,this._b=f[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var h=l[d]+f[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 Z0=z((mt,K0)=>{(function(e,t,r){typeof mt=="object"?K0.exports=mt=t(L(),ne(),ae(),Q(),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,i=t.algo;let o=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 x(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<o;++g)u=u^m.pbox[g],p=x(m,u)^p,y=u,u=p,p=y;return y=u,u=p,p=y,p=p^m.pbox[o],u=u^m.pbox[o+1],{left:u,right:p}}function f(m,v,b){let u=v,p=b,y;for(let g=o+1;g>1;--g)u=u^m.pbox[g],p=x(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<o+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<o+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=i.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=f(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 X0=z((ht,V0)=>{(function(e,t,r){typeof ht=="object"?V0.exports=ht=t(L(),Ce(),Jt(),Zt(),ne(),Qt(),ae(),At(),$e(),a0(),Bt(),s0(),l0(),u0(),Ke(),f0(),Q(),W(),b0(),y0(),C0(),A0(),w0(),S0(),_0(),P0(),q0(),O0(),R0(),L0(),$0(),W0(),G0(),J0(),Z0()):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 ma={};gr(ma,{default:()=>fa});var gt={name:"dphelper",version:"3.0.4",type:"module",main:"index.js",browser:"./dist/dphelper.umd.js",description:"dphelper devtools for developers",license:"MIT",types:"./types/index.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/index.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",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:{"@types/crypto-js":"4.2.2","@types/node":"^25.3.0","crypto-js":"4.2.0",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 yt={info:{title:"List",description:"Complete list of tools"},categories:["3party","system","financial","memory","numbers","time","path","file","forms","ui","other","development"]};var Fe=typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:void 0,J=Fe.dphelper;if(J&&typeof J=="object"&&J!==null&&!Array.isArray(J))try{J._list||Object.defineProperty(J,"_list",{value:{scripts:[],sockets:[],...yt},writable:!0,configurable:!0}),J.version||Object.defineProperty(J,"version",{value:gt.version,writable:!0,configurable:!0}),J.isServer||Object.defineProperty(J,"isServer",{value:typeof window>"u",writable:!0,configurable:!0}),J.isBrowser||Object.defineProperty(J,"isBrowser",{value:typeof window<"u",writable:!0,configurable:!0}),console.debug("dphelper already initialized, updated properties")}catch(e){console.debug("Could not update dphelper properties:",e)}else{if(J!==void 0)try{delete Fe.dphelper}catch{}Object.defineProperty(Fe,"dphelper",{value:{},writable:!0,configurable:!0,enumerable:!1}),Object.defineProperties(Fe.dphelper,{_list:{value:{scripts:[],sockets:[],...yt}},version:{value:gt.version},isServer:{value:typeof window>"u"},isBrowser:{value:typeof window<"u"}})}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 Ar={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",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),ge=(e,t=0)=>{let r=" ".repeat(t);if(Dt(e))return Se(e);if(Array.isArray(e)){if(e.length===0)return"[0]:";let n=e[0];if(!Dt(n)&&!Array.isArray(n)){let i=Object.keys(n),o=`[${e.length}]{${i.join(",")}}:`;for(let c of e){let a=i.map(s=>Se(c[s])).join(",");o+=`
3
- ${r} ${a}`}return o}else return`[${e.length}]: `+e.map(Se).join(",")}else return Object.entries(e).map(([n,i])=>{let o=n.includes(" ")||n.includes(":")?`"${n}"`:n;if(!Dt(i)){let c=ge(i,t+1);return c.startsWith("[")?`${o}${c}`:`${o}:
4
- ${r}${c}`}return`${o}: ${Se(i)}`}).join(`
1
+ "use strict";var dphelper=(()=>{var fr=Object.create;var we=Object.defineProperty;var mr=Object.getOwnPropertyDescriptor;var hr=Object.getOwnPropertyNames;var vr=Object.getPrototypeOf,br=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 z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gr=(e,t)=>{for(var r in t)we(e,r,{get:t[r],enumerable:!0})},zt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of hr(t))!br.call(e,i)&&i!==r&&we(e,i,{get:()=>t[i],enumerable:!(n=mr(t,i))||n.enumerable});return e};var yr=(e,t,r)=>(r=e!=null?fr(vr(e)):{},zt(t||!e||!e.__esModule?we(r,"default",{value:e,enumerable:!0}):r,e)),Dr=e=>zt(we({},"__esModule",{value:!0}),e);var Wt=z(()=>{});var L=z((Pe,Ut)=>{(function(e,t){typeof Pe=="object"?Ut.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 window<"u"&&window.crypto&&(n=window.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=Wt()}catch{}var i=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.")},o=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=o(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)}}})(),x=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||f).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(i());return new x.init(p,u)}}),l=c.enc={},f=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 x.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 x.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 x.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 x.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=z((Te,Gt)=>{(function(e,t){typeof Te=="object"?Gt.exports=Te=t(L()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Te,function(e){return(function(t){var r=e,n=r.lib,i=n.Base,o=n.WordArray,c=r.x64={},a=c.Word=i.extend({init:function(x,l){this.high=x,this.low=l}}),s=c.WordArray=i.extend({init:function(x,l){x=this.words=x||[],l!=t?this.sigBytes=l:this.sigBytes=x.length*8},toX32:function(){for(var x=this.words,l=x.length,f=[],d=0;d<l;d++){var h=x[d];f.push(h.high),f.push(h.low)}return o.create(f,this.sigBytes)},clone:function(){for(var x=i.clone.call(this),l=x.words=this.words.slice(0),f=l.length,d=0;d<f;d++)l[d]=l[d].clone();return x}})})(),e})});var Jt=z((qe,Yt)=>{(function(e,t){typeof qe=="object"?Yt.exports=qe=t(L()):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,i=n.init,o=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=[],x=0;x<a;x++)s[x>>>2]|=c[x]<<24-x%4*8;i.call(this,s,a)}else i.apply(this,arguments)};o.prototype=n}})(),e.lib.WordArray})});var Zt=z((He,Kt)=>{(function(e,t){typeof He=="object"?Kt.exports=He=t(L()):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,i=t.enc,o=i.Utf16=i.Utf16BE={stringify:function(a){for(var s=a.words,x=a.sigBytes,l=[],f=0;f<x;f+=2){var d=s[f>>>2]>>>16-f%4*8&65535;l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,x=[],l=0;l<s;l++)x[l>>>1]|=a.charCodeAt(l)<<16-l%2*16;return n.create(x,s*2)}};i.Utf16LE={stringify:function(a){for(var s=a.words,x=a.sigBytes,l=[],f=0;f<x;f+=2){var d=c(s[f>>>2]>>>16-f%4*8&65535);l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,x=[],l=0;l<s;l++)x[l>>>1]|=c(a.charCodeAt(l)<<16-l%2*16);return n.create(x,s*2)}};function c(a){return a<<8&4278255360|a>>>8&16711935}})(),e.enc.Utf16})});var ne=z((Oe,Vt)=>{(function(e,t){typeof Oe=="object"?Vt.exports=Oe=t(L()):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,i=t.enc,o=i.Base64={stringify:function(a){var s=a.words,x=a.sigBytes,l=this._map;a.clamp();for(var f=[],d=0;d<x;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<x;u++)f.push(l.charAt(b>>>6*(3-u)&63));var p=l.charAt(64);if(p)for(;f.length%4;)f.push(p);return f.join("")},parse:function(a){var s=a.length,x=this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var f=0;f<x.length;f++)l[x.charCodeAt(f)]=f}var d=x.charAt(64);if(d){var h=a.indexOf(d);h!==-1&&(s=h)}return c(a,s,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function c(a,s,x){for(var l=[],f=0,d=0;d<s;d++)if(d%4){var h=x[a.charCodeAt(d-1)]<<d%4*2,m=x[a.charCodeAt(d)]>>>6-d%4*2,v=h|m;l[f>>>2]|=v<<24-f%4*8,f++}return n.create(l,f)}})(),e.enc.Base64})});var Qt=z((je,Xt)=>{(function(e,t){typeof je=="object"?Xt.exports=je=t(L()):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,i=t.enc,o=i.Base64url={stringify:function(a,s){s===void 0&&(s=!0);var x=a.words,l=a.sigBytes,f=s?this._safe_map:this._map;a.clamp();for(var d=[],h=0;h<l;h+=3)for(var m=x[h>>>2]>>>24-h%4*8&255,v=x[h+1>>>2]>>>24-(h+1)%4*8&255,b=x[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(f.charAt(u>>>6*(3-p)&63));var y=f.charAt(64);if(y)for(;d.length%4;)d.push(y);return d.join("")},parse:function(a,s){s===void 0&&(s=!0);var x=a.length,l=s?this._safe_map:this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var d=0;d<l.length;d++)f[l.charCodeAt(d)]=d}var h=l.charAt(64);if(h){var m=a.indexOf(h);m!==-1&&(x=m)}return c(a,x,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function c(a,s,x){for(var l=[],f=0,d=0;d<s;d++)if(d%4){var h=x[a.charCodeAt(d-1)]<<d%4*2,m=x[a.charCodeAt(d)]>>>6-d%4*2,v=h|m;l[f>>>2]|=v<<24-f%4*8,f++}return n.create(l,f)}})(),e.enc.Base64url})});var ae=z((Re,e0)=>{(function(e,t){typeof Re=="object"?e0.exports=Re=t(L()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Re,function(e){return(function(t){var r=e,n=r.lib,i=n.WordArray,o=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=o.extend({_doReset:function(){this._hash=new i.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],j=h[m+14],N=h[m+15],A=p[0],w=p[1],S=p[2],B=p[3];A=x(A,w,S,B,y,7,a[0]),B=x(B,A,w,S,g,12,a[1]),S=x(S,B,A,w,D,17,a[2]),w=x(w,S,B,A,C,22,a[3]),A=x(A,w,S,B,M,7,a[4]),B=x(B,A,w,S,k,12,a[5]),S=x(S,B,A,w,P,17,a[6]),w=x(w,S,B,A,q,22,a[7]),A=x(A,w,S,B,E,7,a[8]),B=x(B,A,w,S,_,12,a[9]),S=x(S,B,A,w,T,17,a[10]),w=x(w,S,B,A,F,22,a[11]),A=x(A,w,S,B,O,7,a[12]),B=x(B,A,w,S,H,12,a[13]),S=x(S,B,A,w,j,17,a[14]),w=x(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,O,20,a[31]),A=f(A,w,S,B,k,4,a[32]),B=f(B,A,w,S,E,11,a[33]),S=f(S,B,A,w,F,16,a[34]),w=f(w,S,B,A,j,23,a[35]),A=f(A,w,S,B,g,4,a[36]),B=f(B,A,w,S,M,11,a[37]),S=f(S,B,A,w,q,16,a[38]),w=f(w,S,B,A,T,23,a[39]),A=f(A,w,S,B,H,4,a[40]),B=f(B,A,w,S,y,11,a[41]),S=f(S,B,A,w,C,16,a[42]),w=f(w,S,B,A,P,23,a[43]),A=f(A,w,S,B,_,4,a[44]),B=f(B,A,w,S,O,11,a[45]),S=f(S,B,A,w,N,16,a[46]),w=f(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,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=o.clone.call(this);return h._hash=this._hash.clone(),h}});function x(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 f(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=o._createHelper(s),r.HmacMD5=o._createHmacHelper(s)})(Math),e.MD5})});var At=z((ze,t0)=>{(function(e,t){typeof ze=="object"?t0.exports=ze=t(L()):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,i=r.Hasher,o=t.algo,c=[],a=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,x){for(var l=this._hash.words,f=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[x+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=(f<<5|f>>>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=f,f=p}l[0]=l[0]+f|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,x=s.words,l=this._nDataBytes*8,f=s.sigBytes*8;return x[f>>>5]|=128<<24-f%32,x[(f+64>>>9<<4)+14]=Math.floor(l/4294967296),x[(f+64>>>9<<4)+15]=l,s.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var s=i.clone.call(this);return s._hash=this._hash.clone(),s}});t.SHA1=i._createHelper(a),t.HmacSHA1=i._createHmacHelper(a)})(),e.SHA1})});var Ne=z((Le,r0)=>{(function(e,t){typeof Le=="object"?r0.exports=Le=t(L()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Le,function(e){return(function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,c=r.algo,a=[],s=[];(function(){function f(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;)f(h)&&(m<8&&(a[m]=d(t.pow(h,1/2))),s[m]=d(t.pow(h,1/3)),m++),h++})();var x=[],l=c.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(f,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)x[C]=f[d+C]|0;else{var M=x[C-15],k=(M<<25|M>>>7)^(M<<14|M>>>18)^M>>>3,P=x[C-2],q=(P<<15|P>>>17)^(P<<13|P>>>19)^P>>>10;x[C]=k+x[C-7]+q+x[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]+x[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 f=this._data,d=f.words,h=this._nDataBytes*8,m=f.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,f.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var f=o.clone.call(this);return f._hash=this._hash.clone(),f}});r.SHA256=o._createHelper(l),r.HmacSHA256=o._createHmacHelper(l)})(Math),e.SHA256})});var a0=z(($e,n0)=>{(function(e,t,r){typeof $e=="object"?n0.exports=$e=t(L(),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,i=t.algo,o=i.SHA256,c=i.SHA224=o.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=o._doFinalize.call(this);return a.sigBytes-=4,a}});t.SHA224=o._createHelper(c),t.HmacSHA224=o._createHmacHelper(c)})(),e.SHA224})});var Bt=z((Ie,o0)=>{(function(e,t,r){typeof Ie=="object"?o0.exports=Ie=t(L(),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,i=t.x64,o=i.Word,c=i.WordArray,a=t.algo;function s(){return o.create.apply(o,arguments)}var x=[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 f=a.SHA512=n.extend({_doReset:function(){this._hash=new c.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.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,j=g.high,N=g.low,A=D.high,w=D.low,S=C.high,B=C.low,I=M,$=k,U=P,R=q,pe=E,le=_,ht=T,xe=F,Z=O,G=H,Ee=j,fe=N,Ae=A,me=w,vt=S,he=B,V=0;V<80;V++){var K,te,Be=l[V];if(V<16)te=Be.high=d[h+V*2]|0,K=Be.low=d[h+V*2+1]|0;else{var wt=l[V-15],de=wt.high,ve=wt.low,tr=(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[V-2],ue=St.high,be=St.low,rr=(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[V-7],nr=_t.high,ar=_t.low,Mt=l[V-16],or=Mt.high,Pt=Mt.low;K=Ft+ar,te=tr+nr+(K>>>0<Ft>>>0?1:0),K=K+kt,te=te+rr+(K>>>0<kt>>>0?1:0),K=K+Pt,te=te+or+(K>>>0<Pt>>>0?1:0),Be.high=te,Be.low=K}var ir=Z&Ee^~Z&Ae,Tt=G&fe^~G&me,sr=I&U^I&pe^U&pe,cr=$&R^$&le^R&le,lr=(I>>>28|$<<4)^(I<<30|$>>>2)^(I<<25|$>>>7),qt=($>>>28|I<<4)^($<<30|I>>>2)^($<<25|I>>>7),dr=(Z>>>14|G<<18)^(Z>>>18|G<<14)^(Z<<23|G>>>9),ur=(G>>>14|Z<<18)^(G>>>18|Z<<14)^(G<<23|Z>>>9),Ht=x[V],pr=Ht.high,Ot=Ht.low,Y=he+ur,re=vt+dr+(Y>>>0<he>>>0?1:0),Y=Y+Tt,re=re+ir+(Y>>>0<Tt>>>0?1:0),Y=Y+Ot,re=re+pr+(Y>>>0<Ot>>>0?1:0),Y=Y+K,re=re+te+(Y>>>0<K>>>0?1:0),jt=qt+cr,xr=lr+sr+(jt>>>0<qt>>>0?1:0);vt=Ae,he=me,Ae=Ee,me=fe,Ee=Z,fe=G,G=xe+Y|0,Z=ht+re+(G>>>0<xe>>>0?1:0)|0,ht=pe,xe=le,pe=U,le=R,U=I,R=$,$=Y+jt|0,I=re+xr+($>>>0<Y>>>0?1:0)|0}k=v.low=k+$,v.high=M+I+(k>>>0<$>>>0?1:0),q=b.low=q+R,b.high=P+U+(q>>>0<R>>>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+Z+(H>>>0<G>>>0?1:0),N=g.low=N+fe,g.high=j+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(f),t.HmacSHA512=n._createHmacHelper(f)})(),e.SHA512})});var s0=z((We,i0)=>{(function(e,t,r){typeof We=="object"?i0.exports=We=t(L(),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,i=r.WordArray,o=t.algo,c=o.SHA512,a=o.SHA384=c.extend({_doReset:function(){this._hash=new i.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 l0=z((Ue,c0)=>{(function(e,t,r){typeof Ue=="object"?c0.exports=Ue=t(L(),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,i=n.WordArray,o=n.Hasher,c=r.x64,a=c.Word,s=r.algo,x=[],l=[],f=[];(function(){for(var m=1,v=0,b=0;b<24;b++){x[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}f[g]=a.create(D,C)}})();var d=[];(function(){for(var m=0;m<25;m++)d[m]=a.create()})();var h=s.SHA3=o.extend({cfg:o.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],j=D.high,N=D.low,A=x[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],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],R=f[C];D.high^=R.high,D.low^=R.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 i.init(C,g)},clone:function(){for(var m=o.clone.call(this),v=m._state=this._state.slice(0),b=0;b<25;b++)v[b]=v[b].clone();return m}});r.SHA3=o._createHelper(h),r.HmacSHA3=o._createHmacHelper(h)})(Math),e.SHA3})});var u0=z((Ge,d0)=>{(function(e,t){typeof Ge=="object"?d0.exports=Ge=t(L()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ge,function(e){return(function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,c=r.algo,a=i.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=i.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]),x=i.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=i.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]),f=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=c.RIPEMD160=o.extend({_doReset:function(){this._hash=i.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=f.words,E=d.words,_=a.words,T=s.words,F=x.words,O=l.words,H,j,N,A,w,S,B,I,$,U;S=H=P[0],B=j=P[1],I=N=P[2],$=A=P[3],U=w=P[4];for(var R,C=0;C<80;C+=1)R=H+g[D+_[C]]|0,C<16?R+=m(j,N,A)+q[0]:C<32?R+=v(j,N,A)+q[1]:C<48?R+=b(j,N,A)+q[2]:C<64?R+=u(j,N,A)+q[3]:R+=p(j,N,A)+q[4],R=R|0,R=y(R,F[C]),R=R+w|0,H=w,w=A,A=y(N,10),N=j,j=R,R=S+g[D+T[C]]|0,C<16?R+=p(B,I,$)+E[0]:C<32?R+=u(B,I,$)+E[1]:C<48?R+=b(B,I,$)+E[2]:C<64?R+=v(B,I,$)+E[3]:R+=m(B,I,$)+E[4],R=R|0,R=y(R,O[C]),R=R+U|0,S=U,U=$,$=y(I,10),I=B,B=R;R=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]+j+I|0,P[0]=R},_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=o.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=o._createHelper(h),r.HmacRIPEMD160=o._createHmacHelper(h)})(Math),e.RIPEMD160})});var Je=z((Ye,p0)=>{(function(e,t){typeof Ye=="object"?p0.exports=Ye=t(L()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ye,function(e){(function(){var t=e,r=t.lib,n=r.Base,i=t.enc,o=i.Utf8,c=t.algo,a=c.HMAC=n.extend({init:function(s,x){s=this._hasher=new s.init,typeof x=="string"&&(x=o.parse(x));var l=s.blockSize,f=l*4;x.sigBytes>f&&(x=s.finalize(x)),x.clamp();for(var d=this._oKey=x.clone(),h=this._iKey=x.clone(),m=d.words,v=h.words,b=0;b<l;b++)m[b]^=1549556828,v[b]^=909522486;d.sigBytes=h.sigBytes=f,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 x=this._hasher,l=x.finalize(s);x.reset();var f=x.finalize(this._oKey.clone().concat(l));return f}})})()})});var f0=z((Ke,x0)=>{(function(e,t,r){typeof Ke=="object"?x0.exports=Ke=t(L(),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,i=r.WordArray,o=t.algo,c=o.SHA256,a=o.HMAC,s=o.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:25e4}),init:function(x){this.cfg=this.cfg.extend(x)},compute:function(x,l){for(var f=this.cfg,d=a.create(f.hasher,x),h=i.create(),m=i.create([1]),v=h.words,b=m.words,u=f.keySize,p=f.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(x,l,f){return s.create(f).compute(x,l)}})(),e.PBKDF2})});var Q=z((Ze,m0)=>{(function(e,t,r){typeof Ze=="object"?m0.exports=Ze=t(L(),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,i=r.WordArray,o=t.algo,c=o.MD5,a=o.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,x){for(var l,f=this.cfg,d=f.hasher.create(),h=i.create(),m=h.words,v=f.keySize,b=f.iterations;m.length<v;){l&&d.update(l),l=d.update(s).finalize(x),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,x,l){return a.create(l).compute(s,x)}})(),e.EvpKDF})});var W=z((Ve,h0)=>{(function(e,t,r){typeof Ve=="object"?h0.exports=Ve=t(L(),Q()):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,i=n.Base,o=n.WordArray,c=n.BufferedBlockAlgorithm,a=r.enc,s=a.Utf8,x=a.Base64,l=r.algo,f=l.EvpKDF,d=n.Cipher=c.extend({cfg:i.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=i.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,j=T.slice(F,F+H);O.decryptBlock(T,F),_.call(this,T,F,H),this._prevBlock=j}});function _(T,F,O){var H,j=this._iv;j?(H=j,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=[],j=0;j<F;j+=4)H.push(O);var N=o.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=i.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?_=o.create([1398893684,1701076831]).concat(F).concat(T):_=T,_.toString(x)},parse:function(E){var _,T=x.parse(E),F=T.words;return F[0]==1398893684&&F[1]==1701076831&&(_=o.create(F.slice(2,4)),F.splice(0,4),T.sigBytes-=16),g.create({ciphertext:T,salt:_})}},M=n.SerializableCipher=i.extend({cfg:i.extend({format:C}),encrypt:function(E,_,T,F){F=this.cfg.extend(F);var O=E.createEncryptor(T,F),H=O.finalize(_),j=O.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 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=o.random(64/8)),O)var H=f.create({keySize:_+T,hasher:O}).compute(E,F);else var H=f.create({keySize:_+T}).compute(E,F);var j=o.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 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 b0=z((Xe,v0)=>{(function(e,t,r){typeof Xe=="object"?v0.exports=Xe=t(L(),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,i){var o=this._cipher,c=o.blockSize;r.call(this,n,i,c,o),this._prevBlock=n.slice(i,i+c)}}),t.Decryptor=t.extend({processBlock:function(n,i){var o=this._cipher,c=o.blockSize,a=n.slice(i,i+c);r.call(this,n,i,c,o),this._prevBlock=a}});function r(n,i,o,c){var a,s=this._iv;s?(a=s.slice(0),this._iv=void 0):a=this._prevBlock,c.encryptBlock(a,0);for(var x=0;x<o;x++)n[i+x]^=a[x]}return t})(),e.mode.CFB})});var y0=z((Qe,g0)=>{(function(e,t,r){typeof Qe=="object"?g0.exports=Qe=t(L(),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,i){var o=this._cipher,c=o.blockSize,a=this._iv,s=this._counter;a&&(s=this._counter=a.slice(0),this._iv=void 0);var x=s.slice(0);o.encryptBlock(x,0),s[c-1]=s[c-1]+1|0;for(var l=0;l<c;l++)n[i+l]^=x[l]}});return t.Decryptor=r,t})(),e.mode.CTR})});var C0=z((et,D0)=>{(function(e,t,r){typeof et=="object"?D0.exports=et=t(L(),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(o){if((o>>24&255)===255){var c=o>>16&255,a=o>>8&255,s=o&255;c===255?(c=0,a===255?(a=0,s===255?s=0:++s):++a):++c,o=0,o+=c<<16,o+=a<<8,o+=s}else o+=1<<24;return o}function n(o){return(o[0]=r(o[0]))===0&&(o[1]=r(o[1])),o}var i=t.Encryptor=t.extend({processBlock:function(o,c){var a=this._cipher,s=a.blockSize,x=this._iv,l=this._counter;x&&(l=this._counter=x.slice(0),this._iv=void 0),n(l);var f=l.slice(0);a.encryptBlock(f,0);for(var d=0;d<s;d++)o[c+d]^=f[d]}});return t.Decryptor=i,t})(),e.mode.CTRGladman})});var A0=z((tt,E0)=>{(function(e,t,r){typeof tt=="object"?E0.exports=tt=t(L(),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,i){var o=this._cipher,c=o.blockSize,a=this._iv,s=this._keystream;a&&(s=this._keystream=a.slice(0),this._iv=void 0),o.encryptBlock(s,0);for(var x=0;x<c;x++)n[i+x]^=s[x]}});return t.Decryptor=r,t})(),e.mode.OFB})});var w0=z((rt,B0)=>{(function(e,t,r){typeof rt=="object"?B0.exports=rt=t(L(),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 S0=z((nt,F0)=>{(function(e,t,r){typeof nt=="object"?F0.exports=nt=t(L(),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,i=r*4,o=i-n%i,c=n+o-1;t.clamp(),t.words[c>>>2]|=o<<24-c%4*8,t.sigBytes+=o},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Ansix923})});var _0=z((at,k0)=>{(function(e,t,r){typeof at=="object"?k0.exports=at=t(L(),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,i=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Iso10126})});var P0=z((ot,M0)=>{(function(e,t,r){typeof ot=="object"?M0.exports=ot=t(L(),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 q0=z((it,T0)=>{(function(e,t,r){typeof it=="object"?T0.exports=it=t(L(),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 O0=z((st,H0)=>{(function(e,t,r){typeof st=="object"?H0.exports=st=t(L(),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 R0=z((ct,j0)=>{(function(e,t,r){typeof ct=="object"?j0.exports=ct=t(L(),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,i=n.CipherParams,o=r.enc,c=o.Hex,a=r.format,s=a.Hex={stringify:function(x){return x.ciphertext.toString(c)},parse:function(x){var l=c.parse(x);return i.create({ciphertext:l})}}})(),e.format.Hex})});var L0=z((lt,z0)=>{(function(e,t,r){typeof lt=="object"?z0.exports=lt=t(L(),ne(),ae(),Q(),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,i=t.algo,o=[],c=[],a=[],s=[],x=[],l=[],f=[],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,o[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,x[y]=P<<8|P>>>24,l[y]=P;var P=k*16843009^M*65537^C*257^y*16843008;f[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=i.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=o[u>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[u&255]):(u=u<<8|u>>>24,u=o[u>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[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]=f[o[u>>>24]]^d[o[u>>>16&255]]^h[o[u>>>8&255]]^m[o[u&255]]}}},encryptBlock:function(u,p){this._doCryptBlock(u,p,this._keySchedule,a,s,x,l,o)},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,f,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++],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 $0=z((dt,N0)=>{(function(e,t,r){typeof dt=="object"?N0.exports=dt=t(L(),ne(),ae(),Q(),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,i=r.BlockCipher,o=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],x=[{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],f=o.DES=i.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|=x[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=i._createHelper(f);var m=o.TripleDES=i.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=f.createEncryptor(n.create(u)),this._des2=f.createEncryptor(n.create(p)),this._des3=f.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=i._createHelper(m)})(),e.TripleDES})});var W0=z((ut,I0)=>{(function(e,t,r){typeof ut=="object"?I0.exports=ut=t(L(),ne(),ae(),Q(),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,i=t.algo,o=i.RC4=n.extend({_doReset:function(){for(var s=this._key,x=s.words,l=s.sigBytes,f=this._S=[],d=0;d<256;d++)f[d]=d;for(var d=0,h=0;d<256;d++){var m=d%l,v=x[m>>>2]>>>24-m%4*8&255;h=(h+f[d]+v)%256;var b=f[d];f[d]=f[h],f[h]=b}this._i=this._j=0},_doProcessBlock:function(s,x){s[x]^=c.call(this)},keySize:256/32,ivSize:0});function c(){for(var s=this._S,x=this._i,l=this._j,f=0,d=0;d<4;d++){x=(x+1)%256,l=(l+s[x])%256;var h=s[x];s[x]=s[l],s[l]=h,f|=s[(s[x]+s[l])%256]<<24-d*8}return this._i=x,this._j=l,f}t.RC4=n._createHelper(o);var a=i.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var s=this.cfg.drop;s>0;s--)c.call(this)}});t.RC4Drop=n._createHelper(a)})(),e.RC4})});var G0=z((pt,U0)=>{(function(e,t,r){typeof pt=="object"?U0.exports=pt=t(L(),ne(),ae(),Q(),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,i=t.algo,o=[],c=[],a=[],s=i.Rabbit=n.extend({_doReset:function(){for(var l=this._key.words,f=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++)x.call(this);for(var d=0;d<8;d++)m[d]^=h[d+4&7];if(f){var v=f.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++)x.call(this)}},_doProcessBlock:function(l,f){var d=this._X;x.call(this),o[0]=d[0]^d[5]>>>16^d[3]<<16,o[1]=d[2]^d[7]>>>16^d[5]<<16,o[2]=d[4]^d[1]>>>16^d[7]<<16,o[3]=d[6]^d[3]>>>16^d[1]<<16;for(var h=0;h<4;h++)o[h]=(o[h]<<8|o[h]>>>24)&16711935|(o[h]<<24|o[h]>>>8)&4278255360,l[f+h]^=o[h]},blockSize:128/32,ivSize:64/32});function x(){for(var l=this._X,f=this._C,d=0;d<8;d++)c[d]=f[d];f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0<c[0]>>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0<c[1]>>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0<c[2]>>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0<c[3]>>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0<c[4]>>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0<c[5]>>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0<c[6]>>>0?1:0)|0,this._b=f[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var h=l[d]+f[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 J0=z((xt,Y0)=>{(function(e,t,r){typeof xt=="object"?Y0.exports=xt=t(L(),ne(),ae(),Q(),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,i=t.algo,o=[],c=[],a=[],s=i.RabbitLegacy=n.extend({_doReset:function(){var l=this._key.words,f=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++)x.call(this);for(var m=0;m<8;m++)h[m]^=d[m+4&7];if(f){var v=f.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++)x.call(this)}},_doProcessBlock:function(l,f){var d=this._X;x.call(this),o[0]=d[0]^d[5]>>>16^d[3]<<16,o[1]=d[2]^d[7]>>>16^d[5]<<16,o[2]=d[4]^d[1]>>>16^d[7]<<16,o[3]=d[6]^d[3]>>>16^d[1]<<16;for(var h=0;h<4;h++)o[h]=(o[h]<<8|o[h]>>>24)&16711935|(o[h]<<24|o[h]>>>8)&4278255360,l[f+h]^=o[h]},blockSize:128/32,ivSize:64/32});function x(){for(var l=this._X,f=this._C,d=0;d<8;d++)c[d]=f[d];f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0<c[0]>>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0<c[1]>>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0<c[2]>>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0<c[3]>>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0<c[4]>>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0<c[5]>>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0<c[6]>>>0?1:0)|0,this._b=f[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var h=l[d]+f[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 Z0=z((ft,K0)=>{(function(e,t,r){typeof ft=="object"?K0.exports=ft=t(L(),ne(),ae(),Q(),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,i=t.algo;let o=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 x(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<o;++g)u=u^m.pbox[g],p=x(m,u)^p,y=u,u=p,p=y;return y=u,u=p,p=y,p=p^m.pbox[o],u=u^m.pbox[o+1],{left:u,right:p}}function f(m,v,b){let u=v,p=b,y;for(let g=o+1;g>1;--g)u=u^m.pbox[g],p=x(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<o+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<o+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=i.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=f(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 X0=z((mt,V0)=>{(function(e,t,r){typeof mt=="object"?V0.exports=mt=t(L(),Ce(),Jt(),Zt(),ne(),Qt(),ae(),At(),Ne(),a0(),Bt(),s0(),l0(),u0(),Je(),f0(),Q(),W(),b0(),y0(),C0(),A0(),w0(),S0(),_0(),P0(),q0(),O0(),R0(),L0(),$0(),W0(),G0(),J0(),Z0()):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 ma={};gr(ma,{default:()=>fa});var bt={name:"dphelper",version:"3.0.5",type:"module",main:"index.js",browser:"./dist/dphelper.umd.js",description:"dphelper devtools for developers",license:"MIT",types:"./types/index.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/index.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",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:{"@types/crypto-js":"4.2.2","@types/node":"^25.3.0","crypto-js":"4.2.0",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 gt={info:{title:"List",description:"Complete list of tools"},categories:["3party","system","financial","memory","numbers","time","path","file","forms","ui","other","development"]};var yt=typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:void 0,J=yt.dphelper;if(J&&typeof J=="object"&&J!==null&&!Array.isArray(J))try{J._list||Object.defineProperty(J,"_list",{value:{scripts:[],sockets:[],...gt},writable:!0,configurable:!0}),J.version||Object.defineProperty(J,"version",{value:bt.version,writable:!0,configurable:!0}),J.isServer||Object.defineProperty(J,"isServer",{value:typeof window>"u",writable:!0,configurable:!0}),J.isBrowser||Object.defineProperty(J,"isBrowser",{value:typeof window<"u",writable:!0,configurable:!0})}catch{}else J===void 0&&(Object.defineProperty(yt,"dphelper",{value:{},writable:!0,configurable:!0,enumerable:!1}),Object.defineProperties(yt.dphelper,{_list:{value:{scripts:[],sockets:[],...gt}},version:{value:bt.version},isServer:{value:typeof window>"u"},isBrowser:{value:typeof window<"u"}}));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 Ar={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 i=Object.keys(n),o=`[${e.length}]{${i.join(",")}}:`;for(let c of e){let a=i.map(s=>Fe(c[s])).join(",");o+=`
3
+ ${r} ${a}`}return o}else return`[${e.length}]: `+e.map(Fe).join(",")}else return Object.entries(e).map(([n,i])=>{let o=n.includes(" ")||n.includes(":")?`"${n}"`:n;if(!Dt(i)){let c=ge(i,t+1);return c.startsWith("[")?`${o}${c}`:`${o}:
4
+ ${r}${c}`}return`${o}: ${Fe(i)}`}).join(`
5
5
  ${r}`)},Lt={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
6
  `).filter(c=>c.trim()!==""),r={},n=[{indent:-1,obj:r}],i=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),o=c=>{let a=[],s="",x=!1;for(let l=0;l<c.length;l++){let f=c[l];f==='"'&&c[l-1]!=="\\"?x=!x:f===","&&!x?(a.push(s.trim()),s=""):s+=f}return a.push(s.trim()),a.map(i)};for(let c=0;c<t.length;c++){let a=t[c],s=a.search(/\S/),x=a.trim();if(!x)continue;for(;n.length>1&&s<=n[n.length-1].indent;)n.pop();let l=n[n.length-1];if(l.fields){let v=o(x),b={};l.fields.forEach((u,p)=>b[u]=v[p]),l.obj.push(b);continue}let f=x.indexOf(":");if(f===-1)continue;let d=x.slice(0,f).trim(),h=x.slice(f+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?o(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]=i(h)}}return r},chunker:(e,t={})=>{if(!e)return[];let r=t.size||1e3,n=t.overlap||200,i=[],o=0;for(;o<e.length;)i.push(e.slice(o,o+r)),o+=r-n;return i},similarity:(e,t)=>{if(e.length!==t.length)return 0;let r=0,n=0,i=0;for(let o=0;o<e.length;o++)r+=e[o]*t[o],n+=e[o]*e[o],i+=t[o]*t[o];return r/(Math.sqrt(n)*Math.sqrt(i))},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 i=t[n.trim()];return i!==void 0?typeof i=="object"?ge(i):String(i):`{{${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
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={ua:navigator.userAgent,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 Lt.smartSanitize(r)}};dphelper?.setDescription(Ar,Lt);var Br={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'.
@@ -60,11 +60,11 @@ ${r}`)},Lt={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(Ur,Gr);var Yr={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:[]}]},Jr={select:(e="body")=>{let t=typeof e=="string"?document.querySelector(e):e,r=n=>{let i=n.target,o=i.tagName.toLowerCase();if(!["input","button","select","textarea"].includes(o)&&!i.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(Yr,Jr);var ie={},Kr={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:[]}]},Zr={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(Kr,Zr);var Vr={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:[]}]},Xr={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 i=n.offsetWidth||1,o=n.offsetHeight||1,c=r?t/Math.max(i/window.innerWidth,o/window.innerHeight):t/Math.min(i/window.innerWidth,o/window.innerHeight);n.style.transform=`scale(${c})`}};dphelper?.setDescription(Vr,Xr);var Qr={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:[]}]},en={list:e=>window.getEventListeners(e),multi:(e,t,r)=>{let n=t.split(" ");for(let i of n)e.addEventListener(i,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=i=>{let o=document.querySelector(t),c=o?.offsetHeight||0,a=o?.offsetWidth||0,s=Math.max(i.pageY,0)-c/2,x=Math.max(i.pageX,0)-a/2;localStorage.setItem(e,JSON.stringify([s,x]))};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(Qr,en);var tn={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 i=await window.fetch(e,t);if(!i.ok&&r>0)throw new Error(i.statusText);return i}catch(i){if(r===0)throw i;return console.warn(`[dphelper] Fetch failed, retrying in ${n}ms... (${r} retries left)`),await new Promise(o=>setTimeout(o,n)),ke(e,t,r-1,n*2)}},Ct=(e,t)=>ke(e,t);Ct.get=(e,t)=>ke(e,{...t,method:"GET"});Ct.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(tn,Ct);var rn={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:[]}]},nn={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 i=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),o=(a,s)=>{let x=a[0];x.slice(-1)==="]"&&(x=x.slice(0,-1));let l={};return a.length===1?l[x]=i(s):(a.shift(),l[x]=o(a,s)),l},c=t.serializeArray();for(let a of c){let s=a.value,x=a.name.split("["),l=o(x,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-Z 0-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,i=e[1]||24,o=`<form id='${t}'>`;o+="<div class='table'>",o+="<div class='title'>";for(let c=1;c<=n;c++)o+=`<span>${c}</span>`;o+="</div>";for(let c=1;c<=i;c++){o+=`<div class='row'><span>${c}</span>`;for(let a=1;a<=n;a++)o+=`<input name='data[${a}][${c}]' tabindex='${a.toString().padStart(2,"0")}${c.toString().padStart(2,"0")}' type='number' onclick="this.select()" value='${Math.floor(Math.random()*100)}' title='${a} to ${c}' />`;o+="</div>"}o+="</div>",o+="</form>",r&&(r.innerHTML=o)},sanitize:e=>{if(e)return e.replace(/[^\w ]/g,"").replace(/[&/\\#, +()$~%.'":*?<>{}]/g,"")}};dphelper?.setDescription(rn,nn);var an={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:[]}]},on={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(an,on);var sn={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:[]}]},cn={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=(o,c)=>c===null?"":c,n=Object.keys(t[0]),i=t.map(o=>n.map(c=>JSON.stringify(o[c],r)).join(","));return i.unshift(n.join(",")),i.join(`\r
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(Ur,Gr);var Yr={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:[]}]},Jr={select:(e="body")=>{let t=typeof e=="string"?document.querySelector(e):e,r=n=>{let i=n.target,o=i.tagName.toLowerCase();if(!["input","button","select","textarea"].includes(o)&&!i.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(Yr,Jr);var ie={},Kr={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:[]}]},Zr={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(Kr,Zr);var Vr={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:[]}]},Xr={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 i=n.offsetWidth||1,o=n.offsetHeight||1,c=r?t/Math.max(i/window.innerWidth,o/window.innerHeight):t/Math.min(i/window.innerWidth,o/window.innerHeight);n.style.transform=`scale(${c})`}};dphelper?.setDescription(Vr,Xr);var Qr={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:[]}]},en={list:e=>window.getEventListeners(e),multi:(e,t,r)=>{let n=t.split(" ");for(let i of n)e.addEventListener(i,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=i=>{let o=document.querySelector(t),c=o?.offsetHeight||0,a=o?.offsetWidth||0,s=Math.max(i.pageY,0)-c/2,x=Math.max(i.pageX,0)-a/2;localStorage.setItem(e,JSON.stringify([s,x]))};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(Qr,en);var tn={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 i=await window.fetch(e,t);if(!i.ok&&r>0)throw new Error(i.statusText);return i}catch(i){if(r===0)throw i;return console.warn(`[dphelper] Fetch failed, retrying in ${n}ms... (${r} retries left)`),await new Promise(o=>setTimeout(o,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(tn,Ct);var rn={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:[]}]},nn={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 i=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),o=(a,s)=>{let x=a[0];x.slice(-1)==="]"&&(x=x.slice(0,-1));let l={};return a.length===1?l[x]=i(s):(a.shift(),l[x]=o(a,s)),l},c=t.serializeArray();for(let a of c){let s=a.value,x=a.name.split("["),l=o(x,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-Z 0-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,i=e[1]||24,o=`<form id='${t}'>`;o+="<div class='table'>",o+="<div class='title'>";for(let c=1;c<=n;c++)o+=`<span>${c}</span>`;o+="</div>";for(let c=1;c<=i;c++){o+=`<div class='row'><span>${c}</span>`;for(let a=1;a<=n;a++)o+=`<input name='data[${a}][${c}]' tabindex='${a.toString().padStart(2,"0")}${c.toString().padStart(2,"0")}' type='number' onclick="this.select()" value='${Math.floor(Math.random()*100)}' title='${a} to ${c}' />`;o+="</div>"}o+="</div>",o+="</form>",r&&(r.innerHTML=o)},sanitize:e=>{if(e)return e.replace(/[^\w ]/g,"").replace(/[&/\\#, +()$~%.'":*?<>{}]/g,"")}};dphelper?.setDescription(rn,nn);var an={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:[]}]},on={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(an,on);var sn={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:[]}]},cn={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=(o,c)=>c===null?"":c,n=Object.keys(t[0]),i=t.map(o=>n.map(c=>JSON.stringify(o[c],r)).join(","));return i.unshift(n.join(",")),i.join(`\r
64
64
  `)},saveCsvAs:(e,t)=>{let r=new Blob([e],{type:"text/csv;charset=utf-8;"}),n=document.createElement("a"),i=dphelper.date.dateTimeToString(new Date(Date.now())),o=`${t}_${i}.csv`,c=URL.createObjectURL(r);n.setAttribute("href",c),n.setAttribute("download",o),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(i=>{let[o,...c]=i.split(":"),a=dphelper.json.sanitizeJsonValue(o?.trim()??"");if(!o)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(i=>i!=="").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(sn,cn);var ln={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:[]}]},dn={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 i=document.createElement("script");i.src=n,i.async=!0,i.defer=!0,r.appendChild(i)}},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(ln,dn);var un={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:[]},pn={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(un,pn);var xn={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:[]}]},fn={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(xn,fn);var mn={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:[]}]},hn={lock:e=>{if(!e)return;let t=window,r=e.split(".");if(r.length<2)return;let n=r[0],i=r[1];if(!n||!i)return;let o=t[n];o&&Object.defineProperty(o,i,{writable:!1,configurable:!1})},unlock:e=>{if(!e)return;let t=window,r=e.split(".");if(r.length<2)return;let n=r[0],i=r[1];if(!n||!i)return;let o=t[n];o&&Object.defineProperty(o,i,{writable:!0,configurable:!0})}};dphelper?.setDescription(mn,hn);var vn={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:[]}]},bn={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 i="";for(let o in r)if(Object.hasOwn(r,o)){let c=r[o];typeof c=="object"&&c!==null?i+=`${n}<${o}>
65
65
  ${t(c,`${n} `)}${n}</${o}>
66
66
  `:i+=`${n}<${o}>${c}</${o}>
67
- `}return i};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 i=Object.getOwnPropertyDescriptor(e,n);i&&(i.enumerable=t?.enumerable??!0,i.configurable=t?.configurable??!0,i.writable=t?.writable??!0,Object.defineProperty(e,n,i)),typeof e[n]=="object"&&e[n]!==null&&dphelper.obj.setProps(e[n],t)})}};dphelper?.setDescription(vn,bn);var gn={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:[]}]},yn={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(gn,yn);var Dn={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:[]}]},Cn={check:e=>e&&(e instanceof Promise||Object.prototype.toString.call(e)==="[object Promise]")};dphelper?.setDescription(Dn,Cn);var En={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:[]}]},An={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(En,An);var _e="dphelper_popup_positions",It=(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},Et=(e,t)=>{let r=Me();for(let o of r)if(e>=o.left&&e<o.left+o.width&&t>=o.top&&t<o.top+o.height)return o;if(!r.length)return{id:"default",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0};let n=r[0],i=1/0;for(let o of r){let c=o.left+o.width/2,a=o.top+o.height/2,s=Math.sqrt(Math.pow(c-e,2)+Math.pow(a-t,2));s<i&&(i=s,n=o)}return n},Bn=(e,t,r)=>({relX:e-r.left,relY:t-r.top}),wn=(e,t,r)=>({left:r.left+e,top:r.top+t}),Fn=(e,t)=>{if(typeof window>"u")return;let r=t||window,n=r.screenX||r.screenLeft||0,i=r.screenY||r.screenTop||0,o=r.outerWidth||800,c=r.outerHeight||600,a=Me(),s=Et(n,i),{relX:x,relY:l}=Bn(n,i,s),f=It(s.width,s.height,s.left,s.top),d=Pe();d.monitors=a,d.popups[e]={id:e,monitorId:s.id,left:x,top:l,width:o,height:c,monitorFingerprint:f},localStorage.setItem(_e,JSON.stringify(d))},Sn=e=>{if(typeof window>"u")return null;let t=Pe(),r=t.popups[e];if(!r)return null;let n=Me(),i=n.find(s=>It(s.width,s.height,s.left,s.top)===r.monitorFingerprint),o;i?o=i:(console.warn(`[dphelper] Monitor changed, restoring popup "${e}" on closest available monitor`),o=Et(r.left+(n[0]?.left||0),r.top+(n[0]?.top||0)));let{left:c,top:a}=wn(r.left,r.top,o);return{left:c,top:a,width:r.width,height:r.height}},kn=e=>{let t=Pe();delete t.popups[e],localStorage.setItem(_e,JSON.stringify(t))},_n=()=>Pe().popups,Mn=()=>Et(window.screenX||0,window.screenY||0),Pn=()=>{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:{}}},se={save:Fn,restore:Sn,remove:kn,list:_n,clear:Pn,getMonitors:Me,getCurrentMonitor:Mn};var Tn={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:[]}]},qn={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(Tn,qn);var Hn={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:[]}]},On={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 i};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 i=Object.getOwnPropertyDescriptor(e,n);i&&(i.enumerable=t?.enumerable??!0,i.configurable=t?.configurable??!0,i.writable=t?.writable??!0,Object.defineProperty(e,n,i)),typeof e[n]=="object"&&e[n]!==null&&dphelper.obj.setProps(e[n],t)})}};dphelper?.setDescription(vn,bn);var gn={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:[]}]},yn={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(gn,yn);var Dn={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:[]}]},Cn={check:e=>e&&(e instanceof Promise||Object.prototype.toString.call(e)==="[object Promise]")};dphelper?.setDescription(Dn,Cn);var En={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:[]}]},An={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(En,An);var ke="dphelper_popup_positions",It=(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 o of r)if(e>=o.left&&e<o.left+o.width&&t>=o.top&&t<o.top+o.height)return o;if(!r.length)return{id:"default",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0};let n=r[0],i=1/0;for(let o of r){let c=o.left+o.width/2,a=o.top+o.height/2,s=Math.sqrt(Math.pow(c-e,2)+Math.pow(a-t,2));s<i&&(i=s,n=o)}return n},Bn=(e,t,r)=>({relX:e-r.left,relY:t-r.top}),wn=(e,t,r)=>({left:r.left+e,top:r.top+t}),Fn=(e,t)=>{if(typeof window>"u")return;let r=t||window,n=r.screenX||r.screenLeft||0,i=r.screenY||r.screenTop||0,o=r.outerWidth||800,c=r.outerHeight||600,a=_e(),s=Et(n,i),{relX:x,relY:l}=Bn(n,i,s),f=It(s.width,s.height,s.left,s.top),d=Me();d.monitors=a,d.popups[e]={id:e,monitorId:s.id,left:x,top:l,width:o,height:c,monitorFingerprint:f},localStorage.setItem(ke,JSON.stringify(d))},Sn=e=>{if(typeof window>"u")return null;let t=Me(),r=t.popups[e];if(!r)return null;let n=_e(),i=n.find(s=>It(s.width,s.height,s.left,s.top)===r.monitorFingerprint),o;i?o=i:(console.warn(`[dphelper] Monitor changed, restoring popup "${e}" on closest available monitor`),o=Et(r.left+(n[0]?.left||0),r.top+(n[0]?.top||0)));let{left:c,top:a}=wn(r.left,r.top,o);return{left:c,top:a,width:r.width,height:r.height}},kn=e=>{let t=Me();delete t.popups[e],localStorage.setItem(ke,JSON.stringify(t))},_n=()=>Me().popups,Mn=()=>Et(window.screenX||0,window.screenY||0),Pn=()=>{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:Fn,restore:Sn,remove:kn,list:_n,clear:Pn,getMonitors:_e,getCurrentMonitor:Mn};var Tn={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:[]}]},qn={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(Tn,qn);var Hn={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:[]}]},On={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};
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
- var R={name:"dphelper",version:"3.0.4",type:"module",main:"index.js",browser:"./dist/dphelper.umd.js",description:"dphelper devtools for developers",license:"MIT",types:"./types/index.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/index.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",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:{"@types/crypto-js":"4.2.2","@types/node":"^25.3.0","crypto-js":"4.2.0",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 z={info:{title:"List",description:"Complete list of tools"},categories:["3party","system","financial","memory","numbers","time","path","file","forms","ui","other","development"]};var j=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:void 0,y=j.dphelper;if(y&&typeof y=="object"&&y!==null&&!Array.isArray(y))try{y._list||Object.defineProperty(y,"_list",{value:{scripts:[],sockets:[],...z},writable:!0,configurable:!0}),y.version||Object.defineProperty(y,"version",{value:R.version,writable:!0,configurable:!0}),y.isServer||Object.defineProperty(y,"isServer",{value:typeof window>"u",writable:!0,configurable:!0}),y.isBrowser||Object.defineProperty(y,"isBrowser",{value:typeof window<"u",writable:!0,configurable:!0}),console.debug("dphelper already initialized, updated properties")}catch(e){console.debug("Could not update dphelper properties:",e)}else{if(y!==void 0)try{delete j.dphelper}catch{}Object.defineProperty(j,"dphelper",{value:{},writable:!0,configurable:!0,enumerable:!1}),Object.defineProperties(j.dphelper,{_list:{value:{scripts:[],sockets:[],...z}},version:{value:R.version},isServer:{value:typeof window>"u"},isBrowser:{value:typeof window<"u"}})}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 K={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:[]}]},H=e=>e===null||typeof e!="object",$=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),E=(e,t=0)=>{let r=" ".repeat(t);if(H(e))return $(e);if(Array.isArray(e)){if(e.length===0)return"[0]:";let n=e[0];if(!H(n)&&!Array.isArray(n)){let o=Object.keys(n),a=`[${e.length}]{${o.join(",")}}:`;for(let i of e){let s=o.map(l=>$(i[l])).join(",");a+=`
3
- ${r} ${s}`}return a}else return`[${e.length}]: `+e.map($).join(",")}else return Object.entries(e).map(([n,o])=>{let a=n.includes(" ")||n.includes(":")?`"${n}"`:n;if(!H(o)){let i=E(o,t+1);return i.startsWith("[")?`${a}${i}`:`${a}:
4
- ${r}${i}`}return`${a}: ${$(o)}`}).join(`
1
+ var I={name:"dphelper",version:"3.0.5",type:"module",main:"index.js",browser:"./dist/dphelper.umd.js",description:"dphelper devtools for developers",license:"MIT",types:"./types/index.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/index.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",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:{"@types/crypto-js":"4.2.2","@types/node":"^25.3.0","crypto-js":"4.2.0",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 R={info:{title:"List",description:"Complete list of tools"},categories:["3party","system","financial","memory","numbers","time","path","file","forms","ui","other","development"]};var z=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:void 0,y=z.dphelper;if(y&&typeof y=="object"&&y!==null&&!Array.isArray(y))try{y._list||Object.defineProperty(y,"_list",{value:{scripts:[],sockets:[],...R},writable:!0,configurable:!0}),y.version||Object.defineProperty(y,"version",{value:I.version,writable:!0,configurable:!0}),y.isServer||Object.defineProperty(y,"isServer",{value:typeof window>"u",writable:!0,configurable:!0}),y.isBrowser||Object.defineProperty(y,"isBrowser",{value:typeof window<"u",writable:!0,configurable:!0})}catch{}else y===void 0&&(Object.defineProperty(z,"dphelper",{value:{},writable:!0,configurable:!0,enumerable:!1}),Object.defineProperties(z.dphelper,{_list:{value:{scripts:[],sockets:[],...R}},version:{value:I.version},isServer:{value:typeof window>"u"},isBrowser:{value:typeof window<"u"}}));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 K={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:[]}]},H=e=>e===null||typeof e!="object",j=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),E=(e,t=0)=>{let r=" ".repeat(t);if(H(e))return j(e);if(Array.isArray(e)){if(e.length===0)return"[0]:";let n=e[0];if(!H(n)&&!Array.isArray(n)){let o=Object.keys(n),a=`[${e.length}]{${o.join(",")}}:`;for(let i of e){let s=o.map(l=>j(i[l])).join(",");a+=`
3
+ ${r} ${s}`}return a}else return`[${e.length}]: `+e.map(j).join(",")}else return Object.entries(e).map(([n,o])=>{let a=n.includes(" ")||n.includes(":")?`"${n}"`:n;if(!H(o)){let i=E(o,t+1);return i.startsWith("[")?`${a}${i}`:`${a}:
4
+ ${r}${i}`}return`${a}: ${j(o)}`}).join(`
5
5
  ${r}`)},U={tokenCount:e=>{let t=typeof e=="string"?e:E(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=>E(e),toonToJson:e=>{if(!e)return null;let t=e.split(`
6
6
  `).filter(i=>i.trim()!==""),r={},n=[{indent:-1,obj:r}],o=i=>(i=i.trim(),i==="true"?!0:i==="false"?!1:i==="null"?null:!isNaN(Number(i))&&i!==""?Number(i):i.startsWith('"')&&i.endsWith('"')?i.slice(1,-1).replace(/\\"/g,'"'):i),a=i=>{let s=[],l="",c=!1;for(let d=0;d<i.length;d++){let p=i[d];p==='"'&&i[d-1]!=="\\"?c=!c:p===","&&!c?(s.push(l.trim()),l=""):l+=p}return s.push(l.trim()),s.map(o)};for(let i=0;i<t.length;i++){let s=t[i],l=s.search(/\S/),c=s.trim();if(!c)continue;for(;n.length>1&&l<=n[n.length-1].indent;)n.pop();let d=n[n.length-1];if(d.fields){let f=a(c),g={};d.fields.forEach((v,x)=>g[v]=f[x]),d.obj.push(g);continue}let p=c.indexOf(":");if(p===-1)continue;let m=c.slice(0,p).trim(),h=c.slice(p+1).trim(),b=m.match(/^(.+?)\[(\d+)\](?:{(.+?)})?$/);if(b){let[f,g,v,x]=b,k=[];d.obj[g]=k,x?n.push({indent:l,obj:k,key:g,fields:x.split(",").map(T=>T.trim())}):h?a(h).forEach(T=>k.push(T)):n.push({indent:l,obj:k,key:g})}else{let f=t[i+1],g=f?f.search(/\S/):-1;if(h===""&&g>l){let v={};d.obj[m]=v,n.push({indent:l,obj:v,key:m})}else d.obj[m]=o(h)}}return r},chunker:(e,t={})=>{if(!e)return[];let r=t.size||1e3,n=t.overlap||200,o=[],a=0;for(;a<e.length;)o.push(e.slice(a,a+r)),a+=r-n;return o},similarity:(e,t)=>{if(e.length!==t.length)return 0;let r=0,n=0,o=0;for(let a=0;a<e.length;a++)r+=e[a]*t[a],n+=e[a]*e[a],o+=t[a]*t[a];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"?E(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
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={ua:navigator.userAgent,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=E(t);return U.smartSanitize(r)}};dphelper?.setDescription(K,U);var X={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'.
@@ -60,11 +60,11 @@ ${r}`)},U={tokenCount:e=>{let t=typeof e=="string"?e:E(e);if(!t)return 0;let r=t
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(ve,ye);var De={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:[]}]},we={select:(e="body")=>{let t=typeof e=="string"?document.querySelector(e):e,r=n=>{let o=n.target,a=o.tagName.toLowerCase();if(!["input","button","select","textarea"].includes(a)&&!o.classList.contains("selectable"))return document.querySelectorAll("*").forEach(i=>i.blur()),n.preventDefault(),!1;document.querySelectorAll("img, a, input, button").forEach(i=>{i.addEventListener("dragstart",s=>(s.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(De,we);var C={},xe={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:[]}]},Ce={set:(e,t={})=>dispatchEvent(new CustomEvent(String(e),t)),listen:(e,t)=>{C[e]&&C[e].length>0&&dphelper.dispatch.remove(e);let r=n=>t?setTimeout(()=>t(n),0):null;window.addEventListener(e,r),C[e]||(C[e]=[]),C[e].push(r)},remove:e=>{let t=C[e];t&&(t.forEach(r=>window.removeEventListener(e,r)),delete C[e])}};dphelper?.setDescription(xe,Ce);var Me={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:[]}]},Se={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,a=n.offsetHeight||1,i=r?t/Math.max(o/window.innerWidth,a/window.innerHeight):t/Math.min(o/window.innerWidth,a/window.innerHeight);n.style.transform=`scale(${i})`}};dphelper?.setDescription(Me,Se);var Pe={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:[]}]},ke={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 a=document.querySelector(t),i=a?.offsetHeight||0,s=a?.offsetWidth||0,l=Math.max(o.pageY,0)-i/2,c=Math.max(o.pageX,0)-s/2;localStorage.setItem(e,JSON.stringify([l,c]))};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(Pe,ke);var Te={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:[]}]},q=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(a=>setTimeout(a,n)),q(e,t,r-1,n*2)}},F=(e,t)=>q(e,t);F.get=(e,t)=>q(e,{...t,method:"GET"});F.post=(e,t,r={})=>{let n=typeof t=="object"&&t!==null;return q(e,{...r,method:"POST",headers:{...n?{"Content-Type":"application/json"}:{},...r.headers||{}},body:n?JSON.stringify(t):t})};dphelper?.setDescription(Te,F);var Ee={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:[]}]},Ae={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=s=>(s===""&&(s=null),s==="null"&&(s=null),s==="undefined"&&(s=void 0),s==="false"&&(s=!1),s==="true"&&(s=!0),s==="off"&&(s=!1),s==="on"&&(s=!0),s==="[]"&&(s=Array),s==="{}"&&(s=Object),["null","undefined","false","true","on","off"].filter(d=>d.includes(s)).length===0&&!Number.isNaN(s)&&(s=Number(s)),s),a=(s,l)=>{let c=s[0];c.slice(-1)==="]"&&(c=c.slice(0,-1));let d={};return s.length===1?d[c]=o(l):(s.shift(),d[c]=a(s,l)),d},i=t.serializeArray();for(let s of i){let l=s.value,c=s.name.split("["),d=a(c,l);Object.assign(r,d)}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-Z 0-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,a=`<form id='${t}'>`;a+="<div class='table'>",a+="<div class='title'>";for(let i=1;i<=n;i++)a+=`<span>${i}</span>`;a+="</div>";for(let i=1;i<=o;i++){a+=`<div class='row'><span>${i}</span>`;for(let s=1;s<=n;s++)a+=`<input name='data[${s}][${i}]' tabindex='${s.toString().padStart(2,"0")}${i.toString().padStart(2,"0")}' type='number' onclick="this.select()" value='${Math.floor(Math.random()*100)}' title='${s} to ${i}' />`;a+="</div>"}a+="</div>",a+="</form>",r&&(r.innerHTML=a)},sanitize:e=>{if(e)return e.replace(/[^\w ]/g,"").replace(/[&/\\#, +()$~%.'":*?<>{}]/g,"")}};dphelper?.setDescription(Ee,Ae);var Oe={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:[]}]},je={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(Oe,je);var $e={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:[]}]},qe={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=(a,i)=>i===null?"":i,n=Object.keys(t[0]),o=t.map(a=>n.map(i=>JSON.stringify(a[i],r)).join(","));return o.unshift(n.join(",")),o.join(`\r
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(ve,ye);var De={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:[]}]},we={select:(e="body")=>{let t=typeof e=="string"?document.querySelector(e):e,r=n=>{let o=n.target,a=o.tagName.toLowerCase();if(!["input","button","select","textarea"].includes(a)&&!o.classList.contains("selectable"))return document.querySelectorAll("*").forEach(i=>i.blur()),n.preventDefault(),!1;document.querySelectorAll("img, a, input, button").forEach(i=>{i.addEventListener("dragstart",s=>(s.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(De,we);var C={},xe={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:[]}]},Ce={set:(e,t={})=>dispatchEvent(new CustomEvent(String(e),t)),listen:(e,t)=>{C[e]&&C[e].length>0&&dphelper.dispatch.remove(e);let r=n=>t?setTimeout(()=>t(n),0):null;window.addEventListener(e,r),C[e]||(C[e]=[]),C[e].push(r)},remove:e=>{let t=C[e];t&&(t.forEach(r=>window.removeEventListener(e,r)),delete C[e])}};dphelper?.setDescription(xe,Ce);var Me={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:[]}]},Se={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,a=n.offsetHeight||1,i=r?t/Math.max(o/window.innerWidth,a/window.innerHeight):t/Math.min(o/window.innerWidth,a/window.innerHeight);n.style.transform=`scale(${i})`}};dphelper?.setDescription(Me,Se);var Pe={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:[]}]},ke={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 a=document.querySelector(t),i=a?.offsetHeight||0,s=a?.offsetWidth||0,l=Math.max(o.pageY,0)-i/2,c=Math.max(o.pageX,0)-s/2;localStorage.setItem(e,JSON.stringify([l,c]))};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(Pe,ke);var Te={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:[]}]},$=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(a=>setTimeout(a,n)),$(e,t,r-1,n*2)}},F=(e,t)=>$(e,t);F.get=(e,t)=>$(e,{...t,method:"GET"});F.post=(e,t,r={})=>{let n=typeof t=="object"&&t!==null;return $(e,{...r,method:"POST",headers:{...n?{"Content-Type":"application/json"}:{},...r.headers||{}},body:n?JSON.stringify(t):t})};dphelper?.setDescription(Te,F);var Ee={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:[]}]},Ae={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=s=>(s===""&&(s=null),s==="null"&&(s=null),s==="undefined"&&(s=void 0),s==="false"&&(s=!1),s==="true"&&(s=!0),s==="off"&&(s=!1),s==="on"&&(s=!0),s==="[]"&&(s=Array),s==="{}"&&(s=Object),["null","undefined","false","true","on","off"].filter(d=>d.includes(s)).length===0&&!Number.isNaN(s)&&(s=Number(s)),s),a=(s,l)=>{let c=s[0];c.slice(-1)==="]"&&(c=c.slice(0,-1));let d={};return s.length===1?d[c]=o(l):(s.shift(),d[c]=a(s,l)),d},i=t.serializeArray();for(let s of i){let l=s.value,c=s.name.split("["),d=a(c,l);Object.assign(r,d)}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-Z 0-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,a=`<form id='${t}'>`;a+="<div class='table'>",a+="<div class='title'>";for(let i=1;i<=n;i++)a+=`<span>${i}</span>`;a+="</div>";for(let i=1;i<=o;i++){a+=`<div class='row'><span>${i}</span>`;for(let s=1;s<=n;s++)a+=`<input name='data[${s}][${i}]' tabindex='${s.toString().padStart(2,"0")}${i.toString().padStart(2,"0")}' type='number' onclick="this.select()" value='${Math.floor(Math.random()*100)}' title='${s} to ${i}' />`;a+="</div>"}a+="</div>",a+="</form>",r&&(r.innerHTML=a)},sanitize:e=>{if(e)return e.replace(/[^\w ]/g,"").replace(/[&/\\#, +()$~%.'":*?<>{}]/g,"")}};dphelper?.setDescription(Ee,Ae);var Oe={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:[]}]},je={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(Oe,je);var $e={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:[]}]},qe={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=(a,i)=>i===null?"":i,n=Object.keys(t[0]),o=t.map(a=>n.map(i=>JSON.stringify(a[i],r)).join(","));return o.unshift(n.join(",")),o.join(`\r
64
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())),a=`${t}_${o}.csv`,i=URL.createObjectURL(r);n.setAttribute("href",i),n.setAttribute("download",a),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[a,...i]=o.split(":"),s=dphelper.json.sanitizeJsonValue(a?.trim()??"");if(!a)return"";let l=i.join(":");return l?(l=l.trim(),l==="null"?l='""':l==="true"||l==="false"?l=`"${l}"`:/^\d+$/.test(l)?l=`"${l}"`:l=dphelper.json.sanitizeJsonValue(l)):l='""',`${s}:${l}`}).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($e,qe);var Le={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:[]}]},Ne={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(Le,Ne);var Ie={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:[]}]},O={log:[]},Re={list:()=>O.log,reg:e=>O.log.push({type:"reg",message:e}),debug:e=>O.log.push({type:"debug",message:e}),error:e=>O.log.push({type:"error",message:e})};Object.defineProperty(O,"log",{writable:!1,enumerable:!1,configurable:!1});dphelper?.setDescription(Ie,Re);var ze={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:[]}]},He={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(ze,He);var Fe={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:[]}]},_e={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 a=t[n];a&&Object.defineProperty(a,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 a=t[n];a&&Object.defineProperty(a,o,{writable:!0,configurable:!0})}};dphelper?.setDescription(Fe,_e);var Ue={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:[]}]},Ye={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 a in r)if(Object.hasOwn(r,a)){let i=r[a];typeof i=="object"&&i!==null?o+=`${n}<${a}>
65
65
  ${t(i,`${n} `)}${n}</${a}>
66
66
  `:o+=`${n}<${a}>${i}</${a}>
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(Ue,Ye);var Be={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:[]}]},Je={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(Be,Je);var Ge={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:[]}]},We={check:e=>e&&(e instanceof Promise||Object.prototype.toString.call(e)==="[object Promise]")};dphelper?.setDescription(Ge,We);var Ve={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:[]}]},Ze={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(Ve,Ze);var L="dphelper_popup_positions",J=(e,t,r,n)=>`${e}x${t}@${r},${n}`,N=()=>{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},_=(e,t)=>{let r=N();for(let a of r)if(e>=a.left&&e<a.left+a.width&&t>=a.top&&t<a.top+a.height)return a;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 a of r){let i=a.left+a.width/2,s=a.top+a.height/2,l=Math.sqrt(Math.pow(i-e,2)+Math.pow(s-t,2));l<o&&(o=l,n=a)}return n},Ke=(e,t,r)=>({relX:e-r.left,relY:t-r.top}),Xe=(e,t,r)=>({left:r.left+e,top:r.top+t}),Qe=(e,t)=>{if(typeof window>"u")return;let r=t||window,n=r.screenX||r.screenLeft||0,o=r.screenY||r.screenTop||0,a=r.outerWidth||800,i=r.outerHeight||600,s=N(),l=_(n,o),{relX:c,relY:d}=Ke(n,o,l),p=J(l.width,l.height,l.left,l.top),m=I();m.monitors=s,m.popups[e]={id:e,monitorId:l.id,left:c,top:d,width:a,height:i,monitorFingerprint:p},localStorage.setItem(L,JSON.stringify(m))},et=e=>{if(typeof window>"u")return null;let t=I(),r=t.popups[e];if(!r)return null;let n=N(),o=n.find(l=>J(l.width,l.height,l.left,l.top)===r.monitorFingerprint),a;o?a=o:(console.warn(`[dphelper] Monitor changed, restoring popup "${e}" on closest available monitor`),a=_(r.left+(n[0]?.left||0),r.top+(n[0]?.top||0)));let{left:i,top:s}=Xe(r.left,r.top,a);return{left:i,top:s,width:r.width,height:r.height}},tt=e=>{let t=I();delete t.popups[e],localStorage.setItem(L,JSON.stringify(t))},rt=()=>I().popups,nt=()=>_(window.screenX||0,window.screenY||0),ot=()=>{localStorage.removeItem(L)},I=()=>{try{let e=localStorage.getItem(L);if(e)return JSON.parse(e)}catch(e){console.warn("[dphelper] Failed to parse popup storage:",e)}return{monitors:[],popups:{}}},M={save:Qe,restore:et,remove:tt,list:rt,clear:ot,getMonitors:N,getCurrentMonitor:nt};var at={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:[]}]},it={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)=>{M.save(e,t)},restore:e=>M.restore(e),remove:e=>{M.remove(e)},list:()=>M.list(),getCurrentMonitor:()=>M.getCurrentMonitor(),clear:()=>{M.clear()}}};dphelper?.setDescription(at,it);var st={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:[]}]},lt={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(Ue,Ye);var Be={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:[]}]},Je={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(Be,Je);var Ge={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:[]}]},We={check:e=>e&&(e instanceof Promise||Object.prototype.toString.call(e)==="[object Promise]")};dphelper?.setDescription(Ge,We);var Ve={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:[]}]},Ze={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(Ve,Ze);var q="dphelper_popup_positions",J=(e,t,r,n)=>`${e}x${t}@${r},${n}`,L=()=>{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},_=(e,t)=>{let r=L();for(let a of r)if(e>=a.left&&e<a.left+a.width&&t>=a.top&&t<a.top+a.height)return a;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 a of r){let i=a.left+a.width/2,s=a.top+a.height/2,l=Math.sqrt(Math.pow(i-e,2)+Math.pow(s-t,2));l<o&&(o=l,n=a)}return n},Ke=(e,t,r)=>({relX:e-r.left,relY:t-r.top}),Xe=(e,t,r)=>({left:r.left+e,top:r.top+t}),Qe=(e,t)=>{if(typeof window>"u")return;let r=t||window,n=r.screenX||r.screenLeft||0,o=r.screenY||r.screenTop||0,a=r.outerWidth||800,i=r.outerHeight||600,s=L(),l=_(n,o),{relX:c,relY:d}=Ke(n,o,l),p=J(l.width,l.height,l.left,l.top),m=N();m.monitors=s,m.popups[e]={id:e,monitorId:l.id,left:c,top:d,width:a,height:i,monitorFingerprint:p},localStorage.setItem(q,JSON.stringify(m))},et=e=>{if(typeof window>"u")return null;let t=N(),r=t.popups[e];if(!r)return null;let n=L(),o=n.find(l=>J(l.width,l.height,l.left,l.top)===r.monitorFingerprint),a;o?a=o:(console.warn(`[dphelper] Monitor changed, restoring popup "${e}" on closest available monitor`),a=_(r.left+(n[0]?.left||0),r.top+(n[0]?.top||0)));let{left:i,top:s}=Xe(r.left,r.top,a);return{left:i,top:s,width:r.width,height:r.height}},tt=e=>{let t=N();delete t.popups[e],localStorage.setItem(q,JSON.stringify(t))},rt=()=>N().popups,nt=()=>_(window.screenX||0,window.screenY||0),ot=()=>{localStorage.removeItem(q)},N=()=>{try{let e=localStorage.getItem(q);if(e)return JSON.parse(e)}catch(e){console.warn("[dphelper] Failed to parse popup storage:",e)}return{monitors:[],popups:{}}},M={save:Qe,restore:et,remove:tt,list:rt,clear:ot,getMonitors:L,getCurrentMonitor:nt};var at={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:[]}]},it={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)=>{M.save(e,t)},restore:e=>M.restore(e),remove:e=>{M.remove(e)},list:()=>M.list(),getCurrentMonitor:()=>M.getCurrentMonitor(),clear:()=>{M.clear()}}};dphelper?.setDescription(at,it);var st={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:[]}]},lt={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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dphelper",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "browser": "./dist/dphelper.umd.js",