(function(q,Ae,r,g,m,M,N,w,n,ne,b,E,_,Le,X){"use strict";const De=async function(){const e=await(await fetch("https://uselessfacts.jsph.pl/api/v2/facts/random")).json();return{text:e.text,source:e.source,language:e.language}},$e=async function(){return{text:(await(await fetch("https://dogapi.dog/api/v2/facts?limit=1")).json()).data[0].attributes.body}},Pe=async function(){const e=await(await fetch("https://catfact.ninja/fact")).json();return{text:e.fact,length:e.length}},xe=async function(e,t){try{const a=await fetch(`https://api.obamabot.me/v2/image/petpet?image=${e.replace("webp","png")}`);if(a.ok){const s=await a.json();if(s&&s.url)return s}}catch(a){console.warn("[PetPet] Obama API failed, falling back to .ru:",a)}if(t)return{url:`https://ptc.pwn3t.ru/${t}.gif`};throw new Error("All PetPet APIs are down")},Be=async function(e="gary"){try{switch(e){case"gary":return(await(await fetch("https://api.garythe.cat/gary")).json()).url;case"goober":return(await(await fetch("https://api.garythe.cat/goober")).json()).url;case"catapi":return(await(await fetch("https://api.thecatapi.com/v1/images/search")).json())[0].url;case"minker":return"https://minky.materii.dev/";default:throw new Error("Invalid Gary image source value")}}catch(t){return console.error(`[Gary API] Error fetching image from ${e}:`,t),null}},Y=g.findByProps("sendMessage"),J=function(e){let t=e.text;return r.storage.factSettings?.includeCitation&&e.source&&(t+=` Source: ${e.source}`),t},Fe={name:"catfact",displayName:"catfact",description:"Sends a random cat fact.",displayDescription:"Sends a random cat fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){try{const a=await Pe(),s=Date.now().toString();return Y.sendMessage(t.channel.id,{content:J(a)},void 0,{nonce:s}),null}catch(a){return console.error("[CatFact] Error:",a),m.showToast("Failed to fetch cat fact",3e3),null}}},Me={name:"dogfact",displayName:"dogfact",description:"Sends a dog fact.",displayDescription:"Sends a dog fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){try{const a=await $e(),s=Date.now().toString();return Y.sendMessage(t.channel.id,{content:J(a)},void 0,{nonce:s}),null}catch(a){return console.error("[DogFact] Error:",a),m.showToast("Failed to fetch dog fact",3e3),null}}},_e={name:"useless",displayName:"useless",description:"Sends a useless fact.",displayDescription:"Sends a useless fact.",applicationId:"-1",inputType:1,type:1,execute:async function(e,t){try{const a=await De(),s=Date.now().toString();return Y.sendMessage(t.channel.id,{content:J(a)},void 0,{nonce:s}),null}catch(a){return console.error("[UselessFact] Error:",a),m.showToast("Failed to fetch useless fact",3e3),null}}},D={CONTENT:"This list is over 2000 characters. Send anyway?",CONFIRM:"Send",CANCEL:"Cancel"},Ve={DETAILED:"detailed"},Q="",V={SLM_NOT_INSTALLED:"This list is over 2000 characters. Install the Split Large Messages plugin to send it.",SLM_NOT_ENABLED:"This list is over 2000 characters. Enable the Split Large Messages plugin to send it."},ae={SEMICOL:"; ",NEW_LINE:` `},Ue="Nothing to see here, huh...",re="github.com/fres621/vendetta-plugins",I={ENABLED:"\u2705",DISABLED:"\u274C",SELECTED:"\u2705",NOT_SELECTED:"\u274C"},We=g.findByProps("sendMessage","receiveMessage"),$=g.findByProps("sendBotMessage"),se=(function(){try{return g.findByStoreName("UserStore").getCurrentUser()?.premiumType===2?4e3:2e3}catch{return 2e3}})(),ie=function(e){return Object.keys(e).includes(re)},oe=function(e){return Object.values(e).find(function(t){return t.id==re})?.enabled},ce=function(e){return e.find(function(t){return t.name===Ve.DETAILED})?.value??!1},U=function(e){return!e||!Array.isArray(e)||e.length===0?"Unknown":e.filter(function(t){return t&&(typeof t=="string"||typeof t=="object"&&t.name)}).map(function(t){return typeof t=="string"?t:t.name||"Unknown"}).join(ae.SEMICOL)||"Unknown"},le=function(e){return e.join(ae.NEW_LINE).trimEnd()},W=function(e){return le(e).length},O=async function(e,t){const a=Date.now().toString();await We.sendMessage(e,{content:le(t)},void 0,{nonce:a})},de=function(e,t){return[`**My ${e} List | ${t} ${e}s**`,Q]};async function Oe(e,t){try{const a=ce(e),s=r.storage.themeListAlwaysDetailed??!1;if(!M.themes||typeof M.themes!="object"){const d=t.channel.id;return $.sendBotMessage(d,"No themes found or themes not loaded yet."),null}const i=Object.values(M.themes),o=t.channel.id,c=de("Theme",Object.keys(M.themes).length);if(i.length)for(const d of i){if(!d||typeof d!="object")continue;const{selected:u,data:f,id:C}=d,k=f?.name||"Unknown Theme",T=f?.description||"No description",P=f?.authors;a||s?c.push(`> **Name**: ${k}`,`> **Selected**: ${u?I.SELECTED:I.NOT_SELECTED}`,`> **Description**: ${T}`,`> **Authors**: ${U(P)}`,`> **[Install!](${C||"unknown"})**`,Q):c.push(`> ${u?I.SELECTED:I.NOT_SELECTED} **${k}** by ${U(P)}`)}else c.push(Ue);const l=W(c)>se;if(l&&!ie(N.plugins))$.sendBotMessage(o,V.SLM_NOT_INSTALLED);else if(l&&!oe(N.plugins))$.sendBotMessage(o,V.SLM_NOT_ENABLED);else{if(W(c)>2e3)return w.alerts.showConfirmationAlert({content:D.CONTENT,confirmText:D.CONFIRM,cancelText:D.CANCEL,onConfirm:async function(){return await O(o,c)}});await O(o,c)}}catch(a){return console.error("[ThemeList] Error:",a),null}}async function Ge(e,t){try{const a=ce(e),s=r.storage.pluginListAlwaysDetailed??!1,i=t.channel.id;if(!N.plugins||typeof N.plugins!="object")return $.sendBotMessage(i,"No plugins found or plugins not loaded yet."),null;const o=de("Plugin",Object.keys(N.plugins).length);for(const l of Object.values(N.plugins)){if(!l||typeof l!="object")continue;const{enabled:d,manifest:u,id:f}=l,C=u?.name||"Unknown Plugin",k=u?.description||"No description",T=u?.authors;a||s?o.push(`> **Name**: ${C}`,`> **Status**: ${d?I.ENABLED:I.DISABLED}`,`> **Description**: ${k}`,`> **Authors**: ${U(T)}`,`> **[Install!](${f||"unknown"})**`,Q):o.push(`> ${d?I.ENABLED:I.DISABLED} **${C}** by ${U(T)}`)}const c=W(o)>se;if(c&&!ie(N.plugins))$.sendBotMessage(i,V.SLM_NOT_INSTALLED);else if(c&&!oe(N.plugins))$.sendBotMessage(i,V.SLM_NOT_ENABLED);else{if(W(o)>2e3)return w.alerts.showConfirmationAlert({content:D.CONTENT,confirmText:D.CONFIRM,cancelText:D.CANCEL,onConfirm:async function(){return await O(i,o)}});await O(i,o)}}catch(a){return console.error("[PluginList] Error:",a),null}}const je={name:"plugin-list",displayName:"plugin list",description:"Send your plugin list to the current channel",displayDescription:"Send your plugin list to the current channel",options:[{name:"detailed",description:"Whether to send a list with detailed information.",type:5,required:!1,displayName:"detailed",displayDescription:"Whether to send a list with detailed information."}],execute:Ge,applicationId:"-1",inputType:1,type:1},He={name:"theme-list",displayName:"theme list",description:"Send your theme list to the current channel",displayDescription:"Send your theme list to the current channel",options:[{name:"detailed",description:"Whether to send a list with detailed information.",type:5,required:!1,displayName:"detailed",displayDescription:"Whether to send a list with detailed information."}],execute:Oe,applicationId:"-1",inputType:1,type:1},ze=g.findByStoreName("UserStore"),Ke=g.findByProps("sendMessage"),qe={name:"petpet",displayName:"petpet",description:"PetPet someone",displayDescription:"PetPet someone",options:[{name:"user",description:"The user (or their id) to be patted",type:6,required:!0,displayName:"user",displayDescription:"The user (or their id) to be patted"}],execute:async function(e,t){try{const a=await ze.getUser(e[0].value),s=a.getAvatarURL(512),i=await xe(s,a.id),o=Date.now().toString();return Ke.sendMessage(t.channel.id,{content:i.url},void 0,{nonce:o}),null}catch(a){return console.error("[PetPet] Error:",a),null}},applicationId:"-1",inputType:1,type:1},Xe=g.findByProps("sendMessage"),Ye=g.findByProps("sendBotMessage","sendMessage","receiveMessage"),ue=async function(e){const t="https://konachan.com/post.json",a=e?"rating:explicit":"rating:safe",s=Math.floor(Math.random()*100);try{const i=await(await fetch(`${t}?tags=${a}&limit=1&page=${s}`)).json();return!Array.isArray(i)||i.length===0?null:i[0].file_url}catch(i){return console.error("[KonoChan Randomizer] Error fetching image:",i),null}},fe=function(){return new Promise(function(e){w.alerts.showConfirmationAlert({title:"NSFW Content Warning",content:"NSFW content can only be sent in NSFW channels!",confirmText:"Okay",cancelText:"Cancel",confirmColor:"brand",isDismissable:!0,onConfirm:function(){return e(!0)},onCancel:function(){return e(!1)}})})},ge={name:"nsfw",description:"Include NSFW content?",type:5,required:!1,displayName:"nsfw",displayDescription:"Include NSFW content?"},Je={name:"konoself",displayName:"konoself",description:"Fetch a random image from KonoChan for yourself.",displayDescription:"Fetch a random image from KonoChan for yourself.",options:[ge],execute:async function(e,t){try{const a=new Map((e||[]).map(function(o){return[o.name,o]})).get("nsfw")?.value||!1,s=r.storage.hiddenSettings?.konochanBypassNsfw||!1;if(console.log(`[KonoSelf] NSFW: ${a}, Channel NSFW: ${t.channel.nsfw}, Bypass: ${s}`),a&&!t.channel.nsfw&&!s)return fe(),null;const i=await ue(a);return i&&Ye.sendBotMessage(t.channel.id,`Here's your random image: ${i}`),null}catch(a){return console.error("[KonoSelf] Error:",a),null}},applicationId:"-1",inputType:1,type:1},Qe={name:"konosend",displayName:"konosend",description:"Fetch a random image from KonoChan and send it to the channel.",displayDescription:"Fetch a random image from KonoChan and send it to the channel.",options:[ge],execute:async function(e,t){try{const a=new Map((e||[]).map(function(c){return[c.name,c]})).get("nsfw")?.value||!1,s=r.storage.hiddenSettings?.konochanBypassNsfw||!1;if(console.log(`[KonoSend] NSFW: ${a}, Channel NSFW: ${t.channel.nsfw}, Bypass: ${s}`),a&&!t.channel.nsfw&&!s)return fe(),null;const i=await ue(a);if(!i)return null;const o=Date.now().toString();return Xe.sendMessage(t.channel.id,{content:i},void 0,{nonce:o}),null}catch(a){return console.error("[KonoSend] Error:",a),{type:4}}},applicationId:"-1",inputType:1,type:1},me=g.findByProps("getAPIBaseURL","get"),Ze=g.findByProps("sendMessage"),et=async function(e,t,a){const s=t?`&author_id=${t}`:"",i=a?`&channel_id=${a}`:"",o=t?"":"&min_id=0";return(await me.get({url:`/guilds/${e}/messages/search`,query:`include_nsfw=true${s}${i}${o}&sort_by=timestamp&sort_order=asc&offset=0`})).body.messages[0][0]},tt=async function(e,t){const a=t?`&author_id=${t}`:"",s=t?"":"&min_id=0";return(await me.get({url:`/channels/${e}/messages/search`,query:`&sort_by=timestamp&sort_order=asc&offset=0${a}${s}`})).body.messages[0][0]},nt={name:"firstmessage",displayName:"firstmessage",description:"Tired of scrolling to first message?",displayDescription:"Tired of scrolling to first message?",options:[{name:"user",displayName:"user",description:"Target user to get their first message in this server/dm",displayDescription:"Target user to get their first message in this server/dm",type:6,required:!1},{name:"channel",displayName:"channel",description:"Target channel to get first message of",displayDescription:"Target channel to get first message of",type:7,required:!1},{name:"send",displayName:"send",description:"Whether to send the resulting url",displayDescription:"Whether to send the resulting url",type:5,required:!1}],execute:async function(e,t){try{const a=new Map(e.map(function(C){return[C.name,C]})),s=a.get("user")?.value,i=a.get("channel")?.value,o=a.get("send")?.value,c=t.guild?.id,l=t.channel.id,d=t.channel.type===1;if(d&&i)return m.showToast("Channel option cannot be used in DMs",3e3),null;let u="https://discord.com/channels/",f;if(d)f=await tt(l,s),u+=`@me/${l}/${f.id}`;else{f=await et(c,s,i);const C=i||f.channel_id;u+=`${c}/${C}/${f.id}`}if(o){const C=Date.now().toString();Ze.sendMessage(t.channel.id,{content:u},void 0,{nonce:C})}else n.ReactNative.Linking.openURL(u);return null}catch(a){return console.error("[FirstMessage] Error:",a),m.showToast("Failed to fetch first message",3e3),null}},applicationId:"-1",inputType:1,type:1},at=g.findByProps("sendMessage"),rt=g.findByProps("sendBotMessage","sendMessage","receiveMessage");function st(){let{height:e,width:t,scale:a}=n.ReactNative.Dimensions.get("screen");return e*=a,t*=a,{width:t,height:e}}function it(){try{const e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4),a=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0"),c=String(t.getMinutes()).padStart(2,"0"),l=String(t.getSeconds()).padStart(2,"0");return`${a}-${s}-${i} ${o}:${c}:${l}`}catch{return"Unknown"}}function ot(){try{const e=g.findByProps("memory");if(!e)return{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A"};const{cpuCoreCount:t,cpuPercentage:a,memory:s}=e,i=a?a.toFixed(2)+"%":"N/A",o=s?parseFloat((s/1e3).toPrecision(3))+" MB":"N/A";return{cpuCoreCount:t,cpuPerc:i,memUsage:o}}catch(e){return console.warn("Hardware info unavailable:",e),{cpuCoreCount:"N/A",cpuPerc:"N/A",memUsage:"N/A"}}}function ct(){try{const{NativeModules:e}=n.ReactNative;return(e.InfoDictionaryManager??e.RTNClientInfoManager)||{}}catch(e){return console.warn("Discord info unavailable:",e),{}}}function lt(){try{const{cpuCoreCount:e,cpuPerc:t,memUsage:a}=ot(),s=ct(),i=(typeof ne.getDebugInfo=="function"?ne.getDebugInfo():{})||{},{vendetta:o,discord:c,react:l,hermes:d,os:u,device:f}=i,C=it(),{version:k,bytecodeVersion:T}=d||{},{version:P,nativeVersion:K}=l||{},{name:v,version:A,sdk:F}=u||{},{manufacturer:L,brand:Ie,model:ke,codename:fn}=f||{},{version:gn}=o||{},{version:mn,build:yn}=c||{},pn=v=="iOS"?fn:`${Ie} ${ke}`,{width:hn,height:bn}=st(),Te={Device:{Device:pn||"Unknown",Model:ke||"Unknown",Manufacturer:L||"Unknown",Brand:Ie||"Unknown",Display:`${hn}x${bn}`},Hardware:{"CPU Cores":e||"N/A","CPU Usage":t,"Memory Usage":a},Software:{OS:v||"Unknown",Version:A||"Unknown"},Discord:{Version:mn||"Unknown",Build:yn||"Unknown",Vendetta:gn||"Unknown"},React:{Version:P||"Unknown","Hermes Bytecode":T||"Unknown",Hermes:k||"Unknown",Native:K||"Unknown"},Time:{UTC:C}};return F&&(Te.Software["SDK Version"]=F),Te}catch(e){throw console.error("Error generating system info:",e),e}}const ye=["device","hardware","software","discord","react","time","ephemeral"];for(const e of ye)r.storage[e]===void 0&&(r.storage[e]=!0);function dt(e,t){try{const a=[`__System Information__ `],s=lt();Object.keys(s).forEach(function(c){const l=r.storage[c.toLowerCase()],d=e.find(function(u){return u.name==c.toLowerCase()})?.value??l;(d||l)&&!(l&&!d)&&(a.push(`[**${c}**]`),Object.keys(s[c]).forEach(function(u){a.push(`> ${u}: ${s[c][u]}`)}))});const i=r.storage.ephemeral,o=e.find(function(c){return c.name=="ephemeral"})?.value??i;if((o||i)&&!(i&&!o))return rt.sendBotMessage(t.channel.id,a.join(` `)),null;{const c=Date.now().toString();return at.sendMessage(t.channel.id,{content:a.join(` `)},void 0,{nonce:c}),null}}catch(a){return console.error("[Sysinfo] Error:",a),null}}const ut={name:"sysinfo",displayName:"sysinfo",description:"Display system information",displayDescription:"Display system information",options:[{name:"ephemeral",displayName:"ephemeral",description:"Keep sysinfo ephemeral (default: true)",displayDescription:"Keep sysinfo ephemeral (default: true)",type:5,required:!1},...ye.slice(0,-1).map(function(e){return{name:e,displayName:e,description:`Display the ${e} section. Set default in settings.`,displayDescription:`Display the ${e} section. Set default in settings.`,type:5,required:!1}})],execute:dt,applicationId:"-1",inputType:1,type:1},pe=g.findByProps("sendMessage","receiveMessage"),ft=g.findByStoreName("SpotifyStore");async function gt(e,t){return r.storage.enabledCommands?.spotifyTrack?G(t,function(a){return`https://open.spotify.com/track/${a.id}`}):null}async function mt(e,t){return r.storage.enabledCommands?.spotifyAlbum?G(t,function(a){return`https://open.spotify.com/album/${a.album.id}`}):null}async function yt(e,t){return r.storage.enabledCommands?.spotifyArtists?G(t,function(a){return a.artists.map(function(s){return`[${s.name}](${s.external_urls.spotify})`}).join(` `)}):null}async function pt(e,t){return r.storage.enabledCommands?.spotifyCover?G(t,function(a){return a.album.image.url}):null}async function G(e,t){try{const a=e.channel.id,s=ft?.getTrack?.();if(!s){const c=Date.now().toString();return pe.sendMessage(a,{content:"You are not listening to any track."},void 0,{nonce:c}),null}const i=t(s),o=Date.now().toString();return pe.sendMessage(a,{content:i},void 0,{nonce:o}),null}catch(a){return console.error("[Spotify Command] Error:",a),null}}const ht={name:"spotify track",displayName:"spotify track",description:"Sends your current Spotify track",displayDescription:"Sends your current Spotify track",applicationId:"-1",inputType:1,type:1,execute:gt},bt={name:"spotify album",displayName:"spotify album",description:"Sends your current track's album",displayDescription:"Sends your current track's album",applicationId:"-1",inputType:1,type:1,execute:mt},vt={name:"spotify artists",displayName:"spotify artists",description:"Sends your current track's artists",displayDescription:"Sends your current track's artists",applicationId:"-1",inputType:1,type:1,execute:yt},Ct={name:"spotify cover",displayName:"spotify cover",description:"Sends your current track's cover",displayDescription:"Sends your current track's cover",applicationId:"-1",inputType:1,type:1,execute:pt},wt=g.findByProps("sendMessage"),St={name:"gary",displayName:"gary",description:"Send a random Gary image to the channel.",displayDescription:"Send a random Gary image to the channel.",options:[],execute:async function(e,t){try{r.storage.garySettings||(r.storage.garySettings={imageSource:"gary"});const a=r.storage.garySettings.imageSource||"gary";console.log(`[Gary Command] Using image source: ${a}`);const s=await Be(a);if(!s)return console.log("[Gary Command] No image URL received"),null;console.log(`[Gary Command] Sending image: ${s}`);const i=Date.now().toString();return wt.sendMessage(t.channel.id,{content:s},void 0,{nonce:i}),{type:4}}catch(a){return console.error("[Gary] Error:",a),null}},applicationId:"-1",inputType:1,type:1},he=g.findByProps("sendMessage","receiveMessage"),Rt=g.findByProps("getLastSelectedChannelId"),Et=g.findByProps("createBotMessage"),Nt=g.findByProps("BOT_AVATARS");function j(e,t,a){const s=e??Rt?.getChannelId?.(),i=Et.createBotMessage({channelId:s,content:"",embeds:a});i.author.username="Astolfo",i.author.avatar="Astolfo",Nt.BOT_AVATARS.Astolfo="https://i.pinimg.com/736x/50/77/1f/50771f45b1c015cfbb8b0853ba7b8521.jpg",typeof t=="string"?i.content=t:Object.assign(i,t),he.receiveMessage(s,i)}const It={name:"lovefemboys",displayName:"lovefemboys",description:"Get an image of a femboy",displayDescription:"Get an image of a femboy",options:[{name:"nsfw",displayName:"nsfw",description:"Get the result from r/femboys instead of r/femboy (NSFW)",displayDescription:"Get the result from r/femboys instead of r/femboy (NSFW)",required:!1,type:5},{name:"sort",displayName:"sort",description:"Changes the way reddit sorts.",displayDescription:"Changes the way reddit sorts",required:!1,type:3},{name:"silent",displayName:"silent",description:"Makes it so only you can see the message.",displayDescription:"Makes it so only you can see the message.",required:!1,type:5}],applicationId:"-1",inputType:1,type:1,execute:async function(e,t){try{const a=e.find(function(l){return l.name==="nsfw"})?.value;let s=e.find(function(l){return l.name==="sort"})?.value;const i=e.find(function(l){return l.name==="silent"})?.value;if(typeof s>"u"&&(s=r.storage.sortdefs),!["best","hot","new","rising","top","controversial"].includes(s)){j(t.channel.id,"Incorrect sorting type. Valid options are\n`best`, `hot`, `new`, `rising`, `top`, `controversial`.",[]);return}if(a&&!await new Promise(function(l){w.alerts.showConfirmationAlert({title:"\u26A0\uFE0F NSFW Content Warning",content:"This command will send NSFW (Not Safe For Work) content from r/femboys. Are you sure you want to continue?",confirmText:"Yes, Continue",onConfirm:function(){return l(!0)},cancelText:"Cancel",onCancel:function(){return l(!1)}})}))return null;let o=await fetch(`https://www.reddit.com/r/femboy/${s}.json?limit=100`).then(function(l){return l.json()});if(!t.channel.nsfw_&&a&&r.storage.nsfwwarn&&!(i??!0)){j(t.channel.id,`This channel is not marked as NSFW (You can disable this check in plugin settings)`,[]);return}a&&(o=await fetch(`https://www.reddit.com/r/femboys/${s}.json?limit=100`).then(function(l){return l.json()})),o=o.data?.children?.[Math.floor(Math.random()*o.data?.children?.length)]?.data;const c=await fetch(`https://www.reddit.com/u/${o?.author}/about.json`).then(function(l){return l.json()});if(i??!0)j(t.channel.id,"",[{type:"rich",title:o?.title,url:`https://reddit.com${o?.permalink}`,author:{name:`u/${o?.author} \u2022 r/${o?.subreddit}`,proxy_icon_url:c?.data.icon_img.split("?")[0],icon_url:c?.data.icon_img.split("?")[0]},image:{proxy_url:o?.url_overridden_by_dest?.replace(/.gifv$/g,".gif")??o?.url.replace(/.gifv$/g,".gif"),url:o?.url_overridden_by_dest?.replace(/.gifv$/g,".gif")??o?.url?.replace(/.gifv$/g,".gif"),width:o?.preview?.images?.[0]?.source?.width,height:o?.preview?.images?.[0]?.source?.height},color:"0xf4b8e4"}]);else{const l=Date.now().toString();he.sendMessage(t.channel.id,{content:o?.url_overridden_by_dest??o?.url},void 0,{nonce:l})}}catch(a){console.error("[LoveFemboys] Error:",a),j(t.channel.id,"ERROR !!!!!!!!!!!! \u{1F62D}\u{1F62D}\u{1F62D} Check debug logs!! \u{1F97A}\u{1F97A}\u{1F97A}",[])}}},kt=g.findByProps("sendMessage"),Tt=g.findByProps("sendBotMessage","sendMessage","receiveMessage"),At={name:"ip",displayName:"ip",description:"IP address and domain lookup",displayDescription:"IP address and domain lookup",options:[{name:"query",displayName:"query",description:"Enter IPv4/IPv6 address or domain name",displayDescription:"Enter IPv4/IPv6 address or domain name",type:3,required:!0},{name:"send",displayName:"send",description:"Send to chat",displayDescription:"Send to chat",type:5,required:!1},{name:"ephemeral",displayName:"ephemeral",description:"Send as ephemeral message (only you can see)",displayDescription:"Send as ephemeral message (only you can see)",type:5,required:!1}],execute:async function(e,t){try{const a=e.find(function(u){return u.name==="query"})?.value,s=e.find(function(u){return u.name==="send"})?.value||!1,i=e.find(function(u){return u.name==="ephemeral"})?.value||!1;if(!a){const u="\u274C Query parameter is required!";return i?{type:4,data:{content:u,flags:64}}:(m.showToast(u,b.getAssetIDByName("CircleXIcon")),null)}!i&&!s&&m.showToast(`Looking up IP information for ${a}...`,b.getAssetIDByName("DownloadIcon"));const o=`http://ipwhois.app/json/${encodeURIComponent(a)}?objects=success,ip,type,as,org,isp,continent,country,country_capital,city,region,country_phone,latitude,longitude,timezone,currency,completed_requests`,c=await fetch(o);if(!c.ok)throw new Error(`HTTP ${c.status}: ${c.statusText}`);const l=await c.json();if(!l.success){const u=`\u274C Failed to lookup IP information for: ${a}`;return i?{type:4,data:{content:u,flags:64}}:(m.showToast(u,b.getAssetIDByName("CircleXIcon")),null)}const d=`\`\`\`json ${JSON.stringify(l,null,4)} \`\`\``;if(i)return{type:4,data:{content:d,flags:64}};if(s){const u=Date.now().toString();return kt.sendMessage(t.channel.id,{content:d},void 0,{nonce:u}),{type:4}}else return Tt.sendBotMessage(t.channel.id,d),null}catch(a){console.error("[IP] Command error:",a);const s=`\u274C An error occurred while looking up IP information: ${a.message||"Unknown error"}`;return e?.find?.(function(i){return i.name==="ephemeral"})?.value??!1?{type:4,data:{content:s,flags:64}}:(m.showToast(s,b.getAssetIDByName("CircleXIcon")),null)}},applicationId:"-1",inputType:1,type:1},Lt=g.findByProps("sendMessage"),Dt=g.findByProps("sendBotMessage","sendMessage","receiveMessage"),$t=["avatar","classic","cuddle","fox_girl","gecg","holo","kemonomimi","kiss","neko","ngif","smug","spank","tickle","waifu","wallpaper","woof"];async function Pt(e,t){const a=[];for(let s=0;s0&&await new Promise(function(c){return setTimeout(c,1e3)});const i=await fetch(`https://nekos.life/api/v2/img/${e}`);if(!i.ok){console.error(`[NekosLife] API request failed: ${i.status}`);continue}const o=await i.json();o.url&&a.push(o.url)}catch(i){console.error(`[NekosLife] Error fetching image ${s+1}:`,i)}return a}function xt(e){return!e||typeof e!="string"?!1:$t.includes(e.toLowerCase().trim())}const Bt={name:"nekoslife",displayName:"nekoslife",description:"Get SFW images/gifs from nekos.life",displayDescription:"Get SFW images/gifs from nekos.life",options:[{name:"category",displayName:"category",description:"Category name (e.g. neko, waifu, cuddle, etc.)",displayDescription:"Category name (e.g. neko, waifu, cuddle, etc.)",type:3,required:!0},{name:"limit",displayName:"limit",description:"Number of images (1-5, default: 1)",displayDescription:"Number of images (1-5, default: 1)",type:4,required:!1},{name:"send",displayName:"send",description:"Send to chat",displayDescription:"Send to chat",type:5,required:!1},{name:"ephemeral",displayName:"ephemeral",description:"Send as ephemeral message (only you can see)",displayDescription:"Send as ephemeral message (only you can see)",type:5,required:!1}],execute:async function(e,t){try{console.log("[NekosLife] Command executed with args:",e);const a=e.find(function(f){return f.name==="category"})?.value,s=e.find(function(f){return f.name==="limit"})?.value,i=e.find(function(f){return f.name==="send"})?.value||!1,o=e.find(function(f){return f.name==="ephemeral"})?.value||!1;if(console.log("[NekosLife] Parsed values:",{categoryInput:a,limitInput:s,shouldSend:i,isEphemeral:o}),!a||typeof a!="string"){const f="\u274C Category is required! Examples: neko, waifu, cuddle, kiss";return console.error("[NekosLife] No category provided"),o?{type:4,data:{content:f,flags:64}}:(m.showToast(f,b.getAssetIDByName("CircleXIcon")),null)}const c=a.toLowerCase().trim();if(!xt(c)){const f=`\u274C Invalid SFW category "${a}". Valid: neko, waifu, cuddle, kiss, holo, etc.`;return o?{type:4,data:{content:f,flags:64}}:(m.showToast(f,b.getAssetIDByName("CircleXIcon")),null)}let l=1;s!=null&&(l=parseInt(String(s))||1,l=Math.max(1,Math.min(5,l))),console.log("[NekosLife] Processing SFW request:",{category:c,limit:l,shouldSend:i,isEphemeral:o}),o||m.showToast(`Fetching ${l} SFW image(s) from nekos.life...`,b.getAssetIDByName("DownloadIcon"));const d=await Pt(c,l);if(d.length===0){const f="\u274C Failed to fetch images from nekos.life. Try again later!";return o?{type:4,data:{content:f,flags:64}}:(m.showToast(f,b.getAssetIDByName("CircleXIcon")),null)}const u=d.join(` `);if(o)return console.log("[NekosLife] Sending ephemeral response"),{type:4,data:{content:u,flags:64}};if(i){console.log("[NekosLife] Sending to chat");const f=Date.now().toString();return Lt.sendMessage(t.channel.id,{content:u},void 0,{nonce:f}),null}else return console.log("[NekosLife] Sending as bot message"),Dt.sendBotMessage(t.channel.id,u),null}catch(a){console.error("[NekosLife] Command error:",a);const s="\u274C An error occurred while fetching images.";return e?.find?.(function(i){return i.name==="ephemeral"})?.value??!1?{type:4,data:{content:s,flags:64}}:(m.showToast(s,b.getAssetIDByName("CircleXIcon")),null)}},applicationId:"-1",inputType:1,type:1},Ft=g.findByProps("sendBotMessage","sendMessage"),x=g.findByProps("getAllFriendInvites","createFriendInvite","revokeFriendInvites"),Mt=g.findByProps("getCurrentUser")?.getCurrentUser;function be(e,t){const a=Date.now().toString();Ft.sendMessage(e.channel.id,{content:t},void 0,{nonce:a})}const _t={name:"invite create",displayName:"invite create",description:"Generates a friend invite link.",displayDescription:"Generates a friend invite link.",type:1,applicationId:"-1",inputType:1,execute:async function(e,t){try{if(!Mt?.().phone)return m.showToast("You need a phone number connected to your account!",b.getAssetIDByName("Small")),null;const a=await x.createFriendInvite({code:null,recipient_phone_number_or_email:null,contact_visibility:0,filter_visibilities:[],filtered_invite_suggestions_index:0});if(a?.code){const s=Math.floor(new Date(a.expires_at).getTime()/1e3),i=`https://discord.gg/${a.code} \xB7 Expires: `;be(t,i),m.showToast("Friend invite created!",b.getAssetIDByName("Check"))}else throw new Error("No invite code generated");return null}catch(a){return console.error("[FriendInvite] Create error:",a),m.showToast("Error creating friend invite",b.getAssetIDByName("Small")),null}}},Vt={name:"view invites",displayName:"view invites",description:"View your current friend invite links that you've made.",displayDescription:"View your current friend invite links that you've made.",type:1,applicationId:"-1",execute:async function(e,t){try{const a=await x.getAllFriendInvites();if(!a?.length)return m.showToast("No active friend invites found",b.getAssetIDByName("Info")),null;const s=a.map(function(i){const o=Math.floor(new Date(i.expires_at).getTime()/1e3);return`_https://discord.gg/${i.code}_ \xB7 Expires: \xB7 Uses: \`${i.uses}/${i.max_uses}\``});return be(t,`**Your Active Friend Invites:** ${s.join(` `)}`),null}catch(a){return console.error("[FriendInvite] View error:",a),m.showToast("Error viewing friend invites",b.getAssetIDByName("Small")),null}}},Ut={name:"revoke invites",displayName:"revoke invites",description:"Revoke all your friend invite links.",displayDescription:"Revoke all your friend invite links.",type:1,applicationId:"-1",inputType:1,execute:async function(e,t){try{const a=await x.getAllFriendInvites();if(!a?.length)return m.showToast("No active friend invites to revoke",b.getAssetIDByName("Info")),null;await x.revokeFriendInvites();const s=await x.getAllFriendInvites();return s.length===0?m.showToast(`Successfully revoked all ${a.length} friend invite(s)!`,b.getAssetIDByName("Check")):m.showToast(`\u26A0\uFE0F Partially revoked invites. ${s.length} invite(s) remain active.`,b.getAssetIDByName("Warning")),null}catch(a){return console.error("[FriendInvite] Revoke error:",a),m.showToast("Error revoking friend invites",b.getAssetIDByName("Small")),null}}},{ScrollView:S}=g.findByProps("ScrollView"),{TableRowGroup:h,TableSwitchRow:y,TableCheckboxRow:vn,TableRadioGroup:Wt,TableRadioRow:H,Stack:R,TableRow:p}=g.findByProps("TableSwitchRow","TableCheckboxRow","TableRadioGroup","TableRadioRow","TableRowGroup","Stack","TableRow"),{TextInput:Cn}=g.findByProps("TextInput"),ve=g.findByProps("TextStyleSheet").TextStyleSheet,Ot=g.findByStoreName("ThemeStore"),Ce=g.findByProps("colors","unsafe_rawColors"),Gt=Ce?.internal??Ce?.meta;function we(e,t){const a=Ot?.theme;return e&&Gt?.resolveSemanticColor(a,e)||"#000000"}function jt(){const[e,t]=n.React.useState(0),[a,s]=n.React.useState(null),[i,o]=n.React.useState(null),[c,l]=n.React.useState(!1);n.React.useEffect(function(){r.storage.sidebarEnabled===void 0&&(r.storage.sidebarEnabled=!0)},[]);let d=null;try{d=g.findByProps("getUser","getCurrentUser")?.getCurrentUser?.()}catch(v){console.warn("[Commands Header] Failed to get current user:",v)}let u=null,f=null;try{u=g.findByProps("getUserAvatarURL")?.getUserAvatarURL}catch(v){console.warn("[Commands Header] Failed to get getUserAvatarURL:",v)}try{f=g.findByProps("getDefaultAvatarURL")?.getDefaultAvatarURL}catch(v){console.warn("[Commands Header] Failed to get getDefaultAvatarURL:",v)}const C=n.ReactNative.StyleSheet.create({container:{flexDirection:"row",alignItems:"center",paddingVertical:24,paddingHorizontal:16,width:"100%",justifyContent:"center"},leftSection:{flexDirection:"row",alignItems:"center",flex:1,gap:20,maxWidth:500},avatarContainer:{position:"relative",width:96,height:96,justifyContent:"center",alignItems:"center"},avatarWrapper:{width:96,height:96,borderRadius:24,justifyContent:"center",alignItems:"center",overflow:"hidden",borderWidth:2,borderColor:w.semanticColors.MOBILE_CHATINPUT_BORDER_DEFAULT},avatar:{width:92,height:92,borderRadius:22},cogwheelBackground:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",borderRadius:24,justifyContent:"center",alignItems:"center",opacity:0},cogwheelIcon:{width:32,height:32,tintColor:w.semanticColors.INTERACTIVE_ACTIVE},textContainer:{flex:1,marginLeft:4,justifyContent:"center"},animatedIndicator:{position:"absolute",top:8,right:8,backgroundColor:"rgba(0, 0, 0, 0.7)",borderRadius:10,width:20,height:20,justifyContent:"center",alignItems:"center",zIndex:1},gifText:{color:"#FFFFFF",fontSize:10,fontWeight:"bold"},avatarPlaceholder:{width:48,height:48,tintColor:w.semanticColors.INTERACTIVE_NORMAL}});n.React.useEffect(function(){if(d){let v,A=!1;const F=d.avatar?.startsWith("a_");if(u&&d.avatar)try{v=u(d,F),A=F}catch(L){console.warn("[Commands Header] Error getting custom avatar:",L),v=null}if(!v&&f&&typeof f=="function")try{v=f(d)}catch(L){console.warn("[Commands Header] Error getting default avatar URL:",L),v=null}if(!v&&d.avatar){const L=d.avatar.startsWith("a_");v=`https://cdn.discordapp.com/avatars/${d.id}/${d.avatar}.${L?"gif":"png"}?size=256`,A=L}else v||(v=`https://cdn.discordapp.com/embed/avatars/${d.discriminator?parseInt(d.discriminator)%5:(parseInt(d.id)>>22)%6}.png`);o(v),l(A)}},[d]);const k=function(){if(r.storage.hiddenSettings?.enabled){r.storage.hiddenSettings.visible=!r.storage.hiddenSettings.visible,m.showToast(`Hidden settings ${r.storage.hiddenSettings.visible?"visible":"hidden"}`,b.getAssetIDByName("SettingsIcon"));return}a&&clearTimeout(a);const v=setTimeout(function(){t(0)},1e3);s(v);const A=e+1;t(A),!(A<10)&&(m.showToast("Hidden settings unlocked!",b.getAssetIDByName("CheckmarkIcon")),r.storage.hiddenSettings={...r.storage.hiddenSettings,enabled:!0,visible:!0},t(0))},T=function(){const v=!r.storage.sidebarEnabled;r.storage.sidebarEnabled=v,r.storage.pendingRestart=!0,m.showToast(`Sidebar ${v?"enabled":"disabled"}. Restart Discord to apply.`,b.getAssetIDByName(v?"CheckmarkIcon":"XIcon"))},[P,K]=n.React.useState(!1);return n.React.createElement(n.ReactNative.View,{style:C.container},n.React.createElement(n.ReactNative.View,{style:C.leftSection},n.React.createElement(n.ReactNative.Pressable,{style:C.avatarContainer,onPress:k,onPressIn:function(){return K(!0)},onPressOut:function(){return K(!1)},delayLongPress:500,onLongPress:T},n.React.createElement(n.ReactNative.View,{style:C.avatarWrapper},i?n.React.createElement(n.React.Fragment,null,n.React.createElement(n.ReactNative.Image,{source:{uri:i},style:C.avatar,resizeMode:"cover"}),c&&n.React.createElement(n.ReactNative.View,{style:C.animatedIndicator})):n.React.createElement(n.ReactNative.Image,{source:b.getAssetIDByName("ic_account_circle_24px"),style:C.avatarPlaceholder})),n.React.createElement(n.ReactNative.View,{style:[C.cogwheelBackground,{opacity:P?.8:0}]},n.React.createElement(n.ReactNative.Image,{source:b.getAssetIDByName("SettingsIcon"),style:C.cogwheelIcon}))),n.React.createElement(n.ReactNative.View,{style:C.textContainer},n.React.createElement(n.ReactNative.Text,{style:[ve["display-md"],{color:we(w.semanticColors.TEXT_DEFAULT)}]},"Commands"),n.React.createElement(n.ReactNative.Text,{style:[ve["text-md/bold"],{color:we(w.semanticColors.TEXT_MUTED)}]},"A collection of useful commands for Vendetta like clients"))))}function Ht(){E.useProxy(r.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Fact Display Settings"},n.React.createElement(y,{label:"Send as Reply",subLabel:"Send facts as a reply to the command message",value:r.storage.factSettings.sendAsReply,onValueChange:function(t){r.storage.factSettings.sendAsReply=t}}),n.React.createElement(y,{label:"Include Source Citation",subLabel:"Include the source of facts when available",value:r.storage.factSettings.includeCitation,onValueChange:function(t){r.storage.factSettings.includeCitation=t}})),n.React.createElement(h,{title:"Available Fact Commands"},n.React.createElement(y,{label:"/catfact",subLabel:"Get random cat facts",value:r.storage.enabledCommands.catfact,onValueChange:function(t){r.storage.enabledCommands.catfact=t,r.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/dogfact",subLabel:"Get random dog facts",value:r.storage.enabledCommands.dogfact,onValueChange:function(t){r.storage.enabledCommands.dogfact=t,r.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/useless",subLabel:"Get random useless facts",value:r.storage.enabledCommands.useless,onValueChange:function(t){r.storage.enabledCommands.useless=t,r.storage.pendingRestart=!0,e()}}))))}function zt(){E.useProxy(r.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"List Display Settings"},n.React.createElement(y,{label:"Always Send Detailed Plugin List",subLabel:"Always use detailed mode when listing plugins",value:r.storage.listSettings.pluginListAlwaysDetailed,onValueChange:function(t){r.storage.listSettings.pluginListAlwaysDetailed=t}}),n.React.createElement(y,{label:"Always Send Detailed Theme List",subLabel:"Always use detailed mode when listing themes",value:r.storage.listSettings.themeListAlwaysDetailed,onValueChange:function(t){r.storage.listSettings.themeListAlwaysDetailed=t}})),n.React.createElement(h,{title:"Available List Commands"},n.React.createElement(y,{label:"/plugin-list",subLabel:"List all installed plugins",value:r.storage.enabledCommands.pluginList,onValueChange:function(t){r.storage.enabledCommands.pluginList=t,r.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/theme-list",subLabel:"List all installed themes",value:r.storage.enabledCommands.themeList,onValueChange:function(t){r.storage.enabledCommands.themeList=t,r.storage.pendingRestart=!0,e()}}))))}function Kt(){E.useProxy(r.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Image Commands"},n.React.createElement(y,{label:"/petpet",subLabel:"Create pet-pet GIF of a user",value:r.storage.enabledCommands.petpet,onValueChange:function(t){r.storage.enabledCommands.petpet=t,r.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"KonoChan Commands"},n.React.createElement(y,{label:"/konoself",subLabel:"Get random image from KonoChan (private)",value:r.storage.enabledCommands.konoself,onValueChange:function(t){r.storage.enabledCommands.konoself=t,r.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/konosend",subLabel:"Send random image from KonoChan to channel",value:r.storage.enabledCommands.konosend,onValueChange:function(t){r.storage.enabledCommands.konosend=t,r.storage.pendingRestart=!0,e()}}))))}function qt(){E.useProxy(r.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Gary Command Settings"},n.React.createElement(y,{label:"/gary",subLabel:"Send random Gary images to channel",value:r.storage.enabledCommands.gary,onValueChange:function(t){r.storage.enabledCommands.gary=t,r.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"Image Source Selection"},n.React.createElement(Wt,{value:r.storage.garySettings.imageSource,onChange:function(t){r.storage.garySettings.imageSource=t,e()}},n.React.createElement(H,{value:"gary",label:"Gary API",subLabel:"Original Gary the cat images from api.garythe.cat"}),n.React.createElement(H,{value:"catapi",label:"Cat API",subLabel:"Random cat pictures from thecatapi.com"}),n.React.createElement(H,{value:"minker",label:"Minker API",subLabel:"Minky images from minky.materii.dev"}),n.React.createElement(H,{value:"goober",label:"Goober API",subLabel:"Goober images from api.garythe.cat/goober"})))))}function Xt(){E.useProxy(r.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Spotify Commands"},n.React.createElement(y,{label:"/spotify track",subLabel:"Share your current Spotify track",value:r.storage.enabledCommands.spotifyTrack,onValueChange:function(t){r.storage.enabledCommands.spotifyTrack=t,r.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/spotify album",subLabel:"Share your current track's album",value:r.storage.enabledCommands.spotifyAlbum,onValueChange:function(t){r.storage.enabledCommands.spotifyAlbum=t,r.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/spotify artists",subLabel:"Share your current track's artists",value:r.storage.enabledCommands.spotifyArtists,onValueChange:function(t){r.storage.enabledCommands.spotifyArtists=t,r.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/spotify cover",subLabel:"Share your current track's cover",value:r.storage.enabledCommands.spotifyCover,onValueChange:function(t){r.storage.enabledCommands.spotifyCover=t,r.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"About Spotify Commands"},n.React.createElement(p,{label:"Spotify Integration",subLabel:"These commands allow you to share your current Spotify activity in Discord. Make sure you have Spotify connected to Discord for these commands to work properly."}))))}function Yt(){const e=n.ReactNative.StyleSheet.create({tableHeader:{flexDirection:"row",alignItems:"center",paddingVertical:12,paddingHorizontal:16},headerText:{fontSize:14,fontWeight:"700",color:w.semanticColors.HEADER_PRIMARY,textTransform:"uppercase"},nameHeader:{flex:2},codeHeader:{flex:2,textAlign:"center"},badgeHeader:{flex:1,textAlign:"center"},categoryItem:{flexDirection:"row",alignItems:"center",paddingVertical:12,paddingHorizontal:16},categoryName:{fontSize:16,fontWeight:"500",color:w.semanticColors.HEADER_PRIMARY,flex:2},categoryValue:{fontSize:14,color:w.semanticColors.TEXT_MUTED,fontFamily:"monospace",flex:2,textAlign:"center"},sfwBadgeContainer:{flex:1,alignItems:"center"},sfwBadge:{backgroundColor:w.semanticColors.STATUS_POSITIVE,paddingHorizontal:8,paddingVertical:4,borderRadius:12},badgeText:{fontSize:12,fontWeight:"600",color:w.semanticColors.TEXT_NORMAL}}),t=[{name:"Avatar",value:"avatar"},{name:"Classic",value:"classic"},{name:"Cuddle",value:"cuddle"},{name:"Fox Girl",value:"fox_girl"},{name:"Gecg",value:"gecg"},{name:"Holo",value:"holo"},{name:"Kemonomimi",value:"kemonomimi"},{name:"Kiss",value:"kiss"},{name:"Neko",value:"neko"},{name:"Neko GIF",value:"ngif"},{name:"Smug",value:"smug"},{name:"Spank",value:"spank"},{name:"Tickle",value:"tickle"},{name:"Waifu",value:"waifu"},{name:"Wallpaper",value:"wallpaper"},{name:"Woof",value:"woof"}],a=t.sort(function(s,i){return s.name.localeCompare(i.name)});return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Category Statistics"},n.React.createElement(p,{label:`${t.length} SFW Categories`,subLabel:"Use these category names with the /nekoslife command. All categories are Safe For Work (SFW)."})),n.React.createElement(h,{title:"SFW Categories"},n.React.createElement(n.ReactNative.View,{style:e.tableHeader},n.React.createElement(n.ReactNative.Text,{style:[e.headerText,e.nameHeader]},"Category Name"),n.React.createElement(n.ReactNative.Text,{style:[e.headerText,e.codeHeader]},"Command Code"),n.React.createElement(n.ReactNative.Text,{style:[e.headerText,e.badgeHeader]},"Type")),a.map(function(s,i){return n.React.createElement(n.ReactNative.View,{key:i,style:e.categoryItem},n.React.createElement(n.ReactNative.Text,{style:e.categoryName},s.name),n.React.createElement(n.ReactNative.Text,{style:e.categoryValue},s.value),n.React.createElement(n.ReactNative.View,{style:e.sfwBadgeContainer},n.React.createElement(n.ReactNative.View,{style:e.sfwBadge},n.React.createElement(n.ReactNative.Text,{style:e.badgeText},"SFW"))))}))))}function Jt(){E.useProxy(r.storage);const[,e]=n.React.useReducer(function(a){return a+1},0),t=n.NavigationNative.useNavigation();return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"IP Commands"},n.React.createElement(y,{label:"/ip",subLabel:"Get your current IP address",value:r.storage.enabledCommands.ip,onValueChange:function(a){r.storage.enabledCommands.ip=a,r.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"NekosLife Commands"},n.React.createElement(y,{label:"/nekoslife",subLabel:"Get images/gifs from nekos.life",value:r.storage.enabledCommands.nekoslife,onValueChange:function(a){r.storage.enabledCommands.nekoslife=a,r.storage.pendingRestart=!0,e()}}),n.React.createElement(p,{label:"View Categories",subLabel:"See all 16 available categories",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return t.push("VendettaCustomPage",{title:"NekosLife Categories",render:Yt})}}))))}function Qt(){E.useProxy(r.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Message Commands"},n.React.createElement(y,{label:"/firstmessage",subLabel:"Get the first message in a channel",value:r.storage.enabledCommands.firstmessage,onValueChange:function(t){r.storage.enabledCommands.firstmessage=t,r.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"System Commands"},n.React.createElement(y,{label:"/sysinfo",subLabel:"Display system information",value:r.storage.enabledCommands.sysinfo,onValueChange:function(t){r.storage.enabledCommands.sysinfo=t,r.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"Friend Invites"},n.React.createElement(y,{label:"/invite create",subLabel:"Generate a friend invite link",value:r.storage.enabledCommands.friendInviteCreate,onValueChange:function(t){r.storage.enabledCommands.friendInviteCreate=t,r.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/view invites",subLabel:"View your current friend invites",value:r.storage.enabledCommands.friendInviteView,onValueChange:function(t){r.storage.enabledCommands.friendInviteView=t,r.storage.pendingRestart=!0,e()}}),n.React.createElement(y,{label:"/revoke invites",subLabel:"Revoke all your friend invites",value:r.storage.enabledCommands.friendInviteRevoke,onValueChange:function(t){r.storage.enabledCommands.friendInviteRevoke=t,r.storage.pendingRestart=!0,e()}}))))}function Zt(){E.useProxy(r.storage);const[,e]=n.React.useReducer(function(t){return t+1},0);return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Warning"},n.React.createElement(p,{label:"Hidden Commands Warning",subLabel:"These are hidden commands that may contain mature content or experimental features. Use at your own discretion. Commands in this section are disabled by default."})),n.React.createElement(h,{title:"Hidden Commands"},n.React.createElement(y,{label:"/lovefemboys",subLabel:"Get random femboy images from r/femboys (NSFW content available)",value:r.storage.enabledCommands.lovefemboys,onValueChange:function(t){r.storage.enabledCommands.lovefemboys=t,r.storage.pendingRestart=!0,e()}})),n.React.createElement(h,{title:"NSFW Bypass Options"},n.React.createElement(y,{label:"KonoChan NSFW Bypass",subLabel:"Allow NSFW KonoChan content in non-NSFW channels (USE WITH CAUTION)",value:r.storage.hiddenSettings.konochanBypassNsfw,onValueChange:function(t){t?w.alerts.showConfirmationAlert({title:"NSFW Bypass Warning",content:"Enabling this allows NSFW content from KonoChan to be sent in any channel, including non-NSFW channels. This could violate server rules or Discord ToS. Use responsibly!",confirmText:"I Understand",cancelText:"Cancel",onConfirm:function(){r.storage.hiddenSettings.konochanBypassNsfw=!0,e()},onCancel:function(){}}):(r.storage.hiddenSettings.konochanBypassNsfw=!1,e())}})),n.React.createElement(h,{title:"Hidden Settings Control"},n.React.createElement(y,{label:"Keep Hidden Settings Visible",subLabel:"Keep this section visible even when navigating away",value:r.storage.hiddenSettings.visible,onValueChange:function(t){r.storage.hiddenSettings.visible=t}}),n.React.createElement(p,{label:"Reset Hidden Settings",subLabel:"Hide this section and disable all hidden commands",onPress:function(){w.alerts.showConfirmationAlert({title:"Reset Hidden Settings",content:"This will hide the hidden settings section and disable all hidden commands. Are you sure?",confirmText:"Reset",onConfirm:function(){r.storage.hiddenSettings.enabled=!1,r.storage.hiddenSettings.visible=!1,r.storage.hiddenSettings.konochanBypassNsfw=!1,r.storage.enabledCommands.lovefemboys=!1,r.storage.pendingRestart=!0,m.showToast("Hidden settings reset",b.getAssetIDByName("CheckmarkIcon"))},cancelText:"Cancel"})}}))))}const en=[{command:"Facts Commands",author:"jdev082",avatar:"https://github.com/jdev082.png",github:"https://github.com/jdev082"},{command:"List Commands",author:"Kitomanari",avatar:"https://github.com/Kitosight.png",github:"https://github.com/Kitosight"},{command:"PetPet",author:"wolfieeee",avatar:"https://github.com/WolfPlugs.png",github:"https://github.com/WolfPlugs"},{command:"KonoChan Commands",author:"btmc727 & Rico040",avatar:"https://github.com/OTKUSteyler.png",github:"https://github.com/OTKUSteyler"},{command:"FirstMessage Command",author:"sapphire",avatar:"https://github.com/aeongdesu.png",github:"https://github.com/aeongdesu"},{command:"Sysinfo Command",author:"mugman",avatar:"https://github.com/mugman174.png",github:"https://github.com/mugman174"},{command:"Spotify Commands",author:"Kitomanari",avatar:"https://github.com/Kitosight.png",github:"https://github.com/Kitosight"},{command:"Gary Command",author:"Zach Orange",avatar:"https://github.com/IAmGaryTheCat.png",github:"https://github.com/IAmGaryTheCat"},{command:"IP & NekosLife Commands",author:"scruzism",avatar:"https://github.com/scrazzz.png",github:"https://github.com/scrazzz"},{command:"FriendInvites",author:"nikosszzz",avatar:"https://github.com/nikosszzz.png",github:"https://github.com/nikosszzz"}];function tn(){return React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},React.createElement(R,{spacing:12},React.createElement(h,{title:"Plugin Authors"},en.map(function(e){return React.createElement(p,{key:e.github,label:e.command,subLabel:`by ${e.author}`,icon:React.createElement(n.ReactNative.Image,{source:{uri:e.avatar},style:{width:48,height:48,borderRadius:8},resizeMode:"cover"}),trailing:React.createElement(p.Arrow,null),onPress:function(){return n.ReactNative.Linking.openURL(e.github)}})})),React.createElement(h,{title:"About"},React.createElement(p,{label:"Commands Plugin Collection",subLabel:"Version 1.3.0"}))))}r.storage.factSettings==null&&(r.storage.factSettings={sendAsReply:!0,includeCitation:!1}),r.storage.listSettings==null&&(r.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),r.storage.garySettings==null&&(r.storage.garySettings={imageSource:"gary"}),r.storage.enabledCommands==null&&(r.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0,firstmessage:!0,sysinfo:!0,spotifyTrack:!0,spotifyAlbum:!0,spotifyArtists:!0,spotifyCover:!0,gary:!0,ip:!0,lovefemboys:!1,nekoslife:!1,friendInviteCreate:!0,friendInviteView:!0,friendInviteRevoke:!0}),r.storage.pendingRestart==null&&(r.storage.pendingRestart=!1),r.storage.hiddenSettings==null&&(r.storage.hiddenSettings={enabled:!1,visible:!1,konochanBypassNsfw:!1}),r.storage.sidebarEnabled==null&&(r.storage.sidebarEnabled=!0);function Se(){E.useProxy(r.storage);const e=n.NavigationNative.useNavigation();n.React.useEffect(function(){return function(){r.storage.pendingRestart&&(r.storage.pendingRestart=!1,w.alerts.showConfirmationAlert({title:"Restart Required",content:"You have made changes to commands. Please restart Discord to apply these changes.",confirmText:"Okay",cancelText:null,onConfirm:function(){}}))}},[]);const t=r.storage.garySettings.imageSource==="gary"?"Gary API":r.storage.garySettings.imageSource==="catapi"?"Cat API":r.storage.garySettings.imageSource==="minker"?"Minker API":r.storage.garySettings.imageSource==="goober"?"Goober API":"Gary API";return n.React.createElement(S,{style:{flex:1},contentContainerStyle:{padding:10}},n.React.createElement(jt,null),n.React.createElement(R,{spacing:12},n.React.createElement(h,{title:"Command Categories"},n.React.createElement(p,{label:"Facts Commands",subLabel:"Cat facts, dog facts, and useless facts",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Facts Commands",render:Ht})}}),n.React.createElement(p,{label:"List Commands",subLabel:"Plugin lists and theme lists",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"List Commands",render:zt})}}),n.React.createElement(p,{label:"Image Commands",subLabel:"PetPet, KonoChan, and image utilities",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Image Commands",render:Kt})}}),n.React.createElement(p,{label:"Gary Commands",subLabel:`Gary images - Current: ${t}`,trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Gary Commands",render:qt})}}),n.React.createElement(p,{label:"Spotify Commands",subLabel:"Share your Spotify activity",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Spotify Commands",render:Xt})}}),n.React.createElement(p,{label:"Aliucord Commands",subLabel:"Commands from Aliucord",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Aliucord",render:Jt})}}),n.React.createElement(p,{label:"Other Commands",subLabel:"Utility and system commands",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Other Commands",render:Qt})}})),r.storage.hiddenSettings?.visible&&n.React.createElement(h,{title:"Hidden Settings"},n.React.createElement(p,{label:"Hidden Commands",subLabel:"Access to experimental and NSFW commands",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Hidden Settings",render:Zt})}})),n.React.createElement(h,{title:"Other"},n.React.createElement(p,{label:"Credits",subLabel:"View original authors of the plugins",trailing:n.React.createElement(p.Arrow,null),onPress:function(){return e.push("VendettaCustomPage",{title:"Credits",render:tn})}}))))}const{FormSection:nn,FormRow:Z}=Le.Forms,{TableRowIcon:an}=g.findByProps("TableRowIcon"),B=window.bunny,Re=B?.metro?.findByPropsLazy("getRootNavigationRef"),ee=B?.metro?.findByPropsLazy("SETTING_RENDERER_CONFIG"),Ee=B?.metro?.findByPropsLazy("createList"),Ne=B?.metro?.findByNameLazy("SettingsOverviewScreen",!1);function rn({tabs:e}){const t=n.NavigationNative.useNavigation();return n.React.createElement(Z,{label:e.title(),leading:n.React.createElement(Z.Icon,{source:e.icon}),trailing:n.React.createElement(n.React.Fragment,{},[e.trailing?e.trailing():null,n.React.createElement(Z.Arrow,{key:"arrow"})]),onPress:function(){const a=e.page;t.navigate("VendettaCustomPage",{title:e.title(),render:function(){return n.React.createElement(a)}})}})}function sn(e,t){try{t.push(_.after("default",B?.metro?.findByPropsLazy(["renderTitle","sections"],!1),function(a,s){const i=X.findInReactTree(s.props.children,function(o){return o.type?.name==="UserSettingsOverview"});i&&t.push(_.after("render",i.type.prototype,function(o,c){const l=X.findInReactTree(c.props.children,function(d){return d?.children?.[1]?.type===nn})?.children;if(l){const d=l.findIndex(function(u){return["BILLING_SETTINGS","PREMIUM_SETTINGS"].includes(u?.props?.label)});l.splice(-~d||4,0,n.React.createElement(rn,{key:e.key,tabs:e}))}}))},!0))}catch{}}function on(e,t){if(!ee||!Re){console.warn("[Commands Plugin] Missing required constants for tabs UI patch");return}const a={[e.key]:{type:"pressable",useTitle:e.title,title:e.title,icon:e.icon,IconComponent:e.icon&&function(){return n.React.createElement(an,{source:e.icon})},usePredicate:e.predicate,useTrailing:e.trailing,onPress:function(){const o=Re.getRootNavigationRef(),c=e.page;o.navigate("VendettaCustomPage",{title:e.title(),render:function(){return n.React.createElement(c)}})},withArrow:!0}};let s=ee.SETTING_RENDERER_CONFIG;Object.defineProperty(ee,"SETTING_RENDERER_CONFIG",{enumerable:!0,configurable:!0,get:function(){return{...s,...a}},set:function(o){return s=o}});const i=Symbol("pinToSettings meow meow");try{if(!Ee)return;t.push(_.after("createList",Ee,function(o,c){if(!o[0][i]){o[0][i]=!0;const[l]=o,d=l.sections?.find(function(u){return["Bunny","Revenge","Kettu","Vencore","ShiggyCord"].some(function(f){return u.label===f&&u.title===f})});d?.settings&&(d.settings=[...d.settings,e.key])}}))}catch{if(!Ne)return;t.push(_.after("default",Ne,function(o,c){if(!o[0][i]){o[0][i]=!0;const{sections:l}=X.findInReactTree(c,function(u){return u.props?.sections}).props,d=l?.find(function(u){return["Bunny","Revenge","Kettu","Vencore","ShiggyCord"].some(function(f){return u.label===f&&u.title===f})});d?.settings&&(d.settings=[...d.settings,e.key])}}))}}function cn(e){const t=[];let a=!1;const s=e.predicate||function(){return!0};return e.predicate=function(){return a?!1:s()},sn(e,t),on(e,t),t.push(function(){return a=!0}),function(){for(const i of t)i()}}function ln(){if(r.storage.sidebarEnabled===!1)return console.log("[Commands Plugin] Sidebar disabled in settings"),function(){};console.log("[Commands Plugin] Patching sidebar...");try{const e=cn({key:"CommandsPlugin",icon:b.getAssetIDByName("SettingsIcon"),title:function(){return"Commands"},predicate:function(){return r.storage.sidebarEnabled!==!1},page:Se});return console.log("[Commands Plugin] Successfully patched sidebar"),e}catch(e){return console.error("[Commands Plugin] Failed to patch sidebar:",e),function(){}}}r.storage.factSettings||(r.storage.factSettings={sendAsReply:!0,includeCitation:!1}),r.storage.listSettings||(r.storage.listSettings={pluginListAlwaysDetailed:!1,themeListAlwaysDetailed:!1}),r.storage.garySettings||(r.storage.garySettings={imageSource:"gary"}),r.storage.enabledCommands||(r.storage.enabledCommands={catfact:!0,dogfact:!0,useless:!0,petpet:!0,pluginList:!0,themeList:!0,konoself:!0,konosend:!0,firstmessage:!0,sysinfo:!0,spotifyTrack:!0,spotifyAlbum:!0,spotifyArtists:!0,spotifyCover:!0,gary:!0,ip:!0,lovefemboys:!1,nekoslife:!1,friendInviteCreate:!0,friendInviteView:!0,friendInviteRevoke:!0}),r.storage.hiddenSettings||(r.storage.hiddenSettings={enabled:!1,visible:!1,konochanBypassNsfw:!1}),r.storage.sidebarEnabled===void 0&&(r.storage.sidebarEnabled=!0);const dn={catfact:Fe,dogfact:Me,useless:_e,petpet:qe,pluginList:je,themeList:He,konoself:Je,konosend:Qe,firstmessage:nt,sysinfo:ut,spotifyTrack:ht,spotifyAlbum:bt,spotifyArtists:vt,spotifyCover:Ct,gary:St,ip:At,lovefemboys:It,nekoslife:Bt,friendInviteCreate:_t,friendInviteView:Vt,friendInviteRevoke:Ut};let te=[],z;var un={onLoad:function(){if(console.log("[Commands Plugin] Loading..."),r.storage.sidebarEnabled!==!1)try{z=ln(),console.log("[Commands Plugin] Sidebar patched successfully")}catch(e){console.error("[Commands Plugin] Failed to patch sidebar:",e)}for(const[e,t]of Object.entries(dn))if(r.storage.enabledCommands[e])try{te.push(Ae.registerCommand(t)),console.log(`[Commands Plugin] Registered command: ${e}`)}catch(a){console.error(`[Commands Plugin] Failed to register command ${e}:`,a)}},onUnload:function(){if(console.log("[Commands Plugin] Unloading..."),te.forEach(function(e){try{e()}catch{}}),te=[],z)try{z(),z=void 0,console.log("[Commands Plugin] Sidebar unpatched")}catch(e){console.error("[Commands Plugin] Failed to unpatch sidebar:",e)}},settings:Se};return q.default=un,Object.defineProperty(q,"__esModule",{value:!0}),q})({},vendetta.commands,vendetta.plugin,vendetta.metro,vendetta.ui.toasts,vendetta.themes,vendetta.plugins,vendetta.ui,vendetta.metro.common,vendetta.debug,vendetta.ui.assets,vendetta.storage,vendetta.patcher,vendetta.ui.components,vendetta.utils);