// Vencord ca18b6e // Standalone: true // Platform: Universal // Updater disabled: false "use strict";var Vencord=(()=>{var kP=Object.create;var qa=Object.defineProperty;var NP=Object.getOwnPropertyDescriptor;var DP=Object.getOwnPropertyNames;var LP=Object.getPrototypeOf,EP=Object.prototype.hasOwnProperty;var fi=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var g=(e,t)=>()=>(e&&(t=e(e=0)),t);var kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qe=(e,t)=>{for(var o in t)qa(e,o,{get:t[o],enumerable:!0})},a1=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of DP(t))!EP.call(e,i)&&i!==o&&qa(e,i,{get:()=>t[i],enumerable:!(r=NP(t,i))||r.enumerable});return e};var Ka=(e,t,o)=>(o=e!=null?kP(LP(e)):{},a1(t||!e||!e.__esModule?qa(o,"default",{value:e,enumerable:!0}):o,e)),Xn=e=>a1(qa({},"__esModule",{value:!0}),e);var f,n,a=g(()=>{"use strict";f=Symbol.for("react.fragment"),n=(...e)=>(n=Vencord.Webpack.Common.React.createElement)(...e)});var oe,Ke=g(()=>{"use strict";a();oe=class{constructor(t,o="white"){this.name=t;this.color=o}static makeTitle(t,o){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,o]}_log(t,o,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`background: ${o}; color: black; font-weight: bold; border-radius: 5px;`,"",`background: ${this.color}; color: black; font-weight: bold; border-radius: 5px;`,...r)}log(...t){this._log("log","#a6d189",t)}info(...t){this._log("info","#a6d189",t)}error(...t){this._log("error","#e78284",t)}errorCustomFmt(t,...o){this._log("error","#e78284",o,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var l1,j,ot=g(()=>{"use strict";a();l1="",j={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let o=`vc-m-${e}-${t}`;j[`${e}${t}`]=o,l1+=`.${o}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:l1,id:"vencord-margins"})),{once:!0})});function Jn(e,t=5){let o=0,r;return()=>(!r&&t>o++&&(r=e(),!r&&t===o&&console.error("Lazy factory failed:",e)),r)}function Ot(e,t=5,o=!1){let r=!0;o||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[hs]:void 0,[gi](){return!s[hs]&&t>i++&&(s[hs]=e(),!s[hs]&&t===i&&console.error("Lazy factory failed:",e)),s[hs]}});return new Proxy(s,{...Ya,get(l,c,u){return!o&&r?Ot(()=>Reflect.get(l[gi](),c,u),t,!0):Reflect.get(l[gi](),c,u)}})}var c1,Ya,gi,hs,Uo=g(()=>{"use strict";a();c1=["arguments","caller","prototype"],Ya={},gi=Symbol.for("vencord.lazy.get"),hs=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Ya[e]=(t,...o)=>Reflect[e](t[gi](),...o);Ya.ownKeys=e=>{let t=e[gi](),o=Reflect.ownKeys(t);for(let r of c1)o.includes(r)||o.push(r);return o};Ya.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&c1.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[gi](),t);return o&&Object.defineProperty(e,t,o),o}});function bt(e,t=5){let o=Jn(e,t),r=i=>{let s=o()??OP;return n(s,{...i})};return r.$$vencordInternal=o,r}var OP,Cu=g(()=>{"use strict";a();Uo();OP=()=>null});function bn(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function Za(e,t){let o=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`;return typeof e!="function"?e.replaceAll("$self",o):(...r)=>e(...r).replaceAll("$self",o)}function Ru(e,t){if(e.get){let o=e.get;e.get=function(){return t(o.call(this))}}else e.value&&(e.value=t(e.value));return e}function ys(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=Ru(o.match,bn),o.replace=Ru(o.replace,r=>Za(r,t)),Object.defineProperties(e,o)}var hi=g(()=>{"use strict";a()});var _P,an,Xa=g(()=>{"use strict";a();Ke();_P=(e,t,o)=>t,an=_P});function Qa(e){if(ln!==void 0)throw"no.";return e.push([[Symbol("Vencord")],{},t=>io=t]),e.pop(),io?(ln=io.c,!0):!1}function Qn(e,...t){let o=new Error(`webpack.${e} found no module`);yi.error(o,"Filter:",t)}function Nr(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let o in ln){let r=ln[o];!r?.exports||(e(r.exports)&&t.push(r.exports),r.exports.default&&e(r.exports.default)&&t.push(r.exports.default))}return t}function p1(...e){let t=Va(...e);return t?io.m[t]:null}function go(e,t){return Ot(e,t)}function Du(e,t){return bt(e,t)}function so(e){return Ot(()=>$o(e))}function Lr(...e){let t=$o(Ce.byProps(...e),{isIndirect:!0});return t||Qn("findByProps",...e),t}function x(...e){return Ot(()=>Lr(...e))}function d1(...e){let t=$o(Ce.byCode(...e),{isIndirect:!0});return t||Qn("findByCode",...e),t}function Go(...e){return Ot(()=>d1(...e))}function m1(e){let t=$o(Ce.byStoreName(e),{isIndirect:!0});return t||Qn("findStore",e),t}function Re(e){return Ot(()=>m1(e))}function Lu(...e){let t=$o(Ce.componentByCode(...e),{isIndirect:!0});return t||Qn("findComponentByCode",...e),t}function Eu(e){return bt(()=>{let t=$o(e,{isIndirect:!0});return t||Qn("findComponent",e),t})}function Ne(...e){return bt(()=>{let t=$o(Ce.componentByCode(...e),{isIndirect:!0});return t||Qn("findComponentByCode",...e),t})}function Tn(...e){return bt(()=>{let t=$o(Ce.byProps(...e),{isIndirect:!0});return t||Qn("findExportedComponent",...e),t[e[0]]})}async function f1(e,t=/\.el\("(.+?)"\)(?<=(\i)\.el.+?)\.then\(\2\.bind\(\2,"\1"\)\)/){let o=p1(...e);if(!o){let s=new Error("extractAndLoadChunks: Couldn't find module factory");yi.warn(s,"Code:",e,"Matcher:",t);return}let r=o.toString().match(bn(t));if(!r){let s=new Error("extractAndLoadChunks: Couldn't find entry point id in module factory code");yi.warn(s,"Code:",e,"Matcher:",t);return}let[,i]=r;if(!i||!Number(i)){let s=new Error("extractAndLoadChunks: Matcher didn't return a capturing group with the entry point, or the entry point returned wasn't a number");yi.warn(s,"Code:",e,"Matcher:",t);return}return await io.el(i),io(i)}function vi(e,t=/\.el\("(.+?)"\)(?<=(\i)\.el.+?)\.then\(\2\.bind\(\2,"\1"\)\)/){return()=>f1(e,t)}function gt(e,t,{isIndirect:o=!1}={}){if(typeof e=="string")e=Ce.byProps(e);else if(Array.isArray(e))e=Ce.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);if(ln!=null){let[r,i]=$o(e,{isIndirect:!0,isWaitFor:!0});if(r)return void t(r,i)}u1.set(e,t)}function FP(e){Nu.add(e)}function UP(e){Nu.delete(e)}function Ou(...e){let t={},o=io.m;e:for(let r in o){let i=o[r].original??o[r],s=i.toString();for(let l of e)if(typeof l=="string"&&!s.includes(l)||l instanceof RegExp&&!l.test(s))continue e;t[r]=i}return t}function el(e){let t=io.m[e];if(!t)return null;let o=` // [EXTRACTED] WebpackModule${e} // WARNING: This module was extracted to be more easily readable. // This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!! 0,${t.toString()} //# sourceURL=ExtractedWebpackModule${e} `;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{"use strict";a();H();tl=so(e=>e.image&&e.modal&&!e.applicationIcon),ol=x("buttonWrapper","buttonContent")});function nl(e,t){let o=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=bt(()=>o);return gt(t,i=>{o=i,Object.assign(r,i)},{isIndirect:!0}),r}function $t(e,t){gt(Ce.byStoreName(e),t,{isIndirect:!0})}var _u=g(()=>{"use strict";a();lt();H()});var S,Tt,k,wt,ne,Je,rl,V,Io,il,Er,sl,vs,h1,Ho,al,Si,bi,Ti,ll,Ss,Vn,Po,GP,bs,y1=g(()=>{"use strict";a();H();_u();S={},Vn=nl("MaskedLink",Ce.componentByCode("MASKED_LINK)")),Po=nl("Timestamp",Ce.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),GP=nl("Flex",["Justify","Align","Wrap"]),{OAuth2AuthorizeModal:bs}=x("OAuth2AuthorizeModal");gt(["FormItem","Button"],e=>{({useToken:Ss,Card:Tt,Button:k,FormSwitch:wt,Tooltip:ne,TextInput:Je,TextArea:rl,Text:V,Select:Io,SearchableSelect:il,Slider:Er,ButtonLooks:sl,TabBar:Ho,Popout:vs,Dialog:h1,Paginator:al,ScrollerThin:Si,Clickable:bi,Avatar:Ti,FocusLock:ll}=e),S=e})});var L,Yt,v1=g(()=>{"use strict";a();H();L={};gt(["MenuItem","MenuSliderControl"],e=>L=e);Yt=x("closeContextMenu","openContextMenu")});var U,W,se,Rt,xt,wi,cl,Or,S1=g(()=>{"use strict";a();H();Or=x("createPortal","render");gt("useState",e=>{U=e,{useEffect:se,useState:W,useMemo:Rt,useRef:xt,useReducer:wi,useCallback:cl}=U})});var Ts,xi,ws,b1=g(()=>{"use strict";a();H();Ts=x("MessageDisplayCompact"),xi=x("ShowCurrentGame"),ws=x("PreloadedUserSettingsActionCreators")});var xs,Bu,zo,Ms,_e,wn,_r,cn,HP,ae,E,ho,Ie,yo,ee,Ge,it,jo,Is,Ps,Be,T1=g(()=>{"use strict";a();H();_u();xs=x("connectStores"),Bu=(i=>(i[i.ChannelMessage=0]="ChannelMessage",i[i.ThreadSettings=1]="ThreadSettings",i[i.FirstThreadMessage=2]="FirstThreadMessage",i[i.ApplicationLauncherCommand=3]="ApplicationLauncherCommand",i))(Bu||{}),Ms=x("openPrivateChannel"),{useStateFromStores:Be}=x("useStateFromStores");$t("DraftStore",e=>Ps=e);$t("UserStore",e=>E=e);$t("UserProfileStore",e=>ho=e);$t("ChannelStore",e=>ee=e);$t("SelectedChannelStore",e=>Ie=e);$t("SelectedGuildStore",e=>yo=e);$t("GuildStore",e=>ae=e);$t("GuildMemberStore",e=>Ge=e);$t("RelationshipStore",e=>it=e);$t("PermissionStore",e=>_e=e);$t("PresenceStore",e=>cn=e);$t("ReadStateStore",e=>_r=e);$t("GuildChannelStore",e=>wn=e);$t("MessageStore",e=>zo=e);$t("WindowStore",e=>Is=e);$t("EmojiStore",e=>jo=e)});var w1={};var x1=g(()=>{"use strict";a()});var M1={};var I1=g(()=>{"use strict";a()});var P1={};var A1=g(()=>{"use strict";a()});function Mt(e,t=C1.MESSAGE){X.show({id:X.genId(),message:e,type:t})}var B,Wo,_t,Fu,Br,Fr,Ye,un,Pe,et,C1,zP,X,Bt,As,Ur,Ft,qo,$r,me,Gr,jP,Uu,ao,$u,Gu,Gt,R1=g(()=>{"use strict";a();H();gt(["dispatch","subscribe"],e=>{B=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Ja()};e.subscribe("CONNECTION_OPEN",t)});gt(["ComponentDispatch","ComponentDispatcher"],e=>Wo=e.ComponentDispatch);_t=go(()=>{let e=Lr("getAPIBaseURL");return e.HTTP??e}),Fu=x("parseTwoDigitYear"),Br=x("highlight","registerLanguage"),Fr=x("debounce","cloneDeep"),Ye=so(e=>e.Messages?.["en-US"]);gt(["fromTimestamp","extractTimestamp"],e=>un=e);gt("parseTopic",e=>Pe=e);gt(["show","close"],e=>et=e);C1={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},zP={TOP:0,BOTTOM:1},X={Type:C1,Position:zP,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};gt("showToast",e=>{X.show=e.showToast,X.pop=e.popToast});Bt=x("getUser","fetchCurrentUser"),As=x("showUploadFileSizeExceededError","promptToUpload"),Ur=x("fetchAssetIds","getAssetImage"),Ft=x("SUPPORTS_COPY","copy"),qo=x("transitionTo","replaceWith","transitionToGuild");gt(["open","saveAccountChanges"],e=>$r=e);({Permissions:me}=so(e=>typeof e.Permissions?.ADMINISTRATOR=="bigint")),Gr=Go("will be removed in v4"),jP=Ce.byCode("[zustand persist middleware]"),{persist:Uu}=so(e=>e.persist&&jP(e.persist)),ao=x("editMessage","sendMessage"),$u=x("openUserProfileModal","closeUserProfileModal"),Gu=x("resolveInvite"),Gt=x("getGuildBannerURL","getUserAvatarURL")});var Hu={};qe(Hu,{Alerts:()=>et,ApplicationAssetUtils:()=>Ur,Avatar:()=>Ti,Button:()=>k,ButtonLooks:()=>sl,ButtonWrapperClasses:()=>ol,Card:()=>Tt,ChannelStore:()=>ee,Clickable:()=>bi,Clipboard:()=>Ft,ComponentDispatch:()=>Wo,ComponentTypes:()=>w1,ContextMenuApi:()=>Yt,Dialog:()=>h1,DraftStore:()=>Ps,DraftType:()=>Bu,EmojiStore:()=>jo,Flex:()=>GP,Flux:()=>xs,FluxDispatcher:()=>B,FocusLock:()=>ll,Forms:()=>S,GuildChannelStore:()=>wn,GuildMemberStore:()=>Ge,GuildStore:()=>ae,IconUtils:()=>Gt,InviteActions:()=>Gu,MaskedLink:()=>Vn,Menu:()=>L,MenuTypes:()=>M1,MessageActions:()=>ao,MessageStore:()=>zo,ModalImageClasses:()=>tl,NavigationRouter:()=>qo,OAuth2AuthorizeModal:()=>bs,Paginator:()=>al,Parser:()=>Pe,PermissionStore:()=>_e,PermissionsBits:()=>me,PoggerModeSettingsStore:()=>HP,Popout:()=>vs,PresenceStore:()=>cn,PrivateChannelsStore:()=>Ms,React:()=>U,ReactDOM:()=>Or,ReadStateStore:()=>_r,RelationshipStore:()=>it,RestAPI:()=>_t,ScrollerThin:()=>Si,SearchableSelect:()=>il,Select:()=>Io,SelectedChannelStore:()=>Ie,SelectedGuildStore:()=>yo,SettingsRouter:()=>$r,Slider:()=>Er,SnowflakeUtils:()=>un,StatusSettingsStores:()=>xi,Switch:()=>wt,TabBar:()=>Ho,Text:()=>V,TextAndImagesSettingsStores:()=>Ts,TextArea:()=>rl,TextInput:()=>Je,Timestamp:()=>Po,Toasts:()=>X,Tooltip:()=>ne,UploadHandler:()=>As,UserProfileActions:()=>$u,UserProfileStore:()=>ho,UserSettingsActionCreators:()=>ws,UserStore:()=>E,UserUtils:()=>Bt,UtilTypes:()=>P1,WindowStore:()=>Is,hljs:()=>Br,i18n:()=>Ye,lodash:()=>Fr,moment:()=>Fu,showToast:()=>Mt,useCallback:()=>cl,useEffect:()=>se,useMemo:()=>Rt,useReducer:()=>wi,useRef:()=>xt,useState:()=>W,useStateFromStores:()=>Be,useToken:()=>Ss,zustandCreate:()=>Gr,zustandPersist:()=>Uu});var T=g(()=>{"use strict";a();g1();y1();v1();S1();b1();T1();x1();I1();A1();R1()});var pn,WP,ul,m,Mi,P=g(()=>{"use strict";a();pn="webpackChunkdiscord_app",WP="Vencord.Webpack.Common.React",ul="1026515880080842772",m=Object.freeze({Nobody:{name:"Nobody",id:0n},Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Trwy:{name:"trey",id:354427199023218689n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},fawn:{name:"fawn",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Nyako:{name:"nyako",id:118437263754395652n},MaiKokain:{name:"Mai",id:722647978577363026n},echo:{name:"ECHO",id:712639419785412668n},katlyn:{name:"katlyn",id:250322741406859265n},nea:{name:"nea",id:310702108997320705n},Nuckyz:{name:"Nuckyz",id:235834946571337729n},D3SOX:{name:"D3SOX",id:201052085641281538n},Nickyux:{name:"Nickyux",id:427146305651998721n},mantikafasi:{name:"mantikafasi",id:287555395151593473n},Xinto:{name:"Xinto",id:423915768191647755n},JacobTm:{name:"Jacob.Tm",id:302872992097107991n},DustyAngel47:{name:"DustyAngel47",id:714583473804935238n},BanTheNons:{name:"BanTheNons",id:460478012794863637n},BigDuck:{name:"BigDuck",id:1024588272623681609n},AverageReactEnjoyer:{name:"Average React Enjoyer",id:1004904120056029256n},adryd:{name:"adryd",id:0n},Tyman:{name:"Tyman",id:487443883127472129n},afn:{name:"afn",id:420043923822608384n},KraXen72:{name:"KraXen72",id:379304073515499530n},kemo:{name:"kemo",id:299693897859465228n},dzshn:{name:"dzshn",id:310449948011528192n},Ducko:{name:"Ducko",id:506482395269169153n},jewdev:{name:"jewdev",id:222369866529636353n},Luna:{name:"Luny",id:821472922140803112n},Vap:{name:"Vap0r1ze",id:454072114492866560n},KingFish:{name:"King Fish",id:499400512559382538n},Commandtechno:{name:"Commandtechno",id:296776625432035328n},TheSun:{name:"ActuallyTheSun",id:406028027768733696n},axyie:{name:"'ax",id:273562710745284628n},pointy:{name:"pointy",id:99914384989519872n},SammCheese:{name:"Samm-Cheese",id:372148345894076416n},zt:{name:"zt",id:289556910426816513n},captain:{name:"Captain",id:347366054806159360n},nick:{name:"nick",id:347884694408265729n,badge:!1},whqwert:{name:"whqwert",id:586239091520176128n},lewisakura:{name:"lewisakura",id:96269247411400704n},RuiNtD:{name:"RuiNtD",id:157917665162297344n},hunt:{name:"hunt-g",id:222800179697287168n},cloudburst:{name:"cloudburst",id:892128204150685769n},Aria:{name:"Syncxv",id:549244932213309442n},TheKodeToad:{name:"TheKodeToad",id:706152404072267788n},LordElias:{name:"LordElias",id:319460781567639554n},juby:{name:"Juby210",id:324622488644616195n},Alyxia:{name:"Alyxia Sother",id:952185386350829688n},Remty:{name:"Remty",id:335055032204656642n},skyevg:{name:"skyevg",id:1090310844283363348n},Dziurwa:{name:"Dziurwa",id:1001086404203389018n},F53:{name:"F53",id:280411966126948353n},AutumnVN:{name:"AutumnVN",id:393694671383166998n},pylix:{name:"pylix",id:492949202121261067n},Tyler:{name:"\\\\GGTyler\\\\",id:143117463788191746n},RyanCaoDev:{name:"RyanCaoDev",id:952235800110694471n},FieryFlames:{name:"Fiery",id:890228870559698955n},KannaDev:{name:"Kanna",id:317728561106518019n},carince:{name:"carince",id:818323528755314698n},PandaNinjas:{name:"PandaNinjas",id:455128749071925248n},CatNoir:{name:"CatNoir",id:260371016348336128n},outfoxxed:{name:"outfoxxed",id:837425748435796060n},UwUDev:{name:"UwU",id:691413039156690994n},amia:{name:"amia",id:142007603549962240n},phil:{name:"phil",id:305288513941667851n},ImLvna:{name:"Luna <3",id:799319081723232267n},rad:{name:"rad",id:610945092504780823n},AndrewDLO:{name:"Andrew-DLO",id:434135504792059917n},HypedDomi:{name:"HypedDomi",id:354191516979429376n},Rini:{name:"Rini",id:1079479184478441643n},castdrian:{name:"castdrian",id:224617799434108928n},Arrow:{name:"arrow",id:958158495302176778n},bb010g:{name:"bb010g",id:72791153467990016n},Dolfies:{name:"Dolfies",id:852892297661906993n},RuukuLada:{name:"RuukuLada",id:119705748346241027n},blahajZip:{name:"blahaj.zip",id:683954422241427471n},archeruwu:{name:"archer_uwu",id:160068695383736320n},ProffDea:{name:"ProffDea",id:609329952180928513n},ant0n:{name:"ant0n",id:145224646868860928n},philipbry:{name:"philipbry",id:554994003318276106n},Korbo:{name:"Korbo",id:455856406420258827n},maisymoe:{name:"maisy",id:257109471589957632n},Mopi:{name:"Mopi",id:1022189106614243350n},Grzesiek11:{name:"Grzesiek11",id:368475654662127616n},Samwich:{name:"Samwich",id:976176454511509554n},coolelectronics:{name:"coolelectronics",id:696392247205298207n},Av32000:{name:"Av32000",id:593436735380127770n},Kyuuhachi:{name:"Kyuuhachi",id:236588665420251137n},Elvyra:{name:"Elvyra",id:708275751816003615n},Inbestigator:{name:"Inbestigator",id:761777382041714690n},newwares:{name:"newwares",id:421405303951851520n}}),Mi=(()=>Object.freeze(Object.fromEntries(Object.entries(m).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function Ii(e,t){for(let o in t){let r=t[o];typeof r=="object"&&!Array.isArray(r)?(e[o]??={},Ii(e[o],r)):e[o]??=r}return e}function Q(...e){return e.filter(Boolean).join(" ")}function Ko(e){return new Promise(t=>setTimeout(t,e))}function Ao(e,t="Copied to clipboard!"){Ft.SUPPORTS_COPY?Ft.copy(e):t="Your browser does not support copying to clipboard",X.show({message:t,id:X.genId(),type:X.Type.SUCCESS})}function qP(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Cs(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function zu(e){try{return new URL(e)}catch{return null}}function Rs(e){return e}var ju,KP,ks,we=g(()=>{"use strict";a();T();P();ju=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-o>=0)};KP=navigator.userAgent.includes("Mobi"),ks=e=>Object.hasOwn(Mi,e)});function st(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=W({value:o.fallbackValue,error:null,pending:!0});return se(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{!s||(i({value:l,error:null,pending:!1}),o.onSuccess?.(l))}).catch(l=>{!s||(i({value:null,error:l,pending:!1}),o.onError?.(l))}),()=>void(s=!1)},o.deps),[r.value,r.error,r.pending]}function Co(e){let t=wi(o=>o+1,0);return e?t:t[1]}function Ns({interval:e=1e3,deps:t=[]}){let[o,r]=W(0),i=Rt(()=>Date.now(),t);return se(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),o}var YP,Wu,lt=g(()=>{"use strict";a();T();we();Cu();YP=()=>null,Wu=(e=!1)=>{let t=U.useRef(null),[o,r]=W(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(ju(s)&&(r(!0),e)||(t.current=new IntersectionObserver(l=>{for(let c of l)c.target===s&&(c.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(c.isIntersecting))}),t.current.observe(s)))},o]}});var k1=g(()=>{});function Ro(e){return n("div",{...e,className:Q(e.className,"vc-error-card")},e.children)}var Pi=g(()=>{"use strict";a();k1();we()});var ZP,N1,D1,qu,_,le=g(()=>{"use strict";a();Ke();ot();lt();T();Pi();ZP="#e78284",N1=new oe("React ErrorBoundary",ZP),D1={},qu=bt(()=>class extends U.PureComponent{state={error:D1,stack:"",message:""};static getDerivedStateFromError(t){let o=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&o){let i=o.indexOf(` `);i!==-1&&(r=o.slice(0,i),o=o.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:o,message:r}}componentDidCatch(t,o){this.props.onError?.({error:t,errorInfo:o,props:this.props.wrappedProps}),N1.error(`A component threw an Error `,t),N1.error("Component Stack",o.componentStack)}render(){if(this.state.error===D1)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return n(this.props.fallback,{children:this.props.children,...this.state});let t=this.props.message||"An error occurred while rendering this Component. More info can be found below and in your console.";return n(Ro,{style:{overflow:"hidden"}},n("h1",null,"Oh no!"),n("p",null,t),n("code",null,this.state.message,!!this.state.stack&&n("pre",{className:j.top8},this.state.stack)))}});qu.wrap=(e,t)=>o=>n(qu,{...t,wrappedProps:o},n(e,{...o}));_=qu});function pl(){return n("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",width:"16",style:{marginRight:"0.5em",transform:"translateY(2px)"}},n("path",{fill:"#db61a2","fill-rule":"evenodd",d:"M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"}))}var Ku=g(()=>{"use strict";a()});function Ds(e){return n(k,{...e,look:k.Looks.LINK,color:k.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},n(pl,null),"Donate")}var Yu=g(()=>{"use strict";a();T();Ku()});function fe(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,n("div",{...e},e.children)}var Ut=g(()=>{"use strict";a()});function Hr(e,t){return dl.openModalLazy(e,t)}function de(e,t,o){return dl.openModal(e,t,o)}function xn(e,t){return dl.closeModal(e,t)}function dn(){return dl.closeAllModals()}var ko,Yo,Zu,ye,Le,ke,ct,pt,dl,Ze=g(()=>{"use strict";a();H();lt();ko=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(ko||{}),Yo=x("ModalRoot","ModalCloseButton"),Zu=Tn("ImageModal"),ye=bt(()=>Yo.ModalRoot),Le=bt(()=>Yo.ModalHeader),ke=bt(()=>Yo.ModalContent),ct=bt(()=>Yo.ModalFooter),pt=bt(()=>Yo.ModalCloseButton),dl=x("openModalLazy")});function y(e){return e}var I=g(()=>{"use strict";a()});async function L1(e=!1){Xu={};let t={};e&&(t.cache="no-cache"),Xu=await fetch("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var XP,JP,Xu,Ju,E1=g(()=>{"use strict";a();fl();Yu();le();Ut();Ku();P();ot();we();Ze();I();T();XP="https://vencord.dev/assets/favicon.png",JP={description:"Vencord Contributor",image:XP,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>ks(e.id),link:"https://github.com/Vendicated/Vencord"},Xu={};Ju=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[m.Megu,m.Ven,m.TheSun],required:!0,patches:[{find:"Messages.PROFILE_USER_BADGES,role:",replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...Vencord.Api.Badges._getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/,replace:"...$1.props,$& $1.image??"},{match:/(?<=text:(\i)\.description,spacing:12,)children:/,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick && { onClick: $1.onClick }),$&"}]}],toolboxActions:{async"Refetch Badges"(){await L1(!0),X.show({id:X.genId(),message:"Successfully refetched badges!",type:X.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(JP),await L1()},renderBadgeComponent:_.wrap(e=>{let t=e.component;return n(t,{...e})},{noop:!0}),getDonorBadges(e){return Xu[e]?.map(t=>({image:t.badge,description:t.tooltip,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let o=de(r=>n(_,{noop:!0,onError:()=>{xn(o),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},n(Yo.ModalRoot,{...r},n(Yo.ModalHeader,null,n(fe,{style:{width:"100%",justifyContent:"center"}},n(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},n(pl,null),"Vencord Donor"))),n(Yo.ModalContent,null,n(fe,null,n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),n("div",{style:{padding:"1em"}},n(S.FormText,null,"This Badge is a special perk for Vencord Donors"),n(S.FormText,{className:j.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),n(Yo.ModalFooter,null,n(fe,{style:{width:"100%",justifyContent:"center"}},n(Ds,null))))))}}))}})});var Qu,O1=g(()=>{"use strict";a();P();I();Qu=y({name:"ChatInputButtonAPI",description:"API to add buttons to the chat input",authors:[m.Ven],patches:[{find:'location:"ChannelTextAreaButtons"',replacement:{match:/if\(!\i\.isMobile\)\{(?=.+?&&(\i)\.push\(.{0,50}"gift")/,replace:"$&Vencord.Api.ChatButtons._injectButtons($1,arguments[0]);"}}]})});var Vu,_1=g(()=>{"use strict";a();P();I();Vu=y({name:"CommandsAPI",authors:[m.Arjix],description:"Api required by anything that uses commands",patches:[{find:',"tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(\i)\.execute\((\i),(\i)\)/,replace:(e,t,o,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${o}, ${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var ep,B1=g(()=>{"use strict";a();P();I();ep=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[m.Nuckyz,m.Ven,m.Kyuuhachi],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/(?=let{navId:)(?<=function \i\((\i)\).+?)/,replace:"$1=Vencord.Api.ContextMenu._usePatchContextMenu($1);"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var tp,F1=g(()=>{"use strict";a();P();I();tp=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[m.TheSun,m.Ven],patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/decorators:.{0,100}?children:\[/,replace:"$&...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)),"}]},{find:"PrivateChannel.renderAvatar",replacement:{match:/decorators:(\i\.isSystemDM\(\))\?(.+?):null/,replace:"decorators:[...Vencord.Api.MemberListDecorators.__getDecorators(arguments[0]), $1?$2:null]"}}]})});var op,U1=g(()=>{"use strict";a();P();I();op=y({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[m.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var np,$1=g(()=>{"use strict";a();P();I();np=y({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[m.TheSun],patches:[{find:'"Message Username"',replacement:{match:/\.Messages\.GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE.+?}\),\i(?=\])/,replace:"$&,...Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var rp,G1=g(()=>{"use strict";a();P();I();rp=y({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[m.Arjix,m.hunt,m.Ven],patches:[{find:".Messages.EDIT_TEXTAREA_HELP",replacement:{match:/(?<=,channel:\i\}\)\.then\().+?(?=return \i\.content!==this\.props\.message\.content&&\i\((.+?)\))/,replace:(e,t)=>`async ${e}if(await Vencord.Api.MessageEvents._handlePreEdit(${t}))return Promise.resolve({shoudClear:true,shouldRefocus:true});`}},{find:".handleSendMessage=",replacement:{match:/(type:this\.props\.chatInputType.+?\.then\()(\i=>\{.+?let (\i)=\i\.\i\.parse\((\i),.+?let (\i)=\i\.\i\.getSendMessageOptionsForReply\(\i\);)(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,o,r,i,s,l)=>`${t}async ${o}if(await Vencord.Api.MessageEvents._handlePreSend(${i}.id,${r},${l},${s}))return{shoudClear:true,shouldRefocus:true};`}},{find:'("interactionUsernameProfile',replacement:{match:/let\{id:\i}=(\i),{id:\i}=(\i);return \i\.useCallback\((\i)=>\{/,replace:(e,t,o,r)=>`const vcMsg=${t},vcChan=${o};${e}Vencord.Api.MessageEvents._handleClick(vcMsg, vcChan, ${r});`}}]})});var ip,H1=g(()=>{"use strict";a();P();I();ip=y({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[m.KingFish,m.Ven,m.Nuckyz],patches:[{find:"Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?(\i)\(\{key:"reply-other"/,replace:(e,t)=>{let o=e.match(/message:(.{1,3}),/)?.[1];if(!o)throw new Error("Could not find message variable");return`...Vencord.Api.MessagePopover._buildPopoverElements(${o},${t}),${e}`}}}]})});var sp,z1=g(()=>{"use strict";a();P();I();sp=y({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[m.Ven],required:!0,patches:[{find:'displayName="NoticeStore"',replacement:[{match:/\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,replace:"if(Vencord.Api.Notices.currentNotice)return false;$&"},{match:/(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,replace:'if($1.id=="VencordNotice")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&'}]}]})});var ap,j1=g(()=>{"use strict";a();P();I();ap=y({name:"ServerListAPI",authors:[m.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"Messages.DISCODO_DISABLED",replacement:{match:/(?<=Messages\.DISCODO_DISABLED.+?return)(\(.{0,75}?tutorialContainer.+?}\))(?=}function)/,replace:"[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))"}},{find:"Messages.SERVERS,children",replacement:{match:/(?<=Messages\.SERVERS,children:).+?default:return null\}\}\)/,replace:"Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"}}]})});var lp,W1=g(()=>{"use strict";a();P();I();lp=y({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[m.Cyn,m.Ven,m.Nuckyz,m.Arrow],required:!0,patches:[{find:"AnalyticsActionHandlers.handle",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:"window.DiscordSentry=",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS,",replacement:[{match:/this\._intervalId=/,replace:"this._intervalId=undefined&&"},{match:/(increment\(\i\){)/,replace:"$1return;"}]},{find:".installedLogHooks)",replacement:{match:"getDebugLogging(){",replace:"getDebugLogging(){return false;"}}]})});function lo(e,t=300){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>{e(...r)},t)}}var zr=g(()=>{"use strict";a()});var gl,q1=g(()=>{"use strict";a();gl=class{pathListeners=new Map;globalListeners=new Set;constructor(t,o={}){this.plain=t,this.store=this.makeProxy(t),Object.assign(this,o)}makeProxy(t,o=t,r=""){let i=this;return new Proxy(t,{get(s,l){let c=s[l];return!(l in s)&&i.getDefaultValue&&(c=i.getDefaultValue({target:s,key:l,root:o,path:r})),typeof c=="object"&&c!==null&&!Array.isArray(c)?i.makeProxy(c,o,`${r}${r&&"."}${l}`):c},set(s,l,c){if(s[l]===c)return!0;Reflect.set(s,l,c);let u=`${r}${r&&"."}${l}`;return i.globalListeners.forEach(p=>p(c,u)),i.pathListeners.get(u)?.forEach(p=>p(c)),!0}})}setData(t,o){if(this.readOnly)throw new Error("SettingsStore is read-only");if(this.plain=t,this.store=this.makeProxy(t),o){let r=t,i=o.split(".");for(let s of i){if(!r){console.warn(`Settings#setData: Path ${o} does not exist in new data. Not dispatching update`);return}r=r[s]}this.pathListeners.get(o)?.forEach(s=>s(r))}this.markAsChanged()}addGlobalChangeListener(t){this.globalListeners.add(t)}addChangeListener(t,o){let r=this.pathListeners.get(t)??new Set;r.add(o),this.pathListeners.set(t,r)}removeGlobalChangeListener(t){this.globalListeners.delete(t)}removeChangeListener(t,o){let r=this.pathListeners.get(t);!r||(r.delete(o),r.size||this.pathListeners.delete(t))}markAsChanged(){this.globalListeners.forEach(t=>t(this.plain,""))}}});var jr,hl=g(()=>{"use strict";a();({localStorage:jr}=window)});var vo,Wr=g(()=>{"use strict";a();vo=class{constructor(t=1/0){this.maxSize=t}queue=[];promise;next(){let t=this.queue.shift();t?this.promise=Promise.resolve().then(t).finally(()=>this.next()):this.promise=void 0}run(){this.promise||this.next()}push(t){this.size>=this.maxSize&&this.queue.shift(),this.queue.push(t),this.run()}unshift(t){this.size>=this.maxSize&&this.queue.pop(),this.queue.unshift(t),this.run()}get size(){return this.queue.length}}});var K1=g(()=>{});var yl,cp=g(()=>{"use strict";a();K1();$();le();we();T();yl=_.wrap(function({title:t,body:o,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:p,className:d,dismissOnClick:h}){let{timeout:v,position:b}=St(["notifications.timeout","notifications.position"]).notifications,M=Be([Is],()=>Is.isFocused()),[w,C]=W(!1),[R,A]=W(0),F=Rt(()=>Date.now(),[v,w,M]);se(()=>{if(w||!M||v===0||p)return void A(0);let Y=setInterval(()=>{let J=Date.now()-F;J>=v?c():A(J)},10);return()=>clearInterval(Y)},[v,w,M]);let z=R/v;return n("button",{className:Q("vc-notification-root",d),style:b==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),h!==!1&&c()},onContextMenu:Y=>{Y.preventDefault(),Y.stopPropagation(),c()},onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1)},n("div",{className:"vc-notification"},s&&n("img",{className:"vc-notification-icon",src:s,alt:""}),n("div",{className:"vc-notification-content"},n("div",{className:"vc-notification-header"},n("h2",{className:"vc-notification-title"},t),n("button",{className:"vc-notification-close-btn",onClick:Y=>{Y.preventDefault(),Y.stopPropagation(),c()}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},n("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),n("path",{fill:"currentColor",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"})))),n("div",null,r??n("p",{className:"vc-notification-p"},o)))),u&&n("img",{className:"vc-notification-img",src:u,alt:""}),v!==0&&!p&&n("div",{className:"vc-notification-progressbar",style:{width:`${(1-z)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var mn={};qe(mn,{clear:()=>tA,createStore:()=>Y1,del:()=>pp,delMany:()=>eA,entries:()=>rA,get:()=>dt,getMany:()=>VP,keys:()=>oA,promisifyRequest:()=>Zt,set:()=>kt,setMany:()=>QP,update:()=>qr,values:()=>nA});function Zt(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function Y1(e,t){let o=indexedDB.open(e);o.onupgradeneeded=()=>o.result.createObjectStore(t);let r=Zt(o);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function Zo(){return up||(up=Y1("VencordData","VencordStore")),up}function dt(e,t=Zo()){return t("readonly",o=>Zt(o.get(e)))}function kt(e,t,o=Zo()){return o("readwrite",r=>(r.put(t,e),Zt(r.transaction)))}function QP(e,t=Zo()){return t("readwrite",o=>(e.forEach(r=>o.put(r[1],r[0])),Zt(o.transaction)))}function VP(e,t=Zo()){return t("readonly",o=>Promise.all(e.map(r=>Zt(o.get(r)))))}function qr(e,t,o=Zo()){return o("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(Zt(r.transaction))}catch(l){s(l)}}}))}function pp(e,t=Zo()){return t("readwrite",o=>(o.delete(e),Zt(o.transaction)))}function eA(e,t=Zo()){return t("readwrite",o=>(e.forEach(r=>o.delete(r)),Zt(o.transaction)))}function tA(e=Zo()){return e("readwrite",t=>(t.clear(),Zt(t.transaction)))}function dp(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},Zt(e.transaction)}function oA(e=Zo()){return e("readonly",t=>{if(t.getAllKeys)return Zt(t.getAllKeys());let o=[];return dp(t,r=>o.push(r.key)).then(()=>o)})}function nA(e=Zo()){return e("readonly",t=>{if(t.getAll)return Zt(t.getAll());let o=[];return dp(t,r=>o.push(r.value)).then(()=>o)})}function rA(e=Zo()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([Zt(t.getAllKeys()),Zt(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let o=[];return e("readonly",r=>dp(r,i=>o.push([i.key,i.value])).then(()=>o))})}var up,Xo=g(()=>{"use strict";a();});var gp={};qe(gp,{classNameFactory:()=>ve,classNameToSelector:()=>X1,compileStyle:()=>fp,disableStyle:()=>Xt,enableStyle:()=>Nt,isStyleEnabled:()=>mp,requireStyle:()=>Ls,setStyleClassNames:()=>sA,styleMap:()=>Z1,toggleStyle:()=>iA});function Ls(e){let t=Z1.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function Nt(e){let t=Ls(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),fp(t),document.head.appendChild(t.dom),!0)}function Xt(e){let t=Ls(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var Z1,iA,mp,sA,fp,X1,ve,Qe=g(()=>{"use strict";a();Z1=window.VencordStyles??=new Map;iA=e=>mp(e)?Xt(e):Nt(e),mp=e=>Ls(e).dom?.isConnected??!1,sA=(e,t,o=!0)=>{let r=Ls(e);r.classNames=t,o&&mp(r.name)&&fp(r)},fp=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,o)=>{let r=e.classNames[o];return r?X1(r):t})},X1=(e,t="")=>e.split(" ").map(o=>`.${t}${o}`).join(""),ve=(e="")=>(...t)=>{let o=new Set;for(let r of t)r&&typeof r=="string"?o.add(r):Array.isArray(r)?r.forEach(i=>o.add(i)):r&&typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&o.add(i));return Array.from(o,r=>e+r).join(" ")}});var J1,Q1=g(()=>{a();J1=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,o)=>(o&=63,o<36?t+=o.toString(36):o<62?t+=(o-26).toString(36).toUpperCase():o>62?t+="-":t+="_",t),"")});async function ev(e){if(e.noPersist)return;let t=G.notifications.logLimit;t!==0&&(await qr(vl,o=>{let r=o??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:p,...d}=e;return r.unshift({...d,timestamp:Date.now(),id:J1()}),r.length>t&&t!==200&&(r.length=t),r}),Es.forEach(o=>o()))}async function aA(e){let t=await V1(),o=t.findIndex(r=>r.timestamp===e);o!==-1&&(t.splice(o,1),await kt(vl,t),Es.forEach(r=>r()))}function lA(){let[e,t]=wi(s=>s+1,0);se(()=>(Es.add(t),()=>void Es.delete(t)),[]);let[o,r,i]=st(V1,{fallbackValue:[],deps:[e]});return[o,i]}function cA({data:e}){let[t,o]=W(!1),r=U.useRef(null);return se(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),n("div",{className:Ai("wrapper",{removing:t}),ref:r},n(yl,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>aA(e.timestamp),200))},richBody:n("div",{className:Ai("body")},e.body,n(Po,{timestamp:new Date(e.timestamp),className:Ai("timestamp")}))}))}function uA({log:e,pending:t}){return!e.length&&!t?n("div",{className:Ai("container")},n("div",{className:Ai("empty")}),n(S.FormText,{style:{textAlign:"center"}},"No notifications yet")):n("div",{className:Ai("container")},e.map(o=>n(cA,{data:o,key:o.id})))}function pA({modalProps:e,close:t}){let[o,r]=lA();return n(ye,{...e,size:"large"},n(Le,null,n(V,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),n(pt,{onClick:t})),n(ke,null,n(uA,{log:o,pending:r})),n(ct,null,n(k,{disabled:o.length===0,onClick:()=>{et.show({title:"Are you sure?",body:`This will permanently remove ${o.length} notification${o.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await kt(vl,[]),Es.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function Sl(){let e=de(t=>n(pA,{modalProps:t,close:()=>xn(e)}))}var vl,V1,Ai,Es,bl=g(()=>{"use strict";a();Xo();$();Qe();Ze();lt();T();Q1();cp();vl="notification-log",V1=async()=>await dt(vl)??[],Ai=ve("vc-notification-log-"),Es=new Set});function fA(){if(!hp){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),hp=Or.createRoot(e)}return hp}function gA(e,t){let o=fA();return new Promise(r=>{o.render(n(yl,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),r()}}))})}function hA(){if(typeof Notification>"u")return!1;let{useNative:e}=G.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function tv(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function Fe(e){if(ev(e),hA()&&await tv()){let{title:t,body:o,icon:r,image:i,onClick:s=null,onClose:l=null}=e,c=new Notification(t,{body:o,icon:r,image:i});c.onclick=s,c.onclose=l}else dA.push(()=>gA(e,mA++))}var dA,hp,mA,ov=g(()=>{"use strict";a();$();Wr();T();cp();bl();dA=new vo,mA=42});var yp={};qe(yp,{requestPermission:()=>tv,showNotification:()=>Fe});var er=g(()=>{"use strict";a();ov()});function pv(e,t){return PA(e,t||{},0,0)}function dv(e,t){return xA(e,t)}var Jt,co,Tl,wl,xl,Tp,sv,av,lv,wp,cv,yA,nv,xp,Mn,He,fn,or,He,He,He,He,Bs,He,vA,SA,bA,TA,vp,Jo,Sp,Pp,uv,wA,tr,xA,In,Os,bp,Mp,rv,_s,Ip,iv,MA,Ap,IA,PA,AA,CA,mv=g(()=>{a();Jt=Uint8Array,co=Uint16Array,Tl=Uint32Array,wl=new Jt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),xl=new Jt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Tp=new Jt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),sv=function(e,t){for(var o=new co(31),r=0;r<31;++r)o[r]=t+=1<>>1|(He&21845)<<1,Mn=(Mn&52428)>>>2|(Mn&13107)<<2,Mn=(Mn&61680)>>>4|(Mn&3855)<<4,xp[He]=((Mn&65280)>>>8|(Mn&255)<<8)>>>1;fn=function(e,t,o){for(var r=e.length,i=0,s=new co(t);i>>u]=p}else for(c=new co(r),i=0;i>>15-e[i]);return c},or=new Jt(288);for(He=0;He<144;++He)or[He]=8;for(He=144;He<256;++He)or[He]=9;for(He=256;He<280;++He)or[He]=7;for(He=280;He<288;++He)or[He]=8;Bs=new Jt(32);for(He=0;He<32;++He)Bs[He]=5;vA=fn(or,9,0),SA=fn(or,9,1),bA=fn(Bs,5,0),TA=fn(Bs,5,1),vp=function(e){for(var t=e[0],o=1;ot&&(t=e[o]);return t},Jo=function(e,t,o){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&o},Sp=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},Pp=function(e){return(e+7)/8|0},uv=function(e,t,o){(t==null||t<0)&&(t=0),(o==null||o>e.length)&&(o=e.length);var r=new(e.BYTES_PER_ELEMENT==2?co:e.BYTES_PER_ELEMENT==4?Tl:Jt)(o-t);return r.set(e.subarray(t,o)),r},wA=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],tr=function(e,t,o){var r=new Error(t||wA[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,tr),!o)throw r;return r},xA=function(e,t,o){var r=e.length;if(!r||o&&o.f&&!o.l)return t||new Jt(0);var i=!t||o,s=!o||o.i;o||(o={}),t||(t=new Jt(r*3));var l=function(Pr){var Yn=t.length;if(Pr>Yn){var Zn=new Jt(Math.max(Yn*2,Pr));Zn.set(t),t=Zn}},c=o.f||0,u=o.p||0,p=o.b||0,d=o.l,h=o.d,v=o.m,b=o.n,M=r*8;do{if(!d){c=Jo(e,u,1);var w=Jo(e,u+1,3);if(u+=3,w)if(w==1)d=SA,h=TA,v=9,b=5;else if(w==2){var F=Jo(e,u,31)+257,z=Jo(e,u+10,15)+4,Y=F+Jo(e,u+5,31)+1;u+=14;for(var J=new Jt(Y),Z=new Jt(19),O=0;O>>4;if(C<16)J[O++]=C;else{var Ue=0,be=0;for(C==16?(be=3+Jo(e,u,3),u+=2,Ue=J[O-1]):C==17?(be=3+Jo(e,u,7),u+=3):C==18&&(be=11+Jo(e,u,127),u+=7);be--;)J[O++]=Ue}}var Me=J.subarray(0,F),De=J.subarray(F);v=vp(Me),b=vp(De),d=fn(Me,v,1),h=fn(De,b,1)}else tr(1);else{var C=Pp(u)+4,R=e[C-4]|e[C-3]<<8,A=C+R;if(A>r){s&&tr(0);break}i&&l(p+R),t.set(e.subarray(C,A),p),o.b=p+=R,o.p=u=A*8,o.f=c;continue}if(u>M){s&&tr(0);break}}i&&l(p+131072);for(var Oe=(1<>>4;if(u+=Ue&15,u>M){s&&tr(0);break}if(Ue||tr(2),At<256)t[p++]=At;else if(At==256){he=u,d=null;break}else{var at=At-254;if(At>264){var O=At-257,$e=wl[O];at=Jo(e,u,(1<<$e)-1)+lv[O],u+=$e}var ro=h[Sp(e,u)&Ae],Lt=ro>>>4;ro||tr(3),u+=ro&15;var De=yA[Lt];if(Lt>3){var $e=xl[Lt];De+=Sp(e,u)&(1<<$e)-1,u+=$e}if(u>M){s&&tr(0);break}i&&l(p+131072);for(var Ct=p+at;p>>8},Os=function(e,t,o){o<<=t&7;var r=t/8|0;e[r]|=o,e[r+1]|=o>>>8,e[r+2]|=o>>>16},bp=function(e,t){for(var o=[],r=0;rv&&(v=s[r].s);var b=new co(v+1),M=Mp(o[d-1],b,0);if(M>t){var r=0,w=0,C=M-t,R=1<t)w+=R-(1<>>=C;w>0;){var F=s[r].s;b[F]=0&&w;--r){var z=s[r].s;b[z]==t&&(--b[z],++w)}M=t}return[new Jt(b),M]},Mp=function(e,t,o){return e.s==-1?Math.max(Mp(e.l,t,o+1),Mp(e.r,t,o+1)):t[e.s]=o},rv=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new co(++t),r=0,i=e[0],s=1,l=function(u){o[r++]=u},c=1;c<=t;++c)if(e[c]==i&&c!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(i),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(i);s=1,i=e[c]}return[o.subarray(0,r),t]},_s=function(e,t){for(var o=0,r=0;r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s4&&!re[Tp[ue-1]];--ue);var Ue=p+5<<3,be=_s(i,or)+_s(s,Bs)+l,Me=_s(i,v)+_s(s,w)+l+14+3*ue+_s(Z,re)+(2*Z[16]+3*Z[17]+7*Z[18]);if(Ue<=be&&Ue<=Me)return Ip(t,d,e.subarray(u,u+p));var De,Oe,Ae,he;if(In(t,d,1+(Me15&&(In(t,d,ro[O]>>>5&127),d+=ro[O]>>>12)}}else De=vA,Oe=or,Ae=bA,he=Bs;for(var O=0;O255){var Lt=r[O]>>>18&31;Os(t,d,De[Lt+257]),d+=Oe[Lt+257],Lt>7&&(In(t,d,r[O]>>>23&31),d+=wl[Lt]);var Ct=r[O]&31;Os(t,d,Ae[Ct]),d+=he[Ct],Ct>3&&(Os(t,d,r[O]>>>5&8191),d+=xl[Ct])}else Os(t,d,De[r[O]]),d+=Oe[r[O]];return Os(t,d,De[256]),d+Oe[256]},MA=new Tl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ap=new Jt(0),IA=function(e,t,o,r,i,s){var l=e.length,c=new Jt(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),p=0;if(!t||l<8)for(var d=0;d<=l;d+=65535){var h=d+65535;h>=l&&(u[p>>3]=s),p=Ip(u,p+1,e.subarray(d,h))}else{for(var v=MA[t-1],b=v>>>13,M=v&8191,w=(1<7e3||re>24576)&&De>423){p=iv(e,u,0,Y,J,Z,te,re,ue,d-ue,p),re=O=te=0,ue=d;for(var Oe=0;Oe<286;++Oe)J[Oe]=0;for(var Oe=0;Oe<30;++Oe)Z[Oe]=0}var Ae=2,he=0,At=M,at=be-Me&32767;if(De>2&&Ue==z(d-at))for(var $e=Math.min(b,De)-1,ro=Math.min(32767,d),Lt=Math.min(258,De);at<=ro&&--At&&be!=Me;){if(e[d+Ae]==e[d+Ae-at]){for(var Ct=0;CtAe){if(Ae=Ct,he=at,Ct>$e)break;for(var Pr=Math.min(at,Ct-2),Yn=0,Oe=0;OeYn&&(Yn=zt,Me=Zn)}}}be=Me,Me=C[be],at+=be-Me+32768&32767}if(he){Y[re++]=268435456|wp[Ae]<<18|nv[he];var Cr=wp[Ae]&31,D=nv[he]&31;te+=wl[Cr]+xl[D],++J[257+Cr],++Z[D],Se=d+Ae,++O}else Y[re++]=e[d],++J[e[d]]}}p=iv(e,u,s,Y,J,Z,te,re,ue,d-ue,p),!s&&p&7&&(p=Ip(u,p+1,Ap))}return uv(c,0,r+Pp(p)+i)},PA=function(e,t,o,r,i){return IA(e,t.level==null?6:t.level,t.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):12+t.mem,o,r,!i)};AA=typeof TextDecoder<"u"&&new TextDecoder,CA=0;try{AA.decode(Ap,{stream:!0}),CA=1}catch{}});async function fv(){let e=await dt("Vencord_cloudSecret")??{},t=Cp();return e[t]?(await qr("Vencord_cloudSecret",o=>(o??={},o[`${t}:${Fs()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${Fs()}`]}async function RA(e){await qr("Vencord_cloudSecret",t=>(t??={},t[`${Cp()}:${Fs()}`]=e,t))}async function Rp(){await qr("Vencord_cloudSecret",e=>(e??={},delete e[`${Cp()}:${Fs()}`],e))}async function gv(){if(await fv()!==void 0){G.cloud.authenticated=!0;return}try{let o=await fetch(new URL("/v1/oauth/settings",nr()));var{clientId:e,redirectUri:t}=await o.json()}catch{Fe({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),G.cloud.authenticated=!1;return}de(o=>n(bs,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:r})=>{if(!r){G.cloud.authenticated=!1;return}try{let i=await fetch(r,{headers:{Accept:"application/json"}}),{secret:s}=await i.json();s?(Ml.info("Authorized with secret"),await RA(s),Fe({title:"Cloud Integration",body:"Cloud integrations enabled!"}),G.cloud.authenticated=!0):(Fe({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),G.cloud.authenticated=!1)}catch(i){Ml.error("Failed to authorize",i),Fe({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),G.cloud.authenticated=!1}}}))}async function Ci(){let e=await fv();return window.btoa(`${e}:${Fs()}`)}var Ml,nr,Cp,Fs,kp=g(()=>{"use strict";a();Xo();er();$();T();Ke();Ze();Ml=new oe("Cloud","#39b7e0"),nr=()=>new URL(G.cloud.url),Cp=()=>nr().origin,Fs=()=>{let e=E.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function So(){window.VesktopNative.app.relaunch()}function Il(e){window.VesktopNative.fileManager.showItemInFolder(e)}var rr=g(()=>{"use strict";a()});function Pl(e){let t=document.createElement("a");t.href=URL.createObjectURL(e),t.download=e.name,document.body.appendChild(t),t.click(),setImmediate(()=>{URL.revokeObjectURL(t.href),document.body.removeChild(t)})}function Al(e){return new Promise(t=>{let o=document.createElement("input");o.type="file",o.style.display="none",o.accept=e,o.onchange=async()=>{t(o.files?.[0]??null)},document.body.appendChild(o),o.click(),setImmediate(()=>document.body.removeChild(o))})}var Cl=g(()=>{"use strict";a()});async function hv(e){try{var t=JSON.parse(e)}catch(o){throw console.log(e),new Error("Failed to parse JSON: "+String(o))}if("settings"in t&&"quickCss"in t)Object.assign(Pn,t.settings),await VencordNative.settings.set(t.settings),await VencordNative.quickCss.set(t.quickCss);else throw new Error("Invalid Settings. Is this even a Vencord Settings file?")}async function yv({minify:e}={}){let t=VencordNative.settings.get(),o=await VencordNative.quickCss.get();return JSON.stringify({settings:t,quickCss:o},null,e?void 0:4)}async function vv(){let e="vencord-settings-backup.json",t=await yv(),o=new TextEncoder().encode(t);Pl(new File([o],e,{type:"application/json"}))}async function bv(e=!0){if(!1){if(t)try{}catch(o){}}else{let t=await Al("application/json");if(!t)return;let o=new FileReader;o.onload=async()=>{try{await hv(o.result),e&&kA()}catch(r){new oe("SettingsSync").error(r),e&&NA(r)}},o.readAsText(t)}}async function Ri(e){let t=await yv({minify:!0});try{let o=await fetch(new URL("/v1/settings",nr()),{method:"PUT",headers:{Authorization:await Ci(),"Content-Type":"application/octet-stream"},body:pv(new TextEncoder().encode(t))});if(!o.ok){Qo.error(`Failed to sync up, API returned ${o.status}`),Fe({title:"Cloud Settings",body:`Could not synchronize settings to cloud (API returned ${o.status}).`,color:"var(--red-360)"});return}let{written:r}=await o.json();Pn.cloud.settingsSyncVersion=r,VencordNative.settings.set(Pn),Qo.info("Settings uploaded to cloud successfully"),e&&Fe({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(o){Qo.error("Failed to sync up",o),Fe({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${o.toString()}).`,color:"var(--red-360)"})}}async function Rl(e=!0,t=!1){try{let o=await fetch(new URL("/v1/settings",nr()),{method:"GET",headers:{Authorization:await Ci(),Accept:"application/octet-stream","If-None-Match":G.cloud.settingsSyncVersion.toString()}});if(o.status===404)return Qo.info("No settings on the cloud"),e&&Fe({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(o.status===304)return Qo.info("Settings up to date"),e&&Fe({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!o.ok)return Qo.error(`Failed to sync down, API returned ${o.status}`),Fe({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (API returned ${o.status}).`,color:"var(--red-360)"}),!1;let r=Number(o.headers.get("etag")),i=G.cloud.settingsSyncVersion;if(!t&&r{"use strict";a();er();$();T();mv();kp();Ke();rr();Cl();Sv=(e,t)=>X.show({type:e,message:t,id:X.genId()}),kA=()=>Sv(X.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),NA=e=>Sv(X.Type.FAILURE,`Failed to import settings: ${String(e)}`);Qo=new oe("Cloud:Settings","#39b7e0")});var Dp={};qe(Dp,{PlainSettings:()=>Pn,Settings:()=>G,SettingsStore:()=>jt,definePluginSettings:()=>N,migratePluginSettings:()=>$s,useSettings:()=>St});function St(e){let[,t]=U.useReducer(()=>({}),{});return U.useEffect(()=>e?(e.forEach(o=>jt.addChangeListener(o,t)),()=>e.forEach(o=>jt.removeChangeListener(o,t))):(jt.addGlobalChangeListener(t),()=>jt.removeGlobalChangeListener(t)),[]),jt.store}function $s(e,...t){let{plugins:o}=jt.plain;if(!(e in o)){for(let r of t)if(r in o){DA.info(`Migrating settings from old name ${r} to ${e}`),o[e]=o[r],delete o[r],jt.markAsChanged();break}}}function N(e,t){let o={get store(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return G.plugins[o.pluginName]},use:r=>St(r?.map(i=>`plugins.${o.pluginName}.${i}`)).plugins[o.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return o}var DA,LA,Np,EA,jt,Pn,G,$=g(()=>{"use strict";a();zr();q1();hl();Ke();we();Us();I();T();Kr();DA=new oe("Settings"),LA={notifyAboutUpdates:!0,autoUpdate:!1,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],enabledThemes:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosVibrancyStyle:void 0,disableMinSize:!1,winNativeTitleBar:!1,plugins:{},notifications:{timeout:5e3,position:"bottom-right",useNative:"not-focused",logLimit:50},cloud:{authenticated:!1,url:"https://api.vencord.dev/",settingsSync:!1,settingsSyncVersion:0}},Np=VencordNative.settings.get();Ii(Np,LA);EA=lo(async()=>{G.cloud.settingsSync&&G.cloud.authenticated&&(await Ri(),delete jr.Vencord_settingsDirty)},6e4),jt=new gl(Np,{readOnly:!0,getDefaultValue({target:e,key:t,path:o}){let r=e[t];if(!ze)return r;if(o==="plugins"&&t in ze)return e[t]={enabled:ze[t].required??ze[t].enabledByDefault??!1};if(o.startsWith("plugins.")){let i=o.slice(8);if(i in ze){let s=ze[i].options?.[t];if(!s)return r;if("default"in s)return e[t]=s.default;if(s.type===4){let l=s.options.find(c=>c.default);return l&&(e[t]=l.value),l?.value}}}return r}});jt.addGlobalChangeListener((e,t)=>{jt.plain.cloud.settingsSyncVersion=Date.now(),jr.Vencord_settingsDirty=!0,EA(),VencordNative.settings.set(jt.plain,t)});Pn=Np,G=jt.store});var No,ki=g(()=>{a();No="ca18b6e"});var wv=g(()=>{});var xv=g(()=>{});var Ep={};qe(Ep,{UpdateLogger:()=>Yr,changes:()=>ir,checkForUpdates:()=>Di,getRepo:()=>Lp,isNewer:()=>Gs,isOutdated:()=>sr,maybePromptToUpdate:()=>Hs,update:()=>Li,updateError:()=>Ni});async function kl(e){let t=await e;if(t.ok)return t.value;throw Ni=t.error,t.error}async function Di(){return ir=await kl(VencordNative.updater.getUpdates()),ir.some(e=>e.hash===No)?(Gs=!0,sr=!1):sr=ir.length>0}async function Li(){if(!sr)return!0;let e=await kl(VencordNative.updater.update());if(e&&(sr=!1,!await kl(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Hs(e,t=!1){try{if(await Di()){let r=confirm(e);if(r&&Gs)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await Li(),So())}}catch(o){Yr.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}var Yr,sr,Gs,Ni,ir,Lp,Zr=g(()=>{"use strict";a();ki();Ke();rr();Yr=new oe("Updater","white"),sr=!1,Gs=!1;Lp=()=>kl(VencordNative.updater.getRepo())});function Mv(){Hs("Uh Oh! Failed to render this Page. However, there is an update available that might fix it. Would you like to update and restart now?")}var Iv=g(()=>{"use strict";a();Zr()});function Op(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}var _p=g(()=>{"use strict";a()});function Do({title:e,children:t}){return n(S.FormSection,null,n(V,{variant:"heading-lg/semibold",tag:"h2",className:j.bottom16},e),t)}function Lo(e,t){return _.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:OA})}var OA,ar=g(()=>{"use strict";a();wv();xv();le();Iv();ot();_p();T();OA=Op(Mv)});var Rv={};qe(Rv,{default:()=>UA});function _A(){let[e,,t]=st(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),o=St(),r=U.useMemo(()=>Math.random()>.5?Av:Cv,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=!1,c=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",note:"Requires a full restart"},{key:"frameless",title:"Disable the window frame",note:"Requires a full restart"},{key:"transparent",title:"Enable window transparency.",note:"You need a theme that supports transparency or this will do nothing. Will stop the window from being resizable. Requires a full restart"},i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},!1];return n(Do,{title:"Vencord Settings"},n(FA,{image:r}),n(S.FormSection,{title:"Quick Actions"},n(Tt,{className:Pv("quick-actions-card")},n(U.Fragment,null,n(k,{onClick:So,size:k.Sizes.SMALL},"Restart Client"),n(k,{onClick:()=>VencordNative.quickCss.openEditor(),size:k.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),n(k,{onClick:()=>Il(e),size:k.Sizes.SMALL,disabled:t},"Open Settings Folder"),n(k,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:k.Sizes.SMALL,disabled:t},"Open in GitHub")))),n(S.FormDivider,null),n(S.FormSection,{className:j.top16,title:"Settings",tag:"h5"},n(S.FormText,{className:j.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),c.map(u=>u&&n(wt,{key:u.key,value:o[u.key],onChange:p=>o[u.key]=p,note:u.note},u.title))),l&&n(f,null,n(S.FormTitle,{tag:"h5"},"Window vibrancy style (requires restart)"),n(Io,{className:j.bottom20,placeholder:"Window vibrancy style",options:[{label:"No vibrancy",value:void 0},{label:"Under Page (window tinting)",value:"under-page"},{label:"Content",value:"content"},{label:"Window",value:"window"},{label:"Selection",value:"selection"},{label:"Titlebar",value:"titlebar"},{label:"Header",value:"header"},{label:"Sidebar",value:"sidebar"},{label:"Tooltip",value:"tooltip"},{label:"Menu",value:"menu"},{label:"Popover",value:"popover"},{label:"Fullscreen UI (transparent but slightly muted)",value:"fullscreen-ui"},{label:"HUD (Most transparent)",value:"hud"}],select:u=>o.macosVibrancyStyle=u,isSelected:u=>o.macosVibrancyStyle===u,serialize:Rs})),typeof Notification<"u"&&n(BA,{settings:o.notifications}))}function BA({settings:e}){return n(f,null,n(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&n(Ro,{style:{padding:"1em"},className:j.bottom8},n(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),n(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),n(S.FormText,{className:j.bottom8},"Some plugins may show you notifications. These come in two styles:",n("ul",null,n("li",null,n("strong",null,"Vencord Notifications"),": These are in-app notifications"),n("li",null,n("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),n(Io,{placeholder:"Notification Style",options:[{label:"Only use Desktop notifications when Discord is not focused",value:"not-focused",default:!0},{label:"Always use Desktop notifications",value:"always"},{label:"Always use Vencord notifications",value:"never"}],closeOnSelect:!0,select:t=>e.useNative=t,isSelected:t=>t===e.useNative,serialize:Rs}),n(S.FormTitle,{tag:"h5",className:j.top16+" "+j.bottom8},"Notification Position"),n(Io,{isDisabled:e.useNative==="always",placeholder:"Notification Position",options:[{label:"Bottom Right",value:"bottom-right",default:!0},{label:"Top Right",value:"top-right"}],select:t=>e.position=t,isSelected:t=>t===e.position,serialize:Rs}),n(S.FormTitle,{tag:"h5",className:j.top16+" "+j.bottom8},"Notification Timeout"),n(S.FormText,{className:j.bottom16},"Set to 0s to never automatically time out"),n(Er,{disabled:e.useNative==="always",markers:[0,1e3,2500,5e3,1e4,2e4],minValue:0,maxValue:2e4,initialValue:e.timeout,onValueChange:t=>e.timeout=t,onValueRender:t=>(t/1e3).toFixed(2)+"s",onMarkerRender:t=>t/1e3+"s",stickToMarkers:!1}),n(S.FormTitle,{tag:"h5",className:j.top16+" "+j.bottom8},"Notification Log Limit"),n(S.FormText,{className:j.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",n("code",null,"0")," to disable Notification log and ",n("code",null,"\u221E")," to never automatically remove old Notifications"),n(Er,{markers:[0,25,50,75,100,200],minValue:0,maxValue:200,stickToMarkers:!0,initialValue:e.logLimit,onValueChange:t=>e.logLimit=t,onValueRender:t=>t===200?"\u221E":t,onMarkerRender:t=>t===200?"\u221E":t}),n(k,{onClick:Sl,disabled:e.logLimit===0},"Open Notification Log"))}function FA({image:e}){return n(Tt,{className:Pv("card","donate")},n("div",null,n(S.FormTitle,{tag:"h5"},"Support the Project"),n(S.FormText,null,"Please consider supporting the development of Vencord by donating!"),n(Ds,{style:{transform:"translateX(-1em)"}})),n("img",{role:"presentation",src:e,alt:"",height:128,style:{imageRendering:e===Cv?"pixelated":void 0,marginLeft:"auto",transform:e===Av?"rotate(10deg)":void 0}}))}var Pv,Av,Cv,UA,kv=g(()=>{"use strict";a();bl();$();Qe();Yu();Pi();ot();we();rr();lt();T();ar();Pv=ve("vc-settings-"),Av="https://cdn.discordapp.com/emojis/1026533090627174460.png",Cv="https://media.discordapp.net/stickers/1039992459209490513.png";UA=Lo(_A,"Vencord Settings")});var Nv=g(()=>{});var $p={};qe($p,{currentNotice:()=>zs,nextNotice:()=>Dv,noticesQueue:()=>Fp,popNotice:()=>Up,showNotice:()=>js});function Up(){Bp.dismiss()}function Dv(){zs=Fp.shift(),zs&&Bp.show(...zs,"VencordNotice")}function js(e,t,o){Fp.push(["GENERIC",e,t,o]),zs||Dv()}var Bp,Fp,zs,Nl=g(()=>{"use strict";a();H();gt(e=>e.show&&e.dismiss&&!e.suppressAll,e=>Bp=e);Fp=[],zs=null});var Lv=g(()=>{});function Qt({height:e=24,width:t=24,className:o,children:r,viewBox:i,...s}){return n("svg",{className:Q(o,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Ei({height:e=24,width:t=24,className:o}){return n(Qt,{height:e,width:t,className:Q(o,"vc-link-icon"),viewBox:"0 0 24 24"},n("g",{fill:"none","fill-rule":"evenodd"},n("path",{fill:"currentColor",d:"M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24zm2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z"}),n("rect",{width:t,height:e})))}function Dl(e){return n(Qt,{...e,className:Q(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},n("g",{fill:"currentColor"},n("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1z"}),n("path",{d:"M15 5H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"})))}function Xr(e){return n(Qt,{...e,className:Q(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},n("polygon",{fill:"currentColor",fillRule:"nonzero",points:"13 20 11 20 11 8 5.5 13.5 4.08 12.08 12 4.16 19.92 12.08 18.5 13.5 13 8"}))}function Jr(e){return n(Qt,{...e,className:Q(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"}))}function Ll(e){return n(Qt,{...e,className:Q(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",transform:"translate(2 2)",d:"M9,7 L11,7 L11,5 L9,5 L9,7 Z M10,18 C5.59,18 2,14.41 2,10 C2,5.59 5.59,2 10,2 C14.41,2 18,5.59 18,10 C18,14.41 14.41,18 10,18 L10,18 Z M10,4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16,4.4771525 0,10 C-1.33226763e-15,12.6521649 1.0535684,15.195704 2.92893219,17.0710678 C4.80429597,18.9464316 7.3478351,20 10,20 C12.6521649,20 15.195704,18.9464316 17.0710678,17.0710678 C18.9464316,15.195704 20,12.6521649 20,10 C20,7.3478351 18.9464316,4.80429597 17.0710678,2.92893219 C15.195704,1.0535684 12.6521649,2.22044605e-16 10,0 L10,4.4408921e-16 Z M9,15 L11,15 L11,9 L9,9 L9,15 L9,15 Z"}))}function Ev(e){return n(Qt,{"aria-label":Ye.Messages.GUILD_OWNER,...e,className:Q(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z"}))}function Ov(e){return n(Qt,{...e,className:Q(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M2 4.5C2 3.397 2.897 2.5 4 2.5H20C21.103 2.5 22 3.397 22 4.5V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5ZM13.2 14.3375V11.6C9.864 11.6 7.668 12.6625 6 15C6.672 11.6625 8.532 8.3375 13.2 7.6625V5L18 9.6625L13.2 14.3375Z"}))}function El(e){return n(Qt,{...e,className:Q(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Zm1-2h12l-3.75-5-3 4L9 13Zm-1 2V5v14Z"}))}function Ol(e){return n(Qt,{...e,className:Q(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m21 18.15-2-2V5H7.85l-2-2H19q.825 0 1.413.587Q21 4.175 21 5Zm-1.2 4.45L18.2 21H5q-.825 0-1.413-.587Q3 19.825 3 19V5.8L1.4 4.2l1.4-1.4 18.4 18.4ZM6 17l3-4 2.25 3 .825-1.1L5 7.825V19h11.175l-2-2Zm7.425-6.425ZM10.6 13.4Z"}))}function _v(e){return n(Qt,{...e,className:Q(e.className,"vc-microphone"),viewBox:"0 0 24 24"},n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V21H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1ZM12 4C11.2 4 11 4.66667 11 5V11C11 11.3333 11.2 12 12 12C12.8 12 13 11.3333 13 11V5C13 4.66667 12.8 4 12 4Z",fill:"currentColor"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V22H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1Z",fill:"currentColor"}))}function Bv(e){return n(Qt,{...e,className:Q(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},n("path",{clipRule:"evenodd",fill:"currentColor",d:"M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"}))}function Gp(e){return n(Qt,{...e,className:Q(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z"}))}function Oi(e){return n(Qt,{...e,className:Q(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),n("path",{fill:"currentColor",d:"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"}))}function Fv(e){return n(Qt,{...e,className:Q(e.className,"vc-plus-icon"),viewBox:"0 0 18 18"},n("polygon",{"fill-rule":"nonzero",fill:"currentColor",points:"15 10 10 10 10 15 8 15 8 10 3 10 3 8 8 8 8 3 10 3 10 8 15 8"}))}function Uv(e){return n(Qt,{...e,className:Q(e.className,"vc-no-entry-sign-icon"),viewBox:"0 0 24 24"},n("path",{d:"M0 0h24v24H0z",fill:"none"}),n("path",{fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"}))}var It=g(()=>{"use strict";a();Lv();we();T()});function $v(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function Ws(e,t,o=!1){let r=Fu.duration(e,t),i=KA.map(u=>({amount:r[u](),unit:u})),s=0;e:for(let u=0;uu==="days");if(l!==-1){let u=i[l],p=u.amount%7;p===0?i.splice(l,1):u.amount=p}let c="";for(;i.length;){let{amount:u,unit:p}=i.shift();c.length&&(c+=i.length?", ":" and "),(u>0||c.length)&&(c+=`${u} ${$v(p,u===1,o)}`)}return c.length?c:`0 ${$v(t,!1,o)}`}function YA(e,t=o=>o){let{length:o}=e;if(o===0)return"";if(o===1)return t(e[0]);let r="";for(let i=0;i2?r+=", ":o-i>1&&(r+=" and ");return r}function qs(e,t){let o="```";return`${o}${t||""} ${e.replaceAll("```","\\`\\`\\`")} ${o}`}var Hp,$A,GA,zp,HA,zA,jA,WA,qA,An,KA,Cn=g(()=>{"use strict";a();T();Hp=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),$A=e=>e.toLowerCase().split("_"),GA=e=>e.toLowerCase().split("-"),zp=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),HA=e=>e.toLowerCase().split(" "),zA=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),jA=e=>e.join("_").toUpperCase(),WA=e=>e.join("-").toLowerCase(),qA=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),An=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),KA=["years","months","weeks","days","hours","minutes","seconds"]});function Ks(){return`-${un.fromTimestamp(Date.now())}`}function ge(e,t){let o=ZA.createBotMessage({channelId:e,content:"",embeds:[]});return ao.receiveMessage(e,Ii(t,o)),t}function ht(e,t,o){return e.find(r=>r.name===t)?.value||o}var ZA,jp=g(()=>{"use strict";a();we();H();T();ZA=x("createBotMessage")});var Rn,Vo,Wp,_l=g(()=>{"use strict";a();Rn=(h=>(h[h.SUB_COMMAND=1]="SUB_COMMAND",h[h.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",h[h.STRING=3]="STRING",h[h.INTEGER=4]="INTEGER",h[h.BOOLEAN=5]="BOOLEAN",h[h.USER=6]="USER",h[h.CHANNEL=7]="CHANNEL",h[h.ROLE=8]="ROLE",h[h.MENTIONABLE=9]="MENTIONABLE",h[h.NUMBER=10]="NUMBER",h[h.ATTACHMENT=11]="ATTACHMENT",h))(Rn||{}),Vo=(s=>(s[s.BUILT_IN=0]="BUILT_IN",s[s.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",s[s.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",s[s.BOT=3]="BOT",s[s.PLACEHOLDER=4]="PLACEHOLDER",s))(Vo||{}),Wp=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(Wp||{})});var Yp={};qe(Yp,{ApplicationCommandInputType:()=>Vo,ApplicationCommandOptionType:()=>Rn,ApplicationCommandType:()=>Wp,BUILT_IN:()=>lr,OptionalMessageOption:()=>cr,RequiredMessageOption:()=>Ys,_handleCommand:()=>JA,_init:()=>XA,commands:()=>qp,findOption:()=>ht,generateId:()=>Ks,prepareOption:()=>Kp,registerCommand:()=>_i,sendBotMessage:()=>ge,unregisterCommand:()=>Zs});function Kp(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,r)=>{t===Gv?r[o]=cr:t===Hv&&(r[o]=Ys),t.choices?.forEach(i=>i.displayName||=i.name),Kp(r[o])}),e}function QA(e,t){e.options?.forEach(o=>{if(o.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...o,type:1,name:`${e.name} ${o.name}`,id:`${o.name}-${e.id}`,displayName:`${e.name} ${o.name}`,subCommandPath:[{name:o.name,type:o.type,displayName:o.name}],rootCommand:e};_i(r,t)})}function _i(e,t){if(!lr){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(lr.some(o=>o.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${lr.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,Kp(e),e.options?.[0]?.type===1){QA(e,t);return}qp[e.name]=e,lr.push(e)}function Zs(e){let t=lr.findIndex(o=>o.name===e);return t===-1?!1:(lr.splice(t,1),delete qp[e],!0)}var lr,qp,Gv,Hv,cr,Ys,XA,JA,uo=g(()=>{"use strict";a();Cn();jp();_l();jp();_l();qp={},Gv=Symbol("OptionalMessageOption"),Hv=Symbol("RequiredMessageOption"),cr=Gv,Ys=Hv,XA=function(e){try{lr=e,cr=e.find(t=>t.name==="shrug").options[0],Ys=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},JA=function(e,t,o){if(!e.isVencordCommand)return e.execute(t,o);let r=i=>{let s=`An Error occurred while executing command "${e.name}"`,l=i instanceof Error?i.stack||i.message:String(i);console.error(s,i),ge(o.channel.id,{content:`${s}: ${qs(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,o);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});function zv({text:e,color:t}){return n("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var Zp=g(()=>{"use strict";a()});function jv({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=U.useState(l??!1),[p,d]=U.useState(null);U.useEffect(()=>{s(p!==null)},[p]);function h(v){let b=e.isValid?.call(o,v)??!0;typeof b=="string"?d(b):b?(d(null),u(v),i(v)):d("Invalid input provided.")}return n(S.FormSection,null,n(wt,{value:c,onChange:h,note:e.description,disabled:e.disabled?.call(o)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},An(Hp(r))),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var Wv=g(()=>{"use strict";a();Cn();T()});function qv({option:e,onChange:t,onError:o}){return e.component({setValue:t,setError:o,option:e})}var Kv=g(()=>{"use strict";a()});function Xp({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){function l(v){return e.type===2?BigInt(v):Number(v)}let[c,u]=U.useState(`${t[r]??e.default??0}`),[p,d]=U.useState(null);U.useEffect(()=>{s(p!==null)},[p]);function h(v){let b=e.isValid?.call(o,v)??!0;d(null),typeof b=="string"?d(b):b||d("Invalid input provided."),e.type===1&&BigInt(v)>=VA?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(v))):(u(v),i(l(v)))}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(Je,{type:"number",pattern:"-?[0-9]+",value:c,onChange:h,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(o)??!1,...e.componentProps}),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var VA,Yv=g(()=>{"use strict";a();I();T();VA=BigInt(Number.MAX_SAFE_INTEGER)});function Zv({option:e,pluginSettings:t,definedSettings:o,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(v=>v.default)?.value,[c,u]=U.useState(l??null),[p,d]=U.useState(null);U.useEffect(()=>{i(p!==null)},[p]);function h(v){let b=e.isValid?.call(o,v)??!0;typeof b=="string"?d(b):b?(d(null),u(v),r(v)):d("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(Io,{isDisabled:e.disabled?.call(o)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:h,isSelected:v=>v===c,serialize:v=>String(v),...e.componentProps}),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var Xv=g(()=>{"use strict";a();T()});function en(e,t,o=1){let r=[];for(let i=e;i<=t;i+=o)r.push(Math.round(i*100)/100);return r}function Jv({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=U.useState(null);U.useEffect(()=>{s(c!==null)},[c]);function p(d){let h=e.isValid?.call(o,d)??!0;typeof h=="string"?u(h):h?(u(null),i(d)):u("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(Er,{disabled:e.disabled?.call(o)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:p,onValueRender:d=>String(d.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Jp=g(()=>{"use strict";a();T()});function Qv({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let[l,c]=U.useState(t[r]??e.default??null),[u,p]=U.useState(null);U.useEffect(()=>{s(u!==null)},[u]);function d(h){let v=e.isValid?.call(o,h)??!0;p(typeof v=="string"?v:v?null:"Invalid input provided."),c(h),i(h)}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(Je,{type:"text",value:l,onChange:d,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(o)??!1,...e.componentProps}),u&&n(S.FormText,{style:{color:"var(--text-danger)"}},u))}var Vv=g(()=>{"use strict";a();T()});var Xs=g(()=>{"use strict";a();Zp();Wv();Kv();Yv();Xv();Jp();Vv()});var e0=g(()=>{});async function Qr(e){let{invite:t}=await Gu.resolveInvite(e,"Desktop Modal");if(!t)throw new Error("Invalid invite: "+e);return B.dispatch({type:"INVITE_MODAL_OPEN",invite:t,code:e,context:"APP"}),new Promise(o=>{let r,i,s=!1;B.subscribe("INVITE_ACCEPT",i=()=>{s=!0}),B.subscribe("INVITE_MODAL_CLOSE",r=()=>{B.unsubscribe("INVITE_MODAL_CLOSE",r),B.unsubscribe("INVITE_ACCEPT",i),o(s)})})}function Bi(){return ee.getChannel(Ie.getChannelId())}function Js(){return ae.getGuild(Bi()?.guild_id)}function eC(e){Ms.openPrivateChannel(e)}function Fi(){return ws.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function kn(e){Wo.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function tC(e,t,o,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return ao.sendMessage(e,i,o,r)}function tn(e,t){return de(o=>n(ye,{...o,className:tl.modal,size:"dynamic"},n(Zu,{className:tl.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>n(Vn,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function bo(e){if(!await Bt.getUser(e))throw new Error("No such user: "+e);let o=yo.getGuildId();$u.openUserProfileModal({userId:e,guildId:o,channelId:Ie.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Qp(e,t){let o=ho.getUserProfile(e);if(o)return o;B.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await _t.get({url:`/users/${e}/profile`,query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return B.dispatch({type:"USER_UPDATE",user:r.user}),await B.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&B.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),ho.getUserProfile(e)}function Nn(e){return e.discriminator==="0"?e.username:e.tag}var Bl,mt=g(()=>{"use strict";a();T();Ze();Bl=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(Bl||{})});function t0(e){de(t=>n(ye,{...t},n(_,null,n(ke,{className:Ui("root")},n(lC,{user:e})))))}function sC(){let e=Fi()===2?rC:iC;return n("img",{src:e,alt:"GitHub"})}function aC(){let e=Fi()===2?nC:oC;return n("img",{src:e,alt:"Website"})}function lC({user:e}){St();let t=Be([ho],()=>ho.getUserProfile(e.id));se(()=>{!t&&!e.bot&&e.id&&Qp(e.id)},[e.id]);let o=t?.connectedAccounts?.find(s=>s.type==="github")?.name,r=t?.connectedAccounts?.find(s=>s.type==="domain")?.name,i=Rt(()=>{let s=Object.values(ze);return(Mi[e.id]?s.filter(c=>c.authors.includes(Mi[e.id])):s.filter(c=>c.authors.some(u=>u.name===e.username))).filter(c=>!c.name.endsWith("API")).sort((c,u)=>Number(c.required??!1)-Number(u.required??!1))},[e.id,e.username]);return n(f,null,n("div",{className:Ui("header")},n("img",{className:Ui("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),n(S.FormTitle,{tag:"h2",className:Ui("name")},e.username),n("div",{className:Ui("links")},r&&n(Vn,{href:"https://"+r},n(aC,null)),o&&n(Vn,{href:`https://github.com/${o}`},n(sC,null)))),n("div",{className:Ui("plugins")},i.map(s=>n(Fl,{key:s.name,plugin:s,disabled:s.required??!1,onRestartNeeded:()=>Mt("Restart to apply changes!")}))))}var oC,nC,rC,iC,Ui,o0=g(()=>{"use strict";a();e0();$();Qe();le();P();mt();Ze();T();Kr();Vp();oC="/assets/e1e96d89e192de1997f73730db26e94f.svg",nC="/assets/730f58bcfd5a57a5e22460c445a0c6cf.svg",rC="/assets/3ff98ad75ac94fa883af5ed62d17c459.svg",iC="/assets/6a853b4c87fce386cbfef4a2efbacb09.svg",Ui=ve("vc-author-modal-")});function n0(e){let t=new uC({username:e.username,id:e.id??Ks(),avatar:e.avatar,bot:!0});return B.dispatch({type:"USER_UPDATE",user:t}),t}function Qs({plugin:e,onRestartNeeded:t,onClose:o,transitionState:r}){let[i,s]=U.useState([]),l=St().plugins[e.name],[c,u]=U.useState({}),[p,d]=U.useState({}),[h,v]=U.useState(null),b=()=>Object.values(p).every(A=>!A),M=Boolean(l&&e.options&&!Cs(e.options));U.useEffect(()=>{(async()=>{for(let A of e.authors.slice(0,6)){let F=A.id?await Bt.getUser(`${A.id}`).catch(()=>n0({username:A.name})):n0({username:A.name});s(z=>[...z,F])}})()},[]);async function w(){if(!e.options){o();return}if(e.beforeSave){let F=await Promise.resolve(e.beforeSave(c));if(F!==!0){v(F);return}}let A=!1;for(let[F,z]of Object.entries(c)){let Y=e.options[F];l[F]=z,Y?.onChange?.(z),Y?.restartNeeded&&(A=!0)}A&&t(),o()}function C(){if(!M||!e.options)return n(S.FormText,null,"There are no settings for this plugin.");{let A=Object.entries(e.options).map(([F,z])=>{if(z.hidden)return null;function Y(O){u(te=>({...te,[F]:O}))}function J(O){d(te=>({...te,[F]:O}))}let Z=pC[z.type];return n(Z,{id:F,key:F,option:z,onChange:Y,onError:J,pluginSettings:l,definedSettings:e.settings})});return n(fe,{flexDirection:"column",style:{gap:12,marginBottom:16}},A)}}function R(A,F){let z=e.authors.length-F,Y=e.authors.length-z,J=Y+e.authors.length-F;return n(ne,{text:e.authors.slice(Y,J).map(Z=>Z.name).join(", ")},({onMouseEnter:Z,onMouseLeave:O})=>n("div",{className:ed.moreUsers,onMouseEnter:Z,onMouseLeave:O},"+",z))}return n(ye,{transitionState:r,size:"medium",className:"vc-text-selectable"},n(Le,{separator:!1},n(V,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),n(pt,{onClick:o})),n(ke,null,n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"About ",e.name),n(S.FormText,null,e.description),n(S.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),n("div",{style:{width:"fit-content",marginBottom:8}},n(cC,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:R,renderUser:A=>n(bi,{className:ed.clickableAvatar,onClick:()=>t0(A)},n("img",{className:ed.avatar,src:A.getAvatarURL(void 0,80,!0),alt:A.username,title:A.username}))}))),!!e.settingsAboutComponent&&n("div",{className:Q(j.bottom8,"vc-text-selectable")},n(S.FormSection,null,n(_,{message:"An error occurred while rendering this plugin's custom InfoComponent"},n(e.settingsAboutComponent,{tempSettings:c})))),n(S.FormSection,{className:j.bottom16},n(S.FormTitle,{tag:"h3"},"Settings"),C())),M&&n(ct,null,n(fe,{flexDirection:"column",style:{width:"100%"}},n(fe,{style:{marginLeft:"auto"}},n(k,{onClick:o,size:k.Sizes.SMALL,color:k.Colors.PRIMARY,look:k.Looks.LINK},"Cancel"),n(ne,{text:"You must fix all errors before saving",shouldShow:!b()},({onMouseEnter:A,onMouseLeave:F})=>n(k,{size:k.Sizes.SMALL,color:k.Colors.BRAND,onClick:w,onMouseEnter:A,onMouseLeave:F,disabled:!b()},"Save & Close"))),h&&n(V,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",h))))}var cC,ed,uC,pC,td=g(()=>{"use strict";a();uo();$();le();Ut();Uo();ot();we();Ze();I();H();T();Xs();o0();cC=Ne("defaultRenderUser","showDefaultAvatarsForNullUsers"),ed=x("moreUsers","emptyUser","avatarContainer","clickableAvatar"),uC=Ot(()=>E.getCurrentUser().constructor);pC={[0]:Qv,[1]:Xp,[2]:Xp,[3]:jv,[4]:Zv,[5]:Jv,[6]:qv}});var r0=g(()=>{});var i0=g(()=>{});function s0({checked:e,onChange:t,disabled:o}){return n("div",null,n("div",{className:Q(Ul.container,"default-colors",e?Ul.checked:void 0),style:{backgroundColor:e?od:nd,opacity:o?.3:1}},n("svg",{className:Ul.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},n("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),n("svg",{viewBox:"0 0 20 20",fill:"none"},e?n(f,null,n("path",{fill:od,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),n("path",{fill:od,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):n(f,null,n("path",{fill:nd,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),n("path",{fill:nd,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),n("input",{disabled:o,type:"checkbox",className:Ul.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var od,nd,Ul,a0=g(()=>{"use strict";a();i0();we();H();od="var(--green-360)",nd="var(--primary-400)",Ul=x("slider","input","container")});function $l({disabled:e,isNew:t,name:o,infoButton:r,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:p,onMouseLeave:d}){return n("div",{className:$i("card",{"card-disabled":e}),onMouseEnter:p,onMouseLeave:d},n("div",{className:$i("header")},n("div",{className:$i("name-author")},n(V,{variant:"text-md/bold",className:$i("name")},o,t&&n(zv,{text:"NEW",color:"#ED4245"})),!!s&&n(V,{variant:"text-md/normal",className:$i("author")},s)),r,n(s0,{checked:l,onChange:c,disabled:e})),n(V,{className:$i("note"),variant:"text-sm/normal"},u),i)}var $i,rd=g(()=>{"use strict";a();r0();Qe();Zp();a0();T();$i=ve("vc-addon-")});var Vs,id=g(()=>{"use strict";a();Vs=class{set=new Set;get changeCount(){return this.set.size}get hasChanges(){return this.changeCount>0}handleChange(t){this.set.delete(t)||this.set.add(t)}add(t){return this.set.add(t)}remove(t){return this.set.delete(t)}getChanges(){return this.set.values()}map(t){return[...this.getChanges()].map(t)}}});var cd={};qe(cd,{_usePatchContextMenu:()=>fC,addContextMenuPatch:()=>ad,addGlobalContextMenuPatch:()=>dC,findGroupChildrenByChildId:()=>ut,globalPatches:()=>Gl,navPatches:()=>ea,removeContextMenuPatch:()=>ld,removeGlobalContextMenuPatch:()=>mC});function ad(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let r=ea.get(o);r||(r=new Set,ea.set(o,r)),r.add(t)}}function dC(e){Gl.add(e)}function ld(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>ea.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function mC(e){return Gl.delete(e)}function ut(e,t){for(let o of t){if(o==null)continue;if(Array.isArray(o)){let i=ut(e,o);if(i!==null)return i}if(Array.isArray(e)&&e.some(i=>o.props?.id===i)||o.props?.id===e)return t;let r=o.props?.children;if(r){Array.isArray(r)||(r=[r],o.props.children=r);let i=ut(e,r);if(i!==null)return i}}return null}function fC(e){e={...e,children:sd(e.children)},e.contextMenuApiArguments??=[];let t=ea.get(e.navId);if(Array.isArray(e.children)||(e.children=[e.children]),t)for(let o of t)try{o(e.children,...e.contextMenuApiArguments)}catch(r){l0.error(`Patch for ${e.navId} errored,`,r)}for(let o of Gl)try{o(e.navId,e.children,...e.contextMenuApiArguments)}catch(r){l0.error("Global patch errored,",r)}return e}function sd(e){return Array.isArray(e)?e.map(sd):(U.isValidElement(e)&&(e=U.cloneElement(e),e?.props?.children&&(e.type!==L.MenuControlItem||e.type===L.MenuControlItem&&e.props.control!=null)&&(e.props.children=sd(e.props.children))),e)}var l0,ea,Gl,Eo=g(()=>{"use strict";a();Ke();T();l0=new oe("ContextMenu"),ea=new Map,Gl=new Set});var md={};qe(md,{PMLogger:()=>gC,isPluginEnabled:()=>pd,patches:()=>c0,plugins:()=>hC,startAllPlugins:()=>ta,startDependenciesRecursive:()=>zl,startPlugin:()=>oa,stopPlugin:()=>dd});function pd(e){return(ze[e]?.required||ze[e]?.isDependency||ud[e]?.enabled)??!1}function zl(e){let t=!1,o=[];return e.dependencies?.forEach(r=>{if(!G.plugins[r].enabled){if(zl(ze[r]),G.plugins[r].enabled=!0,ze[r].patches){po.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}oa(ze[r])||o.push(r)}}),{restartNeeded:t,failures:o}}var po,gC,hC,c0,ud,u0,ta,oa,dd,jl=g(()=>{"use strict";a();uo();Eo();$();Ke();I();T();Kr();Xa();po=new oe("PluginManager","#a6d189"),gC=po,hC=ze,c0=[],ud=G.plugins;u0=Object.values(ze);for(let e of u0)ud[e.name]?.enabled&&e.dependencies?.forEach(t=>{let o=ze[t];if(o)ud[t].enabled=!0,o.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);po.warn(r)}});for(let e of u0){if(e.settings){e.settings.pluginName=e.name,e.options??={};for(let[t,o]of Object.entries(e.settings.def)){let r=e.settings.checks?.[t];e.options[t]={...o,...r}}}if(e.patches&&pd(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),c0.push(t)}ta=an("startAllPlugins",function(t){po.info(`Starting plugins (stage ${t})`);for(let o in ze)if(pd(o)){if((ze[o].startAt??"WebpackReady")!==t)continue;oa(ze[o])}});oa=an("startPlugin",function(t){let{name:o,commands:r,flux:i,contextMenus:s}=t;if(t.start){if(po.info("Starting plugin",o),t.started)return po.warn(`${o} already started`),!1;try{t.start(),t.started=!0}catch(l){return po.error(`Failed to start ${o} `,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(`Failed to register command ${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} already stopped`),!1;try{t.stop(),t.started=!1}catch(l){return po.error(`Failed to stop ${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(`Failed to unregister command ${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(`Failed to start dependencies for ${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=`Error while ${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===i.status,closeOnSelect:!0}))),n(S.FormTitle,{className:j.top20},"Plugins"),n("div",{className:Vr("grid")},d),n(S.FormDivider,{className:j.top20}),n(S.FormTitle,{tag:"h5",className:Q(j.top20,j.bottom8)},"Required Plugins"),n("div",{className:Vr("grid")},h))}function bC(e){return n(U.Fragment,null,n(S.FormText,null,"This plugin is required by:"),e.map(t=>n(S.FormText,{className:Vr("dep-text")},t)))}var Vr,p0,d0,yC,Vp=g(()=>{"use strict";a();Nv();Xo();Nl();$();Qe();It();td();rd();ar();id();Ke();ot();we();Ze();lt();H();T();Kr();jl();Vr=ve("vc-plugins-"),p0=new oe("PluginSettings","#a6d189"),d0=x("inputDefault","inputWrapper"),yC=x("button","disabled","enabled")});var m0={};qe(m0,{default:()=>TC});var TC,f0=g(()=>{"use strict";a();Vp();ar();TC=Lo(fd,"Plugins")});function je(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),n("a",{role:"link",target:"_blank",...e},e.children)}var To=g(()=>{"use strict";a()});var g0={};qe(g0,{default:()=>CC});function MC({link:e}){let[t,o,r]=st(()=>fetch(e).then(s=>{if(s.status>300)throw`${s.status} ${s.statusText}`;let l=s.headers.get("Content-Type");if(!l?.startsWith("text/css")&&!l?.startsWith("text/plain"))throw"Not a CSS file. Remember to use the raw link!";return"Okay!"})),i=r?"Checking...":o?`Error: ${o instanceof Error?o.message:String(o)}`:"Valid!";return n(S.FormText,{style:{color:r?"var(--text-muted)":o?"var(--text-danger)":"var(--text-positive)"}},i)}function IC({themeLinks:e}){return e.length?n(f,null,n(S.FormTitle,{className:j.top20,tag:"h5"},"Validator"),n(S.FormText,null,"This section will tell you whether your themes can successfully be loaded"),n("div",null,e.map(t=>n(Tt,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},n(S.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),n(MC,{link:t}))))):null}function PC({theme:e,enabled:t,onChange:o,onDelete:r}){return n($l,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:o,infoButton:!1,footer:n(fe,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&n(je,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&n(je,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault(),e.invite!=null&&Qr(e.invite).catch(()=>Mt("Invalid or expired invite"))}},"Discord Server"))})}function AC(){let e=St(["themeLinks","enabledThemes"]),t=xt(null),[o,r]=W(0),[i,s]=W(e.themeLinks.join(` `)),[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. Please install it and try again`;else{var o=`An error occurred while running \`${l}\`: `;o+=c||`Code \`${i}\`. See the console for more info`}}else var o="An unknown error occurred. See the console for more info.";else var o=`An unknown error occurred (error is undefined). Please try again.`;et.show({title:"Oops!",body:n(Ro,null,o.split(` `).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":`There are ${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(`Failed to erase data, API returned ${e.status}`),Fe({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,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.authenticated,value:e.settingsSync,onChange:o=>{e.settingsSync=o}},"Settings Sync"),n("div",{className:"vc-cloud-settings-sync-grid"},n(k,{size:k.Sizes.SMALL,disabled:!t,onClick:()=>Ri(!0)},"Sync to Cloud"),n(ne,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:o,onMouseEnter:r})=>n(k,{onMouseLeave:o,onMouseEnter:r,size:k.Sizes.SMALL,color:k.Colors.RED,disabled:!t,onClick:()=>Rl(!0,!0)},"Sync from Cloud")),n(k,{size:k.Sizes.SMALL,color:k.Colors.RED,disabled:!t,onClick:()=>Tv()},"Delete Cloud Settings")))}function _C(){let e=St(["cloud.authenticated","cloud.url"]);return n(Do,{title:"Vencord Cloud"},n(S.FormSection,{title:"Cloud Settings",className:j.top16},n(S.FormText,{variant:"text-md/normal",className:j.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",n(je,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",n(je,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),n(wt,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&gv(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),n(S.FormTitle,{tag:"h5"},"Backend URL"),n(S.FormText,{className:j.bottom8},"Which backend to use when using cloud integrations."),n(Wl,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,Rp()},validate:LC}),n(k,{className:j.top8,size:k.Sizes.MEDIUM,color:k.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>et.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:EC,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),n(S.FormDivider,{className:j.top16})),n(OC,null))}var BC,x0=g(()=>{"use strict";a();er();$();gd();To();kp();ot();Us();T();ar();BC=Lo(_C,"Cloud")});var M0={};qe(M0,{default:()=>UC});function FC(){return n(Do,{title:"Backup & Restore"},n(Tt,{className:Q("vc-settings-card","vc-backup-restore-card")},n(fe,{flexDirection:"column"},n("strong",null,"Warning"),n("span",null,"Importing a settings file will overwrite your current settings."))),n(V,{variant:"text-md/normal",className:j.bottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),n(V,{variant:"text-md/normal",className:j.bottom8},"Settings Export contains:",n("ul",null,n("li",null,"\u2014 Custom QuickCSS"),n("li",null,"\u2014 Theme Links"),n("li",null,"\u2014 Plugin Settings"))),n(fe,null,n(k,{onClick:()=>bv(),size:k.Sizes.SMALL},"Import Settings"),n(k,{onClick:vv,size:k.Sizes.SMALL},"Export Settings")))}var UC,I0=g(()=>{"use strict";a();Ut();ot();we();Us();T();ar();UC=Lo(FC,"Backup & Restore")});var na,hd=g(()=>{"use strict";a();$();P();I();ki();na=y({name:"Settings",description:"Adds Settings UI and debug info",authors:[m.Ven,m.Megu],required:!0,patches:[{find:".versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,o)=>(o=o.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t}, ${o})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(G.plugins.Settings.settingsLocation){case"top":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.APP_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(\i\.\i)\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(\i\.\i)\.CUSTOM,\s*element:.+?}/;case"aboveActivity":default:return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.ACTIVITY_SETTINGS\}/}},replace:"...$self.makeSettingsCategories($1),$&"}},{find:"Messages.USER_SETTINGS_ACTIONS_MENU_LABEL",replacement:{match:/(?<=function\((\i),\i\)\{)(?=let \i=Object.values\(\i.UserSettingsSections\).*?(\i)\.default\.open\()/,replace:"$2.default.open($1);return;"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:(kv(),Xn(Rv)).default,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:(f0(),Xn(m0)).default,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:(h0(),Xn(g0)).default,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:(T0(),Xn(b0)).default,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:(x0(),Xn(w0)).default,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:(I0(),Xn(M0)).default,className:"vc-backup-restore"},!1,...this.customSections.map(t=>t(e)),{section:e.DIVIDER}].filter(Boolean)},options:{settingsLocation:{type:4,description:"Where to put the Vencord settings section",options:[{label:"At the very top",value:"top"},{label:"Above the Nitro section",value:"aboveNitro"},{label:"Below the Nitro section",value:"belowNitro"},{label:"Above Activity Settings",value:"aboveActivity",default:!0},{label:"Below Activity Settings",value:"belowActivity"},{label:"At the very bottom",value:"bottom"}],restartNeeded:!0}},get electronVersion(){return VencordNative.native.getVersions().electron||window.armcord?.electron||null},get chromiumVersion(){try{return VencordNative.native.getVersions().chrome||navigator.userAgentData?.brands?.find(e=>e.brand==="Chromium"||e.brand==="Google Chrome")?.version||null}catch{return null}},get additionalInfo(){return` (Vesktop v${VesktopNative.app.getVersion()})`},makeInfoElements(e,t){let{electronVersion:o,chromiumVersion:r,additionalInfo:i}=this;return n(f,null,n(e,{...t},"Vencord ",No,i),o&&n(e,{...t},"Electron ",o),r&&n(e,{...t},"Chromium ",r))}})});var P0,$C,yd,A0=g(()=>{"use strict";a();ei();P();we();Cn();I();Zr();T();ki();Kr();hd();P0="Vencord-SupportHelper-Dismiss",$C=[ul,"1024286218801926184","1033680203433660458"],yd=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[m.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>$C.includes(e.channel.id),async execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>`Vesktop v${VesktopNative.app.getVersion()}`)(),o=c=>c.endsWith("API")||ze[c].required,r=Object.keys(ze).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!o(c)),i=Object.keys(ze).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&o(c)),s={Vencord:`v1.7.3 \u2022 ${No}${na.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1711076914215)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:sr,OpenAsar:"openasar"in window};return{content:` **Vencord Debug Info** >>> ${Object.entries(s).map(([c,u])=>`${c}: ${u}`).join(` `)} Enabled Plugins (${r.length+i.length}): ${qs(r.join(", ")+` `+i.join(", "))} `.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===ul&&!ks(E.getCurrentUser().id)&&sr&&No!==await yt.get(P0)){let t=()=>yt.set(P0,No);et.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),n(S.FormText,null,"Please first update using the Updater Page in Settings, or use the VencordInstaller (Update Vencord Button) to do so, in case you can't access the Updater page.")),onCancel:t,onConfirm:t})}}}})});var vd,C0=g(()=>{"use strict";a();P();I();vd=y({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[m.FieryFlames],patches:[{find:"canAnimate:",all:!0,noWarn:!0,replacement:{match:/canAnimate:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"canAnimate:!0":e}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<=\.activityEmoji,.+?animate:)\i/,replace:"!0"}},{find:".animatedBannerHoverLayer,onMouseEnter:",replacement:{match:/(?<=guildBanner:\i,animate:)\i(?=}\))/,replace:"!0"}}]})});var Sd,bd,R0=g(()=>{"use strict";a();$();P();I();Sd=N({domain:{type:3,default:!0,description:"Remove the untrusted domain popup when opening links",restartNeeded:!0},file:{type:3,default:!0,description:"Remove the 'Potentially Dangerous Download' popup when opening links",restartNeeded:!0}}),bd=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[m.zt,m.Trwy],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"},predicate:()=>Sd.store.domain},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"},predicate:()=>Sd.store.file}],settings:Sd})});var GC,HC,zC,ur,Td,k0=g(()=>{"use strict";a();$();le();P();I();H();GC=Go(".actionBarIcon)"),HC=x("popFirstFile","update"),zC=/\.tar\.\w+$/,ur=N({anonymiseByDefault:{description:"Whether to anonymise file names by default",type:3,default:!0},method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>ur.store.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>ur.store.method!==1}}),Td=y({name:"AnonymiseFileNames",authors:[m.fawn],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f)),$1(...args)),"}},{find:"message.attachments",replacement:{match:/(\i.uploadFiles\((\i),)/,replace:"$2.forEach(f=>f.filename=$self.anonymise(f)),$1"}},{find:".Messages.ATTACHMENT_UTILITIES_SPOILER",replacement:{match:/(?<=children:\[)(?=.{10,80}tooltip:.{0,100}\i\.\i\.Messages\.ATTACHMENT_UTILITIES_SPOILER)/,replace:"arguments[0].canEdit!==false?$self.renderIcon(arguments[0]):null,"}}],settings:ur,renderIcon:_.wrap(({upload:e,channelId:t,draftType:o})=>{let r=e.anonymise??ur.store.anonymiseByDefault;return n(GC,{tooltip:r?"Using anonymous file name":"Using normal file name",onClick:()=>{e.anonymise=!r,HC.update(t,e.id,o,{})}},r?n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M17.06 13C15.2 13 13.64 14.33 13.24 16.1C12.29 15.69 11.42 15.8 10.76 16.09C10.35 14.31 8.79 13 6.94 13C4.77 13 3 14.79 3 17C3 19.21 4.77 21 6.94 21C9 21 10.68 19.38 10.84 17.32C11.18 17.08 12.07 16.63 13.16 17.34C13.34 19.39 15 21 17.06 21C19.23 21 21 19.21 21 17C21 14.79 19.23 13 17.06 13M6.94 19.86C5.38 19.86 4.13 18.58 4.13 17S5.39 14.14 6.94 14.14C8.5 14.14 9.75 15.42 9.75 17S8.5 19.86 6.94 19.86M17.06 19.86C15.5 19.86 14.25 18.58 14.25 17S15.5 14.14 17.06 14.14C18.62 14.14 19.88 15.42 19.88 17S18.61 19.86 17.06 19.86M22 10.5H2V12H22V10.5M15.53 2.63C15.31 2.14 14.75 1.88 14.22 2.05L12 2.79L9.77 2.05L9.72 2.04C9.19 1.89 8.63 2.17 8.43 2.68L6 9H18L15.56 2.68L15.53 2.63Z"})):n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{transform:"scale(-1,1)"}},n("path",{fill:"currentColor",d:"M22.11 21.46L2.39 1.73L1.11 3L6.31 8.2L6 9H7.11L8.61 10.5H2V12H10.11L13.5 15.37C13.38 15.61 13.3 15.85 13.24 16.1C12.29 15.69 11.41 15.8 10.76 16.09C10.35 14.31 8.79 13 6.94 13C4.77 13 3 14.79 3 17C3 19.21 4.77 21 6.94 21C9 21 10.68 19.38 10.84 17.32C11.18 17.08 12.07 16.63 13.16 17.34C13.34 19.39 15 21 17.06 21C17.66 21 18.22 20.86 18.72 20.61L20.84 22.73L22.11 21.46M6.94 19.86C5.38 19.86 4.13 18.58 4.13 17C4.13 15.42 5.39 14.14 6.94 14.14C8.5 14.14 9.75 15.42 9.75 17C9.75 18.58 8.5 19.86 6.94 19.86M17.06 19.86C15.5 19.86 14.25 18.58 14.25 17C14.25 16.74 14.29 16.5 14.36 16.25L17.84 19.73C17.59 19.81 17.34 19.86 17.06 19.86M22 12H15.2L13.7 10.5H22V12M17.06 13C19.23 13 21 14.79 21 17C21 17.25 20.97 17.5 20.93 17.73L19.84 16.64C19.68 15.34 18.66 14.32 17.38 14.17L16.29 13.09C16.54 13.03 16.8 13 17.06 13M12.2 9L7.72 4.5L8.43 2.68C8.63 2.17 9.19 1.89 9.72 2.04L9.77 2.05L12 2.79L14.22 2.05C14.75 1.88 15.32 2.14 15.54 2.63L15.56 2.68L18 9H12.2Z"})))},{noop:!0}),anonymise(e){if((e.anonymise??ur.store.anonymiseByDefault)===!1)return e.filename;let t=e.filename,r=zC.exec(t)?.index??t.lastIndexOf("."),i=r!==-1?t.slice(r):"";switch(ur.store.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:ur.store.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("")+i;case 1:return ur.store.consistent+i;case 2:return Date.now()+i}}})});async function N0(e,t){return(await Ur.fetchAssetIds(e,[t]))[0]}async function WC(e){let t={};return await jC.fetchApplicationsRPC(t,e),t.application}var jC,D0,Gi,wd,L0=g(()=>{"use strict";a();Nl();To();P();I();H();T();jC=x("fetchApplicationsRPC","getRemoteIconURL");D0={};wd=y({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[m.Ducko],settingsAboutComponent:()=>n(f,null,n(S.FormTitle,{tag:"h3"},"How to use arRPC"),n(S.FormText,null,n(je,{href:"https://github.com/OpenAsar/arrpc/tree/main#server"},"Follow the instructions in the GitHub repo")," to get the server running, and then enable the plugin.")),async handleEvent(e){let t=JSON.parse(e.data),{activity:o}=t,r=o?.assets;if(r?.large_image&&(r.large_image=await N0(o.application_id,r.large_image)),r?.small_image&&(r.small_image=await N0(o.application_id,r.small_image)),o){let i=o.application_id;D0[i]||=await WC(i);let s=D0[i];o.name||=s.name}B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("armcord"in window)return;if(Gi&&Gi.close(),Gi=new WebSocket("ws://127.0.0.1:1337"),Gi.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(Gi.readyState===WebSocket.OPEN),1e3))){js("Failed to connect to arRPC, is it running?","Retry",()=>{Up(),this.start()});return}X.show({message:"Connected to arRPC",type:X.Type.SUCCESS,id:X.genId(),options:{duration:1e3,position:X.Position.BOTTOM}})},stop(){B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),Gi?.close()}})});var xd,E0=g(()=>{"use strict";a();P();I();xd=y({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[m.Xinto,m.Glitch],patches:[{find:"BAN_CONFIRM_TITLE.",replacement:{match:/src:\i\("\d+"\)/g,replace:"src: Vencord.Settings.plugins.BANger.source"}}],options:{source:{description:"Source to replace ban GIF with (Video or Gif)",type:0,default:"https://i.imgur.com/wp5q52C.mp4",restartNeeded:!0}}})});var O0,_0,qC,B0,F0=g(()=>{"use strict";a();le();H();T();Md();O0=Re("ChannelRTCStore"),_0=x("a","animated","useTransition"),qC=Ne('("guildsnav")'),B0=_.wrap(e=>{let t=Be([Hi],()=>Hi.getExpandedFolders()),o=Be([O0],()=>O0.isFullscreenInContext()),r=n(qC,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(c=>`.${c}`).join("")),l={display:o?"none":"flex"};return!s||!Pt.store.sidebarAnim?i?n("div",{style:l},r):null:n(_0.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&n(_0.animated.div,{style:{...c,...l}},r))},{noop:!0})});function ZC(e){return YC.getGuildFolders().find(t=>t.guildIds.includes(e))}function $0(){for(let e of Hi.getExpandedFolders())Pd.toggleGuildFolderExpand(e)}var KC,YC,Hi,Pd,U0,Id,Pt,Ad,Md=g(()=>{"use strict";a();$();P();I();H();T();F0();({GuildsTree:KC}=x("GuildsTree")),YC=Re("SortedGuildStore"),Hi=Re("ExpandedGuildFolderStore"),Pd=x("move","toggleGuildFolderExpand"),U0=null,Id=!1;Pt=N({sidebar:{type:3,description:"Display servers from folder on dedicated sidebar",restartNeeded:!0,default:!0},sidebarAnim:{type:3,description:"Animate opening the folder sidebar",default:!0},closeAllFolders:{type:3,description:"Close all folders when selecting a server not in a folder",default:!1},closeAllHomeButton:{type:3,description:"Close all folders when clicking on the home button",restartNeeded:!0,default:!1},closeOthers:{type:3,description:"Close other folders when opening a folder",default:!1},forceOpen:{type:3,description:"Force a folder to open when switching to a server of that folder",default:!1},keepIcons:{type:3,description:"Keep showing guild icons in the primary guild bar folder when it's open in the BetterFolders sidebar",restartNeeded:!0,default:!1},showFolderIcon:{type:4,description:"Show the folder icon above the folder guilds in the BetterFolders sidebar",options:[{label:"Never",value:0},{label:"Always",value:1,default:!0},{label:"When more than one folder is expanded",value:2}],restartNeeded:!0}}),Ad=y({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[m.juby,m.AutumnVN,m.Nuckyz],settings:Pt,patches:[{find:'("guildsnav")',predicate:()=>Pt.store.sidebar,replacement:[{match:/(?<=let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?)(?=}=\i,)/,replace:",isBetterFolders"},{match:/(useStateFromStoresArray\).{0,25}let \i)=(\i\.\i.getGuildsTree\(\))/,replace:(e,t,o)=>`${t}=$self.getGuildTree(!!arguments[0].isBetterFolders,${o},arguments[0].betterFoldersExpandedIds)`},{match:/lastTargetNode:\i\[\i\.length-1\].+?Fragment.+?\]}\)\]/,replace:"$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0].isBetterFolders))"},{match:/unreadMentionsIndicatorBottom,barClassName.+?}\)\]/,replace:"$&.filter($self.makeGuildsBarTreeFilter(!!arguments[0].isBetterFolders))"},{match:/(?<=\.Messages\.SERVERS.+?switch\((\i)\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,)/,replace:'isBetterFolders:typeof isBetterFolders!=="undefined"?isBetterFolders:false,'}]},{find:".MAX_GUILD_FOLDER_NAME_LENGTH,",predicate:()=>Pt.store.sidebar&&Pt.store.showFolderIcon!==1,replacement:[{match:/(useStateFromStores\).{0,20}=>)(\i\.\i)\.isFolderExpanded\(\i\)/,replace:(e,t,o)=>`${t}${o}.getExpandedFolders()`},{match:/(?<=folderNode:(\i),expanded:)\i(?=,)/,replace:(e,t)=>`typeof ${e}==="boolean"?${e}:${e}.has(${t}.id),betterFoldersExpandedIds:${e} instanceof Set?${e}:void 0`}]},{find:".FOLDER_ITEM_GUILD_ICON_MARGIN);",predicate:()=>Pt.store.sidebar,replacement:[{predicate:()=>Pt.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0].isBetterFolders&&${t};`},{predicate:()=>!Pt.store.keepIcons,match:/(?<=\.Messages\.SERVER_FOLDER_PLACEHOLDER.+?useTransition\)\()/,replace:"!!arguments[0].isBetterFolders&&"},{predicate:()=>!Pt.store.keepIcons,match:/expandedFolderBackground,.+?,(?=\i\(\(\i,\i,\i\)=>{let{key.{0,45}ul)(?<=selected:\i,expanded:(\i),.+?)/,replace:(e,t)=>`${e}!arguments[0].isBetterFolders&&${t}?null:`},{predicate:()=>Pt.store.showFolderIcon!==1,match:/(?<=\.wrapper,children:\[)/,replace:"$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)&&"},{predicate:()=>Pt.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>Pt.store.sidebar,replacement:{match:/(?<=({className:\i\.guilds,themeOverride:\i})\))/,replace:",$self.FolderSideBar($1)"}},{find:".Messages.DISCODO_DISABLED",predicate:()=>Pt.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,200}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!Pt.store.closeAllFolders&&!Pt.store.forceOpen)&&U0!==e.guildId){U0=e.guildId;let t=ZC(e.guildId);t?.folderId?Pt.store.forceOpen&&!Hi.isFolderExpanded(t.folderId)&&Pd.toggleGuildFolderExpand(t.folderId):Pt.store.closeAllFolders&&$0()}},TOGGLE_GUILD_FOLDER_EXPAND(e){Pt.store.closeOthers&&!Id&&(Id=!0,B.wait(()=>{let t=Hi.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&Pd.toggleGuildFolderExpand(o);Id=!1}))}},getGuildTree(e,t,o){if(!e||o==null)return t;let r=new KC;return r.root.children=t.root.children.filter(i=>o.has(i.id)),r.nodes=Object.fromEntries(Object.entries(t.nodes).filter(([i,s])=>o.has(s.id)||o.has(s.parentId))),r},makeGuildsBarGuildListFilter(e){return t=>e?t?.props?.["aria-label"]===Ye.Messages.SERVERS:!0},makeGuildsBarTreeFilter(e){return t=>e?"onScroll"in t.props:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(Pt.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},FolderSideBar:e=>n(B0,{...e}),closeFolders:$0})});var Cd,G0=g(()=>{"use strict";a();P();I();Cd=y({name:"BetterGifAltText",authors:[m.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:"onCloseImage=",replacement:{match:/(return.{0,10}\.jsx.{0,50}isWindowFocused)/,replace:"$self.altify(e);$1"}},{find:".Messages.GIF,",replacement:{match:/alt:(\i)=(\i\.default\.Messages\.GIF)(?=,[^}]*\}=(\i))/,replace:"alt_$$:$1=$self.altify($3)||$2"}}],altify(e){if(e.alt??="GIF",e.alt!=="GIF")return e.alt;let t=e.original||e.src;try{t=decodeURI(t)}catch{}let o=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return o.length>300&&(o=o.slice(0,300)+"..."),o&&(e.alt+=` - ${o}`),e.alt}})});var Rd,H0=g(()=>{"use strict";a();P();I();Rd=y({name:"BetterGifPicker",description:"Makes the gif picker open the favourite category by default",authors:[m.Samwich],patches:[{find:".GIFPickerResultTypes.SEARCH",replacement:[{match:"this.state={resultType:null}",replace:'this.state={resultType:"Favorites"}'}]}]})});var XC,kd,z0=g(()=>{"use strict";a();$();P();I();H();XC=x("section","lastSection"),kd=y({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[m.Ven],patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>Vencord.Settings.plugins.BetterNotesBox.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"hideNote:!0":e}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}},{find:".Messages.NOTE}",replacement:{match:/(?<=return \i\?)null(?=:\(0,\i\.jsxs)/,replace:"$self.patchPadding(arguments[0])"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>G.plugins.BetterNotesBox.hide,default:!1}},patchPadding(e){if(!!e.lastSection)return n("div",{className:XC.lastSection})}})});function JC(){return n("svg",{role:"img",width:"18",height:"18",fill:"none",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m13.96 5.46 4.58 4.58a1 1 0 0 0 1.42 0l1.38-1.38a2 2 0 0 0 0-2.82l-3.18-3.18a2 2 0 0 0-2.82 0l-1.38 1.38a1 1 0 0 0 0 1.42ZM2.11 20.16l.73-4.22a3 3 0 0 1 .83-1.61l7.87-7.87a1 1 0 0 1 1.42 0l4.58 4.58a1 1 0 0 1 0 1.42l-7.87 7.87a3 3 0 0 1-1.6.83l-4.23.73a1.5 1.5 0 0 1-1.73-1.73Z"}))}function QC(){return n("svg",{width:"18",height:"18",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M 12,0 C 5.3733333,0 0,5.3733333 0,12 c 0,6.626667 5.3733333,12 12,12 1.106667,0 2,-0.893333 2,-2 0,-0.52 -0.2,-0.986667 -0.52,-1.346667 -0.306667,-0.346666 -0.506667,-0.813333 -0.506667,-1.32 0,-1.106666 0.893334,-2 2,-2 h 2.36 C 21.013333,17.333333 24,14.346667 24,10.666667 24,4.7733333 18.626667,0 12,0 Z M 4.6666667,12 c -1.1066667,0 -2,-0.893333 -2,-2 0,-1.1066667 0.8933333,-2 2,-2 1.1066666,0 2,0.8933333 2,2 0,1.106667 -0.8933334,2 -2,2 z M 8.666667,6.6666667 c -1.106667,0 -2.0000003,-0.8933334 -2.0000003,-2 0,-1.1066667 0.8933333,-2 2.0000003,-2 1.106666,0 2,0.8933333 2,2 0,1.1066666 -0.893334,2 -2,2 z m 6.666666,0 c -1.106666,0 -2,-0.8933334 -2,-2 0,-1.1066667 0.893334,-2 2,-2 1.106667,0 2,0.8933333 2,2 0,1.1066666 -0.893333,2 -2,2 z m 4,5.3333333 c -1.106666,0 -2,-0.893333 -2,-2 0,-1.1066667 0.893334,-2 2,-2 1.106667,0 2,0.8933333 2,2 0,1.106667 -0.893333,2 -2,2 z"}))}var j0,Nd,W0=g(()=>{"use strict";a();P();mt();I();H();T();j0=x("open","selectRole","updateGuild");Nd=y({name:"BetterRoleContext",description:"Adds options to copy role color / edit role when right clicking roles in the user profile",authors:[m.Ven],start(){Ts.DeveloperMode.updateSetting(!0)},contextMenus:{"dev-context"(e,{id:t}){let o=Js();if(!o)return;let r=ae.getRole(o.id,t);!r||(r.colorString&&e.push(n(L.MenuItem,{id:"vc-copy-role-color",label:"Copy Role Color",action:()=>Ft.copy(r.colorString),icon:QC})),_e.getGuildPermissionProps(o).canManageRoles&&e.push(n(L.MenuItem,{id:"vc-edit-role",label:"Edit Role",action:async()=>{await j0.open(o.id,"ROLES"),j0.selectRole(t)},icon:JC})))}}})});var Dd,q0=g(()=>{"use strict";a();$();P();I();T();Dd=y({name:"BetterRoleDot",authors:[m.Ven,m.AutumnVN],description:"Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",patches:[{find:".dotBorderBase",replacement:{match:/,viewBox:"0 0 20 20"/,replace:"$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}"}},{find:'"dot"===',all:!0,noWarn:!0,predicate:()=>G.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:".ADD_ROLE_A11Y_LABEL",predicate:()=>G.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!G.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",predicate:()=>G.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!G.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}}],options:{bothStyles:{type:3,description:"Show both role dot and coloured names",restartNeeded:!0,default:!1},copyRoleColorInProfilePopout:{type:3,description:"Allow click on role dot in profile popout to copy role color",restartNeeded:!0,default:!1}},copyToClipBoard(e){Ft.copy(e),X.show({message:"Copied to Clipboard!",type:X.Type.SUCCESS,id:X.genId(),options:{duration:1e3,position:X.Position.BOTTOM}})}})});function eR({mode:e,baseLayer:t=!1,...o}){let r=e==="HIDDEN",i=xt(null);se(()=>()=>{Wo.dispatch("LAYER_POP_START"),Wo.dispatch("LAYER_POP_COMPLETE")},[]);let s=n("div",{ref:i,"aria-hidden":r,className:VC({[K0.layer]:!0,[K0.baseLayer]:t,"stop-animations":r}),style:{opacity:r?0:void 0},...o});return t?s:n(ll,{containerRef:i},s)}var VC,K0,zi,Ld,Y0=g(()=>{"use strict";a();$();Qe();le();P();I();H();T();VC=ve(""),K0=x("animating","baseLayer","bg","layer","layers"),zi=N({disableFade:{description:"Disable the crossfade animation",type:3,default:!0,restartNeeded:!0},organizeMenu:{description:"Organizes the settings cog context menu into categories",type:3,default:!0},eagerLoad:{description:"Removes the loading delay when opening the menu for the first time",type:3,default:!0,restartNeeded:!0}});Ld=y({name:"BetterSettings",description:"Enhances your settings-menu-opening experience",authors:[m.Kyuuhachi],settings:zi,patches:[{find:"this.renderArtisanalHack()",replacement:[{match:/(?<=(\i)\.contextType=\i\.AccessibilityPreferencesContext;)/,replace:"$1=$self.Layer;",predicate:()=>zi.store.disableFade},{match:/createPromise:\(\)=>([^:}]*?),webpackId:"\d+",name:(?!="CollectiblesShop")"[^"]+"/g,replace:"$&,_:$1",predicate:()=>zi.store.eagerLoad}]},{find:"DefaultCustomContentScroller:function()",replacement:[{match:/\(0,\i\.useTransition\)\((\i)/,replace:"(_cb=>_cb(void 0,$1))||$&"},{match:/\i\.animated\.div/,replace:'"div"'}],predicate:()=>zi.store.disableFade},{find:"Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format",replacement:{match:/(?<=handleOpenSettingsContextMenu.{0,250}?\i\.el\(("[^"]+")\)\.then\([^;]*?("\d+").*?Messages\.USER_SETTINGS,)(?=onClick:)/,replace:"onMouseEnter(){Vencord.Webpack.wreq.el($1).then(()=>Vencord.Webpack.wreq($2));},"},predicate:()=>zi.store.eagerLoad},{find:"Messages.USER_SETTINGS_ACTIONS_MENU_LABEL",replacement:{match:/\(0,\i.default\)\(\)(?=\.filter\(\i=>\{let\{section:\i\}=)/,replace:"$self.wrapMenu($&)"}}],Layer(e){return n(_,{fallback:()=>e.children},n(eR,{...e}))},wrapMenu(e){if(!zi.store.organizeMenu)return e;let t=[{label:null,items:[]}];for(let o of e)o.section==="HEADER"?t.push({label:o.label,items:[]}):o.section==="DIVIDER"?t.push({label:Ye.Messages.OTHER_OPTIONS,items:[]}):t.at(-1).items.push(o);return{filter(o){for(let r of t)r.items=r.items.filter(o);return this},map(o){return t.filter(r=>r.items.length>0).map(({label:r,items:i})=>{let s=i.map(o);return r?n(L.MenuItem,{id:r.replace(/\W/,"_"),label:r,children:s,action:s[0].props.action}):s})}}}})});var Ed,Z0=g(()=>{"use strict";a();P();I();Ed=y({name:"BetterUploadButton",authors:[m.fawn,m.Ven],description:"Upload with a single click, open menu with right click",patches:[{find:"Messages.CHAT_ATTACH_UPLOAD_OR_INVITE",replacement:{match:/CHAT_ATTACH_UPLOAD_OR_INVITE,onDoubleClick:(.+?:void 0),\.\.\.(\i),/,replace:"$&onClick:$1,onContextMenu:$2.onClick,"}}]})});var X0,J0,Q0=g(()=>{"use strict";a();H();X0=Re("ApplicationStreamPreviewStore"),J0=Re("ApplicationStreamingStore")});var tR,V0,oR,nR,Od,eS=g(()=>{"use strict";a();It();P();mt();I();T();Q0();tR=async({guildId:e,channelId:t,ownerId:o})=>{let r=await X0.getPreviewURL(e,t,o);!r||tn(r)},V0=(e,{userId:t})=>{let o=J0.getAnyStreamForUser(t);if(!o)return;let r=n(L.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:Ov,action:()=>o&&tR(o),disabled:!o});e.push(n(L.MenuSeparator,null),r)},oR=(e,{stream:t})=>V0(e,{userId:t.ownerId}),nR=(e,{user:t})=>{if(t)return V0(e,{userId:t.id})},Od=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[m.phil],contextMenus:{"user-context":nR,"stream-context":oR}})});function tS(){ra.textContent=` .vc-nsfw-img [class^=imageWrapper] img, .vc-nsfw-img [class^=wrapperPaused] video { filter: blur(${G.plugins.BlurNSFW.blurAmount}px); transition: filter 0.2s; } .vc-nsfw-img [class^=imageWrapper]:hover img, .vc-nsfw-img [class^=wrapperPaused]:hover video { filter: unset; } `}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: Listener encountered an unknown error `,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: Listener encountered an unknown error `,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: Listener encountered an unknown error `,i)}}function Hd(e){return Gd.add(e),e}function zd(e){return Gd.delete(e)}var Fd,Ud,$d,Gd,gn=g(()=>{"use strict";a();Ke();T();Fd=new oe("MessageEvents","#e5c890"),Ud=new Set,$d=new Set;Gd=new Set});var rS,iS=g(()=>{"use strict";a();rS=["action_object_map","action_type_map","action_ref_map","spm@*.aliexpress.com","scm@*.aliexpress.com","aff_platform","aff_trace_key","algo_expid@*.aliexpress.*","algo_pvid@*.aliexpress.*","btsid","ws_ab_test","pd_rd_*@amazon.*","_encoding@amazon.*","psc@amazon.*","tag@amazon.*","ref_@amazon.*","pf_rd_*@amazon.*","pf@amazon.*","crid@amazon.*","keywords@amazon.*","sprefix@amazon.*","sr@amazon.*","ie@amazon.*","node@amazon.*","qid@amazon.*","callback@bilibili.com","cvid@bing.com","form@bing.com","sk@bing.com","sp@bing.com","sc@bing.com","qs@bing.com","pq@bing.com","sc_cid","mkt_tok","trk","trkCampaign","ga_*","gclid","gclsrc","hmb_campaign","hmb_medium","hmb_source","spReportId","spJobID","spUserID","spMailingID","itm_*","s_cid","elqTrackId","elqTrack","assetType","assetId","recipientId","campaignId","siteId","mc_cid","mc_eid","pk_*","sc_campaign","sc_channel","sc_content","sc_medium","sc_outcome","sc_geo","sc_country","nr_email_referer","vero_conv","vero_id","yclid","_openstat","mbid","cmpid","cid","c_id","campaign_id","Campaign","hash@ebay.*","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","refsrc@facebook.com","hrc@facebook.com","gs_l","gs_lcp@google.*","ved@google.*","ei@google.*","sei@google.*","gws_rd@google.*","gs_gbg@google.*","gs_mss@google.*","gs_rn@google.*","_hsenc","_hsmi","__hssc","__hstc","hsCtaTracking","source@sourceforge.net","position@sourceforge.net","t@*.twitter.com","s@*.twitter.com","ref_*@*.twitter.com","t@*.x.com","s@*.x.com","ref_*@*.x.com","t@*.fixupx.com","s@*.fixupx.com","ref_*@*.fixupx.com","t@*.fxtwitter.com","s@*.fxtwitter.com","ref_*@*.fxtwitter.com","t@*.twittpr.com","s@*.twittpr.com","ref_*@*.twittpr.com","t@*.fixvx.com","s@*.fixvx.com","ref_*@*.fixvx.com","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@*.youtube.com","kw@*.youtube.com","si@*.youtube.com","pp@*.youtube.com","si@*.youtu.be","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com","igshid","igsh","share_id@reddit.com"]});var sS,lR,Wd,aS=g(()=>{"use strict";a();gn();P();I();iS();sS=/[\\^$.*+?()[\]{}|]/g,lR=RegExp(sS.source),Wd=y({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[m.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&lR.test(e)?e.replace(sS,"\\$&"):e||""},createRules(){let e=rS;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let o=t.split("@"),r=new RegExp("^"+this.escapeRegExp(o[0]).replace(/\\\*/,".+?")+"$");if(!o[1]){this.universalRules.add(r);continue}let i=new RegExp("^(www\\.)?"+this.escapeRegExp(o[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),s=i.toString();this.hostRules.set(s,i),this.rulesByHost.get(s)==null&&this.rulesByHost.set(s,new Set),this.rulesByHost.get(s).add(r)}},removeParam(e,t,o){(t===e||e instanceof RegExp&&e.test(t))&&o.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(o=>{t.searchParams.forEach((r,i,s)=>{this.removeParam(o,i,s)})}),this.hostRules.forEach((o,r)=>{!o.test(t.hostname)||this.rulesByHost.get(r).forEach(i=>{t.searchParams.forEach((s,l,c)=>{this.removeParam(i,l,c)})})}),t.toString())},onSend(e){e.content.match(/http(s)?:\/\//)&&(e.content=e.content.replace(/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g,t=>this.replacer(t)))},start(){this.createRules(),this.preSend=Vt((e,t)=>this.onSend(t)),this.preEdit=ti((e,t,o)=>this.onSend(o))},stop(){eo(this.preSend),oi(this.preEdit)}})});var lS=g(()=>{});function fS(e){let t=e.toString(16).padStart(6,"0");ia.store.color=t,gS(t)}function cS(e){pR({theme:e})}function dR(){let e=Be([uS],()=>uS.theme),t=e==="light",o=t?"dark":"light",i=Be([pS],()=>pS.gradientPreset)!==void 0,s=SR(ia.store.color),l=!1,c=!0;return(t&&s<.26||!t&&s>.12)&&(l=!0),s<.26&&s>.12&&(c=!1),t&&s>.65&&(l=!0,c=!1),n("div",{className:"client-theme-settings"},n("div",{className:"client-theme-container"},n("div",{className:"client-theme-settings-labels"},n(S.FormTitle,{tag:"h3"},"Theme Color"),n(S.FormText,null,"Add a color to your Discord client theme")),n(cR,{color:parseInt(ia.store.color,16),onChange:fS,showEyeDropper:!1,suggestedColors:uR})),(l||i)&&n(f,null,n(S.FormDivider,{className:Q(j.top8,j.bottom8)}),n("div",{className:`client-theme-contrast-warning ${l?t?"theme-dark":"theme-light":""}`},n("div",{className:"client-theme-warning"},n(S.FormText,null,"Warning, your theme won't look good:"),l&&n(S.FormText,null,"Selected color won't contrast well with text"),i&&n(S.FormText,null,"Nitro themes aren't supported")),l&&c&&n(k,{onClick:()=>cS(o),color:k.Colors.RED},"Switch to ",o," mode"),i&&n(k,{onClick:()=>cS(e),color:k.Colors.RED},"Disable Nitro Theme"))))}function mS(e,t,o){return Object.entries(e).filter(([r])=>r.search(t)>-1).map(([r,i])=>{let s=i-e[o],l=s>=0?"+":"-";return`${r}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${l} ${Math.abs(s).toFixed(2)}%);`}).join(` `)}function gR(e){let t={},o=dS.exec(e);for(;o!==null;){let[,r,i]=o;t[r]=parseFloat(i),o=dS.exec(e)}Kd("clientThemeOffsets",[`.theme-light { ${mS(t,mR,"--primary-345-hsl")} }`,`.theme-dark { ${mS(t,fR,"--primary-600-hsl")} }`].join(` `))}function hR(e){let t=/\.theme-light[^{]*\{[^}]*var\(--white-500\)[^}]*}/gm,o=[...e.matchAll(t)].flat(),r=/^([^{]*)\{background:var\(--white-500\)/m,i=/^([^{]*)\{background-color:var\(--white-500\)/m,s=Kl(o,M=>ql(M,r)).join(`, `),l=Kl(o,M=>ql(M,i)).join(`, `),c=`${s} { background: var(--primary-100) }`,u=`${l} { background-color: var(--primary-100) }`,p=/\.theme-light\{([^}]*--[^:}]*(?:background|bg)[^:}]*:var\(--white-500\)[^}]*)\}/m,d=/^(--[^:]*(?:background|bg)[^:]*):var\(--white-500\)/m,h=Kl(o,M=>ql(M,p)).map(M=>M.split(";")).flat(),b=`.theme-light { ${Kl(h,M=>ql(M,d)).map(M=>`${M}: var(--primary-100);`).join(` `)} }`;Kd("clientThemeLightModeFixes",[c,u,b].join(` `))}function ql(e,t){let o=e.match(t);return o===null?null:o[1]}function Kl(e,t){return e.map(t).filter(Boolean)}function gS(e){let{hue:t,saturation:o,lightness:r}=vR(e),i=document.getElementById("clientThemeVars");i||(i=Kd("clientThemeVars")),i.textContent=`:root { --theme-h: ${t}; --theme-s: ${o}%; --theme-l: ${r}%; }`}function Kd(e,t=""){let o=document.createElement("style");return o.setAttribute("id",e),o.textContent=t.split(` `).map(r=>r.trim()).join(` `),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: This filter matches ${u.length} modules. Make it more specific! `,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(``),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_CLOSE"})}catch(t){hn.debug("Failed to close user popout.",t)}try{B.dispatch({type:"LAYER_POP_ALL"})}catch(t){hn.debug("Failed to pop all layers.",t)}if(Jd.store.attemptToNavigateToHome)try{qo.transitionTo("/channels/@me")}catch(t){hn.debug("Failed to navigate to home",t)}setImmediate(()=>Qd=!1);try{e.setState({error:null,info:null})}catch(t){hn.debug("Failed to update crash handler component.",t)}}})});function Yl(e){return Boolean(e)}function tm(e){return e!=null}var Zl=g(()=>{"use strict";a()});async function MS(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(e)?"mp:"+e.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//,""):(await Ur.fetchAssetIds(ni.store.appID,[e]))[0]}function Ht(){Xl(!0),G.plugins.CustomRPC.enabled&&Xl()}function AS(){return ni.store.type!==1}function PR(e){return!AS()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":!0}function IS(){return ni.store.timestampMode!==3}function PS(e){return/https?:\/\/(?!i\.)?imgur\.com\//.test(e)?"Imgur link must be a direct link to the image. (e.g. https://i.imgur.com/...)":/https?:\/\/(?!media\.)?tenor\.com\//.test(e)?"Tenor link must be a direct link to the image. (e.g. https://media.tenor.com/...)":!0}async function CS(){let{appID:e,appName:t,details:o,state:r,type:i,streamLink:s,startTime:l,endTime:c,imageBig:u,imageBigTooltip:p,imageSmall:d,imageSmallTooltip:h,buttonOneText:v,buttonOneURL:b,buttonTwoText:M,buttonTwoURL:w}=ni.store;if(!t)return;let C={application_id:e||"0",name:t,state:r,details:o,type:i,flags:1<<0};switch(i===1&&(C.url=s),ni.store.timestampMode){case 1:C.timestamps={start:Date.now()};break;case 2:C.timestamps={start:Date.now()-(new Date().getHours()*3600+new Date().getMinutes()*60+new Date().getSeconds())*1e3};break;case 3:(l||c)&&(C.timestamps={},l&&(C.timestamps.start=l),c&&(C.timestamps.end=c));break;case 0:default:break}v&&(C.buttons=[v,M].filter(Yl),C.metadata={button_urls:[b,w].filter(Yl)}),u&&(C.assets={large_image:await MS(u),large_text:p||void 0}),d&&(C.assets={...C.assets,small_image:await MS(d),small_text:h||void 0});for(let R in C){if(R==="type")continue;let A=C[R];(!A||A.length===0)&&delete C[R]}return C}async function Xl(e){let t=await CS();B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var xR,MR,IR,ni,om,RS=g(()=>{"use strict";a();$();To();P();Zl();lt();I();H();T();xR=Ne("onOpenGameProfile"),MR=x("activity","buttonColor"),IR=x("profileColors");ni=N({appID:{type:0,description:"Application ID (required)",onChange:Ht,isValid:e=>e?e&&!/^\d+$/.test(e)?"Application ID must be a number.":!0:"Application ID is required."},appName:{type:0,description:"Application name (required)",onChange:Ht,isValid:e=>e?e.length>128?"Application name must be not longer than 128 characters.":!0:"Application name is required."},details:{type:0,description:"Details (line 1)",onChange:Ht,isValid:e=>e&&e.length>128?"Details (line 1) must be not longer than 128 characters.":!0},state:{type:0,description:"State (line 2)",onChange:Ht,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:Ht,options:[{label:"Playing",value:0,default:!0},{label:"Streaming",value:1},{label:"Listening",value:2},{label:"Watching",value:3},{label:"Competing",value:5}]},streamLink:{type:0,description:"Twitch.tv or Youtube.com link (only for Streaming activity type)",onChange:Ht,disabled:AS,isValid:PR},timestampMode:{type:4,description:"Timestamp mode",onChange:Ht,options:[{label:"None",value:0,default:!0},{label:"Since discord open",value:1},{label:"Same as your current time",value:2},{label:"Custom",value:3}]},startTime:{type:1,description:"Start timestamp in milisecond (only for custom timestamp mode)",onChange:Ht,disabled:IS,isValid:e=>e&&e<0?"Start timestamp must be greater than 0.":!0},endTime:{type:1,description:"End timestamp in milisecond (only for custom timestamp mode)",onChange:Ht,disabled:IS,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:Ht,isValid:PS},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:Ht,isValid:e=>e&&e.length>128?"Big image tooltip must be not longer than 128 characters.":!0},imageSmall:{type:0,description:"Small image key/link",onChange:Ht,isValid:PS},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:Ht,isValid:e=>e&&e.length>128?"Small image tooltip must be not longer than 128 characters.":!0},buttonOneText:{type:0,description:"Button 1 text",onChange:Ht,isValid:e=>e&&e.length>31?"Button 1 text must be not longer than 31 characters.":!0},buttonOneURL:{type:0,description:"Button 1 URL",onChange:Ht},buttonTwoText:{type:0,description:"Button 2 text",onChange:Ht,isValid:e=>e&&e.length>31?"Button 2 text must be not longer than 31 characters.":!0},buttonTwoURL:{type:0,description:"Button 2 URL",onChange:Ht}});om=y({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[m.captain,m.AutumnVN],start:Xl,stop:()=>Xl(!0),settings:ni,settingsAboutComponent:()=>{let e=st(CS);return n(f,null,n(S.FormText,null,"Go to ",n(je,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),n(S.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),n(S.FormText,null,"If you want to use image link, download your image and reupload the image to ",n(je,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and select "Copy image address".'),n(S.FormDivider,null),n("div",{style:{width:"284px"},className:IR.profileColors},e[0]&&n(xR,{activity:e[0],className:MR.activity,channelId:Ie.getChannelId(),guild:ae.getGuild(yo.getLastSelectedGuildId()),application:{id:ni.store.appID},user:E.getCurrentUser()})))}})});var kS=g(()=>{});async function CR(){try{let{embed:e}=this.props;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let t=AR.exec(e.video.url)?.[1];if(!t)return;let o=await fetch(`https://sponsor.ajay.app/api/branding?videoID=${t}`);if(!o.ok)return;let{titles:r,thumbnails:i}=await o.json(),s=r[0]?.votes>=0,l=i[0]?.votes>=0&&!i[0].original;if(!s&&!l)return;e.dearrow={enabled:!0},s&&(e.dearrow.oldTitle=e.rawTitle,e.rawTitle=r[0].title.replace(/ >(\S)/g," $1")),l&&(e.dearrow.oldThumb=e.thumbnail.proxyURL,e.thumbnail.proxyURL=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${t}&time=${i[0].timestamp}`),this.forceUpdate()}catch(e){new oe("Dearrow").error("Failed to dearrow embed",e)}}function RR({component:e}){let{embed:t}=e.props;return t?.dearrow?n(ne,{text:t.dearrow.enabled?"This embed has been dearrowed, click to restore":"Click to dearrow"},({onMouseEnter:o,onMouseLeave:r})=>n("button",{onMouseEnter:o,onMouseLeave:r,className:"vc-dearrow-toggle-"+(t.dearrow.enabled?"on":"off"),onClick:()=>{let{enabled:i,oldThumb:s,oldTitle:l}=t.dearrow;t.dearrow.enabled=!i,l&&(t.dearrow.oldTitle=t.rawTitle,t.rawTitle=l),s&&(t.dearrow.oldThumb=t.thumbnail.proxyURL,t.thumbnail.proxyURL=s),e.forceUpdate()}},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 36 36","aria-label":"Toggle Dearrow"},n("path",{fill:"#1213BD",d:"M36 18.302c0 4.981-2.46 9.198-5.655 12.462s-7.323 5.152-12.199 5.152s-9.764-1.112-12.959-4.376S0 23.283 0 18.302s2.574-9.38 5.769-12.644S13.271 0 18.146 0s9.394 2.178 12.589 5.442C33.931 8.706 36 13.322 36 18.302z"}),n("path",{fill:"#88c9f9",d:"m 30.394282,18.410186 c 0,3.468849 -1.143025,6.865475 -3.416513,9.137917 -2.273489,2.272442 -5.670115,2.92874 -9.137918,2.92874 -3.467803,0 -6.373515,-1.147212 -8.6470033,-3.419654 -2.2734888,-2.272442 -3.5871299,-5.178154 -3.5871299,-8.647003 0,-3.46885 0.9420533,-6.746149 3.2144954,-9.0196379 2.2724418,-2.2734888 5.5507878,-3.9513905 9.0196378,-3.9513905 3.46885,0 6.492841,1.9322561 8.76633,4.204698 2.273489,2.2724424 3.788101,5.2974804 3.788101,8.7663304 z"}),n("path",{fill:"#0a62a5",d:"m 23.95823,17.818306 c 0,3.153748 -2.644888,5.808102 -5.798635,5.808102 -3.153748,0 -5.599825,-2.654354 -5.599825,-5.808102 0,-3.153747 2.446077,-5.721714 5.599825,-5.721714 3.153747,0 5.798635,2.567967 5.798635,5.721714 z"})))):null}var AR,nm,NS=g(()=>{"use strict";a();kS();le();P();Ke();I();T();AR=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;nm=y({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[m.Ven],embedDidMount:CR,renderButton(e){return n(_,{noop:!0},n(RR,{component:e}))},patches:[{find:"this.renderInlineMediaEmbed",replacement:[{match:/render\(\)\{.{0,30}let\{embed:/,replace:"componentDidMount=$self.embedDidMount;$&"},{match:/children:\[(?=null!=\i\?\i\.renderSuppressButton)/,replace:"children:[$self.renderButton(this),"}]}]})});var DS=g(()=>{});var kR,pr,LS,ES,OS,ri,Jl,ji,sa,rm,dr=g(()=>{"use strict";a();kR="https://decor.fieryflames.dev",pr=kR+"/api",LS=pr+"/authorize",ES="https://ugc.decor.fieryflames.dev",OS="1096966363416899624",ri="100101099111114",Jl="11497119",ji="1096357702931841148",sa="dXp2SdxDcP",rm=1e3*60*60*4});var NR,mr,aa=g(()=>{"use strict";a();ei();Uo();Ke();Ze();T();dr();NR={async getItem(e){return yt.get(e).then(t=>t??null)},async setItem(e,t){await yt.set(e,t)},async removeItem(e){await yt.del(e)}},mr=Ot(()=>Gr(Uu((e,t)=>({token:null,tokens:{},init:()=>{e({token:t().tokens[E.getCurrentUser().id]??null})},setToken:o=>e({token:o,tokens:{...t().tokens,[E.getCurrentUser().id]:o}}),remove:o=>{let{tokens:r,init:i}=t(),s={...r};delete s[o],e({tokens:s}),i()},async authorize(){return new Promise((o,r)=>de(i=>n(bs,{...i,scopes:["identify"],responseType:"code",redirectUri:LS,permissions:0n,clientId:OS,cancelCompletesFlow:!1,callback:async s=>{try{let l=new URL(s.location);l.searchParams.append("client","vencord");let c=await fetch(l);if(c?.ok){let u=await c.text();t().setToken(u)}else throw new Error("Request not OK");o(void 0)}catch(l){l instanceof Error&&(Mt(`Failed to authorize: ${l.message}`,X.Type.FAILURE),new oe("Decor").error("Failed to authorize",l),r(l))}}}),{onCloseCallback(){r(new Error("Authorization cancelled"))}}))},isAuthorized:()=>!!t().token}),{name:"decor-auth",getStorage:()=>NR,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})))});async function Ql(e,t){let o=await fetch(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${mr.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var _S,BS,FS,im,US,$S,Vl=g(()=>{"use strict";a();dr();aa();_S=async e=>{if(e?.length===0)return{};let t=new URL(pr+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await fetch(t).then(o=>o.json())},BS=async(e="@me")=>Ql(pr+`/users/${e}/decorations`).then(t=>t.json()),FS=async(e="@me")=>Ql(pr+`/users/${e}/decoration`).then(t=>t.json()),im=async(e,t="@me")=>{let o=new FormData;return e?"hash"in e?o.append("hash",e.hash):"file"in e&&(o.append("image",e.file),o.append("alt",e.alt??"null")):o.append("hash","null"),Ql(pr+`/users/${t}/decoration`,{method:"PUT",body:o}).then(r=>e&&"file"in e?r.json():r.text())},US=async e=>{await Ql(pr+`/decorations/${e}`,{method:"DELETE"})},$S=async()=>fetch(pr+"/decorations/presets").then(e=>e.json())});function sm(e){return`${e.animated?"a_":""}${e.hash}`}function ec(e){return{asset:sm(e),skuId:ri}}var tc=g(()=>{"use strict";a();dr()});function GS(e){let[t,o]=W(e?Dn.getState().getAsset(e.id)??null:null);return se(()=>{let r=Dn.subscribe(i=>{if(!e)return;let s=i.getAsset(e.id);!s||t!==s&&o(s)});if(e){let{fetch:i}=Dn.getState();i(e.id)}return r},[]),t?{asset:t,skuId:ri}:null}var Dn,am=g(()=>{"use strict";a();zr();Uo();T();Vl();dr();Dn=Ot(()=>Gr((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:lo(async()=>{let{fetchQueue:o,usersDecorations:r}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=Array.from(o),s=await _S(i),l=new Map(r),c=new Date;for(let u of i){let p=s[u]??null;l.set(u,{asset:p,fetchedAt:c})}e({usersDecorations:l})}),async fetch(o,r=!1){let{usersDecorations:i,fetchQueue:s,bulkFetch:l}=t(),{fetchedAt:c}=i.get(o)??{};c&&!r&&Date.now()-c.getTime(){"use strict";a();Uo();T();Vl();tc();am();yn=Ot(()=>Gr((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await BS(),r=await FS();e({decorations:o,selectedDecoration:r})},async create(o){let r=await im(o);e({decorations:[...t().decorations,r]})},async delete(o){let r=typeof o=="object"?o.hash:o;await US(r);let{selectedDecoration:i,decorations:s}=t(),l={decorations:s.filter(c=>c.hash!==r),selectedDecoration:i?.hash===r?null:i};e(l)},async select(o){t().selectedDecoration!==o&&(e({selectedDecoration:o}),im(o),Dn.getState().set(E.getCurrentUser().id,o?sm(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})))});var Ee,qi,Ki,HS,fr=g(()=>{"use strict";a();Qe();H();Ee=ve("vc-decor-"),qi=x("modalFooterShopButton"),Ki=vi(["openAvatarDecorationModal:"]),HS=vi(["stickerInspected]:"])});var la,zS,oc,lm,jS,ii=g(()=>{"use strict";a();H();T();zS=e=>la=e,oc=Du(()=>{let e=Lu(".shopPreviewBanner");return U.memo(e)}),jS=e=>lm=e});function cm(e){return n(la,{...e,isSelected:!1},n(Fv,null),n(V,{variant:"text-xs/normal",color:"header-primary"},Ye.Messages.CREATE))}var WS=g(()=>{"use strict";a();It();T();ii()});function um(e){return n(la,{...e},n(Uv,null),n(V,{variant:"text-xs/normal",color:"header-primary"},Ye.Messages.NONE))}var qS=g(()=>{"use strict";a();It();T();ii()});function pm({decoration:e}){let{delete:t}=yn();return n(L.Menu,{navId:Ee("decoration-context-menu"),onClose:Yt.closeContextMenu,"aria-label":"Decoration Options"},n(L.MenuItem,{id:Ee("decoration-context-menu-copy-hash"),label:"Copy Decoration Hash",icon:Dl,action:()=>Ft.copy(e.hash)}),e.authorId===E.getCurrentUser().id&&n(L.MenuItem,{id:Ee("decoration-context-menu-delete"),label:"Delete Decoration",color:"danger",icon:Oi,action:()=>et.show({title:"Delete Decoration",body:`Are you sure you want to delete ${e.alt}?`,confirmText:"Delete",confirmColor:Ee("danger-btn"),cancelText:"Cancel",onConfirm(){t(e)}})}))}var KS=g(()=>{"use strict";a();It();T();Wi();fr()});function dm(e){let{decoration:t}=e;return n(lm,{...e,onContextMenu:o=>{Yt.openContextMenu(o,()=>n(pm,{decoration:t}))},avatarDecoration:ec(t)})}var YS=g(()=>{"use strict";a();T();tc();ii();KS()});function mm({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:r}){return n("div",{className:Ee("sectioned-grid-list-grid")},r.map(i=>n(U.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var ZS=g(()=>{"use strict";a();T();fr()});function fm(e){return n("div",{className:Q(Ee("sectioned-grid-list-container"),DR.thin)},e.sections.map(t=>n("div",{key:e.getSectionKey(t),className:Ee("sectioned-grid-list-section")},e.renderSectionHeader(t),n(mm,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}var DR,XS=g(()=>{"use strict";a();we();H();fr();ZS();DR=x("managedReactiveScroller")});function _R(e){let[t,o]=W(null);return se(()=>{if(!e)return;let r=URL.createObjectURL(e);return o(r),()=>{URL.revokeObjectURL(r),o(null)}},[e]),t}function BR(e){let[t,o]=W(""),[r,i]=W(null),[s,l]=W(!1),[c,u]=W(null);se(()=>{c&&u(null)},[r]);let{create:p}=yn(),d=_R(r),h=Rt(()=>d?{asset:d,skuId:Jl}:null,[d]);return n(ye,{...e,size:"medium",className:qi.modal},n(Le,{separator:!1,className:Ee("modal-header")},n(V,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Create Decoration"),n(pt,{onClick:e.onClose})),n(ke,{className:Ee("create-decoration-modal-content"),scrollbarType:"none"},n(_,null,n(ER,{messageType:OR.WARNING},"Make sure your decoration does not violate ",n(je,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines")," before submitting it."),n("div",{className:Ee("create-decoration-modal-form-preview-container")},n("div",{className:Ee("create-decoration-modal-form")},c!==null&&n(V,{color:"text-danger",variant:"text-xs/normal"},c.message),n(S.FormSection,{title:"File"},n(LR,{filename:r?.name,placeholder:"Choose a file",buttonText:"Browse",filters:[{name:"Decoration file",extensions:["png","apng"]}],onFileSelect:i}),n(S.FormText,{type:"description",className:j.top8},"File should be APNG or PNG.")),n(S.FormSection,{title:"Name"},n(Je,{placeholder:"Companion Cube",value:t,onChange:o}),n(S.FormText,{type:"description",className:j.top8},"This name will be used when referring to this decoration."))),n("div",null,n(oc,{avatarDecorationOverride:h,user:E.getCurrentUser()}))),n(S.FormText,{type:"description",className:j.bottom16},n("br",null),"You can receive updates on your decoration's review by joining ",n(je,{href:`https://discord.gg/${sa}`,onClick:async v=>{v.preventDefault(),ae.getGuild(ji)?(dn(),B.dispatch({type:"LAYER_POP_ALL"}),qo.transitionToGuild(ji)):await Qr(sa)&&(dn(),B.dispatch({type:"LAYER_POP_ALL"}))}},"Decor's Discord server"),"."))),n(ct,{className:Ee("modal-footer")},n(k,{onClick:()=>{l(!0),p({alt:t,file:r}).then(e.onClose).catch(v=>{l(!1),u(v)})},disabled:!r||!t,submitting:s},"Submit for Review"),n(k,{onClick:e.onClose,color:k.Colors.PRIMARY,look:k.Looks.LINK},"Cancel")))}var LR,ER,OR,nc,gm=g(()=>{"use strict";a();le();To();mt();ot();Ze();H();T();dr();Wi();fr();ii();LR=Ne("fileUploadInput,"),{default:ER,HelpMessageTypes:OR}=x("HelpMessageTypes");nc=()=>Promise.all([Ki(),HS()]).then(()=>de(e=>n(BR,{...e})))});function FR(e){return n(ye,{...e,size:"small",className:qi.modal},n(Le,{separator:!1,className:Ee("modal-header")},n(V,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Hold on"),n(pt,{onClick:e.onClose})),n(ke,{scrollbarType:"none"},n(S.FormText,null,"By submitting a decoration, you agree to ",n(je,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines"),". Not reading these guidelines may get your account suspended from creating more decorations in the future.")),n(ct,{className:Ee("modal-footer")},n(k,{onClick:()=>{Yi.store.agreedToGuidelines=!0,e.onClose(),nc()}},"Continue"),n(k,{onClick:e.onClose,color:k.Colors.PRIMARY,look:k.Looks.LINK},"Go Back")))}var JS,QS=g(()=>{"use strict";a();To();Ze();T();rc();fr();gm();JS=()=>Ki().then(()=>de(e=>n(FR,{...e})))});function $R(){let[e,t]=W([]);return se(()=>{$S().then(t)},[]),e}function GR({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[r,i]=W([]);return se(()=>{(async()=>{if(!!e.authorIds)for(let s of e.authorIds){let l=E.getUser(s)??await Bt.getUser(s);i(c=>[...c,l])}})()},[e.authorIds]),n("div",null,n(fe,null,n(S.FormTitle,{style:{flexGrow:1}},e.title),o&&n(UR,{users:r,guildId:void 0,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,size:16,showUserPopout:!0,className:j.bottom8})),t&&n(S.FormText,{type:"description",className:j.bottom8},e.subtitle))}function HR(e){let[t,o]=W(void 0),r=typeof t<"u",i=t!=null?ec(t):t,{decorations:s,selectedDecoration:l,fetch:c,select:u}=yn();se(()=>{c()},[]);let p=r?t:l,d=typeof p?.authorId<"u",h=s.some(A=>A.reviewed===!1),v=$R(),b=v.flatMap(A=>A.decorations),M=v.find(A=>A.id===p?.presetId),w=typeof M<"u",R=[{title:"Your Decorations",subtitle:"You can delete your own decorations by right clicking on them.",sectionKey:"ownDecorations",items:["none",...s.filter(A=>!b.some(F=>F.hash===A.hash)),"create"]},...v.map(A=>({title:A.name,subtitle:A.description||void 0,sectionKey:`preset-${A.id}`,items:A.decorations,authorIds:A.authorIds}))];return n(ye,{...e,size:"dynamic",className:qi.modal},n(Le,{separator:!1,className:Ee("modal-header")},n(V,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Change Decoration"),n(pt,{onClick:e.onClose})),n(ke,{className:Ee("change-decoration-modal-content"),scrollbarType:"none"},n(_,null,n(fm,{renderItem:A=>{if(typeof A=="string")switch(A){case"none":return n(um,{className:Ee("change-decoration-modal-decoration"),isSelected:p===null,onSelect:()=>o(null)});case"create":return n(ne,{text:"You already have a decoration pending review",shouldShow:h},F=>n(cm,{className:Ee("change-decoration-modal-decoration"),...F,onSelect:h?()=>{}:Yi.store.agreedToGuidelines?nc:JS}))}else return n(ne,{text:"Pending review",shouldShow:A.reviewed===!1},F=>n(dm,{...F,className:Ee("change-decoration-modal-decoration"),onSelect:A.reviewed!==!1?()=>o(A):()=>{},isSelected:p?.hash===A.hash,decoration:A}))},getItemKey:A=>typeof A=="string"?A:A.hash,getSectionKey:A=>A.sectionKey,renderSectionHeader:A=>n(GR,{section:A}),sections:R}),n("div",{className:Ee("change-decoration-modal-preview")},n(oc,{avatarDecorationOverride:i,user:E.getCurrentUser()}),w&&n(S.FormTitle,{className:""},"Part of the ",M.name," Preset"),typeof p=="object"&&n(V,{variant:"text-sm/semibold",color:"header-primary"},p?.alt),d&&n(V,{key:`createdBy-${p.authorId}`},"Created by ",Pe.parse(`<@${p.authorId}>`))))),n(ct,{className:Q(Ee("change-decoration-modal-footer",Ee("modal-footer")))},n("div",{className:Ee("change-decoration-modal-footer-btn-container")},n(k,{onClick:()=>{u(t).then(e.onClose)},disabled:!r},"Apply"),n(k,{onClick:e.onClose,color:k.Colors.PRIMARY,look:k.Looks.LINK},"Cancel")),n("div",{className:Ee("change-decoration-modal-footer-btn-container")},n(k,{onClick:()=>et.show({title:"Log Out",body:"Are you sure you want to log out of Decor?",confirmText:"Log Out",confirmColor:Ee("danger-btn"),cancelText:"Cancel",onConfirm(){mr.getState().remove(E.getCurrentUser().id),e.onClose()}}),color:k.Colors.PRIMARY,look:k.Looks.LINK},"Log Out"),n(ne,{text:"Join Decor's Discord Server for notifications on your decoration's review, and when new presets are released"},A=>n(k,{...A,onClick:async()=>{ae.getGuild(ji)?(e.onClose(),B.dispatch({type:"LAYER_POP_ALL"}),qo.transitionToGuild(ji)):await Qr(sa)&&(dn(),B.dispatch({type:"LAYER_POP_ALL"}))},color:k.Colors.PRIMARY,look:k.Looks.LINK},"Discord Server")))))}var UR,hm,VS=g(()=>{"use strict";a();le();Ut();mt();ot();we();Ze();H();T();Vl();dr();aa();Wi();tc();rc();fr();ii();WS();qS();YS();XS();gm();QS();UR=Ne("defaultRenderUser","showDefaultAvatarsForNullUsers");hm=()=>Ki().then(()=>de(e=>n(HR,{...e})))});function ca({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let r=mr(),{selectedDecoration:i,select:s,fetch:l}=yn();return se(()=>{r.isAuthorized()&&l()},[r.token]),n(zR,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&Ee("section-remove-margin")},n(fe,null,n(k,{onClick:()=>{r.isAuthorized()?hm():r.authorize().then(hm).catch(()=>{})},size:k.Sizes.SMALL},"Change Decoration"),i&&r.isAuthorized()&&n(k,{onClick:()=>s(null),color:k.Colors.PRIMARY,size:k.Sizes.SMALL,look:k.Looks.LINK},"Remove Decoration")))}var zR,ym=g(()=>{"use strict";a();Ut();H();T();aa();Wi();fr();VS();zR=Go(".customizationSectionBackground")});var Yi,rc=g(()=>{"use strict";a();$();To();ot();we();Ze();I();T();ym();Yi=N({changeDecoration:{type:6,description:"Change your avatar decoration",component(){return Vencord.Plugins.plugins.Decor.started?n("div",null,n(ca,{hideTitle:!0,hideDivider:!0,noMargin:!0}),n(S.FormText,{type:"description",className:Q(j.top8,j.bottom8)},"You can also access Decor decorations from the ",n(je,{href:"/settings/profile-customization",onClick:e=>{e.preventDefault(),dn(),B.dispatch({type:"USER_SETTINGS_MODAL_SET_SECTION",section:"Profile Customization"})}},"Profiles")," page.")):n(S.FormText,null,"Enable Decor and restart your client to change your avatar decoration.")}},agreedToGuidelines:{type:3,description:"Agreed to guidelines",hidden:!0,default:!1}})});var jR,vm,eb=g(()=>{"use strict";a();DS();le();P();I();H();T();dr();aa();Wi();am();rc();ii();ym();({isAnimatedAvatarDecoration:jR}=x("isAnimatedAvatarDecoration")),vm=y({name:"Decor",description:"Create and use your own custom avatar decorations, or pick your favorite from the presets.",authors:[m.FieryFlames],patches:[{find:"getAvatarDecorationURL:",replacement:{match:/(?<=function \i\(\i\){)(?=let{avatarDecoration)/,replace:"const vcDecorDecoration=$self.getDecorAvatarDecorationURL(arguments[0]);if(vcDecorDecoration)return vcDecorDecoration;"}},{find:"DefaultCustomizationSections",replacement:{match:/(?<=USER_SETTINGS_AVATAR_DECORATION},"decoration"\),)/,replace:"$self.DecorSection(),"}},{find:".decorationGridItem",replacement:[{match:/(?<==)\i=>{let{children.{20,100}decorationGridItem/,replace:"$self.DecorationGridItem=$&"},{match:/(?<==)\i=>{let{user:\i,avatarDecoration.{300,600}decorationGridItemChurned/,replace:"$self.DecorationGridDecoration=$&"},{match:/(?<=\.Section\.PREMIUM_PURCHASE&&\i;if\()(?<=avatarDecoration:(\i).+?)/,replace:"$1.skuId===$self.SKU_ID||"}]},{find:"isAvatarDecorationAnimating:",group:!0,replacement:[{match:/(?<=TryItOut:\i,guildId:\i}\),)(?<=user:(\i).+?)/,replace:"vcDecorAvatarDecoration=$self.useUserDecorAvatarDecoration($1),"},{match:/(?<={avatarDecoration:).{1,20}?(?=,)(?<=avatarDecorationOverride:(\i).+?)/,replace:"$1??vcDecorAvatarDecoration??($&)"},{match:/(?<=size:\i}\),\[)/,replace:"vcDecorAvatarDecoration,"}]},{find:"renderAvatarWithPopout(){",replacement:[{match:/(?<=getAvatarDecorationURL\)\({avatarDecoration:)(\i).avatarDecoration(?=,)/,replace:"$self.useUserDecorAvatarDecoration($1)??$&"}]}],settings:Yi,flux:{CONNECTION_OPEN:()=>{mr.getState().init(),yn.getState().clear(),Dn.getState().fetch(E.getCurrentUser().id,!0)},USER_PROFILE_MODAL_OPEN:e=>{Dn.getState().fetch(e.userId,!0)}},set DecorationGridItem(e){zS(e)},set DecorationGridDecoration(e){jS(e)},SKU_ID:ri,useUserDecorAvatarDecoration:GS,async start(){Dn.getState().fetch(E.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===ri){let o=e.asset.split("_");return jR(e.asset)&&!t&&o.shift(),`${ES}/${o.join("_")}.png`}else if(e?.skuId===Jl)return e.asset},DecorSection:_.wrap(ca)})});var Sm,tb=g(()=>{"use strict";a();$();P();I();$s("DisableCallIdle","DisableDMCallIdle");Sm=y({name:"DisableCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes and being moved to an AFK voice channel.",authors:[m.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/,?(?=this\.idleTimeout=new \i\.Timeout)/,replace:";return;"}},{find:"handleIdleUpdate(){",replacement:{match:/(?<=_initialize\(\){)/,replace:"return;"}}]})});function bm(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}`:`${window.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${e.id}.${KR[e.format_type]}`}async function ob(e){let t=WR.getStickerById(e);if(t)return t;let{body:o}=await _t.get({url:`/stickers/${e}`});return B.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function YR(e,t){let o=new FormData;o.append("name",t.name),o.append("tags",t.tags),o.append("description",t.description),o.append("file",await nb(bm(t)));let{body:r}=await _t.post({url:`/guilds/${e}/stickers`,body:o});B.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:E.getCurrentUser()}})}async function ZR(e,t){let o=await nb(bm(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return qR.uploadEmoji({guildId:e,name:t.name.split("~")[0],image:r})}function XR(e){let t=E.getCurrentUser().id;return Object.values(ae.getGuilds()).filter(o=>{if(!(o.ownerId===t||(_e.getGuildPermissions({id:o.id})&me.CREATE_GUILD_EXPRESSIONS)===me.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=o.getMaxEmojiSlots(),{emojis:l}=jo.getGuilds()[o.id],c=0;for(let u of l)u.animated===i&&c++;return co.name.localeCompare(r.name))}async function nb(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function JR(e,t){try{t.t==="Sticker"?await YR(e,t):await ZR(e,t),X.show({message:`Successfully cloned ${t.name} to ${ae.getGuild(e)?.name??"your server"}!`,type:X.Type.SUCCESS,id:X.genId()})}catch(o){let r="Something went wrong (check console!)";try{r=JSON.parse(o.text).message}catch{}new oe("EmoteCloner").error("Failed to clone",t.name,"to",e,o),X.show({message:"Failed to clone: "+r,type:X.Type.FAILURE,id:X.genId()})}}function ek({data:e}){let[t,o]=U.useState(!1),[r,i]=U.useState(e.name),[s,l]=U.useReducer(u=>u+1,0),c=U.useMemo(()=>XR(e),[e.id,s]);return n(f,null,n(S.FormTitle,{className:j.top20},"Custom Name"),n(Wl,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&VR.test(u)||e.t==="Sticker"&&u.length>2&&u.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),n("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},c.map(u=>n(ne,{text:u.name},({onMouseLeave:p,onMouseEnter:d})=>n("div",{onMouseLeave:p,onMouseEnter:d,role:"button","aria-label":"Clone to "+u.name,"aria-disabled":t,style:{borderRadius:"50%",backgroundColor:"var(--background-secondary)",display:"inline-flex",justifyContent:"center",alignItems:"center",width:"4em",height:"4em",cursor:t?"not-allowed":"pointer",filter:t?"brightness(50%)":"none"},onClick:t?void 0:async()=>{o(!0),JR(u.id,e).finally(()=>{l(),o(!1)})}},u.icon?n("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:u.getIconURL(512,!0),alt:u.name}):n(S.FormText,{style:{fontSize:QR(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function ic(e,t){return n(L.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>Hr(async()=>{let o=await t(),r={t:e,...o},i=bm(r);return s=>n(ye,{...s},n(Le,null,n("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),n(S.FormText,null,"Clone ",r.name)),n(ke,null,n(ek,{data:r})))})})}function rb(e){return new URL(e).pathname.endsWith(".gif")}var WR,qR,KR,QR,VR,tk,ok,Tm,ib=g(()=>{"use strict";a();Eo();gd();P();Ke();ot();Ze();I();H();T();WR=Re("StickersStore"),qR=x("fetchEmoji","uploadEmoji","deleteEmoji"),KR=[,"png","png","json","gif"];QR=e=>[20,20,18,18,16,14,12][e.length]??4,VR=/^\w+$/i;tk=(e,t)=>{let{favoriteableId:o,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!o)return;let l=(()=>{switch(s){case"emoji":let c=t.message.content.match(RegExp(`|https://cdn\\.discordapp\\.com/emojis/${o}\\.`));if(!c)return;let u=c[1]??"FakeNitroEmoji";return ic("Emoji",()=>({id:o,name:u,isAnimated:rb(r??i)}));case"sticker":return t.message.stickerItems.find(d=>d.id===o)?.format_type===3?void 0:ic("Sticker",()=>ob(o))}})();l&&ut("copy-link",e)?.push(l)},ok=(e,t)=>{let{id:o,name:r,type:i}=t?.target?.dataset??{};if(!!o)if(i==="emoji"&&r){let s=t.target.firstChild;e.push(ic("Emoji",()=>({id:o,name:r,isAnimated:s&&rb(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(ic("Sticker",()=>ob(o)))},Tm=y({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[m.Ven,m.Nuckyz],contextMenus:{message:tk,"expression-picker":ok}})});var wm,sb,xm,ab=g(()=>{"use strict";a();$();le();Pi();P();ot();I();H();T();wm=x("key","removeBuildOverride"),sb=N({enableIsStaff:{description:"Enable isStaff",type:3,default:!1,restartNeeded:!0}}),xm=y({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[m.Megu,m.Ven,m.Nickyux,m.BanTheNons,m.Nuckyz],settings:sb,patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+?,get:\(\)=>)\i/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/!(\i)&&"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}},{find:".isStaff=()",predicate:()=>sb.store.enableIsStaff,replacement:[{match:/=>*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,replace:(e,t,o)=>`=>Vencord.Webpack.Common.UserStore.getCurrentUser()?.id===${t}.id||${t}.hasFlag(${o}.STAFF)}`},{match:/hasFreePremium\(\){return this.isStaff\(\)\s*?\|\|/,replace:"hasFreePremium(){return "}]},{find:'H1,title:"Experiments"',replacement:{match:'title:"Experiments",children:[',replace:"$&$self.WarningCard(),"}}],settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",o=e?"opt":"alt";return n(U.Fragment,null,n(S.FormTitle,{tag:"h3"},"More Information"),n(S.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",n("kbd",{className:wm.key},t)," +"," ",n("kbd",{className:wm.key},o)," +"," ",n("kbd",{className:wm.key},"O")," ","after enabling ",n("code",null,"isStaff")," below"),n(S.FormText,null,"and then toggling ",n("code",null,"Enable DevTools")," in the ",n("code",null,"Developer Options")," tab in settings."))},WarningCard:_.wrap(()=>n(Ro,{id:"vc-experiments-warning-card",className:j.bottom16},n(S.FormTitle,{tag:"h2"},"Hold on!!"),n(S.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),n(S.FormText,{className:j.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments.")),{noop:!0})})});var Mm,lb=g(()=>{"use strict";a();P();I();Mm=y({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[m.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var cb=g(()=>{"use strict";a()});var pb=kr((SW,ub)=>{"use strict";a();var Ln=ub.exports;(function e(t,o,r){function i(c,u){if(!o[c]){if(!t[c]){var p=typeof fi=="function"&&fi;if(!u&&p)return p(c,!0);if(s)return s(c,!0);throw new Error("Cannot find module '"+c+"'")}var d=o[c]={exports:{}};t[c][0].call(d.exports,function(h){var v=t[c][1][h];return i(v||h)},d,d.exports,e,t,o,r)}return o[c].exports}for(var s=typeof fi=="function"&&fi,l=0;l"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",R=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function A(){var D=setTimeout;return function(){return D(z,1)}}var F=new Array(1e3);function z(){for(var D=0;Di+r.playTime;)i+=r.playTime;i+=M.delay}else u=!(c=!1)}}},{}],4:[function(e,t,o){"use strict";for(var r=new Uint32Array(256),i=0;i<256;i++){for(var s=i,l=0;l<8;l++)s=1&s?3988292384^s>>>1:s>>>1;r[i]=s}t.exports=function(c,u,p){for(var d=-1,h=u=u||0,v=u+(p=p||c.length-u);h>>8^r[255&(d^c[h])];return-1^d}},{}],5:[function(e,t,o){(function(r){"use strict";var i=e("./support-test"),s=e("./parser"),l=e("./loader"),c=r.APNG={};c.checkNativeFeatures=i.checkNativeFeatures,c.ifNeeded=i.ifNeeded,c.parseBuffer=function(p){return s(p)};var u={};c.parseURL=function(p){return p in u||(u[p]=l(p).then(s)),u[p]},c.animateContext=function(p,d){return c.parseURL(p).then(function(h){return h.addContext(d),h.play(),h})},c.animateImage=function(p){return p.setAttribute("data-is-apng","progress"),c.parseURL(p.src).then(function(d){p.setAttribute("data-is-apng","yes");var h=document.createElement("canvas");h.width=d.width,h.height=d.height,Array.prototype.slice.call(p.attributes).forEach(function(R){["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(R.nodeName)==-1&&h.setAttributeNode(R.cloneNode(!1))}),h.setAttribute("data-apng-src",p.src),p.alt!=""&&h.appendChild(document.createTextNode(p.alt));var v="",b="",M=0,w="";p.style.width!=""&&p.style.width!="auto"?v=p.style.width:p.hasAttribute("width")&&(v=p.getAttribute("width")+"px"),p.style.height!=""&&p.style.height!="auto"?b=p.style.height:p.hasAttribute("height")&&(b=p.getAttribute("height")+"px"),v!=""&&b==""&&(M=parseFloat(v),w=v.match(/\D+$/)[0],b=Math.round(h.height*M/h.width)+w),b!=""&&v==""&&(M=parseFloat(b),w=b.match(/\D+$/)[0],v=Math.round(h.width*M/h.height)+w),h.style.width=v,h.style.height=b;var C=p.parentNode;C.insertBefore(h,p),C.removeChild(p),d.addContext(h.getContext("2d")),d.play()},function(){p.setAttribute("data-is-apng","no")})},c.releaseCanvas=function(p){var d=p.getContext("2d");"_apng_animation"in d&&d._apng_animation.removeContext(d)}}).call(this,typeof Ln<"u"?Ln:typeof window<"u"?window:{})},{"./loader":6,"./parser":7,"./support-test":8}],6:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise;t.exports=function(i){return new r(function(s,l){var c=new XMLHttpRequest;c.open("GET",i),c.responseType="arraybuffer",c.onload=function(){this.status==200?s(this.response):l(this)},c.send()})}},{"es6-promise":1}],7:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise,i=e("./animation"),s=e("./crc32"),l=new Uint8Array([137,80,78,71,13,10,26,10]);t.exports=function(w){var C=new Uint8Array(w);return new r(function(R,A){for(var F=0;F>>0;for(var A=1;A<4;A++)R+=w[A+C]<<8*(3-A);return R},p=function(w,C){for(var R=0,A=0;A<2;A++)R+=w[A+C]<<8*(1-A);return R},d=function(w,C){return w[C]},h=function(w,C,R){var A=new Uint8Array(R);return A.set(w.subarray(C,C+R)),A},v=function(w,C,R){var A=Array.prototype.slice.call(w.subarray(C,C+R));return String.fromCharCode.apply(String,A)},b=function(w){return[w>>>24&255,w>>>16&255,w>>>8&255,255&w]},M=function(w,C){var R=w.length+C.length,A=new Uint8Array(new ArrayBuffer(R+8));A.set(b(C.length),0),A.set(function(z){for(var Y=[],J=0;J{"use strict";a();Uo();cb();db=Jn(()=>pb().APNG),nk="https://unpkg.com/@sapphi-red/web-noise-suppressor@0.3.3/dist",IW=`${nk}/rnnoise/workletProcessor.js`,mb="https://unpkg.com/@vap/shiki-worker@0.0.8/dist/index.min.js",fb="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm",gb=Jn(()=>import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"))});var Rm=kr(Cm=>{a();var Sb=Object.defineProperty,rk=e=>Sb(e,"__esModule",{value:!0}),ik=(e,t)=>{for(var o in t)Sb(e,o,{get:t[o],enumerable:!0})};rk(Cm);ik(Cm,{GIFEncoder:()=>Pb,applyPalette:()=>fk,default:()=>Mk,nearestColor:()=>vk,nearestColorIndex:()=>Mb,nearestColorIndexWithDistance:()=>Ib,prequantize:()=>mk,quantize:()=>pk,snapColorsToPalette:()=>yk});var sk={signature:"GIF",version:"89a",trailer:59,extensionIntroducer:33,applicationExtensionLabel:255,graphicControlExtensionLabel:249,imageSeparator:44,signatureSize:3,versionSize:3,globalColorTableFlagMask:128,colorResolutionMask:112,sortFlagMask:8,globalColorTableSizeMask:7,applicationIdentifierSize:8,applicationAuthCodeSize:3,disposalMethodMask:28,userInputFlagMask:2,transparentColorFlagMask:1,localColorTableFlagMask:128,interlaceFlagMask:64,idSortFlagMask:32,localColorTableSizeMask:7};function bb(e=256){let t=0,o=new Uint8Array(e);return{get buffer(){return o.buffer},reset(){t=0},bytesView(){return o.subarray(0,t)},bytes(){return o.slice(0,t)},writeByte(i){r(t+1),o[t]=i,t++},writeBytes(i,s=0,l=i.length){r(t+l);for(let c=0;c=i)return;var l=1024*1024;i=Math.max(i,s*(s>>0),s!=0&&(i=Math.max(i,256));let c=o;o=new Uint8Array(i),t>0&&o.set(c.subarray(0,t),0)}}var Im=12,hb=5003,ak=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function lk(e,t,o,r,i=bb(512),s=new Uint8Array(256),l=new Int32Array(hb),c=new Int32Array(hb)){let u=l.length,p=Math.max(2,r);s.fill(0),c.fill(0),l.fill(-1);let d=0,h=0,v=p+1,b=v,M=!1,w=b,C=(1<=0;)if(ue-=Ue,ue<0&&(ue+=u),l[ue]===Se){Y=c[ue];break e}O(Y),Y=re,F<1<0?d|=te<=8;)s[z++]=d&255,z>=254&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0),d>>=8,h-=8;if((F>C||M)&&(M?(w=b,C=(1<0;)s[z++]=d&255,z>=254&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0),d>>=8,h-=8;z>0&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0)}}}var ck=lk;function Tb(e,t,o){return e<<8&63488|t<<2&992|o>>3}function wb(e,t,o,r){return e>>4|t&240|(o&240)<<4|(r&240)<<8}function xb(e,t,o){return e>>4<<8|t&240|o>>4}function ac(e,t,o){return eo?o:e}function ua(e){return e*e}function yb(e,t,o){var r=0,i=1e100;let s=e[t],l=s.cnt,c=s.ac,u=s.rc,p=s.gc,d=s.bc;for(var h=s.fw;h!=0;h=e[h].fw){let b=e[h],M=b.cnt,w=l*M/(l+M);if(!(w>=i)){var v=0;o&&(v+=w*ua(b.ac-c),v>=i)||(v+=w*ua(b.rc-u),!(v>=i)&&(v+=w*ua(b.gc-p),!(v>=i)&&(v+=w*ua(b.bc-d),!(v>=i)&&(i=v,r=h))))}}s.err=i,s.nn=r}function Pm(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function uk(e,t){let o=t==="rgb444"?4096:65536,r=new Array(o),i=e.length;if(t==="rgba4444")for(let s=0;s>24&255,u=l>>16&255,p=l>>8&255,d=l&255,h=wb(d,p,u,c),v=h in r?r[h]:r[h]=Pm();v.rc+=d,v.gc+=p,v.bc+=u,v.ac+=c,v.cnt++}else if(t==="rgb444")for(let s=0;s>16&255,u=l>>8&255,p=l&255,d=xb(p,u,c),h=d in r?r[d]:r[d]=Pm();h.rc+=p,h.gc+=u,h.bc+=c,h.cnt++}else for(let s=0;s>16&255,u=l>>8&255,p=l&255,d=Tb(p,u,c),h=d in r?r[d]:r[d]=Pm();h.rc+=p,h.gc+=u,h.bc+=c,h.cnt++}return r}function pk(e,t,o={}){let{format:r="rgb565",clearAlpha:i=!0,clearAlphaColor:s=0,clearAlphaThreshold:l=0,oneBitAlpha:c=!1}=o;if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let u=new Uint32Array(e.buffer),p=o.useSqrt!==!1,d=r==="rgba4444",h=uk(u,r),v=h.length,b=v-1,M=new Uint32Array(v+1);for(var w=0,R=0;R1&&(z=F>>1,!(h[A=M[z]].err<=Y));F=z)M[F]=A;M[F]=R}var J=w-t;for(R=0;R=Z.mtm&&h[Z.nn].mtm<=Z.tm)break;Z.mtm==b?O=M[1]=M[M[0]--]:(yb(h,O,!1),Z.tm=R);var Y=h[O].err;for(F=1;(z=F+F)<=M[0]&&(zh[M[z+1]].err&&z++,!(Y<=h[A=M[z]].err));F=z)M[F]=A;M[F]=O}var te=h[Z.nn],re=Z.cnt,Se=te.cnt,C=1/(re+Se);d&&(Z.ac=C*(re*Z.ac+Se*te.ac)),Z.rc=C*(re*Z.rc+Se*te.rc),Z.gc=C*(re*Z.gc+Se*te.gc),Z.bc=C*(re*Z.bc+Se*te.bc),Z.cnt+=te.cnt,Z.mtm=++R,h[te.bk].fw=te.fw,h[te.fw].bk=te.bk,te.mtm=b}let ue=[];var Ue=0;for(R=0;;++Ue){let be=ac(Math.round(h[R].rc),0,255),Me=ac(Math.round(h[R].gc),0,255),De=ac(Math.round(h[R].bc),0,255),Oe=255;d&&(Oe=ac(Math.round(h[R].ac),0,255),c&&(Oe=Oe<=(typeof c=="number"?c:127)?0:255),i&&Oe<=l&&(be=Me=De=s,Oe=0));let Ae=d?[be,Me,De,Oe]:[be,Me,De];if(dk(ue,Ae)||ue.push(Ae),(R=h[R].fw)==0)break}return ue}function dk(e,t){for(let o=0;o=4&&t.length>=4?r[3]===t[3]:!0;if(i&&s)return!0}return!1}function cc(e,t){var o=0,r;for(r=0;r1?Math.round(e/t)*t:e}function mk(e,{roundRGB:t=5,roundAlpha:o=10,oneBitAlpha:r=null}={}){let i=new Uint32Array(e.buffer);for(let s=0;s>24&255,u=l>>16&255,p=l>>8&255,d=l&255;c=lc(c,o),r&&(c=c<=(typeof r=="number"?r:127)?0:255),d=lc(d,t),p=lc(p,t),u=lc(u,t),i[s]=c<<24|u<<16|p<<8|d<<0}}function fk(e,t,o="rgb565"){if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(t.length>256)throw new Error("applyPalette() only works with 256 colors or less");let r=new Uint32Array(e.buffer),i=r.length,s=o==="rgb444"?4096:65536,l=new Uint8Array(i),c=new Array(s),u=o==="rgba4444";if(o==="rgba4444")for(let p=0;p>24&255,v=d>>16&255,b=d>>8&255,M=d&255,w=wb(M,b,v,h),C=w in c?c[w]:c[w]=gk(M,b,v,h,t);l[p]=C}else{let p=o==="rgb444"?xb:Tb;for(let d=0;d>16&255,b=h>>8&255,M=h&255,w=p(M,b,v),C=w in c?c[w]:c[w]=hk(M,b,v,t);l[d]=C}}return l}function gk(e,t,o,r,i){let s=0,l=1e100;for(let c=0;cl)continue;let h=u[0];if(d+=si(h-e),d>l)continue;let v=u[1];if(d+=si(v-t),d>l)continue;let b=u[2];d+=si(b-o),!(d>l)&&(l=d,s=c)}return s}function hk(e,t,o,r){let i=0,s=1e100;for(let l=0;ls)continue;let d=c[1];if(p+=si(d-t),p>s)continue;let h=c[2];p+=si(h-o),!(p>s)&&(s=p,i=l)}return i}function yk(e,t,o=5){if(!e.length||!t.length)return;let r=e.map(l=>l.slice(0,3)),i=o*o,s=e[0].length;for(let l=0;ls?c=c.slice(0,3):c=c.slice();let u=Ib(r,c.slice(0,3),cc),p=u[0],d=u[1];d>0&&d<=i&&(e[p]=c)}}function si(e){return e*e}function Mb(e,t,o=cc){let r=1/0,i=-1;for(let s=0;s=0&&Tk(r,A)}let J=Math.round(C/10);Sk(r,z,J,M,w);let Z=Boolean(R)&&!Y;wk(r,h,v,Z?R:null),Z&&vb(r,R),xk(r,d,h,v,F,s,l,c)}};function p(){Ab(r,"GIF89a")}}function Sk(e,t,o,r,i){e.writeByte(33),e.writeByte(249),e.writeByte(4),i<0&&(i=0,r=!1);var s,l;r?(s=1,l=2):(s=0,l=0),t>=0&&(l=t&7),l<<=2;let c=0;e.writeByte(0|l|c|s),gr(e,o),e.writeByte(i||0),e.writeByte(0)}function bk(e,t,o,r,i=8){let c=Am(r.length)-1,u=1<<7|i-1<<4|0<<3|c,p=0,d=0;gr(e,t),gr(e,o),e.writeBytes([u,p,d])}function Tk(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),Ab(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),gr(e,t),e.writeByte(0)}function vb(e,t){let o=1<>8&255)}function Ab(e,t){for(var o=0;oi.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}function dc(e,t){let o=ee.getChannel(e);return!o||o.isPrivate()?!0:_e.can(t,o)}var Zi,Ik,ai,pa,Cb,da,hr,uc,km,Nm,pc,Rb,Xe,kb,Pk,Nb,Ak,Dm,Lb=g(()=>{"use strict";a();gn();$();P();sc();mt();Ke();I();H();T();Zi=Ka(Rm()),Ik=0,ai=Re("StickersStore"),pa=Re("UserSettingsProtoStore"),Cb=x("BINARY_READ_OPTIONS");da=go(()=>ws.PreloadedUserSettingsActionCreators),hr=go(()=>Db("appearance",da.ProtoClass)),uc=go(()=>Db("clientThemeSettings",hr)),km=/\/emojis\/(\d+?)\.(png|webp|gif)/,Nm=/\/stickers\/(\d+?)\./,pc=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,Rb=/\[.+?\]\((https?:\/\/.+?)\)/,Xe=N({enableEmojiBypass:{description:"Allow sending fake emojis",type:3,default:!0,restartNeeded:!0},emojiSize:{description:"Size of the emojis when sending",type:5,default:48,markers:[32,48,64,128,160,256,512]},transformEmojis:{description:"Whether to transform fake emojis into real ones",type:3,default:!0,restartNeeded:!0},enableStickerBypass:{description:"Allow sending fake stickers",type:3,default:!0,restartNeeded:!0},stickerSize:{description:"Size of the stickers when sending",type:5,default:160,markers:[32,64,128,160,256,512]},transformStickers:{description:"Whether to transform fake stickers into real ones",type:3,default:!0,restartNeeded:!0},transformCompoundSentence:{description:"Whether to transform fake stickers and emojis in compound sentences (sentences with more content than just the fake emoji or sticker link)",type:3,default:!1},enableStreamQualityBypass:{description:"Allow streaming in nitro quality",type:3,default:!0,restartNeeded:!0},useHyperLinks:{description:"Whether to use hyperlinks when sending fake emojis and stickers",type:3,default:!0},hyperLinkText:{description:"What text the hyperlink should use. {{NAME}} will be replaced with the emoji/sticker name.",type:0,default:"{{NAME}}"}}).withPrivateSettings();kb=e=>dc(e,me.USE_EXTERNAL_EMOJIS),Pk=e=>dc(e,me.USE_EXTERNAL_STICKERS),Nb=e=>dc(e,me.EMBED_LINKS),Ak=e=>dc(e,me.ATTACH_FILES),Dm=y({name:"FakeNitro",authors:[m.Arjix,m.D3SOX,m.Ven,m.fawn,m.captain,m.Nuckyz,m.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers and use client themes.",dependencies:["MessageEventsAPI"],settings:Xe,patches:[{find:".PREMIUM_LOCKED;",predicate:()=>Xe.store.enableEmojiBypass,replacement:[{match:/(?<=,intention:(\i).+?;)/,replace:(e,t)=>`let fakeNitroIntention=${t};`},{match:/\.(?:canUseEmojisEverywhere|canUseAnimatedEmojis)\(\i(?=\))/g,replace:'$&,typeof fakeNitroIntention!=="undefined"?fakeNitroIntention:void 0'},{match:/(&&!\i&&)!(\i)(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/,replace:(e,t,o)=>`${t}(!${o}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention)))`},{match:/if\(!\i\.available/,replace:e=>`${e}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention))`}]},{find:"canUseAnimatedEmojis:function",predicate:()=>Xe.store.enableEmojiBypass,replacement:{match:/((?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\(\i)\){(.+?\))(?=})/g,replace:(e,t,o)=>`${t},fakeNitroIntention){${o}||fakeNitroIntention==null||[${3},${4}].includes(fakeNitroIntention)`}},{find:"canUseCustomStickersEverywhere:function",predicate:()=>Xe.store.enableStickerBypass,replacement:{match:/canUseCustomStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>Xe.store.enableStickerBypass,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canUseHighVideoUploadQuality:function",predicate:()=>Xe.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i(?:,\\i)?\\){`,"g"),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>Xe.store.enableStreamQualityBypass,replacement:{match:/guildPremiumTier:\i\.\i\.TIER_\d,?/g,replace:""}},{find:"canUseClientThemes:function",replacement:{match:/canUseClientThemes:function\(\i\){/,replace:"$&return true;"}},{find:'.displayName="UserSettingsProtoStore"',replacement:[{match:/CONNECTION_OPEN:function\((\i)\){/,replace:(e,t)=>`${e}$self.handleProtoChange(${t}.userSettingsProto,${t}.user);`},{match:/let{settings:/,replace:"arguments[0].local||$self.handleProtoChange(arguments[0].settings.proto);$&"}]},{find:",updateTheme(",replacement:{match:/(function \i\(\i\){let{backgroundGradientPresetId:(\i).+?)(\i\.\i\.updateAsync.+?theme=(.+?),.+?},\i\))/,replace:(e,t,o,r,i)=>`${t}$self.handleGradientThemeSelect(${o},${i},()=>${r});`}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>Xe.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Xe.store.transformEmojis||Xe.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"renderEmbeds(",replacement:[{predicate:()=>Xe.store.transformEmojis||Xe.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\((\i)=>{)/,replace:(e,t,o,r,i)=>`${t}const fakeNitroMessage=${o};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>Xe.store.transformStickers,match:/(?<=renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;)/,replace:(e,t,o)=>`${o}=$self.patchFakeNitroStickers(${o},${t});`},{predicate:()=>Xe.store.transformStickers,match:/renderAttachments\(\i\){let{attachments:(\i).+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:".Messages.STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format",predicate:()=>Xe.store.transformStickers,replacement:[{match:/let{renderableSticker:(\i).{0,250}isGuildSticker.+?channel:\i,/,replace:(e,t)=>`${e}fakeNitroRenderableSticker:${t},`},{match:/(let \i,{sticker:\i,channel:\i,closePopout:\i.+?}=(\i).+?;)(.+?description:)(\i)(?=,sticker:\i)/,replace:(e,t,o,r,i)=>`${t}let{fakeNitroRenderableSticker}=${o};${r}$self.addFakeNotice(${0},${i},!!fakeNitroRenderableSticker?.fake)`}]},{find:".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",predicate:()=>Xe.store.transformEmojis,replacement:{match:/isDiscoverable:\i,shouldHideRoleSubscriptionCTA:\i,(?<={node:(\i),.+?)/,replace:(e,t)=>`${e}fakeNitroNode:${t},`}},{find:".Messages.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION",predicate:()=>Xe.store.transformEmojis,replacement:{match:/(?<=emojiDescription:)(\i)(?<=\1=\i\((\i)\).+?)/,replace:(e,t,o)=>`$self.addFakeNotice(${1},${t},!!${o}?.fakeNitroNode?.fake)`}},{find:"canUsePremiumAppIcons:function",replacement:{match:/canUsePremiumAppIcons:function\(\i\){/,replace:"$&return true;"}},{find:".FreemiumAppIconIds.DEFAULT&&(",replacement:{match:/\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/,replace:"true"}}],get guildId(){return Js()?.id},get canUseEmotes(){return(E.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(E.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){if(e==null||typeof e=="string"||!pa||!da||!hr||!uc)return;if((t?.premium_type??E?.getCurrentUser()?.premiumType??0)!==2){if(e.appearance??=hr.create(),pa.settings.appearance?.theme!=null){let r=hr.create({theme:pa.settings.appearance.theme});e.appearance.theme=r.theme}if(pa.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=uc.create({backgroundGradientPresetId:{value:pa.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}}},handleGradientThemeSelect(e,t,o){if((E?.getCurrentUser()?.premiumType??0)===2||e==null)return o();if(!da||!hr||!uc||!Cb)return;let i=da.getCurrentValue().appearance,s=i!=null?hr.fromBinary(hr.toBinary(i),Cb.BINARY_READ_OPTIONS):hr.create();s.theme=t;let l=uc.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=da.ProtoClass.create();c.appearance=s,B.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:c}})},trimContent(e){let t=e[0];typeof t=="string"?(e[0]=t.trimStart(),e[0]||e.shift()):typeof t?.props?.children=="string"&&(t.props.children=t.props.children.trimStart(),t.props.children||e.shift());let o=e.length-1,r=e[o];typeof r=="string"?(e[o]=r.trimEnd(),e[o]||e.pop()):typeof r?.props?.children=="string"&&(r.props.children=r.props.children.trimEnd(),r.props.children||e.pop())},clearEmptyArrayItems(e){return e.filter(t=>t!=null)},ensureChildrenIsArray(e){Array.isArray(e.props.children)||(e.props.children=[e.props.children])},patchFakeNitroEmojisOrRemoveStickersLinks(e,t){if((e.length>1||typeof e[0]?.type=="string")&&!Xe.store.transformCompoundSentence)return e;let o=e.length,r=c=>{if(Xe.store.transformEmojis){let u=c.props.href.match(km);if(u){let p=null;try{p=new URL(c.props.href)}catch{}let d=jo.getCustomEmojiById(u[1])?.name??p?.searchParams.get("name")??"FakeNitroEmoji";return Pe.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:u[2]==="gif",emojiId:u[1],name:d,fake:!0},void 0,{key:String(o++)})}}if(Xe.store.transformStickers){if(Nm.test(c.props.href))return null;let u=c.props.href.match(pc);if(u&&ai.getStickerById(u[1]))return null}return c},i=c=>c?.props?.trusted!=null?r(c):c?.props?.children!=null?Array.isArray(c.props.children)?(c.props.children=l(c.props.children),c.props.children.length===0?null:c):(c.props.children=s(c.props.children),c):c,s=c=>{let u=i(c);if(u?.type==="ul"||u?.type==="ol"){if(this.ensureChildrenIsArray(u),u.props.children.length===0)return null;let p=!1;for(let[d,h]of u.props.children.entries()){if(h==null){delete u.props.children[d];continue}this.ensureChildrenIsArray(h),h.props.children.length>0?p=!0:delete u.props.children[d]}if(!p)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,p]of c.entries())c[u]=s(p);return c=this.clearEmptyArrayItems(c),c};try{let c=l(Fr.cloneDeep(e));return this.trimContent(c),c}catch(c){return new oe("FakeNitro").error(c),e}},patchFakeNitroStickers(e,t){let o=[],r=t.content.split(/\s/);Xe.store.transformCompoundSentence?o.push(...r):r.length===1&&o.push(r[0]),o.push(...t.attachments.filter(i=>i.content_type==="image/gif").map(i=>i.url));for(let i of o){if(!Xe.store.transformCompoundSentence&&!i.startsWith("http")&&!Rb.test(i))continue;let s=i.match(Nm);if(s){let c=null;try{c=new URL(i)}catch{}let u=ai.getStickerById(s[1])?.name??c?.searchParams.get("name")??"FakeNitroSticker";e.push({format_type:1,id:s[1],name:u,fake:!0});continue}let l=i.match(pc);if(l){if(!ai.getStickerById(l[1]))continue;let c=ai.getStickerById(l[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:l[1],name:c,fake:!0})}}return e},shouldIgnoreEmbed(e,t){let o=t.content.split(/\s/);if(o.length>1&&!Xe.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!Xe.store.transformCompoundSentence&&!o.some(r=>r===e.url||r.match(Rb)?.[1]===e.url))return!1;if(Xe.store.transformEmojis&&km.test(e.url))return!0;if(Xe.store.transformStickers){if(Nm.test(e.url))return!0;let r=e.url.match(pc);if(r&&ai.getStickerById(r[1]))return!0}break}}return!1},filterAttachments(e){return e.filter(t=>{if(t.content_type!=="image/gif")return!0;let o=t.url.match(pc);return!(o&&ai.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&km.test(e.target)},addFakeNotice(e,t,o){if(!o)return t;switch(t=Array.isArray(t)?t:[t],e){case 0:return t.push(" This is a FakeNitro sticker and renders like a real sticker only for you. Appears as a link to non-plugin users."),t;case 1:return t.push(" This is a FakeNitro emoji and renders like a real emoji only for you. Appears as a link to non-plugin users."),t}},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${Xe.store.stickerSize}`},async sendAnimatedSticker(e,t,o){let{parseURL:r}=db(),{frames:i,width:s,height:l}=await r(e),c=(0,Zi.GIFEncoder)(),u=Xe.store.stickerSize,p=document.createElement("canvas");p.width=u,p.height=u;let d=p.getContext("2d",{willReadFrequently:!0}),h=u/Math.max(s,l);d.scale(h,h);let v;for(let M of i){let{left:w,top:C,width:R,height:A,img:F,delay:z,blendOp:Y,disposeOp:J}=M;v=d.getImageData(w,C,R,A),Y===0&&d.clearRect(w,C,R,A),d.drawImage(F,w,C,R,A);let{data:Z}=d.getImageData(0,0,u,u),O=(0,Zi.quantize)(Z,256),te=(0,Zi.applyPalette)(Z,O);c.writeFrame(te,u,u,{transparent:!0,palette:O,delay:z}),J===1?d.clearRect(w,C,R,A):J===2&&d.putImageData(v,w,C)}c.finish();let b=new File([c.bytesView()],`${t}.gif`,{type:"image/gif"});As.promptToUpload([b],ee.getChannel(o),Ik)},start(){let e=Xe.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(r,i){return!r[i]||/\s/.test(r[i])?"":" "}function o(){return new Promise(r=>{et.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You are trying to send/edit a message that contains a FakeNitro emoji or sticker, however you do not have permissions to embed links in the current channel. Are you sure you want to send this message? Your FakeNitro items will appear as a link only."),n(S.FormText,{type:S.FormText.Types.DESCRIPTION},"You can disable this notice in the plugin settings.")),confirmText:"Send Anyway",cancelText:"Cancel",secondaryConfirmText:"Do not show again",onConfirm:()=>r(!0),onCloseCallback:()=>setImmediate(()=>r(!1)),onConfirmSecondary(){Xe.store.disableEmbedPermissionCheck=!0,r(!0)}})})}this.preSend=Vt(async(r,i,s)=>{let{guildId:l}=this,c=!1;e:{if(!e.enableStickerBypass)break e;let u=ai.getStickerById(s.stickers?.[0]);if(!u||"pack_id"in u)break e;let p=this.canUseStickers&&Pk(r);if(u.available!==!1&&(p||u.guild_id===l))break e;let d=this.getStickerLink(u.id);if(u.format_type===4&&d.includes(".png")&&(d=d.replace(".png",".gif")),u.format_type===2)return Ak(r)?this.sendAnimatedSticker(d,u.id,r):et.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You cannot send this message because it contains an animated FakeNitro sticker, and you do not have permissions to attach files in the current channel. Please remove the sticker to proceed."))}),{cancel:!0};{c=!0;let h=new URL(d);h.searchParams.set("name",u.name);let v=e.hyperLinkText.replaceAll("{{NAME}}",u.name);i.content+=`${t(i.content,i.content.length-1)}${e.useHyperLinks?`[${v}](${h})`:h}`,s.stickers.length=0}}if(e.enableEmojiBypass){let u=this.canUseEmotes&&kb(r);for(let p of i.validNonShortcutEmojis){if(!p.require_colons||p.available!==!1&&u||p.guildId===l&&!p.animated)continue;c=!0;let d=`<${p.animated?"a":""}:${p.originalName||p.name}:${p.id}>`,h=new URL(p.url);h.searchParams.set("size",e.emojiSize.toString()),h.searchParams.set("name",p.name);let v=e.hyperLinkText.replaceAll("{{NAME}}",p.name);i.content=i.content.replace(d,(b,M,w)=>`${t(w,M-1)}${e.useHyperLinks?`[${v}](${h})`:h}${t(w,M+b.length)}`)}}return c&&!e.disableEmbedPermissionCheck&&!Nb(r)&&!await o()?{cancel:!0}:{cancel:!1}}),this.preEdit=ti(async(r,i,s)=>{if(!e.enableEmojiBypass)return;let{guildId:l}=this,c=!1,u=this.canUseEmotes&&kb(r);return s.content=s.content.replace(/(?/ig,(p,d,h,v)=>{let b=jo.getCustomEmojiById(d);if(b==null||!b.require_colons||b.available!==!1&&u||b.guildId===l&&!b.animated)return p;c=!0;let M=new URL(b.url);M.searchParams.set("size",e.emojiSize.toString()),M.searchParams.set("name",b.name);let w=e.hyperLinkText.replaceAll("{{NAME}}",b.name);return`${t(v,h-1)}${e.useHyperLinks?`[${w}](${M})`:M}${t(v,h+p.length)}`}),c&&!e.disableEmbedPermissionCheck&&!Nb(r)&&!await o()?{cancel:!0}:{cancel:!1}})},stop(){eo(this.preSend),oi(this.preEdit)}})});function Eb(...e){let t={};function o(i){for(let s=e.length-1;s>=0;s--)if(i in e[s])return e[s];return t}let r={ownKeys(){return e.reduce((i,s)=>(i.push(...Reflect.ownKeys(s)),i),Reflect.ownKeys(t))}};for(let i of["defineProperty","deleteProperty","get","getOwnPropertyDescriptor","has","set"])r[i]=function(s,...l){return Reflect[i](o(l[0]),...l)};return new Proxy(t,r)}var Ob,_b=g(()=>{"use strict";a();Ob=Eb;typeof module<"u"&&(module.exports=Eb)});function Ck(e,t){let o=`[#${e.toString(16).padStart(6,"0")},#${t.toString(16).padStart(6,"0")}]`,r="",i=Array.from(o).map(s=>s.codePointAt(0)).filter(s=>s>=32&&s<=127).map(s=>String.fromCodePoint(s+917504)).join("");return(r||"")+" "+i}function Rk(e){if(e==null)return null;let t=e.match(/\u{e005b}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e005d}/u);if(t!=null){let o=[...t[0]].map(i=>String.fromCodePoint(i.codePointAt(0)-917504)).join("");return o.substring(1,o.length-1).split(",").map(i=>parseInt(i.replace("#","0x"),16))}else return null}var Bb,Lm,Fb=g(()=>{"use strict";a();$();le();P();ot();we();I();T();_b();Bb=N({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),Lm=y({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[m.Alyxia,m.Remty],patches:[{find:"UserProfileStore",replacement:{match:/(?<=getUserProfile\(\i\){return )(\i\[\i\])/,replace:"$self.colorDecodeHook($1)"}},{find:".USER_SETTINGS_PROFILE_THEME_ACCENT",replacement:{match:/RESET_PROFILE_THEME}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"Usage"),n(S.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins. ",n("br",null),"To set your own colors:",n("ul",null,n("li",null,"\u2022 go to your profile settings"),n("li",null,"\u2022 choose your own colors in the Nitro preview"),n("li",null,'\u2022 click the "Copy 3y3" button'),n("li",null,"\u2022 paste the invisible text anywhere in your bio")),n("br",null),n("b",null,"Please note:")," if you are using a theme which hides nitro ads, you should disable it temporarily to set colors.")),settings:Bb,colorDecodeHook(e){if(e){if(Bb.store.nitroFirst&&e.themeColors)return e;let t=Rk(e.bio);if(t)return Ob(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:_.wrap(function({primary:e,accent:t}){return n(k,{onClick:()=>{let o=Ck(e,t);Ao(o)},color:k.Colors.PRIMARY,size:k.Sizes.XLARGE,className:j.left16},"Copy 3y3")},{noop:!0})})});var Em,Ub=g(()=>{"use strict";a();P();I();T();Em=y({name:"FavoriteEmojiFirst",authors:[m.Aria,m.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:"renderResults({results:",replacement:[{match:/let \i=.{1,100}renderResults\({results:(\i)\.query\.results,/,replace:"$self.sortEmojis($1);$&"}]},{find:"MAX_AUTOCOMPLETE_RESULTS+",replacement:[{match:/,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(\i-\i\.length)\)/,replace:",maxCount:Infinity$2=($3.sliceTo = $4, $3)"}]}],sortEmojis({query:e}){if(e?.type!=="EMOJIS_AND_STICKERS"||e.typeInfo?.sentinel!==":"||!e.results?.emojis?.length)return;let t=jo.getDisambiguatedEmojiContext();e.results.emojis=e.results.emojis.sort((o,r)=>{let i=t.isFavoriteEmojiWithoutFetchingLatest(o),s=t.isFavoriteEmojiWithoutFetchingLatest(r);return i&&!s?-1:!i&&s?1:0}).slice(0,e.results.emojis.sliceTo??10)}})});function Nk({instance:e,SearchBarComponent:t}){let[o,r]=W(""),i=xt(null),s=cl(l=>{r(l);let{props:c}=e;if(l===""){c.favorites=c.favCopy,e.forceUpdate();return}i.current?.containerRef?.current.closest("#gif-picker-tab-panel")?.querySelector('[class|="content"]')?.firstElementChild?.scrollTo(0,0);let u=c.favCopy.map(p=>({score:Dk(l.toLowerCase(),Gb(p.url??p.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:p})).filter(p=>p.score!=null);u.sort((p,d)=>d.score-p.score),c.favorites=u.map(p=>p.gif),e.forceUpdate()},[e.state]);return se(()=>()=>{e.dead=!0},[]),n(t,{ref:i,autoFocus:!0,className:kk.searchBar,size:t.Sizes.MEDIUM,onChange:s,onClear:()=>{r(""),e.props.favCopy!=null&&(e.props.favorites=e.props.favCopy,e.forceUpdate())},query:o,placeholder:"Search Favorite Gifs"})}function Gb(e){let t;try{t=new URL(e)}catch{return e}switch($b.store.searchOption){case"url":return t.href;case"path":return t.host==="media.discordapp.net"||t.host==="tenor.com"?t.pathname.split("/").at(-1)??t.pathname:t.pathname;case"hostandpath":return t.host==="media.discordapp.net"||t.host==="tenor.com"?`${t.host} ${t.pathname.split("/").at(-1)??t.pathname}`:`${t.host} ${t.pathname}`;default:return""}}function Dk(e,t){let o=0,r=0;for(let i=0;i{"use strict";a();$();le();P();I();H();T();kk=x("searchBar","searchBarFullRow"),$b=N({searchOption:{type:4,description:"The part of the url you want to search",options:[{label:"Entire Url",value:"url"},{label:"Path Only (/somegif.gif)",value:"path"},{label:"Host & Path (tenor.com somgif.gif)",value:"hostandpath",default:!0}]}}),Om=y({name:"FavoriteGifSearch",authors:[m.Aria],description:"Adds a search bar to favorite gifs.",patches:[{find:"renderHeaderContent()",replacement:[{match:/(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:return\(0,\i\.jsx\)\((?\i\..{1,10}),)/,replace:"$1 this.state.resultType === 'Favorites' ? $self.renderSearchBar(this, $) : $2;$3"},{match:/(,suggestions:\i,favorites:)(\i),/,replace:"$1$self.getFav($2),favCopy:$2,"}]}],settings:$b,getTargetString:Gb,instance:null,renderSearchBar(e,t){return this.instance=e,n(_,{noop:!0},n(Nk,{instance:e,SearchBarComponent:t}))},getFav(e){if(!this.instance||this.instance.dead)return e;let{favorites:t}=this.instance.props;return t!=null&&t?.length!==e.length?t:e}})});var _m,zb=g(()=>{"use strict";a();P();I();_m=y({name:"FixCodeblockGap",description:"Removes the gap between codeblocks and text below it",authors:[m.Grzesiek11],patches:[{find:".default.Messages.DELETED_ROLE_PLACEHOLDER",replacement:{match:String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,replace:"$&\\n?"}}]})});var Bm,jb=g(()=>{"use strict";a();$();Xs();P();I();Bm=y({name:"FixSpotifyEmbeds",description:"Fixes spotify embeds being incredibly loud by letting you customise the volume",authors:[m.Ven],settings:N({volume:{type:5,description:"The volume % to set for spotify embeds. Anything above 10% is veeeery loud",markers:en(0,100,10),stickToMarkers:!1,default:10}})})});var Fm,Wb=g(()=>{"use strict";a();P();I();Fm=y({name:"FixYoutubeEmbeds",description:"Bypasses youtube videos being blocked from display on Discord (for example by UMG)",authors:[m.coolelectronics]})});var Um,qb=g(()=>{"use strict";a();P();I();T();Um=y({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[m.D3SOX,m.Nickyux],patches:[{find:"AVATAR_DECORATION_PADDING:",replacement:{match:/,isOwner:(\i),/,replace:",_isOwner:$1=$self.isGuildOwner(e),"}}],isGuildOwner(e){if(!e?.user?.id||e.channel?.type===3)return e.isOwner;let t=e.guildId??e.channel?.guild_id,o=e.user.id;return ae.getGuild(t)?.ownerId===o}})});var mc,Lk,$m,Kb=g(()=>{"use strict";a();uo();P();I();H();T();mc=x("createFriendInvite"),{uuid4:Lk}=x("uuid4"),$m=y({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[m.afn,m.Dziurwa],dependencies:["CommandsAPI"],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:3,options:[{name:"Uses",description:"How many uses?",choices:[{label:"1",name:"1",value:"1"},{label:"5",name:"5",value:"5"}],required:!1,type:4}],execute:async(e,t)=>{let o=ht(e,"Uses",5);if(o===1&&!E.getCurrentUser().phone)return ge(t.channel.id,{content:"You need to have a phone number connected to your account to create a friend invite with 1 use!"});let r;if(o===1){let i=Lk(),{body:{invite_suggestions:s}}=await _t.post({url:"/friend-finder/find-friends",body:{modified_contacts:{[i]:[1,"",""]},phone_contact_methods_count:1}});r=await mc.createFriendInvite({code:s[0][3],recipient_phone_number_or_email:i,contact_visibility:1,filter_visibilities:[],filtered_invite_suggestions_index:1})}else r=await mc.createFriendInvite();ge(t.channel.id,{content:` discord.gg/${r.code} \xB7 Expires: \xB7 Max uses: \`${r.max_uses}\` `.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=>` _discord.gg/${i.code}_ \xB7 Expires: \xB7 Times used: \`${i.uses}/${i.max_uses}\` `.trim().replace(/\s+/g," "));ge(t.channel.id,{content:r.join(` `)||"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"] { min-width: 88px !important; } `,classNames:{},dom:null});Hm="src/plugins/gameActivityToggle/style.css"});function Gk(e){let{oldIcon:t}=Jb.use(["oldIcon"]),o=t?"M23 2.27 21.73 1 1 21.73 2.27 23 23 2.27Z":"M22.7 2.7a1 1 0 0 0-1.4-1.4l-20 20a1 1 0 1 0 1.4 1.4Z",r=t?"M23.27 4.54 19.46.73 .73 19.46 4.54 23.27 23.27 4.54Z":"M23.27 4.73 19.27 .73 -.27 20.27 3.73 24.27Z";return function(){return n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:!e&&!t?"var(--status-danger)":"currentColor",mask:e?void 0:"url(#gameActivityMask)",d:"M3.06 20.4q-1.53 0-2.37-1.065T.06 16.74l1.26-9q.27-1.8 1.605-2.97T6.06 3.6h11.88q1.8 0 3.135 1.17t1.605 2.97l1.26 9q.21 1.53-.63 2.595T20.94 20.4q-.63 0-1.17-.225T18.78 19.5l-2.7-2.7H7.92l-2.7 2.7q-.45.45-.99.675t-1.17.225Zm14.94-7.2q.51 0 .855-.345T19.2 12q0-.51-.345-.855T18 10.8q-.51 0-.855.345T16.8 12q0 .51.345 .855T18 13.2Zm-2.4-3.6q.51 0 .855-.345T16.8 8.4q0-.51-.345-.855T15.6 7.2q-.51 0-.855.345T14.4 8.4q0 .51.345 .855T15.6 9.6ZM6.9 13.2h1.8v-2.1h2.1v-1.8h-2.1v-2.1h-1.8v2.1h-2.1v1.8h2.1v2.1Z"}),!e&&n(f,null,n("path",{fill:"var(--status-danger)",d:o}),n("mask",{id:"gameActivityMask"},n("rect",{fill:"white",x:"0",y:"0",width:"24",height:"24"}),n("path",{fill:"black",d:r}))))}}function Hk(){let e=xi.ShowCurrentGame.useSetting();return n($k,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:Gk(e),role:"switch","aria-checked":!e,onClick:()=>xi.ShowCurrentGame.updateSetting(t=>!t)})}var $k,Jb,zm,Qb=g(()=>{"use strict";a();$();Qe();le();P();I();H();T();Xb();$k=Ne("Button.Sizes.NONE,disabled:");Jb=N({oldIcon:{type:3,description:"Use the old icon style before Discord icon redesign",default:!1}}),zm=y({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[m.Nuckyz,m.RuukuLada],settings:Jb,patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:_.wrap(Hk,{noop:!0}),start(){Nt(Hm)},stop(){Xt(Hm)}})});var zk,jm,Vb=g(()=>{"use strict";a();P();mt();I();H();({closeExpressionPicker:zk}=x("closeExpressionPicker")),jm=y({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[m.Ven],patches:[{find:".handleSelectGIF=",replacement:{match:/\.handleSelectGIF=(\i)=>\{/,replace:".handleSelectGIF=$1=>{if (!this.props.className) return $self.handleSelect($1);"}}],handleSelect(e){e&&(kn(e.url+" "),zk())}})});function tT(e,t,o){let r=ao.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(fc.store.greetMode==="Message"||o.length>1){r.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};ao._sendMessage(e.id,i,r)}else ao.sendGreetMessage(e.id,o[0],r)}function jk({channel:e,message:t}){let o=fc.use(["greetMode","multiGreetChoices"]),{greetMode:r,multiGreetChoices:i=[]}=o;return n(L.Menu,{navId:"greet-sticker-picker",onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},n(L.MenuGroup,{label:"Greet Mode"},Object.values(oT).map(s=>n(L.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===r,action:()=>o.greetMode=s}))),n(L.MenuSeparator,null),n(L.MenuGroup,{label:"Greet Stickers"},eT.map(s=>n(L.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>tT(e,t,[s.id])}))),fc.store.unholyMultiGreetEnabled?n(f,null,n(L.MenuSeparator,null),n(L.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},eT.map(s=>{let l=i.some(c=>c===s.id);return n(L.MenuCheckboxItem,{key:s.id,id:"multi-greet-"+s.id,label:s.description.split(" ")[0],checked:l,disabled:!l&&i.length>=3,action:()=>{o.multiGreetChoices=l?i.filter(c=>c!==s.id):[...i,s.id]}})}),n(L.MenuSeparator,null),n(L.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>tT(e,t,i),disabled:i.length===0}))):null)}var oT,fc,eT,Wm,nT=g(()=>{"use strict";a();$();P();I();H();T();oT=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(oT||{}),fc=N({greetMode:{type:4,options:[{label:"Greet (you can only greet 3 times)",value:"Greet",default:!0},{label:"Normal Message (you can greet spam)",value:"Message"}],description:"Choose the greet mode"}}).withPrivateSettings(),{WELCOME_STICKERS:eT}=x("WELCOME_STICKERS");Wm=y({name:"GreetStickerPicker",description:"Allows you to use any greet sticker instead of only the random one by right-clicking the 'Wave to say hi!' button",authors:[m.Ven],settings:fc,patches:[{find:"Messages.WELCOME_CTA_LABEL",replacement:{match:/innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).{0,400}?)/,replace:"$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"}}],pickSticker(e,t){t.message.deleted||Yt.openContextMenu(e,()=>n(jk,{...t}))}})});var qm={};qe(qm,{_buildPopoverElements:()=>qk,addButton:()=>on,buttons:()=>gc,removeButton:()=>Oo});function on(e,t){gc.set(e,t)}function Oo(e){gc.delete(e)}function qk(e,t){let o=[];for(let[r,i]of gc.entries())try{let s=i(e);s&&(s.key??=r,o.push(t(s)))}catch(s){Wk.error(`[${r}]`,s)}return o}var Wk,gc,li=g(()=>{"use strict";a();Ke();Wk=new oe("MessagePopover"),gc=new Map});var ma,iT,fa,rT,Kk,Km,sT=g(()=>{"use strict";a();Xo();li();It();P();I();T();iT="HideAttachments_HiddenIds",fa=new Set,rT=()=>dt(iT).then(e=>(fa=e??new Set,fa)),Kk=e=>kt(iT,e),Km=y({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[m.Ven],dependencies:["MessagePopoverAPI"],async start(){ma=document.createElement("style"),ma.id="VencordHideAttachments",document.head.appendChild(ma),await rT(),await this.buildCss(),on("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length&&!e.stickerItems.length)return null;let t=fa.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?El:Ol,message:e,channel:ee.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){ma.remove(),fa.clear(),Oo("HideAttachments")},async buildCss(){let e=[...fa].map(t=>`#message-accessories-${t}`).join(",");ma.textContent=` :is(${e}) :is([class*="embedWrapper"], [class*="clickableSticker"]) { /* important is not necessary, but add it to make sure bad themes won't break it */ display: none !important; } :is(${e})::after { content: "Attachments hidden"; color: var(--text-muted); font-size: 80%; } `},async toggleHide(e){let t=await rT();t.delete(e)||t.add(e),await Kk(t),await this.buildCss()}})});var Ym,aT=g(()=>{"use strict";a();P();I();Ym=y({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[m.botato,m.Nyako],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:1<<30|1073741824)\)return/,replace:"if($1===(1<<20))return false;$&"}}]})});function uT(e,t,o,r){return n(ne,{text:t},i=>n("button",{...i,onClick:s=>Xk(s,e),style:{all:"unset",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"}},n("svg",{width:"24",height:"24",viewBox:"0 -960 960 960"},n("path",{fill:r,d:o}))))}function cT(e,t=!1){let o=to.use(["ignoredActivities"]),{ignoredActivities:r=[]}=o;return r.some(i=>i.id===e.id)?Zk(e,"var(--status-danger)"):Yk(e,t?"var(--green-300)":"var(--primary-400)")}function Xk(e,t){e.stopPropagation();let o=yr().findIndex(r=>r.id===t.id);o===-1?to.store.ignoredActivities=yr().concat(t):to.store.ignoredActivities=yr().filter((r,i)=>i!==o),xi.ShowCurrentGame.updateSetting(r=>r)}function Jk(){return n(fe,{flexDirection:"column"},n(S.FormText,{type:S.FormText.Types.DESCRIPTION},"Import the application id of the CustomRPC plugin to the allowed list"),n("div",null,n(k,{onClick:()=>{let e=G.plugins.CustomRPC?.appID;if(!e)return Mt("CustomRPC application ID is not set.",X.Type.FAILURE);Zm?.(e)&&Mt("CustomRPC application ID is already added.",X.Type.FAILURE)}},"Import CustomRPC ID")))}function Qk(e){let[t,o]=W(to.store.allowedIds??"");Zm=i=>{let s=new Set(t.split(",").map(u=>u.trim()).filter(Boolean)),l=s.has(i)||(s.add(i),!1),c=Array.from(s).join(", ");return o(c),e.setValue(c),l},se(()=>()=>{Zm=null},[]);function r(i){o(i),e.setValue(i)}return n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"Allowed List"),n(S.FormText,{className:j.bottom8,type:S.FormText.Types.DESCRIPTION},"Comma separated list of activity IDs to allow (Useful for allowing RPC activities and CustomRPC)"),n(Je,{type:"text",value:t,onChange:r,placeholder:"235834946571337729, 343383572805058560"}))}function yr(){return to.store.ignoredActivities??=[]}function Vk(e,t){if(t&&to.store.allowedIds.includes(t))return!1;switch(e){case 0:return to.store.ignorePlaying;case 1:return to.store.ignoreStreaming;case 2:return to.store.ignoreListening;case 3:return to.store.ignoreWatching;case 5:return to.store.ignoreCompeting}return!1}var lT,Yk,Zk,Zm,to,Xm,pT=g(()=>{"use strict";a();Xo();$();le();Ut();P();ot();I();H();T();lT=Re("RunningGameStore");Yk=(e,t)=>uT(e,"Disable Activity","M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z",t),Zk=(e,t)=>uT(e,"Enable Activity","m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z",t);Zm=null;to=N({importCustomRPC:{type:6,description:"",component:()=>n(Jk,null)},allowedIds:{type:6,description:"",default:"",onChange(e){let t=new Set(e.split(",").map(o=>o.trim()).filter(Boolean));to.store.allowedIds=Array.from(t).join(", ")},component:e=>n(Qk,{setValue:e.setValue})},ignorePlaying:{type:3,description:"Ignore all playing activities (These are usually game and RPC activities)",default:!1},ignoreStreaming:{type:3,description:"Ignore all streaming activities",default:!1},ignoreListening:{type:3,description:"Ignore all listening activities (These are usually spotify activities)",default:!1},ignoreWatching:{type:3,description:"Ignore all watching activities",default:!1},ignoreCompeting:{type:3,description:"Ignore all competing activities (These are normally special game activities)",default:!1}}).withPrivateSettings();Xm=y({name:"IgnoreActivities",authors:[m.Nuckyz],description:"Ignore activities from showing up on your status ONLY. You can configure which ones are specifically ignored from the Registered Games and Activities tabs, or use the general settings below.",settings:to,patches:[{find:'.displayName="LocalActivityStore"',replacement:[{match:/HANG_STATUS.+?(?=!\i\(\i,\i\)&&)(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}]},{find:".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",replacement:{match:/\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,replace:(e,t,o)=>`${e}$self.renderToggleGameActivityButton(${t},${o}),`}},{find:".activityTitleText,variant",replacement:{match:/(?<=\i\.activityTitleText.+?children:(\i)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}},{find:".activityCardDetails,children",replacement:{match:/(?<=\i\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}}],async start(){let e=await dt("IgnoreActivities_ignoredActivities");if(e!=null&&(to.store.ignoredActivities=Array.from(e.values()).map(t=>({...t,name:"Unknown Name"})),pp("IgnoreActivities_ignoredActivities")),yr().length!==0){let t=lT.getGamesSeen();for(let[o,r]of yr().entries())r.type===0&&(t.some(i=>i.id===r.id||i.exePath===r.id)||yr().splice(o,1))}},isActivityNotIgnored(e){if(Vk(e.type,e.application_id))return!1;if(e.application_id!=null)return!yr().some(t=>t.id===e.application_id)||to.store.allowedIds.includes(e.application_id);{let t=lT.getRunningGames().find(o=>o.name===e.name)?.exePath;if(t)return!yr().some(o=>o.id===t)}return!0},renderToggleGameActivityButton(e,t){return n(_,{noop:!0},n("div",{style:{marginLeft:12,zIndex:0}},cT({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return n(_,{noop:!0},cT({id:e.id,name:e.name,type:1}))}})});var ga,Jm=g(()=>{"use strict";a();ga="vc-imgzoom-magnify-modal"});function Qm(e,t){e()?t():requestAnimationFrame(()=>Qm(e,t))}var dT=g(()=>{"use strict";a()});var eN,Vm,mT=g(()=>{"use strict";a();Qe();T();Jm();ef();dT();eN=ve("vc-imgzoom-"),Vm=({instance:e,size:t,zoom:o})=>{let[r,i]=W(!1),[s,l]=W({x:0,y:0}),[c,u]=W({x:0,y:0}),[p,d]=W(0),h=xt(!1),v=xt(o),b=xt(t),M=xt(null),w=xt(null),C=xt(null),R=xt(null);if(U.useLayoutEffect(()=>{let F=re=>{re.key==="Shift"&&(h.current=!0)},z=re=>{re.key==="Shift"&&(h.current=!1)},Y=()=>{w.current.currentTime=C.current.currentTime},J=re=>{if(e.state.mouseOver&&e.state.mouseDown){let Se=b.current/2,ue={x:re.pageX,y:re.pageY},Ue=-((ue.x-M.current.getBoundingClientRect().left)*v.current-Se),be=-((ue.y-M.current.getBoundingClientRect().top)*v.current-Se);l({x:re.x-Se,y:re.y-Se}),u({x:Ue,y:be}),d(1)}else d(0)},Z=re=>{e.state.mouseOver&&re.button===0&&(v.current=nt.store.zoom,b.current=nt.store.size,document.getElementById("image-context")&&B.dispatch({type:"CONTEXT_MENU_CLOSE"}),J(re),d(1))},O=()=>{d(0),nt.store.saveZoomValues&&(nt.store.zoom=v.current,nt.store.size=b.current)},te=async re=>{if(e.state.mouseOver&&e.state.mouseDown&&!h.current){let Se=v.current+re.deltaY/100*(nt.store.invertScroll?-1:1)*nt.store.zoomSpeed;v.current=Se<=1?1:Se,J(re)}if(e.state.mouseOver&&e.state.mouseDown&&h.current){let Se=b.current+re.deltaY*(nt.store.invertScroll?-1:1)*nt.store.zoomSpeed;b.current=Se<=50?50:Se,J(re)}};return Qm(()=>e.state.readyState==="READY",()=>{let re=document.getElementById(ga);M.current=re,re.querySelector("img,video")?.setAttribute("draggable","false"),e.props.animated&&(C.current=re.querySelector("video"),C.current.addEventListener("timeupdate",Y)),i(!0)}),document.addEventListener("keydown",F),document.addEventListener("keyup",z),document.addEventListener("mousemove",J),document.addEventListener("mousedown",Z),document.addEventListener("mouseup",O),document.addEventListener("wheel",te),()=>{document.removeEventListener("keydown",F),document.removeEventListener("keyup",z),document.removeEventListener("mousemove",J),document.removeEventListener("mousedown",Z),document.removeEventListener("mouseup",O),document.removeEventListener("wheel",te),nt.store.saveZoomValues&&(nt.store.zoom=v.current,nt.store.size=b.current)}},[]),!r)return null;let A=M.current?.getBoundingClientRect();return A?n("div",{className:eN("lens",{"nearest-neighbor":nt.store.nearestNeighbour,square:nt.store.square}),style:{opacity:p,width:b.current+"px",height:b.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?n("video",{ref:w,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${A.width*v.current}px`,height:`${A.height*v.current}px`,poster:e.props.src,src:C.current?.src??e.props.src,autoPlay:!0,loop:!0}):n("img",{ref:R,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${A.width*v.current}px`,height:`${A.height*v.current}px`,src:e.props.src,alt:""})):null}});var tf,fT=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/imageZoom/styles.css",{name:"src/plugins/imageZoom/styles.css",source:`.vc-imgzoom-lens { position: absolute; inset: 0; z-index: 9999; border: 2px solid grey; border-radius: 50%; overflow: hidden; cursor: none; box-shadow: inset 0 0 10px 2px grey; filter: drop-shadow(0 0 2px grey); pointer-events: none; /* negate the border offsetting the lens */ margin: -2px; } .vc-imgzoom-square { border-radius: 0; } .vc-imgzoom-nearest-neighbor>img { image-rendering: pixelated; /* https://googlechrome.github.io/samples/image-rendering-pixelated/index.html */ } /* make the carousel take up less space so we can click the backdrop and exit out of it */ [class*="modalCarouselWrapper_"] { top: 0 !important; } [class*="carouselModal_"] { height: 0 !important; } `,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(`Failed to render ${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("div",{className:`expression-picker-chat-input-button ${nf?.buttonContainer??""} vc-chatbar-button`},n(k,{"aria-label":e.tooltip,size:"",look:sl.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:`${ol.button} ${nf?.button}`,onClick:e.onClick,onContextMenu:e.onContextMenu,...e.buttonProps},n("div",{className:ol.buttonWrapper},e.children)))),{noop:!0})});function rN(e){let t=e?.message?.content,[o,r]=U.useState("password");return n(ye,{...e},n(Le,null,n(S.FormTitle,{tag:"h4"},"Decrypt Message")),n(ke,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Message with Encryption"),n(Je,{defaultValue:t,disabled:!0}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(Je,{style:{marginBottom:"20px"},onChange:r})),n(ct,null,n(k,{color:k.Colors.GREEN,onClick:()=>{let i=af(t,o,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),n(k,{color:k.Colors.TRANSPARENT,look:k.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function hT(e){de(t=>n(rN,{...t,...e}))}var yT=g(()=>{"use strict";a();Ze();T();hc()});function iN(e){let[t,o]=U.useState(""),[r,i]=U.useState(""),[s,l]=U.useState("password"),[c,u]=U.useState(!1),p=t&&(c||r&&r.trim().split(" ").length>1);return n(ye,{...e},n(Le,null,n(S.FormTitle,{tag:"h4"},"Encrypt Message")),n(ke,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),n(Je,{onChange:d=>{o(d)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),n(Je,{disabled:c,onChange:d=>{i(d)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(Je,{style:{marginBottom:"20px"},defaultValue:"password",onChange:d=>{l(d)}}),n(wt,{value:c,onChange:d=>{u(d)}},"Don't use a Cover")),n(ct,null,n(k,{color:k.Colors.GREEN,disabled:!p,onClick:()=>{if(!p)return;let d=bT(t,s,c?"d d":r),h=c?d.replaceAll("d",""):d;!h||(kn(h),e.onClose())}},"Send"),n(k,{color:k.Colors.TRANSPARENT,look:k.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function vT(){de(e=>n(iN,{...e}))}var ST=g(()=>{"use strict";a();mt();Ze();T();hc()});function sN(){return n("svg",{fill:"var(--header-secondary)",width:24,height:24,viewBox:"0 0 64 64"},n("path",{d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))}function aN(){return n(ne,{text:"This message has a hidden message! (InvisibleChat)"},({onMouseEnter:e,onMouseLeave:t})=>n("img",{"aria-label":"Hidden Message Indicator (InvisibleChat)",onMouseEnter:e,onMouseLeave:t,src:"https://github.com/SammCheese/invisible-chat/raw/NewReplugged/src/assets/lock.png",width:20,height:20,style:{transform:"translateY(4p)",paddingInline:4}}))}function bT(e,t,o){return lf.hide(e+"\u200B",t,o)}function af(e,t,o){let r=lf.reveal(e,t);return o?r.replace("\u200B",""):r}function cN(e){return e.endsWith("\u200B")}async function uN(e){let t=TT.store.savedPasswords.split(",").map(r=>r.trim());if(!e?.content||!t?.length)return!1;let{content:o}=e;/^\W/.test(e.content)&&(o=`d ${e.content}d`);for(let r=0;r{"use strict";a();En();li();$();le();P();sc();I();T();yT();ST();lN=({isMainChat:e})=>e?n(xo,{tooltip:"Encrypt Message",onClick:()=>vT(),buttonProps:{"aria-haspopup":"dialog"}},n("svg",{"aria-hidden":!0,role:"img",width:"24",height:"24",viewBox:"0 0 64 64",style:{scale:"1.39",translate:"0 -1px"}},n("path",{fill:"currentColor",d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))):null,TT=N({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),cf=y({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[m.SammCheese],dependencies:["MessagePopoverAPI","ChatInputButtonAPI"],patches:[{find:".Messages.MESSAGE_EDITED,",replacement:{match:/let\{className:\i,message:\i[^}]*\}=(\i)/,replace:"try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"}}],EMBED_API_URL:"https://embed.sammcheese.net",INV_REGEX:new RegExp(/( \u200c|\u200d |[\u2060-\u2064])[^\u200b]/),URL_REGEX:new RegExp(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/),settings:TT,async start(){on("InvisibleChat",t=>this.INV_REGEX.test(t?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:t,channel:ee.getChannel(t.channel_id),onClick:async()=>{await uN(t).then(o=>o?void this.buildEmbed(t,o):void hT({message:t}))}}:null),wo("InvisibleChat",lN);let{default:e}=await gb();lf=new e(!0,!1)},stop(){Oo("InvisibleChat"),Oo("InvisibleChat")},async getEmbed(e){let{body:t}=await _t.post({url:"/unfurler/embed-urls",body:{urls:[e]}});return await t.embeds[0]},async buildEmbed(e,t){let o=t.match(this.URL_REGEX);if(e.embeds.push({type:"rich",title:"Decrypted Message",color:"0x45f5f5",description:t,footer:{text:"Made with \u2764\uFE0F by c0dine and Sammy!"}}),o?.length){let r=await this.getEmbed(new URL(o[0]));r&&e.embeds.push(r)}this.updateMessage(e)},updateMessage:e=>{B.dispatch({type:"MESSAGE_UPDATE",message:e})},popOverIcon:()=>n(sN,null),indicator:_.wrap(aN,{noop:!0})})});function wT(e,t){!ee.hasChannel(t)||qo.transitionTo(`/channels/${e??"@me"}/${t}`)}var yc,_o,uf,xT=g(()=>{"use strict";a();Xo();P();I();T();yc=!1;uf=y({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[m.Nuckyz],flux:{LOGOUT(e){({isSwitchingAccount:yc}=e)},CONNECTION_OPEN(){!yc||(yc=!1,_o?.channelId&&wT(_o.guildId,_o.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){yc||(_o={guildId:e,channelId:t},await kt("KeepCurrentChannel_previousData",_o))}},async start(){_o=await dt("KeepCurrentChannel_previousData"),_o?_o.channelId&&wT(_o.guildId,_o.channelId):(_o={guildId:yo.getGuildId(),channelId:Ie.getChannelId()??null},await kt("KeepCurrentChannel_previousData",_o))}})});async function pf(e){return(await Ur.fetchAssetIds(df,[e]))[0]}function mN(e){B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var df,pN,MT,dN,Mo,mf,IT=g(()=>{"use strict";a();$();To();P();Ke();I();H();T();df="1108588077900898414",pN="2a96cbd8b46e442fc41c2b86b821562f",MT=new oe("LastFMRichPresence"),dN=x("getLocalPresence");Mo=N({username:{description:"last.fm username",type:0},apiKey:{description:"last.fm api key",type:0},shareUsername:{description:"show link to last.fm profile",type:3,default:!1},hideWithSpotify:{description:"hide last.fm presence if spotify is running",type:3,default:!0},statusName:{description:"custom status text",type:0,default:"some music"},nameFormat:{description:"Show name of song and artist in status name",type:4,options:[{label:"Use custom status name",value:"status-name",default:!0},{label:"Use format 'artist - song'",value:"artist-first"},{label:"Use format 'song - artist'",value:"song-first"},{label:"Use artist name only",value:"artist"},{label:"Use song name only",value:"song"}]},useListeningStatus:{description:'show "Listening to" status instead of "Playing"',type:3,default:!1},missingArt:{description:"When album or album art is missing",type:4,options:[{label:"Use large Last.fm logo",value:"lastfmLogo",default:!0},{label:"Use generic placeholder",value:"placeholder"}]},showLastFmLogo:{description:"show the Last.fm logo by the album cover",type:3,default:!0}}),mf=y({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[m.dzshn,m.RuiNtD,m.blahajZip,m.archeruwu],settingsAboutComponent:()=>n(f,null,n(S.FormTitle,{tag:"h3"},"How to get an API key"),n(S.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",n(je,{href:"https://www.last.fm/api/account/create"},"this page")," and fill in the following information: ",n("br",null)," ",n("br",null),"Application name: Discord Rich Presence ",n("br",null),"Application description: (personal use) ",n("br",null)," ",n("br",null),"And copy the API key (not the shared secret!)")),settings:Mo,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!Mo.store.username||!Mo.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:Mo.store.apiKey,user:Mo.store.username,limit:"1",format:"json"}),t=await fetch(`https://ws.audioscrobbler.com/2.0/?${e}`);if(!t.ok)throw`${t.status} ${t.statusText}`;let o=await t.json();if(o.error)return MT.error("Error from Last.fm API",`${o.error}: ${o.message}`),null;let r=o.recenttracks?.track[0];return r?.["@attr"]?.nowplaying?{name:r.name||"Unknown",album:r.album["#text"],artist:r.artist["#text"]||"Unknown",url:r.url,imageUrl:r.image?.find(i=>i.size==="large")?.["#text"]}:null}catch(e){return MT.error("Failed to query Last.fm API",e),null}},async updatePresence(){mN(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(pN))return e.imageUrl;if(Mo.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(Mo.store.hideWithSpotify){for(let s of dN.getActivities())if(s.type===2&&s.application_id!==df)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await pf(t),large_text:e.album||void 0,...Mo.store.showLastFmLogo&&{small_image:await pf("lastfm-small"),small_text:"Last.fm"}}:{large_image:await pf("lastfm-large"),large_text:e.album||void 0},r=[{label:"View Song",url:e.url}];Mo.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${Mo.store.username}`});let i=(()=>{switch(Mo.store.nameFormat){case"artist-first":return e.artist+" - "+e.name;case"song-first":return e.name+" - "+e.artist;case"artist":return e.artist;case"song":return e.name;default:return Mo.store.statusName}})();return{application_id:df,name:i,details:e.name,state:e.artist,assets:o,buttons:r.map(s=>s.label),metadata:{button_urls:r.map(s=>s.url)},type:Mo.store.useListeningStatus?2:0,flags:1}}})});var PT,AT,ff,CT=g(()=>{"use strict";a();$();P();I();PT=["Eyrokac","Rdcg$l`'k|~n",'H`tf$d&iajo+d`{"',"Sucqplh`(Eclhualva()&","Lncgmka'8KNMDC,shpanf'`x./,","Ioqweijnfn*IeuvfvAotkfxo./,","Hd{#cp\x7Ft$)nbd!{lq%mig~*\x7Fh`v#mk&sm{gx nd#idjb(a\x7Ffao\"bja&amdkge!Rlo\xECkhf)hyedfjjb*'^hzdrdmm$lu'|ao+mnqw$fijxh~bbmg#Tjm\xEEefd+fnp#lpkffz5","h",`sijklm&cam*rot"hjjq'|ak\x7F xmv#wc'ep*mawmvvlrb(|ynr>"Aqq&cgg-\x7F ugoh%rom)e\x7Fhdpp%$`,'Tnfb}"u\'~`nno!kp$vvhfzeyee"a}%Tfam*Xh`fls%Jboldos-"lj`&hn)~ce!`jcbct|)gdbhnf$wikm$zgaxkmc%afely+og"144?\'ign+iu%p$qisiefr gpfa$',"Ndtfv%ahfgk+ghtf$|ir(|z' Oguaw&`ggdj mgw$|ir(me|n","(!\u0363\xB3$\u0359\u0290'\u0369\xB9#","(\uFF88\u25D7\u30ED\u25D1,\uFF8F-2\uFF6C\uFF95\u272C","Ynw#hjil(ze+psgwp|&sgmkr!","Tikmolh`(fl+a!dvjk\x7F'y|e\x7Fe/,-","3/3750?5><9>885:7","mdmt","Wdn`khc+(oxbeof","Ig\"zkp*'g{*xolglj`&~g|*gowg/$mgt(Eclm`.#ticf{l*xed\"wl`&Kangj igbhqn'd`dn `v#lqrw{3%$bhv-h|)kangj_imwhlhb","Tscmw%Tnoa~x",'I\u2018f#npus(ec`e!vl$lhsm{`ncu"ekw&f(defeov-$Rnf|)sdu\u2018pf$wcam{ceg!vl$du\'D`d~x-"jw%oi(okht-"DJP)Kag\x7Fs,!mq$du\'A\u2010|n sg`akrkq)~jkdl#pj&diefbnf"jp)&@F\\*{ltq#Hlhrp\'',"Ynw$v`&cg`dl fml`%rhlhs*","Dnl$p%qhz{s' hv$w%hh|aceg!;#gpvt(fl+cndea`&dg|fon&v#wjjqm(","\uD83D)pft`gs(ec`e!13$qojmz#",`a!njcmr'ide~nu"lb%rheoedldpz$lu'gbkr`,'dn"zkp&kg\x7Fo4',"hnpqkw",'sn"fau\x7F','Sn"tmqnh}}*musvkaw&flf&+ldv$w%lr{}*aulr#vlao|)cetn"jp$',"Dxkmc%ot(hhxomwwai\x7F'{hln",`hd{#}js&(pe~'sg#gprb(3#"`,"hd{b${","<;vqkijbq33271:56<3799?24944:",`Thof$lu'ofdn,!qsefc'az*bnrcma+&Om{o+iu"\`khct$)bnrd"bcdoi&`,"snofplkb{)c\x7F'r\"lod\x7F'|f*aurv#cpno`abchijklmno","Wdn`khc'|f*eghl{%"],AT=N({replaceEvents:{description:"Replace Event Quotes too",type:3,default:!0}}),ff=y({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[m.Ven,m.KraXen72],settings:AT,patches:[{find:".LOADING_DID_YOU_KNOW}",replacement:[{match:/\._loadingText=function\(\)\{/,replace:"$&return $self.quote;"},{match:/\._eventLoadingText=function\(\)\{/,replace:"$&return $self.quote;",predicate:()=>AT.store.replaceEvents}]}],xor(e){let t="read if cute",o=Array.from(e,(r,i)=>r.charCodeAt(0)^i%t.length);return String.fromCharCode(...o)},get quote(){return this.xor(PT[Math.floor(Math.random()*PT.length)])}})});var RT=g(()=>{});var vc,kT=g(()=>{"use strict";a();Uo();we();Wr();T();vc=Ot(()=>{let e=new vo,t=new Map;class o extends xs.Store{getCount(i){return t.get(i)}async _ensureCount(i){t.has(i)||await Ms.preload(i,wn.getDefaultChannel(i).id)}ensureCount(i){t.has(i)||e.push(()=>this._ensureCount(i).then(()=>Ko(200),()=>Ko(200)))}}return new o(B,{GUILD_MEMBER_LIST_UPDATE({guildId:r,groups:i}){t.set(r,i.reduce((s,l)=>s+(l.id==="offline"?0:l.count),0))},ONLINE_GUILD_MEMBER_COUNT_UPDATE({guildId:r,count:i}){t.set(r,i)}})})});function yf({isTooltip:e,tooltipGuildId:t}){let o=Be([Ie],()=>Bi()),r=e?t:o.guild_id,i=Be([gf],()=>gf.getMemberCount(r)),s=Be([vc],()=>vc.getCount(r)),{groups:l}=Be([hf],()=>hf.getProps(r,o?.id));if(!e&&(l.length>=1||l[0].id!=="unknown")&&(s=l.reduce((u,p)=>u+(p.id==="offline"?0:p.count),0)),se(()=>{vc.ensureCount(r)},[r]),i==null)return null;let c=s!=null?Sc(s):"?";return n("div",{className:Xi("widget",{tooltip:e,"member-list":!e})},n(ne,{text:`${c} online in this channel`,position:"bottom"},u=>n("div",{...u},n("span",{className:Xi("online-dot")}),n("span",{className:Xi("online")},c))),n(ne,{text:`${Sc(i)} total server members`,position:"bottom"},u=>n("div",{...u},n("span",{className:Xi("total-dot")}),n("span",{className:Xi("total")},Sc(i)))))}var NT=g(()=>{"use strict";a();mt();T();vf();kT()});var gf,hf,Sf,fN,Sc,Xi,bf,vf=g(()=>{"use strict";a();RT();$();Qe();le();P();I();H();NT();gf=Re("GuildMemberCountStore"),hf=Re("ChannelMemberStore"),Sf=N({toolTip:{type:3,description:"If the member count should be displayed on the server tooltip",default:!0,restartNeeded:!0},memberList:{type:3,description:"If the member count should be displayed on the member list",default:!0,restartNeeded:!0}}),fN=new Intl.NumberFormat,Sc=e=>fN.format(e),Xi=ve("vc-membercount-"),bf=y({name:"MemberCount",description:"Shows the amount of online & total members in the server member list and tooltip",authors:[m.Ven,m.Commandtechno],settings:Sf,patches:[{find:"{isSidebarVisible:",replacement:{match:/(?<=let\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"},predicate:()=>Sf.store.memberList},{find:".invitesDisabledTooltip",replacement:{match:/(?<=\.VIEW_AS_ROLES_MENTIONS_WARNING.{0,100})]/,replace:",$self.renderTooltip(arguments[0].guild)]"},predicate:()=>Sf.store.toolTip}],render:_.wrap(yf,{noop:!0}),renderTooltip:_.wrap(e=>n(yf,{isTooltip:!0,tooltipGuildId:e.id}),{noop:!0})})});var Tf,DT,LT,ha,wf,ET=g(()=>{"use strict";a();gn();$();P();I();H();T();Tf=!1,DT=e=>e.key==="Backspace"&&(Tf=!0),LT=e=>e.key==="Backspace"&&(Tf=!1),ha=N({enableDeleteOnClick:{type:3,description:"Enable delete on click while holding backspace",default:!0},enableDoubleClickToEdit:{type:3,description:"Enable double click to edit",default:!0},enableDoubleClickToReply:{type:3,description:"Enable double click to reply",default:!0},requireModifier:{type:3,description:"Only do double click actions when shift/ctrl is held",default:!1}}),wf=y({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[m.Ven],dependencies:["MessageEventsAPI"],settings:ha,start(){let e=x("deleteMessage","startEditMessage"),t=x("isEditing","isEditingAny");document.addEventListener("keydown",DT),document.addEventListener("keyup",LT),this.onClick=Hd((o,r,i)=>{let s=o.author.id===E.getCurrentUser().id;if(Tf)ha.store.enableDeleteOnClick&&(s||_e.can(me.MANAGE_MESSAGES,r))&&(o.deleted?B.dispatch({type:"MESSAGE_DELETE",channelId:r.id,id:o.id,mlDeleted:!0}):e.deleteMessage(r.id,o.id),i.preventDefault());else{if(i.detail<2||ha.store.requireModifier&&!i.ctrlKey&&!i.shiftKey||r.guild_id&&!_e.can(me.SEND_MESSAGES,r)||o.deleted===!0)return;if(s){if(!ha.store.enableDoubleClickToEdit||t.isEditing(r.id,o.id))return;e.startEditMessage(r.id,o.id,o.content),i.preventDefault()}else{if(!ha.store.enableDoubleClickToReply)return;let l=64;if(o.hasFlag(l))return;B.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:!G.plugins.NoReplyMention.enabled,showMentionToggle:r.guild_id!==null})}}})},stop(){zd(this.onClick),document.removeEventListener("keydown",DT),document.removeEventListener("keyup",LT)}})});var Mf={};qe(Mf,{_modifyAccessories:()=>gN,accessories:()=>bc,addAccessory:()=>ya,removeAccessory:()=>xf});function ya(e,t,o){bc.set(e,{callback:t,position:o})}function xf(e){bc.delete(e)}function gN(e,t){for(let o of bc.values()){let r=o.callback(t);if(r!=null){if(!Array.isArray(r))r=[r];else if(r.length===0)continue;e.splice(o.position!=null?o.position<0?e.length+o.position:o.position:e.length,0,...r.filter(i=>i!=null))}}return e}var bc,Tc=g(()=>{"use strict";a();bc=new Map});async function bN(e,t){let o=Ji.get(t);if(o)return o.message;Ji.set(t,{fetched:!1});let i=(await _t.get({url:`/channels/${e}/messages`,query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=zo.getMessages(i.channel_id).receiveMessage(i).get(i.id);return Ji.set(s.id,{message:s,fetched:!0}),s}function TN(e){let t=[];for(let{content_type:o,height:r,width:i,url:s,proxy_url:l}of e.attachments??[])o?.startsWith("image/")&&t.push({height:r,width:i,url:s,proxyURL:l});for(let{type:o,image:r,thumbnail:i,url:s}of e.embeds??[])o==="image"?t.push({...r??i}):s&&o==="gifv"&&!_T.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function wN(e,t){return!e&&!t?"":e?t?`[no content, ${e} attachment${e!==1?"s":""} and ${t} embed${t!==1?"s":""}]`:`[no content, ${e} attachment${e!==1?"s":""}]`:`[no content, ${t} embed${t!==1?"s":""}]`}function xN(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||_T.test(t.url))))}function MN(e,t){if(e>t){let s=Math.min(e,400);return{width:s,height:Math.round(t/(e/s))}}let i=Math.min(t,300);return{width:Math.round(e/(t/i)),height:i}}function IN(e,t){return new Proxy(e,{get(o,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function PN({message:e}){let t=e.vencordEmbeddedBy??[],o=[],r=null;for(;(r=Pf.exec(e.content))!==null;){let[i,s,l]=r;if(t.includes(l))continue;let c=ee.getChannel(s);if(!c||!c.isPrivate()&&!_e.can(me.VIEW_CHANNEL,c))continue;let{listMode:u,idList:p}=wc.store,d=[c.guild_id,s,e.author.id].some(M=>M&&p.includes(M));if(u==="blacklist"&&d||u==="whitelist"&&!d)continue;let h=Ji.get(l)?.message;if(!h)if(h??=zo.getMessage(s,l),h)Ji.set(l,{message:h,fetched:!0});else{let M={...e};delete M.embeds,delete M.interaction,SN.unshift(()=>bN(s,l).then(w=>w&&B.dispatch({type:"MESSAGE_UPDATE",message:M})));continue}let v={message:IN(h,[...t,e.id]),channel:c},b=wc.store.automodEmbeds;o.push(b==="always"||b==="prefer"&&!xN(h)?n(CN,{...v}):n(AN,{...v}))}return o.length?n(f,null,o):null}function BT(e){return e.isDM()?["Direct Message",Gt.getUserAvatarURL(E.getUser(e.recipients[0]))]:e.isGroupDM()?["Group DM",Gt.getChannelIconURL(e)]:["Server",Gt.getGuildIconURL(ae.getGuild(e.guild_id))]}function AN({message:e,channel:t}){let o=E.getUser(ee.getChannel(t.id).recipients?.[0]),[r,i]=BT(t);return n(hN,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:n(V,{variant:"text-xs/medium",tag:"span"},n("span",null,r," - "),Pe.parse(t.isDM()?`<@${o.id}>`:`<#${t.id}>`)),iconProxyURL:i}},renderDescription:()=>n("div",{key:e.id,className:Q(OT.message,wc.store.messageBackgroundColor&&OT.searchResult)},n(vN,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1}))})}function CN(e){let{message:t,channel:o}=e,r=Ts.MessageDisplayCompact.useSetting(),i=TN(t),{parse:s}=Pe,[l,c]=BT(o);return n(yN,{channel:o,childrenAccessories:n(V,{color:"text-muted",variant:"text-xs/medium",tag:"span",className:`${If.embedAuthor} ${If.embedMargin}`},c&&n("img",{src:c,className:If.embedAuthorIcon,alt:""}),n("span",null,n("span",null,l," - "),o.isDM()?Pe.parse(`<@${ee.getChannel(o.id).recipients[0]}>`):Pe.parse(`<#${o.id}>`))),compact:r,content:n(f,null,t.content||t.attachments.length<=i.length?s(t.content):[wN(t.attachments.length,t.embeds.length)],i.map(u=>{let{width:p,height:d}=MN(u.width,u.height);return n("div",null,n("img",{src:u.url,width:p,height:d}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var Ji,hN,yN,vN,OT,If,Pf,_T,SN,wc,Af,FT=g(()=>{"use strict";a();Tc();$();le();P();we();Wr();I();H();T();Ji=new Map,hN=Ne(".inlineMediaEmbed"),yN=Ne(".withFooter]:","childrenMessageContent:"),vN=Ne("renderSimpleAccessories)"),OT=x("message","searchResult"),If=x("embedAuthorIcon","embedAuthor","embedAuthor"),Pf=/(?n(k,{onClick:()=>Ji.clear()},"Clear the linked message cache")}});Af=y({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[m.TheSun,m.Ven,m.RyanCaoDev],dependencies:["MessageAccessoriesAPI"],settings:wc,start(){ya("messageLinkEmbed",e=>Pf.test(e.message.content)?(Pf.lastIndex=0,n(_,null,n(PN,{message:e.message}))):null,4)}})});var UT=g(()=>{});var Cf,$T=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted { background-color: rgba(240 71 71 / 15%) !important; } `,classNames:{},dom:null});Cf="src/plugins/messageLogger/deleteStyleOverlay.css"});var Rf,GT=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`/* Message content highlighting */ .messagelogger-deleted [class*="contents"] > :is(div, h1, h2, h3, p) { color: #f04747 !important; } /* Bot "thinking" text highlighting */ .messagelogger-deleted [class*="colorStandard"] { color: #f04747 !important; } /* Embed highlighting */ .messagelogger-deleted article :is(div, span, h1, h2, h3, p) { color: #f04747 !important; } .messagelogger-deleted a { color: #be3535 !important; text-decoration: underline; } `,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.editHistory || [],"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\i)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\i)\((\i)\)/,replace:"attachments: $1((() => { if ($self.shouldIgnore($2)) return $2; let old = arguments[1]?.attachments; if (!old) return $2; let new_ = $2.attachments?.map(a => a.id) ?? []; let diff = old.filter(a => !new_.includes(a.id)); old.forEach(a => a.deleted = true); $2.attachments = [...diff, ...$2.attachments]; return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory"},{match:/(\((\i)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:".removeAttachmentHoverButton",group:!0,replacement:[{match:/(className:\i,attachment:\i),/,replace:"$1,attachment: {deleted},"},{match:/\[\i\.obscured\]:.+?,/,replace:"$& 'messagelogger-deleted-attachment': deleted,"}]},{find:"Message must not be a thread starter message",replacement:[{match:/\)\("li",\{(.+?),className:/,replace:')("li",{$1,className:(arguments[0].message.deleted ? "messagelogger-deleted " : "")+'}]},{find:'Messages.MESSAGE_EDITED,")"',replacement:[{match:/(\)\("div",\{id:.+?children:\[)/,replace:"$1 (arguments[0].message.editHistory?.length > 0 ? arguments[0].message.editHistory.map(edit => $self.renderEdit(edit)) : null), "}]},{find:'displayName="ReferencedMessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\).+?},/,replace:"MESSAGE_DELETE:function($1){},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\).+?},/,replace:"MESSAGE_DELETE_BULK:function($1){},"}]},{find:"useMessageMenu:",replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]}]})});function qT(e){_i({name:e.name,description:e.name,inputType:1,execute:async(t,o)=>await xc(e.name)?(G.plugins.MessageTags.clyde&&ge(o.channel.id,{content:`${vr} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",` `)}):(ge(o.channel.id,{content:`${vr} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{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} A Tag with the name **${o}** already exists!`});let i={name:o,enabled:!0,message:r};qT(i),await DN(i),ge(t.channel.id,{content:`${vr} Successfully created the tag **${o}**!`});break}case"delete":{let o=ht(e[0].options,"tag-name","");if(!await xc(o))return ge(t.channel.id,{content:`${vr} A Tag with the name **${o}** does not exist!`});Zs(o),await LN(o),ge(t.channel.id,{content:`${vr} Successfully deleted the tag **${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! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let o=ht(e[0].options,"tag-name",""),r=await xc(o);if(!r)return ge(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{"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:"1em 1em 0"}},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},"Show in messages"),n(wt,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var ON,On,XT,Qi,Ef,Sr,Of,JT=g(()=>{"use strict";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:"Messages sent by webhooks",condition:XT},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,o)=>ae.getGuild(o?.guild_id)?.ownerId===t.id},{name:"ADMINISTRATOR",displayName:"Admin",description:"Has the administrator permission",permissions:["ADMINISTRATOR"]},{name:"MODERATOR_STAFF",displayName:"Staff",description:"Can manage the server, channels or roles",permissions:["MANAGE_GUILD","MANAGE_CHANNELS","MANAGE_ROLES"]},{name:"MODERATOR",displayName:"Mod",description:"Can manage messages or kick/ban people",permissions:["MANAGE_MESSAGES","KICK_MEMBERS","BAN_MEMBERS"]},{name:"VOICE_MODERATOR",displayName:"VC Mod",description:"Can manage voice chats",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't show extra tags for bots (excluding webhooks)",type:3},dontShowBotTag:{description:"Only show extra tags for bots / Hide [BOT] text",type:3},tagSettings:{type:6,component:_N,description:"fill me"}}),Of=y({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (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=$self.getTagTypes()))[$2.BOT"}},{find:".DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP,",replacement:[{match:/(switch\((\i)\){.+?)case (\i(?:\.\i)?)\.BOT:default:(\i)=.{0,40}(\i\.\i\.Messages)\.BOT_TAG_BOT/,replace:(e,t,o,r,i,s)=>`${t}default:{${i} = $self.getTagText(${r}[${o}], ${s})}`},{match:/(\i)=(\i)===\i(?:\.\i)?\.ORIGINAL_POSTER/,replace:"$1=$self.isOPTag($2)"},{match:/.botText,children:(\i)}\)]/,replace:"$&,'data-tag':$1.toLowerCase()"}]},{find:"renderSystemTag:",replacement:{match:/;return\((\(null==\i\?void 0:\i\.isSystemDM\(\).+?.Types.ORIGINAL_POSTER\)),null==(\i)\)/,replace:";$1;$2=$self.getTag({...arguments[0],origType:$2,location:'chat'});return $2 == null"}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?\i)=\(null==.{0,100}\.BOT;return null!=(?\i)&&\i\.bot/,replace:"$ = $self.getTag({user: $, channel: arguments[0].channel, origType: $.bot ? 0 : null, location: 'not-chat' }); return typeof $ === 'number'"}},{find:".hasAvatarForGuild(null==",replacement:{match:/(?=usernameIcon:)/,replace:"moreTags_channelId:arguments[0].channelId,"}},{find:'copyMetaData:"User Tag"',replacement:{match:/(?=,botClass:)/,replace:",moreTags_channelId:arguments[0].moreTags_channelId"}},{find:",overrideDiscriminator:",replacement:[{match:/user:\i,nick:\i,/,replace:"$&moreTags_channelId,"},{match:/,botType:(\i\((\i)\)),/g,replace:",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),"}]}],start(){if(!Sr.store.tagSettings)if(!Sr.store.visibility_WEBHOOK)Sr.store.tagSettings=Ef;else{let e={...Ef};Object.entries(Vencord.PlainSettings.plugins.MoreUserTags).forEach(([t,o])=>{let[r,i]=t.split("_");if(r==="visibility")switch(o){case"always":break;case"chat":e[i].showInNotChat=!1;break;case"not-chat":e[i].showInChat=!1;break;case"never":e[i].showInChat=!1,e[i].showInNotChat=!1;break}Sr.store.tagSettings=e,delete Vencord.Settings.plugins.MoreUserTags[t]})}},getPermissions(e,t){let o=ae.getGuild(t?.guild_id);if(!o)return[];let r=ON.computePermissions({user:e,context:o,overwrites:t.permissionOverwrites});return Object.entries(me).map(([i,s])=>r&s?i:"").filter(Boolean)},getTagTypes(){let e={},t=100;return Qi.forEach(({name:o})=>{e[o]=++t,e[t]=o,e[`${o}-BOT`]=++t,e[t]=`${o}-BOT`,e[`${o}-OP`]=++t,e[t]=`${o}-OP`}),e},isOPTag:e=>e===On.Types.ORIGINAL_POSTER||Qi.some(t=>e===On.Types[`${t.name}-OP`]),getTagText(e,t){if(!e)return t.BOT_TAG_BOT;let[o,r]=e.split("-"),i=Qi.find(({name:l})=>o===l);if(!i||r==="BOT"&&o!=="WEBHOOK"&&this.settings.store.dontShowForBots)return t.BOT_TAG_BOT;let s=Sr.store.tagSettings?.[i.name]?.text||i.displayName;switch(r){case"OP":return`${t.BOT_TAG_FORUM_ORIGINAL_POSTER} \u2022 ${s}`;case"BOT":return`${t.BOT_TAG_BOT} \u2022 ${s}`;default:return s}},getTag({message:e,user:t,channelId:o,origType:r,location:i,channel:s}){if(!t)return null;if(i==="chat"&&t.id==="1")return On.Types.OFFICIAL;if(t.isClyde())return On.Types.AI;let l=typeof r=="number"?r:null;if(s??=ee.getChannel(o),!s)return l;let c=this.settings.store,u=this.getPermissions(t,s);for(let p of Qi)if(!(i==="chat"&&!c.tagSettings[p.name].showInChat)&&!(i==="not-chat"&&!c.tagSettings[p.name].showInNotChat)&&(p.permissions?.some(d=>u.includes(d))||p.condition?.(e,t,s))){s.isForumPost()&&s.ownerId===t.id?l=On.Types[`${p.name}-OP`]:t.bot&&!XT(e,t)&&!c.dontShowBotTag?l=On.Types[`${p.name}-BOT`]:l=On.Types[p.name];break}return l}})});function UN(e,t){let o=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)o++;return o}function $N(e,t){if(!t.global)throw new Error("pattern must be global");let o=0;for(;t.test(e);)o++;return o}function HN(e){let t=UN(e,Bf)+$N(e,GN);return Math.min(t,10)}function _f(){if(!br.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=br.store.quality==="HD"?FN:BN,e.volume=br.store.volume,e.play()}var Bf,BN,FN,br,Ff,GN,QT=g(()=>{"use strict";a();$();Jp();P();we();I();T();Bf="\u{1F5FF}",BN="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",FN="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav",br=N({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:en(0,1,.1),default:.5,stickToMarkers:!1},quality:{description:"Quality of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:4,options:[{label:"Normal",value:"Normal",default:!0},{label:"HD",value:"HD"}]},triggerWhenUnfocused:{description:"Trigger the \u{1F5FF} even when the window is unfocused",type:3,default:!0},ignoreBots:{description:"Ignore bots",type:3,default:!0},ignoreBlocked:{description:"Ignore blocked users",type:3,default:!0}}),Ff=y({name:"Moyai",authors:[m.Megu,m.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",settings:br,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:o,channelId:r}){if(e||t!=="MESSAGE_CREATE"||o.state==="SENDING"||br.store.ignoreBots&&o.author?.bot||br.store.ignoreBlocked&&it.isBlocked(o.author?.id)||!o.content||r!==Ie.getChannelId())return;let i=HN(o.content);for(let s=0;s/gi});function qN(e){return e.name||e.recipients.map(E.getUser).filter(tm).map(t=>it.getNickname(t.id)||jN.getName(t)).join(", ")}var zN,jN,Tr,WN,Uf,VT=g(()=>{"use strict";a();P();Zl();I();H();T();zN=x("selectPrivateChannel"),jN=x("getGlobalName"),Tr=x("emptyIconFriends","emptyIconGuilds"),WN=x("guildNick","guildAvatarWithoutIcon");Uf=y({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[m.amia],patches:[{find:".Messages.USER_PROFILE_MODAL",replacement:{match:/(?<=\.tabBarItem.{0,50}MUTUAL_GUILDS.+?}\),)(?=.+?(\(0,\i\.jsxs?\)\(.{0,100}id:))/,replace:'(arguments[0].user.bot||arguments[0].isCurrentUser)?null:$1"MUTUAL_GDMS",children:"Mutual Groups"}),'}},{find:".UserProfileSections.USER_INFO_CONNECTIONS:",replacement:{match:/(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,replace:'case "MUTUAL_GDMS":return $self.renderMutualGDMs($1,$2);'}}],renderMutualGDMs(e,t){let o=ee.getSortedPrivateChannels().filter(r=>r.isGroupDM()&&r.recipients.includes(e.id)).map(r=>n(bi,{className:Tr.listRow,onClick:()=>{t(),zN.selectPrivateChannel(r.id)}},n(Ti,{src:Gt.getChannelIconURL({id:r.id,icon:r.icon,size:32}),size:"SIZE_40",className:Tr.listAvatar}),n("div",{className:Tr.listRowContent},n("div",{className:Tr.listName},qN(r)),n("div",{className:WN.guildNick},r.recipients.length+1," Members"))));return n(Si,{className:Tr.listScroller,fade:!0,onClose:t},o.length>0?o:n("div",{className:Tr.empty},n("div",{className:Tr.emptyIconFriends}),n("div",{className:Tr.emptyText},"No group dms in common")))}})});var KN,YN,ZN,va,$f,ew=g(()=>{"use strict";a();$();P();I();H();({updateGuildNotificationSettings:KN}=x("updateGuildNotificationSettings")),{toggleShowAllChannels:YN}=x("toggleShowAllChannels"),{isOptInEnabledForGuild:ZN}=x("isOptInEnabledForGuild"),va=N({guild:{description:"Mute Guild automatically",type:3,default:!0},everyone:{description:"Suppress @everyone and @here",type:3,default:!0},role:{description:"Suppress All Role @mentions",type:3,default:!0},showAllChannels:{description:"Show all channels automatically",type:3,default:!0}});$s("NewGuildSettings","MuteNewGuild");$f=y({name:"NewGuildSettings",description:"Automatically mute new servers and change various other settings upon joining",tags:["MuteNewGuild","mute","server"],authors:[m.Glitch,m.Nuckyz,m.carince,m.Mopi],patches:[{find:",acceptInvite(",replacement:{match:/INVITE_ACCEPT_SUCCESS.+?,(\i)=null!==.+?;/,replace:(e,t)=>`${e}$self.handleMute(${t});`}},{find:"{joinGuild:",replacement:{match:/guildId:(\i),lurker:(\i).{0,20}}\)\);/,replace:(e,t,o)=>`${e}if(!${o})$self.handleMute(${t});`}}],settings:va,handleMute(e){e==="@me"||e==="null"||e==null||(KN(e,{muted:va.store.guild,suppress_everyone:va.store.everyone,suppress_roles:va.store.role}),va.store.showAllChannels&&ZN(e)&&YN(e))}})});var XN,Gf,tw=g(()=>{"use strict";a();$();P();I();H();XN=x("getRelationships","isBlocked"),Gf=y({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[m.rushii,m.Samu],patches:[{find:"Messages.BLOCKED_MESSAGES_HIDE",replacement:[{match:/let\{[^}]*collapsedReason[^}]*\}/,replace:"return null;$&"}]},...['displayName="MessageStore"','displayName="ReadStateStore"'].map(e=>({find:e,predicate:()=>G.plugins.NoBlockedMessages.ignoreBlockedMessages===!0,replacement:[{match:/(?<=MESSAGE_CREATE:function\((\i)\){)/,replace:(t,o)=>`if($self.isBlocked(${o}.message))return;`}]}))],options:{ignoreBlockedMessages:{description:"Completely ignores (recent) incoming messages from blocked users (locally).",type:3,default:!1,restartNeeded:!0}},isBlocked:e=>XN.isBlocked(e.author.id)})});var Hf,ow=g(()=>{"use strict";a();P();I();Hf=y({name:"NoDevtoolsWarning",description:"Disables the 'HOLD UP' banner in the console. As a side effect, also prevents Discord from hiding your token, which prevents random logouts.",authors:[m.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(null!=\i&&"0.0.0"===\i\.remoteApp\.getVersion\(\)\)/,replace:"if(true)"}}]})});var zf,nw=g(()=>{"use strict";a();P();I();zf=y({name:"NoF1",description:"Disables F1 help bind.",authors:[m.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var jf,rw=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/noMosaic/styles.css",{name:"src/plugins/noMosaic/styles.css",source:`[class^="nonMediaAttachmentsContainer_"] [class*="messageAttachment_"] { position: relative; } `,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),shouldMention:!(\i)\.shiftKey/,replace:":$1,shouldMention:$self.shouldMention($1,$2.shiftKey)"}}]})});var Xf,cw=g(()=>{"use strict";a();P();I();Xf=y({name:"NoScreensharePreview",description:"Disables screenshare previews from being sent.",authors:[m.Nuckyz],patches:[{find:'"ApplicationStreamPreviewUploadManager"',replacement:{match:/await \i\.\i\.(makeChunkedRequest\(|post\(\{url:)\i\.\i\.STREAM_PREVIEW.+?\}\)/g,replace:"0"}}]})});var Jf,uw=g(()=>{"use strict";a();P();I();Jf=y({name:"NoTypingAnimation",authors:[m.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/document.hasFocus\(\)/,replace:"false"}}]})});var Qf,pw=g(()=>{"use strict";a();P();I();Qf=y({name:"NoUnblockToJump",description:"Allows you to jump to messages of blocked users without unblocking them",authors:[m.dzshn],patches:[{find:'.id,"Search Results"',replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"renderJumpButton()",replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"flash:!0,returnMessageId",replacement:{match:/.\?(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"false?$1"}}]})});var Vf,dw=g(()=>{"use strict";a();P();I();Vf=y({name:"NormalizeMessageLinks",description:"Strip canary/ptb from message links",authors:[m.bb010g],patches:[{find:".Messages.COPY_MESSAGE_LINK,",replacement:{match:/\.concat\(location\.host\)/,replace:".concat($self.normalizeHost(location.host))"}}],normalizeHost(e){return e.replace(/(^|\b)(canary\.|ptb\.)(discord.com)$/,"$1$3")}})});var QN,eg,mw=g(()=>{"use strict";a();$();P();I();QN=N({notificationVolume:{type:5,description:"Notification volume",markers:[0,25,50,75,100],default:100,stickToMarkers:!1}}),eg=y({name:"NotificationVolume",description:"Save your ears and set a separate volume for notifications and in-app sounds",authors:[m.philipbry],settings:QN,patches:[{find:"_ensureAudio(){",replacement:{match:/(?=Math\.min\(\i\.\i\.getOutputVolume\(\)\/100)/,replace:"$self.settings.store.notificationVolume/100*"}}]})});var tg,fw=g(()=>{"use strict";a();P();I();tg=y({name:"NSFWGateBypass",description:"Allows you to access NSFW channels without setting/verifying your age",authors:[m.Commandtechno],patches:[{find:".nsfwAllowed=null",replacement:{match:/(?<=\.nsfwAllowed=)null!==.+?(?=[,;])/,replace:"!0"}}]})});var ba,og,gw=g(()=>{"use strict";a();$();P();I();T();ba=N({channelToAffect:{type:4,description:"Select the type of DM for the plugin to affect",options:[{label:"Both",value:"both_dms",default:!0},{label:"User DMs",value:"user_dm"},{label:"Group DMs",value:"group_dm"}]},allowMentions:{type:3,description:"Receive audio pings for @mentions",default:!1},allowEveryone:{type:3,description:"Receive audio pings for @everyone and @here in group DMs",default:!1}}),og=y({name:"OnePingPerDM",description:"If unread messages are sent by a user in DMs multiple times, you'll only receive one audio ping. Read the messages to reset the limit",authors:[m.ProffDea],settings:ba,patches:[{find:".getDesktopType()===",replacement:[{match:/(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,replace:"$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else "},{match:/sound:(\i\?\i:void 0,volume:\i,onClick)/,replace:"sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"}]}],isPrivateChannelRead(e){let t=ee.getChannel(e.channel_id)?.type;return t!==1&&t!==3||t===1&&ba.store.channelToAffect==="group_dm"||t===3&&ba.store.channelToAffect==="user_dm"||ba.store.allowMentions&&e.mentions.some(o=>o.id===E.getCurrentUser().id)||ba.store.allowEveryone&&e.mention_everyone?!0:_r.getOldestUnreadMessageId(e.channel_id)===e.id}})});var ng,hw=g(()=>{"use strict";a();P();I();ng=y({name:"oneko",description:"cat follow mouse (real)",authors:[m.Ven,m.adryd],start(){fetch("https://raw.githubusercontent.com/adryd325/oneko.js/8fa8a1864aa71cd7a794d58bc139e755e96a236c/oneko.js").then(e=>e.text()).then(e=>e.replace("./oneko.gif","https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif").replace("(isReducedMotion)","(false)")).then(eval)},stop(){document.getElementById("oneko")?.remove()}})});var VN,eD,tD,oD,ci,nD,rg,yw=g(()=>{"use strict";a();$();P();I();T();VN=/^https:\/\/(spotify\.link|s\.team)\/.+$/,eD=/^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user|episode)\/(.+)(?:\?.+?)?$/,tD=/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,oD=/^https:\/\/store\.epicgames\.com\/(.+)$/,ci=N({spotify:{type:3,description:"Open Spotify links in the Spotify app",default:!0},steam:{type:3,description:"Open Steam links in the Steam app",default:!0},epic:{type:3,description:"Open Epic Games links in the Epic Games Launcher",default:!0}}),nD=VencordNative.pluginHelpers.OpenInApp,rg=y({name:"OpenInApp",description:"Open Spotify, Steam and Epic Games URLs in their respective apps instead of your browser",authors:[m.Ven],settings:ci,patches:[{find:"trackAnnouncementMessageLinkClicked({",replacement:{match:/(?<=handleClick:function\(\)\{return (\i)\}.+?)function \1\(.+?\)\{/,replace:"async $& if(await $self.handleLink(...arguments)) return;"}},{find:"WEB_OPEN(",predicate:()=>ci.store.spotify,replacement:{match:/\i\.\i\.isProtocolRegistered\(\)(.{0,100})window.open/g,replace:"true$1VencordNative.native.openExternal"}},{find:".CONNECTED_ACCOUNT_VIEWED,",replacement:{match:/(?<=href:\i,onClick:\i=>\{)(?=.{0,10}\i=(\i)\.type,.{0,100}CONNECTED_ACCOUNT_VIEWED)/,replace:"$self.handleAccountView(arguments[0],$1.type,$1.id);"}}],async handleLink(e,t){if(!e)return!1;let o=e.href;VN.test(o)&&(t?.preventDefault(),o=await nD.resolveRedirect(o));e:{if(!ci.store.spotify)break e;let r=eD.exec(o);if(!r)break e;let[,i,s]=r;return VencordNative.native.openExternal(`spotify:${i}:${s}`),t?.preventDefault(),!0}e:{if(!ci.store.steam||!tD.test(o))break e;return VencordNative.native.openExternal(`steam://openurl/${o}`),t?.preventDefault(),Mt("Opened link in Steam",X.Type.SUCCESS),!0}e:{if(!ci.store.epic)break e;let r=oD.exec(o);if(!r)break e;return VencordNative.native.openExternal(`com.epicgames.launcher://store/${r[1]}`),t?.preventDefault(),!0}return t?.defaultPrevented?(window.open(o,"_blank"),!0):!1},handleAccountView(e,t,o){t==="spotify"&&ci.store.spotify?(VencordNative.native.openExternal(`spotify:user:${o}`),e.preventDefault()):t==="steam"&&ci.store.steam&&(VencordNative.native.openExternal(`steam://openurl/https://steamcommunity.com/profiles/${o}`),Mt("Opened link in Steam",X.Type.SUCCESS),e.preventDefault())}})});var ig,sg,vw=g(()=>{"use strict";a();$();P();I();ig=N({defaultLayout:{type:4,options:[{label:"List",value:1,default:!0},{label:"Gallery",value:2}],description:"Which layout to use as default"},defaultSortOrder:{type:4,options:[{label:"Recently Active",value:0,default:!0},{label:"Date Posted",value:1}],description:"Which sort order to use as default"}}),sg=y({name:"OverrideForumDefaults",description:"Allows you to override default forum layout/sort order. you can still change it on a per-channel basis",authors:[m.Inbestigator],patches:[{find:"getDefaultLayout(){",replacement:[{match:/getDefaultLayout\(\){/,replace:"$&return $self.getLayout();"},{match:/getDefaultSortOrder\(\){/,replace:"$&return $self.getSortOrder();"}]}],getLayout:()=>ig.store.defaultLayout,getSortOrder:()=>ig.store.defaultSortOrder,settings:ig})});function bw(e){B.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:{enabled:e,settingsVisible:e}})}function Tw(e){let t={screenshakeEnabledLocations:{0:!0,1:!0,2:!0},shakeIntensity:1,confettiSize:16,confettiCount:5,combosRequiredCount:1};switch(e){case 0:{Object.assign(t,{screenshakeEnabledLocations:{0:!0,1:!1,2:!1},combosRequiredCount:5});break}case 1:{Object.assign(t,{confettiSize:12,confettiCount:8});break}case 2:{Object.assign(t,{shakeIntensity:20,confettiSize:25,confettiCount:15});break}}B.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:t})}var Sw,ag,ww=g(()=>{"use strict";a();$();P();I();T();Sw=N({superIntensePartyMode:{description:"Party intensity",type:4,options:[{label:"Normal",value:0,default:!0},{label:"Better",value:1},{label:"Project X",value:2}],restartNeeded:!1,onChange:Tw}}),ag=y({name:"Party mode \u{1F389}",description:"Allows you to use party mode cause the party never ends \u2728",authors:[m.UwUDev],settings:Sw,start(){bw(!0),Tw(Sw.store.superIntensePartyMode)},stop(){bw(!1)}})});var lg,cg,xw=g(()=>{"use strict";a();$();P();I();lg=N({lockout:{type:3,default:!0,description:`Bypass the permission lockout prevention ("Pretty sure you don't want to do this")`,restartNeeded:!0},onboarding:{type:3,default:!0,description:'Bypass the onboarding requirements ("Making this change will make your server incompatible [...]")',restartNeeded:!0}}),cg=y({name:"PermissionFreeWill",description:"Disables the client-side restrictions for channel permission management.",authors:[m.lewisakura],patches:[{find:".showPermissionLockoutModal(",replacement:[{match:/case"DENY":.{0,50}if\((?=\i\.\i\.can)/,replace:"$&true||"}],predicate:()=>lg.store.lockout},{find:".ONBOARDING_CHANNEL_THRESHOLD_WARNING",replacement:[{match:/(?<=(?:isDefaultChannelThresholdMetAfterDelete|checkDefaultChannelThresholdMetAfterChannelPermissionDeny):function\(\)\{)return \i(?=\})/g,replace:"return () => true"}],predicate:()=>lg.store.onboarding}],settings:lg})});var Mw=g(()=>{});function rD(e){return An(e.toLowerCase().split("_"))}function Ac(e){return e=Iw[e]||e,Ye.Messages[e]||rD(e)}function Pw(e){e==="USE_APPLICATION_COMMANDS"?e="USE_APPLICATION_COMMANDS_GUILD":e==="SEND_VOICE_MESSAGES"?e="SEND_VOICE_MESSAGE_GUILD":e!=="STREAM"&&(e=Iw[e]||e);let t=Ye.Messages[`ROLE_PERMISSIONS_${e}_DESCRIPTION`];return t?.hasMarkdown?Pe.parse(t.message):typeof t=="string"?t:""}function Cc({id:e},t){let o=ae.getRoles(e);return[...t.roles,e].map(r=>o[r]).sort((r,i)=>i.position-r.position)}function Aw(e){switch(_n.store.permissionsSortOrder){case 0:return e.sort((t,o)=>o.position-t.position);case 1:return e.sort((t,o)=>t.position-o.position);default:return e}}function Rc(e,t){let o=ae.getRoles(t);return e.sort((r,i)=>{if(r.type!==0||i.type!==0)return 0;let s=o[r.id];return o[i.id].position-s.position})}var oo,Iw,Ta=g(()=>{"use strict";a();Qe();Cn();T();xa();wa();oo=ve("vc-permviewer-");Iw={MANAGE_GUILD:"MANAGE_SERVER",MANAGE_GUILD_EXPRESSIONS:"MANAGE_EXPRESSIONS",CREATE_GUILD_EXPRESSIONS:"CREATE_EXPRESSIONS",MODERATE_MEMBERS:"MODERATE_MEMBER",STREAM:"VIDEO",SEND_VOICE_MESSAGES:"ROLE_PERMISSIONS_SEND_VOICE_MESSAGE"}});function ug(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Denied"),n("path",{fill:"var(--status-danger)",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"}))}function pg(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Allowed"),n("path",{fill:"var(--text-positive)",d:"M8.99991 16.17L4.82991 12L3.40991 13.41L8.99991 19L20.9999 7.00003L19.5899 5.59003L8.99991 16.17ZZ"}))}function Rw(){return n("svg",{height:"24",width:"24",viewBox:"0 0 16 16"},n("g",null,n("title",null,"Not overwritten"),n("polygon",{fill:"var(--text-normal)",points:"12 2.32 10.513 2 4 13.68 5.487 14"})))}var kw=g(()=>{"use strict";a()});function sD(e,t,o){return de(r=>n(cD,{modalProps:r,permissions:e,guild:t,header:o}))}function aD({permissions:e,guild:t,modalProps:o,header:r}){e.sort((u,p)=>u.type-p.type),Be([Ge],()=>Ge.getMemberIds(t.id),null,(u,p)=>u.length===p.length),se(()=>{let u=e.filter(p=>p.type===1&&!Ge.isMember(t.id,p.id)).map(({id:p})=>p);B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:u})},[]);let[i,s]=W(0),l=e[i],c=ae.getRoles(t.id);return n(ye,{...o,size:"large"},n(Le,null,n(V,{className:oo("perms-title"),variant:"heading-lg/semibold"},r," permissions:"),n(pt,{onClick:o.onClose})),n(ke,null,!l&&n("div",{className:oo("perms-no-perms")},n(V,{variant:"heading-lg/normal"},"No permissions to display!")),l&&n("div",{className:oo("perms-container")},n("div",{className:oo("perms-list")},e.map((u,p)=>{let d=E.getUser(u.id??""),h=c[u.id??""];return n("button",{className:oo("perms-list-item-btn"),onClick:()=>s(p)},n("div",{className:oo("perms-list-item",{"perms-list-item-active":i===p}),onContextMenu:v=>{_n.store.unsafeViewAsRole&&u.type===0&&Yt.openContextMenu(v,()=>n(lD,{guild:t,roleId:u.id,onClose:o.onClose}))}},(u.type===0||u.type===2)&&n("span",{className:oo("perms-role-circle"),style:{backgroundColor:h?.colorString??"var(--primary-300)"}}),u.type===1&&d!==void 0&&n("img",{className:oo("perms-user-img"),src:d.getAvatarURL(void 0,void 0,!1)}),n(V,{variant:"text-md/normal"},u.type===0?h?.name??"Unknown Role":u.type===1?(d&&Nn(d))??"Unknown User":n(fe,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",n(Ev,{height:18,width:18,"aria-hidden":"true"})))))})),n("div",{className:oo("perms-perms")},Object.entries(me).map(([u,p])=>n("div",{className:oo("perms-perms-item")},n("div",{className:oo("perms-perms-item-icon")},(()=>{let{permissions:d,overwriteAllow:h,overwriteDeny:v}=l;return d?(d&p)===p?pg():ug():h&&(h&p)===p?pg():v&&(v&p)===p?ug():Rw()})()),n(V,{variant:"text-md/normal"},Ac(u)),n(ne,{text:Pw(u)||"No Description"},d=>n(Ll,{...d}))))))))}function lD({guild:e,roleId:t,onClose:o}){return n(L.Menu,{navId:oo("role-context-menu"),onClose:Yt.closeContextMenu,"aria-label":"Role Options"},n(L.MenuItem,{id:"vc-pw-view-as-role",label:"View As Role",action:()=>{let r=ae.getRole(e.id,t);!r||(o(),B.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}var cD,Vi,wa=g(()=>{"use strict";a();le();Ut();It();mt();Ze();T();xa();Ta();kw();cD=_.wrap(aD),Vi=sD});var Nw=g(()=>{});function Ma({children:e,onMoreClick:t,buttons:o,moreTooltipText:r,defaultState:i=!1,onDropDownClick:s,headerText:l}){let[c,u]=W(i);return n(f,null,n("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"}},n(V,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)",display:"inline"}},l),n("div",{className:dg("center-flex")},o??null,t&&n(ne,{text:r},p=>n("button",{...p,className:dg("btn"),onClick:t},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"var(--text-normal)",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),n(ne,{text:c?"Hide "+l:"Show "+l},p=>n("button",{...p,className:dg("btn"),onClick:()=>{u(d=>!d),s?.(c)}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:c?"scale(1 -1)":"scale(1 1)"},n("path",{fill:"var(--text-normal)",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"})))))),c&&e)}var dg,mg=g(()=>{"use strict";a();Qe();T();Nw();dg=ve("vc-expandableheader-")});function pD({guild:e,guildMember:t,showBorder:o}){let r=_n.use(["permissionsSortOrder"]),[i,s]=Rt(()=>{let w=[],C=Cc(e,t),R=C.map(A=>({type:0,...A}));if(e.ownerId===t.userId){R.push({type:2,permissions:Object.values(me).reduce((F,z)=>F|z,0n)});let A=Ye.Messages.GUILD_OWNER||"Server Owner";w.push({permission:A,roleColor:"var(--primary-300)",rolePosition:1/0})}Aw(C);for(let[A,F]of Object.entries(me))for(let{permissions:z,colorString:Y,position:J}of C)if((z&F)===F){w.push({permission:Ac(A),roleColor:Y||"var(--primary-300)",rolePosition:J});break}return w.sort((A,F)=>F.rolePosition-A.rolePosition),[R,w]},[r.permissionsSortOrder]),{root:l,role:c,roleRemoveButton:u,roleNameOverflow:p,roles:d,rolePill:h,rolePillBorder:v,roleCircle:b,roleName:M}=uD;return n(Ma,{headerText:"Permissions",moreTooltipText:"Role Details",onMoreClick:()=>Vi(i,e,t.nick||E.getUser(t.userId).username),onDropDownClick:w=>_n.store.defaultPermissionsDropdownState=!w,defaultState:_n.store.defaultPermissionsDropdownState,buttons:[n(ne,{text:`Sorting by ${r.permissionsSortOrder===0?"Highest Role":"Lowest Role"}`},w=>n("button",{...w,className:oo("userperms-sortorder-btn"),onClick:()=>{r.permissionsSortOrder=r.permissionsSortOrder===0?1:0}},n("svg",{width:"20",height:"20",viewBox:"0 96 960 960",transform:r.permissionsSortOrder===0?"scale(1 1)":"scale(1 -1)"},n("path",{fill:"var(--text-normal)",d:"M440 896V409L216 633l-56-57 320-320 320 320-56 57-224-224v487h-80Z"}))))]},s.length>0&&n("div",{className:Q(l,d)},s.map(({permission:w,roleColor:C})=>n("div",{className:Q(c,h,o?v:null)},n("div",{className:u},n("span",{className:b,style:{backgroundColor:C}})),n("div",{className:M},n(V,{className:p,variant:"text-xs/medium"},w))))))}var uD,Dw,Lw=g(()=>{"use strict";a();le();mg();we();H();T();xa();Ta();wa();uD=go(()=>Object.assign({},...Dr(Ce.byProps("roles","rolePill","rolePillBorder"),Ce.byProps("roleCircle","dotBorderBase","dotBorderColor"),Ce.byProps("roleNameOverflow","root","roleName","roleRemoveButton"))));Dw=_.wrap(pD,{noop:!0})});function fg(e,t,o){return o===0&&!Ge.isMember(e,t)?null:n(L.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=ae.getGuild(e),i,s;switch(o){case 0:{let l=Ge.getMember(e,t);i=Cc(r,l).map(c=>({type:0,...c})),r.ownerId===t&&i.push({type:2,permissions:Object.values(me).reduce((c,u)=>c|u,0n)}),s=l.nick??E.getUser(l.userId).username;break}case 1:{let l=ee.getChannel(t);i=Rc(Object.values(l.permissionOverwrites).map(({id:c,allow:u,deny:p,type:d})=>({type:d,id:c,overwriteAllow:u,overwriteDeny:p})),e),s=l.name;break}default:{i=Object.values(ae.getRoles(r.id)).map(l=>({type:0,...l})),s=r.name;break}}Vi(i,r,s)}})}function kc(e,t){return(o,r)=>{if(!r||t===0&&!r.user||t===2&&!r.guild||t===1&&(!r.channel||!r.guild))return;let i=ut(e,o),s=(()=>{switch(t){case 0:return fg(r.guildId,r.user.id,t);case 1:return fg(r.guild.id,r.channel.id,t);case 2:return fg(r.guild.id);default:return null}})();s!=null&&(i?i.push(s):e==="roles"&&r.guildId&&o.splice(-1,0,n(L.MenuGroup,null,s)))}}var _n,gg,xa=g(()=>{"use strict";a();Mw();Eo();$();P();I();T();wa();Lw();Ta();_n=N({permissionsSortOrder:{description:"The sort method used for defining which role grants an user a certain permission",type:4,options:[{label:"Highest Role",value:0,default:!0},{label:"Lowest Role",value:1}]},defaultPermissionsDropdownState:{description:"Whether the permissions dropdown on user popouts should be open by default",type:3,default:!1}});gg=y({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[m.Nuckyz,m.Ven],settings:_n,patches:[{find:".popularApplicationCommandIds,",replacement:{match:/showBorder:(.{0,60})}\),(?<=guild:(\i),guildMember:(\i),.+?)/,replace:(e,t,o,r)=>`${e}$self.UserPermissions(${o},${r},${t}),`}}],UserPermissions:(e,t,o)=>!!t&&n(Dw,{guild:e,guildMember:t,showBorder:o}),contextMenus:{"user-context":kc("roles",0),"channel-context":kc(["mute-channel","unmute-channel"],1),"guild-context":kc("privacy",2),"guild-header-popout":kc("privacy",2)}})});function Ow(e){let t=e instanceof File,o=t?URL.createObjectURL(e):e;return new Promise((r,i)=>{let s=new Image;s.onload=()=>{t&&URL.revokeObjectURL(o),r(s)},s.onerror=(l,c,u,p,d)=>i(d||l),s.crossOrigin="Anonymous",s.src=o})}async function hD(e,t,o){for(let r of e)switch(r.name){case"image":let i=gD.getUploads(t.channel.id,Ew)[0];if(i){if(!i.isImage)throw"Upload is not an image";return i.item.file}break;case"url":return r.value;case"user":try{return(await Bt.getUser(r.value)).getAvatarURL(o?void 0:t.guild?.id,2048).replace(/\?size=\d+$/,"?size=2048")}catch(s){throw console.error(`[petpet] Failed to fetch user `,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;vAs.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))}async function Zw(e){!pe.find(o=>o.id===e)||(pe=pe.filter(o=>o.id!==e),await Bn(pe))}async function Xw(e,t=!0){let o=pe.find(r=>r.id===e);!o||(o.collapsed=t,await Bn(pe))}function Pa(e){return pe.some(t=>t.channels.includes(e))}function Jw(){return pe.length}function Qw(){return pe.filter(e=>!e.collapsed).map(e=>e.channels).flat()}function Vw(){return pe.reduce((e,t)=>(e.push(t.channels.length===0?1:t.channels.length),e),[])}function o2(e,t,o){!e[t]||!e[o]||([e[t],e[o]]=[e[o],e[t]])}async function wg(e,t){let o=pe.findIndex(i=>i.id===e),r=o+t;o2(pe,o,r),await Bn(pe)}async function xg(e,t){let o=pe.find(s=>s.channels.includes(e));if(!o)return;let r=o.channels.indexOf(e),i=r+t;o2(o.channels,r,i),await Bn(pe)}async function bD(){if(pe.some(o=>o.id==="oldPins"))return await kt(vg,!0);let e=SD(),t=[...new Set(e)].filter(o=>!pe.some(r=>r.channels.includes(o)));t?.length&&pe.push({id:"oldPins",name:"Pins",color:10070709,channels:t}),await kt(vg,!0)}async function TD(e){let t=await dt(yD+e);pe.length===0&&t?.length&&pe.push(...t.filter(o=>o.id!=="oldPins")),await kt(zw,!0)}async function wD(e){let t=await dt(zw),o=await dt(vg);t&&o||(t||await TD(e),o||await bD(),await Bn(pe))}var Hw,vg,zw,yD,pe,e2,Ia,t2,Tg,SD,Lc=g(()=>{"use strict";a();Xo();$();T();Dc();Aa();Hw="PinDMsCategories-",vg="PinDMsMigratedPinDMs",zw="PinDMsMigratedOldCategories",yD="BetterPinDMsCategories-",pe=[];e2=(e,t,o)=>{let r=e[t],i=e[t+o];return r&&i},Ia=(e,t)=>{let o=pe.findIndex(r=>r.id===e);return e2(pe,o,t)},t2=e=>Ia(e,-1)||Ia(e,1),Tg=(e,t)=>{let o=pe.find(i=>i.channels.includes(e));if(!o)return!1;let r=o.channels.indexOf(e);return e2(o.channels,r,t)};SD=()=>(G.plugins.PinDMs.pinnedDMs||void 0)?.split(",")});function PD(e,t){let[o,r]=W(null);return se(()=>{e?r(jw(e)):t&&r({id:X.genId(),name:`Pin Category ${pe.length+1}`,color:10070709,collapsed:!1,channels:[t]})},[e,t]),{category:o,setCategory:r}}function AD({categoryId:e,modalProps:t,initalChannelId:o}){let{category:r,setCategory:i}=PD(e,o);if(!r)return null;let s=async l=>{l.preventDefault(),e?await qw(r):await Ww(r),Wt(),t.onClose()};return n(ye,{...t},n(Le,null,n(V,{variant:"heading-lg/semibold",style:{flexGrow:1}},e?"Edit":"New"," Category")),n("form",{onSubmit:s},n(ke,{className:ID("content")},n(S.FormSection,null,n(S.FormTitle,null,"Name"),n(Je,{value:r.name,onChange:l=>i({...r,name:l})})),n(S.FormDivider,null),n(S.FormSection,null,n(S.FormTitle,null,"Color"),n(MD,{key:r.name,defaultColor:10070709,colors:Gw,onChange:l=>i({...r,color:l}),value:r.color,renderDefaultButton:()=>null,renderCustomButton:()=>n(xD,{color:r.color,onChange:l=>i({...r,color:l}),key:r.name,showEyeDropper:!1})}))),n(ct,null,n(k,{type:"submit",onClick:s,disabled:!r.name},e?"Save":"Create"))))}var xD,MD,Mg,ID,Ec,Ig=g(()=>{"use strict";a();Qe();Ze();H();T();Dc();Lc();Aa();xD=Ne(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR",".BACKGROUND_PRIMARY)"),MD=Ne(".presets,","customColor:"),Mg=vi(['name:"UserSettings"'],/createPromise:.{0,20}el\("(.+?)"\).{0,50}"UserSettings"/),ID=ve("vc-pindms-modal-");Ec=(e,t)=>Hr(async()=>(await Mg(),o=>n(AD,{categoryId:e,modalProps:o,initalChannelId:t})))});function n2(e){let t=Pa(e);return n(L.MenuItem,{id:"pin-dm",label:"Pin DMs"},!t&&n(f,null,n(L.MenuItem,{id:"vc-add-category",label:"Add Category",color:"brand",action:()=>Ec(null,e)}),n(L.MenuSeparator,null),pe.map(o=>n(L.MenuItem,{id:`pin-category-${o.name}`,label:o.name,action:()=>Kw(e,o.id).then(Wt)}))),t&&n(f,null,n(L.MenuItem,{id:"unpin-dm",label:"Unpin DM",color:"danger",action:()=>Yw(e).then(Wt)}),!vn.store.sortDmsByNewestMessage&&Tg(e,-1)&&n(L.MenuItem,{id:"move-up",label:"Move Up",action:()=>xg(e,-1).then(Wt)}),!vn.store.sortDmsByNewestMessage&&Tg(e,1)&&n(L.MenuItem,{id:"move-down",label:"Move Down",action:()=>xg(e,1).then(Wt)})))}var CD,RD,r2,i2=g(()=>{"use strict";a();Eo();T();Lc();Aa();Ig();CD=(e,t)=>{ut("leave-channel",e)?.unshift(n2(t.channel.id))},RD=(e,t)=>{let o=ut("close-dm",e);if(o){let r=o.findIndex(i=>i?.props?.id==="close-dm");o.splice(r,0,n2(t.channel.id))}},r2={"gdm-context":CD,"user-context":RD}});var s2,ND,a2,Wt,vn,Pg,Aa=g(()=>{"use strict";a();$w();$();le();P();we();I();H();T();i2();Ig();Dc();Lc();s2=x("privateChannelsHeaderContainer"),ND=Re("PrivateChannelSortStore"),Wt=()=>a2?.props?._forceUpdate?.(),vn=N({sortDmsByNewestMessage:{type:3,description:"Sort DMs by newest message",default:!1,onChange:()=>Wt()},dmSectioncollapsed:{type:3,description:"Collapse DM sections",default:!1,onChange:()=>Wt()}}),Pg=y({name:"PinDMs",description:"Allows you to pin private channels to the top of your DM list. To pin/unpin or reorder pins, right click DMs",authors:[m.Ven,m.Aria],settings:vn,contextMenus:r2,patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/(?<=componentDidMount\(\){).{1,100}scrollToChannel/,replace:"$self._instance = this;$&"},{match:/(?<=\i,{channels:\i,)privateChannelIds:(\i)/,replace:"privateChannelIds:$1.filter(c=>!$self.isPinned(c))"},{match:/(?<=renderRow:this\.renderRow,)sections:\[.+?1\)]/,replace:"...$self.makeProps(this,{$&})"},{match:/this\.renderDM=\(.+?(\i\.default),{channel.+?this.renderRow=(\i)=>{/,replace:"$&if($self.isChannelIndex($2.section, $2.row))return $self.renderChannel($2.section,$2.row,$1);"},{match:/this\.renderSection=(\i)=>{/,replace:"$&if($self.isCategoryIndex($1.section))return $self.renderCategory($1);"},{match:/(?<=span",{)className:\i\.headerText,/,replace:"...$self.makeSpanProps(),$&"},{match:/(?<=this\.getRowHeight=.{1,100}return 1===)\i/,replace:"($&-$self.categoryLen())"},{match:/this.getRowHeight=\((\i),(\i)\)=>{/,replace:"$&if($self.isChannelHidden($1,$2))return 0;"},{match:/(?<=scrollTo\(\{to:\i\}\):\(\i\+=)(\d+)\*\(.+?(?=,)/,replace:"$self.getScrollOffset(arguments[0],$1,this.props.padding,this.state.preRenderedChildren,$&)"},{match:/(?<=scrollToChannel\(\i\){.{1,300})this\.props\.privateChannelIds/,replace:"[...$&,...$self.getAllUncollapsedChannels()]"}]},{find:'.FRIENDS},"friends"',replacement:{match:/(?<=\i=\i=>{).{1,100}premiumTabSelected.{1,800}showDMHeader:.+?,/,replace:"let forceUpdate = Vencord.Util.useForceUpdater();$&_forceUpdate:forceUpdate,"}},{find:".Routes.APPLICATION_STORE&&",replacement:{match:/(?<=\i=__OVERLAY__\?\i:\[\.\.\.\i\(\),\.\.\.)\i/,replace:"$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))"}},{find:".getFlattenedGuildIds()],",replacement:{match:/(?<=\i===\i\.ME\?)\i\.\i\.getPrivateChannelIds\(\)/,replace:"$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))"}}],sections:null,set _instance(e){this.instance=e,a2=e},startAt:"WebpackReady",start:bg,flux:{CONNECTION_OPEN:bg},isPinned:Pa,categoryLen:Jw,getSections:Vw,getAllUncollapsedChannels:Qw,requireSettingsMenu:Mg,makeProps(e,{sections:t}){return this.sections=t,this.sections.splice(1,0,...this.getPinCount(e.props.privateChannelIds||[])),this.instance?.props?.privateChannelIds?.length===0&&(this.sections[this.sections.length-1]=0),{sections:this.sections,chunkSize:this.getChunkSize()}},makeSpanProps(){return{onClick:()=>this.collapseDMList(),role:"button",style:{cursor:"pointer"}}},getChunkSize(){let e=this.getSections();return(e.length*40+e.reduce((o,r)=>o+=r+44,0)+256)*1.5},getPinCount(e){return e.length?this.getSections():[]},isCategoryIndex(e){return this.sections&&e>0&&e{let t=pe[e-1];return t?n("h2",{className:Q(s2.privateChannelsHeaderContainer,"vc-pindms-section-container",t.collapsed?"vc-pindms-collapsed":""),style:{color:`#${t.color.toString(16).padStart(6,"0")}`},onClick:async()=>{await Xw(t.id,!t.collapsed),Wt()},onContextMenu:o=>{Yt.openContextMenu(o,()=>n(L.Menu,{navId:"vc-pindms-header-menu",onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),color:"danger","aria-label":"Pin DMs Category Menu"},n(L.MenuItem,{id:"vc-pindms-edit-category",label:"Edit Category",action:()=>Ec(t.id,null)}),t2(t.id)&&n(f,null,Ia(t.id,-1)&&n(L.MenuItem,{id:"vc-pindms-move-category-up",label:"Move Up",action:()=>wg(t.id,-1).then(()=>Wt())}),Ia(t.id,1)&&n(L.MenuItem,{id:"vc-pindms-move-category-down",label:"Move Down",action:()=>wg(t.id,1).then(()=>Wt())})),n(L.MenuSeparator,null),n(L.MenuItem,{id:"vc-pindms-delete-category",color:"danger",label:"Delete Category",action:()=>Zw(t.id).then(()=>Wt())})))}},n("span",{className:s2.headerText},t?.name??"uh oh"),n("svg",{className:"vc-pindms-collapse-icon","aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z"}))):null}),renderChannel(e,t,o){let{channel:r,category:i}=this.getChannel(e,t,this.instance.props.channels);return!r||!i||this.isChannelHidden(e,t)?null:n(o,{channel:r,selected:this.instance.props.selectedChannelId===r.id},r.id)},getChannel(e,t,o){let r=pe[e-1];if(!r)return{channel:null,category:null};let i=this.getCategoryChannels(r)[t];return{channel:o[i],category:r}},getCategoryChannels(e){return e.channels.length===0?[]:vn.store.sortDmsByNewestMessage?ND.getPrivateChannelIds().filter(t=>e.channels.includes(t)):e?.channels??[]}})});var Ag,l2=g(()=>{"use strict";a();P();I();Ag=y({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[m.botato],patches:[{find:".expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)&&(\(.{0,40}\(.{1,3}\.animated)/,replace:"$1"}]}]})});var kg={};qe(kg,{__getDecorators:()=>DD,addDecorator:()=>Cg,decorators:()=>Oc,removeDecorator:()=>Rg});function Cg(e,t,o){Oc.set(e,{decorator:t,onlyIn:o})}function Rg(e){Oc.delete(e)}function DD(e){let t=!!e.guildId;return Array.from(Oc.values(),o=>{let{decorator:r,onlyIn:i}=o;return!i||i==="guilds"&&t||i==="dms"&&!t?r(e):null})}var Oc,Ng=g(()=>{"use strict";a();Oc=new Map});var Eg={};qe(Eg,{__addDecorationsToMessage:()=>LD,addDecoration:()=>Dg,decorations:()=>_c,removeDecoration:()=>Lg});function Dg(e,t){_c.set(e,t)}function Lg(e){_c.delete(e)}function LD(e){return[..._c.values()].map(t=>t(e))}var _c,Og=g(()=>{"use strict";a();_c=new Map});function Bc(e,t){return({color:o,tooltip:r,small:i})=>n(ne,{text:r},s=>n("svg",{...s,height:(t?.height??20)-(i?3:0),width:(t?.width??20)-(i?3:0),viewBox:t?.viewBox??"0 0 24 24",fill:o},n("path",{d:e})))}var ED,c2,OD,_D,BD,Bg,u2,_g,Fg,p2=g(()=>{"use strict";a();fl();Ng();Og();$();le();P();I();H();T();ED=Re("SessionsStore");c2={desktop:Bc("M4 2.5c-1.103 0-2 .897-2 2v11c0 1.104.897 2 2 2h7v2H7v2h10v-2h-4v-2h7c1.103 0 2-.896 2-2v-11c0-1.103-.897-2-2-2H4Zm16 2v9H4v-9h16Z"),web:Bc("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93Zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39Z"),mobile:Bc("M 187 0 L 813 0 C 916.277 0 1000 83.723 1000 187 L 1000 1313 C 1000 1416.277 916.277 1500 813 1500 L 187 1500 C 83.723 1500 0 1416.277 0 1313 L 0 187 C 0 83.723 83.723 0 187 0 Z M 125 1000 L 875 1000 L 875 250 L 125 250 Z M 500 1125 C 430.964 1125 375 1180.964 375 1250 C 375 1319.036 430.964 1375 500 1375 C 569.036 1375 625 1319.036 625 1250 C 625 1180.964 569.036 1125 500 1125 Z",{viewBox:"0 0 1000 1500",height:17,width:17}),console:Bc("M14.8 2.7 9 3.1V47h3.3c1.7 0 6.2.3 10 .7l6.7.6V2l-4.2.2c-2.4.1-6.9.3-10 .5zm1.8 6.4c1 1.7-1.3 3.6-2.7 2.2C12.7 10.1 13.5 8 15 8c.5 0 1.2.5 1.6 1.1zM16 33c0 6-.4 10-1 10s-1-4-1-10 .4-10 1-10 1 4 1 10zm15-8v23.3l3.8-.7c2-.3 4.7-.6 6-.6H43V3h-2.2c-1.3 0-4-.3-6-.6L31 1.7V25z",{viewBox:"0 0 50 50"})},OD=x("useStatusFillColor","StatusTypes"),_D=({platform:e,status:t,small:o})=>{let r=e[0].toUpperCase()+e.slice(1),i=c2[e]??c2.desktop;return n(i,{color:OD.useStatusFillColor(t),tooltip:r,small:o})},BD=e=>cn.getState()?.clientStatuses?.[e],Bg=({user:e,wantMargin:t=!0,wantTopMargin:o=!1,small:r=!1})=>{if(!e||e.bot)return null;if(e.id===E.getCurrentUser().id){let l=ED.getSessions();if(typeof l!="object")return null;let c=Object.values(l).sort(({status:d},{status:h})=>d===h?0:d==="online"?1:h==="online"?-1:d==="idle"?1:h==="idle"?-1:0),u=Object.values(c).reduce((d,h)=>(h.clientInfo.client!=="unknown"&&(d[h.clientInfo.client]=h.status),d),{}),{clientStatuses:p}=cn.getState();p[E.getCurrentUser().id]=u}let i=cn.getState()?.clientStatuses?.[e.id];if(!i)return null;let s=Object.entries(i).map(([l,c])=>n(_D,{key:l,platform:l,status:c,small:r}));return s.length?n("span",{className:"vc-platform-indicator",style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:t?4:0,verticalAlign:"top",position:"relative",top:o?2:0,padding:t?0:1,gap:2}},s):null},u2={component:e=>n(Bg,{...e,wantMargin:!1}),position:0,shouldShow:e=>!!Object.keys(BD(e.user.id)??{}).length,key:"indicator"},_g={list:{description:"In the member list",onEnable:()=>Cg("platform-indicator",e=>n(_,{noop:!0},n(Bg,{user:e.user,small:!0}))),onDisable:()=>Rg("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>Ug(u2),onDisable:()=>$g(u2)},messages:{description:"Inside messages",onEnable:()=>Dg("platform-indicator",e=>n(_,{noop:!0},n(Bg,{user:e.message?.author,wantTopMargin:!0}))),onDisable:()=>Lg("platform-indicator")}},Fg=y({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[m.kemo,m.TheSun,m.Nuckyz,m.Ven],dependencies:["MessageDecorationsAPI","MemberListDecoratorsAPI"],start(){let e=G.plugins.PlatformIndicators,{displayMode:t}=e;t&&(t!=="both"?e[t]=!0:(e.list=!0,e.badges=!0),e.messages=!0,delete e.displayMode),Object.entries(_g).forEach(([o,r])=>{e[o]&&r.onEnable()})},stop(){Object.entries(_g).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>G.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\.STATUS_TYPING;switch(?=.+?(if\(\i\)return \i\.\i\.Masks\.STATUS_ONLINE_MOBILE))/,replace:".STATUS_TYPING;$1;switch"},{match:/switch\(\i\)\{case \i\.\i\.ONLINE:(if\(\i\)return\{[^}]+\})/,replace:"$1;$&"}]},{find:".AVATAR_STATUS_MOBILE_16;",predicate:()=>G.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\i===\i\.\i\.ONLINE&&(?=.{0,70}\.AVATAR_STATUS_MOBILE_16;)/,replace:""},{match:/(?<=\(\i\.status,)(\i)(?=,(\i),\i\))/,replace:(e,t,o)=>`${o}?"online":${t}`},{match:/(?<=\i&&!\i)&&\i===\i\.\i\.ONLINE/,replace:""}]},{find:"}isMobileOnline(",predicate:()=>G.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(_g).map(([e,t])=>[e,{type:3,description:`Show indicators ${t.description.toLowerCase()}`,restartNeeded:!0,default:!0}])),colorMobileIndicator:{type:3,description:"Whether to make the mobile indicator match the color of the user status.",default:!0,restartNeeded:!0}}})});var m2,d2,FD,UD,$D,Gg,f2=g(()=>{"use strict";a();En();uo();P();I();H();T();m2=x("getUploads"),d2=e=>Ps.getDraft(e,0),FD=e=>new Promise(t=>{let o=new Image;o.onload=()=>t({width:o.width,height:o.height}),o.onerror=()=>t(null),o.src=e}),UD=async e=>await Promise.all(m2.getUploads(e,0).map(async t=>{let{isImage:o,filename:r,spoiler:i,item:{file:s}}=t,l=URL.createObjectURL(s),c={id:Ks(),filename:i?"SPOILER_"+r:r,content_type:void 0,size:await t.getSize(),spoiler:i,url:l+"#",proxy_url:l+"#"};if(o){let u=await FD(l);if(!u)return c;c.width=u.width,c.height=u.height}return c})),$D=({isMainChat:e,isEmpty:t,type:{attachments:o}})=>{let r=Ie.getChannelId(),i=Be([Ps],()=>d2(r));if(!e)return null;let s=o&&m2.getUploads(r,0).length>0;return!(!t&&i?.length>0)&&!s?null:n(xo,{tooltip:"Preview Message",onClick:async()=>ge(r,{content:d2(r),author:E.getCurrentUser(),attachments:s?await UD(r):void 0}),buttonProps:{style:{translate:"0 2px"}}},n("svg",{fill:"currentColor",fillRule:"evenodd",width:"24",height:"24",viewBox:"0 0 24 24",style:{scale:"1.096",translate:"0 -1px"}},n("path",{d:"M22.89 11.7c.07.2.07.4 0 .6C22.27 13.9 19.1 21 12 21c-7.11 0-10.27-7.11-10.89-8.7a.83.83 0 0 1 0-.6C1.73 10.1 4.9 3 12 3c7.11 0 10.27 7.11 10.89 8.7Zm-4.5-3.62A15.11 15.11 0 0 1 20.85 12c-.38.88-1.18 2.47-2.46 3.92C16.87 17.62 14.8 19 12 19c-2.8 0-4.87-1.38-6.39-3.08A15.11 15.11 0 0 1 3.15 12c.38-.88 1.18-2.47 2.46-3.92C7.13 6.38 9.2 5 12 5c2.8 0 4.87 1.38 6.39 3.08ZM15.56 11.77c.2-.1.44.02.44.23a4 4 0 1 1-4-4c.21 0 .33.25.23.44a2.5 2.5 0 0 0 3.32 3.32Z"})))},Gg=y({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[m.Aria],dependencies:["ChatInputButtonAPI"],startAt:"Init",start:()=>wo("previewMessage",$D),stop:()=>nn("previewMessage")})});var g2=g(()=>{});function Hg(){return n(U.Fragment,null,n(S.FormTitle,{tag:"h3"},"More Information"),n(S.FormText,null,"To add your own pronouns, visit"," ",n(je,{href:"https://pronoundb.org"},"pronoundb.org")),n(S.FormDivider,null),n(S.FormText,null,"The two pronoun formats are lowercase and capitalized. Example:",n("ul",null,n("li",null,"Lowercase: they/them"),n("li",null,"Capitalized: They/Them")),'Text like "Ask me my pronouns" or "Any pronouns" will always be capitalized. ',n("br",null),n("br",null),"You can also configure whether or not to display pronouns for the current user (since you probably already know them)"))}var h2=g(()=>{"use strict";a();To();T()});var zg,y2=g(()=>{a();zg="Vendicated/Vencord"});var v2,S2=g(()=>{"use strict";a();ki();y2();v2=`Vencord/${No}${zg?` (https://github.com/${zg})`:""}`});var Fn,Fc=g(()=>{"use strict";a();$();I();Uc();Fn=N({pronounsFormat:{type:4,description:"The format for pronouns to appear in chat",options:[{label:"Lowercase",value:"LOWERCASE",default:!0},{label:"Capitalized",value:"CAPITALIZED"}]},pronounSource:{type:4,description:"Where to source pronouns from",options:[{label:"Prefer PronounDB, fall back to Discord",value:0,default:!0},{label:"Prefer Discord, fall back to PronounDB (might lead to inconsistency between pronouns in chat and profile)",value:1}]},showSelf:{type:3,description:"Enable or disable showing pronouns for the current user",default:!0},showInMessages:{type:3,description:"Show in messages",default:!0},showInProfile:{type:3,description:"Show in profile",default:!0}})});var $c,b2=g(()=>{"use strict";a();$c={hh:"He/Him",hi:"He/It",hs:"He/She",ht:"He/They",ih:"It/Him",ii:"It/Its",is:"It/She",it:"It/They",shh:"She/He",sh:"She/Her",si:"She/It",st:"She/They",th:"They/He",ti:"They/It",ts:"They/She",tt:"They/Them",any:"Any pronouns",other:"Other pronouns",ask:"Ask me my pronouns",avoid:"Avoid pronouns, use my name",unspecified:"Unspecified"}});function HD(e,t=!1){let o=ho.getUserProfile(e)?.pronouns;return t?o:ho.getGuildMemberProfile(e,Bi()?.guild_id)?.pronouns||o}function Gc(e,t=!1){let o=HD(e,t)?.trim().replace(zD," "),[r]=st(()=>jD(e),{fallbackValue:x2(e),onError:i=>console.error("Fetching pronouns failed: ",i)});return Fn.store.pronounSource===1&&o?[o,"Discord"]:r&&r!=="unspecified"?[qD(r),"PronounDB"]:[o,"Discord"]}function w2(e,t=!1){let o=Gc(e,t);return!Fn.store.showInProfile||!Fn.store.showSelf&&e===E.getCurrentUser().id?T2:o}function x2(e){let t=jg[e];return t&&t!=="unspecified"?t:t||null}function jD(e){return new Promise(t=>{let o=x2(e);if(o)return t(o);if(e in ts)return ts[e].push(t);ts[e]=[t],GD()})}async function WD(e){let t=new URLSearchParams;t.append("platform","discord"),t.append("ids",e.join(","));try{return await(await fetch("https://pronoundb.org/api/v1/lookup-bulk?"+t.toString(),{method:"GET",headers:{Accept:"application/json","X-PronounDB-Source":v2}})).json().then(r=>(Object.assign(jg,r),r))}catch(o){console.error("PronounDB fetching failed: ",o);let r=Object.fromEntries(e.map(i=>[i,"unspecified"]));return Object.assign(jg,r),r}}function qD(e){let{pronounsFormat:t}=G.plugins.PronounDB;return t==="CAPITALIZED"?$c[e]:t==="LOWERCASE"&&["any","ask","avoid","other"].includes(e)?$c[e]:$c[e].toLowerCase()}var T2,jg,ts,GD,zD,Uc=g(()=>{"use strict";a();$();zr();S2();mt();lt();T();Fc();b2();T2=[null,""],jg={},ts={},GD=lo(async()=>{let e=Object.keys(ts),t=await WD(e);for(let o of e)ts[o]?.forEach(r=>r(t[o])),delete ts[o]});zD=/\n+/g});function M2(e){return!(!Fn.store.showInMessages||e.author.bot||e.author.system||e.type===KD||!Fn.store.showSelf&&e.author.id===E.getCurrentUser().id)}function YD({message:e}){let[t]=Gc(e.author.id);return t?n("span",{className:Q(Hc.timestampInline,Hc.timestamp)},"\u2022 ",t):null}var Hc,KD,I2,P2,ZD,A2=g(()=>{"use strict";a();le();we();H();T();Uc();Fc();Hc=x("timestampInline"),KD=24;I2=_.wrap(({message:e})=>M2(e)?n(YD,{message:e}):null,{noop:!0}),P2=_.wrap(({message:e})=>M2(e)?n(ZD,{message:e}):null,{noop:!0});ZD=_.wrap(({message:e})=>{let[t]=Gc(e.author.id);return t?n("span",{className:Q(Hc.timestampInline,Hc.timestamp,"vc-pronoundb-compact")},"\u2022 ",t):null},{noop:!0})});var C2,Wg,R2=g(()=>{"use strict";a();g2();P();I();h2();A2();Uc();Fc();C2={match:/text:(.{0,10}.Messages\.USER_PROFILE_PRONOUNS)(?=,)/,replace:'$& + (typeof vcPronounSource !== "undefined" ? ` (${vcPronounSource})` : "")'},Wg=y({name:"PronounDB",authors:[m.Tyman,m.TheKodeToad,m.Ven],description:"Adds pronouns to user messages using pronoundb",patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/("span",{id:\i,className:\i,children:\i}\))/,replace:"$1, $self.CompactPronounsChatComponentWrapper(arguments[0])"}},{find:"showCommunicationDisabledStyles",replacement:{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(arguments[0])]"}},{find:".userTagNoNickname",replacement:[{match:/{user:(\i),[^}]*,pronouns:(\i),[^}]*}=\i;/,replace:"$&let vcPronounSource;[$2,vcPronounSource]=$self.useProfilePronouns($1.id);"},C2]},{find:".nameTagSmall)",replacement:[{match:/\.getName\(\i\);(?<=displayProfile.{0,200})/,replace:"$&const [vcPronounce,vcPronounSource]=$self.useProfilePronouns(arguments[0].user.id,true);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce;"},C2]}],settings:Fn,settingsAboutComponent:Hg,PronounsChatComponentWrapper:I2,CompactPronounsChatComponentWrapper:P2,useProfilePronouns:w2})});var qg,k2=g(()=>{"use strict";a();li();P();mt();I();T();qg=y({name:"QuickMention",authors:[m.kemo],description:"Adds a quick mention button to the message actions bar",dependencies:["MessagePopoverAPI"],start(){on("QuickMention",e=>{let t=ee.getChannel(e.channel_id);return t.guild_id&&!_e.can(me.SEND_MESSAGES,t)?null:{label:"Quick Mention",icon:this.Icon,message:e,channel:t,onClick:()=>kn(`<@${e.author.id}> `)}})},stop(){Oo("QuickMention")},Icon:()=>n("svg",{className:"icon",height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M12 2C6.486 2 2 6.486 2 12C2 17.515 6.486 22 12 22C14.039 22 15.993 21.398 17.652 20.259L16.521 18.611C15.195 19.519 13.633 20 12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12V12.782C20 14.17 19.402 15 18.4 15L18.398 15.018C18.338 15.005 18.273 15 18.209 15H18C17.437 15 16.6 14.182 16.6 13.631V12C16.6 9.464 14.537 7.4 12 7.4C9.463 7.4 7.4 9.463 7.4 12C7.4 14.537 9.463 16.6 12 16.6C13.234 16.6 14.35 16.106 15.177 15.313C15.826 16.269 16.93 17 18 17L18.002 16.981C18.064 16.994 18.129 17 18.195 17H18.4C20.552 17 22 15.306 22 12.782V12C22 6.486 17.514 2 12 2ZM12 14.599C10.566 14.599 9.4 13.433 9.4 11.999C9.4 10.565 10.566 9.399 12 9.399C13.434 9.399 14.6 10.565 14.6 11.999C14.6 13.433 13.434 14.599 12 14.599Z"}))})});function F2(e,t){let o=e.findIndex(r=>r.id===t);return o===-1?o:e.length-o-1}function L2({channelId:e,messageId:t,_isQuickEdit:o}){if(o)return;let r=E.getCurrentUser().id,i=zo.getMessages(e)._array.filter(s=>s.author.id===r);jc=F2(i,t)}function E2({message:e,_isQuickReply:t}){t||(zc=F2(zo.getMessages(e.channel_id)._array,e.id))}function O2(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!JD(e)||QD(e)||(e.shiftKey?tL(t):eL(t))}function U2(e,t){let o=document.getElementById("message-content-"+t);if(!o)return;let r=Math.max(document.documentElement.clientHeight,window.innerHeight),i=o.getBoundingClientRect();(i.bottom<200||i.top-r>=-200)&&XD.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function $2(e,t){let o=zo.getMessages(Ie.getChannelId())._array;if(!t){let l=E.getCurrentUser().id;o=o.filter(c=>c.author.id===l)}let r=l=>e?Math.min(o.length-1,l+1):Math.max(-1,l-1),i=l=>{do l=r(l);while(l!==-1&&o[o.length-l-1]?.deleted===!0);return l},s;return t?zc=s=i(zc):jc=s=i(jc),s===-1?void 0:o[o.length-s-1]}function VD(e){let{enabled:t,userList:o,shouldPingListed:r}=G.plugins.NoReplyMention,i=!t||r===o.includes(e.author.id);switch(B2.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function eL(e){let t=ee.getChannel(Ie.getChannelId());if(t.guild_id&&!_e.can(me.SEND_MESSAGES,t))return;let o=$2(e,!0);if(!o)return void B.dispatch({type:"DELETE_PENDING_REPLY",channelId:Ie.getChannelId()});let r=ee.getChannel(o.channel_id),i=E.getCurrentUser().id;B.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:VD(o),showMentionToggle:r.guild_id!==null&&o.author.id!==i,_isQuickReply:!0}),U2(r.id,o.id)}function tL(e){let t=ee.getChannel(Ie.getChannelId());if(t.guild_id&&!_e.can(me.SEND_MESSAGES,t))return;let o=$2(e,!1);if(!o)return B.dispatch({type:"MESSAGE_END_EDIT",channelId:Ie.getChannelId()});B.dispatch({type:"MESSAGE_START_EDIT",channelId:o.channel_id,messageId:o.id,content:o.content,_isQuickEdit:!0}),U2(o.channel_id,o.id)}var XD,_2,zc,jc,B2,Kg,N2,D2,JD,QD,G2=g(()=>{"use strict";a();$();P();I();H();T();XD=x("jumpToMessage"),_2=navigator.platform.includes("Mac"),zc=-1,jc=-1,B2=N({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),Kg=y({name:"QuickReply",authors:[m.fawn,m.Ven,m.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:B2,start(){B.subscribe("DELETE_PENDING_REPLY",N2),B.subscribe("MESSAGE_END_EDIT",D2),B.subscribe("MESSAGE_START_EDIT",L2),B.subscribe("CREATE_PENDING_REPLY",E2),document.addEventListener("keydown",O2)},stop(){B.unsubscribe("DELETE_PENDING_REPLY",N2),B.unsubscribe("MESSAGE_END_EDIT",D2),B.unsubscribe("MESSAGE_START_EDIT",L2),B.unsubscribe("CREATE_PENDING_REPLY",E2),document.removeEventListener("keydown",O2)}}),N2=()=>zc=-1,D2=()=>jc=-1;JD=e=>_2?e.metaKey:e.ctrlKey,QD=e=>e.altKey||!_2&&e.metaKey});var Yg,Zg,H2=g(()=>{"use strict";a();P();I();T();Zg=y({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[m.Cyn,m.maisymoe],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.`${t}{var decoded=$self.decodeError.apply(null, arguments);if(decoded)return decoded;${o}}`}}],async start(){let e=`https://raw.githubusercontent.com/facebook/react/v${U.version}/scripts/error-codes/codes.json`;Yg=await fetch(e).then(t=>t.json()).catch(t=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes `,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(`You are no longer in the group ${i.name}.`,i.iconURL);if(mo.store.servers&&e?.size)for(let[r,i]of e)os.has(r)||Un(`You are no longer in the server ${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(`You are no longer friends with ${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(`Friend request from ${Nn(i)} has been revoked.`,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.set(q2(),ui)}var os,ns,ui,j2,W2,q2,nh=g(()=>{"use strict";a();ei();er();mt();T();Kc();Vg();os=new Map,ns=new Map,ui={friends:[],requests:[]},j2=()=>`relationship-notifier-guilds-${E.getCurrentUser().id}`,W2=()=>`relationship-notifier-groups-${E.getCurrentUser().id}`,q2=()=>`relationship-notifier-friends-${E.getCurrentUser().id}`});async function Q2({relationship:{type:e,id:t}}){if(rh===t){rh=void 0;return}let o=await Bt.getUser(t).catch(()=>null);if(!!o)switch(e){case 1:mo.store.friends&&Un(`${Nn(o)} removed you as a friend.`,o.getAvatarURL(void 0,void 0,!1),()=>bo(o.id));break;case 3:mo.store.friendRequestCancels&&Un(`A friend request from ${Nn(o)} has been removed.`,o.getAvatarURL(void 0,void 0,!1),()=>bo(o.id));break}}function V2({guild:{id:e,unavailable:t}}){if(!mo.store.servers||t)return;if(ih===e){th(e),ih=void 0;return}let o=K2(e);o&&(th(e),Un(`You were removed from the server ${o.name}.`,o.iconURL))}function ex({channel:{id:e,type:t}}){if(!mo.store.groups||t!==3)return;if(sh===e){oh(e),sh=void 0;return}let o=Y2(e);o&&(oh(e),Un(`You were removed from the group ${o.name}.`,o.iconURL))}var rh,ih,sh,Z2,X2,J2,tx=g(()=>{"use strict";a();mt();T();Kc();Vg();nh();Z2=e=>rh=e,X2=e=>ih=e,J2=e=>sh=e});var ah,ox=g(()=>{"use strict";a();P();I();tx();Kc();nh();ah=y({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[m.nick],settings:mo,patches:[{find:"removeRelationship:(",replacement:{match:/(removeRelationship:\((\i),\i,\i\)=>)/,replace:"$1($self.removeFriend($2),0)||"}},{find:"async leaveGuild(",replacement:{match:/(leaveGuild\((\i)\){)/,replace:"$1$self.removeGuild($2);"}},{find:"},closePrivateChannel(",replacement:{match:/(closePrivateChannel\((\i)\){)/,replace:"$1$self.removeGroup($2);"}}],flux:{GUILD_CREATE:Zc,GUILD_DELETE:V2,CHANNEL_CREATE:Xc,CHANNEL_DELETE:ex,RELATIONSHIP_ADD:ka,RELATIONSHIP_UPDATE:ka,RELATIONSHIP_REMOVE(e){Q2(e),ka()},CONNECTION_OPEN:eh},async start(){setTimeout(()=>{eh()},5e3)},removeFriend:Z2,removeGroup:J2,removeGuild:X2})});function nx(){let{forceServerHome:e}=lh.use(["forceServerHome"]);return e}var lh,ch,rx=g(()=>{"use strict";a();Eo();$();P();I();T();lh=N({forceServerHome:{type:3,description:"Force the Server Guide to be the Server Home tab when it is enabled.",default:!1}});ch=y({name:"ResurrectHome",description:"Re-enables the Server Home tab when there isn't a Server Guide. Also has an option to force the Server Home over the Server Guide, which is accessible through right-clicking the Server Guide.",authors:[m.Dolfies,m.Nuckyz],settings:lh,patches:[{find:"GuildFeatures.GUILD_HOME_DEPRECATION_OVERRIDE",all:!0,replacement:[{match:/\i\.hasFeature\(\i\.GuildFeatures\.GUILD_HOME_DEPRECATION_OVERRIDE\)/g,replace:"true"}]},{find:"GuildHomeFeedbackExperiment.definition.id",replacement:[{match:/return{showFeedback:\i,setOnDismissedFeedback:(\i)}/,replace:"return{showFeedback:false,setOnDismissedFeedback:$1}"}]},{find:'"MessageActionCreators"',replacement:{match:/(?<=focusMessage\(\i\){.+?)(?=focus:{messageId:(\i)})/,replace:"before:$1,"}},{find:"61eef9_2",replacement:{match:/(?<=getMutableGuildChannelsForGuild\(\i\)\);)(?=if\(null==\i\|\|)/,replace:"if($self.useForceServerHome())return false;"}}],useForceServerHome:nx,contextMenus:{"guild-context"(e,t){let o=nx();if(!t?.guild)return;ut("hide-muted-channels",e)?.unshift(n(L.MenuCheckboxItem,{key:"force-server-home",id:"force-server-home",label:"Force Server Home",checked:o,action:()=>lh.store.forceServerHome=!o}))}}})});var pL,dL,uh,ix=g(()=>{"use strict";a();P();I();H();pL=x("spoilerContent"),dL=x("messagesWrapper","messages"),uh=y({name:"RevealAllSpoilers",description:"Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",authors:[m.whqwert],patches:[{find:".removeObscurity=",replacement:{match:/(?<=\.removeObscurity=(\i)=>{)/,replace:(e,t)=>`$self.reveal(${t});`}}],reveal(e){let{ctrlKey:t,shiftKey:o,target:r}=e;if(!t)return;let{spoilerContent:i,hidden:s}=pL,{messagesWrapper:l}=dL,c=o?document.querySelector(`div.${l}`):r.parentElement;for(let u of c.querySelectorAll(`span.${i}.${s}`))u.click()}})});function sx(e,t){open(t+encodeURIComponent(e),"_blank")}function ax(e){return n(L.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(Jc).map((t,o)=>{let r="search-image-"+t;return n(L.MenuItem,{key:r,id:r,label:n(fe,{style:{alignItems:"center",gap:"0.5em"}},n("img",{style:{borderRadius:o>=3?"50%":void 0},"aria-hidden":"true",height:16,width:16,src:new URL("/favicon.ico",Jc[t]).toString().replace("lens.","")}),t),action:()=>sx(e,Jc[t])})}),n(L.MenuItem,{key:"search-image-all",id:"search-image-all",label:n(fe,{style:{alignItems:"center",gap:"0.5em"}},n(Xr,{height:16,width:16}),"All"),action:()=>Object.values(Jc).forEach(t=>sx(e,t))}))}var Jc,mL,fL,ph,lx=g(()=>{"use strict";a();Eo();Ut();It();P();I();T();Jc={Google:"https://lens.google.com/uploadbyurl?url=",Yandex:"https://yandex.com/images/search?rpt=imageview&url=",SauceNAO:"https://saucenao.com/search.php?url=",IQDB:"https://iqdb.org/?url=",TinEye:"https://www.tineye.com/search?url=",ImgOps:"https://imgops.com/start?url="};mL=(e,t)=>{if(t?.reverseImageSearchType!=="img")return;let o=t.itemHref??t.itemSrc;ut("copy-link",e)?.push(ax(o))},fL=(e,t)=>{if(!t?.src)return;(ut("copy-native-link",e)??e).push(ax(t.src))},ph=y({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[m.Ven,m.Nuckyz],tags:["ImageUtilities"],patches:[{find:".Messages.MESSAGE_ACTIONS_MENU_LABEL",replacement:{match:/favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,replace:(e,t)=>`${e}reverseImageSearchType:${t}.getAttribute("data-role"),`}}],contextMenus:{message:mL,"image-context":fL}})});var cx=g(()=>{});async function dh(){ft=await px()??{}}async function px(){return(await yt.get(ux))?.[E.getCurrentUser()?.id]}async function $n(){return(await px())?.token}async function rs(e){return yt.update(ux,t=>(t??={},ft=t[E.getCurrentUser().id]??={},e.token&&(ft.token=e.token),e.user&&(ft.user=e.user),t))}function is(e){de(t=>n(gL,{...t,scopes:["identify"],responseType:"code",redirectUri:"https://manti.vendicated.dev/api/reviewdb/auth",permissions:0n,clientId:"915703782174752809",cancelCompletesFlow:!1,callback:async o=>{try{let r=new URL(o.location);r.searchParams.append("clientMod","vencord");let i=await fetch(r,{headers:{Accept:"application/json"}});if(!i.ok){let{message:l}=await i.json();Mt(l||"An error occured while authorizing",X.Type.FAILURE);return}let{token:s}=await i.json();rs({token:s}),Mt("Successfully logged in!",X.Type.SUCCESS),e?.()}catch(r){new oe("ReviewDB").error("Failed to authorize",r)}}}))}var ux,gL,ft,Gn=g(()=>{"use strict";a();ei();Ke();Ze();H();T();ux="rdb-auth",{OAuth2AuthorizeModal:gL}=x("OAuth2AuthorizeModal"),ft={}});var Na=g(()=>{"use strict";a()});function dx(e,t){let o=E.getCurrentUser().id;return o===e||t.sender.discordID===o||ft.user?.type===1}function mx(e,t){let o=E.getCurrentUser().id;return e===o&&t.sender.discordID!==o}function fx(e){return e.sender.discordID!==E.getCurrentUser().id}function qt(e,t=X.Type.MESSAGE){X.show({id:X.genId(),message:e,type:t,options:{position:X.Position.BOTTOM}})}var vt,Hn=g(()=>{"use strict";a();Qe();T();Gn();Na();vt=ve("vc-rdb-")});function hL(e){return n(ne,{text:"Unblock user"},t=>n("div",{...t,role:"button",onClick:e.onClick,className:vt("block-modal-unblock")},n("svg",{height:"20",viewBox:"0 -960 960 960",width:"20",fill:"var(--status-danger)"},n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q54 0 104-17.5t92-50.5L228-676q-33 42-50.5 92T160-480q0 134 93 227t227 93Zm252-124q33-42 50.5-92T800-480q0-134-93-227t-227-93q-54 0-104 17.5T284-732l448 448Z"}))))}function yL({user:e,isBusy:t,setIsBusy:o}){let[r,i]=W(!1);return r?null:n("div",{className:vt("block-modal-row")},n("img",{src:e.profilePhoto,alt:""}),n(S.FormText,{className:vt("block-modal-username")},e.username),n(hL,{onClick:t?void 0:async()=>{o(!0);try{await Vc(e.discordID),i(!0)}finally{o(!1)}}}))}function vL(){let[e,t]=W(!1),[o,r,i]=st(gx,{onError:s=>new oe("ReviewDB").error("Failed to fetch blocks",s),fallbackValue:[]});return i?null:r?n(S.FormText,null,"Failed to fetch blocks: $",String(r)):o.length?n(f,null,o.map(s=>n(yL,{key:s.discordID,user:s,isBusy:e,setIsBusy:t}))):n(S.FormText,null,"No blocked users.")}function Qc(){de(e=>n(ye,{...e},n(Le,{className:vt("block-modal-header")},n(S.FormTitle,{style:{margin:0}},"Blocked Users"),n(pt,{onClick:e.onClose})),n(ke,{className:vt("block-modal")},ft.token?n(vL,null):n(S.FormText,null,"You are not logged into ReviewDB!"))))}var mh=g(()=>{"use strict";a();Ke();Ze();lt();T();Gn();ss();Hn()});var rn,Da=g(()=>{"use strict";a();$();I();T();Gn();mh();Hn();rn=N({authorize:{type:6,description:"Authorize with ReviewDB",component:()=>n(k,{onClick:()=>is()},"Authorize with ReviewDB")},notifyReviews:{type:3,description:"Notify about new reviews on startup",default:!0},showWarning:{type:3,description:"Display warning to be respectful at the top of the reviews list",default:!0},hideTimestamps:{type:3,description:"Hide timestamps on reviews",default:!1},hideBlockedUsers:{type:3,description:"Hide reviews from blocked users",default:!0},buttons:{type:6,description:"ReviewDB buttons",component:()=>n("div",{className:vt("button-grid")},n(k,{onClick:Qc},"Manage Blocked Users"),n(k,{color:k.Colors.GREEN,onClick:()=>{VencordNative.native.openExternal("https://github.com/sponsors/mantikafasi")}},"Support ReviewDB development"),n(k,{onClick:async()=>{let e="https://reviewdb.mantikafasi.dev/",t=await $n();t&&(e+="/api/redirect?token="+encodeURIComponent(t)),VencordNative.native.openExternal(e)}},"ReviewDB website"),n(k,{onClick:()=>{VencordNative.native.openExternal("https://discord.gg/eWPBSbvznt")}},"ReviewDB Support Server"))}}).withPrivateSettings()});async function pi(e,t={}){return fetch(hx+e,{...t,headers:{...t.headers,Authorization:await $n()||""}})}async function yx(e,t=0){let o=0;rn.store.showWarning||(o|=bL);let r=new URLSearchParams({flags:String(o),offset:String(t)}),i=await fetch(`${hx}/users/${e}/reviews?${r}`),s=i.ok?await i.json():{message:i.status===429?"You are sending requests too fast. Wait a few seconds and try again.":"An Error occured while fetching reviews. Please try again later.",reviews:[],updated:!1,hasNextPage:!1,reviewCount:0};return i.ok?s:(qt(s.message,X.Type.FAILURE),{...s,reviews:[{id:0,comment:s.message,star:0,timestamp:0,type:3,sender:{id:0,username:"ReviewDB",profilePhoto:"https://cdn.discordapp.com/avatars/1134864775000629298/3f87ad315b32ee464d84f1270c8d1b37.png?size=256&format=webp&quality=lossless",discordID:"1134864775000629298",badges:[]}}]})}async function vx(e){return await $n()?await pi(`/users/${e.userid}/reviews`,{method:"PUT",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(async o=>{let r=await o.json();return qt(r.message),o.ok?r:null}):(qt("Please authorize to add a review."),is(),null)}async function Sx(e){return await pi(`/users/${e}/reviews`,{method:"DELETE",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({reviewid:e})}).then(async t=>{let o=await t.json();return qt(o.message),t.ok?o:null})}async function bx(e){let t=await pi("/reports",{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({reviewid:e})}).then(o=>o.json());qt(t.message)}async function Tx(e,t){if(!(await pi("/blocks",{method:"PATCH",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({action:e,discordId:t})})).ok)qt(`Failed to ${e} user`,X.Type.FAILURE);else if(qt(`Successfully ${e}ed user`,X.Type.SUCCESS),ft?.user?.blockedUsers){let r=e==="block"?[...ft.user.blockedUsers,t]:ft.user.blockedUsers.filter(i=>i!==t);rs({user:{...ft.user,blockedUsers:r}})}}async function gx(){let e=await pi("/blocks",{method:"GET",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(`${e.status}: ${e.statusText}`);return e.json()}function xx(e){return pi("/users",{method:"POST"}).then(t=>t.json())}async function Mx(e){return pi(`/notifications?id=${e}`,{method:"PATCH"})}var hx,eu,bL,wx,Vc,ss=g(()=>{"use strict";a();T();Gn();Na();Da();Hn();hx="https://manti.vendicated.dev/api/reviewdb",eu=50,bL=2;wx=e=>Tx("block",e),Vc=e=>Tx("unblock",e)});function Ix({onClick:e}){return n(ne,{text:"Delete Review"},t=>n("div",{...t,className:Q(tu.button,tu.dangerous),onClick:e,role:"button"},n(Oi,{width:"20",height:"20"})))}function Px({onClick:e}){return n(ne,{text:"Report Review"},t=>n("div",{...t,className:tu.button,onClick:e,role:"button"},n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M20,6.002H14V3.002C14,2.45 13.553,2.002 13,2.002H4C3.447,2.002 3,2.45 3,3.002V22.002H5V14.002H10.586L8.293,16.295C8.007,16.581 7.922,17.011 8.076,17.385C8.23,17.759 8.596,18.002 9,18.002H20C20.553,18.002 21,17.554 21,17.002V7.002C21,6.45 20.553,6.002 20,6.002Z"}))))}function Ax({onClick:e,isBlocked:t}){return n(ne,{text:`${t?"Unblock":"Block"} user`},o=>n("div",{...o,className:tu.button,onClick:e,role:"button"},n("svg",{height:"20",viewBox:"0 -960 960 960",width:"20",fill:"currentColor"},t?n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"}):n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q54 0 104-17.5t92-50.5L228-676q-33 42-50.5 92T160-480q0 134 93 227t227 93Zm252-124q33-42 50.5-92T800-480q0-134-93-227t-227-93q-54 0-104 17.5T284-732l448 448Z"}))))}var tu,Cx=g(()=>{"use strict";a();It();we();H();T();tu=x("button","wrapper","disabled","separator")});function ou(e){let t=e.redirectURL?Vn:o=>n("span",{...o,role:"button"},o.children);return n(ne,{text:e.name},({onMouseEnter:o,onMouseLeave:r})=>n(t,{className:vt("blocked-badge"),href:e.redirectURL,onClick:e.onClick},n("img",{className:vt("badge"),width:"22px",height:"22px",onMouseEnter:o,onMouseLeave:r,src:e.icon,alt:e.description})))}var Rx=g(()=>{"use strict";a();T();Hn()});var nu,fh=g(()=>{"use strict";a();mt();we();lt();H();T();Gn();Na();ss();Da();Hn();mh();Cx();Rx();nu=bt(()=>{let e=Ce.byProps,[{cozyMessage:t,buttons:o,message:r,buttonsInner:i,groupStart:s},{container:l,isHeader:c},{avatar:u,clickable:p,username:d,wrapper:h,cozy:v},b,M]=Dr(e("cozyMessage"),e("container","isHeader"),e("avatar","zalgo"),e("button","wrapper","selected"),e("botTag","botTagRegular")),w=new Intl.DateTimeFormat;return function({review:R,refetch:A,profileId:F}){let[z,Y]=W(!1);function J(){bo(R.sender.discordID)}function Z(){et.show({title:"Are you sure?",body:"Do you really want to delete this review?",confirmText:"Delete",cancelText:"Nevermind",onConfirm:async()=>{if(await $n())Sx(R.id).then(Se=>{Se&&A()});else return qt("You must be logged in to delete reviews.")}})}function O(){et.show({title:"Are you sure?",body:"Do you really you want to report this review?",confirmText:"Report",cancelText:"Nevermind",onConfirm:async()=>{if(await $n())bx(R.id);else return qt("You must be logged in to report reviews.")}})}let te=ft?.user?.blockedUsers?.includes(R.sender.discordID)??!1;function re(){if(te)return Vc(R.sender.discordID);et.show({title:"Are you sure?",body:"Do you really you want to block this user? They will be unable to leave further reviews on your profile. You can unblock users in the plugin settings.",confirmText:"Block",cancelText:"Nevermind",onConfirm:async()=>{if(await $n())wx(R.sender.discordID);else return qt("You must be logged in to block users.")}})}return n("div",{className:Q(vt("review"),t,h,r,s,v),style:{marginLeft:"0px",paddingLeft:"52px"}},n("img",{className:Q(u,p),onClick:J,src:R.sender.profilePhoto||"/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128",style:{left:"0px",zIndex:0}}),n("div",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center"}},n("span",{className:Q(p,d),style:{color:"var(--channels-default)",fontSize:"14px"},onClick:()=>J()},R.sender.username),R.type===3&&n("span",{className:Q(M.botTagVerified,M.botTagRegular,M.botTag,M.px,M.rem),style:{marginLeft:"4px"}},n("span",{className:M.botText},"System"))),te&&n(ou,{name:"You have blocked this user",description:"You have blocked this user",icon:"/assets/aaee57e0090991557b66.svg",type:0,onClick:()=>Qc()}),R.sender.badges.map(Se=>n(ou,{...Se})),!rn.store.hideTimestamps&&R.type!==3&&n(Po,{timestamp:new Date(R.timestamp*1e3)},w.format(R.timestamp*1e3)),n("div",{className:vt("review-comment")},R.comment.length>200&&!z?[Pe.parseGuildEventDescription(R.comment.substring(0,200)),"...",n("br",null),n("a",{onClick:()=>Y(!0)},"Read more")]:Pe.parseGuildEventDescription(R.comment)),R.id!==0&&n("div",{className:Q(l,c,o),style:{padding:"0px"}},n("div",{className:Q(b.wrapper,i)},fx(R)&&n(Px,{onClick:O}),mx(F,R)&&n(Ax,{isBlocked:te,onClick:re}),dx(F,R)&&n(Ix,{onClick:Z}))))}})});function La({discordId:e,name:t,onFetchReviews:o,refetchSignal:r,scrollToTop:i,page:s=1,showInput:l=!1,hideOwnReview:c=!1}){let[u,p]=Co(!0),[d]=st(()=>yx(e,(s-1)*eu),{fallbackValue:null,deps:[r,u,s],onSuccess:h=>{rn.store.hideBlockedUsers&&(h.reviews=h.reviews?.filter(v=>!it.isBlocked(v.sender.discordID))),i?.(),o(h)}});return d?n(f,null,n(IL,{refetch:p,reviews:d.reviews,hideOwnReview:c,profileId:e}),l&&n(gh,{name:t,discordId:e,refetch:p,isAuthor:d.reviews?.some(h=>h.sender.discordID===E.getCurrentUser().id)})):null}function IL({refetch:e,reviews:t,hideOwnReview:o,profileId:r}){let i=E.getCurrentUser().id;return n("div",{className:vt("view")},t?.map(s=>(s.sender.discordID!==i||!o)&&n(nu,{key:s.id,review:s,refetch:e,profileId:r})),t?.length===0&&n(S.FormText,{className:vt("placeholder")},"Looks like nobody reviewed this user yet. You could be the first!"))}function gh({discordId:e,isAuthor:t,refetch:o,name:r}){let{token:i}=ft,s=xt(null),l=wL.FORM;l.disableAutoFocus=!0;let c=ML({id:"0",type:1});return n(f,null,n("div",{onClick:()=>{i||(qt("Opening authorization window..."),is())}},n(xL,{className:vt("input"),channel:c,placeholder:i?t?`Update review for @${r}`:`Review @${r}`:"You need to authorize to review users!",type:l,disableThemedBackground:!0,setEditorRef:u=>s.current=u,textValue:"",onSubmit:async u=>{if(await vx({userid:e,comment:u.value})){o();let d=s.current.ref.current.getSlateEditor();TL.delete(d,{at:{anchor:kx.start(d,[]),focus:kx.end(d,[])}})}return{shouldClear:!1,shouldRefocus:!0}}})))}var kx,TL,wL,xL,ML,hh=g(()=>{"use strict";a();lt();H();T();Gn();ss();Da();Hn();fh();({Editor:kx,Transforms:TL}=x("Editor","Transforms")),{ChatInputTypes:wL}=x("ChatInputTypes"),xL=Ne("default.CHANNEL_TEXT_AREA","input"),{createChannelRecordFromServer:ML}=x("createChannelRecordFromServer")});function PL({modalProps:e,discordId:t,name:o}){let[r,i]=W(),[s,l]=Co(!0),[c,u]=W(1),p=xt(null),d=r?.reviewCount,h=r?.reviews.find(v=>v.sender.discordID===ft.user?.discordID);return n(_,null,n(ye,{...e,size:"medium"},n(Le,null,n(V,{variant:"heading-lg/semibold",className:vt("modal-header")},o,"'s Reviews",!!d&&n("span",null," (",d," Reviews)")),n(pt,{onClick:e.onClose})),n(ke,{scrollerRef:p},n("div",{className:vt("modal-reviews")},n(La,{discordId:t,name:o,page:c,refetchSignal:s,onFetchReviews:i,scrollToTop:()=>p.current?.scrollTo({top:0,behavior:"smooth"}),hideOwnReview:!0}))),n(ct,{className:vt("modal-footer")},n("div",null,h&&n(nu,{refetch:l,review:h,profileId:t}),n(gh,{isAuthor:h!=null,discordId:t,name:o,refetch:l}),!!d&&n(al,{currentPage:c,maxVisiblePages:5,pageSize:eu,totalCount:d,onPageChange:u})))))}function yh(e,t){de(o=>n(PL,{modalProps:o,discordId:e,name:t}))}var Nx=g(()=>{"use strict";a();le();Ze();lt();T();Gn();ss();Hn();fh();hh()});var AL,vh,Dx=g(()=>{"use strict";a();cx();le();mg();It();P();Ke();I();T();Gn();Nx();hh();Na();ss();Da();Hn();AL=(e,t)=>{e.push(n(L.MenuItem,{label:"View Reviews",id:"vc-rdb-server-reviews",icon:Xr,action:()=>yh(t.guild.id,t.guild.name)}))},vh=y({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[m.mantikafasi,m.Ven],settings:rn,contextMenus:{"guild-header-popout":AL},patches:[{find:"showBorder:null",replacement:{match:/user:(\i),setNote:\i,canDM.+?\}\)/,replace:"$&,$self.getReviewsComponent($1)"}}],flux:{CONNECTION_OPEN:dh},async start(){let e=rn.store,{lastReviewId:t,notifyReviews:o}=e,r=e;r.token&&(await rs({token:r.token}),r.token=void 0,new oe("ReviewDB").info("Migrated legacy settings")),await dh(),setTimeout(async()=>{if(!ft.token)return;let i=await xx(ft.token);if(rs({user:i}),o&&t&&tVencordNative.native.openExternal("https://reviewdb.mantikafasi.dev/api/redirect?"+new URLSearchParams({token:ft.token,page:"dashboard/appeal"}))}:{};et.show({title:i.notification.title,body:Pe.parse(i.notification.content,!1),...s}),Mx(i.notification.id)}},4e3)},getReviewsComponent:_.wrap(e=>{let[t,o]=W();return n(Ma,{headerText:"User Reviews",onMoreClick:()=>yh(e.id,e.username),moreTooltipText:t&&t>50?`View all ${t} reviews`:"Open Review Modal",onDropDownClick:r=>rn.store.reviewsDropdownState=!r,defaultState:rn.store.reviewsDropdownState},n(La,{discordId:e.id,name:e.username,onFetchReviews:r=>o(r.reviewCount),showInput:!0}))},{message:"Failed to render Reviews"})})});var as,Sh,Lx=g(()=>{"use strict";a();$();le();P();I();T();as=N({chatMentions:{type:3,default:!0,description:"Show role colors in chat mentions (including in the message box)",restartNeeded:!0},memberList:{type:3,default:!0,description:"Show role colors in member list role headers",restartNeeded:!0},voiceUsers:{type:3,default:!0,description:"Show role colors in the voice chat user list",restartNeeded:!0}}),Sh=y({name:"RoleColorEverywhere",authors:[m.KingFish,m.lewisakura,m.AutumnVN],description:"Adds the top role color anywhere possible",patches:[{find:"CLYDE_AI_MENTION_COLOR:null,",replacement:[{match:/user:(\i),channel:(\i).{0,400}?"@"\.concat\(.+?\)/,replace:"$&,color:$self.getUserColor($1?.id,{channelId:$2?.id})"}],predicate:()=>as.store.chatMentions},{find:".userTooltip,children",replacement:[{match:/let\{id:(\i),guildId:(\i)[^}]*\}.*?\.default,{(?=children)/,replace:"$&color:$self.getUserColor($1,{guildId:$2}),"}],predicate:()=>as.store.chatMentions},{find:'tutorialId:"whos-online',replacement:[{match:/null,\i," — ",\i\]/,replace:"null,$self.roleGroupColor(arguments[0])]"}],predicate:()=>as.store.memberList},{find:".Messages.THREAD_BROWSER_PRIVATE",replacement:[{match:/children:\[\i," — ",\i\]/,replace:"children:[$self.roleGroupColor(arguments[0])]"}],predicate:()=>as.store.memberList},{find:"renderPrioritySpeaker",replacement:[{match:/renderName\(\).{0,100}speaking:.{50,100}jsx.{5,10}{/,replace:"$&...$self.getVoiceProps(this.props),"}],predicate:()=>as.store.voiceUsers}],settings:as,getColor(e,{channelId:t,guildId:o}){return(o??=ee.getChannel(t)?.guild_id)?Ge.getMember(o,e)?.colorString??null:null},getUserColor(e,t){let o=this.getColor(e,t);return o&&parseInt(o.slice(1),16)},roleGroupColor:_.wrap(({id:e,count:t,title:o,guildId:r,label:i})=>{let s=ae.getRole(r,e);return n("span",{style:{color:s?.colorString,fontWeight:"unset",letterSpacing:".05em"}},o??i," \u2014 ",t)},{noop:!0}),getVoiceProps({user:{id:e},guildId:t}){return{style:{color:this.getColor(e,{guildId:t})}}}})});var Ex,CL,bh,Ox=g(()=>{"use strict";a();Eo();It();P();I();H();T();Ex=x("replyToMessage"),CL=(e,{message:t})=>{if(Ie.getChannelId()!==t.channel_id)return;let o=ee.getChannel(t?.channel_id);if(!o||o.guild_id&&!_e.can(me.SEND_MESSAGES,o))return;let r=ut("pin",e);if(r&&!r.some(s=>s?.props?.id==="reply")){let s=r.findIndex(l=>l?.props.id==="pin");r.splice(s+1,0,n(L.MenuItem,{id:"reply",label:Ye.Messages.MESSAGE_ACTION_REPLY,icon:Gp,action:l=>Ex.replyToMessage(o,t,l)}));return}let i=ut("mark-unread",e);if(i&&!i.some(s=>s?.props?.id==="reply")){i.unshift(n(L.MenuItem,{id:"reply",label:Ye.Messages.MESSAGE_ACTION_REPLY,icon:Gp,action:s=>Ex.replyToMessage(o,t,s)}));return}},bh=y({name:"SearchReply",description:"Adds a reply button to search results",authors:[m.Aria],contextMenus:{message:CL}})});var Th,_x=g(()=>{"use strict";a();P();I();Th=y({name:"SecretRingToneEnabler",description:"Always play the secret version of the discord ringtone (except during special ringtone events)",authors:[m.AndrewDLO,m.FieryFlames],patches:[{find:'call_ringing_beat"',replacement:{match:/500===\i\.random\(1,1e3\)/,replace:"true"}}]})});var Bx=g(()=>{});function Ux(e){let t=e.slice(1,-1).replace(/(\d)(AM|PM)$/i,"$1 $2"),o=new Date(`${new Date().toDateString()} ${t}`).getTime()/1e3;return isNaN(o)?e:(Date.now()/1e3>o&&(o+=86400),``)}function kL({rootProps:e,close:t}){let[o,r]=W(),[i,s]=W(""),l=Math.round((new Date(o).getTime()||Date.now())/1e3),c=(d,h)=>``,[u,p]=Rt(()=>{let d=c(l,i);return[d,Pe.parse(d)]},[l,i]);return n(ye,{...e},n(Le,{className:ru("modal-header")},n(S.FormTitle,{tag:"h2"},"Timestamp Picker"),n(pt,{onClick:t})),n(ke,{className:ru("modal-content")},n("input",{type:"datetime-local",value:o,onChange:d=>r(d.currentTarget.value),style:{colorScheme:Fi()===2?"light":"dark"}}),n(S.FormTitle,null,"Timestamp Format"),n(Io,{options:RL.map(d=>({label:d,value:d})),isSelected:d=>d===i,select:d=>s(d),serialize:d=>d,renderOptionLabel:d=>n("div",{className:ru("format-label")},Pe.parse(c(l,d.value))),renderOptionValue:()=>p}),n(S.FormTitle,{className:j.bottom8},"Preview"),n(S.FormText,{className:ru("preview-text")},p," (",u,")")),n(ct,null,n(k,{onClick:()=>{kn(u+" "),t()}},"Insert")))}var Fx,RL,ru,NL,wh,$x=g(()=>{"use strict";a();Bx();En();gn();$();Qe();P();mt();ot();Ze();I();T();Fx=N({replaceMessageContents:{description:"Replace timestamps in message contents",type:3,default:!0}});RL=["","t","T","d","D","f","F","R"],ru=ve("vc-st-");NL=({isMainChat:e})=>e?n(xo,{tooltip:"Insert Timestamp",onClick:()=>{let t=de(o=>n(kL,{rootProps:o,close:()=>xn(t)}))},buttonProps:{"aria-haspopup":"dialog"}},n("svg",{"aria-hidden":"true",role:"img",width:"24",height:"24",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("g",{fill:"none","fill-rule":"evenodd"},n("path",{fill:"currentColor",d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z"}),n("rect",{width:"24",height:"24"})))):null,wh=y({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[m.Ven,m.Tyler,m.Grzesiek11],dependencies:["MessageEventsAPI","ChatInputButtonAPI"],settings:Fx,start(){wo("SendTimestamps",NL),this.listener=Vt((e,t)=>{Fx.store.replaceMessageContents&&(t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,Ux))})},stop(){nn("SendTimestamps"),eo(this.listener)},settingsAboutComponent(){let e=["12:00","3:51","17:59","24:00","12:00 AM","0:13PM"].map(t=>`\`${t}\``);return n(f,null,n(S.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),n(S.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),n(S.FormText,null,"Examples:",n("ul",null,e.map(t=>n("li",{key:t},n("code",null,t)," ","->"," ",Pe.parse(Ux(t)))))))}})});function DL(){return zx=Co(),n("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},Mh," online")}function LL(){return jx=Co(),n("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},Hx," servers")}function Gx(){Mh=0;let e=it.getRelationships();for(let t of Object.keys(e))e[t]===1&&cn.getStatus(t)!=="offline"&&(Mh+=1);zx?.()}function xh(){Hx=ae.getGuildCount(),jx?.()}var Mh,Hx,zx,jx,Ih,Wx=g(()=>{"use strict";a();qc();$();le();P();lt();I();T();Mh=0,Hx=0;Ih=y({name:"ServerListIndicators",description:"Add online friend count or server count in the server list",authors:[m.dzshn],dependencies:["ServerListAPI"],options:{mode:{description:"mode",type:4,options:[{label:"Only online friend count",value:2,default:!0},{label:"Only server count",value:1},{label:"Both server and online friend counts",value:3}]}},renderIndicator:()=>{let{mode:e}=G.plugins.ServerListIndicators;return n(_,{noop:!0},n("div",{style:{marginBottom:"4px"}},!!(e&2)&&n(DL,null),!!(e&1)&&n(LL,null)))},flux:{PRESENCE_UPDATES:Gx,GUILD_CREATE:xh,GUILD_DELETE:xh},start(){Ca(0,this.renderIndicator),Gx(),xh()},stop(){Ra(0,this.renderIndicator)}})});var qx=g(()=>{});function Zx(e){de(t=>n(ye,{...t,size:"medium"},n(OL,{guild:e})))}function Yx(e){return n(Po,{timestamp:new Date(e)})}function OL({guild:e}){let[t,o]=W(),[r,i]=W();se(()=>{iu.friends=!1,iu.blocked=!1},[]);let[s,l]=W(0),c=e.banner&&Gt.getGuildBannerURL(e,!0).replace(/\?size=\d+$/,"?size=1024"),u=e.icon&&Gt.getGuildIconURL({id:e.id,icon:e.icon,canAnimate:!0,size:512});return n("div",{className:fo("root")},c&&s===0&&n("img",{className:fo("banner"),src:c,alt:"",onClick:()=>tn(c)}),n("div",{className:fo("header")},u?n("img",{src:u,alt:"",onClick:()=>tn(u)}):n("div",{"aria-hidden":!0,className:Q(Kx.childWrapper,Kx.acronym)},e.acronym),n("div",{className:fo("name-and-description")},n(S.FormTitle,{tag:"h5",className:fo("name")},e.name),e.description&&n(S.FormText,null,e.description))),n(Ho,{type:"top",look:"brand",className:fo("tab-bar"),selectedItem:s,onItemSelect:l},n(Ho.Item,{className:fo("tab",{selected:s===0}),id:0},"Server Info"),n(Ho.Item,{className:fo("tab",{selected:s===1}),id:1},"Friends",t!==void 0?` (${t})`:""),n(Ho.Item,{className:fo("tab",{selected:s===2}),id:2},"Blocked Users",r!==void 0?` (${r})`:"")),n("div",{className:fo("tab-content")},s===0&&n(BL,{guild:e}),s===1&&n(FL,{guild:e,setCount:o}),s===2&&n(UL,{guild:e,setCount:i})))}function _L(e,t){let o=Ge.getMember(e,t.id)?.avatar,r=o?Gt.getGuildMemberAvatarURLSimple({userId:t.id,avatar:o,guildId:e,canAnimate:!0}):Gt.getUserAvatarURL(t,!0);return n("div",{className:fo("owner")},n("img",{src:r,alt:"",onClick:()=>tn(r)}),Pe.parse(`<@${t.id}>`))}function BL({guild:e}){let[t]=st(()=>Bt.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),o={"Server Owner":t?_L(e.id,t):"Loading...","Created At":Yx(un.extractTimestamp(e.id)),"Joined At":e.joinedAt?Yx(e.joinedAt.getTime()):"-","Vanity Link":e.vanityURLCode?n("a",null,`discord.gg/${e.vanityURLCode}`):"-","Preferred Locale":e.preferredLocale||"-","Verification Level":["None","Low","Medium","High","Highest"][e.verificationLevel]||"?","Nitro Boosts":`${e.premiumSubscriberCount??0} (Level ${e.premiumTier??0})`,Channels:wn.getChannels(e.id)?.count-1||"?",Roles:Object.keys(ae.getRoles(e.id)).length-1};return n("div",{className:fo("info")},Object.entries(o).map(([r,i])=>n("div",{className:fo("server-info-pair"),key:r},n(S.FormTitle,{tag:"h5"},r),typeof i=="string"?n("span",null,i):i)))}function FL({guild:e,setCount:t}){return Xx("friends",e,it.getFriendIDs(),t)}function UL({guild:e,setCount:t}){let o=Object.keys(it.getRelationships()).filter(r=>it.isBlocked(r));return Xx("blocked",e,o,t)}function Xx(e,t,o,r){let i=[],s=[];for(let l of o)Ge.isMember(t.id,l)?s.push(l):i.push(l);return Be([Ge],()=>Ge.getMemberIds(t.id),null,(l,c)=>l.length===c.length),se(()=>{!iu[e]&&i.length&&(iu[e]=!0,B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),se(()=>r(s.length),[s.length]),n(Si,{fade:!0,className:fo("scroller")},s.map(l=>n(EL,{user:E.getUser(l),status:cn.getStatus(l)||"offline",onSelect:()=>bo(l),onContextMenu:()=>{}})))}var Kx,EL,fo,iu,Jx=g(()=>{"use strict";a();qx();Qe();mt();we();Ze();lt();H();T();Kx=x("icon","acronym","childWrapper"),EL=Tn("FriendRow"),fo=ve("vc-gp-");iu={friends:!1,blocked:!1}});var Qx,Ph,Vx=g(()=>{"use strict";a();Eo();P();I();T();Jx();Qx=(e,{guild:t})=>{ut("privacy",e)?.push(n(L.MenuItem,{id:"vc-server-profile",label:"Server Info",action:()=>Zx(t)}))},Ph=y({name:"ServerProfile",description:"Allows you to view info about a server by right clicking it in the server list",authors:[m.Ven,m.Nuckyz],tags:["guild","info"],contextMenus:{"guild-context":Qx,"guild-header-popout":Qx}})});var eM=g(()=>{});var tM,oM=g(()=>{a();tM=`/* eslint-disable simple-header/header */ import React from "react"; const handleClick = async () => console.log((await import("@webpack/common")).Clipboard.copy("\\u200b")); export const Example: React.FC<{ real: boolean, shigged?: number, }> = ({ real, shigged }) => <>

{\`Shigg\${real ? \`ies\${shigged === 0x1B ? "t" : ""}\` : "y"}\`}

; `});var rM=kr((Nae,Ah)=>{"use strict";a();var $L=Object.prototype.hasOwnProperty,no="~";function Ea(){}Object.create&&(Ea.prototype=Object.create(null),new Ea().__proto__||(no=!1));function GL(e,t,o){this.fn=e,this.context=t,this.once=o||!1}function nM(e,t,o,r,i){if(typeof o!="function")throw new TypeError("The listener must be a function");var s=new GL(o,r||e,i),l=no?no+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function su(e,t){--e._eventsCount===0?e._events=new Ea:delete e._events[t]}function Kt(){this._events=new Ea,this._eventsCount=0}Kt.prototype.eventNames=function(){var t=[],o,r;if(this._eventsCount===0)return t;for(r in o=this._events)$L.call(o,r)&&t.push(no?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};Kt.prototype.listeners=function(t){var o=no?no+t:t,r=this._events[o];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,l=new Array(s);i{"use strict";a();Object.defineProperty(ls,"__esModule",{value:!0});ls.Channel=ls.ChannelPort=void 0;var HL=rM(),au="vapIpc",Ch=Symbol.for("vapIpc.edgeCreate"),Rh=class{_pipes=new Map;_listeners=new Map;_createListenerMap(){return new Map}_emit(t,o,...r){for(let[i,s]of this._listeners.entries()){if(i===t)continue;let l=s.get(o);l&&l(...r)}}createPipe(t){let o=this.getPipe(t);if(o)return o;let r=this._createListenerMap();this._listeners.set(t,r);let i={emit:this._emit.bind(this,t),listen:(s,l)=>void r.set(s,l)};return this._pipes.set(t,i),i}getPipe(t){return this._pipes.get(t)??null}};ls.ChannelPort=Rh;var kh=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new HL.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${au}:handshake`,o=>{this._handleHandshake(t,o)}),t.listen(`${au}:message`,o=>{this._handleMessage(t,o)}),this._pipes.push(t),this._logger?.log(`Adding pipe to channel "${this.id}"`)}setLogger(t){this._logger=t}_handleHandshake(t,o){if(this.id===o.id)return;this._logger?.log(`\u{1F91D} "${o.id}" -> "${this.id}" (edges: [${o.channelIds.join(", ")}])`);let r=this._edges.get(o.id);if(r){let i=o.channelIds.filter(s=>!r?.channelIds.includes(s));if(i.includes(this.id)&&i.splice(i.indexOf(this.id),1),!i.length)return;this._edges.set(o.id,{...o,channelIds:[...r.channelIds,...i]})}else{let i=[...o.channelIds].filter(s=>s!==this.id);this._edges.set(o.id,{...o,channelIds:i}),this._edgePipes.set(o.id,t)}this._emitter.emit(Ch,o),this.handshakeAll()}_handleMessage(t,o){if(o.proxiedBy===this.id)return;if(o.destination!==this.id)return this._emitMessage({...o,proxiedBy:this.id});if(!o.nonce)return void this._emitter.emit(o.name,o.data);let r=this._callbacks.get(o.nonce);if(r)return void r(o.data);let i=this._callers.get(o.name);if(i){i(o.data).catch(s=>(console.error(s),new Error(s?.message??`${s}`))).then(s=>{this._emitMessage({name:o.name,source:this.id,destination:o.source,data:s,nonce:o.nonce})});return}}_emitHandshake(t){let o=this.getEdge();t.emit(`${au}:handshake`,o)}_emitMessage(t){let o=this.findEdgeId(t.destination);if(!o)return;this._edgePipes.get(o)?.emit(`${au}:message`,t)}getEdge(){let t=[...this._edges.keys(),...[...this._edges.values()].map(o=>o.channelIds).flat()].filter((o,r,i)=>i.indexOf(o)===r);return{id:this.id,channelIds:t}}findEdgeId(t){for(let o of this._edges.values())if(o.id===t||o.channelIds.includes(t))return o.id;return null}waitForEdge(t){let o=this.findEdgeId(t);return o?Promise.resolve(o):new Promise(r=>{let i=s=>{(s.id===t||s.channelIds.includes(t))&&(this._emitter.off(Ch,i),r(s.id))};this._emitter.on(Ch,i)})}createNonce(){return Math.random().toString(16).slice(2)}send(t){this._emitMessage({...t,source:this.id})}call(t,o={timeout:1e4}){let r=this.createNonce(),i=new Promise((s,l)=>{let c=setTimeout(()=>{this._callbacks.delete(r),l(new Error("Call timed out"))},o.timeout);this._callbacks.set(r,u=>{this._callbacks.delete(r),clearTimeout(c),o.signal?.aborted?o.signal.reason instanceof Error&&l(o.signal.reason):u instanceof Error?l(u):s(u)})});return this._emitMessage({...t,source:this.id,nonce:r}),i}on(t,o){return this._emitter.on(t,o),this}off(t,o){return this._emitter.off(t,o),this}once(t,o){this._emitter.once(t,o)}onCall(t,o){this._callers.set(t,async(...r)=>await o(...r))}removeCaller(){}handshakeAll(){this._pipes.forEach(t=>this._emitHandshake(t))}destroy(){this._emitter.removeAllListeners(),this._callbacks.clear(),this._callers.clear(),this._edgePipes.clear(),this._pipes=[],this._destroyed=!0}};ls.Channel=kh});var Eh=kr(cs=>{"use strict";a();Object.defineProperty(cs,"__esModule",{value:!0});cs.RemoteClient=cs.RemoteHost=void 0;var Dh=class{channel;constructor(t,o){this.channel=t;for(let[r,i]of Object.entries(o))t.onCall(r,async s=>await i(...s));t.handshakeAll()}};cs.RemoteHost=Dh;var Lh=class{hostName;channel;constructor(t,o){this.hostName=t,this.channel=o}async connect(){await this.channel.waitForEdge(this.hostName)}run(t,...o){return this.channel.call({name:t,destination:this.hostName,data:o})}};cs.RemoteClient=Lh});var aM=kr(us=>{"use strict";a();Object.defineProperty(us,"__esModule",{value:!0});us.WorkerClient=us.createWorkerHost=void 0;var iM=Nh(),sM=Eh(),zL=(e,t)=>{let o=new iM.Channel(e);return o.addPipe({emit:(r,i)=>postMessage({event:r,data:i}),listen:(r,i)=>addEventListener("message",({data:s})=>{s.event===r&&i(s.data)})}),new sM.RemoteHost(o,t)};us.createWorkerHost=zL;var Oh=class extends sM.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,o,r,i={}){let s=new iM.Channel(t);if(super(o,s),this.workerOpts=i,r instanceof Blob){let l=new Blob([r],{type:"text/javascript"});this.url=URL.createObjectURL(l)}else this.url=r}async init(){let t=this.worker=new Worker(this.url,this.workerOpts);this.channel.addPipe({emit:(o,r)=>t.postMessage({event:o,data:r}),listen:(o,r)=>{let i=s=>{let{event:l,data:c}=s.data;l===o&&r(c)};this.workerListeners.push(i),t.addEventListener("message",i)}}),await this.connect()}destroy(){if(this.worker){for(let t of this.workerListeners)this.worker.removeEventListener("message",t);this.worker.terminate()}this.channel.destroy(),this.url.startsWith("blob:")&&URL.revokeObjectURL(this.url)}};us.WorkerClient=Oh});var lM=kr(zn=>{"use strict";a();var jL=zn&&zn.__createBinding||(Object.create?function(e,t,o,r){r===void 0&&(r=o);var i=Object.getOwnPropertyDescriptor(t,o);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,i)}:function(e,t,o,r){r===void 0&&(r=o),e[r]=t[o]}),_h=zn&&zn.__exportStar||function(e,t){for(var o in e)o!=="default"&&!Object.prototype.hasOwnProperty.call(t,o)&&jL(t,e,o)};Object.defineProperty(zn,"__esModule",{value:!0});_h(Nh(),zn);_h(Eh(),zn);_h(aM(),zn)});function Fh(e){lu.id!==e.id&&(Object.assign(lu,e),Bh.forEach(t=>t(e)))}var lu,Bh,cM,Uh=g(()=>{"use strict";a();T();lu={id:null,theme:null},Bh=new Set,cM=()=>{let[,e]=U.useState(lu);return U.useEffect(()=>(Bh.add(e),()=>void Bh.delete(e)),[]),lu}});function di(e){if(Object.prototype.hasOwnProperty.call(ps,e))return ps[e];let t=Object.values(ps).find(o=>o.aliases?.includes(e));return t?(ZL.set(e,t),t):null}var WL,qL,uM,KL,YL,ps,pM,dM,ZL,cu=g(()=>{"use strict";a();WL="Vap0r1ze/vapcord",qL="88a7032a59cca40da170926651b08201ea3b965a",uM=`https://raw.githubusercontent.com/${WL}/${qL}/assets/shiki-codeblocks`,KL=e=>`${uM}/${e}`,YL=`${uM}/languages.json`,ps={},pM=async()=>{let e=await fetch(YL).then(o=>o.json()),t=Object.fromEntries(e.map(o=>[o.id,{...o,grammarUrl:KL(o.fileName)}]));Object.assign(ps,t)},dM=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),ZL=new Map});var XL,JL,tt,jn,$h=g(()=>{"use strict";a();XL="shikijs/shiki",JL="0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043",tt=e=>`https://raw.githubusercontent.com/${XL}/${JL}/packages/shiki/themes/${e}.json`,jn={DarkPlus:tt("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",DraculaSoft:tt("dracula-soft"),Dracula:tt("dracula"),GithubDarkDimmed:tt("github-dark-dimmed"),GithubDark:tt("github-dark"),GithubLight:tt("github-light"),LightPlus:tt("light-plus"),MaterialDarker:tt("material-darker"),MaterialDefault:tt("material-default"),MaterialLighter:tt("material-lighter"),MaterialOcean:tt("material-ocean"),MaterialPalenight:tt("material-palenight"),MinDark:tt("min-dark"),MinLight:tt("min-light"),Monokai:tt("monokai"),Nord:tt("nord"),OneDarkPro:tt("one-dark-pro"),Poimandres:tt("poimandres"),RosePineDawn:tt("rose-pine-dawn"),RosePineMoon:tt("rose-pine-moon"),RosePine:tt("rose-pine"),SlackDark:tt("slack-dark"),SlackOchin:tt("slack-ochin"),SolarizedDark:tt("solarized-dark"),SolarizedLight:tt("solarized-light"),VitesseDark:tt("vitesse-dark"),VitesseLight:tt("vitesse-light"),CssVariables:tt("css-variables")}});var fM,Gh,mM,xe,Oa=g(()=>{"use strict";a();sc();fM=Ka(lM());Uh();cu();$h();Gh=Object.values(jn),xe={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:ps,themes:jn,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>mM=e),init:async e=>{let t=await fetch(mb).then(i=>i.blob()),o=xe.client=new fM.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await o.init();let r=e||Gh[0];await pM(),await o.run("setOnigasm",{wasm:fb}),await o.run("setHighlighter",{theme:r,langs:[]}),xe.loadedThemes.add(r),await xe._setTheme(r),mM(o)},_setTheme:async e=>{xe.currentThemeUrl=e;let{themeData:t}=await xe.client.run("getTheme",{theme:e});xe.currentTheme=JSON.parse(t),Fh({id:e,theme:xe.currentTheme})},loadTheme:async e=>{let t=await xe.clientPromise;xe.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),xe.loadedThemes.add(e))},setTheme:async e=>{await xe.clientPromise,e||=Gh[0],xe.loadedThemes.has(e)||await xe.loadTheme(e),await xe._setTheme(e)},loadLang:async e=>{let t=await xe.clientPromise,o=di(e);!o||xe.loadedLangs.has(o.id)||(await t.run("loadLanguage",{lang:{...o,grammar:o.grammar??await dM(o)}}),xe.loadedLangs.add(o.id))},tokenizeCode:async(e,t)=>{let o=await xe.clientPromise,r=di(t);return r?(xe.loadedLangs.has(r.id)||await xe.loadLang(r.id),await o.run("codeToThemedTokens",{code:e,lang:t,theme:xe.currentThemeUrl??Gh[0]})):[]},destroy(){xe.currentTheme=null,xe.currentThemeUrl=null,Fh({id:null,theme:null}),xe.client?.destroy()}}});var _a,Hh=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/shikiCodeblocks.desktop/devicon.css",{name:"src/plugins/shikiCodeblocks.desktop/devicon.css",source:`@import url("https://cdn.jsdelivr.net/gh/devicons/devicon@v2.10.1/devicon.min.css"); `,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(` `).map((u,p)=>n("span",{key:p,dangerouslySetInnerHTML:{__html:u}}))}catch{s=r.split(` `).map(c=>n("span",null,c))}else s=(i??r.split(` `).map(u=>[{color:e.plainColor,content:u}])).map(u=>u.length===0?n("span",null,` `):n(f,null,u.map(({content:p,color:d,fontStyle:h},v)=>n("span",{key:v,style:{color:d,fontStyle:(h??0)&1?"italic":void 0,fontWeight:(h??0)&2?"bold":void 0,textDecoration:(h??0)&4?"underline":void 0}},p))));let l=s.map((c,u)=>n("tr",{key:u},n("td",{style:{color:e.plainColor}},u+1),n("td",null,c)));return n("table",{className:sn("table")},...l)}});function RM({langName:e,useDevIcon:t,shikiLang:o}){return e?n("div",{className:sn("lang")},t!=="DISABLED"&&o?.devicon&&n("i",{className:`${sn("devicon")} devicon-${o.devicon}${t==="COLOR"?" colored":""}`}),e):n(f,null)}var kM=g(()=>{"use strict";a();Ba();Fa()});var uu,e5,NM=g(()=>{"use strict";a();le();lt();T();cu();Oa();yM();Uh();SM();Fa();PM();CM();kM();uu=e=>n("pre",{className:sn("container")},n(_,null,n(e5,{...e}))),e5=({lang:e,content:t,isPreview:o,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:l}=hM(["tryHljs","useDevIcon","bgOpacity"],r),{id:c,theme:u}=cM(),p=e?di(e):null,d=bM({lang:e,tryHljs:i}),[h,v]=Wu(!0),[b]=st(async()=>!p||d||!v?null:await xe.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,v]}),M={plainColor:u?.fg||"var(--text-normal)",accentBgColor:u?.colors?.["statusBar.background"]||(d?"#7289da":"#007BC8"),accentFgColor:u?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:u?.colors?.["editor.background"]||"var(--background-secondary)"},w;return e&&(w=d?Br?.getLanguage?.(e)?.name:p?.name),n("div",{ref:h,className:sn("root",{plain:!w,preview:o}),style:{backgroundColor:d?M.backgroundColor:`rgba(${vM(M.backgroundColor).concat(l/100).join(", ")})`,color:M.plainColor}},n("code",null,n(RM,{langName:w,useDevIcon:s,shikiLang:p}),n(AM,{theme:M,useHljs:d,lang:e,content:t,tokens:b}),!o&&n(IM,{content:t,theme:M})))}});var DM,LM,EM=g(()=>{"use strict";a();DM=new Map,LM=()=>{DM.forEach(e=>e.remove()),DM.clear()}});var jh,OM=g(()=>{"use strict";a();eM();Qe();P();I();oM();Oa();NM();Hh();zh();Ba();EM();jh=y({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[m.Vap],patches:[{find:"codeBlock:{react(",replacement:{match:/codeBlock:\{react\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}},{find:".PREVIEW_NUM_LINES",replacement:{match:/(?<=function \i\((\i)\)\{)(?=let\{text:\i,language:)/,replace:"return $self.renderHighlighter({lang:$1.language,content:$1.text});"}}],start:async()=>{wr.store.useDevIcon!=="DISABLED"&&Nt(_a),await xe.init(wr.store.customTheme||wr.store.theme)},stop:()=>{xe.destroy(),LM()},settingsAboutComponent:({tempSettings:e})=>uu({lang:"tsx",content:tM,isPreview:!0,tempSettings:e}),settings:wr,shiki:xe,createHighlighter:uu,renderHighlighter:({lang:e,content:t})=>uu({lang:e?.toLowerCase(),content:t,isPreview:!1})})});var Wh,_M=g(()=>{"use strict";a();P();I();Wh=y({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[m.Nuckyz],patches:[{find:".Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/isExpanded:\i&&(.+?),/,replace:"isExpanded:$1,"}}]})});var BM=g(()=>{});function UM(){let e=Ss(FM.colors.INTERACTIVE_MUTED).hex(),t=Ss(FM.colors.INTERACTIVE_ACTIVE).hex();return n(t5,{color:e,forcedIconColor:t,size:16,tooltipText:Ye.Messages.CONNECTION_VERIFIED})}var FM,t5,$M=g(()=>{"use strict";a();H();T();FM=so(e=>e.colors?.INTERACTIVE_MUTED?.css),t5=Ne(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP")});function GM({id:e,theme:t}){let o=ho.getUserProfile(e);if(!o)return null;let r=o.connectedAccounts;return r?.length?n(o5,null,n(V,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)"}},"Connections"),n(fe,{style:{marginTop:"8px",gap:a5(pu.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>n(u5,{connection:i,theme:t})))):null}function u5({connection:e,theme:t}){let o=i5.get(r5.useLegacyPlatformType(e.type)),r=o.getPlatformUserUrl?.(e),i=n("img",{"aria-label":e.name,src:t==="light"?o.icon.lightSVG:o.icon.darkSVG,style:{width:pu.store.iconSize,height:pu.store.iconSize}}),s=r?Ei:Dl;return n(ne,{text:n("span",{className:"vc-sc-tooltip"},e.name,e.verified&&n(UM,null),n(s,{height:16,width:16})),key:e.id},l=>r?n("a",{...l,className:"vc-user-connection",href:r,target:"_blank",onClick:c=>{Vencord.Plugins.isPluginEnabled("OpenInApp")&&Vencord.Plugins.plugins.OpenInApp.handleLink(c.currentTarget,c)}},i):n("button",{...l,className:"vc-user-connection",onClick:()=>Ao(e.name)},i))}var o5,n5,r5,i5,s5,a5,pu,l5,c5,qh,HM=g(()=>{"use strict";a();BM();$();le();Ut();It();P();we();I();H();T();$M();o5=Ne(".lastSection","children:"),n5=Re("ThemeStore"),r5=x("useLegacyPlatformType"),i5=x("isSupported","getByUrl"),s5=Go(',"--profile-gradient-primary-color"'),a5=e=>(e??0)*2+4,pu=N({iconSize:{type:1,description:"Icon size (px)",default:32},iconSpacing:{type:4,description:"Icon margin",default:1,options:[{label:"Compact",value:0},{label:"Cozy",value:1},{label:"Roomy",value:2}]}}),l5=_.wrap(({user:e,displayProfile:t})=>n(GM,{id:e.id,theme:s5(e,t).profileTheme})),c5=_.wrap(({id:e})=>n(GM,{id:e,theme:n5.theme}));qh=y({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[m.TheKodeToad],patches:[{find:"{isUsingGuildBio:null!==(",replacement:{match:/,theme:\i\}\)(?=,.{0,150}setNote:)/,replace:"$&,$self.profilePopoutComponent({ user: arguments[0].user, displayProfile: arguments[0].displayProfile })"}},{find:'"Profile Panel: user cannot be undefined"',replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,\{\}\).{0,100}setNote:(?=.+?channelId:(\i).id)/,replace:"$self.profilePanelComponent({ id: $1.recipients[0] }),$&"}}],settings:pu,profilePopoutComponent:l5,profilePanelComponent:c5})});var zM=g(()=>{});function T5({channel:e}){let{defaultAllowedUsersAndRolesDropdownState:t}=Wn.use(["defaultAllowedUsersAndRolesDropdownState"]),[o,r]=W([]),{type:i,topic:s,lastMessageId:l,defaultForumLayout:c,lastPinTimestamp:u,defaultAutoArchiveDuration:p,availableTags:d,id:h,rateLimitPerUser:v,defaultThreadRateLimitPerUser:b,defaultSortOrder:M,defaultReactionEmoji:w,bitrate:C,rtcRegion:R,videoQualityMode:A,permissionOverwrites:F,guild_id:z}=e;return se(()=>{let Y=[],J=ae.getGuild(z).ownerId;Ge.getMember(z,J)||Y.push(J),Object.values(F).forEach(({type:Z,id:O})=>{Z===1&&!Ge.getMember(z,O)&&Y.push(O)}),Y.length>0&&B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[z],userIds:Y}),G.plugins.PermissionsViewer.enabled&&r(Rc(Object.values(F).map(Z=>({type:Z.type,id:Z.id,overwriteAllow:Z.allow,overwriteDeny:Z.deny})),z))},[h]),n("div",{className:jM.auto+" "+jM.customTheme+" "+p5.chatContent+" shc-lock-screen-outer-container"},n("div",{className:"shc-lock-screen-container"},n("img",{className:"shc-lock-screen-logo",src:b5}),n("div",{className:"shc-lock-screen-heading-container"},n(V,{variant:"heading-xxl/bold"},"This is a ",_e.can(me.VIEW_CHANNEL,e)?"locked":"hidden"," ",h5[i]," channel."),e.isNSFW()&&n(ne,{text:"NSFW"},({onMouseLeave:Y,onMouseEnter:J})=>n("svg",{onMouseLeave:Y,onMouseEnter:J,className:"shc-lock-screen-heading-nsfw-icon",width:"32",height:"32",viewBox:"0 0 48 48","aria-hidden":!0,role:"img"},n("path",{fill:"currentColor",d:"M.7 43.05 24 2.85l23.3 40.2Zm23.55-6.25q.75 0 1.275-.525.525-.525.525-1.275 0-.75-.525-1.3t-1.275-.55q-.8 0-1.325.55-.525.55-.525 1.3t.55 1.275q.55.525 1.3.525Zm-1.85-6.1h3.65V19.4H22.4Z"})))),!e.isGuildVoice()&&!e.isGuildStageVoice()&&n(V,{variant:"text-lg/normal"},"You can not see the ",e.isForumChannel()?"posts":"messages"," of this channel.",e.isForumChannel()&&s&&s.length>0&&" However you may see its guidelines:"),e.isForumChannel()&&s&&s.length>0&&n("div",{className:"shc-lock-screen-topic-container"},Pe.parseTopic(s,!1,{channelId:h})),l&&n(V,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",n(Po,{timestamp:new Date(un.extractTimestamp(l))})),u&&n(V,{variant:"text-md/normal"},"Last message pin: ",n(Po,{timestamp:new Date(u)})),(v??0)>0&&n(V,{variant:"text-md/normal"},"Slowmode: ",Ws(v,"seconds")),(b??0)>0&&n(V,{variant:"text-md/normal"},"Default thread slowmode: ",Ws(b,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&C!=null&&n(V,{variant:"text-md/normal"},"Bitrate: ",C," bits"),R!==void 0&&n(V,{variant:"text-md/normal"},"Region: ",R??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&n(V,{variant:"text-md/normal"},"Video quality mode: ",S5[A??1]),(p??0)>0&&n(V,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+Ws(p,"minutes")),c!=null&&n(V,{variant:"text-md/normal"},"Default layout: ",v5[c]),M!=null&&n(V,{variant:"text-md/normal"},"Default sort order: ",y5[M]),w!=null&&n("div",{className:"shc-lock-screen-default-emoji-container"},n(V,{variant:"text-md/normal"},"Default reaction emoji:"),Pe.defaultRules[w.emojiName?"emoji":"customEmoji"].react({name:w.emojiName?f5.convertSurrogateToName(w.emojiName):jo.getCustomEmojiById(w.emojiId)?.name??"",emojiId:w.emojiId??void 0,surrogate:w.emojiName??void 0,src:w.emojiName?g5.getURL(w.emojiName):void 0},void 0,{key:"0"})),e.hasFlag(16)&&n(V,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),d&&d.length>0&&n("div",{className:"shc-lock-screen-tags-container"},n(V,{variant:"text-lg/bold"},"Available tags:"),n("div",{className:"shc-lock-screen-tags"},d.map(Y=>n(m5,{tag:Y})))),n("div",{className:"shc-lock-screen-allowed-users-and-roles-container"},n("div",{className:"shc-lock-screen-allowed-users-and-roles-container-title"},G.plugins.PermissionsViewer.enabled&&n(ne,{text:"Permission Details"},({onMouseLeave:Y,onMouseEnter:J})=>n("button",{onMouseLeave:Y,onMouseEnter:J,className:"shc-lock-screen-allowed-users-and-roles-container-permdetails-btn",onClick:()=>Vi(o,ae.getGuild(e.guild_id),e.name)},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),n(V,{variant:"text-lg/bold"},"Allowed users and roles:"),n(ne,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:Y,onMouseEnter:J})=>n("button",{onMouseLeave:Y,onMouseEnter:J,className:"shc-lock-screen-allowed-users-and-roles-container-toggle-btn",onClick:()=>Wn.store.defaultAllowedUsersAndRolesDropdownState=!t},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:t?"scale(1 -1)":"scale(1 1)"},n("path",{fill:"currentColor",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"}))))),t&&n(d5,{channel:e}))))}var jM,p5,d5,m5,f5,g5,h5,y5,v5,S5,b5,WM,qM=g(()=>{"use strict";a();$();le();Cn();H();T();wa();Ta();Kh();jM=x("auto","content","scrollerBase"),p5=x("chat","content","noChat","chatContent"),d5=Ne(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE"),m5=Eu(e=>{if(typeof e!="function")return!1;let t=Function.prototype.toString.call(e);return t.includes(".Messages.FORUM_TAG_A11Y_FILTER_BY_TAG")&&!t.includes("increasedActivityPill")}),f5=x("convertSurrogateToName"),g5=x("getURL","getEmojiColors"),h5={[0]:"text",[5]:"announcement",[15]:"forum",[2]:"voice",[13]:"stage"},y5={[0]:"Latest activity",[1]:"Creation date"},v5={[0]:"Not set",[1]:"List view",[2]:"Gallery view"},S5={[1]:"Automatic",[2]:"720p"},b5="/assets/433e3ec4319a9d11b0cbe39342614982.svg";WM=_.wrap(T5)});var KM,Wn,Yh,Kh=g(()=>{"use strict";a();zM();$();le();P();hi();I();H();T();qM();KM=x("modeMuted","modeSelected","unread","icon"),Wn=N({hideUnreads:{description:"Hide Unreads",type:3,default:!0,restartNeeded:!0},showMode:{description:"The mode used to display hidden channels.",type:4,options:[{label:"Plain style with Lock Icon instead",value:0,default:!0},{label:"Muted style with hidden eye icon on the right",value:1}],restartNeeded:!0},defaultAllowedUsersAndRolesDropdownState:{description:"Whether the allowed users and roles dropdown on hidden channels should be open by default",type:3,default:!0}}),Yh=y({name:"ShowHiddenChannels",description:"Show channels that you do not have access to view.",authors:[m.BigDuck,m.AverageReactEnjoyer,m.D3SOX,m.Ven,m.Nuckyz,m.Nickyux,m.dzshn],settings:Wn,patches:[{find:'"placeholder-channel-id"',replacement:[{match:/if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\i}}/,replace:""},{match:/(?<=&&)(?=!\i\.\i\.hasUnread\(this\.record\.id\))/,replace:"$self.isHiddenChannel(this.record)||"},{match:/(activeJoinedRelevantThreads:.{0,50}VIEW_CHANNEL.+?renderLevel:(.+?),threadIds.+?renderLevel:).+?(?=,threadIds)/g,replace:(e,t,o)=>`${t}${o}`},{match:/(?<=getRenderLevel\(\i\){.+?return)!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,this\.record\)\|\|/,replace:" "}]},{find:"VoiceChannel, transitionTo: Channel does not have a guildId",replacement:[{match:/(?<=getCurrentClientVoiceChannelId\((\i)\.guild_id\);return)/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{match:/(?=&&\i\.\i\.selectVoiceChannel\((\i)\.id\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`},{match:/!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t},true)||`}]},{find:".MAX_STAGE_VOICE_USER_LIMIT})",replacement:{match:/!(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,replace:(e,t)=>`${e}&&!$self.isHiddenChannel(${t})`}},{find:"ChannelItemEditButton:function(){",replacement:[...["renderEditButton","renderInviteButton"].map(e=>({match:new RegExp(`(?<=${e}\\(\\){)`,"g"),replace:"if($self.isHiddenChannel(this.props.channel))return null;"}))]},{find:"VoiceChannel.renderPopout: There must always be something to render",all:!0,replacement:{match:/(?<=renderOpenChatButton=\(\)=>{)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"}},{find:".Messages.CHANNEL_TOOLTIP_DIRECTORY",predicate:()=>Wn.store.showMode===0,replacement:{match:/(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,70}\(0,\i\.\i\))/,replace:(e,t)=>`if($self.isHiddenChannel(${t}))return $self.LockIcon;`}},{find:"UNREAD_IMPORTANT:",predicate:()=>Wn.store.showMode===1,replacement:[{match:/(?<={channel:(\i),name:\i,muted:(\i).+?;)/,replace:(e,t,o)=>`${o}=$self.isHiddenChannel(${t})?true:${o};`},{match:/\.name\),.{0,120}\.children.+?:null(?<=,channel:(\i).+?)/,replace:(e,t)=>`${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`},{match:/(?<=\.wrapper:\i\.notInteractive,)(.+?)if\((\i)\)return (\i\.MUTED);/,replace:(e,t,o,r)=>`${o}?${r}:"",${t}if(${o})return "";`}]},{find:"UNREAD_IMPORTANT:",replacement:[{predicate:()=>Wn.store.hideUnreads===!1&&Wn.store.showMode===1,match:/\.LOCKED;if\((?<={channel:(\i).+?)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`},{predicate:()=>Wn.store.hideUnreads===!0,match:/(?<={channel:(\i),name:\i,.+?unread:(\i).+?;)/,replace:(e,t,o)=>`${o}=$self.isHiddenChannel(${t})?false:${o};`}]},{find:'.displayName="ChannelListUnreadsStore"',replacement:{match:/(?<=if\(null==(\i))(?=.{0,160}?getHasImportantUnread\)\(\i\))/g,replace:(e,t)=>`||$self.isHiddenChannel(${t})`}},{find:"renderBottomUnread(){",replacement:{match:/(?=&&\(0,\i\.getHasImportantUnread\)\((\i\.record)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:".useFlattenedChannelIdListWithThreads)",replacement:{match:/(?=&&\(0,\i\.getHasImportantUnread\)\((\i)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"Missing channel in Channel.renderHeaderToolbar",replacement:[{match:/(?<=renderHeaderToolbar=\(\)=>{.+?case \i\.\i\.GUILD_TEXT:)(?=.+?(\i\.push.{0,50}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/(?<=renderHeaderToolbar=\(\)=>{.+?case \i\.\i\.GUILD_MEDIA:)(?=.+?(\i\.push.{0,40}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/renderMobileToolbar=\(\)=>{.+?case \i\.\i\.GUILD_DIRECTORY:(?<=let{channel:(\i).+?)/,replace:(e,t)=>`${e}if($self.isHiddenChannel(${t}))break;`},{match:/(?<=renderHeaderBar=\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/,replace:(e,t)=>`||$self.isHiddenChannel(${t})`},{match:/(?<=renderSidebar\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"},{match:/(?<=renderChat\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return $self.HiddenChannelLockScreen(this.props.channel);"}]},{find:'"MessageManager"',replacement:{match:/"Skipping fetch because channelId is a static route"\);return}(?=.+?getChannel\((\i)\))/,replace:(e,t)=>`${e}if($self.isHiddenChannel({channelId:${t}}))return;`}},{find:'"alt+shift+down"',replacement:{match:/(?<=getChannel\(\i\);return null!=(\i))(?=.{0,150}?getHasImportantUnread\)\(\i\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:".APPLICATION_STORE&&null!=",replacement:{match:/(?<=getState\(\)\.channelId.{0,30}?\(0,\i\.\i\)\(\i\))(?=\.map\()/,replace:".filter(e=>!$self.isHiddenChannel(e))"}},{find:".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE",replacement:[{match:/ADMINISTRATOR\)\|\|(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${me.CONNECT}n,${t})?${o}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${me.CONNECT}n,${t})?${o}CONNECT):`},{match:/sortBy.{0,30}?\.filter\(\i=>(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?true:`},{match:/computePermissionsForRoles.+?.value\(\)(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}.reduce(...$self.makeAllowedRolesReduce(${t}.guild_id))`},{match:/MANAGE_ROLES.{0,90}?return(?=\(.+?(\(0,\i\.jsxs\)\("div",{className:\i\.members.+?guildId:(\i)\.guild_id.+?roleColor.+?\]}\)))/,replace:(e,t,o)=>(t=t.replace(bn(/(?<=users:\i)/),`,shcChannel:${o}`),t=t.replace(bn(/1!==\i\.length/),"true"),`${e} $self.isHiddenChannel(${o},true)?${t}:`)}]},{find:'+1]})},"overflow"))',replacement:[{match:/maxUsers:\i,users:\i.+?}=(\i).*?;/,replace:(e,t)=>`${e}let{shcChannel}=${t};`},{match:/\i>0(?=&&.{0,60}renderPopout)/,replace:e=>`($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)?true:${e})`},{match:/(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/,replace:(e,t)=>`($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&${t}<=0?0:1)`},{match:/(?<="\+",)(\i)\+1/,replace:(e,t)=>`$self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&${t}<=0?"":${e}`}]},{find:".Messages.CHANNEL_CALL_CURRENT_SPEAKER.format",replacement:[{match:/"more-options-popout"\)\),(?<=channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}${o}||!$self.isHiddenChannel(${t},true)&&`},{match:/"popup".{0,100}?if\((?<=channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}(${o}||!$self.isHiddenChannel(${t},true))&&`}]},{find:".Messages.EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR",replacement:[{match:/renderContent\(\i\){.+?this\.renderVoiceChannelEffects.+?children:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?$self.HiddenChannelLockScreen(this.props.channel):"},{match:/renderContent\(\i\){.+?disableGradients:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)||"},{match:/(?:{|,)render(?!Header|ExternalHeader).{0,30}?:/g,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?()=>null:"},{match:/callContainer,(?<=\i\.callContainer,)/,replace:'$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":'}]},{find:'"HasBeenInStageChannel"',replacement:[{match:/"124px".+?children:(?<=let \i,{channel:(\i).+?)(?=.{0,20}?}\)}function)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?$self.HiddenChannelLockScreen(${t}):`},{match:/render(?:BottomLeft|BottomCenter|BottomRight|ChatToasts):\(\)=>(?<=let \i,{channel:(\i).+?)/g,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?null:`},{match:/"124px".+?disableGradients:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})||`},{match:/"124px".+?style:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?void 0:`}]},{find:".Messages.STAGE_FULL_MODERATOR_TITLE",replacement:[{match:/\(0,\i\.jsx\)\(\i\.\i\.Divider.+?}\)]}\)(?=.+?:(\i)\.guild_id)/,replace:(e,t)=>`$self.isHiddenChannel(${t})?null:(${e})`},{match:/"recents".+?&&(?=\(.+?channelId:(\i)\.id,showRequestToSpeakSidebar)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`}]},{find:",queryStaticRouteChannels(",replacement:[{match:/(?<=queryChannels\(\i\){.+?getChannels\(\i)(?=\))/,replace:",true"},{match:/(?<=queryChannels\(\i\){.+?isGuildChannelType\)\((\i)\.type\))(?=&&!\i\.\i\.can\()/,replace:"&&!$self.isHiddenChannel($1)"}]},{find:'"^/guild-stages/(\\\\d+)(?:/)?(\\\\d+)?"',replacement:{match:/\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,\i\)/,replace:"true"}},{find:".shouldCloseDefaultModals",replacement:{match:/(?<=getChannel\(\i\);if\(null!=(\i))(?=.{0,100}?selectVoiceChannel)/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:'.displayName="GuildChannelStore"',replacement:[{match:/isChannelGated\(.+?\)(?=&&)/,replace:e=>`${e}&&false`},{match:/(?<=getChannels\(\i)(\){.+?)return (.+?)}/,replace:(e,t,o)=>`,shouldIncludeHidden${t}return $self.resolveGuildChannels(${o},shouldIncludeHidden??false);}`}]},{find:".Messages.FORM_LABEL_MUTED",replacement:{match:/(?<=getChannels\(\i)(?=\))/,replace:",true"}},{find:'.displayName="NowPlayingViewStore"',replacement:{match:/(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,replace:"$1"}}],isHiddenChannel(e,t=!1){return!e||(e.channelId&&(e=ee.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!_e.can(me.VIEW_CHANNEL,e)||t&&!_e.can(me.CONNECT,e)},resolveGuildChannels(e,t){if(t)return e;let o={};for(let[r,i]of Object.entries(e)){if(!Array.isArray(i)){o[r]=i;continue}o[r]??=[];for(let s of i)(s.channel.id===null||!this.isHiddenChannel(s.channel))&&o[r].push(s)}return o},makeAllowedRolesReduce(e){return[(t,o,r,i)=>{if(r!==0)return t;let s=i.find(l=>l.id===e);return s?[s]:i},[]]},HiddenChannelLockScreen:e=>n(WM,{channel:e}),LockIcon:_.wrap(()=>n("svg",{className:KM.icon,height:"18",width:"20",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{className:"shc-evenodd-fill-current-color",d:"M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z"})),{noop:!0}),HiddenChannelIcon:_.wrap(()=>n(ne,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>n("svg",{onMouseLeave:e,onMouseEnter:t,className:KM.icon+" shc-hidden-channel-icon",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{className:"shc-evenodd-fill-current-color",d:"m19.8 22.6-4.2-4.15q-.875.275-1.762.413Q12.95 19 12 19q-3.775 0-6.725-2.087Q2.325 14.825 1 11.5q.525-1.325 1.325-2.463Q3.125 7.9 4.15 7L1.4 4.2l1.4-1.4 18.4 18.4ZM12 16q.275 0 .512-.025.238-.025.513-.1l-5.4-5.4q-.075.275-.1.513-.025.237-.025.512 0 1.875 1.312 3.188Q10.125 16 12 16Zm7.3.45-3.175-3.15q.175-.425.275-.862.1-.438.1-.938 0-1.875-1.312-3.188Q13.875 7 12 7q-.5 0-.938.1-.437.1-.862.3L7.65 4.85q1.025-.425 2.1-.638Q10.825 4 12 4q3.775 0 6.725 2.087Q21.675 8.175 23 11.5q-.575 1.475-1.512 2.738Q20.55 15.5 19.3 16.45Zm-4.625-4.6-3-3q.7-.125 1.288.112.587.238 1.012.688.425.45.613 1.038.187.587.087 1.162Z"}))),{noop:!0})})});var YM=g(()=>{});var Ua,Zh,ZM=g(()=>{"use strict";a();YM();$();P();I();Ua=N({mode:{type:4,description:"How to display usernames and nicks",options:[{label:"Username then nickname",value:"user-nick",default:!0},{label:"Nickname then username",value:"nick-user"},{label:"Username only",value:"user"}]},displayNames:{type:3,description:"Use display names in place of usernames",default:!1},inReplies:{type:3,default:!1,description:"Also apply functionality to reply previews"}}),Zh=y({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[m.Rini,m.TheKodeToad],patches:[{find:".useCanSeeRemixBadge)",replacement:{match:/(?<=onContextMenu:\i,children:).*?\}/,replace:"$self.renderUsername(arguments[0])}"}}],settings:Ua,renderUsername:({author:e,message:t,isRepliedMessage:o,withMentionPrefix:r,userOverride:i})=>{try{let s=i??t.author,{username:l}=s;Ua.store.displayNames&&(l=s.globalName||l);let{nick:c}=e,u=r?"@":"";return l===c||o&&!Ua.store.inReplies?u+c:Ua.store.mode==="user-nick"?n(f,null,u,l," ",n("span",{className:"vc-smyn-suffix"},c)):Ua.store.mode==="nick-user"?n(f,null,u,c," ",n("span",{className:"vc-smyn-suffix"},l)):u+l}catch{return e?.nick}}})});var Xh,XM=g(()=>{"use strict";a();P();I();Xh=y({name:"ShowTimeouts",description:"Display member timeout icons in chat regardless of permissions.",authors:[m.Dolfies],patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}}]})});var Jh,Qh,w5,Vh,JM=g(()=>{"use strict";a();En();gn();$();P();I();T();Jh=!1,Qh=N({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(Jh=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}}),w5=({isMainChat:e})=>{let[t,o]=W(Jh);function r(i){Qh.store.persistState&&(Jh=i),o(i)}return se(()=>{let i=(s,l)=>{t&&(Qh.store.autoDisable&&r(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return Vt(i),()=>void eo(i)},[t]),e?n(xo,{tooltip:t?"Disable Silent Message":"Enable Silent Message",onClick:()=>r(!t)},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("path",{fill:"currentColor",mask:"url(#_)",d:"M18 10.7101C15.1085 9.84957 13 7.17102 13 4c0-.30736.0198-.6101.0582-.907C12.7147 3.03189 12.3611 3 12 3 8.686 3 6 5.686 6 9v5c0 1.657-1.344 3-3 3v1h18v-1c-1.656 0-3-1.343-3-3v-3.2899ZM8.55493 19c.693 1.19 1.96897 2 3.44497 2s2.752-.81 3.445-2H8.55493ZM18.2624 5.50209 21 2.5V1h-4.9651v1.49791h2.4411L16 5.61088V7h5V5.50209h-2.7376Z"}),!t&&n(f,null,n("mask",{id:"_"},n("path",{fill:"#fff",d:"M0 0h24v24H0Z"}),n("path",{stroke:"#000","stroke-width":"5.99068",d:"M0 24 24 0"})),n("path",{fill:"var(--status-danger)",d:"m21.178 1.70703 1.414 1.414L4.12103 21.593l-1.414-1.415L21.178 1.70703Z"})))):null},Vh=y({name:"SilentMessageToggle",authors:[m.Nuckyz,m.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",dependencies:["MessageEventsAPI","ChatInputButtonAPI"],settings:Qh,start:()=>wo("SilentMessageToggle",w5),stop:()=>nn("SilentMessageToggle")})});var xr,x5,ey,QM=g(()=>{"use strict";a();En();uo();$();P();I();T();xr=N({showIcon:{type:3,default:!1,description:"Show an icon for toggling the plugin",restartNeeded:!0},isEnabled:{type:3,description:"Toggle functionality",default:!0}}),x5=({isMainChat:e})=>{let{isEnabled:t,showIcon:o}=xr.use(["isEnabled","showIcon"]),r=()=>xr.store.isEnabled=!xr.store.isEnabled;return!e||!o?null:n(xo,{tooltip:t?"Disable Silent Typing":"Enable Silent Typing",onClick:r},n("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},n("path",{fill:"currentColor",d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}),t&&n("path",{d:"M13 432L590 48",stroke:"var(--red-500)","stroke-width":"72","stroke-linecap":"round"})))},ey=y({name:"SilentTyping",authors:[m.Ven,m.Rini],description:"Hide that you are typing",dependencies:["CommandsAPI","ChatInputButtonAPI"],settings:xr,patches:[{find:'.dispatch({type:"TYPING_START_LOCAL"',replacement:{match:/startTyping\(\i\){.+?},stop/,replace:"startTyping:$self.startTyping,stop"}}],commands:[{name:"silenttype",description:"Toggle whether you're hiding that you're typing or not.",inputType:0,options:[{name:"value",description:"whether to hide or not that you're typing (default is toggle)",required:!1,type:5}],execute:async(e,t)=>{xr.store.isEnabled=!!ht(e,"value",!xr.store.isEnabled),ge(t.channel.id,{content:xr.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){xr.store.isEnabled||B.dispatch({type:"TYPING_START_LOCAL",channelId:e})},start:()=>wo("SilentTyping",x5),stop:()=>nn("SilentTyping")})});var VM,ty,eI=g(()=>{"use strict";a();$();Ut();P();I();T();VM=N({showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}),ty=y({name:"SortFriendRequests",authors:[m.Megu],description:"Sorts friend requests by date of receipt",settings:VM,patches:[{find:"getRelationshipCounts(){",replacement:{match:/\.sortBy\(\i=>\i\.comparator\)/,replace:".sortBy((row) => $self.sortList(row))"}},{find:".Messages.FRIEND_REQUEST_CANCEL",replacement:{predicate:()=>VM.store.showDates,match:/subText:(\i)(?=,className:\i\.userInfo}\))(?<=user:(\i).+?)/,replace:(e,t,o)=>`subText:$self.makeSubtext(${t},${o})`}}],sortList(e){return e.type===3||e.type===4?-this.getSince(e.user):e.comparator},getSince(e){return new Date(it.getSince(e.id))},makeSubtext(e,t){let o=this.getSince(t);return n(fe,{flexDirection:"row",style:{gap:0,flexWrap:"wrap",lineHeight:"0.9rem"}},n("span",null,e),!isNaN(o.getTime())&&n("span",null,"Received \u2014 ",o.toDateString()))}})});var tI,oI=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/spotifyControls/hoverOnly.css",{name:"src/plugins/spotifyControls/hoverOnly.css",source:`.vc-spotify-button-row { height: 0; opacity: 0; pointer-events: none; transition: 0.2s; transition-property: height; } #vc-spotify-player:hover .vc-spotify-button-row { opacity: 1; height: 32px; pointer-events: auto; /* only transition opacity on show to prevent clipping */ transition-property: height, opacity; } `,classNames:{},dom:null});tI="src/plugins/spotifyControls/hoverOnly.css"});var nI=g(()=>{});var Ve,rI=g(()=>{"use strict";a();$();H();T();Ve=go(()=>{let{Store:e}=xs,t=Lr("getActiveSocketAndDevice"),o=Lr("SpotifyAPI"),r="https://api.spotify.com/v1/me/player";class i extends e{mPosition=0;start=0;track=null;device=null;isPlaying=!1;repeat="off";shuffle=!1;volume=0;isSettingPosition=!1;openExternal(c){let u=G.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+c.replaceAll("/",(p,d)=>d===0?"":":"):"https://open.spotify.com"+c;VencordNative.native.openExternal(u)}get position(){let c=this.mPosition;return this.isPlaying&&(c+=Date.now()-this.start),c}set position(c){this.mPosition=c,this.start=Date.now()}prev(){this.req("post","/previous")}next(){this.req("post","/next")}setVolume(c){this.req("put","/volume",{query:{volume_percent:Math.round(c)}}).then(()=>{this.volume=c,this.emitChange()})}setPlaying(c){this.req("put",c?"/play":"/pause")}setRepeat(c){this.req("put","/repeat",{query:{state:c}})}setShuffle(c){this.req("put","/shuffle",{query:{state:c}}).then(()=>{this.shuffle=c,this.emitChange()})}seek(c){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this.req("put","/seek",{query:{position_ms:Math.round(c)}}).catch(u=>{console.error("[VencordSpotifyControls] Failed to seek",u),this.isSettingPosition=!1}))}req(c,u,p={}){this.device?.is_active&&((p.query??={}).device_id=this.device.id);let{socket:d}=t.getActiveSocketAndDevice();return o.SpotifyAPI[c](d.accountId,d.accessToken,{url:r+u,...p})}}let s=new i(B,{SPOTIFY_PLAYER_STATE(l){s.track=l.track,s.device=l.device??null,s.isPlaying=l.isPlaying??!1,s.volume=l.volumePercent??0,s.repeat=l.actual_repeat||"off",s.position=l.position??0,s.isSettingPosition=!1,s.emitChange()},SPOTIFY_SET_DEVICES({devices:l}){s.device=l.find(c=>c.is_active)??l[0]??null,s.emitChange()}});return s})});function oy(e){let t=e/1e3/60,o=Math.floor(t),r=Math.floor((t-o)*60);return`${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function ds(e,t){return()=>n("svg",{className:Q(rt("button-icon"),rt(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},n("path",{d:e}))}function $a(e){return n("button",{className:rt("button"),...e},e.children)}function k5({name:e,path:t}){let o=`spotify-copy-${e}`,r=`spotify-open-${e}`;return n(L.Menu,{navId:`spotify-${e}-menu`,onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},n(L.MenuItem,{key:o,id:o,label:`Copy ${e} Link`,action:()=>Ao("https://open.spotify.com"+t),icon:Ei}),n(L.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>Ve.openExternal(t),icon:Xr}))}function N5(e,t){return o=>Yt.openContextMenu(o,()=>n(k5,{name:e,path:t}))}function D5(){let[e,t,o]=Be([Ve],()=>[Ve.isPlaying,Ve.shuffle,Ve.repeat]),[r,i]=(()=>{switch(o){case"off":return["context","repeat-off"];case"context":return["track","repeat-context"];case"track":return["off","repeat-track"];default:throw new Error(`Invalid repeat state ${o}`)}})();return n(fe,{className:rt("button-row"),style:{gap:0}},n($a,{className:Q(rt("button"),rt(t?"shuffle-on":"shuffle-off")),onClick:()=>Ve.setShuffle(!t)},n(R5,null)),n($a,{onClick:()=>Ve.prev()},n(P5,null)),n($a,{onClick:()=>Ve.setPlaying(!e)},e?n(I5,null):n(M5,null)),n($a,{onClick:()=>Ve.next()},n(A5,null)),n($a,{className:Q(rt("button"),rt(i)),onClick:()=>Ve.setRepeat(r),style:{position:"relative"}},o==="track"&&n("span",{className:rt("repeat-1")},"1"),n(C5,null)))}function E5(){let{duration:e}=Ve.track,[t,o,r]=Be([Ve],()=>[Ve.mPosition,Ve.isSettingPosition,Ve.isPlaying]),[i,s]=W(t);return se(()=>{if(r&&!o){s(Ve.position);let l=setInterval(()=>{s(c=>c+1e3)},1e3);return()=>clearInterval(l)}},[t,o,r]),n("div",{id:rt("progress-bar")},n(S.FormText,{variant:"text-xs/medium",className:rt("progress-time")+" "+rt("time-left"),"aria-label":"Progress"},oy(i)),n(L.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:l=>{o||(s(l),L5(l))},renderValue:oy}),n(S.FormText,{variant:"text-xs/medium",className:rt("progress-time")+" "+rt("time-right"),"aria-label":"Total Duration"},oy(e)))}function O5({track:e}){let t=Be([Ve],()=>Ve.volume);return n(L.Menu,{navId:"spotify-album-menu",onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},n(L.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>Ve.openExternal(`/album/${e.album.id}`),icon:Xr}),n(L.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>tn(e.album.image.url),icon:Jr}),n(L.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(o,r)=>n(L.MenuSliderControl,{...o,ref:r,value:t,minValue:0,maxValue:100,onChange:lo(i=>Ve.setVolume(i))})}))}function ny(e,t,o){return t?{role:"link",onClick:()=>Ve.openExternal(o),onContextMenu:N5(e,o)}:{}}function _5({track:e}){let t=e?.album?.image,[o,r]=W(!1),i=n(f,null,t&&n("img",{id:rt("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!o),onContextMenu:s=>{Yt.openContextMenu(s,()=>n(O5,{track:e}))}}));return o&&t?n("div",{id:rt("album-expanded-wrapper")},i):n("div",{id:rt("info-wrapper")},i,n("div",{id:rt("titles")},n(S.FormText,{variant:"text-sm/semibold",id:rt("song-title"),className:rt("ellipoverflow"),title:e.name,...ny("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&n(S.FormText,{variant:"text-sm/normal",className:rt("ellipoverflow")},"by\xA0",e.artists.map((s,l)=>n(U.Fragment,{key:s.name},n("span",{className:rt("artist"),style:{fontSize:"inherit"},title:s.name,...ny("Artist",s.id,`/artist/${s.id}`)},s.name),l!==e.artists.length-1&&n("span",{className:rt("comma")},", ")))),e.album.name&&n(S.FormText,{variant:"text-sm/normal",className:rt("ellipoverflow")},"on\xA0",n("span",{id:rt("album-title"),className:rt("album"),style:{fontSize:"inherit"},title:e.album.name,...ny("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function iI(){let e=Be([Ve],()=>Ve.track,null,(l,c)=>l?.id?l.id===c?.id:l?.name===c?.name),t=Be([Ve],()=>Ve.device,null,(l,c)=>l?.id===c?.id),o=Be([Ve],()=>Ve.isPlaying),[r,i]=W(!1);if(U.useEffect(()=>{if(i(!1),!o){let l=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(l)}},[o]),!e||!t?.is_active||r)return null;let s={"--vc-spotify-track-image":`url(${e?.album?.image?.url||""})`};return n(_,{fallback:()=>n("div",{className:"vc-spotify-fallback"},n("p",null,"Failed to render Spotify Modal :("),n("p",null,"Check the console for errors"))},n("div",{id:rt("player"),style:s},n(_5,{track:e}),n(E5,null),n(D5,null)))}var rt,M5,I5,P5,A5,C5,R5,L5,sI=g(()=>{"use strict";a();nI();le();Ut();It();zr();mt();we();T();rI();rt=e=>`vc-spotify-${e}`;M5=ds("M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z","play"),I5=ds("M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z","pause"),P5=ds("M7 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1zm3.66 6.82l5.77 4.07c.66.47 1.58-.01 1.58-.82V7.93c0-.81-.91-1.28-1.58-.82l-5.77 4.07c-.57.4-.57 1.24 0 1.64z","previous"),A5=ds("M7.58 16.89l5.77-4.07c.56-.4.56-1.24 0-1.63L7.58 7.11C6.91 6.65 6 7.12 6 7.93v8.14c0 .81.91 1.28 1.58.82zM16 7v10c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1s-1 .45-1 1z","next"),C5=ds("M7 7h10v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36V5H6c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1V7zm10 10H7v-1.79c0-.45-.54-.67-.85-.35l-2.79 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.31.31.85.09.85-.36V19h11c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1v3z","repeat"),R5=ds("M10.59 9.17L6.12 4.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41l4.46 4.46 1.42-1.4zm4.76-4.32l1.19 1.19L4.7 17.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L17.96 7.46l1.19 1.19c.31.31.85.09.85-.36V4.5c0-.28-.22-.5-.5-.5h-3.79c-.45 0-.67.54-.36.85zm-.52 8.56l-1.41 1.41 3.13 3.13-1.2 1.2c-.31.31-.09.85.36.85h3.79c.28 0 .5-.22.5-.5v-3.79c0-.45-.54-.67-.85-.35l-1.19 1.19-3.13-3.14z","shuffle");L5=lo(e=>{Ve.seek(e)})});function aI(e){(e?Nt:Xt)(tI)}var ry,lI=g(()=>{"use strict";a();$();Qe();P();I();oI();sI();ry=y({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[m.Ven,m.afn,m.KraXen72,m.Av32000],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>aI(e)},useSpotifyUris:{type:3,description:"Open Spotify URIs instead of Spotify URLs. Will only work if you have Spotify installed and might not work on all platforms",default:!1}},patches:[{find:"showTaglessAccountPanel:",replacement:{match:/return ?(.{0,30}\(.{1,3},\{[^}]+?,showTaglessAccountPanel:.+?\}\))/,replace:"return [$self.renderPlayer(),$1]"}},{find:".PLAYER_DEVICES",replacement:[{match:/get:(\i)\.bind\(null,(\i\.\i)\.get\)/,replace:"post:$1.bind(null,$2.post),$&"},{match:/202===\i\.status/,replace:"false"}]},{find:'repeat:"off"!==',replacement:{match:/repeat:"off"!==(.{1,3}),/,replace:"actual_repeat:$1,$&"}}],start:()=>aI(G.plugins.SpotifyControls.hoverControls),renderPlayer:()=>n(iI,null)})});var iy,sy,cI=g(()=>{"use strict";a();$();P();I();iy=N({noSpotifyAutoPause:{description:"Disable Spotify auto-pause",type:3,default:!0,restartNeeded:!0},keepSpotifyActivityOnIdle:{description:"Keep Spotify activity playing when idling",type:3,default:!1,restartNeeded:!0}}),sy=y({name:"SpotifyCrack",description:"Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",authors:[m.Cyn,m.Nuckyz],settings:iy,patches:[{find:'dispatch({type:"SPOTIFY_PROFILE_UPDATE"',replacement:{match:/SPOTIFY_PROFILE_UPDATE.+?isPremium:(?="premium"===(\i)\.body\.product)/,replace:(e,t)=>`${e}(${t}.body.product="premium")&&`}},{find:'.displayName="SpotifyStore"',replacement:[{predicate:()=>iy.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>iy.store.keepSpotifyActivityOnIdle,match:/(?<=shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:""}]}]})});function ly(e,t){t={invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};let o=B5.getPendingReply(e);ao.sendMessage(e,t,void 0,ao.getSendMessageOptionsForReply(o)).then(()=>{o&&B.dispatch({type:"DELETE_PENDING_REPLY",channelId:e})})}var ay,B5,cy,uI=g(()=>{"use strict";a();uo();P();I();H();T();ay=x("getPlayerState"),B5=x("getPendingReply");cy=y({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[m.katlyn],dependencies:["CommandsAPI"],commands:[{name:"track",description:"Send your current Spotify track to chat",inputType:0,options:[],execute:(e,t)=>{let o=ay.getTrack();if(o===null){ge(t.channel.id,{content:"You're not listening to any music."});return}ly(t.channel.id,{content:`https://open.spotify.com/track/${o.id}`})}},{name:"album",description:"Send your current Spotify album to chat",inputType:0,options:[],execute:(e,t)=>{let o=ay.getTrack();if(o===null){ge(t.channel.id,{content:"You're not listening to any music."});return}ly(t.channel.id,{content:`https://open.spotify.com/album/${o.album.id}`})}},{name:"artist",description:"Send your current Spotify artist to chat",inputType:0,options:[],execute:(e,t)=>{let o=ay.getTrack();if(o===null){ge(t.channel.id,{content:"You're not listening to any music."});return}ly(t.channel.id,{content:o.artists[0].external_urls.spotify})}}]})});var pI={};qe(pI,{default:()=>H5});function F5({emoji:e,prefix:t,log:o,delta:r,instance:i}){return n(U.Fragment,null,n("span",null,i.sinceStart.toFixed(3),"s"),n("span",null,i.sinceLast.toFixed(3),"s"),n("span",null,r?.toFixed(0)??""),n("span",null,n("pre",null,e," ",t??" ",o)))}function U5({title:e,logs:t,traceEnd:o}){let r=t.find(l=>l.timestamp)?.timestamp??0,i=r,s=t.map(l=>{let c=l.timestamp??i,u=(c-r)/1e3,p=(c-i)/1e3;return i=c,{sinceStart:u,sinceLast:p}});return n(S.FormSection,{title:e,tag:"h1"},n("code",null,o&&n("div",{style:{color:"var(--header-primary)",marginBottom:5,userSelect:"text"}},"Trace ended at: ",new Date(o).toTimeString()),n("div",{style:{color:"var(--header-primary)",display:"grid",gridTemplateColumns:"repeat(3, auto) 1fr",gap:"2px 10px",userSelect:"text"}},n("span",null,"Start"),n("span",null,"Interval"),n("span",null,"Delta"),n("span",{style:{marginBottom:5}},"Event"),Ga.logs.map((l,c)=>n(F5,{key:c,...l,instance:s[c]})))))}function $5({trace:e}){let t=e.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.find||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=` ${e} `.replaceAll(t.find,t.replace.replaceAll("\\n",` `)).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(`Invalid regex: ${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",sw:"Swahili",sv:"Swedish",tg:"Tajik",ta:"Tamil",tt:"Tatar",te:"Telugu",th:"Thai",ti:"Tigrinya",ts:"Tsonga",tr:"Turkish",tk:"Turkmen",ak:"Twi",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",vi:"Vietnamese",cy:"Welsh",xh:"Xhosa",yi:"Yiddish",yo:"Yoruba",zu:"Zulu"}});async function za(e,t){let o=Dt.store[e+"Input"],r=Dt.store[e+"Output"],i="https://translate.googleapis.com/translate_a/single?"+new URLSearchParams({client:"gtx",sl:o,tl:r,dt:"t",dj:"1",source:"input",q:t}),s=await fetch(i);if(!s.ok)throw new Error(`Failed to translate "${t}" (${o} -> ${r}) ${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.content||(t.content=(await za("sent",t.content)).text)})},stop(){eo(this.preSend),nn("vc-translate"),Oo("vc-translate"),xf("vc-translation")}})});function Ty({a:e,b:t,count:o}){return[n("strong",{key:"0"},e),", ",n("strong",{key:"1"},t),`, and ${o} others are typing...`]}var yu,Q5,wy,xy=g(()=>{"use strict";a();$();le();P();mt();I();T();yu=N({showAvatars:{type:3,default:!0,description:"Show avatars in the typing indicator"},showRoleColors:{type:3,default:!0,description:"Show role colors in the typing indicator"},alternativeFormatting:{type:3,default:!0,description:"Show a more useful message when several users are typing"}});Q5=_.wrap(function({user:e,guildId:t}){return n("strong",{role:"button",onClick:()=>{bo(e.id)},style:{display:"grid",gridAutoFlow:"column",gap:"4px",color:yu.store.showRoleColors?Ge.getMember(t,e.id)?.colorString:void 0,cursor:"pointer"}},yu.store.showAvatars&&n("div",{style:{marginTop:"4px"}},n(Ti,{size:"SIZE_16",src:e.getAvatarURL(t,128)})),Ge.getNick(t,e.id)||!t&&it.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),wy=y({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[m.zt],patches:[{find:"getCooldownTextStyle",replacement:{match:/(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i/,replace:"$self.mutateChildren(this.props, $1, $&), style: $self.TYPING_TEXT_STYLE"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=map\(\i=>)\i\.\i\.getName\(\i,this\.props\.channel\.id,(\i)\)/,replace:"$1"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=(\i)\.length\?\i.\i\.Messages.THREE_USERS_TYPING\.format\({\i:(\i),(?:\i:)?(\i),\i:\i}\):)\i\.\i\.Messages\.SEVERAL_USERS_TYPING/,replace:(e,t,o,r)=>`$self.buildSeveralUsers({ a: ${o}, b: ${r}, count: ${t}.length - 2 })`},predicate:()=>yu.store.alternativeFormatting}],settings:yu,TYPING_TEXT_STYLE:{display:"grid",gridAutoFlow:"column",gridGap:"0.25em"},buildSeveralUsers:Ty,mutateChildren(e,t,o){if(!Array.isArray(o))return o;let r=0;return o.map(i=>i.type==="strong"?n(Q5,{...e,user:t[r++]}):i)}})});function Mr(e,t){let o=E.getUser(t);return Ge.getNick(e,t)??o.globalName??o.username}function t3({channelId:e}){let t=Be([NI],()=>({...NI.getTypingUsers(e)}),null,(c,u)=>{let p=Object.keys(c),d=Object.keys(u);return p.length===d.length&&d.every(h=>c[h]!=null)}),o=Be([Ie],()=>Ie.getChannelId()),r=ee.getChannel(e).guild_id;if(!vu.store.includeMutedChannels&&e3.isChannelMuted(r,e)||!vu.store.includeCurrentChannel&&o===e)return null;let i=E.getCurrentUser()?.id,s=Object.keys(t).filter(c=>c!==i&&!(it.isBlocked(c)&&!vu.store.includeBlockedUsers)),l;switch(s.length){case 0:break;case 1:{l=Ye.Messages.ONE_USER_TYPING.format({a:Mr(r,s[0])});break}case 2:{l=Ye.Messages.TWO_USERS_TYPING.format({a:Mr(r,s[0]),b:Mr(r,s[1])});break}case 3:{l=Ye.Messages.THREE_USERS_TYPING.format({a:Mr(r,s[0]),b:Mr(r,s[1]),c:Mr(r,s[2])});break}default:{l=G.plugins.TypingTweaks.enabled?Ty({a:Mr(r,s[0]),b:Mr(r,s[1]),count:s.length-2}):Ye.Messages.SEVERAL_USERS_TYPING;break}}return s.length>0?n(ne,{text:l},c=>n("div",{...c,style:{marginLeft:6,height:16,display:"flex",alignItems:"center",zIndex:0,cursor:"pointer"}},n(V5,{dotRadius:3,themed:!0}))):null}var V5,NI,e3,vu,My,DI=g(()=>{"use strict";a();$();le();P();I();H();T();xy();V5=Tn("Dots","AnimatedDots"),NI=Re("TypingStore"),e3=Re("UserGuildSettingsStore");vu=N({includeCurrentChannel:{type:3,description:"Whether to show the typing indicator for the currently selected channel",default:!0},includeMutedChannels:{type:3,description:"Whether to show the typing indicator for muted channels.",default:!1},includeBlockedUsers:{type:3,description:"Whether to show the typing indicator for blocked users.",default:!1}}),My=y({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[m.Nuckyz,m.fawn],settings:vu,patches:[{find:"UNREAD_IMPORTANT:",replacement:{match:/\.name\),.{0,120}\.children.+?:null(?<=,channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id)"}},{find:"M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",replacement:{match:/mentionsCount:\i.+?null(?<=channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id)"}}],TypingIndicator:e=>n(_,{noop:!0},n(t3,{channelId:e}))})});var Iy,LI=g(()=>{"use strict";a();gn();P();I();Iy=y({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[m.Ven],dependencies:["MessageEventsAPI"],patches:[{find:"inQuote:",replacement:{match:/,content:([^,]+),inQuote/,replace:(e,t)=>`,content:Vencord.Plugins.plugins.Unindent.unindent(${t}),inQuote`}}],unindent(e){e=e.replace(/\t/g," ");let t=e.match(/^ *(?=\S)/gm)?.reduce((o,r)=>Math.min(o,r.length),1/0)??0;return t?e.replace(new RegExp(`^ {${t}}`,"gm"),""):e},unindentMsg(e){e.content=e.content.replace(/```(.|\n)*?```/g,t=>{let o=t.split(` `);if(o.length<2)return t;let r="";return o[o.length-1]==="```"&&(r=o.pop()),`${o[0]} ${this.unindent(o.slice(1).join(` `))} ${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();return void ge(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:new Date(i.written_on).toISOString()}]})}catch(o){ge(t.channel.id,{content:`Something went wrong: \`${o}\``})}}}]})});var BI=g(()=>{});var n3,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))});var s3,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)return null;let o=ee.getChannel(t);if(!o)return null;let r=ae.getGuild(o.guild_id);if(!r)return null;let i=`${r.name} | ${o.name}`;return n(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}){return Ry.store.showInUserProfileModal?n("div",{className:"vc-uvs-modal-margin"},n($I,{user:e})):null},patchPopout:({user:e})=>{let t=e.id===E.getCurrentUser().id;return n("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]),"}}]})});var HI,zI=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/usrbg/index.css",{name:"src/plugins/usrbg/index.css",source:`:is([class*="userProfile"], [class*="userPopout"]) [class*="bannerPremium"] { background: center / cover no-repeat; } [class*="NonPremium"]:has([class*="bannerPremium"]) [class*="avatarPositionNormal"], [class*="PremiumWithoutBanner"]:has([class*="bannerPremium"]) [class*="avatarPositionPremiumNoBanner"] { top: 76px; } [style*="background-image"] [class*="background_"] { background-color: transparent !important; } `,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)}})});function wu(e,t=G.plugins.VcNarrator){if(!e)return;let o=new SpeechSynthesisUtterance(e),r=speechSynthesis.getVoices().find(i=>i.voiceURI===t.voice);!r&&(new oe("VcNarrator").error(`Voice "${t.voice}" not found. Resetting to default.`),r=speechSynthesis.getVoices().find(i=>i.default),t.voice=r?.voiceURI,!r)||(o.voice=r,o.volume=t.volume,o.rate=t.rate,speechSynthesis.speak(o))}function Tu(e){let t=G.plugins.VcNarrator.latinOnly?/[^\p{Script=Latin}\p{Number}\p{Punctuation}\s]/gu:/[^\p{Letter}\p{Number}\p{Punctuation}\s]/gu;return e.normalize("NFKC").replace(t,"").replace(/_{2,}/g,"_").trim()}function xu(e,t,o,r,i){return e.replaceAll("{{USER}}",Tu(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",Tu(o)||"channel").replaceAll("{{DISPLAY_NAME}}",Tu(r)||(r?"Someone":"")).replaceAll("{{NICKNAME}}",Tu(i)||(i?"Someone":""))}function c3({channelId:e,oldChannelId:t},o){if(o&&e!==Oy&&(t=Oy,Oy=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function u3(e,t){let o=Object.assign({},G.plugins.VcNarrator,e),r=E.getCurrentUser(),i=yo.getGuildId();wu(xu(o[t+"Message"],r.username,"general",r.globalName??r.username,Ge.getNick(i,r.id)??r.username),o)}var YI,Oy,_y,ZI=g(()=>{"use strict";a();$();Pi();P();Ke();ot();Cn();I();H();T();YI=x("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");_y=y({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[m.Ven],flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=yo.getGuildId(),o=Ie.getVoiceChannelId(),r=E.getCurrentUser().id;if(ee.getChannel(o)?.type!==13)for(let i of e){let{userId:s,channelId:l,oldChannelId:c}=i,u=s===r;if(!u&&(!o||l!==o&&c!==o))continue;let[p,d]=c3(i,u);if(!p)continue;let h=G.plugins.VcNarrator[p+"Message"],v=u&&!G.plugins.VcNarrator.sayOwnName?"":E.getUser(s).username,b=v&&(E.getUser(s).globalName??v),M=v&&(Ge.getNick(t,s)??v),w=ee.getChannel(d).name;wu(xu(h,v,w,b,M))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Ie.getVoiceChannelId(),t=YI.getVoiceStateForChannel(e);if(!t)return;let o=t.mute||t.selfMute?"unmute":"mute";wu(xu(G.plugins.VcNarrator[o+"Message"],"",ee.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=Ie.getVoiceChannelId(),t=YI.getVoiceStateForChannel(e);if(!t)return;let o=t.deaf||t.selfDeaf?"undeafen":"deafen";wu(xu(G.plugins.VcNarrator[o+"Message"],"",ee.getChannel(e).name,"",""))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new oe("VcNarrator").warn("SpeechSynthesis not supported or no Narrator voices found. Thus, this plugin will not work. Check my Settings for more info");return}},optionsCache:null,get options(){return this.optionsCache??={voice:{type:4,description:"Narrator Voice",options:window.speechSynthesis?.getVoices().map(e=>({label:e.name,value:e.voiceURI,default:e.default}))??[]},volume:{type:5,description:"Narrator Volume",default:1,markers:[0,.25,.5,.75,1],stickToMarkers:!1},rate:{type:5,description:"Narrator Speed",default:1,markers:[.1,.5,1,2,5,10],stickToMarkers:!1},sayOwnName:{description:"Say own name",type:3,default:!1},latinOnly:{description:"Strip non latin characters from names before saying them",type:3,default:!1},joinMessage:{type:0,description:"Join Message",default:"{{USER}} joined"},leaveMessage:{type:0,description:"Leave Message",default:"{{USER}} left"},moveMessage:{type:0,description:"Move Message",default:"{{USER}} moved to {{CHANNEL}}"},muteMessage:{type:0,description:"Mute Message (only self for now)",default:"{{USER}} Muted"},unmuteMessage:{type:0,description:"Unmute Message (only self for now)",default:"{{USER}} unmuted"},deafenMessage:{type:0,description:"Deafen Message (only self for now)",default:"{{USER}} deafened"},undeafenMessage:{type:0,description:"Undeafen Message (only self for now)",default:"{{USER}} undeafened"}}},settingsAboutComponent({tempSettings:e}){let[t,o]=Rt(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(l=>l.lang.startsWith("en"))]},[]),r=Rt(()=>Object.keys(Vencord.Plugins.plugins.VcNarrator.options).filter(s=>s.endsWith("Message")).map(s=>s.slice(0,-7)),[]),i=null;if(t)o||(i=n(Ro,null,"You don't have any English voices installed, so the narrator might sound weird"));else{let s="No narrator voices found. ";s+=navigator.platform?.toLowerCase().includes("linux")?"Install speech-dispatcher or espeak and run Discord with the --enable-speech-dispatcher flag":"Try installing some in the Narrator settings of your Operating System",i=n(Ro,null,s)}return n(S.FormSection,null,n(S.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),n(S.FormText,null,"The special placeholders ",n("code",null,"{{USER}}"),", ",n("code",null,"{{DISPLAY_NAME}}"),", ",n("code",null,"{{NICKNAME}}")," and ",n("code",null,"{{CHANNEL}}")," ","will be replaced with the user's name (nothing if it's yourself), the user's display name, the user's nickname on current server and the channel's name respectively"),o&&n(f,null,n(S.FormTitle,{className:j.top20,tag:"h3"},"Play Example Sounds"),n("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem"},className:"vc-narrator-buttons"},r.map(s=>n(k,{key:s,onClick:()=>u3(e,s)},An([s]))))),i)}})});var XI=g(()=>{});function d3(e){let{useQuickCss:t}=St(["useQuickCss"]),o=[];for(let r of Object.values(Vencord.Plugins.plugins))r.toolboxActions&&Vencord.Plugins.isPluginEnabled(r.name)&&o.push(n(L.MenuGroup,{label:r.name,key:`vc-toolbox-${r.name}`},Object.entries(r.toolboxActions).map(([i,s])=>{let l=`vc-toolbox-${r.name}-${i}`;return n(L.MenuItem,{id:l,key:l,label:i,action:s})})));return n(L.Menu,{navId:"vc-toolbox",onClose:e},n(L.MenuItem,{id:"vc-toolbox-notifications",label:"Open Notification Log",action:Sl}),n(L.MenuCheckboxItem,{id:"vc-toolbox-quickcss-toggle",checked:t,label:"Enable QuickCSS",action:()=>{G.useQuickCss=!t}}),n(L.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...o)}function m3(e){return n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27",width:24,height:24},n("path",{fill:"currentColor",d:e?"M9 0h1v1h1v2h1v2h3V3h1V1h1V0h1v2h1v2h1v7h-1v-1h-3V9h1V6h-1v4h-3v1h1v-1h2v1h3v1h-1v1h-3v2h1v1h1v1h1v3h-1v4h-2v-1h-1v-4h-1v4h-1v1h-2v-4H9v-3h1v-1h1v-1h1v-2H9v-1H8v-1h3V6h-1v3h1v1H8v1H7V4h1V2h1M5 19h2v1h1v1h1v3H4v-1h2v-1H4v-2h1m15-1h2v1h1v2h-2v1h2v1h-5v-3h1v-1h1m4 3h4v1h-4":"M0 0h7v1H6v1H5v1H4v1H3v1H2v1h5v1H0V6h1V5h1V4h1V3h1V2h1V1H0m13 2h5v1h-1v1h-1v1h-1v1h3v1h-5V7h1V6h1V5h1V4h-3m8 5h1v5h1v-1h1v1h-1v1h1v-1h1v1h-1v3h-1v1h-2v1h-1v1h1v-1h2v-1h1v2h-1v1h-2v1h-1v-1h-1v1h-6v-1h-1v-1h-1v-2h1v1h2v1h3v1h1v-1h-1v-1h-3v-1h-4v-4h1v-2h1v-1h1v-1h1v2h1v1h1v-1h1v1h-1v1h2v-2h1v-2h1v-1h1M8 14h2v1H9v4h1v2h1v1h1v1h1v1h4v1h-6v-1H5v-1H4v-5h1v-1h1v-2h2m17 3h1v3h-1v1h-1v1h-1v2h-2v-2h2v-1h1v-1h1m1 0h1v3h-1v1h-2v-1h1v-1h1"}))}function f3(){let[e,t]=W(!1);return n(vs,{position:"bottom",align:"right",animation:vs.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>d3(()=>t(!1))},(o,{isShown:r})=>n(p3,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:()=>m3(r),selected:r}))}function g3({children:e}){return e.splice(e.length-1,0,n(_,{noop:!0},n(f3,null))),n(f,null,e)}var p3,By,JI=g(()=>{"use strict";a();XI();bl();$();le();P();I();H();T();p3=Tn("Icon","Divider");By=y({name:"VencordToolbox",description:"Adds a button next to the inbox button in the channel header that houses Vencord quick actions",authors:[m.Ven,m.AutumnVN],patches:[{find:"toolbar:function",replacement:{match:/(?<=toolbar:function.{0,100}\()\i.Fragment,/,replace:"$self.ToolboxFragmentWrapper,"}}],ToolboxFragmentWrapper:_.wrap(g3,{fallback:()=>n("p",{style:{color:"red"}},"Failed to render :(")})})});function Wa(e){let t=e.startsWith("/")?"png":Fy.store.format,o=new URL(e,window.location.href);o.searchParams.set("size",Fy.store.imgSize),o.pathname=o.pathname.replace(/\.(png|jpe?g|webp)$/,`.${t}`),e=o.toString(),o.searchParams.set("size","4096");let r=o.toString();tn(e,{original:r,height:256})}var Fy,h3,y3,Uy,QI=g(()=>{"use strict";a();$();It();P();mt();I();T();Fy=N({format:{type:4,description:"Choose the image format to use for non animated images. Animated images will always use .gif",options:[{label:"webp",value:"webp",default:!0},{label:"png",value:"png"},{label:"jpg",value:"jpg"}]},imgSize:{type:4,description:"The image size to use",options:["128","256","512","1024","2048","4096"].map(e=>({label:e,value:e,default:e==="1024"}))}});h3=(e,{user:t,guildId:o})=>{if(!t)return;let r=Ge.getMember(o,t.id)?.avatar||null;e.splice(-1,0,n(L.MenuGroup,null,n(L.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>Wa(Gt.getUserAvatarURL(t,!0)),icon:Jr}),r&&n(L.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>Wa(Gt.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:o,canAnimate:!0})),icon:Jr})))},y3=(e,{guild:t})=>{if(!t)return;let{id:o,icon:r,banner:i}=t;!i&&!r||e.splice(-1,0,n(L.MenuGroup,null,r?n(L.MenuItem,{id:"view-icon",label:"View Icon",action:()=>Wa(Gt.getGuildIconURL({id:o,icon:r,canAnimate:!0})),icon:Jr}):null,i?n(L.MenuItem,{id:"view-banner",label:"View Banner",action:()=>Wa(Gt.getGuildBannerURL(t,!0)),icon:Jr}):null))},Uy=y({name:"ViewIcons",authors:[m.Ven,m.TheKodeToad,m.Nuckyz],description:"Makes avatars and banners in user profiles clickable, and adds View Icon/Banner entries in the user and server context menu",tags:["ImageUtilities"],settings:Fy,openImage:Wa,contextMenus:{"user-context":h3,"guild-context":y3},patches:[{find:"User Profile Modal - Context Menu",replacement:{match:/\{src:(\i)(?=,avatarDecoration)/,replace:"{src:$1,onClick:()=>$self.openImage($1)"}},{find:".NITRO_BANNER,",replacement:{match:/style:\{(?=backgroundImage:(\i)\?"url\("\.concat\((\i),)/,replace:'onClick:ev=>$1&&ev.target.style.backgroundImage&&$self.openImage($2),style:{cursor:$1?"pointer":void 0,'}},{find:".avatarPositionPanel",replacement:{match:/(?<=avatarWrapperNonUserBot.{0,50})onClick:(\i\|\|\i)\?void 0(?<=,avatarSrc:(\i).+?)/,replace:'style:($1)?{cursor:"pointer"}:{},onClick:$1?()=>{$self.openImage($2)}'}}]})});function $y(e){return n("div",{className:v3.markup},Pe.defaultRules.codeBlock.react(e,null,{}))}var v3,VI=g(()=>{"use strict";a();H();T();v3=x("markup","codeContainer")});function S3(e){return Object.fromEntries(Object.entries(e).sort(([t],[o])=>t.localeCompare(o)))}function b3(e){let t=S3(JSON.parse(JSON.stringify(e)));for(let r of["email","phone","mfaEnabled","personalConnectionId"])delete t.author[r];let o=t;return delete o.editHistory,delete o.deleted,o.attachments?.forEach(r=>delete r.deleted),t}function oP(e,t,o){let r=de(i=>n(_,null,n(ye,{...i,size:"large"},n(Le,null,n(V,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),n(pt,{onClick:()=>xn(r)})),n(ke,null,n("div",{style:{padding:"16px 0"}},!!o&&n(f,null,n(S.FormTitle,{tag:"h5"},"Content"),n($y,{content:o,lang:""}),n(S.FormDivider,{className:j.bottom20})),n(S.FormTitle,{tag:"h5"},t," Data"),n($y,{content:e,lang:"json"}))),n(ct,null,n(fe,{cellSpacing:10},n(k,{onClick:()=>Ao(e,`${t} data copied to clipboard!`)},"Copy ",t," JSON"),!!o&&n(k,{onClick:()=>Ao(o,"Content copied to clipboard!")},"Copy Raw Content"))))))}function eP(e){e=b3(e);let t=JSON.stringify(e,null,4);return oP(t,"Message",e.content)}function Gy(e){return(t,o)=>{let r=o[e.toLowerCase()];if(!r||o.label===Ye.Messages.CHANNEL_ACTIONS_MENU_LABEL)return;let i=t.at(-1);if(i?.key==="developer-actions"){let s=i.props;Array.isArray(s.children)||(s.children=[s.children]),t=s.children}t.splice(-1,0,n(L.MenuItem,{id:`vc-view-${e.toLowerCase()}-raw`,label:"View Raw",action:()=>oP(JSON.stringify(r,null,4),e),icon:tP}))}}var tP,Mu,Hy,nP=g(()=>{"use strict";a();li();$();VI();le();Ut();P();ot();we();Ze();I();T();tP=()=>n("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",width:"18",height:"18"},n("path",{d:"M12.9297 3.25007C12.7343 3.05261 12.4154 3.05226 12.2196 3.24928L11.5746 3.89824C11.3811 4.09297 11.3808 4.40733 11.5739 4.60245L16.5685 9.64824C16.7614 9.84309 16.7614 10.1569 16.5685 10.3517L11.5739 15.3975C11.3808 15.5927 11.3811 15.907 11.5746 16.1017L12.2196 16.7507C12.4154 16.9477 12.7343 16.9474 12.9297 16.7499L19.2604 10.3517C19.4532 10.1568 19.4532 9.84314 19.2604 9.64832L12.9297 3.25007Z"}),n("path",{d:"M8.42616 4.60245C8.6193 4.40733 8.61898 4.09297 8.42545 3.89824L7.78047 3.24928C7.58466 3.05226 7.26578 3.05261 7.07041 3.25007L0.739669 9.64832C0.5469 9.84314 0.546901 10.1568 0.739669 10.3517L7.07041 16.7499C7.26578 16.9474 7.58465 16.9477 7.78047 16.7507L8.42545 16.1017C8.61898 15.907 8.6193 15.5927 8.42616 15.3975L3.43155 10.3517C3.23869 10.1569 3.23869 9.84309 3.43155 9.64824L8.42616 4.60245Z"}));Mu=N({clickMethod:{description:"Change the button to view the raw content/data of any message.",type:4,options:[{label:"Left Click to view the raw content.",value:"Left",default:!0},{label:"Right click to view the raw content.",value:"Right"}]}});Hy=y({name:"ViewRaw",description:"Copy and view the raw content/data of any message, channel or guild",authors:[m.KingFish,m.Ven,m.rad,m.ImLvna],dependencies:["MessagePopoverAPI"],settings:Mu,contextMenus:{"guild-context":Gy("Guild"),"channel-context":Gy("Channel"),"user-context":Gy("User")},start(){on("ViewRaw",e=>{let t=()=>{Mu.store.clickMethod==="Right"?Ao(e.content):eP(e)},o=i=>{Mu.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),Ao(e.content)):(i.preventDefault(),i.stopPropagation(),eP(e))};return{label:Mu.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:tP,message:e,channel:ee.getChannel(e.channel_id),onClick:t,onContextMenu:o}})},stop(){Oo("ViewRaw")}})});var rP=g(()=>{});var fs,Iu=g(()=>{"use strict";a();$();I();fs=N({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}})});var Vge,iP=g(()=>{"use strict";a();T();Iu();Vge=VencordNative.pluginHelpers.VoiceMessages});var Ir,zy=g(()=>{"use strict";a();Qe();Ir=ve("vc-vmsg-")});var T3,sP,aP=g(()=>{"use strict";a();lt();H();zy();T3=Ne("waveform:","onVolumeChange"),sP=({src:e,waveform:t,recording:o})=>{let r=Ns({deps:[o]}),i=o?Math.floor(r/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!o?n(T3,{key:e,src:e,waveform:t}):n("div",{className:Ir("preview",o?"preview-recording":[])},n("div",{className:Ir("preview-indicator")}),n("div",{className:Ir("preview-time")},s),n("div",{className:Ir("preview-label")},o?"RECORDING":"----"))}});var lP,cP=g(()=>{"use strict";a();T();Iu();lP=({setAudioBlob:e,onRecordingChange:t})=>{let[o,r]=W(!1),[i,s]=W(!1),[l,c]=W(),[u,p]=W([]),d=v=>{r(v),t?.(v)};function h(){!o?navigator.mediaDevices.getUserMedia({audio:{echoCancellation:fs.store.echoCancellation,noiseSuppression:fs.store.noiseSuppression}}).then(b=>{let M=[];p(M);let w=new MediaRecorder(b);c(w),w.addEventListener("dataavailable",C=>{M.push(C.data)}),w.start(),d(!0)}):l&&(l.addEventListener("stop",()=>{e(new Blob(u,{type:"audio/ogg; codecs=opus"})),d(!1)}),l.stop())}return n(f,null,n(k,{onClick:h},o?"Stop":"Start"," recording"),n(k,{disabled:!o,onClick:()=>{s(!i),i?l?.resume():l?.pause()}},i?"Resume":"Pause"," recording"))}});function P3(e,t){let o=Ie.getChannelId(),r=x3.getPendingReply(o);r&&B.dispatch({type:"DELETE_PENDING_REPLY",channelId:o});let i=new w3.CloudUpload({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isClip:!1,isThumbnail:!1,platform:1},o,!1,0);i.on("complete",()=>{_t.post({url:`/channels/${o}/messages`,body:{flags:1<<13,channel_id:o,content:"",nonce:un.fromTimestamp(Date.now()),sticker_ids:[],type:0,attachments:[{id:"0",filename:i.filename,uploaded_filename:i.uploadedFilename,waveform:t.waveform,duration_secs:t.duration}],message_reference:r?ao.getSendMessageOptionsForReply(r)?.messageReference:null}})}),i.on("error",()=>Mt("Failed to upload voice message",X.Type.FAILURE)),i.upload()}function A3(){let[e,t]=W();return[e,r=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(r))}]}function C3({modalProps:e}){let[t,o]=W(!1),[r,i]=W(),[s,l]=A3();se(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[c]=st(async()=>{if(!r)return uP;let d=await new AudioContext().decodeAudioData(await r.arrayBuffer()),h=d.getChannelData(0),v=new Uint8Array(Fr.clamp(Math.floor(d.duration*10),Math.min(32,h.length),256)),b=Math.floor(h.length/v.length);for(let C=0;C{i(p),l(p)},onRecordingChange:o}),n(k,{onClick:async()=>{let p=await Al("audio/*");p&&(i(p),l(p))}},"Upload File")),n(S.FormTitle,null,"Preview"),n(sP,{src:s,waveform:c.waveform,recording:t}),u&&n(Tt,{className:`vc-plugins-restart-card ${j.top16}`},n(S.FormText,null,"Voice Messages have to be OggOpus to be playable on iOS. This file is ",n("code",null,r.type)," so it will not be playable on iOS."),n(S.FormText,{className:j.top8},"To fix it, first convert it to OggOpus, for example using the ",n(je,{href:"https://convertio.co/mp3-opus/"},"convertio web converter")))),n(ct,null,n(k,{disabled:!r,onClick:()=>{P3(r,c),e.onClose(),Mt("Now sending voice message... Please be patient",X.Type.MESSAGE)}},"Send")))}var w3,x3,jy,M3,I3,Wy,uP,pP=g(()=>{"use strict";a();rP();It();To();P();ot();Ze();lt();I();Cl();H();T();iP();Iu();zy();aP();cP();w3=x("CloudUpload"),x3=Re("PendingReplyStore"),jy=x("optionName","optionIcon","optionLabel"),M3=lP,I3=(e,t)=>{t.channel.guild_id&&!(_e.can(me.SEND_VOICE_MESSAGES,t.channel)&&_e.can(me.SEND_MESSAGES,t.channel))||e.push(n(L.MenuItem,{id:"vc-send-vmsg",label:n("div",{className:jy.optionLabel},n(_v,{className:jy.optionIcon,height:24,width:24}),n("div",{className:jy.optionName},"Send voice message")),action:()=>de(o=>n(C3,{modalProps:o}))}))},Wy=y({name:"VoiceMessages",description:"Allows you to send voice messages like on mobile. To do so, right click the upload button and click Send Voice Message",authors:[m.Ven,m.Vap,m.Nickyux],settings:fs,contextMenus:{"channel-attach":I3}}),uP={waveform:"AAAAAAAAAAAA",duration:1}});async function R3(e){let t=await fetch(e);if(t.status===200)return await t.blob()}function mP(e){let t=new URL(e);return t.host===dP?e:(t.searchParams.delete("width"),t.searchParams.delete("height"),t.origin===k3?(t.host=dP,t.searchParams.delete("size"),t.searchParams.delete("quality"),t.searchParams.delete("format")):t.searchParams.set("quality","lossless"),t.toString())}var Pu,mi,k3,dP,qy,fP=g(()=>{"use strict";a();$();P();I();Cl();H();T();Pu=x("contextMenuCallbackNative");mi=N({addBack:{type:3,description:"Add back the Discord context menus for images, links and the chat input bar",default:!0,restartNeeded:!0}}),k3="https://media.discordapp.net",dP="cdn.discordapp.com";qy=y({name:"WebContextMenus",description:"Re-adds context menus missing in the web version of Discord: Links & Images (Copy/Open Link/Image), Text Area (Copy, Cut, Paste, SpellCheck)",authors:[m.Ven],enabledByDefault:!0,required:!0,settings:mi,start(){mi.store.addBack&&(window.removeEventListener("contextmenu",Pu.contextMenuCallbackWeb),window.addEventListener("contextmenu",Pu.contextMenuCallbackNative),this.changedListeners=!0)},stop(){this.changedListeners&&(window.removeEventListener("contextmenu",Pu.contextMenuCallbackNative),window.addEventListener("contextmenu",Pu.contextMenuCallbackWeb))},patches:[{find:"open-native-link",replacement:[{match:/if\(!\i\.\i\|\|null==/,replace:"if(null=="},{match:/\i\.\i\.copy/,replace:"Vencord.Webpack.Common.Clipboard.copy"}]},{find:'id:"copy-image"',replacement:[{match:/!\i\.isPlatformEmbedded/,replace:"false"},{match:/return\s*?\[\i\.\i\.canCopyImage\(\)/,replace:"return [true"},{match:/(?<=COPY_IMAGE_MENU_ITEM,)action:/,replace:"action:()=>$self.copyImage(arguments[0]),oldAction:"},{match:/(?<=SAVE_IMAGE_MENU_ITEM,)action:/,replace:"action:()=>$self.saveImage(arguments[0]),oldAction:"}]},{find:'navId:"image-context"',all:!0,predicate:()=>mi.store.addBack,replacement:{match:/return \i\.\i(?=\?|&&)/,replace:"return true"}},{find:'"interactionUsernameProfile"',predicate:()=>mi.store.addBack,replacement:{match:/if\((?="A"===\i\.tagName&&""!==\i\.textContent)/,replace:"if(false&&"}},{find:'getElementById("slate-toolbar"',predicate:()=>mi.store.addBack,replacement:{match:/(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\?/,replace:"||true?"}},{find:".SLASH_COMMAND_SUGGESTIONS_TOGGLED,{",predicate:()=>mi.store.addBack,replacement:[{match:/if\(!\i\.\i\)return null;/,replace:""},{match:/\b\i\.\i\.(copy|cut|paste)/g,replace:"$self.$1"}]},{find:'"add-to-dictionary"',predicate:()=>mi.store.addBack,replacement:{match:/let\{text:\i=""/,replace:"return [null,null];$&"}},{find:'.default("MediaEngineWebRTC");',replacement:{match:/supports\(\i\)\{switch\(\i\)\{case (\i).Features/,replace:"$&.DISABLE_VIDEO:return true;case $1.Features"}}],async copyImage(e){e=mP(e);let t=await fetch(e).then(o=>o.blob());if(t.type!=="image/png"){let o=await createImageBitmap(t),r=document.createElement("canvas");r.width=o.width,r.height=o.height,r.getContext("2d").drawImage(o,0,0),await new Promise(i=>{r.toBlob(s=>{t=s,i()},"image/png")})}if(VesktopNative.clipboard){VesktopNative.clipboard.copyImage(await t.arrayBuffer(),e);return}else navigator.clipboard.write([new ClipboardItem({"image/png":t})])},async saveImage(e){e=mP(e);let t=await R3(e);if(!t)return;let o=new URL(e).pathname.split("/").pop(),r=new File([t],o,{type:t.type});Pl(r)},copy(){let e=document.getSelection();!e||Ft.copy(e.toString())},cut(){this.copy(),Wo.dispatch("INSERT_TEXT",{rawText:""})},async paste(){let e=(await navigator.clipboard.read())[0];if(!e)return;let t=new DataTransfer;for(let o of e.types)if(o==="image/png"){let r=new File([await e.getType(o)],"unknown.png",{type:o});t.items.add(r)}else if(o==="text/plain"){let r=await e.getType(o);t.setData(o,await r.text())}document.dispatchEvent(new ClipboardEvent("paste",{clipboardData:t}))}})});var Ky,Yy,gP=g(()=>{"use strict";a();P();I();H();T();Ky=x("JUMP_TO_GUILD","SERVER_NEXT"),Yy=y({name:"WebKeybinds",description:"Re-adds keybinds missing in the web version of Discord: ctrl+t, ctrl+shift+t, ctrl+tab, ctrl+shift+tab, ctrl+1-9, ctrl+,. Only works fully on Vesktop/ArmCord, not inside your browser",authors:[m.Ven],enabledByDefault:!0,onKey(e){if(e.ctrlKey||e.metaKey&&navigator.platform.includes("Mac"))switch(e.key){case"t":case"T":e.preventDefault(),e.shiftKey?(yo.getGuildId()&&qo.transitionToGuild("@me"),Wo.safeDispatch("TOGGLE_DM_CREATE")):B.dispatch({type:"QUICKSWITCHER_SHOW",query:"",queryMode:null});break;case",":e.preventDefault(),$r.open("My Account");break;case"Tab":(e.shiftKey?Ky.SERVER_PREV:Ky.SERVER_NEXT).action(e);break;default:e.key>="1"&&e.key<="9"&&(e.preventDefault(),Ky.JUMP_TO_GUILD.action(e,`mod+${e.key}`));break}},start(){document.addEventListener("keydown",this.onKey)},stop(){document.removeEventListener("keydown",this.onKey)}})});function E3(e,t,o){let r=t.name+(t.id?`:${t.id}`:"");return _t.get({url:`/channels/${e.channel_id}/messages/${e.id}/reactions/${r}`,query:{limit:100,type:o},oldFormErrors:!0}).then(i=>B.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:o})).catch(console.error).finally(()=>Ko(250))}function O3(e,t,o){let r=`${e.id}:${t.name}:${t.id??""}:${o}`,i=hP[r]??={fetched:!1,users:{}};return i.fetched||(L3.unshift(()=>E3(e,t,o)),i.fetched=!0),i.users}function _3(e){return function(o,r){return n(ne,{text:e.slice(4).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>n("div",{className:D3.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-4))}}function B3(e){e.stopPropagation()}var N3,D3,Zy,L3,hP,Xy,yP=g(()=>{"use strict";a();le();P();we();Wr();lt();I();H();T();N3=Ne("defaultRenderUser","showDefaultAvatarsForNullUsers"),D3=x("moreUsers","emptyUser","avatarContainer","clickableAvatar"),Zy=null,L3=new vo;Xy=y({name:"WhoReacted",description:"Renders the avatars of users who reacted to a message",authors:[m.Ven,m.KannaDev,m.newwares],patches:[{find:",reactionRef:",replacement:{match:/(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,replace:"$&$1?null:$self.renderUsers(this.props),"}},{find:'.displayName="MessageReactionsStore";',replacement:{match:/(?<=CONNECTION_OPEN:function\(\){)(\i)={}/,replace:"$&;$self.reactions=$1"}},{find:"cleanAutomaticAnchor(){",replacement:{match:/this\.automaticAnchor=null,this\.messageFetchAnchor=null,/,replace:"$&$self.setScrollObj(this),"}}],setScrollObj(e){Zy=e},renderUsers(e){return e.message.reactions.length>10?null:n(_,{noop:!0},n(this._renderUsers,{...e}))},_renderUsers({message:e,emoji:t,type:o}){let r=Co();U.useLayoutEffect(()=>{Zy?.scrollCounter>0&&Zy.setAutomaticAnchor(null)}),U.useEffect(()=>{let l=c=>{c.messageId===e.id&&r()};return B.subscribe("MESSAGE_REACTION_ADD_USERS",l),()=>B.unsubscribe("MESSAGE_REACTION_ADD_USERS",l)},[e.id]);let i=O3(e,t,o),s=Object.values(i).filter(Boolean);for(let l of s)B.dispatch({type:"USER_UPDATE",user:l});return n("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},n("div",{onClick:B3},n(N3,{users:s,guildId:ee.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:_3(s)})))},set reactions(e){hP=e}})});var Jy,vP=g(()=>{"use strict";a();uo();P();I();Jy=y({name:"Wikisearch",description:"Searches Wikipedia for your requested query. (/wikisearch)",authors:[m.Samu],dependencies:["CommandsAPI"],commands:[{name:"wikisearch",description:"Searches Wikipedia for your request.",inputType:0,options:[{name:"search",description:"Word to search for",type:3,required:!0}],execute:async(e,t)=>{let o=ht(e,"search","");if(!o)return ge(t.channel.id,{content:"No word was defined!"});let r=new URLSearchParams({action:"query",format:"json",list:"search",formatversion:"2",origin:"*",srsearch:o}),i=await fetch("https://en.wikipedia.org/w/api.php?"+r).then(u=>u.json()).catch(u=>(console.log(u),ge(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!i)return;if(!i.query?.search?.length)return console.log(i),ge(t.channel.id,{content:"No results given"});let s=await fetch(`https://en.wikipedia.org/w/api.php?action=query&format=json&prop=info%7Cdescription%7Cimages%7Cimageinfo%7Cpageimages&list=&meta=&indexpageids=1&pageids=${i.query.search[0].pageid}&formatversion=2&origin=*`).then(u=>u.json()).then(u=>u.query.pages[0]).catch(u=>(console.log(u),ge(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!s)return;let l=s.thumbnail,c=l&&{url:l.source.replace(/(50px-)/ig,"1000px-"),height:l.height*100,width:l.width*100};ge(t.channel.id,{embeds:[{type:"rich",title:i.query.search[0].title,url:`https://wikipedia.org/w/index.php?curid=${i.query.search[0].pageid}`,color:"0x8663BE",description:i.query.search[0].snippet.replace(/( |<([^>]+)>)/ig,"").replace(/(")/ig,'"')+"...",image:c,footer:{text:"Powered by the Wikimedia API"}}]})}}]})});function U3(e,t,o){fetch(`https://cdn.discordapp.com/avatars/${o.author.id}/${o.author.avatar}.png?size=128`).then(r=>r.arrayBuffer()).then(r=>{let i={messageType:1,index:0,timeout:Bo.store.timeout,height:TP(wP(t)),opacity:Bo.store.opacity,volume:Bo.store.volume,audioPath:Bo.store.soundPath,title:e,content:t,useBase64Icon:!0,icon:r,sourceApp:"Vencord"};bP.sendToOverlay(i)})}function $3(e,t){let o={messageType:1,index:0,timeout:Bo.store.timeout,height:TP(wP(e)),opacity:Bo.store.opacity,volume:Bo.store.volume,audioPath:Bo.store.soundPath,title:t,content:e,useBase64Icon:!1,icon:null,sourceApp:"Vencord"};bP.sendToOverlay(o)}function G3(e,t){let o=E.getCurrentUser();return e.author.id===o.id||e.author.bot&&Bo.store.ignoreBots?!1:SP.allowAllMessages(t)||e.mention_everyone&&!SP.isSuppressEveryoneEnabled(e.guild_id)?!0:e.mentions.some(r=>r.id===o.id)}function TP(e){return e.length<=100?100:e.length<=200?150:e.length<=300?200:250}function wP(e){return e.replace(new RegExp("<[^>]*>","g"),"")}var SP,F3,Bo,bP,Qy,xP=g(()=>{"use strict";a();$();Xs();P();Ke();I();H();T();SP=x("isSuppressEveryoneEnabled"),F3=new oe("XSOverlay"),Bo=N({ignoreBots:{type:3,description:"Ignore messages from bots",default:!1},pingColor:{type:0,description:"User mention color",default:"#7289da"},channelPingColor:{type:0,description:"Channel mention color",default:"#8a2be2"},soundPath:{type:0,description:"Notification sound (default/warning/error)",default:"default"},timeout:{type:1,description:"Notif duration (secs)",default:1},opacity:{type:5,description:"Notif opacity",default:1,markers:en(0,1,.1)},volume:{type:5,description:"Volume",default:.2,markers:en(0,1,.1)}}),bP=VencordNative.pluginHelpers.XsOverlay,Qy=y({name:"XSOverlay",description:"Forwards discord notifications to XSOverlay, for easy viewing in VR",authors:[m.Nyako],tags:["vr","notify"],settings:Bo,flux:{CALL_UPDATE({call:e}){if(e?.ringing?.includes(E.getCurrentUser().id)){let t=ee.getChannel(e.channel_id);$3("Incoming call",`${t.name} is calling you...`)}},MESSAGE_CREATE({message:e,optimistic:t}){try{if(t)return;let o=ee.getChannel(e.channel_id);if(!G3(e,o))return;let r=Bo.store.pingColor.replaceAll("#","").trim(),i=Bo.store.channelPingColor.replaceAll("#","").trim(),s=e.content,l="";if(o.guild_id){let d=ae.getGuild(o.guild_id);l=`${e.author.username} (${d.name}, #${o.name})`}switch(o.type){case 1:l=e.author.username.trim();break;case 3:let d=o.name.trim()??o.rawRecipients.map(h=>h.username).join(", ");l=`${e.author.username} (${d})`;break}if(e.referenced_message&&(l+=" (reply)"),e.embeds.length>0&&(s+=" [embed] ",e.content===""&&(s="sent message embed(s)")),e.sticker_items&&(s+=" [sticker] ",e.content===""&&(s="sent a sticker")),e.attachments.filter(d=>typeof d?.content_type=="string"&&d?.content_type.startsWith("image")).forEach(d=>{s+=` [image: ${d.filename}] `}),e.attachments.filter(d=>d&&!d.content_type?.startsWith("image")).forEach(d=>{s+=` [attachment: ${d.filename}] `}),e.mentions.length>0&&(s=s.replace(/<@!?(\d{17,20})>/g,(d,h)=>`@${E.getUser(h)?.username||"unknown-user"}`)),e.mention_roles.length>0)for(let d of e.mention_roles){let h=ae.getRole(o.guild_id,d);if(!h)continue;let v=h.colorString??`#${r}`;s=s.replace(`<@&${d}>`,`@${h.name}`)}let u=s.match(new RegExp("()","g")),p=s.match(new RegExp("<(#\\d+)>","g"));if(u)for(let d of u)s=s.replace(new RegExp(`${d}`,"g"),`:${d.split(":")[1]}:`);if(p)for(let d of p){let h=d.split("<#")[1];h=h.substring(0,h.length-1),s=s.replace(new RegExp(`${d}`,"g"),`#${ee.getChannel(h).name}`)}U3(l,s,e)}catch(o){F3.error(`Failed to catch MESSAGE_CREATE: ${o}`)}}}})});var ze,Kr=g(()=>{a();E1();O1();_1();B1();F1();U1();$1();G1();H1();z1();j1();W1();hd();A0();C0();R0();k0();L0();E0();Md();G0();H0();z0();W0();q0();Y0();Z0();eS();oS();nS();aS();hS();yS();vS();SS();xS();RS();NS();eb();tb();ib();ab();lb();Lb();Fb();Ub();Hb();zb();jb();Wb();qb();Kb();Zb();Qb();Vb();nT();sT();aT();pT();ef();hc();xT();IT();CT();vf();ET();FT();WT();KT();YT();ZT();JT();QT();VT();ew();tw();ow();nw();iw();sw();aw();lw();cw();uw();pw();dw();mw();fw();gw();hw();yw();vw();ww();xw();xa();_w();Uw();Aa();l2();p2();f2();R2();k2();G2();H2();z2();ox();rx();ix();lx();Dx();Lx();Ox();_x();$x();Wx();Vx();OM();_M();HM();Kh();ZM();XM();JM();QM();eI();lI();cI();uI();mI();fI();TI();wI();xI();kI();DI();xy();LI();EI();_I();GI();jI();qI();KI();ZI();JI();QI();nP();pP();fP();gP();yP();vP();xP();ze={[Ju.name]:Ju,[Qu.name]:Qu,[Vu.name]:Vu,[ep.name]:ep,[tp.name]:tp,[op.name]:op,[np.name]:np,[rp.name]:rp,[ip.name]:ip,[sp.name]:sp,[ap.name]:ap,[lp.name]:lp,[na.name]:na,[yd.name]:yd,[vd.name]:vd,[bd.name]:bd,[Td.name]:Td,[wd.name]:wd,[xd.name]:xd,[Ad.name]:Ad,[Cd.name]:Cd,[Rd.name]:Rd,[kd.name]:kd,[Nd.name]:Nd,[Dd.name]:Dd,[Ld.name]:Ld,[Ed.name]:Ed,[Od.name]:Od,[_d.name]:_d,[Bd.name]:Bd,[Wd.name]:Wd,[qd.name]:qd,[Yd.name]:Yd,[Zd.name]:Zd,[Xd.name]:Xd,[em.name]:em,[om.name]:om,[nm.name]:nm,[vm.name]:vm,[Sm.name]:Sm,[Tm.name]:Tm,[xm.name]:xm,[Mm.name]:Mm,[Dm.name]:Dm,[Lm.name]:Lm,[Em.name]:Em,[Om.name]:Om,[_m.name]:_m,[Bm.name]:Bm,[Fm.name]:Fm,[Um.name]:Um,[$m.name]:$m,[Gm.name]:Gm,[zm.name]:zm,[jm.name]:jm,[Wm.name]:Wm,[Km.name]:Km,[Ym.name]:Ym,[Xm.name]:Xm,[of.name]:of,[cf.name]:cf,[uf.name]:uf,[mf.name]:mf,[ff.name]:ff,[bf.name]:bf,[wf.name]:wf,[Af.name]:Af,[kf.name]:kf,[Nf.name]:Nf,[Df.name]:Df,[Lf.name]:Lf,[Of.name]:Of,[Ff.name]:Ff,[Uf.name]:Uf,[$f.name]:$f,[Gf.name]:Gf,[Hf.name]:Hf,[zf.name]:zf,[qf.name]:qf,[Kf.name]:Kf,[Yf.name]:Yf,[Zf.name]:Zf,[Xf.name]:Xf,[Jf.name]:Jf,[Qf.name]:Qf,[Vf.name]:Vf,[eg.name]:eg,[tg.name]:tg,[og.name]:og,[ng.name]:ng,[rg.name]:rg,[sg.name]:sg,[ag.name]:ag,[cg.name]:cg,[gg.name]:gg,[hg.name]:hg,[yg.name]:yg,[Pg.name]:Pg,[Ag.name]:Ag,[Fg.name]:Fg,[Gg.name]:Gg,[Wg.name]:Wg,[qg.name]:qg,[Kg.name]:Kg,[Zg.name]:Zg,[Qg.name]:Qg,[ah.name]:ah,[ch.name]:ch,[uh.name]:uh,[ph.name]:ph,[vh.name]:vh,[Sh.name]:Sh,[bh.name]:bh,[Th.name]:Th,[wh.name]:wh,[Ih.name]:Ih,[Ph.name]:Ph,[jh.name]:jh,[Wh.name]:Wh,[qh.name]:qh,[Yh.name]:Yh,[Zh.name]:Zh,[Xh.name]:Xh,[Vh.name]:Vh,[ey.name]:ey,[ty.name]:ty,[ry.name]:ry,[sy.name]:sy,[cy.name]:cy,[uy.name]:uy,[py.name]:py,[my.name]:my,[fy.name]:fy,[gy.name]:gy,[by.name]:by,[My.name]:My,[wy.name]:wy,[Iy.name]:Iy,[Ay.name]:Ay,[Cy.name]:Cy,[ky.name]:ky,[Ny.name]:Ny,[Dy.name]:Dy,[Ey.name]:Ey,[_y.name]:_y,[By.name]:By,[Uy.name]:Uy,[Hy.name]:Hy,[Wy.name]:Wy,[qy.name]:qy,[Yy.name]:Yy,[Xy.name]:Xy,[Jy.name]:Jy,[Qy.name]:Qy}});var e1={};qe(e1,{BadgePosition:()=>ml,_getBadges:()=>H3,addBadge:()=>Ug,removeBadge:()=>$g});function Ug(e){e.component&&=_.wrap(e.component,{noop:!0}),Vy.add(e)}function $g(e){return Vy.delete(e)}function H3(e){let t=[];for(let r of Vy)(!r.shouldShow||r.shouldShow(e))&&(r.position===0?t.unshift({...r,...e}):t.push({...r,...e}));let o=ze.BadgeAPI.getDonorBadges(e.user.id);return o&&t.unshift(...o),t}var ml,Vy,fl=g(()=>{"use strict";a();le();Kr();ml=(o=>(o[o.START=0]="START",o[o.END=1]="END",o))(ml||{}),Vy=new Set});var t1={};qe(t1,{Badges:()=>K3,ChatButtons:()=>t4,Commands:()=>j3,ContextMenu:()=>e4,DataStore:()=>yt,MemberListDecorators:()=>X3,MessageAccessories:()=>W3,MessageDecorations:()=>Z3,MessageEvents:()=>z3,MessagePopover:()=>q3,Notices:()=>Yc,Notifications:()=>V3,ServerList:()=>Y3,Settings:()=>J3,Styles:()=>Q3});var z3,Yc,j3,yt,W3,q3,K3,Y3,Z3,X3,J3,Q3,V3,e4,t4,ei=g(()=>{"use strict";a();fl();En();uo();Eo();Xo();Ng();Tc();Og();gn();li();Nl();er();qc();$();Qe();z3=jd,Yc=$p,j3=Yp,yt=mn,W3=Mf,q3=qm,K3=e1,Y3=Jg,Z3=Eg,X3=kg,J3=Dp,Q3=gp,V3=yp,e4=cd,t4=sf});var s4={};qe(s4,{Api:()=>t1,PlainSettings:()=>Pn,Plugins:()=>md,QuickCss:()=>i1,Settings:()=>G,Updater:()=>Ep,Util:()=>o1,Webpack:()=>s1});a();ei();jl();var o1={};qe(o1,{ChangeList:()=>Vs,Devs:()=>m,DevsById:()=>Mi,ImageModal:()=>Zu,LazyComponent:()=>bt,Logger:()=>oe,Margins:()=>j,ModalCloseButton:()=>pt,ModalContent:()=>ke,ModalFooter:()=>ct,ModalHeader:()=>Le,ModalRoot:()=>ye,ModalSize:()=>ko,Modals:()=>Yo,NoopComponent:()=>YP,Queue:()=>vo,REACT_GLOBAL:()=>WP,SUPPORT_CHANNEL_ID:()=>ul,Theme:()=>Bl,WEBPACK_CHUNK:()=>pn,canonicalizeDescriptor:()=>Ru,canonicalizeMatch:()=>bn,canonicalizeReplace:()=>Za,canonicalizeReplacement:()=>ys,checkIntersecting:()=>ju,classes:()=>Q,closeAllModals:()=>dn,closeModal:()=>xn,copyWithToast:()=>Ao,debounce:()=>lo,fetchUserProfile:()=>Qp,formatDuration:()=>Ws,getCurrentChannel:()=>Bi,getCurrentGuild:()=>Js,getTheme:()=>Fi,getUniqueUsername:()=>Nn,humanFriendlyJoin:()=>YA,identity:()=>Rs,insertTextIntoChatInputBox:()=>kn,isMobile:()=>KP,isNonNullish:()=>tm,isObject:()=>qP,isObjectEmpty:()=>Cs,isPluginDev:()=>ks,isTruthy:()=>Yl,localStorage:()=>jr,makeCodeblock:()=>qs,makeLazy:()=>Jn,mergeDefaults:()=>Ii,onceDefined:()=>o4,onlyOnce:()=>Op,openImageModal:()=>tn,openInviteModal:()=>Qr,openModal:()=>de,openModalLazy:()=>Hr,openPrivateChannel:()=>eC,openUserProfile:()=>bo,parseUrl:()=>zu,proxyLazy:()=>Ot,sendMessage:()=>tC,sleep:()=>Ko,useAwaiter:()=>st,useForceUpdater:()=>Co,useIntersection:()=>Wu,useTimer:()=>Ns,wordsFromCamel:()=>Hp,wordsFromKebab:()=>GA,wordsFromPascal:()=>zp,wordsFromSnake:()=>$A,wordsFromTitle:()=>HA,wordsToCamel:()=>zA,wordsToKebab:()=>WA,wordsToPascal:()=>qA,wordsToSnake:()=>jA,wordsToTitle:()=>An});a();zr();a();function o4(e,t,o){let r=t;if(t in e)return void o(e[r]);Object.defineProperty(e,t,{set(i){delete e[r],e[r]=i,o(i)},configurable:!0,enumerable:!1})}id();P();mt();Zl();Uo();hl();Ke();ot();we();Ze();_p();hi();Wr();lt();Cn();var i1={};qe(i1,{toggle:()=>n1});a();$();var gs,MP;function r1(e){let t=document.createElement("style");return t.id=e,document.documentElement.append(t),t}async function n4(){let e=await VencordNative.themes.getSystemValues(),t=Object.entries(e).filter(([,o])=>o!=="#").map(([o,r])=>`--${o}: ${r};`).join("");r1("vencord-os-theme-values").textContent=`:root{${t}}`}async function n1(e){gs?gs.disabled=!e:e&&(gs=r1("vencord-custom-css"),VencordNative.quickCss.addChangeListener(t=>{gs.textContent=t,gs.disabled=!G.useQuickCss}),gs.textContent=await VencordNative.quickCss.get())}async function Au(){MP??=r1("vencord-themes");let{themeLinks:e,enabledThemes:t}=G,o=[...e];{let r=t.map(i=>`vencord:///themes/${i}?v=${Date.now()}`);o.push(...r)}MP.textContent=o.map(r=>`@import url("${r.trim()}");`).join(` `)}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 (was already existent, likely from cache!)`),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;dl.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(`Patch by ${h.plugin} had no effect (Module id is ${i}): ${w.match}`),h.group){Fo.warn(`Undoing patch group ${h.find} by ${h.plugin} because replacement ${w.match} had no effect`),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(`Undoing patch group ${h.find} by ${h.plugin} because replacement ${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);})(); //# sourceURL=VencordDesktopRenderer //# sourceMappingURL=vencord://vencordDesktopRenderer.js.map /*! For license information please see vencordDesktopRenderer.js.LEGAL.txt */