`;return(0,eval)(o)}var yi,Ja,ku,io,ln,Ce,u1,Nu,$o,Dr,Va,BP,H=g(()=>{"use strict";a();Uo();Cu();Ke();hi();Xa();yi=new oe("Webpack"),ku=new Promise(e=>Ja=e),Ce={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(o=>t[o]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let o=Function.prototype.toString.call(t);for(let r of e)if(!o.includes(r))return!1;return!0},byStoreName:e=>t=>t.constructor?.displayName===e,componentByCode:(...e)=>{let t=Ce.byCode(...e);return o=>t(o)?!0:o.$$typeof?o.type&&o.type.render?t(o.type.render):o.type?t(o.type):o.render?t(o.render):!1:!1}},u1=new Map,Nu=new Set;$o=an("find",function(t,{isIndirect:o=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in ln){let s=ln[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,i]:s.exports;if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,i]:l}}}return o||Qn("find",t),r?[null,null]:null});Dr=an("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:o}=t;if(o===0)throw new Error("Expected at least two filters.");if(o===1)return $o(t[0]);let r=t,i=0,s=Array(o);e:for(let l in ln){let c=ln[l];if(!!c?.exports)for(let u=0;u<o;u++){let p=r[u];if(p!==void 0){if(p(c.exports)){if(s[u]=c.exports,r[u]=void 0,++i===o)break e;break}if(c.exports.default&&p(c.exports.default)){if(s[u]=c.exports.default,r[u]=void 0,++i===o)break e;break}}}}if(i!==o){let l=new Error(`Got${o}filters,butonlyfound${i}modules!`);yi.warn(l)}return s}),Va=an("findModuleId",function(...t){e:for(let r in io.m){let i=io.m[r].toString();for(let s of t)if(!i.includes(s))continue e;return r}let o=new Error(`Didn'tfindmodulewithcode(s):
`,l),!1}}if(r?.length){po.info("Registering commands of plugin",o);for(let l of r)try{_i(l,o)}catch(c){return po.error(`Failedtoregistercommand${l.name}
`,c),!1}}if(i)for(let l in i)B.subscribe(l,i[l]);if(s)for(let l in s)ad(l,s[l]);return!0},e=>`startPlugin${e.name}`),dd=an("stopPlugin",function(t){let{name:o,commands:r,flux:i,contextMenus:s}=t;if(t.stop){if(po.info("Stopping plugin",o),!t.started)return po.warn(`${o}alreadystopped`),!1;try{t.stop(),t.started=!1}catch(l){return po.error(`Failedtostop${o}
`,l),!1}}if(r?.length){po.info("Unregistering commands of plugin",o);for(let l of r)try{Zs(l.name)}catch(c){return po.error(`Failedtounregistercommand${l.name}
`,c),!1}}if(i)for(let l in i)B.unsubscribe(l,i[l]);if(s)for(let l in s)ld(l,s[l]);return!0},e=>`stopPlugin${e.name}`)});function vC(e){X.show({message:e,type:X.Type.FAILURE,id:X.genId(),options:{position:X.Position.BOTTOM}})}function SC({required:e}){return n(Tt,{className:Vr("info-card",{"restart-card":e})},e?n(f,null,n(S.FormTitle,{tag:"h5"},"Restart required!"),n(S.FormText,{className:Vr("dep-text")},"Restart now to apply new plugins and their settings"),n(k,{color:k.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):n(f,null,n(S.FormTitle,{tag:"h5"},"Plugin Management"),n(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),n(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Fl({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=G.plugins[e.name],c=()=>l.enabled??!1;function u(){Hr(async()=>d=>n(Qs,{...d,plugin:e,onRestartNeeded:()=>o(e.name)}))}function p(){let d=c();if(!d){let{restartNeeded:v,failures:b}=zl(e);if(b.length){p0.error(`Failedtostartdependenciesfor${e.name}:${b.join(", ")}`),js("Failed to start dependencies: "+b.join(", "),"Close",()=>null);return}else if(v){l.enabled=!0,o(e.name);return}}if(e.patches?.length){l.enabled=!d,o(e.name);return}if(d&&!e.started){l.enabled=!d;return}if(!(d?dd(e):oa(e))){l.enabled=!1;let v=`Errorwhile${d?"stopping":"starting"}plugin${e.name}`;p0.error(v),vC(v);return}l.enabled=!d}return n($l,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:p,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:n("button",{role:"switch",onClick:()=>u(),className:Q(yC.button,Vr("info-button"))},e.options&&!Cs(e.options)?n(Bv,null):n(Ll,null))})}function fd(){let e=St(),t=U.useMemo(()=>new Vs,[]);U.useEffect(()=>()=>void(t.hasChanges&&et.show({title:"Restart required",body:n(f,null,n("p",null,"The following plugins require a restart:"),n("div",null,t.map((v,b)=>n(f,null,b>0&&", ",Pe.parse("`"+v+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let o=U.useMemo(()=>{let v={};for(let b in ze){let M=ze[b].dependencies;if(M)for(let w of M)v[w]??=[],v[w].push(b)}return v},[]),r=U.useMemo(()=>Object.values(ze).sort((v,b)=>v.name.localeCompare(b.name)),[]),[i,s]=U.useState({value:"",status:0}),l=v=>s(b=>({...b,value:v})),c=v=>s(b=>({...b,status:v})),u=v=>{let b=e.plugins[v.name]?.enabled;if(b&&i.status===2||!b&&i.status===1||i.status===3&&!p?.includes(v.name))return!1;if(!i.value.length)return!0;let M=i.value.toLowerCase();return v.name.toLowerCase().includes(M)||v.description.toLowerCase().includes(M)||v.tags?.some(w=>w.toLowerCase().includes(M))},[p]=st(()=>dt("Vencord_existingPlugins").then(v=>{let b=Date.now()/1e3,M={},w=Object.values(r).map(R=>R.name),C=[];for(let{name:R}of r)(M[R]=v?.[R]??b)+60*60*24*2>b&&C.push(R);return kt("Vencord_existingPlugins",M),Fr.isEqual(C,w)?[]:C})),d,h;if(r?.length){d=[],h=[];for(let v of r){if(!v.options&&v.name.endsWith("API")&&i.value!=="API"||!u(v))continue;if(v.required||o[v.name]?.some(M=>e.plugins[M].enabled)){let M=v.required?"This plugin is required for Vencord to function.":bC(o[v.name]?.filter(w=>e.plugins[w].enabled));h.push(n(ne,{text:M,key:v.name},({onMouseLeave:w,onMouseEnter:C})=>n(Fl,{onMouseLeave:w,onMouseEnter:C,onRestartNeeded:R=>t.handleChange(R),disabled:!0,plugin:v})))}else d.push(n(Fl,{onRestartNeeded:M=>t.handleChange(M),disabled:!1,plugin:v,isNew:p?.includes(v.name),key:v.name}))}}else d=h=n(V,{variant:"text-md/normal"},"No plugins meet search criteria.");return n(Do,{title:"Plugins"},n(SC,{required:t.hasChanges}),n(S.FormTitle,{tag:"h5",className:Q(j.top20,j.bottom8)},"Filters"),n("div",{className:Vr("filter-controls")},n(Je,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:j.bottom20}),n("div",{className:d0.inputWrapper},n(Io,{className:d0.inputDefault,options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2},{label:"Show New",value:3}],serialize:String,select:c,isSelected:v=>v===
`)),[l,c]=W(null),[u,,p]=st(VencordNative.themes.getThemesDir);se(()=>{d()},[]);async function d(){let C=await VencordNative.themes.getThemesList();c(C)}function h(C,R){if(R){if(e.enabledThemes.includes(C))return;e.enabledThemes=[...e.enabledThemes,C]}else e.enabledThemes=e.enabledThemes.filter(A=>A!==C)}async function v(C){if(C.stopPropagation(),C.preventDefault(),!C.currentTarget?.files?.length)return;let{files:R}=C.currentTarget,A=Array.from(R,F=>{let{name:z}=F;if(!!z.endsWith(".css"))return new Promise((Y,J)=>{let Z=new FileReader;Z.onload=()=>{VencordNative.themes.uploadTheme(z,Z.result).then(Y).catch(J)},Z.readAsText(F)})});await Promise.all(A),d()}function b(){return n(f,null,n(Tt,{className:"vc-settings-card"},n(S.FormTitle,{tag:"h5"},"Find Themes:"),n("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},n(je,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),n(je,{href:"https://github.com/search?q=discord+theme"},"GitHub")),n(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),n(S.FormSection,{title:"Local Themes"},n(Tt,{className:"vc-settings-quick-actions-card"},n(f,null,n(k,{onClick:()=>Il(u),size:k.Sizes.SMALL,disabled:p},"Open Themes Folder"),n(k,{onClick:d,size:k.Sizes.SMALL},"Load missing Themes"),n(k,{onClick:()=>VencordNative.quickCss.openEditor(),size:k.Sizes.SMALL},"Edit QuickCSS"),Vencord.Settings.plugins.ClientTheme.enabled&&n(k,{onClick:()=>de(C=>n(Qs,{...C,plugin:Vencord.Plugins.plugins.ClientTheme,onRestartNeeded:()=>{}})),size:k.Sizes.SMALL},"Edit ClientTheme"))),n("div",{className:xC("grid")},l?.map(C=>n(PC,{key:C.fileName,enabled:e.enabledThemes.includes(C.fileName),onChange:R=>h(C.fileName,R),onDelete:async()=>{h(C.fileName,!1),await VencordNative.themes.deleteTheme(C.fileName),d()},theme:C})))))}function M(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(C=>C.trim()).filter(Boolean))]}function w(){return n(f,null,n(Tt,{className:"vc-settings-card vc-text-selectable"},n(S.FormTitle,{tag:"h5"},"Paste links to css files here"),n(S.FormText,null,"One link per line"),n(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),n(S.FormSection,{title:"Online Themes",tag:"h5"},n(rl,{value:i,onChange:s,className:Q(wC.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:M,rows:10}),n(IC,{themeLinks:e.themeLinks})))}return n(Do,{title:"Themes"},n(Ho,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:o,onItemSelect:r},n(Ho.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),n(Ho.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),o===0&&b(),o===1&&w())}var xU,MU,wC,xC,CC,h0=g(()=>{"use strict";a();$();Qe();Ut();It();To();td();mt();ot();we();Ze();rr();lt();H();T();rd();ar();xU=x("resolveInvite"),MU=so(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),wC=so(e=>typeof e.textarea=="string"),xC=ve("vc-settings-theme-");CC=Lo(AC,"Themes")});var b0={};qe(b0,{default:()=>DC});function y0(e,t){return async()=>{e(!0);try{await t()}catch(r){if(Yr.error("Failed to update",r),r)if(r.code&&r.cmd){let{code:i,path:s,cmd:l,stderr:c}=r;if(i==="ENOENT")var o=`Command\`${s}\` not found.
`;o+=c||`Code\`${i}\`. See the console for more info`}}elsevaro="An unknown error occurred. See the console for more info.";elsevaro=`An unknown error occurred (error is undefined).
`).map(i=>n("div",null,Pe.parse(i))))})}finally{e(!1)}}}function v0({repo:e,hash:t,disabled:o=!1}){return n(je,{href:`${e}/commit/${t}`,disabled:o},t)}function S0({updates:e,repo:t,repoPending:o}){return n(Tt,{style:{padding:"0 0.5em"}},e.map(({hash:r,author:i,message:s})=>n("div",{style:{marginTop:"0.5em",marginBottom:"0.5em"}},n("code",null,n(v0,{repo:t,hash:r,disabled:o})),n("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function RC(e){let[t,o]=U.useState(ir),[r,i]=U.useState(!1),[s,l]=U.useState(!1),c=(t?.length??0)>0;return n(f,null,!t&&Ni?n(f,null,n(S.FormText,null,"Failed to check updates. Check the console for more info"),n(Ro,{style:{padding:"1em"}},n("p",null,Ni.stderr||Ni.stdout||"An unknown error occurred"))):n(S.FormText,{className:j.bottom8},c?t.length===1?"There is 1 Update":`Thereare${t.length}Updates`:"Up to Date!"),c&&n(S0,{updates:t,...e}),n(fe,{className:Q(j.bottom8,j.top8)},c&&n(k,{size:k.Sizes.SMALL,disabled:s||r,onClick:y0(l,async()=>{await Li()&&(o([]),await new Promise(u=>{et.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){So(),u()},onCancel:u})}))})},"Update Now"),n(k,{size:k.Sizes.SMALL,disabled:s||r,onClick:y0(i,async()=>{await Di()?o(ir):(o([]),X.show({message:"No updates found!",id:X.genId(),type:X.Type.MESSAGE,options:{position:X.Position.BOTTOM}}))})},"Check for Updates")))}function kC(e){return n(f,null,n(S.FormText,{className:j.bottom8},"Your local copy has more recent commits. Please stash or reset them."),n(S0,{...e,updates:ir}))}function NC(){let e=St(["notifyAboutUpdates","autoUpdate","autoUpdateNotification"]),[t,o,r]=st(Lp,{fallbackValue:"Loading..."});U.useEffect(()=>{o&&Yr.error("Failed to retrieve repo",o)},[o]);let i={repo:t,repoPending:r};return n(Do,{title:"Vencord Updater"},n(S.FormTitle,{tag:"h5"},"Updater Settings"),n(wt,{value:e.notifyAboutUpdates,onChange:s=>e.notifyAboutUpdates=s,note:"Shows a notification on startup",disabled:e.autoUpdate},"Get notified about new updates"),n(wt,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),n(wt,{value:e.autoUpdateNotification,onChange:s=>e.autoUpdateNotification=s,note:"Shows a notification when Vencord automatically updates",disabled:!e.autoUpdate},"Get notified when an automatic update completes"),n(S.FormTitle,{tag:"h5"},"Repo"),n(S.FormText,{className:"vc-text-selectable"},r?t:o?"Failed to retrieve - check console":n(je,{href:t},t.split("/").slice(-2).join("/"))," ","(",n(v0,{hash:No,repo:t,disabled:r}),")"),n(S.FormDivider,{className:j.top8+" "+j.bottom8}),n(S.FormTitle,{tag:"h5"},"Updates"),Gs?n(kC,{...i}):n(RC,{...i}))}var DC,T0=g(()=>{"use strict";a();$();Pi();Ut();To();ot();we();rr();lt();Zr();T();ki();ar();DC=Lo(NC,"Updater")});function Wl({value:e,onChange:t,validate:o}){let[r,i]=U.useState(e),[s,l]=U.useState();function c(u){i(u);let p=o(u);p===!0?(l(void 0),t(u)):l(p)}return n(f,null,n(Je,{type:"text",value:r,onChange:c,error:s}))}var gd=g(()=>{"use strict";a();T()});var w0={};qe(w0,{default:()=>BC});function LC(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function EC(){let e=await fetch(new URL("/v1/",nr()),{method:"DELETE",headers:{Authorization:await Ci()}});if(!e.ok){Ml.error(`Failedtoerasedata,APIreturned${e.status}`),Fe({title:"Cloud Integrations",body:`Couldnoterasealldata(APIreturned${e.status}),pleasecontactsupport.`,color:"var(--red-360)"});return}G.cloud.authenticated=!1,await Rp(),Fe({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function OC(){let{cloud:e}=St(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return n(S.FormSection,{title:"Settings Sync",className:j.top16},n(S.FormText,{variant:"text-md/normal",className:j.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),n(wt,{key:"cloud-sync",disabled:!e.
`}var ra,_d,oS=g(()=>{"use strict";a();$();P();I();_d=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[m.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.embedWrapper(?=.+?channel_id:(\i)\.id)/g,replace:"$&+($1.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:tS}},start(){ra=document.createElement("style"),ra.id="VcBlurNsfw",document.head.appendChild(ra),tS()},stop(){ra?.remove()}})});function rR(e){let t=G.plugins.CallTimer.format==="human",o=d=>t?d:d.toString().padStart(2,"0"),r=d=>t?d:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),c=Math.floor(e%864e5%36e5/6e4),u=Math.floor(e%864e5%36e5%6e4/1e3),p="";return s&&(p+=`${s}d`),(l||p)&&(p+=`${o(l)}${r("h")}${i}`),(c||p||!t)&&(p+=`${o(c)}${r("m")}${i}`),p+=`${o(u)}${r("s")}`,p}var Bd,nS=g(()=>{"use strict";a();$();le();P();lt();I();Bd=y({name:"CallTimer",description:"Adds a timer to vcs",authors:[m.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:"renderConnectionStatus(){",replacement:{match:/(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return n(_,{noop:!0},n(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=Ns({deps:[e]});return n("p",{style:{margin:0}},"Connected for ",n("span",{style:{fontFamily:"var(--font-code)"}},rR(t)))}})});var jd={};qe(jd,{_handleClick:()=>aR,_handlePreEdit:()=>sR,_handlePreSend:()=>iR,addClickListener:()=>Hd,addPreEditListener:()=>ti,addPreSendListener:()=>Vt,removeClickListener:()=>zd,removePreEditListener:()=>oi,removePreSendListener:()=>eo});async function iR(e,t,o,r){o.replyOptions=r;for(let i of Ud)try{if((await i(e,t,o))?.cancel)return!0}catch(s){Fd.error(`MessageSendHandler:Listenerencounteredanunknownerror
`,s)}return!1}async function sR(e,t,o){for(let r of $d)try{if((await r(e,t,o))?.cancel)return!0}catch(i){Fd.error(`MessageEditHandler:Listenerencounteredanunknownerror
`,i)}return!1}function Vt(e){return Ud.add(e),e}function ti(e){return $d.add(e),e}function eo(e){return Ud.delete(e)}function oi(e){return $d.delete(e)}function aR(e,t,o){e=zo.getMessage(t.id,e.id)??e;for(let r of Gd)try{r(e,t,o)}catch(i){Fd.error(`MessageClickHandler:Listenerencounteredanunknownerror
`),document.body.appendChild(o),o}async function yR(){let e="",t=document.querySelectorAll('link[rel="stylesheet"]');for(let o of t){let r=o.getAttribute("href");if(!r)continue;let i=await fetch(r);e+=await i.text()}return e}function vR(e){let t=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,o,r),s=Math.min(t,o,r),l=i-s,c,u,p;return p=(i+s)/2,l===0?(c=0,u=0):(u=l/(1-Math.abs(2*p-1)),i===t?c=(o-r)/l%6:i===o?c=(r-t)/l+2:c=(t-o)/l+4,c*=60,c<0&&(c+=360)),u*=100,p*=100,{hue:c,saturation:u,lightness:p}}function SR(e){let t=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4,o=t(parseInt(e.substring(0,2),16)/255),r=t(parseInt(e.substring(2,4),16)/255),i=t(parseInt(e.substring(4,6),16)/255);return o*.2126+r*.7152+i*.0722}var cR,uR,pR,uS,pS,ia,qd,dS,mR,fR,hS=g(()=>{"use strict";a();lS();$();P();ot();we();I();H();T();cR=Ne(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR",".BACKGROUND_PRIMARY)"),uR=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938","#b6908f","#bfa088","#d3c77d","#86ac86","#88aab3","#8693b5","#8a89ba","#ad94bb"];({saveClientTheme:pR}=x("saveClientTheme"));uS=Re("ThemeStore"),pS=Re("ClientThemesBackgroundStore");ia=N({color:{description:"Color your Discord client theme will be based around. Light mode isn't supported",type:6,default:"313338",component:()=>n(dR,null)},resetColor:{description:"Reset Theme Color",type:6,default:"313338",component:()=>n(k,{onClick:()=>fS(3224376)},"Reset Theme Color")}}),qd=y({name:"ClientTheme",authors:[m.F53,m.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:ia,startAt:"DOMContentLoaded",async start(){gS(ia.store.color);let e=await yR();gR(e),hR(e)},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove()}}),dS=/(--primary-\d{3}-hsl):.*?(\S*)%;/g,mR=/^--primary-[1-5]\d{2}-hsl/g,fR=/^--primary-[5-9]\d{2}-hsl/g});var Yd,yS=g(()=>{"use strict";a();P();I();Yd=y({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[m.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(?<=fromIsMobile:\i=!0,.+?)status:(\i)/,replace:'status_$:$1="online"'}}]})});var Zd,vS=g(()=>{"use strict";a();P();rr();hi();I();H();H();T();Zd=y({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[m.Ven],getShortcuts(){function e(i){let s=new Map;return function(...l){let c=String(l);if(s.has(c))return s.get(c);let u=Nr(i(...l)),p=(()=>{switch(u.length){case 0:return null;case 1:return u[0];default:let d=[...new Set(u)];return d.length>1&&console.warn(`Warning:Thisfiltermatches${u.length}modules.Makeitmorespecific!
`,d),u[0]}})();return p&&c&&s.set(c,p),p}}let t,o=e(i=>i),r=e(Ce.byProps);return{...Vencord.Webpack.Common,wp:Vencord.Webpack,wpc:io.c,wreq:io,wpsearch:Ou,wpex:el,wpexs:i=>el(Va(i)),find:o,findAll:Nr,findByProps:r,findAllByProps:(...i)=>Nr(Ce.byProps(...i)),findByCode:e(Ce.byCode),findAllByCode:i=>Nr(Ce.byCode(i)),findComponentByCode:e(Ce.componentByCode),findAllComponentsByCode:(...i)=>Nr(Ce.componentByCode(...i)),findExportedComponent:(...i)=>r(...i)[i[0]],findStore:e(Ce.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:So,canonicalizeMatch:bn,canonicalizeReplace:Za,canonicalizeReplacement:ys,fakeRender:(i,s)=>{let l=t?.deref(),c=l?.closed===!1?l:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(c),c.focus();let u=c.document;u.body.style.margin="1em",c.prepared||(c.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(p=>{let d=p.cloneNode(!0);p.parentElement?.tagName==="HEAD"?u.head.append(d):d.id?.startsWith("vencord-")||d.id?.startsWith("vcd-")?u.documentElement.append(d):u.body.append(d)})),Or.render(U.createElement(i,s),u.body.appendChild(document.createElement("div")))}}},start(){let e=this.getShortcuts();window.shortcutList=e;for(let[t,o]of Object.entries(e))window[t]=o},stop(){delete window.shortcutList;for(let e in this.getShortcuts())delete window[e]}})});var bR,Xd,SS=g(()=>{"use strict";a();It();P();I();T();bR=(e,{user:t})=>{!t||e.push(n(L.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>Ft.copy(`<https://discord.com/users/${t.id}>`),icon:Ei}))},Xd=y({name:"CopyUserURLs",authors:[m.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",contextMenus:{"user-context":bR}})});var hn,TR,bS,TS,wR,Jd,wS,Qd,Vd,em,xS=g(()=>{"use strict";a();er();$();P();Ke();Ze();I();Zr();H();T();hn=new oe("CrashHandler"),{ModalStack:TR,DraftManager:bS,DraftType:TS,closeExpressionPicker:wR}=go(()=>{let e=Dr(Ce.byProps("pushLazy","popAll"),Ce.byProps("clearDraft","saveDraft"),Ce.byProps("DraftType"),Ce.byProps("closeExpressionPicker","openExpressionPicker"));return{ModalStack:e[0],DraftManager:e[1],DraftType:e[2]?.DraftType,closeExpressionPicker:e[3]?.closeExpressionPicker}}),Jd=N({attemptToPreventCrashes:{type:3,description:"Whether to attempt to prevent Discord crashes.",default:!0},attemptToNavigateToHome:{type:3,description:"Whether to attempt to navigate to the home when preventing Discord crashes.",default:!1}}),wS=!1,Qd=!1,Vd=!0,em=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from crashes without a restart",authors:[m.Nuckyz],enabledByDefault:!0,settings:Jd,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/this\.setState\((.+?)\)/,replace:"$self.handleCrash(this,$1);"}}],handleCrash(e,t){e.setState(t),!Qd&&(Qd=!0,setTimeout(()=>{try{if(!Vd){try{Fe({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed two times rapidly, not attempting to recover.",noPersist:!0})}catch{}return}Vd=!1,setTimeout(()=>Vd=!0,500)}catch{}try{wS||(wS=!0,Hs("Uh oh, Discord has just crashed... but good news, there is a Vencord update available that might fix this issue! Would you like to update now?",!0))}catch{}try{Jd.store.attemptToPreventCrashes&&this.handlePreventCrash(e)}catch(o){hn.error("Failed to handle crash",o)}},1))},handlePreventCrash(e){try{Fe({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{let t=Ie.getChannelId();bS.clearDraft(t,TS.ChannelMessage),bS.clearDraft(t,TS.FirstThreadMessage)}catch(t){hn.debug("Failed to clear drafts.",t)}try{wR()}catch(t){hn.debug("Failed to close expression picker.",t)}try{B.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){hn.debug("Failed to close open context menu.",t)}try{TR.popAll()}catch(t){hn.debug("Failed to close old modals.",t)}try{dn()}catch(t){hn.debug("Failed to close all open modals.",t)}try{B.dispatch({type:"USER_PROFILE_MODAL
`.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let r=(await mc.getAllFriendInvites()).map(i=>`
`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:3,execute:async(e,t)=>{await mc.revokeFriendInvites(),ge(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var Ek,Ok,_k,Bk,Yb,Fk,Uk,Gm,Zb=g(()=>{"use strict";a();le();P();I();H();T();({Heading:Ek,Text:Ok}=x("Heading","Text")),_k=x("memberSinceContainer"),{getCreatedAtDate:Bk}=x("getCreatedAtDate"),Yb=x("clydeMoreInfo"),Fk=x("getLocale"),Uk=x("lastSection"),Gm=y({name:"FriendsSince",description:"Shows when you became friends with someone in the user popout",authors:[m.Elvyra],patches:[{find:".AnalyticsSections.USER_PROFILE}",replacement:{match:/\i.default,\{userId:(\i.id).{0,30}}\)/,replace:"$&,$self.friendsSince({ userId: $1 })"}},{find:".UserPopoutUpsellSource.PROFILE_PANEL,",replacement:{match:/\i.default,\{userId:(\i)}\)/,replace:"$&,$self.friendsSince({ userId: $1 })"}}],friendsSince:_.wrap(({userId:e})=>{let t=it.getSince(e);return t?n("div",{className:Uk.section},n(Ek,{variant:"eyebrow",className:Yb.title},"Friends Since"),n("div",{className:_k.memberSinceContainer},n(Ok,{variant:"text-sm/normal",className:Yb.body},Bk(t,Fk.getLocale())))):null},{noop:!0})})});var Hm,Xb=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"]{
`,classNames:{},dom:null});tf="src/plugins/imageZoom/styles.css"});var nt,tN,of,ef=g(()=>{"use strict";a();$();Qe();Xs();zr();P();I();T();mT();Jm();fT();nt=N({saveZoomValues:{type:3,description:"Whether to save zoom and lens size values",default:!0},invertScroll:{type:3,description:"Invert scroll",default:!0},nearestNeighbour:{type:3,description:"Use Nearest Neighbour Interpolation when scaling images",default:!1},square:{type:3,description:"Make the lens square",default:!1},zoom:{description:"Zoom of the lens",type:5,markers:en(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:en(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:en(.1,5,.2),default:.5,stickToMarkers:!1}}),tN=e=>{let{square:t,nearestNeighbour:o}=nt.use(["square","nearestNeighbour"]);e.push(n(L.MenuGroup,{id:"image-zoom"},n(L.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:t,action:()=>{nt.store.square=!t}}),n(L.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:o,action:()=>{nt.store.nearestNeighbour=!o}}),n(L.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(r,i)=>n(L.MenuSliderControl,{ref:i,...r,minValue:1,maxValue:50,value:nt.store.zoom,onChange:lo(s=>nt.store.zoom=s,100)})}),n(L.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(r,i)=>n(L.MenuSliderControl,{ref:i,...r,minValue:50,maxValue:1e3,value:nt.store.size,onChange:lo(s=>nt.store.size=s,100)})}),n(L.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(r,i)=>n(L.MenuSliderControl,{ref:i,...r,minValue:.1,maxValue:5,value:nt.store.zoomSpeed,onChange:lo(s=>nt.store.zoomSpeed=s,100),renderValue:s=>`${s.toFixed(3)}x`})})))},of=y({name:"ImageZoom",description:"Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",authors:[m.Aria],tags:["ImageUtilities"],patches:[{find:"Messages.OPEN_IN_BROWSER",replacement:{match:/return.{1,200}\.wrapper.{1,200}src:\i,/g,replace:`$&id:'${ga}',`}},{find:"handleImageLoad=",replacement:[{match:/placeholderVersion:\i,/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal",replacement:{match:/(?<=\.carouselModal.{0,100}onClick:)\i,/,replace:"()=>{},"}}],settings:nt,contextMenus:{"image-context":tN},currentMagnifierElement:null,element:null,Magnifier:Vm,root:null,makeProps(e){return{onMouseOver:()=>this.onMouseOver(e),onMouseOut:()=>this.onMouseOut(e),onMouseDown:t=>this.onMouseDown(t,e),onMouseUp:()=>this.onMouseUp(e),id:e.props.id}},renderMagnifier(e){e.props.id===ga&&(this.currentMagnifierElement||(this.currentMagnifierElement=n(Vm,{size:nt.store.size,zoom:nt.store.zoom,instance:e}),this.root=Or.createRoot(this.element),this.root.render(this.currentMagnifierElement)))},unMountMagnifier(){this.root?.unmount(),this.currentMagnifierElement=null,this.root=null},onMouseOver(e){e.setState(t=>({...t,mouseOver:!0}))},onMouseOut(e){e.setState(t=>({...t,mouseOver:!1}))},onMouseDown(e,t){e.button===0&&t.setState(o=>({...o,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){Nt(tf),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){Xt(tf),this.root&&this.root.unmount(),this.element?.remove()}})});var gT=g(()=>{});var sf={};qe(sf,{ChatBarButton:()=>xo,_injectButtons:()=>nN,addChatBarButton:()=>wo,removeChatBarButton:()=>nn});function nN(e,t){if(!t.disabled)for(let[o,r]of rf)e.push(n(_,{noop:!0,key:o,onError:i=>oN.error(`Failedtorender${o}`,i.error)},n(r,{...t,isMainChat:t.type.analyticsName==="normal"})))}var nf,rf,oN,wo,nn,xo,En=g(()=>{"use strict";a();gT();le();Ke();H();T();gt(["buttonContainer","channelTextArea"],e=>nf=e);rf=new Map,oN=new oe("ChatButtons");wo=(e,t)=>rf.set(e,t),nn=e=>rf.delete(e),xo=_.wrap(e=>n(ne,{text:e.tooltip},({onMouseEnter:t,onMouseLeave:o})=>n("
`,classNames:{},dom:null});Rf="src/plugins/messageLogger/deleteStyleText.css"});function HT(){G.plugins.MessageLogger.deleteStyle==="text"?(Nt(Rf),Xt(Cf)):(Xt(Rf),Nt(Cf))}var RN,zT,jT,kN,kf,WT=g(()=>{"use strict";a();UT();$();Qe();le();P();Ke();I();H();T();$T();GT();RN=x("edited","communicationDisabled","isSystemMessage");zT="ml-remove-history",jT="ml-toggle-style",kN=(e,t)=>{let{message:o}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=o;if(!r&&!i?.length)return;e:{if(!r)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(n(L.MenuItem,{id:jT,key:jT,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(n(L.MenuItem,{id:zT,key:zT,label:"Remove Message History",color:"danger",action:()=>{r?B.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):o.editHistory=[]}}))},kf=y({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[m.rushii,m.Ven,m.AutumnVN],contextMenus:{message:kN},start(){HT()},renderEdit(e){return n(_,{noop:!0},n("div",{className:"messagelogger-edited"},Pe.parse(e.content),n(Po,{timestamp:e.timestamp,isEdited:!0,isInline:!1},n("span",{className:RN.edited}," ","(",Ye.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:new Date(e.edited_timestamp),content:t.content}},options:{deleteStyle:{type:4,description:"The style of deleted messages",default:"text",options:[{label:"Red text",value:"text",default:!0},{label:"Red overlay",value:"overlay"}],onChange:()=>HT()},logDeletes:{type:3,description:"Whether to log deleted messages",default:!0},logEdits:{type:3,description:"Whether to log edited messages",default:!0},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1},ignoreUsers:{type:0,description:"Comma-separated list of user IDs to ignore",default:""},ignoreChannels:{type:0,description:"Comma-separated list of channel IDs to ignore",default:""},ignoreGuilds:{type:0,description:"Comma-separated list of guild IDs to ignore",default:""}},handleDelete(e,t,o){try{if(e==null||!o&&!e.has(t.id))return e;let r=i=>{let s=e.get(i);if(!s)return;let l=64;t.mlDeleted||(s.flags&l)===l||this.shouldIgnore(s)?e=e.remove(i):e=e.update(i,u=>u.set("deleted",!0).set("attachments",u.attachments.map(p=>(p.deleted=!0,p))))};o?t.ids.forEach(r):r(t.id)}catch(r){new oe("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e,t=!1){let{ignoreBots:o,ignoreSelf:r,ignoreUsers:i,ignoreChannels:s,ignoreGuilds:l,logEdits:c,logDeletes:u}=G.plugins.MessageLogger,p=E.getCurrentUser().id;return o&&e.author?.bot||r&&e.author?.id===p||i.includes(e.author?.id)||s.includes(e.channel_id)||s.includes(ee.getChannel(e.channel_id)?.parent_id)||(t?!c:!u)||l.includes(ee.getChannel(e.channel_id)?.guild_id)},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message, true)) ? m : $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) : m).update($3"},{match:/(?<=getLastEditableMessage\(\i\)\{.{0,200}\.find\((\i)=>)/,replace:"!$1.deleted &&"}]},{find:"}addReaction(",replacement:[{match:/this\.customRenderedContent=(\i)\.customRenderedContent,/,replace:"this.customRenderedContent = $1.customRenderedContent,this.deleted = $1.deleted || false,this.editHistory = $1.editHisto
`)}):(ge(o.channel.id,{content:`${vr}Thetag**${e.name}**doesnotexistanymore!PleasereloadurDiscordtofix:)`}),{content:`/${e.name}`}),[NN]:!0},"CustomTags")}var vr,Ic,NN,Mc,xc,DN,LN,Nf,KT=g(()=>{"use strict";a();uo();Xo();$();P();I();vr="<:luna:1035316192220553236>",Ic="MessageTags_TAGS",NN=Symbol("MessageTags"),Mc=()=>dt(Ic).then(e=>e??[]),xc=e=>dt(Ic).then(t=>(t??[]).find(o=>o.name===e)??null),DN=async e=>{let t=await Mc();return t.push(e),kt(Ic,t),t},LN=async e=>{let t=await Mc();return t=await t.filter(o=>o.name!==e),kt(Ic,t),t};Nf=y({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[m.Luna],options:{clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0}},dependencies:["CommandsAPI"],async start(){for(let e of await Mc())qT(e)},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let o=ht(e[0].options,"tag-name",""),r=ht(e[0].options,"message","");if(await xc(o))return ge(t.channel.id,{content:`${vr}ATagwiththename**${o}**alreadyexists!`});let i={name:o,enabled:!0,message:r};qT(i),await DN(i),ge(t.channel.id,{content:`${vr}Successfullycreatedthetag**${o}**!`});break}case"delete":{let o=ht(e[0].options,"tag-name","");if(!await xc(o))return ge(t.channel.id,{content:`${vr}ATagwiththename**${o}**doesnotexist!`});Zs(o),await LN(o),ge(t.channel.id,{content:`${vr}Successfullydeletedthetag**${o}**!`});break}case"list":{ge(t.channel.id,{embeds:[{title:"All Tags:",description:(await Mc()).map(o=>`\`${o.name}\`: ${o.message.slice(0,72).replaceAll("\\n"," ")}${o.message.length>72?"...":""}`).join(`
`)||`${vr}Woops!Therearenotagsyet,use\`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{leto=ht(e[0].options,"tag-name",""),r=awaitxc(o);if(!r)returnge(t.channel.id,{content:`${vr} A Tag with the name **${o}** does not exist!`});ge(t.channel.id,{content:r.message.replaceAll("\\n",`
`)});break}default:{ge(t.channel.id,{content:"Invalid sub-command"});break}}}}]})});function EN(e){let t="";for(let o=0;o<e.length;o++)t+=o%2?e[o].toUpperCase():e[o].toLowerCase();return t}var Df,YT=g(()=>{"use strict";a();uo();P();I();Df=y({name:"MoreCommands",description:"echo, lenny, mock",authors:[m.Arjix,m.echo,m.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[cr],inputType:3,execute:(e,t)=>{let o=ht(e,"message","");ge(t.channel.id,{content:o})}},{name:"lenny",description:"Sends a lenny face",options:[cr],execute:e=>({content:ht(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[Ys],execute:e=>({content:EN(ht(e,"message",""))})}]})});var Lf,ZT=g(()=>{"use strict";a();uo();P();I();Lf=y({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[m.JacobTm],dependencies:["CommandsAPI"],commands:[{name:"dissatisfaction",description:"\uFF1E\uFE4F\uFF1C"},{name:"smug",description:"\u0CA0_\u0CA0"},{name:"happy",description:"\u30FD(\xB4\u25BD`)/"},{name:"crying",description:" \u0CA5_\u0CA5"},{name:"angry",description:" \u30FD(\uFF40\u0414\xB4)\uFF89"},{name:"anger",description:" \u30FD(\uFF4F`\u76BF\u2032\uFF4F)\uFF89"},{name:"joy",description:"<(\uFFE3\uFE36\uFFE3)>"},{name:"blush",description:"\u0AEE\u02F6\u1D54\u1D55\u1D54\u02F6\u10D0"},{name:"confused",description:"(\u2022\u0E34_\u2022\u0E34)?"},{name:"sleeping",description:"(\u1D17_\u1D17)"},{name:"laughing",description:"o(\u2267\u25BD\u2266)o"}].map(e=>({...e,options:[cr],execute:t=>({content:ht(t,"message","")+e.description})}))})});function _N(e){Sr.store.tagSettings??=Ef;let[t,o]=W(Sr.store.tagSettings),r=i=>{o(i),e.setValue(i)};return n(fe,{flexDirection:"column"},Qi.map(i=>n(Tt,{style:{padding:"1em1em0"}},n(S.FormTitle,{style:{width:"fit-content"}},n(ne,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>n("div",{onMouseEnter:s,onMouseLeave:l},i.displayName,"Tag",n(On,{type:On.Types[i.name]})))),n(Je,{type:"text",value:t[i.name]?.text??i.displayName,placeholder:`Text on tag (default: ${i.displayName})`,onChange:s=>{t[i.name].text=s,r(t)},className:j.bottom16}),n(wt,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Showinmessages"),n(wt,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Showinmemberlistandprofiles"))))}var ON,On,XT,Qi,Ef,Sr,Of,JT=g(()=>{"usestrict";a();$();Ut();P();ot();I();H();T();ON=x("computePermissions","canEveryoneRole"),On=so(e=>e.Types?.[0]==="BOT"),XT=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),Qi=[{name:"WEBHOOK",displayName:"Webhook",description:"Messagessentbywebhooks",condition:XT},{name:"OWNER",displayName:"Owner",description:"Ownstheserver",condition:(e,t,o)=>ae.getGuild(o?.guild_id)?.ownerId===t.id},{name:"ADMINISTRATOR",displayName:"Admin",description:"Hastheadministratorpermission",permissions:["ADMINISTRATOR"]},{name:"MODERATOR_STAFF",displayName:"Staff",description:"Canmanagetheserver,channelsorroles",permissions:["MANAGE_GUILD","MANAGE_CHANNELS","MANAGE_ROLES"]},{name:"MODERATOR",displayName:"Mod",description:"Canmanagemessagesorkick/banpeople",permissions:["MANAGE_MESSAGES","KICK_MEMBERS","BAN_MEMBERS"]},{name:"VOICE_MODERATOR",displayName:"VCMod",description:"Canmanagevoicechats",permissions:["MOVE_MEMBERS","MUTE_MEMBERS","DEAFEN_MEMBERS"]}],Ef=Object.fromEntries(Qi.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));Sr=N({dontShowForBots:{description:"Don'tshowextratagsforbots(excludingwebhooks)",type:3},dontShowBotTag:{description:"Onlyshowextratagsforbots/Hide[BOT]text",type:3},tagSettings:{type:6,component:_N,description:"fillme"}}),Of=y({name:"MoreUserTags",description:"Addstagsforwebhooksandmoderativeroles(owner,admin,etc.)",authors:[m.Cyn,m.TheSun,m.RyanCaoDev,m.LordElias,m.AutumnVN],settings:Sr,patches:[{find:"BotTagTypes:",replacement:{match:/\((\i)=\{\}\)\)\[(\i)\.BOT/,replace:"($1=
`,classNames:{},dom:null});jf="src/plugins/noMosaic/styles.css"});var Wf,qf,iw=g(()=>{"use strict";a();$();Qe();P();I();rw();Wf=N({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0},mediaLayoutType:{description:"Choose media layout type",type:4,restartNeeded:!0,options:[{label:"STATIC, render loading image but image isn't resposive, no problem unless discord window width is too small",value:"STATIC",default:!0},{label:"RESPONSIVE, image is responsive but not render loading image, cause messages shift when loaded",value:"RESPONSIVE"}]}}),qf=y({name:"NoMosaic",authors:[m.AutumnVN],description:"Removes Discord new image mosaic",tags:["image","mosaic","media"],settings:Wf,patches:[{find:".oneByTwoLayoutThreeGrid",replacement:[{match:/mediaLayoutType:\i\.\i\.MOSAIC/,replace:"mediaLayoutType:$self.mediaLayoutType()"},{match:/null!==\(\i=\i\.get\(\i\)\)&&void 0!==\i\?\i:"INVALID"/,replace:'"INVALID"'}]},{find:"renderAttachments(",predicate:()=>Wf.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}},{find:"Messages.REMOVE_ATTACHMENT_TOOLTIP_TEXT",replacement:{match:/\i===\i\.\i\.MOSAIC/,replace:"true"}}],mediaLayoutType(){return Wf.store.mediaLayoutType},start(){Nt(jf)},stop(){Xt(jf)}})});var JN,Sa,Kf,sw=g(()=>{"use strict";a();$();P();I();H();JN=x("getMessageRequestsCount"),Sa=N({hideFriendRequestsCount:{type:3,description:"Hide incoming friend requests count",default:!0,restartNeeded:!0},hideMessageRequestsCount:{type:3,description:"Hide message requests count",default:!0,restartNeeded:!0},hidePremiumOffersCount:{type:3,description:"Hide nitro offers count",default:!0,restartNeeded:!0}}),Kf=y({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[m.amia],settings:Sa,patches:[{find:"getPendingCount(){",predicate:()=>Sa.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>Sa.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>Sa.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>Sa.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,200}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return JN.getMessageRequestChannelIds().size}})});var Yf,aw=g(()=>{"use strict";a();P();I();Yf=y({name:"NoProfileThemes",description:"Completely removes Nitro profile themes",authors:[m.TheKodeToad],patches:[{find:".NITRO_BANNER,",replacement:{match:/=(?=\i\.\i\.isPremiumAtLeast\(null==(\i))/,replace:"=(arguments[0]?.bannerSrc||$1?.banner)&&"}},{find:".avatarPositionPremiumNoBanner,default:",replacement:{match:/\.avatarPositionPremiumNoBanner(?=,default:\i\.(\i))/,replace:".$1"}},{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&false &&"}}]})});var Pc,Zf,lw=g(()=>{"use strict";a();$();P();I();Pc=N({userList:{description:"List of users to allow or exempt pings for (separated by commas or spaces)",type:0,default:"1234567890123445,1234567890123445"},shouldPingListed:{description:"Behaviour",type:4,options:[{label:"Do not ping the listed users",value:!1},{label:"Only ping the listed users",value:!0,default:!0}]},inverseShiftReply:{description:"Invert Discord's shift replying behaviour (enable to make shift reply mention user)",type:3,default:!1}}),Zf=y({name:"NoReplyMention",description:"Disables reply pings by default",authors:[m.DustyAngel47,m.axyie,m.pylix,m.outfoxxed],settings:Pc,shouldMention(e,t){let o=Pc.store.userList.includes(e.author.id),r=Pc.store.shouldPingListed?o:!o;return Pc.store.inverseShiftReply?t!==r:!t&&r},patches:[{find:',"Message")}function',replacement:{match:/:(\i),shou
`,s),"Failed to fetch user. Check the console for more info."}}return null}var es,Ew,dD,mD,Nc,fD,gD,hg,_w=g(()=>{"use strict";a();uo();P();Uo();I();H();T();es=Ka(Rm()),Ew=0,dD=20,mD=128,Nc=10,fD=Jn(()=>Promise.all(Array.from({length:Nc},(e,t)=>Ow(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),gD=x("getUploads");hg=y({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[m.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let o=await fD(),r=ht(e,"no-server-pfp",!1);try{var i=await hD(e,t,r);if(!i)throw"No Image specified!"}catch(v){ge(t.channel.id,{content:String(v)});return}let s=await Ow(i),l=ht(e,"delay",dD),c=ht(e,"resolution",mD),u=(0,es.GIFEncoder)(),p=document.createElement("canvas");p.width=p.height=c;let d=p.getContext("2d");for(let v=0;v<Nc;v++){d.clearRect(0,0,p.width,p.height);let b=v<Nc/2?v:Nc-v,M=.8+b*.02,w=.8-b*.05,C=(1-M)*.5+.1,R=1-w-.08;d.drawImage(s,C*c,R*c,M*c,w*c),d.drawImage(o[v],0,0,c,c);let{data:A}=d.getImageData(0,0,c,c),F=(0,es.quantize)(A,256),z=(0,es.applyPalette)(A,F);u.writeFrame(z,c,c,{transparent:!0,palette:F,delay:l})}u.finish();let h=new File([u.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>As.promptToUpload([h],t.channel,Ew),10)}}]})});var Bw=g(()=>{});var Fw,yg,Uw=g(()=>{"use strict";a();Bw();$();le();P();I();T();Fw=N({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),yg=y({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[m.Nobody],settings:Fw,patches:[{find:".nonMediaAttachment]",replacement:{match:/\.nonMediaAttachment\]:!(\i).{0,10}children:\[(\S)/,replace:"$&,$1&&$2&&$self.renderPiPButton(),"}}],renderPiPButton:_.wrap(()=>n(ne,{text:"Toggle Picture in Picture"},e=>n("div",{...e,className:"vc-pip-button",role:"button",style:{cursor:"pointer",paddingTop:"4px",paddingLeft:"4px",paddingRight:"4px"},onClick:t=>{let o=t.currentTarget.parentNode.parentNode.querySelector("video"),r=document.body.appendChild(o.cloneNode(!0));r.loop=Fw.store.loop,r.style.display="none",r.onleavepictureinpicture=()=>r.remove();function i(){r.currentTime=o.currentTime,r.requestPictureInPicture(),o.pause(),r.play()}r.readyState===4?i():r.onloadedmetadata=i}},n("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21 3a1 1 0 0 1 1 1v7h-2V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18zm0 10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h8zm-1 2h-6v4h6v-4z"})))),{noop:!0})})});var $w=g(()=>{});var Gw,Dc=g(()=>{"use strict";a();Gw=[1752220,3066993,3447003,10181046,15277667,15844367,15105570,15158332,9807270,6323595,1146986,2067276,2123412,7419530,11342935,12745742,11027200,10038562,9936031,5533306]});async function Bn(e){let{id:t}=E.getCurrentUser();await kt(Hw+t,e)}async function bg(){let e=E.getCurrentUser()?.id;await vD(e),await wD(e),Wt()}async function vD(e){pe=await dt(Hw+e)??[]}function jw(e){return pe.find(t=>t.id===e)}async function Ww(e){pe.push(e),await Bn(pe)}async function qw(e){let t=pe.findIndex(o=>o.id===e.id);t!==-1&&(pe[t]=e,await Bn(pe))}async function Kw(e,t){let o=pe.find(r=>r.id===t);!o||o.channels.includes(e)||(o.channels.push(e),await Bn(pe))}async function Yw(e){let t=pe.find(o=>o.channels.includes(e));!t||(t.channels=t.channels.filter(o=>o!==e),await Bn(pe))}as
`,t))},stop(){Yg=void 0},decodeError(e,...t){let o=0;return Yg?.[e]?.replace(/%s/g,()=>{let r=t[o];return o++,r})}})});var Jg={};qe(Jg,{ServerListRenderPosition:()=>Wc,addServerListElement:()=>Ca,removeServerListElement:()=>Ra,renderAll:()=>iL});function Xg(e){return e===0?nL:rL}function Ca(e,t){Xg(e).add(t)}function Ra(e,t){Xg(e).delete(t)}var oL,Wc,nL,rL,iL,qc=g(()=>{"use strict";a();Ke();oL=new oe("ServerListAPI"),Wc=(o=>(o[o.Above=0]="Above",o[o.In=1]="In",o))(Wc||{}),nL=new Set,rL=new Set;iL=e=>{let t=[];for(let o of Xg(e))try{t.unshift(o())}catch(r){oL.error("Failed to render server list element:",r)}return t}});function sL(){let e=[];Object.values(ae.getGuilds()).forEach(t=>{wn.getChannels(t.id).SELECTABLE.concat(wn.getChannels(t.id).VOCAL).forEach(o=>{!_r.hasUnread(o.channel.id)||e.push({channelId:o.channel.id,messageId:_r.lastMessageId(o.channel.id),readStateType:0})})}),B.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var aL,Qg,z2=g(()=>{"use strict";a();qc();P();I();T();aL=()=>n(k,{onClick:sL,size:k.Sizes.MIN,color:k.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),Qg=y({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[m.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>n(aL,null),start(){Ca(0,this.renderReadAllButton)},stop(){Ra(0,this.renderReadAllButton)}})});var mo,Kc=g(()=>{"use strict";a();$();I();mo=N({notices:{type:3,description:"Also show a notice at the top of your screen when removed (use this if you don't want to miss any notifications).",default:!1},offlineRemovals:{type:3,description:"Notify you when starting discord if you were removed while offline.",default:!0},friends:{type:3,description:"Notify when a friend removes you",default:!0},friendRequestCancels:{type:3,description:"Notify when a friend request is cancelled",default:!0},servers:{type:3,description:"Notify when removed from a server",default:!0},groups:{type:3,description:"Notify when removed from a group chat",default:!0}})});var Vg=g(()=>{"use strict";a()});async function uL(){yt.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function eh(){await uL();let[e,t,o]=await yt.getMany([j2(),W2(),q2()]);if(await Promise.all([Zc(),Xc(),ka()]),mo.store.offlineRemovals){if(mo.store.groups&&t?.size)for(let[r,i]of t)ns.has(r)||Un(`Youarenolongerinthegroup${i.name}.`,i.iconURL);if(mo.store.servers&&e?.size)for(let[r,i]of e)os.has(r)||Un(`Youarenolongerintheserver${i.name}.`,i.iconURL);if(mo.store.friends&&o?.friends.length)for(let r of o.friends){if(ui.friends.includes(r))continue;let i=await Bt.getUser(r).catch(()=>{});i&&Un(`Youarenolongerfriendswith${Nn(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>bo(i.id))}if(mo.store.friendRequestCancels&&o?.requests?.length)for(let r of o.requests){if(ui.requests.includes(r)||[1,2,4].includes(it.getRelationshipType(r)))continue;let i=await Bt.getUser(r).catch(()=>{});i&&Un(`Friendrequestfrom${Nn(i)}hasbeenrevoked.`,i.getAvatarURL(void 0,void 0,!1),()=>bo(i.id))}}}function Un(e,t,o){mo.store.notices&&Yc.showNotice(e,"OK",()=>Yc.popNotice()),Fe({title:"Relationship Notifier",body:e,icon:t,onClick:o})}function K2(e){return os.get(e)}function th(e){os.delete(e),Zc()}async function Zc(){os.clear();let e=E.getCurrentUser().id;for(let[t,{name:o,icon:r}]of Object.entries(ae.getGuilds()))Ge.isMember(t,e)&&os.set(t,{id:t,name:o,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await yt.set(j2(),os)}function Y2(e){return ns.get(e)}function oh(e){ns.delete(e),Xc()}async function Xc(){ns.clear();for(let{type:e,id:t,name:o,rawRecipients:r,icon:i}of ee.getSortedPrivateChannels())e===3&&ns.set(t,{id:t,name:o||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await yt.set(W2(),ns)}async function ka(){ui.friends=[],ui.requests=[];let e=it.getRelationships();for(let t in e)switch(e[t]){case 1:ui.friends.push(t);break;case 3:ui.requests.push(t);break}await yt
`,classNames:{},dom:null});_a="src/plugins/shikiCodeblocks.desktop/devicon.css"});var Ba=g(()=>{"use strict";a()});var VL,wr,zh=g(()=>{"use strict";a();$();Qe();we();Cn();I();Oa();$h();Hh();Ba();VL=Object.keys(jn),wr=N({theme:{type:4,description:"Default themes",options:VL.map(e=>({label:An(zp(e)),value:jn[e],default:jn[e]===jn.DarkPlus})),onChange:xe.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:jn.MaterialCandy,onChange:e=>{xe.setTheme(e||wr.store.theme)}},tryHljs:{type:4,description:"Use the more lightweight default Discord highlighter and theme.",options:[{label:"Never",value:"NEVER"},{label:"Prefer Shiki instead of Highlight.js",value:"SECONDARY",default:!0},{label:"Prefer Highlight.js instead of Shiki",value:"PRIMARY"},{label:"Always",value:"ALWAYS"}]},useDevIcon:{type:4,description:"How to show language icons on codeblocks",options:[{label:"Disabled",value:"DISABLED"},{label:"Colorless",value:"GREYSCALE",default:!0},{label:"Colored",value:"COLOR"}],onChange:e=>{e==="DISABLED"?Xt(_a):Nt(_a)}},bgOpacity:{type:5,description:"Background opacity",markers:[0,20,40,60,80,100],default:100,componentProps:{stickToMarkers:!1,onValueRender:null}}},{theme:{disabled(){return!!this.store.customTheme}},customTheme:{isValid(e){if(!e)return!0;let t=zu(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function hM(e,t){let o=wr.use(e),[r,i]=U.useState(!1),s={...o,...t},l=s.customTheme||s.theme;if(t){let c=xe.currentThemeUrl&&l&&l!==xe.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),xe.setTheme(l))}return{...s,isThemeLoading:l!==xe.currentThemeUrl}}var yM=g(()=>{"use strict";a();T();Oa();zh()});function vM(e){return e=e.slice(1),e.length<6&&(e=e.split("").map(t=>t+t).join("")),e.length===6&&(e+="ff"),e.length>6&&(e=e.slice(0,6)),e.split(/(..)/).filter(Boolean).map(t=>parseInt(t,16))}var SM=g(()=>{"use strict";a()});var sn,bM,Fa=g(()=>{"use strict";a();Qe();T();cu();Ba();sn=ve("shiki-"),bM=({lang:e,tryHljs:t})=>{let o=e?Br?.getLanguage?.(e):null,i=(e?di(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!o||e==="";case"SECONDARY":return!i&&!!o;case"NEVER":return!1;default:return!1}}});function TM(e){let[t,o]=U.useState(!1);function r(i){Ft.copy(i),o(!0),setTimeout(()=>{o(!1)},e)}return[t,r]}var wM=g(()=>{"use strict";a();T()});function xM({content:e,...t}){let[o,r]=TM(1e3);return n("button",{...t,style:{...t.style,cursor:o?"default":void 0},onClick:()=>r(e)},o?"Copied!":"Copy")}var MM=g(()=>{"use strict";a();wM()});function IM({content:e,theme:t}){let o=[];return Ft.SUPPORTS_COPY&&o.push(n(xM,{content:e,className:sn("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),n("div",{className:sn("btns")},o)}var PM=g(()=>{"use strict";a();T();Fa();MM()});var AM,CM=g(()=>{"use strict";a();T();Fa();AM=({theme:e,useHljs:t,lang:o,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=Br.highlight(o,r,!0);s=c.split(`
`);return n(S.FormSection,{title:"Server Trace",tag:"h2"},n("code",null,n(fe,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(o=>n("span",null,o)))))}function G5(){if(!Ga?.logs)return n("div",null,"Loading...");let e=Ga.logGroups.find(t=>t.serverTrace)?.serverTrace;return n(U.Fragment,null,n(U5,{title:"Startup Timings",logs:Ga.logs,traceEnd:Ga.endTime_}),n("div",{style:{marginTop:5}},"\xA0"),e&&n($5,{trace:e}))}var Ga,H5,dI=g(()=>{"use strict";a();le();Ut();H();T();Ga=x("markWithDelta","markAndLog","markAt");H5=_.wrap(G5)});var uy,mI=g(()=>{"use strict";a();P();lt();I();uy=y({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[m.Megu],patches:[{find:"UserSettingsSections.PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/{section:\i\.UserSettingsSections\.PAYMENT_FLOW_MODAL_TEST_PAGE/,replace:'{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'}}],StartupTimingPage:bt(()=>(dI(),Xn(pI)).default)})});var du,py,fI=g(()=>{"use strict";a();$();P();I();T();du=N({superReactByDefault:{type:3,description:"Reaction picker will default to Super Reactions",default:!0},unlimitedSuperReactionPlaying:{type:3,description:"Remove the limit on Super Reactions playing at once",default:!1},superReactionPlayingLimit:{description:"Max Super Reactions to play at once",type:5,default:20,markers:[5,10,20,40,60,80,100],stickToMarkers:!0}},{superReactionPlayingLimit:{disabled(){return this.store.unlimitedSuperReactionPlaying}}}),py=y({name:"SuperReactionTweaks",description:"Customize the limit of Super Reactions playing at once, and super react by default",authors:[m.FieryFlames,m.ant0n],patches:[{find:",BURST_REACTION_EFFECT_PLAY",replacement:{match:/(?<=BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/,replace:"!$self.shouldPlayBurstReaction($1)"}},{find:".trackEmojiSearchEmpty,200",replacement:{match:/(\.trackEmojiSearchEmpty,200(?=.+?isBurstReaction:(\i).+?(\i===\i\.EmojiIntention.REACTION)).+?\[\2,\i\]=\i\.useState\().+?\)/,replace:(e,t,o,r)=>`${t}$self.shouldSuperReactByDefault&&${r})`}}],settings:du,shouldPlayBurstReaction(e){return!!(du.store.unlimitedSuperReactionPlaying||e<=du.store.superReactionPlayingLimit)},get shouldSuperReactByDefault(){return du.store.superReactByDefault&&E.getCurrentUser().premiumType!=null}})});function SI(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuy]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((o,r,i)=>i.indexOf(o)===r).join("")??"g"):new RegExp(e)}function j5(e){try{return SI(e),null}catch(t){return n("span",{style:{color:"var(--text-danger)"}},String(t))}}function dy({initialValue:e,onChange:t,placeholder:o}){let[r,i]=W(e);return n(Je,{placeholder:o,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function gI({title:e,rulesArray:t,rulesKey:o,update:r}){let i=e==="Using Regex";async function s(c){c!==t.length-1&&(t.splice(c,1),await yt.set(o,t),r())}async function l(c,u,p){u===t.length-1&&t.push(vI()),t[u][p]=c,t[u].find===""&&t[u].replace===""&&t[u].onlyIfIncludes===""&&u!==t.length-1&&t.splice(u,1),await yt.set(o,t),r()}return n(f,null,n(S.FormTitle,{tag:"h4"},e),n(fe,{flexDirection:"column",style:{gap:"0.5em"}},t.map((c,u)=>n(U.Fragment,{key:`${c.find}-${u}`},n(fe,{flexDirection:"row",style:{gap:0}},n(fe,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},n(dy,{placeholder:"Find",initialValue:c.find,onChange:p=>l(p,u,"find")}),n(dy,{placeholder:"Replace",initialValue:c.replace,onChange:p=>l(p,u,"replace")}),n(dy,{placeholder:"Only if includes",initialValue:c.onlyIfIncludes,onChange:p=>l(p,u,"onlyIfIncludes")})),n(k,{size:k.Sizes.MIN,onClick:()=>s(u),style:{background:"none",color:"var(--status-danger)",...u===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},n(Oi,null))),i&&j5(c.find)))))}function W5(){let[e,t]=W("");return n(f,null,n(S.FormTitle,{tag:"h4"},"Test Rules"),n(Je,{placeholder:"Type a message",onChange:t}),n(Je,{placeholder:"Message with rules applied",editable:!1,value:bI(e)}))}function bI(e){if(e.length===0)return e;if(fu)for(let t of fu)!t.f
`)).replace(/^\s|\s$/g,""));if(gu){for(let t of gu)if(!!t.find&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let o=SI(t.find);e=e.replace(o,t.replace.replaceAll("\\n",`
`))}catch{new oe("TextReplace").error(`Invalidregex:${t.find}`)}}return e=e.trim(),e}var hI,yI,vI,mu,fu,gu,z5,q5,my,TI=g(()=>{"use strict";a();ei();gn();$();Ut();It();P();Ke();lt();I();T();hI="TextReplace_rulesString",yI="TextReplace_rulesRegex",vI=()=>({find:"",replace:"",onlyIfIncludes:""}),mu=()=>[vI()],fu=mu(),gu=mu(),z5=N({replace:{type:6,description:"",component:()=>{let e=Co();return n(f,null,n(gI,{title:"Using String",rulesArray:fu,rulesKey:hI,update:e}),n(gI,{title:"Using Regex",rulesArray:gu,rulesKey:yI,update:e}),n(W5,null))}}});q5="1102784112584040479",my=y({name:"TextReplace",description:"Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",authors:[m.AutumnVN,m.TheKodeToad],dependencies:["MessageEventsAPI"],settings:z5,async start(){fu=await yt.get(hI)??mu(),gu=await yt.get(yI)??mu(),this.preSend=Vt((e,t)=>{e!==q5&&(t.content=bI(t.content))})},stop(){eo(this.preSend)}})});var fy,wI=g(()=>{"use strict";a();P();I();T();fy=y({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[m.Ven],patches:[{find:".tabBarRef",replacement:{match:/style:this\.getStyle\(\),role:"tab"/,replace:"$&,'data-tab-id':this.props.id"}},{find:".messageListItem",replacement:{match:/\.messageListItem(?=,"aria)/,replace:"$&,...$self.getMessageProps(arguments[0])"}}],getMessageProps(e){let t=e.message?.author?.id;return{"data-author-id":t,"data-is-self":t&&t===E.getCurrentUser()?.id}}})});var gy,xI=g(()=>{"use strict";a();P();I();gy=y({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[m.fawn],patches:[{find:"}renderTimeBar(",replacement:{match:/renderTimeBar\((.{1,3})\){.{0,50}?let/,replace:"renderTimeBar($1){let"}}]})});var MI=g(()=>{});var Dt,Ha=g(()=>{"use strict";a();$();I();Dt=N({receivedInput:{type:0,description:"Input language for received messages",default:"auto",hidden:!0},receivedOutput:{type:0,description:"Output language for received messages",default:"en",hidden:!0},sentInput:{type:0,description:"Input language for sent messages",default:"auto",hidden:!0},sentOutput:{type:0,description:"Output language for sent messages",default:"en",hidden:!0},autoTranslate:{type:3,description:"Automatically translate your messages before sending. You can also shift/right click the translate button to toggle this",default:!1}}).withPrivateSettings()});var hu,hy=g(()=>{"use strict";a();hu={auto:"Detect language",af:"Afrikaans",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",ay:"Aymara",az:"Azerbaijani",bm:"Bambara",eu:"Basque",be:"Belarusian",bn:"Bengali",bho:"Bhojpuri",bs:"Bosnian",bg:"Bulgarian",ca:"Catalan",ceb:"Cebuano",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",co:"Corsican",hr:"Croatian",cs:"Czech",da:"Danish",dv:"Dhivehi",doi:"Dogri",nl:"Dutch",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",tl:"Filipino",fi:"Finnish",fr:"French",fy:"Frisian",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",jw:"Javanese",kn:"Kannada",kk:"Kazakh",km:"Khmer",rw:"Kinyarwanda",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",la:"Latin",lv:"Latvian",ln:"Lingala",lt:"Lithuanian",lg:"Luganda",lb:"Luxembourgish",mk:"Macedonian",mai:"Maithili",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi","mni-Mtei":"Meiteilon (Manipuri)",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",ne:"Nepali",no:"Norwegian",or:"Odia (Oriya)",om:"Oromo",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese",pa:"Punjabi",qu:"Quechua",ro:"Romanian",ru:"Russian",sm:"Samoan",sa:"Sanskrit",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",sn:"Shona",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese"
${s.status}${s.statusText}`);let{src:l,sentences:c}=await s.json();return{src:l,text:c.map(u=>u?.trans).filter(Boolean).join("")}}var qn,ja=g(()=>{"use strict";a();Qe();Ha();qn=ve("vc-trans-")});function Y5({settingsKey:e,includeAuto:t}){let o=Dt.use([e])[e],r=Rt(()=>{let i=Object.entries(hu).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return n("section",{className:j.bottom16},n(S.FormTitle,{tag:"h3"},Dt.def[e].description),n(il,{options:r,value:r.find(i=>i.value===o),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>Dt.store[e]=i}))}function Z5(){let e=Dt.use(["autoTranslate"]).autoTranslate;return n(wt,{value:e,onChange:t=>Dt.store.autoTranslate=t,note:Dt.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function II({rootProps:e}){return n(ye,{...e},n(Le,{className:qn("modal-header")},n(S.FormTitle,{tag:"h2"},"Translate"),n(pt,{onClick:e.onClose})),n(ke,{className:qn("modal-content")},K5.map(t=>n(Y5,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),n(S.FormDivider,{className:j.bottom16}),n(Z5,null)))}var K5,PI=g(()=>{"use strict";a();ot();Ze();T();hy();Ha();ja();K5=["receivedInput","receivedOutput","sentInput","sentOutput"]});function ms({height:e=24,width:t=24,className:o}){return n("svg",{viewBox:"0 96 960 960",height:e,width:t,className:Q(qn("icon"),o)},n("path",{fill:"currentColor",d:"m475 976 181-480h82l186 480h-87l-41-126H604l-47 126h-82Zm151-196h142l-70-194h-2l-70 194Zm-466 76-55-55 204-204q-38-44-67.5-88.5T190 416h87q17 33 37.5 62.5T361 539q45-47 75-97.5T487 336H40v-80h280v-80h80v80h280v80H567q-22 69-58.5 135.5T419 598l98 99-30 81-127-122-200 200Z"}))}var AI,yy=g(()=>{"use strict";a();En();ot();we();Ze();T();Ha();PI();ja();AI=({isMainChat:e})=>{let{autoTranslate:t}=Dt.use(["autoTranslate"]);if(!e)return null;let o=()=>{let r=!t;Dt.store.autoTranslate=r,r&&Dt.store.showAutoTranslateAlert!==!1&&et.show({title:"Vencord Auto-Translate Enabled",body:n(f,null,n(S.FormText,null,"You just enabled auto translate (by right clicking the Translate icon). Any message you send will automatically be translated before being sent."),n(S.FormText,{className:j.top16},"If this was an accident, disable it again, or it will change your message content before sending.")),cancelText:"Disable Auto-Translate",confirmText:"Got it",secondaryConfirmText:"Don't show again",onConfirmSecondary:()=>Dt.store.showAutoTranslateAlert=!1,onCancel:()=>Dt.store.autoTranslate=!1})};return n(xo,{tooltip:"Open Translate Modal",onClick:r=>{if(r.shiftKey)return o();de(i=>n(II,{rootProps:i}))},onContextMenu:()=>o(),buttonProps:{"aria-haspopup":"dialog"}},n(ms,{className:qn({"auto-translate":t,"chat-button":!0})}))}});function Sy(e,t){vy.get(e)(t)}function X5({onDismiss:e}){return n("button",{onClick:e,className:qn("dismiss")},"Dismiss")}function CI({message:e}){let[t,o]=W();return se(()=>{if(!e.vencordEmbeddedBy)return vy.set(e.id,o),()=>void vy.delete(e.id)},[]),t?n("span",{className:qn("accessory")},n(ms,{width:16,height:16}),Pe.parse(t.text)," ","(translated from ",hu[t.src]??t.src," - ",n(X5,{onDismiss:()=>o(void 0)}),")"):null}var vy,RI=g(()=>{"use strict";a();T();hy();yy();ja();vy=new Map});var J5,by,kI=g(()=>{"use strict";a();MI();En();Eo();Tc();gn();li();P();I();T();Ha();yy();RI();ja();J5=(e,{message:t})=>{if(!t.content)return;let o=ut("copy-text",e);!o||o.splice(o.findIndex(r=>r?.props?.id==="copy-text")+1,0,n(L.MenuItem,{id:"vc-trans",label:"Translate",icon:ms,action:async()=>{let r=await za("received",t.content);Sy(t.id,r)}}))},by=y({name:"Translate",description:"Translate messages with Google Translate",authors:[m.Ven],dependencies:["MessageAccessoriesAPI","MessagePopoverAPI","MessageEventsAPI","ChatInputButtonAPI"],settings:Dt,contextMenus:{message:J5},translate:za,start(){ya("vc-translation",e=>n(CI,{message:e.message})),wo("vc-translate",AI),on("vc-translate",e=>e.content?{label:"Translate",icon:ms,message:e,channel:ee.getChannel(e.channel_id),onClick:async()=>{let t=await za("received",e.content);Sy(e.id,t)}}:null),this.preSend=Vt(async(e,t)=>{!Dt.store.autoTranslate||!t.con
${r}`})},start(){this.preSend=Vt((e,t)=>this.unindentMsg(t)),this.preEdit=ti((e,t,o)=>this.unindentMsg(o))},stop(){eo(this.preSend),oi(this.preEdit)}})});var Py,o3,Ay,EI=g(()=>{"use strict";a();Eo();It();P();I();T();Py=1<<2,o3=(e,{channel:t,message:{author:o,embeds:r,flags:i,id:s}})=>{let l=(i&Py)!==0;if(!l&&!r.length)return;let c=t.isPrivate()||!!(_e.getChannelPermissions({id:t.id})&me.EMBED_LINKS);if(o.id===E.getCurrentUser().id&&!c)return;let u=ut("delete",e),p=u?.findIndex(d=>d?.props?.id==="delete");!p||!u||u.splice(p-1,0,n(L.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:l?"Unsuppress Embeds":"Suppress Embeds",color:l?void 0:"danger",icon:l?El:Ol,action:()=>_t.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:l?i&~Py:i|Py}})}))},Ay=y({name:"UnsuppressEmbeds",authors:[m.rad,m.HypedDomi],description:"Allows you to unsuppress embeds in messages",contextMenus:{message:o3}})});var OI,Cy,_I=g(()=>{"use strict";a();uo();_l();$();P();I();OI=N({resultsAmount:{type:1,description:"The amount of results you want to get (more gives better results, but is slower)",default:10}}),Cy=y({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[m.jewdev],dependencies:["CommandsAPI"],settings:OI,commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let o=encodeURIComponent(e[0].value),{list:r}=await fetch(`https://api.urbandictionary.com/v0/define?term=${o}&per_page=${OI.store.resultsAmount}`).then(l=>l.json());if(!r.length)return void ge(t.channel.id,{content:"No results found."});let i=r.reduce((l,c)=>l.thumbs_up>c.thumbs_up?l:c),s=l=>l.replaceAll(`\r
`).replace(/([*>_`~\\])/gsi,"\\$1").replace(/\[(.+?)\]/g,(c,u)=>`[${u}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(u)} "Define '${u}' on Urban Dictionary")`).trim();returnvoidge(t.channel.id,{embeds:[{type:"rich",author:{name:`Uploaded by "${i.author}"`,url:`https://www.urbandictionary.com/author.php?author=${encodeURIComponent(i.author)}`},title:i.word,url:`https://www.urbandictionary.com/define.php?term=${encodeURIComponent(i.word)}`,description:s(i.definition),fields:[{name:"Example",value:s(i.example)},{name:"Want more definitions?",value:`Check out [more definitions](https://www.urbandictionary.com/define.php?term=${o} "Define "${e[0].value}" on Urban Dictionary") on Urban Dictionary.`}],color:16750848,footer:{text:`\u{1F44D} ${i.thumbs_up.toString()} | \u{1F44E} ${i.thumbs_down.toString()}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:newDate(i.written_on).toISOString()}]})}catch(o){ge(t.channel.id,{content:`Something went wrong: \`${o}\``})}}}]})});varBI=g(()=>{});varn3,r3,i3,FI,UI=g(()=>{"use strict";a();BI();H();T();n3=x("selectChannel","selectVoiceChannel"),r3=Go(".lastSection","children:"),i3=1n<<20n,FI=({channel:e,label:t,showHeader:o})=>n(r3,null,o&&n(S.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),n(k,{className:"vc-uvs-button",color:k.Colors.TRANSPARENT,size:k.Sizes.SMALL,onClick:()=>{_e.can(i3,e)?n3.selectVoiceChannel(e.id):X.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:X.Type.FAILURE,options:{position:X.Position.BOTTOM}})}},t))});vars3,Ry,$I,ky,GI=g(()=>{"use strict";a();$();le();P();I();H();T();UI();s3=Re("VoiceStateStore"),Ry=N({showInUserProfileModal:{type:3,description:"Show a user's voice channel in their profile modal",default:!0},showVoiceChannelSectionHeader:{type:3,description:'Whether to show "IN A VOICE CHANNEL" above the join button',default:!0}}),$I=_.wrap(({user:e})=>{let{channelId:t}=s3.getVoiceStateForUser(e.id)??{};if(!t)returnnull;leto=ee.getChannel(t);if(!o)returnnull;letr=ae.getGuild(o.guild_id);if(!r)returnnull;leti=`${r.name} | ${o.name}`;returnn(FI,{channel:o,label:i,showHeader:Ry.store.showVoiceChannelSectionHeader})}),ky=y({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[m.LordElias],settings:Ry,patchModal({user:e}){returnRy.store.showInUserProfileModal?n("div",{className:"vc-uvs-modal-margin"},n($I,{user:e})):null},patchPopout:({user:e})=>{lett=e.id===E.getCurrentUser().id;returnn("div",{className:t?"vc-uvs-popout-margin-self":""},n($I,{user:e}))},patches:[{find:".popularApplicationCommandIds,",replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,{user:\i,setNote/,replace:"$self.patchPopout(arguments[0]),$&"}},{find:".USER_PROFILE_MODAL",replacement:{match:/\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});varHI,zI=g(()=>{a();(window.VencordStyles??=newMap).set("src/plugins/usrbg/index.css",{name:"src/plugins/usrbg/index.css",source:`:is([class*="userProfile"], [class*="userPopout"]) [class*="bannerPremium"] {
`,classNames:{},dom:null});HI="src/plugins/usrbg/index.css"});var a3,Kn,Su,Ny,jI=g(()=>{"use strict";a();$();Qe();To();P();I();zI();a3="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",Kn={},Su=N({nitroFirst:{description:"Banner to use if both Nitro and USRBG banners are present",type:4,options:[{label:"Nitro banner",value:!0,default:!0},{label:"USRBG banner",value:!1}]},voiceBackground:{description:"Use USRBG banners as voice chat backgrounds",type:3,default:!0,restartNeeded:!0}}),Ny=y({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[m.AutumnVN,m.pylix,m.TheKodeToad],settings:Su,patches:[{find:".NITRO_BANNER,",replacement:[{match:/(\i)\.premiumType/,replace:"$self.premiumHook($1)||$&"},{match:/(?<=function \i\((\i)\)\{)(?=var.{30,50},bannerSrc:)/,replace:"$1.bannerSrc=$self.useBannerHook($1);"},{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}]},{find:'"data-selenium-video-tile":',predicate:()=>Su.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.voiceBackgroundHook($1);"}]}],data:Kn,settingsAboutComponent:()=>n(je,{href:"https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner"},"CLICK HERE TO GET YOUR OWN BANNER"),voiceBackgroundHook({className:e,participantUserId:t}){if(e.includes("tile_")&&Kn[t])return{backgroundImage:`url(${Kn[t]})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},useBannerHook({displayProfile:e,user:t}){if(!(e?.banner&&Su.store.nitroFirst)&&Kn[t.id])return Kn[t.id]},premiumHook({userId:e}){if(Kn[e])return 2},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!Kn[t.id]||Su.store.nitroFirst)},async start(){Nt(HI);let e=await fetch(a3);e.ok&&(Kn=await e.json(),this.data=Kn)}})});function l3({data:e,UserMention:t,RoleMention:o,parse:r,props:i}){let[s,l]=W(e.userId);if(s)return n(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let c=r(e.content,i);return n(o,{...e,inlinePreview:i.formatInline},n("span",{onMouseEnter:()=>{let u=c?.[0]?.props?.children;if(typeof u!="string")return;let p=u.match(/<@!?(\d+)>/)?.[1];if(!p||bu.has(p))return;if(E.getUser(p))return l(p);let d=()=>{bu.add(p),WI.unshift(()=>Bt.getUser(p).then(()=>{l(p),bu.delete(p)}).catch(h=>{h?.status===429&&(WI.unshift(()=>Ko(1e3).then(d)),bu.delete(p))}).finally(()=>Ko(300)))};d()}},c))}var bu,WI,Dy,qI=g(()=>{"use strict";a();le();P();we();Wr();I();T();bu=new Set,WI=new vo(5);Dy=y({name:"ValidUser",description:"Fix mentions for unknown users showing up as '<@343383572805058560>' (hover over a mention to fix it)",authors:[m.Ven],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react(?=\(\i,\i,\i\).{0,50}return null==\i\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact"}}],renderMention(e,t,o,r,i){return n(_,{noop:!0},n(l3,{RoleMention:e,UserMention:t,data:o,parse:r,props:i}))}})});var Ly,Ey,KI=g(()=>{"use strict";a();P();I();T();Ly={},Ey=y({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[m.Ven,m.D3SOX],patches:[...[".handleVoiceStatusClick",".handleClickChat"].map(e=>({find:e,replacement:[{match:/onClick:\(\)=>\{this.handleClick\(\)/g,replace:"onClick:()=>{$self.schedule(()=>{this.handleClick()},this)"}]})),{find:".shouldCloseDefaultModals",replacement:{match:/onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,replace:(e,t,o)=>`onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${o})&&${t}()`}}],shouldRunOnClick(e,{channelId:t}){let o=ee.getChannel(t);return!o||![2,13].includes(o.type)?!0:e.detail>=2},schedule(e,t){let o=t.props.channel.id;if(Ie.getVoiceChannelId()===o){e();return}let r=Ly[o]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete Ly[o]):r.timeout=setTimeout(()=>{delete Ly[o]},500)}})});fu
`)}document.addEventListener("DOMContentLoaded",()=>{n4(),Au(),n1(G.useQuickCss),jt.addChangeListener("useQuickCss",n1),jt.addChangeListener("themeLinks",Au),jt.addChangeListener("enabledThemes",Au),VencordNative.quickCss.addThemeChangeListener(Au)});Zr();var s1={};qe(s1,{Common:()=>Hu,LazyComponentWebpack:()=>Du,_initWebpack:()=>Qa,_resolveReady:()=>Ja,addListener:()=>FP,cache:()=>ln,extract:()=>el,extractAndLoadChunks:()=>f1,extractAndLoadChunksLazy:()=>vi,filters:()=>Ce,find:()=>$o,findAll:()=>Nr,findBulk:()=>Dr,findByCode:()=>d1,findByCodeLazy:()=>Go,findByProps:()=>Lr,findByPropsLazy:()=>x,findComponentByCode:()=>Lu,findComponentByCodeLazy:()=>Ne,findComponentLazy:()=>Eu,findExportedComponentLazy:()=>Tn,findLazy:()=>so,findModuleFactory:()=>p1,findModuleId:()=>Va,findStore:()=>m1,findStoreLazy:()=>Re,lazyWebpackSearchHistory:()=>BP,listeners:()=>Nu,onceReady:()=>ku,proxyLazyWebpack:()=>go,removeListener:()=>UP,search:()=>Ou,subscriptions:()=>u1,waitFor:()=>gt,wreq:()=>io});a();T();H();a();P();Ke();hi();Xa();var IP,Fo=new oe("WebpackInterceptor","#8caaee");window[pn]?(Fo.info(`Patching${pn}.push(wasalreadyexistent,likelyfromcache!)`),Qa(window[pn]),PP(window[pn])):(Object.defineProperty(window,pn,{get:()=>IP,set:e=>{e?.push&&(e.push.$$vencordOriginal||(Fo.info(`Patching${pn}.push`),PP(e)),Qa(e)&&(Fo.info("Successfully initialised Vencord webpack"),delete window[pn],window[pn]=e)),IP=e},configurable:!0}),Object.defineProperty(Function.prototype,"m",{set(e){new Error().stack?.includes("discord.com")&&(Fo.info("Found webpack module factory"),AP(e)),Object.defineProperty(this,"m",{value:e,configurable:!0})},configurable:!0}));function PP(e){function t(o){try{AP(o[1])}catch(r){Fo.error("Error in handlePush",r)}return t.$$vencordOriginal.call(e,o)}t.$$vencordOriginal=e.push,t.bind=(...o)=>t.$$vencordOriginal.bind(...o),Object.defineProperty(e,"push",{get:()=>t,set(o){t.$$vencordOriginal=o},configurable:!0})}function AP(e){let{subscriptions:t,listeners:o}=Vencord.Webpack,{patches:r}=Vencord.Plugins;for(let i in e){let s=e[i],l="0,"+s.toString().replaceAll(`
`,""),c=s,u=new Set,p=e[i]=function(d,h,v){try{s(d,h,v)}catch(b){if(s===c)throw b;return Fo.error("Error in patched chunk",b),void c(d,h,v)}if(h=d.exports,!!h){if(h===window&&v.c){Object.defineProperty(v.c,i,{value:v.c[i],enumerable:!1,configurable:!0,writable:!0});return}for(let b of o)try{b(h,i)}catch(M){Fo.error("Error in webpack listener",M)}for(let[b,M]of t)try{b(h)?(t.delete(b),M(h,i)):h.default&&b(h.default)&&(t.delete(b),M(h.default,i))}catch(w){Fo.error("Error while firing callback for webpack chunk",w)}}};p.toString=()=>s.toString(),p.original=c;for(let d=0;d<r.length;d++){let h=r[d],v=an(`patchby${h.plugin}`,(b,M)=>l.replace(b,M));if(!(h.predicate&&!h.predicate())&&l.includes(h.find)){u.add(h.plugin);let b=s,M=l;for(let w of h.replacement){if(w.predicate&&!w.predicate())continue;let C=s,R=l;ys(w,h.plugin);try{let A=v(w.match,w.replace);if(A===l){if(h.noWarn||Fo.warn(`Patchby${h.plugin}hadnoeffect(Moduleidis${i}):${w.match}`),h.group){Fo.warn(`Undoingpatchgroup${h.find}by${h.plugin}becausereplacement${w.match}hadnoeffect`),l=M,s=b,u.delete(h.plugin);break}}else l=A,s=(0,eval)(`// Webpack Module ${i} - Patched by ${[...u].join(", ")}
${A}
//# sourceURL=WebpackModule${i}`)}catch(A){if(Fo.error(`Patch by ${h.plugin} errored (Module id is ${i}): ${w.match}
`,A),u.delete(h.plugin),h.group){Fo.warn(`Undoingpatchgroup${h.find}by${h.plugin}becausereplacement${w.match}errored`),l=M,s=b;break}l=R,s=C}}h.all||r.splice(d--,1)}}}}I();Xo();er();$();jl();hl();rr();Us();Zr();T();async function r4(){if(G.cloud.authenticated&&!await dt("Vencord_cloudSecret")){Fe({title:"Cloud Integrations",body:"We've noticed you have cloud integrations enabled in another client! Due to limitations, you will need to re-authenticate to continue using them. Click here to go to the settings page to do so!",color:"var(--yellow-360)",onClick:()=>$r.open("VencordCloud")});return}G.cloud.settingsSync&&G.cloud.authenticated&&(jr.Vencord_settingsDirty?(await Ri(),delete jr.Vencord_settingsDirty):await Rl(!1)&&Fe({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:So}))}async function i4(){await ku,ta("WebpackReady"),r4();try{if(!await Di())return;if(G.autoUpdate){await Li(),G.autoUpdateNotification&&setTimeout(()=>Fe({title:"Vencord has been updated!",body:"Click here to restart",permanent:!0,noPersist:!0,onClick:So}),1e4);return}G.notifyAboutUpdates&&setTimeout(()=>Fe({title:"A Vencord update is available!",body:"Click here to view the update",permanent:!0,noPersist:!0,onClick(){$r.open("VencordUpdater")}}),1e4)}catch(e){Yr.error("Failed to check for updates",e)}}ta("Init");i4();document.addEventListener("DOMContentLoaded",()=>{ta("DOMContentLoaded")},{once:!0});return Xn(s4);})();