venom-bot
Version:
Venom is a high-performance system developed with JavaScript to create a bot for WhatsApp, support for creating any interaction, such as customer service, media sending, sentence recognition based on artificial intelligence and all types of design archite
1 lines • 104 kB
JavaScript
(()=>{"use strict";var e={596:function(e,t,n){var i;!function(a){function o(e,t,n){var i,a,o,r,s,g,h,y,m,A=0,P=[],I=0,b=!1,W=[],S=[],M=!1,v=!1,C=-1;if(i=(n=n||{}).encoding||"UTF8",(m=n.numRounds||1)!==parseInt(m,10)||1>m)throw Error("numRounds must a integer >= 1");if("SHA-1"===e)s=512,g=F,h=L,r=160,y=function(e){return e.slice()};else if(0===e.lastIndexOf("SHA-",0))if(g=function(t,n){return K(t,n,e)},h=function(t,n,i,a){var o,r;if("SHA-224"===e||"SHA-256"===e)o=15+(n+65>>>9<<4),r=16;else{if("SHA-384"!==e&&"SHA-512"!==e)throw Error("Unexpected error in SHA-2 implementation");o=31+(n+129>>>10<<5),r=32}for(;t.length<=o;)t.push(0);for(t[n>>>5]|=128<<24-n%32,n+=i,t[o]=4294967295&n,t[o-1]=n/4294967296|0,i=t.length,n=0;n<i;n+=r)a=K(t.slice(n,n+r),a,e);if("SHA-224"===e)t=[a[0],a[1],a[2],a[3],a[4],a[5],a[6]];else if("SHA-256"===e)t=a;else if("SHA-384"===e)t=[a[0].a,a[0].b,a[1].a,a[1].b,a[2].a,a[2].b,a[3].a,a[3].b,a[4].a,a[4].b,a[5].a,a[5].b];else{if("SHA-512"!==e)throw Error("Unexpected error in SHA-2 implementation");t=[a[0].a,a[0].b,a[1].a,a[1].b,a[2].a,a[2].b,a[3].a,a[3].b,a[4].a,a[4].b,a[5].a,a[5].b,a[6].a,a[6].b,a[7].a,a[7].b]}return t},y=function(e){return e.slice()},"SHA-224"===e)s=512,r=224;else if("SHA-256"===e)s=512,r=256;else if("SHA-384"===e)s=1024,r=384;else{if("SHA-512"!==e)throw Error("Chosen SHA variant is not supported");s=1024,r=512}else{if(0!==e.lastIndexOf("SHA3-",0)&&0!==e.lastIndexOf("SHAKE",0))throw Error("Chosen SHA variant is not supported");var _=6;if(g=G,y=function(e){var t,n=[];for(t=0;5>t;t+=1)n[t]=e[t].slice();return n},C=1,"SHA3-224"===e)s=1152,r=224;else if("SHA3-256"===e)s=1088,r=256;else if("SHA3-384"===e)s=832,r=384;else if("SHA3-512"===e)s=576,r=512;else if("SHAKE128"===e)s=1344,r=-1,_=31,v=!0;else{if("SHAKE256"!==e)throw Error("Chosen SHA variant is not supported");s=1088,r=-1,_=31,v=!0}h=function(e,t,n,i,a){var o,r=_,d=[],c=(n=s)>>>5,l=0,u=t>>>5;for(o=0;o<u&&t>=n;o+=c)i=G(e.slice(o,o+c),i),t-=n;for(e=e.slice(o),t%=n;e.length<c;)e.push(0);for(e[(o=t>>>3)>>2]^=r<<o%4*8,e[c-1]^=2147483648,i=G(e,i);32*d.length<a&&(e=i[l%5][l/5|0],d.push(e.b),!(32*d.length>=a));)d.push(e.a),0==64*(l+=1)%n&&G(null,i);return d}}o=f(t,i,C),a=z(e),this.setHMACKey=function(t,n,o){var d;if(!0===b)throw Error("HMAC key already set");if(!0===M)throw Error("Cannot set HMAC key after calling update");if(!0===v)throw Error("SHAKE is not supported for HMAC");if(t=(n=f(n,i=(o||{}).encoding||"UTF8",C)(t)).binLen,n=n.value,o=(d=s>>>3)/4-1,d<t/8){for(n=h(n,t,0,z(e),r);n.length<=o;)n.push(0);n[o]&=4294967040}else if(d>t/8){for(;n.length<=o;)n.push(0);n[o]&=4294967040}for(t=0;t<=o;t+=1)W[t]=909522486^n[t],S[t]=1549556828^n[t];a=g(W,a),A=s,b=!0},this.update=function(e){var t,n,i,r=0,d=s>>>5;for(e=(t=o(e,P,I)).binLen,n=t.value,t=e>>>5,i=0;i<t;i+=d)r+s<=e&&(a=g(n.slice(i,i+d),a),r+=s);A+=r,P=n.slice(r>>>5),I=e%s,M=!0},this.getHash=function(t,n){var i,o,s,f;if(!0===b)throw Error("Cannot call getHash after setting HMAC key");if(s=p(n),!0===v){if(-1===s.shakeLen)throw Error("shakeLen must be specified in options");r=s.shakeLen}switch(t){case"HEX":i=function(e){return d(e,r,C,s)};break;case"B64":i=function(e){return c(e,r,C,s)};break;case"BYTES":i=function(e){return l(e,r,C)};break;case"ARRAYBUFFER":try{o=new ArrayBuffer(0)}catch(e){throw Error("ARRAYBUFFER not supported by this environment")}i=function(e){return u(e,r,C)};break;case"UINT8ARRAY":try{o=new Uint8Array(0)}catch(e){throw Error("UINT8ARRAY not supported by this environment")}i=function(e){return w(e,r,C)};break;default:throw Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}for(f=h(P.slice(),I,A,y(a),r),o=1;o<m;o+=1)!0===v&&0!=r%32&&(f[f.length-1]&=16777215>>>24-r%32),f=h(f,r,0,z(e),r);return i(f)},this.getHMAC=function(t,n){var i,o,f,m;if(!1===b)throw Error("Cannot call getHMAC without first setting HMAC key");switch(f=p(n),t){case"HEX":i=function(e){return d(e,r,C,f)};break;case"B64":i=function(e){return c(e,r,C,f)};break;case"BYTES":i=function(e){return l(e,r,C)};break;case"ARRAYBUFFER":try{i=new ArrayBuffer(0)}catch(e){throw Error("ARRAYBUFFER not supported by this environment")}i=function(e){return u(e,r,C)};break;case"UINT8ARRAY":try{i=new Uint8Array(0)}catch(e){throw Error("UINT8ARRAY not supported by this environment")}i=function(e){return w(e,r,C)};break;default:throw Error("outputFormat must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}return o=h(P.slice(),I,A,y(a),r),m=g(S,z(e)),i(m=h(o,r,s,m,r))}}function r(e,t){this.a=e,this.b=t}function s(e,t,n,i){var a,o,r,s,d;for(t=t||[0],o=(n=n||0)>>>3,d=-1===i?3:0,a=0;a<e.length;a+=1)r=(s=a+o)>>>2,t.length<=r&&t.push(0),t[r]|=e[a]<<8*(d+s%4*i);return{value:t,binLen:8*e.length+n}}function d(e,t,n,i){var a,o,r,s="";for(t/=8,r=-1===n?3:0,a=0;a<t;a+=1)o=e[a>>>2]>>>8*(r+a%4*n),s+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return i.outputUpper?s.toUpperCase():s}function c(e,t,n,i){var a,o,r,s,d="",c=t/8;for(s=-1===n?3:0,a=0;a<c;a+=3)for(o=a+1<c?e[a+1>>>2]:0,r=a+2<c?e[a+2>>>2]:0,r=(e[a>>>2]>>>8*(s+a%4*n)&255)<<16|(o>>>8*(s+(a+1)%4*n)&255)<<8|r>>>8*(s+(a+2)%4*n)&255,o=0;4>o;o+=1)d+=8*a+6*o<=t?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>>6*(3-o)&63):i.b64Pad;return d}function l(e,t,n){var i,a,o,r="";for(t/=8,o=-1===n?3:0,i=0;i<t;i+=1)a=e[i>>>2]>>>8*(o+i%4*n)&255,r+=String.fromCharCode(a);return r}function u(e,t,n){t/=8;var i,a,o,r=new ArrayBuffer(t);for(o=new Uint8Array(r),a=-1===n?3:0,i=0;i<t;i+=1)o[i]=e[i>>>2]>>>8*(a+i%4*n)&255;return r}function w(e,t,n){t/=8;var i,a,o=new Uint8Array(t);for(a=-1===n?3:0,i=0;i<t;i+=1)o[i]=e[i>>>2]>>>8*(a+i%4*n)&255;return o}function p(e){var t={outputUpper:!1,b64Pad:"=",shakeLen:-1};if(e=e||{},t.outputUpper=e.outputUpper||!1,!0===e.hasOwnProperty("b64Pad")&&(t.b64Pad=e.b64Pad),!0===e.hasOwnProperty("shakeLen")){if(0!=e.shakeLen%8)throw Error("shakeLen must be a multiple of 8");t.shakeLen=e.shakeLen}if("boolean"!=typeof t.outputUpper)throw Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw Error("Invalid b64Pad formatting option");return t}function f(e,t,n){switch(t){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":e=function(e,t,i){var a,o,r,s,d,c,l=e.length;if(0!=l%2)throw Error("String of HEX type must be in byte increments");for(t=t||[0],d=(i=i||0)>>>3,c=-1===n?3:0,a=0;a<l;a+=2){if(o=parseInt(e.substr(a,2),16),isNaN(o))throw Error("String of HEX type contains invalid characters");for(r=(s=(a>>>1)+d)>>>2;t.length<=r;)t.push(0);t[r]|=o<<8*(c+s%4*n)}return{value:t,binLen:4*l+i}};break;case"TEXT":e=function(e,i,a){var o,r,s,d,c,l,u,w,p=0;if(i=i||[0],c=(a=a||0)>>>3,"UTF8"===t)for(w=-1===n?3:0,s=0;s<e.length;s+=1)for(r=[],128>(o=e.charCodeAt(s))?r.push(o):2048>o?(r.push(192|o>>>6),r.push(128|63&o)):55296>o||57344<=o?r.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(s)),r.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),d=0;d<r.length;d+=1){for(l=(u=p+c)>>>2;i.length<=l;)i.push(0);i[l]|=r[d]<<8*(w+u%4*n),p+=1}else if("UTF16BE"===t||"UTF16LE"===t)for(w=-1===n?2:0,r="UTF16LE"===t&&1!==n||"UTF16LE"!==t&&1===n,s=0;s<e.length;s+=1){for(o=e.charCodeAt(s),!0===r&&(o=(d=255&o)<<8|o>>>8),l=(u=p+c)>>>2;i.length<=l;)i.push(0);i[l]|=o<<8*(w+u%4*n),p+=2}return{value:i,binLen:8*p+a}};break;case"B64":e=function(e,t,i){var a,o,r,s,d,c,l,u,w=0;if(-1===e.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");if(o=e.indexOf("="),e=e.replace(/\=/g,""),-1!==o&&o<e.length)throw Error("Invalid '=' found in base-64 string");for(t=t||[0],c=(i=i||0)>>>3,u=-1===n?3:0,o=0;o<e.length;o+=4){for(d=e.substr(o,4),r=s=0;r<d.length;r+=1)s|=(a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(d.charAt(r)))<<18-6*r;for(r=0;r<d.length-1;r+=1){for(a=(l=w+c)>>>2;t.length<=a;)t.push(0);t[a]|=(s>>>16-8*r&255)<<8*(u+l%4*n),w+=1}}return{value:t,binLen:8*w+i}};break;case"BYTES":e=function(e,t,i){var a,o,r,s,d,c;for(t=t||[0],r=(i=i||0)>>>3,c=-1===n?3:0,o=0;o<e.length;o+=1)a=e.charCodeAt(o),s=(d=o+r)>>>2,t.length<=s&&t.push(0),t[s]|=a<<8*(c+d%4*n);return{value:t,binLen:8*e.length+i}};break;case"ARRAYBUFFER":try{e=new ArrayBuffer(0)}catch(e){throw Error("ARRAYBUFFER not supported by this environment")}e=function(e,t,i){return s(new Uint8Array(e),t,i,n)};break;case"UINT8ARRAY":try{e=new Uint8Array(0)}catch(e){throw Error("UINT8ARRAY not supported by this environment")}e=function(e,t,i){return s(e,t,i,n)};break;default:throw Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}return e}function g(e,t){return e<<t|e>>>32-t}function h(e,t){return 32<t?(t-=32,new r(e.b<<t|e.a>>>32-t,e.a<<t|e.b>>>32-t)):0!==t?new r(e.a<<t|e.b>>>32-t,e.b<<t|e.a>>>32-t):e}function y(e,t){return e>>>t|e<<32-t}function m(e,t){var n;return n=new r(e.a,e.b),32>=t?new r(n.a>>>t|n.b<<32-t&4294967295,n.b>>>t|n.a<<32-t&4294967295):new r(n.b>>>t-32|n.a<<64-t&4294967295,n.a>>>t-32|n.b<<64-t&4294967295)}function A(e,t){return 32>=t?new r(e.a>>>t,e.b>>>t|e.a<<32-t&4294967295):new r(0,e.a>>>t-32)}function P(e,t,n){return e&t^~e&n}function I(e,t,n){return new r(e.a&t.a^~e.a&n.a,e.b&t.b^~e.b&n.b)}function b(e,t,n){return e&t^e&n^t&n}function W(e,t,n){return new r(e.a&t.a^e.a&n.a^t.a&n.a,e.b&t.b^e.b&n.b^t.b&n.b)}function S(e){return y(e,2)^y(e,13)^y(e,22)}function M(e){var t=m(e,28),n=m(e,34);return e=m(e,39),new r(t.a^n.a^e.a,t.b^n.b^e.b)}function v(e){return y(e,6)^y(e,11)^y(e,25)}function C(e){var t=m(e,14),n=m(e,18);return e=m(e,41),new r(t.a^n.a^e.a,t.b^n.b^e.b)}function _(e){return y(e,7)^y(e,18)^e>>>3}function T(e){var t=m(e,1),n=m(e,8);return e=A(e,7),new r(t.a^n.a^e.a,t.b^n.b^e.b)}function k(e){return y(e,17)^y(e,19)^e>>>10}function E(e){var t=m(e,19),n=m(e,61);return e=A(e,6),new r(t.a^n.a^e.a,t.b^n.b^e.b)}function x(e,t){var n=(65535&e)+(65535&t);return((e>>>16)+(t>>>16)+(n>>>16)&65535)<<16|65535&n}function O(e,t,n,i){var a=(65535&e)+(65535&t)+(65535&n)+(65535&i);return((e>>>16)+(t>>>16)+(n>>>16)+(i>>>16)+(a>>>16)&65535)<<16|65535&a}function U(e,t,n,i,a){var o=(65535&e)+(65535&t)+(65535&n)+(65535&i)+(65535&a);return((e>>>16)+(t>>>16)+(n>>>16)+(i>>>16)+(a>>>16)+(o>>>16)&65535)<<16|65535&o}function N(e,t){var n,i,a;return n=(65535&e.b)+(65535&t.b),a=(65535&(i=(e.b>>>16)+(t.b>>>16)+(n>>>16)))<<16|65535&n,n=(65535&e.a)+(65535&t.a)+(i>>>16),new r((65535&(i=(e.a>>>16)+(t.a>>>16)+(n>>>16)))<<16|65535&n,a)}function R(e,t,n,i){var a,o,s;return a=(65535&e.b)+(65535&t.b)+(65535&n.b)+(65535&i.b),s=(65535&(o=(e.b>>>16)+(t.b>>>16)+(n.b>>>16)+(i.b>>>16)+(a>>>16)))<<16|65535&a,a=(65535&e.a)+(65535&t.a)+(65535&n.a)+(65535&i.a)+(o>>>16),new r((65535&(o=(e.a>>>16)+(t.a>>>16)+(n.a>>>16)+(i.a>>>16)+(a>>>16)))<<16|65535&a,s)}function j(e,t,n,i,a){var o,s,d;return o=(65535&e.b)+(65535&t.b)+(65535&n.b)+(65535&i.b)+(65535&a.b),d=(65535&(s=(e.b>>>16)+(t.b>>>16)+(n.b>>>16)+(i.b>>>16)+(a.b>>>16)+(o>>>16)))<<16|65535&o,o=(65535&e.a)+(65535&t.a)+(65535&n.a)+(65535&i.a)+(65535&a.a)+(s>>>16),new r((65535&(s=(e.a>>>16)+(t.a>>>16)+(n.a>>>16)+(i.a>>>16)+(a.a>>>16)+(o>>>16)))<<16|65535&o,d)}function B(e,t){return new r(e.a^t.a,e.b^t.b)}function z(e){var t,n=[];if("SHA-1"===e)n=[1732584193,4023233417,2562383102,271733878,3285377520];else if(0===e.lastIndexOf("SHA-",0))switch(n=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],t=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],e){case"SHA-224":break;case"SHA-256":n=t;break;case"SHA-384":n=[new r(3418070365,n[0]),new r(1654270250,n[1]),new r(2438529370,n[2]),new r(355462360,n[3]),new r(1731405415,n[4]),new r(41048885895,n[5]),new r(3675008525,n[6]),new r(1203062813,n[7])];break;case"SHA-512":n=[new r(t[0],4089235720),new r(t[1],2227873595),new r(t[2],4271175723),new r(t[3],1595750129),new r(t[4],2917565137),new r(t[5],725511199),new r(t[6],4215389547),new r(t[7],327033209)];break;default:throw Error("Unknown SHA variant")}else{if(0!==e.lastIndexOf("SHA3-",0)&&0!==e.lastIndexOf("SHAKE",0))throw Error("No SHA variants supported");for(e=0;5>e;e+=1)n[e]=[new r(0,0),new r(0,0),new r(0,0),new r(0,0),new r(0,0)]}return n}function F(e,t){var n,i,a,o,r,s,d,c=[];for(n=t[0],i=t[1],a=t[2],o=t[3],r=t[4],d=0;80>d;d+=1)c[d]=16>d?e[d]:g(c[d-3]^c[d-8]^c[d-14]^c[d-16],1),s=20>d?U(g(n,5),i&a^~i&o,r,1518500249,c[d]):40>d?U(g(n,5),i^a^o,r,1859775393,c[d]):60>d?U(g(n,5),b(i,a,o),r,2400959708,c[d]):U(g(n,5),i^a^o,r,3395469782,c[d]),r=o,o=a,a=g(i,30),i=n,n=s;return t[0]=x(n,t[0]),t[1]=x(i,t[1]),t[2]=x(a,t[2]),t[3]=x(o,t[3]),t[4]=x(r,t[4]),t}function L(e,t,n,i){var a;for(a=15+(t+65>>>9<<4);e.length<=a;)e.push(0);for(e[t>>>5]|=128<<24-t%32,t+=n,e[a]=4294967295&t,e[a-1]=t/4294967296|0,t=e.length,a=0;a<t;a+=16)i=F(e.slice(a,a+16),i);return i}function K(e,t,n){var i,a,o,s,d,c,l,u,w,p,f,g,h,y,m,A,B,z,F,L,K,G,q,V=[];if("SHA-224"===n||"SHA-256"===n)p=64,g=1,G=Number,h=x,y=O,m=U,A=_,B=k,z=S,F=v,K=b,L=P,q=D;else{if("SHA-384"!==n&&"SHA-512"!==n)throw Error("Unexpected error in SHA-2 implementation");p=80,g=2,G=r,h=N,y=R,m=j,A=T,B=E,z=M,F=C,K=W,L=I,q=H}for(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],d=t[5],c=t[6],l=t[7],f=0;f<p;f+=1)16>f?(w=f*g,u=e.length<=w?0:e[w],w=e.length<=w+1?0:e[w+1],V[f]=new G(u,w)):V[f]=y(B(V[f-2]),V[f-7],A(V[f-15]),V[f-16]),u=m(l,F(s),L(s,d,c),q[f],V[f]),w=h(z(n),K(n,i,a)),l=c,c=d,d=s,s=h(o,u),o=a,a=i,i=n,n=h(u,w);return t[0]=h(n,t[0]),t[1]=h(i,t[1]),t[2]=h(a,t[2]),t[3]=h(o,t[3]),t[4]=h(s,t[4]),t[5]=h(d,t[5]),t[6]=h(c,t[6]),t[7]=h(l,t[7]),t}function G(e,t){var n,i,a,o,s=[],d=[];if(null!==e)for(i=0;i<e.length;i+=2)t[(i>>>1)%5][(i>>>1)/5|0]=B(t[(i>>>1)%5][(i>>>1)/5|0],new r(e[i+1],e[i]));for(n=0;24>n;n+=1){for(o=z("SHA3-"),i=0;5>i;i+=1){a=t[i][0];var c=t[i][1],l=t[i][2],u=t[i][3],w=t[i][4];s[i]=new r(a.a^c.a^l.a^u.a^w.a,a.b^c.b^l.b^u.b^w.b)}for(i=0;5>i;i+=1)d[i]=B(s[(i+4)%5],h(s[(i+1)%5],1));for(i=0;5>i;i+=1)for(a=0;5>a;a+=1)t[i][a]=B(t[i][a],d[i]);for(i=0;5>i;i+=1)for(a=0;5>a;a+=1)o[a][(2*i+3*a)%5]=h(t[i][a],q[i][a]);for(i=0;5>i;i+=1)for(a=0;5>a;a+=1)t[i][a]=B(o[i][a],new r(~o[(i+1)%5][a].a&o[(i+2)%5][a].a,~o[(i+1)%5][a].b&o[(i+2)%5][a].b));t[0][0]=B(t[0][0],V[n])}return t}var D,H,q,V;H=[new r((D=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298])[0],3609767458),new r(D[1],602891725),new r(D[2],3964484399),new r(D[3],2173295548),new r(D[4],4081628472),new r(D[5],3053834265),new r(D[6],2937671579),new r(D[7],3664609560),new r(D[8],2734883394),new r(D[9],1164996542),new r(D[10],1323610764),new r(D[11],3590304994),new r(D[12],4068182383),new r(D[13],991336113),new r(D[14],633803317),new r(D[15],3479774868),new r(D[16],2666613458),new r(D[17],944711139),new r(D[18],2341262773),new r(D[19],2007800933),new r(D[20],1495990901),new r(D[21],1856431235),new r(D[22],3175218132),new r(D[23],2198950837),new r(D[24],3999719339),new r(D[25],766784016),new r(D[26],2566594879),new r(D[27],3203337956),new r(D[28],1034457026),new r(D[29],2466948901),new r(D[30],3758326383),new r(D[31],168717936),new r(D[32],1188179964),new r(D[33],1546045734),new r(D[34],1522805485),new r(D[35],2643833823),new r(D[36],2343527390),new r(D[37],1014477480),new r(D[38],1206759142),new r(D[39],344077627),new r(D[40],1290863460),new r(D[41],3158454273),new r(D[42],3505952657),new r(D[43],106217008),new r(D[44],3606008344),new r(D[45],1432725776),new r(D[46],1467031594),new r(D[47],851169720),new r(D[48],3100823752),new r(D[49],1363258195),new r(D[50],3750685593),new r(D[51],3785050280),new r(D[52],3318307427),new r(D[53],3812723403),new r(D[54],2003034995),new r(D[55],3602036899),new r(D[56],1575990012),new r(D[57],1125592928),new r(D[58],2716904306),new r(D[59],442776044),new r(D[60],593698344),new r(D[61],3733110249),new r(D[62],2999351573),new r(D[63],3815920427),new r(3391569614,3928383900),new r(3515267271,566280711),new r(3940187606,3454069534),new r(4118630271,4000239992),new r(116418474,1914138554),new r(174292421,2731055270),new r(289380356,3203993006),new r(460393269,320620315),new r(685471733,587496836),new r(852142971,1086792851),new r(1017036298,365543100),new r(1126000580,2618297676),new r(1288033470,3409855158),new r(1501505948,4234509866),new r(1607167915,987167468),new r(1816402316,1246189591)],V=[new r(0,1),new r(0,32898),new r(2147483648,32906),new r(2147483648,2147516416),new r(0,32907),new r(0,2147483649),new r(2147483648,2147516545),new r(2147483648,32777),new r(0,138),new r(0,136),new r(0,2147516425),new r(0,2147483658),new r(0,2147516555),new r(2147483648,139),new r(2147483648,32905),new r(2147483648,32771),new r(2147483648,32770),new r(2147483648,128),new r(0,32778),new r(2147483648,2147483658),new r(2147483648,2147516545),new r(2147483648,32896),new r(0,2147483649),new r(2147483648,2147516424)],q=[[0,36,3,41,18],[1,44,10,45,2],[62,6,43,15,61],[28,55,25,21,56],[27,20,39,8,14]],void 0===(i=function(){return o}.call(t,n,t,e))||(e.exports=i)}()},321:(e,t,n)=>{n.r(t),n.d(t,{storeObjects:()=>i});const i=[{id:"module",conditions:e=>e.default&&e.default.Chat&&e.default.Msg?e.default:null},{id:"replyButton",conditions:e=>e.__esModule&&e.default&&e.default.prototype&&"replyButton"===e.default.prototype.proxyName?e.default:null},{id:"templateButton",conditions:e=>e.__esModule&&e.default&&e.default.prototype&&"templateButton"===e.default.prototype.proxyName?e.default:null},{id:"TemplateButtonCollection",conditions:e=>e.TemplateButtonCollection?e.TemplateButtonCollection:null},{id:"ButtonCollection",conditions:e=>e.ButtonCollection?e.ButtonCollection:null},{id:"MediaCollection",conditions:e=>e.default&&e.default.prototype&&(void 0!==e.default.prototype.processFiles||void 0!==e.default.prototype.processAttachments)?e.default:null},{id:"MediaProcess",conditions:e=>e.BLOB?e:null},{id:"ChatUtil",conditions:e=>e.sendClear?e:null},{id:"GroupInvite",conditions:e=>e.queryGroupInviteCode&&e.revokeGroupInvite?e:null},{id:"Wap",conditions:e=>e.createGroup?e:null},{id:"ServiceWorker",conditions:e=>e.default&&e.default.killServiceWorker?e:null},{id:"WapDelete",conditions:e=>e.sendConversationDelete&&2===e.sendConversationDelete.length?e:null},{id:"Conn",conditions:e=>e.default&&e.default.ref&&e.default.refTTL?e.default:null},{id:"WapQuery",conditions:e=>e.default&&e.default.contactFindQuery&&e.default.queryExist?e.default:null},{id:"CryptoLib",conditions:e=>e.decryptE2EMedia?e:null},{id:"OpenChat",conditions:e=>e.default&&e.default.prototype&&e.default.prototype.openChat?e.default:null},{id:"UserConstructor",conditions:e=>e.default&&e.default.prototype&&e.default.prototype.isServer&&e.default.prototype.isUser?e.default:null},{id:"SendTextMsgToChat",conditions:e=>e.sendTextMsgToChat?e.sendTextMsgToChat:null},{id:"Archive",conditions:e=>e.setArchive?e:null},{id:"pinChat",conditions:e=>e.setPin?e:null},{id:"sendDelete",conditions:e=>e.sendDelete?e.sendDelete:null},{id:"addAndSendMsgToChat",conditions:e=>e.addAndSendMsgToChat?e.addAndSendMsgToChat:null},{id:"sendMsgToChat",conditions:e=>e.sendMsgToChat?e.sendMsgToChat:null},{id:"Catalog",conditions:e=>e.Catalog?e.Catalog:null},{id:"Perfil",conditions:e=>!0===e.__esModule&&e.setPushname&&!e.getComposeContents?e:null},{id:"MsgKey",conditions:e=>e.default&&e.default.toString&&"function"==typeof e.default.toString&&e.default.toString().includes("MsgKey error: obj is null/undefined")?e.default:null},{id:"Parser",conditions:e=>e.convertToTextWithoutSpecialEmojis?e.default:null},{id:"Builders",conditions:e=>e.TemplateMessage&&e.HydratedFourRowTemplate?e:null},{id:"Me",conditions:e=>e.Conn&&e.ConnImpl?e.Conn:null},{id:"CallUtils",conditions:e=>e.sendCallEnd&&e.parseCall?e:null},{id:"Identity",conditions:e=>e.queryIdentity&&e.updateIdentity?e:null},{id:"MyStatus",conditions:e=>e.getStatus&&e.setMyStatus?e:null},{id:"ChatStates",conditions:e=>e.sendChatStatePaused&&e.sendChatStateRecording&&e.sendChatStateComposing?e:null},{id:"GroupActions",conditions:e=>e.sendExitGroup&&e.localExitGroup?e:null},{id:"Features",conditions:e=>e.FEATURE_CHANGE_EVENT&&e.features?e:null},{id:"MessageUtils",conditions:e=>e.storeMessages&&e.appendMessage?e:null},{id:"createMessageKey",conditions:e=>e.createMessageKey&&e.createDeviceSentMessage?e.createMessageKey:null},{id:"WidFactory",conditions:e=>e.isWidlike&&e.createWid&&e.createWidFromWidLike?e:null},{id:"Base",conditions:e=>e.setSubProtocol&&e.binSend&&e.actionNode?e:null},{id:"Base2",conditions:e=>e.supportsFeatureFlags&&e.parseMsgStubProto&&e.binSend&&e.subscribeLiveLocation?e:null},{id:"MaybeMeUser",conditions:e=>e.getMaybeMeUser?e:null},{id:"Sticker",conditions:e=>e.StickerCollection&&e.default?e:null},{id:"MediaObject",conditions:e=>e.getOrCreateMediaObject&&e.disassociateMediaFromStickerPack?e:null},{id:"MediaUpload",conditions:e=>e.default&&e.default.mediaUpload?e.default:null},{id:"UploadUtils",conditions:e=>e.default&&e.default.encryptAndUpload?e.default:null},{id:"Cmd",conditions:e=>e.CmdImpl&&e.Cmd?e.Cmd:null},{id:"ReadSeen",conditions:e=>e.sendSeen?e:null},{id:"Block",conditions:e=>e.blockContact&&e.unblockContact?e:null},{id:"BlockList",conditions:e=>e.BlocklistCollection?e:null},{id:"Theme",conditions:e=>e.getTheme&&e.setTheme?e:null},{id:"Vcard",conditions:e=>e.vcardFromContactModel?e:null},{id:"Profile",conditions:e=>e.sendSetPicture&&e.requestDeletePicture?e:null},{id:"SendMute",conditions:e=>e.sendConversationMute?e:null},{id:"Validators",conditions:e=>e.findLinks?e:null},{id:"Wap2",conditions:e=>e.Wap?e:null},{id:"genId",conditions:e=>e.default&&"function"==typeof e.default&&e.default.toString().match(/crypto/)?e:null},{id:"GroupMetadata",conditions:e=>e.default&&e.default.handlePendingInvite?e:null},{id:"i10n",conditions:e=>e.default&&e.default.downloadAppLocale?e.default:null},{id:"NetworkStatus",conditions:e=>e.default&&e.default._logOnlineOffline?e.default:null},{id:"Stream",conditions:e=>e.Stream&&e.StreamInfo?e.Stream:null},{id:"State",conditions:e=>e.Socket?e:null},{id:"ws2",conditions:e=>e.default&&e.default.destroyStorage?e.default:null},{id:"Login",conditions:e=>e.startLogout?e:null},{id:"BlobCache",conditions:e=>e.default&&e.default.getOrCreateURL?e.default:null},{id:"Presence",conditions:e=>e.setPresenceAvailable&&e.setPresenceUnavailable?e:null},{id:"PresenceCollection",conditions:e=>e.default&&e.PresenceCollection?e.default:null},{id:"chatOptions",conditions:e=>e.default&&e.default.archiveChat?e.default:null},{id:"blob",conditions:e=>e.default&&e.default.createFromData?e:null},{id:"GroupDesc",conditions:e=>e.setGroupDesc?e:null},{id:"infoGroup",conditions:e=>e.queryGroupInviteInfo?e:null},{id:"GroupTitle",conditions:e=>e.sendSetGroupSubject?e:null},{id:"GroupSettings",conditions:e=>e.sendSetGroupProperty?e:null},{id:"createGroup",conditions:e=>e.createGroup&&e.sendForNeededAddRequest?e.createGroup:null},{id:"SetStatusChat",conditions:e=>e.markComposing&&e.markRecording?e:null},{id:"Reactions",conditions:e=>e.sendReactionToMsg?e:null},{id:"Reaction",conditions:e=>e.reactionTableMode?e:null},{id:"CheckWid",conditions:e=>e.validateWid?e:null},{id:"ProfileBusiness",conditions:e=>e.BUSINESS_URL_DOMAIN?e:null},{id:"Contacts",conditions:e=>e.ContactCollection?e:null},{id:"onlySendAdmin",conditions:e=>e.setGroupProperty&&e.setGroupDescription?e:null},{id:"SendCommunity",conditions:e=>e.sendCreateCommunity?e:null},{id:"Websocket",conditions:e=>e.smax?e:null},{id:"Survey",conditions:e=>e.sendPollCreation?e:null},{id:"Cmd",conditions:e=>e.APP_STATE_SYNC_COMPLETED?e:null},{id:"Wap",conditions:e=>e.BIG_ENDIAN_CONTENT?e:null},{id:"WapParser",conditions:e=>e.WapParser?e:null},{id:"SendSocket",conditions:e=>e.deprecatedSendIq?e:null},{id:"Jid",conditions:e=>e.WAP_JID_SUBTYPE?e:null},{id:"sendDeleteMsgs",conditions:e=>e.sendDeleteMsgs?e.sendDeleteMsgs:null},{id:"sendRevokeMsgs",conditions:e=>e.sendRevokeMsgs?e.sendRevokeMsgs:null},{id:"createNewsletterQuery",conditions:e=>e.createNewsletterQuery?e:null},{id:"userJidToUserWid",conditions:e=>e.newsletterJidToWid?e:null}]}},t={};function n(i){var a=t[i];if(void 0!==a)return a.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{function e(e,t){try{const n=e.split(",");let i=n[0].match(/(?:data:)?(.*?)(?:;base64)?$/i)[1];i=i.split(/\s+;\s+/).join("; ");const a=window.Base64?window.Base64.atob(n[1]):atob(n[1]);let o=a.length;const r=new Uint8Array(o);for(;o--;)r[o]=a.charCodeAt(o);return new File([r],t,{type:i})}catch{return!1}}var t=n(596);async function i(e){let n=await e.arrayBuffer();var i=new t("SHA-256","ARRAYBUFFER");return i.update(n),i.getHash("B64")}function a(e){let t="";for(let n=0;n<e;n++)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return t}const o={webpack:"webpackChunkwhatsapp_web_client",parasite:Math.random().toString(36).substring(7)},r=[{type:"Chat",when:e=>e.default&&e.default.Chat&&e.default.Msg?e.default.Chat:null},{type:"MaybeMeUser",when:e=>e.getMaybeMeUser?e:null},{type:"Participants",when:e=>e.addParticipants&&e.promoteCommunityParticipants?e:null},{type:"checkNumber",when:e=>e.queryExist?e:null},{type:"checkNumberBeta",when:e=>e.queryPhoneExists?e:null}];async function s(e,t){let n=0;for(let i in t)if("object"==typeof t[i]&&null!==t[i]&&(e.forEach((e=>{if(!e.when|e.yesModule)return;const a=e.when(t[i]);null!==a&&(n++,e.yesModule=a)})),n==e.length))break;return e}async function d(e,t){const n=await WAPI.getChat(e);for(;!n.msgs.msgLoadState.noEarlierMsgs;)await n.onEmptyMRM(),await WAPI.sleep(100);return t(n),!0}async function c(e,t){Array.isArray(t)||(t=[t]);const n=new Store.MediaCollection({chatParticipantCount:e.getParticipantCount()});return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,e),n}async function l(t,n,i,a,o,r,s,d=!0,l=!1,u=!0){if(o=o||"sendFile","string"!=typeof n||0===n.length)return WAPI.scope(n,!0,null,"incorrect parameter chatid, insert an string.");if("string"!=typeof i||0===n.length)return WAPI.scope(n,!0,null,"incorrect parameter filename, insert an string");if("string"!=typeof a||0===n.length)return WAPI.scope(n,!0,null,"incorrect parameter caption, insert an string");if("string"!=typeof t||0===n.length)return WAPI.scope(n,!0,null,"incorrect parameter file, insert an string");var w=t.match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);w&&w.length&&(w=w[1]);const p=d?await WAPI.sendExist(n):await WAPI.returnChat(n);if(p&&404!=p.status&&p.id){let r=await WAPI.getchatId(p.id).catch((()=>WAPI.scope(p.id,!0,404,"Error to number "+n)));r&&(p.lastReceivedKey&&p.lastReceivedKey._serialized&&(p.lastReceivedKey._serialized=r._serialized),p.lastReceivedKey&&p.lastReceivedKey.id&&(p.lastReceivedKey.id=r.id));const g={type:o,filename:i,text:a,mimeType:w},h=s?await window.WAPI.setNewMessageId(s,d):await window.WAPI.getNewMessageId(p.id._serialized,d);if(!h)return WAPI.scope(p.id,!0,404,"Error to newId");const y=new Store.WidFactory.createWid(n);await Store.Chat.add({createdLocally:!0,id:y},{merge:!0});const m=await Store.Chat.find(p.id).then((async o=>{const r=e(t,i||"file");return await c(o,r).then((async e=>{if("object"!=typeof e||!e._models||!e._models[0])return WAPI.scope(p.id,!0,404,"Error to models");{const t=e._models[0],o=await WAPI.encryptAndUploadFile(t.type,r);if(!1===o)return WAPI.scope(p.id,!0,404,"Error to encryptAndUploadFile");const s=await Store.MaybeMeUser.getMaybeMeUser(),d={id:h,ack:0,from:s,to:p.id,local:!0,self:"out",t:parseInt((new Date).getTime()/1e3),isNewMsg:!0,invis:!0,type:t.type,deprecatedMms3Url:o.url,directPath:o.directPath,encFilehash:o.encFilehash,filehash:o.filehash,mediaKeyTimestamp:o.mediaKeyTimestamp,mimetype:t.mimetype,ephemeralStartTimestamp:o.mediaKeyTimestamp,mediaKey:o.mediaKey,size:t.filesize,caption:a,filename:i};if(l){if(!u){const e=await window.Store.addAndSendMsgToChat(p,d);let t=WAPI.scope(h,!1,WAPI._serializeForcing(e),null);return Object.assign(t,g),t}for(;;)if("CONNECTED"===window.Store.State.Socket.state){const e=await window.Store.addAndSendMsgToChat(p,d);if(await WAPI.sleep(5e3),0!==p.msgs._models.filter((e=>e.id===h._serialized&&e.ack>0)).length){let t=WAPI.scope(h,!1,WAPI._serializeForcing(e),null);return Object.assign(t,g),t}await WAPI.deleteMessages(n,[h._serialized])}}try{return(await Promise.all(window.Store.addAndSendMsgToChat(p,d)))[1]}catch(e){return WAPI.scope(p.id,!0,404,"The message was not sent")}}})).catch((e=>WAPI.scope(p.id,!0,404,"Error to processFiles")))})).catch((()=>WAPI.scope(p.id,!0,404,"Error to chat not find")));if(!1===m.erro)return m;if("success"===m||"OK"===m||"OK"===m.messageSendResult){var f=WAPI.scope(h,!1,m,null);return Object.assign(f,g),f}return!0===m.erro?m:(f=WAPI.scope(h,!0,m,null),Object.assign(f,g),f)}return p.erro||(p.erro=!0),p}async function u(e,t,n,i){const a=await WAPI.sendExist(t);if(a.erro)return a;{const o=await window.WAPI.getNewMessageId(a.id._serialized),r=await Store.MaybeMeUser.getMaybeMeUser(),s=await WAPI.getchatId(a.id).catch((()=>WAPI.scope(a.id,!0,404,"Error to number "+t)));s&&(a.lastReceivedKey&&a.lastReceivedKey._serialized&&(a.lastReceivedKey._serialized=s._serialized),a.lastReceivedKey&&a.lastReceivedKey.id&&(a.lastReceivedKey.id=s.id));const d={id:o,ack:0,encFilehash:e.uploadhash,from:r,to:a.id,local:!0,self:"out",t:parseInt((new Date).getTime()/1e3),isNewMsg:!0,type:"sticker",deprecatedMms3Url:e.clientUrl,filehash:e.filehash,mediaKey:e.mediaKey,mimetype:"image/webp",height:n&&n.height?n.height:512,width:n&&n.width?n.width:512},c=(await Promise.all(window.Store.addAndSendMsgToChat(a,d)))[1],l={type:i};if("success"===c||"OK"===c||"OK"===c.messageSendResult){const e=WAPI.scope(o,!1,c,null);return Object.assign(e,l),e}const u=WAPI.scope(o,!0,c,null);return Object.assign(u,l),u}}async function w(t,n,i,a){const o=e("data:image/webp;base64,"+t,"file.webp");let r=await window.WAPI.encryptAndUploadFile("sticker",o);return await u(r,n,i,a)}function p(e,t){return void 0!==e&&(void 0!==t?new Date(e[2],e[1]-1,e[0],t[0],t[1]):new Date(e[2],e[1]-1,e[0]))}function f(e){const t=new Date(1e3*e.timestamp),n=t.toLocaleString(),i="0"+t.toLocaleString("en-US",{day:"numeric"}),a="0"+t.toLocaleString("en-US",{month:"numeric"}),o="0"+t.getUTCMinutes(),r="0"+t.getSeconds(),s="0"+t.getHours(),d={id:e.id,timestamp:t.getTime(),stringdate:n,dateNumeric:{day:i.substr(-2),month:a.substr(-2),year:t.toLocaleString("en-US",{year:"numeric"}),hours:s.substr(-2),minutes:o.substr(-2),seconds:r.substr(-2)},type:e.type,fromMe:e.fromMe};return Object.assign(e,d)}let g={};const{storeObjects:h}=n(321);async function y(e){let t=0;const n=h;for(let i in e)if("object"==typeof e[i]&&null!==e[i]&&(n.forEach((n=>{if(!n.conditions||n.foundedModule)return;let a=n.conditions(e[i]);null!==a&&(t++,n.foundedModule=a,console.log(a))})),t===n.length))break;n.forEach((e=>{e.foundedModule&&"module"!==e.id&&(window.Store[e.id]=e.foundedModule,console.log(e.id),console.log(e.foundedModule))}));const i=n.filter((e=>"module"===e.id))[0].foundedModule;Object.keys(i).forEach((e=>{["Chat"].includes(e)||(window.Store[e]?window.Store[e+"_"]=i[e]:window.Store[e]=i[e])})),window.Store.MediaCollection&&(window.Store.MediaCollection.prototype.processFiles=window.Store.MediaCollection.prototype.processFiles||window.Store.MediaCollection.prototype.processAttachments),window.mR=async t=>new Promise((n=>{if(window.__debug){for(let a in window.getModuleList())if("object"==typeof e[a]&&null!==e[a]){let o=e[a];var i=o[t]?o:null;if(i)return window[t]=i,n(window[t])}}else{const e=`parasite${Date.now()}`;window.webpackChunkwhatsapp_web_client.push([[e],{},function(e){let i=[];for(let t in e.m)i.push(e(t));for(let e in i)if("object"==typeof i[e]&&null!==i[e]){let o=i[e];var a=o[t]?o:null;if(a)return window[t]=a,n(window[t])}}])}})),window.injectToFunction=(e,t)=>{(async()=>{const n=await window.mR(e),i=n[e];n[e]=(...e)=>t(i,e)})()},window.injectToFunction("createMsgProtobuf",((e,t)=>{const n=e(...t),[i]=t;if(n.listMessage&&(n.viewOnceMessage={message:{listMessage:n.listMessage}},delete n.listMessage),n.buttonsMessage&&(n.viewOnceMessage={message:{buttonsMessage:n.buttonsMessage}},delete n.buttonsMessage),n.templateMessage&&(n.viewOnceMessage={message:{templateMessage:n.templateMessage}},delete n.templateMessage),i.hydratedButtons){const e={hydratedButtons:i.hydratedButtons};if(i.footer&&(e.hydratedFooterText=i.footer),i.caption&&(e.hydratedContentText=i.caption),i.title&&(e.hydratedTitleText=i.title),n.conversation)e.hydratedContentText=n.conversation,delete n.conversation;else if(n.extendedTextMessage?.text)e.hydratedContentText=n.extendedTextMessage.text,delete n.extendedTextMessage;else{let t;const i=["documentMessage","imageMessage","locationMessage","videoMessage"];for(const e of i)if(e in n){t=e;break}if(!t)return n;e[t]=n[t],e.hydratedTitleText&&!e.hydratedContentText&&(e.hydratedContentText=e.hydratedTitleText),delete e.hydratedTitleText,"locationMessage"===t&&(e.hydratedContentText||!n[t].name&&!n[t].address||(e.hydratedContentText=n[t].name&&n[t].address?`${n[t].name}\n${n[t].address}`:n[t].name||n[t].address||"")),e.hydratedContentText=e.hydratedContentText||" ",delete n[t]}n.templateMessage={hydratedTemplate:e}}return n})),window.injectToFunction("mediaTypeFromProtobuf",((e,...t)=>{const[n]=t;return n.viewOnceMessage?.message.templateMessage.hydratedTemplate?e(n.viewOnceMessage?.message.templateMessage.hydratedTemplate):e(...t)})),window.injectToFunction("typeAttributeFromProtobuf",((e,t)=>{const[n]=t;return console.log("proto",n),n.viewOnceMessage?.message.listMessage||n.imageMessage||n.audioMessage||1===n.viewOnceMessage?.message?.buttonsMessage?.headerType||2===n.viewOnceMessage?.message?.buttonsMessage?.headerType||n.viewOnceMessage?.message.templateMessage.hydratedTemplate,"text"})),window.injectToFunction("createFanoutMsgStanza",(async(e,t)=>{const[,n]=t;let i=null;if(n.viewOnceMessage?.message.listMessage){const e=n.viewOnceMessage?.message.listMessage?.listType||0,t=["unknown","single_select","product_list"];i=Store.Websocket.smax("list",{v:"2",type:t[e]})}const a=await e(...t);if(!i)return a;const o=a.content;let r=o.find((e=>"biz"===e.tag));r||(r=Store.Websocket.smax("biz",{},null),o.push(r));let s=!1;return Array.isArray(r.content)?s=!!r.content.find((e=>e.tag===i?.tag)):r.content=[],s||r.content.push(i),a}))}function m(){if(window.__debug)y(window.getModuleList()).finally();else if(window.webpackChunkwhatsapp_web_client&&Array.isArray(window.webpackChunkwhatsapp_web_client)){const e=o.parasite;window[o.webpack].push([[e],{},async function(e){let t=[];for(let n in e.m)t.push(e(n));await y(t)}])}}async function A(){return new Promise((e=>{const t=()=>{window.__debug?window.__debug.modulesMap?.WAWebUserPrefsMeUser?e():setTimeout(t,200):window[o.webpack]&&Array.isArray(window[o.webpack])&&window[o.webpack].every((e=>Array.isArray(e)&&e.length>0))?e():setTimeout(t,200)};t()}))}window.Store={},window.getModuleList=function(){let e={};return Object.keys(window.__debug.modulesMap).filter((e=>e.includes("WA"))).forEach((function(t){let n=window.__debug.modulesMap[t];if(n&&(e[t]={default:n.defaultExport,factory:n.factory},0===Object.keys(e[t].default).length))try{self.ErrorGuard.skipGuardGlobal(!0),Object.assign(e[t],self.importNamespace(t))}catch(e){}})),e},(async()=>{if(window.__debug)await A(),m();else{await A();const e=window[o.webpack].length-1;!window[o.webpack][e][0].includes(o.parasite)&&document.querySelectorAll("#app .two").length&&m()}})(),void 0===window.WAPI&&(window.WAPI={},window.WAPI.createCommunity=async function(e,t){try{const n={name:e,desc:t,closed:!0};return await window.Store.SendCommunity.sendCreateCommunity(n),!0}catch{return!1}},window.WAPI.interfaceMute=function(e){let{attributes:t,expiration:n,id:i,isMuted:a,isState:o,promises:r,stale:s}=e;return{attributes:t,expiration:n,id:i,isMuted:a,isState:o,promises:r,stale:s}},window.WAPI.checkIdMessage=async function(e,t){if("string"!=typeof e)return WAPI.scope(null,!0,404,"enter the chatId variable as an string");const n=await WAPI.sendExist(e);if(n&&404!=n.status){if(!await window.Store.Msg.get(t))return WAPI.scope(n,!0,404,`The id ${t} does not exist!`);const e=n.id,i={type:"checkIdMessage"};let a=WAPI.scope(e,!1,"OK","");return Object.assign(a,i),a}return n},window.WAPI.returnReply=async function(e){return"object"!=typeof e?WAPI.scope(null,!0,404,"enter the message variable as an object"):!!(e&&e.quotedMsg&&e.quotedMsg.type&&e.quotedMsgObj)&&e.quotedMsgObj},window.WAPI.getStore=y,window.WAPI.setNewMessageId=async function(e,t=!0){if(e&&"object"==typeof e&&e.number&&e._serialized&&e.id){const n=t?await WAPI.sendExist(e.number):await WAPI.returnChat(e.number);if(delete e.number,n.id){const t=new Object;return t.fromMe=!0,t.id=e.id,t.remote=await new Store.WidFactory.createWid(n.id._serialized),t._serialized=`${t.fromMe}_${t.remote}_${t.id}`,await new Store.MsgKey(t)}return!1}return!1},window.WAPI.sendButtons=async function(e,t,n,i){if("string"!=typeof t||0===t.length)return WAPI.scope(e,!0,404,"It is necessary to write a title!");if("string"!=typeof n||0===n.length)return WAPI.scope(e,!0,404,"It is necessary to write a subtitle!");if(Array.isArray(i)&&i.length>0)for(let t in i)if("function"!=typeof i[t]){if(!i[t].buttonText)return WAPI.scope(e,!0,404,"passed object buttonText");if("object"!=typeof i[t].buttonText)return WAPI.scope(e,!0,404,"passed object value in buttonText");if(!i[t].buttonText.displayText)return WAPI.scope(e,!0,404,"passed object displayText");if("string"!=typeof i[t].buttonText.displayText)return WAPI.scope(e,!0,404,"passed string value in displayText");i[t].buttonId||(i[t].buttonId=`id${t}`),i[t].type||(i[t].type=1)}const a=await WAPI.sendExist(e);if(a&&404!=a.status&&a.id){const e=await window.WAPI.getNewMessageId(a.id._serialized),s={id:e,ack:0,from:await Store.MaybeMeUser.getMaybeMeUser(),to:a.id,local:!0,self:"out",t:parseInt((new Date).getTime()/1e3),isNewMsg:!0,type:"chat",body:t,caption:t,content:t,footer:n,isDynamicReplyButtonsMsg:!0,isForwarded:!1,isFromTemplate:!0,invis:!0,fromMe:!1};var o={dynamicReplyButtons:i};Object.assign(s,o);var r=(await Promise.all(window.Store.addAndSendMsgToChat(a,s)))[1];return"success"===r||"OK"===r||"OK"===r.messageSendResult?WAPI.scope(e,!1,r,null):WAPI.scope(e,!0,r,null)}return a},window.WAPI.checkNumberStatus=async function(e,t=!1){try{const n={error:404},i=window.Store&&window.Store.State&&window.Store.State.Socket&&window.Store.State.Socket.state?window.Store.State.Socket.state:"",a=WAPI.sendCheckType(e);if(a&&404===a.status)throw Object.assign(n,{text:a.text,numberExists:null}),n;if(!0===t&&"CONNECTED"!==i)throw Object.assign(n,{text:"No connection with WhatsApp",connection:i,numberExists:null}),n;const o=await WAPI.getChat(e);if(o)return await Store.checkNumber.queryWidExists(o.id).then((e=>{if(e&&"object"==typeof e)return{status:200,numberExists:!0,id:e.wid};throw Object.assign(n,{connection:i,numberExists:!1,text:"The number does not exist"})})).catch((e=>{if(e.text)throw e;throw Object.assign(e,{connection:i,numberExists:!1,text:e})}));throw Object.assign(n,{connection:i,numberExists:!1})}catch(e){return{status:e.error,text:e.text,numberExists:e.numberExists,connection:e.connection}}},window.WAPI.sendCheckType=function(e=void 0){if(!e)return WAPI.scope(e,!0,404,"It is necessary to pass a number!");if("string"==typeof e){const t="@c.us",n="@broadcast",i="@g.us";if(t!==e.substr(-t.length,t.length)&&n!==e.substr(-n.length,n.length)&&i!==e.substr(-i.length,i.length))return WAPI.scope(e,!0,404,"The chat number must contain the parameters @c.us, @broadcast or @g.us. At the end of the number!");if(t===e.substr(-t.length,t.length)&&(e.match(/(@c.us)/g)&&e.match(/(@c.us)/g).length>1||!e.match(/^(\d+(\d)*@c.us)$/g)))return WAPI.scope(e,!0,404,"incorrect parameters! Use as an example: 000000000000@c.us");if(n===e.substr(-n.length,n.length)&&(e.match(/(@broadcast)/g).length>1||!e.match(/^(\d+(\d)*@broadcast)$/g)&&!e.match(/^(status@broadcast)$/g)))return WAPI.scope(e,!0,404,"incorrect parameters! Use as an example: 0000000000@broadcast");if(i===e.substr(-i.length,i.length)&&(e.match(/(@g.us)/g)&&e.match(/(@g.us)/g).length>1||!e.match(/^(\d+(-)+(\d)|\d+(\d))*@g.us$/g)))return WAPI.scope(e,!0,404,"incorrect parameters! Use as an example: 00000000-000000@g.us or 00000000000000@g.us")}},window.WAPI.sendListMenu=async function(e,t,n,i,a,o){if(!t&&"string"!=typeof t)return WAPI.scope(null,!0,404,"Enter the title variable as an string");if(!n&&"string"!=typeof n)return WAPI.scope(null,!0,404,"Enter the SubTitle variable as an string");if(!i&&"string"!=typeof i)return WAPI.scope(null,!0,404,"Enter the description variable as an string");if(!a&&"string"!=typeof a)return WAPI.scope(null,!0,404,"Enter the buttonText variable as an string");if(!o&&!1===Array.isArray(o))return WAPI.scope(null,!0,404,"Enter the menu variable as an array");for(let e in o)if("remove"!==e){if(!o[e].title||"string"!=typeof o[e].title||!o[e].title.length)return WAPI.scope(null,!0,404,"Incorrect Title passed in menu");if(!(o[e].rows&&Array.isArray(o[e].rows)&&o[e].rows.length))return WAPI.scope(null,!0,404,"Rows must be an object array");for(let t in o[e].rows)if("remove"!==t){if(!o[e].rows[t].title||!o[e].rows[t].title.length)return WAPI.scope(null,!0,404,"Enter the Title variable as an string");o[e].rows[t].description&&o[e].rows[t].description.length&&(o[e].rows[t].rowId||(o[e].rows[t].rowId=`dessert_${t}`))}}const r=await WAPI.sendExist(e);if(r&&404!=r.status&&r.id){const e=await window.WAPI.getNewMessageId(r.id._serialized),d=await Store.MaybeMeUser.getMaybeMeUser(),c=await WAPI.getchatId(r.id).catch((()=>{}));c&&(r.lastReceivedKey._serialized=c._serialized,r.lastReceivedKey.id=c.id);const l={id:e,ack:0,from:d,to:r.id,local:!0,self:"out",t:parseInt((new Date).getTime()/1e3),isNewMsg:!0,invis:!0,footer:n,notifyName:"",type:"list",interactiveAnnotations:!0,interactiveMessage:!0,star:!1,broadcast:!1,fromMe:!1,list:{title:t,description:i,buttonText:a,listType:1,sections:o}};var s=(await Promise.all(window.Store.addAndSendMsgToChat(r,l)))[1];return"success"===s||"OK"===s||"OK"===s.messageSendResult?WAPI.scope(e,!1,s,null):WAPI.scope(e,!0,s,null)}return r},window.WAPI.getStateConnection=function(){return window.Store.State.Socket.state},window.WAPI.sleep=function(e){try{return new Promise((t=>setTimeout(t,e)))}catch(e){}},window.WAPI.isBeta=async function(){return!(window.localStorage.getItem("WASecretBundle")||window.localStorage.getItem("WAToken1")||window.localStorage.getItem("WAToken2"))},window.WAPI.setProfilePic=async function(e,t){t=t?new Store.WidFactory.createWid(t):await Store.MaybeMeUser.getMaybeMeUser();let n="data:image/jpeg;base64,";return await Store.Profile.sendSetPicture(t,n+e.b,n+e.a)},window.WAPI.getSessionTokenBrowser=async function(){if(window.localStorage){var e=await JSON.parse(JSON.stringify(window.localStorage));let{WABrowserId:t,WASecretBundle:n,WAToken1:i,WAToken2:a}=e;return{WABrowserId:t,WASecretBundle:n,WAToken1:i,WAToken2:a}}},window.WAPI.scope=async function(e,t,n,i=null){return{me:await WAPI.getHost(),to:e,erro:t,text:i,status:n}},window.WAPI.getchatId=async function(e){if(e){let t=await WAPI.getChatById(e);if(t&&"object"==typeof t){let e=t.lastReceivedKey;if(e&&"object"==typeof e){let n={formattedName:t.contact.formattedName,isBusiness:t.contact.isBusiness,isMyContact:t.contact.isMyContact,verifiedName:t.contact.verifiedName,pushname:t.contact.pushname,isOnline:t.isOnline};return Object.assign(e,n),e}}}},window.WAPI.sendExist=async function(e,t=!0,n=!0){const i=await WAPI.sendCheckType(e);if(i&&404===i.status)return i;let a=await window.WAPI.checkNumberStatus(e,!1);if(404===a.status&&!e.includes("@g.us")&&!e.includes("@broadcast")||a&&a.text&&"function"==typeof a.text.includes&&a.text.includes("XmppParsingFailure"))return WAPI.scope(e,!0,a.status,"The number does not exist");const o=new Store.WidFactory.createWid(e);let r=a&&a.id&&a.id._serialized?await WAPI.getChat(a.id._serialized):void 0;if(a.numberExists&&void 0===r){var s=new Store.UserConstructor(e,{intentionallyUsePrivateConstructor:!0});const t=new Store.WidFactory.createWid(e);await Store.Chat.add({createdLocally:!0,id:t},{merge:!0}),r=await Store.Chat.find(s)}if(!r){const e=await Store.Chat.find(o);e&&(r=e&&e.id&&e.id._serialized?await WAPI.getChat(e.id._serialized):void 0)}return a.numberExists||r.t||!r.isUser?a.numberExists||r.t||!r.isGroup?!a.numberExists&&!r.t&&r.id&&"status"!=r.id.user&&r.isBroadcast?WAPI.scope(e,!0,a.status,"The transmission list number does not exist on your chat list, or it does not exist at all!"):r?(n&&await window.Store.ReadSeen.sendSeen(r,!1),t?r:WAPI.scope(e,!1,200)):WAPI.scope(e,!0,404):WAPI.scope(e,!0,a.status,"The group number does not exist on your chat list, or it does not exist at all!"):WAPI.scope(e,!0,a.status,"The number does not exist")},window.WAPI.returnChat=async function(e,t=!0,n=!0){const i=WAPI.sendCheckType(e);if(i&&404===i.status)return i;let a=await WAPI.getChat(e);if(!a){var o=new Store.UserConstructor(e,{intentionallyUsePrivateConstructor:!0});const t=new Store.WidFactory.createWid(e);await Store.Chat.add({createdLocally:!0,id:t},{merge:!0}),a=await Store.Chat.find(o)}if(void 0===a){const t=new Store.WidFactory.createWid(e);await Store.Chat.add({createdLocally:!0,id:t},{merge:!0});const n=await Store.Chat.find(e);n&&(a=n&&n.id&&n.id._serialized?await WAPI.getChat(n.id._serialized):void 0)}return a?(n&&await window.Store.ReadSeen.sendSeen(a,!1),t?a:WAPI.scope(e,!1,200)):WAPI.scope(e,!0,404)},window.WAPI.pinChat=async function(e,t=!0,n=!1){if("boolean"!=typeof t||"boolean"!=typeof n)return WAPI.scope(e,!0,null,"incorrect parameter, insert a boolean true or false");let i,a=t?"pin":"unpin";var o=await WAPI.sendExist(e,!0,n);if(o.erro)return o;var r={type:"pinChat",typefix:a},s=await WAPI.getchatId(o.id);return await Store.pinChat.setPin(o,t).then((e=>{var t=WAPI.scope(s,!1,"OK",null);Object.assign(t,r),i=t})).catch((e=>{var t=WAPI.scope(s,!0,e,"Pin Chat first");Object.assign(t,r),i=t})),i},window.WAPI.archiveChat=async function(e,t){const n=await WAPI.sendExist(e);if("boolean"!=typeof t)return WAPI.scope(void 0,!0,null,"Use true to archive or false to unarchive");if(n&&404!=n.status){const e=await window.chatOptions.archiveChat(n,t);return WAPI.scope(void 0,!1,e,void 0)}return n},window.WAPI.setTheme=async function(e){return"dark"==e||"light"==e?(await Store.Theme.setTheme(e),!0):console.error("Use type dark or light")},window.WAPI.getTheme=async function(){return await Store.Theme.getTheme()},window.WAPI._serializeRawObj=e=>e?.toJSON?(e.waveform=null,e.toJSON()):{},window.WAPI._serializeChatObj=e=>null==e?null:Object.assign(window.WAPI._serializeRawObj(e),{kind:e?.kind,isGroup:e?.isGroup,contact:e?.contact?window.WAPI._serializeContactObj(e?.contact):null,groupMetadata:e?.groupMetadata?window.WAPI._serializeRawObj(e?.groupMetadata):null,presence:e?.presence?window.WAPI._serializeRawObj(e?.presence):null,msgs:null,tcToken:null,isOnline:e?.__x_presence?.attributes?.isOnline||null,lastSeen:e?.previewMessage?.__x_ephemeralStartTimestamp?1e3*e.previewMessage.__x_ephemeralStartTimestamp:null}),window.WAPI._serializeContactObj=e=>null==e?null:(!e.profilePicThumb&&e.id&&Store.ProfilePicThumb&&(e.profilePicThumb=Store.ProfilePicThumb.get(e.id)),Object.assign(window.WAPI._serializeRawObj(e),{formattedName:e?.formattedName,displayName:e?.displayName,formattedShortName:e?.formattedShortName,formattedShortNameWithNonBreakingSpaces:e?.formattedShortNameWithNonBreakingSpaces,isHighLevelVerified:e?.isHighLevelVerified,isMe:e?.isMe,mentionName:e?.mentionName,notifyName:e?.notifyName,isMyContact:e?.isMyContact,isPSA:e?.isPSA,isUser:!!(e?.isUser??"c.us"===e?.id?.server),isVerified:e?.isVerified,isWAContact:e?.isWAContact,profilePicThumbObj:e?.profilePicThumb?WAPI._serializeProfilePicThumb(e?.profilePicThumb):{},statusMute:e?.statusMute,msgs:null})),window.WAPI._serializeMessageObj=async e=>{if(void 0===e)return null;const t=e.chat?await WAPI._serializeChatObj(e.chat):{};let n=await WAPI.getAllChats();return{...window.WAPI._serializeRawObj(e),id:e?.id?._serialized,from:e?.from?._serialized,quotedParticipant:e?.quotedParticipant?._serialized?e?.quotedParticipant?._serialized:void 0,author:e?.author?._serialized?e?.author?._serialized:void 0,chatId:e?.id?.remote?e?.id?.remote:e?.chatId?._serialized?e?.chatId?._serialized:void 0,to:e?.to?._serialized?e?.to?._serialized:void 0,fromMe:e?.id?.fromMe,sender:e?.senderObj?await WAPI._serializeContactObj(e?.senderObj):null,timestamp:e?.t,content:e?.body,body:e?.body,isLink:e?.isLink,isMMS:e?.isMMS,isMedia:e?.isMedia,isNotification:e?.isNotification,isPSA:e?.isPSA,type:e?.type,chat:t,isOnline:t?.isOnline,lastSeen:t?.lastSeen,quotedMsgObj:e?.quotedMsg,quotedStanzaId:e?.quotedStanzaID?e?.quotedStanzaID:void 0,mediaData:window.WAPI._serializeRawObj(e?.mediaData),caption:e?.caption,deprecatedMms3Url:e?.deprecatedMms3Url,directPath:e?.directPath,encFilehash:e?.encFilehash,filehash:e?.filehash,filename:e?.filename,mimetype:e?.mimetype,clientUrl:e?.clientUrl,mediaKey:e?.mediaKey,size:e?.size,t:e?.t,isNewMsg:e?.isNewMsg,linkPreview:e