discord-awesomeaudio/assets/vencord/vencord.js

37 lines
60 KiB
JavaScript

"use strict";var Vencord=(()=>{var Do=Object.create;var Fe=Object.defineProperty;var No=Object.getOwnPropertyDescriptor;var Fo=Object.getOwnPropertyNames;var Lo=Object.getPrototypeOf,Uo=Object.prototype.hasOwnProperty;var Oo=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof require!="undefined"?require:t)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var l=(e,t)=>()=>(e&&(t=e(e=0)),t);var k=(e,t)=>{for(var n in t)Fe(e,n,{get:t[n],enumerable:!0})},Kn=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Fo(t))!Uo.call(e,o)&&o!==n&&Fe(e,o,{get:()=>t[o],enumerable:!(r=No(t,o))||r.enumerable});return e};var $o=(e,t,n)=>(n=e!=null?Do(Lo(e)):{},Kn(t||!e||!e.__esModule?Fe(n,"default",{value:e,enumerable:!0}):n,e)),Vo=e=>Kn(Fe({},"__esModule",{value:!0}),e);function s(e){return e}var m=l(()=>{"use strict"});var Ze={};k(Ze,{Devs:()=>a,REACT_GLOBAL:()=>Go,WEBPACK_CHUNK:()=>z});var z,Go,a,u=l(()=>{"use strict";z="webpackChunkdiscord_app",Go="Vencord.Webpack.Common.React",a=Object.freeze({Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},obscurity:{name:"obscurity",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Animal:{name:"Animal",id:118437263754395652n},MaiKokain:{name:"Mai",id:722647978577363026n}})});var et,Qn=l(()=>{"use strict";m();u();et=s({name:"STFU",description:"Disables the 'HOLD UP' banner in the console",authors:[a.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(.{0,10}\|\|"0.0.0"!==.{0,2}\.remoteApp\.getVersion\(\)\)/,replace:"if(false)"}}]})});var tt,Yn=l(()=>{"use strict";m();u();tt=s({name:"CommandsAPI",authors:[a.Arjix],description:"Api required by anything that uses commands",patches:[{find:'"giphy","tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,30}giphy)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(.{1,2})\.execute\((.{1,2}),(.{1,2})\)]/,replace:(e,t,n,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${n}, ${r})]`}}]})});var nt,Jn=l(()=>{"use strict";u();m();nt=s({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[a.Arjix],patches:[{find:"sendMessage:function",replacement:[{match:/(?<=_sendMessage:function\([^)]+\)){/,replace:"{Vencord.Api.MessageEvents._handlePreSend(...arguments);"},{match:/(?<=\beditMessage:function\([^)]+\)){/,replace:"{Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}]},{find:"if(e.altKey){",replacement:{match:/var \w=(\w)\.id,\w=(\w)\.id;return .{1,2}\.useCallback\(\(?function\((.{1,2})\){/,replace:(e,t,n,r)=>`var _msg=${t},_chan=${n};${e}Vencord.Api.MessageEvents._handleClick(_msg, _chan, ${r});`}}]})});var rt,Xn=l(()=>{"use strict";u();m();rt=s({name:"ApiNotices",description:"Fixes notices being automatically dismissed",authors:[a.Ven],required:!0,patches:[{find:"updateNotice:",replacement:[{match:/;(.{1,2}=null;)(?=.{0,50}updateNotice)/g,replace:";if(Vencord.Api.Notices.currentNotice)return !1;$1"},{match:/(?<=NOTICE_DISMISS:function.+?){(?=if\(null==(.+?)\))/,replace:'{if($1?.id=="VencordNotice")return ($1=null,Vencord.Api.Notices.nextNotice(),true);'}]}]})});var ot,Zn=l(()=>{"use strict";m();u();ot=s({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[{name:"Xinto",id:423915768191647755n},a.Glitch],patches:[{find:"BAN_CONFIRM_TITLE.",replacement:{match:/src:\w\(\d+\)/g,replace:'src: "https://i.imgur.com/wp5q52C.mp4"'}}]})});var it,er=l(()=>{"use strict";u();m();it=s({name:"BetterGifAltText",authors:[a.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:"onCloseImage=",replacement:{match:/(return .{1,2}\.createElement.{0,50}isWindowFocused)/,replace:"Vencord.Plugins.plugins.BetterGifAltText.altify(e);$1"}},{find:'preload:"none","aria',replacement:{match:/\?.{0,5}\.Messages\.GIF/,replace:"?(e.alt='GIF',Vencord.Plugins.plugins.BetterGifAltText.altify(e))"}}],altify(e){if(e.alt!=="GIF")return e.alt;let t=e.original||e.src;try{t=decodeURI(t)}catch{}let n=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return n.length>300&&(n=n.slice(0,300)+"..."),n&&(e.alt+=` - ${n}`),e.alt}})});var st,tr=l(()=>{"use strict";m();u();st=s({name:"BetterUploadButton",authors:[a.obscurity],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:([^,]+),onClick:([^,]+)}}/,replace:"CHAT_ATTACH_UPLOAD_OR_INVITE,onClick:$1,onContextMenu:$2}}"}}]})});var nr,rr=l(()=>{"use strict";nr=["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","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@youtube.com","kw@youtube.com","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com"]});var A,Z=l(()=>{"use strict";A=class{constructor(t,n){this.name=t;this.color=n}_log(t,n,r){console[t](`%c Vencord %c %c ${this.name} `,`background: ${n}; 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)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var ut={};k(ut,{_handleClick:()=>zo,_handlePreEdit:()=>Wo,_handlePreSend:()=>jo,addClickListener:()=>pt,addPreEditListener:()=>ee,addPreSendListener:()=>O,removeClickListener:()=>mt,removePreEditListener:()=>te,removePreSendListener:()=>$});function jo(e,t,n){for(let r of ct)try{r(e,t,n)}catch(o){at.error(`MessageSendHandler: Listener encoutered an unknown error. (${o})`)}}function Wo(e,t,n){for(let r of lt)try{r(e,t,n)}catch(o){at.error(`MessageEditHandler: Listener encoutered an unknown error. (${o})`)}}function O(e){return ct.add(e),e}function ee(e){return lt.add(e),e}function $(e){return ct.delete(e)}function te(e){return lt.delete(e)}function zo(e,t,n){for(let r of dt)try{r(e,t,n)}catch(o){at.error(`MessageClickHandler: Listener encoutered an unknown error. (${o})`)}}function pt(e){return dt.add(e),e}function mt(e){return dt.delete(e)}var at,ct,lt,dt,Y=l(()=>{"use strict";Z();at=new A("MessageEvents","#e5c890"),ct=new Set,lt=new Set;dt=new Set});var or,Ho,ft,ir=l(()=>{"use strict";rr();Y();m();or=/[\\^$.*+?()[\]{}|]/g,Ho=RegExp(or.source),ft=s({name:"clearURLs",description:"Removes tracking garbage from URLs",authors:[{name:"adryd",id:0n}],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&Ho.test(e)?e.replace(or,"\\$&"):e||""},createRules(){let e=nr;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let n=t.split("@"),r=new RegExp("^"+this.escapeRegExp(n[0]).replace(/\\\*/,".+?")+"$");if(!n[1]){this.universalRules.add(r);continue}let o=new RegExp("^(www\\.)?"+this.escapeRegExp(n[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),i=o.toString();this.hostRules.set(i,o),this.rulesByHost.get(i)==null&&this.rulesByHost.set(i,new Set),this.rulesByHost.get(i).add(r)}},removeParam(e,t,n){(t===e||e instanceof RegExp&&e.test(t))&&n.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(n=>{t.searchParams.forEach((r,o,i)=>{this.removeParam(n,o,i)})}),this.hostRules.forEach((n,r)=>{!n.test(t.hostname)||this.rulesByHost.get(r).forEach(o=>{t.searchParams.forEach((i,d,c)=>{this.removeParam(o,d,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=O((e,t)=>this.onSend(t)),this.preEdit=ee((e,t,n)=>this.onSend(n))},stop(){$(this.preSend),te(this.preEdit)}})});var gt={};k(gt,{Common:()=>xt,_initWebpack:()=>Et,_resolveReady:()=>Ue,addListener:()=>Qo,cache:()=>ne,extract:()=>Xo,filters:()=>y,find:()=>B,findAll:()=>ar,findAllByProps:()=>Ko,findByDisplayName:()=>qo,findByProps:()=>re,listeners:()=>yt,mapMangledModule:()=>cr,mapMangledModuleLazy:()=>bt,onceReady:()=>ht,removeListener:()=>Yo,search:()=>Jo,subscriptions:()=>sr,waitFor:()=>b,wreq:()=>J});var F=l(()=>{"use strict";Oe();v()});function H(e){let t;return()=>t??(t=e())}function R(e){return Se(()=>B(e))}function _e(e,t=null){let[n,r]=x.useState({value:t,error:null,pending:!0});return x.useEffect(()=>{let o=!0;return e().then(i=>o&&r({value:i,error:null,pending:!1})).catch(i=>o&&r({value:null,error:i,pending:!1})),()=>void(o=!1)},[]),[n.value,n.error,n.pending]}function ei(e){return t=>{let n=x.useMemo(e,[]);return Vencord.Webpack.Common.React.createElement(n,{...t})}}function oe(e,t){for(let n in t){let r=t[n];typeof r=="object"&&!Array.isArray(r)?(e[n]??={},oe(e[n],r)):e[n]??=r}return e}function _t(e,t=n=>n){let{length:n}=e;if(n===0)return"";if(n===1)return t(e[0]);let r="";for(let o=0;o<n;o++)r+=t(e[o]),n-o>2?r+=", ":n-o>1&&(r+=" and ");return r}function de(...e){return e.join(" ")}function St(e){return new Promise(t=>setTimeout(t,e))}function ti(e,t,n){return t.constructor.name==="AsyncFunction"?async function(){try{await t.apply(n??this,arguments)}catch(r){console.error(`Caught an Error in ${e||"anonymous"}
`,r)}}:function(){try{t.apply(n??this,arguments)}catch(r){console.error(`Caught an Error in ${e||"anonymous"}
`,r)}}}function Ct(e,t){let n="```";return`${n}${t||""}
${e}
${n}`}var Zo,N=l(()=>{"use strict";F();v();$e();Zo=H});function Se(e){let t=H(e);return new Proxy(ni,{get:(n,r)=>t()[r],set:(n,r,o)=>t()[r]=o,has:(n,r)=>r in t(),apply:(n,r,o)=>t().apply(r,o),ownKeys:()=>Reflect.ownKeys(t()),construct:(n,r)=>Reflect.construct(t(),r),deleteProperty:(n,r)=>delete t()[r],defineProperty:(n,r,o)=>!!Object.defineProperty(t(),r,o),getPrototypeOf:()=>Object.getPrototypeOf(t())})}var ni,$e=l(()=>{"use strict";N();ni=function(){}});function Et(e){if(ne!==void 0)throw"no.";J=e.push([[Symbol()],{},t=>t]),ne=J.c,e.pop()}function B(e,t=!0){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);for(let n in ne){let r=ne[n];if(!!r?.exports){if(e(r.exports))return r.exports;if(typeof r.exports=="object"){if(r.exports.default&&e(r.exports.default))return t?r.exports.default:r.exports;for(let o in r.exports)if(o.length<=3){let i=r.exports[o];if(i&&e(i))return i}}}}return null}function ar(e,t=!0){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let n=[];for(let r in ne){let o=ne[r];if(!!o?.exports){if(e(o.exports))n.push(o.exports);else if(typeof o.exports!="object")continue;if(o.exports.default&&e(o.exports.default))n.push(t?o.exports.default:o.exports);else for(let i in o.exports)if(i.length<=3){let d=o.exports[i];d&&e(d)&&n.push(d)}}}return n}function cr(e,t){let n={};for(let r in J.m)if(J.m[r].toString().includes(e)){let i=J(r);e:for(let d in i){let c=i[d];for(let f in t)if(t[f](c)){n[f]=c;continue e}}break}return n}function bt(e,t){return Se(()=>cr(e,t))}function re(...e){return B(y.byProps(e))}function Ko(...e){return ar(y.byProps(e))}function qo(e){return B(y.byDisplayName(e))}function b(e,t){if(typeof e=="string")e=y.byProps([e]);else if(Array.isArray(e))e=y.byProps(e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);let n=B(e);if(n)return void t(n);sr.set(e,t)}function Qo(e){yt.add(e)}function Yo(e){yt.delete(e)}function Jo(...e){let t={},n=J.m;e:for(let r in n){let o=n[r].original??n[r],i=o.toString();for(let d of e)if(typeof d=="string"&&!i.includes(d)||d instanceof RegExp&&!d.test(i))continue e;t[r]=o}return t}function Xo(e){let t=J.m[e];if(!t)return null;let n=`
// [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!!
${t.toString()}
//# sourceURL=ExtractedWebpackModule${e}
`;return(0,eval)(n)}var Ue,ht,J,ne,y,sr,yt,Oe=l(()=>{"use strict";$e();ht=new Promise(e=>Ue=e),y={byProps:e=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(n=>t[n]!==void 0),byDisplayName:e=>t=>t.default?.displayName===e,byCode:(...e)=>t=>{if(typeof t!="function")return!1;let n=Function.prototype.toString.call(t);for(let r of e)if(!n.includes(r))return!1;return!0}},sr=new Map,yt=new Set});var xt={};k(xt,{Alerts:()=>se,Button:()=>D,Card:()=>me,ChannelStore:()=>pe,FluxDispatcher:()=>C,Forms:()=>_,GuildStore:()=>Ve,Margins:()=>U,Parser:()=>ue,React:()=>x,Router:()=>Be,SelectedChannelStore:()=>V,Switch:()=>ie,Toasts:()=>w,Tooltip:()=>lr,UserStore:()=>K});var U,C,x,Ve,K,V,pe,_,me,D,ie,lr,Be,ue,se,ri,oi,w,v=l(()=>{"use strict";Oe();N();U=R(y.byProps(["marginTop20"])),_={},ri={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},oi={TOP:0,BOTTOM:1},w={Type:ri,Position:oi,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};b("useState",e=>x=e);b(["dispatch","subscribe"],e=>{C=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Ue()};e.subscribe("CONNECTION_OPEN",t)});b(["getCurrentUser","initialize"],e=>K=e);b("getSortedPrivateChannels",e=>pe=e);b("getCurrentlySelectedChannelId",e=>V=e);b("getGuildCount",e=>Ve=e);b(["Hovers","Looks","Sizes"],e=>D=e);b(y.byCode("helpdeskArticleId"),e=>ie=e);b(["Positions","Colors"],e=>lr=e);b(e=>e.Types?.PRIMARY==="cardPrimary",e=>me=e);b(e=>e.Tags&&y.byCode("errorSeparator")(e),e=>_.FormTitle=e);b(e=>e.Tags&&y.byCode("titleClassName","sectionTitle")(e),e=>_.FormSection=e);b(e=>e.Types?.INPUT_PLACEHOLDER,e=>_.FormText=e);b(e=>{if(typeof e!="function")return!1;let t=e.toString();return t.length<200&&t.includes("divider")},e=>_.FormDivider=e);b(y.byCode("currentToast?"),e=>w.show=e);b(y.byCode("currentToast:null"),e=>w.pop=e);b(["show","close"],e=>se=e);b("parseTopic",e=>ue=e);b(["open","saveAccountChanges"],e=>Be=e)});var wt,dr=l(()=>{"use strict";u();m();v();wt=s({name:"ClickableRoleDot",authors:[a.Ven],description:"Makes RoleDots (Accessibility Feature) copy colour to clipboard on click",patches:[{find:"M0 4C0 1.79086 1.79086 0 4 0H16C18.2091 0 20 1.79086 20 4V16C20 18.2091 18.2091 20 16 20H4C1.79086 20 0 18.2091 0 16V4Z",replacement:{match:/(viewBox:"0 0 20 20")/,replace:"$1,onClick:()=>Vencord.Plugins.plugins.ClickableRoleDot.copyToClipBoard(e.color)"}}],copyToClipBoard(e){window.DiscordNative.clipboard.copy(e),w.show({message:"Copied to Clipboard!",type:w.Type.SUCCESS,id:w.genId(),options:{duration:1e3,position:w.Position.BOTTOM}})}})});var Pt,Tt,pr=l(()=>{"use strict";u();m();Pt=e=>()=>{throw new Error(`'${e}' is Discord Desktop only.`)},Tt=s({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[a.Ven],getShortcuts(){return{toClip:IS_WEB?Pt("toClip"):window.DiscordNative.clipboard.copy,fromClip:IS_WEB?Pt("fromClip"):window.DiscordNative.clipboard.read,wp:Vencord.Webpack,wpc:Vencord.Webpack.wreq.c,wreq:Vencord.Webpack.wreq,wpsearch:Vencord.Webpack.search,wpex:Vencord.Webpack.extract,findByProps:Vencord.Webpack.findByProps,find:Vencord.Webpack.find,Plugins:Vencord.Plugins,React:Vencord.Webpack.Common.React,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:IS_WEB?Pt("restart"):window.DiscordNative.app.relaunch}},start(){let e=this.getShortcuts();window.shortcutList=e;for(let[t,n]of Object.entries(e))window[t]=n},stop(){delete window.shortcutList;for(let e in this.getShortcuts())delete window[e]}})});var vt,mr=l(()=>{"use strict";m();vt=s({name:"discord-screenaudio",authors:[{name:"maltejur",id:205966226709676032n}],required:!0,description:"UI patches for discord-screenaudio.",patches:[]})});var Rt,ur=l(()=>{"use strict";u();m();Rt=s({name:"Experiments",authors:[a.Ven,a.Megu],description:"Enable Experiments",patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+,get:function\(\)\{return )\w/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/(\w)\|\|"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}}]})});function Mt(){return`-${fr.fromTimestamp(Date.now())}`}function Ce(e,t){let n=ii({channelId:e,content:"",embeds:[]});return si.receiveMessage(e,oe(t,n)),t}function G(e,t,n){return e.find(r=>r.name===t)?.value||n}var ii,si,fr,It=l(()=>{"use strict";F();N();ii=R(y.byCode('username:"Clyde"')),si=R(y.byProps(["receiveMessage"]));b("fromTimestamp",e=>fr=e)});var Ge,we,kt,At=l(()=>{"use strict";Ge=(p=>(p[p.SUB_COMMAND=1]="SUB_COMMAND",p[p.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",p[p.STRING=3]="STRING",p[p.INTEGER=4]="INTEGER",p[p.BOOLEAN=5]="BOOLEAN",p[p.USER=6]="USER",p[p.CHANNEL=7]="CHANNEL",p[p.ROLE=8]="ROLE",p[p.MENTIONABLE=9]="MENTIONABLE",p[p.NUMBER=10]="NUMBER",p[p.ATTACHMENT=11]="ATTACHMENT",p))(Ge||{}),we=(i=>(i[i.BUILT_IN=0]="BUILT_IN",i[i.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",i[i.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",i[i.BOT=3]="BOT",i[i.PLACEHOLDER=4]="PLACEHOLDER",i))(we||{}),kt=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(kt||{})});var Lt={};k(Lt,{ApplicationCommandInputType:()=>we,ApplicationCommandOptionType:()=>Ge,ApplicationCommandType:()=>kt,BUILT_IN:()=>fe,OptionalMessageOption:()=>ge,RequiredMessageOption:()=>Pe,_handleCommand:()=>ci,_init:()=>ai,commands:()=>Dt,findOption:()=>G,generateId:()=>Mt,registerCommand:()=>Nt,sendBotMessage:()=>Ce,unregisterCommand:()=>Ft});function yr(e){e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,n,r)=>{t===gr?r[n]=ge:t===hr&&(r[n]=Pe),t.choices?.forEach(o=>o.displayName||=o.name),yr(r[n])})}function Nt(e,t){if(fe.some(n=>n.name===e.name))throw new Error(`Command '${e.name}' already exists.`);e.isVencordCommand=!0,e.id??=Mt(),e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,yr(e),Dt[e.name]=e,fe.push(e)}function Ft(e){let t=fe.findIndex(n=>n.name===e);return t===-1?!1:(fe.splice(t,1),delete Dt[e],!0)}var fe,Dt,gr,hr,ge,Pe,ai,ci,ae=l(()=>{"use strict";N();It();At();At();It();Dt={},gr=Symbol("OptionalMessageOption"),hr=Symbol("RequiredMessageOption"),ge=gr,Pe=hr,ai=function(e){try{fe=e,ge=e.find(t=>t.name==="shrug").options[0],Pe=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},ci=function(e,t,n){if(!e.isVencordCommand)return e.execute(t,n);let r=o=>{let i=`An Error occurred while executing command "${e.name}"`,d=o instanceof Error?o.stack||o.message:String(o);console.error(i,o),Ce(n.channel.id,{content:`${i}:
${Ct(d)}`,author:{username:"Vencord"}})};try{let o=e.execute(t,n);return o instanceof Promise?o.catch(r):o}catch(o){return r(o)}}});var Er,Ut,br=l(()=>{"use strict";ae();u();m();Er={fart:new Audio("https://raw.githubusercontent.com/ItzOnlyAnimal/AliuPlugins/main/fart.mp3")},Ut=s({name:"Fart2",authors:[a.Animal],description:"Enable farting v2, a slash command that allows you to perform or request that someone perform a little toot.",dependencies:["CommandsAPI"],commands:[{name:"fart",description:"A simple command in which you may either request that a user do a little toot for you, or conduct one yourself.",options:[{type:6,name:"user",description:"A Discord\u2122 user of which you would humbly request a toot from.",required:!1}],execute(e){return Er.fart.volume=.3,Er.fart.play(),{content:e[0]?`<@${e[0].value}> fart`:"fart"}}}]})});var li,Ot,xr=l(()=>{"use strict";m();Y();u();li=/https?:\/\/twitter\.com(?=\/\w+?\/status\/)/g,Ot=s({name:"FxTwitter",description:"Uses FxTwitter to improve embeds from twitter on send",authors:[a.Samu],dependencies:["MessageEventsAPI"],addPrefix(e){e.content=e.content.replace(li,"https://fxtwitter.com")},start(){this.preSend=O((e,t)=>this.addPrefix(t))},stop(){$(this.preSend)}})});var $t,_r=l(()=>{"use strict";u();m();$t=s({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[a.botato,a.Animal],patches:[{find:"),{hasFlag:",replacement:{match:/(if\((.{1,2})<=1<<30\)return)/,replace:"if($2===(1<<20)){return false};$1"}}]})});var Vt,Sr=l(()=>{"use strict";u();m();Vt=s({name:"Ify",description:"Disables Spotify auto-pausing and Premium checks, allowing you to listen along with others.",authors:[a.Cyn],patches:[{find:'.displayName="SpotifyStore"',replacement:[{match:/\.isPremium=.;/,replace:".isPremium=true;"},{match:/function (.{1,2})\(\).{0,200}SPOTIFY_AUTO_PAUSED\);.{0,}}}}/,replace:"function $1(){}"}]}]})});function Mr(e,t){let n=e.findIndex(r=>r.id===t);return n===-1?n:e.length-n-1}function Pr({channelId:e,messageId:t,_isQuickEdit:n}){if(n)return;let r=K.getCurrentUser().id,o=Bt.getMessages(e)._array.filter(i=>i.author.id===r);We=Mr(o,t)}function Tr({message:e,_isQuickReply:t}){t||(je=Mr(Bt.getMessages(e.channel_id)._array,e.id))}function vr(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!di(e)||pi(e)||(e.shiftKey?ui(t):mi(t))}function Ir(e,t){let n=Bt.getMessages(V.getChannelId())._array;if(!t){let i=K.getCurrentUser().id;n=n.filter(d=>d.author.id===i)}let r=i=>e?Math.min(n.length-1,i+1):Math.max(-1,i-1),o;return t?je=o=r(je):We=o=r(We),o===-1?void 0:n[n.length-o-1]}function mi(e){let t=Ir(e,!0);if(!t)return void C.dispatch({type:"DELETE_PENDING_REPLY",channelId:V.getChannelId()});let n=pe.getChannel(t.channel_id);C.dispatch({type:"CREATE_PENDING_REPLY",channel:n,message:t,shouldMention:!0,showMentionToggle:n.guild_id!==null,_isQuickReply:!0})}function ui(e){let t=Ir(e,!1);t?C.dispatch({type:"MESSAGE_START_EDIT",channelId:t.channel_id,messageId:t.id,content:t.content,_isQuickEdit:!0}):C.dispatch({type:"MESSAGE_END_EDIT",channelId:V.getChannelId()})}var Bt,Rr,je,We,Gt,Cr,wr,di,pi,kr=l(()=>{"use strict";m();u();v();F();N();Bt=R(y.byProps(["getRawMessages"])),Rr=navigator.platform.includes("Mac"),je=-1,We=-1,Gt=s({name:"InteractionKeybinds",authors:[a.obscurity,a.Ven],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",start(){C.subscribe("DELETE_PENDING_REPLY",Cr),C.subscribe("MESSAGE_END_EDIT",wr),C.subscribe("MESSAGE_START_EDIT",Pr),C.subscribe("CREATE_PENDING_REPLY",Tr),document.addEventListener("keydown",vr)},stop(){C.unsubscribe("DELETE_PENDING_REPLY",Cr),C.unsubscribe("MESSAGE_END_EDIT",wr),C.unsubscribe("MESSAGE_START_EDIT",Pr),C.unsubscribe("CREATE_PENDING_REPLY",Tr),document.removeEventListener("keydown",vr)}}),Cr=()=>je=-1,wr=()=>We=-1;di=e=>Rr?e.metaKey:e.ctrlKey,pi=e=>e.altKey||!Rr&&e.metaKey});var jt,Ar=l(()=>{"use strict";u();m();jt=s({name:"isStaff",description:"Gives access to client devtools & other things locked behind isStaff",authors:[a.Megu,{name:"Nickyux",id:427146305651998721n},{name:"BanTheNons",id:460478012794863637n}],patches:[{find:".isStaff=function(){",replacement:[{match:/return\s*(\w+)\.hasFlag\((.+?)\.STAFF\)}/,replace:"return Vencord.Webpack.Common.UserStore.getCurrentUser().id===$1.id||$1.hasFlag($2.STAFF)}"},{match:/hasFreePremium=function\(\){return this.isStaff\(\)\s*\|\|/,replace:"hasFreePremium=function(){return "}]}]})});var Wt,Dr,Nr,zt,Fr=l(()=>{"use strict";Y();u();m();F();v();Wt=!1,Dr=e=>e.key==="Backspace"&&(Wt=!0),Nr=e=>e.key==="Backspace"&&(Wt=!1),zt=s({name:"MessageQuickActions",description:"Quick Delete, Quick edit",authors:[a.Ven],dependencies:["MessageEventsAPI"],start(){let{deleteMessage:e,startEditMessage:t}=re("deleteMessage"),{can:n}=re("can","initialize"),{MANAGE_MESSAGES:r}=B(i=>typeof i.MANAGE_MESSAGES=="bigint"),{isEditing:o}=re("isEditing");document.addEventListener("keydown",Dr),document.addEventListener("keyup",Nr),this.onClick=pt((i,d,c)=>{let f=i.author.id===K.getCurrentUser().id;Wt?(f||n(r,d))&&(e(d.id,i.id),c.preventDefault()):f&&c.detail>=2&&!o(d.id,i.id)&&(t(d.id,i.id,i.content),c.preventDefault())})},stop(){mt(this.onClick),document.removeEventListener("keydown",Dr),document.removeEventListener("keyup",Nr)}})});var Ht,Lr=l(()=>{"use strict";m();ae();u();Ht=s({name:"MoreCommands",description:"echo, lenny",authors:[a.Arjix,{name:"ICodeInAssembly",id:702973430449832038n}],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[ge],inputType:3,execute:(e,t)=>{let n=G(e,"message","");Ce(t.channel.id,{content:n})}},{name:"lenny",description:"Sends a lenny face",options:[ge],execute:e=>({content:G(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})}]})});function hi(e,t){let n=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)n++;return n}function yi(e,t){if(!t.global)throw new Error("pattern must be global");let n=0;for(;t.test(e);)n++;return n}function bi(e){let t=hi(e,Or)+yi(e,Ei);return Math.min(t,10)}function Ur(){let e=document.createElement("audio");e.src=fi,e.play()}var Or,fi,gi,Kt,Ei,$r=l(()=>{"use strict";m();u();v();N();Or="\u{1F5FF}",fi="https://github.com/MeguminSama/VencordPlugins/raw/main/plugins/moyai/moyai.mp3",gi=!0,Kt=s({name:"Moyai",authors:[a.Megu],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",async onMessage(e){if(e.optimistic||e.type!=="MESSAGE_CREATE"||e.message.state==="SENDING"||gi&&e.message.author?.bot||!e.message.content||e.channelId!==V.getChannelId())return;let t=bi(e.message.content);for(let n=0;n<t;n++)Ur(),await St(300)},onReaction(e){if(e.optimistic||e.type!=="MESSAGE_REACTION_ADD"||e.channelId!==V.getChannelId())return;let t=e.emoji.name.toLowerCase();t!==Or&&!t.includes("moyai")&&!t.includes("moai")||Ur()},start(){C.subscribe("MESSAGE_CREATE",this.onMessage),C.subscribe("MESSAGE_REACTION_ADD",this.onReaction)},stop(){C.unsubscribe("MESSAGE_CREATE",this.onMessage),C.unsubscribe("MESSAGE_REACTION_ADD",this.onReaction)}});Ei=/<a?:\w*moy?ai\w*:\d{17,20}>/gi});var Qt,Vr=l(()=>{"use strict";m();u();Qt=s({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[a.Glitch],patches:[{find:",acceptInvite:function",replacement:{match:/(\w=null!==[^;]+)/,replace:"$1;Vencord.Webpack.findByProps('updateGuildNotificationSettings').updateGuildNotificationSettings($1,{'muted':true,'suppress_everyone':true,'suppress_roles':true})"}}]})});var Yt,Br=l(()=>{"use strict";Y();F();m();u();v();Yt=s({name:"NitroBypass",authors:[a.Arjix],description:"Allows you to stream in nitro quality and send fake emojis.",dependencies:["MessageEventsAPI"],patches:[{find:"canUseAnimatedEmojis:function",replacement:["canUseAnimatedEmojis","canUseEmojisEverywhere","canUseHighVideoQuality","canStreamHighQuality","canStreamMidQuality"].map(e=>({match:new RegExp(`${e}:function\\(.+?}`),replace:`${e}:function (e) { return true; }`}))},{find:"STREAM_FPS_OPTION.format",replacement:{match:/(userPremiumType|guildPremiumTier):.{0,10}TIER_\d,?/g,replace:""}}],get guildId(){return window.location.href.split("channels/")[1].split("/")[0]},get canUseEmotes(){return Boolean(K.getCurrentUser().premiumType)},start(){if(this.canUseEmotes){console.info("[NitroBypass] Skipping start because you have nitro");return}let{getCustomEmojiById:e}=re("getCustomEmojiById");function t(n,r){return!n[r]||/\s/.test(n[r])?"":" "}this.preSend=O((n,r)=>{let{guildId:o}=this;for(let i of r.validNonShortcutEmojis){if(!i.require_colons||i.guildId===o&&!i.animated)continue;let d=`<${i.animated?"a":""}:${i.originalName||i.name}:${i.id}>`,c=i.url.replace(/\?size=[0-9]+/,"?size=48");r.content=r.content.replace(d,(f,E,h)=>`${t(h,E-1)}${c}${t(h,E+f.length)}`)}}),this.preEdit=ee((n,r,o)=>{let{guildId:i}=this;for(let[d,c,f]of o.content.matchAll(/(?<!\\)<a?:(\w+):(\d+)>/ig)){let E=e(f);if(E==null||E.guildId===i&&!E.animated||!E.require_colons)continue;let h=E.url.replace(/\?size=[0-9]+/,"?size=48");o.content=o.content.replace(d,(p,g,S)=>`${t(S,g-1)}${h}${t(S,g+p.length)}`)}})},stop(){$(this.preSend),te(this.preEdit)}})});var Jt,Gr=l(()=>{"use strict";u();m();Jt=s({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[a.rushii],patches:[{find:'safety_prompt:"DMSpamExperiment",response:"show_redacted_messages"',replacement:[{match:/collapsedReason;return (?=\w{1,2}.createElement)/,replace:"collapsedReason; return null;"}]}]})});var Xt,jr=l(()=>{"use strict";m();Y();u();Xt=s({name:"NoCanaryMessageLinks",description:"Removes the canary and ptb prefix from message links",authors:[a.Samu],dependencies:["MessageEventsAPI"],removeBetas(e){e.content=e.content.replace(/(?<=https:\/\/)(canary.|ptb.)(?=discord(?:app)?.com\/channels\/(?:\d{17,20}|@me)\/\d{17,20}\/\d{17,20})/g,"")},start(){this.preSend=O((e,t)=>this.removeBetas(t))},stop(){$(this.preSend)}})});var Zt,Wr=l(()=>{"use strict";m();u();Zt=s({name:"No F1",description:"Disables F1 help bind.",authors:[a.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var en,zr=l(()=>{"use strict";m();u();en=s({name:"No RPC",description:"Disables Discord's RPC server.",authors:[a.Cyn],patches:[{find:'.ensureModule("discord_rpc")',replacement:{match:/\.ensureModule\("discord_rpc"\)\.then\(\(.+?\)\)}/,replace:'.ensureModule("discord_rpc")}'}}]})});var tn,Hr=l(()=>{"use strict";m();tn=s({name:"NoReplyMention",description:"Disables reply pings by default",authors:[{name:"DustyAngel47",id:714583473804935238n}],patches:[{find:"CREATE_PENDING_REPLY:function",replacement:{match:/CREATE_PENDING_REPLY:function\((.{1,2})\){/,replace:"CREATE_PENDING_REPLY:function($1){$1.shouldMention=false;"}}]})});var nn,Kr=l(()=>{"use strict";u();m();nn=s({name:"NoSystemBadge",description:"Disables the taskbar and system tray unread count badge.",authors:[a.rushii],patches:[{find:"setSystemTrayApplications:function",replacement:[{match:/setBadge:function.+?},/,replace:"setBadge:function(){},"},{match:/setSystemTrayIcon:function.+?},/,replace:"setSystemTrayIcon:function(){},"}]}]})});var rn,qr=l(()=>{"use strict";m();u();rn=s({name:"NoTrack",description:"Disable Discord's tracking and crash reporting",authors:[a.Cyn],required:!0,patches:[{find:"TRACKING_URL:",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:"window.DiscordSentry=",replacement:{match:/window\.DiscordSentry=function.+\}\(\)/,replace:""}}]})});function Yr(e){let t=e instanceof File,n=t?URL.createObjectURL(e):e;return new Promise((r,o)=>{let i=new Image;i.onload=()=>{t&&URL.revokeObjectURL(n),r(i)},i.onerror=(d,c,f,E,h)=>o(h||d),i.crossOrigin="Anonymous",i.src=n})}async function vi(e,t,n){for(let r of e)switch(r.name){case"image":let o=Ti.getUploads(t.channel.id,Qr)[0];if(o){if(!o.isImage)throw"Upload is not an image";return o.item.file}break;case"url":return r.value;case"user":try{return(await wi(r.value)).getAvatarURL(n?void 0:t.guild?.id,2048).replace(/\?size=\d+$/,"?size=2048")}catch(i){throw console.error(`[petpet] Failed to fetch user
`,i),"Failed to fetch user. Check the console for more info."}}return null}var Qr,xi,_i,ze,Si,Ci,wi,Pi,Ti,on,Jr=l(()=>{"use strict";ae();u();m();N();F();Qr=0,xi=20,_i=128,ze=10,Si=H(()=>import("https://unpkg.com/gifenc@1.0.3/dist/gifenc.esm.js")),Ci=H(()=>Promise.all(Array.from({length:ze},(e,t)=>Yr(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),wi=R(y.byCode(".USER(")),Pi=R(y.byCode("UPLOAD_FILE_LIMIT_ERROR")),Ti=R(y.byProps(["getUploads"]));on=s({name:"petpet",description:"headpet a cutie",authors:[a.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{GIFEncoder:n,quantize:r,applyPalette:o}=await Si(),i=await Ci(),d=G(e,"no-server-pfp",!1);try{var c=await vi(e,t,d);if(!c)throw"No Image specified!"}catch(T){console.log(T);return}let f=await Yr(c),E=G(e,"delay",xi),h=G(e,"resolution",_i),p=new n,g=document.createElement("canvas");g.width=g.height=h;let S=g.getContext("2d");for(let T=0;T<ze;T++){S.clearRect(0,0,g.width,g.height);let I=T<ze/2?T:ze-T,jn=.8+I*.02,Wn=.8-I*.05,Io=(1-jn)*.5+.1,ko=1-Wn-.08;S.drawImage(f,Io*h,ko*h,jn*h,Wn*h),S.drawImage(i[T],0,0,h,h);let{data:zn}=S.getImageData(0,0,h,h),Hn=r(zn,256),Ao=o(zn,Hn);p.writeFrame(Ao,h,h,{transparent:!0,palette:Hn,delay:E})}p.finish();let M=new File([p.bytesView()],"petpet.gif",{type:"image/gif"});setImmediate(()=>Pi([M],t.channel,Qr))}}]})});var sn,Xr=l(()=>{"use strict";u();m();sn=s({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[a.botato],patches:[{find:"().expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)(&&\(\w=\w\.createElement\(\w+\.animated)/,replace:"true$1"}]}]})});var an,Zr=l(()=>{"use strict";m();u();an=s({name:"RandomiseFileNames",authors:[a.obscurity],description:"Randomise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=Vencord.Plugins.plugins.RandomiseFileNames.rand(f.filename)),$1(...args)),"}}],rand(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:7},()=>t[Math.floor(Math.random()*t.length)]).join("")+(e.lastIndexOf(".")>-1?e.slice(e.lastIndexOf(".")):"")}})});var he,He=l(()=>{he="0d99663"});var cn,eo=l(()=>{"use strict";m();He();u();cn=s({name:"Settings",description:"Adds Settings UI and debug info",authors:[a.Ven],required:!0,patches:[{find:"().versionHash",replacement:[{match:/\w\.createElement\(.{1,2}.Fragment,.{0,30}\{[^}]+\},"Host ".+?\):null/,replace:e=>{let t=e.indexOf("Host")-1,n=e.slice(0,t),r=`${e}, ${n}"Vencord ", "${he}${IS_WEB?" (Web)":""}"), " ")`;return IS_WEB||(r+=`,${n} "Electron ",VencordNative.getVersions().electron)," "),`,r+=`${n} "Chrome ",VencordNative.getVersions().chrome)," ")`),r}}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{match:/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/,replace:(e,t)=>`{section:${t}.ID.HEADER,label:"Vencord"},{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater,predicate:()=>!IS_WEB},{section:${t}.ID.DIVIDER},${e}`}}]})});var ln,to=l(()=>{"use strict";m();u();ln=s({name:"SilentTyping",authors:[a.Ven],description:"Hide that you are typing",patches:[{find:"startTyping:",replacement:{match:/startTyping:.+?,stop/,replace:"startTyping:()=>{},stop"}}]})});var dn,no=l(()=>{"use strict";m();Y();u();dn=s({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[a.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((n,r)=>Math.min(n,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 n=t.split(`
`);if(n.length<2)return t;let r="";return n[n.length-1]==="```"&&(r=n.pop()),`${n[0]}
${this.unindent(n.slice(1).join(`
`))}
${r}`})},start(){this.preSend=O((e,t)=>this.unindentMsg(t)),this.preEdit=ee((e,t,n)=>this.unindentMsg(n))},stop(){$(this.preSend),te(this.preEdit)}})});var pn,Ri,mn,ro=l(()=>{"use strict";m();u();Ri="https://raw.githubusercontent.com/facebook/react/17.0.2/scripts/error-codes/codes.json",mn=s({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[a.Cyn],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.<arguments\.length;.\+\+\).\+="&args\[\]="\+encodeURIComponent\(arguments\[.\]\);return"Minified React error #"\+.\+"; visit "\+.\+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.")}/,replace:(e,t,n)=>`${t}{var decoded=Vencord.Plugins.plugins.ReactErrorDecoder.decodeError.apply(null, arguments);if(decoded)return decoded;${n}}`}}],async start(){pn=await fetch(Ri).then(e=>e.json()).catch(e=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes
`,e))},stop(){pn=void 0},decodeError(e,...t){let n=0;return pn?.[e]?.replace(/%s/g,()=>{let r=t[n];return n++,r})}})});function Ii(e){return e.split(" ").map(t=>{let n=!1,r=t.toLowerCase();if(t.length<4)return t;for(let[o,i]of Mi)t.includes(o)&&(t=t.replace(o,i),n=!0);return r.includes("u")&&!r.includes("uwu")&&(t=t.replace("u","UwU"),n=!0),r.includes("o")&&!r.includes("owo")&&(t=t.replace("o","OwO"),n=!0),r.endsWith("y")&&t.length<7&&(t=t+" w"+t.slice(1),n=!0),n||(r.endsWith("n")||(t=t.replace("n","ny")),Math.floor(Math.random()*2)===1&&t.replace("s","sh"),Math.floor(Math.random()*5)===3&&!n&&(t=t[0]+"-"+t[0]+"-"+t),Math.floor(Math.random()*5)===3&&(t=t+" "+oo[Math.floor(Math.random()*oo.length)]),t=t.replaceAll("r","w").replaceAll("l","w")),t}).join(" ")}var oo,Mi,un,io=l(()=>{"use strict";m();ae();oo=["owo","UwU",">w<","^w^","\u25CFw\u25CF","\u2606w\u2606","\u{1D5E8}\u{1D604}\u{1D5E8}","(\u15D2\u15E8\u15D5)","(\u25B0\u02D8v\u02D8\u25B0)","( \xB4 \u25BD ` ).\uFF61\uFF4F\u2661","*unbuttons shirt*",">3<",">:3",":3","murr~","\u2665(\u3002U \u03C9 U\u3002)","(\u02D8\u03B5\u02D8)","*screams*","*twerks*","*sweats*"],Mi=[["love","wuv"],["mr","mistuh"],["dog","doggo"],["cat","kitteh"],["hello","henwo"],["hell","heck"],["fuck","fwick"],["fuk","fwick"],["shit","shoot"],["friend","fwend"],["stop","stawp"],["god","gosh"],["dick","peepee"],["penis","bulge"],["damn","darn"]];un=s({name:"UwUifier",description:"Simply uwuify commands",authors:[{name:"ECHO",id:712639419785412668n}],dependencies:["CommandsAPI"],commands:[{name:"uwuify",description:"uwuifies your messages",options:[Pe],execute:e=>({content:Ii(G(e,"message",""))})}]})});var hn={};k(hn,{ModalSize:()=>fn,closeModal:()=>Di,openModal:()=>gn});function gn(e,t){let n=`Vencord${Ai++}`;return so.openModal(r=>Vencord.Webpack.Common.React.createElement(ki,{...r,...t},Vencord.Webpack.Common.React.createElement(e,null)),{modalKey:n}),n}function Di(e){so.closeModal(e)}var ki,so,Ai,fn,yn=l(()=>{"use strict";F();N();Oe();ki=R(y.byCode("headerIdIsManaged:")),so=bt("onCloseRequest:null!=",{openModal:y.byCode("onCloseRequest:null!="),closeModal:y.byCode("onCloseCallback&&")}),Ai=1337,fn=(o=>(o.SMALL="small",o.MEDIUM="medium",o.LARGE="large",o.DYNAMIC="dynamic",o))(fn||{})});var Ni,Fi,Ke,En,ao=l(()=>{"use strict";u();m();N();yn();F();v();Ni=R(e=>e.prototype?.render?.toString().includes("OPEN_ORIGINAL_IMAGE")),Fi=H(()=>B(e=>e.type?.toString().includes("MASKED_LINK)"))),Ke="Vencord.Plugins.plugins.ViewIcons.openImage(",En=s({name:"ViewIcons",authors:[a.Ven],description:"Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.",openImage(e){gn(()=>Vencord.Webpack.Common.React.createElement(Ni,{shouldAnimate:!0,original:e,src:e,renderLinkComponent:t=>x.createElement(Fi(),t)}),{size:"dynamic"})},patches:[{find:"onAddFriend:",replacement:{match:/\{src:(.{1,2}),avatarDecoration/,replace:(e,t)=>`{src:${t},onClick:()=>${Ke}${t}.replace(/\\?.+$/, "")+"?size=2048"),avatarDecoration`}},{find:"().popoutNoBannerPremium",replacement:{match:/style:.{0,10}\{\},(.{1,2})\)/,replace:(e,t)=>`onClick:${t}.backgroundImage&&(()=>${Ke}${t}.backgroundImage.replace("url(", "").replace(/(\\?size=.+)?\\)/, "?size=2048"))),${e}`}},{find:'"GuildContextMenu:',replacement:[{match:/\w=(\w)\.id/,replace:(e,t)=>`_guild=${t},${e}`},{match:/(?<=createElement\((.{1,5}),\{id:"leave-guild".{0,100}\,)(.{1,2}\.createElement)\((.{1,5}),null,(.{1,2})\)(?=\)\}function)/,replace:(e,t,n,r,o)=>`${n}(${r},null,[_guild.icon&&${n}(${t},{id:"viewicons-copy-icon",label:"View Icon",action:()=>${Ke}_guild.getIconURL(void 0,true)+"size=2048")}),_guild.banner&&${n}(${t},{id:"viewicons-copy-banner",label:"View Banner",action:()=>${Ke}Vencord.Webpack.findByProps("getGuildBannerURL").getGuildBannerURL(_guild).replace(/\\?size=.+/, "?size=2048"))}),${o}])`}]}]})});var bn,co=l(()=>{"use strict";m();u();bn=s({name:"Webhook Tags",description:"Changes the bot tag to say webhook for webhooks",authors:[a.Cyn],patches:[{find:'.BOT=0]="BOT"',replacement:[{match:/(.)\[.\.BOT=0\]="BOT";/,replace:(e,t)=>`${t}[${t}.WEBHOOK=99]="WEBHOOK";${e}`},{match:/case (.)\.BOT:default:(.)=/,replace:(e,t,n)=>`case ${t}.WEBHOOK:${n}="WEBHOOK";break;${e}`}]},{find:".Types.ORIGINAL_POSTER",replacement:{match:/return null==(.)\?null:.\.createElement\((.)\.Z/,replace:(e,t,n)=>`if(arguments[0].message.webhookId&&arguments[0].user.isNonUserBot()){${t}=${n}.Z.Types.WEBHOOK}${e}`}}]})});var L,qe=l(()=>{Qn();Yn();Jn();Xn();Zn();er();tr();ir();dr();pr();mr();ur();br();xr();_r();Sr();kr();Ar();Fr();Lr();$r();Vr();Br();Gr();jr();Wr();zr();Hr();Kr();qr();Jr();Xr();Zr();eo();to();no();ro();io();ao();co();L={[et.name]:et,[tt.name]:tt,[nt.name]:nt,[rt.name]:rt,[ot.name]:ot,[it.name]:it,[st.name]:st,[ft.name]:ft,[wt.name]:wt,[Tt.name]:Tt,[vt.name]:vt,[Rt.name]:Rt,[Ut.name]:Ut,[Ot.name]:Ot,[$t.name]:$t,[Vt.name]:Vt,[Gt.name]:Gt,[jt.name]:jt,[zt.name]:zt,[Ht.name]:Ht,[Kt.name]:Kt,[Qt.name]:Qt,[Yt.name]:Yt,[Jt.name]:Jt,[Xt.name]:Xt,[Zt.name]:Zt,[en.name]:en,[tn.name]:tn,[nn.name]:nn,[rn.name]:rn,[on.name]:on,[sn.name]:sn,[an.name]:an,[cn.name]:cn,[ln.name]:ln,[dn.name]:dn,[mn.name]:mn,[un.name]:un,[En.name]:En,[bn.name]:bn}});function Li(e){let t={};for(let n in e)t[n]=e[n],t[e[n]]=n;return Object.freeze(t)}var P,ye=l(()=>{"use strict";P=Li({QUICK_CSS_UPDATE:"VencordQuickCssUpdate",GET_QUICK_CSS:"VencordGetQuickCss",GET_SETTINGS_DIR:"VencordGetSettingsDir",GET_SETTINGS:"VencordGetSettings",SET_SETTINGS:"VencordSetSettings",OPEN_EXTERNAL:"VencordOpenExternal",OPEN_QUICKCSS:"VencordOpenQuickCss",GET_UPDATES:"VencordGetUpdates",GET_REPO:"VencordGetRepo",GET_HASHES:"VencordGetHashes",UPDATE:"VencordUpdate",BUILD:"VencordBuild",GET_DESKTOP_CAPTURE_SOURCES:"VencordGetDesktopCaptureSources"})});function lo(e,t=e,n=""){return new Proxy(e,{get(r,o){let i=r[o];return typeof i=="object"&&!Array.isArray(i)&&i!==null?lo(i,t,`${n}${n&&"."}${o}`):i},set(r,o,i){if(r[o]===i)return!0;r[o]=i;let d=`${n}${n&&"."}${o}`;for(let c of Qe)(!c._path||c._path===d)&&c(i,d);return VencordNative.ipc.invoke(P.SET_SETTINGS,JSON.stringify(t,null,4)),!0}})}function mo(){let[,e]=x.useReducer(()=>({}),{});return x.useEffect(()=>(Qe.add(e),()=>void Qe.delete(e)),[]),q}function uo(e,t){t._path=e,Qe.add(t)}var Te,ce,Qe,po,q,ve=l(()=>{"use strict";qe();ye();v();N();Te={notifyAboutUpdates:!0,useQuickCss:!0,enableReactDevtools:!1,plugins:{}};for(let e in L)Te.plugins[e]={enabled:L[e].required??!1};try{ce=JSON.parse(VencordNative.ipc.sendSync(P.GET_SETTINGS));for(let e in Te)ce[e]??=Te[e];oe(ce,Te)}catch(e){console.error("Corrupt settings file. ",e),ce=oe({},Te)}Qe=new Set;po=ce,q=lo(ce)});var Sn={};k(Sn,{patches:()=>fo,plugins:()=>Ui,startAllPlugins:()=>xn,startPlugin:()=>Re,stopPlugin:()=>_n});function xn(){for(let e in L)q.plugins[e].enabled&&Re(L[e])}function Re(e){if(e.start){if(j.info("Starting plugin",e.name),e.started)return j.warn(`${e.name} already started`),!1;try{e.start(),e.started=!0}catch(t){return j.error(`Failed to start ${e.name}
`,t),!1}}if(e.commands?.length){j.info("Registering commands of plugin",e.name);for(let t of e.commands)try{Nt(t,e.name)}catch(n){return j.error(`Failed to register command ${t.name}
`,n),!1}}return!0}function _n(e){if(e.stop){if(j.info("Stopping plugin",e.name),!e.started)return j.warn(`${e.name} already stopped`),!1;try{e.stop(),e.started=!1}catch(t){return j.error(`Failed to stop ${e.name}
`,t),!1}}if(e.commands?.length){j.info("Unregistering commands of plugin",e.name);for(let t of e.commands)try{Ft(t.name)}catch(n){return j.error(`Failed to unregister command ${t.name}
`,n),!1}}return!0}var j,Ui,fo,Me=l(()=>{"use strict";qe();ae();ve();Z();j=new A("PluginManager","#a6d189"),Ui=L,fo=[];for(let e of Object.values(L))if(e.patches&&q.plugins[e.name].enabled)for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),fo.push(t)});var An={};k(An,{UpdateLogger:()=>be,changes:()=>X,checkForUpdates:()=>Ae,getRepo:()=>In,isNewer:()=>Ye,isOutdated:()=>ke,rebuild:()=>kn,update:()=>Mn,updateError:()=>xe});async function Ee(e){let t=await e;if(t.ok)return t.value;throw xe=t.error,t.error}async function Ae(){return X=await Ee(VencordNative.ipc.invoke(P.GET_UPDATES)),X.some(e=>e.hash===he)?(Ye=!0,ke=!1):ke=X.length>0}async function Mn(){if(!ke)return!0;let e=await Ee(VencordNative.ipc.invoke(P.UPDATE));return e&&(ke=!1),e}function In(){return Ee(VencordNative.ipc.invoke(P.GET_REPO))}async function kn(){let e=await Ee(VencordNative.ipc.invoke(P.GET_HASHES));if(!await Ee(VencordNative.ipc.invoke(P.BUILD)))throw new Error("The Build failed. Please try manually building the new update");let t=await Ee(VencordNative.ipc.invoke(P.GET_HASHES));return e["patcher.js"]!==t["patcher.js"]||e["preload.js"]!==t["preload.js"]}var be,ke,Ye,xe,X,Je=l(()=>{"use strict";ye();Z();He();be=new A("Updater","white"),ke=!1,Ye=!1});var De,Fn=l(()=>{"use strict";De=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)}getChanges(){return this.set.values()}map(t){return[...this.getChanges()].map(t)}}});function Ne(e){return Vencord.Webpack.Common.React.createElement(me,{className:e.className,style:{padding:"2em",backgroundColor:"#e7828430",borderColor:"#e78284",color:"var(--text-normal)",...e.style}},e.children)}var On=l(()=>{"use strict";v()});var Bi,Eo,bo,Q,$n=l(()=>{"use strict";Z();v();On();Bi="#e78284",Eo=new A("React ErrorBoundary",Bi),bo={},Q=class extends x.Component{static wrap(t){return n=>Vencord.Webpack.Common.React.createElement(Q,null,Vencord.Webpack.Common.React.createElement(t,{...n}))}state={error:bo,stack:"",message:""};static getDerivedStateFromError(t){let n=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&n){let o=n.indexOf(`
`);o!==-1&&(r=n.slice(0,o),n=n.slice(o+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:n,message:r}}componentDidCatch(t,n){this.props.onError?.(t,n),Eo.error(`A component threw an Error
`,t),Eo.error("Component Stack",n.componentStack)}render(){return this.state.error===bo?this.props.children:this.props.fallback?Vencord.Webpack.Common.React.createElement(this.props.fallback,{children:this.props.children,...this.state}):Vencord.Webpack.Common.React.createElement(Ne,{style:{overflow:"hidden"}},Vencord.Webpack.Common.React.createElement("h1",null,"Oh no!"),Vencord.Webpack.Common.React.createElement("p",null,"An error occurred while rendering this Component. More info can be found below and in your console."),Vencord.Webpack.Common.React.createElement("code",null,this.state.message,!!this.state.stack&&Vencord.Webpack.Common.React.createElement("pre",{className:U.marginTop8},this.state.stack)))}}});function Xe(e){return e.style??={},e.style.flexDirection||=e.flexDirection,e.style.gap??="1em",e.style.display="flex",Vencord.Webpack.Common.React.createElement("div",{...e},e.children)}var Vn=l(()=>{"use strict"});function Bn(e){w.show({message:e,type:w.Type.FAILURE,id:w.genId(),options:{position:w.Position.BOTTOM}})}var xo,_o=l(()=>{"use strict";N();qe();ve();ye();v();$n();Me();Me();Vn();Fn();xo=Q.wrap(function(){let[t,,n]=_e(()=>VencordNative.ipc.invoke(P.GET_SETTINGS_DIR),"Loading..."),r=mo(),o=x.useMemo(()=>new De,[]);x.useEffect(()=>()=>void(o.hasChanges&&se.show({title:"Restart required",body:Vencord.Webpack.Common.React.createElement(Vencord.Webpack.Common.React.Fragment,null,Vencord.Webpack.Common.React.createElement("p",null,"The following plugins require a restart:"),Vencord.Webpack.Common.React.createElement("div",null,o.map((c,f)=>Vencord.Webpack.Common.React.createElement(Vencord.Webpack.Common.React.Fragment,null,f>0&&", ",ue.parse("`"+c+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let i=x.useMemo(()=>{let c={};for(let f in L){let E=L[f].dependencies;if(E)for(let h of E)c[h]??=[],c[h].push(f)}return c},[]),d=x.useMemo(()=>Object.values(L).sort((c,f)=>c.name.localeCompare(f.name)),[]);return Vencord.Webpack.Common.React.createElement(_.FormSection,{tag:"h1",title:"Vencord"},Vencord.Webpack.Common.React.createElement(_.FormTitle,{tag:"h5"},"Settings"),Vencord.Webpack.Common.React.createElement(_.FormText,null,"SettingsDir: ",Vencord.Webpack.Common.React.createElement("code",{style:{userSelect:"text",cursor:"text"}},t)),!IS_WEB&&Vencord.Webpack.Common.React.createElement(Xe,{className:de(U.marginBottom20)},Vencord.Webpack.Common.React.createElement(D,{onClick:()=>window.DiscordNative.app.relaunch(),size:D.Sizes.SMALL,color:D.Colors.GREEN},"Reload"),Vencord.Webpack.Common.React.createElement(D,{onClick:()=>window.DiscordNative.fileManager.showItemInFolder(t),size:D.Sizes.SMALL,disabled:n},"Launch Directory"),Vencord.Webpack.Common.React.createElement(D,{onClick:()=>VencordNative.ipc.invoke(P.OPEN_QUICKCSS),size:D.Sizes.SMALL,disabled:t==="Loading..."},"Open QuickCSS File")),Vencord.Webpack.Common.React.createElement(_.FormDivider,null),Vencord.Webpack.Common.React.createElement(_.FormTitle,{tag:"h5"},"Settings"),Vencord.Webpack.Common.React.createElement(ie,{value:r.useQuickCss,onChange:c=>r.useQuickCss=c,note:"Loads styles from your QuickCss file"},"Use QuickCss"),!IS_WEB&&Vencord.Webpack.Common.React.createElement(ie,{value:r.enableReactDevtools,onChange:c=>r.enableReactDevtools=c,note:"Requires a full restart"},"Enable React Developer Tools"),!IS_WEB&&Vencord.Webpack.Common.React.createElement(ie,{value:r.notifyAboutUpdates,onChange:c=>r.notifyAboutUpdates=c,note:"Shows a Toast on StartUp"},"Get notified about new Updates"),Vencord.Webpack.Common.React.createElement(_.FormDivider,null),Vencord.Webpack.Common.React.createElement(_.FormTitle,{tag:"h5",className:de(U.marginTop20,U.marginBottom8)},"Plugins"),d.map(c=>{let f=i[c.name]?.filter(h=>r.plugins[h].enabled),E=f?.length;return Vencord.Webpack.Common.React.createElement(ie,{disabled:c.required||E,key:c.name,value:r.plugins[c.name].enabled||c.required||E,onChange:h=>{r.plugins[c.name].enabled=h;let p=Boolean(c.patches?.length);h?(c.dependencies?.forEach(g=>{let S=L[g];p||=Boolean(S.patches?.length&&!r.plugins[g].enabled),r.plugins[g].enabled=!0,!p&&!S.started&&!Re(S)&&Bn(`Failed to start dependency ${g}. Check the console for more info.`)}),!p&&!c.started&&!Re(c)&&Bn(`Failed to start plugin ${c.name}. Check the console for more info.`)):(c.started||!c.start&&c.commands?.length)&&!_n(c)&&Bn(`Failed to stop plugin ${c.name}. Check the console for more info.`),p&&o.handleChange(c.name)},note:c.description,tooltipNote:c.required?"This plugin is required. Thus you cannot disable it.":E?`${_t(f)} ${f.length===1?"depends":"depend"} on this plugin. Thus you cannot disable it.`:null},c.name)}))})});function Gn(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none"),Vencord.Webpack.Common.React.createElement("a",{href:e.href,target:"_blank",style:e.style},e.children)}var So=l(()=>{"use strict"});function Co(e,t){return async()=>{e(!0);try{await t()}catch(r){if(be.error("Failed to update",r),r)if(r.code&&r.cmd){let{code:o,path:i,cmd:d,stderr:c}=r;if(o==="ENOENT")var n=`Command \`${i}\` not found.
Please install it and try again`;else{var n=`An error occured while running \`${d}\`:
`;n+=c||`Code \`${o}\`. See the console for more info`}}else var n="An unknown error occurred. See the console for more info.";else var n=`An unknown error occurred (error is undefined).
Please try again.`;se.show({title:"Oops!",body:Vencord.Webpack.Common.React.createElement(Ne,null,n.split(`
`).map(o=>Vencord.Webpack.Common.React.createElement("div",null,ue.parse(o))))})}finally{e(!1)}}}function wo({updates:e,repo:t,repoPending:n}){return Vencord.Webpack.Common.React.createElement(me,{style:{padding:".5em"}},e.map(({hash:r,author:o,message:i})=>Vencord.Webpack.Common.React.createElement("div",null,Vencord.Webpack.Common.React.createElement(Gn,{href:`${t}/commit/${r}`,disabled:n},Vencord.Webpack.Common.React.createElement("code",null,r)),Vencord.Webpack.Common.React.createElement("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},i," - ",o))))}function Gi(e){let[t,n]=x.useState(X),[r,o]=x.useState(!1),[i,d]=x.useState(!1),c=t.length>0;return Vencord.Webpack.Common.React.createElement(Vencord.Webpack.Common.React.Fragment,null,!t&&xe?Vencord.Webpack.Common.React.createElement(Vencord.Webpack.Common.React.Fragment,null,Vencord.Webpack.Common.React.createElement(_.FormText,null,"Failed to check updates. Check the console for more info"),Vencord.Webpack.Common.React.createElement(Ne,{style:{padding:"1em"}},Vencord.Webpack.Common.React.createElement("p",null,xe.stderr||xe.stdout||"An unknown error occurred"))):Vencord.Webpack.Common.React.createElement(_.FormText,{className:U.marginBottom8},c?`There are ${t.length} Updates`:"Up to Date!"),c&&Vencord.Webpack.Common.React.createElement(wo,{updates:t,...e}),Vencord.Webpack.Common.React.createElement(Xe,{className:de(U.marginBottom8,U.marginTop8)},c&&Vencord.Webpack.Common.React.createElement(D,{size:D.Sizes.SMALL,disabled:i||r,onClick:Co(d,async()=>{if(await Mn()){n([]);let f=await kn();await new Promise(E=>{se.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){f?window.DiscordNative.app.relaunch():location.reload(),E()},onCancel:E})})}})},"Update Now"),Vencord.Webpack.Common.React.createElement(D,{size:D.Sizes.SMALL,disabled:i||r,onClick:Co(o,async()=>{await Ae()?n(X):(n([]),w.show({message:"No updates found!",id:w.genId(),type:w.Type.MESSAGE,options:{position:w.Position.BOTTOM}}))})},"Check for Updates")))}function ji(e){return Vencord.Webpack.Common.React.createElement(Vencord.Webpack.Common.React.Fragment,null,Vencord.Webpack.Common.React.createElement(_.FormText,{className:U.marginBottom8},"Your local copy has more recent commits. Please stash or reset them."),Vencord.Webpack.Common.React.createElement(wo,{...e,updates:X}))}var Po,To=l(()=>{"use strict";He();Je();v();Vn();N();So();$n();On();Po=Q.wrap(function(){let[t,n,r]=_e(In,"Loading...");x.useEffect(()=>{n&&be.error("Failed to retrieve repo",n)},[n]);let o={repo:t,repoPending:r};return Vencord.Webpack.Common.React.createElement(_.FormSection,{tag:"h1",title:"Vencord Updater"},Vencord.Webpack.Common.React.createElement(_.FormTitle,{tag:"h5"},"Repo"),Vencord.Webpack.Common.React.createElement(_.FormText,null,r?t:n?"Failed to retrieve - check console":Vencord.Webpack.Common.React.createElement(Gn,{href:t},t.split("/").slice(-2).join("/"))," (",he,")"),Vencord.Webpack.Common.React.createElement(_.FormDivider,null),Vencord.Webpack.Common.React.createElement(_.FormTitle,{tag:"h5"},"Updates"),Ye?Vencord.Webpack.Common.React.createElement(ji,{...o}):Vencord.Webpack.Common.React.createElement(Gi,{...o}))})});var vo={};k(vo,{Settings:()=>xo,Updater:()=>Po});var Ro=l(()=>{"use strict";_o();To()});var zi={};k(zi,{Api:()=>Rn,Components:()=>Mo,PlainSettings:()=>po,Plugins:()=>Sn,QuickCss:()=>Nn,Settings:()=>q,Updater:()=>An,Util:()=>Un,Webpack:()=>gt});var Le,Bo=new Promise(e=>{setTimeout(()=>{new QWebChannel(qt.webChannelTransport,function(t){Le=t.objects.webclass,e()})})});async function qn(){Le||await Bo}window.VencordNative={getVersions:()=>({}),ipc:{send:async(e,...t)=>{await qn(),Le.vencordSend(e,t)},sendSync:(e,...t)=>{if(e==="VencordGetSettings")return console.log("stub: IPC VencordGetSettings"),"{}";throw new Error("Synchroneous IPC not implemented")},on(e,t){},off(e,t){},invoke:async(e,...t)=>(await qn(),Le.vencordSend(e,t))}};Me();F();var Rn={};k(Rn,{Commands:()=>Lt,MessageEvents:()=>ut,Notices:()=>vn});Y();var vn={};k(vn,{currentNotice:()=>Ie,nextNotice:()=>go,noticesQueue:()=>wn,popNotice:()=>Pn,showNotice:()=>Tn});F();var Cn;b(e=>e.show&&e.dismiss&&!e.suppressAll,e=>Cn=e);var wn=[],Ie=null;function Pn(){Cn.dismiss()}function go(){Ie=wn.shift(),Ie&&Cn.show(...Ie,"VencordNotice")}function Tn(e,t,n){wn.push(["GENERIC",e,t,n]),Ie||go()}ae();Je();var Nn={};k(Nn,{toggle:()=>Dn});ve();ye();var le;async function Dn(e){le?le.disabled=!e:e&&(le=document.createElement("style"),le.id="vencord-custom-css",document.head.appendChild(le),VencordNative.ipc.on(P.QUICK_CSS_UPDATE,(t,n)=>le.innerText=n),le.innerText=await VencordNative.ipc.invoke(P.GET_QUICK_CSS))}document.addEventListener("DOMContentLoaded",()=>{Dn(q.useQuickCss),uo("useQuickCss",Dn)});var Un={};k(Un,{ChangeList:()=>De,Constants:()=>Ze,Discord:()=>Ln,IpcEvents:()=>P,LazyComponent:()=>ei,Logger:()=>A,Modals:()=>hn,classes:()=>de,debounce:()=>Oi,humanFriendlyJoin:()=>_t,lazy:()=>Zo,lazyWebpack:()=>R,makeCodeblock:()=>Ct,makeLazy:()=>H,mergeDefaults:()=>oe,proxyLazy:()=>Se,sleep:()=>St,suppressErrors:()=>ti,useAwaiter:()=>_e});Fn();function Oi(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}N();$e();ye();Z();u();var Ln={};k(Ln,{getCurrentChannel:()=>ho,getCurrentGuild:()=>$i});v();function ho(){return pe.getChannel(V.getChannelId())}function $i(){return Ve.getGuild(ho()?.guild_id)}yn();ve();Me();u();Z();F();var yo,W=new A("WebpackInterceptor","#8caaee");Object.defineProperty(window,z,{get:()=>yo,set:e=>{e?.push!==Array.prototype.push&&(W.info(`Patching ${z}.push`),Et(e),Vi(),delete window[z],window[z]=e),yo=e},configurable:!0});function Vi(){function e(t){try{let n=t[1],{subscriptions:r,listeners:o}=Vencord.Webpack,{patches:i}=Vencord.Plugins;for(let d in n){let c=n[d],f=c.toString().replaceAll(`
`,""),E=c,h=new Set;n[d]=function(p,g,S){try{c(p,g,S)}catch(M){if(c===E)throw M;return W.error("Error in patched chunk",M),void E(p,g,S)}if(p.exports===window){Object.defineProperty(S.c,d,{value:S.c[d],enumerable:!1,configurable:!0,writable:!0});return}for(let M of o)try{M(g)}catch(T){W.error("Error in webpack listener",T)}for(let[M,T]of r)try{if(M(g))r.delete(M),T(g);else if(typeof g=="object"){g.default&&M(g.default)&&(r.delete(M),T(g.default));for(let I in g)I.length<3&&g[I]&&M(g[I])&&(r.delete(M),T(g[I]))}}catch(I){W.error("Error while firing callback for webpack chunk",I)}},n[d].toString=()=>c.toString(),n[d].original=E;for(let p=0;p<i.length;p++){let g=i[p];if(f.includes(g.find)){h.add(g.plugin);for(let S of g.replacement){let M=c,T=f;try{let I=f.replace(S.match,S.replace);I===f?(W.warn(`Patch by ${g.plugin} had no effect: ${S.match}`),W.debug(`Function Source:
`,f)):(f=I,c=(0,eval)(`// Webpack Module ${d} - Patched by ${[...h].join(", ")}
${I}
//# sourceURL=WebpackModule${d}`))}catch(I){W.error("Failed to apply patch of",g.plugin,I),W.debug(`Original Source
`,T),W.debug(`Patched Source
`,f),f=T,c=M,h.delete(g.plugin)}}g.all||i.splice(p--,1)}}}}catch(n){W.error("oopsie",n)}return e.original.call(window[z],t)}e.original=window[z].push,Object.defineProperty(window[z],"push",{get:()=>e,set:t=>e.original=t,configurable:!0})}Je();F();v();Object.defineProperty(window,"IS_WEB",{get:()=>!window.DiscordNative,configurable:!0,enumerable:!0});var Mo;async function Wi(){await ht,xn(),Mo=await Promise.resolve().then(()=>(Ro(),vo));try{await Ae()&&q.notifyAboutUpdates&&setTimeout(()=>{Tn("A Vencord update is available!","View Update",()=>{Pn(),Be.open("VencordUpdater")})},1e4)}catch(e){be.error("Failed to check for updates",e)}}Wi();return Vo(zi);})();
//# sourceURL=VencordWeb