Lines 1-21javascript
1'use strict';var za=require('baileys'),Ae=require('node:fs/promises'),url=require('node:url'),os$1=require('node:os'),$e=require('node:path'),child_process=require('node:child_process'),jimp=require('jimp'),bi=require('node-webpmux'),crypto=require('node:crypto'),fs$1=require('node:fs');require('node:stream');var Io=require('qrcode-terminal'),Ro=require('pino'),events=require('node:events');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var za__default=/*#__PURE__*/_interopDefault(za);var Ae__default=/*#__PURE__*/_interopDefault(Ae);var $e__default=/*#__PURE__*/_interopDefaul ...
2`;)i++;s(n.slice(a,i),5);continue}if(o==='"'||o==="'"||o==="`"){let a=i,c=o;for(i++;i<n.length;)if(n[i]==="\\"&&i+1<n.length)i+=2;else if(n[i]===c){i++;break}else i++;s(n.slice(a,i),3);continue}if(/[0-9]/.test(o)){let a=i;for(;i<n.length&&/[0-9.]/.test(n[i]);)i++;s(n.slice(a,i),4);continue}if(/[a-zA-Z_$]/.test(o)){let a=i;for(;i<n.length&&/[a-zA-Z0-9_$]/.test(n[i]);)i++;let c=n.slice(a,i),d=0;if(t.has(c))d=1;else {let l=i;for(;l<n.length&&/\s/.test(n[l]);)l++;n[l]==="("&&(d=2);}s(c,d);continue}s(o,0),i++;}return r},D=(n,e)=>({view_model:{[Array.isArray(e)?"primitives":"primitive"]:e,__typename ...
HighChild Process
Package source references child process execution.
dist/index.cjsView on unpkg · L1 HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/index.cjsView on unpkg · L1 HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dist/index.cjsView on unpkg · L1 MediumDynamic Require
Package source references dynamic require/import behavior.
3`)}:null;if(n==="image")return t.length>0?{type:"image",url:t.length===1?t[0]:t}:null;if(n==="video"){if(t.length===0)return null;let r=t.map(o=>ft(o)[0]??"").filter(o=>o.length>0);if(r.length===0)return null;let s=re(ft(t[0])[1]),i={type:"video",url:r.length===1?r[0]:r};return s!==void 0&&(i.duration=s),i}if(n==="product"){let r=t.map(Bi).filter(s=>s!==null);return r.length>0?{type:"product",products:r.length===1?r[0]:r}:null}if(n==="reels"){let r=t.map(Wi);return r.length>0?{type:"reels",reels:r}:null}if(n==="post"){let r=t.map(Fi);return r.length>0?{type:"post",posts:r}:null}return null},ir ...
5`),t=[],r=[],s=()=>{let o=r.join(`
6`).trim();o.length>0&&t.push({type:"text",text:o}),r=[];},i=0;for(;i<e.length;){let o=e[i],a=Li.exec(o);if(a){s();let u=[];for(i++;i<e.length&&!Ni.test(e[i]);)u.push
7`)}:{type:"code",content:u.join(`
8`)});continue}let d=e[i+1];if(o.includes("|")&&d!==void 0&&d.includes("|")&&Di.test(d)){s();let u=[rr(o)];for(i+=2;i<e.length&&e[i].includes(
10`:""}${n.body}`};return n.footer!==void 0&&(t.footer=n.footer),mt(n.buttons,t)};var ht=n=>{if(typeof n!="string"||n.trim().length===0)throw new g("EMPTY_CONTENT","text() requires a non-empty string");return {text:n}};
11`||n==="\r",Yi=n=>{let e=[],t="",r=null,s=false,i=false,o=true;for(let a=0;a<n.length;a+=1){let c=n[a];if(s){t+=c,s=false,i=true
12${ie} ${yo}`:t}case "disconnect":return n.willReconnect?null:`${ie} Disconnected (${n.reason}).`;default:return null}}var Tr=false,wo=["Closing session:","Closing open session","Closing stale open session","Opening session:","Removing old closed session","Migrating session to:","Session already closed","Decrypted message with closed session","Failed to decrypt message with any known session","Session error:"],vo=n=>typeof n[0]=="string"&&wo.some(e=>n[0].startsWith(e));function Or(){if(Tr)return;Tr=true;let n=e=>{let t=console[e].bind(console);console[e]=(...r)=>{vo(r)||t(...r);};};n("info"),n( ...
13`);}var ye={enabled:true,maxAttempts:Number.POSITIVE_INFINITY,initialDelayMs:3e3,maxDelayMs:6e4,jitterFactor:.2,rateLimitedDelayMs:3e5};function Wr(n,e){let t=n?.enabled??ye.enabled,r=n?.maxAttempts??ye.maxAttempts,s=n?.initialDelayMs??ye.initialDelayMs,i=n?.maxDelayMs??ye.maxDelayMs,o=n?.jitterFactor??ye.jitterFactor,a=n?.rateLimitedDelayMs??
14`).trim();return i.length>0?i:null},ca=n=>{let e=h(n.templateMessage),t=h(e?.hydratedTemplate)??h(e?.hydratedFourRowTemplate);return S(t?.hydratedContentText)},da=n=>Z(h(n.pollCreationMessage)?.name,h(n.pollCreationMessageV2)?.name,h(n.pollCreationMessageV3)?.name),la=n=>{let e=h(n.locationMessage)??h(n.liveLocationMessage);if(e==null)return null;let t=Z(e.name,e.address);if(t!=null){let i=S(e.name),o=S(e.address);return i!=null&&o!=null&&i!==o?`${i} \u2014 ${o}`:t}let r=e.degreesLatitude,s=e.degreesLongitude;return typeof r=="number"&&typeof s=="number"?`${r}, ${s}`:null},ua=n=>{let e=S(h(n.c ...
15`)}return ""},Pa=n=>Array.isArray(n)?n.map(e=>Buffer.from(e).toString("hex")):[],xs=(n,e)=>{let t=n?.reaction,r=t?.key;if(!r)return null;let s
16`);return {displayName:i,vcard:`BEGIN:VCARD
20END:VCARD`}}),r=t.length===1?t[0]:void 0;return r?{contactMessage:r}:{contactsArrayMessage:{displayName:`${t.length} contacts`,contacts:t}}},Ua=(n,e)=>{if(!n.id||!n.from)return null;let t=n.type==="text"&&typeof n.text?.body=="string"?{conversation:n.text.body}:Da(n)??Ba(n)??Wa(n)??Fa(n);if(t===null)return null;let r=Nt(e,n.from);return {key:{id:n.id,remoteJid:de(n.from),fromMe:false},message:t,messageTimestamp:Number(n.timestamp??0)||0,...r?{pushName:r}:{}}},ja=n=>{let e=n.id,t=n.status;if(typeof e!="string"||typeof t!="string"||t!=="sent"&&t!=="delivered"&&t!=="read"&&t!=="failed")return nul ...
21`);}resolveMe(){let e=this._socket?.user;if(e&&typeof e.id=="string"&&e.id.length>0)return e;let t=this.creds?.me;return t&&typeof t.id=="string"&&t.id.length>0?t:{id:""}}get provider(){return this._provider}get state(){return this.machine.state}get socket(){return this._socket}assertWebProvider(e){if(this._provider==="cloud"
Long lines were clipped for display.